Advanced scenarios

These scenarios are for teams that have passed the minimum scenarios. None is required. Each has the same parts as a minimum scenario, the ground rules apply except that responses can be any size, and runs are recorded the same way (Recording results).

Larger data scenarios

These test that a large response arrives intact, from the wallet through the browser to the Verifier.

Anything in US Core

A request for anything in US Core, answered with whatever resource types the wallet holds.

Request: uscdi.json asks for anything in the patient's record that conforms to US Core.

Step for the person using the wallet: Share the patient's US Core records.

Checks, besides the spec's own: “Your health record” is fulfilled or partial (the step was done).

Pass for the wallet: The wallet lets the patient choose what to include.

Pass for the Verifier: The Verifier shows every returned resource, whatever the resource types.

How to run it:

Spec: §5.4

Large response

A patient with years of history, to test that a response over 1 MB arrives intact.

Request: uscdi.json, the same request as any-us-core, asks for anything in the patient's record that conforms to US Core.

Step for the person using the wallet: Answer as a patient with a large record, and share at least 1 MB of it.

Checks, besides the spec's own: The response is at least 1 MB (the step was done).

Pass for the Verifier: The Verifier shows the whole record.

How to run it:

Also: On Android, the wallet returns the response with the three-argument setGetCredentialResponse, which passes it to the browser as a file (Platform notes). Record the browser, phone, and wallet version.

Spec: §5.4

Optional scenarios

These exercise parts of the spec that the minimum scenarios leave out: forms and selectors beyond the basics, SMART Health Cards, other ways of reaching the check-in page, and a patient who declines every item. Some need a feature that few wallets have yet, such as answering two items with one record (shared-artifact), which the SMART Testing Wallet can do on request.

Decline every item

The person reviews the request and declines every item, and the wallet still answers, with every item declined, rather than cancelling.

Request: records.json, the same request as share-records, asks for demographics, problems, allergies, medications, immunizations, and the insurance card.

Step for the person using the wallet: Decline every item.

Checks, besides the spec's own: Every item is declined (HOLD-4).

Pass for the Verifier: The Verifier shows every item as declined, as share-records describes, and the patient can go on with the check-in without the wallet.

How to run it:

Spec: §5.7, §6.2

Form by reference only

The wallet fetches a form that the request names by its URL only, with no copy inline.

Request: form-by-reference.json asks for the answers to the GAD-7 form, named by its URL only.

Step for the person using the wallet: Fill in the form and share it. A wallet that can't fetch or show the form reports the item unsupported or error instead (FORM-4).

Checks, besides the spec's own: “Questions about worry and anxiety” is fulfilled, unsupported or error (the step was done).

Pass for the wallet: The wallet renders the fetched form, or reports the item unsupported or error rather than inventing a form.

Pass for the Verifier: The Verifier shows the answers, or the item's status when there are none.

How to run it:

Spec: §5.4.2

Versioned form canonical

The request names the form with a version suffix (|1), and the QuestionnaireResponse echoes that versioned name exactly.

Request: form-versioned.json asks for the answers to the PHQ-2 form, named with a version suffix and sent inline.

Step for the person using the wallet: Fill in the form and share it.

Checks, besides the spec's own: “Two questions about your mood” is fulfilled (the step was done).

Pass for the Verifier: The Verifier shows the answers.

How to run it:

Spec: §5.5

Physician-authored form

The wallet renders a physician-authored form with conditional items and typed answers.

Request: form-semaglutide.json asks for the answers to a physician-authored semaglutide check-in form, sent inline.

Step for the person using the wallet: Fill in the form and share it.

Checks, besides the spec's own: “How your new medicine is going” is fulfilled (the step was done).

Pass for the wallet: The wallet renders every item type, shows conditional items only when their conditions are met, and accepts typed answers on the pen question.

Pass for the Verifier: The Verifier shows every answer, including typed pen-trouble answers.

How to run it:

Spec: §5.4.2

Narrowed profile family

A selector that takes any US Core profile but narrows it to Observation, for recent labs and vitals.

Request: observations.json asks for recent lab results and vital signs, as US Core Observations.

Step for the person using the wallet: Share the patient's recent lab results and vital signs.

Checks, besides the spec's own: “Recent lab results and vitals” is fulfilled or partial (the step was done).

Pass for the wallet: The wallet matches only Observations to this item, since resourceTypes narrows the profile family (SEL-3).

Pass for the Verifier: The Verifier shows the Observations.

How to run it:

Spec: §5.4.1

No selector

An item with no selector at all: the patient shares whatever they think is relevant.

Request: no-selector.json asks for anything the patient thinks is relevant, with no selector.

Pass for the wallet: The wallet lets the patient choose.

Pass for the Verifier: The Verifier displays whatever arrives.

How to run it:

Spec: §5.4.1

SMART Health Card

The wallet answers an immunizations item with a SMART Health Card, which the request prefers over FHIR JSON.

Request: health-card.json asks for immunizations, preferably as a SMART Health Card.

Step for the person using the wallet: Share the immunizations as a SMART Health Card.

Checks, besides the spec's own: “Immunization record” comes as application/smart-health-card (the step was done).

Pass for the Verifier: The Verifier verifies the card's signature and shows its contents.

How to run it:

Spec: §5.6

Insurance card as a SMART Health Card

The request prefers a SMART Health Card for the insurance card, so a wallet that holds one sends it, and the Verifier verifies it.

Request: insurance-card.json asks for the insurance card, preferably as a SMART Health Card.

Step for the person using the wallet: Share the insurance card as a SMART Health Card.

Checks, besides the spec's own: “Insurance card” comes as application/smart-health-card (the step was done). “Insurance card” includes a Coverage record (the step was done).

Pass for the Verifier: The Verifier verifies the card's signature and shows the member, payer, and plan.

How to run it:

Spec: §5.6

One artifact for two items

One Bundle answers two items, and its fulfills lists both.

Request: records.json, the same request as share-records, asks for demographics, problems, allergies, medications, immunizations, and the insurance card.

Step for the person using the wallet: Answer Allergies and Medications with one shared Bundle. Most wallets can't be asked to do this.

Checks, besides the spec's own: One record answers “Allergies” and “Medications” (the step was done).

Pass for the Verifier: The Verifier attributes the resources to both items without counting them twice.

How to run it:

Spec: §6.3

Cross-device

A desktop browser shows a QR code, and the wallet on a phone answers it.

Request: records.json, the same request as share-records, asks for demographics, problems, allergies, medications, immunizations, and the insurance card.

Step for the person using the wallet: Scan the QR code the desktop browser shows with the phone, and share whatever the wallet offers.

Pass for the Verifier: The response arrives in the desktop page.

How to run it:

Spec: §8

In-person handoff

A front-desk QR code or kiosk lands the patient's phone on the Verifier's check-in page.

Request: records.json, the same request as share-records, asks for demographics, problems, allergies, medications, immunizations, and the insurance card.

Step for the person using the wallet: Open the check-in page on the phone from the front-desk QR code or kiosk, then share whatever the wallet offers.

Pass for the Verifier: The Verifier shows each item's status and data, as in share-records, and the handoff.

How to run it:

Spec: §1.3

Prefilled form

The wallet prefills form answers from the patient's records and lets the patient edit them.

Request: form-semaglutide.json, the same request as physician-form, asks for the answers to a physician-authored semaglutide check-in form, sent inline.

Step for the person using the wallet: Check the prefilled answers, change any that are wrong, fill in the rest, and share the form.

Checks, besides the spec's own: “How your new medicine is going” is fulfilled (the step was done).

Pass for the wallet: Prefilled answers are visible to the patient before sending.

Pass for the Verifier: The Verifier shows the answers.

How to run it:

Spec: §5.4.2

Write back

The Verifier files returned data and answers into the chart after staff review.

Request: records.json, the same request as share-records, asks for demographics, problems, allergies, medications, immunizations, and the insurance card.

Pass for the Verifier: Staff can accept or reject each item.

How to run it:

Spec: §1.4

Unknown selector

The wallet answers an item whose selector kind it doesn't know as unsupported, and still answers the rest.

Request: unknown-selector.json asks for demographics, and one item with a selector kind no wallet knows.

Step for the person using the wallet: Share Demographics.

Checks, besides the spec's own: “A test item your app won't recognize” is unsupported (SEL-9). “Demographics” is fulfilled (the step was done).

Pass for the Verifier: The Verifier shows the unknown item as unsupported and the demographics normally.

How to run it:

Spec: §5.4.3

Example questionnaires

There is no single intake form for this event. These forms give Verifiers something realistic to send and wallets something realistic to render. Each is hosted as a FHIR Questionnaire whose url is its address, so a wallet can also fetch it by reference (§5.4.2).

Form Kind Used in
PHQ-2 depression screen, 2 questions Standard screening instrument fill-form, versioned-canonical
GAD-7 anxiety screen, 7 questions Standard screening instrument form-by-reference
Semaglutide 4-week check-in, 13 questions Written by a physician for patients starting this one medication physician-form, prefilled-form

The semaglutide form asks only what the patient's record can't answer: how the weekly shots are going, missed doses, pen problems, nausea and other side effects, warning symptoms, and readiness to step up the dose. It uses integer, yes/no, single-choice, check-all-that-apply, and free-text items. One question accepts both checked options and the patient's own words. Two items appear only when an earlier answer calls for them. No item is required.

Testing EHR and Testing Wallet

Beyond running a scenario, both test tools can send and answer things of your choosing.