EHR & Patient Management Workflows
This document defines nine core workflows for the EHR & Patient Management module. These workflows cover patient registration, demographics maintenance, MPI/duplicate resolution, allergy and problem list management, clinical documentation, document and consent management, and privacy controls (break‑the‑glass).
Regulatory context (UAE):
- UAE PDPL (Federal Decree-Law No. 45/2021) — governs personal data processing, consent, data subject rights, and breach notification.
- MOH / DOH / DHA — licensing, health information exchange (HIE) policies, and minimum dataset requirements.
- NABIDH (Dubai) / Malaffi (Abu Dhabi) — HIE platforms requiring timely, accurate ADT and clinical document submission.
- ADHICS / DHA Security Standards / TDRA/NESA — cybersecurity and audit requirements for access logging and BTG.
All workflows assume role-based access control (RBAC) using users, roles, permissions, and full auditability via audit_log.
WF-EHRPATIENTMGMT-001: Patient Registration (New)
Process Flow
Actor: Registration Clerk
Trigger: Patient arrives at facility (walk-in, scheduled appointment) or pre-registration via call/online request
Pre-conditions:
- Registration Clerk authenticated with
register_patientpermission. - Facility and registration location configured in
facilities/locations. - Emirates ID reader (if used) and scanner devices online.
- Clerk opens Patient Search screen (SCR-EHR-001) and selects facility context.
- Clerk searches for existing patient using one or more: - Emirates ID, MRN, passport number, mobile number, name + DOB.
- System queries:
-
patients,patient_identifiers,patient_demographics,duplicate_suspectsand displays: - Exact matches, probable matches (with match score), and “no results”. - Decision: Potential match found?
- If yes, clerk verifies identity (ID card, verbal confirmation of DOB, mobile).
- If no, proceed to new registration. - Decision: Identity confirmed as existing patient?
- If yes, system opens existing record; workflow ends (no new patient created).
- If no / uncertain, clerk flags as “possible duplicate” and continues with new registration (system will createduplicate_suspectsentry later via MPI job — outside this workflow). - Clerk opens Patient Registration Form (SCR-EHR-002) in “New” mode.
- Clerk captures core identity data: - English/Arabic names, DOB, gender, nationality, Emirates ID, passport, visa details. - System validates Emirates ID format (784-YYYY-NNNNNNN-C) and DOB plausibility.
- Clerk captures contact and socio-demographic details: - Mobile, email, PO Box, emirate, city, emergency contacts, marital status, occupation, employer.
- Clerk captures insurance information: - Payer, plan, member ID, card expiry, coverage start/end. - System calls Insurance Eligibility integration (INT-EHR-007) to validate member status.
- Clerk scans/uploads Emirates ID and insurance card via Document Management (SCR-EHR-008):
- System creates
patient_documentsentries with type “ID – Emirates ID”, “Insurance Card”.
- System creates
- System assigns MRN:
- Auto-generated based on facility-specific rules (e.g., prefix per facility) and ensures uniqueness in
patients.mrn.
- Auto-generated based on facility-specific rules (e.g., prefix per facility) and ensures uniqueness in
- System creates:
patientsrow (core identity and flags).patient_demographicsrow (current demographic snapshot).patient_identifiersrows for MRN, Emirates ID, passport, insurance member ID.
- System creates initial encounter shell (if appointment exists or walk-in):
- Calls Scheduling module (INT-EHR-003) to create or link
encountersrecord.
- Calls Scheduling module (INT-EHR-003) to create or link
- Clerk presents PDPL-compliant data processing consent (general treatment + data processing + HIE sharing) via Consent Management (SCR-EHR-009):
- Patient signs digitally; system inserts
patient_consentsrow and stores signed document inpatient_documents.
- Patient signs digitally; system inserts
- For inpatients, system prints wristband with MRN, name, DOB, barcode; for outpatients, prints appointment slip if needed.
- System:
- Sends ADT A04 (or A01 for admitted) to NABIDH/Malaffi (INT-EHR-001/002).
- Logs all actions in
audit_log(registration start/end, data created, consents).
Data Modified:
patients— INSERTpatient_demographics— INSERTpatient_identifiers— INSERT (multiple)patient_documents— INSERT (ID, insurance scans)patient_consents— INSERTaudit_log— INSERT (multiple events)encounters(in Scheduling module) — INSERT via integration (not owned here)
Mermaid Flowchart
Decision Points
- Potential match found? - If yes → verify identity; avoid duplicate creation. - If no → proceed with new patient creation.
- Identity confirmed as existing?
- If yes → open existing record; do not create new
patientsrow. - If no/uncertain → proceed but flag for MPI review. - Insurance eligibility valid? - If yes → mark insurance as verified; allow normal billing. - If no → mark as unverified; prompt for self-pay or alternative payer.
- Inpatient vs outpatient? - Inpatient → wristband printing mandatory. - Outpatient → appointment slip optional.
Integration Points
- Scheduling (INT-EHR-003)
- Direction: Bidirectional
- Data: Patient demographics, encounter creation/linkage
- Trigger: New registration or walk-in without existing encounter.
- Billing & Claims (INT-EHR-004)
- Direction: Outbound
- Data: Patient demographics, insurance details, encounter shell
- Trigger: Registration completion or insurance update.
- NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002)
- Direction: Bidirectional
- Data: ADT A04/A01 messages with demographics and encounter info
- Trigger: New patient registration, admission.
- Insurance Eligibility (INT-EHR-007)
- Direction: Bidirectional
- Data: Payer, member ID, DOB, name
- Trigger: Insurance details entry or update.
Exception Handling
- Duplicate MRN risk:
- System enforces unique MRN constraint; if conflict, regenerate MRN and log incident.
- Emirates ID validation failure:
- System blocks saving Emirates ID; allows registration with alternative ID, flags record as “ID not verified”.
- Insurance API timeout/error:
- System marks insurance status as “pending verification”; allows registration but flags for follow-up.
- HIE (NABIDH/Malaffi) transmission failure:
- ADT message queued with retry; if repeated failures, alert integration admin; registration not blocked.
- Consent refusal:
- System records refusal in
patient_consentswith status “declined”; may restrict data sharing to HIE per facility policy.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| Handwritten registration forms | Structured electronic registration wizard | Reduces errors, enforces mandatory fields |
| Photocopies of Emirates ID and insurance cards | Scanned/uploaded images stored in patient_documents |
Instant availability across departments |
| Manual insurance verification via phone/fax | Real-time API eligibility checks | Faster throughput, audit trail of verification |
| Wet-ink signatures on general consent forms | Digital consent with signature capture and expiry tracking | Supports PDPL compliance and reporting |
Remaining Paper Touchpoints: Optional printed wristbands and appointment slips; can be minimized if facility uses mobile/virtual tokens.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
| Patient / Registration Desk | Emirates ID, passport, identity documents | Physical scan / barcode reader |
| Registration Clerk | Name (EN/AR), DOB, gender, nationality, contact details | SCR-EHR-002 registration form |
| Registration Clerk | Insurance details (payer, plan, member ID) | SCR-EHR-002 insurance section |
| Insurance Eligibility API (INT-EHR-007) | Eligibility status, coverage details | REST API response |
| Scheduling Module (INT-EHR-003) | Existing appointment / encounter linkage | Internal REST API |
| Patient / Clerk | Signed consent (general treatment, PDPL, HIE sharing) | Tablet e-signature capture |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
patients |
Core patient record (MRN, identity, flags) | SQL INSERT |
patient_demographics |
Current demographic snapshot | SQL INSERT |
patient_identifiers |
MRN, Emirates ID, passport, insurance member ID | SQL INSERT (multiple rows) |
patient_documents |
Scanned Emirates ID and insurance card | SQL INSERT + file storage |
patient_consents |
Signed consent record | SQL INSERT |
| Scheduling Module (INT-EHR-003) | Encounter shell creation/linkage | Internal REST API |
| NABIDH / Malaffi (INT-EHR-001/002) | ADT A04/A01 message | HL7 v2.5.1 over MLLP/TLS |
audit_log |
Registration events | SQL INSERT (multiple) |
Post-conditions:
- Patient record exists with unique MRN and validated Emirates ID
- Insurance eligibility status recorded (verified, unverified, or pending)
- PDPL-compliant consent captured and stored
- ADT message queued or transmitted to applicable HIE
- Encounter shell created or linked in Scheduling module
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| Walk-in registration (start to completion) | < 10 minutes | Alert Registration Supervisor at 15 min | audit_log.created_at (end minus start) |
| Insurance eligibility API response | < 5 seconds | Mark as pending if > 10s; alert IT if > 30s | integration_message_log.response_time_ms |
| Emirates ID validation | < 2 seconds | N/A — inline validation | Client-side |
| ADT A04/A01 transmission to HIE | < 5 seconds | Retry queue; alert integration admin after 10 min | integration_message_log.sent_at |
| MRN generation | < 1 second | Alert IT if uniqueness conflict | patients.created_at |
| Consent capture (presentation to signature) | < 3 minutes | None — patient-driven | patient_consents.granted_datetime |
| Pre-registration (portal/phone) | < 5 minutes | None — self-service | audit_log.created_at |
State Transition Diagram
WF-EHRPATIENTMGMT-002: Patient Demographics Update
Process Flow
Actor: Registration Clerk, Senior Registration Clerk, Patient (via Portal)
Trigger: Patient reports change in personal information or periodic verification; insurance change; portal self-service update
Pre-conditions:
- Patient exists in
patients. - Actor authenticated with appropriate permissions:
- Clerk:
update_demographics - Senior Clerk:
approve_demographic_changes - Patient:
update_contact_info(limited fields via portal).
- Actor opens Patient Search (SCR-EHR-001) and locates patient by MRN/Emirates ID/name.
- System displays Patient Demographics View/Edit (SCR-EHR-003) with: - Current demographics and change history. - Highlighting of previously modified fields.
- Actor initiates “Edit” mode; system checks: - For portal users, restricts editable fields (contact info, address, emergency contacts, insurance).
- Actor updates relevant fields: - Address, PO Box, emirate, mobile, email, emergency contacts, insurance details, next-of-kin.
- System validates: - Emirates ID format (if changed). - Mobile number format (+971 5X XXX XXXX). - Email syntax.
- Decision: Critical fields changed? (name, DOB, Emirates ID, gender)
- If yes, system flags update as “critical change” requiring Senior Clerk approval. - If no, change can be auto-approved. - System creates new
patient_demographicsrow with updated values andeffective_date= now; previous row remains for history. - System updates
patient_identifiersif Emirates ID, passport, or insurance member ID changed: - Inserts new identifier rows withis_primaryflags and expiry of old identifiers. - For portal-initiated changes: - System sets status “pending approval” for critical changes; visible to Senior Clerk work queue.
- Senior Registration Clerk reviews pending critical changes:
- Compares before/after values, may request supporting documents (e.g., updated Emirates ID scan).
- Approves or rejects change.
- Upon approval:
- System finalizes changes (if not already applied) and logs approval in
audit_log.
- System finalizes changes (if not already applied) and logs approval in
- System sends ADT A08 (update) to:
- NABIDH/Malaffi (INT-EHR-001/002).
- Scheduling and Billing modules (INT-EHR-003/004).
- System logs full before/after snapshots for each changed field in
audit_log.
Data Modified:
patient_demographics— INSERT (new snapshot)patient_identifiers— INSERT/UPDATE (new identifiers, mark old as non-primary/expired)patient_documents— INSERT (if new ID/insurance scans uploaded)audit_log— INSERT (field-level change records, approvals)
Mermaid Flowchart
Decision Points
- Validation passed? - If no → user must correct invalid Emirates ID/mobile/email before saving.
- Critical fields changed? - If yes → require Senior Clerk approval; changes may be staged as pending. - If no → auto-apply changes.
- Senior Clerk approval? - If approved → finalize changes and propagate downstream. - If rejected → revert pending changes; notify originator (clerk or patient).
Integration Points
- NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002)
- ADT A08 messages with updated demographics.
- Scheduling (INT-EHR-003)
- Updated demographics for appointment communications.
- Billing & Claims (INT-EHR-004)
- Updated insurance details for claim accuracy.
- Patient Portal (INT-EHR-006)
- FHIR
Patientupdates initiated by patient; status flags for pending approval.
Exception Handling
- Invalid Emirates ID or mobile:
- System blocks save; displays field-level error messages.
- Portal user attempts to change restricted fields (e.g., DOB):
- System disallows direct change; offers “request correction” workflow (logged for HIM review).
- HIE update failure:
- ADT A08 queued; retries with backoff; integration admin alerted on repeated failures.
- Approval SLA breach (e.g., pending > 48 hours):
- System escalates to HIM Supervisor via dashboard/notification.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| Paper “change of information” forms | In-app edit with tracked snapshots and approvals | Eliminates manual filing and misfiled forms |
| Manual chart annotations for demographic changes | Versioned patient_demographics records with effective dates |
Clear history for audits and medico-legal review |
| Physical copies of updated IDs | Scanned images linked to identifiers | Quick verification, no physical storage required |
| Phone-based updates without documentation | Portal self-service with full audit trail | Improves accuracy and patient engagement |
Remaining Paper Touchpoints: None — fully digital for facilities using scanners and portal; optional printed confirmation receipts if desired.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
| Registration Clerk / Patient (Portal) | Updated demographic fields (address, mobile, email, insurance, emergency contacts) | SCR-EHR-003 edit form or FHIR Patient PATCH |
| EHR | Current patient record and change history | patients, patient_demographics, patient_identifiers tables |
| Senior Registration Clerk | Approval/rejection for critical field changes | SCR-EHR-003 approval queue |
| Patient | Supporting documents (e.g., updated Emirates ID scan) | Scanned upload |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
patient_demographics |
New demographic snapshot with effective date | SQL INSERT |
patient_identifiers |
Updated/new identifier rows | SQL INSERT/UPDATE |
patient_documents |
New ID/insurance scans (if uploaded) | SQL INSERT + file storage |
audit_log |
Field-level before/after change records and approvals | SQL INSERT |
| NABIDH / Malaffi (INT-EHR-001/002) | ADT A08 demographic update | HL7 v2.5.1 over MLLP/TLS |
| Scheduling (INT-EHR-003) | Updated demographics for appointment communications | Internal REST API |
| Billing & Claims (INT-EHR-004) | Updated insurance details | Internal REST API |
Post-conditions:
- New
patient_demographicssnapshot exists with effective date and previous snapshot preserved - Critical field changes approved by Senior Clerk (if applicable)
- ADT A08 transmitted to HIE and downstream modules
- Full audit trail with before/after values for every changed field
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| Non-critical update (clerk-initiated) | < 5 minutes | None — clerk workflow | audit_log.created_at |
| Critical change approval (Senior Clerk) | < 48 hours | Escalate to HIM Supervisor at 48h | audit_log.pending_approval_since |
| Portal-initiated update processing | < 24 hours for critical; immediate for non-critical | Dashboard alert for pending items | audit_log.created_at |
| ADT A08 transmission to HIE | < 5 seconds | Retry queue; alert integration admin after 10 min | integration_message_log.sent_at |
| Downstream module notification (Scheduling, Billing) | < 5 seconds | Alert IT if > 30s | integration_message_log.sent_at |
Note: Demographics updates modify the existing patient record through versioned snapshots. No separate state diagram is required; the update follows a linear path from edit to validation to approval (if critical) to propagation.
WF-EHRPATIENTMGMT-003: Patient Merge / Duplicate Resolution (MPI)
Process Flow
Actor: Medical Records Officer (MRO), HIM Supervisor
Trigger: System flags potential duplicates via MPI algorithm or staff reports duplicate MRNs
Pre-conditions:
- Duplicate candidates exist in
duplicate_suspectswith status “new” or “in review”. - MRO authenticated with
merge_records; HIM Supervisor withapprove_merges.
- MRO opens Duplicate Resolution screen (SCR-EHR-010) and views
duplicate_suspectslist. - MRO selects a suspect pair; system loads side-by-side comparison:
-
patients,patient_demographics,patient_identifiers, key encounter counts. - MRO reviews identifiers (Emirates ID, passport, mobile, address, insurance) and clinical context.
- Decision: Are records duplicates?
- If no, MRO marks suspect as “not duplicate” with reason; workflow ends.
- If yes, proceed to select surviving record. - MRO selects “primary/surviving” patient record and “secondary/to be merged” record.
- System generates merge preview:
- Lists all linked entities to secondary patient: encounters, orders, results,
clinical_notes,patient_documents,patient_allergies,patient_problems,patient_consents, etc. - MRO reviews preview, adjusts field-level preferences if supported (e.g., choose preferred address).
- MRO submits merge request for approval; status of
duplicate_suspectsset to “pending_approval”. - HIM Supervisor opens pending merge request, reviews comparison and merge impact.
- Decision: Approve merge?
- If no, marks as “rejected” with reason; no data changes.
- If yes, approves merge.
- System executes merge transactionally:
- Updates all FKs in owned tables (
patient_allergies,patient_problems,clinical_notes,patient_documents,patient_consents,audit_log) from secondary to primarypatient_id. - Marks secondary
patients.is_active = falseand stores reference to primary (e.g.,merged_into_patient_id).
- Updates all FKs in owned tables (
- System updates
duplicate_suspects:status = 'resolved',resolution = 'merged',reviewed_by,reviewed_at.
- System broadcasts ADT A40 (merge) to:
- NABIDH/Malaffi (INT-EHR-001/002).
- Downstream modules via internal ADT (all modules referencing patient).
- System generates merge audit report and logs detailed events in
audit_log.
Data Modified:
patients— UPDATE (secondary record deactivated, merged_into reference)patient_allergies— UPDATE (patient_id)patient_problems— UPDATE (patient_id)clinical_notes— UPDATE (patient_id)patient_documents— UPDATE (patient_id)patient_consents— UPDATE (patient_id)audit_log— INSERT (merge actions)duplicate_suspects— UPDATE (status, resolution, reviewed_by, reviewed_at)
Mermaid Flowchart
Decision Points
- Are records duplicates? - If no → mark suspect as “not duplicate”; no merge. - If yes → proceed to merge workflow.
- Approve merge? - If yes → execute merge and propagate. - If no → reject; keep both records active.
- Field-level preference (optional): - For conflicting demographics, system may allow choosing which value to keep (e.g., newer address vs older).
Integration Points
- All downstream modules (via ADT A40)
- Direction: Outbound
- Data: Merge information (old MRN → new MRN, patient IDs).
- Trigger: Successful merge.
- NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002)
- ADT A40 messages to maintain HIE MPI consistency.
Exception Handling
- Merge conflict during FK updates:
- System performs merge in a database transaction; on error, rolls back and logs incident; marks suspect as “error” for manual investigation.
- Attempt to merge patients with conflicting Emirates IDs:
- System enforces additional warning/hard stop; may require documented justification.
- HIE merge message failure:
- ADT A40 queued with retries; integration admin alerted; local merge still valid but flagged for reconciliation.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| Paper merge request forms routed to HIM | Electronic merge request and approval workflow | Faster resolution, clear accountability |
| Manual physical chart consolidation | Automated reassignment of all linked data to primary record | Eliminates lost documents and misfiled charts |
| Handwritten notes on old MRNs | System-level deactivation with merged_into reference |
Ensures all users see correct, single patient record |
| Separate paper logs of merges | Structured duplicate_suspects and audit_log entries |
Supports regulatory audits and quality KPIs |
Remaining Paper Touchpoints: None — fully digital.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
duplicate_suspects |
Candidate pair (patient_id_1, patient_id_2, match_score) | SQL row |
patients / patient_demographics / patient_identifiers |
Side-by-side identity and demographic data for each candidate | SQL query results |
| MRO review decision | Duplicate confirmed / not duplicate + justification | UI form input |
| HIM Supervisor | Merge approval / rejection + comments | UI approval action |
| Linked entity counts | Encounters, orders, results, notes, documents per candidate | SQL aggregate queries |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
patients |
Secondary record deactivated (is_active = false, merged_into_patient_id) |
SQL UPDATE |
All owned tables (patient_allergies, patient_problems, clinical_notes, patient_documents, patient_consents) |
FK repointed from secondary to primary patient_id |
SQL UPDATE (transactional) |
duplicate_suspects |
Status updated to resolved / not_duplicate / rejected |
SQL UPDATE |
audit_log |
Merge actions with before/after FK mappings | SQL INSERT (multiple) |
| NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002) | ADT A40 merge notification | HL7 v2.5.1 over MLLP/TLS |
| Downstream modules (Scheduling, Billing, CPOE, LIS, RIS, PIS) | ADT A40 internal merge notification | Internal REST API / event bus |
Post-conditions:
- Secondary patient record is deactivated with
merged_into_patient_idreference - All clinical and administrative records repointed to primary patient
duplicate_suspectsentry resolved with reviewer and timestamp- ADT A40 transmitted to HIE and all downstream modules
- Full audit trail documenting every FK change and approval decision
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| MPI suspect pair review (MRO) | < 24 hours from flagging | Dashboard alert at 24h; escalate to HIM Supervisor at 48h | duplicate_suspects.created_at vs reviewed_at |
| Side-by-side comparison and decision | < 15 minutes per pair | None — workflow metric | audit_log timestamps |
| HIM Supervisor approval | < 48 hours from submission | Escalate to HIM Director at 72h | audit_log.pending_approval_since |
| Merge execution (transactional) | < 30 seconds | Auto-rollback on timeout; alert DBA | audit_log.created_at |
| ADT A40 to HIE | < 5 seconds | Retry queue; alert integration admin after 10 min | integration_message_log.sent_at |
| ADT A40 to downstream modules | < 5 seconds | Alert IT if > 30s | integration_message_log.sent_at |
State Transition Diagram
WF-EHRPATIENTMGMT-004: Allergy Documentation
Process Flow
Actor: Physician, Nurse, Pharmacist
Trigger: Patient encounter (admission, clinic visit, ED) requiring allergy review; new allergy reported
Pre-conditions:
- Patient and encounter context established.
- Actor has
manage_allergiespermission.
- Clinician opens Allergy Management screen (SCR-EHR-005) from patient chart.
- System displays current allergy list from
patient_allergies: - Active, inactive, entered-in-error, and NKA/NKDA flags. - Clinician reviews existing entries with patient; updates status if needed (e.g., resolved, entered-in-error).
- Decision: New allergy or intolerance to add?
- If no, clinician may confirm “reviewed” and exit.
- If yes, proceed to add. - Clinician searches allergen:
- Drug allergens via RxNorm; food/environmental via SNOMED CT.
- System suggests common allergens and maps codes to
allergen_code/allergen_system. - Clinician selects allergen and records: - Reaction type (allergy vs intolerance vs adverse event). - Severity (mild, moderate, severe, life-threatening). - Manifestation (coded SNOMED term, e.g., rash, anaphylaxis). - Onset date, verification status (confirmed, unconfirmed), reporter.
- System validates required fields and checks for duplicates (same allergen + similar reaction).
- Decision: Duplicate or near-duplicate found?
- If yes, system prompts to update existing entry instead of creating new.
- If no, proceed to save. - System inserts new row into
patient_allergieslinked to currentencounter_idandentered_by. - If clinician records NKA/NKDA:
- System inserts special-coded entries or flags in
patient_allergiesto represent NKA/NKDA status.
- System inserts special-coded entries or flags in
- System updates patient chart:
- Allergy banner, CPOE CDS context (via INT-EHR-005), and risk alerts.
- System logs action in
audit_log(add/update, old/new values).
Data Modified:
patient_allergies— INSERT/UPDATEaudit_log— INSERT
Mermaid Flowchart
Decision Points
- New allergy to add? - If no → mark list as reviewed; no new entries.
- Validation ok? - If no → user must complete mandatory fields.
- Duplicate found? - If yes → encourage updating existing entry to avoid clutter and confusion.
Integration Points
- CPOE (INT-EHR-005)
- Direction: Outbound
- Data: Updated allergy list for CDS (drug-allergy checks).
- Trigger: Insert/update in
patient_allergies. - NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002)
- Direction: Outbound
- Data: Allergy updates in ADT or CDA/clinical document payloads.
- Trigger: Allergy list changes, note signing.
Exception Handling
- Terminology service unavailable (RxNorm/SNOMED):
- System allows free-text allergen entry with local code; flags for later normalization.
- Conflicting NKA vs existing allergies:
- System prevents setting NKA/NKDA if active allergies exist; requires deactivation or clarification.
- Allergy entered in error:
- Clinician can mark as “entered-in-error”; system retains record but excludes from CDS.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| Handwritten allergy stickers on paper charts | Structured patient_allergies records with coded allergens |
Enables automated CDS and HIE sharing |
| Verbal-only allergy communication | Persistent, visible allergy banner in EHR | Reduces risk of missed allergies |
| Paper allergy bands updated manually | Electronic alerts integrated with CPOE and MAR | Supports safer ordering and administration |
Remaining Paper Touchpoints: Physical allergy wristbands may still be used at bedside but are driven by digital data.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
patient_allergies |
Current allergy list (active, inactive, NKA/NKDA flags) | SQL query results |
| Clinician input | Allergen selection, reaction type, severity, manifestation, onset date | UI form input |
| RxNorm terminology service | Drug allergen lookup and coding | REST API / terminology service |
| SNOMED CT terminology service | Food/environmental allergen and manifestation coding | REST API / terminology service |
| Patient / caregiver report | Allergy history and reaction description | Verbal → structured entry |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
patient_allergies |
New or updated allergy record with coded allergen, reaction, severity | SQL INSERT / UPDATE |
audit_log |
Add/update/review actions with before/after values | SQL INSERT |
| CPOE CDS context (INT-EHR-005) | Updated allergy list for drug-allergy interaction checks | Internal REST API / event |
| Patient chart | Allergy banner update | UI refresh |
| NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002) | Allergy updates in ADT or CDA clinical document | HL7 v2.5.1 / FHIR AllergyIntolerance |
Post-conditions:
patient_allergiesreflects current, coded allergy status with full provenance- CPOE CDS context updated for real-time drug-allergy checking
- Allergy banner in patient chart reflects latest data
- Full audit trail for every allergy add, update, or status change
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| Allergy list display on chart open | < 2 seconds | Performance alert if > 5s | Application performance monitoring |
| Allergen search (RxNorm/SNOMED) | < 3 seconds per query | Fallback to free-text if service unavailable | Terminology service response log |
| Save new allergy record | < 2 seconds | None — system operation | patient_allergies.created_at |
| CDS context propagation to CPOE | < 5 seconds | Alert IT if > 30s | integration_message_log.sent_at |
| HIE allergy update transmission | < 5 seconds | Retry queue; alert integration admin after 10 min | integration_message_log.sent_at |
Note: Allergy documentation is a linear data-entry workflow that adds or updates individual records. No separate entity lifecycle or state diagram is required.
WF-EHRPATIENTMGMT-005: Problem List Management
Process Flow
Actor: Physician
Trigger: New diagnosis, encounter assessment, periodic problem list review
Pre-conditions:
- Patient and encounter context established.
- Physician has
manage_problem_listpermission.
- Physician opens Problem List screen (SCR-EHR-006) from patient chart.
- System displays current active and resolved problems from
patient_problemswith ICD-10-AM and SNOMED codes. - Physician reviews list with patient; identifies outdated or incorrect entries.
- Decision: New problem to add?
- If no, physician may update statuses or priorities and exit.
- If yes, proceed to add. - Physician searches for problem: - Free-text search mapped to ICD-10-AM and SNOMED CT via terminology service.
- Physician selects appropriate coded problem and enters attributes: - Onset date, status (active, resolved, ruled out), priority (chronic, acute, high-risk), treating provider.
- Physician links problem to current encounter and optionally to supporting evidence (labs, imaging, notes).
- System validates coding completeness (ICD-10-AM required; SNOMED optional but recommended).
- Decision: Problem already exists as active?
- If yes, system suggests updating existing entry (e.g., adjust priority or add evidence) instead of creating duplicate.
- If no, proceed to save. - System inserts or updates
patient_problemsrow withentered_byandencounter_id. - Physician may resolve/inactivate problems:
- Sets
status = resolvedandresolved_date, with reason (e.g., condition resolved, misdiagnosis).
- Sets
- System updates:
- Problem list view, CPOE indication-based ordering context, and case management flags.
- System logs all changes in
audit_log.
Data Modified:
patient_problems— INSERT/UPDATEaudit_log— INSERT
Mermaid Flowchart
Decision Points
- New problem to add? - If no → only updates to existing problems.
- Validation ok? - If no → enforce ICD-10-AM coding and required attributes.
- Active problem already exists? - If yes → encourage updating instead of duplicating.
Integration Points
- CPOE (INT-EHR-005)
- Direction: Outbound
- Data: Updated problem list for indication-based ordering and CDS.
- Trigger: Problem list changes.
- Billing & Claims (INT-EHR-004)
- Direction: Outbound
- Data: ICD-10-AM codes for encounters.
- Trigger: Problem list updates linked to encounters.
- Case Management / Chronic Disease Programs
- Direction: Outbound (internal)
- Data: Chronic problem flags and priorities.
Exception Handling
- Terminology service unavailable:
- System allows temporary free-text problem with local code; flags for later coding.
- Conflicting statuses (e.g., same problem active and resolved):
- System warns and suggests consolidating entries.
- Problem entered in error:
- Physician can mark as “entered-in-error”; system retains record but excludes from active lists.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| Handwritten problem lists on chart covers | Structured, coded patient_problems table |
Supports analytics, billing, and CDS |
| Manual updates with strike-throughs | Versioned updates with onset/resolution dates | Clear longitudinal view of patient conditions |
| Separate paper lists for chronic disease registries | Electronic flags and reports | Facilitates population health management |
Remaining Paper Touchpoints: None — fully digital.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
patient_problems |
Current active and resolved problem list with ICD-10-AM/SNOMED codes | SQL query results |
| Physician input | Diagnosis selection, onset date, status, priority, treating provider | UI form input |
| ICD-10-AM terminology service | Diagnosis code lookup and validation | REST API / terminology service |
| SNOMED CT terminology service | Clinical finding mapping | REST API / terminology service |
| Supporting evidence (labs, imaging, notes) | Linkable references for problem substantiation | Internal references |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
patient_problems |
New or updated problem record with coded diagnosis, status, priority | SQL INSERT / UPDATE |
audit_log |
Add/update/resolve actions with before/after values | SQL INSERT |
| CPOE CDS context (INT-EHR-005) | Updated problem list for indication-based ordering | Internal REST API / event |
| Billing & Claims (INT-EHR-004) | ICD-10-AM codes linked to encounters | Internal REST API |
| Case Management | Chronic problem flags and priority changes | Internal REST API / event |
| Patient chart | Problem list view refresh | UI refresh |
Post-conditions:
patient_problemsreflects current, coded problem status with full provenance- CPOE CDS context updated for indication-based ordering support
- Billing module notified of ICD-10-AM codes for encounter coding
- Chronic disease registries and case management flags updated
- Full audit trail for every problem add, update, resolve, or status change
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| Problem list display on chart open | < 2 seconds | Performance alert if > 5s | Application performance monitoring |
| Diagnosis search (ICD-10-AM/SNOMED) | < 3 seconds per query | Fallback to free-text if service unavailable | Terminology service response log |
| Save new/updated problem record | < 2 seconds | None — system operation | patient_problems.updated_at |
| CDS context propagation to CPOE | < 5 seconds | Alert IT if > 30s | integration_message_log.sent_at |
| Billing notification of ICD-10-AM codes | < 5 seconds | Alert IT if > 30s | integration_message_log.sent_at |
Note: Problem list management is a linear data-entry workflow that adds, updates, or resolves individual problem records. No separate entity lifecycle or state diagram is required.
WF-EHRPATIENTMGMT-006: Clinical Notes / Documentation
Process Flow
Actor: Physician, Nurse, Allied Health Professional
Trigger: Patient encounter requires documentation (H&P, progress note, discharge summary, nursing assessment, consultation)
Pre-conditions:
- Patient and encounter context established.
- User has appropriate documentation permissions (
document_notes,document_nursing_notes, etc.).
- Clinician opens Clinical Notes screen (SCR-EHR-007) from patient chart.
- System prompts for note type (H&P, progress, discharge, nursing, allied health) and template.
- Clinician selects template; system loads structured sections and auto-populates: - Demographics, vitals, medications, allergies, problem list, recent results.
- Clinician documents: - Structured fields (e.g., ROS, physical exam) and free-text narrative; may use voice-to-text and smart phrases.
- Clinician may link note to specific problems, orders, or procedures.
- System validates: - Required sections completed for note type (e.g., discharge summary must include diagnosis, medications, follow-up).
- Decision: Save as draft or sign?
- If draft, note remains editable; status = “draft”.
- If sign, proceed to signature workflow. - For signing:
- System confirms user identity and checks
sign_notespermission. - For trainees, system may require co-signature by supervising physician. - Clinician signs note electronically:
- System sets
status = 'signed', recordssigned_by,signed_datetime. - Decision: Co-signature required?
- If yes, system notifies cosigner and sets
cosigner_idpending. - If no, note considered final.
- If yes, system notifies cosigner and sets
- After signing, note content becomes immutable; corrections require addendum:
- New
clinical_notesrow withaddendum_ofreferencing original.
- New
- System:
- Updates patient chart timeline.
- Generates CDA or FHIR
DocumentReferencefor HIE (NABIDH/Malaffi) where applicable.
- System logs all actions (create, edit, sign, addendum) in
audit_log.
Data Modified:
clinical_notes— INSERT/UPDATEaudit_log— INSERT
Mermaid Flowchart
Decision Points
- Validation ok? - If no → enforce completion of mandatory sections.
- Save as draft or sign? - Draft → editable; Signed → immutable.
- Co-signature required? - Based on user role, note type, and facility policy.
Integration Points
- NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002)
- Direction: Outbound
- Data: CDA clinical documents or FHIR resources representing signed notes.
- Trigger: Note signed.
- CPOE / RIS / LIS
- Direction: Internal
- Data: Notes may reference orders/results; no direct write-back but used for context.
Exception Handling
- Attempt to edit signed note:
- System blocks direct edits; offers addendum workflow.
- HIE document submission failure:
- CDA/FHIR document queued; retries; integration admin alerted if persistent.
- Signature failure (session timeout):
- User prompted to re-authenticate before signing.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| Handwritten progress notes and H&P forms | Structured electronic notes with templates | Improves legibility and completeness |
| Dictation tapes and manual transcription | Direct entry with voice-to-text and smart phrases | Reduces turnaround time and cost |
| Paper discharge summaries sent by fax | CDA/FHIR documents shared via NABIDH/Malaffi | Enhances continuity of care across facilities |
Remaining Paper Touchpoints: Printed discharge summaries may still be provided to patients who request paper copies.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
| Clinician selection | Note type (H&P, progress, discharge, nursing, allied health) and template | UI form input |
| Auto-populated data | Demographics, vitals, medications, allergies, problem list, recent results | SQL query results (from multiple tables) |
| Clinician documentation | Structured fields (ROS, exam), free-text narrative, voice-to-text | UI form input / voice capture |
| Problem/order linkages | References to patient_problems, orders, procedures |
Internal references |
| Cosigner identity (if required) | Supervising physician for trainee notes | providers lookup |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
clinical_notes |
New note record (draft or signed) with structured and narrative content | SQL INSERT / UPDATE |
clinical_notes (addendum) |
Addendum row referencing original note | SQL INSERT |
audit_log |
Create, edit, sign, co-sign, addendum actions | SQL INSERT |
| NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002) | CDA clinical document or FHIR DocumentReference | HL7 CDA / FHIR R4 |
| Patient chart timeline | Updated note listing | UI refresh |
Post-conditions:
- Signed note is immutable; corrections require addendum
- CDA/FHIR document generated and queued for HIE submission (for signed notes)
- Co-signature workflow initiated if required by role/note type
- Full audit trail for every note lifecycle event
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| Template load and auto-population | < 3 seconds | Performance alert if > 10s | Application performance monitoring |
| Draft save | < 2 seconds | None — system operation | clinical_notes.updated_at |
| Electronic signature processing | < 2 seconds | Re-authentication prompt if session expired | clinical_notes.signed_datetime |
| Co-signature completion | < 24 hours | Dashboard alert to cosigner at 24h; escalate to department head at 48h | clinical_notes.cosigned_datetime |
| CDA/FHIR document submission to HIE | < 30 seconds | Retry queue; alert integration admin after 10 min | integration_message_log.sent_at |
| Discharge summary completion (for discharge encounters) | Before patient leaves facility | Alert attending physician if unsigned at discharge | clinical_notes.signed_datetime vs encounters.discharge_datetime |
Note: Clinical notes follow a simple linear lifecycle (Draft → Signed → optionally Addendum). This progression is managed through the
statusfield onclinical_notesand does not warrant a separate state diagram.
WF-EHRPATIENTMGMT-007: Document Management (Scanned/Uploaded)
Process Flow
Actor: Medical Records Clerk, Nurse, Patient (via Portal)
Trigger: External documents received (referral letters, outside records, consent forms), patient uploads via portal
Pre-conditions:
- Patient exists in
patients. - Scanners and upload endpoints available.
- User has
scan_documentsorupload_documentspermission.
- User opens Document Management screen (SCR-EHR-008) for selected patient.
- User clicks “Scan/Upload” and selects source: - Scanner (for paper), file upload (PDF, image), or portal upload.
- System prompts for metadata: - Document type (from master data), title/description, document date, source (external provider, patient), language.
- User optionally links document to specific encounter.
- System validates: - File type (PDF, JPEG, PNG, TIFF), size limits, required metadata.
- Decision: Validation passed?
- If no, system shows errors and prevents upload.
- If yes, proceed. - System stores file in secure repository and creates
patient_documentsrow: -file_path,mime_type,file_size,upload_date,uploaded_by,document_type,encounter_id. - System triggers OCR (Arabic + English) for text-extractable formats:
- Stores OCR text in
ocr_textfield. - Decision: Clinical relevance review required? (e.g., external reports)
- If yes, system routes document to responsible provider’s review queue.
- If no, document immediately visible in chart. - Provider reviews document (if required) and may:
- Mark as “reviewed”, add note, or link to specific problems.
- System applies retention policy:
- Sets
retention_datebased on document type and UAE regulations/facility policy.
- Sets
- System logs all actions in
audit_log.
Data Modified:
patient_documents— INSERT/UPDATEaudit_log— INSERT
Mermaid Flowchart
Decision Points
- Validation passed? - If no → user must correct metadata or file issues.
- Clinical review required? - Based on document type; e.g., external clinical reports require review.
- Provider review outcome (implicit): - May influence how document is displayed or linked in chart.
Integration Points
- Patient Portal (INT-EHR-006)
- Direction: Bidirectional
- Data: Patient-uploaded documents and provider-reviewed status.
- Trigger: Portal upload or provider review.
- NABIDH
- Direction: Outbound
- Data: Certain document types may be shared as CDA or PDF attachments.
- Trigger: Document classification and facility policy.
Exception Handling
- Unsupported file type or oversized file:
- System rejects upload with clear message and allowed formats.
- OCR failure:
- System logs error; document remains available without searchable text.
- Accidental upload to wrong patient:
- User with appropriate permission can reassign document to correct patient; action fully audited.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| Physical filing cabinets with paper records | Centralized digital repository (patient_documents) |
Reduces storage costs and retrieval time |
| Manual chart transport between departments | Instant electronic access from any location | Improves care coordination |
| Paper-based external reports stored in separate folders | Integrated into patient chart with OCR search | Enhances information availability and searchability |
Remaining Paper Touchpoints: Incoming paper documents from external providers; these are scanned at point of receipt and not retained beyond required archival policies.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
| User action | Scan, file upload, or portal upload trigger | UI action |
| File source | Document file (PDF, JPEG, PNG, TIFF) | Binary file |
| User input | Document type, title, date, source, language, encounter linkage | UI form input |
| Master data | Document type catalog with retention rules | document_types lookup |
| Patient Portal (INT-EHR-006) | Patient-uploaded documents | REST API / file upload |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
| Secure file repository | Stored document file | Binary file (encrypted at rest) |
patient_documents |
Metadata row (file_path, mime_type, file_size, document_type, OCR text) | SQL INSERT |
audit_log |
Upload, review, reassignment actions | SQL INSERT |
| Provider review queue | Routing notification for clinical review (if required) | Internal notification |
| NABIDH (selected document types) | CDA or PDF attachment for HIE sharing | HL7 CDA / attachment |
Post-conditions:
- Document securely stored with full metadata and encounter linkage
- OCR text extracted and searchable (for text-extractable formats)
- Clinical review routed if document type requires provider review
- Retention date set based on document type and UAE regulatory policy
- Full audit trail for upload, review, and any reassignment
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| File upload and storage | < 10 seconds (for files up to 25 MB) | Alert IT if storage service unavailable | patient_documents.upload_date |
| Metadata validation | < 2 seconds | None — immediate UI feedback | Application log |
| OCR processing | < 60 seconds per page | Log OCR failure; document remains available without text | OCR service log |
| Clinical review routing | < 1 minute after upload | None — automatic | patient_documents.review_status |
| Provider review completion | < 48 hours | Dashboard alert at 48h; escalate to department head at 72h | patient_documents.reviewed_at |
Note: Document management is a linear upload-and-review workflow. No separate entity lifecycle or state diagram is required.
WF-EHRPATIENTMGMT-008: Patient Consent Management
Process Flow
Actor: Registration Clerk, Nurse, Patient (via Portal), HIM Supervisor, Privacy Officer
Trigger: Registration, procedure scheduling, data sharing with HIE, PDPL data processing requirements
Pre-conditions:
- Patient exists in
patients. - Consent templates configured in master data (general treatment, PDPL data processing, HIE sharing, procedure-specific).
- User opens Consent Management screen (SCR-EHR-009) for patient.
- System lists existing consents from
patient_consentswith type, scope, status, expiry. - User selects consent type to obtain: - General treatment, PDPL data processing, specific procedure, HIE data sharing, research (if applicable).
- System presents consent form: - In patient’s preferred language (Arabic/English), using configured template.
- User explains consent; patient reviews on tablet/terminal or via portal.
- Patient provides electronic signature: - On-screen signature pad, or OTP-based confirmation for portal.
- System captures:
-
signature_data,signature_method,granted_datetime,consent_scope,witness_id(if required). - System inserts new
patient_consentsrow and stores signed document inpatient_documents(linked byconsent_id). - System evaluates expiry rules:
- Sets
expiry_datetimebased on consent type (e.g., general treatment valid for episode; PDPL consent until withdrawn). - Decision: Existing conflicting consent? (e.g., previous refusal for HIE sharing)
- If yes, system marks previous consent as superseded or withdrawn per policy.
- System updates consent indicators in patient chart and access control logic:
- E.g., restrict HIE sharing if consent not granted.
- Patient may later withdraw consent:
- User records withdrawal with
withdrawn_datetimeandwithdrawal_reason. - System updates status and triggers downstream impact assessment (e.g., stop sending to HIE).
- User records withdrawal with
- System logs all consent events in
audit_log.
Data Modified:
patient_consents— INSERT/UPDATEpatient_documents— INSERT (signed consent file)audit_log— INSERT
Mermaid Flowchart
Decision Points
- Conflicting prior consent? - If yes → supersede or withdraw older consent to avoid ambiguity.
- Withdrawal requested? (alternate path) - If yes → update status and adjust access/sharing rules.
Integration Points
- Patient Portal (INT-EHR-006)
- Direction: Bidirectional
- Data: Consent records and digital signatures; patient-initiated consent/withdrawal.
- Trigger: Portal interactions.
- NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002)
- Direction: Outbound
- Data: Consent status may influence which data is shared.
- Trigger: Consent grant/withdrawal.
- Billing & Claims (INT-EHR-004)
- Direction: Outbound
- Data: Certain consents (e.g., release of information) may affect claim attachments.
Exception Handling
- Patient declines consent:
- System records status “declined” with reason; may restrict services or data sharing per facility policy; staff alerted.
- Signature capture failure (device issue):
- System allows fallback to OTP-based consent or defers consent with clear flag.
- Regulatory change in consent templates:
- HIM Supervisor updates templates; system may prompt re-consent for affected patients.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| Multiple paper consent forms per admission | Digital consent templates with e-signature | Reduces paperwork and storage |
| Physical storage of signed forms in folders | patient_consents + patient_documents with retention rules |
Easier retrieval and audit |
| Manual tracking of consent expiry | Automated expiry dates and alerts | Supports PDPL and local regulatory compliance |
| Verbal consent without documentation | Structured, timestamped records with signatures | Stronger medico-legal protection |
Remaining Paper Touchpoints: Optional printed copies of signed consents for patient; not required for system operation.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
patient_consents |
Existing consent records (type, scope, status, expiry) | SQL query results |
| Master data | Consent templates (general treatment, PDPL, HIE sharing, procedure-specific) | consent_templates lookup |
| User selection | Consent type to obtain or withdraw | UI form input |
| Patient | Electronic signature (on-screen pad or OTP) | Signature capture / OTP verification |
| Witness (if required) | Witness identity confirmation | users / providers lookup |
| Patient Portal (INT-EHR-006) | Patient-initiated consent or withdrawal | REST API |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
patient_consents |
New consent record with signature, scope, expiry, status | SQL INSERT |
patient_consents |
Prior conflicting consent marked superseded/withdrawn | SQL UPDATE |
patient_documents |
Signed consent document (PDF with signature) | SQL INSERT + file storage |
audit_log |
Consent grant, withdrawal, supersede actions | SQL INSERT |
| Access control logic | Consent indicators for HIE sharing, data processing restrictions | Internal rule evaluation |
| NABIDH / Malaffi (INT-EHR-001 / INT-EHR-002) | Consent status influencing data sharing | HL7 / FHIR Consent resource |
| Billing & Claims (INT-EHR-004) | Release-of-information consent status | Internal REST API |
Post-conditions:
- Active consent recorded with digital signature, scope, and expiry
- Any conflicting prior consents superseded or withdrawn
- Access control and HIE sharing rules updated based on consent status
- Signed consent document stored in patient documents
- Full audit trail for consent lifecycle events
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| Consent form presentation (template load) | < 3 seconds | Performance alert if > 10s | Application performance monitoring |
| Signature capture and validation | < 30 seconds | Device fallback if capture fails | patient_consents.granted_datetime |
| Consent record creation | < 2 seconds | None — system operation | patient_consents.created_at |
| Access control rule update | < 5 seconds | Alert IT if rules not applied | Access control service log |
| Portal-initiated consent processing | < 1 minute | Alert registration if OTP fails | patient_consents.created_at |
| Consent expiry evaluation (batch) | Daily at 02:00 | Alert HIM if batch job fails | Scheduler log |
Note: Consent management follows a linear lifecycle (Pending → Active → Expired/Withdrawn/Superseded). This progression is managed through the
statusandexpiry_datetimefields onpatient_consentsand does not warrant a separate state diagram.
WF-EHRPATIENTMGMT-009: Patient Record Access / Break-the-Glass (BTG)
Process Flow
Actor: All Clinical Users (Physician, Nurse, Allied Health), Privacy Officer
Trigger: Clinician attempts to access patient record without normal care relationship (e.g., emergency, on-call consult)
Pre-conditions:
- User authenticated with clinical role.
- RBAC and patient-provider relationship rules configured.
- BTG policy defined by Privacy Officer.
- Clinician searches for patient and attempts to open chart.
- System evaluates access: - Checks user roles, assigned patients, current encounters, and consent restrictions.
- Decision: Normal access allowed?
- If yes, system opens chart; standard audit logging; workflow ends.
- If no, proceed to BTG prompt. - System displays access-denied message with BTG option: - Explains that access is restricted and will be specially audited.
- Clinician selects BTG option: - System presents list of allowed BTG reasons (emergency, on-call, consult, public health, etc.).
- Clinician selects reason and may enter free-text justification.
- System checks: - User has BTG permission (implicit via role) and BTG not blocked for this patient (e.g., VIP with stricter rules).
- Decision: BTG permitted?
- If no, system denies access; logs attempt; may notify Privacy Officer.
- If yes, proceed. - System grants temporary access: - Opens patient chart with BTG banner indicating elevated privacy sensitivity.
- System logs BTG event in
audit_log:is_btg = true,access_reason, timestamp, user, patient, IP, user_agent.
- System may notify Privacy Officer automatically (email/dashboard) for real-time or periodic review.
- Privacy Officer periodically reviews BTG events:
- Uses Access Audit Log screen (SCR-EHR-011) to filter
is_btg = true. - Investigates suspicious access; may initiate incident response per PDPL.
- Uses Access Audit Log screen (SCR-EHR-011) to filter
Data Modified:
audit_log— INSERT (BTG access events and denied attempts)
Mermaid Flowchart
Decision Points
- Normal access allowed? - Based on care relationship, role, and consent.
- User selects BTG? - If no → access denied.
- BTG permitted? - If yes → temporary access granted; if no → deny and escalate.
Integration Points
- All modules
- BTG flag influences access decisions across modules (e.g., CPOE, LIS, RIS) but is centrally logged in
audit_log. - Privacy / Security Monitoring Systems
- Direction: Outbound (reports/feeds)
- Data: BTG events for security analytics and PDPL breach detection.
Exception Handling
- Misuse of BTG (non-emergency):
- Detected via Privacy Officer review; may trigger disciplinary process; system supports exporting logs.
- System misconfiguration (overly restrictive):
- Excessive BTG usage rate (KPI) may indicate need to adjust access rules.
- Audit log write failure:
- System must treat as critical error; deny BTG access if audit cannot be recorded.
Paperless Transformation
| Previously Paper-Based | Now Digital In-System | Notes |
|---|---|---|
| No formal mechanism; ad-hoc access | Structured BTG workflow with reasons and audit trail | Enhances privacy and PDPL compliance |
| Paper logs of VIP chart access | Centralized audit_log with filters and exports |
Easier monitoring and reporting |
| Manual incident tracking | Automated BTG notifications to Privacy Officer | Faster detection of inappropriate access |
Remaining Paper Touchpoints: None — BTG is inherently digital.
Inputs and Outputs
Inputs:
| Source | Data Element | Format |
|---|---|---|
| Clinician action | Patient chart access attempt | System event |
| RBAC engine | User roles, assigned patients, current encounters, consent restrictions | users, roles, permissions, patient_consents query |
| Clinician input | BTG reason (emergency, on-call, consult, public health) and free-text justification | UI form input |
| BTG policy configuration | Allowed reasons, restricted patients (VIP), notification rules | Master data / configuration |
Outputs:
| Destination | Data Element | Format |
|---|---|---|
audit_log |
BTG event (is_btg = true, reason, justification, user, patient, IP, user_agent) |
SQL INSERT |
audit_log |
Denied access attempt (if BTG not permitted) | SQL INSERT |
| Patient chart | Temporary access with BTG banner | UI session grant |
| Privacy Officer | BTG notification for review | Email / dashboard notification |
| Security monitoring | BTG event feed for analytics and PDPL breach detection | Outbound feed / report |
Post-conditions:
- BTG access event recorded with full context (reason, justification, user, patient, timestamp, IP)
- Patient chart accessible with BTG banner for duration of session
- Privacy Officer notified for retrospective review
- Denied attempts logged for security analytics
- No persistent access change — BTG is session-scoped
SLA and Timing
| Step | Target Time | Escalation | Measurement Source |
|---|---|---|---|
| Access evaluation (RBAC check) | < 1 second | Performance alert if > 3s | Application performance monitoring |
| BTG prompt display | < 1 second after denial | None — immediate | Application log |
| BTG reason submission and access grant | < 5 seconds | None — user-driven | audit_log.created_at |
| Privacy Officer notification | < 5 minutes | Alert IT if notification service fails | Notification service log |
| Privacy Officer retrospective review | < 72 hours | Escalate to CISO at 72h for unreviewed BTG events | audit_log BTG review timestamps |
Note: Break-the-glass is a linear access-control workflow (access attempt → evaluation → denial → BTG prompt → grant/deny). No separate entity lifecycle or state diagram is required.
These workflows collectively define how the EHR & Patient Management module supports safe, compliant, and paperless operations in UAE healthcare facilities, while integrating with NABIDH, Malaffi, Scheduling, Billing, and other clinical modules.