smart-health-checkin

checkin-client

Ask the patient's health app for what your visit needs, and get a verified answer back in your own page — then do whatever your workflow does next. The Digital Credentials API plumbing (CBOR, COSE, HPKE) stays inside the kit; you write one await.

It implements SMART Health Check-in 1.0. You can try the whole flow in your browser right now (no phone or wallet app required), or head to the docs to install it.

How a check-in runs

your page asks wallet answers a check-in request patient consents per item await → you have the data, in your own code prefill your forms · write FHIR · take payment · ask follow-ups · route the patient …whatever your workflow needs, whenever it needs it — you never left your page.
Two steps, then you're back in your own code with the response in hand. Everything after that — prefilling forms, writing FHIR, payment, next screens — is ordinary application logic, in whatever order you want.

Try the demo

The demo is a fictional clinic's check-in page running the real protocol stack. Pick a scenario from the demo bar (insurance card, new-patient summary, day-of PHQ-2, allergy review, med list), press Check in with your health app, and watch the response come back, get verified, and post to a public test FHIR server. Every technical artifact — the SMART request, the wallet's response, the FHIR transaction, the server's reply — is one click away in the Developer detail section.

Quick start for EHRs and portals

The kit does exactly one thing: hand your code a validated response, on your page. Everything after that is yours. The URLs below point at this deployment's hosted builds, so the snippets work as-is for experimentation; vendor a pinned copy for anything real.

1. Ask, await, prefill. Define the request inline (the kit fills in protocol boilerplate), await the patient's validated response, and populate your own form — no submission, your code stays in control:

<script type="module">
  import { requestCheckin }
    from "";

  const response = await requestCheckin({
    purpose: "Review your allergy list before your visit",
    items: [{
      id: "allergies",
      title: "Allergies and intolerances",
      content: {
        kind: "selection.fhir",
        profiles: ["http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance"],
      },
      accept: ["application/fhir+json"],
    }],
  });
  // response.artifacts → prefill your intake form inline
</script>

2. Then do whatever your workflow needs. The kit stops at the response — it has no notion of a FHIR server, your auth, or your next screen. Writing records is ordinary code you already own; an optional helper is there if you want the mapping done for you:

import { buildCheckinBundle, postCheckinBundle }
  from "";

const bundle = buildCheckinBundle({ request, response,
  context: { patient: "Patient/123", appointment: "Appointment/456" } });

await postCheckinBundle(bundle, { fhirBase: myFhirBase });   // or use your own client
location.assign("/checkin/payment");

Keeping submission out of the kit is deliberate: where patient-supplied data lands, under whose authorization, with what review, is deployment policy — not something a protocol library should decide for you.

The full walkthrough — attributes, events, the JS API, auth wiring, and the production checklist — is in the integration guide.

Status

Working draft. Request construction, SessionTranscript, HPKE, and COSE signature verification are implemented and byte-verified against real Chrome/Android captures in the conformance fixtures, and the demo runs end-to-end against a public test FHIR server today. Still open: a server-owned key-custody reference, production trust anchors, and iOS/Safari support for the underlying browser API.