Skip to main content
. 2025 Oct 24;25(21):6560. doi: 10.3390/s25216560
Algorithm 1 Context-Aware Alert Decision Framework
  •   1:

    Input: Set of alarms A={a1,a2,,aN}, where ai=(ti,xi,ui,ci,ri)

  •   2:

    Initialize: Effective alert set A*Ø

  •   3:

    for all  aiA  do

  •   4:

        // Suppression Check

  •   5:

        if xi>θx or ui<θu or care(ci){low-priority} then

  •   6:

            Discard ai and log suppression

  •   7:

            continue

  •   8:

        end if

  •   9:

        // Context-Aware Delay Assignment

  • 10:

        Compute delay: D(ai)=α1(1ui)+α2ri+α3ci

  • 11:

        if ti+D(ai)>Tackthen

  • 12:

            Discard ai due to unacceptable delay

  • 13:

            continue

  • 14:

        end if

  • 15:

        // LLM-Based Validation and Nurse Assignment

  • 16:

        Generate prompt: Prompt(ai)=T(ti,xi,ui,ci,ri)

  • 17:

        Query LLM to get: priority(ai) and assigned nurse n*

  • 18:

        Compute dynamic threshold τ(ci,xi,ri,ti)

  • 19:

        if priority(ai)<τ(ci,xi,ri,ti) then

  • 20:

            Discard ai (Not clinically significant)

  • 21:

            continue

  • 22:

        end if

  • 23:

        // Notification Dispatch

  • 24:

        Send alert ai to nurse n*

  • 25:

        Start acknowledgment timer Tack

  • 26:

        if No acknowledgment within Tack then

  • 27:

            Escalate to next-best nurse n

  • 28:

        end if

  • 29:

        Update workload and availability for assigned nurse

  • 30:

        Add ai to effective alert set: A*A*{ai}

  • 31:

    end for

  • 32:

    Output: Escalated and handled alert set A*