> ## Documentation Index
> Fetch the complete documentation index at: https://docs.haau3.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example Health Plan

> Pharmacy Benefits in the Sandbox: Example Health Plan, a test insurer, answers the CARIN Consumer Real-Time Pharmacy Benefit Check for synthetic test members, each medication in its formulary table always with the same answer.

[Pharmacy Benefits](https://docs.haau3.com/benefits/pharmacy.md) is not yet open to customers. Try it now in the
[Sandbox](https://docs.haau3.com/sandbox.md), the platform API's test environment at `https://sandbox.haau3.com`, where
**Example Health Plan**, a test insurer, answers the
[CARIN Consumer Real-Time Pharmacy Benefit Check](https://hl7.org/fhir/us/carin-rtpbc/2026May/)
(STU2 ballot, `2.0.0-ballot`) as a payer would, so a client written for a payer runs against it with
only its base URL changed. It answers for a small cast of test members, and each medication in its
formulary table always gets the same answer, so every outcome can be rehearsed on demand: a price
with a copay, an alternative drug, not covered, prior authorization, a quantity limit and two errors.

> [!WARNING]
>
> **Send test members only, never a real person.** Example Health Plan answers only for the test
> members below, whose details are made up. A request for anyone else is answered with the error
> `no-test-member` and nothing more, and a request naming another payer reaches no one. Nothing you
> send is stored, cached or logged. See [Data handling](#data-handling).

Every organization can call it on every plan, with no key or with a test key (see
[the Sandbox](https://docs.haau3.com/sandbox.md)). A test key's requests count toward a minute of their own, at your plan's
number and apart from your production requests, and never toward the plan's month.

The open-source [SDKs](https://docs.haau3.com/sdks.md) for TypeScript, Python and Go call every operation of this service,
and each operation in the [API reference](https://docs.haau3.com/api-reference) has a sample in all three and in cURL.

## Service base

```
https://sandbox.haau3.com/v1/fhir/r4
```

The Sandbox's FHIR base is production's, `https://api.haau3.com/v1/fhir/r4`, on the Sandbox's own
host. It takes [calls with no key](https://docs.haau3.com/sandbox.md#calling-with-no-key) or a test key, and a live key gets
`403` `live-key-in-sandbox`. It answers `application/fhir+json; fhirVersion=4.0`, and every error on
it is a FHIR `OperationOutcome`.

The Sandbox's first address, `https://api.haau3.com/v1/sandbox/fhir/r4`, also answers this check
with a test key. It is deprecated: call the Sandbox's own host instead (see
[the first address](https://docs.haau3.com/sandbox.md#the-first-address)).

## What is served

| Operation | Call |
| - | - |
| `metadata` | `GET [base]/metadata` |
| `$process-message` | `POST [base]/$process-message` |

`metadata` returns the Sandbox's `CapabilityStatement`, which names CARIN's responder statement in
`instantiates` and CARIN's two request messages, the member's request (`rtpbc-request`) and the
request without patient details (`rtpbc-request-non-phi`), as the messages it receives. It also lists
every resource and operation the Sandbox answers; [the Sandbox](https://docs.haau3.com/sandbox.md#what-it-answers) lists the
other services' examples.
`$process-message` takes a member's request and answers it in the same exchange, at the same path
as [Pharmacy Benefits](https://docs.haau3.com/benefits/pharmacy.md) in production. It reads, routes and answers a request
as Pharmacy Benefits does, with two of its checks left out: every organization may call it, and it
needs no business associate agreement and no `HTEST` label, since only its test insurer can answer.
Pharmacy Benefits needs both for a member's request (see [Patient data](https://docs.haau3.com/patient-data.md)), so a
request the Sandbox answers may still be refused there. It accepts `POST` only, with
`Content-Type: application/fhir+json`, and takes no parameters.

## Test members

| Test member | Member ID | Birth date | What every request gets |
| - | - | - | - |
| Yuk Sample | `EX0000001` | 1994-03-08 | The formulary table's answer for the medication |
| Chris Sample | `EX-DECLINED` | 1957-11-02 | The insurer declines the request, whatever the medication |
| Anyone else | for example `EX0000099` | | An error: no test member matched |

Send a test member's member ID in any of the places CARIN carries one:

* `Coverage.subscriberId`;
* the Coverage's `rxid` class, the member ID on a pharmacy benefit card
  (`http://terminology.hl7.org/CodeSystem/coverage-class`);
* a `Patient.identifier` whose `system` is `https://example-health-plan.test/member-id`.

One of them is enough. Names and birth dates are not compared, so a typo never blocks a test. Two
places that name two different test members name no one.

Example Health Plan's Payer ID is `SANDBOX-EHP`, and the examples name the payer by it, in a
`Coverage.payor.identifier` whose `type` is `payerid` from
`http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType`. A member's request is routed by
that Payer ID, as the platform's Pharmacy Benefits finds a member's insurer: `SANDBOX-EHP`, or the
guide's example payer `EXAMPLE-PAYER`, reaches Example Health Plan, and any other Payer ID, or a
payer named without one, is answered `no-responder-for-coverage`, with no one asked.

## Formulary table

| Medication | RxNorm | NDC | Outcome | The answer |
| - | - | - | - | - |
| lisinopril 5 MG Oral Tablet | `311354` | `00093111210` | Priced with a copay | Covered. Copay $10, total $10. |
| atorvastatin 20 MG Oral Tablet | `617310` | `00093505910` | Covered at \$0, with an alternative | Covered. Copay $0, total $0. Alternative: rosuvastatin calcium 10 MG Oral Tablet. Covered. Copay $0, total $0. |
| sofosbuvir 400 MG / velpatasvir 100 MG Oral Tablet \[Epclusa] | `1799218` | `61958220101` | Not covered, with an alternative | Not covered. Eligible amount $0. Alternative: elbasvir 50 MG / grazoprevir 100 MG Oral Tablet [Zepatier]. Prior authorization required and quantity limit applies (28 tablets per month). Copay $405, coinsurance $469, total $874. |
| fluoxetine 10 MG Oral Capsule \[Prozac] | `205535` | `00777310402` | Prior authorization required | Prior authorization required. Copay $40, coinsurance $30, total $70. Alternative: fluoxetine 10 MG Oral Capsule. Covered. Copay $10, total \$10. |
| sumatriptan 50 MG Oral Tablet | `313161` | `00378563159` | Quantity limit | Quantity limit applies (9 tablets per 30 days). Copay $10, total $10. |
| Any other medication | | | Priced with a copay | Covered. Copay $15, total $15. |

A medication is matched by its RxNorm code or its NDC, in the Claim's
`item.productOrService.coding`. The codes and displays are from RxNorm; the two drugs of CARIN's
own examples, Prozac and Zepatier, keep CARIN's amounts. The amounts are fixed whatever the quantity
you ask about.

## What the test data does not cover

Example Health Plan lets you rehearse the shape of a member's answer and each outcome above. It is
not a model of a real plan, and it does not have:

* a deductible, coinsurance tiers, or a running total of what a member has paid this year;
* step therapy, or any restriction beyond the ones in the table;
* prices that differ by pharmacy, network or mail order: the pharmacy you name changes nothing;
* amounts that follow the quantity or the days' supply;
* a price for the request without patient details, which price sources give: it is answered
  `no-price-source`, since the Sandbox connects none;
* a member's own sign-in: you send your platform API key, where a payer takes the member's access
  token.

It enforces CARIN as published and nothing more, so a production payer that requires more may refuse
a request this test insurer accepts.

## Send a request

The member's request is the same message the [Pharmacy Benefits](https://docs.haau3.com/benefits/pharmacy.md) page
documents: a `Bundle` of type `message` whose first entry is a `MessageHeader` with the event
`rtpbc-request`, then the Claim, the member's Patient and Coverage, the prescription
(`MedicationRequest`), its prescriber and the pharmacy. That page's member example answers here as
it is, since its member is Yuk Sample and its payer the guide's `EXAMPLE-PAYER`.

```bash theme={null}
curl -X POST "https://sandbox.haau3.com/v1/fhir/r4/\$process-message" \
  -H "Content-Type: application/fhir+json" \
  --data @request.json
```

That sends no key, which the Sandbox allows at 30 requests an hour from each IP address. With a test
key, add `-H "Authorization: Bearer $HAAU3_API_KEY"` for your plan's requests a minute.

> [accordion] Yuk Sample's request for lisinopril, and the answer
>
> The request, `request.json`:
>
> ```json request.json theme={null}
> {
>   "resourceType": "Bundle",
>   "id": "sandbox-sample-yuk-priced",
>   "meta": {
>     "profile": [
>       "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-bundle|2.0.0-ballot"
>     ],
>     "security": [
>       {
>         "code": "HTEST",
>         "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>         "display": "test health data"
>       }
>     ]
>   },
>   "entry": [
>     {
>       "fullUrl": "https://app.example.test/fhir/MessageHeader/phi-request",
>       "resource": {
>         "resourceType": "MessageHeader",
>         "id": "phi-request",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-messageheader|2.0.0-ballot"
>           ],
>           "security": [
>             {
>               "code": "HTEST",
>               "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>               "display": "test health data"
>             }
>           ]
>         },
>         "source": {
>           "name": "Example app",
>           "endpoint": "https://app.example.test"
>         },
>         "focus": [
>           {
>             "reference": "Claim/phi-claim"
>           }
>         ],
>         "eventCoding": {
>           "code": "rtpbc-request",
>           "system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
>           "display": "RTPBC Request"
>         },
>         "definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-request"
>       }
>     },
>     {
>       "fullUrl": "https://app.example.test/fhir/Claim/phi-claim",
>       "resource": {
>         "resourceType": "Claim",
>         "id": "phi-claim",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-request-claim|2.0.0-ballot"
>           ],
>           "security": [
>             {
>               "code": "HTEST",
>               "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>               "display": "test health data"
>             }
>           ]
>         },
>         "identifier": [
>           {
>             "value": "sandbox-sample-yuk-priced"
>           }
>         ],
>         "patient": {
>           "reference": "Patient/phi-patient"
>         },
>         "provider": {
>           "reference": "Organization/phi-pharmacy"
>         },
>         "prescription": {
>           "reference": "MedicationRequest/phi-prescription"
>         },
>         "careTeam": [
>           {
>             "provider": {
>               "reference": "Practitioner/phi-prescriber"
>             },
>             "sequence": 1
>           }
>         ],
>         "insurance": [
>           {
>             "coverage": {
>               "reference": "Coverage/phi-coverage"
>             },
>             "sequence": 1,
>             "focal": true
>           }
>         ],
>         "item": [
>           {
>             "careTeamSequence": [
>               1
>             ],
>             "productOrService": {
>               "coding": [
>                 {
>                   "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
>                   "code": "311354",
>                   "display": "lisinopril 5 MG Oral Tablet"
>                 }
>               ]
>             },
>             "quantity": {
>               "value": 30,
>               "unit": "{Each}",
>               "system": "http://unitsofmeasure.org",
>               "code": "{Each}"
>             },
>             "sequence": 1
>           }
>         ],
>         "status": "active",
>         "type": {
>           "coding": [
>             {
>               "code": "pharmacy",
>               "system": "http://terminology.hl7.org/CodeSystem/claim-type",
>               "display": "Pharmacy"
>             }
>           ]
>         },
>         "use": "predetermination",
>         "created": "2026-10-20T14:00:00Z",
>         "priority": {
>           "coding": [
>             {
>               "code": "normal",
>               "system": "http://terminology.hl7.org/CodeSystem/processpriority",
>               "display": "Normal"
>             }
>           ]
>         }
>       }
>     },
>     {
>       "fullUrl": "https://app.example.test/fhir/Patient/phi-patient",
>       "resource": {
>         "resourceType": "Patient",
>         "id": "phi-patient",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-patient|2.0.0-ballot"
>           ],
>           "security": [
>             {
>               "code": "HTEST",
>               "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>               "display": "test health data"
>             }
>           ]
>         },
>         "identifier": [
>           {
>             "system": "https://app.example.test/patients",
>             "value": "example-0001"
>           },
>           {
>             "system": "https://example-health-plan.test/member-id",
>             "value": "EX0000001"
>           }
>         ],
>         "name": [
>           {
>             "given": [
>               "Yuk"
>             ],
>             "family": "Sample"
>           }
>         ],
>         "gender": "female",
>         "birthDate": "1994-03-08"
>       }
>     },
>     {
>       "fullUrl": "https://app.example.test/fhir/Coverage/phi-coverage",
>       "resource": {
>         "resourceType": "Coverage",
>         "id": "phi-coverage",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-coverage|2.0.0-ballot"
>           ],
>           "security": [
>             {
>               "code": "HTEST",
>               "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>               "display": "test health data"
>             }
>           ]
>         },
>         "beneficiary": {
>           "reference": "Patient/phi-patient"
>         },
>         "payor": [
>           {
>             "identifier": {
>               "type": {
>                 "coding": [
>                   {
>                     "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType",
>                     "code": "payerid"
>                   }
>                 ]
>               },
>               "system": "https://payers.example.test",
>               "value": "SANDBOX-EHP"
>             },
>             "display": "Example Health Plan"
>           }
>         ],
>         "class": [
>           {
>             "type": {
>               "coding": [
>                 {
>                   "code": "rxbin",
>                   "system": "http://terminology.hl7.org/CodeSystem/coverage-class"
>                 }
>               ]
>             },
>             "value": "000000"
>           },
>           {
>             "type": {
>               "coding": [
>                 {
>                   "code": "rxpcn",
>                   "system": "http://terminology.hl7.org/CodeSystem/coverage-class"
>                 }
>               ]
>             },
>             "value": "EXAMPLE"
>           },
>           {
>             "type": {
>               "coding": [
>                 {
>                   "code": "rxgroup",
>                   "system": "http://terminology.hl7.org/CodeSystem/coverage-class"
>                 }
>               ]
>             },
>             "value": "EXGROUP01"
>           },
>           {
>             "type": {
>               "coding": [
>                 {
>                   "code": "rxid",
>                   "system": "http://terminology.hl7.org/CodeSystem/coverage-class"
>                 }
>               ]
>             },
>             "value": "EX0000001"
>           }
>         ],
>         "status": "active",
>         "subscriberId": "EX0000001",
>         "relationship": {
>           "coding": [
>             {
>               "code": "self",
>               "system": "http://terminology.hl7.org/CodeSystem/subscriber-relationship"
>             }
>           ]
>         }
>       }
>     },
>     {
>       "fullUrl": "https://app.example.test/fhir/MedicationRequest/phi-prescription",
>       "resource": {
>         "resourceType": "MedicationRequest",
>         "id": "phi-prescription",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-medicationrequest|2.0.0-ballot"
>           ],
>           "security": [
>             {
>               "code": "HTEST",
>               "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>               "display": "test health data"
>             }
>           ]
>         },
>         "medicationCodeableConcept": {
>           "coding": [
>             {
>               "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
>               "code": "311354",
>               "display": "lisinopril 5 MG Oral Tablet"
>             }
>           ]
>         },
>         "subject": {
>           "reference": "Patient/phi-patient"
>         },
>         "requester": {
>           "reference": "Practitioner/phi-prescriber"
>         },
>         "dispenseRequest": {
>           "quantity": {
>             "value": 30,
>             "unit": "{Each}",
>             "system": "http://unitsofmeasure.org",
>             "code": "{Each}"
>           },
>           "expectedSupplyDuration": {
>             "value": 30,
>             "unit": "days",
>             "system": "http://unitsofmeasure.org",
>             "code": "d"
>           },
>           "performer": {
>             "reference": "Organization/phi-pharmacy"
>           }
>         },
>         "substitution": {
>           "allowedBoolean": true
>         },
>         "status": "draft",
>         "intent": "proposal",
>         "authoredOn": "2026-10-20"
>       }
>     },
>     {
>       "fullUrl": "https://app.example.test/fhir/Practitioner/phi-prescriber",
>       "resource": {
>         "resourceType": "Practitioner",
>         "id": "phi-prescriber",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner|8.0.1"
>           ],
>           "security": [
>             {
>               "code": "HTEST",
>               "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>               "display": "test health data"
>             }
>           ]
>         },
>         "identifier": [
>           {
>             "system": "http://hl7.org/fhir/sid/us-npi",
>             "value": "2900000011"
>           }
>         ],
>         "name": [
>           {
>             "given": [
>               "Jordan"
>             ],
>             "prefix": [
>               "Dr."
>             ],
>             "text": "Jordan Example",
>             "family": "Example"
>           }
>         ]
>       }
>     },
>     {
>       "fullUrl": "https://app.example.test/fhir/Organization/phi-pharmacy",
>       "resource": {
>         "resourceType": "Organization",
>         "id": "phi-pharmacy",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-pharmacy-organization|2.0.0-ballot"
>           ],
>           "security": [
>             {
>               "code": "HTEST",
>               "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>               "display": "test health data"
>             }
>           ]
>         },
>         "identifier": [
>           {
>             "system": "http://hl7.org/fhir/sid/us-npi",
>             "value": "2900000003"
>           }
>         ],
>         "type": [
>           {
>             "coding": [
>               {
>                 "code": "R",
>                 "system": "http://terminology.hl7.org/CodeSystem/NCPDPPharmacyType",
>                 "display": "Retail"
>               }
>             ]
>           }
>         ],
>         "telecom": [
>           {
>             "system": "phone",
>             "value": "305-555-0100"
>           }
>         ],
>         "address": [
>           {
>             "line": [
>               "100 Example Street"
>             ],
>             "city": "Miami",
>             "state": "FL",
>             "postalCode": "33131",
>             "country": "US"
>           }
>         ],
>         "active": true,
>         "name": "Example Pharmacy"
>       }
>     }
>   ],
>   "type": "message",
>   "timestamp": "2026-10-20T14:00:00Z"
> }
> ```
>
> The answer:
>
> ```json answer.json theme={null}
> {
>   "resourceType": "Bundle",
>   "meta": {
>     "profile": [
>       "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-bundle|2.0.0-ballot"
>     ]
>   },
>   "type": "message",
>   "timestamp": "2026-10-27T12:00:00Z",
>   "entry": [
>     {
>       "fullUrl": "urn:uuid:5a4db0c5-0001-4000-8000-000000000001",
>       "resource": {
>         "resourceType": "MessageHeader",
>         "id": "5a4db0c5-0001-4000-8000-000000000001",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-messageheader|2.0.0-ballot"
>           ]
>         },
>         "eventCoding": {
>           "system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-event-type",
>           "code": "rtpbc-response",
>           "display": "RTPBC Response"
>         },
>         "source": {
>           "name": "haau3 Sandbox",
>           "endpoint": "https://sandbox.haau3.com/v1/fhir/r4"
>         },
>         "response": {
>           "identifier": "phi-request",
>           "code": "ok"
>         },
>         "focus": [
>           {
>             "reference": "urn:uuid:5a4db0c5-0001-4000-8000-000000000002"
>           }
>         ],
>         "definition": "http://hl7.org/fhir/us/carin-rtpbc/MessageDefinition/rtpbc-response"
>       }
>     },
>     {
>       "fullUrl": "urn:uuid:5a4db0c5-0001-4000-8000-000000000002",
>       "resource": {
>         "resourceType": "ClaimResponse",
>         "id": "5a4db0c5-0001-4000-8000-000000000002",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-response-claimresponse|2.0.0-ballot"
>           ]
>         },
>         "identifier": [
>           {
>             "value": "5a4db0c5-0001-4000-8000-000000000002"
>           }
>         ],
>         "status": "active",
>         "type": {
>           "coding": [
>             {
>               "system": "http://terminology.hl7.org/CodeSystem/claim-type",
>               "code": "pharmacy",
>               "display": "Pharmacy"
>             }
>           ]
>         },
>         "use": "predetermination",
>         "patient": {
>           "reference": "https://app.example.test/fhir/Patient/phi-patient"
>         },
>         "created": "2026-10-27T12:00:00Z",
>         "insurer": {
>           "identifier": {
>             "type": {
>               "coding": [
>                 {
>                   "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType",
>                   "code": "payerid"
>                 }
>               ]
>             },
>             "system": "https://payers.example.test",
>             "value": "SANDBOX-EHP"
>           },
>           "display": "Example Health Plan"
>         },
>         "request": {
>           "identifier": {
>             "value": "sandbox-sample-yuk-priced"
>           }
>         },
>         "outcome": "complete",
>         "disposition": "Processed. A synthetic answer from Example Health Plan, haau3's test insurer.",
>         "item": [
>           {
>             "extension": [
>               {
>                 "url": "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-benefitRestriction",
>                 "valueCoding": {
>                   "system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-benefit-restriction-temporary",
>                   "code": "covered",
>                   "display": "Covered"
>                 }
>               }
>             ],
>             "itemSequence": 1,
>             "adjudication": [
>               {
>                 "category": {
>                   "coding": [
>                     {
>                       "system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-patient-pay-type-temporary",
>                       "code": "copay",
>                       "display": "Copay"
>                     }
>                   ]
>                 },
>                 "amount": {
>                   "value": 10,
>                   "currency": "USD"
>                 }
>               },
>               {
>                 "category": {
>                   "coding": [
>                     {
>                       "system": "http://hl7.org/fhir/us/carin-rtpbc/CodeSystem/rtpbc-patient-pay-type-temporary",
>                       "code": "total",
>                       "display": "Total patient responsibility"
>                     }
>                   ]
>                 },
>                 "amount": {
>                   "value": 10,
>                   "currency": "USD"
>                 }
>               }
>             ]
>           }
>         ],
>         "processNote": [
>           {
>             "number": 1,
>             "text": "Synthetic answer from Example Health Plan, haau3's test insurer, for test member Yuk Sample: formulary row \"Priced with a copay\". Not a real price or benefit."
>           },
>           {
>             "number": 2,
>             "text": "The answer of Example Health Plan, the member's insurer, given at 2026-10-27T12:00:00Z."
>           }
>         ]
>       }
>     },
>     {
>       "fullUrl": "https://app.example.test/fhir/Patient/phi-patient",
>       "resource": {
>         "resourceType": "Patient",
>         "id": "phi-patient",
>         "meta": {
>           "profile": [
>             "http://hl7.org/fhir/us/carin-rtpbc/StructureDefinition/rtpbc-patient|2.0.0-ballot"
>           ],
>           "security": [
>             {
>               "code": "HTEST",
>               "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason",
>               "display": "test health data"
>             }
>           ]
>         },
>         "identifier": [
>           {
>             "system": "https://app.example.test/patients",
>             "value": "example-0001"
>           },
>           {
>             "system": "https://example-health-plan.test/member-id",
>             "value": "EX0000001"
>           }
>         ],
>         "name": [
>           {
>             "given": [
>               "Yuk"
>             ],
>             "family": "Sample"
>           }
>         ],
>         "gender": "female",
>         "birthDate": "1994-03-08"
>       }
>     }
>   ]
> }
> ```

To try every outcome, change the member ID, or the medication's coding in both the Claim and the
`MedicationRequest`, to another row of the tables above.

## Reading the answer

The answer is a `Bundle` of type `message`: a `MessageHeader` answering yours, one `ClaimResponse`,
and your Patient as you sent it. The examples label every resource `HTEST`
(`http://terminology.hl7.org/CodeSystem/v3-ActReason`), so their answers' Patient keeps the label
and a copy you keep stays marked as test data. Example Health Plan's `ClaimResponse` names the
insurer by its Payer ID, `SANDBOX-EHP`, and carries either an answer in `item` or an error in
`error`, never both.

* **`item`** is the medication you asked about. Its restriction is the
  `rtpbc-benefitRestriction` extension (`covered`, `prior-auth`, `quantity-limit` or `not-covered`),
  and what the member pays is in `adjudication`, each amount coded by CARIN's pay type (`copay`,
  `coinsurance`, `eligible` or `total`).
* **`addItem`** is an alternative drug, where the row has one: marked `rtpbc-isAlternative`, with
  its own restrictions and amounts and the quantity you asked about.
* **`processNote`** always starts with one note saying the answer is synthetic, which test member
  it is for and which row answered. A limit's words, such as `Quantity limit: 9 tablets per 30
  days`, are a further note that the item points to with `noteNumber`. The last note names Example
  Health Plan and when it answered, as Pharmacy Benefits names a member's insurer.
* **`error`** carries one code from `https://haau3.com/fhir/CodeSystem/sandbox-error`:
  `no-test-member` (no test member matched) or `insurer-declined` (the insurer declined the
  request), with `outcome` `error`.

A request no one could be asked about carries Pharmacy Benefits' own code instead, from
`https://haau3.com/fhir/CodeSystem/pharmacy-benefits-processing-code`, with `outcome` `error`:
`no-responder-for-coverage` for a member's request naming another payer, and `no-price-source` for
the request without patient details (`rtpbc-request-non-phi`), since the Sandbox connects no price
source.

## What is refused

A request is read by the same rules as Pharmacy Benefits', so a request this base reads, the
platform's FHIR base reads too, though production also needs an agreement or `HTEST` labels for a
member's request (above). A request it refuses is answered `400` with an `OperationOutcome`
that names the element by its FHIRPath, never a value you sent: a body that is not a `message`
Bundle, an event other than the two above, a list over its cap, an element the CARIN profiles
require that is missing, a reference that names no entry in the Bundle, a product with no NDC or
RxNorm code, or a member's request with no Coverage or no payer identifier.

It takes Pharmacy Benefits' `Payer-Authorization` header too. Example Health Plan needs no
member's authorization, so the header is sent nowhere, but it is checked as Pharmacy Benefits
checks it: one that is not `Bearer` and a token is refused `400`, and so is one sent with the
request without patient details.

## Errors

| Status | Meaning |
| - | - |
| `200` with `no-test-member` | The request named no test member. Nothing was priced. |
| `200` with `insurer-declined` | The request was for a test member whose every request the insurer declines. |
| `200` with `no-responder-for-coverage` | The request named a payer other than `SANDBOX-EHP` or `EXAMPLE-PAYER`, or a payer with no Payer ID. No one was asked. |
| `200` with `no-price-source` | The request had no patient details. No price source is connected. |
| `400` | The request was refused, as listed above. The outcome names the element. |
| `413` | A body over 1 MiB. The outcome's issue code is `too-long`. |

The statuses every service shares, among them `401`, `405`, `406`, `415`, `429` and `500`, are on
[Errors, limits and request ids](https://docs.haau3.com/errors.md).

## Data handling

Example Health Plan answers with synthetic data, for its test members only, and is not an operation
for patient data. It is stateless all the same: nothing a request carries is stored, cached or
logged, apart from a request ID you choose to send. The log records whether the request was
answered and what became of it, as counts and fixed words, never a member or a medication, and
every answer of `$process-message` carries `Cache-Control: no-store`.
See [Patient data](https://docs.haau3.com/patient-data.md).

## Specification

* [CARIN Consumer Real-Time Pharmacy Benefit Check, STU2 ballot](https://hl7.org/fhir/us/carin-rtpbc/2026May/),
  whose responder statement Example Health Plan's `CapabilityStatement` instantiates.
* [The Sandbox's error codes](https://fhir.haau3.com/CodeSystem-sandbox-error.html), in haau3's
  FHIR Implementation Guide.
* The operation in the [API reference](https://docs.haau3.com/api-reference).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.