Hospital intelligent number source distribution and queuing optimization method, system, equipment and medium
By establishing personalized doctor profiles and using a smooth, staggered distribution method, the allocation of appointment slots is optimized, solving the problem of excessively long waiting times caused by unreasonable allocation of appointment slots in existing technologies. This achieves a balance between doctors' workload and patients' needs, improving diagnostic and treatment efficiency and resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-03-13
AI Technical Summary
The existing hospital queuing system fails to effectively combine doctors' historical consultation time and individual characteristics to allocate appointment slots, resulting in daily overtime of consultations, excessively long waiting times for returning patients, and waste of resources.
By establishing personalized doctor profiles, recording average consultation time and fluctuation range, calculating the reasonable total number of appointment slots, and generating a smooth staggered distribution pattern, the system can estimate the time required for follow-up patients, optimize appointment allocation and queuing sequences, and dynamically adjust the total number of appointment slots to match the doctor's workload and patient needs.
It achieves a synergistic balance between doctors' workload and patients' medical needs, shortens patients' waiting time, improves diagnostic and treatment efficiency and medical experience, and optimizes the utilization of medical resources.
Smart Images

Figure CN121662311A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical information technology, specifically relating to a method, system, equipment, and medium for intelligent hospital appointment allocation and queuing optimization. Background Technology
[0002] Hospital queuing systems are an important component of the field of healthcare information technology, and their development reflects the continuous evolution of healthcare service models. With the growth of healthcare needs and the advancement of information technology, hospital queuing systems have gradually evolved from early manual registration and paper queue slips to electronic queuing systems.
[0003] In related technologies, a fixed number of appointment slots are allocated to each doctor without considering individual characteristics such as the doctor's historical consultation duration and fluctuation range. For example, assigning fixed slots can lead to daily overtime, forcing remaining patients to wait or reschedule.
[0004] In related technologies, the handling of returning patients often results in them being mixed up with first-time patients, requiring them to rejoin the queue. If a returning patient only needs 5-10 minutes to confirm their test results, they may have to wait 1-2 hours. Returning patients cutting in line further prolongs the waiting time for subsequent patients. Summary of the Invention
[0005] This invention provides a method for intelligent allocation and queuing optimization of hospital appointment slots. The method effectively improves the scientific nature of appointment slot allocation, reduces unnecessary waiting time for patients, optimizes the utilization rate of medical resources, and improves the efficiency of diagnosis and treatment and the patient's medical experience.
[0006] The methods include: S101: Establish personalized doctor profiles, recording the average consultation time and the range of fluctuation in consultation time for the same doctor in historical consultations; S102: Based on the average consultation time obtained in step S101, calculate and generate the total number of reasonable appointment slots for the same doctor within the doctor's daily working hours. S103: Read the total number of reasonable appointment slots for the day generated in step S102, and divide the total number of appointment slots into appointment slots and registered slots according to the appointment-registration ratio; S104: Divide the number of appointment slots and the number of registration slots obtained in step S103 into several equal time segments along the time axis within the same doctor's working hours, and implant the corresponding type of appointment slots in each time segment according to the polling order to form an initial staggered distribution pattern. S105: Check the time interval between similar type sources in the initial staggered distribution pattern in step S104, perform time slice shifting on adjacent similar type sources that are less than the minimum interval threshold, and generate a smooth staggered distribution pattern that meets the minimum interval requirement. S106: Obtain the initial doctor's identification, examination completion time, and examination item combination of the returning patient, and estimate the duration of the returning patient's current visit based on the historical return records of the same doctor in step S101. S107: Based on the return visit time obtained in step S106, search the remaining queue in the smooth staggered distribution method of step S105 for the optimal insertion position that ensures that the maximum waiting time of subsequent patients does not exceed the preset limit, and insert the return visit patient into the position to form an updated queue sequence. S108: Continuously collect and update the actual waiting time of the queue sequence, doctor's work efficiency and patient satisfaction, provide feedback, and dynamically correct the average consultation time and the total number of subsequent appointments in the doctor's personalized file.
[0007] Preferably, step S102 specifically includes the following methods: Determine the doctor's effective working hours each day, which is the net consultation time obtained after deducting lunch break and fixed break time from the total working hours; Calculate the standard deviation of doctors' historical consultation duration as a quantitative indicator of consultation duration fluctuation; The basic number of appointment slots is calculated by dividing the effective working hours by the average consultation time. The volatility coefficient is calculated by multiplying the ratio of the standard deviation to the average consultation duration by an adjusted weight and then adding one. Multiply the base number of available license plates by the fluctuation coefficient and round down to obtain the total number of reasonable license plates available for the day.
[0008] Preferably, step S104 specifically includes the following methods: The length of the time slice used to divide work periods is determined by multiplying the doctor's average consultation time by a preset coefficient. Divide the total duration of the doctor's work period by the length of the time slice, and round the result up to get the total number of time slices contained in the work period. According to the preset ratio of appointment slots to registration slots, the total number of slots is divided and allocated to each time slot, and the number of each type of slot is determined in each time slot. Following the alternation of appointment slots and registration slots, the corresponding types of slots are filled into each time slot in turn. If a certain type of slot has been fully allocated in the current time slot, another type of slot will be filled in. The number of signal sources in the last time slice is checked. If there are any remaining signal sources, they are proportionally allocated to the end of the preceding time slices, thus forming a continuous initial staggered distribution sequence.
[0009] Preferably, step S105 specifically includes the following methods: Obtain the type and time information of each source from the initial staggered distribution method, and read the preset minimum time interval threshold for sources of the same type; The number sources are categorized by type, and the number sources of the same type are sorted in chronological order. The time interval between two adjacent number sources of the same type after sorting is calculated. Iterate through all the calculated adjacent intervals, filter out the signal source pairs whose time interval is less than the minimum interval threshold, and record the position of the signal source pair in the sequence; For each marked signal source pair, the next signal source is shifted backward by a preset time slice length on the time axis, and the start and end times of the signal source are updated accordingly. The adjacent intervals of the same type of source in the adjusted sequence are recalculated. If there are still intervals smaller than the threshold, the translation operation is repeated until all intervals meet the requirements, and finally a smooth staggered distribution is generated.
[0010] Preferably, step S106 specifically includes the following methods: Obtain the patient's identification identifier and query the initial consultation record based on the identifier to extract the initial doctor's number, the list of examination items, and the examination completion timestamp; Parse each check item in the check item list and map it to a predefined simple, medium, or complex check complexity category; Based on the extracted initial consultation doctor number, query the doctor's personal profile for the historical average time taken to handle each type of examination with varying complexity, and construct a benchmark table for examination processing time. Based on the combination of examination items, the duration of each examination item is fine-tuned by taking into account the patient's age and medical history, starting from the corresponding baseline duration, and the independent estimated duration of each examination item is calculated. When there are more than one examination item, all the independent estimated durations are added together, and an additional value for comprehensive analysis duration based on the correlation between items is added to generate the comprehensive estimated return visit duration for the returning patient.
[0011] Preferably, step S107 specifically includes the following methods: Extract the remaining patient queues that have not yet been treated in the smooth staggered distribution pattern, record the expected start time and expected treatment duration for each patient in the queue, and obtain the expected end time of the doctor's current patients as the starting benchmark for the queue. In the remaining patient queue, determine all candidate insertion positions, including the start of the queue, between adjacent patients, and at the end of the queue, and assign a sequence number to each position; For each candidate position, after inserting the returning patient, the new admission time and end time of all subsequent patients from the candidate position are calculated in sequence, and then the waiting time extension of each subsequent patient is obtained; For each candidate location, find the maximum value among all subsequent patients' waiting time extensions, compare the maximum value with a preset threshold, and filter out candidate locations whose maximum value does not exceed the threshold to form an effective candidate set. If the set of valid candidates is not empty, the average waiting time for each position in the set is calculated, and the position with the smallest average waiting time is selected as the optimal position for insertion into the queue; if the set is empty, the patient returning for a check-up is placed at the end of the queue and the optimal position is selected after the patient meets the threshold requirements. Verify whether the expected end time of the follow-up patient corresponding to the optimal queue-jumping position is within the doctor's working hours. If it is outside the hours, adjust the queue-jumping position to the nearest valid position before the conflict occurred. Insert the returning patient into the final determined optimal queuing position, update the estimated time for the affected patients in the entire queuing sequence, form a new queuing sequence, and record the queuing operation information.
[0012] Preferably, step S108 specifically includes the following methods: The system obtains the actual waiting time of patients, extracts the actual consultation time of doctors from the electronic medical record system, collects quantitative satisfaction scores from the patient satisfaction survey platform, and integrates them into a set of medical data. Outlier removal is performed on the collected medical data, and missing values are repaired by imputation using the mean to generate standard medical data; Based on standard medical data, the average actual waiting time, average actual consultation time, and average patient satisfaction score of each doctor are obtained to form a doctor's medical indicator report.
[0013] This application also provides a hospital intelligent appointment allocation and queuing optimization system, the system comprising: The profile creation module is used to create personalized profiles for doctors, which record the average consultation time and the range of fluctuation in consultation time for the same doctor in historical consultations. The appointment calculation module is used to calculate and generate the total number of reasonable appointments for a doctor during the same doctor's daily working hours based on the obtained average consultation time. The appointment allocation module is used to read the total number of reasonable appointments generated for the day and divide the total number of appointments into appointments and registrations according to the appointment-registration ratio. The staggered distribution module is used to divide the number of appointment slots and the number of registered slots into several equal time segments along the time axis within the same doctor's working hours, and to implant the corresponding type of slots in each time segment according to the polling order to form an initial staggered distribution mode. The source distribution verification module is used to check the time interval between sources of the same type in the initial staggered distribution pattern. It performs time slice shifting on adjacent sources of the same type that are less than the minimum interval threshold to generate a smooth staggered distribution pattern that meets the minimum interval requirement. The follow-up visit duration estimation module is used to obtain the initial doctor's identification, examination completion time and examination item combination of the follow-up patient, and estimate the duration of the follow-up visit required by the patient based on the same doctor's historical follow-up visit records. The patient queue optimization module for return visits, based on the obtained return visit time, searches the remaining queue in a smoothly staggered distribution to find the optimal queue insertion position that ensures the maximum waiting time for subsequent patients does not exceed a preset limit, and inserts the return visit patient into the position to form an updated queue sequence. The dynamic feedback correction module is used to continuously collect and update the actual waiting time of the queue sequence, doctor's work efficiency and patient satisfaction, provide feedback, and dynamically correct the average consultation time and the total number of subsequent appointments in the doctor's personalized file.
[0014] According to another embodiment of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the hospital intelligent appointment allocation and queuing optimization method.
[0015] According to another embodiment of this application, a storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the hospital intelligent appointment allocation and queuing optimization method.
[0016] As can be seen from the above technical solutions, the present invention has the following advantages: The intelligent hospital appointment allocation and queuing optimization method provided by this invention calculates a reasonable total number of appointments by recording the average consultation time and its fluctuation range, thereby matching the doctor's workload with their individual treatment rhythm. The smooth, staggered distribution pattern generated by this invention avoids the concentration of similar patients, resulting in a more stable doctor's consultation rhythm and improved focus during treatment.
[0017] This invention features a staggered distribution of appointment and registration slots, avoiding the availability of only one type of slot at any given time, reducing patient congestion, and shortening waiting times. By estimating follow-up appointment times and selecting queue-jumping positions where subsequent patients' maximum waiting time does not exceed a preset limit, it avoids treatment delays caused by follow-up patients rejoining the queue, while also minimizing the impact on the fairness of waiting for other patients, thus shortening the average waiting time for follow-up patients.
[0018] This invention achieves a coordinated balance between doctors' treatment pace, patients' medical needs, and hospital resource allocation, shortening patients' waiting time, ensuring return visits for patients, and improving the efficiency of medical services. Attached Figure Description
[0019] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 Flowchart of intelligent appointment allocation and queuing optimization methods for hospitals; Figure 2 A schematic diagram of a hospital's intelligent appointment allocation and queuing optimization system; Figure 3 This is a schematic diagram of an electronic device. Detailed Implementation
[0021] The method involved in this invention is based on dynamic allocation of appointment slots for doctors' personalized consultation times, an algorithm for staggered distribution of appointment and registration slots, and an intelligent queueing optimization method for returning patients. It can automatically allocate the number of appointment slots according to the consultation characteristics of each doctor, achieving an intelligent staggered distribution of appointment and registration slots, supporting flexible ratio configurations, such as an appointment to registration slot ratio of 1:1, 7:3, etc. Through the queuing optimization algorithm for returning patients, it improves the patient experience, reduces waiting time, and optimizes hospital resource allocation while ensuring overall medical efficiency.
[0022] The following will describe in detail the intelligent hospital appointment allocation and queuing optimization method involved in this application. Specific details such as particular system structures and technologies are presented for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details.
[0023] It should be understood that, when used in this specification, terms include indicating the presence of a described feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms include, encompass, have, and variations thereof mean including but not limited to, unless otherwise specifically emphasized.
[0024] The statements such as "one embodiment" or "some embodiments" described in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the statements such as "in one embodiment," "in some embodiments," "in other embodiments," and "in still other embodiments" in this application do not necessarily refer to the same embodiment, but rather mean one or more, but not all, embodiments, unless otherwise specifically emphasized.
[0025] 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Please see Figure 1 The diagram shows a flowchart of a hospital intelligent appointment allocation and queuing optimization method in a specific embodiment. The method includes: Step S101: Establish a personalized doctor profile, recording the average consultation time and the range of fluctuation in consultation time for the same doctor in historical consultations.
[0027] In some embodiments, historical consultation data can be selected from valid medical records within a preset time period. The arithmetic mean of the selected valid records is calculated by dividing the total consultation duration by the number of valid records. The fluctuation range is determined by calculating the standard deviation or interquartile range of the historical consultation duration, such as using the average consultation duration ± standard deviation or the lower quartile minus the upper quartile as the fluctuation interval, reflecting the stability of the doctor's consultation duration.
[0028] This embodiment also sets up monthly updates to the records, incorporating newly added valid medical data for the current month into the statistics, ensuring that the record data is synchronized with the doctor's current treatment schedule.
[0029] Step S102: Based on the average consultation time obtained in step S101, calculate and generate the total number of reasonable appointment slots for the same doctor during the doctor's daily working hours.
[0030] In some embodiments, the effective working hours are calculated by subtracting rest time from the doctor's total working hours for the day. This embodiment, in conjunction with the consultation time fluctuation range in step S101, defines a fluctuation coefficient by multiplying the base number of appointment slots by the fluctuation coefficient to correct the number of appointment slots. The corrected number of appointment slots is then rounded to ensure it is an integer. This avoids doctors being overworked and experiencing a decline in consultation quality due to too many appointment slots, and also avoids wasted time and underutilized consultation capacity due to too few appointment slots, achieving a precise match between the number of appointment slots and the individual doctor's capacity.
[0031] In some specific embodiments, step S102 specifically includes the following: Step S1021: Determine the doctor's effective working hours for each day. Subtract the predetermined lunch break and fixed inter-class break time from the total time from the doctor's start time to the end time of the day to obtain the effective working hours in minutes. In some embodiments, a time base is determined for allocating appointment slots, clarifying the actual time range that doctors can use to see patients, excluding non-patient times such as lunch breaks and fixed class breaks. This avoids the number of appointment slots exceeding the actual capacity of doctors due to the failure to deduct rest time, and prevents doctors from being overworked.
[0032] Step S1022: Collect multiple sets of historical consultation duration data from doctors, calculate the standard deviation of historical consultation duration, and use it as a quantitative indicator of consultation duration fluctuation; In some embodiments, the standard deviation is calculated by calculating the average consultation time based on the filtered valid records, i.e. the average consultation time in S101, then calculating the difference between the consultation time of each valid record and the average consultation time, squaring the difference, calculating the arithmetic mean of all the squared values, and finally taking the square root to obtain the standard deviation. Step S1023: Calculate the basic number of appointment slots based on the effective working hours and average consultation time. The formula is: Basic number of appointment slots = Effective working hours ÷ Average consultation time; In some embodiments, the method of dividing the total time by the workload per unit time ensures that the consultation time for each patient is equal to the average consultation time. Without any fluctuations, the maximum number of patients that can be treated within the effective working time is essentially set for the total number of appointment slots to reflect the doctor's theoretical maximum capacity to treat patients.
[0033] Step S1024: Calculate the fluctuation coefficient based on the ratio of the standard deviation of historical consultation duration to the average consultation duration, combined with the preset adjustment weight. The formula is: Fluctuation coefficient = 1 + (standard deviation ÷ average consultation duration) × adjustment weight. In some embodiments, the degree of fluctuation is converted into a correction coefficient for the base number of appointment slots using a formula. If the doctor's consultation time fluctuates greatly, the ratio of (standard deviation / average duration) is large, and the fluctuation coefficient increases accordingly. The value obtained by multiplying the base number of appointment slots by the coefficient is better able to cope with the situation of longer consultation times. If the fluctuation is small, the coefficient is close to 1, and the number of base appointment slots after correction is close to the ideal value, making full use of time. By correcting the fluctuation coefficient, the number of appointment slots can be matched with the average consultation efficiency of doctors.
[0034] Step S1025: Calculate the total number of reasonable license plate numbers for the day. Multiply the base number of license plate numbers by the fluctuation coefficient and round the result down to obtain the total number of reasonable license plate numbers for the day.
[0035] In some embodiments, the ideal base number of appointment slots is combined with a correction coefficient to accommodate fluctuations. The theoretical number of available appointment slots is obtained through multiplication, and then rounded down to convert it into an actual operable integer number of appointment slots. This approach balances maximizing doctors' capabilities with controlling the risk of patient admission, ensuring that the final number of appointment slots neither wastes effective time nor exceeds the time limit for patient admission.
[0036] Step S103: Read the total number of reasonable appointment slots for the day generated in step S102, and divide the total number of appointment slots into appointment slots and registered slots according to the appointment-registration ratio.
[0037] In some embodiments, an initial ratio is determined based on department attributes and historical visit data. Administrators can adjust the ratio according to real-time needs. This embodiment splits and rounds the number of appointments, multiplying the total number of reasonable appointment slots for the day by the appointment ratio and the registration ratio respectively to obtain the theoretical number of slots for both types. Non-integer results are rounded. The ratio, number of appointments, number of registrations, and operation time are recorded for each split, facilitating subsequent traceability and analysis.
[0038] This embodiment balances the appointment needs of patients with planned needs and those with immediate needs, meeting the medical needs of different types of patients and avoiding excessive resource consumption by one type of appointment.
[0039] Step S104: Divide the number of appointment slots and the number of registration slots obtained in step S103 into several equal time segments along the time axis within the same doctor's working hours, and implant the corresponding type of appointment slots in each time segment according to the polling order to form an initial staggered distribution pattern.
[0040] In some embodiments, the duration of the time slice is adapted to the average consultation duration obtained in step S101. For example, if the average consultation duration is 15 minutes, the time slice is 15 minutes; if the average is 10 minutes, the time slice is 10 minutes, ensuring that each time slice corresponds to a complete consultation unit.
[0041] In this embodiment, the total number of time slices is obtained by dividing the doctor's effective working hours for the day by the duration of the time slice.
[0042] This embodiment constructs a polling queue based on the appointment-registration ratio in step S103. For example, a 7:3 ratio would result in a queue consisting of 7 appointment identifiers and 3 registration identifiers, arranged cyclically. Each time slot is traversed in chronological order from morning to evening. Appointment or registration identifiers are sequentially retrieved from the head of the polling queue, and the corresponding type of appointment is inserted into the current time slot. The retrieved identifier is then moved to the tail of the queue. This process is repeated until all time slots have been filled with appointments, forming an initial staggered distribution. This ensures that patients have two types of appointments available throughout the day, reducing waiting congestion caused by a concentration of certain types of appointments at certain times.
[0043] Step S105: Check the time interval between similar type sources in the initial staggered distribution pattern in step S104, perform time slice shifting on adjacent similar type sources that are less than the minimum interval threshold, and generate a smooth staggered distribution pattern that meets the minimum interval requirement.
[0044] In some embodiments, thresholds are set based on departmental patient flow and doctor consultation rhythm to ensure that similar appointment slots are not concentrated. All appointment slots in the initial staggered distribution are traversed chronologically, and the time interval between two adjacent similar appointment slots is calculated. If the interval between two adjacent similar appointment slots is less than the threshold, the time slice containing the next similar appointment slot is shifted backward by a shift duration equal to the minimum interval threshold minus the current interval. During shifting, time slices with no subsequent appointment slots or different types of appointment slots are prioritized to avoid affecting other similar appointment slots. After shifting, the intervals of all adjacent similar appointment slots are recalculated, and the checking and shifting operations are repeated until the intervals of all similar appointment slots are not less than the minimum interval threshold, ultimately forming a smooth staggered distribution. This improves the patient waiting experience and reduces dissatisfaction caused by concentrated waiting.
[0045] Step S106: Obtain the initial doctor's identification, examination completion time, and examination item combination of the returning patient, and estimate the duration of the returning patient's current visit based on the historical return records of the same doctor in step S101.
[0046] In some embodiments, the initial visit record of the returning patient is retrieved to obtain the identifier of the initial doctor. The patient's examination completion time and examination item combination are obtained through the examination department system. The examination items are classified according to complexity, and a corresponding basic duration is matched for each examination item. In the historical return visit records of the same doctor in step S101, records with the same disease type and the same examination item combination as the current patient are filtered, and the average return visit duration of these records is calculated as a reference duration.
[0047] In this embodiment, if the examination items are in combination, after adding the base time of each item, an additional 3-5 minutes of correlation analysis time is added. Combined with the patient's treatment stage, a certain amount of treatment time is added. Thus, the average or the upper limit of a reasonable range of the base time, reference time, correlation, and decision-making time is taken as the required duration for this follow-up visit. This ensures that the estimated time matches the patient's actual condition and the doctor's treatment habits, providing an accurate time basis for subsequent queue-jumping calculations and reducing queuing disorder caused by estimation errors.
[0048] Step S107: Based on the return visit time obtained in step S106, search the remaining queue in the smooth staggered distribution method of step S105 for the optimal insertion position that ensures that the maximum waiting time of subsequent patients does not exceed the preset limit, and insert the return visit patient into the position to form an updated queuing sequence.
[0049] In some embodiments, the patient queues that have not yet started seeing patients in the smooth staggered distribution mode of step S105 are retrieved, and the original expected time of seeing each patient and the original expected treatment duration are recorded; the expected end time of the patient currently being seen by the doctor is obtained.
[0050] This embodiment also involves candidate positions, specifically including the positions between two adjacent patients in the remaining queue after the current patient's visit ends, and the position at the end of the queue. Each position is labeled as position k, k=1,2,...,m, where m=number of remaining patients +1. For the calculation of waiting extension, for each candidate position k, a returning patient is simulated, and the expected admission time and expected end time of the returning patient are calculated; then, the new expected admission time and new expected end time of all patients at position k and thereafter are calculated sequentially.
[0051] This embodiment also extracts the maximum waiting time for subsequent patients corresponding to each candidate position k, compares it with a preset upper limit, and filters out valid candidate positions where the maximum waiting time is ≤ the preset upper limit. Among the valid candidate positions, the position with the minimum average waiting time for subsequent patients is selected as the optimal insertion position. If there is no valid candidate position, the returning patient is inserted at the end of the queue, the waiting time is recalculated, and it is confirmed to meet the upper limit requirement. For checking whether the expected end time of the returning patient exceeds the doctor's workday end time or lunch break start time, if a conflict exists, the optimal position is adjusted to the nearest valid position before the conflict period. For example, if the expected end time exceeds the lunch break at 12:00, it is adjusted to a position ending before 11:40. The returning patient is inserted into the optimal position, and the new expected admission time and new expected end time of all subsequent patients in the remaining queue are updated, forming an updated queuing sequence.
[0052] Step S108: Continuously collect the actual waiting time of the updated queuing sequence, doctor's work efficiency and patient satisfaction, provide feedback, and dynamically correct the average consultation time and the total number of subsequent appointments in the doctor's personalized file.
[0053] In some embodiments, the continuously collected data is the difference between the patient's appointment / registration time and the actual consultation time, which is taken as the actual waiting time. The ratio of the doctor's total actual consultation time for the day (the sum of the actual consultation times for all patients) to the effective working hours is also collected.
[0054] The completion rate is calculated as the ratio of the actual number of patients treated to the total number of available appointments for the day. Patient satisfaction is assessed by collecting patient ratings on waiting time and the treatment process through pop-up windows and SMS questionnaires after the initial consultation, and the average satisfaction level for the day is calculated.
[0055] This embodiment avoids the long-term fixation of system parameters, ensuring that doctors' personalized records and appointment allocation plans always match the actual situation, thus improving the applicability of the system.
[0056] In one embodiment of the present invention, based on step S104, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner. Step S104 specifically includes the following methods: Step S1041: Determine the baseline length of the time slice based on the average consultation time of doctors. Take the product of the average consultation time and the preset time slice coefficient as the time slice length. For example, the time slice length = average consultation time × 0.8. In some embodiments, the time slice length is calculated using the formula: Time slice length = average consultation time × time slice coefficient. The coefficient is adjusted to ensure that the time slice length matches the doctor's treatment rhythm, avoiding resource idleness due to excessively long time slices or fragmented allocation due to excessively short time slices.
[0057] Step S1042: Calculate the number of time slices included in the total duration of the doctor's work period, divide the total duration by the length of the time slice and round up to ensure that all appointment slots can be allocated to a complete time slice; In some embodiments, the theoretical number of time slices is calculated by dividing the total duration by the time slice length, and then rounded up to ensure that the number of time slices is sufficient to accommodate all signal sources. This embodiment also uses a total duration check to ensure that the time slices can cover the complete valid working period, thus establishing a matching relationship between the number of time slices, the total number of signal sources, and the valid duration.
[0058] Step S1043: Calculate the number of appointment slots and registration slots to be allocated in each time slot according to the appointment-registration ratio, and use the integer allocation method to divide the number of slots into each time slot according to the ratio; In some embodiments, the preset appointment-registration ratio and the number of appointment slots divided into the total number of reasonable appointment slots for the day are first determined, and then the average value of the number of single-type appointment slots ÷ the number of time slots is calculated.
[0059] This embodiment adopts a method of first uniformly distributing the base number and then processing the remainder—the base number is the integer part of the average value, and the remainder is the number of single-type number sources minus (base number × number of time slices); then, according to the order of the time slices, one remainder number source is allocated to each time slice in turn until the remainder is used up; if the number of number sources in a certain time slice is ≥3 after allocation, the excess part is adjusted to the subsequent time slices without number sources to avoid too many number sources in a single time slice.
[0060] Step S1044: Perform polling and implantation operation, fill the appointment slots in the time slots in the alternating order of appointment-registration. If the appointment slot type is exhausted in a certain time slot, skip that type and continue to fill another type. In some embodiments, the polling-based filling scheme iterates through each time slot in chronological order, retrieving identifiers from the head of the polling queue one by one to determine whether that type of appointment is still needed in that time slot. The filling result record mainly labels each filled appointment with its time slot number, start time, and type, forming an initial allocation list. In this way, the cyclically arranged polling queue ensures that appointment and registration identifiers appear alternately, guaranteeing that the two types of appointments enter the time slots proportionally during the filling process, avoiding concentrated filling of one type of appointment.
[0061] Step S1045: Verify the number of available appointment slots at the time slice boundaries. If the number of available appointment slots in the last time slice is insufficient, move the remaining available appointment slots to the end of the preceding time slice according to the reservation-registration ratio to form a continuous initial staggered distribution sequence.
[0062] In some embodiments, boundary checks are used to identify tail gaps in the allocation of license plate numbers, and the remaining license plate numbers are added to the preceding time slices to eliminate time slice gaps in the allocation process and ensure that license plate numbers are continuously distributed throughout the entire effective working period.
[0063] In one embodiment of the present invention, based on step S105, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner. Step S105 specifically includes the following methods: S1051: Extract all source entries from the initial staggered distribution pattern generated in step S104, obtain the type, start time, and end time of each source, and read the minimum time interval threshold of the same type of source preset by the system.
[0064] In some embodiments, key time parameters and type information of appointment slots are extracted from the initial scheme, the interval standards for the appropriate departments are obtained, and a basic data framework for subsequent interval calculation and adjustment is constructed. In this way, the abstract appointment slot distribution scheme is transformed into quantifiable and comparable structured data.
[0065] S1052: Categorize all signal sources according to their type, and sort signal sources of the same type in chronological order; calculate the time interval between two adjacent signal sources of the same type. The calculation method for the adjacent interval is Δt = start time of the next signal source - end time of the previous signal source.
[0066] In some embodiments, all extracted appointment slots are separated into two categories: appointment and registration, forming two independent lists. The appointment slots in each list are sorted in ascending order of start time. If two appointment slots have the same start time, they are sorted by the unique identifier of the appointment slot.
[0067] S1053: Traverse all adjacent intervals of the same type of signal source, filter out adjacent signal source pairs whose interval value Δt is less than the minimum interval threshold, and record the position index of the signal source pair.
[0068] In some embodiments, the location index is based on the sorted list. For example, the 3rd and 4th appointment slots in the reservation list are a pair to be adjusted, recorded as 3-4. The current Δt and corresponding threshold of this appointment slot pair are recorded simultaneously to form an adjustment list. The list is sorted in descending order by the absolute value of the difference between Δt and the threshold to ensure that appointment slot pairs with insufficient intervals are processed first. Duplicate marking verification: After traversal, it is checked whether there are duplicate marked appointment slots in the adjustment list. If so, it needs to be confirmed whether the appointment slot has insufficient interval problems with both the slots before and after it. If the same reason is the cause, the relevant appointment slot pairs are merged and recorded to avoid repeatedly moving the same appointment slot during subsequent adjustments.
[0069] S1054: For each pair of adjacent signal sources marked, shift the time slice of the next signal source backward along the time axis by a preset time slice length, and update the start and end times of that signal source.
[0070] In some embodiments, the object to be translated is the next signal source in the signal source pair to be adjusted, and the translation direction is fixed to backward. The preset time slice length is consistent with the time slice length set in step S1041 to ensure that the signal source still falls within the complete time slice after translation.
[0071] After the shift, the start time of the next appointment slot = original start time + shift length, and the end time = original end time + shift length. After the update, it is necessary to check whether the new end time of the appointment slot exceeds the doctor's effective working hours for the day. If it does, the shift length is adjusted to the end time of the effective working hours minus the original end time to ensure that the appointment slot does not exceed the reception time range.
[0072] S1055: Recalculate the interval of all adjacent sources of this type after adjustment. If there are still adjacent pairs with intervals less than the minimum interval threshold, repeat the translation operation of S1054 until the adjacent intervals of all sources of the same type are not less than the minimum interval threshold, and generate a smooth staggered distribution pattern that meets the requirements.
[0073] In some embodiments, after completing a shift operation of the list to be adjusted, the logic of step S1052 needs to be returned to, all appointment slots of that type are reordered, the Δt of all adjacent appointment slots is recalculated, and then the filtering in step S1053 is executed to check whether there are still appointment slot pairs with Δt < threshold; if so, the list to be adjusted is updated, and the shift operation in S1054 is executed again; if not, the adjustment of this type of appointment slot is completed, and the process moves to another type, such as processing registration after the appointment adjustment is completed. Ensure that appointment slots of the same type maintain a reasonable interval on the timeline to avoid patients waiting in a concentrated period of time.
[0074] In one embodiment of the present invention, based on step S106, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner. Step S106 specifically includes the following methods: Step S1061: Obtain the identity identifier of the returning patient, and query their initial consultation record based on the identifier to extract the initial doctor's number, the list of examination items, and the examination completion timestamp.
[0075] Step S1062: Analyze the combination of inspection items and map each inspection item to a predefined inspection complexity category. The category is divided into three levels: simple, medium, and complex, based on factors such as the operation time of the inspection equipment and the difficulty of result analysis.
[0076] In this embodiment, when constructing the complexity mapping table for examination items, the difficulty coefficient is analyzed based on the standard working hours marked in the equipment operation manual and the results of radiologists' experience summaries. Examination items are divided into three categories: simple (≤15 minutes), medium (16-30 minutes), and complex (>30 minutes). By quantifying equipment and human factors to establish classification standards, the complexity of examinations can be calculated.
[0077] Step S1063: Based on the extracted initial doctor number, query the historical average time data of the doctor in handling various complex examinations from the doctor's personalized profile established in step S101, and construct a doctor-specific examination processing time benchmark table.
[0078] In this embodiment, when extracting historical data from doctors' personalized records, a sliding window algorithm is used to statistically analyze the distribution of the time doctors spend handling various complex examinations over the past three months. After removing outliers, a weighted average is calculated to form a baseline time table.
[0079] Step S1064: Based on the combination of examination items, for each examination item, start from its corresponding baseline duration and make positive or negative time adjustments based on two factors: patient age and special circumstances marked in the medical history, and calculate the independent estimated duration of each item.
[0080] Step S1065: If the number of inspection items is greater than one, sum all the independent estimated durations and add an additional comprehensive analysis duration value based on the correlation between items to finally generate the comprehensive estimated return visit duration for the patient.
[0081] In this embodiment, the inter-item correlation analysis uses an expert system rule base. For logically related check combinations, a synergy coefficient is set to reduce the total time, while combinations requiring cross-validation increase the comprehensive analysis time. This avoids prediction bias caused by simple time aggregation, making the overall time more consistent with actual clinical processing logic and improving the rationality of patients' queue placement during return visits.
[0082] In one embodiment of the present invention, based on step S107, the following will provide a possible embodiment and its specific implementation will be described in a non-limiting manner. Step S107 specifically includes the following methods: Step S1071: Extract the remaining patient queues that have not yet started seeing patients from the smooth staggered distribution generated in step S105, record the estimated start time and estimated treatment duration for each patient in the queue, and obtain the estimated end time of the patient currently being seen by the doctor as the starting time of the remaining queues. In some embodiments, current treatment progress data and time parameters of the remaining queue are collected, namely the expected reception time and treatment duration, to construct the basic data framework for queue-jumping calculation.
[0083] Step S1072: In the remaining patient queue, determine all candidate insertion positions, including the queue start position and the position between two adjacent patients in the queue. Each candidate position is marked as position k, k=1,2,...,m, where m is the number of remaining patients +1.
[0084] In some embodiments, based on the remaining number of patients n, the number of candidate queue positions is determined to be n+1, consisting of 1 at the beginning of the queue, n-1 within the queue, and 1 at the end of the queue. A unique sequence number k is assigned to each position in order from front to back.
[0085] This embodiment traverses all possible insertion nodes in the remaining queue, ensuring that all potential insertion positions are covered and no reasonable options are overlooked.
[0086] Step S1073: For each candidate position k, assuming that a returning patient is inserted into that position, calculate the estimated consultation time for the returning patient. The estimated consultation time is equal to the estimated end time of the patient before position k. Then, calculate the new estimated consultation time and new estimated end time for all patients after position k in turn, and then calculate the waiting extension time for each subsequent patient. Through time chain recursion, simulate the time change of all subsequent patients after the insertion of the returning patient, and quantify the waiting extension of each patient.
[0087] Step S1074: For each candidate position k, extract the maximum value among all subsequent patients' waiting time extensions, compare the maximum value with the preset waiting time extension upper limit threshold, and filter out candidate positions with the maximum value ≤ the threshold to form a set of effective candidate positions; use the maximum waiting time extension not exceeding the upper limit as the core screening condition to exclude positions that would cause excessive waiting time extensions for individual patients.
[0088] Step S1075: If the set of valid candidate positions is not empty, calculate the average waiting time of subsequent patients corresponding to each valid candidate position, and select the position with the smallest average waiting time as the optimal queue insertion position; if the set of valid candidate positions is empty, postpone the expected consultation time of the returning patients to the end of the remaining queue, recalculate the waiting time, and select the optimal queue insertion position after confirming that it meets the threshold requirements. In this embodiment, when the set of valid locations is not empty, the average waiting time for each valid location is calculated, and the location with the smallest average waiting time is selected. When the set of valid locations is empty, the returning patient is inserted at the end of the queue as the optimal location. Based on meeting a preset threshold, the location with the least overall impact on subsequent patients is selected; if there is no valid location, delayed insertion ensures that the threshold requirement is met.
[0089] Step S1076: Verify whether the expected end time of the follow-up patient corresponding to the optimal queue-jumping position conflicts with the doctor's subsequent working hours. If a conflict exists, adjust the optimal queue-jumping position to the nearest valid position before the conflicting time. The conflict here could be outside of lunch break or after get off work hours.
[0090] Step S1077: Insert the returning patient into the optimal queue-jumping position, update the estimated reception time and estimated end time of all subsequent patients in the remaining queue, form an updated queue sequence, and record the time, position and related patient information of the queue-jumping operation.
[0091] This embodiment inserts the return visit patient information into the optimal position, updates the estimated admission / exit times of all subsequent patients according to the new timeline, forms a new queue, and records the time, location, and patient information. It ensures that the updated queue sequence time meets the requirements, and retains the operation records for data collection and analysis in subsequent step S108.
[0092] In one embodiment of the present invention, based on step S108, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner. Step S108 specifically includes the following methods: S1081: Obtain the actual waiting time of patients, extract the actual consultation time of doctors from the electronic medical record system, collect quantitative satisfaction scores from the patient satisfaction survey platform, and integrate them into a set of diagnosis and treatment data.
[0093] S1082: Perform outlier removal on the collected medical data and imputation to repair missing values by filling in the mean, generating standard medical data.
[0094] S1083: Based on standard medical data, obtain the average actual waiting time, average actual consultation time, and average patient satisfaction score for each doctor to form a doctor's medical indicator report.
[0095] This embodiment compares the doctor's operational performance report with preset benchmark values, such as the doctor's historical average consultation time and the preset maximum patient waiting time limit. Based on the comparative analysis results, the system adjusts its settings. If a doctor's average actual consultation time increases by more than 10% compared to the recorded value, the average consultation time in the doctor's personalized file is updated. If a doctor's average actual waiting time consistently exceeds the preset limit, the total number of appointments available for that doctor the following day is reduced, and vice versa. This continuously adapts to changes in doctors' service capabilities and fluctuations in patient demand, maintaining the effectiveness and rationality of appointment allocation and queuing strategies.
[0096] Furthermore, as a refinement of the specific implementation method of the above-mentioned hospital intelligent appointment allocation and queuing optimization method, the method also includes the following implementation methods: Step S501: Based on the doctor's historical consultation data, establish a personalized profile for each doctor, including average consultation time, consultation time fluctuation range, professional expertise, etc.
[0097] Based on historical consultation data, calculate the reasonable number of appointment slots for each doctor per day. For example, if doctor A's average consultation time is 15 minutes and doctor B's average consultation time is 10 minutes, allocate more appointment slots to doctor B within the same working hours.
[0098] Step S502: Based on the set ratio (e.g., 70% appointments, 30% registration), intelligently allocate appointment and registration slots throughout the doctor's entire work period. This ensures that appointment and registration slots are evenly distributed across time slots, avoiding situations where only appointments or only registrations are available during certain periods. Administrators can adjust the allocation ratio based on departmental characteristics and patient needs.
[0099] For example, the staggered distribution strategy can support various ratios of appointment and registration slots, such as 1:1, 7:3, and 8:2. A round-robin algorithm ensures that slots are evenly distributed across the timeline. The basic round-robin method divides the doctor's working hours into several time slices, allocating appointment and registration slots within each time slice according to a preset ratio.
[0100] By combining minimum intervals, ensure that the minimum time interval between sources of the same type is not less than a preset threshold, and avoid excessive concentration of a certain type of source.
[0101] Specific implementation example: Assume Dr. Zhang has 16 appointment slots available in 4 hours in the morning, in a 7:3 ratio (11 appointments and 5 registrations). Time slot 1 (8:00-8:15): 1 appointment; Time slot 2 (8:15-8:30): 1 registration; Time slot 3 (8:30-8:45): 1 appointment; Time slot 4 (8:45-9:00): 1 appointment, and so on, ensuring that registration slots are relatively evenly distributed throughout the time slot.
[0102] This embodiment takes into account peak consultation periods and allows for adjustments to staggered appointment intervals. Based on historical data from the same period, these intervals can be adjusted in advance. Specific date ranges can be scheduled, with appropriate adjustments to the allocation of appointment slots. For example, during peak influenza season, the density of available appointment slots can be increased.
[0103] Step S503: Patients returning for follow-up visits typically need to return to their original doctor for continued treatment. The optimization algorithm for queue jumping is configured as follows: Configure a method for estimating follow-up visit duration, analyzing key information such as the patient's disease type, severity, and treatment stage. Based on the type of examinations performed and the complexity of the results, estimate the time required for the doctor to review and analyze the information.
[0104] For example, simple examinations (such as a complete blood count): estimated 5-8 minutes. Moderately complex examinations (such as an electrocardiogram or X-ray): estimated 8-12 minutes. Complex examinations (such as a CT scan or MRI): estimated 12-20 minutes. Multiple examination combinations: based on the sum of the durations of each examination and considering their correlation. Historical data learning: based on the doctor's past time records for handling similar return patients, the time estimation model is continuously optimized.
[0105] Step S504: Continuously monitor the effectiveness of various medical treatment models, including indicators such as patient waiting time, doctor work efficiency, and patient satisfaction. Based on this data, generate a patient waiting time analysis chart for each doctor, adjust the appointment allocation strategy and queuing algorithm parameters, and achieve continuous optimization.
[0106] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0107] The following are embodiments of the intelligent hospital appointment allocation and queuing optimization system provided in this disclosure. This system and the intelligent hospital appointment allocation and queuing optimization methods in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the intelligent hospital appointment allocation and queuing optimization system, please refer to the embodiments of the intelligent hospital appointment allocation and queuing optimization methods described above.
[0108] like Figure 2 As shown, the system includes: The file creation module 201 is used to create personalized files for doctors, which record the average consultation time and the range of fluctuation of consultation time for the same doctor in historical consultations. The appointment calculation module 202 is used to calculate and generate the total number of reasonable appointments for a doctor during the day based on the obtained average consultation time. The appointment allocation module 203 is used to read the total number of reasonable appointments generated for the day and divide the total number of appointments into appointments and registrations according to the appointment-registration ratio. The appointment slot staggered distribution module 204 is used to divide the number of appointment slots and the number of registered appointment slots into several equal time segments along the time axis within the same doctor's working hours, and to implant the corresponding type of appointment slots in each time segment according to the polling order to form an initial staggered distribution mode. The source distribution verification module 205 is used to check the time interval between sources of the same type in the initial staggered distribution pattern, and to perform time slice shifting on adjacent sources of the same type that are less than the minimum interval threshold to generate a smooth staggered distribution pattern that meets the minimum interval requirement. The follow-up visit duration estimation module 206 is used to obtain the initial doctor's identification, examination completion time and examination item combination of the follow-up visit patient, and estimate the duration of the follow-up visit patient's current visit based on the same doctor's historical follow-up visit records. The patient queue optimization module 207 for returning patients searches for the optimal queue insertion position in the remaining queue with a smooth staggered distribution, based on the obtained return visit time, so that the maximum waiting time of subsequent patients does not exceed the preset limit, and inserts the returning patient into the position to form an updated queue sequence. The dynamic feedback correction module 208 is used to continuously collect and update the actual waiting time of the queue sequence, the doctor's work efficiency and the patient's satisfaction, provide feedback, and dynamically correct the average consultation time and the total number of subsequent appointments in the doctor's personalized file.
[0109] like Figure 3 As shown, this application also provides an electronic device, including a display module 103, a memory 102, a processor 101, and a computer program stored in the memory and executable on the processor 101. When the processor 101 executes the program, it implements the steps of a hospital intelligent appointment allocation and queuing optimization method.
[0110] In embodiments of the present invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments described and / or claimed herein.
[0111] In this embodiment, processor 101 may be implemented using at least one of an application-specific integrated circuit, a programmable logic device, a field-programmable gate array, a processor, a controller, a microcontroller, a microprocessor, or an electronic unit designed to perform the functions described herein. In some cases, such an implementation may be implemented within a controller. For software implementation, implementations such as processes or functions may be implemented with separate software modules that allow the performance of at least one function or operation. Software code may be implemented by a software application (or program) written in any suitable programming language, and the software code may be stored in memory and executed by the controller.
[0112] The display module 103 is used to display information input by the user or information provided to the user. The display module 103 may include a display panel, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like.
[0113] The memory 102 can be used to store software programs and various data. The memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0114] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the hospital intelligent appointment allocation and queuing optimization method.
[0115] The storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0116] In a storage medium, a readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0117] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for intelligent allocation of hospital appointment slots and optimization of queuing, characterized in that, The methods include: S101: Establish personalized doctor profiles, recording the average consultation time and the range of fluctuation in consultation time for the same doctor in historical consultations; S102: Based on the average consultation time obtained in step S101, calculate and generate the total number of reasonable appointment slots for the same doctor within the doctor's daily working hours. S103: Read the total number of reasonable appointment slots for the day generated in step S102, and divide the total number of appointment slots into appointment slots and registered slots according to the appointment-registration ratio; S104: Divide the number of appointment slots and the number of registration slots obtained in step S103 into several equal time segments along the time axis within the same doctor's working hours, and implant the corresponding type of appointment slots in each time segment according to the polling order to form an initial staggered distribution pattern. S105: Check the time interval between similar type sources in the initial staggered distribution pattern in step S104, perform time slice shifting on adjacent similar type sources that are less than the minimum interval threshold, and generate a smooth staggered distribution pattern that meets the minimum interval requirement. S106: Obtain the initial doctor's identification, examination completion time, and examination item combination of the returning patient, and estimate the duration of the returning patient's current visit based on the historical return records of the same doctor in step S101. S107: Based on the return visit time obtained in step S106, search the remaining queue in the smooth staggered distribution method of step S105 for the optimal insertion position that ensures that the maximum waiting time of subsequent patients does not exceed the preset limit, and insert the return visit patient into the position to form an updated queue sequence. S108: Continuously collect and update the actual waiting time of the queue sequence, doctor's work efficiency and patient satisfaction, provide feedback, and dynamically correct the average consultation time and the total number of subsequent appointments in the doctor's personalized file.
2. The hospital intelligent appointment allocation and queuing optimization method according to claim 1, characterized in that, Step S102 specifically includes the following methods: Determine the doctor's effective working hours each day, which is the net consultation time obtained after deducting lunch break and fixed break time from the total working hours; Calculate the standard deviation of doctors' historical consultation duration as a quantitative indicator of consultation duration fluctuation; The basic number of appointment slots is calculated by dividing the effective working hours by the average consultation time. The volatility coefficient is calculated by multiplying the ratio of the standard deviation to the average consultation duration by an adjusted weight and then adding one. Multiply the base number of available license plates by the fluctuation coefficient and round down to obtain the total number of reasonable license plates available for the day.
3. The hospital intelligent appointment allocation and queuing optimization method according to claim 1, characterized in that, Step S104 specifically includes the following methods: The length of the time slice used to divide work periods is determined by multiplying the doctor's average consultation time by a preset coefficient. Divide the total duration of the doctor's work period by the length of the time slice, and round the result up to get the total number of time slices contained in the work period. According to the preset ratio of appointment slots to registration slots, the total number of slots is divided and allocated to each time slot, and the number of each type of slot is determined in each time slot. Following the alternation of appointment slots and registration slots, the corresponding types of slots are filled into each time slot in turn. If a certain type of slot has been fully allocated in the current time slot, another type of slot will be filled in. The number of signal sources in the last time slice is checked. If there are any remaining signal sources, they are proportionally allocated to the end of the preceding time slices, thus forming a continuous initial staggered distribution sequence.
4. The hospital intelligent appointment allocation and queuing optimization method according to claim 1, characterized in that, Step S105 specifically includes the following methods: Obtain the type and time information of each source from the initial staggered distribution method, and read the preset minimum time interval threshold for sources of the same type; The number sources are categorized by type, and the number sources of the same type are sorted in chronological order. The time interval between two adjacent number sources of the same type after sorting is calculated. Iterate through all the calculated adjacent intervals, filter out the signal source pairs whose time interval is less than the minimum interval threshold, and record the position of the signal source pair in the sequence; For each marked signal source pair, the next signal source is shifted backward by a preset time slice length on the time axis, and the start and end times of the signal source are updated accordingly. The adjacent intervals of the same type of source in the adjusted sequence are recalculated. If there are still intervals smaller than the threshold, the translation operation is repeated until all intervals meet the requirements, and finally a smooth staggered distribution is generated.
5. The hospital intelligent appointment allocation and queuing optimization method according to claim 1, characterized in that, Step S106 specifically includes the following methods: Obtain the patient's identification identifier and query the initial consultation record based on the identifier to extract the initial doctor's number, the list of examination items, and the examination completion timestamp; Parse each check item in the check item list and map it to a predefined simple, medium, or complex check complexity category; Based on the extracted initial consultation doctor number, query the doctor's personal profile for the historical average time taken to handle each type of examination with varying complexity, and construct a benchmark table for examination processing time. Based on the combination of examination items, the duration of each examination item is fine-tuned by taking into account the patient's age and medical history, starting from the corresponding baseline duration, and the independent estimated duration of each examination item is calculated. When there are more than one examination item, all the independent estimated durations are added together, and an additional value for comprehensive analysis duration based on the correlation between items is added to generate the comprehensive estimated return visit duration for the returning patient.
6. The hospital intelligent appointment allocation and queuing optimization method according to claim 1, characterized in that, Step S107 specifically includes the following methods: Extract the remaining patient queues that have not yet been treated in the smooth staggered distribution pattern, record the expected start time and expected treatment duration for each patient in the queue, and obtain the expected end time of the doctor's current patients as the starting benchmark for the queue. In the remaining patient queue, determine all candidate insertion positions, including the start of the queue, between adjacent patients, and at the end of the queue, and assign a sequence number to each position; For each candidate position, after inserting the returning patient, the new admission time and end time of all subsequent patients from the candidate position are calculated in sequence, and then the waiting time extension of each subsequent patient is obtained; For each candidate location, find the maximum value among all subsequent patients' waiting time extensions, compare the maximum value with a preset threshold, and filter out candidate locations whose maximum value does not exceed the threshold to form an effective candidate set. If the set of valid candidates is not empty, the average waiting time for each position in the set is calculated, and the position with the smallest average waiting time is selected as the optimal position for insertion into the queue; if the set is empty, the patient returning for a check-up is placed at the end of the queue and the optimal position is selected after the patient meets the threshold requirements. Verify whether the expected end time of the follow-up patient corresponding to the optimal queue-jumping position is within the doctor's working hours. If it is outside the hours, adjust the queue-jumping position to the nearest valid position before the conflict occurred. Insert the returning patient into the final determined optimal queuing position, update the estimated time for the affected patients in the entire queuing sequence, form a new queuing sequence, and record the queuing operation information.
7. The hospital intelligent appointment allocation and queuing optimization method according to claim 1, characterized in that, Step S108 specifically includes the following methods: The system obtains the actual waiting time of patients, extracts the actual consultation time of doctors from the electronic medical record system, collects quantitative satisfaction scores from the patient satisfaction survey platform, and integrates them into a set of medical data. Outlier removal is performed on the collected medical data, and missing values are repaired by imputation using the mean to generate standard medical data; Based on standard medical data, the average actual waiting time, average actual consultation time, and average patient satisfaction score of each doctor are obtained to form a doctor's medical indicator report.
8. A hospital intelligent appointment allocation and queuing optimization system, characterized in that, The system is used to implement the hospital intelligent appointment allocation and queuing optimization method as described in any one of claims 1 to 7; The system includes: The profile creation module is used to create personalized profiles for doctors, which record the average consultation time and the range of fluctuation in consultation time for the same doctor in historical consultations. The appointment calculation module is used to calculate and generate the total number of reasonable appointments for a doctor during the same doctor's daily working hours based on the obtained average consultation time. The appointment allocation module is used to read the total number of reasonable appointments generated for the day and divide the total number of appointments into appointments and registrations according to the appointment-registration ratio. The staggered distribution module is used to divide the number of appointment slots and the number of registered slots into several equal time segments along the time axis within the same doctor's working hours, and to implant the corresponding type of slots in each time segment according to the polling order to form an initial staggered distribution mode. The source distribution verification module is used to check the time interval between sources of the same type in the initial staggered distribution pattern. It performs time slice shifting on adjacent sources of the same type that are less than the minimum interval threshold to generate a smooth staggered distribution pattern that meets the minimum interval requirement. The follow-up visit duration estimation module is used to obtain the initial doctor's identification, examination completion time and examination item combination of the follow-up patient, and estimate the duration of the follow-up visit required by the patient based on the same doctor's historical follow-up visit records. The patient queue optimization module for return visits, based on the obtained return visit time, searches the remaining queue in a smoothly staggered distribution to find the optimal queue insertion position that ensures the maximum waiting time for subsequent patients does not exceed a preset limit, and inserts the return visit patient into the position to form an updated queue sequence. The dynamic feedback correction module is used to continuously collect and update the actual waiting time of the queue sequence, doctor's work efficiency and patient satisfaction, provide feedback, and dynamically correct the average consultation time and the total number of subsequent appointments in the doctor's personalized file.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the hospital intelligent appointment allocation and queuing optimization method as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the hospital intelligent appointment allocation and queuing optimization method as described in any one of claims 1 to 7.