Operations

Patient Consent and Care-Team Access

Manage patient consent and care-team access across records, documents, queries, shared summaries, and connected applications.

Policy model

AMCDR evaluates patient consent after authentication, route authorization and SMART scopes. A valid role or wildcard SMART scope does not override the effective patient decision.

ModeProduction behavior
care_teamActive care-team members may access the record for treatment. Users outside the active team are denied.
selected_membersOnly the active members selected by the patient may use the record for routine treatment.
no_routine_accessRoutine care-team access is denied. Patient self-service remains available subject to clinical release controls.
Clinical relationship is retained. Opt-out changes the access-control overlay; it does not erase care-team membership, assignments or audit evidence.

Clinical-service and care-team scopes

AMCDR resolves the relationship to the represented patient before returning patient-level data. AMCDR checks clinical-service assignments and patient care-team membership separately.

ScopeProduction behavior
serviceReturns records attributed to the matching active service, the demographics required for care, and cross-service medication/allergy safety information. It does not open the longitudinal record.
longitudinalAn explicit active patient-care-team membership permits clinically necessary cross-service information.
selfThe represented patient or approved proxy receives patient-visible data under release controls.
systemA registered system service operates within its approved system scope, tenant context and policy.
administrativeExceptional governed administration; this is not a normal clinical assignment.
deniedNo active relationship supports the request.

A psychiatrist assigned only to Mental Health therefore receives Mental Health compositions for patients actively associated with that service. Medication and allergy information remains available for prescribing safety. Cardiology, maternity and other service records require active care-team membership or an approved emergency process.

Clinical services are governed AMCDR offerings linked through workforce assignments. Keycloak roles establish job capability; Keycloak groups do not constitute the service catalogue and do not create a patient relationship.

Authoring provenance. Standard openEHR composition submissions under service scope are stamped with the authenticated clinical service. When multiple services are active, the caller supplies X-AMCDR-Clinical-Service; AMCDR rejects values outside the server-resolved assignment.

Patient Portal

Open Rights & privacy → Care-team privacy. The patient can select the whole active team, selected members only, or no routine access; set an effective period; decide whether authorized break-glass is permitted; and record an explanation.

The member list comes from active, auditable care-team relationships. A member without an authenticated account mapping remains visible but cannot be selected until the membership is linked.

Enforcement sequence

Clinical access decision
AuthenticationUser or SMART client
->
Route and scopeRBAC, grant, patient context
->
Care-team consentWhole, selected, opt-out
->
Protected recordVIP clearance
->
Decision evidencePermit, deny, break-glass

The access gate resolves EHRs, FHIR resources, persisted FHIR identifiers, JSON-body references and binary attachments back to the MPI patient. It covers canonical openEHR reads, governed FHIR reads/searches, SHR and IPS, patient summaries, binary documents, patient-level operational modules and SMART applications. AQL results are evaluated per represented patient before rows are returned or cached.

Patient-level collection APIs require a patient or subject filter, or apply server-side relationship filtering. Population reporting uses approved AQL, saved-query or reporting workflows; ordinary clinical list endpoints cannot be used to bypass relationship scope.

SMART behavior

SMART application approval, active grant and token scopes are necessary but not sufficient. AMCDR evaluates the patient directive after SMART scope and patient-compartment checks. The first-party portal uses patient-context SMART sessions; proxy access also requires an active consent-backed delegation.

An application cannot authorize itself by writing a permissive FHIR Consent. The request remains restricted by the token patient, application grant and effective server-side access decision.

Patient APIs

GET /patient-portal/me/care-team-privacy
PUT /patient-portal/me/care-team-privacy
Authorization: Bearer <patient-smart-token>
Content-Type: application/json

{
  "access_mode": "selected_members",
  "selected_member_ids": ["0dcb6903-c134-4e89-9baa-ad7cba47ea38"],
  "period_start": "2026-07-22",
  "period_end": null,
  "allow_break_glass": true,
  "note": "Limit routine access to my named clinician."
}

Complete routine opt-out

{
  "access_mode": "no_routine_access",
  "selected_member_ids": [],
  "allow_break_glass": false
}

Authorized staff APIs

GET /patient-portal/patients/{patient_id}/care-team-privacy
PUT /patient-portal/patients/{patient_id}/care-team-privacy

Staff access uses the configured patient-release authorization boundary. The deployment can require approved clinician roles, named clinicians, an active care-team relationship or a release-manager role. Staff-originated changes retain actor and source evidence.

Emergency access

Break-glass requires patient permission, a reason and an actor with approved emergency/protected-access authority or an active governed break-glass session. Sending X-Break-Glass: true does not grant emergency authority. VIP/protected clearance remains an additional control.

X-Break-Glass: true
X-Break-Glass-Reason: Immediate threat to life

Evidence and acceptance

The active preference is a ConsentDirective with scope_code=care-team-access. Replacement directives supersede the previous active version. Every evaluation creates an AccessDecision containing actor, membership, purpose, requested resource context, matching policy references and explanation.

  1. Verify all three modes with team, non-team and selected/non-selected actors.
  2. Verify patient self-service and consent-backed proxy access.
  3. Exercise openEHR, FHIR, AQL, SHR/IPS and binary-document routes.
  4. Verify VIP clearance remains additive.
  5. Verify unauthorized break-glass is denied and authorized access is reviewed.
  6. Retain jurisdiction-specific approval for mandatory-access exceptions and patient communications.
  7. Verify a service-only clinician cannot retrieve another service's compositions, longitudinal summaries, diagnostics, care plans or documents.
  8. Verify medication and allergy safety information remains available without opening the longitudinal record.
  9. Verify path, query, persisted FHIR identifier, JSON-body, AQL and cache paths produce the same relationship decision.