Getting Started with DoseSpot | Medplum
DoseSpot eRx Integration Guide
This guide explains how to get the DoseSpot eRx interface iframed into Medplum and sync the relevant resources between Medplum and DoseSpot. It is all integrated into the Provider App already, but these instructions will show you how to use the hooks and bots in your own application.
info: This is a premium tier 3rd party integration feature. Please contact us at support@medplum.com to get access.
Authentication
To use any of the hooks or bots, you will first need to add your DoseSpot clinician ID as an identifier to each User's ProjectMembership. Please contact Medplum support to get your DoseSpot clinician ID.
{
"resourceType": "ProjectMembership",
"id": "123",
"project": {
"reference": "Project/123"
},
"user": {
"reference": "User/123"
},
"identifier": [
{
"system": "https://my.staging.dosespot.com/webapi/v2/", // https://my.dosespot.com/webapi/v2/ for production
"value": "123456"
}
],
}
Syncing Patient and Displaying the DoseSpot Iframe
To embed the DoseSpot eRx interface into Medplum and sync a patient's data to DoseSpot, you should use the useDoseSpotIFrame hook, called with a specific patient. It will handle the SSO into DoseSpot, returning a URL that can be embedded in an iframe and sync the patient by performing the necessary steps.
Sync Requirements
1. Syncs Patient -> DoseSpot: Ensure the patient's data includes:
- Email address
- Valid 9-digit phone number without the +1 prefix
- Address
- Date of birth
- First and last name
Pediatric Patients (Under 18): required to sync Height and Weight as Observations using the correct LOINC codes.
Here’s a sample patient object:
{
"resourceType": "Patient",
"name": [
{
"given": ["Frodo"],
"family": "Baggins"
}
],
"telecom": [
{
"system": "email",
"use": "home",
"value": "frodo@example.com"
},
{
"system": "phone",
"use": "home",
"value": "6175672093"
}
],
"address": [
{
"line": ["98 Battery St"],
"city": "San Francisco",
"state": "CA",
"postalCode": "94118"
}
],
"birthDate": "1978-06-15",
"identifier": [
{
"system": "https://dosespot.com/patient-id",
"value": "78089260"
}
]
}
Height and Weight for Pediatric Patients
For patients under 18 years of age, here’s an example of a valid Height Observation:
{
"resourceType": "Observation",
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "vital-signs",
"display": "Vital Signs"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8302-2",
"display": "Body height"
}
],
"text": "Body height"
},
"subject": {
"reference": "Patient/123"
},
"effectiveDateTime": "2024-11-20T10:30:00Z",
"valueQuantity": {
"value": 59,
"unit": "cm",
"system": "http://unitsofmeasure.org",
"code": "cm"
}
}
Syncing Active Prescriptions
Use the DoseSpot Prescription Sync Bot to sync prescriptions back to Medplum.
Example of executing the bot:
const DOSESPOT_PRESCRIPTIONS_SYNC_BOT: Identifier = {
system: 'https://www.medplum.com/bots',
value: 'dosespot-prescriptions-sync-bot',
};
const medicationRequests = await medplum.execute(DOSESPOT_PRESCRIPTIONS_SYNC_BOT, {
patientId,
start: "2023-01-01",
end: "2025-01-01",
// raw: true // returns raw DoseSpot prescription data instead of creating and returning MedicationRequest resources
}) as MedicationRequest[];
Example of a MedicationRequest resource created by the bot:
{
"resourceType": "MedicationRequest",
"id": "123",
"identifier": [
{
"system": "https://dosespot.com/prescription-id",
"value": "459848468"
}
],
"status": "completed",
"intent": "order",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/sid/ndc",
"code": "57896059815"
}
],
"text": "Lip-Care External Stick"
},
"subject": {
"reference": "Patient/123",
"display": "John Doe"
},
"authoredOn": "2025-05-06T23:43:01.483",
"recorder": {
"identifier": {
"value": "dosespot"
}
},
"dispenseRequest": {
"validityPeriod": {
"start": "2025-05-06T23:43:01.483"
},
"quantity": {
"value": 2,
"unit": "Stick",
"system": "http://unitsofmeasure.org"
},
"expectedSupplyDuration": {
"value": 1,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
}
}
}
For further documentation, see specific sections on Prescription Status, Medication History, and Enroll Prescribers.
Additional Notes
- Require Height LOINC Codes: Height
8302-2, Weight29463-7. - Ensure practitioners have required roles and identifiers.
Refer to the documentation for detailed implementation, examples, and structure to ensure smooth integration with DoseSpot.