Skip to main content

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

FieldTypeENUMDescription
uhidString
first_nameString
middle_nameString
last_nameString
genderStringMale /Female/Other
date_of_birthNumberUnix Timestamp
registration_dateNumberUnix Timestamp
mobile_noString
ageString
cityString
email_idString

Facility Data

FieldTypeENUMDescription
facilityIdString
facilityNameString

AZP Data

FieldTypeENUMDescription
azpString