Identify the PA trigger: RTPB or claim adjudication response returns PriorAuthRequired status for the requested drug under the patient's Part D plan
Construct a PriorAuthorizationRequest transaction per NCPDP SCRIPT 2017071; populate Header routing fields (To = payer SPI, From = prescriber SPI), Patient, Prescriber, Drug, and PARequestType fields
Include clinical data elements required by the payer in the PAQuestion and PAResponse fields; retrieve payer-specific question sets via the PAInitiationRequest/PAInitiationResponse exchange before the full PA request
Transmit the PriorAuthorizationRequest over Surescripts; poll or receive callback with PriorAuthorizationResponse containing Approved, Denied, or MoreInfoRequested status plus PANumber if approved
If MoreInfoRequested is returned, send a PriorAuthorizationRequest with supplemental clinical data; if Denied, initiate PriorAuthorizationAppealRequest transaction
Write the approved PA number back to the EHR prescription record so it is included in the downstream NewRx DRU segment PA fields
Known gotchas
CMS mandated that Part D plans must support NCPDP SCRIPT 2017071 ePA transactions effective January 1, 2022; however, not all plans have fully automated decision engines—some still route ePA requests to human review queues with multi-day turnaround
The ePA question set (PAInitiation) varies by payer and drug; do not hardcode question structures—always retrieve the payer's current question set dynamically via PAInitiationRequest before submitting the full PA
PA approval numbers have expiration dates; if the prescription is not dispensed before PA expiration, the pharmacy claim will reject and a new PA must be obtained
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