Overview
FHIR R4 defines clinical data. SMART App Launch authorizes and opens LivingLink in a patient chart. CDS Hooks sends workflow events and receives concise cards. These standards can support Epic, Oracle Health, MEDITECH, Sunrise, Paragon, and other compatible EHRs, but compatibility is not automatic.
FHIR R4
Clinical resources and REST exchange
SMART on FHIR
OAuth launch and patient context
CDS Hooks
Patient-view events and cards
Prototype status: LivingLink is not vendor certified. Sandbox, security, privacy, clinical, and production approval are still required.
What the EHR must provide
LivingLink must first be registered as a SMART application in the vendor portal or customer EHR environment.
- FHIR issuer/base URL
- Vendor, product, version, and environment
- Vendor-issued SMART client ID
- Client authentication method
- Exact redirect URI allowlist
- Supported scopes and launch context
- Patient and practitioner context behavior
- CDS Hooks support and registration process
- Sandbox users and synthetic patients
- Technical and security contacts
Never submit client secrets, private keys, access tokens, patient identifiers, or PHI through the public registration form.
Endpoint reference
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/ingest/v1/smart/launch | EHR launch URL (iss and launch) |
| GET | /api/ingest/v1/smart/callback | OAuth redirect URI |
| GET | /api/ingest/v1/launch/context | Launch screen: patient, clinician and collection plan |
| POST | /api/ingest/v1/pull-jobs | Start the one-time record collection |
| GET | /api/ingest/v1/pull-jobs/{id} | Collection progress |
| DELETE | /api/ingest/v1/pull-jobs/{id} | Cancel a collection |
| GET | /api/ingest/v1/health | Service health |
| GET | /api/cds-hooks | CDS Hooks discovery |
| POST | /api/cds-hooks/livinglink-readycheck-alert | ReadyCheck patient-view service |
| POST | /api/cds-hooks/livinglink-stalled-evaluation | Stalled evaluation service |
| POST | /api/ehr/registrations | Submit EHR registration for review |
Two-sided registration
Register LivingLink in the EHR
Configure the launch URL, redirect URI, client type (public with PKCE, or confidential with a client secret), the data APIs and scopes, the chart launch point, and CDS services if used.
Register the EHR in LivingLink
Submit at /ehr/register. Launches are refused until an administrator approves the request, which registers the FHIR base URL and client ID as an enabled hospital.
EHR launch URL
https://livingdonorlink.com/api/ingest/v1/smart/launch
OAuth redirect URI
https://livingdonorlink.com/api/ingest/v1/smart/callback
CDS discovery
https://livingdonorlink.com/api/cds-hooksRedirect URIs must match byte for byte: scheme, host, port and path, with no trailing slash.
SMART App Launch
- 1Clinician opens a patient chart and selects LivingLink.
- 2EHR calls the launch URL with iss (its FHIR base URL) and a one-time launch value.
- 3LivingLink accepts only FHIR base URLs registered as enabled hospitals.
- 4LivingLink reads SMART discovery, creates state and a PKCE S256 challenge, and binds the handshake to the browser.
- 5LivingLink redirects to the EHR's authorize endpoint with launch, aud set to the FHIR base URL, and the requested scopes.
- 6EHR authenticates the clinician and returns an authorization code.
- 7LivingLink exchanges the code, verifies the OpenID Connect id_token (signature, issuer, audience, expiry), and requires a patient in context.
- 8The launch screen shows the patient, the clinician, and what can be collected under the granted scopes.
- 9The clinician confirms, LivingLink collects the records once, and the EHR access token is deleted when collection ends.
Launch request
GET /api/ingest/v1/smart/launch
?iss=https%3A%2F%2Fehr.example%2FFHIR%2FR4
&launch=opaque-one-time-valueRequested scopes
openid fhirUser launch
patient/Patient.rs patient/Observation.rs patient/Condition.rs
patient/MedicationRequest.rs patient/Procedure.rs
patient/AllergyIntolerance.rs patient/FamilyMemberHistory.rs
patient/Encounter.rsSMART v2 syntax is shown; v1 (.read) is also understood. LivingLink plans collection from the scopes the EHR actually grants, which can be fewer or more specific (for example category-limited Observation.s). online_access is added per hospital only where the EHR advertises permission-online.
EHR SMART discovery URL
GET {EHR_FHIR_ISSUER}/.well-known/smart-configuration
{
"authorization_endpoint": "https://ehr.example/oauth2/authorize",
"token_endpoint": "https://ehr.example/oauth2/token"
}Relevant token context
{
"access_token": "opaque-token",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "launch openid fhirUser patient/Patient.r patient/Observation.s ...",
"patient": "12345",
"encounter": "67890",
"id_token": "signed JWT whose fhirUser claim is .../Practitioner/987"
}The clinician’s identity comes from the fhirUser claim of the verified id_token, not from the token response itself. Treat access tokens as opaque even when they are JWTs.
Epic notes
Verified against the Epic on FHIR sandbox: launch from LaunchPad, id_token verification and record collection completed end to end. See the full Epic integration guide.
- Register the app on fhir.epic.com with audience Clinicians or Administrative Users, SMART on FHIR version R4, and SMART Scope Version v2.
- Choose 64-character-limited FHIR IDs and keep that choice; switching later changes patient IDs.
- Select the R4 Incoming APIs per data type: Search for searched resources (Observation and Condition per category, MedicationRequest, Procedure, AllergyIntolerance, FamilyMemberHistory) and Read for Patient and Encounter.
- Epic grants scopes from the selected APIs, not from the scopes requested. A missing API shows up as Not permitted on the launch screen.
- Epic requires the aud parameter and does not advertise online_access; leave online_access out of the hospital's scopes.
- Use the non-production client ID in the sandbox. App changes can take up to an hour to reach the sandbox and up to 12 hours at a customer.
- Sandbox FHIR base URL: https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4. Test the EHR launch with Epic's LaunchPad tool.
Patient identity and linking
A Patient ID is unique only inside its EHR tenant. LivingLink always includes the issuer-scoped connection.
EHR issuer/tenant + external Patient ID
-> EHRConnection
-> ExternalPatientMapping
-> DonorProfileCenter users link patients through /coordinator/patient-links or /clinician/patient-links. Linking requires center membership, an enabled center-owned connection, active donor-center authorization, explicit identity confirmation, uniqueness checks, and audit logging.
Never: search every donor from an EHR request, match by name alone, use SSN, or disclose donor data when mapping or authorization is absent.
CDS Hooks workflow
When supported, the EHR calls a LivingLink patient-view service as a clinician opens a chart. SMART support alone does not guarantee CDS Hooks support.
Request
POST /api/cds-hooks/livinglink-readycheck-alert
Authorization: Bearer {service-credential}
Content-Type: application/json
{
"hook": "patient-view",
"hookInstance": "unique-event-id",
"fhirServer": "https://ehr.example/FHIR/R4",
"context": {
"userId": "Practitioner/987",
"patientId": "12345"
}
}LivingLink validates service credentials, hook, issuer, center, mapping, and donor authorization before evaluating readiness or stalled-evaluation data.
Response
{
"cards": [{
"summary": "LivingLink: Living Donor Candidate Active",
"detail": "This patient has an active donor-readiness workflow.",
"indicator": "info",
"source": { "label": "LivingLink" }
}]
}No authorized match returns {"cards":[]}. Cards must not contain access tokens, complete histories, unrelated financial information, or unnecessary PHI.
Security boundaries
- Clerk protects interactive LivingLink sessions.
- SMART uses a registered-hospital allowlist, browser-bound state, PKCE S256, and id_token signature, issuer and audience checks.
- CDS uses service authentication plus issuer, center, mapping, and authorization checks.
- EHR access tokens are encrypted at rest, never logged, and deleted when collection ends.
- Collected records are stored encrypted (AES-256-GCM) and bound to their hospital and record type.
- Client secrets and private keys remain in managed secret storage and are never returned by any API.
- Every disclosure is minimum necessary and authorization is checked at use time.
- Development and sandbox testing uses synthetic patients only. Collection from production EHRs stays off until approved.
Go-live checklist
EHR setup
- [ ] Create SMART app
- [ ] Register exact URLs
- [ ] Approve minimum scopes
- [ ] Configure chart launch
- [ ] Configure CDS if supported
- [ ] Provide sandbox users
LivingLink setup
- [ ] Create real center
- [ ] Approve EHR registration
- [ ] Store credentials securely
- [ ] Create center authorization
- [ ] Link Patient ID
- [ ] Verify audit controls
SMART tests
- [ ] Correct context
- [ ] Unknown issuer rejected
- [ ] Replay rejected
- [ ] Scope downgrade safe
- [ ] Cross-tenant lookup rejected
- [ ] Expiry tested
CDS tests
- [ ] Discovery accepted
- [ ] Services resolve
- [ ] Expected card returned
- [ ] Unknown patient gets no cards
- [ ] Invalid credential rejected
- [ ] Clinical wording approved
Current limitations
- Signed-JWT client authentication (private_key_jwt) is not yet supported. Public clients with PKCE and confidential clients with a client secret are.
- Collection from production EHRs is switched off until its legal basis is confirmed.
- The patient-specific CenterFlow view of collected records remains pending.
- Provider-side token revocation and EHR logout remain pending; LivingLink discards its access token after collection.
- Tenant-specific CDS OAuth identities remain pending.
- CDS prefetch, replay protection, and distributed limits remain pending.
- Every named vendor requires separate sandbox evidence and approval. Only the Epic sandbox has been verified so far.
Ready for sandbox review?
Submit non-secret tenant details. Registrations remain disabled until administrator approval.
Open registration