- For a Medicare Part D plan, on its own or with Medicare Advantage, from CMS’s monthly Part D files: the plan’s formulary says whether it covers the drug, at which tier and with which limits; the plan’s drug plan says what each tier costs; and the plan’s pharmacies say where.
- For a member’s own coverage, the real-time pharmacy benefit check asks their health plan.
A Medicare Part D formulary
Open to every customer. What a drug will cost a person on a Medicare Part D plan starts with the plan’s formulary: whether the plan covers the drug, at which tier, and whether it needs prior authorization or step therapy or has a quantity limit. What each tier costs is on the plan’s drug plan. Which drugs each Medicare Part D formulary lists, at which tier and with which limits, comes from CMS’s monthly Part D file, in the shape of HL7’s Da Vinci Payer Data Exchange (PDex) US Drug Formulary guide, version2.1.0. Every resource claims that guide’s profile, and names CMS’s file in
meta.source and when haau3 published it in meta.lastUpdated. A formulary and each item on it
also name the month that file covers, in haau3’s
Part D data month extension
(2026-11).
An item’s id is the formulary’s and the drug’s RxNorm code together, so with both you read the item
with no search. The calls are counted as Pharmacy Benefits.
A formulary lists what a plan covers. It is not a statement of what a member will pay or be
given: the plan decides, and can change its formulary during the year.
Which formulary a plan uses
A Medicare Advantage plan with Part D, read or found with Medical Benefits, names its formulary on itscoverage, in the guide’s FormularyReference extension:
DRUGPOL. A stand-alone prescription drug plan has no medical
InsurancePlan, so its drug plan is where to read its formulary’s id.
To find formularies without a plan, search InsurancePlan with type=DRUGPOL, alone for every
formulary or with identifier (CMS’s formulary id, 00027002), a form of name or _id.
Whether a drug is on a formulary
00027002, the formulary of the plan H2406-013-000,
at tier 1, limited to 60 every 30 days. The answer holds the item, then the formulary and the
drug _include asked for. An item carries:
A drug that is not on a formulary is an answer. A search that finds no item answers
200 with no
items and an OperationOutcome entry (search.mode outcome): “RxNorm 1 is not on Part D formulary
00027002 in CMS’s file for 2026-11.” A read of the item answers 404 with the same words. A
formulary that is not in CMS’s file is refused with 400, naming formulary.
Searching
formularytakesInsurancePlan/Formulary-00027002orFormulary-00027002, andsubjecttakesMedicationKnowledge/FormularyDrug-311354orFormularyDrug-311354. Each takes up to 20, separated by commas.codematches a drug’s RxNorm code or one of its dose form groups’, so a group’s code finds every drug in it.drug-namematches the start of either’s name, ignoring case._include=Basic:formularyand_include=Basic:subjectadd each item’s formulary and drug, and do not count toward_count._countis 1 to 100, 25 by default, for items and drugs, and 1 to 50, 10 by default, for formularies. Follow thenextlink to continue. Once a newer month of CMS’s file is served, a later page answers410: start the search again.- Every other parameter is refused by name, with the reason, the guide’s own included:
status,period,_lastUpdated,codeonBasic, anddoseform.
What is left out
- The tier’s name, such as generic or preferred brand, which each plan gives its tiers.
- The two-month and preferred pharmacy ways to fill, on an item. A plan’s drug plan prices them.
- Drugs a plan excludes, which are per plan, and CMS’s flag for drugs selected for Medicare price negotiation.
- A drug’s dose form, and the
doseformsearch.
A Medicare Part D plan’s drug plan
Open to every customer. What each tier costs on a Medicare Part D plan is on the plan’s drug plan: anInsurancePlan of its own, beside the plan’s medical one, in the shape of the same Da Vinci
guide’s PayerInsurancePlan. Every Part D plan in CMS’s monthly file has one. A stand-alone
prescription drug plan has no medical InsurancePlan, so its drug plan is the only one it has.
A drug plan’s id is the plan’s own id after DrugPlan-. Read it by that id. No search finds one.
The call is counted as Pharmacy Benefits.
With a drug’s tier from its formulary item, the cost of a one-month supply at a retail pharmacy is
the
specificCost whose category is 1-month-in-retail, and in it the benefit whose type is
that tier. On this plan a tier 2 drug is a $5 copay, and a tier 3 drug is 22% after the
deductible:
A drug plan’s costs are CMS’s for the month, in the initial coverage phase, for a person with no
subsidy. They may not be what a member pays at the pharmacy: the deductible, the other coverage
phases and a subsidy each change it. Insulin has costs of its own in CMS’s file, which are not
served yet.
Reading a cost
Each tier has one cost for each way to fill: a copay in dollars or a coinsurance in percent, as CMS’s file gives it, and never both. A coinsurance is a share of the drug’s price, which this service does not turn into dollars. A cost’s qualifier says whether the plan’s deductible comes first, in four of the guide’s codes, each by the guide’s own definition:
For a few plans CMS’s file gives a cost with a minimum or a maximum. Those are in haau3’s
Part D cost range extension
on the cost, in dollars:
- A copay between two amounts has the maximum as its value, with the comparator
<=, and the minimum and maximum in the extension. - A coinsurance with a maximum keeps its percent as its value, and the extension holds the most it comes to.
The ways to fill
A plan prices up to twelve ways to fill a prescription: a supply of one, two or three months, at a retail pharmacy or by mail order, at a pharmacy the plan lists as preferred or at any other in its network. The Da Vinci guide’s codes name four of them, which carry the price at a pharmacy that is not preferred:
The other eight are haau3’s interim codes, in
https://fhir.haau3.com/platform/CodeSystem/part-d-pharmacy-benefit-type,
until the guide can say them:
A plan prices only some of them. A way to fill the plan does not price for a tier is absent, never
a zero.
When there is no drug plan
- A plan that is not in CMS’s file for the month answers
404, and theOperationOutcomenames the month. - A read of a stand-alone drug plan by its own id,
InsurancePlan/S5743-001-000, answers404, since the plan has no medicalInsurancePlan. Its words name the drug plan’s id,DrugPlan-S5743-001-000. - An employer plan has no drug plan: CMS’s Part D file leaves out employer plans. Its own id’s
404names none. - When CMS’s file cannot be read just now, the answer is
503withRetry-After. It is never reported as a plan with no drug plan.
What is left out
- Insulin’s own costs, which CMS’s file gives apart from the tier’s.
- The two other coverage phases, before the deductible is met and catastrophic coverage.
- Drugs a plan excludes, and the plan’s own address for its drug list.
- A search for drug plans. Read one by its id.
A Medicare Part D plan’s pharmacies
Open to every customer. From CMS’s Medicare Part D files, published monthly, each pharmacy naming the month its file covers:- A plan’s pharmacies near a place, and which of them the plan prefers: a pharmacy search narrowed by one of the plan’s networks. A plan names up to four: retail, mail order, preferred retail and preferred mail order.
- Whether any Part D plan lists a pharmacy, on every pharmacy the pharmacy search returns.
- Whether one plan lists one pharmacy, preferred or not, with
$in-network.
The real-time pharmacy benefit check
Ask what a medication would cost: its price at pharmacies near a ZIP code, with no patient details, or what it would cost a member under their pharmacy coverage. The exchange is the CARIN Consumer Real-Time Pharmacy Benefit Check (STU2 ballot,2.0.0-ballot): you POST a FHIR message Bundle and get the answer in the same
exchange, in real time, from the sources it connects to.
The real-time check is not yet open to customers. While its price sources are being licensed,
every request from a customer’s organization, with or without patient details, is refused with
403 forbidden. Every price is an estimate; the pharmacy confirms the price.https://sandbox.haau3.com/v1/fhir/r4/$process-message, with
no key or a test key. Platform.haau3.com’s Pharmacy Benefits playground sends its requests there.
Service base
/v1/
is the version of the haau3 platform API contract, not a FHIR version. The FHIR release is
r4, and every response says so:
Accept: application/fhir+json, or no Accept
header at all, works fine. If you do ask for one we do not serve, or for a format other than JSON
(in Accept or _format), you get a 406 rather than a silent substitution.
Every error on this base is a FHIR OperationOutcome, including the 401 you get without a key
and a 429, so a FHIR client only ever has one error shape to parse.
Errors, limits and request ids lists the statuses every service shares.
The uppercase form
/v1/fhir/R4/... redirects to the lowercase base with a 308, which
preserves the method and body so a POST is not quietly turned into a GET.CapabilityStatement. This operation
is declared under rest.operation, beside MedList’s. The formulary’s Basic and
MedicationKnowledge are declared as resources, and its formularies on the InsurancePlan entry,
beside Medical Benefits’ plans.
What is served
One operation, on the service base itself:GET [base]/metadata returns the CapabilityStatement, which lists this operation under
rest.operation and names CARIN’s responder statement in instantiates. The operation accepts
POST only, with Content-Type: application/fhir+json, and it needs an API key (see
Authentication). It takes no parameters: it answers synchronously, and its input
is the message Bundle sent as the body.
Every request is a Bundle of type message whose first entry is a MessageHeader. The
header’s eventCoding says which of two messages it is, from the system
http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type:
Price sources
A request without patient details is asked of every price source your organization may receive, all at once, and the answer holds every price they return. Every price names its source inprocessNote, with when it was read and how it is paid; show the notes with the prices.
Cost Plus Drugs takes no quantity, so its price follows its own published unit price and fees for
the quantity you ask for. A pack that cannot be split is priced only in whole packs, and a
medication sold in a unit other than the one you ask for is not priced. A source that does not
answer within 8 seconds, or answers with an error, is left out and named in a note.
Price a medication without patient details
The request names the product and the quantity in itsClaim, masks the patient and the coverage
with a data-absent-reason of masked, and names a pharmacy in Claim.provider, up to three ZIP
codes in its preferredPharmacyPostalCode extension, or both.
request.json below is the synthetic example from the haau3 FHIR Implementation Guide: 30
lisinopril 5 mg tablets (RxNorm 311354) at pharmacies in ZIP code 33131.
request.json
item, and every price, that one included, as an addItem naming its
pharmacy. These are the prices Cost Plus Drugs answered for this request on 2026-10-20, three of its
twenty pharmacies kept.
The answer with prices
The answer with prices
403 instead, before
its request is read:
Check a member’s cost
The member’s request carries theirPatient, named by an identifier with a system, and their
Coverage, the prescription as a MedicationRequest, its prescriber as a Practitioner named by
an NPI and a family name, and the pharmacy as an Organization named by its NPI or NCPDP provider
id. The member’s insurer needs each of those names, so a request missing one is refused with a 400
that names the element. The Coverage carries the payer’s identifier in payor.identifier: it is
how the member’s insurer is found, so a member’s request without it is refused. For prices without
patient details, send rtpbc-request-non-phi instead.
Send the member’s address in Patient.address, their language in Patient.communication and the
prescription’s dosage in MedicationRequest.dosageInstruction.text when you have them: an insurer
may require them, and this service never makes them up. Two parts of an address you send are filled
in when you leave them out: the country, as the US, and, for an insurer that requires one, a period
that starts on the day of the check. A language or a dosage you leave out goes to an insurer that
requires one as FHIR’s standard way of saying it is not known, never as a guess: the language as
und (BCP 47’s code for undetermined), and a dosage with no text, marked with the
data-absent-reason extension as unknown.
No insurer answers yet. A member’s request is answered no-responder-for-coverage, or, for an
insurer that answers only with the member’s authorization and has not yet opened its production
service, payer-authorization-required without one and payer-authorization-rejected with one.
An insurer may price by NDC only. Send the product’s NDC when you have it. For an RxNorm code, such
an insurer is asked about an NDC haau3’s RxNorm release holds for the code, or for one of its
branded forms when the code holds none, and the answer’s note names that NDC. When the release
holds none, the insurer is not asked and the answer carries ndc-required.
Send the prescription’s days supply, how many days the quantity lasts, in
MedicationRequest.dispenseRequest.expectedSupplyDuration, as a whole number of days with the UCUM
code d. CARIN leaves it optional, and an insurer may require it. A days supply changes the price,
so this service never makes one up: an insurer that requires one is not asked about a request
without one, and the answer carries days-supply-required. When the NDC is missing too, the answer
carries both codes, so one change to the request fixes both.
The member’s insurer
The insurer is found by the payer’s Payer ID, which CARIN’sCoverage profile names
payor.identifier. Type the identifier as one: its type is payerid from
http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType (CARIN Blue Button’s identifier
types), and its value is the payer’s Payer ID. An identifier with another type, or none, finds no
insurer.
The member’s authorization
Some insurers answer only with the member’s own authorization. Your app registers with the insurer, the member signs in with the insurer through your app, and your app sends the access token it receives with each request, in thePayer-Authorization header, beside your API key:
Bearer and the token, as an Authorization header does, at most 4,096
characters. The token is sent to that one insurer, as its Authorization, for that one request.
haau3 never stores, logs or caches it, never asks an insurer for one or refreshes one, and never
sends it to a price source.
- Without the header, a request to an insurer that needs it is answered
payer-authorization-required, and the insurer is not asked. - When the insurer refuses the token, because it has expired, was revoked or was issued for another
insurer, the answer is
payer-authorization-rejected. The member signs in with the insurer again for a new token. - A request without patient details that carries the header is refused: price sources never receive it.
A member's request and today's answer
A member's request and today's answer
request.json
Patient comes back as it was sent, as CARIN requires.Reading the answer
The answer is aBundle of type message. Its MessageHeader answers yours: response.identifier
is your MessageHeader.id, and response.code is ok whenever the request was read. Its one
ClaimResponse carries either prices and coverage in item, or the reason there are none in
error, never both, as CARIN requires. ClaimResponse.request.identifier is your Claim’s
identifier. A member’s answer also carries your Patient, at the same fullUrl.
A member’s answer from their insurer is the insurer’s own ClaimResponse, with its coverage,
costs, restrictions and alternatives as the insurer gave them, inside this service’s message. One
more processNote names the insurer and when it answered, and the NDC it was asked about when haau3
chose one for your RxNorm code.
An answer with prices has ClaimResponse.outcome complete:
itemis the lowest price at a pharmacy near the ZIP codes, or at the pharmacy the request named. When only mail order has a price for a request naming ZIP codes,itemis the mail-order price.itemcannot name a pharmacy in FHIR, so its note does.- Every price, the one in
itemincluded, is also anaddItem, with CARIN’sisAlternativeset and its pharmacy inprovider: anOrganizationin the Bundle, named by its NPI. The list is sorted from the lowest total. A mail-order price names no pharmacy. - Each price’s adjudications are the drug’s price (
cash-price) when the source gives it apart from its fees, each fee as another-costwith its name inreason.text, and thetotal, in USD. - Each
addItemnames its price source inprogramCode, fromhttps://haau3.com/fhir/CodeSystem/pharmacy-benefits-price-source:cost-plus-mail-order,cost-plus-team-cuban-cardorclixrx, each with its name as the display. processNotesays where each price came from and when it was read, which free card pays it, and why a source’s prices are missing.noteNumberonitemand eachaddItempoints to its notes.- Each price repeats your product coding. CARIN requires it to carry a display, so an RxNorm code you send without one is answered with the display haau3’s RxNorm release gives it. Send an NDC’s display with the NDC: nothing in haau3’s data names an NDC.
ClaimResponse.outcome is error and error[0].code carries
a code from https://haau3.com/fhir/CodeSystem/pharmacy-benefits-processing-code, and error[1]
the second when a request lacks two things an insurer requires:
An NCPDP reject code in an answer comes from the source that sent it, unchanged.
What is refused
The whole request is refused with HTTP400 and an OperationOutcome before any source is asked
when it holds:
- a query parameter: the operation takes none;
- a body that is not a
Bundleof typemessage(aParametersresource is refused by name), or a first entry that is not aMessageHeader; - an event other than the two above (issue code
not-supported); - a list over its cap (issue code
too-long): 20 entries, 5focusreferences, 10 codings on a product, 3 ZIP codes, 10 identifiers on a pharmacy, 5 payors and 20 classes on a coverage; - an element the CARIN profiles require that is missing, such as the
MessageHeader.id, theClaim’s one identifier and one item, or a quantity with no unit; - a reference that names no entry in the Bundle, or names one of the wrong type, resolved as FHIR resolves references inside a Bundle;
- a product with no NDC (11 digits, no dashes) or RxNorm code: text alone cannot be priced;
- a ZIP code that is not five digits or ZIP+4;
- in a request without patient details, a patient or coverage that is not masked, or no pharmacy and no ZIP code;
- in a member’s request, no
Coverage, or aCoveragewith nopayor.identifier; - in a member’s request, a days supply that is not a whole number of days greater than 0 with the
UCUM code
d, such as one in weeks or months; - a
Payer-Authorizationthat is notBearerand a token (issue codeinvalid) or is over 4,096 characters (issue codetoo-long), checked before the body is read; - a
Payer-Authorizationwith a request without patient details (issue codebusiness-rule); - malformed content, or a body over 1 MiB (HTTP
413).
OperationOutcome names the element by its FHIRPath in expression, or the header by its
name, and never repeats a value you sent.
Errors
Every error is a FHIROperationOutcome.
The statuses every service shares, among them
401, 405, 406, 415, 429 and 500, are on
Errors, limits and request ids.
This operation is not offered inside a batch Bundle. A batch entry that names it is refused by
name.
Data handling
This operation is stateless. Nothing a request that succeeds carries is stored, cached or logged, apart from a request ID you choose to send, and each check is a point-in-time answer: nothing from an earlier request bears on a later one. When a request fails, or the member’s health plan fails or refuses it, haau3 keeps the failed exchange for a short time, in a separate log only haau3 can read, to find and fix the cause: What the logs hold says what that log holds and for how long. A refusal names the element, never a value. A member’sPayer-Authorization goes to their insurer for that one request and nowhere else, and is never
stored, cached or logged; the log records only whether one was sent. Every answer carries
Cache-Control: no-store, errors included, so no cache between you and the service keeps one.
A member’s request is protected health information. The haau3
terms reserve patient data for services designated to receive
it under an executed agreement, and this operation is one of them. Send a member’s request only
under such an agreement with haau3. The platform project that serves it runs under Google Cloud’s
Business Associate Agreement.
Specification
The contract is the CARIN Consumer Real-Time Pharmacy Benefit Check, STU2 ballot, and the haau3 FHIR Implementation Guide’s Pharmacy Benefits page:- Pharmacy Benefits Processing Code, the code system
- Examples: the request without patient details and its answer with prices, when no source is available to the caller and when no source has a price, and the member’s request and its answer