Skip to content

MOD PEX 002 ACC

Domain specifications / D07-PEX / 5. Detailed Functional Requirements / 5.2 Module Specification: Patient Identity Linking and Account Access

5.2 Module Specification: Patient Identity Linking and Account Access

5.2.1 Module Overview

Module ID: MOD-PEX-002

Purpose: Create and maintain portal accounts, link each account to the correct patient identity with the required assurance, control authentication and sessions, manage representative access, and let patients see and revoke third-party application access.

Business Capabilities: - CAP-PEX-002, CAP-PEX-003, CAP-PEX-012

Primary Actors: - Patient, authorized representative, registration / front-desk staff, privacy officer, portal support agent

Dependencies: - Domain 1 (ADM) MPI and registration for identity resolution, legal-representative records and identity events. - Domain 10 (ESS) identity, authorization, consent and audit services; Domain 2 (ISE) edge and patient identity federation.

5.2.2 Functional Areas

Functional Area ID: FA-PEX-003 Enrolment and identity linking; FA-PEX-004 Authentication and session; FA-PEX-005 Representative access; FA-PEX-006 Patient-authorized applications

Description: These areas cover the life of the account link and of representative grants, the patient's sign-in, and the patient's control over applications they have authorized.

Scope: - Included: enrolment, proofing presentation and evidence reference, link states, credentials and multi-factor authentication for patients, session control, recovery, representative grants, reaction to identity events, application grant view and revocation. - Excluded: identity matching and MPI stewardship (Domain 1); workforce identity (Domain 10); the authorization server and token issuance (Domain 10 and Domain 2).

5.2.3 Detailed Requirements

Requirement FR-PEX-ACC-001: Portal Enrolment and Identity Linking

Attribute Description
Requirement ID FR-PEX-ACC-001
Requirement Name Portal enrolment and identity linking
Requirement Type Functional
Module Patient Identity Linking and Account Access
Functional Area FA-PEX-003 Enrolment and identity linking
Priority Should
Criticality Critical
Requirement Status Draft
Source PAT-011; PAT-009; PAT-005; PRS section 4 (Patient / representative: identity verification); PRS section 19.3 (Patient portal scope decision)
Related Business Rule BR-PEX-001, BR-PEX-002, BR-PEX-003, BR-PEX-004
Related Workflow WF-PEX-001

1. Requirement Statement

The system shall create a portal account link to a patient identity only after the person's identity has been proofed to the level the approved policy requires for the enrolment method, shall link an account to exactly one enterprise person identifier, and shall refuse to link to an identity that is unresolved in the MPI.

2. Business Rationale

A link to the wrong patient discloses one person's health information to another. PAT-011's acceptance statement is that the patient sees only their own authorized information.

3. Actors and Permissions

Actor Permission Conditions
Registration / front-desk staff Create invitation; record in-person proofing Role permission; patient identity verified under PAT-009
Patient Activate account; self-enrol Valid invitation, or remote method enabled
Privacy officer Review flagged enrolments Assigned review item

4. Preconditions - The patient identity exists in the MPI and is not under duplicate or uncertain-match review.

5. Trigger - Staff issue an invitation, or a person starts remote self-enrolment.

6. Functional Behaviour

  1. Staff-assisted: after in-person verification, staff issue a single-use, time-limited invitation bound to the enterprise person identifier and sent to a contact point verified in the MPI.
  2. Remote: the person supplies the identifying attributes the policy lists; PEX asks Domain 1 for a match. Enrolment continues only on a single high-confidence match and a successful out-of-band challenge to a contact point already verified in the MPI. Any other outcome creates a staff review item and tells the person to contact registration, without revealing whether a record exists.
  3. Federated: where an approved external identity provider is configured, the assertion's assurance level and identifier are used as proofing evidence under policy.
  4. The account link is created Pending Verification and becomes Active only when all steps for the method have passed.
  5. The proofing method, evidence reference, verifying staff member and time are stored with the link.
  6. PortalAccessGranted is emitted when the link becomes Active.
  7. Repeated failed enrolment attempts against the same identity or from the same origin are rate-limited and flagged.

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Enterprise person identifier Identifier Yes Exists; identity status resolved Target identity
Enrolment method Enumeration Yes In person / remote / federated; enabled for facility Determines proofing steps
Invitation token Token Yes for staff-assisted Single use; unexpired; bound to identity Activation
Identifying attributes Structured Yes for remote As listed in policy Match request to Domain 1
Proofing evidence reference Reference Yes Present for the method Evidence of proofing
Terms and privacy notice acceptance Boolean + version Yes Current version Recorded acceptance

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-ACC-001-1 Reject if an Active or Pending patient-holder link exists for the identity (BR-PEX-001). No duplicate link; review item raised.
PR-ACC-001-2 Reject if Domain 1 reports the identity as under review (BR-PEX-002). No link.
PR-ACC-001-3 Remote enrolment proceeds only on a single high-confidence match. Ambiguous matches go to staff review.
PR-ACC-001-4 Responses to failed remote enrolment are uniform. No confirmation that a person is a patient.

9. Output Requirements

Output Format Recipient Description
Activation invitation Notification via Domain 10 Patient contact point Single-use link or code; no clinical content
Account link record Data PEX Link with proofing evidence
PortalAccessGranted Event Domain 8, Domain 10 audit, Domain 1 (optional flag) Link activated

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Invitation expired or reused Token state Refuse activation "This invitation is no longer valid. Please ask for a new one."
Multiple or low-confidence match Domain 1 match result Create staff review item "We could not complete enrolment online. Please contact registration."
Existing link for identity BR-PEX-001 Refuse; flag Same neutral message as above
Minor or patient lacking capacity Policy by age (under 18 by default, CFG-PEX-006) or status Patient-holder enrolment refused; representative path offered Guidance on representative access

11. State and Lifecycle Behaviour

Creates the account link in Pending Verification and moves it to Active or Rejected (section 4.3).

12. Audit Requirements

Audited: invitation issued (with staff identity), enrolment attempt, match request outcome, proofing step results, link activation, rejection and every flagged attempt.

13. Security and Privacy Requirements

Proofing evidence is Sensitive and visible only to authorized staff. Activation tokens are single-use and short-lived. The enrolment endpoints are rate-limited at the Domain 2 gateway. The proofing model must be approved by the Security and Privacy Office (PRS 19.3).

14. Acceptance Criteria

  • AC-01: Given a patient verified in person, when they activate a valid invitation and complete the challenge, then one Active link to their enterprise person identifier exists with proofing evidence recorded.
  • AC-02: Given an identity under duplicate review in the MPI, when enrolment is attempted, then no link is created.
  • AC-03: Given remote enrolment details that match two MPI identities, when submitted, then no link is created, a staff review item exists and the response does not reveal that a match was found.
  • AC-04: Given an identity with an Active link, when a second enrolment is attempted, then it is refused and flagged.
  • AC-05: Given test cases for twins and patients with shared contact details, when remote enrolment is attempted, then no account is linked to the wrong twin or household member.

15. Dependencies and Integration

  • Upstream dependencies: Domain 1 identity query and identity status (IF-PEX-002); Domain 10 identity service; Domain 2 identity federation.
  • Downstream dependencies: all PEX modules.
  • Required events or APIs: EVT-PEX-001 PortalAccessGranted.

16. Open Questions / Assumptions

  • The identity-proofing model (methods permitted, assurance levels, whether remote enrolment is allowed at all) is an open decision in PRS 19.3 and REF-002 section 9 (DEC-PEX-001).

Requirement FR-PEX-ACC-002: Patient Authentication, Session Control and Recovery

Attribute Description
Requirement ID FR-PEX-ACC-002
Requirement Name Patient authentication, session control and recovery
Requirement Type Functional
Module Patient Identity Linking and Account Access
Functional Area FA-PEX-004 Authentication and session
Priority Must
Criticality Critical
Requirement Status Draft
Source SEC-002; SEC-005; SEC-010; PAT-011 ("secure access"); PRS section 10.1; PRS section 19.3 (Patient portal scope: authentication)
Related Business Rule BR-PEX-003, BR-PEX-027
Related Workflow WF-PEX-001

1. Requirement Statement

The system shall authenticate every portal user with a unique personal account, shall require multi-factor authentication for portal access as remote, risk-defined access under approved policy, shall end sessions after the configured idle and absolute periods, and shall provide credential recovery that does not lower the assurance established at enrolment.

2. Business Rationale

Portal access is remote access to health information from uncontrolled devices. SEC-002 requires multi-factor authentication for remote and other risk-defined access.

3. Actors and Permissions

Actor Permission Conditions
Patient / representative Sign in, manage own credentials and factors Own account
Portal support agent Unlock account, trigger recovery Cannot view clinical content or set a credential on the user's behalf
Security operations (Domain 2) Receive authentication security events SIEM integration

4. Preconditions - The account exists. Patient data additionally requires an Active link or grant.

5. Trigger - Sign-in, session activity, recovery request, or a risk signal.

6. Functional Behaviour

  1. Sign-in requires the primary credential and a second factor from the methods the policy approves. Federated sign-in is accepted where the identity provider meets the same requirement.
  2. Sensitive actions (changing a contact point or factor, granting representative access, revoking consent, viewing after a long idle period) require recent re-authentication.
  3. Sessions end after the configured idle timeout and absolute lifetime. Sign-out invalidates the session on the server.
  4. Repeated failed sign-ins trigger progressive delay and temporary lockout; the account holder is notified on a verified channel.
  5. Recovery uses verified contact points and the second factor, or staff-assisted re-proofing where those are unavailable. Recovery never discloses patient data and never changes a contact point and a credential in the same unauthenticated flow.
  6. The account holder is notified of credential, factor and contact-point changes and of sign-in from a new device, and can see recent sign-in history.
  7. Authentication events and anomalies are forwarded for security monitoring.

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Account identifier String Yes Exists Sign-in name or federated subject
Primary credential Secret Yes (non-federated) Meets credential policy Never logged
Second factor Secret / assertion Yes Approved method; valid Multi-factor step
Recovery contact point Reference For recovery Verified in account Out-of-band channel

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-ACC-002-1 Deny patient-data APIs to sessions without completed multi-factor authentication. No single-factor access to health information.
PR-ACC-002-2 Uniform failure responses for unknown account and wrong credential. No account enumeration.
PR-ACC-002-3 Recovery restores access at no higher privilege and with no weaker proofing than enrolment. No downgrade path.

9. Output Requirements

Output Format Recipient Description
Session Token Client Bound to account, short-lived
Security notifications Notification Account holder Changes and new-device sign-in
Authentication events Event / log Domain 10 audit; Domain 2 SIEM Success, failure, lockout, recovery

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Wrong credential or factor Credential check Deny; count attempt "Sign-in details are not correct."
Lockout threshold reached Attempt counter Temporary lock; notify holder "Too many attempts. Try again later or recover your account."
No verified recovery channel Account data Refuse self-service recovery Direct to staff-assisted re-proofing
Idle timeout Session timer End session Sign in again

11. State and Lifecycle Behaviour

Does not change the account link state, except that a suspected compromise may move the link to Suspended (FR-PEX-ACC-004).

12. Audit Requirements

Audited: sign-in success and failure, factor enrolment and removal, lockout, recovery start and completion, session end, support-agent actions with agent identity.

13. Security and Privacy Requirements

Credentials and factors are stored and verified through the approved identity service, never in PEX application tables in recoverable form. All traffic is encrypted in transit (SEC-005). Support agents have no access to clinical content.

14. Acceptance Criteria

  • AC-01: Given an account with a second factor enrolled, when sign-in supplies only the primary credential, then no patient-data API is accessible.
  • AC-02: Given an idle session beyond the configured timeout, when the client calls an API, then the call is refused and the session is ended.
  • AC-03: Given a recovery flow, when it completes, then a notification has been sent to the verified contact point and an audit event exists.
  • AC-04: Given a support agent, when they open a patient's account for support, then no results, documents or message content are visible to them.
  • AC-05: Given a sign-in name that does not exist, when sign-in is attempted, then the response is indistinguishable from a wrong-credential response.

15. Dependencies and Integration

  • Upstream dependencies: Domain 10 identity service or approved federation; Domain 2 edge.
  • Downstream dependencies: FR-PEX-PRT-001.
  • Required events or APIs: authentication events to audit and SIEM.

16. Open Questions / Assumptions

  • Approved second-factor methods and whether multi-factor authentication is required at every sign-in or by risk are policy decisions (DEC-PEX-001). The working position is every sign-in.

Requirement FR-PEX-ACC-003: Representative (Proxy) Access

Attribute Description
Requirement ID FR-PEX-ACC-003
Requirement Name Representative (proxy) access
Requirement Type Functional
Module Patient Identity Linking and Account Access
Functional Area FA-PEX-005 Representative access
Priority Should
Criticality Critical
Requirement Status Draft
Source PAT-011 ("valid representative access"); PAT-007 (legal representative captured at registration); SEC-003; PRS section 4 (Patient / representative); PRS section 19.3
Related Business Rule BR-PEX-005, BR-PEX-006, BR-PEX-007, BR-PEX-028
Related Workflow WF-PEX-002

1. Requirement Statement

The system shall allow a verified representative to access a patient's portal information and functions through the representative's own account under a grant that records the relationship type, the evidence of authority, the scope, and the period of validity, and shall stop that access immediately when the grant expires, is suspended or is revoked.

2. Business Rationale

Parents, guardians and legal representatives need access, and PAT-011 requires that such access be valid. Shared credentials would defeat audit and scope control.

3. Actors and Permissions

Actor Permission Conditions
Patient Create, limit and revoke grants for their own record Authenticated; 18 or over and not under a court guardianship order
Representative Request a grant; act within scope; see the grants they hold; end their own grant Own account; identity verified
Registration / front-desk staff Verify identity and evidence; activate, refuse (reason required) or renew grant Role permission
Privacy officer Decide disputed grants, which arrive as a "Disputed grant" item of the review queue on UI-PEX-015; refuse; revoke Assigned case

4. Preconditions - A representative-access policy exists for the relationship type in the jurisdiction profile.

5. Trigger - Grant request by patient or representative; expiry or policy transition; revocation.

6. Functional Behaviour

  1. A grant request records the relationship type, requested scope and requested period.
  2. The system applies the evidence requirements for the relationship type and either collects evidence or references the legal-representative record held by Domain 1.
  3. An authorized staff member, or the patient for a patient-initiated grant, approves; the grant becomes Active with scope and expiry or review date.
  4. Scope is expressed as functions (for example appointments, messaging, forms, results, documents, billing) and may exclude sensitive data categories defined by policy.
  5. Every request by a representative is authorized against the grant scope by the server, and audited with both the representative's and the patient's identity.
  6. The patient, where policy allows, can see who has access to their record and revoke it.
  7. On expiry, review date, a configured age or status transition, or revocation, access stops at once and the representative is informed without clinical detail.
  8. Information that policy protects from representatives (for example categories a minor may consent to alone, where the jurisdiction profile defines them) is excluded from representative views.
  9. A patient names a representative on UI-PEX-011 by the representative's mobile number or email, with the relationship type, scope and period. The system invites that person to enrol their own account. The grant stays Requested ("Waiting for checks") until the representative has an account and has been verified in person at registration on UI-PEX-015 (PR-ACC-003-1).
  10. The representative manages their own account on UI-PEX-011: sign-in and security, and "People you act for", one entry per grant they hold with its relationship, scope and valid-until date. A representative may end their own grant ("Stop acting for [name]"); the grant becomes Revoked and the patient is told. UI-PEX-011 always concerns the signed-in account; a representative never opens it for the patient they act for.
  11. Default policy, from CFG-PEX-006: a parent or guardian has access until the child turns 18; at 18 that access ends unless the patient grants it again. Other representatives need evidence of authority (a power of attorney or court order), and their grant lasts at most 12 months before it is renewed. A patient may hold their own account from age 18.
  12. Adult lacking capacity (closed 17 Nov 2026, GAP-PEX-002). Only a legally authorised representative may act: a court-appointed guardian (wali, or pengampu under a court order of guardianship), or the person named in a power of attorney. Registration staff verify the representative's identity and the original order or deed in person and record it as the evidence reference. The grant lasts at most 12 months, or until the end date of the order if earlier, and is renewed with the evidence again. A family member without such evidence gets no portal access; they can still be informed by the care team. When the patient regains capacity and asks for their own account, the grant is Revoked and the patient enrols under FR-PEX-ACC-001.
  13. Deceased patient (closed 17 Nov 2026). When Domain 1 records the death, the patient's own access ends and every representative grant on that patient is Revoked (FR-PEX-ACC-004, behaviour 5). No new grant can be made. Heirs (ahli waris) and the legal representative ask for information through a disclosure request to Domain 6 (FR-HIM-ROI-001), which verifies their authority (PMK 24/2022 article 34), not through portal access.

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Patient reference Identifier Yes Resolved identity Subject
Representative contact Mobile number or email Yes for a patient-initiated grant Valid format; not the patient's own contact point Used to invite the representative
Representative account Identifier Yes before activation Distinct from patient account; identity verified Grantee
Relationship type Code Yes In policy catalogue Drives evidence and default scope
Evidence reference Reference Per policy Document reference or Domain 1 record Authority
Scope Set of codes Yes Subset of scope catalogue Permitted functions and categories
Valid from / expiry or review date Date Yes Expiry not beyond policy maximum (12 months by default for evidence-based grants; the child's 18th birthday for a parent or guardian) Validity

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-ACC-003-1 A grant is never Active without recorded identity verification of the representative. No unverified proxy.
PR-ACC-003-2 Default scope for a relationship type comes from policy and can only be narrowed by the approver. No scope beyond policy.
PR-ACC-003-3 Grant state is checked on every request, not only at sign-in. Revocation is immediate.

9. Output Requirements

Output Format Recipient Description
Grant record Data PEX Relationship, scope, validity, evidence
Grant notifications Notification Patient and representative Granted, expiring, suspended, revoked
RepresentativeAccessChanged Event Domain 10 audit, Domain 8 Grant lifecycle

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Evidence missing or disputed Policy evidence rule Hold in Requested; refer to privacy officer "Your request needs further verification."
Request outside scope Grant scope Refuse; audit denial "You do not have access to this."
Grant expired Validity Suspend "Your access needs to be renewed."

11. State and Lifecycle Behaviour

Grant states: Requested, Active, Suspended, Revoked, Refused (section 4.3). A Suspended grant is renewed by a new verification with new evidence and a new expiry, which returns it to Active; the renewal is recorded on the grant history. A revoked patient link revokes all grants on that patient.

12. Audit Requirements

Audited: request, evidence verification (with staff identity), activation, scope change, suspension, revocation, and every access under the grant with both identities.

13. Security and Privacy Requirements

Evidence of authority is Sensitive. Representative access rules for minors, adults lacking capacity and deceased patients are those of behaviours 11 to 13 for the Indonesia profile; another jurisdiction profile may replace them (PRS 10.4). Authorization uses the patient relationship attribute in the Domain 10 policy decision (SEC-003).

14. Acceptance Criteria

  • AC-01: Given an Active grant with scope "appointments, forms", when the representative opens results, then access is refused and audited.
  • AC-02: Given an Active grant, when the patient revokes it, then the representative's next request for that patient is refused.
  • AC-03: Given a grant whose expiry date has passed, when the representative signs in, then the patient is not selectable.
  • AC-04: Given a representative acting for a patient, when any audited action occurs, then the audit event carries both identities.
  • AC-05: Given a grant request with no identity verification recorded, when activation is attempted, then it is refused.
  • AC-07: Given a representative with an Active grant, when they choose "Stop acting for [name]", then the grant is Revoked, their next request for that patient is refused and the patient is told.
  • AC-08: Given a parent's grant for a child, when the child turns 18, then the grant ends unless the patient has granted access again.
  • AC-09: Given a guardian of an adult lacking capacity whose court order has not been verified, when activation is attempted, then it is refused and the grant stays Requested.
  • AC-10: Given a patient whose death Domain 1 records, when a representative signs in, then the patient is not selectable and the representative is told that information is available through a disclosure request to the hospital.

15. Dependencies and Integration

  • Upstream dependencies: Domain 1 legal-representative record; Domain 10 authorization and consent; jurisdiction profile.
  • Downstream dependencies: all PEX modules apply grant scope.
  • Required events or APIs: EVT-PEX-003.

16. Open Questions / Assumptions

  • Relationship types, evidence rules, scope catalogue, age thresholds and treatment of sensitive categories are not given in the sources (DEC-PEX-002, GAP-PEX-002). Update 17 Nov 2026: the common-practice defaults of behaviours 11 to 13 are set in CFG-PEX-006; legal and privacy review may tighten them per jurisdiction profile.

Attribute Description
Requirement ID FR-PEX-ACC-004
Requirement Name Account link maintenance on identity and security events
Requirement Type Functional
Module Patient Identity Linking and Account Access
Functional Area FA-PEX-003 Enrolment and identity linking
Priority Must
Criticality Critical
Requirement Status Draft
Source PAT-006; ADM-007; ADM-008; PAT-011; SEC-004; SEC-010
Related Business Rule BR-PEX-001, BR-PEX-002
Related Workflow WF-PEX-001, WF-PEX-002

1. Requirement Statement

The system shall keep every account link and representative grant consistent with the current state of the patient identity in the MPI, shall suspend access when a merge, unmerge, identity correction or security event makes the link uncertain, and shall allow authorized staff to suspend or revoke a link at any time.

2. Business Rationale

Merges and unmerges are reversible in Domain 1 (PAT-006, ADM-007). A portal link that follows an incorrect merge, or survives an unmerge on the wrong side, exposes another person's record.

3. Actors and Permissions

Actor Permission Conditions
System Re-point, suspend or flag links on identity events Event from Domain 1
Privacy officer Suspend, reinstate, revoke; decide review items Role permission
Registration / front-desk staff Re-proof and reinstate Role permission
Portal support agent Suspend on the account holder's request Cannot reinstate without re-proofing
Patient Close own account Authenticated

4. Preconditions - An account link or grant exists.

5. Trigger - PatientMerged, PatientUnmerged or IdentityUpdated from Domain 1; EncounterCorrected (EVT-ADM-026) with reason "Reattributed after unmerge"; death recorded; suspected compromise; patient or staff request; periodic access review.

6. Functional Behaviour

  1. On merge of two identities where one has a link: the link is re-pointed to the surviving identifier and continues, provided the merge was a confirmed steward decision; the event is recorded on the link history.
  2. On merge where both identities have links: both are Suspended and a review item is created; one link is reinstated after staff confirmation.
  3. On unmerge: every link and grant on the affected identities is Suspended until staff confirm which identity each account holder is. Domain 1 then attributes each post-merge encounter to one of the two identities and publishes EncounterCorrected with reason "Reattributed after unmerge" and the unmerge reference (FR-ADM-MPI-005 behaviour 9.1). On that event PEX moves every record it holds under that encounter's CIN (appointment requests and reminders, form assignments and responses, patient-reported submissions, message threads, education assignments, release decisions and engagement history) to the identity named in the event, keeping the original identifier in history. PEX records from the merged period that carry no encounter go to the "Unmerge review" tab of the review queue on UI-PEX-015, where staff assign each to one identity. Until a record is moved or assigned it is shown to neither identity's account.
  4. When Domain 1 places an identity under review, links to it are Suspended.
  5. When death is recorded, the patient-holder link and every representative grant on that patient are Revoked, with reason "death recorded". Representatives are told, without clinical detail, that information is available through a disclosure request to the hospital (FR-PEX-ACC-003, behaviour 13). If Domain 1 corrects a death recorded in error, staff reinstate the link after re-proofing.
  6. A suspected compromise (from security monitoring or the holder's report) suspends the link and ends active sessions.
  7. Suspension and revocation end sessions and stop API access immediately; released items previously viewed are not affected at source.
  8. A periodic review lists Active representative grants and dormant accounts for recertification under policy. The list is a "Recertification" tab of the review queue on UI-PEX-015, with Confirm or Revoke for each row, using the recertification row of UI-ESS-002 (OV-128).

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Identity event Event Yes Schema-valid; unique event ID Merge, unmerge, update, death
Surviving / source identifiers Identifiers Yes for merge events Known to PEX or ignored Re-pointing
Reason code Code Yes for manual actions In reason list Suspension or revocation reason

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-ACC-004-1 Identity events are processed idempotently and in order per identity. No double re-pointing.
PR-ACC-004-2 When the outcome is uncertain, suspend rather than re-point. Access is interrupted, not misdirected.
PR-ACC-004-3 PEX content owned by the account (messages, responses) follows the patient identifier under Domain 1's merge rules and keeps its original identifiers. History is preserved and reversible.
PR-ACC-004-4 After an unmerge, a PEX record moves only on EncounterCorrected with reason "Reattributed after unmerge" for its encounter, or by a staff assignment for a record with no encounter; it is withheld from both identities until then. No record is shown to the wrong person after an unmerge.

9. Output Requirements

Output Format Recipient Description
Link review item Work item Privacy officer / registration Link needing confirmation
Unmerge review item Work item Registration / privacy officer PEX record of the merged period with no encounter, to be assigned to one identity
Account notification Notification Account holder Access suspended; how to restore it
PortalAccessChanged Event Domain 8, audit Suspension, reinstatement, revocation

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Identity event for unknown identifier Lookup Ignore; log None
Out-of-order events Sequence per identity Hold and reorder, or suspend link None
Reinstatement without re-proofing Reason and evidence check Refuse Staff prompted to record re-proofing

11. State and Lifecycle Behaviour

Moves links and grants among Active, Suspended and Revoked (section 4.3). Revoked is terminal; a new enrolment is required afterwards.

12. Audit Requirements

Audited: every automatic and manual state change with trigger event ID, before and after identifiers, actor and reason.

13. Security and Privacy Requirements

A confirmed wrong-patient link is handled as a privacy incident under the hospital's incident process, with the list of items viewed available from audit. Recertification evidence supports SEC-004.

14. Acceptance Criteria

  • AC-01: Given two linked identities that are merged, when the merge event is received, then both links are Suspended and a review item exists.
  • AC-02: Given a link on a merged identity, when the merge is reversed, then the link is Suspended before any further patient data is served.
  • AC-03: Given a suspended link with an open session, when the session calls an API, then the call is refused.
  • AC-04: Given a duplicated merge event, when it is processed twice, then the link history shows one change.
  • AC-05: Given a confirmed wrong-patient link, when the privacy officer requests the access history, then all views made under the link are listed.
  • AC-06: Given a patient names a representative by mobile number, when the representative has not yet been verified at registration, then the grant stays Requested and gives no access.
  • AC-07: Given an unmerge, when EncounterCorrected with reason "Reattributed after unmerge" is received for an encounter, then the PEX records held under that CIN move to the named identity, and PEX records of the merged period with no encounter appear on the "Unmerge review" tab and are shown to neither account until assigned.

15. Dependencies and Integration

  • Upstream dependencies: Domain 1 identity events (INT-PEX-002); Domain 2 security monitoring signals.
  • Downstream dependencies: all PEX modules.
  • Required events or APIs: EVT-PEX-002 PortalAccessChanged.

16. Open Questions / Assumptions

  • Whether a link may follow a merge automatically, or must always be re-confirmed, depends on MPI governance (DEC-PEX-001). The working position is automatic only when a single link is involved.

Requirement FR-PEX-ACC-005: Patient View and Revocation of Third-Party Application Access

Attribute Description
Requirement ID FR-PEX-ACC-005
Requirement Name Patient view and revocation of third-party application access
Requirement Type Functional
Module Patient Identity Linking and Account Access
Functional Area FA-PEX-006 Patient-authorized applications
Priority Must
Criticality High
Requirement Status Draft
Source INT-007; CDS-014; SEC-008
Related Business Rule BR-PEX-015
Related Workflow None

1. Requirement Statement

The system shall show the patient every third-party application they have authorized, with the data scopes, purpose, grant date and expiry, shall let the patient revoke an authorization, and shall apply the same release policy and consent decisions to data served to such applications as to data shown in the portal.

2. Business Rationale

INT-007 requires patient-authorized third-party access to be scoped and revocable. The patient needs a place to see and revoke it, and an application must not become a route around release rules.

3. Actors and Permissions

Actor Permission Conditions
Patient View and revoke own application authorizations Authenticated with multi-factor authentication
Representative View and revoke Only if the grant scope includes it
Patient-authorized application Read within scopes Valid, unrevoked authorization; registered through Domain 2 partner onboarding

4. Preconditions - The application is registered and approved through Domain 2 partner onboarding (INT-006) and the authorization service is provided by Domain 10.

5. Trigger - The patient opens "connected applications", approves an authorization request, or revokes one.

6. Functional Behaviour

  1. During an authorization request, PEX presents the consent screen: application name, publisher, requested scopes in plain language, purpose and duration. The patient may approve or decline.
  2. PEX lists current authorizations read from the Domain 10 authorization service.
  3. Revocation is submitted to the authorization service; the list shows the state the service returns.
  4. Data served to applications through the Domain 2 FHIR or API facade is filtered by PEX release decisions: an item not Released to the patient is not served to an application acting on the patient's authorization.
  5. Application access is recorded in the patient's access history (FR-PEX-NTF-002).

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Authorization request Structured Yes Registered client; scopes within permitted set From authorization service
Patient decision Enumeration Yes Approve / decline Consent to the application
Authorization identifier Identifier Yes for revoke Belongs to patient Target of revocation

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-ACC-005-1 Scopes offered never exceed what the patient can see in the portal. No wider access by application.
PR-ACC-005-2 Revocation takes effect at the authorization service; PEX does not keep a separate grant state. One source of truth.
PR-ACC-005-3 Suspension or revocation of the account link revokes or suspends the patient's application authorizations. No orphaned access.

9. Output Requirements

Output Format Recipient Description
Consent screen Screen Patient Scopes, purpose, duration
Connected applications list Screen Patient Current authorizations
Revocation request API call Domain 10 authorization service Revoke

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Unregistered application Client registration Refuse request "This application is not approved to connect."
Authorization service unavailable on revoke Call failure Hold and retry; show "revocation pending" Patient told to retry or contact support if not confirmed
Scope beyond portal visibility PR-ACC-005-1 Remove scope or refuse Explained on consent screen

11. State and Lifecycle Behaviour

Authorization state is owned by Domain 10. PEX reflects it.

12. Audit Requirements

Audited: consent screen presented, decision, revocation, and each application data access (by the serving component) with application identity and scopes.

13. Security and Privacy Requirements

Tokens are scoped and time-limited; applications never receive unrestricted database access (CDS-014). Consent to an application is recorded with scope and purpose (SEC-008).

14. Acceptance Criteria

  • AC-01: Given an authorized application, when the patient revokes it, then the application's next request is refused.
  • AC-02: Given a result in state Withheld, when an authorized application requests the patient's results, then that result is not returned.
  • AC-03: Given a suspended account link, when an authorized application requests data, then the request is refused.
  • AC-04: Given an authorization, when the patient opens connected applications, then the scopes, grant date and expiry are shown.

15. Dependencies and Integration

  • Upstream dependencies: Domain 10 authorization and consent services; Domain 2 partner gateway and FHIR facade.
  • Downstream dependencies: FR-PEX-REL-001 for release filtering.
  • Required events or APIs: IF-PEX-006 (release decision query).

16. Open Questions / Assumptions

  • Third-party application access is in the first portal release, delivered with slice RC-6 (DEC-PEX-007, decided 2026-11-24). The primary owner of INT-007 is Domain 2 (ISE), with Domain 10 (ESS) for authorization.

← 5.1 Module Specification: Patient Portal and Patient-Facing Web/Mobile Experience | Contents | Identifier index | 5.3 Module Specification: Appointment Requests, Confirmations and Reminders →