Skip to main content
Every call screens the draft and returns its screeningAlerts. See Screening.

Example

Choosing the drug

Identify the treatment by exactly one of id, rxNormId, ndc, upc or name, or start from a templateId, which fills in the drug, sig and dispense. An id resolves exactly. A name that fits several products comes back as an AMBIGUOUS change whose options are the candidate drugs. So does a name that fits one product without being its exact name, with that one option to confirm (CONFIRMATION_REQUIRED). Resend with the chosen option’s value (a treatment.id). See Changes and choices. Syncing without a patient is a safe lookup that never creates anything. Use it to resolve the drug before you draft. Each drug option’s entity is the Treatment it picks, in parts. Use them to show the choices as a prescriber decides (drug, then form, then strength) instead of parsing displayName:
Medication-specific fields are null for medical equipment and compounds. A prescription’s own treatment has the same parts. Its name may be just the drug ("Lisinopril"), and prescribableName is the full product name.
Always send a templateId or a treatment when you draft. With a patient, a sync may continue a draft the patient already has in progress. If they have several, you get AmbiguousPrescriptionMatch. Resend with the id of the one you mean.

Sig options

Read treatment.templates for saved templates and recommended directions. source distinguishes PERSONAL_CATALOG, ORG_CATALOG and RECOMMENDED choices. Recommended sigs appear on a draft once it has a patient and a drug with an NDC.
After the prescriber chooses a template, send its id as templateId, or copy its instructions and dispense into the prescription update. A recommended sig’s ID applies only to the draft it was suggested for. A recommendation that only supplies a dispense unit can have a null id; use the returned unit and collect the remaining details. Templates are null on a prescription that is no longer a draft. Review suggested directions and dispense details before signing.

Signing

Signing is the prescriber’s approval of exactly what they reviewed:
  1. Every response includes signing.contentHash, a hash of the prescription’s current clinical content: the drug, the sig and the dispense. Notes and diagnoses aren’t part of it, so changing them doesn’t invalidate a signature.
  2. Show the prescriber the prescription and its screening alerts.
  3. Send that hash back as signing.signedHash, and send no other changes in the same call.
If the content changed after the prescriber reviewed it, the hashes don’t match. Photon rejects the attempt and returns INVALIDATED_SIGN. Show the prescriber the new content and sign again.
Only a prescriber’s user token can sign. A machine token gets an OperationError with type: UNAUTHORIZED. Most integrations let Prescribe do the signing.

Fields

A prescription’s prescriber is the prescriber assigned to it (usr_USER_ID), with their name. It’s null for drafts and when no prescriber is assigned, and it doesn’t say who signed. signing does.
Last modified on November 13, 2026