Pharmacy Integration Guide
Photon is designed to streamline and improve the management of pharmacy fulfillment. Our goal is to make it easier for pharmacies to directly integrate.
If you're ready to get started with Photon or have questions about an integration, reach out at [email protected].
We're happy to provide support or discuss specific use-cases beyond what's documented here.
Receiving Prescriptions
There are two paths for receiving prescriptions from Photon.
Direct Integration
A direct integration requires that your pharmacy has an endpoint stood up to accept prescriptions from Photon. We'll send prescriptions to that endpoint whenever a patient or provider selects your pharmacy. An example of what one of these prescriptions look like can be found below.
Fax Alternative
For non-integrated pharmacies, we can also send faxes.
Status Updates
If your pharmacy is able to share status updates, we have an endpoint.
POST https://api.photon.health/v1/hooks/pharmacy
{
"status": "shipped",
"order_id": "1234",
"carrier": "USPS"
"tracking_number": "5678"
}
Below are statuses that we accept. If you have a status that we're not tracking let us know!
Status | Description |
---|---|
new/received | The prescription (or order) has been received |
in_progress | The prescription (or order) has begun processing |
shipped/out_for_delivery | The prescription (or order) has been sent out for delivery (either by mail or courier) |
completed | The prescription (or order) has been fully completed. This should only be sent once it has been shipped, picked up, or delivered |
canceled | The prescription (or order) has been canceled |
error | Something went wrong while filling the prescription |
For shipped/out_for_delivery
, we also support passing specific shipping information. This is helpful to eliminate communication from the patient/provider.
Prescription Format
Photon typically sends prescriptions in NCPDP SCRIPT Standard format in XML or JSON. We also support modifying the message for specific use cases, such as adding IDs for your internal usage.
<Message DatatypesVersion="20170715" TransportVersion="20170715" TransactionDomain="SCRIPT"
TransactionVersion="20170715" StructuresVersion="20170715" ECLVersion="20170715">
<Header>
<To Qualifier="P">123456</To>
<From Qualifier="D">0</From>
<MessageID>01H4PG3723PGB5BVJGNR3BAB0Z</MessageID>
<SentTime>2023-07-06T21:00:30.998Z</SentTime>
<Security>
<Sender>
<TertiaryIdentification>000</TertiaryIdentification>
</Sender>
<Receiver>
<TertiaryIdentification>142</TertiaryIdentification>
</Receiver>
</Security>
<SenderSoftware>
<SenderSoftwareDeveloper>Photon Health</SenderSoftwareDeveloper>
<SenderSoftwareProduct>Photon</SenderSoftwareProduct>
<SenderSoftwareVersionRelease>1.0</SenderSoftwareVersionRelease>
</SenderSoftware>
<PrescriberOrderNumber>01H4PG3723PGB5BVJGNR3BAB0Z</PrescriberOrderNumber>
</Header>
<Body>
<NewRx>
<Patient>
<HumanPatient>
<Name>
<LastName>Smith</LastName>
<FirstName>John</FirstName>
</Name>
<Gender>M</Gender>
<DateOfBirth>
<Date>1999-01-01</Date>
</DateOfBirth>
<Address>
<AddressLine1>123 Main St</AddressLine1>
<City>Brooklyn</City>
<StateProvince>NY</StateProvince>
<PostalCode>11222</PostalCode>
<CountryCode>US</CountryCode>
</Address>
<CommunicationNumbers>
<PrimaryTelephone>
<Number>+13156634444</Number>
</PrimaryTelephone>
</CommunicationNumbers>
</HumanPatient>
</Patient>
<Pharmacy>
<Identification>
<NCPDPID>5930044</NCPDPID>
<NPI>1972149680</NPI>
</Identification>
<BusinessName>Your Pharmacy</BusinessName>
<Address>
<AddressLine1>123 MAIN ST</AddressLine1>
<City>NEW YORK</City>
<StateProvince>NY</StateProvince>
<PostalCode>11111</PostalCode>
<CountryCode>US</CountryCode>
</Address>
<CommunicationNumbers>
<PrimaryTelephone>
<Number>9174448383</Number>
</PrimaryTelephone>
<Fax>
<Number>9174448383</Number>
</Fax>
</CommunicationNumbers>
</Pharmacy>
<Prescriber>
<NonVeterinarian>
<Identification>
<NPI>123</NPI>
</Identification>
<PracticeLocation>
<BusinessName>org_U3ofDUVRsNTYt7d8</BusinessName>
</PracticeLocation>
<Name>
<LastName>Johnson</LastName>
<FirstName>John</FirstName>
</Name>
<Address>
<AddressLine1>199 N 8th St. #3B </AddressLine1>
<City>Brooklyn</City>
<StateProvince>NY</StateProvince>
<PostalCode>11211</PostalCode>
<CountryCode>US</CountryCode>
</Address>
<CommunicationNumbers>
<PrimaryTelephone>
<Number>3174504573</Number>
</PrimaryTelephone>
</CommunicationNumbers>
</NonVeterinarian>
</Prescriber>
<MedicationPrescribed>
<DrugDescription>Azelex 20 % Topical Cream</DrugDescription>
<DrugCoded>
<ProductCode>
<Code>00023-8694</Code>
<Qualifier>ND</Qualifier>
</ProductCode>
</DrugCoded>
<Quantity>
<Value>1</Value>
<CodeListQualifier>38</CodeListQualifier>
<QuantityUnitOfMeasure>
<Code>C64933</Code>
</QuantityUnitOfMeasure>
</Quantity>
<WrittenDate>
<DateTime>2023-07-06T21:00:26.844000Z</DateTime>
</WrittenDate>
<Substitutions>0</Substitutions>
<NumberOfRefills>0</NumberOfRefills>
<Note>Please provide instructions in spanish if possible</Note>
<Sig>
<SigText>Apply as needed</SigText>
</Sig>
</MedicationPrescribed>
</NewRx>
</Body>
</Message>
{
"Message": {
"Header": {
"To": 123456,
"From": 0,
"MessageID": "01H4PG3723PGB5BVJGNR3BAB0Z",
"SentTime": "2023-07-06T21:00:30.998Z",
"Security": {
"Sender": {
"TertiaryIdentification": 0
},
"Receiver": {
"TertiaryIdentification": 142
}
},
"SenderSoftware": {
"SenderSoftwareDeveloper": "Photon Health",
"SenderSoftwareProduct": "Photon",
"SenderSoftwareVersionRelease": 1
},
"PrescriberOrderNumber": "01H4PG3723PGB5BVJGNR3BAB0Z"
},
"Body": {
"NewRx": {
"Patient": {
"HumanPatient": {
"Name": {
"LastName": "Smith",
"FirstName": "John"
},
"Gender": "M",
"DateOfBirth": {
"Date": "1999-01-01"
},
"Address": {
"AddressLine1": "123 Main St",
"City": "Brooklyn",
"StateProvince": "NY",
"PostalCode": 11222,
"CountryCode": "US"
},
"CommunicationNumbers": {
"PrimaryTelephone": {
"Number": 13156634444
}
}
}
},
"Pharmacy": {
"Identification": {
"NCPDPID": 5930044,
"NPI": 1972149680
},
"BusinessName": "Your Pharmacy",
"Address": {
"AddressLine1": "123 MAIN ST",
"City": "NEW YORK",
"StateProvince": "NY",
"PostalCode": 11111,
"CountryCode": "US"
},
"CommunicationNumbers": {
"PrimaryTelephone": {
"Number": 9174448383
},
"Fax": {
"Number": 9174448383
}
}
},
"Prescriber": {
"NonVeterinarian": {
"Identification": {
"NPI": 123
},
"PracticeLocation": {
"BusinessName": "org_U3ofDUVRsNTYt7d8"
},
"Name": {
"LastName": "Johnson",
"FirstName": "John"
},
"Address": {
"AddressLine1": "199 N 8th St. #3B",
"City": "Brooklyn",
"StateProvince": "NY",
"PostalCode": 11211,
"CountryCode": "US"
},
"CommunicationNumbers": {
"PrimaryTelephone": {
"Number": 3174504573
}
}
}
},
"MedicationPrescribed": {
"DrugDescription": "Azelex 20 % Topical Cream",
"DrugCoded": {
"ProductCode": {
"Code": "00023-8694",
"Qualifier": "ND"
}
},
"Quantity": {
"Value": 1,
"CodeListQualifier": 38,
"QuantityUnitOfMeasure": {
"Code": "C64933"
}
},
"WrittenDate": {
"DateTime": "2023-07-06T21:00:26.844000Z"
},
"Substitutions": 0,
"NumberOfRefills": 0,
"Note": "Please provide instructions in spanish if possible",
"Sig": {
"SigText": "Apply as needed"
}
}
}
}
}
}