Scheduling & Bed/OR Management Workflows

Scheduling & Bed/OR Management Workflows

This document defines eight core workflows for the Scheduling & Bed/OR Management module. Each workflow includes process steps, actors, decision points, integration hooks, exception handling, and the paperless transformation achieved by the HIS.

Regulatory context (UAE): Patient scheduling and encounter management must comply with UAE PDPL (Federal Decree-Law No. 45/2021) for consent, purpose limitation, and data minimisation; MOH, DOH, and DHA regulations for admission/discharge processes; and NABIDH (Dubai) / Malaffi (Abu Dhabi) requirements for timely ADT (Admission/Discharge/Transfer) messaging. See 05-integrations.md for technical detail of HL7 and FHIR interfaces.


WF-SCH-001: Outpatient Appointment Booking

Process Flow

Actor: Scheduling Clerk, Patient (via Portal)
Trigger: Patient requests appointment or provider orders follow-up
Pre-conditions:

  • Patient exists in patients (or will be created via EHR Patient Management before booking).
  • Provider schedule templates and rules configured (provider_schedules, scheduling_rules, appointment_types).
  • Facility calendar and closure days configured.
  • For portal booking: patient authenticated in Patient Portal and consent to digital communication recorded (PDPL).
  1. Actor opens Appointment Search & Booking screen (SCR-SCH-001).
  2. Actor searches for patient by MRN, Emirates ID (e.g., 784-1990-1234567-1), name, or phone; system queries patients and patient_identifiers.
  3. If patient not found: - a. For staff: system redirects to EHR Patient Management to create/merge patient. - b. For portal: system offers “complete registration” flow; booking is blocked until demographics are complete.
  4. Actor selects appointment type (e.g., New Visit, Follow-up, Procedure) from appointment_types; system loads default duration, prep/post time, and flags (requires_referral, requires_pre_auth).
  5. Actor selects facility, department, and optionally specific provider; system reads provider_schedules, scheduling_templates, appointment_slots, and scheduling_rules to compute available slots.
  6. System applies scheduling constraints: - Max patients per slot / overbooking limits. - Lead time rules (e.g., routine ≥ 2 days, urgent ≤ 48 hours). - Provider-specific restrictions (e.g., “new patients only in morning”).
  7. System displays available slots in calendar/grid view; actor chooses desired date/time.
  8. System performs eligibility & authorization pre-check (if configured): - Queries insurance details from EHR Patient Management / Policy-Contract module. - If appointment_types.requires_referral = true, system checks for valid referral in EHR. - If appointment_types.requires_pre_auth = true, system checks for pre-authorization record.
  9. Decision: Is insurance/referral/pre-auth valid? - If no, system:
    • Displays warning and options: proceed as self-pay, hold as “pending authorization”, or cancel.
    • For portal, may restrict booking depending on facility policy.
    • If yes, proceed.
  10. Actor confirms booking; system:
    • Creates/updates encounters row as “planned” or “pre-registered” (encounter_class = outpatient).
    • Inserts row into appointments with status = booked, linking patient_id, provider_id, facility_id, department_id, appointment_type_id, slot_id.
    • Updates appointment_slots.current_bookings and overbooking counters.
  11. System triggers downstream actions:
    • For portal bookings: sends confirmation via SMS/email/push (EN/AR) using contact data from patient_demographics.
    • For internal bookings: prints or displays appointment summary if needed.
  12. If no suitable slot is available:
    • Actor or portal user adds patient to waitlist_entries with priority, preferred dates, and acceptable providers.
  13. System logs booking event in audit trail (user, timestamp, IP/device) for PDPL accountability.

Data Modified:

  • encounters — INSERT (planned encounter shell) or UPDATE (linking to new appointment)
  • appointments — INSERT
  • appointment_slots — UPDATE (current_bookings, is_blocked if slot filled)
  • waitlist_entries — INSERT (if added to waitlist)
  • scheduling_rules_audit (if implemented) — INSERT for rule overrides
  • integration_message_log — INSERT (if external notifications/eligibility checks performed)

Mermaid Flowchart

flowchart TD A["Open Appointment Search & Booking"] --> B["Search patient by MRN/Emirates ID/name"] B --> C{"Patient found?"} C -->|"No"| C1["Redirect to patient registration<br/>(EHR Patient Mgmt)"] C1 --> C2{"Registration completed?"} C2 -->|"No"| Z1["Abort booking"] C2 -->|"Yes"| D["Select appointment type & provider"] C -->|"Yes"| D["Select appointment type & provider"] D --> E["Load provider schedules & slots"] E --> F["Apply scheduling rules & constraints"] F --> G{"Slots available?"} G -->|"No"| G1["Offer waitlist option"] G1 --> G2{"Add to waitlist?"} G2 -->|"No"| Z1 G2 -->|"Yes"| G3["Create waitlist entry"] G3 --> Z2["Waitlisted"] G -->|"Yes"| H["User selects slot"] H --> I["Check insurance/referral/pre-auth"] I --> J{"Authorization valid?"} J -->|"No"| J1["Show warning & options<br/>self-pay / pending / cancel"] J1 --> J2{"Proceed anyway?"} J2 -->|"No"| Z1 J2 -->|"Yes"| K["Create encounter shell"] J -->|"Yes"| K["Create encounter shell"] K --> L["Insert appointment & update slot"] L --> M["Send confirmations (SMS/email/app)"] M --> Z3["Appointment booked"]

Decision Points

  1. Patient found? - If not found, booking cannot proceed until registration is completed or a merge is done.
  2. Slots available? - If no slots, system offers waitlist; booking is not created.
  3. Authorization valid? - If invalid, facility-configurable options:
    • Block booking.
    • Allow as self-pay.
    • Allow as “pending authorization” with flag for billing.
  4. Proceed anyway after warning? - If user proceeds, system records override reason and flags encounter for financial review.

Integration Points

  • EHR & Patient Management (ehr-patient-mgmt)
  • Read: patients, patient_demographics, patient_identifiers, providers, facilities, departments.
  • Write: encounters (planned).
  • Policy & Contract Management (policy-contract-mgmt)
  • Eligibility and pre-authorization checks (internal API).
  • Billing & Claims (billing-claims)
  • Notification of new planned encounter and appointment for pre-authorization workflows.
  • Patient Portal
  • FHIR R4 Appointment and Slot resources (INT-SCH-006) for online booking and confirmation.
  • Notification Service
  • SMS/email push (EN/AR) using UAE phone formats and PDPL-compliant consent flags.

Exception Handling

  • Duplicate booking for same patient/provider/time:
  • System checks appointments for overlapping bookings; prompts user to confirm or cancel.
  • Provider schedule changed after slot display:
  • On booking attempt, system re-validates slot; if no longer available, shows error and reloads availability.
  • Eligibility service timeout:
  • System logs timeout, allows configurable behaviour:
    • Soft-fail: allow booking with “eligibility pending” flag.
    • Hard-fail: block booking and prompt to retry.
  • Portal booking outside allowed rules:
  • System enforces stricter scheduling_rules for portal (e.g., no same-day booking); returns clear error messages.

Paperless Transformation

Previously Paper-Based Now Digital In-System Notes
Paper appointment books and wall calendars Centralised electronic appointments and appointment_slots with real-time availability Eliminates double-booking and manual reconciliation across departments
Handwritten appointment cards SMS/email/app confirmations with calendar attachments Reduces lost cards and missed appointments; supports EN/AR content
Phone-only booking logs Structured booking with audit trail and reporting Enables KPI tracking (no-show rate, lead time) and operational analytics
Manual waitlist notebooks waitlist_entries with priority and auto-matching Improves utilisation of cancellations and reduces lost-to-follow-up

Remaining Paper Touchpoints: Optional printed appointment reminder if patient requests; otherwise fully digital.

Inputs and Outputs

Inputs:

Source Data Element Format
patients / patient_identifiers / patient_demographics Patient identity, contact, and insurance data SQL query (via EHR Patient Management)
appointment_types Appointment type, duration, prep/post time, flags (referral, pre-auth) Master data lookup
provider_schedules / scheduling_templates / appointment_slots Provider availability and open slots SQL query
scheduling_rules Overbooking limits, lead-time rules, portal restrictions Configuration lookup
Policy & Contract Management Insurance eligibility, referral, and pre-authorization status Internal API
Actor (Clerk or Patient via Portal) Facility, department, provider, date/time selection UI form input / FHIR Appointment

Outputs:

Destination Data Element Format
encounters Planned encounter shell (encounter_class = outpatient) SQL INSERT / UPDATE
appointments Booked appointment (status = booked) SQL INSERT
appointment_slots Updated booking count SQL UPDATE
waitlist_entries Waitlist entry if no slot available SQL INSERT
Patient notification Booking confirmation (SMS/email/push, EN/AR) Notification service
audit_log / scheduling_rules_audit Booking event, rule overrides SQL INSERT

Post-conditions:

  • Appointment exists in appointments with status booked and linked to patient, provider, facility, and encounter
  • Encounter shell created or linked for downstream clinical and billing workflows
  • Slot availability updated; overbooking counters maintained
  • Patient notified of appointment details with pre-visit instructions
  • Full audit trail of booking action, including any rule overrides

SLA and Timing

Step Target Time Escalation Measurement Source
Patient search and identification < 5 seconds Performance alert if > 10s Application performance monitoring
Slot availability display < 3 seconds Performance alert if > 10s Application performance monitoring
Insurance/eligibility pre-check < 10 seconds Soft-fail with "eligibility pending" if > 15s integration_message_log.response_time
Appointment confirmation (system processing) < 2 seconds None — system operation appointments.created_at
Patient notification delivery (SMS/email) < 60 seconds Alert notification admin if > 5 min Notification service log
Portal booking end-to-end < 3 minutes (patient interaction time) None — patient-driven Session analytics

State Transition Diagram

stateDiagram-v2 [*] --> Requested : Patient/clerk initiates booking Requested --> PendingAuthorization : Requires referral or pre-auth Requested --> Booked : Authorization valid or not required PendingAuthorization --> Booked : Authorization obtained PendingAuthorization --> Cancelled : Authorization denied or timeout Booked --> CheckedIn : Patient arrives and checks in (WF-SCH-002) Booked --> Cancelled : Patient or provider cancels (WF-SCH-003) Booked --> Rescheduled : Patient or provider reschedules (WF-SCH-003) Booked --> NoShow : Patient does not arrive within grace period CheckedIn --> InProgress : Patient seen by provider InProgress --> Completed : Visit completed, encounter closed Rescheduled --> [*] : New appointment created Cancelled --> [*] NoShow --> [*] Completed --> [*] Booked --> Waitlisted : Slot cancelled but patient wants rebooking Waitlisted --> Booked : Slot becomes available (WF-SCH-008) Waitlisted --> Cancelled : Patient withdraws from waitlist

WF-SCH-002: Appointment Check-In

Process Flow

Actor: Registration Clerk, Patient (via Self-Service Kiosk)
Trigger: Patient arrives for scheduled appointment
Pre-conditions:

  • Appointment exists in appointments with status booked.
  • Encounter shell exists in encounters (planned) or will be created at check-in.
  • Kiosk devices integrated with Emirates ID reader and QR scanner where applicable.
  • PDPL-compliant notice of processing displayed at kiosk/registration desk.
  1. Patient approaches registration desk or kiosk and selects “Check-In”.
  2. Patient identifies themselves via: - Emirates ID scan (kiosk or clerk). - MRN entry. - QR code from portal confirmation.
  3. System searches appointments for upcoming bookings (e.g., ±2 hours) for this patient.
  4. Decision: Matching appointment found? - If no, system offers:
    • Walk-in registration (if allowed).
    • Assistance request to clerk.
    • If yes, displays appointment details (provider, time, department).
  5. Clerk/patient verifies identity and confirms appointment; system displays demographics and insurance from EHR Patient Management.
  6. Actor reviews and updates demographics/insurance if needed; changes are written back to EHR Patient Management.
  7. System performs real-time insurance eligibility check (if configured).
  8. Decision: Eligibility valid? - If no, system:
    • Flags encounter as “eligibility issue”.
    • Prompts for self-pay acceptance or rescheduling.
    • If yes, proceed.
  9. If co-payment required, clerk collects payment (cash/POS); payment status stored in Billing module.
  10. System updates:
    • appointments.statuschecked_in.
    • appointments.check_in_time with current timestamp.
    • encounters.encounter_statusin_progress (or creates encounter if not existing).
  11. System assigns queue number and estimated wait time based on provider schedule and current load; updates clinic_queue (if implemented).
  12. Clinic Queue Board (SCR-SCH-009) is updated to show patient as waiting.
  13. System prints or displays queue ticket and wait time; for kiosk, may also show directions to clinic location.

Data Modified:

  • appointments — UPDATE (status, check_in_time)
  • encounters — INSERT (if new) or UPDATE (encounter_status, admission_datetime for outpatient)
  • clinic_queue — INSERT/UPDATE (implementation-specific)
  • integration_message_log — INSERT (eligibility check, payment events)

Mermaid Flowchart

flowchart TD A["Start Check-In (desk/kiosk)"] --> B["Identify via Emirates ID/MRN/QR"] B --> C["Find upcoming appointments"] C --> D{"Appointment found?"} D -->|"No"| D1["Offer walk-in or staff assistance"] D1 --> Z1["Check-in aborted or walk-in flow"] D -->|"Yes"| E["Display appointment & demographics"] E --> F["Confirm/update demographics & insurance"] F --> G["Run eligibility check"] G --> H{"Eligibility valid?"} H -->|"No"| H1["Flag eligibility issue<br/>offer self-pay/reschedule"] H1 --> H2{"Proceed as self-pay?"} H2 -->|"No"| Z2["Appointment not checked in"] H2 -->|"Yes"| I["Collect co-pay if applicable"] H -->|"Yes"| I["Collect co-pay if applicable"] I --> J["Update appointment to Checked In"] J --> K{"Encounter exists?"} K -->|"No"| K1["Create encounter record"] K1 --> L["Set encounter status In Progress"] K -->|"Yes"| L["Set encounter status In Progress"] L --> M["Assign queue number & wait time"] M --> N["Update Clinic Queue Board"] N --> Z3["Check-In complete"]

Decision Points

  1. Appointment found? - If not, branch to walk-in or manual assistance; no check-in to scheduled encounter.
  2. Eligibility valid? - If invalid, facility policy determines whether to allow self-pay, require rescheduling, or escalate.
  3. Proceed as self-pay? - If patient declines, appointment remains booked or is cancelled; no encounter activation.
  4. Encounter exists? - If not, create new encounters row; if yes, update status and timestamps.

Integration Points

  • EHR & Patient Management
  • Read/update demographics and insurance.
  • Billing & Claims
  • Eligibility checks, co-pay collection, and encounter activation for billing.
  • Patient Access / Kiosk
  • Device integration for Emirates ID, QR scanning, and queue ticket printing.
  • Clinic Queue Board
  • Internal API or shared DB to update real-time queue.

Exception Handling

  • Emirates ID reader failure:
  • Fallback to manual MRN/name search; log device error.
  • Eligibility service unavailable:
  • Soft-fail: allow check-in with “eligibility pending” flag; notify billing.
  • Duplicate check-in:
  • If appointments.status already checked_in or completed, system warns and blocks duplicate.
  • Kiosk abandonment:
  • If patient does not complete flow within timeout, session is cleared without data changes.

Paperless Transformation

Previously Paper-Based Now Digital In-System Notes
Paper sign-in sheets at reception Electronic check-in with appointments status and timestamps Improves privacy (PDPL), eliminates visible patient lists
Manual chart pulling based on paper lists Electronic encounter activation and chart retrieval Reduces delays and misfiled charts
Handwritten queue tickets and whiteboard queues Digital queue numbers and Clinic Queue Board Real-time visibility for staff and patients
Manual co-pay receipts and reconciliation Integrated payment capture with billing linkage Better financial control and auditability

Remaining Paper Touchpoints: Printed queue ticket if facility chooses to provide; can be replaced by on-screen token or SMS.

Inputs and Outputs

Inputs:

Source Data Element Format
Patient identification Emirates ID scan, MRN, QR code from portal confirmation Device input / manual entry
appointments Upcoming appointments for patient (status = booked) SQL query
patients / patient_demographics Demographics and insurance for verification SQL query (via EHR Patient Management)
Insurance eligibility service Real-time eligibility status REST API response
Co-payment rules Co-pay amount based on plan and visit type Billing module API

Outputs:

Destination Data Element Format
appointments Status updated to checked_in; check_in_time recorded SQL UPDATE
encounters Status updated to in_progress or new encounter created SQL INSERT / UPDATE
clinic_queue Queue number, estimated wait time, patient status SQL INSERT / UPDATE
Clinic Queue Board (SCR-SCH-009) Real-time patient queue display UI refresh
Billing & Claims Co-pay collection record, eligibility status Internal API
integration_message_log Eligibility check, payment events SQL INSERT

Post-conditions:

  • Appointment status is checked_in with accurate check-in timestamp
  • Encounter is active (in_progress) and linked to appointment
  • Patient visible in clinic queue with estimated wait time
  • Co-payment collected and recorded in billing (if applicable)
  • Demographics and insurance verified or flagged for update

SLA and Timing

Step Target Time Escalation Measurement Source
Emirates ID scan and patient lookup < 5 seconds Device alert if reader fails; fallback to manual Application log
Appointment match display < 3 seconds Performance alert if > 10s Application performance monitoring
Eligibility check < 10 seconds Soft-fail with "pending" if > 15s integration_message_log.response_time
Check-in completion (staff-assisted) < 3 minutes total None — staff-driven appointments.check_in_time - arrival time
Check-in completion (kiosk self-service) < 2 minutes total Session timeout at 5 min; clear and reset Kiosk session analytics
Queue board update < 5 seconds after check-in Alert IT if > 30s clinic_queue.updated_at

Note: Check-in transitions the appointment from Booked to CheckedIn within the appointment lifecycle defined in WF-SCH-001. No separate state diagram is required.


WF-SCH-003: Appointment Cancellation / Rescheduling

Process Flow

Actor: Scheduling Clerk, Patient (via Portal/Call)
Trigger: Patient or provider requests cancellation or date change
Pre-conditions:

  • Appointment exists in appointments with status booked or checked_in (rescheduling may be restricted after check-in).
  • Cancellation/rescheduling policies configured in scheduling_rules (e.g., cut-off times, penalties).
  • Waitlist configured for relevant appointment types.
  1. Actor opens Appointment Search and locates appointment by patient, provider, date, or appointment ID.
  2. System displays appointment details, including status, type, and any linked encounters.
  3. Actor selects action: Cancel or Reschedule.
  4. System checks scheduling_rules for cancellation/reschedule eligibility (e.g., cannot cancel within 2 hours of start without override).
  5. Decision: Within allowed cancellation window? - If no, system:
    • Displays warning and may require supervisor override.
    • For portal, may block cancellation and instruct patient to call.
    • If yes, proceed.
  6. Actor records cancellation reason from Cancellation Reason Codes master data; system stores in appointments.cancellation_reason.
  7. If Reschedule selected: - System invokes WF-SCH-001 sub-flow to find new slot. - Upon successful new booking, sets original appointment status to rescheduled and rescheduled_from in new appointment.
  8. If Cancel selected: - System sets appointments.status to cancelled. - If encounter exists and no clinical documentation/charges, sets encounters.encounter_status to cancelled.
  9. System releases original slot: - Decrements appointment_slots.current_bookings. - If slot was blocked due to full capacity, re-opens it.
  10. System checks waitlist_entries for matching criteria (appointment type, provider, priority).
  11. Decision: Waitlisted patient available?
    • If no, workflow ends.
    • If yes, system:
    • For auto-offer: sends offer to highest-priority waitlisted patient with expiry time.
    • For manual: flags slot in Waitlist Management screen.
  12. System sends notifications:
    • To patient: cancellation/reschedule confirmation via SMS/email/app.
    • To provider/clinic: updated schedule view.
  13. System updates cancellation metrics and flags repeat no-shows based on history.

Data Modified:

  • appointments — UPDATE (status, cancellation_reason, rescheduled_from)
  • encounters — UPDATE (status to cancelled when appropriate)
  • appointment_slots — UPDATE (current_bookings)
  • waitlist_entries — UPDATE (offer status, resolution_type when booked)
  • integration_message_log — INSERT (notifications)

Mermaid Flowchart

flowchart TD A["Locate appointment"] --> B["Display details"] B --> C["Select Cancel or Reschedule"] C --> D["Check scheduling rules for timing"] D --> E{"Within allowed window?"} E -->|"No"| E1["Require override or block<br/>(portal: show message)"] E1 --> E2{"Override granted?"} E2 -->|"No"| Z1["Action aborted"] E2 -->|"Yes"| F["Capture cancellation reason"] E -->|"Yes"| F["Capture cancellation reason"] F --> G{"Action = Reschedule?"} G -->|"Yes"| H["Invoke booking flow (WF-SCH-001)"] H --> H1{"New slot booked?"} H1 -->|"No"| Z1 H1 -->|"Yes"| I["Set original appointment status=Rescheduled"] G -->|"No"| J["Set appointment status=Cancelled"] I --> K["Release original slot"] J --> K["Release original slot"] K --> L{"Encounter exists & unused?"} L -->|"Yes"| L1["Set encounter status=Cancelled"] L -->|"No"| M["Skip encounter update"] L1 --> M M --> N["Check waitlist for matching patients"] N --> O{"Waitlist match found?"} O -->|"No"| P["Send notifications"] O -->|"Yes"| Q["Auto-offer or flag for manual offer"] Q --> P["Send notifications"] P --> Z2["Cancellation/Reschedule complete"]

Decision Points

  1. Within allowed window? - Based on scheduling_rules (e.g., late cancellation vs on-time).
  2. Override granted? - Senior Scheduling Clerk may override rules; system logs override.
  3. Action = Reschedule? - Determines whether WF-SCH-001 is invoked or appointment is simply cancelled.
  4. Encounter exists & unused? - If encounter has no clinical notes or charges, it can be safely cancelled; otherwise, may require HIM review.
  5. Waitlist match found? - If yes, triggers waitlist offer logic.

Integration Points

  • Patient Portal
  • Allow patient-initiated cancellation/rescheduling within rules; update FHIR Appointment status.
  • EHR & Patient Management
  • Encounter status updates for cancelled visits.
  • Billing & Claims
  • Late cancellation/no-show flags for potential fees.
  • Notification Service
  • SMS/email/app updates to patient and provider.

Exception Handling

  • Attempt to cancel completed appointment:
  • System blocks and suggests creating an administrative correction instead.
  • Reschedule to conflicting time:
  • System checks for overlapping appointments for patient and provider; blocks if conflict.
  • Notification delivery failure:
  • System logs failure and displays alert to clerk; may trigger manual phone call.

Paperless Transformation

Previously Paper-Based Now Digital In-System Notes
Erasing/rewriting paper appointment books Status changes in appointments with full audit trail Preserves history and supports analytics on cancellations
Manual phone logs for rescheduling Structured cancellation/reschedule workflow with reason codes Enables monitoring of cancellation patterns and policy compliance
Paper waitlist sheets updated after cancellations Automated waitlist matching and offers Improves utilisation of freed slots and patient satisfaction
Manual notes for repeat no-shows System flags repeat offenders based on history Supports targeted interventions and policy enforcement

Remaining Paper Touchpoints: None — fully digital.

Inputs and Outputs

Inputs:

Source Data Element Format
appointments Appointment to cancel or reschedule (status = booked or checked_in) SQL query
scheduling_rules Cancellation window, late-cancel penalties, override policies Configuration lookup
Actor (Clerk or Patient) Cancel/Reschedule action, cancellation reason UI form input / Portal API
Supervisor (if override needed) Override approval for out-of-window cancellations UI approval action
waitlist_entries Matching waitlist entries for freed slot SQL query

Outputs:

Destination Data Element Format
appointments Status updated to cancelled or rescheduled; cancellation_reason recorded SQL UPDATE
encounters Status updated to cancelled (if no clinical data attached) SQL UPDATE
appointment_slots Booking count decremented; slot re-opened if applicable SQL UPDATE
waitlist_entries Offer status updated for matching entries SQL UPDATE
Patient notification Cancellation/reschedule confirmation (SMS/email/app) Notification service
Provider/clinic notification Updated schedule view Internal notification
Billing & Claims Late cancellation or no-show fee flag Internal API
integration_message_log Notification delivery records SQL INSERT

Post-conditions:

  • Original appointment status reflects cancellation or rescheduling with reason
  • Freed slot available for rebooking or waitlist offer
  • Encounter cancelled if no clinical documentation exists
  • Patient and provider notified of change
  • Cancellation metrics updated for KPI tracking

SLA and Timing

Step Target Time Escalation Measurement Source
Appointment lookup and display < 3 seconds Performance alert if > 10s Application performance monitoring
Cancellation rule evaluation < 1 second None — system operation Application log
Supervisor override response < 4 hours Escalate to Scheduling Manager at 4h audit_log timestamps
Slot release and waitlist check < 5 seconds None — system operation appointment_slots.updated_at
Waitlist offer notification < 60 seconds Alert notification admin if > 5 min Notification service log
Patient notification (cancel/reschedule) < 60 seconds Alert notification admin if > 5 min Notification service log

Note: Cancellation and rescheduling represent transitions within the appointment lifecycle defined in WF-SCH-001 (Booked → Cancelled or Booked → Rescheduled). No separate state diagram is required.


WF-SCH-004: Inpatient Admission (Bed Assignment)

Process Flow

Actor: Bed Management Coordinator, Admitting Physician
Trigger: Physician orders admission (elective or emergency)
Pre-conditions:

  • Admission order placed in CPOE and available to Scheduling module.
  • Patient exists in patients; demographics and identifiers complete.
  • Bed inventory configured in beds with status and attributes.
  • Admission criteria and gender/isolation rules configured in scheduling_rules.
  • NABIDH/Malaffi connectivity configured for ADT A01 messages.
  1. Bed Management Coordinator opens Bed Board (SCR-SCH-004) or Admission screen (SCR-SCH-005) and selects pending admission from queue (from CPOE or ED).
  2. System retrieves admission request details: requested ward type, specialty, isolation needs, gender, and expected LOS from CPOE.
  3. Coordinator searches available beds using filters (ward type, isolation, gender, floor, facility).
  4. System displays real-time bed status from beds and bed_assignments (occupied, vacant, pending discharge, cleaning).
  5. System runs compatibility checks: - Gender mixing rules (e.g., no mixed-gender rooms unless private). - Isolation requirements (e.g., single room for airborne precautions). - Age/specialty constraints (e.g., paediatric vs adult wards).
  6. Decision: Suitable bed available? - If no, system:
    • Offers to add patient to waitlist_entries for bed.
    • Flags admission as “bed pending” and notifies ED/ordering physician.
    • If yes, proceed.
  7. Coordinator selects bed; system prompts confirmation and displays any conflicts (e.g., bed reserved for incoming transfer).
  8. System creates/updates encounters: - Inserts new encounter with encounter_class = inpatient, encounter_status = admitted, admission_datetime. - Links to admission order and attending/admitting providers.
  9. System inserts bed_assignments row with is_current = true, assigned_datetime, bed_id, encounter_id, patient_id.
  10. System updates beds.bed_status to occupied and cleaning_status to not_applicable or clean.
  11. System generates ADT A01 (Admit) message and sends to:
    • EHR Patient Management.
    • Billing & Claims.
    • NABIDH (if Dubai facility) or Malaffi (if Abu Dhabi facility).
    • Nutrition Management (for dietary census).
  12. System notifies nursing station, housekeeping (for preparation if needed), and other relevant services via internal alerts.
  13. System records expected LOS in encounter_details for discharge planning and bed forecasting.

Data Modified:

  • encounters — INSERT (new inpatient encounter)
  • encounter_details — INSERT/UPDATE (admission diagnosis, expected LOS, bed_id)
  • bed_assignments — INSERT
  • beds — UPDATE (bed_status, cleaning_status)
  • waitlist_entries — INSERT (if bed not available)
  • integration_message_log — INSERT (ADT A01, notifications)

Mermaid Flowchart

flowchart TD A["Select pending admission"] --> B["Load admission request details"] B --> C["Search beds by criteria"] C --> D["Display bed board"] D --> E["Run compatibility checks"] E --> F{"Suitable bed available?"} F -->|"No"| F1["Offer bed waitlist & flag 'bed pending'"] F1 --> Z1["Admission pending bed"] F -->|"Yes"| G["Select bed"] G --> H["Confirm selection & show conflicts"] H --> I["Create inpatient encounter"] I --> J["Insert bed_assignment (is_current=true)"] J --> K["Update bed status to Occupied"] K --> L["Generate ADT A01"] L --> M["Send notifications to Billing, HIE, Nutrition, Nursing"] M --> N["Record expected LOS"] N --> Z2["Admission completed"]

Decision Points

  1. Suitable bed available? - If not, admission remains pending; patient may stay in ED/holding area.
  2. Compatibility checks pass? - If gender/isolation/specialty rules fail, bed is not selectable.
  3. Bed reserved or conflicting? - If bed reserved for higher-priority case, system warns and may block assignment.

Integration Points

  • CPOE
  • Admission order details (reason, requested ward, isolation).
  • EHR & Patient Management
  • Encounter creation and ADT A01 updates.
  • Billing & Claims
  • Admission notification, start of inpatient billing.
  • Nutrition Management
  • Admission notification for dietary census.
  • Cleaning Management
  • Bed preparation tasks if bed requires setup.
  • NABIDH / Malaffi
  • Outbound ADT A01 messages (INT-SCH-007 / INT-SCH-008).

Exception Handling

  • Bed assigned in parallel by another user:
  • On save, system re-checks beds.bed_status; if not vacant, shows error and reloads bed board.
  • ADT A01 transmission failure:
  • Message stored in retry queue; after repeated failures, alert IT/integration team; admission remains valid locally.
  • Incorrect bed attributes:
  • If bed master data inconsistent (e.g., missing gender restriction), system logs data quality issue and may require admin correction.

Paperless Transformation

Previously Paper-Based Now Digital In-System Notes
Wall-mounted bed boards and magnet tags Real-time electronic beds and bed_assignments with floor-plan view Reduces miscommunication and improves visibility across hospital
Paper admission forms and manual bed request slips Electronic admission request from CPOE and digital bed assignment Speeds up admission and reduces lost forms
Phone calls to notify wards and ancillary services Automated notifications and ADT messages Ensures consistent communication and audit trail
Manual LOS estimation on paper lists Structured expected_los in encounter_details Enables bed forecasting and discharge planning analytics

Remaining Paper Touchpoints: None — fully digital; patient may still receive printed admission information leaflet if requested.

Inputs and Outputs

Inputs:

Source Data Element Format
CPOE Admission order (requested ward type, specialty, isolation needs, expected LOS) Internal API / event
patients / patient_demographics Patient identity, gender, age, clinical flags SQL query (via EHR Patient Management)
beds / bed_assignments Real-time bed inventory and occupancy status SQL query
scheduling_rules Gender mixing, isolation, specialty, and age constraints Configuration lookup
Bed Management Coordinator Bed selection and assignment confirmation UI form input

Outputs:

Destination Data Element Format
encounters New inpatient encounter (encounter_class = inpatient, encounter_status = admitted) SQL INSERT
encounter_details Admission diagnosis, expected LOS, bed reference SQL INSERT / UPDATE
bed_assignments New assignment (is_current = true, assigned_datetime) SQL INSERT
beds Status updated to occupied SQL UPDATE
waitlist_entries Entry created if no bed available SQL INSERT
EHR Patient Management ADT A01 notification HL7 v2.5.1 / Internal API
Billing & Claims Admission notification for inpatient billing Internal API
NABIDH / Malaffi ADT A01 (Admit) message HL7 v2.5.1 over MLLP/TLS
Nutrition Management Admission notification for dietary census Internal API
Cleaning Management Bed preparation task (if needed) Internal API / event
integration_message_log ADT A01, notification records SQL INSERT

Post-conditions:

  • Inpatient encounter created with admission timestamp and attending provider
  • Bed assigned to patient; bed board reflects occupied status
  • ADT A01 sent to HIE and all downstream modules
  • Nursing station, dietary, and housekeeping notified
  • Expected LOS recorded for discharge planning and bed forecasting

SLA and Timing

Step Target Time Escalation Measurement Source
Bed board load and availability display < 3 seconds Performance alert if > 10s Application performance monitoring
Compatibility check execution < 2 seconds None — system operation Application log
Bed assignment confirmation < 1 minute (staff-driven) None — workflow metric bed_assignments.assigned_datetime
Encounter creation and ADT A01 generation < 5 seconds Alert IT if > 30s encounters.created_at
ADT A01 transmission to HIE < 5 seconds Retry queue; alert integration admin after 10 min integration_message_log.sent_at
Downstream notifications (Billing, Nutrition, Cleaning) < 10 seconds Alert IT if > 60s integration_message_log.sent_at
Emergency admission end-to-end (ED to bed) < 30 minutes Escalate to Bed Management Supervisor at 30 min encounters.admission_datetime - admission order time

State Transition Diagram

stateDiagram-v2 [*] --> Vacant : Bed available in inventory Vacant --> Reserved : Reserved for incoming admission/transfer Reserved --> Occupied : Patient assigned and admitted (WF-SCH-004) Reserved --> Vacant : Reservation cancelled Vacant --> Occupied : Direct assignment (emergency, no reservation) Occupied --> PendingTransferOut : Transfer requested (WF-SCH-005) PendingTransferOut --> Occupied : Transfer cancelled PendingTransferOut --> PendingCleaning : Patient transferred out Occupied --> PendingDischarge : Discharge order entered (WF-SCH-006) PendingDischarge --> Occupied : Discharge cancelled PendingDischarge --> PendingCleaning : Patient discharged, bed vacated PendingCleaning --> Cleaning : Cleaning task started Cleaning --> Vacant : Cleaning completed and inspected Cleaning --> Blocked : Maintenance issue found during cleaning Blocked --> Vacant : Maintenance resolved Vacant --> Blocked : Bed out of service (maintenance, closure) Blocked --> Vacant : Bed returned to service

WF-SCH-005: Patient Transfer (Bed-to-Bed)

Process Flow

Actor: Bed Management Coordinator, Charge Nurse
Trigger: Clinical need for patient transfer (step-down, isolation, specialty change)
Pre-conditions:

  • Active inpatient encounter in encounters with current bed_assignments.is_current = true.
  • Transfer reasons master data configured.
  • Bed inventory and compatibility rules up to date.
  • NABIDH/Malaffi ADT A02 integration active.
  1. Charge Nurse or physician initiates transfer request in EHR (reason, target ward type, urgency).
  2. Bed Management Coordinator opens transfer queue and selects patient/encounter.
  3. System displays current bed, ward, and clinical flags (isolation, fall risk, etc.).
  4. Coordinator searches for target bed using criteria (ward type, isolation, gender, specialty).
  5. System runs compatibility checks similar to admission workflow.
  6. Decision: Suitable target bed available? - If no, system:
    • Allows marking transfer as “pending bed”.
    • Optionally adds to bed waitlist.
    • If yes, proceed.
  7. Coordinator selects target bed; system prompts for clinical reason and requires Charge Nurse approval.
  8. Charge Nurse reviews and approves transfer electronically (e-signature).
  9. System updates bed_assignments: - Sets current assignment is_current = false and released_datetime = now. - Inserts new assignment with bed_id = target, is_current = true, assigned_datetime = now.
  10. System updates beds:
    • Old bed: bed_status = vacant, cleaning_status = pending.
    • New bed: bed_status = occupied.
  11. System generates ADT A02 (Transfer) message and sends to:
    • EHR Patient Management.
    • Billing & Claims (for location-based charges).
    • NABIDH/Malaffi.
    • Nutrition (update dietary location).
    • PIS (update medication administration location).
  12. System triggers cleaning workflow for vacated bed (INT-SCH-004).
  13. Nursing dashboards and bed board are updated to reflect new location.

Data Modified:

  • bed_assignments — UPDATE (old row), INSERT (new row)
  • beds — UPDATE (old and new bed status/cleaning_status)
  • bed_transfers — INSERT (transfer history, reason, approvals, adt_message_id)
  • integration_message_log — INSERT (ADT A02, cleaning, nutrition, PIS notifications)

Mermaid Flowchart

flowchart TD A["Initiate transfer request"] --> B["Open transfer queue & select patient"] B --> C["View current bed & clinical flags"] C --> D["Search target beds by criteria"] D --> E["Run compatibility checks"] E --> F{"Suitable target bed available?"} F -->|"No"| F1["Mark transfer as pending bed<br/>optionally add to waitlist"] F1 --> Z1["Transfer pending"] F -->|"Yes"| G["Select target bed"] G --> H["Enter transfer reason"] H --> I["Charge Nurse reviews & approves"] I --> J{"Approval granted?"} J -->|"No"| Z2["Transfer cancelled"] J -->|"Yes"| K["Update bed_assignments (old & new)"] K --> L["Update bed statuses"] L --> M["Generate ADT A02"] M --> N["Notify Billing, HIE, Nutrition, PIS, Cleaning"] N --> Z3["Transfer completed"]

Decision Points

  1. Suitable target bed available? - If no, transfer remains pending; patient stays in current bed.
  2. Approval granted? - Charge Nurse may reject transfer if clinically inappropriate.
  3. Compatibility checks pass? - If not, bed cannot be selected; system suggests alternative wards.

Integration Points

  • EHR & Patient Management
  • Location updates for patient chart.
  • Billing & Claims
  • Ward/bed-level charge updates.
  • Nutrition Management
  • Update ward/bed for meal delivery.
  • PIS (Pharmacy Information System)
  • Update medication administration location.
  • Cleaning Management
  • Trigger cleaning tasks for vacated bed.
  • NABIDH / Malaffi
  • ADT A02 messages for transfers.

Exception Handling

  • Transfer initiated while discharge in progress:
  • System detects pending discharge order and warns; requires explicit confirmation or cancellation of discharge.
  • Concurrent transfer requests:
  • If multiple transfers target same bed, system locks bed on first confirmed assignment; others must reselect.
  • ADT A02 failure:
  • Retry mechanism; if persistent, local data remains authoritative and integration team alerted.

Paperless Transformation

Previously Paper-Based Now Digital In-System Notes
Paper transfer forms carried between wards Electronic transfer request and approval with bed_transfers history Improves traceability and reduces lost forms
Manual updates to ward whiteboards Real-time bed board updates Ensures all departments see current location
Phone calls to cleaning and dietary Automated notifications via integration events Reduces delays and miscommunication
Handwritten notes in paper charts about transfers Structured transfer records linked to encounter Supports audits and quality reviews

Remaining Paper Touchpoints: None — fully digital.

Inputs and Outputs

Inputs:

Source Data Element Format
Transfer request Clinical reason, target ward type, urgency, isolation requirements UI form input / EHR event
encounters / bed_assignments Current inpatient encounter and active bed assignment SQL query
beds Target bed inventory with real-time status and attributes SQL query
scheduling_rules Gender mixing, isolation, specialty, and age constraints Configuration lookup
Charge Nurse Transfer approval (electronic signature) UI approval action

Outputs:

Destination Data Element Format
bed_assignments Old assignment: is_current = false, released_datetime; new assignment: is_current = true SQL UPDATE + INSERT
beds Old bed: bed_status = vacant, cleaning_status = pending; new bed: bed_status = occupied SQL UPDATE (×2)
bed_transfers Transfer history record (reason, approvals, timestamps) SQL INSERT
EHR Patient Management Location update for patient chart Internal API / ADT A02
Billing & Claims Ward/bed-level charge update Internal API
NABIDH / Malaffi ADT A02 (Transfer) message HL7 v2.5.1 over MLLP/TLS
Nutrition Management Updated ward/bed for meal delivery Internal API
PIS Updated medication administration location Internal API
Cleaning Management Cleaning task for vacated bed Internal API / event
integration_message_log ADT A02, cleaning, nutrition, PIS notifications SQL INSERT

Post-conditions:

  • Patient assigned to new bed; old bed released for cleaning
  • Bed board reflects updated occupancy for both source and target wards
  • ADT A02 sent to HIE and all downstream modules
  • Cleaning workflow triggered for vacated bed
  • Full audit trail of transfer with clinical reason and approval

SLA and Timing

Step Target Time Escalation Measurement Source
Transfer request submission < 2 minutes (staff-driven) None — workflow metric bed_transfers.requested_at
Target bed search and selection < 5 minutes Escalate to Bed Management Supervisor if no bed available after 30 min Application log
Charge Nurse approval < 30 minutes for routine; < 10 minutes for urgent Alert Charge Nurse at threshold; escalate to Nursing Supervisor bed_transfers.approved_at
Bed assignment update (system) < 5 seconds Alert IT if > 30s bed_assignments.assigned_datetime
ADT A02 transmission to HIE < 5 seconds Retry queue; alert integration admin after 10 min integration_message_log.sent_at
Cleaning task creation for vacated bed < 10 seconds Alert Cleaning Supervisor if not created Cleaning module log

Note: Patient transfer represents transitions within the bed assignment lifecycle defined in WF-SCH-004 (Occupied → PendingTransferOut → PendingCleaning). No separate state diagram is required.


WF-SCH-006: Patient Discharge

Process Flow

Actor: Physician, Discharge Coordinator, Nurse
Trigger: Physician enters discharge order in CPOE
Pre-conditions:

  • Active inpatient encounter in encounters with encounter_status = admitted or in_progress.
  • Discharge disposition master data configured.
  • Discharge checklist templates configured per specialty.
  • NABIDH/Malaffi ADT A03 integration active.
  • Patient portal enabled for discharge summary where applicable.
  1. Physician enters discharge order in CPOE, specifying discharge disposition (home, transfer, AMA, deceased).
  2. Scheduling module receives discharge order event and flags encounter as “discharge in progress”.
  3. System runs discharge readiness checks: - Pending orders (labs, imaging). - Outstanding consults. - Unverified results.
  4. Decision: Any blocking items? - If yes, system displays list; discharge coordinator/nurse works with physician to resolve or override. - If no, proceed.
  5. Nurse opens Admission/Transfer/Discharge screen (SCR-SCH-005) for the patient and completes discharge checklist (medication reconciliation, patient education, follow-up appointments).
  6. System prompts to schedule follow-up appointment(s) via WF-SCH-001 (outpatient booking).
  7. Physician or authorised clinician reviews and signs discharge summary (generated from EHR, not owned by this module but linked).
  8. System updates encounters: - discharge_datetime = now. - encounter_status = discharged. - discharge_disposition set.
  9. System updates bed_assignments: - Current assignment is_current = false, released_datetime = now.
  10. System updates beds:
    • bed_status = vacant.
    • cleaning_status = pending.
  11. System generates ADT A03 (Discharge) message and sends to:
    • EHR Patient Management.
    • Billing & Claims (for final billing and LOS calculation).
    • NABIDH/Malaffi.
    • Nutrition (remove from census).
  12. System triggers cleaning workflow for vacated bed (INT-SCH-004).
  13. System sends discharge summary to Patient Portal (if patient enrolled and consented).
  14. Discharge KPIs (e.g., discharge before noon) are updated for analytics.

Data Modified:

  • encounters — UPDATE (discharge_datetime, encounter_status, discharge_disposition)
  • bed_assignments — UPDATE (current row is_current = false, released_datetime)
  • beds — UPDATE (bed_status, cleaning_status)
  • appointments — INSERT (follow-up) via WF-SCH-001
  • integration_message_log — INSERT (ADT A03, cleaning, portal notification)

Mermaid Flowchart

flowchart TD A["Physician enters discharge order"] --> B["Flag encounter 'discharge in progress'"] B --> C["Run discharge readiness checks"] C --> D{"Blocking items?"} D -->|"Yes"| D1["Display pending orders/consults"] D1 --> D2{"Override or resolve?"} D2 -->|"No"| Z1["Discharge on hold"] D2 -->|"Yes"| E["Open discharge checklist"] D -->|"No"| E["Open discharge checklist"] E --> F["Complete checklist & schedule follow-up"] F --> G["Physician signs discharge summary"] G --> H["Update encounter (status=Discharged, discharge_datetime)"] H --> I["Update bed_assignment (release bed)"] I --> J["Update bed status to Vacant & cleaning pending"] J --> K["Generate ADT A03"] K --> L["Notify Billing, HIE, Nutrition, Cleaning"] L --> M["Send discharge summary to portal"] M --> Z2["Discharge completed"]

Decision Points

  1. Blocking items? - Pending critical results or consults may block discharge unless overridden.
  2. Override or resolve? - Physician may override certain pending items with justification.
  3. Patient portal delivery? - If patient not enrolled or declines, summary not sent to portal.

Integration Points

  • CPOE
  • Discharge order and readiness checks.
  • EHR & Patient Management
  • Encounter status and discharge summary linkage.
  • Billing & Claims
  • Final billing, DRG/LOS calculation.
  • Cleaning Management
  • Bed cleaning tasks.
  • Nutrition Management
  • Removal from dietary census.
  • Patient Portal
  • Delivery of discharge summary and follow-up appointment details.
  • NABIDH / Malaffi
  • ADT A03 discharge messages.

Exception Handling

  • Discharge order cancelled:
  • If physician cancels discharge, system reverts encounter status and bed status; ADT A03 cancellation (or A13) may be sent depending on integration profile.
  • ADT A03 failure:
  • Retry queue; local discharge remains valid; integration team alerted.
  • Bed already reassigned:
  • System prevents reassignment until discharge is fully processed; if conflict occurs, manual correction by Bed Management.

Paperless Transformation

Previously Paper-Based Now Digital In-System Notes
Paper discharge checklists and tick-box forms Electronic checklist tied to encounters Ensures completeness and supports audits
Handwritten discharge summaries Structured electronic summaries signed in EHR Improves legibility and availability across care continuum
Manual phone calls to housekeeping and dietary Automated notifications from discharge event Reduces delays in bed turnaround and census updates
Paper notes for follow-up appointments Integrated scheduling of follow-ups before discharge Reduces missed follow-ups and readmissions

Remaining Paper Touchpoints: Printed discharge instructions if patient prefers physical copy; otherwise digital via portal.

Inputs and Outputs

Inputs:

Source Data Element Format
CPOE Discharge order with disposition (home, transfer, AMA, deceased) Internal API / event
encounters Active inpatient encounter (encounter_status = admitted / in_progress) SQL query
bed_assignments Current bed assignment (is_current = true) SQL query
Discharge readiness checks Pending orders, outstanding consults, unverified results SQL queries across CPOE, LIS, RIS
Nurse Discharge checklist completion (medication reconciliation, education, follow-up) UI form input
Physician Discharge summary sign-off EHR clinical notes

Outputs:

Destination Data Element Format
encounters Status updated to discharged; discharge_datetime, discharge_disposition recorded SQL UPDATE
bed_assignments Current assignment: is_current = false, released_datetime SQL UPDATE
beds Status updated to vacant; cleaning_status = pending SQL UPDATE
appointments Follow-up appointment(s) created via WF-SCH-001 SQL INSERT
EHR Patient Management Encounter status update, discharge summary linkage Internal API / ADT A03
Billing & Claims Final billing notification, LOS calculation, DRG assignment Internal API / ADT A03
NABIDH / Malaffi ADT A03 (Discharge) message HL7 v2.5.1 over MLLP/TLS
Nutrition Management Removal from dietary census Internal API
Cleaning Management Bed cleaning task for vacated bed Internal API / event
Patient Portal Discharge summary and follow-up details FHIR R4 / Portal API
integration_message_log ADT A03, cleaning, portal notifications SQL INSERT

Post-conditions:

  • Encounter closed with discharge timestamp, disposition, and summary
  • Bed released and cleaning workflow triggered
  • ADT A03 sent to HIE and all downstream modules
  • Follow-up appointment(s) scheduled
  • Patient portal updated with discharge summary (if enrolled)
  • Discharge KPIs updated (e.g., discharge before noon metric)

SLA and Timing

Step Target Time Escalation Measurement Source
Discharge readiness check execution < 10 seconds None — system operation Application log
Blocking item resolution < 2 hours (physician-driven) Alert attending physician at 2h; escalate to department head at 4h audit_log timestamps
Discharge checklist completion (nurse) < 30 minutes Alert Charge Nurse at 30 min Checklist completion timestamps
Discharge summary sign-off (physician) Before patient leaves facility Alert attending physician if unsigned at discharge clinical_notes.signed_datetime
Bed release and cleaning trigger < 5 seconds after discharge confirmation Alert IT if > 30s beds.updated_at
ADT A03 transmission to HIE < 5 seconds Retry queue; alert integration admin after 10 min integration_message_log.sent_at
Target: Discharge before noon (elective) Before 12:00 local time Dashboard metric; escalate to case management if rate < 50% encounters.discharge_datetime

Note: Patient discharge represents transitions within the bed assignment lifecycle defined in WF-SCH-004 (Occupied → PendingDischarge → PendingCleaning → Cleaning → Vacant). No separate state diagram is required.


WF-SCH-007: Operating Room Scheduling

Process Flow

Actor: OR Scheduler, Surgeon, Anesthesiologist
Trigger: Surgeon requests OR time for surgical procedure
Pre-conditions:

  • Patient and encounter exist (pre-admission or same-day surgery encounter).
  • OR rooms configured in or_rooms with capabilities and availability.
  • OR block schedules configured in or_schedules.
  • Surgical procedure codes (CPT) master data loaded.
  • Pre-op clearance and consent workflows available in EHR.
  1. Surgeon submits OR booking request via CPOE or OR Case Booking screen (SCR-SCH-007), specifying patient, procedure (CPT), estimated duration, preferred date/time, and equipment/implant needs.
  2. System validates request: - Patient and encounter linkage. - Procedure code validity. - Required pre-op labs/imaging ordered.
  3. OR Scheduler opens OR booking queue and reviews pending requests.
  4. Scheduler selects a request and views: - Patient details. - Procedure details. - Surgeon and anesthesiologist preferences. - Pre-op clearance status (from EHR).
  5. Scheduler checks OR availability: - Reads or_schedules and or_rooms for selected date. - Considers existing or_cases and turnover times.
  6. System checks surgeon and anesthesiologist availability against provider_schedules.
  7. Decision: Are OR room and team available in requested window? - If no, system suggests alternative slots (different time/room/day). - If yes, proceed.
  8. Scheduler selects OR room, date, and time block; system calculates expected end time including turnover.
  9. System creates or_cases record: - Links to schedule_id, patient_id, encounter_id, surgeon_id, anesthesiologist_id. - Stores procedure_code_cpt, estimated_duration, case_status = scheduled.
  10. System updates or_schedules for the room/date with block usage and utilisation metrics.
  11. System assigns supporting staff (scrub nurse, circulator) via integration with staffing/HR module or manual entry.
  12. System sends confirmations:
    • To surgeon and anesthesiologist (schedule updates).
    • To patient (SMS/email/app with pre-op instructions).
  13. System verifies consent and pre-authorization status:
    • If missing, flags case as “pending consent” or “pending pre-auth”.
  14. OR Schedule Board (SCR-SCH-006) displays updated Gantt-style view for all rooms.

Data Modified:

  • or_cases — INSERT
  • or_schedules — UPDATE (block usage, status)
  • encounters — UPDATE (may set encounter_type/class for surgical episode)
  • scheduling_rules_audit — INSERT (if rules overridden, e.g., after-hours case)
  • integration_message_log — INSERT (notifications)

Mermaid Flowchart

flowchart TD A["Surgeon submits OR booking request"] --> B["Validate patient, encounter, procedure"] B --> C["OR Scheduler reviews request"] C --> D["Check OR room availability"] D --> E["Check surgeon & anesthesiologist schedules"] E --> F{"Room & team available?"} F -->|"No"| F1["Suggest alternative slots"] F1 --> F2{"Alternative accepted?"} F2 -->|"No"| Z1["Request on hold"] F2 -->|"Yes"| G["Select OR room & time block"] F -->|"Yes"| G["Select OR room & time block"] G --> H["Create or_cases record"] H --> I["Update or_schedules utilisation"] I --> J["Assign supporting staff"] J --> K["Send confirmations to team & patient"] K --> L["Check consent & pre-auth status"] L --> M{"Consent/pre-auth complete?"} M -->|"No"| M1["Flag case as pending"] M1 --> Z2["Case scheduled with pending items"] M -->|"Yes"| Z3["Case fully scheduled"]

Decision Points

  1. Room & team available? - If not, scheduler must negotiate alternative time or room.
  2. Alternative accepted? - Surgeon may accept or request different slot; request may remain pending.
  3. Consent/pre-auth complete? - If not, case is scheduled but flagged; pre-op team must resolve before day of surgery.

Integration Points

  • CPOE
  • OR booking request and pre-op orders.
  • EHR & Patient Management
  • Encounter linkage and pre-op clearance status.
  • Billing & Claims
  • Surgical case data for OR charges and professional fees.
  • PIS (Anesthesia drugs)
  • Anesthesia plan and drug requirements.
  • Staffing/HR
  • Staff assignment and availability (if integrated).
  • Patient Portal
  • Procedure schedule and pre-op instructions.

Exception Handling

  • Overlapping cases for same surgeon:
  • System detects conflict and blocks scheduling until resolved.
  • OR room closed (maintenance/emergency):
  • Admin updates or_rooms.is_active = false; system prevents new bookings and prompts rescheduling of existing cases.
  • Last-minute cancellation:
  • Case status updated to cancelled; slot may be offered to urgent cases; billing and utilisation metrics updated accordingly.

Paperless Transformation

Previously Paper-Based Now Digital In-System Notes
Paper OR booking forms submitted to OR office Electronic OR booking with or_cases and workflow Reduces lost requests and speeds approval
Whiteboard OR schedules in theatre Digital OR Schedule Board with real-time updates Accessible from anywhere; supports analytics
Manual staff assignment sheets Electronic staff assignment linked to cases Improves accountability and planning
Phone calls/SMS for schedule confirmation Automated notifications and calendar invites Reduces communication errors and missed messages

Remaining Paper Touchpoints: Printed daily OR list for theatre staff if desired; can be replaced by digital displays.

Inputs and Outputs

Inputs:

Source Data Element Format
Surgeon (via CPOE or OR Case Booking screen) Patient, procedure (CPT), estimated duration, preferred date/time, equipment/implant needs UI form input / CPOE event
patients / encounters Patient identity and pre-admission or same-day surgery encounter SQL query
or_rooms / or_schedules OR room inventory, capabilities, block schedules, and existing cases SQL query
provider_schedules Surgeon and anesthesiologist availability SQL query
EHR Patient Management Pre-op clearance status, consent status Internal API
Policy & Contract Management Pre-authorization status for surgical procedure Internal API

Outputs:

Destination Data Element Format
or_cases Scheduled case record (case_status = scheduled) SQL INSERT
or_schedules Block usage and utilisation metrics updated SQL UPDATE
encounters Updated encounter type/class for surgical episode SQL UPDATE
scheduling_rules_audit Rule overrides (e.g., after-hours case) SQL INSERT
Surgeon / Anesthesiologist Schedule confirmation and case details Notification service
Patient SMS/email/app with pre-op instructions and schedule Notification service
OR Schedule Board (SCR-SCH-006) Updated Gantt-style view for all rooms UI refresh
integration_message_log Notification records SQL INSERT

Post-conditions:

  • OR case created with procedure, team, room, and time block
  • OR schedule board reflects new case; utilisation metrics updated
  • Surgeon, anesthesiologist, and patient notified of schedule
  • Pre-op consent and pre-authorization status tracked; case flagged if pending
  • Supporting staff assigned (or flagged for manual assignment)

SLA and Timing

Step Target Time Escalation Measurement Source
OR booking request submission < 5 minutes (surgeon-driven) None — workflow metric or_cases.requested_at
OR Scheduler review of pending requests < 4 hours for elective; < 30 minutes for urgent Alert OR Scheduler at threshold; escalate to OR Manager or_cases.reviewed_at
OR room and team availability check < 10 seconds Performance alert if > 30s Application performance monitoring
Case scheduling confirmation < 2 seconds (system processing) None — system operation or_cases.created_at
Surgeon/patient notification delivery < 60 seconds Alert notification admin if > 5 min Notification service log
Pre-op consent resolution (pending items) < 24 hours before scheduled surgery Alert pre-op team at 24h; escalate to OR Manager at 12h Pre-op checklist timestamps
Emergency OR case end-to-end (request to scheduled) < 15 minutes Escalate to OR Manager immediately or_cases.created_at - request time

State Transition Diagram

stateDiagram-v2 [*] --> Requested : Surgeon submits OR booking request Requested --> PendingReview : Request queued for OR Scheduler PendingReview --> Scheduled : OR Scheduler assigns room, date, and team PendingReview --> OnHold : No suitable room/team available, surgeon contacted OnHold --> PendingReview : Alternative proposed or capacity freed OnHold --> Cancelled : Surgeon or patient cancels request Scheduled --> PendingConsent : Consent or pre-auth missing Scheduled --> ReadyForSurgery : All pre-op requirements met PendingConsent --> ReadyForSurgery : Consent and pre-auth obtained PendingConsent --> Cancelled : Consent refused or pre-auth denied ReadyForSurgery --> InProgress : Patient in OR, surgery commenced InProgress --> Completed : Surgery finished, patient to recovery InProgress --> Aborted : Surgery aborted (complication, equipment failure) Scheduled --> Cancelled : Case cancelled (patient, surgeon, or clinical reason) Scheduled --> Rescheduled : Date/time changed Rescheduled --> Scheduled : New slot confirmed Completed --> [*] Cancelled --> [*] Aborted --> [*]

WF-SCH-008: Waitlist Management

Process Flow

Actor: Scheduling Clerk, System (automated)
Trigger: No available slot for requested appointment or bed; slot becomes available
Pre-conditions:

  • Waitlist functionality enabled for relevant services.
  • waitlist_entries table configured with priority rules.
  • Notification channels (SMS/app) configured and PDPL-compliant consent obtained.
  1. When booking attempt fails due to no available slots (WF-SCH-001), clerk or portal user is offered option to join waitlist.
  2. If accepted, system creates waitlist_entries row: - patient_id, waitlist_type (appointment/bed), requested_service, preferred_provider_id, priority, added_datetime, target_date_from/to, status = active.
  3. Scheduling Clerk can view and manage waitlist via Waitlist Management screen (SCR-SCH-008), with sorting by priority and days waiting.
  4. System continuously monitors appointment_slots and beds for newly available capacity (e.g., cancellations, discharges).
  5. When a slot becomes available, system identifies matching waitlist entries based on: - Service/department. - Provider (if required). - Priority and target date range.
  6. Decision: Matching waitlist entry found? - If no, slot remains available for normal booking. - If yes, proceed.
  7. For auto-offer mode: - System sends offer notification to highest-priority matching patient with expiry time (e.g., 2 hours). - waitlist_entries.offer_status updated (if such field exists) and offered_count incremented.
  8. Patient responds via portal/SMS link: - Accept → system invokes WF-SCH-001 to book appointment into freed slot. - Decline or no response before expiry → system moves to next patient in queue.
  9. For manual mode: - Clerk contacts patient and manually books appointment; system updates waitlist_entries accordingly.
  10. Once appointment/bed is booked from waitlist:
    • waitlist_entries.status = resolved.
    • waitlist_entries.resolution_type = booked.
    • resolved_datetime set.
  11. If patient declines or cannot be reached after multiple offers:
    • resolution_type may be set to declined or lost_to_follow_up.

Data Modified:

  • waitlist_entries — INSERT, UPDATE (status, offered_count, resolution_type, resolved_datetime)
  • appointments — INSERT (when booking from waitlist)
  • appointment_slots — UPDATE (current_bookings)
  • integration_message_log — INSERT (notifications)

Mermaid Flowchart

flowchart TD A["No slot available during booking"] --> B["Offer waitlist option"] B --> C{"Patient/Clerk accepts waitlist?"} C -->|"No"| Z1["Booking aborted"] C -->|"Yes"| D["Create waitlist entry (status=Active)"] D --> E["Monitor for freed slots"] E --> F{"Slot becomes available?"} F -->|"No"| E F -->|"Yes"| G["Find matching waitlist entries"] G --> H{"Match found?"} H -->|"No"| Z2["Slot available for normal booking"] H -->|"Yes"| I["Send auto-offer to highest priority patient"] I --> J["Wait for patient response until expiry"] J --> K{"Accepted?"} K -->|"No"| L["Update entry (declined/expired), move to next"] L --> H K -->|"Yes"| M["Book appointment into freed slot (WF-SCH-001)"] M --> N["Update waitlist entry (status=Resolved, type=Booked)"] N --> Z3["Waitlist converted"]

Decision Points

  1. Patient/Clerk accepts waitlist? - If not, no waitlist entry is created.
  2. Slot becomes available? - Triggered by cancellation or schedule change.
  3. Match found? - Based on service, provider, priority, and date range.
  4. Accepted? - If patient declines or times out, next patient is offered.

Integration Points

  • Patient Portal
  • Waitlist enrolment and offer acceptance/decline.
  • Notification Service
  • SMS/app notifications with time-limited offers.
  • EHR & Patient Management
  • Appointment creation from waitlist.
  • Scheduling Analytics
  • Waitlist conversion metrics for KPIs.

Exception Handling

  • Multiple offers accepted simultaneously:
  • System uses transactional booking; first confirmed booking gets slot; others receive “slot no longer available” message and remain on waitlist.
  • Notification failure:
  • System logs failure and may fall back to manual contact by clerk.
  • Waitlist entry stale (e.g., patient already booked elsewhere):
  • On offer generation, system checks if patient already has suitable appointment; if yes, marks entry as resolved (duplicate).

Paperless Transformation

Previously Paper-Based Now Digital In-System Notes
Paper lists or spreadsheets tracking patients waiting for appointments/beds waitlist_entries with structured fields and priorities Reduces errors and improves fairness in allocation
Manual phone trees to fill cancellations Automated matching and offers Increases utilisation of freed capacity and reduces staff workload
No systematic tracking of wait time on waitlist Time-stamped entries and resolution data Enables KPI tracking (Waitlist Conversion Rate, days waiting)
Ad-hoc notes about patient preferences Structured preferred dates/providers in waitlist Better patient-centred scheduling

Remaining Paper Touchpoints: None — fully digital.

Inputs and Outputs

Inputs:

Source Data Element Format
Booking workflow (WF-SCH-001) Failed booking attempt (no slot available) Workflow event
Actor (Clerk or Patient) Waitlist acceptance, preferred dates, acceptable providers, priority UI form input / Portal API
appointment_slots / beds Newly available capacity (cancellations, discharges, schedule changes) SQL monitoring / event
waitlist_entries Existing waitlist entries with priority, service, and date preferences SQL query
Patient response Accept/decline offer via portal, SMS link, or phone Portal API / notification callback

Outputs:

Destination Data Element Format
waitlist_entries New entry (status = active) or updated entry (status = resolved, declined, lost_to_follow_up) SQL INSERT / UPDATE
appointments New appointment from waitlist conversion (via WF-SCH-001) SQL INSERT
appointment_slots Updated booking count for converted slot SQL UPDATE
Patient notification Waitlist offer with expiry time, or confirmation of booking Notification service (SMS/email/app)
integration_message_log Notification delivery records SQL INSERT

Post-conditions:

  • Waitlist entry created with structured priority, preferences, and timestamps
  • When slot becomes available, highest-priority matching patient offered the slot
  • Successful conversion results in booked appointment and resolved waitlist entry
  • Declined or expired offers cycle to next patient in queue
  • Full audit trail of waitlist additions, offers, and resolutions

SLA and Timing

Step Target Time Escalation Measurement Source
Waitlist entry creation < 2 seconds None — system operation waitlist_entries.added_datetime
Slot-to-waitlist matching (on cancellation) < 30 seconds None — automated Application event log
Offer notification delivery < 60 seconds Alert notification admin if > 5 min Notification service log
Patient response window 2 hours (configurable) Auto-expire and offer to next patient waitlist_entries.offer_expiry
Waitlist conversion (offer accepted to booked) < 2 minutes None — automated via WF-SCH-001 appointments.created_at
Average days on waitlist < 14 days (specialty-dependent) Dashboard flag for entries > 14 days; escalate to Scheduling Manager > 30 days waitlist_entries.added_datetime vs resolution

Note: Waitlist management is a process-coordination workflow that matches available capacity to queued patients. It does not manage a distinct entity lifecycle beyond the waitlist_entries status field (Active → Offered → Resolved/Declined/Expired). No separate state diagram is required.


These workflows, combined with the underlying data model and integrations, enable a fully paperless scheduling and bed/OR management process aligned with UAE regulatory requirements, including UAE PDPL, MOH/DOH/DHA policies, and NABIDH/Malaffi HIE connectivity.

content/clinical/scheduling/01-workflows.md Generated 2026-02-20 22:54