Create User
The New User API is used for creating a new patient. It mandates patient details and facility information to be included in the API body, along with a valid token in the headers.
Demo Curl
curl --location 'https://demo.hng.one/developerapi/mmu/createPatient' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <<Token>>' \
--data-raw '{
"patientDetails": {
"uhid": "Test_patient_1",
"first_name": "Test",
"last_name": "T",
"middle_name": "",
"gender": "<<Male/Female/Other>>",
"date_of_birth": 826676093,
"registration_date": 826676093,
"age": {
"years": <<age>>
},
"mobile_no": "<<mobile number>>",
"city": "<<location>>",
"email_id": "<<mail id>>"
},
"facilities": [
{
"facilityId": "<<Facility Id>>",
"facilityName": "<<Facility Name>>"
}
],
"azp" : "<<AZP>>"
}'
Prod Curl
curl --location 'https://aths.hng.one/developerapi/mmu/createPatient' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <<Token>>' \
--data-raw '{
"patientDetails": {
"uhid": "Test_patient_1",
"first_name": "Test",
"last_name": "T",
"middle_name": "",
"gender": "<<Male/Female/Other>>",
"date_of_birth": 826676093,
"registration_date": 826676093,
"age": {
"years": <<age>>
},
"mobile_no": "<<mobile number>>",
"city": "<<location>>",
"email_id": "<<mail id>>"
},
"facilities": [
{
"facilityId": "<<Facility Id>>",
"facilityName": "<<Facility Name>>"
}
],
"azp" : "<<AZP>>"
}'
Sample Responce
You will receive a response similar to below.
{
"code": "Ok",
"message": "Patient Created successfully!",
"data": {
"medexUid": "medexUID|12345"
}
}
Information Required for Adding User
Patient Details
| Field | Type | ENUM | Description |
|---|---|---|---|
| uhid | String | ||
| first_name | String | ||
| middle_name | String | ||
| last_name | String | ||
| gender | String | Male /Female/Other | |
| date_of_birth | Number | Unix Timestamp | |
| registration_date | Number | Unix Timestamp | |
| mobile_no | String | ||
| age | String | ||
| city | String | ||
| email_id | String |
Facility Data
| Field | Type | ENUM | Description |
|---|---|---|---|
| facilityId | String | ||
| facilityName | String |
AZP Data
| Field | Type | ENUM | Description |
|---|---|---|---|
| azp | String |