FHIR Platform
Developer Documentation
ONC (g)(10) · SMART on FHIR

Developer Documentation

Everything you need to connect to our FHIR R4 API: conformance and discovery, SMART App Launch 2.0 (standalone, EHR and backend services), scopes, client registration, and FHIR Bulk Data. This documentation supports our ONC Health IT Certification §170.315(g)(10) readiness and the HL7 Inferno test kit.

FHIR R4
4.0.1
US Core
6.1.0 (USCDI v3)
SMART App Launch
2.0.0
Bulk Data
2.0.0
OIDC
id_token + fhirUser
PKCE
S256 required

Service base URLs

All endpoints are multi-tenant and prefixed with the sandbox (tenant) id. The public certification sandbox is cert.

FHIR R4 base
https://fhirservices.ehiconnect.com/api/fhir/cert
Capability statement
https://fhirservices.ehiconnect.com/api/fhir/cert/metadata
SMART discovery
https://fhirservices.ehiconnect.com/api/fhir/cert/.well-known/smart-configuration
OpenID configuration
https://fhirservices.ehiconnect.com/api/oauth/cert/.well-known/openid-configuration
JWKS (server keys)
https://fhirservices.ehiconnect.com/api/oauth/cert/.well-known/jwks.json
Authorize
https://fhirservices.ehiconnect.com/api/oauth/cert/authorize
Token
https://fhirservices.ehiconnect.com/api/oauth/cert/token
Introspect (RFC 7662)
https://fhirservices.ehiconnect.com/api/oauth/cert/introspect
Revoke (RFC 7009)
https://fhirservices.ehiconnect.com/api/oauth/cert/revoke

Available practice endpoints

Each practice on the platform is served from its own multi-tenant FHIR R4 service base URL. Browse the directory below, or download the full set as a FHIR Endpoint resource bundle.

Conformance & discovery

Start from the well-known SMART configuration and the FHIR capability statement.

SMART configuration
curl https://fhirservices.ehiconnect.com/api/fhir/cert/.well-known/smart-configuration
Capability statement
curl https://fhirservices.ehiconnect.com/api/fhir/cert/metadata -H "Authorization: Bearer $TOKEN"

The discovery document advertises authorize/token/introspect/revoke endpoints, code_challenge_methods_supported: ["S256"], token endpoint auth methods (client_secret_basic, client_secret_post, private_key_jwt), and capabilities including launch-standalone, launch-ehr, client-public, client-confidential-symmetric, client-confidential-asymmetric, context-ehr-patient, context-ehr-encounter, permission-v1, permission-v2, authorize-post and sso-openid-connect.

SMART App Launch 2.0

Standalone launch (patient or provider app)

  1. Fetch .well-known/smart-configuration for the authorize & token URLs.
  2. Redirect the browser to /authorize with response_type=code, your client_id, a registered redirect_uri, scope, state, aud=https://fhirservices.ehiconnect.com/api/fhir/cert, and PKCE (code_challenge + code_challenge_method=S256).
  3. The user approves on the consent screen (where they can narrow the requested scopes).
  4. Exchange the returned code at /token with your code_verifier.
Authorize (browser redirect)
https://fhirservices.ehiconnect.com/api/oauth/cert/authorize?response_type=code
  &client_id=YOUR_CLIENT_ID
  &redirect_uri=https://app.example/callback
  &scope=launch/patient%20openid%20fhirUser%20offline_access%20patient/*.rs
  &state=abc123
  &aud=https://fhirservices.ehiconnect.com/api/fhir/cert
  &code_challenge=BASE64URL_SHA256
  &code_challenge_method=S256
Token (confidential symmetric — client_secret_basic)
curl -X POST https://fhirservices.ehiconnect.com/api/oauth/cert/token \
  -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
  -d grant_type=authorization_code \
  -d code=AUTH_CODE \
  -d redirect_uri=https://app.example/callback \
  -d code_verifier=YOUR_VERIFIER

The token response includes access_token, patient (when a patient context was granted), id_token (with an absolute fhirUser URL), refresh_token (when offline_access is granted) and the granted scope.

EHR launch

For an EHR launch the EHR opens your registered launch URL with iss (the FHIR base) and a one-time launch token. Your app then runs the standalone steps above, adding launch to the authorize request and the launch scope. The resulting token carries the patient and encounter context.

Introspection & revocation

Introspect a token (RFC 7662)
curl -X POST https://fhirservices.ehiconnect.com/api/oauth/cert/introspect -d token=ACCESS_TOKEN
Revoke (RFC 7009 — invalidates the whole grant family)
curl -X POST https://fhirservices.ehiconnect.com/api/oauth/cert/revoke -d token=ACCESS_OR_REFRESH_TOKEN

Scopes

We support SMART v2 (.rs / .cruds) and v1 (.read / .write) scopes, plus granular resource scopes. The consent screen lets the user grant a subset (down-scoping).

Launch / identity
launch, launch/patient, openid, fhirUser, offline_access
Patient (v2)
patient/Patient.rs, patient/Observation.rs, patient/*.rs
User (v2)
user/Encounter.rs, user/*.rs
System (bulk)
system/*.rs
SMART v1
patient/Condition.read, user/*.read
Granular
patient/Observation.rs?category=laboratory

Client registration

Four client types are supported. To register, contact your platform administrator with your client type, redirect_uri(s), launch URL (EHR apps) and, for asymmetric/backend clients, your JWKS URL. Confidential symmetric clients receive a client secret.

Public (SMART, PKCE)
Browser / native apps. No secret. Standalone launch with authorization code + PKCE (S256).
Confidential symmetric
Server-side apps. Authenticates at the token endpoint with client_secret_basic or client_secret_post.
Confidential asymmetric
Authenticates with private_key_jwt (RFC 7523). You publish a JWKS URL (RS384/ES384); we fetch keys by kid.
Backend services (bulk)
System-to-system. client_credentials + private_key_jwt via your JWKS URL; system/*.rs scopes.

Asymmetric and backend clients authenticate with a signed client_assertion (client_assertion_type= urn:ietf:params:oauth:client-assertion-type:jwt-bearer) whose audis the token endpoint. We resolve your public key from your JWKS URL by kid.

Bulk Data (Backend Services)

Group-level export is asynchronous and scoped to the group's patient members plus their referenced provider/facility resources. Authenticate as a backend-services client to get a system/*.rs token, then kick off the export.

1 — Backend token (client_credentials + private_key_jwt)
curl -X POST https://fhirservices.ehiconnect.com/api/oauth/cert/token \
  -d grant_type=client_credentials \
  -d scope=system/*.rs \
  -d client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer \
  -d client_assertion=SIGNED_JWT
2 — Kick off a Group export (202 + Content-Location)
curl -i "https://fhirservices.ehiconnect.com/api/fhir/cert/Group/cert-group/\$export?_type=Patient,Observation&_outputFormat=application/fhir+ndjson" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Prefer: respond-async"
3 — Poll status, then download the NDJSON files
curl "$CONTENT_LOCATION" -H "Authorization: Bearer $TOKEN"
# -> manifest.output[].url, each an application/fhir+ndjson file

Supports _type, _since and _outputFormat. The manifest sets requiresAccessToken: true.

US Core data

Each sandbox is seeded with Must-Support–complete US Core 6.1.0 data. The public certification sandbox contains two golden patients and a population group:

Patient A
Patient/usc-golden
Patient B
Patient/usc2-golden
Population group
Group/cert-group

Required US Core search parameters and combinations are supported (e.g. patient+category+date), along with _revinclude=Provenance:target and reference _include.

Example — Observations by category + date
curl "https://fhirservices.ehiconnect.com/api/fhir/cert/Observation?patient=usc-golden&category=laboratory&date=ge2015-01-01" \
  -H "Authorization: Bearer $TOKEN"

Supported US Core Choices & References

Per §170.315(g)(10)(viii)(A) and §170.404(a)(2), the following documents the US Core 6.1.0 "must support" elements that offer multiple Choices ([x] types) or References, and the choice/reference this certified module supports (at least one of each is supported).

Choice ([x]) data types

Patient.deceased[x]
deceasedDateTime (dateTime)
Condition.onset[x]
onsetDateTime (dateTime)
Observation.effective[x]
effectiveDateTime (dateTime); effectivePeriod (Period) for Smoking Status
Observation.value[x]
valueQuantity, valueCodeableConcept, valueString
Immunization.occurrence[x]
occurrenceDateTime (dateTime)
Procedure.performed[x]
performedDateTime (dateTime)
MedicationRequest.reported[x]
reportedBoolean (boolean)
MedicationRequest.medication[x]
medicationReference → Reference(US Core Medication)

Reference targets

Encounter / Condition / Observation .subject
Reference(US Core Patient)
DocumentReference.author · *.performer · *.recorder
Reference(US Core Practitioner | US Core Organization)
MedicationRequest.requester · *.performer.actor
Reference(US Core Practitioner)
MedicationRequest.medicationReference
Reference(US Core Medication)
CareTeam.participant.member
Reference(US Core Practitioner | US Core Patient | US Core Organization)
*.encounter
Reference(US Core Encounter)

The authoritative, machine-readable list of every supported profile, interaction, search parameter and data type is the server's CapabilityStatement.

API reference details

API syntax & function names (interactions)

RESTful FHIR R4 over HTTPS. Supported interactions: read (GET [base]/[Type]/[id]), search (GET [base]/[Type]?params and POST [base]/[Type]/_search), capabilities (GET [base]/metadata), and group-export (GET [base]/Group/[id]/$export). OAuth2: /authorize, /token, /introspect, /revoke. Read-only: no create/update/delete.

Required & optional parameters (and data types)

authorize · response_type
string, required — must be "code"
authorize · client_id
string, required
authorize · redirect_uri
string (URI), required — must match a registered value
authorize · scope
string, required — space-delimited SMART scopes
authorize · state
string, required
authorize · aud
string (URI), required — must equal the FHIR base
authorize · code_challenge / _method
string, required — S256
authorize · launch
string, optional — EHR launch token
token · grant_type
string, required — authorization_code | refresh_token | client_credentials
token · code / code_verifier
string, required for authorization_code (PKCE)
token · client_assertion / _type
string, required for private_key_jwt (RFC 7523)
search · _revinclude
string, optional — e.g. Provenance:target
$export · _type / _since / _outputFormat
string / instant / string — all optional

Return variables & types/structures

  • Token response (application/json): access_token (string), token_type ("Bearer"), expires_in (integer, seconds), scope (string), and when applicable id_token, refresh_token, patient, encounter.
  • FHIR read: a single US Core resource (application/fhir+json).
  • FHIR search: a Bundle of type: searchset with entry[].resource.
  • Bulk kickoff: 202 Accepted + Content-Location header; status returns a JSON manifest with output[].url (each an application/fhir+ndjson file).
  • Introspection: JSON with active (boolean) plus scope, client_id, exp, patient.

Exceptions & exception handling (returns)

  • FHIR errors return an OperationOutcome resource with issue[].severity and issue[].code, using the standard HTTP status: 400 malformed request, 401 missing/invalid/expired or revoked token, 403 token lacks the required scope / out of compartment, 404 unknown resource, 429 throttled.
  • OAuth2 errors (per RFC 6749 / SMART) return JSON { "error": "..." } with codes invalid_request, invalid_client (401), invalid_grant, invalid_scope, unsupported_grant_type.
  • Bulk errors return an OperationOutcome; a cancelled job returns 202 on DELETE.

Mandatory software components

  • An HTTP client capable of TLS 1.2+ and following redirects.
  • A FHIR R4 (4.0.1) / US Core 6.1.0-aware JSON parser.
  • An OAuth2 / SMART App Launch 2.0 client with PKCE (S256) support.
  • For confidential-asymmetric & backend clients: a JWT signer (RS384 or ES384) and a publicly reachable JWKS URL.
  • For OIDC: a JWT/JWKS verifier to validate the id_token.

Mandatory software configurations

  • Register at least one exact redirect_uri (and launch URL for EHR apps) before first use.
  • Send aud equal to the tenant FHIR base on every authorize request.
  • Use code_challenge_method=S256; plain PKCE and non-TLS endpoints are rejected.
  • Backend/asymmetric clients: host a TLS-protected JWKS URL with a kid; client_assertion.aud must be the token endpoint.
  • Request offline_access to receive a refresh token (valid ≥ 3 months, rotated on use).

Technical requirements for registration

To register, supply: client type (public / confidential-symmetric / confidential-asymmetric / backend), one or more redirect_uris, launch URL (EHR apps), JWKS URL (asymmetric/backend), and the requested scopes. Confidential-symmetric clients are issued a client secret. See the sandbox request page.

Patient app authorization management (revocation)

Supports §170.315(g)(10)(vi). A patient can view the apps they've authorized and revoke any one; revoking kills the entire grant family so the access token AND refresh token stop working immediately. This platform's patient portal is the reference UI; a separate (e.g. EMR) patient portal can call the same two endpoints.

List authorized apps

GET connected apps (patient session)
GET  {base}/api/bridge/{tenant}/patient/connected-apps
Authorization: Bearer {patient session token}

200 -> { "apps": [
  { "grant_id": "...", "client_id": "...", "app_name": "...",
    "scope": "openid fhirUser patient/*.rs", "authorized_at": "2026-11-24T..." }
] }

Revoke an app

POST revoke (patient session)
POST {base}/api/bridge/{tenant}/patient/connected-apps/{grant_id}/revoke
Authorization: Bearer {patient session token}

200 -> { "grant_id": "...", "status": "revoked" }
  • Auth: both require an authenticated patient session for the tenant; a patient only sees/revokes their own grants.
  • Effect of revoke: the grant is added to the revocation list and all its tokens are marked revoked. Subsequent FHIR reads with that access token return 401; a refresh with that grant's refresh token returns 400 invalid_grant.
  • Integrating an external portal: call these endpoints with the patient's session (once patient identities are federated via OIDC), or surface a "Connected apps → Revoke" screen that proxies them.

Security & TLS

  • Transport: all production traffic is served over TLS 1.2+ (HTTPS only); plaintext HTTP is not accepted.
  • Authorization: every FHIR request requires a valid bearer token; requests are scoped to a single tenant and, for patient tokens, to that patient's compartment.
  • Encryption at rest: PHI fields are protected with per-tenant envelope encryption backed by AWS KMS.
  • Auditing: access and changes are recorded in a per-tenant audit log.
  • PKCE (S256) is required for all authorization-code flows; access tokens are short-lived and refresh tokens rotate.

ONC §170.315(g)(10) certification

This platform is built to the ONC (g)(10) Standardized API criterion and is validated with the HL7 Inferno (g)(10) test kit. The capabilities below are exercised by the suite:

  • Standard-based FHIR R4 API with US Core 6.1.0 (USCDI v3) profiles and Must-Support elements.
  • SMART App Launch 2.0 — standalone, EHR and backend-services launch; OIDC; PKCE; public, confidential-symmetric and confidential-asymmetric clients.
  • Token introspection (RFC 7662), revocation (RFC 7009), refresh tokens and granular/limited scopes.
  • FHIR Bulk Data 2.0 group-level export for multi-patient access.
  • Documentation (this page) published at a stable, public service URL as required by §170.315(g)(10) and §170.404.

For API access or client registration, start on the sandbox request page.