An outpatient no-show prediction and dynamic scheduling method and system
Patent Information
- Application Number
- CN202611043171.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]然而,在真实门诊场景中,患者爽约、迟到、临时改约、医生停诊、科室临时调整以及季节性患者行为变化会对排程序列产生持续扰动
第一,通过Monte Carlo Dropout实现爽约预测的不确定性量化,能够针对不同置信度的患者采取差异化排程策略;
Smart Images

Figure CN122822264A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical resource scheduling and smart hospital information processing technology, specifically to a method and system for predicting outpatient no-shows and dynamic scheduling. Background Technology
[0002] Outpatient appointment scheduling is a crucial aspect of optimizing medical resources and improving the patient experience. Existing outpatient scheduling methods typically include rule-based scheduling, operations research-based optimization scheduling, and data-driven intelligent scheduling. Rule-based scheduling, such as first-come, first-served or fixed-time slot allocation, is simple to implement but lacks real-time adaptability. Operations research-based optimization scheduling usually targets waiting time, doctor's free time, or doctor's overtime hours, which can improve resource utilization to some extent. Data-driven intelligent scheduling further incorporates machine learning models to predict consultation duration, patient no-show probability, or patient preferences.
[0003] However, in real-world outpatient settings, patient no-shows, late arrivals, last-minute rescheduling, doctor absences, departmental adjustments, and seasonal changes in patient behavior can continuously disrupt the scheduling process. If the scheduling system only performs a static scheduling event before appointments or only makes manual adjustments after no-shows occur, it can easily lead to idle doctors, increased patient waiting times, a backlog of overtime shifts, and decreased patient satisfaction.
[0004] While existing technologies improve appointment scheduling from different perspectives, they still suffer from the following problems: First, they often rely on single-point estimations of patient no-show behavior, lacking quantification of prediction uncertainty and failing to distinguish between high-risk patients with high certainty and patients with insufficient model confidence. Existing technologies generally neglect the uncertainty of patient no-show behavior and its disruptive impact on outpatient scheduling. For example, CN202510937988.2 constructs an optimization model based on the assumption that patients will arrive on time for their appointments; CN113935508A considers patient choice behavior but does not involve no-show behavior modeling; and CN107278304A introduces no-show probability prediction but only outputs single-point probability values. None of these methods quantify the confidence level of the prediction results, ultimately leading to a lack of necessary risk sensitivity in scheduling decisions. Furthermore, patient no-shows are high-frequency events in outpatient settings, directly causing idle and wasted medical resources and severe disruption to existing scheduling sequences.
[0005] Second, there is a lack of an explicit dual-objective collaborative mechanism between patient subjective preferences and outpatient operational efficiency. Most existing solutions use minimizing system time costs or maximizing overall benefits as a single optimization objective. For example, CN202510937988.2 uses only the patient's expected consultation time as an input feature of the ranking model; CN113935508A uses the MNL model to calculate patient selection probabilities to indirectly reflect preferences; and CN107278304A allocates time slots solely based on no-show probabilities. None of these solutions form an explicit collaborative optimization framework encompassing both patient preferences and operational efficiency. Some solutions employing dynamic weight switching also rely on manually preset heuristic rules, failing to adaptively learn optimal weight strategies from historical operational data. When outpatient operation modes shift, fixed rules struggle to adapt automatically.
[0006] Third, the lack of quantifiable explanations for recommendations makes it difficult for patients and administrators to understand the reasons behind the system's recommendations. Existing technologies often rely on complex black-box models for scheduling decisions. For example, CN202510937988.2 uses an encoder-decoder neural network for ranking decisions, with opaque internal decision-making logic. Similarly, CN113935508A and CN107278304A fail to establish quantifiable explanations for recommendations for patients and administrators. When recommending appointment times to patients, the system cannot provide specific explanations based on the contribution of model features, leading patients to passively accept the recommendations and resulting in insufficient participation and trust in the system.
[0007] Fourth, the system lacks robustness to concept drift and seasonal behavioral changes, making it difficult to continuously adapt to new data distributions after deployment, such as flu season, policy changes, and changes in doctor scheduling patterns. Existing solutions often employ simple incremental update strategies for online feedback learning, failing to adequately consider feature distribution drift caused by factors commonly found in outpatient settings, such as seasonal fluctuations in patient behavior patterns, adjustments to medical policies, and changes in doctor scheduling rules. When the predictive ability of the model trained on older data distributions degrades, the lack of effective automatic detection and adaptive adjustment mechanisms leads to a gradual decline in system performance over time.
[0008] Therefore, it is necessary to provide a method and system for predicting and dynamically scheduling outpatient no-shows that can simultaneously handle uncertainty of no-shows, doctor's consultation risk, real-time changes in the queue, patient time preferences, and online feedback. Summary of the Invention
[0009] The technical problem this invention aims to solve is: how to accurately identify and quantify the uncertainty of patients' no-shows, late arrivals, early cancellations, and last-minute rescheduling during the outpatient appointment scheduling process, and how to achieve dynamic scheduling, explainable recommendations, and online adaptive updates while taking into account patient preferences, doctors' consultation risks, and outpatient operational efficiency.
[0010] To address the aforementioned technical problems, this invention employs a method and system for predicting outpatient no-shows and dynamic scheduling: Firstly, a method for predicting outpatient no-shows and dynamically scheduling appointments is provided, including the following steps: S1: Acquire outpatient appointment data, clinic queue data, doctor's outpatient data, patient's historical appointment behavior data, patient's spatial commuting data, and environmental context data, and classify and label the patient's behavior after the appointment, and extract multimodal features for no-show risk prediction and scheduling decision-making. S2, based on the multimodal features, calculate the patient no-show risk probability, patient no-show prediction uncertainty, decision confidence, and doctor's no-show risk, and form a risk stratification result based on the patient no-show risk probability and patient no-show prediction uncertainty; S3. Based on the appointment pool in the hospital information system, candidate appointment time slots are generated. Probabilistic scheduling efficiency simulation is performed on each candidate appointment time slot to obtain the efficiency feature vector of the corresponding candidate appointment time slot. S4, obtain the patient's time slot preference score for each candidate appointment time slot, and normalize the time slot preference score into a patient's medical time slot preference vector; S5, the current outpatient operation status is modeled as a Markov decision process, and the reinforcement learning strategy network generates efficiency-preference weights based on the risk stratification results, efficiency feature vector, patient consultation time preference vector, consultation room crowding status and doctor's consultation closure risk, and calculates the comprehensive score of each candidate appointment time based on the efficiency-preference weights; In step S2, the risk stratification result, the efficiency feature vector, and the patient appointment time preference vector obtained in step S3 are used as state inputs for the same outpatient operation status in step S5 to participate in the generation of efficiency-preference weights. For patients belonging to the high-risk uncertainty layer, the reinforcement learning policy network calls the tail risk term in the efficiency feature vector as a constraint input when generating efficiency-preference weights, so that the recommended appointment time avoids candidate appointment time with tail risk exceeding a preset threshold. S6. Determine the recommended appointment time slot based on the comprehensive score, generate an interpretable scheduling result that includes the recommendation reason, feature contribution and efficiency-preference trade-off explanation, output the interpretable scheduling result to the hospital information system, and update the scheduling strategy online based on the actual attendance results, no-show results, waiting time and patient feedback. The method further includes: Regularly conduct counterfactual fairness audits on scheduling decisions. While keeping other conditions unchanged, change the audit attributes to which patients belong to observe changes in recommendation results. Trigger an alert when fairness indicators exceed a preset threshold.
[0011] Specifically, in step S1, the event classification labeling includes: labeling events where patients fail to check in during the appointment time and do not cancel or reschedule in advance as complete no-shows; labeling events where the check-in time exceeds the lateness tolerance threshold as late no-shows; labeling events where patients actively cancel before the appointment date as early cancellations; labeling events where patients reschedule to another time slot on the same day as temporary reschedulings; and labeling cancellation events caused by doctors being closed, departmental adjustments, or system failures as hospital-related cancellations. Late no-shows are treated as an independent category, or their impact on subsequent queuing delays is converted into an equivalent no-show weight.
[0012] Specifically, the risk of doctors suspending their services. The specific quantification formula is as follows: ,in This refers to the number of times the doctor has historically made punctual house calls. The ratio of the total number of outpatient visits in history to the total number of outpatient visits. Historical on-time performance; The number of days in advance of the scheduled outpatient appointment. ; This is the threshold for the number of days to end, default. 'day'; 'k' is the steepness parameter, default value. .
[0013] Specifically, in step S2, the patient's no-show risk probability is obtained through a two-layer heterogeneous integrated prediction architecture. The two-layer heterogeneous integrated prediction architecture includes a basic prediction layer and an uncertainty estimation layer. The basic prediction layer uses a gradient boosting tree model to output the basic no-show probability. The uncertainty estimation layer uses a deep neural network with a Dropout layer and maintains Dropout activation during the inference phase to perform multiple random forward propagations, thereby obtaining a set of predicted probabilities. Based on the basic no-show probability and the set of predicted probabilities, the integrated no-show probability, cognitive uncertainty, accidental uncertainty, and decision confidence are calculated.
[0014] Specifically, step S2 also includes: using SHAP values to decompose the patient's no-show risk probability into feature contribution, obtaining feature attribution results that promote or reduce no-show risk; and classifying patients into a high-risk certainty layer, a high-risk uncertainty layer, and a low-risk certainty layer based on the integrated no-show probability and cognitive uncertainty. Among them, patients in the high-risk uncertainty layer are given a conservative scheduling strategy in subsequent scheduling, which reserves buffer time or prioritizes tail risks.
[0015] Specifically, in step S3, candidate appointment time slots are generated based on the pool of available appointment slots, time slot granularity, patient selectable time range, target department or target doctor, minimum advance appointment duration, and patient preference for morning or afternoon. When there are insufficient available appointment slots, available appointment slots from other doctors in the same department on adjacent dates are used to generate supplementary time slots. For patients in the low-risk stratum, if the probabilistic scheduling efficiency simulation results meet the preset conditions, overbooking is allowed within the limit of the corresponding time slot capacity. It also includes performing multiple Monte Carlo simulations for each candidate appointment time slot. In each simulation, the arrival status and actual arrival time are sampled based on the no-show probability distribution and the empirical distribution of late arrival time of the patients with appointments. The doctor service, patient waiting, doctor idle time, patient delay and doctor overtime process are deduced according to the first-come-first-served queue rule, and the single efficiency value is calculated. After multiple simulations, an efficiency empirical distribution is formed, and the efficiency mean, efficiency standard deviation and conditional risk value are extracted from the efficiency empirical distribution to form the efficiency feature vector.
[0016] Specifically, in step S5, the state vector of the Markov decision process includes the current congestion index, the current time period code, the risk stratification label of the patients to be scheduled, the SHAP feature attribution value and direction, the distribution entropy of the scheduled patients in each time period, the date type, and the recent moving average of patient satisfaction; the action space is a discretized efficiency-preference weight; the reward function includes operational efficiency reward, patient satisfaction reward, decision consistency reward, and uncertainty penalty; the reinforcement learning policy network is trained using a proximal policy optimization algorithm, and the heuristic weights calculated by the logistic function are used as the baseline to output the correction amount of the heuristic weights to obtain the final efficiency-preference weight.
[0017] The Crowding Index (CI) is defined as the total number of currently scheduled patients. With the maximum service capacity of the outpatient department on that day The ratio, i.e. .in For all of the day The sum of service capacities for each time period, and the default service capacity for each 30-minute time period. Number of patients (based on the department's historical average consultation time) Adjustment: For example, if the average consultation time in a certain department is 10 minutes, then . ,when During periods of low congestion and light outpatient load, the system prioritizes patient time slot preferences; when At a time of high congestion, with outpatient services nearing capacity, the system prioritizes operational efficiency to avoid excessive waiting times and doctors working overtime due to overcrowding. Within the transition interval, the efficiency-preference weights transition smoothly through the logistic function, avoiding scheduling jitter caused by sudden weight changes. The crowding index is one of the core dimensions in the state vector of the reinforcement learning policy network, directly participating in the decision-making process of the efficiency-preference weights.
[0018] Specifically, in step S6, the online update includes: detecting whether the prediction error or behavior distribution has undergone concept drift based on the adaptive sliding window algorithm; when the mean difference between the detected data sub-windows exceeds the adaptive threshold, the model fine-tuning process is triggered. During model fine-tuning, an elastic weight consolidation mechanism is used to apply regularization constraints to important model parameters from previous tasks to prevent catastrophic forgetting. It also utilizes a priority experience replay buffer to assign sampling priority to new samples based on temporal difference error for training.
[0019] Secondly, a system for predicting and dynamically scheduling outpatient appointment cancellations is provided, comprising: a multimodal feature engineering and risk modeling module for performing event classification and labeling, multimodal feature extraction, prediction of patient no-show risk probability, uncertainty quantification, calculation of doctor cancellation risk, SHAP feature attribution, and risk stratification; a Monte Carlo scheduling simulation and efficiency calculation module for generating candidate appointment time slots and performing probabilistic scheduling efficiency simulations for each candidate appointment time slot, outputting an efficiency feature vector; a patient preference interaction acquisition module for acquiring and normalizing patient preference scores for candidate appointment time slots; a deep reinforcement learning dual-objective decision engine for outputting efficiency-preference weights and calculating a comprehensive score based on the outpatient operation status; a scheduling output and interpretable display module for outputting recommended appointment time slots and interpretable scheduling results; a drift-aware online learning module for detecting data distribution drift based on actual operation feedback and updating the prediction model and strategy network; and a fairness audit and patient feedback module for performing counterfactual fairness audits on scheduling decisions and integrating patient feedback to optimize scheduling strategies.
[0020] Thirdly, an electronic device is provided, including a processor and a memory, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the outpatient no-show prediction and dynamic scheduling method.
[0021] Compared with the prior art, the present invention has at least the following beneficial effects: First, by using Monte Carlo Dropout to quantify the uncertainty of no-show prediction, differentiated scheduling strategies can be adopted for patients with different confidence levels. Second, by using Monte Carlo efficiency simulation, the risks of no-shows, lateness, and postponement are propagated to the candidate time slot evaluation results, thereby improving the risk sensitivity of scheduling decisions; Third, by automatically learning the weights between efficiency and patient preferences through Markov decision processes and reinforcement learning strategy networks, it no longer relies entirely on manual experience rules; Fourth, improve recommendation transparency through SHAP feature attribution and counterfactual explanation; Fifth, robust online model updates are achieved through concept drift detection, elastic weight consolidation, and priority experience replay. Sixth, improve scheduling governance capabilities through counterfactual fairness audits and patient feedback channels. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings in the following description are only used to illustrate some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart of the outpatient no-show prediction and dynamic scheduling method of the present invention; Figure 2 This is a block diagram of the module composition of the outpatient no-show prediction and dynamic scheduling system of the present invention; Figure 3 This is a flowchart illustrating the training and inference process of the uncertainty-aware no-show risk prediction model of the present invention. Figure 4 This is a diagram of the training architecture for the dual-objective weighted decision-making strategy based on PPO deep reinforcement learning in this invention. Figure 5 This is a flowchart illustrating the recommendation explanation generation process based on SHAP feature attribution in this invention. Figure 6 This is a schematic diagram of the drift-sensing online learning process of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0025] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0026] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0027] Example like Figure 1 As shown, this embodiment provides a method for predicting outpatient no-shows and dynamic scheduling. This method can be deployed among hospital information systems, appointment registration systems, clinic queuing systems, check-in systems, and patient-side interaction systems, or it can function as an independent scheduling service to interact with the aforementioned systems.
[0028] Step S1 involves preparing for patient information acquisition and uncertainty perception modeling to assess no-show risk. The system retrieves patient appointment records, patient check-in records, doctor scheduling records, appointment pool information, clinic queue status, and patient historical behavior data from the hospital information system, appointment registration system, and check-in system. Simultaneously, it obtains the distance from the patient's address to the hospital or the estimated commute time from the geocoding service, and obtains weather information for the appointment date from the meteorological service.
[0029] In terms of event classification, the system divides post-appointment patient behavior into five categories: complete no-show, late no-show, early cancellation, last-minute rescheduling, and cancellation due to hospital reasons. The specific details of each category are as follows: (1) Complete no-show (Type-A): The patient fails to register in the hospital's check-in system during the appointment period (including the end of the period) and does not cancel or reschedule in advance through any channel (online APP, telephone, on-site window). This type of event is used as a positive sample in model training. The system records the reason for absence (e.g., obtained through follow-up visits). Type-A is the primary prediction target of the no-show prediction model.
[0030] Late arrival and no-show (Type-B): Patients arrive at the hospital on the scheduled date, but their arrival time exceeds the system's preset lateness tolerance threshold (default 15 minutes, which can be configured by each department according to actual operational conditions, ranging from 10 to 30 minutes). Patients who are late exceeding the tolerance time are marked as "late arrival and no-show (Type-B)". Although these patients actually arrive for their appointment, their lateness has an impact on the scheduling cycle equivalent to a partial no-show—resulting in wasted resources in their original appointment time and a chain reaction of delays in subsequent time slots. In the model, Type-B is treated as an independent category (multi-class expansion), or it is converted into an equivalent no-show weight based on the degree of impact of lateness on global efficiency in historical statistics. Weighted training is performed. Meanwhile, in the Monte Carlo efficiency simulation (S3), Type-B patients are not simply binarized into "arrival / no-show" in the Monte Carlo efficiency simulation. Instead, their actual arrival time is sampled from their historical lateness duration experience distribution. Lateness is equivalent to occupying part of the service time in the current period and queuing backward. The longer the lateness duration, the greater the impact on scheduling efficiency. The value (default 0.5) is determined by the linear regression coefficient between late arrival time and subsequent queuing delay in historical data.
[0031] The modeling method for late arrivals and no-shows (Type-B) is determined according to the following rules: Option 1 (preferred): For late arrivals and no-shows, the true label is still recorded as normal attendance. However, adjustments are made to the minority class weights in the loss function: This is equivalent to treating one late arrival sample as 0.5 no-show samples for calculation. The value is determined by the linear regression coefficient between lateness duration and subsequent queuing delay in historical data—for every 1 minute increase in the regression coefficient, the queuing delay is... Increase by 0.1, with a maximum of 1.0. Option 2 (alternative): Expand the event classification to three categories (normal arrival / complete no-show / late no-show), and use the multi-class cross-entropy loss function instead of the binary cross-entropy. In this case, late no-shows participate in model training as an independent third category, without the need for weight calculation.
[0032] Initially, the system will use Option 1 by default. Once enough historical data has been accumulated to support the training of the three-class classification (e.g., more than 1,000 samples for each class), it can be switched to Option 2. In the Monte Carlo efficiency simulation (S3), Type-B patients are not simply binarized into arrival / no-show status, but their actual arrival time is sampled from their historical lateness duration experience distribution.
[0033] (3) Early Cancellation (Type-C): The patient actively cancels the appointment through the system before the appointment date D (excluding D day). This type of event is marked as "Early Cancellation (Type-C)". Although early cancellation releases the original appointment time slot resources (allowing the system to reschedule), the cancellation behavior itself carries important information about the patient's behavioral preferences—patients who cancel frequently have a higher risk of no-shows in the future. Therefore, in the patient's historical behavioral sequence features, the number of early cancellations is input as an independent temporal feature into the no-show prediction model, rather than being directly merged with the no-show label.
[0034] (4) Temporary Rescheduling (Type-D): A patient changes their original appointment time slot to another available time slot on the same day (Day D). This type of event is marked as "Temporary Rescheduling (Type-D)". The impact of temporary rescheduling on scheduling is between cancellation and lateness: the original time slot resource is released, but the release time is later (on the same day), and it is more difficult to refill it than to cancel in advance. In model feature engineering, the number of historical temporary reschedulings and the number of days since the most recent rescheduling from the appointment date are used as time-series feature inputs.
[0035] (5) Hospital-Related Cancellation (Type-E): Cancellations due to reasons other than the patient's fault, such as doctor's absence, temporary departmental adjustments, or hospital system malfunctions. These events are labeled "Hospital-Related Cancellation (Type-E)" and are not included in patient no-show statistics, nor are they considered positive samples in the no-show prediction model. In the state transition modeling of reinforcement learning, hospital-related cancellations are treated as external random perturbations and are analyzed through the random state transitions of the MDP. Naturally accommodated. The system records the frequency and distribution of cancellations due to hospital reasons for analysis of outpatient operations management, but does not affect the individual patient's no-show risk score.
[0036] Among them, complete no-shows serve as the main positive samples in the no-show prediction model; late no-shows can be treated as an independent category, or they can be converted into equivalent no-show weights based on the impact of lateness on scheduling efficiency; early cancellations and temporary reschedulings are not directly merged into no-show labels, but are input into the model as features of the patient's historical behavior sequence; cancellations due to hospital reasons are not included in the patient's personal no-show statistics, but are entered into the scheduling state transition model as external random disturbances.
[0037] In terms of feature engineering, the system extracts six categories of basic features: patient basic information, historical appointment behavior statistics, department and doctor information, appointment time slot information, spatial and commuting features, and environmental and weather context features, specifically: Category 1: Patient Basic Information (6 items) — ① Age (continuous value, years); ② Gender (two values: male / female); ③ Medical Insurance Type (category: urban employee / urban resident / new rural cooperative medical scheme / self-pay / other); ④ Patient Identity Type (initial visit / follow-up visit / referral); ⑤ Mobile Phone Number Location (category, used to help determine the permanent residence area); ⑥ Preferred Contact Method (telephone / SMS / APP push, reflecting the patient's response tendency to reminders).
[0038] Category 2: Historical Reservation Behavior Statistics (8 items) — ① Total Number of Historical Reservations ②Number of times a promise has been broken in the past (Type-A: Complete no-show); ③ Historical no-show rate ④ Number of times late (exceeding the tolerance threshold); ⑤ Historical lateness rate; ⑥ Number of times early cancellations were made (Type-C); ⑦ Number of times last-minute rescheduling was made (Type-D); ⑧ Number of days since the last no-show. .
[0039] Category 3: Department and Doctor Information (5 items) — ① Department code (category); ② Historical average no-show rate of the department (target coding feature); ③ Doctor code (category); ④ Historical average no-show rate of the doctor (target coding feature); ⑤ Historical no-show rate cross-feature of the department-doctor combination.
[0040] Category 4: Appointment Time Slot Information (7 items) – ① Appointment Date Type (Weekday / Weekend / Holiday); ② Appointment Time Slot Code; ③ Time Slot is Morning / Afternoon (Binary Value); ④ Number of Days in Advance for Appointment (Difference between the reservation date and the current date); ⑤ This time slot is which time slot of the day (serial number) ); ⑥ Time period number fill rate (Number of reservations / Total number of available slots for this time period); ⑦ Month (1-12) and season code (spring / summer / autumn / winter) of the reservation date.
[0041] Category 5: Spatial and Commuting Characteristics (5 items) — ① Straight-line distance from residence to the hospital (km, calculated by converting the address text into latitude and longitude coordinates using a geocoding API); ② Estimated commute time (minutes, estimated average daily travel time based on third-party map API); ③ Commuting mode (category: public transport / private car / walking / other, default "unknown" if not collected); ④ Whether to seek medical treatment across districts / counties (binary value, district / county of residence) (5) The average early / late arrival time (in minutes, reflecting patients' travel time budgeting habits).
[0042] Specifically, the patient spatial commuting data refers to a data set reflecting the spatial relationship and travel conditions between the patient's residence and the hospital, specifically including the following five data fields: 1) Straight-line distance from the patient's address to the hospital. Unit: km; 1) After converting the patient's registered address text into latitude and longitude coordinates using a geocoding service, the great circle distance between the patient's address and the hospital's latitude and longitude is calculated using the Haversine formula; 2) Estimated commute time. (Unit: minutes. The estimated average daytime travel time for the origin and destination during the corresponding time period (morning / afternoon) on the reservation date is obtained through a third-party map API. If the map API cannot return valid data, an estimate based on straight-line distance and average urban commuting speed is used.) Approximately equal to ,in 3) Commuting mode (category feature, values include: public transport / private car / walking / other, selected by the patient through the drop-down menu during the appointment or automatically inferred by the system based on the commuting distance). The default setting is walking. The default is public transportation. 4) Whether the patient sought medical treatment across districts / counties (binary feature, determined by whether the administrative division code of the patient's address matches the administrative division code of the hospital; 0 for matches, 1 for disagreements); 5) Average early / late arrival time offset in history. (Unit: minutes, calculated as the arithmetic mean of the differences between the patient's most recent K (default K=5) actual arrival and check-in timestamps and the start time of the appointment period:) Positive values indicate average early arrival, while negative values indicate average late arrival. The above spatial commuting data is collected once per appointment creation, including the estimated commuting time. The system is refreshed once a day in the early morning of the scheduled date to reflect real-time traffic conditions and changes in road congestion.
[0043] Category 6: Environmental and Weather Context Features (5 items) – ① Weather forecast type for the appointment date (sunny / cloudy / rainy / snowy / extreme weather, obtained from meteorological API); ② Maximum temperature for the appointment date ③ Probability of precipitation on the scheduled date ④ Is the current season the peak season for influenza (two values, such as November to March of the following year in the Northern Hemisphere is marked as the peak season); ⑤ Air Quality Index (AQI) for the appointment date.
[0044] Specifically, the environmental context data refers to a dataset of weather, season, and external environmental factors that influence patients' willingness to travel and their no-show behavior. This includes the following five data fields: 1) Weather forecast type for the appointment date (category characteristics, values include: sunny / cloudy / rainy / snowy / extreme weather, obtained via a meteorological service API by city and date, with the weather type mapped from the main weather phenomenon codes returned by the API); 2) Highest temperature for the appointment date. Unit: Celsius (°C). Daily maximum temperature forecast values are obtained from the meteorological API and used to model the impact of extreme temperatures (high temperature >35°C or low temperature <0°C) on patients' travel intentions. 3) Probability of precipitation on the appointment date. (Unit: %, obtained from meteorological API, percentage probability of precipitation > 0); 4) Whether the current season is the peak flu season (binary feature, in the Northern Hemisphere, November to March of the following year is marked as the peak flu season by default (value 1), and other months are marked as 0; hospitals can adjust the start and end months according to the flu epidemic data released by the local CDC); 5) Air Quality Index (AQI, obtained from environmental monitoring API, used to reflect the impact of air pollution such as smog on patients' willingness to travel) on the appointment date. Environmental context data is collected once when the appointment is created and refreshed by a scheduled task 24 hours before the appointment date to ensure that the weather forecast data is as consistent as possible with the actual situation.
[0045] Category 7: Real-time Clinic Queue Characteristics (9 items) – ① Current number of patients waiting (number of patients currently waiting in the queue for this doctor); ② Number of patients already seen (number of patients who have received services from this doctor that day); ③ Number of no-shows (number of patients who have missed appointments for this doctor that day); ④ Current average waiting time (minutes); ⑤ Queue mode (congestion level of the current waiting queue: smooth / normal / crowded); ⑥ Doctor's clinic hours (start and end times of the doctor's daily schedule); ⑦ Doctor's historical punctuality rate (percentage of patients who have historically been on time for their clinic appointments); ⑧ Current risk of the doctor being unable to see patients. (See below for specific calculation methods); ⑨ Current time slot availability rate (number of appointments booked in the current time slot / total number of available appointments). Real-time clinic queue data is refreshed from the HIS at preset time intervals, with a default refresh interval of 15 minutes. The risk of doctors missing appointments can be calculated by considering their appointment time, historical on-time rate, and data confidence level, which characterizes doctors' on-time appointments and the stability of clinic operations.
[0046] Risk of doctors suspending their services The specific quantification formula is as follows: ,in This refers to the number of times the doctor has historically made punctual house calls. The ratio of the total number of outpatient visits in history to the total number of outpatient visits. Historical on-time performance rate; The number of days in advance of the scheduled outpatient appointment. ; The default threshold for the number of days to end. Day; k is the steepness parameter (default) The formula means that the shorter the time since the start of a consultation and the lower the historical on-time rate, the higher the risk of a doctor missing a consultation. When a doctor does not have sufficient historical data (such as a newly hired doctor), the average on-time rate of all doctors in the department is used as a substitute. .
[0047] Step S2: Calculate the patient no-show probability, the uncertainty of patient no-show prediction, and the doctor's cancellation risk. For example... Figure 3As shown, LightGBM represents Light Gradient Boosting Machine; MCD-DNN represents Deep Neural Network with Monte Carlo Dropout; Tree SHAP represents Tree Model SHAP (i.e., Tree Integrated Shapley Additive Interpretation); and CVaR represents Conditional Value-at-Risk. The system first uses a gradient boosting tree model to perform basic predictions of multimodal features, outputting basic no-show probabilities. Then, it uses a deep neural network with dropout layers to perform multiple random forward propagations, obtaining a set of predicted probabilities. The system fuses the basic no-show probabilities with the mean of multiple random forward propagations to obtain the integrated no-show probability. Cognitive uncertainty is calculated based on the variance of the multiple random forward propagation results, and random uncertainty is calculated based on the mean Bernoulli variance of each predicted probability.
[0048] Base prediction layer – Gradient Boosting Tree Model (LightGBM): LightGBM (Light Gradient Boosting Machine) is used as the base predictor to train the no-show probability function. The output is a continuous no-show probability score between [0,1], representing the probability of no-shows in the input feature vector. The predicted probability of a patient canceling their appointment; This indicates a no-show. To address the imbalance between no-show samples (minority class) and visit samples (majority class) in outpatient data, a weighted binary cross-entropy loss function from the LightGBM gradient boosting tree model is introduced:
[0049] This represents the LightGBM model's response to the input feature vector. The output base no-show probability, and the meanings of the symbols of the parameters in this loss function are defined as follows: The total number of samples; The true label of the i-th sample ( This indicates that the patient failed to show up. (This indicates that the patient arrived for their appointment normally). Let be the model's predicted probability of no-show for the i-th sample; Let be the class weight coefficient for the i-th sample, used to handle the class imbalance problem in outpatient no-show scenarios—for no-show samples (minority class, usually accounting for 10%-30%). (That is, the ratio of the number of majority class samples to the number of minority class samples, so that the minority class samples receive a higher weight in the loss function); for normal patients (majority class). ; To train the total number of normal outpatient patients in the sample; To train the total number of no-show patients in the sample; The total number of training samples; This is the model complexity regularization term, which consists of two parts: L1 regularization of the number of leaf nodes and L2 regularization of the leaf weights. It is used to prevent the model from overfitting. The regularization strength hyperparameter is determined to have its optimal value on the validation set through cross-validation.
[0050] Uncertainty Estimation Layer – Bayesian Deep Neural Network: Construct a deep neural network (DNN) with a Dropout layer as a parallel predictor. The key is to maintain Dropout activation (i.e., Monte Carlo Dropout) during the inference phase by executing... Sub-random forward propagation (e.g.) ), thus obtaining a set of predicted probabilities The theoretical basis of this method is that a deep neural network with Dropout is mathematically equivalent to a variational approximation of a deep Gaussian process, and the variance of its multiple forward propagations can effectively quantify the uncertainty of patient no-show predictions.
[0051] The theoretical basis of the aforementioned uncertainty quantification method lies in the fact that a deep neural network with Dropout is mathematically equivalent to the variational approximation of a Deep Gaussian Process (DGP). The variance of its multiple forward propagations can effectively quantify the uncertainty of patient no-show predictions. Specifically, the training objective of a deep neural network with Dropout layers is equivalent to minimizing the Kullback-Leibler (KL) divergence between the posterior distribution and the variational distribution of the DGP. Therefore, maintaining Dropout activation and performing T random forward propagations during the inference phase is equivalent to sampling T functions from the approximate posterior distribution of the DGP. The variance of these T samplings... This is the Monte Carlo estimate of the model's prediction uncertainty. This theoretical foundation provides a rigorous mathematical guarantee for using MC Dropout variance quantification to assess prediction uncertainty.
[0052] The method for quantifying the uncertainty of patient no-show prediction in this invention specifically includes the following steps: Step 1: Monte Carlo Dropout Sampling. During the inference phase, the Dropout layer remains active (without weight scaling), and T independent random forward propagations are performed on the same input sample X (default T=100). Each forward propagation produces a different network structure and prediction result due to the random dropping of different neurons by Dropout. Let the no-show probability of the output of the t-th forward propagation be denoted as... ,in Let be the subset of valid network parameters generated by the Dropout random mask in the t-th iteration. After T forward propagations, the set of no-show probability predictions is obtained. .
[0053] Step 2: Calculate the ensemble no-show probability. Calculate the base no-show probability output by the gradient boosting tree model (LightGBM). The ensemble no-show probability is obtained by weighting and fusing the mean of T forward propagations of Monte Carlo Dropout. : in, Let T be the arithmetic mean of the predicted probabilities from MC Dropout. This represents the base no-show probability output by the LightGBM model. To integrate weighting coefficients (default) The probability of no-show is determined by the principle of optimal performance based on the area under the receiver operating characteristic curve (AUC-ROC) on the validation set. The integrated no-show probability combines the strong fitting ability of Gradient Boosting Decision Tree (GBDT) to tabular data with the ability of deep neural networks to capture complex nonlinear relationships, thus improving prediction accuracy and robustness.
[0054] Step 3: Calculate Epistemic Uncertainty. Epistemic uncertainty reflects the model's lack of knowledge due to insufficient training data or out-of-distribution (OOD) samples. It is quantified by the variance of the predictions from T MCDropout runs. in, Let be the predicted probability of the t-th random forward propagation. The mean of T predictions. The larger the value, the greater the discrepancy in the model's predictions for that patient under different Dropout masks, and the less the model understands that sample—for example, for patients from newly established departments or patients with extremely rare feature combinations. The value will be significantly higher, indicating that the model lacks sufficient knowledge to support its predictions for this type of sample.
[0055] Step 4: Calculate Aleatoric Uncertainty. Aleatoric uncertainty reflects the inherent randomness of the data itself—even under fully trained conditions, the behavior of some patients is highly unpredictable (e.g., canceling a visit due to sudden illness). This is quantified by the mean of the Bernoulli variance of each prediction: in, Let be the variance of the Bernoulli distribution corresponding to the t-th prediction. The larger the value, the higher the unpredictability of the patient's behavior. Even if the model has seen a large number of similar samples and is fully trained, the patient's no-show behavior still exhibits a high degree of randomness. Note: Random uncertainty cannot be reduced by increasing the amount of training data; it can only be mitigated by improving the quality of data collection or introducing additional prior behavioral knowledge.
[0056] Step 5: Calculate Decision Confidence. This involves integrating cognitive uncertainty and chance uncertainty into a comprehensive decision confidence index. .
[0057] in, This is the discount factor for random uncertainty (default lambda=0.5, indicating that the influence of cognitive uncertainty on decision-making is higher than that of random uncertainty, because cognitive uncertainty can be reduced by increasing training data). Temperature parameter (default) ), controlling the sensitivity of confidence level to uncertainty. The closer the value is to 1, the more confident the model is in its prediction. (default When the confidence distribution on the validation set is taken at the 80th percentile (approximately 0.7), the patient is marked as having high uncertainty, and a more conservative strategy is adopted in subsequent scheduling (such as reserving a buffer time or prioritizing the use of CVaR indicators to assess the risk of the time period).
[0058] Based on this, the present invention extracts three types of key information from two sets of predictions: ① Integrated prediction probability: Integrated no-show probability Definition: ,in Let T be the arithmetic mean of the predicted probabilities of MCDropout. This represents the base no-show probability output by the LightGBM model. To integrate weighting coefficients (default) ) .
[0059] ② Cognitive uncertainty (Epistemic Uncertainty): This metric reflects the model's lack of knowledge due to insufficient training data or out-of-distribution samples. For example, for patients from newly opened departments, The value will be significantly higher, indicating that the model lacks confidence in the prediction.
[0060] ③ Aleatoric Uncertainty: This indicator reflects the inherent randomness of the data itself—even under conditions of adequate training, the behavior of some patients is inherently highly unpredictable.
[0061] This invention integrates two types of uncertainty into a "decision confidence" index. This can be used to guide risk sensitivity adjustments in subsequent scheduling decisions. Patients with low decision confidence will be marked as "high uncertainty," and the system will adopt a more conservative strategy for them during scheduling (such as reserving buffer time). The lower the decision confidence, the more unstable the model's judgment of the patient's behavior. For patients with a high integrated probability of no-show and low cognitive uncertainty, the system classifies them into a high-risk certainty layer; for patients with a high integrated probability of no-show but high cognitive uncertainty, the system classifies them into a high-risk uncertainty layer; for patients with a low integrated probability of no-show, the system classifies them into a low-risk certainty layer. —High-risk identification layer: and (High risk of no-shows, model is reliable); —High-risk uncertainty layer: and (High risk of no-shows, model uncertain); —Low-risk identification layer: (Low risk of breaking the promise).
[0062] in This is the threshold for the probability of no-shows (default 0.5). Confidence threshold (default value is taken from the validation set) The 80th percentile (approximately 0.7). This three-level stratification provides the basis for differentiated risk strategies in subsequent scheduling simulations.
[0063] The system also performs SHAP feature attribution analysis on the no-show prediction model to obtain the positive or negative contribution of each feature to the no-show probability. For example, features such as the number of historical no-shows, the number of days to book in advance, commuting distance, weather type, and the historical no-show rate of the booked department can all be explanatory factors that increase or decrease the risk of no-shows. Specifically:
[0064] in Features SHAP value, For the set of all features, For factorial, For features not included Feature subset, To use only a subset of features The model's predicted values at that time. Using the TreeSHAP algorithm (an optimized version for LightGBM), it is possible to... Efficiently compute the SHAP values of all features in terms of time complexity, where For the number of trees, The maximum number of leaves. This represents the maximum depth. SHAP values generate an attribution score for each feature of each patient, revealing "to what extent this patient's feature increases / decreases the risk of no-shows." This feature attribution information is saved and used in step S4 to generate personalized, quantifiable recommendation explanations.
[0065] Step S3: Generate candidate appointment slots and perform probabilistic scheduling efficiency simulation. Based on the current appointment status, when a new patient (whose risk stratification and no-show probability distribution are known) requests an appointment, this invention no longer uses deterministic point estimation efficiency calculation, but instead introduces Monte Carlo sampling to perform probabilistic efficiency simulation.
[0066] 1) Rules for generating candidate appointment time slots Before performing efficiency simulations, the system first needs to determine candidate booking time slots (i.e., a set of alternative time slots). The generation of candidate time slots is driven by the following rules: (1) Appointment Pool Driven: The system uses the appointment pool in the Hospital Information System (HIS) as the basic data source. Each outpatient doctor's working hours on each outpatient day are divided into several appointment time slots (appointments), and each time slot corresponds to an appointment number. The basic attributes of the appointment include: doctor ID, department ID, outpatient date, start and end time of the time slot, appointment status (available / booked / closed / locked), and maximum number of appointments that can be made.
[0067] (2) Time Granularity Definition: The default time granularity for appointment slots is 30 minutes (i.e., each appointment slot corresponds to a 30-minute service window). However, the system supports differentiated configurations based on department and doctor level—the default granularity is 30 minutes for routine departments (such as internal medicine and traditional Chinese medicine), 15 minutes for high-frequency departments (such as pediatrics and dermatology), and 45 or 60 minutes for special departments (such as psychological counseling). The granularity setting takes into account the historical average consultation time of the department. And doctor's consultation habits.
[0068] (3) Constraints on the patient's selectable time range: The default range of the alternative time periods displayed to the patient by the system is from the current date. From "day" to "current date" "Heaven" stops ( The default period is 14 days, which displays available time slots within the next two weeks. This parameter can be adjusted by the hospital administrator according to the appointment allocation strategy (e.g., to 7 days or 30 days).
[0069] (4) Candidate time slot filtering criteria: Before displaying the time slots to patients, the system filters the time slots in the pool as follows: ① The time slot status is "available" (excluding slots that are fully booked, closed, or locked); ② The time slot belongs to the patient's target department (if the patient has not specified a doctor) or target doctor (if the patient has specified a doctor); ③ The start time of the time slot is not earlier than "current time + minimum advance booking time" (default 2 hours to prevent overly rushed bookings); ④ If the patient specifies a morning / afternoon preference, only the corresponding half-day time slots will be displayed. After filtering, if the number of available time slots exceeds the display limit... (default If there are 100 items, then keep the most recent one in chronological order. This allows for a specific timeframe, preventing patients from facing too many choices.
[0070] (5) Automatic generation of supplementary time slots: When the available appointment slots are insufficient to cover a reasonable scheduling range (e.g., fewer than 5 available time slots), the system automatically calls upon the waitlist resources—queries available appointment slots for other doctors in the same department on adjacent dates, and adds them to the candidate list after sorting them according to the priority of "department > date > time slot". This mechanism ensures that even when appointment slots are scarce, patients still have a sufficient number of available time slots to express their preferences and for system optimization.
[0071] (6) Overbooking limit: For patients in the "low-risk confirmed tier" with an extremely low probability of no-shows, the system allows overbooking of fully booked time slots, with an overbooking limit of 1.2 times the capacity of that time slot (i.e., the maximum overbooking). The specific number of patients who can be overbooked is dynamically determined by the results of Monte Carlo efficiency simulations—only when patients are scheduled into full time slots. The overbooking option is activated only if the efficiency value is still higher than the expected efficiency value for scheduling it in other available time slots. This mechanism can improve resource utilization without significantly increasing wait times.
[0072] 2) Probabilistic outpatient operation efficiency assessment Define efficiency evaluation function The efficiency evaluation function simulates the situation where k-1 patients have already been booked, and the new patient (the kth patient) is scheduled for a time slot. Post-outpatient operation performance:
[0073] Where k represents the current sequence number of the patient awaiting scheduling (i.e., the total number of patients already scheduled + 1). Indicates time period ; This represents the value coefficient (positive number) generated by a doctor's service to a patient. This represents the waiting cost coefficient (positive number) caused by a patient being delayed to the next service time slot. This represents the overtime cost coefficient for a doctor serving one patient (a positive number, and...). ) This represents the unit time cost coefficient (positive number) for patients waiting. For time period The number of patients who actually attended their appointments (those who did not miss their appointments); To make an appointment for a specific time slot However, it was postponed to the next time slot due to insufficient service capacity. The number of patients who have just completed their services; For patients during the time period Total waiting time; This represents the total number of normal service periods. For the last positive time period extension The number of patients who worked late into the virtual overtime period. This is the expectation operator for the randomness of patient arrivals in Monte Carlo simulations.
[0074] The specific calculation rules for each component of the efficiency evaluation function are as follows: ① Number of people who did not no-show Calculation: During the time period If the patient actually visits the clinic, then the patient will be counted. ,in For time period Total number of reservations This is an indicator function (attendance = 1, no-show = 0). In the Monte Carlo simulation, each patient... With probability Arrival at the clinic This is the integrated no-show probability output by the patient in step S2.
[0075] ② Number of people receiving delayed service Calculation: If in the time period The total number of patients arriving at the clinic exceeded the service capacity for that period. (Right now If the capacity is exceeded, patients will be postponed to the next time slot. To provide services. Specifically, to... For time period The number of patients in the queue at the beginning (from the previous time period) (for patients with delayed symptoms), then the time period The total number of patients requiring services is Time period The actual number of patients who completed the service was Delayed to the time period The number of people is: .
[0076] in (Rounded down), where duration of slot j represents the duration of the j-th time slot, and average service duration represents the average consultation time; the default value is that each 30-minute time slot can provide services. Number of patients (determined based on the department's historical average consultation time).
[0077] ③ Patient waiting time Calculation: During the time period Inside, The total wait time for all patients waiting for service during that period was measured. =Average waiting time × The average waiting time is based on a first-come, first-served (FCFS) queuing model, which assumes that patients arrive evenly within a time period. In this model, the average waiting time for patients arriving within a time period is half the duration of the time period; delayed patients need to wait for the full duration of the time period.
[0078] ④ Calculation of doctors' free time: If the time period Total number of patients requiring internal services Less than service capacity Then, doctors will have free time. Free time = Average consultation time. Idle time reflects the degree of waste of medical resources, as assessed through the efficiency evaluation function. The coefficients reflect the opposite.
[0079] ⑤ Doctor's overtime calculation and virtual overtime period setting: All delayed patients in the regular time period will be placed in the last regular time period (time period). If the service is not completed by the end of the specified period, it will be extended to the virtual overtime period (time period). Service capacity during overtime hours. Considered unlimited (or subject to the maximum overtime hours for doctors in practice, defaulting to no more than 60 minutes). The total number of patients served during the virtual overtime period. This constitutes the number of doctors working overtime. Overtime hours. Overtime cost coefficient The delay cost factor is typically set to be significantly higher than that during normal periods. This is to reflect the high cost of overtime work for doctors and hospital operations.
[0080] ⑥ Boundary conditions for the continuation mechanism: The continuation mechanism follows the following boundary conditions: a) If continuous All time periods are overloaded (i.e.) (a) Delay effects continue to accumulate until the queue is cleared or the virtual overtime period is reached; b) Time slot capacity The system dynamically changes during the simulation: if a patient misses their appointment and releases a capacity slot, that slot can immediately be used for other waiting patients; c) for patients marked as "high-risk uncertainty level" who have made appointments, the system automatically reserves a buffer slot in the adjacent time slot before their appointment time. This slot is not included in the normal capacity. It is only activated as a buffer when overflow occurs in subsequent time periods.
[0081] 3) Monte Carlo efficiency simulation In the simulation scenario, for each candidate time period The system performs Monte Carlo simulation. In the... In this simulation, based on the no-show probability distribution of each scheduled patient (from the multi-level uncertainty estimation in step S2), the attendance of each patient is randomly sampled (Bernoulli sampling). Then, the queuing process is extrapolated based on the sequence of attending patients, and the efficiency value of this simulation is calculated. .
[0082] go through After several simulations, the empirical distribution of efficiency values for each time period was obtained, and three statistics were extracted to form a three-dimensional efficiency feature vector: (Note: The single sampling and queuing simulation in this Monte Carlo simulation involves lightweight numerical computation. The total computation time for the 20 candidate time slots is approximately a few seconds on a conventional server, meeting the response time requirements of real-time reservation scenarios. In the engineering implementation, the simulations of each time slot are independent, fully utilizing multi-core parallel computing for acceleration.
[0083] in This represents the average efficiency (expected efficiency). This represents the standard deviation of efficiency (efficiency fluctuation risk). Conditional Value at Risk (Confidence Level) default ), defined as the worst The average efficiency in the percentage simulation results:
[0084] in and They are respectively The system uses the empirical cumulative distribution function and probability density function. The CVaR index measures the average efficiency loss under extremely adverse scenarios (i.e., the "worst 5% scenario"), making scheduling decisions risk-sensitive. For patients marked as "high-risk uncertainty" in step S2, the system prioritizes using the CVaR index for time-period comparison to avoid the impact of extreme no-shows.
[0085] For all Each alternative time slot will be conducted separately. The second Monte Carlo simulation yields the efficiency matrix. To facilitate subsequent comprehensive scoring of the two objectives, the mean component of the efficiency feature vector is used. Perform min-max normalization to obtain the normalized efficiency scalar: (in Candidate time period The efficiency mean, i.e., the three-dimensional efficiency feature vector. The first component; and This efficiency risk dimension is incorporated into the reinforcement learning state vector and used as a constraint when scheduling patients in the high-risk uncertainty layer. Thus, the three-dimensional efficiency feature vector... Each component plays a different role in step S5: the first component After normalization, it directly participates in the overall score. The calculation of the second component and the third component This serves as the efficiency risk dimension and is incorporated into the reinforcement learning state vector, providing an informational basis for the policy network to perceive scheduling risks.
[0086] It should be noted that the Monte Carlo simulation's single sampling and queuing extrapolation are lightweight numerical operations—only involving Bernoulli sampling based on the no-show probability distribution of each booked patient and queuing extrapolation based on the first-come, first-served rule. It does not involve complex matrix operations or deep learning inference processes. Therefore, the simulations of each candidate time slot are independent, fully utilizing multi-core parallel computing for acceleration. In engineering implementation, the total computation time for performing 1000 Monte Carlo simulations for each of the 20 candidate time slots on a conventional server (e.g., 4-core CPU, 8GB memory) is approximately 2 to 3 seconds, meeting the response time requirements of real-time interactive outpatient appointment scenarios. The system also supports dynamically adjusting the number of simulations based on the hospital's actual hardware configuration, achieving a balance between computational accuracy and response speed. Step S3 above generates a three-dimensional efficiency feature vector for each candidate time slot. The following step S4 collects patient preferences for appointment times, which provide quantitative input for the dual-objective collaborative decision-making in step S5 from the perspectives of operational efficiency and patient satisfaction, respectively.
[0087] Step S4: Obtain the patient's appointment time slot preference vector. In a real-world scenario, the system displays a list of all candidate appointment time slots to the patient through a patient-side interactive interface (mobile app, WeChat mini-program, or hospital self-service terminal), and collects the patient's subjective preferences for each time slot using any of the following methods: (1) Scoring model: Patients rated each candidate time period (total) Rate each time period on a scale of 1 to 5, where 1 point indicates the least desirable time period and 5 points indicates the most desirable time period. 2) Ranking Mode: Patients sort their candidate time periods from highest to lowest preference. The system then converts the ranking into a score using a reciprocal ranking method. ,in This represents the ranking in the sorting for that time period (1 is the best). (3) Constraint mode: Patients specify binary constraints for morning or afternoon only through the switch control. The default score for the time period that meets the constraint is 4, and the default score for the time period that does not meet the constraint is 1.
[0088] After collecting the original preference rating vector, min-max normalization is performed to obtain the patient's preference vector elements for different time periods: ,in For the j-th candidate time period, the original preference score is... These are the normalized preference values. .like If the scores are the same across all time periods, then assign a uniform value. (Unbiased state). Normalized vector This is the patient's consultation time preference vector, which participates in the efficiency-preference bi-objective weight decision as part of the state input in step S5.
[0089] like Figure 5As shown, SHAP represents Shapley Additive Explanations; Tree SHAP represents Tree Model SHAP (i.e., Tree Integrated Shapley Additive Explanations); CVaR represents Conditional Value-at-Risk; Step S5: Perform bi-objective collaborative decision-making based on deep reinforcement learning. This embodiment models the efficiency-preference weight decision as a Markov Decision Process (MDP). MDP is a mathematical framework for modeling the outpatient scheduling problem as a sequential decision process, consisting of quintuples. definition-- For state space, For the action space, Let be the state transition probability. For the reward function, This is the discount factor. In this specification, MDP is used to refer to a Markov decision process. A Markov decision process is represented as:
[0090] Wherein: ① State space State vector Includes the following dimensions: (a) Current congestion index (ratio of booked users to maximum service capacity); (b) Time code of the current time period t (one-hot encoding, total...) (c) The risk stratification labels of patients awaiting scheduling (high risk confirmed / high risk uncertain / low risk confirmed) and the attribution values and directions of the top-3 features attributed by SHAP features (to eliminate the inconsistency in dimensions caused by the difference in the names of the top-3 features among different patients, the three attribution values with the largest absolute values of SHAP and their positive and negative direction labels are taken when encoding the state, rather than the original feature names, to ensure that the dimension of the state vector is fixed); (d) The distribution entropy of currently scheduled patients in each time period. (e) A Boolean flag indicating whether the current date is a special date (holiday, weekend); (f) The most recent historical date. (g) The sliding window mean of actual patient satisfaction scores for each candidate time period; Conditional Value at Risk As an efficiency risk dimension, among which and The output is derived from the Monte Carlo efficiency simulation in step S3.
[0091] ② Action Space Action is the choice efficiency - preference weight (here) The efficiency-preference decision weights in step S5, and the integration weights in step S2. (The meanings differ), indicating the weight given to efficiency in the overall score. The action space is discretized into 11 options. . This indicates that efficiency is the primary consideration. This indicates a complete preference.
[0092] ③ State transition State transition is determined by the patient's appointment behavior, actual attendance / no-show outcome, and the arrival process of new patients, and has an inherent randomness.
[0093] ④ Reward Function (Multi-objective reward shaping): This invention designs a multi-dimensional composite reward function that comprehensively considers operational efficiency, patient satisfaction, and decision rationality.
[0094] Where the weight vector ; Composite reward vector ; also, The components are defined as follows: —Operational efficiency rewards The actual efficiency value is normalized to [0, 1]; where After the patient's appointment date, the actual attendance result (a deterministic binary observation of whether the patient attended the appointment, rather than the expected probability value in the Monte Carlo simulation of step S3) is substituted into the efficiency evaluation function. The recalculated actual operational efficiency value; and The minimum and maximum efficiency values obtained from historical sliding window statistics are used to normalize the actual efficiency to the [0,1] interval, maintaining the same dimension as other reward components. This reward component realizes a closed loop from the prospective efficiency prediction based on Monte Carlo simulation in step S3 to the posterior efficiency feedback based on actual execution results: step S3 evaluates the prospective expected efficiency of each candidate time period through simulation during scheduling, while... After a patient completes their visit, the efficiency is recalculated using real visit data and fed back as a reward signal to the reinforcement learning strategy, driving continuous optimization of the strategy.
[0095] —Patient satisfaction reward That is, the time period ultimately chosen by the patient. Normalized preference score , ; — Decision-making consistency reward Penalize the current weight selection versus the post-hoc optimal weight. The bias (based on the actual results) encourages the strategy to learn the correct weight selection pattern; —Uncertainty penalty When high-risk, uncertain patients have corresponding rights Punishment at the time This encourages strategies to adopt a more cautious weighting approach when facing high uncertainty.
[0096] ⑤ Discount Factor : Control the importance of future rewards (default) ).
[0097] 2) Dynamic weighting parameter rules and crowding index driving mechanism Prior to deep reinforcement learning policy training and online inference, this invention establishes a complete dynamic weight parameter system as the basic framework for weight decision-making: (1) Definition and threshold of Crowding Index (CI):
[0098] in This represents the total number of patients currently scheduled. This represents the maximum outpatient service capacity for the day (the sum of capacities across all time slots). The system presets two CI thresholds: Low congestion threshold (Default 0.4): When At that time, the outpatient workload is relatively light, the system prioritizes meeting patient preferences, and the efficiency weight tends to be a smaller value; High congestion threshold (Default 0.8): When At that time, outpatient services were nearing saturation, and the system prioritized operational efficiency, resulting in a higher efficiency weighting. Within the transition interval, the weights change continuously through a smoothing function.
[0099] (2) Smooth weight transition based on logistic function (baseline scheme): When reinforcement learning adaptive adjustment is not enabled, the system uses the logistic function to smoothly interpolate the efficiency weights:
[0100] in (Minimum efficiency weight) (Maximum efficiency weight) (Midpoint congestion index) Steepness parameter (default) This function controls the slope of the transition interval. It provides a smooth weight transition when CI is at an intermediate level, avoiding scheduling jitter caused by sudden weight changes.
[0101] (3) Differentiated configuration at the department level: The crowding threshold and weight range for different departments can be configured differently: — Departments with high-frequency, rapid patient turnover (such as pediatrics and dermatology): ; —Departments with low frequency and slow patient flow (such as cardiology and neurology, where patients have longer consultation times): Department-level configuration parameters are set by the hospital administrator through the system backend.
[0102] (4) Detailed configuration of doctor level and date: Based on the default configuration of the department, the system supports further personalized configuration: —Doctor Level: Different doctors have different consultation speeds (historical average consultation time) and historical no-show rates, which can be set individually. and Fine-tuning offset ; —Date level: Different weight parameter groups can be used for different date types (weekdays / weekends / holidays) due to differences in medical treatment needs.
[0103] (5) Evolutionary path from heuristic to adaptive: The aforementioned Logistic function constitutes a manually configurable heuristic baseline. Based on this baseline, the reinforcement learning policy network... What is learned during online operation is the correction amount of the heuristic weights. Instead of directly outputting absolute weights, the policy network outputs correction values. The final weights are:
[0104] Fusion coefficient Take a smaller value in the initial stage of system launch (e.g.) As the stability and performance of reinforcement learning strategies are gradually validated, The upper limit can be increased automatically or manually in the system. This will enable a gradual transition from "rule-driven" to "data-driven" approaches.
[0105] (6) Dynamic interpretability of weight parameters: The system records the parameter basis for each weight decision—when using a heuristic baseline, it records the current CI value and the calculation result of the Logistic function; when using a reinforcement learning strategy, it records the state. SHAP feature attribution (using the policy network as the explained model, calculating the weights of each state feature) (marginal contribution). These records are presented to administrators and patients in the interpretability output of S4, ensuring full transparency of the weight selection logic.
[0106] 3) Training of deep reinforcement learning strategies based on PPO like Figure 4 As shown, PPO stands for Proximal Policy Optimization; Agent represents the intelligent agent; Actor and Critic represent the actor and critic, respectively; GAE stands for Generalized Advantage Estimation, used to calculate the advantage function. GAE (Generalized Advantage Estimation) is a technique used in reinforcement learning to estimate the advantage function. One method involves analyzing the timing difference error (TD-Error). Perform exponentially weighted summation: ,in These are GAE parameters that control the trade-off between the bias and variance of the estimate. The discount factor is used in the MDP; this invention employs the Proximal Policy Optimization (PPO) algorithm to train the weight decision strategy. The PPO algorithm limits the policy update magnitude by pruning the objective function, exhibiting good training stability and making it particularly suitable for the online continuous learning requirements of this application scenario. The PPO objective function is (Clipped Surrogate Objective):
[0107] in This represents the probability ratio between the old and new strategies. This is the estimate of the dominance function (using the generalized dominance estimate GAE). The cropping range hyperparameter (default) The policy network employs a three-layer fully connected network (hidden layer dimensions: [128, 64, 32]), using the ReLU activation function and LayerNorm normalization layers to output an 11-dimensional action probability distribution.
[0108] Advantage function Generalized Advantage Estimation (GAE) is used:
[0109] in For timing difference error, This is a GAE parameter (default 0.95). For the value network (which shares the first two layers of parameters with the policy network) to the state Value estimate.
[0110] The training uses an experience replay buffer to store historical interaction trajectories from outpatient clinics, accumulating data each time. A new trajectory (default) Perform a policy update once, and perform a policy update each time. (default Gradient optimization over 10 training epochs, using the Adam optimizer (learning rate). ).
[0111] 4) Dual-objective integrated scoring and decision interpretability generation During the online inference phase, the policy network Based on the current state Output weights The overall score vector for each time period is calculated using this weight. :
[0112] Unlike existing technologies, this invention not only recommends the time period with the highest score, but also... It also utilizes SHAP feature attribution values to generate quantifiable, personalized recommendation explanations: ① Explain the information structure: For each recommendation period The system generates structured explanatory triples. ,in: —— (Reason): Overall score for this period and the specific values of its efficiency score and preference score; —— (Contribution): Feature attribution interpretation from SHAP values, such as "Your geographical distance is far (contribution)". Good medical history (contribution) "After comprehensive evaluation, we recommend this time period for you." The system automatically selects the period with the largest absolute SHAP value. Each feature is used to convert its attribution direction and magnitude into a natural language description. —— (Trade-off): Efficiency-preference trade-off explanation, such as "This time slot falls within your preferred time frame, and the expected waiting time is shorter ( "Minutes (of time) represent the optimal balance between efficiency and your preferences."
[0113] ② Counterfactual Explanation: The system also generates a counterfactual explanation, informing the patient that "if your appointment is rescheduled to a different time slot..." The expected waiting time will decrease / increase "Minutes, but may deviate from your preferred time period." This "what-if" explanation significantly enhances patients' understanding and trust in the recommendation results, reducing dissatisfaction caused by information asymmetry.
[0114] Step S6: Output interpretable scheduling results. The recommended appointment time slots and the above-mentioned interpretable scheduling information (including interpretable triples and counterfactual interpretations) are output to the hospital information system (including doctor's end, management end, and patient end).
[0115] like Figure 6 As shown, ADWIN represents the Adaptive Window algorithm. , This represents the two sub-windows detected by ADWIN; They represent and The mean; EWC stands for Elastic Weight Consolidation. This represents the diagonal elements of the Fisher information matrix; Sum Tree is a binary segment tree used to implement probability sampling based on weights; TD-Error represents temporal difference error; Concept Drift represents concept drift (a statistically significant change in data distribution); IS represents Importance Sampling; this embodiment further sets up a drift-aware online learning mechanism. The system continuously collects patients' actual visit results, no-show results, late arrival time, waiting time, doctor's free time, doctor's overtime time, and patient satisfaction feedback, and uses an adaptive sliding window algorithm to detect whether recent prediction errors or behavioral distributions have experienced concept drift. When drift is detected, the system triggers a model fine-tuning process.
[0116] During model fine-tuning, the system can employ an elastic weight consolidation mechanism to prevent catastrophic forgetting. This involves applying regularization constraints to important model parameters from previous tasks to maintain performance under historical distributions. Simultaneously, the system can maintain a priority experience replay buffer, assigning sampling priorities to new samples based on temporal difference errors, ensuring that samples that contribute more to model improvement are prioritized for training.
[0117] Specifically, the drift-aware online learning mechanism is a robust online learning mechanism based on concept drift detection, which consists of the following aspects: 1) ADWIN-based no-show drift detection The system continuously monitors the online performance metrics of the no-show prediction model (such as recent average prediction error). The Adaptive Windowing (ADWIN) algorithm is used for drift detection. ADWIN maintains a variable-length sliding window. The window size is dynamically adjusted to maintain the statistical stability of the data within the window. When two child windows are detected... and The mean difference exceeds the adaptive threshold At this time, a drift alarm is triggered:
[0118] in For the harmonic mean, Confidence level (default) Once drift is detected, the system automatically triggers the model fine-tuning process.
[0119] Note: ADWIN (Adaptive Windowing) is a drift detection algorithm based on the concept of a variable-length sliding window. It dynamically adjusts the window size and detects two adjacent child windows. and The mean difference exceeds the adaptive threshold A drift alarm is triggered, which then initiates a fine-tuning process for the prediction model and policy network. The algorithm will be referred to as ADWIN throughout this specification.
[0120] 2) Continuous learning based on elastic weight consolidation During model fine-tuning, this invention employs the Elastic Weight Consolidation (EWC) mechanism to prevent catastrophic forgetting. EWC adapts to new data distributions without significantly sacrificing historical performance by imposing regularization constraints on important network parameters from previous tasks.
[0121] in The loss function for the new data, These are the optimal parameters for the previous task. The diagonal elements of the Fisher information matrix (measurement parameters) (Importance to previous tasks) This is the EWC intensity hyperparameter.
[0122] 3) Importance-weighted experience replay To further improve the sampling efficiency of online learning, the system maintains a Prioritized Experience Replay Buffer, assigning sampling priority to each new sample based on its temporal difference error (TD-error):
[0123] in For the sample TD-error To prevent small constants with zero probability, The intensity of priority sampling is controlled. This mechanism ensures that samples that contribute more to model improvement receive a higher replay probability, thereby increasing the convergence speed of online learning.
[0124] To ensure scheduling fairness, the system can periodically perform counterfactual fairness audits. Keeping all other conditions constant, the system can change patient age groups, geographic distance groupings, or other audit attributes to observe whether the recommendation results change abnormally. When fairness indicators exceed preset thresholds, the system triggers an alert, prompting administrators to check for systematic biases in the model or rules.
[0125] After making an appointment, patients can submit satisfaction ratings and free-text feedback through the patient's app. The system can perform sentiment analysis on the free-text feedback and integrate the sentiment polarity results with the structured satisfaction rating as a supplementary signal source for the patient satisfaction component in the reinforcement learning reward function.
[0126] The counterfactual fairness audit specifically refers to: 1) Counterfactual Fairness Audit: The system periodically performs counterfactual fairness audits on all scheduling decisions to assess whether the system's recommendations would change significantly if patients belonged to different demographic subgroups (e.g., different age groups, different geographical distances). Formalistically, the fairness metric is defined as follows:
[0127] in For sensitive attributes (such as geographical distance grouping). and For different group labels. When When the preset fairness threshold is exceeded, the system triggers an alert, prompting the administrator to check whether there is a systematic bias in the model.
[0128] 2) Patient Feedback Channel: After making an appointment, patients can submit their satisfaction rating and free text feedback on the recommendation results through the system. The feedback data undergoes sentiment analysis (using a pre-trained Chinese BERT model to extract sentiment polarity) and is fused with the structured satisfaction score, serving as a supplementary signal source for the patient satisfaction component in the reinforcement learning reward function.
[0129] like Figure 2 As shown, this embodiment provides an outpatient no-show prediction and dynamic scheduling system, including a multimodal feature engineering and risk modeling module, a Monte Carlo scheduling simulation and efficiency calculation module, a patient preference interaction acquisition module, a deep reinforcement learning bi-objective decision engine, a scheduling output and interpretable display module, a drift-aware online learning module, and a fairness audit and patient feedback module.
[0130] The multimodal feature engineering and risk modeling module is used to perform event classification and labeling, patient multimodal feature extraction, no-show risk prediction based on the basic prediction layer and uncertainty estimation layer, physician cancellation risk calculation, SHAP feature attribution analysis, and three-level risk stratification.
[0131] The Monte Carlo scheduling simulation and efficiency calculation module generates candidate time slots based on the appointment pool, performs multiple probabilistic scheduling simulations for each candidate time slot, and outputs the mean efficiency, standard deviation of efficiency, and conditional value at risk. The patient preference interaction and acquisition module obtains patient scores, performs preference normalization, and verifies preference consistency.
[0132] A deep reinforcement learning dual-objective decision engine is used to input the current scheduling state into the policy network, generate efficiency-preference weights, and calculate a comprehensive score. The scheduling output and interpretable display module is used to output the recommendation results to the hospital information system, physician, management, or patient terminals, and display the recommendation explanation, counterfactual explanation, and policy execution results.
[0133] The drift-aware online learning module monitors concept drift and updates the no-show prediction model and reinforcement learning policy network. The fairness audit and patient feedback module performs counterfactual fairness audits and integrates patient satisfaction scores and text feedback to optimize subsequent scheduling strategies.
[0134] To facilitate understanding of the technical solution of this invention, the key parameter symbols and English abbreviations used in this specification are defined and explained below: Parameters of the No-Show Prediction Model —The true label of the i-th sample. This indicates that the patient failed to show up (positive sample). This indicates that the patient arrived at the clinic normally (negative sample); —The basic no-show probability prediction output by the gradient boosting tree model (LightGBM) for the i-th sample. ; —The probability of no-show output by Monte Carlo Dropout in the t-th random forward propagation, where t=1,2,...,T; —The set of no-show probability predictions obtained from T rounds of MC Dropout forward propagation; —The arithmetic mean of the probabilities predicted by T MC Dropouts. ; —The probability of no-show is obtained by weighted fusion of LightGBM base prediction and MC Dropout mean: ,in To integrate weighting coefficients (default) ); T — Monte Carlo Dropout random forward propagation number, default T=100; —Epistemic uncertainty reflects the lack of knowledge in a model due to insufficient training data or out-of-distribution (OOD) samples. ; —Aleatoric uncertainty reflects the inherent random noise in the data itself. The calculation formula is: ; — Decision Confidence, a comprehensive indicator that integrates cognition and random uncertainty: ,in This is the accidental uncertainty discount factor (default 0.5), and this is the temperature parameter (default 0.1). ; —Uncertainty threshold, determined by validation set The quantile is determined (the 80th percentile is taken by default) and used to divide the high-risk certainty layer into the high-risk uncertainty layer; GBDT model loss function related parameters —The weighted binary cross-entropy loss function measures the difference between the model's predicted values and the true labels: ; N—the total number of training samples; —The number of majority class samples, i.e., the number of normal patients who come to the clinic; —Number of minority samples, i.e., number of patients who failed to show up; —The class weight coefficient of the i-th sample, used to handle class imbalance: for minority class (no-show) samples For the majority of samples (normal patient visits) ; —The regularization strength hyperparameter is determined by cross-validation; SHAP Feature Attribution Related Parameters —The SHAP value (SHapley Additive exPlanations Value) of the j-th feature, which measures the magnitude and direction of the marginal contribution of this feature to the no-show prediction result (positive value indicates increased no-show risk, negative value indicates decreased no-show risk). F — the set of all input features, where |F| is the total number of features; S — any subset of the feature set F that does not contain feature j; f(S) — The model prediction when only a subset of features S is used as input; f(S∪{j})——Model prediction when using feature subset S plus feature j as input; —The number of trees in the LightGBM model; —Maximum number of leaf nodes; —Maximum tree depth; Outpatient operation efficiency evaluation parameters —Efficiency Evaluation Function, which evaluates the efficiency of scheduling the k-th patient for a time slot. The expected outpatient operational performance after the procedure; the higher the value, the higher the operational efficiency. k — the current sequence number of the patient awaiting scheduling (i.e., the total number of patients already scheduled + 1). —The j-th candidate booking time slot, j={1,2,...,J}, where J is the total number of candidate time slots; —The value coefficient (positive number) generated by a doctor serving a patient is determined by hospital operational data analysis; —The waiting cost coefficient (positive number) for a patient whose service is delayed to the next time slot reflects the efficiency loss caused by the delayed service; —The overtime cost coefficient (positive number, and) for doctors to serve one patient reflects the high cost of overtime to hospital operations; —The unit time cost coefficient of patient waiting (positive number) reflects the loss of patient waiting experience; —The number of patients who made appointments within their scheduled time slots and actually showed up for their appointments (without no-shows); — Reservations made during the designated time slot were postponed to a later time slot due to insufficient service capacity. The number of patients who have just completed their services; —Total waiting time for patients during the time period (unit: minutes); —Virtual Overtime Slot: An extra time slot used to accommodate overflow patients after all regular working hours have ended; —Total number of appointments for the time slot (number of patients already scheduled); I(condition) – Indicator Function: Returns 1 if the condition is true, otherwise returns 0. —Service capacity per time slot: By default, 6 patients can be served per 30-minute time slot; —The number of patients queuing at the start of the time slot, This refers to the number of delayed patients from the previous period; —Number of Monte Carlo simulations, default ; —Efficiency mean (expected efficiency) over a period of time. ; —Efficiency Standard Deviation over a period of time measures the risk of efficiency fluctuations; —Conditional Value at Risk (VAT) for the specified period, with a confidence level of [missing information]. (default ), defined as the worst The average efficiency in the simulation results; Markov Decision Process (MDP) and related parameters in deep reinforcement learning
[0135] MDP—Markov Decision Process—is a mathematical framework that models the outpatient scheduling problem as a sequential decision process, defined by a quintuple. S—State Space, which includes dimensions such as congestion index, time period coding, risk stratification label, SHAP attribution value, and distribution entropy; A – Action Space, a discretized efficiency-preference weight selection set A = {0.0, 0.1, 0.2, ..., 1.0}, containing 11 discrete actions; P(s'|s,a) — State Transition Probability, the probability of transitioning from state s to state s' after performing action a; R(s,a) – Reward Function, based on operational efficiency rewards. Patient satisfaction reward Decision consistency reward and uncertainty penalty It is composed of weighted combinations; —MDP Discount Factor ,default Control the relative importance of future rewards compared to immediate rewards; —The MDP state vector at time t. —The action output by the policy network at time t, i.e., the efficiency weight. The specific value to be taken; —Efficiency weighting in the efficiency-preference composite score , This indicates that efficiency is the primary consideration. This indicates a complete preference for preference; CI – Crowding Index. ; —The total number of patients currently scheduled (for today); —Maximum daily outpatient service capacity , which is the sum of the capacities for all time periods; —Low congestion threshold, default ,when The system prioritizes meeting patient preferences. —High congestion threshold, default ,when The system prioritizes operational efficiency. —The midpoint crowding index of the Logistic function, by default. ; —The logistic skewing parameter, default value. ; —Minimum efficiency weight, default ; Maximum efficiency weight, default ; —The fusion coefficient between the reinforcement learning policy correction and the heuristic baseline. The smaller value is taken in the initial stage of system launch ( As strategy validation gradually improves... This enables a gradual transition from rule-driven to data-driven approaches. —The weight adjustment amount output by the policy network (the adjustment value for the Logistic heuristic weights), the final weights ; —Distribution Entropy of scheduled patients at different time periods. ,in For time period The proportion of patients, used to measure the evenness of scheduling; —The ratio of the probability between the old and new policies in the PPO (Proximal Policy Optimization) algorithm. ; —Advantage Estimate; —PPO clipping parameter, default Limit the scope of policy updates; —Temporal Difference Error (TD-Error) ; —GAE parameters, ,default Controlling the bias-variance trade-off; —The Value Network estimates the value of a state; the Value Network and the Policy Network share the parameters of the first two fully connected layers. —Efficiency Reward Component. Normalized to [0,1] This is the actual operational efficiency value calculated based on actual patient visits. and (Efficiency boundary value for historical sliding window statistics). —Preference Reward Component for Patient Satisfaction That is, the normalized preference score of the patient's final choice of time period. ; — Consistency Reward Component. Penalize the current weight versus the post-optimal weight Deviation; —Uncertainty Penalty Component, where the weighting is based on the risk level of patients in the high-risk uncertainty layer. Punishment will be imposed at that time: ; —The weight vector of each reward component, by default , respectively corresponding ; Online learning and related parameters of concept drift detection ADWIN—Adaptive Windowing—is a statistical method for identifying concept drift by dynamically adjusting the window size and detecting differences in the mean of sub-windows.
[0136] W—A variable-length sliding window maintained by ADWIN; —The ADWIN algorithm divides the current window W into two adjacent sub-windows; —The adaptive threshold for ADWIN drift detection is given by the formula Determine, where m is the harmonic mean. ; The complete formula and symbol explanation for the adaptive threshold of ADWIN drift detection are as follows:
[0137] in child window and The harmonic mean of the sample size. and They are respectively and The number of samples; This is the confidence level parameter, default value. (Corresponding to 99% confidence level). When a difference in the means between two sub-windows is detected. When a drift alarm is triggered, the system automatically initiates a model fine-tuning process.
[0138] —ADWIN Confidence Level parameter, default (i.e., 99% confidence level); — Two child windows and The number of samples in the sample; — Two child windows and The estimated sample mean; —The optimal value of the i-th neural network parameter in a previous task (historical data distribution); —The i-th diagonal element of the Fisher Information Matrix measures the importance of the parameter to previous tasks; —The regularization strength hyperparameter of Elastic Weight Consolidation (EWC); —Loss function for new data (after drift is detected); —The absolute value of the temporal difference error (TD-Error) of the kth empirical sample; P(k) — The priority of the preferred empirical replay sampling of the k-th empirical sample. ; The actual sampling probability of the kth sample is the normalized priority score: ,in Experience replay buffer The total number of samples in the dataset. To reduce the distribution bias introduced by priority sampling, importance sampling weights are used to weight the gradient update: ,in The importance sampling index is linearly increased from 0.4 to 1.0 during training. This priority experience replay mechanism is used for fine-tuning the no-show prediction model; for updates to the PPO policy network, an on-policy approach is still used, with updates occurring every time an accumulation of... After a new trajectory is established, the old trajectory is discarded, and old samples from the historical buffer are not used to maintain the distribution consistency of policy updates.
[0139] —Small constants in priority calculation, by default To prevent samples from having zero priority; —Priority sampling intensity index, ,default It degenerates into uniform sampling; Fairness audit and patient feedback related parameters
[0140] —Fairness Metric: A quantitative indicator that measures the differences in recommendation outcomes among different demographic subgroups; —Sensitive attributes, such as geographical distance grouping, age grouping, and medical insurance type grouping; —Sensitive attributes Two different group labels (such as near group and far group); —Given sensitive attributes When the value is g, the conditional expected value of the recommended comprehensive score is: —Fairness threshold, when Exceed An alert is triggered at any time.
[0141] The modules of this invention can be implemented by servers, edge computing devices, or cloud services, or they can be implemented as software functional modules in a hospital information system. Data exchange between modules can be accomplished through databases, message queues, application programming interfaces (APIs), or microservice interfaces.
[0142] For the foregoing embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.
[0143] The above embodiments describe the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Modifications and variations made by those skilled in the art without departing from the spirit and scope of the invention should be within the protection scope of the appended claims.
Claims
1. A method for predicting and dynamically scheduling outpatient no-shows, characterized in that, Includes the following steps: S1: Acquire outpatient appointment data, clinic queue data, doctor's outpatient data, patient's historical appointment behavior data, patient's spatial commuting data, and environmental context data, and classify and label the patient's behavior after the appointment, and extract multimodal features for no-show risk prediction and scheduling decision-making. The patient spatial commuting data is used to form spatial and commuting features, and the environmental context data is used to form environmental and weather context features. S2, calculate the patient no-show risk probability, patient no-show prediction uncertainty, decision confidence, and doctor's no-show risk based on the multimodal features, and form a risk stratification result based on the patient no-show risk probability and patient no-show prediction uncertainty; S3, generate candidate appointment time slots based on the appointment pool in the hospital information system, perform probabilistic scheduling efficiency simulation on each candidate appointment time slot, and obtain the efficiency feature vector of the corresponding candidate appointment time slot. S4, obtain the patient's time slot preference score for each candidate appointment time slot, and normalize the time slot preference score into a patient's medical time slot preference vector; The time slot preference score is the original preference score entered or confirmed by the patient for each candidate appointment time slot; S5, the current outpatient operation status is modeled as a Markov decision process, and the reinforcement learning policy network generates efficiency-preference weights based on the risk stratification results, efficiency feature vector, patient appointment time preference vector, congestion index and doctor closure risk, and calculates the comprehensive score of each candidate appointment time based on the efficiency-preference weights; In step S2, the risk stratification result, the efficiency feature vector, and the patient appointment time preference vector obtained in step S3 are used as state inputs for the same outpatient operation status in step S5 to participate in the generation of efficiency-preference weights. For patients belonging to the high-risk uncertainty layer, the reinforcement learning policy network calls the tail risk term in the efficiency feature vector as a constraint input when generating efficiency-preference weights, so that the recommended appointment time avoids candidate appointment time with tail risk exceeding a preset threshold. S6. Determine the recommended appointment time slot based on the comprehensive score, generate an interpretable scheduling result that includes the recommendation reason, feature contribution and efficiency-preference trade-off explanation, output the interpretable scheduling result to the hospital information system, and update the scheduling strategy online based on the actual attendance results, no-show results, waiting time and patient feedback. The method further includes: Regularly conduct counterfactual fairness audits on scheduling decisions. While keeping other conditions unchanged, change the audit attributes to which patients belong to observe changes in recommendation results. Trigger an alert when fairness indicators exceed a preset threshold.
2. The outpatient no-show prediction and dynamic scheduling method according to claim 1, characterized in that, In step S1, the event classification labeling includes: labeling events where patients fail to check in during the appointment time without canceling or rescheduling in advance as complete no-shows; labeling events where the check-in time exceeds the lateness tolerance threshold as late no-shows; labeling events where patients actively cancel before the appointment date as early cancellations; labeling events where patients reschedule to another time slot on the same day as temporary reschedulings; and labeling cancellation events caused by doctors being closed, departmental adjustments, or system failures as hospital-related cancellations. Late no-shows are treated as an independent category, or their impact on subsequent queuing delays is converted into an equivalent no-show weight.
3. The outpatient no-show prediction and dynamic scheduling method according to claim 1, characterized in that, In step S1, the multimodal features include patient basic information, historical appointment behavior statistics, department and doctor information, appointment time information, spatial and commuting features, environmental and weather context features, and real-time clinic queue features. The real-time clinic queue features include doctor's name, current number of patients waiting, number of patients already seen, number of no-shows, waiting time, current time, estimated waiting time, appointment time slot, doctor's consultation time slot, and risk of the doctor being unable to see patients. And queuing mode, and the clinic queue data is refreshed at a preset time interval, the preset time interval being 15 minutes; the risk of doctors stopping their clinic hours. : ,in This refers to the number of times the doctor has historically made punctual house calls. The ratio of the total number of outpatient visits in history to the total number of outpatient visits. Historical on-time performance rate; The number of days in advance of the scheduled outpatient appointment. ; This is the threshold for the number of days to end, default. 'day'; 'k' is the steepness parameter, default value. .
4. The outpatient no-show prediction and dynamic scheduling method according to claim 1, characterized in that, In step S2, the patient's no-show risk probability is obtained through a two-layer heterogeneous integrated prediction architecture. The two-layer heterogeneous integrated prediction architecture includes a basic prediction layer and an uncertainty estimation layer. The basic prediction layer uses a gradient boosting tree model to output the basic no-show probability. The uncertainty estimation layer uses a deep neural network with a Dropout layer and maintains Dropout activation during the inference phase to perform multiple random forward propagations, thereby obtaining a set of predicted probabilities. Based on the basic no-show probability and the set of predicted probabilities, the integrated no-show probability, cognitive uncertainty, accidental uncertainty, and decision confidence are calculated.
5. The outpatient no-show prediction and dynamic scheduling method according to claim 4, characterized in that, Step S2 also includes: using SHAP values to decompose the patient's no-show risk probability into feature contribution, obtaining feature attribution results that promote or reduce no-show risk; and classifying patients into a high-risk certainty layer, a high-risk uncertainty layer, and a low-risk certainty layer based on the integrated no-show probability and cognitive uncertainty. Among them, patients in the high-risk uncertainty layer are given a conservative scheduling strategy in subsequent scheduling, which reserves buffer time or prioritizes tail risks.
6. The outpatient no-show prediction and dynamic scheduling method according to claim 1, characterized in that, In step S3, candidate appointment time slots are generated based on the appointment pool, time slot granularity, patient selectable time range, target department or target doctor, minimum advance appointment duration, and patient preference for morning or afternoon. When there are insufficient available appointment slots, available appointment slots from other doctors in the same department on adjacent dates are used to generate supplementary time slots. For patients in the low-risk stratum, if the probabilistic scheduling efficiency simulation results meet the preset conditions, overbooking is allowed within the limit of the corresponding time slot capacity. It also includes performing multiple Monte Carlo simulations for each candidate appointment time slot. In each simulation, the arrival status and actual arrival time are sampled based on the no-show probability distribution and the empirical distribution of late arrival time of the patients with appointments. The doctor service, patient waiting, doctor idle time, patient delay and doctor overtime process are deduced according to the first-come-first-served queue rule, and the single efficiency value is calculated. After multiple simulations, an efficiency empirical distribution is formed, and the efficiency mean, efficiency standard deviation and conditional risk value are extracted from the efficiency empirical distribution to form the efficiency feature vector.
7. The outpatient no-show prediction and dynamic scheduling method according to claim 1, characterized in that, In step S5, the state vector of the Markov decision process includes the current congestion index, the current time period code, the risk stratification label of the patients to be scheduled, the SHAP feature attribution value and direction, the distribution entropy of the scheduled patients in each time period, the date type, and the recent moving average of patient satisfaction. The action space is a discretized efficiency-preference weight; The reward function includes operational efficiency rewards, patient satisfaction rewards, decision consistency rewards, and uncertainty penalties; The reinforcement learning policy network is trained using a proximal policy optimization algorithm, and uses the heuristic weights calculated by the logistic function as a baseline to output the correction amount of the heuristic weights to obtain the final efficiency-preference weights.
8. The outpatient no-show prediction and dynamic scheduling method according to claim 1, characterized in that, In step S6, the online update includes: detecting whether the prediction error or behavior distribution has undergone concept drift based on the adaptive sliding window algorithm; when the mean difference between the detected data sub-windows exceeds the adaptive threshold, the model fine-tuning process is triggered. During model fine-tuning, an elastic weight consolidation mechanism is employed to apply regularization constraints to important model parameters from previous tasks to prevent catastrophic forgetting. A priority experience replay buffer is used to assign sampling priority to new samples based on temporal difference errors for training.
9. An outpatient no-show prediction and dynamic scheduling system, characterized in that, Includes the following modules: The multimodal feature engineering and risk modeling module is configured to: classify and label patient behavior after appointment; extract multimodal features for no-show risk prediction and scheduling decision-making; calculate patient no-show risk probability, patient no-show prediction uncertainty, decision confidence, and doctor's cancellation risk based on the multimodal features; form risk stratification results based on the patient no-show risk probability and patient no-show prediction uncertainty; and decompose the patient no-show risk probability into feature contribution using SHAP values. The Monte Carlo scheduling simulation and efficiency calculation module is configured to: generate candidate appointment time slots based on the appointment pool in the hospital information system; perform probabilistic scheduling efficiency simulation on each candidate appointment time slot; and output an efficiency feature vector, which includes the efficiency mean, efficiency standard deviation, and conditional value at risk. The patient preference interaction acquisition module is configured to: acquire the patient's time slot preference score for each candidate appointment time slot, and normalize the time slot preference score into a patient's medical time slot preference vector; The deep reinforcement learning dual-objective decision engine is configured to model the current outpatient operation status as a Markov decision process. Based on the risk stratification results, efficiency feature vector, patient consultation time preference vector, congestion index, and doctor closure risk, an efficiency-preference weight is generated. A comprehensive score for each candidate booking time slot is calculated based on the efficiency-preference weights. The scheduling output and interpretable display module is configured to: determine the recommended appointment time based on the comprehensive score, and generate an interpretable scheduling result that includes the reasons for recommendation, feature contribution, and efficiency-preference trade-off explanation; The drift-aware online learning module is configured to detect data distribution drift based on actual operational feedback and update the prediction model and policy network. The fairness audit and patient feedback module is configured to: perform counterfactual fairness audits on scheduling decisions and incorporate patient feedback to optimize scheduling strategies.
10. An electronic device comprising a processor and a memory, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the outpatient no-show prediction and dynamic scheduling method according to any one of claims 1 to 8.
Citation Information
Patent Citations
System for scheduling healthcare appointments based on patient no-show probabilities
CN107278304A
Appointment scheduling method and system for telemedicine patients
CN113935508A
Self-adaptive decision-making method and system for outpatient appointment scheduling
CN120542607A