MDToolbox Migration Guide
1. Sync patients Photon
We recommend syncing patients' records with Photon as they're created and updated within your backend.
A request to the createPatient mutation will create a patient in Photon. If a needed, the updatePatient mutation works in a similar fashion, and can be used to update an existing patient record.
Patient metadata, including allergies and medication history are shared with pharmacies once prescriptions and written and ordered.
Below is an example of how to create a patient from a backend. Refer to authentication guide for instructions on how to authenticate these requests.
import { GraphQLClient, gql } from "graphql-request";
const graphQLClient = new GraphQLClient("https://api.neutron.health/graphql", {
headers: {
authorization: "Bearer YOUR_TOKEN_HERE",
},
});
const query = gql`
mutation createPatient(
$externalId: ID
$name: NameInput!
$dateOfBirth: AWSDate!
$sex: SexType!
$phone: AWSPhone!
$allergies: [AllergenInput]
$medicationHistory: [MedHistoryInput]
) {
createPatient(
externalId: $externalId
name: $name
dateOfBirth: $dateOfBirth
sex: $sex
phone: $phone
allergies: $allergies
medicationHistory: $medicationHistory
) {
id
}
}
`;
const variables = {
externalId: "YOUR_ID", // optional
name: {
first: "Jane",
last: "Doe",
},
dateOfBirth: "1970-01-01",
sex: "FEMALE",
phone: "+12025550102",
};
const results = await graphQLClient.request(query, variables);
2. (optional) Deeplink or Embed Photon
To improve Provider experience and efficiency, you can link to the Photon dashboard to make prescribing even easier for providers. The deep-link will jump right to the Prescribe workflow with a patient pre-selected: app.neutron.health/prescriptions/new?patientId=YOUR_PATIENT_ID
.
Parameter | Description |
---|---|
patientId | Optional. Can either be a Photon Patient ID or an External ID saved at patient creation. |
templateIds | Optional. Can include one or many Template IDs separated by commas |
If you want to embed Photon prescribing within your own app, follow the instructions here to integration with Photon elements
3. (optional) Webhooks
Webhooks allow you to subscribe to server-side notifications of events, such as changes to order state.
To subscribe to webhooks, you can follow the instructions here
4. (optional) Import MDToolbox data
If you have existing prescriptions that you'd like to import to Photon, just let us know! After sharing a one time data dump we can upload existing data to ensure continuity of care
Updated 10 days ago