API Reference

Subscribe to Events

POST: {{base_url}}/providers/{{serenity_user_provider_id}}/subscribe

{
    "events": ["List of events a user wants to subscribe"],
    "webhook_url": "The endpoint to send the event data to"
}

Get Organization's Events

GET: {{base_url}}/providers/{{serenity_user_provider_id}}/subscribe

{
    "success": true,
    "message": "Success",
    "data": {
        "id": 1,
        "uuid": "870b0145-573a-4e10-a823-bcc7081b06d2",
        "created_at": "2022-11-08T05:13:51.282280Z",
        "modified_at": "2022-11-08T05:13:51.282320Z",
        "events": [
            "CREATE_PATIENT",
            "DISPENSE_MED"
        ],
        "webhook_url": "https://webhook.site/f515db2f-dcf8-42d2-949f-c1215810ebfd",
        "subscriber": "951ce6e6-abf8-4cd1-9986-36505a512b7e"
    },
    "errors": "None"
}

Get Events

GET: {{base_url}}/providers/{{serenity_user_provider_id}}/events

{
    "success": true,
    "message": "Success",
    "data": {
        "events": [
            {
                "label": "Register Patient",
                "description": "Creation of a patient record for a person",
                "value": "REGISTER_PATIENT",
                "group_by": "Customer Onboarding"
            },
            {
                "label": "Create Client Account",
                "description": "Creation of a provider client account for a payer (payer's client account)",
                "value": "CLIENT_ACTIONS",
                "group_by": "Customer Onboarding"
            },
            {
                "label": "Verify Client Account",
                "description": "Verification of a payer's client account ",
                "value": "CLIENT_ACTIONS",
                "group_by": "Customer Onboarding"
            },
            {
                "label": "Suspend Client Account",
                "description": "Suspension of a payer's client account and future payments billed to the payer",
                "value": "CLIENT_ACTIONS",
                "group_by": "Customer Onboarding"
            },
            {
                "label": "Add A Payer Beneficiary",
                "description": "Onboarding of a patient as a beneficiary of a payer",
                "value": "ADD_PAYER_BENEFICIARY",
                "group_by": "Customer Onboarding"
            },
            {
                "label": "Suspend A Payer Beneficiary",
                "description": "Suspension of a patient as a beneficiary of a payer",
                "value": "BENEFICIARY_ACTIONS",
                "group_by": "Customer Onboarding"
            },
            {
                "label": "Deposit Into A User Wallet",
                "description": "Deposit made into a user's healthcare wallet",
                "value": "DEPOSIT_INTO_WALLET",
                "group_by": "Customer Onboarding"
            },
            {
                "label": "Book An Appointment",
                "description": "Creates a consultation appointment for a patient to see a doctor",
                "value": "BOOK_APPOINTMENT",
                "group_by": "Consultation"
            },
            {
                "label": "Starts A Patient's Visit",
                "description": "Starts a patient's visitn",
                "value": "START_PATIENT_VISIT",
                "group_by": "Consultation"
            },
            {
                "label": "Prescribe Medications",
                "description": "Creates an order or request for both supply of the medication and the instructions for administration of the medication to a patient",
                "value": "PRESCRIBE_MEDICATION",
                "group_by": "Consultation"
            },
            {
                "label": "Request For A Lab Test",
                "description": "Creates an order or request for both supply of the medication and the instructions for administration of the medication to a patient",
                "value": "REQUEST_LAB_TEST",
                "group_by": "Consultation"
            },
            {
                "label": "Dispense Medication",
                "description": "Dispenses medications for a patient",
                "value": "DISPENSE_MED",
                "group_by": "Consultation"
            },
            {
                "label": "New Lab Request (walk-in)",
                "description": "Creates a request for a lab procedure to be performed",
                "value": "REQUEST_LAB_TEST",
                "group_by": "Diagnostics"
            },
            {
                "label": "Pay For A Bill",
                "description": "Payment for a bill for the provision of products/services",
                "value": "PAYBILL",
                "group_by": "Billing"
            },
            {
                "label": "Cancel A Bill",
                "description": "Cancellation of unpaid bill",
                "value": "CANCEL_BILL",
                "group_by": "Billing"
            },
            {
                "label": "Refund Product/Service ",
                "description": "Cancellation of paid bill",
                "value": "REFUND_BILL",
                "group_by": "Billing"
            },
            {
                "label": "Add Inventory Item",
                "description": "Addition of a new batch of stock items to inventory",
                "value": "ADD_INVENTORY_ITEM",
                "group_by": "Inventory Management"
            },
            {
                "label": "Update Inventory Item",
                "description": "Updating of a batch of stock items",
                "value": "UPDATE_INVENTORY_ITEM",
                "group_by": "Inventory Management"
            },
            {
                "label": "Refund Medication Dispense",
                "description": "Full or partial return of medications dispensed",
                "value": "REFUND_MEDICATION",
                "group_by": "Inventory Management"
            }
        ]
    },
    "errors": "None"
}

This endpoint will return an array of all events the EMR supports