-
Notifications
You must be signed in to change notification settings - Fork 1
Patient
Syarif Ubaidillah edited this page Jul 7, 2022
·
1 revision
Setiap fitur yang memiliki header
Authorization
berarti harus login untuk mendapatkanaccess_token
danrefresh_token
.
Setiap fitur yang memiliki
Query Param
dapat digunakan seperti ini/api/example?paramA=12¶mB=331
.
Fitur terbatas pada role Administrator
Method | Path |
---|---|
POST | /api/patient |
Header | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <access_token> |
{
"national_id": "8729301745162748",
"full_name": "Faizur Ramadhan",
"gender": "Male",
"address": "Sumenep",
"birthdate": "2001-04-14",
"blood_type": "A"
}
{
"message": "Patient Created",
}
Method | Path |
---|---|
GET | /api/patient |
Header | Value |
---|---|
Authorization | Bearer <access_token> |
Query Param | Data Type | Format |
---|---|---|
date_start | String | yyyy-mm-dd |
date_end | String | yyyy-mm-dd |
{
"data": [
{
"id": 1,
"code": "RM00001",
"national_id": "8729301745162748",
"full_name": "Faizur Ramadhan",
"gender": "Male",
"address": "Sumenep",
"birthdate": "2001-04-14",
"blood_type": "A"
}
],
"message": "Patient Fetched"
}
Method | Path |
---|---|
GET | /api/patient/{id} |
Header | Value |
---|---|
Authorization | Bearer <access_token> |
{
"data": {
"id": 1,
"code": "RM00001",
"national_id": "8729301745162748",
"full_name": "Faizur Ramadhan",
"gender": "Male",
"address": "Sumenep",
"birthdate": "2001-04-14",
"blood_type": "A"
},
"message": "Patient Fetched"
}
Fitur terbatas pada role Administrator
Method | Path |
---|---|
PUT | /api/patient/{id}/update |
Header | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <access_token> |
{
"national_id": "8729301745162748",
"full_name": "Faizur Ramadhan",
"gender": "Male",
"address": "Sumenep",
"birthdate": "2001-04-14",
"blood_type": "A"
}
{
"message": "Patient #{id} Updated",
}
Fitur terbatas pada role Administrator
Method | Path |
---|---|
DELETE | /api/patient/{id}/delete |
Header | Value |
---|---|
Authorization | Bearer <access_token> |
{
"message": "Patient #{id} Deleted",
}