Skip to main content

Prescriber Enrollment

This guide explains how to enroll a new prescriber in DoseSpot via the Medplum Enroll Prescriber Bot.

Note: In order to process an invite, the User that executes the bot must be

  1. an admin in your project (ProjectMembership.admin)
  2. already have Access to DoseSpot(DoseSpot identifier on your Project Membership)
  3. You must be a Clinician Admin type role in DoseSpot (as specified in the PractitionerRoleTypes parameter)

This bot can be executed to enroll a Practitioner or update an existing one in DoseSpot.

await medplum.executeBot({system: "https://www.medplum.com/bots", value: "dosespot-enroll-prescriber-bot"}, {
practitionerId: "ced6426b-ad93-4abe-8e75-1695d956e471",
practitionerRoleTypes: [1]
});

Practitioner Resource Requirements

The Practitioner resource must contain the following fields (extracted automatically by the bot):

FieldRequiredDescriptionRequirements
nameYesAt least one name entry- family: Last name (required)
- given: Array of given names (at least one required)
birthDateYesDate of birthDate format (e.g., "1980-05-15")
identifierYesMust include an NPI identifier- system: "http://hl7.org/fhir/sid/us-npi"
- value: Valid 10-digit NPI that passes check digit validation
addressYesAddress informationMust include: line, city, state, postalCode
telecomYesContact information- Email: system: "email", value: "email@example.com"
- Phone: system: "phone", use: "work", value: "555-123-4567"
- Fax: system: "fax", value: "555-123-4568"
activeYesBoolean indicating if practitioner is activeDefaults to true
Example Practitioner resource
{
"resourceType": "Practitioner",
"id": "ced6426b-ad93-4abe-8e75-1695d956e471",
"name": [ // Required: At least one name entry
{
"family": "Smith", // Required: Last name
"given": ["Jane", "Marie"], // Required: Array of given names (at least one required)
"prefix": ["Dr."] // Optional
}
],
"birthDate": "1980-05-15", // Required: Date of birth
"identifier": [ // Required: Must include an NPI identifier
{
"system": "http://hl7.org/fhir/sid/us-npi", // Required: NPI system identifier
"value": "1234567893" // Required: Valid 10-digit NPI that passes check digit validation
}
],
"telecom": [ // Required: Contact information
{
"system": "email", // Email contact
"value": "jane.smith@example.com"
},
{
"system": "phone", // Phone contact
"use": "work", // Optional: Use case (work, home, etc.)
"value": "345-123-4567" // Must be valid 10-digit US phone number
},
{
"system": "fax", // Fax contact
"value": "567-123-4568" // Must be valid 10-digit US phone number
}
],
"address": [ // Required: Address information
{
"line": ["123 Main St", "Suite 100"], // Address line(s)
"city": "Springfield", // Required: City
"state": "IL", // Required: State
"postalCode": "62701" // Required: Postal code
}
],
"active": true // Required: Boolean indicating if practitioner is active
}

Bot Input Parameters

The bot requires the following input parameters:

ParameterRequiredTypeDescriptionExample/Valid Values
practitionerIdYesstringThe ID of the FHIR Practitioner resource to enroll"ced6426b-ad93-4abe-8e75-1695d956e471"
practitionerRoleTypesYesDoseSpotClinicianRoleType[] (array of numbers)Array of role types for the clinician in DoseSpotValid values:
- 1 - PrescribingClinician
- 2 - ReportingClinician
- 3 - EpcsCoordinator
- 4 - ClinicianAdmin
- 5 - PrescribingAgentClinician
- 6 - ProxyClinician

Example: [1] (Prescribing Clinician) or [1, 4] (Prescribing Clinician and Clinician Admin)
note

Users that need to be able to invite others should be added with ClinicianAdmin role type.

EPCS

To invite a prescriber to enroll in EPCS, you must provide the DEA number(s) for the prescriber.

  • Type: DoseSpotDeaNumber[]
  • Description: Array of DEA (Drug Enforcement Administration) numbers with state information
  • Structure:
{
DEANumber: string; // Format: ^[A-Za-z]{2}[0-9]{7}$ OR ^[A-Za-z]{1} 9 [0-9]{7}$ OR ^[A-Za-z]{2}[0-9]{7} - [A-Za-z0-9]{1-7}$
State?: string; // State DEA number is assigned for (optional)
}
  • Example:
await medplum.executeBot({system: "https://www.medplum.com/bots", value: "dosespot-enroll-prescriber-bot"}, {
practitionerId: "ced6426b-ad93-4abe-8e75-1695d956e471",
practitionerRoleTypes: [1],
deaNumbers: [
{ DEANumber: "AB1234563", State: "IL" }
]
});

Important Validation Notes

NPI Validation

  • The NPI must be exactly 10 digits
  • For testing purposes, you can use an online NPI generator such as this one

Phone and Fax Numbers

  • Phone and fax numbers are extracted from the Practitioner telecom field
  • They must be valid 10-digit US phone numbers
  • Don't use a phone number that starts with '555-'.

ProjectMembership

  • The Practitioner that is being invited must have an associated ProjectMembership
  • The ProjectMembership must not already have a DoseSpot identifier
  • The DoseSpot clinician ID will be stored on the ProjectMembership after successful enrollment