Welcome to diagnostics!
This section contains a manual description of the diagnostics API specification. The APIs you see here are to help you accomplish the patient journey for lab diagnostics seen in the miro board attached below.
Patient Journey
The patient journey follows the pattern below:
- Patient's lab test(s) is requested by a patient or practitioner
- Lab test(s) is paid for
- Lab samples are taken (if required)
- Lab machine processes the samples
- Test results are recorded and a diagnostic report is generated
- The report is amended if necessary
- The report is approved and a copy is shared with the patient (and the doctor if requested by doctor)
A graphical representation of this journey is available on the Miro board.
Get service request category valueset
This endpoint allows you to get the list of service request category required for diagnostic healthcare services.
URL: {{base_url}}/providers/valueset/service-request-category-type
Method: GET
[
{
"code": "Laboratory-procedure",
"display": "Laboratory procedure"
},
{
"code": "Imaging",
"display": "Imaging"
},
{
"code": "Counselling",
"display": "Counselling"
}
]
Get diagnostic service section valueset
This endpoint allows you to get the list of diagnostic service section types required for diagnostic healthcare services.
URL: {{base_url}}/providers/valueset/diagnostic-service-section-type
Method: GET
[
{
"code": "Audiology",
"display": "Audiology"
},
{
"code": "Blood Gases",
"display": "Blood Gases"
}
]
Get generic period unit valueset
This endpoint allows you to get the list of period types required for diagnostic healthcare services price tiers. This can be used to provide users with options to set the turnaround time e.g. hours, minutes, days...
URL: {{base_url}}/providers/valueset/generic-period-unit-type
Method: GET
[
{
"code": "hours",
"display": "hours"
},
{
"code": "minutes",
"display": "minutes"
},
{
"code": "days",
"display": "days"
},
{
"code": "weeks",
"display": "weeks"
},
{
"code": "months",
"display": "months"
}
]
Upload observation configurations
This Endpoint allows you to upload an observation configuration
URL: {{base_url}}/providers/{{provider_id}}/observation-configuration-upload
Method: POST
{
"object_name":file,
}
Create a diagnostic service
Setting up a diagnostic service is just the same as a regular diagnostic service except that the following fields are required:
- Service request category
- Service request section
https://api.serenity.health/v1/providers/:provider_id/administration/healthcareservices/:service_id
{
"healthcare_service_appointment_required": true,
"virtual_service": false,
"is_outsourced": true,
"provider": "94985fa6-6460-483c-a5fc-4ee11c5a35d9",
"healthcare_service_locations": [
{
"id": "u101-location-None"
}
],
"healthcare_service_name": "Service 8.0",
"characteristic": null,
"comment": "This is the service description",
"communication": "EN",
"extra_details": null,
"telecom": "+233262260986",
"program": null,
"referral_method": [
"fax",
"mail",
"phone"
],
"healthcare_service_available_times": [
{
"is_all_day": true,
"availableStartTime": "22:35:10Z",
"availableEndTime": "22:35:10Z",
"daysOfWeek": ["Monday", "Tuesday", "Wednesday"]
}
],
"healthcare_service_categories": [
{
"code": "Consultation"
}
],
"healthcare_service_not_available_times": [
{
"description": "Not available during Christmas",
"start_date": "2021-06-29T22:35:10Z",
"end_date": "2021-06-29T22:35:10Z"
}
],
"price_tiers": [
{
"display": "Express",
"charge": "200.00",
"currency": "GHS",
"description": "Express service for service name",
"priority": "urgent",
"turnaround_time_value": 12,
"turnaround_time_unit": "months" // fetch options from {{base_url}}/providers/valueset/generic-period-unit-type
}
],
"order_code": "CBC",
"service_class": "Diagnostic",
"service_request_category": "laboratory", // required for diagnostics
"diagnostic_service_section": "hematology", // required for diagnostics
"slot_duration": "30",
"healthcare_service_service_provision_code": "Free",
"healthcare_service_specialties": [
{
"code": "Adult_mental_illness"
}
],
"healthcare_service_types": [
{
"code": "Adoption/Permanent Care Info/Support"
}
]
}
{
"id" : "service_id",
"uuid": "service_request_uuid",
"is_active": true,
"healthcare_service_appointment_required": true,
"virtual_service": false,
"provider": "94985fa6-6460-483c-a5fc-4ee11c5a35d9",
"healthcare_service_locations": [
{
"id": "u101-location-None"
}
],
"healthcare_service_name": "Service 8.0",
"characteristic": null,
"comment": "This is the service description",
"communication": "EN",
"extra_details": null,
"telecom": "+233262260986",
"program": null,
"referral_method": [
"fax",
"mail",
"phone"
],
"healthcare_service_available_times": [
{
"is_all_day": true,
"availableStartTime": "22:35:10Z",
"availableEndTime": "22:35:10Z",
"daysOfWeek": ["Monday", "Tuesday", "Wednesday"]
}
],
"healthcare_service_categories": [
{
"code": "Consultation"
}
],
"healthcare_service_not_available_times": [
{
"description": "Not available during Christmas",
"start_date": "2021-06-29T22:35:10Z",
"end_date": "2021-06-29T22:35:10Z"
}
],
"price_tiers": [
{
"display": "Express",
"charge": "200.00",
"currency": "GHS",
"description": "Express service for service name",
"priority": "urgent"
}
],
"order_code": "CBC",
"service_class": "Diagnostic",
"service_request_category": "laboratory",
"service_request_section": "Hematology",
"slot_duration": "30",
"healthcare_service_service_provision_code": "Free",
"healthcare_service_specialties": [
{
"code": "Adult_mental_illness"
}
],
"healthcare_service_types": [
{
"code": "Adoption/Permanent Care Info/Support"
}
]
}
Get a list of standard lab tests
Get a list of diagnostic tests that can be performed on or with a patient.
URL: https://api.serenity.health/v1/providers/valueset/diagnostic-order-type
[
{
"code": "CBC",
"display": "Complete Blood Count (CBC) with Differential, Blood",
"loinc_attributes": "Complete blood count W Auto Differential panel:-:Pt:Bld:Qn:",
"method_name": "RF/DC (Radio Frequency/Direct Current) Detection/Hydrodynamic Focusing (DC Detection), Flow Cytometry (Using a Semiconductor Laser)/Sodium Lauryl Sulfate (SLS) Hemoglobin",
"available": true //whether or not the test is available at the provider
},
{
"code": "CORBS",
"display": "Severe Acute Respiratory Syndrome Coronavirus 2 (SARS-CoV-2) IgG, Blood Spot",
"loinc_attributes": "SARS coronavirus 2 Ab.IgG:PrThr:Pt:Bld.dot:Ord:IA",
"method_name": "Microsphere Multiplex Flow Immunoassay (MFI)",
"available": false
}
]
Requesting for a test
It is important to understand that lab tests should be viewed as a clinical procedure whereas a healthcare service is a commercial offering to patients. Lab tests and healthcare services are linked via order codes. Therefore, an order code can tell us which service one must pay for so as to have a lab test/test performed.
Lab tests can be requested via 2 people: Patient users or practitioners.
Patients request for tests via healthcare services. When they do this, they select the service and a price tier they are willing to pay forPractitioners requests for lab tests during consultations via order codes. Once the practitioner requests for a test, an incomplete charge item is generated with a status of "planned".
The patient will then be required to pay for the test. When they do, they need specify what price tier they are willing to pay for each request. These details will be used to update and settle the charge item.
Request for a test(s) during a consultation
Use case: Doctor/Specialist requests for lab tests (single tests/profiles of tests) on behalf of a patient during a consultation. This is normally done to investigate and provide evidence for a suspected diagnosis
URL: https://api.serenity.health/v1/providers/{{provider_id}}/servicerequest
[
{
"code": "CBC",
"priority": "routine",
"passport_number": null,
"purpose": "regular",
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"location": null,
"encounter": "b5a72e9b-1fd0-49df-9e55-80a5fa4c062f",
"visit": null,
"note": "Not from requester to lab technician",
"requesting_practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"patient_instruction": "Instructions in terms that are understood by the patient or consumer"
}
]
[
{
"id": "66f4bba0-afc4-4165-8dc5-480a32df317f",
"category": "Laboratory-procedure",
"body_site": null,
"code": "CBC",
"priority": "routine",
"replaces": null,
"status": "active",
"group_identifier": null,
"status_reason": null,
"passport_number": null,
"sample_received_date_time": null,
"purpose": "regular",
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"patient_detail": {
"first_name": "Waggy",
"lastname": "Taggy",
"gender": "MALE",
"birth_date": "2003-07-01",
"mobile": "2332435678907",
"age": 18
},
"due_date": "2021-08-11T13:56:46.216998Z",
"is_paid": false,
"location": null,
"encounter": "b5a72e9b-1fd0-49df-9e55-80a5fa4c062f",
"visit": null,
"occurence": "2021-08-11T10:19:12.842364Z",
"authored_on": "2021-08-11T10:19:12.842391Z",
"practitioner_detail": {
"name": "Chris Dare"
},
"requesting_patient": null,
"requesting_practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"requesting_related_contact": null,
"patient_instruction": "Instructions in terms that are understood by the patient or consumer",
"healthcare_service": "dcfea0b5-e8e6-42e7-9ae4-347b8ecd0bb6",
"price_tier": null,
"note": "Not from requester to lab technician",
"is_available_at_provider": true
}
]
Request for a test(s) at the diagnostics center via a receptionist/client services officer
Patients requests for a lab via an authorized practitioner (e.g. receptionist/client services officer). Patients requests for lab test via healthcare services i.e. they select and pay for a healthcare service in order to raise a Service request
URL: https://api.serenity.health/v1/providers/{{provider_id}}/servicerequests
[
{
"priority": "routine",
"passport_number": null, // required if purpose is travel
"purpose": "regular",
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"location": location_id,
"healthcare_service": "dcfea0b5-e8e6-42e7-9ae4-347b8ecd0bb6",
"price_tier": 13,
"note": "Optional from requester to lab technician", // optional
"requesting_practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
}
]
[
{
"id": "545e5d1b-555d-429d-be74-b2af5227f034",
"category": "Laboratory-procedure",
"body_site": null,
"code": "CBC",
"priority": "routine",
"replaces": null,
"status": "active",
"group_identifier": null,
"status_reason": null,
"passport_number": null,
"sample_received_date_time": null,
"purpose": "regular",
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"patient_detail": {
"first_name": "Waggy",
"lastname": "Taggy",
"gender": "MALE",
"birth_date": "2003-07-01",
"mobile": "2332435678907",
"age": 18
},
"due_date": "2021-08-11T13:56:46.216998Z",
"is_paid": false,
"location": null,
"encounter": "b5a72e9b-1fd0-49df-9e55-80a5fa4c062f",
"visit": null,
"occurence": "2021-08-11T10:19:46.101561Z",
"authored_on": "2021-08-11T10:19:46.101566Z",
"practitioner_detail": {
"name": "Chris Dare"
},
"requesting_patient": null,
"requesting_practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"requesting_related_contact": null,
"patient_instruction": "Instructions in terms that are understood by the patient or consumer",
"healthcare_service": "dcfea0b5-e8e6-42e7-9ae4-347b8ecd0bb6",
"price_tier": 13,
"note": "Not from requester to lab technician",
"is_available_at_provider": true
}
]
Get a single service request
This endpoint enables you to get the details of a single service request
URL: https://api.serenity.health/v1/providers/{{provider_id}}/servicerequests/{{service_request_id}}
{
"id": "c7816557-7921-47f8-98ff-d820e23dd3ab",
"category": null,
"body_site": null,
"code": "COVID-19 Testing",
"priority": "routine",
"replaces": null,
"status": "sample-collected",
"group_identifier": null,
"status_reason": null,
"passport_number": null,
"sample_received_date_time": null,
"purpose": "regular",
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"patient_detail": {
"first_name": "Waggy",
"lastname": "Taggy",
"gender": "MALE",
"birth_date": "2003-07-01",
"mobile": "2332435678907",
"age": 18
},
"location": null,
"encounter": "b5a72e9b-1fd0-49df-9e55-80a5fa4c062f",
"visit": null,
"occurence": "2021-07-27T22:14:55.295553Z",
"authored_on": "2021-07-27T22:14:55.295588Z",
"practitioner_detail": {
"name": "Chris Dare"
},
"requesting_patient": null,
"requesting_practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"requesting_related_contact": null,
"patient_instruction": null,
"price_tier": 4
}
Get multiple service requests
This endpoint enables you to get multiple paginated service requests with filtering enabled.
Filter fields:
- category
- section
- status
- intent
- assigned_to
- patient
- location
- service_class (Healthcare service class)
URL: https://api.serenity.health/v1/providers/{{provider_id}}/servicerequests
Method: GET
[
{
"id": "c7816557-7921-47f8-98ff-d820e23dd3ab",
"category": null,
"body_site": null,
"code": "COVID-19 Testing",
"priority": "routine",
"replaces": null,
"status": "sample-collected",
"group_identifier": null,
"status_reason": null,
"passport_number": null,
"sample_received_date_time": null,
"purpose": "regular",
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"patient_detail": {
"first_name": "Waggy",
"lastname": "Taggy",
"gender": "MALE",
"birth_date": "2003-07-01",
"mobile": "2332435678907",
"age": 18
},
"location": null,
"encounter": "b5a72e9b-1fd0-49df-9e55-80a5fa4c062f",
"visit": null,
"occurence": "2021-07-27T22:14:55.295553Z",
"authored_on": "2021-07-27T22:14:55.295588Z",
"practitioner_detail": {
"name": "Chris Dare"
},
"requesting_patient": null,
"requesting_practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"requesting_related_contact": null,
"patient_instruction": null,
"price_tier": 4
}
]
Pay for a test
This endpoint allows you to pay for a patient's service requests raised by doctors or patients.
If the service request was raised by a doctor, you'll need to provide a price tier the patient has agreed to pay for.
URL: `https://api.serenity.health/v1/providers/{{provider_id}}/pay/servicerequests
Method: POST
[
{
"service_request": "9872c9d4-765b-4853-94e5-e5bba8fdaaae",
"account_id": "7aa776c2-a9b6-4baa-a367-501d451b87d2",
"transaction_type": "user-account",
"healthcare_service": "service_id",
"price_tier": 13,
"copayment_info": {
"account_id": "3173c1e1-571b-4196-8cdf-743970c67153", // if corporate, patient account
"transaction_type": "user-account",
"amount": 200, // required if transaction_type is `cash`
"currency": "GHS", // required if transaction_type is `cash`
},
"override_patient_group_pricing_rules": False, # set to True the payment method in the payload is not applicable to the bill's price tier group
}
]
{
"success": true,
"message": "Successfully paid for service request(s)",
"data": [
{
"id": 42,
"patientid": "6b542a0a-734f-4725-9e49-b03a6d25dfc1",
"subscriberid": null,
"beneficiaryid": null,
"service": "4133e8d7-438f-47ae-9065-6264d81276ec",
"charge": 200.0,
"patientname": "Waggy Taggy",
"patient_mobile": "2332435678907",
"servicerequestid": "6354db45-30d3-49e6-a6b3-28306f54d784",
"medicationrequestid": null,
"occurrence_date": "2021-08-11T12:56:37.941940Z",
"practitionername": null,
"practitionerid": null,
"status": "billed",
"service_or_product_name": "Malaria",
"visitid": null,
"serviceid": "4133e8d7-438f-47ae-9065-6264d81276ec",
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": null,
"clinic": null,
"clinic_name": null,
"company_name": null,
"created_on": "2021-08-11T12:56:37.941810Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Waggy Taggy",
"payer": null,
"payer_name": null,
"payment_method": null,
"payment_transactions": [
{
"id": 25,
"charge_item": 42,
"charge": "200.00",
"mode": "user-account",
"status": "completed",
"failed_reason": null,
"corporate_payments": null,
"card_payments": null,
"mobile_money_payments": null,
"cash_payments": null
}
],
"policy": null,
"practitioner_role": null,
"practitioner_name": null,
"provider": "b6c0cc80-c5fd-4430-805c-e3591ec9b3cf",
"provider_name": "Nyaho Medical",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "dcfea0b5-e8e6-42e7-9ae4-347b8ecd0bb6",
"service_request": "6354db45-30d3-49e6-a6b3-28306f54d784",
"subscriber": null,
"price_tier": 13,
"transaction": null,
"visit": null
}
],
"errors": null
}
Pay for a service
This endpoint allows you to pay for a bill.
URL: `https://api.serenity.health/v1/providers/{{provider_id}}/pay
Method: POST
[
{
"charge_item": "charge_item_id",
"transaction_type": "",
"amount": 200, // specify an amount if this is a cash transaction
"currency": "GHS" // specify a currency if this is a cash transaction
},
{
"charge_item": "charge_item_id",
"account_id": "account_id",
"transaction_type" "", user-wallet, corporate-account, mobile-money, cash
},
]
Get specimen types for a service request
This endpoint enables you to get the specimen types that can be collected for a service request
URL: {{base_url}}/providers/valueset/specimen-type?service_request=id
Method: GET
[
{
"code": "Amniotic fluid",
"display": "Amniotic fluid"
},
{
"code": "Blood",
"display": "Blood"
},
{
"code": "Bone marrow",
"display": "Bone marrow"
},
{
"code": "Cerebrospinal fluid (CSF)",
"display": "Cerebrospinal fluid (CSF)"
},
{
"code": "Hair",
"display": "Hair"
},
{
"code": "Kaolin modified blood",
"display": "Kaolin modified blood"
},
{
"code": "Kaolin-heparinase modified blood",
"display": "Kaolin Herapinase Modified"
},
{
"code": "Nail",
"display": "Nail"
},
{
"code": "Nasopharyngeal",
"display": "Nasopharyngeal"
},
{
"code": "Pericardial fluid",
"display": "Pericardial fluid"
},
{
"code": "Peritoneal fluid",
"display": "Peritoneal fluid"
},
{
"code": "Plasma",
"display": "Plasma"
},
{
"code": "Respiratory",
"display": "Respiratory"
},
{
"code": "Skin",
"display": "Skin"
},
{
"code": "Synovial fluid",
"display": "Synovial fluid"
},
{
"code": "Urine",
"display": "Urine"
},
{
"code": "Stool",
"display": "Stool"
}
]
Get observation interpretation codes valueset
This endpoint allows a provider to fetch observation interpretation codes
URL: {{base_url}}/providers/valueset/observation-interpretation-type
Method: GET
[
{
"code": "_GENETICOBSERVATIONINTERPRETATION",
"display": "Genetic Observation Interpretation"
},
{
"code": "CAR",
"display": "Carrier"
},
{
"code": "_OBSERVATIONINTERPRETATIONCHANGE",
"display": "Observation Interpretation Change"
}
// and more
]
Collect a specimen (Take a sample)
This endpoint enables you to record collected specimen (samples). When samples are recorded, information required to print the specimen labels will be included in its response. Labels can be reprinted by making a GET request for the specimen data
URL: https://api.serenity.health/v1/providers/{{provider_id}}/specimen
Method: POST
[{
"service_request": "service_request_id", // required
"specimen_type": "Nasopharyngeal Swab", // required
"collector":"practitioner_id", // required
"collection_quantity": 1, // optional for now
"collection_quantity_unit": "ul", // optional for now
"collection_body_site": "throat", //optional for now
"condition": "cool" // optional for now
}]
{
"success": true,
"message": "Specimen collected, you may print its label now",
"data": [
{
"id": "707abfbd-68a8-4171-9c77-007b2d1a9c85",
"uuid": "707abfbd-68a8-4171-9c77-007b2d1a9c85",
"created_at": "2021-08-18T05:58:23.792000Z",
"modified_at": "2021-08-18T05:58:23.792067Z",
"status": "available",
"specimen_type": "Nasopharyngeal Swab",
"received_date_time": null,
"collected_date_time": null,
"collection_quantity": 1,
"collection_method": null,
"collection_body_site": "throat",
"collection_fasting_status": null,
"condition": "cool",
"patient": null,
"collector": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"service_request": "9872c9d4-765b-4853-94e5-e5bba8fdaaae"
}
],
"errors": null
}
Print the label of a collected specimen
This endpoint allows you to get label of a sample. It returns a PDF as the HTTP response.
URL: https://api.serenity.health/v1/providers/{{provider_id}}/specimen-label/{{specimen_id}}
Method: GET
GET collected specimen for a service request
This endpoint allows you to get details on specimen samples collected to perform a service request
URL: https://api.serenity.health/v1/providers/providers/{{provider_id}}/specimen
Method: GET
[
{
"id": "7137fe2c-d106-433e-9195-0a65bd1eae46",
"uuid": "7137fe2c-d106-433e-9195-0a65bd1eae46",
"created_at": "2021-07-28T04:35:06.723017Z",
"modified_at": "2021-07-28T04:35:06.723034Z",
"status": "available",
"specimen_type": "hello",
"received_date_time": null,
"collected_date_time": null,
"collection_quantity": null,
"collection_method": null,
"collection_body_site": "arm",
"collection_fasting_status": null,
"condition": null,
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"collector": null,
"service_request": "c7816557-7921-47f8-98ff-d820e23dd3ab"
},
{
"id": "5fa915aa-6339-4908-aee7-42d4c2546684",
"uuid": "5fa915aa-6339-4908-aee7-42d4c2546684",
"created_at": "2021-07-28T04:35:19.138023Z",
"modified_at": "2021-07-28T04:35:19.138038Z",
"status": "available",
"specimen_type": "hello",
"received_date_time": null,
"collected_date_time": null,
"collection_quantity": null,
"collection_method": null,
"collection_body_site": "arm",
"collection_fasting_status": null,
"condition": null,
"patient": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"collector": null,
"service_request": "c7816557-7921-47f8-98ff-d820e23dd3ab"
},
{
"id": "278d1467-8004-4425-a087-6f890aef10f2",
"uuid": "278d1467-8004-4425-a087-6f890aef10f2",
"created_at": "2021-07-28T08:40:49.448536Z",
"modified_at": "2021-07-28T08:40:49.448551Z",
"status": "available",
"specimen_type": "swab",
"received_date_time": null,
"collected_date_time": null,
"collection_quantity": null,
"collection_method": null,
"collection_body_site": "throat",
"collection_fasting_status": null,
"condition": null,
"patient": "4876ee0b-0738-4c12-a8db-4c26a403a4d2",
"collector": null,
"service_request": "5a98903c-892e-4329-b00e-46d142b852a7"
},
{
"id": "d5cb0a2c-39a9-40d6-bb53-bc2aa5c610c8",
"uuid": "d5cb0a2c-39a9-40d6-bb53-bc2aa5c610c8",
"created_at": "2021-08-12T17:42:23.998113Z",
"modified_at": "2021-08-12T17:42:23.998135Z",
"status": "available",
"specimen_type": "Nasopharyngeal Swab",
"received_date_time": null,
"collected_date_time": null,
"collection_quantity": 1,
"collection_method": null,
"collection_body_site": "throat",
"collection_fasting_status": null,
"condition": "cool",
"patient": null,
"collector": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"service_request": "9872c9d4-765b-4853-94e5-e5bba8fdaaae"
},
{
"id": "a8458085-1ed0-41af-950b-4e69d72baab6",
"uuid": "a8458085-1ed0-41af-950b-4e69d72baab6",
"created_at": "2021-08-12T22:34:46.215285Z",
"modified_at": "2021-08-12T22:34:46.215306Z",
"status": "available",
"specimen_type": "Nasopharyngeal Swab",
"received_date_time": null,
"collected_date_time": null,
"collection_quantity": 1,
"collection_method": null,
"collection_body_site": "throat",
"collection_fasting_status": null,
"condition": "cool",
"patient": null,
"collector": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"service_request": "9872c9d4-765b-4853-94e5-e5bba8fdaaae"
},
{
"id": "f8231844-9281-4a7b-98a6-48f6b8111c8d",
"uuid": "f8231844-9281-4a7b-98a6-48f6b8111c8d",
"created_at": "2021-08-12T22:39:21.466429Z",
"modified_at": "2021-08-12T22:39:21.466455Z",
"status": "available",
"specimen_type": "Nasopharyngeal Swab",
"received_date_time": null,
"collected_date_time": null,
"collection_quantity": 1,
"collection_method": null,
"collection_body_site": "throat",
"collection_fasting_status": null,
"condition": "cool",
"patient": null,
"collector": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"service_request": "9872c9d4-765b-4853-94e5-e5bba8fdaaae"
}
]
Record the results of the test (entry by a practitioner)
This endpoint is used to record the results of a investigations carried out to fulfill a service request. It also generates a diagnostic report which can be viewed and downloaded
URL: https://api.serenity.health/v1/providers/{{provider_id}}/diagnosticreports
Method: POST
{
"based_on": "7f1a003a-18da-4441-b367-5091bd6b47d5",
"status" : "partial",
"results": [
{
"value": 123,
"code": "LCMAL",
"unit": "ul"
}
],
"performers": ["8eb044df-3e0d-43fd-8e59-65c0ddbdcf66"],
"conclusion": "negative"
}
{
"id": "65a46405-55d9-453e-aabf-8d8782d091d9",
"based_on": "4732ee17-b8a9-41d6-9a97-3108bdc86ab7",
"code": "LCMAL",
"status": "preliminary",
"issued_date": null,
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"patient_detail": {
"first_name": "Chris",
"lastname": "Dare",
"gender": "MALE",
"birth_date": null,
"mobile": "233262260986",
"age": null
},
"encounter": null,
"visit": null,
"category": "Laboratory",
"approved_by": null,
"approved_date_time": null,
"conclusion": "negative",
"effective_date_time": "2021-08-13T18:08:00.338146Z",
"effective_period_start": "2021-08-13T10:06:48.377283Z",
"effective_period_end": "2021-08-13T22:07:16.277975Z",
"service_request_detail": {
"id": "4732ee17-b8a9-41d6-9a97-3108bdc86ab7",
"category": "Laboratory-procedure",
"body_site": null,
"code": "LCMAL",
"display": "",
"due_date": "2021-08-13T22:07:16.277975Z",
"is_paid": true,
"priority": "routine",
"replaces": null,
"status": "active",
"status_display": null,
"group_identifier": null,
"status_reason": null,
"passport_number": null,
"sample_received_date_time": null,
"purpose": "regular",
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"patient_detail": {
"first_name": "Chris",
"lastname": "Dare",
"gender": "MALE",
"birth_date": null,
"mobile": "233262260986",
"age": null
},
"location": null,
"encounter": null,
"visit": null,
"occurence": "2021-08-13T10:06:48.377382Z",
"authored_on": "2021-08-13T10:06:48.377390Z",
"practitioner_detail": null,
"requesting_patient": null,
"requesting_practitioner_role": null,
"requesting_related_contact": null,
"patient_instruction": "kj",
"healthcare_service": "9278ec51-eed1-41cc-82ef-b744d940219c",
"price_tier": 17,
"note": null,
"is_available_at_provider": true
},
"diagnostic_report_performer": [
{
"id": "319432eb-86ac-4845-b499-73ccd5739ce7",
"practitioner_detail": {
"name": "Chris Dare"
},
"uuid": "45fb933c-03e6-45bc-bb77-fa719ed27ae9",
"created_at": "2021-08-13T18:08:07.475451Z",
"modified_at": "2021-08-13T18:08:07.475528Z",
"organization": null,
"practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66"
}
],
"diagnostic_report_results_interpreter": [],
"diagnostic_report_specimen": [],
"diagnostic_report_results": [
{
"id": "38ba96be-4244-423f-baad-305fafc9db05",
"status": "preliminary",
"code": "LCMAL",
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"encounter": null,
"visit": null,
"issued": "2021-08-13T18:08:06.648682Z",
"value": "123",
"data_absent_reason": null,
"body_site": null,
"method": null,
"specimen": null,
"device": null,
"unit": "ul",
"effective_date_time": "2021-08-13T18:08:06.649049Z",
"observation_category": [],
"observation_component": [],
"observation_interpretation": null,
"observation_note": [],
"observation_performer": [],
"observation_partof": [],
"observation_based_on": [],
"observation_reference_range": [
{
"reference_range": {
"high": null,
"low": null,
"age_range_low": null,
"age_range_high": null,
"applies_to": []
}
}
]
}
],
"diagnostic_report_conclusion_code": [],
"diagnostic_report_imaging_study": [],
"diagnostic_report_cancelled_reasons": [],
"diagnostic_report_media": [
{
"id": "5e84a939-bc2c-4b98-8d89-1e8ceff6d9a9",
"uuid": "21255570-0c83-4faa-9e1f-21e801afb429",
"created_at": "2021-08-13T18:08:20.019763Z",
"modified_at": "2021-08-13T18:08:20.019781Z",
"description": null,
"category": "report",
"file": "https://serenity-demo-api.s3.amazonaws.com/media/lab-report-202108131808.pdf",
"diagnostic_report": "65a46405-55d9-453e-aabf-8d8782d091d9"
}
]
}
Request a review for a patient's test results
This endpoint is used to request a review of a patient's test results
URL: https://api.serenity.health/v1/providers/{{provider_id}}/diagnosticreports/{{report_id}}/actions
Method: POST
{
"action": "submit-for-review"
}
Reject a patient's test results
This endpoint is used to reject a patient's test results
URL: https://api.serenity.health/v1/providers/{{provider_id}}/diagnosticreports/{{report_id}}/actions
Method: POST
{
"action": "reject"
}
{
"success": true,
"message": "Operation successful",
"data": {
"id": "f86f69cc-0c45-4f05-8880-74547039206f",
"based_on": "4732ee17-b8a9-41d6-9a97-3108bdc86ab7",
"code": "LCMAL",
"status": "cancelled",
"issued_date": null,
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"patient_detail": {
"first_name": "Chris",
"lastname": "Dare",
"gender": "MALE",
"birth_date": null,
"mobile": "233262260986",
"age": null
},
"encounter": null,
"visit": null,
"category": "Laboratory",
"approved_by": "f9d977dc-d01e-452c-b4dd-448dc332cf22",
"approved_by_name": "Chris Dare",
"approved_date_time": "2021-08-17T05:16:25.660383Z",
"rejected_by": "f9d977dc-d01e-452c-b4dd-448dc332cf22",
"rejected_by_name": "Chris Dare",
"rejected_date_time": "2021-08-17T05:17:03.649375Z",
"conclusion": "negative",
"effective_date_time": "2021-08-17T05:12:38.777143Z",
"effective_period_start": "2021-08-13T10:06:48.377283Z",
"effective_period_end": "2021-08-13T22:07:16.277975Z",
"service_request_detail": {
"id": "4732ee17-b8a9-41d6-9a97-3108bdc86ab7",
"category": "Laboratory-procedure",
"body_site": null,
"code": "LCMAL",
"display": "",
"due_date": "2021-08-13T22:07:16.277975Z",
"is_paid": true,
"priority": "routine",
"replaces": null,
"status": "active",
"status_display": null,
"group_identifier": null,
"status_reason": null,
"passport_number": null,
"sample_received_date_time": null,
"purpose": "regular",
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"patient_detail": {
"first_name": "Chris",
"lastname": "Dare",
"gender": "MALE",
"birth_date": null,
"mobile": "233262260986",
"age": null
},
"location": null,
"encounter": null,
"visit": null,
"occurence": "2021-08-13T10:06:48.377382Z",
"authored_on": "2021-08-13T10:06:48.377390Z",
"practitioner_detail": null,
"requesting_patient": null,
"requesting_practitioner_role": null,
"requesting_related_contact": null,
"patient_instruction": "kj",
"healthcare_service": "9278ec51-eed1-41cc-82ef-b744d940219c",
"price_tier": 17,
"note": null,
"is_available_at_provider": true
},
"diagnostic_report_performer": [
{
"id": "caa991ad-6b3e-4b1e-8ce2-efc2038b0caa",
"practitioner_detail": {
"name": "Chris Dare"
},
"uuid": "c6f378de-7616-4824-b875-74f3ade923b5",
"created_at": "2021-08-17T05:12:45.804001Z",
"modified_at": "2021-08-17T05:12:45.804090Z",
"organization": null,
"practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66"
}
],
"diagnostic_report_results_interpreter": [],
"diagnostic_report_specimen": [],
"diagnostic_report_results": [
{
"id": "b3b4b42a-b3a9-414d-a3b6-5ac42e14d815",
"status": "cancelled",
"code": "LCMAL",
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"encounter": null,
"visit": null,
"issued": "2021-08-17T05:12:44.976925Z",
"value": "123",
"data_absent_reason": null,
"body_site": null,
"method": null,
"specimen": null,
"device": null,
"unit": "ul",
"effective_date_time": "2021-08-17T05:12:44.977151Z",
"observation_category": [],
"observation_component": [],
"observation_interpretation": null,
"observation_note": [],
"observation_performer": [],
"observation_partof": [],
"observation_based_on": [],
"observation_reference_range": [
{
"reference_range": {
"high": null,
"low": null,
"age_range_low": null,
"age_range_high": null,
"applies_to": []
}
}
]
}
],
"diagnostic_report_conclusion_code": [],
"diagnostic_report_imaging_study": [],
"diagnostic_report_cancelled_reasons": [],
"diagnostic_report_media": [
{
"id": "63c93ac2-c79a-44ab-8ab2-9393bb0d5880",
"uuid": "3be745d8-9fdc-48dc-8a2b-01231300b1bf",
"created_at": "2021-08-17T05:12:57.091103Z",
"modified_at": "2021-08-17T05:12:57.091174Z",
"description": null,
"category": "report",
"file": "https://serenity-demo-api.s3.amazonaws.com/media/lab-report-202108170512.pdf",
"diagnostic_report": "f86f69cc-0c45-4f05-8880-74547039206f"
}
]
},
"errors": null
}
Approve the results of a test
This endpoint is used to approve a patient's test results. If the test is not a sensitive test, then the patient will be immediately notified of the test.
URL: https://api.serenity.health/v1/providers/{{provider_id}}/diagnosticreports/{{report_id}}/actions
Method: POST
{
"action": "approve"
}
{
"success": true,
"message": "Operation successful",
"data": {
"id": "f86f69cc-0c45-4f05-8880-74547039206f",
"based_on": "4732ee17-b8a9-41d6-9a97-3108bdc86ab7",
"code": "LCMAL",
"status": "final",
"issued_date": null,
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"patient_detail": {
"first_name": "Chris",
"lastname": "Dare",
"gender": "MALE",
"birth_date": null,
"mobile": "233262260986",
"age": null
},
"encounter": null,
"visit": null,
"category": "Laboratory",
"approved_by": "f9d977dc-d01e-452c-b4dd-448dc332cf22",
"approved_by_name": "Chris Dare",
"approved_date_time": "2021-08-17T05:16:25.660383Z",
"rejected_by": "f9d977dc-d01e-452c-b4dd-448dc332cf22",
"rejected_by_name": "Chris Dare",
"rejected_date_time": "2021-08-17T05:17:03.649375Z",
"conclusion": "negative",
"effective_date_time": "2021-08-17T05:12:38.777143Z",
"effective_period_start": "2021-08-13T10:06:48.377283Z",
"effective_period_end": "2021-08-13T22:07:16.277975Z",
"service_request_detail": {
"id": "4732ee17-b8a9-41d6-9a97-3108bdc86ab7",
"category": "Laboratory-procedure",
"body_site": null,
"code": "LCMAL",
"display": "",
"due_date": "2021-08-13T22:07:16.277975Z",
"is_paid": true,
"priority": "routine",
"replaces": null,
"status": "active",
"status_display": null,
"group_identifier": null,
"status_reason": null,
"passport_number": null,
"sample_received_date_time": null,
"purpose": "regular",
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"patient_detail": {
"first_name": "Chris",
"lastname": "Dare",
"gender": "MALE",
"birth_date": null,
"mobile": "233262260986",
"age": null
},
"location": null,
"encounter": null,
"visit": null,
"occurence": "2021-08-13T10:06:48.377382Z",
"authored_on": "2021-08-13T10:06:48.377390Z",
"practitioner_detail": null,
"requesting_patient": null,
"requesting_practitioner_role": null,
"requesting_related_contact": null,
"patient_instruction": "kj",
"healthcare_service": "9278ec51-eed1-41cc-82ef-b744d940219c",
"price_tier": 17,
"note": null,
"is_available_at_provider": true
},
"diagnostic_report_performer": [
{
"id": "caa991ad-6b3e-4b1e-8ce2-efc2038b0caa",
"practitioner_detail": {
"name": "Chris Dare"
},
"uuid": "c6f378de-7616-4824-b875-74f3ade923b5",
"created_at": "2021-08-17T05:12:45.804001Z",
"modified_at": "2021-08-17T05:12:45.804090Z",
"organization": null,
"practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66"
}
],
"diagnostic_report_results_interpreter": [],
"diagnostic_report_specimen": [],
"diagnostic_report_results": [
{
"id": "b3b4b42a-b3a9-414d-a3b6-5ac42e14d815",
"status": "final",
"code": "LCMAL",
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"encounter": null,
"visit": null,
"issued": "2021-08-17T05:12:44.976925Z",
"value": "123",
"data_absent_reason": null,
"body_site": null,
"method": null,
"specimen": null,
"device": null,
"unit": "ul",
"effective_date_time": "2021-08-17T05:12:44.977151Z",
"observation_category": [],
"observation_component": [],
"observation_interpretation": null,
"observation_note": [],
"observation_performer": [],
"observation_partof": [],
"observation_based_on": [],
"observation_reference_range": [
{
"reference_range": {
"high": null,
"low": null,
"age_range_low": null,
"age_range_high": null,
"applies_to": []
}
}
]
}
],
"diagnostic_report_conclusion_code": [],
"diagnostic_report_imaging_study": [],
"diagnostic_report_cancelled_reasons": [],
"diagnostic_report_media": [
{
"id": "63c93ac2-c79a-44ab-8ab2-9393bb0d5880",
"uuid": "3be745d8-9fdc-48dc-8a2b-01231300b1bf",
"created_at": "2021-08-17T05:12:57.091103Z",
"modified_at": "2021-08-17T05:12:57.091174Z",
"description": null,
"category": "report",
"file": "https://serenity-demo-api.s3.amazonaws.com/media/lab-report-202108170512.pdf",
"diagnostic_report": "f86f69cc-0c45-4f05-8880-74547039206f"
}
]
},
"errors": null
}
Notify patient of approved test results
This endpoint is used to deliver a patient's test results. This is used in cases where the patient has not yet been notified of their approved tests results.
URL: https://api.serenity.health/v1/providers/{{provider_id}}/diagnosticreports/{{report_id}}/actions
Method: POST
{
"action": "notify"
}
Get a diagnostic report as PDF
This endpoint allows you to get a diagnostic report as PDF. It returns a PDF as the HTTP response.
URL: https://api.serenity.health/v1/providers/{{provider_id}}/diagnosticreports/{{diagnostic_report_id}}/print
Method: GET
Get a diagnostic report as JSON
This endpoint allows you to view a diagnostic report
URL: https://api.serenity.health/v1/providers/{{provider_id}}/diagnosticreports/{{report_id}}
Method: GET
{
"id": "65a46405-55d9-453e-aabf-8d8782d091d9",
"based_on": "4732ee17-b8a9-41d6-9a97-3108bdc86ab7",
"code": "LCMAL",
"status": "preliminary",
"issued_date": null,
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"patient_detail": {
"first_name": "Chris",
"lastname": "Dare",
"gender": "MALE",
"birth_date": null,
"mobile": "233262260986",
"age": null
},
"encounter": null,
"visit": null,
"category": "Laboratory",
"approved_by": null,
"approved_by_name": null,
"approved_date_time": null,
"rejected_by": null,
"rejected_by_name": null,
"rejected_date_time": null,
"conclusion": "negative",
"effective_date_time": "2021-08-13T18:08:00.338146Z",
"effective_period_start": "2021-08-13T10:06:48.377283Z",
"effective_period_end": "2021-08-13T22:07:16.277975Z",
"service_request_detail": {
"id": "4732ee17-b8a9-41d6-9a97-3108bdc86ab7",
"category": "Laboratory-procedure",
"body_site": null,
"code": "LCMAL",
"display": "",
"due_date": "2021-08-13T22:07:16.277975Z",
"is_paid": true,
"priority": "routine",
"replaces": null,
"status": "active",
"status_display": null,
"group_identifier": null,
"status_reason": null,
"passport_number": null,
"sample_received_date_time": null,
"purpose": "regular",
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"patient_detail": {
"first_name": "Chris",
"lastname": "Dare",
"gender": "MALE",
"birth_date": null,
"mobile": "233262260986",
"age": null
},
"location": null,
"encounter": null,
"visit": null,
"occurence": "2021-08-13T10:06:48.377382Z",
"authored_on": "2021-08-13T10:06:48.377390Z",
"practitioner_detail": null,
"requesting_patient": null,
"requesting_practitioner_role": null,
"requesting_related_contact": null,
"patient_instruction": "kj",
"healthcare_service": "9278ec51-eed1-41cc-82ef-b744d940219c",
"price_tier": 17,
"note": null,
"is_available_at_provider": true
},
"diagnostic_report_performer": [
{
"id": "319432eb-86ac-4845-b499-73ccd5739ce7",
"practitioner_detail": {
"name": "Chris Dare"
},
"uuid": "45fb933c-03e6-45bc-bb77-fa719ed27ae9",
"created_at": "2021-08-13T18:08:07.475451Z",
"modified_at": "2021-08-13T18:08:07.475528Z",
"organization": null,
"practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66"
}
],
"diagnostic_report_results_interpreter": [],
"diagnostic_report_specimen": [],
"diagnostic_report_results": [
{
"id": "38ba96be-4244-423f-baad-305fafc9db05",
"status": "preliminary",
"code": "LCMAL",
"patient": "f5425074-95b6-4674-b2a6-3604556c375a",
"encounter": null,
"visit": null,
"issued": "2021-08-13T18:08:06.648682Z",
"value": "123",
"data_absent_reason": null,
"body_site": null,
"method": null,
"specimen": null,
"device": null,
"unit": "ul",
"effective_date_time": "2021-08-13T18:08:06.649049Z",
"observation_category": [],
"observation_component": [],
"observation_interpretation": null,
"observation_note": [],
"observation_performer": [],
"observation_partof": [],
"observation_based_on": [],
"observation_reference_range": [
{
"reference_range": {
"high": null,
"low": null,
"age_range_low": null,
"age_range_high": null,
"applies_to": []
}
}
]
}
],
"diagnostic_report_conclusion_code": [],
"diagnostic_report_imaging_study": [],
"diagnostic_report_cancelled_reasons": [],
"diagnostic_report_media": [
{
"id": "5e84a939-bc2c-4b98-8d89-1e8ceff6d9a9",
"uuid": "21255570-0c83-4faa-9e1f-21e801afb429",
"created_at": "2021-08-13T18:08:20.019763Z",
"modified_at": "2021-08-13T18:08:20.019781Z",
"description": null,
"category": "report",
"file": "https://serenity-demo-api.s3.amazonaws.com/media/lab-report-202108131808.pdf",
"diagnostic_report": "65a46405-55d9-453e-aabf-8d8782d091d9"
}
],
"specimen_types": "swab, hello, Nasopharyngeal Swab"
}
Attach an external report to a diagnostic report
TBD
Attach a media file to a diagnostic report
TBD
Diagnostics Test configuration
This endpoint allows a provider to upload their diagnostics test configuration.
URL: {baseURL}/providers/<provider_id>/diagnostics-test/upload
file: <Multipart>
Create a Device
URL: {baseURL}/providers/<provider_id>/devices
Method: POST
{
"user_friendly_name": "any name",
"status": "active",
"status_reason": "online",
"device_names":[
{"name": "TT-XV-2022", "type": "manufacturer-name"},
{"name": "Test Anything", "type": "model-name"}
]
}
{
"success": true,
"message": "Device successfully created",
"data": {
"id": 1,
"uuid": "43f564d4-d03d-4c11-a487-d4796e773a74",
"created_at": "2022-03-06T22:05:19.840506Z",
"is_deleted": false,
"modified_at": "2022-03-06T22:05:19.840570Z",
"status": "active",
"status_reason": "online",
"distinct_identifier": null,
"manufacturer": "Roose",
"manufacture_date": "2010-12-1",
"expiration_date": null,
"lot_number": null,
"serial_number": null,
"model_number": null,
"part_number": null,
"type": null,
"user_friendly_name": null,
"version": null,
"contact": null,
"url": null,
"note": null,
"safety": null,
"patient": null,
"owner": "951ce6e6-abf8-4cd1-9986-36505a512b7e",
"location": null,
"parent": null
},
"errors": []
}
Details about the fields. More detail and meanings can be found here:
user_friendly_name (str) - Required
status (str) - Optional. Value set: active, inactive, entered-in-error, unknown. Default : unknown
status_reason (str) - Optional. Value set: online, paused, standby, offline, not-ready, transduc-discon, hw-discon, off. Default : not-ready
distinct_identifier (str) - Optional
manufacturer (str) - Optional
manufacture_date (datetime) - Optional
expiration_date (datetime) - Optional
lot_number (str) - Optional
serial_number (str) - Optional
model_number (str) - Optional
type (str) - Optional. Find details about device types here. Values for Device.type can retrieved from here
version (str) - Optional
patient (int) - Optional. Patient id
owner (str) - Optional. Organization id. Defaults to provider if no owner specified
contact (str) - Optional.
location (str) - Optional. Location id
url (str) - Optional
note (text) - Optional
safety (text) - Optional
parent (str) - Optional. Device id
device_names (list) - Optional. A list of device names
name (str) - Required
type (str) - Required. Value set: udi-label-name, user-friendly-name, patient-reported-name, manufacturer-name, model-name, other
Update a diagnostic Device
URL: /providers/<provider_id>/devices/<device_uuid>
Method: PATCH
Note: This API endpoint supports update for all other fields except device_names list. The following fields are also excluded for update: id, uuid, is_deleted, created_at, modified_at
Values for Device.type can retrieved from here
{
"manufacturer": "Bapt. Roose",
"type": "ATOMIZER",
"user_friendly_name": "Just Tester"
}
{
"success": true,
"message": "Device successfully updated",
"data": {
"id": 2,
"device_names": [
{
"id": 2,
"name": "TT-XV-2022",
"type": "manufacturer-name"
},
{
"id": 3,
"name": "Test Anything",
"type": "user-friendly-name"
}
],
"uuid": "486c7b76-994b-4521-89fe-0379bb59828b",
"created_at": "2022-03-06T22:44:17.890266Z",
"is_deleted": false,
"modified_at": "2022-03-06T22:44:17.890299Z",
"status": "active",
"status_reason": "online",
"distinct_identifier": null,
"manufacturer": "Bapt. Roose",
"manufacture_date": "2010-12-1",
"expiration_date": null,
"lot_number": null,
"serial_number": null,
"model_number": null,
"part_number": null,
"type": "ATOMIZER",
"user_friendly_name": "Just Tester",
"version": null,
"contact": null,
"url": null,
"note": null,
"safety": null,
"patient": null,
"owner": "951ce6e6-abf8-4cd1-9986-36505a512b7e",
"location": null,
"parent": null
},
"errors": []
}
Get a list of devices
This endpoint is for retrieving devices owned by the provider
URL: {baseURL}/providers/<provider_id>/devices
Method: POST
{
"success": true,
"message": "Devices successfully retrieved!",
"data": [
{
"id": 3,
"device_names": [
{
"id": 4,
"name": "T4-XV-2018",
"type": "manufacturer-name"
},
{
"id": 5,
"name": "Blood Tester",
"type": "user-friendly-name"
}
],
"uuid": "5ec7c85c-a0c9-4966-9845-1c152e317989",
"created_at": "2022-03-06T22:50:11.790699Z",
"is_deleted": false,
"modified_at": "2022-03-06T22:50:11.790768Z",
"status": "inactive",
"status_reason": "hw-discon",
"distinct_identifier": null,
"manufacturer": "AT Company",
"manufacture_date": "2018-12-1",
"expiration_date": null,
"lot_number": null,
"serial_number": null,
"model_number": null,
"part_number": null,
"type": "Blood electrolyte analyzer",
"user_friendly_name": "Blood Tester",
"version": null,
"contact": null,
"url": null,
"note": null,
"safety": null,
"patient": null,
"owner": "951ce6e6-abf8-4cd1-9986-36505a512b7e",
"location": null,
"parent": null
}
],
"errors": null
}
Get diagnostic test results from LiSys analyzer connector
This endpoint allows you to retrieve results from the lisys analyzer connector
URL: https://api.serenity.health/v1/providers/static_text/results/{{accession_number}}
Method: POST
{
"LISResults": [
{
"SpecimenID": "specimen-id", # this is the accession number
"Code": "UREA",
"Result": "8.02",
"TestDate": "2016-06-06T15:15:21:42.00z:",
"Unit": "",
"Range": "",
"ServerTime": "2016-06-06T15:15:21:42.00z",
"AnalyzerCode": 3,
"Description"; "Some text goes here",
},
{
"SpecimenID": "specimen-id",
"Code": "UREA",
"Result": "8.02",
"TestDate": "2016-06-06T15:15:21:42.00z:",
"Unit": "",
"Range": "",
"ServerTime": "2016-06-06T15:15:21:42.00z",
"AnalyzerCode": 3,
"Description"; "Some text goes here",
},
{
"SpecimenID": "specimen-id",
"Code": "UREA",
"Result": "8.02",
"TestDate": "2016-06-06T15:15:21:42.00z:",
"Unit": "",
"Range": "",
"ServerTime": "2016-06-06T15:15:21:42.00z",
"AnalyzerCode": 3,
"Description"; "Some text goes here",
},
{
"SpecimenID": "specimen-id",
"Code": "UREA",
"Result": "8.02",
"TestDate": "2016-06-06T15:15:21:42.00z:",
"Unit": "",
"Range": "",
"ServerTime": "2016-06-06T15:15:21:42.00z",
"AnalyzerCode": 3,
"Description"; "Some text goes here",
}
]
}
Create or Update Reference Range configuration
This endpoint allows to create a reference range configuration record. If the reference range already exists, the following fields will be updated: test_order_name, observation_name, rank
URL: {base_url}/providers/{provider_id}/diagnostics/reference-range-configurations
Constraint: No 2 reference range configurations can have the same value for every one of the following fields along with overlapping range of min_age_days and max_age_days:
- test_id
- observation_code
- ref_range_high
- ref_range_low
- unit
- apply_to
- apply_to_type
[
{
"test_order_name": "Complete Blood Count (CBC) with Differential, Blood",
"test_id": "CBC",
"observation_name": "White Cell Count",
"observation_code": "WBC",
"min_age_days": 0,
"max_age_days": 14,
"ref_range_high": "10.00",
"ref_range_low": "26.00",
"unit": "10^9/L",
"apply_to": "all",
"apply_to_type": "recommended",
"rank": 1
},
{
"test_order_name": "Complete Blood Count (CBC) with Differential, Blood-",
"test_id": "CBC",
"observation_name": "White Cell Count",
"observation_code": "WBC",
"min_age_days": 2,
"max_age_days": 6,
"ref_range_high": "10.00",
"ref_range_low": "26.00",
"unit": "10^9/L",
"apply_to": "all",
"apply_to_type": "recommended"
},
{
"observation_name": "White Cell Count",
"observation_code": "WBC",
"min_age_days": 2,
"max_age_days": 6,
"ref_range_high": "10.00",
"ref_range_low": "26.00",
"unit": "10^9/L",
"apply_to": "all",
"apply_to_type": "recommended"
}
]
{
"success": false,
"message": "1 out of 3 reference range configuration(s) were successfully created or updated! Check the reported errors",
"data": [
{
"id": 24,
"uuid": "83bd0baf-8d47-4603-bf8f-44791cc98e32",
"created_at": "2022-06-28T12:45:37.935198Z",
"is_deleted": false,
"modified_at": "2022-06-28T12:45:37.935261Z",
"test_order_name": "Complete Blood Count (CBC) with Differential, Blood",
"test_id": "CBC",
"observation_name": "White Cell Count",
"observation_code": "WBC",
"min_age_days": 0,
"max_age_days": 14,
"ref_range_high": "10.00",
"ref_range_low": "26.00",
"unit": "10^9/L",
"apply_to": "all",
"apply_to_type": "recommended",
"rank": 1
}
],
"errors": [
"Overlapping age range error. The min and max age in {'test_order_name': 'Complete Blood Count (CBC) with Differential, Blood-', 'test_id': 'CBC', 'observation_name': 'White Cell Count', 'observation_code': 'WBC', 'min_age_days': 2, 'max_age_days': 6, 'ref_range_high': '10.00', 'ref_range_low': '26.00', 'unit': '10^9/L', 'apply_to': 'all', 'apply_to_type': 'recommended'}. overlaps an existing record",
"The 'test_order_name' is required in {'observation_name': 'White Cell Count', 'observation_code': 'WBC', 'min_age_days': 2, 'max_age_days': 6, 'ref_range_high': '10.00', 'ref_range_low': '26.00', 'unit': '10^9/L', 'apply_to': 'all', 'apply_to_type': 'recommended'}"
]
}
Fields description:
test_order_name (str) - required
test_id (str) - required
observation_name (str) - required
observation_code (str) - required
min_age_days (int) - required. From age days
max_age_days (int) - required. To age days
ref_range_high (str) - required
ref_range_low (str) - required
unit (str) - required
apply_to (str) - required
apply_to_type (str) - optional. Type
rank (str) - optional