Skip to main content
The iframe is the full prescribing flow in a URL. It works with any frontend framework, needs no credentials, and signs the prescriber in to Photon by itself.
The page has no chrome and a transparent background, so your page shows through.

URLs

The flow goes in the path. Ids go in the clear: the flow’s own record in the path, and any others in the query. Prefix each URL with https://rx.neutron.health in the sandbox, or https://rx.new in production. ⚠️ The sandbox isn’t live yet. When the URL names the patient by id, the iframe stays on that patient, with no Change patient.

Passing more than ids

To pass patient details, templates or several prescriptions, build the URL with frame() from the JavaScript client. It takes a record the same way the React components do, reads and writes nothing, and packs the record into one short token after the path.
For a patient on their own, use ph.patient.frame({ demographic: { … } }). A live object you already have makes its own: order.frame().
The token is encoded but not encrypted. Anyone who has the URL can read it, so treat a URL with patient details like the details themselves. Pass ids when you can.

Height and events

The iframe posts messages to your page. They contain ids and states only, never patient details. Every message has source: "photon-rx". Use the resize message to size the iframe, because the iframe has no fixed height:

Sign-in

The first time, the iframe shows Sign in to Photon. Clicking it opens a popup. The prescriber signs in and picks their organization, and the iframe continues. Later loads stay signed in.