Skip to main content
The simplest integration is entirely in your frontend. Your patient page gets a Prescribe button, and the prescriber writes, signs and sends without leaving your app. You need no backend work and no Photon ids up front.

What you need

  • An Application client_id from the Neutron dashboard, with your app’s URL in its allowed URLs
  • A prescriber account in your Neutron organization

1. Install

⚠️ Not published to npm yet.

2. Render the order for your patient

Pass the patient as you have them. Photon finds the matching record or adds a new one.
Prescribe.tsx
What happens:
  1. The first time, the card shows Sign in to Photon. The prescriber signs in and stays signed in.
  2. Photon matches the patient. If it isn’t sure, the prescriber picks from the candidates. If there’s no match, Photon adds the patient.
  3. The prescriber searches for a drug and fills in the sig and quantity. Screening runs as they type.
  4. They sign each prescription, then click Send. Photon texts the patient a link to choose a pharmacy.
fixed hides Change patient, because your page is already about this patient.

3. Keep the Photon id

onPatient gives you the patient once Photon has a record. Store p.id (pat_…) beside your own patient. Next time, pass the id instead of the details:
If your details changed, pass the id together with them, and Photon updates only those fields:

Not using React?

The iframe does the same with a URL and needs no credentials:

Next

  • Sync patients from your backend, so allergies and medications are already there for screening.
  • Every prop on PhotonOrder and PhotonProvider.