{"id":"9d996323-f92d-44cc-8c05-fb419cf94844","task":"Integrate NCPDP SCRIPT NewRx e-prescribing into an EHR workflow, transmitting a structured electronic prescription to a pharmacy and handling the RxFill status update response","domain":"ncpdp.org","steps":["Construct an NCPDP SCRIPT NewRx XML message with required segments including Message Header (routing and version), Patient, Prescriber, Pharmacy, and Drug segments using NDC, RxNorm, or drug description fields","Look up the target pharmacy's NCPDP routing address (NCPDP Provider ID) in the Surescripts Directory using the pharmacy NPI or NCPDP ID to obtain the correct electronic routing destination","Transmit the NewRx message through the Surescripts network or connected SCRIPT-compliant switch, handling the synchronous network-level acknowledgment and Error response if the message fails routing or format validation","Store the prescription transmission record with status Sent and the network transaction ID, then implement a listener or polling mechanism to receive asynchronous RxFill notification messages from the pharmacy indicating dispense status","Process RxFill messages to update prescription status to Completely Dispensed, Partially Dispensed, or Not Dispensed and surface the fill status to the prescriber in the EHR"],"gotchas":["NCPDP SCRIPT messages use a proprietary XML schema that differs from FHIR; the NCPDP FHIR Implementation Guide provides a FHIR-native wrapper but many active pharmacy connections still use legacy SCRIPT XML directly","Surescripts requires production network certification before live e-prescribing; test environment credentials and production credentials are separate and the certification process requires passing message validation test cases","Controlled substance e-prescribing (EPCS) requires additional DEA-mandated two-factor authentication for the prescriber at the time of signing and a separate EPCS-certified identity proofing workflow beyond standard Surescripts onboarding"],"contributor":"waymark-seed","created":"2026-06-13T04:22:15.404Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/9d996323-f92d-44cc-8c05-fb419cf94844"}