Prescription Data Reference

The Prescription event contains data relevant to a patient’s prescribed medication. The payload will include the drug information, notes about the prescription, and the patient's details.

Prescription Event Payload

The payload below is a representation of a Prescription trigger event.

It is based on a prescription.fulfilled event, but it is relevant for all prescription-based events. See the Workflow Events/Triggers article for a full list of available events.

{
    "_id": "order_id",
    "drugs": [
        {
            "din": "ABCD1234EFGH5678IJKL9012MNOP3456",
            "mitte": 1,
            "mitteType": "box",
            "refills": 3,
            "notes": "Take 2 tablets by mouth once daily with food.",
            "drugName": "Metformin"
        }
    ],
    "fulfillments": [
        {
            "drugs": [
                {
                    "din": "ABCD1234EFGH5678IJKL9012MNOP3456",
                    "qty": 60,
                    "name": "Metformin",
                    "mitte": 1,
                    "refills": 3,
                    "txNumber": "TXN123456"
                }
            ],
            "orderId": 9876,
            "status": "processing",
            "notes": "Patient requested a 90-day supply.",
            "createdAt": "2024-07-20T08:15:22.110Z"
        }
    ],
    "printCounter": 1,
    "isVerbal": false,
    "customer": {
        "_id": "customer_id",
        "email": "janedoe@example.com",
        "phone": "+14155550123",
        "firstName": "Jane",
        "lastName": "Doe",
        "gender": "female",
        "referrer": "Dr. Anderson"
    },
    "notes": "Patient sensitive to brand-name medications. Dispense generic.",
    "createdBy": {
        "_id": "doctor_id",
        "firstName": "Dr. Jhon",
        "lastName": "doe",
        "email": "jdoe@example.com"
    },
    "createdAt": "2024-07-20T08:10:05.450Z",
    "organization": "medical_group",
    "updatedAt": "2024-07-20T08:16:30.987Z",
    "__v": 1
}

Properties Descriptions

The table below describes the parameters of the payload.

Property

Type

Description

_id

string

A unique identifier for the prescription.

drugs

array

An array of drug objects included in the prescription.

drugs.din

string

A unique drug identifier.

drugs.mitte

number

The quantity of medication to be dispensed.

drugs.mitteType

string

Indicates the form of the dispensed medication (e.g., “pill”, “vial”).

drugs.refills

number

The number of authorized refills.

drugs.notes

string

Instructions for the patient on how to take the medication.

drugs.drugName

string

The name of the prescribed drug.

fulfillments

array

A list of fulfillment records for this prescription.

fulfillments.drugs

array

The drugs included in a specific fulfillment.

fulfillments.drugs.din

string

The unique drug identifier.

fulfillments.drugs.qty

number

The quantity of medication dispensed in this fulfillment.

fulfillments.drugs.name

string

The name of the drug.

fulfillments.drugs.mitte

number

The quantity of medication to be dispensed.

fulfillments.drugs.refills

number

The number of refills available.

fulfillments.drugs.txNumber

string

The transaction number for this fulfillment.

fulfillments.orderId

number

The order ID associated with the fulfillment.

fulfillments.status

string

The status of the fulfillment (e.g., "new", "processing").

fulfillments.notes

string

Any notes related to the fulfillment.

fulfillments.createdAt

string

The timestamp when the fulfillment record was created.

printCounter

number

A counter for how many times the prescription has been viewed or printed.

isVerbal

boolean

When ‘true’ means it's written by an external system and synced to the EMR.

customer

object

An object containing the patient's information.

customer._id

string

The unique ID of the patient.

customer.email

string

The patient's email address.

customer.phone

string

The patient's phone number.

customer.firstName

string

The patient's first name.

customer.lastName

string

The patient's last name.

customer.gender

string

The patient's gender.

customer.referrer

string

The referrer for the patient, if any.

notes

string

Added notes in the prescription.

createdBy

object

An object containing information about the prescriber.

createdBy._id

string

The unique ID of the prescriber.

createdBy.firstName

string

The first name of the prescriber.

createdBy.lastName

string

The last name of the prescriber.

createdBy.email

string

The email address of the prescriber.

createdAt

string

The timestamp when the prescription was created.

organization

string

The organization associated with the prescription.

updatedAt

string

The timestamp when the prescription was last updated.

__v

number

The document version number.