Welcome to finance!
These endpoints enable you to setup, view and pay for bills on Serenity's EMR
Raise a bill for a service request
This endpoint allows you to raise a bill for a service request.
This will only work for service requests that are yet to be raised as a bill.
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/raise-service-request-bill
Method: POST
[
{
"service_request": "9872c9d4-765b-4853-94e5-e5bba8fdaaae",
"healthcare_service": "service_id",
"price_tier": 13,
"override_patient_group_pricing_rules": False, # set to True the price tier in the payload is not applicable to the patient's group
}
]
View provider issued bills (invoices)
This endpoint allows you to get all bills issued by a provider
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/invoices
Method: GET
{
"success": true,
"message": "Successfully retrieved invoices for Nyaho Medical",
"data": [
{
"patient_detail": {
"name": "Waggy Taggy",
"age": "18 years",
"gender": "MALE",
"mr_number": "fe85d241-9462-4eb4-a621-a210fbadc6b8"
},
"provider_detail": {
"name": "Nyaho Medical",
"address": "15 Sesame Street",
"country": "GH",
"telephone": null,
"website": null
},
"patient_address": null,
"line_items": [
{
"id": 92,
"patientid": "719db540-8ee2-41f9-a7bf-3514d5b55a7b",
"subscriberid": null,
"beneficiaryid": null,
"service": null,
"charge": 100.0,
"invoice_id": "a90b1063-f7c5-41fd-8a35-2e9528f61a02",
"patientname": "Waggy Taggy",
"patient_mobile": "2332435678907",
"servicerequestid": null,
"medicationrequestid": null,
"occurrence_date": "2021-08-31T05:17:23.906110Z",
"practitionername": "Chris Dare",
"practitionerid": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"status": "billable",
"status_display": "Unpaid",
"service_or_product_name": "GP Consultation",
"visitid": null,
"serviceid": null,
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": null,
"clinic": null,
"clinic_name": null,
"company_name": null,
"created_on": "2021-08-31T05:17:23.906050Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Waggy Taggy",
"payer": null,
"payer_name": null,
"payment_method": null,
"payment_transactions": [],
"policy": null,
"practitioner_role": "8eb044df-3e0d-43fd-8e59-65c0ddbdcf66",
"practitioner_name": "Chris Dare",
"provider": "b6c0cc80-c5fd-4430-805c-e3591ec9b3cf",
"provider_name": "Nyaho Medical",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "bf278d07-5842-4512-b6fc-d1cf50b0e485",
"service_request": null,
"subscriber": null,
"price_tier": 1,
"transaction": null,
"visit": "db7d374a-b400-47c4-a205-413ff173caa2"
}
],
"cashier": "N/A (billed unpaid)",
"user_friendly_id": 4,
"total_gross_value": 100.0,
"total_gross_currency": "GHS",
"status": "billable",
"status_display": "Unpaid"
},
{
"patient_detail": {
"name": "Waggy Taggy",
"age": "18 years",
"gender": "MALE",
"mr_number": "fe85d241-9462-4eb4-a621-a210fbadc6b8"
},
"provider_detail": {
"name": "Nyaho Medical",
"address": "15 Sesame Street",
"country": "GH",
"telephone": null,
"website": null
},
"patient_address": null,
"line_items": [
{
"id": 93,
"patientid": "6b542a0a-734f-4725-9e49-b03a6d25dfc1",
"subscriberid": null,
"beneficiaryid": null,
"service": "4133e8d7-438f-47ae-9065-6264d81276ec",
"charge": 200.0,
"invoice_id": "5e07b01d-8cb3-4621-98b8-9f7b83ddd66e",
"patientname": "Waggy Taggy",
"patient_mobile": "2332435678907",
"servicerequestid": "3e98e1e8-a673-4a17-a822-d0769e95371e",
"medicationrequestid": null,
"occurrence_date": "2021-08-31T06:37:46.775568Z",
"practitionername": "Chris Dare",
"practitionerid": "f9d977dc-d01e-452c-b4dd-448dc332cf22",
"status": "billable",
"status_display": "Unpaid",
"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-31T06:37:46.775533Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Waggy Taggy",
"payer": null,
"payer_name": null,
"payment_method": null,
"payment_transactions": [],
"policy": null,
"practitioner_role": "f9d977dc-d01e-452c-b4dd-448dc332cf22",
"practitioner_name": "Chris Dare",
"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": "3e98e1e8-a673-4a17-a822-d0769e95371e",
"subscriber": null,
"price_tier": 13,
"transaction": null,
"visit": null
}
],
"cashier": "N/A (billed unpaid)",
"user_friendly_id": 5,
"total_gross_value": 200.0,
"total_gross_currency": "GHS",
"status": "billable",
"status_display": "Unpaid"
}
],
"errors": null
}
GET an invoice as JSON
This endpoint allows you to view an invoice. See https://www.hl7.org/fhir/invoice.html to learn more about invoices
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/invoices/{{invoice_uuid}}
Method: GET
{
"meta": {
"current": 1,
"page_size_query": "page_size",
"next": "http://localhost:8090/v1/providers/b6c0cc80-c5fd-4430-805c-e3591ec9b3cf/finance/invoices?page=2&page_size=1",
"previous": null,
"page_size": 1,
"total": 49
},
"results": [
{
"uuid": "9cc59fb7-1c1d-4c22-8b7b-60c3ba268e18",
"patient_detail": {
"id": "086fbecf-ad2f-41ea-938a-be79a0fa5664",
"uuid": "e5c34670-e966-4959-a20e-26f16979bfa3",
"name": "Tony Stark",
"age": "25 years",
"gender": "MALE",
"mr_number": "3b11f0ef-08de-4ee7-b880-8dd8288c86db"
},
"provider_detail": {
"name": "Nyaho Medical",
"address": "15 Sesame Street",
"country": "GH",
"telephone": null,
"website": null
},
"patient_address": null,
"line_items": [
{
"id": 141,
"patientid": "086fbecf-ad2f-41ea-938a-be79a0fa5664",
"subscriberid": null,
"beneficiaryid": null,
"service": null,
"charge": 100.0,
"invoice_id": "9cc59fb7-1c1d-4c22-8b7b-60c3ba268e18",
"patientname": "Tony Stark",
"patient_mobile": "233236547890",
"servicerequestid": null,
"medicationrequestid": null,
"occurrence_date": "2021-09-11T15:12:20.060943Z",
"practitionername": "Mr Don Gates",
"practitionerid": "56620b5a-ac31-4b09-8b48-6af0de3d5e4b",
"status": "billable",
"status_display": "Unpaid",
"service_or_product_name": "GP Consultation",
"visitid": null,
"serviceid": null,
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": null,
"clinic": null,
"clinic_name": null,
"company_name": null,
"created_on": "2021-09-11T15:12:20.060910Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Tony Stark",
"payer": null,
"payer_name": null,
"payment_method": null,
"payment_transactions": [],
"policy": null,
"practitioner_role": "56620b5a-ac31-4b09-8b48-6af0de3d5e4b",
"practitioner_name": "Mr Don Gates",
"provider": "b6c0cc80-c5fd-4430-805c-e3591ec9b3cf",
"provider_name": "Nyaho Medical",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "bf278d07-5842-4512-b6fc-d1cf50b0e485",
"service_request": null,
"subscriber": null,
"price_tier": 1,
"transaction": null,
"visit": "d41908a6-04c2-4fb6-8b6e-c82055634b13"
}
],
"cashier": "N/A (billed unpaid)",
"user_friendly_id": 81,
"total_gross_value": 100.0,
"total_gross_currency": "GHS",
"status": "billable",
"status_display": "Unpaid"
}
]
}
Get billable patients
This endpoint allows you to get a list of patients who have generated a bill at a hospital.
Query parameters:
- mr_number: The mr number of the patient
- payername: The name of the payer
- billing_period_start: The start of the billing period
- billing_period_end: The end of the billing period
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/billable-patients
{
"success": true,
"message": "Successfully retrieved billable patients",
"meta": {
"current": 1,
"page_size_query": "page_size",
"next": "http://localhost:8000/v1/providers/951ce6e6-abf8-4cd1-9986-36505a512b7e/finance/billable-patients?page=2",
"previous": null,
"page_size": 50,
"total": 79
},
"results": [
{
"id": 14543,
"user": null,
"mr_number": "NMC-6A9TF",
"last_encounter": null,
"age": 1,
"mobile": "+250770898817",
"email": "[email protected]",
"modified_at": "2022-06-16T22:35:55.071315Z",
"next_appointment": {},
"previous_payment_method": "user-account",
"previous_patient_account_uuid": "bc93b40a-d010-408d-9326-f6637375c463",
"uuid": "b626984b-0f53-4ec5-85f3-af49235abefa",
"created_at": "2022-06-16T22:35:55.071292Z",
"national_mobile_number": "0770898817",
"birth_date": "2021-01-04",
"birth_time": null,
"blood_type": "B-",
"deceased_date_time": null,
"employer": null,
"first_name": "Louiz",
"gender": "MALE",
"is_active": true,
"is_deceased": false,
"last_name": "Burman",
"marital_status": "UNKNOWN",
"multiple_birth_boolean": null,
"multiple_birth_integer": null,
"name_prefix": "Mr",
"occupation": null,
"other_names": null,
"religious_affiliation": null,
"photo": null,
"passport_number": null,
"general_practitioner": null,
"managing_organization": "951ce6e6-abf8-4cd1-9986-36505a512b7e"
},
{
"id": 14525,
"user": {
"id": 14762,
"uuid": "824b7ea2-e9d2-45db-a814-14fc60123ec5",
"first_name": "Louise",
"last_name": "Manzi",
"email": "[email protected]",
"mobile": "+250727722717"
},
"mr_number": "daad2910-6bad-4318-8115-8558d7afa6c6",
"last_encounter": null,
"age": 12,
"mobile": "+250727722717",
"email": "[email protected]",
"modified_at": "2022-04-26T10:53:42.303664Z",
"next_appointment": {},
"previous_payment_method": "user-account",
"previous_patient_account_uuid": "7c33d57f-f39f-43ab-808b-be24ecc6d498",
"uuid": "70293009-a430-42b7-9150-55bb73476836",
"created_at": "2022-04-26T10:53:42.303656Z",
"national_mobile_number": "0727722717",
"birth_date": "2010-04-01",
"birth_time": null,
"blood_type": null,
"deceased_date_time": null,
"employer": null,
"first_name": "Louise",
"gender": "FEMALE",
"is_active": true,
"is_deceased": false,
"last_name": "Manzi",
"marital_status": "UNKNOWN",
"multiple_birth_boolean": null,
"multiple_birth_integer": null,
"name_prefix": "Miss",
"occupation": null,
"other_names": null,
"religious_affiliation": [
"JEHOVAHS_WITNESSES"
],
"photo": null,
"passport_number": null,
"general_practitioner": null,
"managing_organization": "951ce6e6-abf8-4cd1-9986-36505a512b7e"
}
]
}
Get a payer's bills as PDF
This endpoint allows you to get a PDF of bills to be settled by a corporate or insurance payer. It returns a PDF as the HTTP response or a JSON response in the event of an error.
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/payer-bills/<payer_id>/print
Method: GET
Filter keys
Query Params can include
- date_from: The start of the billable period
- date_to: The end of the billable period
- currency: The currency the bill should be printed in
- patient__mr_number: The mr number of the patient
- bill_detail_preference: Options are:
Summarized
andDetailed
- should_payer_view_diagnoses: Options are
True
orFalse
Get a charge item as PDF
This endpoint allows you to get a charge item as a PDF. It returns a PDF as the HTTP response.
When the charge item is paid, you receive a pdf of the transaction it belongs to. When unpaid, you receive a pdf of the invoice it belongs to.
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/charge-items/{{charge_item_id}}/print
Method: GET
Get a invoice as PDF
This endpoint allows you to get an invoice as a PDF. It returns a PDF as the HTTP response.
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/invoices/{{invoice_uuid}}/print
Method: GET
Filter keys
Query Params can include
- mr_number
- currency
- charge_item_uuid
Pay for an invoice
This endpoint allows you to pay for an invoice
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/invoices/{{invoice_uuid}}/pay
{
"account_id": "3173c1e1-571b-4196-8cdf-743970c67153", // if corporate, insurance or patient account
"transaction_type": "user-account",
"amount": 200, // required if transaction_type is `cash`
"currency": "GHS", // required if transaction_type is `cash`
"copayment_info": { // if parent account requires a patient contribution
"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`
},
"location": "location id",
"discount_uuid": "<discount-uuid>"
}
{
"success": true,
"message": "Successfully paid for invoice",
"data": {
"patient_detail": {
"name": "Waggy Taggy",
"age": "18 years",
"gender": "MALE",
"mr_number": "fe85d241-9462-4eb4-a621-a210fbadc6b8"
},
"provider_detail": {
"name": "Nyaho Medical",
"address": "15 Sesame Street",
"country": "GH",
"telephone": null,
"website": null
},
"patient_address": null,
"line_items": [
{
"id": 93,
"patientid": "6b542a0a-734f-4725-9e49-b03a6d25dfc1",
"subscriberid": null,
"beneficiaryid": null,
"service": "4133e8d7-438f-47ae-9065-6264d81276ec",
"charge": 200.0,
"invoice_id": "5e07b01d-8cb3-4621-98b8-9f7b83ddd66e",
"patientname": "Waggy Taggy",
"patient_mobile": "2332435678907",
"servicerequestid": "3e98e1e8-a673-4a17-a822-d0769e95371e",
"medicationrequestid": null,
"occurrence_date": "2021-08-31T06:37:46.775568Z",
"practitionername": "Chris Dare",
"practitionerid": "f9d977dc-d01e-452c-b4dd-448dc332cf22",
"status": "billed",
"status_display": "Unpaid",
"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-31T06:37:46.775533Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Waggy Taggy",
"payer": null,
"payer_name": null,
"payment_method": null,
"payment_transactions": [],
"policy": null,
"practitioner_role": "f9d977dc-d01e-452c-b4dd-448dc332cf22",
"practitioner_name": "Chris Dare",
"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": "3e98e1e8-a673-4a17-a822-d0769e95371e",
"subscriber": null,
"price_tier": 13,
"transaction": null,
"visit": null
}
],
"cashier": "N/A (billed unpaid)",
"user_friendly_id": 5,
"total_gross_value": 200.0,
"total_gross_currency": "GHS",
"status": "billed",
"status_display": "Paid"
},
"errors": null
}
Pay for multiple charge items
This endpoint allows you to pay for multiple charge items
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/receive-payment
{
"payment_info": {
"account_id": "3173c1e1-571b-4196-8cdf-743970c67153",
"transaction_type": "user-account",
"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 price tier in the payload is not applicable to the bill's price tier group
},
"patient": "f5425074-95b6-4674-b2a6-3604556c375a", // patient id
"charge_items": [1,2,3,4], // charge item ids
"location": "location id",
"discounted_charge_items": [
{
"charge_item_uuid": "9ed23325-dfe2-4f43-a6b4-32085b16bc12",
"discount_uuid": "3a980395-fe7a-4f18-8f47-7f8c0331bfb3"
}
]
}
Request a bill cancellation/refund
This endpoint is used to request a bill cancellation. When the bill has already been paid for, a successful cancellation will lead to a refund. This is used in cases where a mistake is made on the bill or the patient would like to get a refund for a service paid for but yet to be offered which they no longer want.
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/charge-items/{{charge_item_id}}/actions
Method: POST
{
"action": "request-charge-item-cancelation",
"reason": "Lorem ipsum dolor sit amet",
"partial_refund": True,
"quantity_returned": 2,
}
{
"success": true,
"message": "Action: Bill cancelation request was successful",
"data": {
"id": 44,
"patientid": "6",
"cancelation": {
"requested_date_time": "2021-11-10T09:45:15.786752Z",
"requested_by_name": "Chris Dare",
"requested_by_type": "practitioner",
"approved_by_name": null,
"canceled_date_time": null,
"canceled_by_name": null,
"charge_item": 44,
"refund_amount": "150.00",
"currency": "GHS",
"transaction": null,
"reason": "Lorem ipsum dolor sit amet",
"status": "created",
"uuid": "dc34asdec8-ee1b-4bc6-9cbb-214e622df31d"
},
"subscriberid": null,
"beneficiaryid": null,
"service": null,
"charge": 150.0,
"invoice_id": "02ca8d09asd-50bb-449b-ad40-9cc431fffad7",
"patientname": "Patient name",
"patient_mobile": "mobile",
"patient_contribution": null,
"servicerequestid": null,
"medicationrequestid": null,
"occurrence_date": "2021-11-09T23:15:59.773134Z",
"practitionername": "Dr Miniel Garko",
"practitionerid": "46d890c2-52aasd-4a46-b2e2-5c94fd4bff0e",
"status": "cancelation-requested",
"status_display": "Requested cancelation",
"service_or_product_name": "GP Consultation",
"visitid": null,
"serviceid": null,
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": null,
"clinic": null,
"clinic_name": null,
"company_name": null,
"created_on": "2021-11-09T23:15:59.773093Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Patient name",
"payer": null,
"payer_name": null,
"payment_method": "user-account",
"payment_transactions": [
{
"id": 81,
"charge_item": 44,
"charge": "150.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": "46d890c2-52aa-4a46-b2e2-5c94fd4bff0e",
"practitioner_name": "Miniel Garko",
"provider": "951ce6e6-abf8-4cd1-9986-36505a512b7e",
"provider_name": "Fav Hospital",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "2936ed22-9asdd1e-49d2-adac54-9078c8easd00ebc",
"service_request": null,
"subscriber": null,
"price_tier": 1,
"transaction": "dasd9e5c2e5-asdaa06-4b29-8d3a-deced2a722df",
"visit": "3d91a5d7-465csad-43b0-b9ca-0c4127easd9be27",
"bill_to": "patient"
},
"errors": null
}
Approve a cancellation request
This endpoint is used to approve a cancelation request.
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/charge-items/{{charge_item_id}}/actions
Method: POST
{
"action": "approve-charge-item-cancelation-request",
"cancelation_request": "453776a4-56ff-42fe-8107-76f1ee34551a"
}
{
"success": true,
"message": "Action: Bill cancelation request was successful",
"data": {
"id": 44,
"patientid": "6",
"cancelation": {
"requested_date_time": "2021-11-10T09:45:15.786752Z",
"requested_by_name": "Chris Dare",
"requested_by_type": "practitioner",
"approved_by_name": null,
"canceled_date_time": null,
"canceled_by_name": null,
"charge_item": 44,
"refund_amount": "150.00",
"currency": "GHS",
"transaction": null,
"reason": "Lorem ipsum dolor sit amet",
"status": "created",
"uuid": "dc34asdec8-ee1b-4bc6-9cbb-214e622df31d"
},
"subscriberid": null,
"beneficiaryid": null,
"service": null,
"charge": 150.0,
"invoice_id": "02ca8d09asd-50bb-449b-ad40-9cc431fffad7",
"patientname": "Patient name",
"patient_mobile": "mobile",
"patient_contribution": null,
"servicerequestid": null,
"medicationrequestid": null,
"occurrence_date": "2021-11-09T23:15:59.773134Z",
"practitionername": "Dr Miniel Garko",
"practitionerid": "46d890c2-52aasd-4a46-b2e2-5c94fd4bff0e",
"status": "cancelation-requested",
"status_display": "Requested cancelation",
"service_or_product_name": "GP Consultation",
"visitid": null,
"serviceid": null,
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": null,
"clinic": null,
"clinic_name": null,
"company_name": null,
"created_on": "2021-11-09T23:15:59.773093Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Patient name",
"payer": null,
"payer_name": null,
"payment_method": "user-account",
"payment_transactions": [
{
"id": 81,
"charge_item": 44,
"charge": "150.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": "46d890c2-52aa-4a46-b2e2-5c94fd4bff0e",
"practitioner_name": "Miniel Garko",
"provider": "951ce6e6-abf8-4cd1-9986-36505a512b7e",
"provider_name": "Fav Hospital",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "2936ed22-9asdd1e-49d2-adac54-9078c8easd00ebc",
"service_request": null,
"subscriber": null,
"price_tier": 1,
"transaction": "dasd9e5c2e5-asdaa06-4b29-8d3a-deced2a722df",
"visit": "3d91a5d7-465csad-43b0-b9ca-0c4127easd9be27",
"bill_to": "patient"
},
"errors": null
}
Reject a bill cancellation request
This endpoint is used to reject a cancelation request. This only applies a cancelation pending approval or rejection. The operation fails if the cancelation request is already approved or cancelled
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/charge-items/{{charge_item_id}}/actions
Method: POST
{
"action": "reject-charge-item-cancelation-request",
"cancelation_request": "d1962ffa-2d5a-4046-abac-311a961425fb"
}
{
"success": true,
"message": "Action: Bill cancelation rejected was successful",
"data": {
"id": 585710,
"patientid": "a52c80de-3c57-4799-a119-0942f286ef98",
"cancelation": {
"requested_date_time": "2023-06-22T15:33:12.491631Z",
"requested_by_name": "Miss Faakor Wemegah",
"requested_by_type": "practitioner",
"approved_by_name": null,
"approved_date_time": null,
"canceled_date_time": null,
"canceled_by_name": null,
"charge_item": 585710,
"refund_amount": "294.00",
"currency": "GHS",
"transaction": null,
"reason": "Patient is a cash payer. Please delete. Thank you",
"status": "rejected",
"uuid": "d1962ffa-2d5a-4046-abac-311a961425fb"
},
"subscriberid": null,
"beneficiaryid": null,
"service": "df2c2d07-2530-4d8d-9b87-15fd5ee212d8",
"charge": 294.0,
"invoice_id": "4172a8e6-aef1-4856-a20c-6050acf5ea4b",
"patientname": "Rita Akoto",
"patient_mobile": "+233540557783",
"patient_contribution": "0.00",
"servicerequestid": null,
"medicationrequestid": null,
"occurrence_date": "2023-06-22T14:30:27.906775Z",
"practitionername": "Dr Anthony quampah Quampah",
"practitionerid": "49632455-8a06-459c-a1fc-96dcbd852d09",
"status": "billed",
"status_display": "Paid",
"service_or_product_name": "Obs & Gynae",
"visitid": "647459c1-4082-4e45-aae4-39e287093c70",
"serviceid": "df2c2d07-2530-4d8d-9b87-15fd5ee212d8",
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": "Consultation",
"clinic": "29e22113-9d7b-46a6-a857-810ca3567ca7",
"clinic_name": "Airport Main",
"company_name": null,
"created_on": "2023-06-22T14:30:27.906750Z",
"dependent": null,
"location": "29e22113-9d7b-46a6-a857-810ca3567ca7",
"medication_request_id": null,
"patient_name": "Rita Akoto",
"payer": null,
"payer_name": "GHANA MINE WORKERS UNION(Local)",
"payment_method": "corporate",
"payment_transactions": [
{
"id": 943279,
"charge_item": 585710,
"charge": "294.00",
"mode": "corporate",
"status": "completed",
"failed_reason": null,
"corporate_payments": null,
"card_payments": null,
"mobile_money_payments": null,
"cash_payments": null
}
],
"policy": null,
"practitioner_role": "49632455-8a06-459c-a1fc-96dcbd852d09",
"practitioner_name": "Dr Anthony quampah Quampah",
"provider": "161380e9-22d3-4627-a97f-0f918ce3e4a9",
"provider_name": "Nyaho Medical Center",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "d2983b2c-efe0-4173-85c4-cd245dd1b94d",
"service_request": null,
"subscriber": null,
"price_tier": 42,
"transaction": "f3c298de-1771-445d-a910-6c64d8b104c9",
"visit": "5bf0d356-3628-4dd0-8dc9-b2226a936876",
"bill_to": "corporate"
},
"errors": null
}
Cancel/Refund a bill
This endpoint is used to process a bill cancelation after it has been approved. In the case where the bill has already been paid, it will result in a refund to the patient/payer.
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/charge-items/{{charge_item_id}}/actions
Method: POST
{
"action": "cancel-charge-item",
"cancelation_request": "453776a4-56ff-42fe-8107-76f1ee34551a"
}
{
"uuid": "some-uuid",
"requested_date_time": "",
"requested_by_uuid": "",
"requested_by_name": "",
"requested_by_type": "", // PATIENT or PRACTITIONER
"approved_date_time": "",
"approved_by_uuid": "",
"approved_by_name": "",
"canceled_date_time": "",
"canceled_by_uuid": "",
"canceled_by_name": "",
"charge_item": "charge_item_id",
"requires_refund": true,
"amount_refunded": 2000,
"currency": "GHS",
"transaction":
}
Partial refunds
This endpoint is used to refund multiple bills been paid, it will result in a refund to the patient/payer.
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/finance/charge-item-actions
Method: POST
[
{
"charge-item": "some-id",
"action": "request-charge-item-refund",
"reason": "Lorem ipsum dolor sit amet",
"partial_refund": True,
"quantity_returned": 2,
},
{
"charge-item": "some-id",
"action": "request-charge-item-cancelation",
"reason": "Lorem ipsum dolor sit amet",
"partial_refund": True,
"quantity_returned": 19
}
]
{
"success": true,
"message": "Action: Bill cancelation request was successful",
"data":[
{
"id": 44,
"patientid": "6",
"cancelation": {
"requested_date_time": "2021-11-10T09:45:15.786752Z",
"requested_by_name": "Chris Dare",
"requested_by_type": "practitioner",
"approved_by_name": null,
"canceled_date_time": null,
"canceled_by_name": null,
"charge_item": 44,
"refund_amount": "150.00",
"currency": "GHS",
"transaction": null,
"reason": "Lorem ipsum dolor sit amet",
"status": "created",
"uuid": "dc34asdec8-ee1b-4bc6-9cbb-214e622df31d"
},
"subscriberid": null,
"beneficiaryid": null,
"service": null,
"charge": 150.0,
"invoice_id": "02ca8d09asd-50bb-449b-ad40-9cc431fffad7",
"patientname": "Patient name",
"patient_mobile": "mobile",
"patient_contribution": null,
"servicerequestid": null,
"medicationrequestid": null,
"occurrence_date": "2021-11-09T23:15:59.773134Z",
"practitionername": "Dr Miniel Garko",
"practitionerid": "46d890c2-52aasd-4a46-b2e2-5c94fd4bff0e",
"status": "cancelation-requested",
"status_display": "Requested cancelation",
"service_or_product_name": "GP Consultation",
"visitid": null,
"serviceid": null,
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": null,
"clinic": null,
"clinic_name": null,
"company_name": null,
"created_on": "2021-11-09T23:15:59.773093Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Patient name",
"payer": null,
"payer_name": null,
"payment_method": "user-account",
"payment_transactions": [
{
"id": 81,
"charge_item": 44,
"charge": "150.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": "46d890c2-52aa-4a46-b2e2-5c94fd4bff0e",
"practitioner_name": "Miniel Garko",
"provider": "951ce6e6-abf8-4cd1-9986-36505a512b7e",
"provider_name": "Fav Hospital",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "2936ed22-9asdd1e-49d2-adac54-9078c8easd00ebc",
"service_request": null,
"subscriber": null,
"price_tier": 1,
"transaction": "dasd9e5c2e5-asdaa06-4b29-8d3a-deced2a722df",
"visit": "3d91a5d7-465csad-43b0-b9ca-0c4127easd9be27",
"bill_to": "patient"
},
{
"id": 44,
"patientid": "6",
"cancelation": {
"requested_date_time": "2021-11-10T09:45:15.786752Z",
"requested_by_name": "Chris Dare",
"requested_by_type": "practitioner",
"approved_by_name": null,
"canceled_date_time": null,
"canceled_by_name": null,
"charge_item": 44,
"refund_amount": "150.00",
"currency": "GHS",
"transaction": null,
"reason": "Lorem ipsum dolor sit amet",
"status": "created",
"uuid": "dc34asdec8-ee1b-4bc6-9cbb-214e622df31d"
},
"subscriberid": null,
"beneficiaryid": null,
"service": null,
"charge": 150.0,
"invoice_id": "02ca8d09asd-50bb-449b-ad40-9cc431fffad7",
"patientname": "Patient name",
"patient_mobile": "mobile",
"patient_contribution": null,
"servicerequestid": null,
"medicationrequestid": null,
"occurrence_date": "2021-11-09T23:15:59.773134Z",
"practitionername": "Dr Miniel Garko",
"practitionerid": "46d890c2-52aasd-4a46-b2e2-5c94fd4bff0e",
"status": "cancelation-requested",
"status_display": "Requested cancelation",
"service_or_product_name": "GP Consultation",
"visitid": null,
"serviceid": null,
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": null,
"clinic": null,
"clinic_name": null,
"company_name": null,
"created_on": "2021-11-09T23:15:59.773093Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Patient name",
"payer": null,
"payer_name": null,
"payment_method": "user-account",
"payment_transactions": [
{
"id": 81,
"charge_item": 44,
"charge": "150.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": "46d890c2-52aa-4a46-b2e2-5c94fd4bff0e",
"practitioner_name": "Miniel Garko",
"provider": "951ce6e6-abf8-4cd1-9986-36505a512b7e",
"provider_name": "Fav Hospital",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "2936ed22-9asdd1e-49d2-adac54-9078c8easd00ebc",
"service_request": null,
"subscriber": null,
"price_tier": 1,
"transaction": "dasd9e5c2e5-asdaa06-4b29-8d3a-deced2a722df",
"visit": "3d91a5d7-465csad-43b0-b9ca-0c4127easd9be27",
"bill_to": "patient"
}
]
"errors": null
}
Raise an administrative bill
This endpoint allows you to raise an administrative bill (s) that may not be related to clinical activities . For example, it can be used to bill new registered patients, a registration fee
URL: {base_url}/providers/{provider_id}/finance/administrative-bill
Method: POST
[
{
"patient_id": "b626984b-0f53-4ec5-85f3-af49235abefa",
"healthcare_service_id": "d5291e76-9314-4a5a-be51-615de1f24629",
"price_tier_id": "43f857f4-0791-46fe-845d-db5d2a8dd0a4",
"practitioner": "d2291e0e-eedc-4ea3-b85e-73d4d9a1f9be",
"override_patient_group_pricing_rules": False, # set to True the price tier in the payload is not applicable to the patient's group
}
]
{
"success": true,
"message": "Successfully created the administrative bill(s)!",
"data": [
{
"id": 731,
"patientid": "b626984b-0f53-4ec5-85f3-af49235abefa",
"cancelation": null,
"subscriberid": null,
"beneficiaryid": null,
"service": "d5291e76-9314-4a5a-be51-615de1f24629",
"charge": 20.0,
"invoice_id": "a78069fa-a2f5-43f0-9001-912c913a5f84",
"patientname": "Louiz Burman",
"patient_mobile": "+250770898817",
"patient_contribution": null,
"servicerequestid": null,
"medicationrequestid": null,
"occurrence_date": "2022-06-20T23:50:21.525760Z",
"practitionername": "Mr Jean baptiste Tuyizere",
"practitionerid": "d2291e0e-eedc-4ea3-b85e-73d4d9a1f9be",
"status": "billable",
"status_display": "Unpaid",
"service_or_product_name": "Administrative Service Test",
"visitid": null,
"serviceid": "d5291e76-9314-4a5a-be51-615de1f24629",
"appointmentid": null,
"appointment": null,
"beneficiary": null,
"category": "Consultation",
"clinic": null,
"clinic_name": null,
"company_name": null,
"created_on": "2022-06-20T23:50:21.525590Z",
"dependent": null,
"location": null,
"medication_request_id": null,
"patient_name": "Louiz Burman",
"payer": null,
"payer_name": null,
"payment_method": null,
"payment_transactions": [],
"policy": null,
"practitioner_role": "d2291e0e-eedc-4ea3-b85e-73d4d9a1f9be",
"practitioner_name": "Mr Jean baptiste Tuyizere",
"provider": "951ce6e6-abf8-4cd1-9986-36505a512b7e",
"provider_name": "Nyaho Medical Center",
"provider_location_name": null,
"provider_location_id": null,
"relationship": "self",
"service_id": "3dfcfaa9-1794-42ac-ad8f-e073c98c385d",
"service_request": null,
"subscriber": null,
"price_tier": 2272,
"transaction": null,
"visit": null,
"bill_to": "patient"
}
],
"errors": null
}
Request payload: fields descriptions
patient_id (str) - Patient.uuid
healthcare_service_id (str) - Healthcareservice.uuid
price_tier_id (str) - ServicePriceTiers.uuid
practitioner (str) - Practitionerrole.id
Pay for a service request
URL: {{base_url}}/providers/{{serenity_user_provider_id}}/pay/servicerequests
Method: POST
{
"service_request": 201845,
"healthcare_service": "d9a86858-1cc0-4dc5-ac7f-c78ae17f3074",
"price_tier": 1189,
"transaction_type": "insurance",
"account_id": "8659e015-1def-46e4-8f3f-1be2916f0711",
"override_patient_group_pricing_rules": False, # set to True the price tier in the payload is not applicable to the bill's price tier group
"copayment_info": {
"amount": "56.40",
"currency": "GHS",
"transaction_type": "cash"
},
"service_discount_uuid": "<discount-uuid>"
}