Prescription Events

photon:prescription:created

A prescription is created

Schema

ParamTypeDescription
idstringInternal Photon ID for the prescription
externalIdstring (optional)External ID passed in during prescription creation
dispenseQuantitynumberAmount of a dispenseUnit per fill
dispenseUnitstringUnit to dispense medication in
dispenseAsWrittenbooleanTrue if substitutes are not allowed at the pharmacy
refillsAllowednumberNumber of refills allowed before expiration of script
daysSupplynumberNumber of days a single fill lasts
instructionsstringPrescriber instructions for patient
notesstringPrescriber notes, available to pharmacist
effectiveDatestringDate when the script is first valid
expirationDatestringDate when the script is no longer valid
prescriberIdstringID of the
medicationIdstringID of the medication being prescribed
patientIdstringID of the patient that this prescription belongs to
patientObjectObject containing the Photon ID and the external id of the patient

Sample Event

{
    "id": "01G8C1TNGH2F03021F23C95261",
    "type": "photon:prescription:created",
    "specversion": "1.0",
    "datacontenttype": "application/json",
    "time": "2022-01-01T01:00:00.000Z",
    "subject": "rx_01G8C1TNF8TZ5N9DAJN66H9KSH",
    "source": "org:org_KzSVZBQixLRkqj5d",
    "data": {
        "id": "rx_01G8C1TNF8TZ5N9DAJN66H9KSH",
        "externalId": "1234",
        "dispenseQuantity": 30,
        "dispenseAsWritten": true,
        "dispenseUnit": "EA",
        "refillsAllowed": 12,
        "daysSupply": 30,
        "instructions": "Take once daily",
        "notes": "",
        "effectiveDate": "2022-01-01",
        "expirationDate": "2023-01-01",
        "prescriberId": "usr_wUofzqEvcA2JCwJ4",
        "medicationId": "med_01G7T2NB6",
        "patient": {
            "id": "pat_ieUv67viS0lG18JN",
            "externalId": "1234"
        },
    }
}

photon:prescription:depleted

All refills for this prescription have been used

Schema

ParamTypeDescription
idstringInternal Photon ID for the prescription
externalIdstring (optional)External ID passed in during prescription creation
patientObjectObject containing the Photon ID and the external id of the patient

Sample Event

{
    "id": "01G8AHJBT081QQWM89X3SVV31F",
    "type": "photon:prescription:depleted",
    "specversion": "1.0",
    "datacontenttype": "application/json",
    "time": "2022-01-01T01:00:00.000Z",
    "subject": "rx_01G8AGBC91W1042CDRB19545EC",
    "source": "org:org_KzSVZBQixLRkqj5d",
    "data": {
        "id": "rx_01G8AGBC91W1042CDRB19545EC",
        "externalId": "1234",
        "patient": {
            "id": "pat_ieUv67viS0lG18JN",
            "externalId": "1234"
        }
    }
}

photon:prescription:expired

The prescription has expired

Schema

ParamTypeDescription
idstringInternal Photon ID for the prescription
externalIdstring (optional)External ID passed in during prescription creation
patientObjectObject containing the Photon ID and the external id of the patient

Sample Event

{
    "id": "01G8AHJBT081QQWM89X3SVV31F",
    "type": "photon:prescription:depleted",
    "specversion": "1.0",
    "datacontenttype": "application/json",
    "time": "2022-01-01T01:00:00.000Z",
    "subject": "rx_01G8AGBC91W1042CDRB19545EC",
    "source": "org:org_KzSVZBQixLRkqj5d",
    "data": {
        "id": "rx_01G8AGBC91W1042CDRB19545EC",
        "externalId": "1234",
        "patient": {
            "id": "pat_ieUv67viS0lG18JN",
            "externalId": "1234"
        }
    }
}