Skip to content

MOD ESS 007 NTF

Domain specifications / D10-ESS / 5. Detailed Functional Requirements / 5.7 Module Specification: Notification Service

5.7 Module Specification: Notification Service

5.7.1 Module Overview

Module ID: MOD-ESS-007 (module code NTF)

Purpose: Deliver notifications for critical results, overdue tasks, appointment reminders, workflow alerts and secure communications with priority, recipient resolution, acknowledgement, escalation, delivery status and deduplication (Architecture 5.1). The requesting domain owns the content and the business rule; this module owns delivery and its evidence.

Business Capabilities: - CAP-ESS-008 Notification and escalation

Primary Actors: - Calling domain service (ACT-ESS-013), workforce user (ACT-ESS-011), workflow and notification administrator (ACT-ESS-010)

Dependencies: - MOD-ESS-001 (recipient accounts), MOD-ESS-005 (organizational units), MOD-ESS-008 (timers and tasks), MOD-ESS-006, MOD-ESS-012 (escalation policy versions). - Domain 2 for external messaging channel integration; Domain 7 for patient-facing delivery and preferences; Domains 1 and 3 for on-call, care-team and assignment data.

5.7.2 Functional Area: Notification Dispatch and Delivery

Functional Area ID: FA-ESS-021

Description: Prioritization, recipient resolution, channel selection, deduplication and delivery status.

Scope: - Included: in-application notifications, and external channels where configured. - Excluded: message content authoring rules and patient communication preferences presentation (owning domains); channel gateways (Domain 2).

5.7.3 Functional Area: Acknowledgement and Escalation

Functional Area ID: FA-ESS-022

Description: Acknowledgement tracking, timed escalation along a policy chain and closure.

Scope: - Included: escalation policy execution and evidence. - Excluded: the clinical decision of who is accountable and how fast (owning domain and clinical governance).

5.7.4 Detailed Requirements

Requirement FR-ESS-NTF-001: Notification Dispatch, Recipient Resolution and Delivery Status

Attribute Description
Requirement ID FR-ESS-NTF-001
Requirement Name Notification dispatch, recipient resolution and delivery status
Requirement Type Functional
Module Notification Service
Functional Area FA-ESS-021 Notification dispatch and delivery
Priority Must
Criticality Critical
Requirement Status Draft
Source PRS section 5 (Enterprise services: notification); PRS section 8.1 (Enterprise common services); Architecture 5.1 (Notification); SAFE-004 (duplicate prevention); contributes to FLOW-001 reminders (primary Domain 1) and PAT-011 communication (primary Domain 7)
Related Business Rule BR-ESS-024, BR-ESS-023
Related Workflow WF-ESS-007

1. Requirement Statement

The system shall accept notification requests from domain services, resolve recipients from a named user, role, team or on-call assignment, deliver by priority through configured channels, suppress duplicates, and record and expose the delivery status of every notification.

2. Business Rationale

A notification that is sent but not delivered, or delivered to someone no longer on shift, is a patient-safety hazard. A shared service gives one place to see what was sent, to whom, and what happened.

3. Actors and Permissions

Actor Permission Conditions
Calling domain service Create / cancel / close notifications; read status of its own notifications Registered notification types only
Workforce user Read own notifications; set own channel settings within policy Cannot switch off the channels of critical-priority notifications
Workflow and notification administrator Read all statuses; retry; reroute under procedure Retry and reroute return a Delivery Failed notification to Queued; each needs a reason; rerouting audited; no access to protected content beyond what the role permits

4. Preconditions - The notification type is registered with its owning domain, permitted priorities, content template and allowed channels.

5. Trigger - A domain service or workflow instance submits a notification request.

6. Functional Behaviour

  1. The system accepts a request carrying notification type, priority, recipient specification, subject reference (for example patient and source record references), content parameters, idempotency key and, where acknowledgement is required, an escalation policy reference.
  2. The system resolves a role, team or on-call recipient to the current accountable person or people at send time using assignment data supplied by, or read from, the owning domain.
  3. The system selects channels according to priority, notification type and recipient settings, and always includes the in-application channel for workforce recipients. A user cannot switch off the channels configured for critical-priority notifications.
  4. For workforce recipients, content sent outside the application (push to a managed phone, SMS, email or messaging) carries no patient name, identifier, diagnosis or result. It says only that an item is waiting, its priority and where to open it (for example "1 critical result to acknowledge — open the hospital app"). Opening the item requires sign-in and shows it in the application with its patient context. Templates for external channels are checked against this rule when the notification type is registered.
  5. The system returns the existing notification when the idempotency key repeats, and merges requests matching the type's deduplication rule within its window.
  6. The system records per channel: sent time, delivery confirmation or failure with reason, and retries.
  7. The system retries failed deliveries under the retry policy and tries alternative channels for high and critical priorities.
  8. The system exposes status by API and emits a notification-status-changed event (EVT-ESS-009) to the requesting domain.
  9. The system processes critical-priority notifications ahead of lower priorities when under load.
  10. For patient recipients, the system delivers through Domain 7 using the patient's communication preferences and consent; it does not hold patient contact preferences itself.

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Notification type Code Yes Registered Determines template, channels and rules
Priority Code Yes Permitted for type Critical, high, normal, low
Recipient specification User, role, team or on-call reference Yes Resolvable or fallback present Who should receive
Subject reference References Conditional Patient and source record identifiers where applicable What it concerns
Content parameters Structured Yes Match template Values for the message
Idempotency key String Yes — Duplicate protection
Acknowledgement required Boolean Yes Must be true for critical Whether acknowledgement is tracked
Escalation policy Reference Conditional Required when acknowledgement required Chain and timers

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-NTF-001-1 Idempotency key repeats Existing notification returned
PR-NTF-001-2 Critical priority without escalation policy Request rejected
PR-NTF-001-3 No recipient resolved Fallback recipient used for critical and high; otherwise status "unresolved" reported to requester
PR-NTF-001-4 Recipient account suspended or user not on duty where assignment data shows it Resolve to current holder of the role or to fallback
PR-NTF-001-5 All channels fail Status Delivery Failed; escalation proceeds as unacknowledged
PR-NTF-001-6 An external-channel template for a workforce recipient contains a patient name, identifier, diagnosis or result parameter Template rejected at registration
PR-NTF-001-7 A user setting would switch off a critical-priority channel Setting refused

9. Output Requirements

Output Format Recipient Description
Notification identifier and status API response Calling domain service Accepted, with identifier
Notification In-application message and configured external channels Recipient Content per template
Notification-status-changed event Event (EVT-ESS-009) Requesting domain Delivery, acknowledgement, escalation, failure
Delivery report Report (REP-ESS-011) Notification administrator Volumes, failures, time to deliver

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Unregistered type Registry check Reject Error to calling service.
Template parameter missing Template validation Reject Error to calling service.
Channel provider outage Delivery failure Retry; alternative channel; alert operations Operations worklist item.
Notification service unavailable to caller Caller timeout Caller retains the request in its outbox and retries; for critical items the owning domain's own worklist remains the authoritative record of the unacknowledged matter Caller shows the item as "notification pending".

11. State and Lifecycle Behaviour

Notifications follow the states in section 4.3.

12. Audit Requirements

  • Audited events: request, recipient resolution result, each delivery attempt and outcome, cancellation, administrative retry or reroute.
  • Events reference the subject and source record; message content is not duplicated into audit.

13. Security and Privacy Requirements

  • Recipients see a notification only if authorized for its subject; opening the underlying record triggers a normal authorization decision.
  • External channel content for workforce recipients carries no patient detail (CUX-65); the item is opened only after sign-in, with a normal authorization decision.

14. Acceptance Criteria

  • AC-01: Given a request addressed to the on-call role for a unit, when sent, then it is delivered to the person currently holding that role and the status records who that was.
  • AC-02: Given the same request submitted twice with the same idempotency key, when processed, then one notification exists.
  • AC-03: Given a critical request without an escalation policy, when submitted, then it is rejected.
  • AC-04: Given all channels fail, when retries are exhausted, then the status is Delivery Failed, the requesting domain receives the event and the item appears on the operations worklist.
  • AC-05: Given any notification, when its history is retrieved, then each delivery attempt has a timestamp and outcome.
  • AC-06: Given a critical result notification sent to a workforce user by push or SMS, when the message is read on the device, then it shows no patient name, identifier, diagnosis or result, only the item, its priority and where to open it; and opening it requires sign-in.
  • AC-07: Given a user's channel settings, when the user tries to switch off a critical-priority channel, then the change is refused.

15. Dependencies and Integration

  • Upstream dependencies: requesting domains; assignment data from Domains 1 and 3; Domain 2 channels.
  • Downstream dependencies: FR-ESS-NTF-002; Domain 7 for patient delivery.
  • Required events or APIs: IF-ESS-009; EVT-ESS-009.

16. Open Questions / Assumptions

  • External channels (SMS, WhatsApp, email and push) are delivered through EXT-ESS-005, which uses the Domain 2 channel interface EXT-ISE-013 (GAP-ESS-009, closed).
  • Appointment reminder content and timing rules are owned by Domain 1 and patient preferences by Domain 7.

Requirement FR-ESS-NTF-002: Acknowledgement Tracking and Escalation

Attribute Description
Requirement ID FR-ESS-NTF-002
Requirement Name Acknowledgement tracking and escalation
Requirement Type Functional
Module Notification Service
Functional Area FA-ESS-022 Acknowledgement and escalation
Priority Must
Criticality Critical
Requirement Status Draft
Source Architecture 5.1 (Notification: acknowledgement, escalation); PRS 25.1 "Right time"; contributes to RES-003 and ANC-018 (primary Domain 4), NUR-004 (primary Domain 3), ORD-005 (primary Domain 3), SEC-015
Related Business Rule BR-ESS-023, BR-ESS-025
Related Workflow WF-ESS-007

1. Requirement Statement

The system shall track acknowledgement of notifications that require it, shall escalate unacknowledged notifications along the configured escalation chain within the configured times, shall timestamp every attempt, acknowledgement and escalation, and shall keep a notification open and visible when its escalation chain is exhausted.

2. Business Rationale

RES-003 requires unacknowledged critical results to escalate within configured time, and ANC-018 requires all attempts to be timestamped. The capability is shared so that every domain's escalations behave and are evidenced the same way.

3. Actors and Permissions

Actor Permission Conditions
Recipient (workforce user) Acknowledge Only as the resolved recipient or an escalation recipient
Calling domain service Read status; close; cancel Own notifications
Owning domain's policy administrator Create / Update escalation policies Through configuration lifecycle; clinical policies approved by clinical governance

4. Preconditions - The notification requires acknowledgement and references a published escalation policy.

5. Trigger - Delivery of an acknowledgement-required notification; acknowledgement timer expiry; acknowledgement action.

6. Functional Behaviour

  1. The system starts an acknowledgement timer when the notification is sent, with the duration given by the escalation policy step.
  2. The system records an acknowledgement with the acknowledging user, time and channel, and reports it to the requesting domain; an acknowledgement means "received and accepted responsibility to act", and does not record the clinical action itself.
  3. The system rejects acknowledgement by a user who is not a resolved recipient of the current or an earlier step.
  4. On timer expiry the system notifies the next step's recipients, keeps earlier recipients informed, and starts the next timer.
  5. The system supports policies with multiple steps, parallel recipients within a step and a final fallback recipient.
  6. The system marks the notification Escalation Exhausted when the last step expires, keeps it open, informs the requesting domain and lists it on the supervising worklist named in the policy.
  7. The system stops escalation on acknowledgement, cancellation or closure.
  8. The system guarantees that timers survive service restart and failover; on recovery, overdue timers fire immediately.
  9. The system reports time to acknowledge and escalation counts per notification type.

7. Input Requirements

Input Field Data Type Mandatory Validation Description
Escalation policy Versioned configuration Yes At least one step; final fallback defined for critical types Steps, recipients, timers
Acknowledgement User action — User is an eligible recipient Acceptance
Closure / cancellation API call — From requesting domain Ends tracking

8. Processing Rules

Rule ID Processing Rule Expected Result
PR-NTF-002-1 Timer expires without acknowledgement Next step notified; event emitted
PR-NTF-002-2 Last step expires Escalation Exhausted; remains open; requester informed
PR-NTF-002-3 Acknowledgement arrives after escalation Accepted; later steps stopped; all notified recipients informed
PR-NTF-002-4 Service restarts with overdue timers Timers fire on recovery in priority order

9. Output Requirements

Output Format Recipient Description
Acknowledgement record API resource / event (EVT-ESS-009) Requesting domain Who, when, channel
Escalation notifications Notification Next-step recipients Escalated message with history
Escalation report Report (REP-ESS-011) Owning domain, clinical governance Time to acknowledge, escalations, exhausted items

10. Validation and Error Handling

Scenario Validation System Response User Message / Action
Ineligible user acknowledges Recipient check Reject "This notification is not assigned to you."
Policy step has no resolvable recipient Resolution Skip to next step immediately; record the gap Policy owner alerted.
Notification already closed State check Inform user "This item has already been closed."

11. State and Lifecycle Behaviour

Delivered to Acknowledged or Escalated; Escalated to Acknowledged or Escalation Exhausted; then Closed by the requesting domain (section 4.3).

12. Audit Requirements

  • Audited events: timer start, expiry, each escalation step, acknowledgement, exhaustion, closure.

13. Security and Privacy Requirements

  • Escalation recipients must be authorized for the subject; where an escalation recipient lacks a relationship to the patient, the escalation itself constitutes a policy-defined basis for access, recorded in the decision trace.

14. Acceptance Criteria

  • AC-01: Given an acknowledgement-required notification, when the first timer expires without acknowledgement, then the second-step recipients are notified and the event is timestamped.
  • AC-02: Given an escalated notification, when a second-step recipient acknowledges, then escalation stops and the requesting domain receives the acknowledgement with user and time.
  • AC-03: Given the last step expires, when no acknowledgement exists, then the status is Escalation Exhausted, the item remains open and visible, and the requesting domain is informed.
  • AC-04: Given the service is restarted while timers are running, when it recovers, then no timer is lost and overdue timers fire.
  • AC-05: Given a completed notification, when its history is read, then all attempts, acknowledgements and escalations are timestamped (ANC-018 support).

15. Dependencies and Integration

16. Open Questions / Assumptions

  • Escalation times for clinical notification types are set by the owning domain and clinical governance; none are defined here.
  • The critical result itself, its named responsible recipient and its closure remain Domain 4 records; this service holds delivery and acknowledgement evidence only.

← 5.6 Module Specification: Audit Service and Security-Event Integration | Contents | Identifier index | 5.8 Module Specification: Workflow Orchestration and Task Coordination →