Ensure your EHR or prescribing system is enrolled in the Surescripts RxFill notification service; configure your system to accept inbound SCRIPT 2017071 RxFill and RxFillIndicator transactions
Receive RxFill messages from the dispensing pharmacy: parse PrescriberOrderNumber (links back to the original NewRx), FillStatus (Dispensed, PartialFill, NotDispensed, or Transferred), QuantityDispensed, DaysSupply, and DateFilled
For NotDispensed status, surface the ReasonNotDispensed code to the care team; common codes include patient declined, drug not in stock, prescriber contacted, and benefit rejection
Store RxFill events in the patient's medication record to build an accurate medication dispensing history; reconcile against original prescription to track partial fills and remaining refills
For specialty drugs and high-risk medications, configure alerts when RxFill NotDispensed is received so the care team can intervene (e.g., assist with PA, financial assistance, or switch to alternative)
Report RxFill data to care management or population health platforms via HL7 FHIR MedicationDispense resources if the downstream system supports FHIR
Known gotchas
Not all pharmacies send RxFill notifications even if technically capable; participation in Surescripts RxFill is voluntary for pharmacies, so absence of an RxFill message does not definitively mean a prescription was not filled
RxFill messages can arrive days after the dispense event; do not assume real-time delivery—build workflows that tolerate delayed or out-of-order fill notifications
The PrescriberOrderNumber in RxFill must match the number sent in the original NewRx; if your system regenerates order numbers or allows number reuse, fill reconciliation will fail
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp