E-Prescribing Service

Electronic prescribing system supporting SCRIPT messaging, controlled substances (EPCS), and formulary checking

Overview

The E-Prescribing Service enables providers to electronically send prescriptions to pharmacies, with integrated safety checking, formulary information, and support for controlled substances.

⚠️ DEA Compliance Required

This service is certified for EPCS (Electronic Prescribing of Controlled Substances) and requires two-factor authentication for all controlled substance prescriptions.

Key Features

Electronic Prescribing

NCPDP SCRIPT 2017071

  • Direct transmission to pharmacy
  • Controlled substance prescribing (EPCS)
  • Compound medications
  • Prior authorization workflows

See ⚠️ PrescriptionFulfillment (broken link) for the complete process.

Clinical Decision Support

Multi-Layer Safety Checking

Formulary & Benefits

Real-Time Benefit Check (RTPB)

  • Insurance coverage verification
  • Formulary tier information
  • Patient copay estimate
  • Prior authorization requirements
  • Alternative suggestions
💰 Cost Transparency

Providers see estimated patient copay before prescribing, enabling cost-conscious prescribing decisions.

Refill Management

Electronic Refill Workflow

  • Pharmacy-initiated refill requests
  • One-click approval for providers
  • Automatic denial for controlled substances (requires new Rx)
  • Refill history tracking

EPCS (Electronic Prescribing for Controlled Substances)

  1. Provider Authentication

    Two-factor authentication required (password + SMS/token). Identity proofed during enrollment.

  2. PDMP Query

    Automatic query to state Prescription Drug Monitoring Program for patient’s controlled substance history.

  3. Risk Assessment

    System calculates MME (Morphine Milligram Equivalent) and flags high-risk patterns (multiple prescribers, overlapping opioids).

  4. Provider Decision

    Provider reviews PDMP data and documents clinical rationale if proceeding despite alerts.

  5. Secure Transmission

    Prescription transmitted via certified EPCS module with digital signature.

  6. Audit Logging

    All access and prescribing logged for DEA compliance audits.

🚫 Controlled Substance Rules

DEA Schedules & Refill Restrictions

  • Schedule II: No refills (Oxycodone, Fentanyl, Adderall)
  • Schedule III-IV: Up to 5 refills (Hydrocodone/APAP, Xanax)
  • Schedule V: Up to 12 refills (Codeine cough syrup)

PDMP Queries Required: Most states mandate PDMP checks before prescribing opioids.

NCPDP SCRIPT Messages

NewRx (New Prescription)

<Message>
<Header>
<To>NCPDP_PHARMACY_ID</To>
<MessageID>MSG123</MessageID>
</Header>
<Body>
<NewRx>
<Patient>...</Patient>
<Prescriber>...</Prescriber>
<Medication>
<DrugDescription>Lisinopril 10mg Tablet</DrugDescription>
<Quantity>30</Quantity>
<DaysSupply>30</DaysSupply>
<Refills>11</Refills>
<Substitutions>1</Substitutions>
</Medication>
</NewRx>
</Body>
</Message>

RefillRequest (from Pharmacy)

<RefillRequest>
<Patient>...</Patient>
<Prescription>
<WrittenDate>2023-10-15</WrittenDate>
<LastFillDate>2023-11-15</LastFillDate>
<RefillsRemaining>10</RefillsRemaining>
</Prescription>
</RefillRequest>

Drug Safety Databases

  • First Databank (FDB): Drug interactions, dosing, allergies
  • RxNorm: Medication terminology
  • NDC Directory: National Drug Codes
  • FDA Drug Database: Safety alerts, recalls

Technology Stack

  • Runtime: Java 17
  • Framework: Spring Boot
  • SCRIPT Parser: Custom XML processor
  • Database: PostgreSQL
  • Message Queue: Apache Kafka
  • Security: EPCS Module (certified)

Performance & Reliability

  • Availability: 99.95%
  • Prescription send time: < 5 seconds
  • Safety check latency: < 2 seconds
  • PDMP query: < 10 seconds

Compliance

  • DEA: EPCS requirements
  • PDMP: State reporting
  • REMS: Risk mitigation strategies
  • Opioid Stewardship: MME limits, duration limits