A template is a saved prescription your organization sets up, with the drug, sig and dispense filled in. Manage templates and find their ids in the dashboard under Settings → Templates. Start a prescription from one by passing its
templateId.
The flow
1
Patient
Send what you know about the patient. Photon finds the matching record or adds a new one. Allergies, medications and diagnoses go on the patient so every prescription can be screened against them.
2
Prescription
Name a drug or start from a template. Photon resolves the drug to its catalog and screens it against the patient’s record each time the draft changes.
3
Sign
A prescriber reviews the draft and signs it. The signature covers exactly what they saw, so any later change needs a new prescription.
4
Order
Put the signed prescriptions on an order and submit it. Photon texts the patient, who picks a pharmacy. You can also choose the pharmacy yourself, but you don’t have to.
From draft to pharmacy
Creating a record never sends anything. Drafts stay inside Photon until a prescriber signs them and someone sends the order. Sending the order is the commit point.
Sending and transmitting are separate steps. You send the order to the patient, and Photon transmits it to a pharmacy once one is chosen. If you choose the pharmacy before sending, Photon places it there right after the send.
The send has a different name on each surface, but it’s always the same operation:
Anyone can draft. Signing needs a prescriber, and sending needs the
write:order permission. See Authentication.
Get, sync and update
Each record has one upsert. You call it in one of three ways, and they work the same for patients, prescriptions and orders:
Prescribe, GraphQL and MCP all use the same three calls. A React component given an id runs a get. Given fields, it runs a sync. Given both, it runs an update.
Photon makes the decisions
You don’t need to reimplement prescribing rules. Send what you know, and Photon’s service:- matches patients and avoids duplicates
- resolves free-text drug, allergy and diagnosis names to catalog entries
- screens each prescription for drug, allergy and condition conflicts
- checks that an order can be sent: every prescription signed, all for one patient, and a phone number on file
- routes the order and lets the patient choose a pharmacy
Don’t rebuild prescribing
The prescriber’s part of the flow (finding the patient, choosing the drug, reviewing screening, signing, sending) is already built in Prescribe. It takes one React component or one iframe, and it keeps up as Photon adds features. Spend your effort on what only your product knows:Only a signed-in prescriber can sign. Machine tokens can draft but can’t sign prescriptions, so the last step always happens in a browser. See Authentication.