A method for dynamically generating outpatient treatment pathways based on real-time data fusion
By generating personalized task networks and dynamic spatiotemporal cost fields based on real-time data fusion, the problem of multi-task sequence planning in outpatient diagnosis and treatment is solved, dynamic optimal diagnosis and treatment path planning is achieved, and diagnosis and treatment efficiency and patient experience are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG DONGFANG DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies cannot provide outpatients with optimal multi-task execution sequences across multiple departments and resources, resulting in a technological gap between 'decision completion' and 'task completion,' leading to low diagnostic and treatment efficiency.
Based on real-time data fusion, a personalized task network is generated and a dynamic spatiotemporal cost field is constructed. Through global collaborative optimization calculation, a dynamically optimal treatment path sequence is generated, including the spatial location order and time arrangement of tasks.
Shorten patients' consultation time, balance the burden on hospital resources, and improve patients' medical experience and treatment efficiency.
Smart Images

Figure CN122314293A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method for dynamically generating outpatient treatment pathways based on real-time data fusion. Background Technology
[0002] Outpatient treatment efficiency is a key factor in improving the patient experience. Currently, related technologies, such as intelligent triage systems, primarily focus on solving the problems of initial department matching and static navigation based on patient symptoms. Another type of technology focuses on rapid triage and severity assessment in emergency situations.
[0003] However, once patients complete their initial consultation and receive electronic medical orders that include multiple objectives such as testing, examination, and medication dispensing, a deeper efficiency bottleneck emerges: the relevant technologies cannot provide patients with an optimal multi-task execution sequence across multiple departments and resources.
[0004] Therefore, how to provide outpatients with a full-process, dynamic, and overall optimal task execution path planning method after the medical order is determined, in order to fill the technical gap between "decision completion" and "task completion", has become an urgent technical problem to be solved. Summary of the Invention
[0005] This application provides a method for dynamically generating outpatient treatment pathways based on real-time data fusion, which can shorten patients' consultation time, balance hospital resource load, and improve patients' medical experience. The technical solution is as follows: On the one hand, a method for dynamically generating outpatient treatment pathways based on real-time data fusion is provided, the method comprising: In response to the path generation request of the target patient, a personalized task network is generated based on the target patient's outpatient structured electronic medical orders, real-time location, and real-time status data of the hospital's medical resources. The personalized task network includes multiple medical task nodes and temporal and logical constraints between the medical task nodes. Based on the spatial topology information of the hospital's medical resources, real-time queuing status data, and historical operation patterns, a dynamic spatiotemporal cost field is constructed. The dynamic spatiotemporal cost field associates a dynamic comprehensive cost with each medical task node at different time points. The dynamic comprehensive cost is composed of the passage cost calculated based on the spatial topology information and the estimated waiting cost determined based on the real-time and historical data. Using the temporal and logical constraints in the personalized task network as execution conditions and the dynamic comprehensive cost of the dynamic spatiotemporal cost field mapping as the optimization index, global collaborative optimization calculation is performed to obtain the global optimization planning result. Based on the results of the global collaborative optimization calculation, a path sequence for outpatient treatment of the target patient is generated and output. The path sequence is used to indicate the spatial order of performing various treatment tasks and the suggested start time of each task. Attached Figure Description
[0006] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0007] Figure 1 This is a flowchart of a method for dynamically generating outpatient treatment pathways based on real-time data fusion, provided in an embodiment of this application. Figure 2 This is a flowchart of another method for dynamically generating outpatient treatment pathways based on real-time data fusion, provided in an embodiment of this application. Figure 3 This is a flowchart of another method for dynamically generating outpatient treatment pathways based on real-time data fusion, provided in an embodiment of this application. Figure 4 This is a flowchart of another method for dynamically generating outpatient treatment pathways based on real-time data fusion provided in the embodiments of this application; Figure 5 This is a flowchart of another method for dynamically generating outpatient treatment pathways based on real-time data fusion provided in the embodiments of this application; Figure 6 This is a schematic diagram of an interface provided in an embodiment of this application. Detailed Implementation
[0008] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0009] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor are there any restrictions on quantity or execution order.
[0010] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0011] Traditional outpatient efficiency improvement technologies, such as intelligent triage systems, primarily focus on solving the problems of initial department matching and static navigation based on patient symptoms, or on rapid triage and severity assessment in emergency scenarios. However, once patients complete their initial consultation and receive electronic medical orders that include multiple objectives such as testing, examinations, and medication dispensing, these technologies cannot provide patients with an optimal multi-task execution sequence across multiple departments and resources, thus creating a technological gap between "decision completion" and "task execution completion."
[0012] To address this, this application proposes a method for dynamically generating outpatient treatment pathways based on real-time data fusion, see [link to relevant documentation]. Figure 1 The method includes the following steps.
[0013] 101. In response to the target patient's path generation request, a personalized task network is generated based on the target patient's outpatient structured electronic medical orders, real-time location, and real-time status data of the hospital's medical resources. The personalized task network includes multiple medical task nodes and the temporal and logical constraints between the medical task nodes.
[0014] 102. Based on the spatial topology information of the hospital's medical resources, real-time queuing status data, and historical operational patterns, a dynamic spatiotemporal cost field is constructed. The dynamic spatiotemporal cost field associates a dynamic comprehensive cost with each medical task node at different time points. The dynamic comprehensive cost is composed of the passage cost calculated based on spatial topology information and the estimated waiting cost determined based on real-time and historical data.
[0015] 103. Using the temporal and logical constraints in the personalized task network as the execution conditions and the dynamic comprehensive cost of the dynamic spatiotemporal cost field mapping as the optimization index, global collaborative optimization calculation is performed to obtain the global optimization planning result.
[0016] 104. Based on the results of global collaborative optimization calculation, generate and output the path sequence of outpatient treatment for the target patient. The path sequence is used to indicate the spatial order of performing various treatment tasks and the suggested start time of each task.
[0017] For ease of understanding, the following explains some key terms in this embodiment: Personalized Task Network: This network is a graph structure where nodes represent various diagnostic and treatment tasks that the target patient needs to complete, such as registration, consultation, testing, examination, and medication dispensing. Directed edges between nodes represent temporal constraints (e.g., task A must be completed before task B can proceed) and logical constraints (e.g., follow-up consultations can only be conducted after test results are available). The network is constructed based on the patient's individual medical orders, real-time location, and the real-time status of hospital resources, ensuring the targeted nature of task allocation.
[0018] Dynamic Spatiotemporal Cost Field: This cost field is a multi-dimensional data structure used to quantify the comprehensive cost required to travel from one medical task node to another at different points in time. This comprehensive cost consists of two parts: first, the travel cost, which is the time or distance cost required to move from one location to another within the hospital, calculated based on the hospital's spatial topology information; and second, the estimated waiting cost, which is the time cost incurred due to queuing or resource occupancy after arriving at the target medical resource, predicted based on real-time queuing status data and historical operational patterns. This cost field can dynamically reflect changes in the hospital environment, providing real-time basis for path optimization.
[0019] Global Cooperative Optimization Calculation: This calculation process aims to find a path sequence that minimizes the total dynamic cost of outpatient treatment for the target patient, while satisfying the temporal and logical constraints defined in the personalized task network. This process evaluates all possible task execution sequences and time arrangements by comprehensively considering travel costs and estimated waiting costs to determine the overall optimal treatment path.
[0020] Path Sequence: This sequence is the final output of the global collaborative optimization computation, providing the target patient with specific and actionable outpatient treatment guidance. The sequence not only indicates the spatial order of various treatment tasks but also provides a suggested start time for each task, thereby helping the patient complete all treatment procedures efficiently and systematically.
[0021] This application provides a method for dynamically generating outpatient treatment pathways based on real-time data fusion, the specific implementation of which is as follows: This personalized task network comprises multiple treatment task nodes and temporal and logical constraints between them. For example, medical staff can manually enter various treatment tasks based on the patient's electronic medical orders, and manually set the order and logical relationships between tasks according to medical common sense or pre-set simple rules, thus forming a preliminary task network. Alternatively, treatment items can be extracted from electronic medical orders, and a treatment task node can be created for each item. Then, basic temporal and logical constraints between these task nodes can be established by consulting a static medical rule base. The patient's real-time location information can be used to determine currently executable tasks; for example, if the patient is currently near a certain department, tasks related to that department can be prioritized. Real-time status data of hospital medical resources, such as the openness of a department and the availability of equipment, can be used to filter out tasks that are currently unexecutable.
[0022] Based on the spatial topology information of the hospital's medical resources, real-time queuing status data, and historical operational patterns, a dynamic spatiotemporal cost field is constructed. This dynamic spatiotemporal cost field associates a dynamic comprehensive cost for each medical task node at different time points. This dynamic comprehensive cost consists of the passage cost calculated based on spatial topology information and the estimated waiting cost determined based on real-time and historical data. For example, the hospital's spatial topology information can be represented as a simple two-dimensional planar map, where the locations of each department are marked. The passage cost can be obtained by calculating the straight-line distance between two points or a preset fixed path distance. Real-time queuing status data can only include the number of people currently queuing for each department, and the estimated waiting cost can be simply estimated by multiplying the current number of people queuing by an average service time. Historical operational patterns can only refer to the average service time of each department at different time periods. By simply superimposing this information, a preliminary dynamic spatiotemporal cost field can be formed, in which the comprehensive cost of each medical task node at a specific time point is determined.
[0023] Furthermore, using the temporal and logical constraints in the personalized task network as execution conditions and the dynamic comprehensive cost of the dynamic spatiotemporal cost field mapping as the optimization index, global collaborative optimization calculations are performed to obtain the global optimization planning results. For example, a greedy algorithm can be used for optimization calculations. This algorithm selects the task with the lowest dynamic comprehensive cost at the current time point from the currently executable tasks, executes it, updates the current state, and repeats this process until all tasks are completed. The temporal and logical constraints between tasks are used as hard conditions, meaning that only tasks that satisfy these constraints are considered. In this way, a sequence of diagnostic and treatment tasks that satisfies the basic constraints and is locally optimal at each step can be obtained.
[0024] Based on the results of global collaborative optimization calculations, a path sequence for the target patient's outpatient treatment is generated and output. This path sequence indicates the spatial order of performing various treatment tasks and the suggested start time for each task. For example, the task sequence and suggested start times from the global optimization planning results can be directly presented to the patient, along with a simple list-style navigation to guide the patient from their current location to the next task execution location. The path sequence can be a static text list containing the task name, suggested start time, and corresponding department location. After completing a task, the patient needs to manually check the list to determine the next task.
[0025] This application dynamically constructs a task network by integrating the target patient's personalized medical orders, real-time location, and hospital resource status. It then constructs a dynamic spatiotemporal cost field by combining hospital spatial topology, real-time queuing, and historical patterns, followed by global collaborative optimization calculations to ultimately generate and output an outpatient treatment path sequence. Therefore, this application can provide outpatients with end-to-end, dynamic, and overall optimal task execution path planning, solving the problem that related technologies cannot provide optimal execution sequences for multiple tasks across departments after medical orders are determined, thus improving patient efficiency and experience.
[0026] This application further proposes a method for generating a personalized task network based on the target patient's structured electronic medical orders, real-time location, and real-time status data of the hospital's medical resources. See [link to relevant documentation]. Figure 2 The method includes the following steps.
[0027] 201. Parse the structured electronic medical orders in the outpatient department to obtain the initial set of treatment tasks and the medical logical dependencies between tasks.
[0028] 202. Based on real-time location and real-time status data, filter and initialize the initial set of diagnosis and treatment tasks, determine the set of executable diagnosis and treatment task nodes, and determine the initial timing constraints in combination with medical logical dependencies.
[0029] 203. Based on the set of executable diagnosis and treatment task nodes, medical logical dependencies, and initial temporal constraints, a personalized task network is generated. Each diagnosis and treatment task node in the set corresponds to a diagnosis and treatment task. The directed connections between nodes represent the logical constraints defined by the medical logical dependencies and / or the temporal constraints defined by the initial temporal constraints.
[0030] Among them, the analysis of structured electronic medical orders in outpatient clinics aims to extract all the medical treatment items to be performed from the patient's medical order information and identify the inherent medical logical relationships between these items.
[0031] Furthermore, based on real-time location and status data, the initial set of diagnosis and treatment tasks is filtered and initialized. This aims to dynamically adjust the task set according to the patient's current actual situation and the real-time availability of hospital resources, eliminate tasks that are currently unexecutable or unsuitable for execution, and assign preliminary execution attributes to executable tasks.
[0032] Based on this, a personalized task network is generated using the set of executable diagnostic and treatment task nodes, medical logical dependencies, and initial temporal constraints. The aim is to visualize and computationally represent the selected and initialized diagnostic and treatment tasks and their interrelationships in the form of a graph structure.
[0033] By parsing the structured electronic medical orders in outpatient settings, the initial set of treatment tasks and the medical logical dependencies between tasks can be accurately extracted from the orders. This lays a solid foundation for subsequent dynamic adjustments, avoids errors that may arise from manual intervention, and ensures the medical standardization of task definitions. Based on this, the initial set of treatment tasks is filtered and initialized using real-time patient location and hospital resource status data. This allows the task network to dynamically adapt to the current execution environment, promptly eliminating tasks that cannot be executed due to resource unavailability or incompatible patient locations, and assigning reasonable initialization priorities and preliminary timing constraints to executable tasks, thus ensuring the executability and efficiency of the task set. Integrating these real-time adjusted and optimized sets of treatment task nodes, medical logical dependencies, and initial timing constraints generates a personalized task network. This network not only accurately reflects medical logic and timing requirements but, more importantly, is a highly executable task model built on real-time data. This provides accurate and real-time input for the subsequent construction of dynamic spatiotemporal cost fields and global collaborative optimization calculations, improving the accuracy and practicality of the entire outpatient treatment path planning, making the generated path sequence closer to the patient's actual medical experience, and effectively shortening the patient's waiting and travel time.
[0034] This application further proposes parsing structured electronic medical orders in outpatient settings to obtain an initial set of treatment tasks and the medical logical dependencies between tasks, including: From the structured fields of the outpatient structured electronic medical orders, the executing department identifier, item type, and medical constraint parameters corresponding to each diagnosis and treatment item are parsed out.
[0035] Each parsed treatment item is instantiated as a treatment task, forming an initial set of treatment tasks, and each treatment task is associated with the corresponding department identifier and project type.
[0036] Based on medical constraint parameters and a predefined clinical rule base, medical logical dependencies are identified among the diagnostic and treatment tasks in the initial set of diagnostic and treatment tasks.
[0037] Specifically, the system parses the structured fields of outpatient structured electronic medical orders to extract the corresponding department identifier, item type, and medical constraint parameters for each treatment item. This aims to accurately extract key information from standardized electronic medical order data, providing a foundation for subsequent treatment task definition. This parsing process can be implemented in several ways. For example, a set of parsing rules can be predefined, containing regular expressions or keyword matching patterns for different structured fields. The system uses these patterns to identify and extract the department identifier, item type (such as test, examination, treatment, medication, etc.), and related medical constraint parameters (such as fasting requirements, allergy history, and preparations before specific examinations) from the electronic medical orders. Another approach is to utilize a pre-defined electronic medical order data model or template. This model clearly defines the semantics and location of each field. The parsing module directly accesses the corresponding field paths in the data model to obtain the required department identifier, item type, and medical constraint parameters, ensuring the accuracy and completeness of the information.
[0038] Each parsed treatment item is instantiated as a treatment task, forming an initial set of treatment tasks. Each treatment task is then associated with a corresponding department identifier and item type. The purpose of this step is to transform abstract medical orders into discrete task entities with clearly defined attributes that the system can process. For example, an independent task object or data structure can be created for each parsed treatment item. This task object contains a task ID, task name, and attributes such as the department identifier and item type obtained from the previous step. These attributes give the task a clear execution context and classification information. Alternatively, each treatment item can be stored as a record in a task table in the database. The fields in the task table correspond to the various attributes of the treatment task, such as the department identifier and item type, thus constructing the initial set of treatment tasks.
[0039] Building upon this foundation, based on medical constraint parameters and a predefined clinical rule base, medical logical dependencies are identified among the diagnostic and treatment tasks in the initial set of tasks. This step aims to ensure that the execution order of diagnostic and treatment tasks conforms to medical standards and safety requirements. For example, a rule base containing a large amount of clinical knowledge and rules can be maintained, defining the medical sequence, mutual exclusion, or parallel conditions between different diagnostic and treatment items. After parsing the medical constraint parameters of the diagnostic and treatment items, these parameters are used for matching and reasoning with the clinical rule base. For example, if the medical constraint parameters of an examination (such as a CT scan with contrast enhancement) indicate that contrast agent injection is required, and the rule base contains a rule that "contrast agent injection must be completed before the CT scan with contrast enhancement," then the prerequisite dependency between the contrast agent injection task and the CT scan with contrast enhancement task will be identified. Another implementation approach is to construct a medical knowledge graph, where nodes represent diagnostic and treatment items or medical concepts, and edges represent the medical logical relationships between them. By querying and traversing the knowledge graph, and combining the medical constraint parameters of the diagnosis and treatment tasks, the medical logical dependencies between tasks in the initial set of diagnosis and treatment tasks are automatically discovered and established. For example, a certain test result must be obtained before the doctor's follow-up visit, or a certain type of drug must be taken after a meal.
[0040] Through the above technical solution, this application designs a structured electronic medical order parsing process. It directly utilizes standardized fields from outpatient structured electronic medical orders to accurately extract the executing department identifier, item type, and medical constraint parameters, avoiding information omissions and ambiguities that may arise from traditional unstructured data processing. By instantiating each treatment item into a treatment task with clearly defined attributes, and combining it with a predefined clinical rule base and medical constraint parameters, the medical logical dependencies between tasks are automatically identified, effectively eliminating subjective errors from manual judgment and ensuring the medical rationality and accuracy of dependencies. This not only provides a solid, reliable, and medically correct set of tasks and dependency framework for the subsequent construction of personalized task networks, but also improves the accuracy and reliability of treatment pathway planning, laying the foundation for achieving global optimization planning.
[0041] This application further proposes a method to determine the real-time resource pressure value corresponding to each medical task in the initial set of medical tasks based on the resource queue length and device status data in real-time status data, as well as a preset resource load weight coefficient. Based on the real-time location and the preset location identifiers of the departments corresponding to each medical task obtained from the initial set of medical tasks, the relative travel cost from the location indicated by the real-time location to each department is determined. Based on the real-time resource pressure value and the relative travel cost, a decision is made through a predefined screening threshold to obtain a set of executable medical task nodes. Medical tasks included in the set of executable medical task nodes are assigned an initialization priority parameter jointly determined by the real-time resource pressure value and the relative travel cost.
[0042] Specifically, real-time status data refers to the operational status information of various medical resources within a hospital at any given moment. This data can originate from Hospital Information Systems (HIS), Laboratory Information Systems (LIS), Picture Archiving and Communication Systems (PACS), etc., and can also be collected in real time through sensors, IoT devices, or manual data entry. Resource queue length refers to the number of patients waiting for service at a specific medical resource (such as an examination room, consultation room, or pharmacy window). This data can be obtained in real time through queuing systems, intelligent sensing devices (such as cameras combined with image recognition technology), or manual statistics. Equipment status data refers to the current operational status of various medical devices used to perform medical tasks (such as CT scanners, ultrasound machines, and laboratory equipment). This includes information such as whether the equipment is idle, in use, malfunctioning, or requiring maintenance. This data is typically provided by the equipment's built-in monitoring system or the hospital's asset management system. Pre-set resource load weighting coefficients refer to the importance factors pre-defined for different types of resources or different dimensions of status data when assessing the real-time resource pressure of medical tasks. These coefficients can be configured based on the hospital's operational strategy, clinical experience, or historical data analysis results. Real-time resource pressure value is a quantitative assessment of the resource stress that a certain diagnosis and treatment task may face when it is executed at the current moment. This value takes into account the resource queue length, equipment status data and preset resource load weight coefficients related to the task. For example, the equipment failure state can be mapped to a high pressure value by multiplying the queue length by a weight coefficient, and then these weighted values can be accumulated or obtained through a certain function mapping.
[0043] Real-time location refers to the target patient's current geographic coordinates or regional location within the hospital. This can be obtained through various technical means, such as using hospital-wide Wi-Fi positioning, Bluetooth beacon positioning, UWB (Ultra-Wideband) positioning, or location services based on the patient's mobile app. Preset location identifiers for the implementing department refer to the fixed, pre-defined geographic location information of various departments or service points within the hospital (such as registration desks, consultation rooms, examination rooms, pharmacies, and cashiers) within the hospital's spatial layout. These identifiers can be specific coordinates, area codes, or unique IDs associated with the hospital's internal navigation system. Relative travel cost refers to the cost incurred to reach a specific implementing department from the target patient's current real-time location. This cost can be physical distance, estimated walking time, or a comprehensive travel cost considering factors such as floor level and elevator waiting time. For example, the shortest path distance or shortest travel time from the patient's current location to the target department can be calculated based on the hospital's indoor navigation map.
[0044] Predefined screening thresholds refer to preset limits used to determine whether real-time resource pressure and relative access costs are acceptable when deciding whether to include a particular medical task in the set of executable tasks. These thresholds can be dynamically adjusted or statically configured based on the hospital's operational goals, patient experience requirements, or system performance. The set of executable medical task nodes refers to the set of medical tasks that, after evaluation of real-time resource pressure and access costs, are deemed reasonably executable currently or in the foreseeable future. Tasks in this set have been screened, excluding those with excessive resource pressure or those that patients cannot reach within a reasonable timeframe. The initial priority parameter is an initial ranking weight assigned to each medical task in the set of executable medical task nodes. This parameter comprehensively reflects the task's real-time resource pressure and relative access costs, providing a preliminary execution order reference for tasks in subsequent path planning. For example, a function can be designed to weight and sum the real-time resource pressure and relative access costs, or combine them through other mathematical models to obtain a comprehensive score. The lower the score (or the higher, depending on the definition), the higher the priority.
[0045] Through the above technical solution, this application effectively addresses the problem of how to select the most reasonable and feasible treatment tasks from a patient's initial medical orders in a dynamic outpatient environment and assign them appropriate initial execution priorities. Specifically, by acquiring and analyzing resource queue length and device status data in real time, and combining this with a pre-defined resource load weighting coefficient, the resource strain that each treatment task may face at any given moment can be dynamically assessed, avoiding directing patients to departments with excessive resource pressure and thus reducing unnecessary waiting time. Simultaneously, by calculating the relative travel cost from the patient's real-time location to each execution department, the actual movement cost of the patient can be fully considered, avoiding the recommendation of tasks that are too far away or inconvenient to access, thereby improving the patient's medical experience. By comprehensively considering real-time resource pressure values and relative travel costs, and making decisions through predefined screening thresholds, it ensures that the generated set of executable treatment task nodes is not only medically feasible but also optimal in terms of resource availability and patient access efficiency. Furthermore, each task included in the executable set is assigned an initialization priority parameter jointly determined by these two factors, providing more accurate and dynamic initial conditions for subsequent personalized task network construction and global collaborative optimization. This makes the final generated treatment path sequence more real-time, personalized, and efficient, improving the overall efficiency of outpatient treatment and patient satisfaction.
[0046] This application further proposes a method for determining initial temporal constraints based on medical logical dependencies. This method includes the following steps: First, based on medical logical dependencies, perform topological sorting of the diagnostic and treatment tasks in the executable diagnostic and treatment task node set to generate a basic task execution sequence. Second, based on the initialization priority parameters corresponding to each diagnostic and treatment task in the executable diagnostic and treatment task node set, and combined with the resource readiness status in real-time status data, perform preliminary time window allocation for the diagnostic and treatment tasks in the basic task execution sequence to obtain initial time window allocation results. Third, based on the initial time window allocation results, generate initial temporal constraints to constrain the execution order and time of diagnostic and treatment task nodes in the personalized task network.
[0047] Specifically, in the step of topologically sorting the executable diagnostic and treatment task nodes based on medical logical dependencies to generate a basic task execution sequence, topological sorting is a method for linearly sorting the vertices of a directed acyclic graph (DAG). Its core principle is to ensure that for any directed edge (u, v), vertex u always precedes vertex v. In this context, diagnostic and treatment tasks are considered as vertices of the graph, while medical logical dependencies constitute the directed edges. This step aims to determine one or more legal task execution orders according to medical sequence requirements, effectively avoiding medical logical conflicts and providing a structured, medically compliant foundation for subsequent time allocation. For example, the Kahn algorithm can be used for topological sorting. This algorithm first calculates the in-degree of each diagnostic and treatment task node and adds all nodes with an in-degree of 0 to a queue. Then, it iteratively removes nodes from the queue and updates the in-degree of their successors until the queue is empty. Alternatively, a depth-first search (DFS) algorithm can be used. During the DFS traversal, once all successor nodes of a node have been visited, it is added to the head of the result list, ultimately resulting in a topologically sorted sequence.
[0048] In the step of allocating initial time windows for medical tasks in the basic task execution sequence based on the initial priority parameters corresponding to each medical task in the executable medical task node set and in conjunction with the resource readiness status in the real-time status data, this step aims to allocate a preliminary suggested execution time range, i.e., a time window, for each medical task based on topological sorting. The "initial priority parameters" reflect the urgency or importance of the task; for example, emergency examinations may be assigned a higher priority. The "resource readiness status in the real-time status data" provides information on the availability of current resources (such as equipment, doctors, and examination rooms); for example, whether a CT scanner is currently idle or under maintenance. By combining these two aspects of information for time window allocation, it is ensured that the allocated time windows conform to medical logic while also considering the importance of the task and the real-time availability of resources, thereby improving diagnostic efficiency and patient experience. For example, a greedy strategy-based approach can be used: for each task in the basic task execution sequence, it is first sorted according to its initial priority parameters, and then, in conjunction with real-time status data, the availability of the resources required by the task in the current and future period is queried, prioritizing the allocation of idle time slots to high-priority tasks. Another approach is to use a heuristic search method, defining a cost function for each task that comprehensively considers factors such as task priority, resource waiting time, and resource utilization, and then selecting the time window allocation scheme with the lowest cost through iterative search.
[0049] In the step of generating initial temporal constraints based on the initial time window allocation results to constrain the execution order and time of diagnostic and treatment task nodes in the personalized task network, the core of this step is to transform the previously obtained preliminary time window allocation results into identifiable and usable "initial temporal constraints" within the personalized task network. These constraints explicitly define the execution order and temporal relationships between diagnostic and treatment task nodes, such as "task A must start before task B" or "task C must be completed between 10:00 AM and 11:00 AM." These constraints are a crucial component in constructing the personalized task network, ensuring its dynamism and accuracy, and providing clear execution conditions for subsequent global collaborative optimization. For example, the preliminary time window allocation results for each diagnostic and treatment task can be directly converted into its temporal attributes within the personalized task network, such as specifying that the task's start time must be greater than or equal to a certain value, and its end time must be less than or equal to a certain value. Furthermore, relative time constraints can also be generated. For instance, if there is a medical logical dependency between task A and task B, and the preliminary time window allocation result for task A is earlier than that for task B, a constraint can be generated indicating that the start time of task B must be after a certain minimum time interval following the completion of task A. These constraints can be added to the personalized task network as directed edges, along with a time attribute.
[0050] Through the aforementioned technical solution, this application effectively utilizes the inherent sequentiality of medicine, avoiding logical conflicts in task execution, thus providing a structured and medically compliant foundation for subsequent time allocation. Based on this, by integrating the importance of tasks with the real-time availability of resources, resource utilization and task scheduling efficiency are optimized, resulting in an initial time window allocation. Based on this initial time window allocation, initial temporal constraints are generated to constrain the execution order and time of diagnostic and treatment task nodes in the personalized task network. This ensures that these constraints directly originate from actual allocation data, providing a dynamic and reliable execution framework for the personalized task network. Overall, these steps work synergistically to achieve efficient generation of temporal constraints based on medical logical dependencies and real-time data, ensuring the accuracy and feasibility of the diagnostic and treatment task sequence. This lays a solid foundation for subsequent global collaborative optimization and effectively fills the technical gap between "decision completion" and "task completion."
[0051] This application further proposes a method for generating personalized task networks based on a set of executable diagnostic and treatment task nodes, medical logical dependencies, and initial temporal constraints. Specifically, the method includes the following steps: Each medical task in the set of executable medical task nodes is created as a corresponding medical task node, and node attributes are configured for each node. Node attributes include at least the department responsible for the medical task, the estimated service duration of the medical task, and the initialization priority parameter of the medical task. Creating medical task nodes aims to concretize the abstract medical task into an operable entity in the network and assign it key attributes so that subsequent path planning and optimization can accurately identify, locate, and evaluate each task. For example, each medical task node can be implemented as a data object or structure containing multiple fields, including a unique task identifier, a department identifier, an estimated service duration, and initialization priority parameters. When a medical task is selected from the set of executable medical task nodes, such a data object is instantiated, and its attributes are populated. Alternatively, a "Medical Task Node" class can be defined, containing member variables such as the department responsible for the medical task, the estimated service duration, and the initialization priority parameter. When generating a personalized task network, an instance of this class is created for each diagnostic task, and these member variables are initialized based on the specific information of the diagnostic task. The executing department serves to specify the physical location of the diagnostic task and is the basis for calculating access costs and spatial topology information. For example, the executing department can be a string identifier (such as "radiology" or "laboratory"), or a predefined enumeration value associated with the department's location in the hospital's spatial topology. Alternatively, it can be a unique ID pointing to a record in the hospital's internal department location database, which is associated with the department's detailed geographical coordinates or regional information. The estimated service duration reflects the time required to complete the diagnostic task and is an important basis for assessing the total task time and allocating time windows. For example, the estimated service duration can be obtained from historical data statistics, such as the average time of a certain test or the average operation time of a certain examination. Alternatively, it can be predicted in real time using a machine learning model based on the complexity of the diagnostic project, the patient's individual circumstances (such as age and condition), and the current resource load. The initialization priority parameter provides an initial indicator of the relative importance or urgency of the diagnostic task, guiding the initial task prioritization and resource allocation. For example, the initialization priority parameter can be assigned a value based on preset rules such as the type of medical task (e.g., emergency examination, routine examination), the severity of the patient's condition, and the urgency of the medical order. Alternatively, it can be dynamically calculated by combining real-time resource pressure values and relative access costs through weighted summation or a decision tree model.
[0052] Based on medical logical dependencies, directed edges representing logical constraints are established between multiple diagnostic and treatment task nodes. Establishing these directed edges aims to clarify the medical logical dependencies between diagnostic and treatment tasks, ensuring the correctness and compliance of task execution; for example, an examination must be performed before a diagnostic report can be issued. For each diagnostic and treatment task node, a list of predecessor task nodes and a list of successor task nodes can be maintained. When a medical logical dependency exists, the predecessor task node is added to the predecessor list of the successor task node, and the successor task node is added to the successor list of the predecessor task node. Alternatively, an adjacency matrix or adjacency list can be used to represent the graph structure. If task A must be completed before task B in medical logic, the position (A, B) is marked as 1 in the adjacency matrix, or B is added to the adjacency list of A.
[0053] Secondly, based on the initial temporal constraints, directed edges representing these constraints are established between multiple diagnostic and treatment task nodes. Establishing these directed edges aims to clarify the temporal order requirements between diagnostic and treatment tasks, ensuring that tasks are executed within a reasonable time window. For example, a certain examination must be completed within a specific time period. For instance, directed edges can have a time window attribute, indicating that a subsequent task must begin within a certain time window after the completion of the preceding task. For example, after task A is completed, task B must begin within one hour of A's completion. Alternatively, directed edges can represent the minimum or maximum time interval between tasks. For example, task B must wait at least 30 minutes after task A is completed before starting, or task B must begin within two hours of task A's completion.
[0054] The directed edges established between multiple diagnostic and treatment task nodes are structurally validated and simplified. The resulting graph structure, composed of the diagnostic and treatment task nodes and the validated and simplified directed edges, yields a personalized task network. Structural validation and simplification of the directed edges aim to eliminate redundant constraints, circular dependencies, or logical conflicts in the network, ensuring the effectiveness and efficiency of the personalized task network. For example, the graph structure can be topologically sorted; if cycles exist, it indicates circular dependencies, requiring handling (such as error reporting or removing redundant edges). Simultaneously, redundant edges can be detected and removed. For instance, if both A->B and A->C->B exist, and C->B has a weaker constraint, then A->B may be redundant. Alternatively, the transitive closure of the graph can be calculated to identify all reachable paths. If multiple paths connect the same two nodes, and one path is a subset of the other or has a stronger constraint, weaker or redundant edges can be simplified. The resulting personalized task network aims to form a structurally clear and logically rigorous graph model, serving as the foundation for subsequent global collaborative optimization calculations. For example, the verified and simplified diagnostic task nodes and their directed edges can be stored as a graph data structure, such as an object containing a list of nodes and a list of edges, or an adjacency matrix / adjacency list.
[0055] Through the aforementioned technical solution, this application explicitly defines the attributes of diagnostic and treatment task nodes, providing each task with key information such as the executing department, estimated service duration, and initial priority parameters. This ensures that tasks possess complete physical location, time requirements, and dynamic weights within the network, thereby avoiding location or scheduling errors caused by missing information. Simultaneously, by establishing directed edges based on medical logical dependencies and initial temporal constraints, this application accurately encodes medical rule dependencies and temporal order requirements between tasks, ensuring the correctness and compliance of task execution. Furthermore, structural verification and simplification of directed edges effectively eliminate redundant constraints, circular dependencies, or logical conflicts in the network, simplifying the graph structure and reducing the complexity and computational burden of subsequent global collaborative optimization calculations. This application constructs a clearly structured, logically rigorous, and efficient personalized task network, providing a solid and optimized foundation for subsequent path planning and improving the accuracy and efficiency of path planning.
[0056] This application further proposes to construct a dynamic spatiotemporal cost field based on the spatial topology information of hospital medical resources, real-time queuing status data, and historical operational patterns. (See [link to relevant documentation]). Figure 3 The methods include: 301. Based on spatial topology information, establish a mapping relationship between diagnosis and treatment task nodes and the physical location of the hospital, and determine the baseline travel cost between any two diagnosis and treatment task node locations.
[0057] 302. By integrating and analyzing real-time queuing status data with historical operational patterns, the estimated waiting costs of each medical resource node in multiple consecutive time slices in the future can be determined.
[0058] 303. The baseline passage cost and the estimated waiting cost are spatiotemporally aligned and coupled to obtain a dynamic spatiotemporal cost field. The dynamic spatiotemporal cost field is organized into a data structure that supports joint queries based on the diagnosis and treatment task node and future time point to provide dynamic comprehensive cost.
[0059] Specifically, when establishing the mapping relationship between treatment task nodes and the physical location of the hospital, and determining the baseline travel cost between any two treatment task node locations, spatial topology information refers to the physical layout data within the hospital, such as floor plans, department locations, corridors, elevators, and staircases. Treatment task nodes represent the various treatment activities that a patient needs to perform, with each node corresponding to one or more specific departments or locations. The hospital's physical location is the specific coordinates or area of these departments or locations within the hospital space. Establishing the mapping relationship associates abstract treatment task nodes with specific physical locations, enabling an understanding of the geographical attributes of the tasks. The baseline travel cost refers to the time or distance cost required for a patient to move from one physical location corresponding to a treatment task node to another physical location corresponding to a treatment task node under ideal conditions; it is typically static and pre-calculated.
[0060] When analyzing real-time queuing status data in conjunction with historical operational patterns to determine the estimated waiting costs of each medical resource node over multiple consecutive time slices in the future, real-time queuing status data refers to the immediate information such as the queue length of each medical resource (e.g., doctor's office, examination equipment, pharmacy window), the number of patients currently being served, and whether the resource is idle or malfunctioning. Historical operational patterns refer to the regular patterns summarized from long-term accumulated hospital operation data (e.g., patient flow at different times of the day, average service time of each department, holiday effects, etc.). Fusion analysis combines these real-time and historical data to more accurately predict the potential waiting time for patients at specific medical resources in the future. Medical resource nodes refer to the physical entities or logical units that provide specific medical services. Multiple consecutive time slices in the future refer to dividing a future period (e.g., the next few hours) into several discrete time segments (e.g., every 5 minutes or 15 minutes) to predict the waiting cost within each time slice. Estimated waiting cost refers to the expected waiting time or corresponding cost for a patient arriving at a specific medical resource node in a future time slice.
[0061] When aligning and coupling the baseline travel cost with the estimated waiting cost in time and space to obtain the dynamic spatiotemporal cost field, spatiotemporal alignment refers to matching the baseline travel cost (spatial dimension) and the estimated waiting cost (temporal dimension) in time and space, ensuring that they can work together on the same treatment task node and time point. Coupling refers to integrating the two aligned costs to form a unified dynamic comprehensive cost. The dynamic spatiotemporal cost field is a data structure that stores the comprehensive cost of traveling from one treatment task node to another at different time points. This data structure supports joint queries by treatment task node (spatial dimension) and future time point (temporal dimension), enabling rapid retrieval of cost information under specific spatiotemporal conditions during path planning. The dynamic comprehensive cost is a combination of travel cost and waiting cost, reflecting the total expenditure required for a patient to complete a treatment task under specific spatiotemporal conditions.
[0062] Through the above technical solutions, this application can construct an accurate and dynamic diagnostic and treatment pathway optimization index. By establishing a mapping relationship between diagnostic and treatment task nodes and the physical location of the hospital based on spatial topology information and determining the baseline access cost, it ensures that the calculation of access cost is based on the actual physical layout of the hospital, avoiding path planning deviations caused by inaccurate spatial information, and providing a solid spatial foundation for subsequent cost integration. By integrating real-time queuing status data and historical operational patterns to determine the estimated waiting cost of each diagnostic and treatment resource node in multiple consecutive time slices in the future, the prediction of waiting cost not only considers the current immediate situation but also incorporates historical experience, thereby more accurately reflecting changes in resource load at different future time points and effectively addressing the dynamics and uncertainties of hospital operations. By aligning and coupling the baseline access cost and the estimated waiting cost in time and space and organizing them into a dynamic spatiotemporal cost field that supports joint queries, the spatial access cost and the time waiting cost are organically integrated, forming a unified and easily queryable dynamic comprehensive cost index. This not only solves the problems of accuracy and efficiency in dynamic comprehensive cost calculation and ensures the reliability of optimization indicators, but also provides comprehensive and real-time cost basis for subsequent global collaborative optimization calculations, enabling the generated treatment pathways to truly achieve overall optimization in time and space, and improving patients' medical efficiency and experience.
[0063] This application further proposes a method based on spatial topology information to establish a mapping relationship between medical task nodes and the physical locations of hospitals, and to determine the baseline travel cost between any two medical task node locations. Specifically, the process includes: parsing the spatial topology information and constructing a connected graph model with key access points within the hospital as vertices and connecting paths as edges. In the connected graph model, the physical location of the department corresponding to each medical task node is located, and the physical location is mapped to a vertex representing the department location in the connected graph model. Based on the edge weights in the connected graph model, the optimal path cost between any two vertices representing the department locations mapped from the medical task nodes is determined, and this optimal path cost is defined as the baseline travel cost between the two medical task node locations.
[0064] This process involves analyzing spatial topology information to construct a connected graph model with key access points within the hospital as vertices and connecting paths as edges. The aim is to abstract and digitize the complex internal spatial structure of the hospital, providing a structured data foundation for subsequent path calculations. One approach is to read the hospital's Building Information Modeling (BIM) data or Computer-Aided Design (CAD) drawings, extracting key access points such as corridors, elevators, staircases, and entrances / exits as vertices of the graph, and abstracting the actual walkable paths between these points as edges. Each edge can be assigned a weight, such as representing actual physical distance, average travel time, or additional costs associated with floor changes. Another approach utilizes location data collected by indoor positioning systems (such as those based on Wi-Fi, Bluetooth beacons, or UWB technology). Through clustering and topology analysis, the main activity areas and connecting passages within the hospital can be automatically identified and constructed as a connected graph model.
[0065] In a connected graph model, the physical location of the department corresponding to each diagnostic and treatment task node is located, and this physical location is mapped to vertices representing the department's location in the connected graph model. The purpose is to precisely associate abstract diagnostic and treatment tasks with specific physical locations within the hospital. For example, for a "blood draw" diagnostic and treatment task node, its corresponding department is identified as "Laboratory Blood Draw Room." Then, the precise geographical coordinates or area identifier of this blood draw room are retrieved from a pre-defined hospital department location database. The vertex closest to or best representing the entrance to this blood draw room is found in the constructed connected graph model, and the diagnostic and treatment task node is mapped to that vertex. Alternatively, one or more specific vertices representing the location of each important diagnostic and treatment department or service point (such as the registration desk, pharmacy, radiology department, ultrasound department, etc.) can be predefined in the connected graph model, and the diagnostic and treatment task nodes are directly mapped to these predefined vertices.
[0066] Based on the edge weights in the connected graph model, the optimal path cost between any two vertices representing departmental locations mapped from the treatment task nodes is determined, and this optimal path cost is set as the baseline travel cost between the two treatment task node locations. This quantifies the basic cost required for patients to move between different treatment task execution locations. For example, classic graph search algorithms such as Dijkstra's algorithm or A* algorithm can be used to calculate the shortest path between any two departmental location vertices in the constructed connected graph model. The edge weights can comprehensively consider factors such as physical distance, floor transitions (e.g., time required to take an elevator or walk up stairs), and access restrictions in specific areas. Another approach is to pre-calculate the shortest path cost between all vertex pairs in the connected graph model using a full-source shortest path algorithm such as the Floyd-Warshall algorithm, and store it in a matrix that can be quickly queried. Then, when the baseline travel cost between two treatment task nodes needs to be determined, this matrix can be directly queried. The optimal path cost can be the physical distance, the estimated walking time, or a comprehensive cost considering access obstacles.
[0067] By analyzing spatial topology information and constructing a structured connected graph model, the complex internal space of a hospital is abstracted, laying a solid foundation for accurate calculation of access costs. Accurate mapping of treatment task nodes to specific physical vertices in the graph model ensures that the starting and ending points of subsequent path calculations are highly consistent with the actual execution locations of treatment tasks, effectively avoiding path planning deviations caused by inaccurate locations. Utilizing edge weights and optimal path algorithms in the graph model, the minimum cost required for a patient to move between different departments performing treatment tasks can be accurately calculated, providing reliable and accurate baseline access cost data for the dynamic spatiotemporal cost field. This accurate baseline access cost, combined with the estimated waiting cost in the dynamic spatiotemporal cost field, can more accurately reflect the actual movement and waiting time of patients throughout the entire treatment process, thereby improving the accuracy and practicality of overall treatment path planning and providing patients with a more efficient and convenient medical experience.
[0068] This application further proposes a method to fuse real-time queuing status data with historical operational patterns to determine the estimated waiting cost of each medical resource node over multiple consecutive time slices. This includes: extracting periodic features from historical operational patterns to obtain the historical average service rate and typical queuing load pattern of each medical resource node during the target prediction period; obtaining the current queue length and real-time service rate of each medical resource node based on real-time queuing status data; and generating the estimated waiting cost of each medical resource node over multiple consecutive time slices based on the historical average service rate, typical queuing load pattern, current queue length, and real-time service rate.
[0069] This process involves extracting periodic features from historical operational patterns to obtain the historical average service rate and typical queuing load patterns of each medical resource node during the target prediction period. The aim is to uncover the inherent service capacity and regular demand fluctuations of medical resource nodes from long-term data, providing a stable and reliable benchmark model for subsequent waiting cost prediction. Specifically, time series analysis can be performed on historical operational data (e.g., daily, weekly, and monthly patient flow, service duration, and queuing duration over the past few months or years), using statistical methods such as moving averages and exponential smoothing to calculate the historical average service rate. For typical queuing load patterns, cluster analysis (such as K-means) or pattern recognition algorithms can be used to identify typical queuing curves or load distributions for different time periods (e.g., morning, afternoon, weekdays, and weekends). Alternatively, machine learning models, such as recurrent neural networks (RNNs), long short-term memory networks (LSTMs), or Transformer models, can be used to learn historical operational patterns and automatically extract periodic features. The model can learn the periodic variation patterns of service rates and queuing loads at different time granularities (hours, days, weeks) and output these patterns as historical average service rates and typical queuing load patterns.
[0070] Based on real-time queuing status data, the current queue length and real-time service rate of each medical resource node are obtained. This aims to capture the latest instantaneous state of the system, reflect real-time disturbances that may deviate from historical patterns, and ensure that the predictive model can perceive and respond to the latest changes. Specifically, the current queue length (i.e., the number of patients waiting) and real-time service rate (i.e., the number of patients receiving service per unit time) of each medical resource node (such as registration window, consultation room, examination room, pharmacy) can be directly obtained from real-time data sources such as the Hospital Information System (HIS), queuing and calling system, and IoT sensors (such as patient positioning system). Alternatively, data can be periodically pulled or received from the hospital's real-time monitoring system or business system through standardized data interfaces (such as API). The obtained data may need to be preprocessed, for example, by aggregating and calculating raw event logs (such as patient check-in, call, and service completion timestamps) to derive the current queue length and the real-time service rate within the most recent time window.
[0071] Based on historical average service rates, typical queuing load patterns, current queue lengths, and real-time service rates, this method generates estimated waiting costs for each healthcare resource node over multiple consecutive time slices in the future. The aim is to intelligently fuse historical characteristics representing long-term patterns with real-time states reflecting short-term fluctuations, thereby generating highly accurate estimated waiting costs for future periods. Specifically, queuing theory models (such as the M / M / c model or more complex queuing network models) can be used for prediction. Using the current queue length as the initial state, and then combining historical average service rates, typical queuing load patterns (used to predict future arrival rates), and real-time service rates, iterative calculations or simulations are used to predict changes in queue length within each future time slice, thus deriving the estimated waiting cost. Alternatively, a hybrid prediction model can be constructed. For example, a time series prediction model (such as ARIMA or Prophet) can be used to predict a baseline waiting cost based on historical data. Then, real-time data (current queue length, real-time service rate) can be used as correction factors or input features, and another machine learning model (such as gradient boosting trees or neural networks) can be used to adjust and optimize the baseline prediction in real time, thereby generating a more accurate estimated waiting cost for the future.
[0072] By employing the aforementioned technical solutions, periodic features are extracted from historical operational patterns. This allows for the mining of inherent service capabilities and regular demand fluctuations of resource nodes from long-term data, providing a stable and reliable benchmark model for prediction and avoiding prediction biases caused by relying solely on short-term data. Real-time queue status data is used to obtain the current queue length and real-time service rate, capturing the system's latest instantaneous state and reflecting real-time disturbances that may deviate from historical patterns. This ensures the prediction model can perceive and respond to the latest changes. Based on the extracted historical features and acquired real-time status data, an estimated waiting cost is generated. This intelligent fusion of historical features representing long-term patterns with real-time status reflecting short-term fluctuations ensures that the generated estimated waiting cost inherits the stability of historical experience while possessing the dynamism to adapt to real-time changes. This accurate and dynamic estimated waiting cost, as an important component of the dynamic spatiotemporal cost field, improves the accuracy and timeliness of the dynamic spatiotemporal cost field, thus providing more reliable optimization indicators for subsequent global collaborative optimization calculations. Ultimately, this makes the generated outpatient treatment path sequence more closely aligned with actual conditions, effectively shortening patient waiting times and improving the medical experience.
[0073] This application further proposes a method for generating the estimated waiting cost of each medical resource node over multiple consecutive time slices based on historical average service rate, typical queuing load patterns, current queue length, and real-time service rate. Specifically, this includes: The predicted initial queue state of each medical resource node is determined by using the current queue length and real-time service rate.
[0074] Based on historical average service rates and typical queuing load patterns, the expected number of patients arriving in each future time slot is determined.
[0075] Based on the predicted initial queue state, real-time service rate, and expected quantity, the queue evolution model is used to iteratively calculate each future time slice to generate the estimated waiting cost of each medical resource node in multiple consecutive future time slices.
[0076] Specifically, by utilizing the current queue length and real-time service rate, the predicted initial queue state of each medical resource node is determined, aiming to provide an accurate starting point for subsequent queue evolution models. The predicted initial queue state can be understood as the actual number of people queuing and the number of patients currently receiving services at each medical resource node (e.g., an examination room, pharmacy window, etc.) at the start of the prediction. This can be achieved in two ways: one is to directly use the real-time acquired current queue length as the predicted initial queue length and the real-time service rate as the predicted initial service rate. Another approach is to combine directly acquired real-time data with short-term historical data for weighted averaging or smoothing to eliminate instantaneous fluctuations, thereby obtaining a more stable predicted initial queue state.
[0077] Determining the expected number of patients arriving in each future time slot based on historical average service rates and typical queuing load patterns is crucial for predicting how many new patients will arrive at various healthcare resource nodes during different time periods in the future. Methods for determining the expected number can include: one approach is based on historical data statistics, such as analyzing patient arrival rates during the same time period in the past (e.g., Monday morning 9-10 am), calculating the average arrival rate, and combining this with statistical models such as the Poisson distribution to predict the expected number of arrivals in future time slots. Another approach is to utilize machine learning models, such as time series forecasting models (ARIMA, LSTM, etc.), to learn the periodic characteristics and typical queuing load patterns in historical operational patterns, thereby predicting the expected number of patients arriving in each future time slot.
[0078] Based on the predicted initial queue state, real-time service rate, and expected number of arrivals, a queue evolution model is used to iteratively calculate the estimated waiting cost for each medical resource node in multiple consecutive future time slices. The queue evolution model is a mathematical or computational model capable of simulating and predicting the dynamic changes in the queue. Its implementation can include: one approach is to use a discrete event simulation model, which treats events such as patient arrival, service start, and service end as discrete events. Within each time slice, based on the predicted initial queue state, real-time service rate, and expected number of arrivals, the model simulates the process of patient entry, queuing, receiving service, and leaving, thereby calculating the queue length and average waiting time at the end of each time slice and converting them into estimated waiting costs. Another approach is to use a queue prediction method based on Markov chains or state-space models, defining the queue state as different queue sizes and calculating the state transition probability based on patient arrival rate and service rate. Through iterative calculation, the probability distribution of queue length in future time slices is predicted, thus deriving the estimated waiting cost.
[0079] The above technical solution utilizes the current queue length and real-time service rate to determine the predicted initial queue state. This ensures that the calculation starts from the current actual situation, avoiding the lag that historical data may introduce, thus improving the accuracy of the initial state. Based on the historical average service rate and typical queuing load patterns, the expected number of patients arriving in each future time slice is determined. This combines historical patterns and real-time data, making the prediction closer to the real-world scenario and enhancing the reliability of future patient arrivals. Based on the predicted initial queue state, real-time service rate, and expected number, each future time slice is iteratively calculated using a queue evolution model. This uses the model to dynamically simulate the queue evolution process, improving the accuracy and efficiency of the prediction and ensuring that each calculation step adapts to real-time changes. Ultimately, a continuous and reliable estimated waiting cost is generated, providing more refined and accurate data support for the construction of a dynamic spatiotemporal cost field. This enables global collaborative optimization calculations to make decisions based on more realistic costs, thereby generating a more optimized outpatient treatment pathway sequence.
[0080] This application further proposes a method for spatiotemporally aligning and coupling the baseline passage cost with the estimated waiting cost to obtain a dynamic spatiotemporal cost field, the method comprising: The estimated waiting costs are organized into the first dimension of waiting cost data according to the corresponding medical resource nodes and future time points.
[0081] The baseline toll cost is organized into toll cost data in the second dimension according to the two associated diagnosis and treatment task nodes.
[0082] By establishing the spatiotemporal correlation between waiting cost data and travel cost data and performing superposition calculations, a dynamic spatiotemporal cost field is obtained. Each data item in the dynamic spatiotemporal cost field represents the comprehensive spatiotemporal cost of traveling from one medical task node to another at a specific future time point.
[0083] Specifically, when organizing estimated waiting costs into the first dimension of waiting cost data based on corresponding medical resource nodes and future time points, several methods can be used. For example, this data can be organized into a multidimensional array or table, where rows represent medical resource nodes, columns represent future time points, and cells store the corresponding estimated waiting costs. Alternatively, key-value storage (such as hash mapping) can be used, where the key is a combination of the medical resource node identifier and the future time point, and the value is the estimated waiting cost. This organization method ensures that waiting costs can be accurately associated with specific resource locations and future time points, providing a time-dimensional alignment basis for subsequent cost calculations.
[0084] Meanwhile, there are also multiple ways to organize the baseline travel cost into the second dimension of travel cost data based on the two associated treatment task nodes. For example, an adjacency matrix or table can be constructed, where rows and columns correspond to treatment task nodes, and each element in the matrix represents the baseline travel cost from one node to another. Another approach is to store it as a list of edges in a graph structure, with each edge connecting two treatment task nodes and attaching their baseline travel cost as a weight. This structured storage method provides clear, task node-pair-based support for spatial movement costs, avoiding the isolation of cost calculation between locations.
[0085] Based on this, a dynamic spatiotemporal cost field is obtained by establishing a spatiotemporal correlation between waiting cost data and travel cost data and performing superposition calculations. Specifically, for each possible pair of treatment task nodes (starting node and target node) and each future time point, the baseline travel cost from the starting node to the target node can be obtained from the travel cost data in the second dimension, and the estimated waiting cost at the target node at that future time point can be obtained from the waiting cost data in the first dimension. These two costs are superimposed to obtain the dynamic comprehensive cost of traveling from the starting treatment task node to the target treatment task node at that specific future time point. These dynamic comprehensive costs together constitute the dynamic spatiotemporal cost field, where each data item accurately represents the comprehensive spatiotemporal cost of traveling from one treatment task node to another at a specific future time point.
[0086] Through the above technical solution, this application effectively solves the problem of spatiotemporal consistency in cost data integration. By structuring the estimated waiting cost and the baseline travel cost separately, and further establishing the spatiotemporal correlation between them for superposition calculation, the accuracy of comprehensive cost calculation is ensured. The first-dimensional waiting cost data directly correlates the waiting cost with specific resource locations and future time points, facilitating cost alignment in the time dimension and avoiding cost deviations caused by time point mismatches. The second-dimensional travel cost data captures the basis of spatial movement costs, establishing travel costs based on task node pairs, providing structured support for the spatial dimension, and preventing the isolation of cost calculations between locations. Through spatiotemporal correlation and superposition calculation, dynamic coupling of costs in both time and space dimensions is achieved. Each data item in the generated dynamic spatiotemporal cost field can accurately represent the comprehensive spatiotemporal cost from one node to another at a specific future time point, thereby providing an efficient and accurate cost assessment basis for subsequent global path optimization and improving the accuracy and efficiency of outpatient treatment path planning.
[0087] This application further proposes a method for performing global collaborative optimization calculations using temporal and logical constraints in personalized task networks as execution conditions and dynamic comprehensive cost mapped by a dynamic spatiotemporal cost field as the optimization index, to obtain global optimization planning results. (See [link to relevant documentation]). Figure 4 The method includes: 401. Transform the temporal and logical constraints in the personalized task network into hard filtering rules for the sequence of diagnosis and treatment task nodes.
[0088] 402. In the feasible solution space defined by hard filtering rules, a heuristic graph search is performed using a dynamic spatiotemporal cost field. The expansion strategy of the heuristic graph search is guided by the total dynamic synthesis cost of the current partial sequence and the heuristic estimate of reaching the target node.
[0089] 403. When the heuristic graph search is completed, the complete diagnosis and treatment task node sequence with the minimum cost and the dynamic spatiotemporal cost field are used as the execution time of each diagnosis and treatment task node determined by the complete diagnosis and treatment task node sequence, and are used as the result of global optimization planning.
[0090] Specifically, a personalized task network is a graph structure describing a patient's diagnostic and treatment tasks and their interrelationships. Temporal constraints define the order or time window for task execution, such as "perform test A first, then test B" or "test C must be completed in the morning." Logical constraints define the dependencies between tasks, such as "treatment E can only proceed if test D results are normal." These constraints are crucial for ensuring the correctness and effectiveness of the diagnostic and treatment process. A sequence of diagnostic and treatment task nodes refers to a series of nodes arranged in a specific order, representing the possible paths for the patient to complete all diagnostic and treatment tasks. Hard filtering rules are conditions that must be strictly followed during path planning; any sequence of diagnostic and treatment task nodes that does not meet these rules will be considered infeasible and excluded. Their function is to significantly reduce the search space, ensuring that the generated path sequences are medically and temporally feasible.
[0091] The feasible solution space defined by hard filtering rules refers to the set of all sequences of diagnostic and treatment task nodes that satisfy the hard filtering rules. Hard filtering rules reduce the original, massive search space to a smaller, more manageable subset, where each sequence represents a medically and temporally feasible diagnostic and treatment path. The dynamic spatiotemporal cost field is a multidimensional data structure that associates a dynamic comprehensive cost with each diagnostic and treatment task node at different time points. This cost comprehensively considers the patient's passage cost within the hospital and the waiting costs that may be encountered at various diagnostic and treatment resource points. Its dynamism is reflected in the fact that the cost is updated in real time with changes in time and resource status. Heuristic graph search is a graph search algorithm that uses heuristic information to guide the search process, aiming to efficiently find the optimal or near-optimal solution. It determines the search direction by evaluating the "quality" of nodes, avoiding blindly exploring the entire search space.
[0092] The expansion strategy of heuristic graph search refers to how to select the next node to explore from the current node during the heuristic graph search process. It determines the efficiency of the search and the quality of the final solution. The expansion strategy can be based on an evaluation function that comprehensively considers the total dynamic integrated cost of the currently completed tasks and the estimated cost from the current state to completing all remaining tasks. Each time, the node with the smallest evaluation function value is selected from the set of nodes to be expanded. Alternatively, a weighted A* algorithm can be used, assigning different weights to the total dynamic integrated cost of the current partial sequence and the heuristic estimate of reaching the target node to adjust the greediness of the search. The total dynamic integrated cost of the current partial sequence refers to the accumulated dynamic integrated cost from the starting point of the treatment path to the sequence of currently completed treatment task nodes. This cost is calculated based on the dynamic spatiotemporal cost field, combined with the execution time of each task and the patient's travel time between tasks. The heuristic estimate of reaching the target node refers to the estimated cost from the end of the currently completed tasks to the end point of all remaining uncompleted tasks. This estimate is usually calculated based on a simplified model or rule of thumb to guide the search direction.
[0093] When the heuristic graph search is complete, the sequence of complete treatment task nodes with the lowest cost, along with the execution time of each treatment task node determined by the dynamic spatiotemporal cost field, is used as the result of the global optimization planning. The sequence of complete treatment task nodes with the lowest cost refers to the path with the lowest total dynamic cost among all feasible treatment paths that satisfy the hard filtering rules. This path represents the most economical and time-saving treatment process for the patient after considering travel and waiting costs. The execution time of each treatment task node refers to the specific time point at which each treatment task node in the sequence of complete treatment task nodes with the lowest cost is suggested to begin execution. These time points are precisely calculated based on the estimated waiting cost and travel time between tasks in the dynamic spatiotemporal cost field. The result of the global optimization planning refers to the final output obtained after global collaborative optimization calculation, which includes the optimal sequence of treatment task nodes and the suggested execution time for each task. This result is the direct basis for subsequently generating the path sequence for the patient's outpatient treatment.
[0094] By employing the aforementioned technical solution, the temporal and logical constraints in the personalized task network are transformed into hard filtering rules for the sequence of diagnostic and treatment task nodes. This application effectively limits the feasible solution space, avoiding invalid searches on paths that do not conform to medical logic or temporal order, thereby improving the efficiency of optimization computation. Based on this, a heuristic graph search is performed using a dynamic spatiotemporal cost field. The expansion strategy of the heuristic graph search is guided by the total dynamic integrated cost of the current partial sequence and the heuristic estimate of reaching the target node, enabling the search process to dynamically weigh the costs already incurred and the estimated costs of the future, thus efficiently exploring the solution space and accelerating convergence to the optimal solution. This search mechanism, combining hard constraint filtering and heuristic guidance, ensures that in complex outpatient scenarios, the complete sequence of diagnostic and treatment task nodes with the minimum cost can be found quickly and accurately, and a precise execution time can be determined for each task. This provides patients with a truly personalized and dynamically optimized treatment path, greatly improving the efficiency and experience of patient care.
[0095] This application further proposes a step to transform the temporal and logical constraints in a personalized task network into hard filtering rules for the sequence of diagnostic and treatment task nodes. This includes: extracting a first type of directed edges representing logical constraints and a second type of directed edges representing temporal constraints from the directed connections of the personalized task network. The logical constraints represented by the first type of directed edges are transformed into sequence verification rules to verify the order of tasks in the sequence of diagnostic and treatment task nodes. The temporal constraints represented by the second type of directed edges are transformed into time feasibility verification rules to verify the suggested execution time of tasks in the sequence of diagnostic and treatment task nodes. The sequence verification rules and time feasibility verification rules are integrated to form hard filtering rules, which are used to determine the feasibility of candidate sequences of diagnostic and treatment task nodes.
[0096] This process involves extracting first-type directed edges representing logical constraints and second-type directed edges representing temporal constraints from the directed connections of the personalized task network. This step aims to identify and classify different types of constraints in the personalized task network, providing a clear basis for subsequent rule transformation. One implementation is to attach a type identifier, such as "logical dependency" or "time window constraint," to each directed edge during the construction of the personalized task network. In this step, the system traverses all directed edges and classifies them according to their type identifiers. Another implementation is to identify the edge type based on predefined semantic rules or pattern matching. For example, if an edge connects tasks with explicit medical preconditions (such as "examination" must precede "diagnosis"), it is identified as a logical constraint edge. If an edge is associated with a specific time window or duration requirement, it is identified as a temporal constraint edge.
[0097] The logical constraints represented by the first type of directed edges are transformed into sequence verification rules to validate the order of tasks in a sequence of diagnostic and treatment task nodes. The purpose of this step is to convert medical dependencies into executable verification logic, ensuring that any generated task sequence conforms to medical standards. One implementation is that for each directed edge (A->B) representing a logical constraint in the personalized task network, the system generates a rule requiring that in any valid sequence of diagnostic and treatment task nodes, diagnostic and treatment task node A must appear before diagnostic and treatment task node B. During verification, this rule can be determined by checking the index position of the tasks in the sequence. Another implementation is to construct a logical dependency graph and maintain a list of direct predecessor tasks for each task node. The sequence verification rule then manifests as follows: for each task in the candidate sequence, check whether all its predecessor tasks are already in the sequence and precede the current task.
[0098] The temporal constraints represented by the second type of directed edges are transformed into temporal feasibility verification rules to validate the suggested execution times of tasks in the sequence of diagnostic task nodes. This step aims to convert time-related constraints into verifiable rules to ensure that the suggested execution times of tasks are reasonable in the temporal dimension. One implementation is that for each directed edge representing a temporal constraint in the personalized task network, the system generates a rule that checks whether the suggested start or finish time of the relevant task meets specific time window or time interval requirements. For example, if task B must start within a specific time period after task A is completed, the rule will verify whether `B_suggested start time - A_actual finish time` falls within this time period. Another implementation is to calculate a feasible earliest start time (EST) and latest start time (LST) for each task node, based on all temporal constraints. The temporal feasibility verification rule then checks whether the suggested start time of each task in the candidate sequence falls within its [EST, LST] range, and whether the sum of the execution time and duration of all tasks does not exceed the total available time.
[0099] Integrating sequential verification rules and temporal feasibility verification rules constitutes a hard filtering rule. The purpose of this step is to integrate all independent logical and temporal verification rules into a unified and comprehensive filtering mechanism to efficiently determine the feasibility of candidate treatment task node sequences. One implementation is that the system combines all generated sequential verification rules and temporal feasibility verification rules into a set of logical AND operations. When determining the feasibility of a candidate treatment task node sequence, all rules in the set are executed sequentially. Only when all rules are satisfied is the sequence deemed feasible. Otherwise, if even one rule is not satisfied, the sequence is deemed infeasible. Another implementation is to implement a unified verification engine that receives candidate treatment task node sequences as input and internally calls independent sequential verification and temporal feasibility verification modules. Only when both modules return a "pass" result does the verification engine return "feasible," thus forming an efficient hard filtering rule.
[0100] By clearly distinguishing and extracting the first type of directed edges based on logical constraints and the second type of directed edges based on temporal constraints, the confusion between different types of constraints is avoided, laying a clear foundation for subsequent rule transformation. Transforming logical constraints into sequential verification rules ensures that the generated sequence of treatment task nodes strictly adheres to medical dependencies, effectively preventing the generation of invalid paths that violate medical standards. Simultaneously, transforming temporal constraints into time feasibility verification rules allows for precise checking of whether the suggested execution time of tasks meets temporal requirements such as time windows and deadlines, thus avoiding infeasibility due to time conflicts. By integrating these two verification rules, a comprehensive and efficient hard filtering rule is constructed. This rule can quickly and accurately determine the feasibility of each candidate sequence of treatment task nodes during the heuristic graph search process. This not only significantly reduces the feasible solution space and invalid search paths but also ensures that the final output outpatient treatment path sequence is reasonable and executable in terms of medical logic and time arrangement, thereby improving the reliability of path planning and the patient's medical experience.
[0101] This application further proposes a heuristic graph search using a dynamic spatiotemporal cost field within the feasible solution space defined by hard filtering rules. Specifically, this includes: initializing a search front containing at least one state node to be expanded, where each state node contains a partially sorted subsequence of treatment task nodes and the current total dynamic integrated cost corresponding to that subsequence. A current state node to be expanded is obtained from the search front. Based on the hard filtering rules, a set of subsequent candidate treatment task nodes that can be added to the subsequence of treatment task nodes contained in the current state node to be expanded is determined. For each treatment task node in the subsequent candidate set, the dynamic spatiotemporal cost field is queried to determine the additional dynamic integrated cost incurred by adding the treatment task node to the subsequence. Based on the current total dynamic integrated cost, the additional dynamic integrated cost determined for each treatment task node, and the heuristically estimated cost for the set of unscheduled treatment task nodes, corresponding new state nodes are generated for the treatment task nodes in the subsequent candidate set, and these new state nodes are added to the search front to iteratively advance the graph search process.
[0102] The algorithm initializes a search front containing at least one state node to be expanded. Each state node contains a partially sorted subsequence of treatment task nodes and the current total dynamic cost corresponding to that subsequence. This aims to provide a structured starting point for the heuristic search algorithm, ensuring that the search process can proceed in an orderly manner from the initial state. The search front can be implemented as a priority queue, where state nodes are sorted according to their evaluated cost (current total dynamic cost plus heuristic estimated cost) to prioritize expanding the most promising paths. For example, the initial state node could contain only an empty subsequence of treatment task nodes with a current total dynamic cost of zero. Alternatively, the initial state node could contain one or more predefined starting treatment task nodes, determined based on the target patient's real-time location and the first medical order task. Each state node can be a data structure, such as a tuple or object, encapsulating the partially sorted subsequence of treatment task nodes, the current total dynamic cost corresponding to that subsequence, the heuristic estimated cost, and its parent node information.
[0103] Retrieving a current state node to be expanded from the search front is a crucial operation in heuristic search algorithms, determining the next direction of exploration. By selecting a state node to expand, the algorithm can progressively construct a complete diagnostic pathway. Specifically, if the search front is implemented as a priority queue, the highest-priority (i.e., lowest-cost) state node in the queue is directly retrieved for expansion; this is typically a variant of the A* or Dijkstra algorithm. If the search front is implemented as a regular queue or stack, nodes are retrieved according to a first-in-first-out (FIFO) or last-in-first-out (LIFO) principle; however, to optimize search efficiency, heuristic information is usually incorporated for management.
[0104] Based on hard filtering rules, a set of subsequent candidate medical task nodes that can be added to the subsequence of medical task nodes contained in the current state node to be expanded is determined. Its role is to prune during the search and expansion process, ensuring that the generated path sequence meets medical logic and timing constraints, thereby avoiding the generation of invalid or non-compliant paths. In specific implementation, the existing subsequences of medical task nodes of the current state node can be analyzed, traversing all medical task nodes not yet included in the subsequence, and applying hard filtering rules to each node. For example, checking whether the candidate node satisfies the logical constraint that all preceding tasks have been completed, and whether its suggested start time conflicts with the time windows of already sorted tasks. Another implementation approach is to pre-construct a task dependency graph, updating the status of all its dependent tasks in real time after a task is added to a subsequence, thereby quickly identifying currently executable tasks. Hard filtering rules can be expressed as a series of conditional judgment functions, taking the current subsequence and the candidate nodes to be evaluated as input, and outputting a boolean value indicating whether it is feasible.
[0105] For each treatment task node in the subsequent candidate treatment task node set, the dynamic spatiotemporal cost field is queried to determine the additional dynamic comprehensive cost incurred by adding the treatment task node to the treatment task node subsequence. The purpose is to accurately assess the cost increment brought about by adding a candidate task to the current path using the real-time cost information provided by the dynamic spatiotemporal cost field. Specifically, for each candidate treatment task node, its executing department location and estimated start time need to be determined. The dynamic spatiotemporal cost field is queried to obtain the travel cost from the execution position of the last task in the current subsequence to the execution position of the candidate task, and the estimated waiting cost of the executing department of the candidate task at the estimated start time. The sum of these two is the additional dynamic comprehensive cost. The dynamic spatiotemporal cost field can be organized as a multidimensional array or hash table, and the corresponding dynamic comprehensive cost can be quickly retrieved by using (starting task node, target task node, time point) as an index.
[0106] Based on the current total dynamic comprehensive cost, the newly added dynamic comprehensive cost determined for each treatment task node, and the heuristically estimated cost for the set of unscheduled treatment task nodes, new state nodes are generated for the treatment task nodes in the subsequent candidate treatment task node set. These new state nodes are then added to the search frontier to iteratively advance the graph search process. This step is the core of heuristic search algorithms (such as the A* algorithm). By combining the known actual cost (the sum of the current total dynamic comprehensive cost and the newly added dynamic comprehensive cost) and the estimate of future costs (heuristically estimated cost), the merits of newly generated paths are evaluated, and these paths are added to the search frontier for further exploration. The total evaluated cost of a new state node can be calculated as the sum of the actual cost from the starting node to the current node and the heuristically estimated cost from the current node to the target node (where all tasks are completed). The heuristically estimated cost can be an estimate of the sum of the minimum travel cost and the minimum waiting cost for the remaining unscheduled tasks. For example, Manhattan distance or Euclidean distance can be used as a lower bound for the travel cost, and the historical shortest waiting time can be used as a lower bound for the waiting cost. Heuristic cost estimation can also be obtained through pre-computation or model simplification; for example, by calculating the minimum travel cost from the current node to all incomplete tasks and adding the minimum waiting cost of these tasks under ideal conditions. The generated new state node contains the updated subsequence of treatment task nodes and the new current total dynamic integrated cost, and is inserted into the search front (usually a priority queue) to maintain its ordering properties.
[0107] Through the above technical solution, when initializing the search frontier, setting state nodes containing a partial sorting sequence and the current total dynamic comprehensive cost provides a structured starting point for the search process, facilitating subsequent orderly expansion and cost accumulation, and avoiding resource waste caused by random searches. The current state nodes to be expanded are obtained from the search frontier, ensuring the search process focuses on the most likely optimized path, reducing invalid traversals, and improving search directionality. A set of subsequent candidate nodes is determined based on hard filtering rules, and feasible subsequent nodes are screened using these rules, strictly limiting the search space, excluding options that do not conform to temporal and logical constraints, and reducing computational burden. For each candidate node, the dynamic spatiotemporal cost field is queried to determine the newly added dynamic comprehensive cost. The newly added cost is calculated using real-time data, ensuring that the cost assessment accurately reflects the current resource status and spatiotemporal changes, avoiding biases caused by static estimation. New state nodes are generated based on the current cost, the newly added cost, and heuristic estimates and added to the search frontier. By integrating the current accumulated cost, the real-time newly added cost, and the estimated cost of future unplanned nodes, new states are dynamically generated, achieving iterative advancement and efficiently guiding the search towards the optimal solution. This allows for rapid output of optimized planning results in complex multi-task environments, improving the real-time performance and accuracy of outpatient treatment pathway planning.
[0108] This application further proposes a method for generating and outputting the outpatient treatment pathway sequence of a target patient based on the results of global collaborative optimization calculations. See [link to relevant documentation]. Figure 5 The method includes the following steps: 501. The results of the global collaborative optimization calculation are serialized and parsed to obtain an ordered list consisting of diagnostic and treatment task node identifiers, and a time slot mapping table that maps each diagnostic and treatment task node identifier to a specific suggested start time.
[0109] This step aims to transform the complex global optimization calculation results into the basic data required for structured and easily processed navigation instructions. The ordered list clarifies the execution order of the tasks, while the time slot mapping table provides a precise suggested start time for each task, providing a temporal and sequential basis for subsequent navigation instruction generation. Specifically, by traversing the optimal path determined in the global optimization calculation results, the identification of the diagnostic task nodes is extracted according to the task execution order to form an ordered list. Simultaneously, the optimal start time corresponding to each diagnostic task node is extracted from the optimization results, and a time slot mapping table is constructed, for example, using a hash table or associative array, to associate the node identification with the suggested start time. Alternatively, the optimization calculation results themselves may already be a structure containing a task sequence and corresponding timestamps. In this case, the serialization process can directly extract the task identification and time information from this structure and store it as a key-value pair time slot mapping table.
[0110] 502. Based on the ordered list and time slot mapping table, and combined with the spatial topology information of the hospital's medical resources, generate time-constrained navigation instruction segments for adjacent medical task node pairs.
[0111] This step utilizes the established task sequence and schedule, as well as the hospital's physical layout information, to provide specific navigation guidance for patients moving between different treatment task nodes. When generating navigation command segments, time constraints are considered to ensure that patients have sufficient time to move from one location to the next and begin the next task on time.
[0112] 503. Aggregate all navigation instruction segments and inject real-time location triggering logic to generate outpatient treatment path sequences. The path sequences are configured to dynamically trigger the presentation of navigation instructions for the next treatment task node when the target patient arrives at the location corresponding to a treatment task node.
[0113] This step integrates all independent navigation command segments into a complete and executable outpatient treatment pathway sequence. The key lies in introducing real-time location-triggered logic, enabling navigation to automatically advance based on the patient's actual location and provide guidance for the next task, thus achieving a dynamic and seamless navigation experience. For example, all generated navigation command segments are concatenated according to the order of treatment tasks to form an ordered set of commands.
[0114] By employing the aforementioned technical solution and serializing and temporally parsing the optimization results, the execution order of diagnostic and treatment tasks and the precise suggested start time can be clearly determined, laying the foundation for the generation of subsequent navigation instructions. Based on this, by combining the hospital's spatial topology information, time-constrained navigation instruction segments are generated for adjacent task nodes, ensuring the rationality and feasibility of navigation and avoiding potential time conflicts or unreasonable paths that patients may encounter when moving between different departments. Furthermore, by aggregating these navigation instruction segments and injecting real-time location triggering logic, the entire diagnostic and treatment path sequence can dynamically and seamlessly provide navigation guidance based on the patient's actual location, greatly improving the patient's medical experience and treatment efficiency, reducing patient confusion and waiting time within the hospital, and ensuring that patients can efficiently and accurately execute various diagnostic and treatment tasks.
[0115] This application further proposes a method based on ordered lists and time slot mapping tables, combined with the spatial topology information of hospital medical resources, to generate time-constrained navigation instruction segments for adjacent medical task node pairs. Specifically, this includes the following steps: Each pair of adjacent diagnostic and treatment task nodes is determined based on an ordered list.
[0116] For each pair of adjacent diagnostic task nodes, one or more alternative path options are calculated from the starting diagnostic task node to the target diagnostic task node using spatial topology information.
[0117] Next, based on the time slot mapping table, the suggested start time of the target diagnosis and treatment task node is obtained, and combined with the path travel time requirements, a suggested departure time window is determined for each of one or more optional path options.
[0118] The suggested departure time window, the corresponding path options, and the identifiers of the starting and target treatment task nodes are encapsulated to generate a navigation instruction segment. The navigation instruction segment is used to instruct that within the suggested departure time window, one should travel from the starting treatment task node to the target treatment task node via a specified path.
[0119] The ordered list, obtained after serialization and time parsing of the global collaborative optimization calculation results, is an ordered sequence of diagnostic and treatment task node identifiers, clearly defining the order in which the patient needs to perform diagnostic and treatment tasks. For example, this ordered list can be an array or a linked list, where each element represents a diagnostic and treatment task node, and its position in the list determines its execution order. Determining each pair of adjacent diagnostic and treatment task nodes based on this ordered list involves traversing the list and identifying two consecutive diagnostic and treatment task nodes as an adjacent pair. For example, if the ordered list is [Task A, Task B, Task C], then (Task A, Task B) and (Task B, Task C) will be identified as adjacent diagnostic and treatment task node pairs. This ensures the continuity and completeness of navigation instructions, covering all necessary steps for the patient to move from one diagnostic and treatment task point to the next.
[0120] Spatial topology information describes the physical layout and connections within a hospital, including floor plans, department locations, corridors, elevators, and staircases. This information can be stored as a graph model (such as a connected graph), where vertices represent key locations (e.g., department entrances, elevator entrances), edges represent paths connecting these locations, and edge weights can represent travel distance or travel time. Calculating one or more alternative paths from the starting treatment task node to the target treatment task node using spatial topology information involves finding all feasible or optimal paths connecting two treatment task nodes based on the hospital's physical layout data using path search algorithms (such as Dijkstra's algorithm, A* algorithm, or Floyd's algorithm). For example, it can calculate the shortest path, the path with the fewest transfers, or a path avoiding congested areas. Providing multiple alternative path options aims to increase navigation flexibility to address potential temporary congestion, equipment malfunctions, or patient preferences within the hospital.
[0121] A time-slot mapping table is a data structure that maps each treatment task node identifier to its specific suggested start time. It can be a hash table or dictionary, where the key is the treatment task node identifier and the value is the suggested start time for that task. Obtaining the suggested start time of the target treatment task node involves querying the time-slot mapping table for the corresponding scheduled start time. The path travel time requirement refers to the time required to move from the starting treatment task node to the target treatment task node. This can be estimated by considering the distance, travel speed, and historical travel data of the available path options. Combining the suggested start time and the path travel time requirement, the suggested departure time window is determined. This involves subtracting the estimated path travel time from the suggested start time of the target treatment task node to obtain the time range within which the patient should depart from the starting treatment task node. For example, if the suggested start time of the target task is 10:00 and the estimated travel time is 15 minutes, then the suggested departure time window could be 9:40-9:45, allowing for a buffer period. This ensures that patients have ample time to complete the transfer, avoiding missing the start time of their next treatment due to delays in access.
[0122] Encapsulating the suggested departure time window, corresponding path options, and identifiers of the starting and target treatment task nodes to generate a navigation instruction segment means integrating the calculated and determined information into a structured data packet. For example, a navigation instruction segment might include: starting node ID, target node ID, suggested departure time window (start time, end time), path options (path ID, path description, key waypoint sequence), etc. The navigation instruction segment instructs the user to travel from the starting treatment task node location to the target treatment task node location via a specified path within the suggested departure time window. This means that the instruction segment will serve as input to the patient navigation system, guiding the patient to move from their current location to the next treatment task location within a specific time period, following a preset path.
[0123] The above technical solution ensures the continuity and integrity of navigation instructions by determining adjacent treatment task node pairs based on an ordered list, avoiding information gaps. Utilizing spatial topology information to calculate multiple alternative path options enhances the flexibility and robustness of path planning, enabling it to adapt to dynamic changes within the hospital. More importantly, by obtaining the suggested start time of the target task from a time slot mapping table and combining it with path travel time to determine the suggested departure time window, the time dimension is introduced into the navigation instructions. This allows patients to rationally plan their departure time, avoiding arriving too early and causing waiting, or departing too late and missing appointments. Encapsulating this information into navigation instruction segments allows for dynamic triggering and presentation to patients, thereby improving the accuracy and overall efficiency of outpatient treatment pathways and optimizing the patient's medical experience.
[0124] This application further proposes that, in response to the target patient's path generation request, before generating a personalized task network based on the target patient's outpatient structured electronic medical orders, real-time location, and real-time status data of the hospital's medical resources, the method further includes: obtaining the target patient's outpatient structured electronic medical orders, real-time location, and real-time status data of the hospital's medical resources.
[0125] Specifically, obtaining structured electronic medical orders for target patients refers to acquiring a set of medical instructions issued by doctors after a patient's outpatient visit, stored in structured data format. This includes the various diagnostic and treatment items the patient needs to undergo, the executing departments, the type of item, and any potential medical constraints, providing a foundational and accurate source of medical information for subsequent treatment tasks. For example, this can be achieved by interfaceing with the hospital's Electronic Medical Record (EMR) or Chief Medical Order (CPOE) system. After the patient completes their doctor's treatment, the system can retrieve the patient's latest electronic medical order data from these systems in real-time or periodically. This data is typically stored in XML, JSON, or other structured formats for easy parsing. Alternatively, after patient authorization, the system can retrieve the patient's current electronic medical order information from the Hospital Information System (HIS) via a patient-side application or self-service terminal. The system performs data format verification and standardization during retrieval to ensure the integrity and parsability of the medical order information.
[0126] Real-time location acquisition refers to obtaining the physical geographical location information of the target patient. Its purpose is to serve as the starting point for path planning, ensuring that the generated treatment path begins from the patient's current location, thereby providing accurate navigation and time estimation. For example, the precise indoor or outdoor location coordinates can be obtained through the positioning module (such as GPS, Wi-Fi positioning, or Bluetooth Beacon positioning) built into the patient's smart device (such as a smart bracelet or smartphone), and the location data can be uploaded to the system in real time. Alternatively, the patient's location can be tracked in real time within the hospital using a positioning system deployed within the hospital (such as an indoor positioning system based on UWB, RFID, or Bluetooth), combined with the patient's unique identifier (such as a medical card number or mobile phone number), and the patient's location information will be updated regularly.
[0127] Obtaining real-time status data of hospital medical resources refers to acquiring dynamic information such as the current availability, queuing status, and service load of various medical service facilities within the hospital (e.g., examination equipment, laboratory windows, pharmacies, and consultation rooms). Its purpose is to provide real-time resource constraints and optimization basis for route planning, ensuring that the generated routes avoid congestion, utilize idle resources, and improve efficiency. For example, data can be integrated with the hospital's queuing and calling system, equipment management system, and HIS system to collect real-time data on the current number of people queuing, average waiting time, equipment operating status (idle / occupied / malfunctioning), and staff on-duty status in various departments, examination rooms, pharmacies, and other areas. Alternatively, sensors or cameras can be deployed at various medical resource points, combined with artificial intelligence image recognition technology or IoT devices, to automatically monitor and statistically analyze personnel density, queue length, and equipment usage in each area, and transmit this data in real-time to a central processing system for aggregation and analysis.
[0128] Through the aforementioned technical solutions, the acquisition of structured electronic medical orders in outpatient settings provides accurate and complete foundational information for subsequent parsing of medical orders, determination of the initial set of treatment tasks, and identification of medical logical dependencies between tasks. Real-time location acquisition provides a precise starting point for subsequent task filtering and initialization based on the patient's current location, as well as for calculating travel costs. Furthermore, the acquisition of real-time status data of hospital treatment resources provides crucial real-time resource load information for subsequent task filtering, initialization priority determination, and the construction of a dynamic spatiotemporal cost field, enabling path planning to fully consider resource availability and queuing conditions. Therefore, this pre-emptive data acquisition mechanism allows the entire outpatient treatment path dynamic generation method to operate in a data-complete and real-time updated environment, improving the success rate and accuracy of generating personalized task networks, thereby enhancing the reliability of global collaborative optimization calculations, and ultimately providing patients with a more accurate, efficient, and adaptable outpatient treatment path sequence.
[0129] The following example provides a more detailed explanation of the above technical solution, using a hospital pathway generation system as the implementing entity: Suppose a patient, A, receives a structured electronic medical order (EEG) containing multiple diagnostic and treatment tasks after completing an initial consultation at a hospital. This order requires patient A to undergo a blood test (executed by the laboratory), an X-ray (executed by the radiology department), and to pick up medication from the pharmacy. Patient A is currently located at the hospital entrance. The hospital can obtain real-time data on patient A's current location, the content of their structured EEG, and the real-time status of various hospital resources (such as the laboratory, radiology, and pharmacy), including the current number of people queuing in each department and equipment usage.
[0130] The system responds to patient A's path generation request and begins constructing a personalized task network. It parses patient A's structured electronic medical order from the outpatient records, identifying three initial treatment tasks: Task 1 (blood test), Task 2 (X-ray examination), and Task 3 (medication pickup). Simultaneously, the system parses the corresponding department identifiers (laboratory, radiology, pharmacy), item types, and medical constraint parameters for these tasks. For example, medical constraint parameters might indicate that Task 3 (medication pickup) can only be executed after Tasks 1 and 2 are completed. Based on this information and a predefined clinical rule base, the system identifies the medical logical dependencies between Tasks 1 and 2 and Task 3; that is, Task 3 depends on the completion of Tasks 1 and 2.
[0131] Combining patient A's real-time location (hospital entrance) and real-time status data of hospital resources, the initial set of treatment tasks is filtered and initialized. Based on the resource queue lengths in the real-time status data (e.g., 5 people in the lab, 3 in the radiology department, and 10 in the pharmacy) and preset resource load weighting coefficients, the system calculates the real-time resource pressure value for each treatment task. Simultaneously, based on patient A's real-time location and the preset location identifiers of each department (e.g., lab on the 2nd floor of area A, radiology on the 1st floor of area B, and pharmacy on the 1st floor of area C), the system determines the relative access cost from patient A's current location to each department. Based on these real-time resource pressure values and relative access costs, and through predefined filtering thresholds, all three tasks are determined to be executable, forming a set of executable treatment task nodes. Each task node is assigned an initialization priority parameter determined by both the real-time resource pressure value and the relative access cost. For example, task 2 (X-ray examination) has a higher initialization priority due to its relatively low resource pressure and access cost.
[0132] Based on the established medical logical dependencies, initial timing constraints are generated. Tasks in the executable diagnostic task node set are topologically sorted to generate a basic task execution sequence (e.g., tasks 1 and 2 can run in parallel, but must precede task 3). According to the initialization priority parameters of each task and the resource readiness status in real-time status data, preliminary time windows are allocated to the tasks in the basic task execution sequence. For example, it is suggested that task 2 start from 9:00-9:30, task 1 from 9:15-9:45, and task 3 after 10:30. These allocations constitute the initial timing constraints.
[0133] Based on this, the system generates a personalized task network. The system creates Task 1, Task 2, and Task 3 as corresponding treatment task nodes and configures node attributes, including the executing department, estimated service duration, and initial priority parameters. Based on medical logical dependencies, the system establishes directed edges representing logical constraints between Task 1, Task 2, and Task 3 nodes (e.g., from Task 1 to Task 3, and from Task 2 to Task 3). Based on initial temporal constraints, the system establishes directed edges representing temporal constraints between nodes. After structural verification and simplification, the final personalized task network consists of treatment task nodes and directed edges.
[0134] Simultaneously, the system constructs a dynamic spatiotemporal cost field. Based on the hospital's spatial topology information, the system establishes a mapping relationship between medical task nodes and the hospital's physical locations, and determines the baseline travel cost between any two medical task node locations. For example, the baseline travel cost from the laboratory to the radiology department is 5 minutes of walking. The system also performs fusion analysis on real-time queuing status data and historical operational patterns. It extracts periodic features from historical operational patterns to obtain the historical average service rate and typical queuing load patterns of each medical resource node over multiple consecutive time slices. Combining the current queue length and real-time service rate from the real-time queuing status data, it iterative calculations using a queue evolution model generate the estimated waiting cost for each medical resource node over multiple consecutive time slices. For example, the estimated waiting cost for the laboratory from 9:00 to 9:05 is 10 minutes, and from 9:05 to 9:10 is 8 minutes. The system spatiotemporally aligns and couples the baseline travel cost with the estimated waiting cost to obtain the dynamic spatiotemporal cost field. This cost field is organized as a data structure that supports joint queries based on treatment task nodes and future time points. It can associate a dynamic comprehensive cost for each treatment task node at different time points, which consists of the passage cost and the estimated waiting cost.
[0135] The system uses the temporal and logical constraints in the personalized task network as execution conditions and the dynamic comprehensive cost mapped by the dynamic spatiotemporal cost field as the optimization index to perform global collaborative optimization calculations. The system transforms the temporal and logical constraints in the personalized task network into hard filtering rules for the sequence of diagnostic and treatment task nodes. For example, task 3 must follow tasks 1 and 2, and its start time cannot be earlier than the completion time of the preceding task plus the necessary waiting time. Within the feasible solution space defined by these hard filtering rules, the system uses the dynamic spatiotemporal cost field for heuristic graph search. The search process is guided by the total dynamic comprehensive cost of the current partial sequence and the heuristic estimate of reaching the target node. For example, it evaluates the total dynamic comprehensive cost of two paths at different time points: "go to the radiology department first, then the laboratory, and finally the pharmacy" and "go to the laboratory department first, then the radiology department, and finally the pharmacy." The system might discover that although the current queue in the laboratory is long, if patient A goes to the radiology department first (shorter queue, shorter route), then to the laboratory, and finally to the pharmacy, the overall time will be shorter. This is because the waiting time in the radiology department can be effectively utilized, and the queue in the pharmacy may have already shortened by the time the patient completes the first two tasks. When the heuristic graph search is complete, the system obtains the complete sequence of diagnostic and treatment task nodes with the minimum cost (e.g., hospital entrance -> task 2 (radiology department) -> task 1 (laboratory department) -> task 3 (pharmacies)) and the dynamic spatiotemporal cost field, which determines the execution time of each diagnostic and treatment task node for this sequence, as the result of the global optimization planning.
[0136] Based on the results of global collaborative optimization calculations, the system generates and outputs the outpatient treatment path sequence for patient A. The optimization results are serialized and parsed temporally to obtain an ordered list of treatment task node identifiers (e.g., [hospital entrance, task 2, task 1, task 3]) and a time-slot mapping table that maps each treatment task node identifier to a specific suggested start time (e.g., task 2: 9:00, task 1: 9:30, task 3: 10:45). Based on this ordered list and time-slot mapping table, and combined with the hospital's spatial topology information, the system generates time-constrained navigation instruction segments for adjacent treatment task node pairs. For example, for a node pair from the hospital entrance to task 2 (radiology department), the system calculates the travel time from the hospital entrance to the radiology department and, combined with the suggested start time of task 2 (9:00), determines a suggested departure time window (e.g., 8:55-9:00). The system encapsulates this information into a navigation instruction segment: "Please depart from the hospital entrance between 8:55 and 9:00 and walk to the radiology department." The system aggregates all navigation instruction segments and injects real-time location triggering logic to generate the final outpatient treatment path sequence. This path sequence is configured so that when patient A arrives at the location corresponding to a treatment task node, the system dynamically triggers the presentation of navigation instructions for the next treatment task node. For example, when patient A arrives at the radiology department, the system will prompt: "You have arrived at the radiology department. Please depart from the radiology department between 9:25 and 9:30 and walk to the laboratory." Through the above method, patient A obtains a fully dynamic and overall optimal task execution path plan. Compared with existing systems that only provide static navigation or initial department matching based on symptoms, this solution can dynamically adjust and optimize the entire treatment process based on real-time changes in hospital resource status (such as queuing status and equipment occupancy) and the patient's real-time location. This avoids patients blindly running around between different departments and long waiting times, improving medical efficiency and experience, and solving the problem that related technologies cannot provide patients with optimal multi-task execution sequences across multiple departments and resources. In some embodiments, the technical solution provided in this application can be used to provide... Figure 6 The interface shown is used to guide patients through their medical treatment.
[0137] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0138] The above are merely optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A dynamic generation method of outpatient treatment path based on real-time data fusion, characterized in that, The method includes: In response to the path generation request of the target patient, a personalized task network is generated based on the target patient's outpatient structured electronic medical orders, real-time location, and real-time status data of the hospital's medical resources. The personalized task network includes multiple medical task nodes and temporal and logical constraints between the medical task nodes. Based on the spatial topology information of the hospital's medical resources, real-time queuing status data, and historical operation patterns, a dynamic spatiotemporal cost field is constructed. The dynamic spatiotemporal cost field associates a dynamic comprehensive cost with each medical task node at different time points. The dynamic comprehensive cost is composed of the passage cost calculated based on the spatial topology information and the estimated waiting cost determined based on the real-time and historical data. Using the temporal and logical constraints in the personalized task network as execution conditions and the dynamic comprehensive cost of the dynamic spatiotemporal cost field mapping as the optimization index, global collaborative optimization calculation is performed to obtain the global optimization planning result. Based on the results of the global collaborative optimization calculation, a path sequence for outpatient treatment of the target patient is generated and output. The path sequence is used to indicate the spatial order of performing various treatment tasks and the suggested start time of each task.
2. The method of claim 1, wherein, The personalized task network is generated based on the target patient's outpatient structured electronic medical orders, real-time location, and real-time status data of the hospital's medical resources, including: The structured electronic medical orders for outpatient services are parsed to obtain an initial set of treatment tasks and the medical logical dependencies between the tasks. Based on the real-time location and the real-time status data, the initial set of diagnosis and treatment tasks is filtered and initialized to determine the set of executable diagnosis and treatment task nodes, and the initial timing constraints are determined in combination with the medical logic dependencies. Based on the set of executable diagnostic and treatment task nodes, the medical logical dependencies, and the initial temporal constraints, the personalized task network is generated. Each diagnostic and treatment task node in the set of diagnostic and treatment task nodes corresponds to a diagnostic and treatment task. The directed connections between nodes represent the logical constraints defined by the medical logical dependencies and / or the temporal constraints defined by the initial temporal constraints.
3. The method of claim 2, wherein, The step of filtering and initializing the initial set of diagnostic and treatment tasks based on the real-time location and the real-time status data to determine the set of executable diagnostic and treatment task nodes includes: Based on the resource queue length and device status data in the real-time status data, as well as the preset resource load weight coefficient, the real-time resource pressure value corresponding to each diagnosis and treatment task in the initial diagnosis and treatment task set is determined. Based on the real-time location and the preset location identifiers of the departments corresponding to each medical task obtained from the initial set of medical tasks, the relative travel cost from the location pointed to by the real-time location to each department is determined. Based on the real-time resource pressure value and the relative access cost, a decision is made through a predefined screening threshold to obtain the set of executable diagnosis and treatment task nodes. The diagnosis and treatment tasks included in the set of executable diagnosis and treatment task nodes are assigned an initialization priority parameter determined by the real-time resource pressure value and the relative access cost.
4. The method according to claim 1, characterized in that, The construction of a dynamic spatiotemporal cost field based on the spatial topology information of the hospital's medical resources, real-time queuing status data, and historical operational patterns includes: Based on the spatial topology information, a mapping relationship between the diagnosis and treatment task nodes and the physical location of the hospital is established, and the baseline travel cost between any two diagnosis and treatment task node locations is determined. By integrating and analyzing the real-time queuing status data with the historical operational patterns, the estimated waiting cost of each medical resource node in multiple consecutive time slices in the future can be determined. The baseline passage cost and the estimated waiting cost are spatiotemporally aligned and coupled to obtain the dynamic spatiotemporal cost field. The dynamic spatiotemporal cost field is organized into a data structure that supports joint queries based on treatment task nodes and future time points to provide the dynamic comprehensive cost.
5. The method according to claim 4, characterized in that, The process of establishing a mapping relationship between medical task nodes and hospital physical locations based on the spatial topology information, and determining the baseline travel cost between any two medical task node locations, includes: The spatial topology information is analyzed to construct a connected graph model with key passage locations within the hospital as vertices and connecting paths as edges; In the connected graph model, the physical location of the department corresponding to each diagnosis and treatment task node is located, and the physical location is mapped to the vertex representing the location of each department in the connected graph model; Based on the weights of the edges in the connected graph model, the optimal path cost between each pair of vertices representing the locations of each department, which are mapped by the diagnosis and treatment task nodes, is determined, and the optimal path cost is determined as the baseline travel cost between the two diagnosis and treatment task node locations.
6. The method according to claim 1, characterized in that, The process involves using the temporal and logical constraints in the personalized task network as execution conditions and the dynamic comprehensive cost of the dynamic spatiotemporal cost field mapping as the optimization index to perform global collaborative optimization calculations, resulting in a global optimization planning outcome, including: The temporal and logical constraints in the personalized task network are transformed into hard filtering rules for the sequence of diagnosis and treatment task nodes; In the feasible solution space defined by the hard filtering rules, a heuristic graph search is performed using the dynamic spatiotemporal cost field, wherein the expansion strategy of the heuristic graph search is jointly guided by the total dynamic synthesis cost of the current partial sequence and the heuristic estimate of reaching the target node. When the heuristic graph search is completed, the sequence of complete treatment task nodes with the lowest cost and the execution time of each treatment task node determined by the dynamic spatiotemporal cost field of the complete treatment task node sequence are used as the result of the global optimization planning.
7. The method according to claim 6, characterized in that, The step of transforming the temporal and logical constraints in the personalized task network into hard filtering rules for the sequence of diagnostic task nodes includes: From the directed connections of the personalized task network, extract the first type of directed edges representing logical constraints and the second type of directed edges representing temporal constraints. The logical constraints represented by the first type of directed edges are transformed into sequential verification rules for verifying the order of tasks in the sequence of diagnosis and treatment task nodes. The temporal constraints represented by the second type of directed edges are transformed into temporal feasibility verification rules for verifying the execution time of task suggestions in the sequence of diagnosis and treatment task nodes. The sequential verification rule and the temporal feasibility verification rule are integrated to form the hard filtering rule, which is used to determine the feasibility of candidate diagnosis and treatment task node sequences.
8. The method according to claim 6, characterized in that, The step of performing heuristic graph search using the dynamic spatiotemporal cost field in the feasible solution space defined by the hard filtering rules includes: Initialize a search front containing at least one state node to be expanded, each state node containing a partially sorted subsequence of diagnostic and treatment task nodes and the current total dynamic integrated cost corresponding to the subsequence of diagnostic and treatment task nodes; Obtain a current state node to be expanded from the search frontier; Based on the hard filtering rules, a set of subsequent candidate diagnostic and treatment task nodes that can be added to the subsequence of diagnostic and treatment task nodes contained in the current state node to be expanded is determined. For each treatment task node in the subsequent candidate treatment task node set, query the dynamic spatiotemporal cost field to determine the additional dynamic comprehensive cost generated by adding the treatment task node to the treatment task node subsequence; Based on the current total dynamic comprehensive cost, the newly added dynamic comprehensive cost determined for each treatment task node, and the heuristically estimated cost for the set of unscheduled treatment task nodes, new state nodes are generated for the treatment task nodes in the subsequent candidate treatment task node set, and the generated new state nodes are added to the search frontier to iteratively advance the graph search process.
9. The method according to claim 1, characterized in that, The process of generating and outputting the outpatient treatment pathway sequence for the target patient based on the results of the global collaborative optimization calculation includes: The results of the global collaborative optimization calculation are serialized and parsed to obtain an ordered list consisting of diagnostic and treatment task node identifiers, and a time slot mapping table that maps each diagnostic and treatment task node identifier to a specific suggested start time. Based on the ordered list and the time slot mapping table, and combined with the spatial topology information of the hospital's medical resources, navigation instruction segments based on time constraints are generated for adjacent medical task node pairs. All navigation instruction segments are aggregated and real-time location triggering logic is injected to generate the path sequence of the outpatient treatment. The path sequence is configured to dynamically trigger the presentation of navigation instructions for the next treatment task node when the target patient arrives at the location corresponding to a treatment task node.
10. The method according to claim 9, characterized in that, Based on the ordered list and the time slot mapping table, and combined with the spatial topology information of the hospital's medical resources, the process of generating time-constrained navigation instruction segments for adjacent medical task node pairs includes: Each pair of adjacent diagnostic and treatment task nodes is determined based on the ordered list; For each pair of adjacent diagnostic task nodes, one or more alternative path options from the starting diagnostic task node to the target diagnostic task node are calculated using the spatial topology information. Based on the time slot mapping table, the suggested start time of the target diagnosis and treatment task node is obtained, and combined with the path travel time requirement, a suggested departure time window is determined for each of the one or more optional path options; The suggested departure time window, the corresponding path options, and the identifiers of the starting treatment task node and the target treatment task node are encapsulated to generate a navigation instruction segment. The navigation instruction segment is used to instruct that within the suggested departure time window, one should travel from the starting treatment task node location to the target treatment task node location via a specified path.