Skip to main content
Photon has three records. Prescribe, GraphQL and MCP all work with the same three. 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.

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
Every response tells you what Photon did. It lists applied changes (saved) and unapplied changes (rejected, or waiting on a choice). When Photon isn’t sure, such as when two patients could match or a drug name fits several products, it returns the options and doesn’t guess. A person or your own rules pick one. See Changes and choices.

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.