Welcome to Visits
This section contains a manual description of the visits API specification. The APIs you see here will help you start, track and end a patient's visit
Create a visit
- This endpoint enables you to create a visit for a patient who has arrived at the provider location.
URL: https://api.serenity.health/v1/providers/{{provider_id}}/visits
{
"account_id": "7aa776c2-a9b6-4baa-a367-501d451b87d2",
"arrived_at": "2021-07-27T22:57:28Z",
"assigned_to": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"price_tier": 1,
"service_provider": "b6c0cc80-c5fd-4430-805c-e3591ec9b3cf",
"slot": "e26f1c8a-505e-42d3-8461-80b2250b1562",
"status": "arrived",
"transaction_type": "USER_WALLET",
"visit_class": "ambulatory",
"service_discount_uuid": "<discount-uuid>",
"override_patient_group_pricing_rules": False, # set to True the price tier in the payload is not applicable to the patient's group
}
Important note
We've added new rules to validate billing and payments via groups. This means that both patients and price tiers can be place in to groups. Groups are a combination of payment methods and/or payers. For example, a price tier can be limited to only insurance patients - or patients of a specific insurance provider.
By default, a price tier can only be applied to a patient's bill if the groups of the patient and price tier are a match. However this can be overridden with value of
override_patient_group_pricing
toTrue
Get visit summaries
This endpoint enables you to the summary of patient visits. Each visit summary contains the following information:
- Diagnoses
- Notes
- Service requests (diagnostics, treatment and surgical procedures)
- Reports of diagnostic tests
- Encounter timeline
- Bills
URL: {{base_url}}/v1/providers/{{provider_id}}/visit-summaries
Filter fields:
- mr_number: A parameter to filter visit summaries by a specific patient and their linked patient records
- from: A beginning of the date range to filter visit summaries by. Leave blank to get all visits starting from inception to the end of the date range
- to: A end of the date range to filter visit summaries by. Leave blank to get all visits from the beginning of the date range to the present day
{
"success": true,
"message": "Operation successful",
"meta": {
"current": 1,
"page_size_query": "page_size",
"next": "{{base_url}}/v1/providers/{{provider_id}}/visit-summaries?page=2&from=val&to=val",
"previous": null,
"page_size": 50,
"total": 330
},
"results": [
{
"uuid": "55b56f18-d90f-49b3-905f-fb8b1c16cd45",
"created_at": "2023-10-10T09:45:21.710797Z",
"started_at": "2023-10-10T09:45:21.710797Z",
"ended_at": "2023-10-14T09:45:21.710797Z",
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"patient_first_name": "Jane",
"patient_last_name": "Doe",
"patient_other_names": "",
"patient_birth_date": "1987-10-24",
"patient_age": "36 years",
"patient_gender": "FEMALE",
"patient_mobile": "+233201234567",
"encounters": [
{
"uuid": "55b56f18-d90f-49b3-905f-fb8b1c16cd46",
"created_at": "2023-10-10T09:45:21.710797Z",
"started_at": "2023-10-10T09:45:21.710797Z",
"ended_at": "2023-10-10T09:45:21.710797Z",
"encounter_type":"visit-note",
"note": {
"note_type": "in-patient-ward-round",
"display": "A visit note recorded by Dr. Hippocrates",
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"practitioner_uuid": "35b56f18-d92f-4963-905f-fb8b1c16cd40",
"practitioner_name": "Dr. Hippocrates",
"practitioner_role_type": "House Officer",
},
"charge_item": null,
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"diagnoses": [
{
"uuid": "b5b56f18-d90f-49b3-905f-fb9b1c16cd44",
"display": "Thyrotoxicosis factitia",
"code": "E05.4",
"system": "http://hl7.org/fhir/ValueSet/icd-10",
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"practitioner_uuid": "35b56f18-d92f-4963-905f-fb8b1c16cd40",
"practitioner_name": "Dr. Hippocrates",
"practitioner_role_type": "House Officer",
}
]
},
{
"uuid": "35b56f18-d90f-49b3-905f-fb9b1c16cd40",
"created_at": "2023-10-10T09:45:21.710797Z",
"started_at": "2023-10-10T09:45:21.710797Z",
"ended_at": "2023-10-10T09:45:21.710797Z",
"encounter_type":"service-request",
"note": "Ordering lab tests to confirm prognosis of hyperthyroidism",
"service_requests": [ // change to medication requests
{
"uuid": "c4b56f18-d90f-49b3-905f-fb9b1c16cd74",
"display": "Thyroxine (T4)",
"code": "001149",
"system": "http://loinc.org",
"category": "final",
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"healthcare_service_uuid": "a5b56f18-d90f-49b3-905f-fb9b1c16cd40",
"healthcare_service_name": "T4 test",
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"practitioner_uuid": "35b56f18-d92f-4963-905f-fb8b1c16cd40",
"practitioner_name": "Dr. Hippocrates",
"practitioner_role_type": "House Officer",
"accession_number": "30210",
"charge_item": null,
}
]
},
{
"uuid": "ab456f18-d90f-49b3-905f-fb9b1c16cd40",
"created_at": "2023-10-10T09:45:21.710797Z",
"started_at": "2023-10-10T09:45:21.710797Z",
"ended_at": "2023-10-10T09:45:21.710797Z",
"encounter_type":"service-request",
"display": "Ordering lab tests to confirm prognosis of hyperthyroidism",
"medication_requests": [
{
"uuid": "c4b56f18-d90f-49b3-905f-fb9b1c16cd74",
"authored_on": "2023-10-10T09:45:21.710797Z",
"display": "alluporinol",
"priority": "routine",
"form": null,
"category": null,
"code": null,
"date": null,
"encounter_uuid": "c123566e-2bb2-4a70-9ee7-997fe925543e",
"visit": null,
"intended_dispenser": null,
"careplan": null,
"status_reason": null,
"status": "completed",
"intent": "order",
"do_not_perform": false,
"dosage_strength": "100mg",
"dosage_frequency": "daily",
"dosage_period": "3",
"dosage_period_unit": "Months",
"dosage_frequency_unit": null,
"dosage_route": "ORAL_USE",
"dosage_text": "",
"dosage_display": "100mg daily for 3 Months",
"is_paid": false,
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"performer_practitioner_name": "Nurse Melitta",
"performer_practitioner_uuid": "1d043435-1851-41c3-93cf-b37b3963b762",
"requester_practitioner_name": "Dr. Hippocrates",
"requester_practitioner_role_type": "House Officer",
"requester_practitioner_uuid": "1d043435-1851-41c3-93cf-b37b3963b762",
"requester_patient": null,
"requester_practitioner_role": "1d043435-1851-41c3-93cf-b37b3963b762",
"recorder_practitioner_name": "Dr. Hippocrates",
"recorder_practitioner_uuid": "1d043435-1851-41c3-93cf-b37b3963b762",
"recorder_practitioner_type": "Medical Officer",
"course_of_therapy_type": "continuous",
"prior_prescription_uuid": null,
"prior_prescription_display": null,
}
]
},
{
"uuid": "ab456f18-d90f-49b3-905f-fb9b1c16cd40",
"created_at": "2023-10-10T09:45:21.710797Z",
"started_at": "2023-10-10T09:45:21.710797Z",
"ended_at": "2023-10-10T09:45:21.710797Z",
"encounter_type":"service-request",
"display": "Ordering lab tests to confirm prognosis of hyperthyroidism",
"diagnostic_reports": [
{
"uuid": "c4b56f18-d90f-49b3-905f-fb9b1c16cd74",
"display": "Thyroxine (T4)",
"code": "001149",
"system": "http://loinc.org",
"status": "final",
"category": "final",
"body_site": "neck",
"purpose": "regular",
"sample_received_date_time": "2023-10-10T09:45:21.710797Z",
"based_on_uuid": "a5b56f18-d90f-49b3-905f-fb9b1c16cd40",
"based_on_type": "service-request",
"healthcare_service_uuid": "a5b56f18-d90f-49b3-905f-fb9b1c16cd40",
"healthcare_service_name": "T4 test",
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"practitioner_uuid": "35b56f18-d92f-4963-905f-fb8b1c16cd40",
"practitioner_name": "Dr. Hippocrates",
"practitioner_role_type": "House Officer",
"accession_number": "30210",
"conclusion": "",
"results": [
{
"uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"code": "HBA1C",
"status": "preliminary",
"display": "Glycated Hemoglobin",
"value": "1000000",
"unit": "%",
"category": "laboratory",
"issued": "2023-07-08T08:11:36.164818Z",
"patient_uuid": "",
"encounter": null,
"visit": "31cb4d61-a449-41a2-9bea-5678d8b88871",
"patient_uuid": "6a8bf118-df1d-4425-804b-d6eca5f1a01e",
"performer": null,
"performer_name": null,
"reference_range_high": "6.2",
"reference_range_low": "3.6",
"interpretation": "",
"effective_start_datetime": "",
"effective_end_datetime": "",
"issued_datetime": "",
}
]
}
]
},
],
}
]
}
View the patient queue
This endpoint enables you to view the patient queue for patient's on a visit
URL: https://api.serenity.health/v1/providers/{{provider_id}}/patient-queue
Filter fields:
- mr_number
- assigned_to
- location
- queue_status
- queue_class
{
"success": true,
"message": "Patient queue retrieved successfully",
"data": [
{
"queue_number": 76,
"service_display": "SARS COV-2 PCR Nucleic acid test(Express)",
"patient": "patient_uuid",
"mr_number": "patient's MR number",
"queue_status": "arrived",
"next_action": "Take sample",
"queue_class": "OPD",
"assigned_to": "practitioner_uuid",
"assigned_to_display": "practitioner name",
"location": "location_uuid",
"location_display": "Walter Reed Medical Facility",
},
{
"queue_number": 76,
"service_display": "GP consultation (VIP)",
"patient": "patient_uuid",
"mr_number": "patient's MR number",
"queue_status": "recorded_vitals",
"next_action": "Begin consultation",
"queue_class": "OPD",
"assigned_to": "practitioner_uuid",
"assigned_to_display": "practitioner name",
"location": "location_uuid",
"location_display": "Walter Reed Medical Facility",
}
]
}
Referral Request
This endpoint allows a practitioner to refer a patient to another hospital or practitioner
URL: {{BASE_URL}}/v1/providers/visits/referpatient/e704e046-6dae-40e2-becf-efcaf273a726
{
"sz_docempid" : "e704e046-6dae-40e2-becf-efcaf273a726",
"szvisitid": "e704e046-6dae-40e2-becf-efcaf273a726",
"szpatientid" : "e704e046-6dae-40e2-becf-efcaf273a726",
"sz_patientname" :"xxxx xxxx" ,
"sz_comments" : "xxxxx xxxxx xxxx",
"sz_consulttype" : "consultation",
"sz_type" : "consult_only",
"sz_time" : "2022-05-09T22:41:20.269353Z",
"sz_unitid" : "7590127f-b22f-420e-9dfe-bf719f0fd6f0",
"sz_unitname" : "xxxx",
"szpatientid": "e704e046-6dae-40e2-becf-efcaf273a726"
}