Identity & Access — How it works
Overview
The identity-access engine holds the cross-organization identity facts that feed access decisions: who is allowed to see a person, the consent on record, explicit access grants, a patient's relationship to facilities, and health-card identity. It supplies the visibility/consent/grant inputs that the access-control engine combines with local roles/scopes to decide object-level access.
Data model & ownership
| Table | Purpose |
|---|---|
person_visibility_scope | Who/what may see a person. |
consent_registry | Recorded consent. |
person_access_grant | Explicit access grants to a person's data. |
patient_facility_relationship | A patient's link to facilities. |
health_card | Health-card identity. |
Key rules & invariants
consent_registry.consent_typeis theConsentTypeenum (TERM-008M). Free text let a typo invent a consent that access decisions could never match. Jackson rejects unknown values (400); migrationidentityaccess/007normalises then CHECK-constrains and HALTs on dirty data.- Reads of a person/patient are filtered by access scope server-side — visibility/consent/grants gate what a caller can retrieve.
health_card.card_typeisHealthCardType(TERM-008L). It was freeVARCHAR(40)withPHYSICALas the only evidenced value. Jackson rejects an unrecognised value with 400; migrationidentityaccess/006normalises non-null values, CHECK-constrains, and HALTs on dirty data. The column stays nullable — a card may omit its channel when only the number matters.- These facts are inputs to the unified access decision; the access-control engine owns the decision itself.
API
See the API Reference. Endpoint groups under /api/v1/identity-access: visibility
scopes, consent, access grants, patient–facility relationships, health cards, and visibility
discovery.
Related features
- Access control (consumes these facts), Demographic (the persons being protected).