Intelligent triage sign-in queuing management method and system based on voice interaction

CN123016567APending Publication Date: 2026-10-30GUANGDONG QUNCHUANG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611403429.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]因此,本申请提供了一种基于语音交互的智能分诊签到排队管理方法及系统,能够解决语音签到时单一科室匹配导致多科室挂号遗漏及候诊物理时间冲突的问题

Benefits of technology

本申请提供了一种基于语音交互的智能分诊签到排队管理方法及系统,本申请通过获取语音签到指令并在挂号数据库中全量检索未就诊挂号记录,得到包含第一挂号记录和第二挂号记录的挂号记录集合,避免了单一匹配导致的多科室挂号遗漏。通过获取候诊区域位置坐标和预计等候时长,计算物理距离数据和差值绝对值,并判定多科室候诊冲突边界,将第二挂号记录标记为待激活状态,避免了患者在距离较远且时间相近的多个科室之间产生物理空间冲突,防止错过叫号。在患者完成第一科室就诊后,根据就诊结束信号自动激活第二挂号记录,无需患者返回智能终端重新进行语音签到,减少了患者的操作负担,提升了门诊分诊秩序和就医效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016567A_ABST
    Figure CN123016567A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent triage sign-in queuing management method and system based on voice interaction, relates to the technical field of medical information management, and comprises the following steps: obtaining a voice sign-in instruction, performing full retrieval on non-visited registration records in a registration database, and obtaining a registration record set containing a first registration record and a second registration record, so that multi-department registration omission caused by single matching is avoided. The position coordinates of a waiting area and the expected waiting time are obtained, physical distance data and a difference absolute value are calculated, and a multi-department waiting conflict boundary is determined, the second registration record is marked as an activated state, physical space conflicts between multiple departments that are far away from each other and have similar time are avoided, and missing of a call number is prevented. After a patient completes a visit to a first department, the second registration record is automatically activated according to a visit end signal, the patient does not need to return to an intelligent terminal to perform voice sign-in again, the operation burden of the patient is reduced, and the order of outpatient triage and the medical efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical information management technology, and in particular to an intelligent triage, check-in, and queuing management method and system based on voice interaction. Background Technology

[0002] In existing technologies, hospital outpatient halls typically use smart terminals for voice-based check-in and queuing management. Upon arrival at the hospital, patients speak their name and medical card number to the smart terminal. The terminal receives the voice command, performs voice recognition and identity matching, and searches its database for the patient's registration record. However, the check-in matching logic of existing technologies usually assumes that a patient only registers for one department per visit. When a patient registers for multiple departments due to the complexity of their condition, such as both internal medicine and surgery, the existing system can only match one registration record and complete the check-in for that single department.

[0003] The existing system automatically adds patients to a single department's queue and announces their queue number and waiting area via voice announcement. Patients proceed to their assigned waiting area, but appointments for other departments simultaneously booked by the same patient are not processed. When a patient completes their appointment in the first department and proceeds to the second department's waiting area, they are informed they haven't checked in and need to rejoin the queue. At this point, the patient must return to the smart terminal to re-check in via voice. Due to the delay in re-checking in, the queue for the second department is already long, resulting in a lengthy wait. The existing system's check-in matching logic is too simplistic, lacking unified collection and correlation analysis of the same patient's appointment records across multiple departments, leading to the concealment and omission of these records.

[0004] The existing system does not take into account the physical movement costs of patients and the differences in queuing times between different departments. Blindly checking in in parallel can easily lead to conflicts in medical appointments, causing patients to run back and forth between multiple departments and easily miss their number being called. This problem is particularly prominent when patients need to register for appointments in multiple departments, which not only increases the operational burden on patients but also easily leads to omissions in checking in for some departments, seriously affecting medical efficiency and the patient experience. Summary of the Invention

[0005] In view of the aforementioned problems, this application is hereby filed.

[0006] Therefore, this application provides a smart triage check-in queuing management method and system based on voice interaction, which can solve the problem of missing registrations in multiple departments and conflicting physical waiting times caused by matching a single department during voice check-in.

[0007] To solve the above-mentioned technical problems, this application provides the following technical solution: In a first aspect, this application provides an intelligent triage check-in and queuing management method based on voice interaction, including: obtaining a voice check-in instruction and extracting the medical card number from the voice check-in instruction; Based on the medical card number, the associated unregistered medical records are retrieved from the registration database to obtain a set of registration records, which includes a first registration record and a second registration record. Obtain the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time; The physical distance data is determined based on the location coordinates of the first waiting area and the second waiting area, and the absolute value of the difference is determined based on the first estimated waiting time and the second estimated waiting time. In response to the absolute value of the difference satisfying a preset time conflict condition and the physical distance data satisfying a preset distance conflict condition, a multi-department waiting conflict boundary is determined. A single-department check-in success instruction is generated based on the first registration record, and the second registration record is marked as pending activation.

[0008] Preferably, the step of retrieving associated unregistered medical records from the registration database based on the medical card number to obtain a set of registration records, the set of registration records including a first registration record and a second registration record, including: Extract all historical registration records corresponding to the medical card number from the registration database; Extract the records in the entire historical registration record where the medical treatment status field is "not treated" as candidate registration records; Obtain the registration timestamp of the candidate registration record, and determine the candidate registration record with the earliest registration timestamp that is within the current check-in time window as the first registration record; The candidate registration records that meet the current consultation time window, other than the first registration record, are determined as the second registration record; The first registration record and the second registration record are combined and written into the registration record set.

[0009] Preferably, obtaining the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time includes: The center coordinates of the first consultation room area are read from the hospital's spatial location database as the location coordinates of the first waiting area, and the center coordinates of the second consultation room area are read as the location coordinates of the second waiting area. Extract the total number of people currently queuing in the first queue from the queue management database, and determine the first estimated waiting time by multiplying the total number of people currently queuing in the first queue by the preset average consultation time per person. Extract the total number of people currently queuing in the second queue from the queue management database, and determine the second estimated waiting time by multiplying the total number of people currently queuing in the second queue by the preset average consultation time per person.

[0010] Preferably, the step of determining physical distance data based on the location coordinates of the first waiting area and the second waiting area, and determining the absolute value of the difference based on the first estimated waiting time and the second estimated waiting time, includes: Input the location coordinates of the first waiting area and the location coordinates of the second waiting area into a preset spatial distance mapping table to obtain the physical distance data; Subtracting the second estimated waiting time from the first estimated waiting time yields a first time difference, and the absolute value of the first time difference is taken as the absolute value of the difference. Obtain a preset distance threshold corresponding to the physical distance data, and obtain a preset time threshold corresponding to the absolute value of the difference; Determine whether the physical distance data is greater than the preset distance threshold, and determine whether the absolute value of the difference is less than the preset time threshold.

[0011] Preferably, the step of determining the boundary for multi-department waiting conflict in response to the absolute value of the difference satisfying a preset time conflict condition and the physical distance data satisfying a preset distance conflict condition includes: Obtain a preset time threshold corresponding to the absolute value of the difference, and obtain a preset distance threshold corresponding to the physical distance data; The absolute value of the difference is compared with the preset time threshold to obtain a time comparison result, and the physical distance data is compared with the preset distance threshold to obtain a distance comparison result. In response to the time comparison result being less than the preset time threshold and the distance comparison result being greater than the preset distance threshold, a conflict flag is generated; Write the conflict flag bit into the determination result register of the multi-department waiting conflict boundary to determine that the multi-department waiting conflict boundary is satisfied.

[0012] Preferably, the step of generating a single-department check-in success instruction based on the first registration record and marking the second registration record as pending activation includes: Extract the first department identifier from the first registration record, and combine the first department identifier with the current timestamp to generate the single department check-in success instruction; The single-department check-in success instruction is sent to the first queue management terminal, so that the first queue management terminal assigns the first queue number; Modify the visit status field of the second registration record to the pending activation status field, and generate a second registration record carrying the pending activation status field; The second registration record carrying the activation status field is stored in the delayed queue storage area, and no write operation is performed to add it to the second queue.

[0013] As a preferred option, it also includes: Obtain a preset time threshold corresponding to the absolute value of the difference, and obtain a preset distance threshold corresponding to the physical distance data; In response to the absolute value of the difference being greater than or equal to the preset time threshold or the physical distance data being less than or equal to the preset distance threshold, it is determined that the multi-department waiting conflict boundary is not met. A combined check-in instruction is generated based on the first registration record and the second registration record. The combined check-in instruction includes a first check-in success instruction and a second check-in success instruction. Write the first registration record into the first queue and the second registration record into the second queue, and obtain the first queue number assigned by the first queue and the second queue number assigned by the second queue. A walking path guide is generated based on the location coordinates of the first waiting area and the second waiting area. The walking path guide is then combined with the first queue number and the second queue number to generate a zoned guidance voice.

[0014] Preferably, the step of generating walking path guidance based on the location coordinates of the first waiting area and the location coordinates of the second waiting area, and combining the walking path guidance with the first queue number and the second queue number to generate zoned guidance voice, includes: A first area identifier is generated based on the location coordinates of the first waiting area, and a second area identifier is generated based on the location coordinates of the second waiting area. Based on the hospital access network topology, the shortest walkable path from the first area identifier to the second area identifier is generated as the walking path guide; Obtain the first queue number and the second queue number, and concatenate the first queue number, the first area identifier, the second queue number, the second area identifier, and the walking path guide into a string; The concatenated string is input into a preset speech conversion correspondence table, and the corresponding audio data is retrieved as the partition guidance speech.

[0015] Preferably, marking the second registration record as pending activation includes: Add a delayed status flag to the second registration record, and store the second registration record with the added delayed status flag in the delayed queue storage area; Receive a consultation end signal sent by the doctor's workstation, and generate a state switching command in response to the target department identifier in the consultation end signal being the first department; According to the state switching instruction, the second registration record is retrieved from the delayed queue storage area, and the delayed state identifier of the second registration record is cleared; Write the second registration record with the delayed status flag cleared into the second queue to obtain the second queue number; Based on the location coordinates of the second waiting area and the second queue number, a single-department guidance voice is generated, and the status switching command and the single-department guidance voice are associated and written into the patient visit log record table.

[0016] Secondly, this application also provides an intelligent triage check-in and queuing management system based on voice interaction, including: a voice acquisition module, used to acquire voice check-in instructions and extract the medical card number; The record retrieval module is used to retrieve unregistered medical records based on the medical card number, and obtain a set of registration records including the first registration record and the second registration record; The data acquisition module is used to acquire the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time. The calculation and judgment module is used to determine the physical distance data and the absolute value of the difference, and in response to the satisfaction of preset time conflict conditions and preset distance conflict conditions, determine the boundary of multi-department waiting conflict. The instruction execution module is used to generate a single-department check-in success instruction based on the first registration record and mark the second registration record as pending activation.

[0017] Implementing this application will have the following beneficial effects: This application provides a voice-interactive intelligent triage check-in and queuing management method and system. By acquiring voice check-in instructions and fully searching the registration database for unused registration records, a set of registration records including a first and a second registration record is obtained, avoiding the omission of multiple department registrations due to single-matching. By acquiring the location coordinates of the waiting area and the estimated waiting time, calculating the physical distance data and the absolute value of the difference, and determining the boundary of multi-department waiting conflicts, the second registration record is marked as pending activation, preventing physical spatial conflicts between multiple departments that are far apart but have similar waiting times, thus preventing missed appointments. After the patient completes their visit to the first department, the second registration record is automatically activated based on the end-of-visit signal, eliminating the need for the patient to return to the smart terminal to re-enter voice check-in, reducing the patient's operational burden, and improving outpatient triage order and medical efficiency. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of a smart triage, check-in, and queuing management method based on voice interaction, which is the subject of this application. Figure 2 This is a schematic diagram illustrating the process of screening and generating a set of candidate registration records for a voice-interactive-based intelligent triage check-in queuing management method involved in this application. Figure 3 This is a schematic diagram of the logic for determining the boundary of multi-department waiting conflict in a smart triage, check-in, and queuing management method based on voice interaction, which is the subject of this application. Figure 4 This is a schematic diagram of the status switching and automatic activation mechanism of the delayed registration record in a smart triage check-in queuing management method based on voice interaction involved in this application; Figure 5 This is a schematic diagram illustrating the determination and parallel check-in logic of an intelligent triage and check-in queuing management method based on voice interaction, which relates to this application, when there is no risk of waiting conflict. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0021] Example 1, referring to Figures 1-5 This is the first embodiment of the present application, which provides an intelligent triage, check-in, and queuing management method based on voice interaction, including: This application provides a method that can effectively solve the problems mentioned above. The following will describe in detail how to implement the intelligent triage, check-in and queuing management method based on voice interaction, with the help of several embodiments. Figure 1 A flowchart illustrating a voice-interactive-based intelligent triage, check-in, and queuing management method is provided, including: S1, Obtain the voice check-in instruction and extract the medical card number from the voice check-in instruction; It should be noted that in the noisy environment of the outpatient hall, to enable rapid patient identification and check-in upon arrival, microphone arrays deployed on self-service terminals or mobile devices continuously monitor surrounding sound signals. When a sound pressure level exceeding a preset trigger threshold for human voice frequencies is detected, the voice acquisition module is automatically activated, converting the analog sound wave signal into digital audio stream data. The specific value of the preset trigger threshold is typically set to 60 decibels to filter out general background conversations and capture only active voices at close range.

[0022] Specifically, the acquired audio stream data is sent to the speech recognition processing unit for decoding. The recognition process first performs endpoint detection on the audio stream, using a dual-threshold method for calculation. First, the audio stream is divided into several 20-millisecond frames, and the short-time energy and short-time zero-crossing rate are calculated for each frame. The short-time energy is obtained by summing the squared amplitudes of all sampling points within the frame; the short-time zero-crossing rate is obtained by counting the number of times the waveform signal crosses the zero-level axis within the frame. When the short-time energy of several consecutive frames exceeds the high-energy threshold (e.g., 1000) and the short-time zero-crossing rate is within the speech range, it is marked as the start point of speech; conversely, when the energy of several consecutive frames is below the low-energy threshold, it is marked as the end point of speech. Based on these two endpoints, invalid silence segments and background noise are removed, retaining valid human voice segments.

[0023] Furthermore, a pre-defined acoustic model is used to convert the audio feature vectors into corresponding pinyin or phoneme sequences. The acoustic model employs a deep neural network structure, with Mel-frequency cepstral coefficient features as input and posterior probability distributions of the phonemes as output.

[0024] Subsequently, a decoder based on a statistical language model is used to search for the text sequence with the highest matching probability in a large lexicon. This language model predicts the probability of the next word appearing by analyzing the co-occurrence frequency of words in a large-scale text corpus, thereby converting the patient's spoken content into a text string. The acoustic and language models used here are existing technologies; this application mainly concerns their invocation and integration.

[0025] Furthermore, key identification information is extracted from the obtained text string. The text string is scanned character by character using pre-defined regular expression matching rules. The regular expression is configured to match consecutive numeric character patterns; for example, "\d{8}" matches 8 consecutive digits. After identifying fields that match this numeric pattern, format validation is performed, including validation bit verification logic (such as modulo 10 algorithm) or length field checks (such as requiring 8 or 10 digits) to confirm whether it conforms to the encoding specifications of the medical card. Numeric fields that pass validation are extracted and confirmed as the medical card number for subsequent database query operations.

[0026] For example, a patient says, "I need to check in, card number 88001234." The acquisition module records the audio and extracts valid speech segments through endpoint detection. The text "I need to check in, card number 88001234" is recognized. The regular expression engine scans and finds that "88001234" is an 8-digit consecutive number that conforms to the modulo 10 check rule, so it extracts it as the patient's card number.

[0027] S2, based on the medical card number, retrieve the associated unregistered medical records in the registration database to obtain a set of registration records, the set of registration records including a first registration record and a second registration record; Understandably, after obtaining the patient's medical card number, in order to fully understand the patient's current medical arrangements and avoid missing any registered departments, it is necessary to connect to the hospital's backend database system. Using the medical card number as a unique index key, a full query operation is performed on the registration record table. This process aims to obtain all historical registration details under the patient's account, not just the registration information for the current day, thereby constructing a complete data set for subsequent filtering. The registration database typically uses a relational database management system, such as MySQL or Oracle.

[0028] In some embodiments, the step of retrieving associated unregistered medical records from the registration database based on the medical card number to obtain a set of registration records, wherein the set of registration records includes a first registration record and a second registration record, may further include the following steps: S2.1 Extract all historical registration records corresponding to the medical card number from the registration database; S2.2 Extract records with a "not seen" status from all historical registration records as candidate registration records; S2.3 Obtain the registration timestamp of the candidate registration records, and determine the candidate registration record with the earliest registration timestamp that is within the current check-in time window as the first registration record; S2.4 Determine the candidate registration records that meet the current check-in time window, excluding the first registration record, as the second registration record; S2.5 Combine the first registration record and the second registration record and write them into the registration record set.

[0029] Specifically, after establishing a connection with the registration database, a Structured Query Language (SCL) command is executed. In the data table storing massive amounts of registration information, an index is used to quickly filter out all records where the patient's card number field matches the currently extracted value. The data table contains the following fields: RecordID (primary key), CardID (patient card number), DeptID (department identifier), RegisterTime (registration timestamp), and Status (visit status). These records constitute the patient's complete medical history since card issuance, including entries for various statuses such as visited, canceled, expired, and not visited.

[0030] Furthermore, the status field of all selected historical registration records is traversed and checked. The status flag representing the progress of the visit is read from each record; this flag is stored as an integer code, where 0 represents no visit, 1 represents waiting, 2 represents visited, and 3 represents cancelled. Only records with status flags of 0 or 1 are retained, and these records are extracted to form an intermediate list. Records with status flags of 2 or 3 are excluded, resulting in a candidate registration record list containing only valid pending tasks.

[0031] In this application, to prioritize the most urgent medical appointments, candidate registration records need to be sorted and filtered based on time. The timestamp value of the registration operation time for each candidate registration record is obtained; this value is typically in Unix timestamp format. First, these timestamp values ​​are compared with the current system time, eliminating records whose registration dates are outside the current valid date range, such as records from yesterday or earlier. Simultaneously, it is also necessary to verify whether the registration time falls within the current department's allowed check-in time period, i.e., within the current check-in time window.

[0032] It should be noted that the definition logic of the current check-in time window is as follows: The date and hour portions of the current system time are obtained. If the current hour is between 08:00 and 11:30, the time window is set to 08:00 to 11:59 of the current day; if the current hour is between 13:30 and 16:30, the time window is set to 13:30 to 16:59 of the current day. All other times are considered non-check-in periods. In the specific operation of this application, if the current time is 09:15, the time window is 08:00-11:59, and only registration records generated within this time period are filtered.

[0033] Furthermore, the remaining valid records are sorted in ascending order according to their timestamp values. The record at the top of the list, i.e., the earliest registration time, is marked as the first registration record. Here, "first" refers to the chronological order, that is, the department the patient booked earliest, which is also the department that should logically be visited first.

[0034] Meanwhile, after identifying the first registration record, the remaining entries in the candidate registration record list are checked. It is determined whether the registration times of these entries also fall within the current check-in time window. All entries that meet the time window requirements but were not selected as the first registration record are categorized as second registration records. The term "second" refers to all departments other than the highest priority department that are pending processing.

[0035] Understandably, the number of second registration records may be one or more, depending entirely on the number of departments the patient registers with at the same time.

[0036] Finally, the selected first registration record and all the second registration records are integrated to form a set of registration records containing all the patient's pending medical information. This set serves as the data foundation for subsequent processes, enabling conflict detection and queue management to make decisions based on the complete information set.

[0037] For example, patient Zhang San uses card number 12345 to check in via voice. The system retrieves 5 historical records under this card number. After filtering, 2 candidate records are obtained: Internal Medicine record A (registration timestamp corresponding to 08:00) and Surgical record B (registration timestamp corresponding to 08:30). The current time is 09:00, which is within the morning time window. Internal Medicine record A is determined as the first registration record and Surgical record B is determined as the second registration record, and both are packaged and output to the registration record set.

[0038] Appendix Figure 2This demonstrates the process of filtering and generating candidate registration records. By extracting all historical registration records associated with the patient's card number, and examining the "visit status" field, only records in the "not yet visited" state are retained as candidate data. Subsequently, the registration timestamps of the candidate records are validated against the current check-in time window. Records with the earliest timestamps that meet the time window requirements are prioritized as first-line registration records, while the remaining records meeting the time window requirements are categorized as second-line registration records. These two types of records are then integrated into the same registration record set. This full-scale retrieval and categorization filtering mechanism ensures that all valid pending tasks under the patient's name are fully collected, preventing the concealment or omission of registration information from multiple departments.

[0039] S3, obtain the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time; In this embodiment, after identifying the registration records that need to be processed, quantitative data needs to be collected from both spatial and temporal dimensions to assess the physical feasibility and time urgency of patients traveling between different departments. This step obtains the raw parameters required to support the conflict determination algorithm by calling the real-time interfaces of the hospital's geographic information system and queue management system, thereby achieving precise control over the medical process.

[0040] In some embodiments, obtaining the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time may further include the following steps: S3.1, Read the center coordinates of the first consultation room area from the hospital spatial location database as the location coordinates of the first waiting area, and read the center coordinates of the second consultation room area as the location coordinates of the second waiting area; S3.2, Extract the total number of people currently queuing in the first queue from the queue management database, and determine the first estimated waiting time by multiplying the total number of people currently queuing in the first queue by the preset average consultation time per person; S3.3, Extract the total number of people currently queuing in the second queue from the queue management database, and determine the second estimated waiting time by multiplying the total number of people currently queuing in the second queue by the preset average consultation time per person.

[0041] Specifically, in terms of spatial dimension, the geographical information of the first consultation room corresponding to the first registration record is retrieved by accessing a pre-built hospital spatial location database. This hospital spatial location database is constructed based on the hospital's architectural CAD floor plan and defines a unified two-dimensional Cartesian coordinate system. The origin of the coordinates is typically set at the center point of the hospital's main entrance, and the unit is meters. To simplify calculations and represent the average waiting position of patients, the coordinates of the geometric center point of the waiting area where the consultation room is located are selected as the reference.

[0042] The specific operation for calculating the geometric center of the waiting area is as follows: Read the coordinates of all vertices of the polygonal outline of the waiting area. Assuming the number of vertices is N, and the X-axis coordinate of the i-th vertex is... The Y-axis coordinate is Calculate the arithmetic mean of the X coordinates of all vertices. and the arithmetic mean of the Y coordinates of all vertices. .Will Extract and assign the coordinates of the first waiting area. Using the same logic, read the center coordinates of the second consultation room area corresponding to the second registration record and assign them as the coordinates of the second waiting area.

[0043] Furthermore, in terms of time, it is necessary to assess the congestion level of the queues in both departments in real time. A query request is sent to the queue management database that maintains the queue status in real time to obtain dynamic statistics for the first queue. This database updates the length information of each queue in real time, extracting the total number of patients currently queuing in the first queue. This number is typically counted and maintained by the queue management program during each enqueue or dequeue operation, and stored in a high-speed cache in memory to ensure fast read speeds.

[0044] In this application, after obtaining the total number of people in the queue, the estimated waiting time is calculated based on the department's average service efficiency. The extracted total number of people in the first queue is multiplied by a preset average consultation time per person, yielding the product. This product represents the total estimated waiting time for the last patient in the current queue, under the ideal model assuming a fixed consultation time for each patient. This value is determined as the first estimated waiting time. The preset average consultation time per person used here is a dynamically updated statistical value.

[0045] It should be noted that the preset average consultation time per person is obtained by statistically analyzing the actual consultation times of all patients who completed their consultations in that department within the past three months in the hospital information system. The calculation logic is as follows: count the number of consultation records (Count) completed in that department within the last 90 days, and the total consultation time (Sum_Time) of these records (the time difference between when the doctor calls the number and when the doctor ends the consultation), then the average time is calculated. The preferred setting range is 3 minutes to 15 minutes. In the specific operation of this application, the identifier of the first department corresponding to the first registration record is obtained. If the first department is a consultation-type department such as internal medicine or pediatrics, the average time for that department is obtained by querying the statistics table and is 5 minutes. That is, the preset average consultation time for a single person is set to 5 minutes. If the first department is an operation-type department such as dentistry or otolaryngology, the average time is obtained to be 15 minutes. That is, the preset average consultation time for a single person is set to 15 minutes.

[0046] Furthermore, repeat the above steps to obtain the time parameters for the second department. Extract the total number of people currently queuing in the second queue from the queue management database. Similarly, multiply this total number of people by the preset average consultation time per person to calculate the estimated waiting time for the second department, and determine this as the second estimated waiting time. It is understandable that the average consultation time per person here is queried separately based on the department ID, achieving differentiated configuration for different departments.

[0047] For example, the current number of people in the queue for the internal medicine department (first department) is 20, with a preset average consultation time of 5 minutes per person, resulting in a first estimated waiting time of 100 minutes. The current number of people in the queue for the external medicine department (second department) is 5, with a preset average consultation time of 10 minutes per person, resulting in a second estimated waiting time of 50 minutes. Simultaneously, the center coordinates of the internal medicine waiting area are read as (100, 200), and the center coordinates of the external medicine waiting area are read as (500, 600).

[0048] S4, determine the physical distance data based on the location coordinates of the first waiting area and the location coordinates of the second waiting area, and determine the absolute value of the difference based on the first estimated waiting time and the second estimated waiting time; Understandably, after obtaining spatial coordinates and time parameters, in order to quantify the differences between different treatment plans, it is necessary to convert the coordinate data into intuitive distance values ​​and the time data into comparable time differences. This data conversion process is a crucial step in transforming objective facts into computer-processable judgment indicators, providing a numerical basis for subsequent conflict determination.

[0049] In some embodiments, determining the physical distance data based on the location coordinates of the first waiting area and the second waiting area, and determining the absolute value of the difference based on the first estimated waiting time and the second estimated waiting time, may further include the following steps: S4.1 Input the location coordinates of the first waiting area and the location coordinates of the second waiting area into a preset spatial distance mapping table to obtain the physical distance data; S4.2 Subtract the second estimated waiting time from the first estimated waiting time to obtain a first time difference value, and take the absolute value of the first time difference value as the absolute value of the difference value; S4.3 Obtain a preset distance threshold corresponding to the physical distance data, and obtain a preset time threshold corresponding to the absolute value of the difference value; S4.4 Determine whether the physical distance data is greater than the preset distance threshold, and determine whether the absolute value of the difference value is less than the preset time threshold.

[0050] Specifically, when calculating physical distances, it is not limited to simple straight-line Euclidean distances, but adopts a calculation logic that better reflects the actual walking environment inside the hospital. The coordinates of the first waiting area are... Location coordinates of the second waiting area These are combined into a query key-value pair. This key-value pair is then retrieved from a pre-constructed spatial distance mapping table. The pre-constructed spatial distance mapping table is a hash table or two-dimensional array that is pre-calculated and stored based on the hospital's building floor plan.

[0051] The construction process of the preset spatial distance mapping table is as follows: During the system initialization phase, using the hospital building floor plan, each department area is abstracted as a node, and corridors, stairs, and elevators are abstracted as edges. By traversing all node pairs, the breadth-first search logic is called to calculate the shortest path length between nodes. This length is used as the value, with the area ID pair as the key, and stored in the mapping table. For example, the key is "Internal Medicine_Surgery", and the value is "300" (meters). The query result represents the actual distance a patient needs to travel from one waiting area to another, and is defined as physical distance data. If no data is found in the table, it means that the two areas are inaccessible, and the distance value is set to infinity.

[0052] Furthermore, when calculating the time difference, to assess the similarity between the calling times of the two departments, the two estimated waiting times obtained in the previous step are subtracted. The first estimated waiting time is used... Subtract the second estimated waiting time The first duration difference was obtained. Considering that the difference could be positive or negative, and only indicates the order of events, to quantify the magnitude of the time interval, an absolute value operation is performed on the first time interval difference, i.e. If the difference is negative, it is inverted; if the difference is positive, it remains unchanged. The resulting non-negative value is the absolute value of the difference.

[0053] In this application, after obtaining the two core judgment parameters—physical distance data and the absolute value of the difference—it is necessary to retrieve the corresponding judgment criteria. A preset distance threshold matching the current scenario is read from the system configuration parameter library. This threshold is used to determine whether two areas are too far apart, making travel difficult. Simultaneously, a preset time threshold is read to determine whether the calling times of two departments are too close. These thresholds can be adjusted according to different building layouts or peak patient periods within the hospital.

[0054] It should be noted that the preset distance threshold is obtained by conducting path simulation tests based on the hospital building floor plan and the walking speed of a normal adult. Its preferred setting range is 100 meters to 500 meters. In the specific operation of this application, the floor distribution of the hospital building is obtained. If the first and second departments are located on the same floor, considering ease of movement, the preset distance threshold is set to 200 meters; if the first and second departments are located on different floors and there is no direct elevator, considering the time required for moving between floors, the preset distance threshold is set to 400 meters.

[0055] In this application, the preset time threshold is obtained based on statistics of the average time spent by patients moving between different departments, and its preferred setting range is 5 minutes to 30 minutes. In the specific operation of this application, the hospital's congestion level is obtained. If the current time period is a peak period for medical visits (such as Monday morning), considering elevator congestion, the preset time threshold is set to 20 minutes; if the current time period is an off-peak period, the preset time threshold is set to 10 minutes.

[0056] Furthermore, numerical comparison logic is executed to determine if there are any potential conflict risks. The calculated physical distance data is then compared... and preset distance threshold Compare and judge Whether the condition is met determines whether the two departments are spatially far apart. Simultaneously, the absolute value of the difference is... With preset time threshold Compare and judge Whether this is true or false, that is, whether the estimated waiting times of the two departments are very close, will be used as direct inputs for subsequent decision-making.

[0057] For example, if the physical distance data is calculated to be 300 meters and the preset distance threshold is 200 meters, the distance is determined to be greater than the threshold (300>200), thus satisfying the distance conflict condition; if the absolute value of the difference is calculated to be 10 minutes and the preset time threshold is 30 minutes, the time difference is determined to be less than the threshold (10<30), thus satisfying the time conflict condition.

[0058] S5, in response to the absolute value of the difference satisfying the preset time conflict condition and the physical distance data satisfying the preset distance conflict condition, determine that the multi-department waiting conflict boundary is satisfied; It should be noted that when two departments have a high degree of overlap in time and are far apart in space, patients will face the dilemma of not being able to attend to both departments simultaneously. This step aims to identify such critical states that lead to physical movement conflicts through logical judgment, thereby triggering appropriate queue management strategies to optimize the patient's medical experience and reduce the risk of missed diagnoses.

[0059] In some embodiments, the step of determining the multi-department waiting conflict boundary in response to the absolute value of the difference satisfying a preset time conflict condition and the physical distance data satisfying a preset distance conflict condition may further include the following steps: S5.1 Obtain a preset time threshold corresponding to the absolute value of the difference, and obtain a preset distance threshold corresponding to the physical distance data; S5.2 Compare the absolute value of the difference with the preset time threshold to obtain a time comparison result, and compare the physical distance data with the preset distance threshold to obtain a distance comparison result; S5.3 In response to the time comparison result being that the absolute value of the difference is less than the preset time threshold and the distance comparison result being that the physical distance data is greater than the preset distance threshold, generate a conflict flag bit; S5.4 Write the conflict flag bit into the determination result register of the multi-department waiting conflict boundary to determine that the multi-department waiting conflict boundary is satisfied.

[0060] Specifically, to perform accurate conflict determination, the determination criteria first need to be loaded from the rule base. The preset time threshold for determining time overlap, determined in step S4, and the preset distance threshold for determining spatial separation are obtained. These thresholds constitute the baseline for determining the boundary of multi-department waiting room conflicts. This baseline is the watershed that determines whether parallel queuing or serial queuing is subsequently implemented.

[0061] Further, a conditional comparison operation is performed. The absolute value of the calculated difference is compared with a preset time threshold, generating a Boolean time comparison result. If the absolute value of the difference is less than the preset time threshold, it indicates that the call interval between the two departments is very short, meeting the time conflict condition, and the comparison result is True; otherwise, it is False. Simultaneously, the physical distance data is compared with a preset distance threshold, generating a Boolean distance comparison result. If the physical distance data is greater than the preset distance threshold, it indicates that the two departments are far apart, meeting the distance conflict condition, and the comparison result is True; otherwise, it is False.

[0062] In this application, a logical AND operation is performed on the time comparison results and the distance comparison results. The operation logic is as follows: Only when both the time comparison result and the distance comparison result are true, Only then is it true. This means that the patient faces both time pressure and spatial distance barriers, inevitably posing a risk of not being able to reach both departments on time. In response to both conditions being met simultaneously, a specific binary conflict flag is generated. For example, it can be set to 0 for no conflict and 1 for a conflict. When the determination result is true, a flag code of value 1 is generated to indicate that a conflict has occurred.

[0063] Furthermore, the generated conflict flag is written into a predefined decision result register. This decision result register is a specific memory location, typically a 32-bit integer or a Boolean variable, used to temporarily store the conflict status determination value of the current patient check-in process. When a value of 1 is written into the register, it is officially confirmed that the current patient's registration status meets the multi-department waiting conflict boundary. Subsequent processes, when reading this register, if they find a value of 1, will execute a time-sharing queuing or delayed activation strategy based on this status, rather than blindly queuing simultaneously.

[0064] For example, when the time comparison result shows that the absolute value of the difference is less than the preset time threshold of 15 minutes (result is true), and the distance comparison result shows that the physical distance is greater than the preset distance threshold of 250 meters (result is true), a logical AND operation is performed, and the result is true. A conflict flag bit 1 is generated and written to the register to confirm the existence of a conflict.

[0065] like Figure 3 As shown, after obtaining the physical distance data and the absolute value of the difference, they are compared with the corresponding preset thresholds. When the physical distance data is greater than the preset distance threshold, it indicates that the two waiting areas are far apart. Based on this, it is further determined whether the absolute value of the difference is less than a preset time threshold. If both conditions are met simultaneously, a conflict flag is generated and written to the judgment result register, thus confirming that there is a dual conflict in both space and time in the current registration situation. This judgment mechanism effectively identifies the physical feasibility and time urgency of patients moving between different departments, providing accurate status basis for subsequent time-sharing queuing management and avoiding missed visits caused by blindly checking in in parallel.

[0066] S6, Generate a single-department check-in success instruction based on the first registration record, and mark the second registration record as pending activation; In this application, once a conflict is identified between waiting in multiple departments, in order to prevent patients from missing their number or running around in circles, the strategy of queuing for two departments at the same time will no longer be implemented. Instead, the first registration record will be processed first to ensure that the patient completes the consultation in one department. At the same time, the second registration record will be suspended until the consultation in the first department is completed before it will be activated, thereby realizing intelligent time-sharing management.

[0067] In some embodiments, the step of generating a single-department check-in success instruction based on the first registration record and marking the second registration record as pending activation may further include the following steps: S6.1 Extract the first department identifier from the first registration record, and combine the first department identifier with the current timestamp to generate the single-department check-in success instruction; S6.2 Send the single-department check-in success instruction to the first queue management terminal, so that the first queue management terminal assigns a first queue number; S6.3 Modify the consultation status field of the second registration record to an activation status field, and generate a second registration record carrying the activation status field; S6.4 Store the second registration record carrying the activation status field in the delayed queue storage area, without performing the write operation to add it to the second queue.

[0068] Specifically, the normal check-in process is executed for the first registration record. The first department identifier, pointing to the specific treatment department, is extracted from the record's data structure; for example, internal medicine code "D01" or surgery code "D02". The current system timestamp, accurate to the second, is obtained. This timestamp is concatenated with the first department identifier, and the operation type code "SIGNIN" is appended to generate a single-department check-in success instruction containing the patient's identity, time, and department information. This instruction is typically in JSON format, for example, {"dept_id":"D01","time":"1678888888","action":"SIGNIN"}. This instruction serves as the patient's credential for entering the queuing sequence.

[0069] Furthermore, via a network communication link, the successful check-in instruction for the single department is sent to the queue management terminal responsible for managing the queues in the first department using the TCP / IP protocol. Upon receiving the instruction, the queue management terminal parses the patient's identity information and creates a new queue node in its maintained queue list. Based on the node's position in the list, a unique first queue number is calculated and assigned. The assignment logic is typically to add one to the current maximum queue number; for example, if the current maximum number is A05, then A06 is assigned. This number represents the patient's current queue order in the first department.

[0070] In this application, a special suspension process is performed on the second registration record. The status field representing the patient's visit status is located in the data structure of the second registration record, and its original value (e.g., 0) for "not seen" or "pending check-in" status is modified to an "inactive status" field (e.g., 4). The "inactive status" field is a special enumeration value used to mark that although the record is valid, it is temporarily not allowed to enter the call-number loop. The modification operation is achieved by executing a database update statement, locking the record's ID and updating the Status field. After modification, a second registration record carrying the "inactive status" field is generated.

[0071] Furthermore, the processed second registration record is not written to the normal second queuing queue, but instead transferred to a specially established delayed queue storage area. This delayed queue storage area is logically isolated from the real-time calling queue and is an independent data table or memory buffer. Records stored here are not accessed by the calling system's retrieval logic and therefore are not called. This storage area is associated with the patient through the field "Source_Patient_ID". In this way, the patient's registration information is preserved while preventing them from entering the queuing sequence prematurely, thus achieving intelligent time-sharing management in conflict scenarios.

[0072] In some preferred embodiments, marking the second registration record as pending activation may further include the following steps: S6.31, Add a delayed status identifier to the second registration record, and store the second registration record with the added delayed status identifier in the delayed queue storage area; S6.32, Receive a consultation end signal sent by the doctor's workstation, and in response to the target department identifier in the consultation end signal being the first department, generate a status switching instruction; S6.33, Retrieve the second registration record in the delayed queue storage area according to the status switching instruction, and clear the delayed status identifier of the second registration record; S6.34, Write the second registration record with the delayed status identifier cleared into the second queuing queue to obtain the second queuing number; S6.35, Generate a single-department guidance voice according to the location coordinates of the second waiting area and the second queuing number, and associate the status switching instruction and the single-department guidance voice into the consultation log record table.

[0073] Specifically, to achieve precise control over the second registration record, it is first marked with a special tag at the data level. A delayed status identifier is added to the attribute field of the second registration record. This identifier can be a specific label such as "FLAG_DELAYED" or a status code. Subsequently, the complete registration record carrying this delayed status identifier is temporarily stored in the delayed queue storage area, establishing an index relationship between the medical card number and the record for quick retrieval later.

[0074] Furthermore, a monitoring mode is activated to capture the timing of the completion of the first department's consultation. Real-time monitoring of the signal flow from the doctor's workstation on the hospital's internal network is performed. When a doctor completes the diagnosis and treatment of the current patient and clicks the "End Consultation" button on the workstation, the workstation sends a network data packet containing patient information to the server—this is the consultation completion signal. This signal is typically sent via an HTTP POST request, with the data body containing JSON-formatted information. Upon receiving this signal, the parameters carried in the signal are parsed, extracting the target department identifier (e.g., "DeptID") and the patient card number (e.g., "CardID"). The target department identifier is then compared with the first department identifier in the first registration record.

[0075] In this application, if the two match, it indicates that the patient has completed their visit to the first department and is ready to proceed to the second department. At this point, the system immediately responds to this event, generating a switching instruction to change the queuing status. This status switching instruction includes control information such as the operation type (e.g., "ACTIVATE"), the target patient card number, and the target record ID, aiming to activate the previously suspended second registration record. If the two do not match, the signal is ignored, and the system continues to wait.

[0076] Furthermore, the actual state switching operation is executed. Based on the patient's identity information carried in the state switching instruction, a search is performed in the delayed queue storage area. The search process is implemented using an SQL query: SELECT * FROM DelayedQueue WHERE CardID=[Patient Card Number]. After locating the corresponding second registration record, a write operation is performed on that record, deleting or modifying the delayed status identifier to a normal status, thereby clearing the delayed restriction. At this point, the record has met all the pre-visit conditions.

[0077] Subsequently, the second registration record, with its delayed status flag cleared, is immediately written into the normal queue of the second department. An insertion operation is performed: `INSERT INTO NormalQueue(...)VALUES(...)`. The queue management system assigns a new second queue number based on the writing time and the current queue length. This means the patient has officially joined the second department's queue.

[0078] Finally, to guide the patient to the next location, a voice announcement is generated based on the previously obtained coordinates of the second waiting area and the newly assigned second queue number. This announcement informs the patient of their current queue number and the area to proceed to. Simultaneously, the switching commands for the entire status transition process, along with the generated departmental guidance voice, are recorded and written into the patient visit log for future reference and data analysis.

[0079] In this embodiment of the application, the specific operation of retrieving the second registration record in the delayed queue storage area according to the state switching instruction in step S6.33 can be as follows: A1. Parse the data packet of the status switching instruction, extract the medical card number and trigger timestamp as key search fields, and proceed to step A2; A2, establish a database cursor for the delayed queue storage area, locate the starting position of the storage area, and proceed to step A3; A3, Read the record currently pointed to by the cursor, extract the medical card number field from the record and compare it with the medical card number in the key search field, then proceed to step A4; A4. Determine if the two medical card numbers match. If they do, the target record has been located, proceed to step A5; otherwise, it is not the target record, proceed to step A6. A5. Read the status field of the record and determine whether there is a delayed status indicator. If yes, proceed to step A7; if no, it means that the record has been manually activated and proceed to step A8. A6. Move the cursor to the next record and determine if the end of the storage area has been reached. If yes, proceed to step A8; otherwise, return to step A3. A7. Clear the delayed status indicator, change the status field to "waiting in line", return the successful search result, and proceed to step A9; A8 returns a search failure or no operation results, proceeding to step A9; A9, close the cursor and end the search process.

[0080] For example, after a patient completes their internal medicine consultation, the doctor's workstation sends a signal. The system recognizes the matching internal medicine identifier and generates a switching instruction. The system finds the patient's surgical appointment in the delayed queue, clears the delayed identifier, adds the patient to the surgical queue, and assigns them appointment number A05. A voice announcement is generated instructing the patient to proceed to the surgical waiting area for appointment number A05, and this is logged.

[0081] In some embodiments, for situations where there is no risk of conflict—that is, when the patient has ample time to move between the two departments or the two departments are very close—the system will execute a different set of processing logic. This includes re-acquiring the decision criteria and performing the reverse conditional checks to confirm whether it is safe to perform parallel queuing for both departments.

[0082] like Figure 4As shown in the flowchart, this process describes the status switching and automatic activation mechanism for delayed registration records. During continuous monitoring of network signals, once a consultation completion signal is received, the target department identifier carried in the signal is immediately verified. If the identifier matches the first department, a status switching command is triggered, and a search is initiated in the delayed queue storage area. After locating the target record, it is verified whether it carries a delayed status identifier; if the verification is correct, the identifier is cleared, and the record is officially written to the second queue to obtain a new queue number. Along with the update of the queue status, a single-department guidance voice is generated synchronously and recorded in the log. This process achieves seamless connection between consultation statuses between departments, eliminating the burden of repeated check-ins for patients.

[0083] In some embodiments, the method further includes: S7, obtain the preset time threshold corresponding to the absolute value of the difference, and obtain the preset distance threshold corresponding to the physical distance data; S8, in response to the absolute value of the difference being greater than or equal to the preset time threshold or the physical distance data being less than or equal to the preset distance threshold, determine that the multi-department waiting conflict boundary is not met.

[0084] Specifically, the baseline values ​​used to evaluate the time interval and spatial distance are retrieved again from the system configuration. A preset time threshold corresponding to the absolute value of the currently calculated difference is obtained, as well as a preset distance threshold corresponding to the physical distance data. These thresholds are consistent with the baselines used in the preceding steps to ensure the consistency of the judgment logic.

[0085] Further, the logic for determining non-conflict conditions is executed. The absolute value of the difference is compared with a preset time threshold to check if the absolute value of the difference is greater than or equal to the preset time threshold. Meeting this condition means that the call interval between the two departments is long enough, allowing the patient sufficient time to complete their visit in one department and move to the other. Alternatively, the physical distance data is compared with a preset distance threshold to check if the physical distance data is less than or equal to the preset distance threshold. Meeting this condition means that the two departments are very close, such as adjacent rooms, and the movement time is extremely short and almost negligible.

[0086] In this application, as long as either of the above two conditions is met, i.e., the logical OR relationship is satisfied, it can be determined that the patient can receive treatment in both departments simultaneously without any risk of time constraints or spatial limitations. The logical expression is: In response to this determination, if the current patient's registration status does not meet the multi-department waiting conflict boundary, the system will allow the patient to check in and queue for two departments simultaneously to maximize the efficiency of medical treatment.

[0087] For example, if the estimated wait time for internal medicine is 120 minutes and for surgery is 50 minutes, the difference is 70 minutes. If the preset time threshold is 30 minutes, then 70 is greater than or equal to 30, which is considered not to meet the conflict boundary, and simultaneous queuing is allowed.

[0088] In some embodiments, after determining that there is no waiting conflict, the system will trigger a combined check-in process, which aims to complete the queuing procedures for all departments of a patient's registration in one go, reduce the patient's operation steps and waiting anxiety, and achieve efficient multi-department parallel service.

[0089] In some embodiments, the method further includes: S9, Generate a combined check-in instruction based on the first registration record and the second registration record, the combined check-in instruction including a first check-in success instruction and a second check-in success instruction; S10, Write the first registration record into the first queuing queue and the second registration record into the second queuing queue, and obtain the first queuing number assigned by the first queuing queue and the second queuing number assigned by the second queuing queue.

[0090] Specifically, a combined data packet containing multiple sub-instructions is constructed. Based on the information from the first registration record, a first check-in success instruction for the first department is generated. This instruction includes key information such as patient identity, the first department identifier, and the request time. Simultaneously, based on the information from the second registration record, a second check-in success instruction for the second department is generated. These two instructions are encapsulated in the same data structure to form a combined check-in instruction. For example, a JSON array [{..."dept_id":"D01"...},{..."dept_id":"D02"...}] can be constructed. This combined instruction is transmitted and processed as an atomic transaction, ensuring data consistency.

[0091] Next, execute the write queue operation. Parse the combined check-in instruction, extract the first registration record, and send it over the network to the queue management terminal of the first department. The queue management terminal of the first department executes an insert SQL statement to write the record into the first queue. Immediately afterwards, extract the second registration record and send it to the queue management terminal of the second department to write it into the second queue. These two write operations can be executed in parallel using multithreading to improve response speed, or they can be executed sequentially to ensure transaction integrity. Regardless of the method used, it must be ensured that both records are successfully written to their respective database tables and enter their respective call-up cycles.

[0092] In this application, after the write operation is completed, feedback information is obtained from two queue management terminals. The sequence number assigned to the patient by the first queue based on the current queue length is extracted, i.e., the first queue number. Simultaneously, the sequence number assigned by the second queue is extracted, i.e., the second queue number. These two sequence numbers represent the patient's real-time queue position in the two departments and are key parameters for subsequent voice guidance.

[0093] Figure 5 This paper explains the judgment and parallel check-in logic when there is no risk of waiting room conflicts. By retrieving preset time thresholds and preset distance thresholds, a reverse condition check is performed on the absolute value of the difference and physical distance data calculated earlier. When the absolute value of the difference is greater than or equal to the preset time threshold, or the physical distance data is less than or equal to the preset distance threshold, it is determined that the patient has sufficient time or space to attend multiple departments simultaneously. Under this judgment, a combined check-in instruction containing multiple sub-instructions is directly generated, and each registration record is written into the corresponding queue. This processing path maximizes the efficiency of parallel services for multiple departments, ensuring a smooth and efficient patient flow.

[0094] S11, generate walking path guidance based on the location coordinates of the first waiting area and the location coordinates of the second waiting area, and combine the walking path guidance with the first queue number and the second queue number to generate zone guidance voice; In this embodiment, in order to provide the optimal medical route when a patient can register for multiple departments at the same time without conflict, the system will calculate the path based on geographical coordinates and combine the location information with the queue number to generate clear voice guidance to help patients seek medical treatment efficiently.

[0095] In some embodiments, the step of generating walking path guidance based on the location coordinates of the first waiting area and the location coordinates of the second waiting area, and combining the walking path guidance with the first queue number and the second queue number to generate zoned guidance voice, may further include the following steps: S11.1 Generate a first area identifier based on the location coordinates of the first waiting area, and generate a second area identifier based on the location coordinates of the second waiting area; S11.2 Generate the shortest walkable path from the first area identifier to the second area identifier based on the hospital corridor topology network as the walking path guide; S11.3 Obtain the first queue number and the second queue number, and concatenate the first queue number, the first area identifier, the second queue number, the second area identifier, and the walking path guide into a string; S11.4 Input the concatenated string into a preset voice conversion correspondence table, and query the corresponding audio data as the partition guidance voice.

[0096] Specifically, abstract coordinate values ​​are transformed into area names that are easy for patients to understand. By looking up the hospital map data in reverse using the coordinates, the location coordinates of the first waiting area are mapped to the corresponding functional area name, such as "First Floor Internal Medicine Waiting Area," and this is generated as the first area identifier. Using the same logic, the location coordinates of the second waiting area are mapped to the second area identifier, such as "Third Floor Surgical Waiting Area."

[0097] Furthermore, path planning is performed using a pre-constructed hospital corridor topology network. This network is a graph data structure stored using an adjacency list. Nodes represent departments or areas, and edges represent connecting passageways (such as corridors or staircases). Each edge stores a weight value representing the travel distance or time. Starting from a first area identifier and ending at a second area identifier, a connected path is searched within the network graph.

[0098] The specific logic for searching the shortest traversable path is as follows: Create a set of visited nodes and a distance record table. Initially, the distance to the starting point is 0, and the distances to all other nodes are infinity. Starting from the starting point, check all its neighboring nodes and calculate the distance from the starting point to each neighbor (starting point distance + edge weight). If this distance is less than the currently recorded distance of the neighbor, update the neighbor's distance and record the neighbor's predecessor node as the starting point. Then, select the node with the smallest distance from the unvisited nodes as the new current node, repeating the above process until the destination node is selected as the current node. Finally, starting from the destination, backtrack to the starting point using the predecessor node pointer; the sequence of nodes traversed is the shortest traversable path. Organize the key nodes along the path, such as "take elevator number 2 on the east side" and "go north via the third-floor corridor," into a structured text description to serve as a guide for the traversal path.

[0099] It should be noted that the hospital corridor topology network is constructed based on the digital processing of hospital architectural drawings. Each room and corridor intersection is abstracted as a node, and the connectivity is abstracted as an edge. The edge weight is calculated as follows: if two nodes are on the same floor, the weight is the straight-line distance between the two points; if two nodes are on different floors, the weight is the floor height plus the walking distance to the elevator / stairs. In the specific operation of this application, if the elevator is operating normally, the weight of the elevator edge is set to 10 (representing a short time); if the elevator is under maintenance, the weight of the elevator edge is set to 99999 (representing a maximum value), forcing the path to choose the stairs.

[0100] In this application, the first queue number and the second queue number obtained in step S10 are acquired. To generate a complete voice broadcast, all the above information needs to be organized into text. Following a preset grammatical order, the first queue number, the first area identifier, the second queue number, the second area identifier, and the walking path guidance generated in step S11.2 are concatenated into a complete text sentence. For example, the concatenation might be: "Your queue number in internal medicine is A01. Please go to the internal medicine waiting area first, then take the elevator along the east corridor to the third-floor surgical waiting area. Your surgical queue number is B05."

[0101] Furthermore, the concatenated text string is input into a preset speech-to-speech mapping table. This table stores the mapping relationship between commonly used text words and audio segments, and can also connect to a real-time text-to-speech engine. Through querying or real-time synthesis, the text string is converted into human-readable speech waveform data. This audio data is then selected as the final zone guidance speech and played to the patient through the terminal device's speaker.

[0102] For example, if the input string is "Please go to Internal Medicine A01 first, then walk through the east corridor to Surgery B05", the system will convert it into an audio file of "Please go to Internal Medicine A01 first, then walk through the east corridor to Surgery B05" and play it.

[0103] Example 2: This example also provides an intelligent triage check-in and queuing management system based on voice interaction, including: a voice acquisition module, used to acquire voice check-in instructions and extract the medical card number; The record retrieval module is used to retrieve unregistered medical records based on the medical card number, and obtain a set of registration records including the first registration record and the second registration record; The data acquisition module is used to acquire the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time. The calculation and judgment module is used to determine the physical distance data and the absolute value of the difference, and in response to the satisfaction of preset time conflict conditions and preset distance conflict conditions, determine the boundary of multi-department waiting conflict. The instruction execution module is used to generate a single-department check-in success instruction based on the first registration record and mark the second registration record as pending activation.

[0104] The above-mentioned unit modules can be embedded in the processor of the electronic device in hardware form or independent of it, or they can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of the above modules.

[0105] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0106] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for intelligent triage, check-in, and queuing management based on voice interaction, characterized in that: include: Obtain the voice check-in command and extract the medical card number from the voice check-in command; Based on the medical card number, the associated unregistered medical records are retrieved from the registration database to obtain a set of registration records, which includes a first registration record and a second registration record. Obtain the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time; The physical distance data is determined based on the location coordinates of the first waiting area and the second waiting area, and the absolute value of the difference is determined based on the first estimated waiting time and the second estimated waiting time. In response to the absolute value of the difference satisfying a preset time conflict condition and the physical distance data satisfying a preset distance conflict condition, a multi-department waiting conflict boundary is determined. A single-department check-in success instruction is generated based on the first registration record, and the second registration record is marked as pending activation.

2. The intelligent triage, check-in, and queuing management method based on voice interaction according to claim 1, characterized in that: The step involves retrieving associated unregistered medical records from the registration database based on the patient's card number to obtain a set of registration records. This set of registration records includes a first registration record and a second registration record, comprising: Extract all historical registration records corresponding to the medical card number from the registration database; Extract the records in the entire historical registration record where the medical treatment status field is "not treated" as candidate registration records; Obtain the registration timestamp of the candidate registration record, and determine the candidate registration record with the earliest registration timestamp that is within the current check-in time window as the first registration record; The candidate registration records that meet the current consultation time window, other than the first registration record, are determined as the second registration record; The first registration record and the second registration record are combined and written into the registration record set.

3. The intelligent triage, check-in, and queuing management method based on voice interaction according to claim 1, characterized in that: The process of obtaining the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time includes: The center coordinates of the first consultation room area are read from the hospital's spatial location database as the location coordinates of the first waiting area, and the center coordinates of the second consultation room area are read as the location coordinates of the second waiting area. Extract the total number of people currently queuing in the first queue from the queue management database, and determine the first estimated waiting time by multiplying the total number of people currently queuing in the first queue by the preset average consultation time per person. Extract the total number of people currently queuing in the second queue from the queue management database, and determine the second estimated waiting time by multiplying the total number of people currently queuing in the second queue by the preset average consultation time per person.

4. The intelligent triage, check-in, and queuing management method based on voice interaction according to claim 1, characterized in that: The step of determining physical distance data based on the location coordinates of the first waiting area and the second waiting area, and determining the absolute value of the difference based on the first estimated waiting time and the second estimated waiting time, includes: Input the location coordinates of the first waiting area and the location coordinates of the second waiting area into a preset spatial distance mapping table to obtain the physical distance data; Subtracting the second estimated waiting time from the first estimated waiting time yields a first time difference, and the absolute value of the first time difference is taken as the absolute value of the difference. Obtain a preset distance threshold corresponding to the physical distance data, and obtain a preset time threshold corresponding to the absolute value of the difference; Determine whether the physical distance data is greater than the preset distance threshold, and determine whether the absolute value of the difference is less than the preset time threshold.

5. The intelligent triage, check-in, and queuing management method based on voice interaction according to claim 1, characterized in that: The step of determining the boundary for multi-department waiting conflict in response to the absolute value of the difference satisfying a preset time conflict condition and the physical distance data satisfying a preset distance conflict condition includes: Obtain a preset time threshold corresponding to the absolute value of the difference, and obtain a preset distance threshold corresponding to the physical distance data; The absolute value of the difference is compared with the preset time threshold to obtain a time comparison result, and the physical distance data is compared with the preset distance threshold to obtain a distance comparison result. In response to the time comparison result being less than the preset time threshold and the distance comparison result being greater than the preset distance threshold, a conflict flag is generated; Write the conflict flag bit into the determination result register of the multi-department waiting conflict boundary to determine that the multi-department waiting conflict boundary is satisfied.

6. The intelligent triage, check-in, and queuing management method based on voice interaction according to claim 1, characterized in that: The step of generating a single-department check-in success instruction based on the first registration record and marking the second registration record as pending activation includes: Extract the first department identifier from the first registration record, and combine the first department identifier with the current timestamp to generate the single department check-in success instruction; The single-department check-in success instruction is sent to the first queue management terminal, so that the first queue management terminal assigns the first queue number; Modify the visit status field of the second registration record to the pending activation status field, and generate a second registration record carrying the pending activation status field; The second registration record carrying the activation status field is stored in the delayed queue storage area, and no write operation is performed to add it to the second queue.

7. The intelligent triage, check-in, and queuing management method based on voice interaction according to claim 1, characterized in that, Also includes: Obtain a preset time threshold corresponding to the absolute value of the difference, and obtain a preset distance threshold corresponding to the physical distance data; In response to the absolute value of the difference being greater than or equal to the preset time threshold or the physical distance data being less than or equal to the preset distance threshold, it is determined that the multi-department waiting conflict boundary is not met. A combined check-in instruction is generated based on the first registration record and the second registration record. The combined check-in instruction includes a first check-in success instruction and a second check-in success instruction. Write the first registration record into the first queue and the second registration record into the second queue, and obtain the first queue number assigned by the first queue and the second queue number assigned by the second queue. A walking path guide is generated based on the location coordinates of the first waiting area and the second waiting area. The walking path guide is then combined with the first queue number and the second queue number to generate a zoned guidance voice.

8. The intelligent triage, check-in, and queuing management method based on voice interaction according to claim 7, characterized in that: The step of generating walking path guidance based on the location coordinates of the first waiting area and the second waiting area, and combining the walking path guidance with the first queue number and the second queue number to generate zoned guidance voice, includes: A first area identifier is generated based on the location coordinates of the first waiting area, and a second area identifier is generated based on the location coordinates of the second waiting area. Based on the hospital access network topology, the shortest walkable path from the first area identifier to the second area identifier is generated as the walking path guide; Obtain the first queue number and the second queue number, and concatenate the first queue number, the first area identifier, the second queue number, the second area identifier, and the walking path guide into a string; The concatenated string is input into a preset speech conversion correspondence table, and the corresponding audio data is retrieved as the partition guidance speech.

9. The intelligent triage, check-in, and queuing management method based on voice interaction according to claim 6, characterized in that: Marking the second registration record as pending activation includes: Add a delayed status flag to the second registration record, and store the second registration record with the added delayed status flag in the delayed queue storage area; Receive a consultation end signal sent by the doctor's workstation, and generate a state switching command in response to the target department identifier in the consultation end signal being the first department; According to the state switching instruction, the second registration record is retrieved from the delayed queue storage area, and the delayed state identifier of the second registration record is cleared; Write the second registration record with the delayed status flag cleared into the second queue to obtain the second queue number; Based on the location coordinates of the second waiting area and the second queue number, a single-department guidance voice is generated, and the status switching command and the single-department guidance voice are associated and written into the patient visit log record table.

10. A smart triage, check-in, and queuing management system based on voice interaction, characterized in that: include: The voice acquisition module is used to acquire voice check-in instructions and extract the medical card number; The record retrieval module is used to retrieve unregistered medical records based on the medical card number, and obtain a set of registration records including the first registration record and the second registration record; The data acquisition module is used to acquire the location coordinates of the first waiting area, the location coordinates of the second waiting area, the first estimated waiting time, and the second estimated waiting time. The calculation and judgment module is used to determine the physical distance data and the absolute value of the difference, and in response to the satisfaction of preset time conflict conditions and preset distance conflict conditions, determine the boundary of multi-department waiting conflict. The instruction execution module is used to generate a single-department check-in success instruction based on the first registration record and mark the second registration record as pending activation.