Link patients
This endpoint enables patients who share mobile number and birthdate to be linked.
URL: <base_url>/providers/<provider_id>/patient_links
Method: POST
{
"primary_patient": "<patient-uuid>",
"linked_patients": ["<patient1-uuid>", "<patient2-uuid>", ..., "<patientN-uuid>"],
"comment": "Testing API endpoint"
}
{
"success": true,
"message": "Patients were successfully linked",
"data": [
{
"uuid": "<patient_link_uuid>",
"created_at": "2022-02-10T12:11:27.530249Z",
"is_deleted": false,
"modified_at": "2022-02-10T12:11:27.530316Z",
"performer_name": "<practitioner-fullname>",
"comment": "Testing API endpoint",
"is_active": true,
"primary_patient": <patient-id>,
"linked_patient": <patient-id>,
"performed_by": <user-id>,
"performing_practitioner": "<practitioner-id>"
}
],
"errors": null
}
Register an anonymous patient
This endpoint enables patients to be registered both patients with all information provided and anonymous patients with little to no information provided.
URL: {{base_url}}/providers/{{provider_id}}/patients
Method: POST
{
"anonymous": true,
"gender": "MALE"
}
{
"success": true,
"message": "Patient created successfully",
"data": {
"id": 14526,
"user": null,
"mr_number": "8a07b474-0673-490d-8a24-0ce2d317e1a0",
"last_encounter": null,
"age": null,
"mobile": null,
"email": null,
"modified_at": "2022-05-09T22:41:20.269353Z",
"next_appointment": {},
"previous_payment_method": null,
"previous_patient_account_uuid": null,
"patient_communication": [],
"patient_general_practitioner": [],
"patient_address": null,
"patient_top_up_payment_methods": [],
"patient_related_person": [],
"uuid": "932fb375-d392-4bea-8eb1-d47e92fab037",
"created_at": "2022-05-09T22:41:20.269329Z",
"national_mobile_number": null,
"birth_date": null,
"birth_time": null,
"blood_type": null,
"deceased_date_time": null,
"employer": null,
"first_name": null,
"gender": "MALE",
"is_active": true,
"is_deceased": false,
"last_name": null,
"marital_status": "UNKNOWN",
"multiple_birth_boolean": null,
"multiple_birth_integer": null,
"name_prefix": null,
"occupation": null,
"other_names": null,
"religious_affiliation": null,
"photo": null,
"passport_number": null,
"anonymous": true,
"general_practitioner": null,
"managing_organization": "951ce6e6-abf8-4cd1-9986-36505a512b7e"
},
"errors": null
}
Get patients
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/patients?page_size=50&anonymous=true
Query paramaters to filter reponse:
- anonymous (bool)
- page_size (int) - Response is divided into pages with maximum size of each determined by this parameter
- search (Any) - Allows to search various fields through their values. The fields that can be searched are:
first_name, last_name, other_names, mr_number, email, mobile, national_mobile_number,
useremail , usernational_mobile_number , user__mobile
{
"success": true,
"message": "Operation successful",
"meta": {
"current": 1,
"page_size_query": "page_size",
"next": null,
"previous": null,
"page_size": 50,
"total": 1
},
"results": [
{
"id": 14526,
"user": null,
"mr_number": "8a07b474-0673-490d-8a24-0ce2d317e1a0",
"last_encounter": null,
"age": null,
"mobile": null,
"email": null,
"modified_at": "2022-05-09T22:41:20.269353Z",
"next_appointment": {},
"previous_payment_method": null,
"previous_patient_account_uuid": null,
"uuid": "932fb375-d392-4bea-8eb1-d47e92fab037",
"created_at": "2022-05-09T22:41:20.269329Z",
"national_mobile_number": null,
"birth_date": null,
"birth_time": null,
"blood_type": null,
"deceased_date_time": null,
"employer": null,
"first_name": null,
"gender": "MALE",
"is_active": true,
"is_deceased": false,
"last_name": null,
"marital_status": "UNKNOWN",
"multiple_birth_boolean": null,
"multiple_birth_integer": null,
"name_prefix": null,
"occupation": null,
"other_names": null,
"religious_affiliation": null,
"photo": null,
"passport_number": null,
"anonymous": true,
"general_practitioner": null,
"managing_organization": "951ce6e6-abf8-4cd1-9986-36505a512b7e"
}
]
}
View a patient's encounter history
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/patients/{{patient_id}}/history
{
"success": true,
"message": "Retrieved encounters for {first_name} {mr_number}",
"meta": {
"current": 1,
"page_size_query": "page_size",
"next": null,
"previous": null,
"page_size": 50,
"total": 1
},
"results": [
{
"encounter_datetime": "2022-05-09T22:41:20.269353Z",
"uuid": "e704e046-6dae-40e2-becf-efcaf273a726",
"author": "b404e046-6dae-40e2-becf-efcaf273a726",
"author_role": "General Practitioner",
"display": "",
"service_category": "CONSULTATION",
"encounter-type": "in-patient doctor notes",
"diagnoses": [
{
"code": "M54. 2",
"display": "Cervicalgia (Neck Pain)",
},
],
"observations": [],
"medications": [],
"diagnostics": [],
"procedures": [],
"bills": []
]
}