Prescription Events
photon:prescription:created
A prescription is created
Schema
Param | Type | Description |
---|---|---|
id | string | Internal Photon ID for the prescription |
externalId | string (optional) | External ID passed in during prescription creation |
dispenseQuantity | number | Amount of a dispenseUnit per fill |
dispenseUnit | string | Unit to dispense medication in |
dispenseAsWritten | boolean | True if substitutes are not allowed at the pharmacy |
refillsAllowed | number | Number of refills allowed before expiration of script |
daysSupply | number | Number of days a single fill lasts |
instructions | string | Prescriber instructions for patient |
notes | string | Prescriber notes, available to pharmacist |
effectiveDate | string | Date when the script is first valid |
expirationDate | string | Date when the script is no longer valid |
prescriberId | string | ID of the |
medicationId | string | ID of the medication being prescribed |
patientId | string | ID of the patient that this prescription belongs to |
patient | Object | Object 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
Param | Type | Description |
---|---|---|
id | string | Internal Photon ID for the prescription |
externalId | string (optional) | External ID passed in during prescription creation |
patient | Object | Object 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
Param | Type | Description |
---|---|---|
id | string | Internal Photon ID for the prescription |
externalId | string (optional) | External ID passed in during prescription creation |
patient | Object | Object 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"
}
}
}
Updated about 2 years ago