Medical advice distribution method and device, electronic equipment and storage medium

By optimizing the allocation of medical orders through graph theory clustering algorithms, a drug compatibility set is generated and allocated to the appropriate workstation. This solves the problems of efficiency, safety, and effectiveness in the allocation of medical orders in the intravenous medication preparation center, and realizes the timely delivery of emergency medications and the standardization of drug preparation.

CN121768569APending Publication Date: 2026-03-31SUZHOU IRON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In intravenous medication preparation centers, how to efficiently and safely allocate medical orders to ensure timely delivery of emergency medications, avoid drug incompatibilities, and improve preparation efficiency has become an urgent problem to be solved.

Method used

Graph theory clustering algorithms, especially maximum clique search, community detection, or Louvain's method, are used to generate drug compatibility sets. High-risk drugs are assigned to biosafety cabinets, while non-high-risk drugs are assigned to different workstations. By combining time window management and drug attribute similarity, the medical order allocation process is optimized.

Benefits of technology

It enables efficient allocation of medical orders, ensures timely delivery of emergency medications, avoids drug incompatibilities, improves dispensing efficiency and safety, and reduces repetitive procedures for pharmacists.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121768569A_ABST
    Figure CN121768569A_ABST
Patent Text Reader

Abstract

The invention discloses a doctor's advice distribution method and device, electronic equipment and a storage medium, and the method comprises the following steps: obtaining a plurality of doctor's advices needing to be completed, and the time for each planned medication, the time for allocation and the time for delivery of logistics in a hospital; generating the latest deployment start time and the latest deployment completion time corresponding to each doctor's advice; dividing the operation time into a plurality of end-to-end adjacent time windows, obtaining a target time window in which the latest deployment starting time of each doctor's advice falls, and adding the doctor's advice into the doctor's advice set; performing the following processing on each time window: dividing drugs into a plurality of high-risk drugs and a plurality of non-high-risk drugs, and dividing all the non-high-risk drugs into a plurality of compatibility sets; all high-risk drugs correspond to a biological safety cabinet, and each compatibility set corresponds to different workbenches. Therefore, medical advice distribution is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drug distribution technology, and in particular to a method, apparatus, electronic device, and storage medium for dispensing medical orders. Background Technology

[0002] The Pharmacy Intravenous Admixture Services (PIVAS) is an indispensable core department in the modern hospital pharmacy service system. It undertakes the centralized preparation of intravenous infusions for the entire hospital and is a key hub for ensuring clinical medication safety and improving the standardization of infusion preparation. One of its core workflows is the "batch" management of long-term prescriptions (such as daily infusion prescriptions for inpatients) and temporary prescriptions (such as emergency or postoperative infusion needs). This step is not simply prescription classification, but rather a systematic determination of which medications must be prepared and dispensed by the same qualified pharmacist at the same time window, on the same workstation, and by multiple factors, including clinical medication time requirements, drug compatibility characteristics, preparation equipment resources, and pharmacist workload.

[0003] Specifically, the "batch" operation must adhere to three core principles: First, timeliness matching, prioritizing the preparation of infusion batches for emergency and critically ill patients to ensure timely delivery of emergency medications; second, safety compatibility, processing drugs with incompatibilities or stability differences in batches to avoid cross-contamination or impaired efficacy during preparation; and third, efficiency optimization, reducing repetitive steps for pharmacists and improving overall preparation efficiency by rationally batching and integrating infusion prescriptions with the same solvent and similar dosage forms. This step serves as a bridge between prescription review and drug preparation, and is a key node in coordinating clinical needs and preparation resources. It directly impacts the quality of intravenous medication preparation, delivery timeliness, and medical cost control, and is a crucial foundation for the standardized operation of intravenous medication preparation centers.

[0004] Therefore, how to allocate medical orders in intravenous medication preparation centers has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, the main objective of the present invention is to provide a method, apparatus, electronic device and storage medium for dispensing medical orders.

[0006] To achieve the above objectives, the technical solution of the present invention is implemented as follows: a method for allocating medical orders in an intravenous medication preparation center, comprising the following steps: obtaining multiple medical orders that need to be completed within the preset operating time of the intravenous medication preparation center, as well as the planned medication time T_admin, preparation time T_mix, and in-hospital logistics delivery time T_transport for each medical order; generating the latest preparation start time and the latest preparation completion time corresponding to each medical order; wherein, the operating time is later than the current time; the operating time of the intravenous medication preparation center is divided into multiple consecutive time windows, and a set of medical orders corresponding to each time window, the initial value of all medical order sets being empty; performing the following operations for each medical order: the latest delivery time T_delivery_max of the medical order = the planned medication time T_admin - T_buffer of the medical order, the latest preparation completion time T_mix_end of the medical order = the latest delivery time T_de `livery_max` is the in-hospital logistics delivery time `T_transport` for the medical order; `T_mix_start` is the latest dispensing start time for the medical order, which equals the latest dispensing completion time `T_mix_end` minus the dispensing time `T_mix`. The target time window into which the latest dispensing start time `T_mix_start` falls is obtained, and the medical order is added to the medical order set corresponding to the target time window. For each time window, the following processing is performed: All medications in the medical orders within the medical order set corresponding to the time window are divided into several high-risk medications and several non-high-risk medications. A graph model is constructed with all non-high-risk medications as nodes, compatibility relationships as edges, and attribute similarity as weights. A graph theory clustering algorithm is used to generate several compatibility sets. In each compatibility set, any two non-high-risk medications are compatible, and their attribute similarity is less than a preset threshold. All high-risk medications are mapped to biosafety cabinets, and each compatibility set is mapped to a different workbench.

[0007] As an improvement to this embodiment of the invention, the graph theory clustering algorithm is specifically the maximum clique search algorithm.

[0008] As an improvement to this embodiment of the invention, the graph theory clustering algorithm is specifically a community detection algorithm.

[0009] As an improvement to this embodiment of the invention, the graph theory clustering algorithm is specifically the Louvain method.

[0010] This invention also provides a prescription allocation device for an intravenous medication preparation center, comprising the following modules: an information acquisition module, used to acquire multiple prescriptions that need to be completed within the preset operating time of the intravenous medication preparation center, as well as the planned medication time T_admin, preparation time T_mix, and in-hospital logistics delivery time T_transport for each prescription; generating the latest preparation start time and latest preparation completion time for each prescription; wherein the operating time is later than the current time; a prescription initial allocation module, used to divide the operating time of the intravenous medication preparation center into multiple consecutive time windows, and a prescription set corresponding to each time window, wherein the initial value of all prescription sets is empty; performing the following operations for each prescription: the latest delivery time T_delivery_max of the prescription = the planned medication time T_admin - T_buffer of the prescription, and the latest preparation completion time T_mix_end of the prescription = the latest delivery time T_deli very_max - the in-hospital logistics delivery time T_transport of the medical order; the latest dispensing start time T_mix_start of the medical order = the latest dispensing completion time T_mix_end of the medical order - the dispensing time T_mix of the medical order; obtain the target time window into which the latest dispensing start time T_mix_start of the medical order falls, and add the medical order to the medical order set corresponding to the target time window; the medical order re-allocation module is used to perform the following processing on each time window: divide the drugs in all medical orders in the medical order set corresponding to the time window into several high-risk drugs and several non-high-risk drugs, construct a graph model with all non-high-risk drugs as nodes, compatibility relationships as edges and attribute similarity as weights, and use graph theory clustering algorithm to generate several compatibility sets. In each compatibility set, any two non-high-risk drugs are compatible and the attribute similarity is < preset threshold; map all high-risk drugs to biosafety cabinets, and map each compatibility set to different workbenches.

[0011] As an improvement to this embodiment of the invention, the graph theory clustering algorithm is specifically the maximum clique search algorithm.

[0012] As an improvement to this embodiment of the invention, the graph theory clustering algorithm is specifically a community detection algorithm.

[0013] As an improvement to this embodiment of the invention, the graph theory clustering algorithm is specifically the Louvain method.

[0014] This invention also provides an electronic device, including: a memory for storing executable instructions; and a processor for implementing the above-described medical order allocation method when executing the executable instructions stored in the memory.

[0015] This invention also provides a storage medium storing executable instructions for inducing a processor to execute the aforementioned medical order allocation method.

[0016] The prescription allocation method, device, electronic device, and storage medium provided in this invention have the following advantages: This invention discloses a prescription allocation method, device, electronic device, and storage medium. The prescription allocation method includes the following steps: obtaining multiple prescriptions to be completed, as well as the planned medication time, dispensing time, and in-hospital logistics delivery time; generating the latest dispensing start time and latest dispensing completion time for each prescription; dividing the operating time into multiple adjacent time windows, obtaining the target time window into which the latest dispensing start time of each prescription falls, and adding the prescription to the prescription set; performing the following processing on each time window: classifying drugs into several high-risk drugs and several non-high-risk drugs, and classifying all non-high-risk drugs into several compatibility sets; mapping all high-risk drugs to biosafety cabinets, and mapping each compatibility set to different workbenches. This completes the prescription allocation. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the medical order allocation method provided in an embodiment of the present invention. Detailed Implementation

[0018] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.

[0019] The following description and accompanying drawings fully illustrate specific embodiments described herein to enable those skilled in the art to practice them. Some embodiments may include or substitute parts and features of other embodiments. The scope of the embodiments herein encompasses the entire scope of the claims and all available equivalents thereof. Throughout this document, the terms “first,” “second,” etc., are used only to distinguish one element from another without requiring or implying any actual relationship or order between the elements. Indeed, a first element can also be referred to as a second element, and vice versa. Furthermore, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a structure, apparatus, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a structure, apparatus, or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the structure, apparatus, or device that includes said element. The various embodiments described herein are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments; similar or identical parts between embodiments can be referred to interchangeably.

[0020] The terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer" used in this document to indicate orientation or positional relationships are based on the orientation or positional relationships shown in the accompanying drawings and are used only for the convenience of describing this document and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention. In the description herein, unless otherwise specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two elements, or direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0021] This invention provides a method for distributing medical orders in an intravenous medication preparation center, such as... Figure 1 As shown, it includes the following steps: Step 101: Obtain the multiple medical orders that need to be completed within the preset operating time of the intravenous medication preparation center, as well as the planned medication time T_admin, preparation time T_mix, and in-hospital logistics delivery time T_transport for each medical order; generate the latest preparation start time and the latest preparation completion time for each medical order; wherein, the operating time is later than the current time; The hospital logistics delivery time T_transport is the average delivery time from PIVAS to the target ward, and the dispensing time T_mix is ​​the average operation time required to dispense the drug. Both the dispensing time T_mix and the hospital logistics delivery time T_transport can be calculated from historical data.

[0022] Here, the data for medication orders can come from intravenous medication orders in the Hospital Information System (HIS). These orders contain key information such as patient information, medication type, dosage, planned administration time, and ward. The initial processing of this data involves: data reception and standardized parsing. The system continuously monitors the HIS interface. When one or more new orders are received, the parsing process is triggered. Specifically, key fields are extracted: for each order, a unique identifier, ward, patient ID, medication information, planned administration time (Planned Administration Time), administration frequency (e.g., QD, BID), and order type (long-term, temporary, emergency STAT) are parsed. Time standardization converts the "planned administration time" into a unified system internal timestamp format (e.g., Unix timestamp) to eliminate time zone and individual format differences. Data completion involves retrieving the default dispensing time (T_mix, unit: minutes) and in-hospital logistics delivery time (T_transport, unit: minutes) from the built-in drug knowledge base based on the medication information.

[0023] Using the planned medication time specified in the doctor's order as the anchor point, this time is the scheduled time for clinical nurses to administer intravenous medication to patients. Working backward from the planned medication time, the latest preparation completion time is calculated. This time setting needs to consider two key time-consuming factors: first, the time it takes for the medication to be transported from the PIVAS (Pharmacy Intravenous Admixture Services) to the corresponding ward after preparation; and second, the time it takes for the ward nurse to receive the medication, verify it, and prepare for administration. For example, if a doctor's order specifies a planned medication time of 10:00, and medication transportation and ward verification take 30 minutes, then the latest preparation completion time is 9:30. Exceeding this time may lead to delays in clinical medication administration.

[0024] Step 102: The operating time of the intravenous medication preparation center is divided into multiple consecutive time windows, and a set of medical orders corresponding to each time window. The initial value of all medical order sets is empty. For each medical order, the following operations are performed: the latest delivery time of the medical order T_delivery_max = the planned medication time of the medical order T_admin - T_buffer, the latest preparation completion time of the medical order T_mix_end = the latest delivery time of the medical order T_delivery_max - the in-hospital logistics delivery time of the medical order T_transport, and the latest preparation start time of the medical order T_mix_start = the latest preparation completion time of the medical order T_mix_end - the preparation time of the medical order T_mix. Obtain the target time window in which the latest preparation start time T_mix_start of the medical order falls, and add the medical order to the set of medical orders corresponding to the target time window.

[0025] Here, T_buffer (e.g., 15 minutes) is used to handle unexpected delays. For example, a prescription is scheduled to be administered at 10:00. T_buffer=15min, T_transport=10min, T_mix=8min. T_delivery_max=10:00-15min=09:45, T_mix_end=09:45-10min=09:35, T_mix_start=09:35-8min=09:27. Conclusion: This prescription must be prepared no later than 09:27 and completed before 09:35 to ensure administration before 10:00.

[0026] The system no longer creates a batch for each medication administration time point. Instead, it divides the day into several fixed "dispensing time windows" based on the production rhythm. Orders within the same time window belong to the same batch. Specifically, the PIVAS operating hours (e.g., 06:00-18:00) are divided into continuous, fixed-length time windows (e.g., every 30 minutes). For example, Window 1: 06:00-06:30, Window 2: 06:30-07:00, ..., Window N: 16:30-17:00, where N is a natural number. Batch-window mapping: Each time window directly corresponds to an initial batch.

[0027] The order allocation rule iterates through all orders with a calculated T_mix_end and performs the following matching: The order is assigned to the batch corresponding to the time window in which its T_mix_end falls. Continuing the example, the order's T_mix_end is 09:35, and it falls within the time window of 09:30-10:00. Therefore, this order is assigned to the initial batch of "09:30-10:00".

[0028] Step 103: Perform the following processing for each time window: Divide all medications in the medical orders set corresponding to the time window into several high-risk medications and several non-high-risk medications; construct a graph model with all non-high-risk medications as nodes, compatibility relationships as edges, and attribute similarity as weights; use graph theory clustering algorithm to generate several compatibility sets; in each compatibility set, any two non-high-risk medications are compatible and their attribute similarity is less than a preset threshold; map all high-risk medications to biosafety cabinets, and map each compatibility set to a different workbench.

[0029] Here, after the medication order allocation method is executed, when a specific time window is in effect, all high-risk medications can be forcibly allocated to dedicated biosafety cabinets and senior pharmacists. Different compatibility sets can be allocated to matching workbenches and pharmacists. By comprehensively considering workbench load, attribute support (such as light-protected environment) and pharmacist expertise, load balancing can be achieved.

[0030] Here, the method for using the above clustering algorithm to classify drugs into several high-risk drugs and several non-high-risk drugs can include the following steps: Step 1, rule-based safety isolation (high-risk / non-high-risk separation), this is a preprocessing step before clustering and does not rely on complex algorithms; based on a simple "if-then" rule: IF drug.hazard level == "high-risk" THEN assign to the high-risk drug set, this step ensures that high-risk drugs are physically isolated before entering complex clustering. Step 2, intelligent clustering based on graph models (compatibility sub-batch generation), the graph clustering algorithm can be performed only on non-high-risk drugs that have passed the first stage screening. Multiple internally compatible subgroups can be naturally formed through community discovery algorithms, based on drugs in each subgroup having similar dispensing requirements and attribute characteristics. Specifically, the system has a built-in "high-risk drug knowledge base", which contains the codes of all drugs marked as high-risk and their hazard types (such as cytotoxic drugs, high-concentration electrolytes, psychotropic drugs, etc.). Traverse each drug in the current initial batch and match its drug code with the high-risk drug knowledge base. If a match is found, the drug is immediately removed from the list of regular drugs and added to a separate "high-risk drug set." This process is based on a simple key-value pair matching algorithm to ensure that high-risk drugs are identified and isolated at the earliest stage.

[0031] During the operation of this intravenous medication preparation center, new medical orders may arise. These new orders can be added to the medical order set corresponding to a specific time window, and a multi-dimensional conflict scan can be performed, including: drug interaction conflicts, drug hazard level conflicts, and workbench resource conflicts. Dynamic decision-making is then required: 1. If there are no conflicts or only conflicts with individual drugs, the order is incorporated through batch fine-tuning (e.g., re-clustering). 2. If serious conflicts exist (e.g., the new drug is high-risk while the target batch is ordinary), an expedited order insertion mechanism is triggered. Using the resource scheduling engine, a separate expedited sub-batch is quickly created and scheduled to ensure that urgent tasks are prioritized without affecting the original plan.

[0032] The steps for constructing a graph model can be as follows: Step 1: Node Definition and Instantiation. Each drug in the set of non-high-risk drugs to be processed is instantiated as an independent node in the graph structure. Each node carries a unique identifier and attribute metadata for the drug, including but not limited to chemical properties, stability requirements, storage conditions, and dispensing complexity.

[0033] Step 2: Edge establishment and compatibility verification. A fully connected traversal algorithm is used to pair all drug nodes. For each pair of nodes, the drug compatibility knowledge base is queried in real time to detect incompatibilities. If the verification result shows physicochemical compatibility, an undirected edge is established between the corresponding nodes, indicating that they can be included in the same dispensing unit.

[0034] Step 3, Weighting and Attribute Quantification: Assign a quantitative weight value to each established edge. Weight calculation is based on similarity analysis of drug attribute vectors, using an improved cosine similarity algorithm to quantify and evaluate the multidimensional attributes of drugs (including temperature sensitivity, light stability, solvent type, etc.). Higher attribute matching results in a larger weight coefficient, indicating higher synergistic blending value between drugs.

[0035] Taking "receiving a new temporary medical order" as an example: The pharmacist entered a temporary medical order into the system: "Ward XX, Patient Li, immediately administer chemotherapy drug 'paclitaxel' intravenously." The system triggered the third-stage process. The administration time was determined to be "immediate," and it was mapped to the "urgent batch."

[0036] Conflict detection initiated: The drug was found to be a high-risk medication (chemotherapy). An inspection of existing medications in the current "urgent batch" revealed that they were all routine intravenous infusions, and no dedicated biosafety cabinets were available. Dynamic adjustment decision: Determined as a "serious conflict".

[0037] The system executes the "expedited order" mechanism: the resource scheduling engine immediately queries and predicts that biosafety cabinet #2 (currently being allocated but to be completed in 3 minutes) is the optimal target. The system creates a separate "expedited-high-risk sub-batch" for this "paclitaxel" prescription and schedules its allocation to biosafety cabinet #2 and pharmacist Zhang (marked as a senior pharmacist). After the plan is updated, a new task notification immediately pops up on the terminals of biosafety cabinet #2 and Zhang.

[0038] The entire process is completed automatically within seconds, without the need for manual intervention from the dispatcher.

[0039] In this embodiment, the graph theory clustering algorithm is specifically the maximum clique search algorithm.

[0040] The Maximum Clique Problem (MCP) is a classic combinatorial optimization problem in graph theory and is an NP-complete problem. It is defined as finding the complete subgraph (i.e., clique) with the most vertices in a given undirected graph. It can be transformed into other classic problems such as the Maximum Independent Set Problem and the Minimum Vertex Cover Problem in polynomial time.

[0041] Specifically, this can include the following algorithms: 1. Backtracking, 2. Branch and Bound, and 3. Heuristic algorithms (for large-scale graphs). Heuristic algorithms specifically include: 1. Greedy algorithms, 2. Genetic algorithms, 3. Simulated annealing, and 4. Local search algorithms (such as TabuSearch).

[0042] In this embodiment, the graph theory clustering algorithm is specifically a community detection algorithm.

[0043] Community detection algorithms aim to identify closely connected groups of nodes in a network, revealing the network's structure and functional characteristics.

[0044] In community detection algorithms, a community refers to a subset (community) of vertices in an undirected / directed graph, characterized by dense connections within a community and sparse connections between communities. Community detection is the process of automatically identifying community structures in a graph and is one of the core tasks in complex network analysis, widely applied in fields such as social networks, biological networks, and information networks.

[0045] The core evaluation metrics for community discovery include: 1. Modularity (Q), the most commonly used quantitative metric, with a range of values... A higher Q value indicates a more reasonable community division (generally, Q > 0.3 is considered to indicate the existence of a significant community structure); calculation formula: ,in, For elements of the adjacency matrix, Let be the degree of vertex i, and m be the total number of edges. 1. Indicates whether i and j belong to the same community (1 if yes, 0 otherwise). 2. Normalized mutual information (NMI), used to compare the similarity between the algorithm partitioning results and the real community structure, with a value range of [0,1], where 1 indicates a complete match.

[0046] Community detection algorithms specifically include: 1. Modularity-based optimization algorithms (e.g., greedy algorithms, spectral clustering, etc.), 2. Hierarchical clustering algorithms (e.g., agglomerated hierarchical clustering, divisive hierarchical clustering, etc.), 3. Modularity-based heuristic algorithms (e.g., Louvain algorithm, Leiden algorithm, etc.), 4. Label Propagation Algorithm (LPA), 5. Probabilistic model-based algorithms, and 6. Overlapping community detection algorithms.

[0047] In this embodiment, the graph theory clustering algorithm is specifically the Louvain method.

[0048] The Louvain method can be specifically described as follows: Step 1: Initialization, each drug node forms its own community.

[0049] Step 2: Modularity optimization. Iteratively calculate the modularity gain resulting from moving each node to an adjacent community. Modularity calculation formula: ,in, It is the edge weight. and Where m is the node degree and m is the total weight. The function returns 1 if nodes i and j belong to the same community.

[0050] Step 3: Community Merging. Treat the optimized community as a new node and repeat the above process until the modularity no longer increases.

[0051] Step 4: Compatibility verification. For each discovered community, verify whether all nodes within it are compatible pairwise. If they are incompatible, split them.

[0052] Afterwards, each community is generated as a compatibility sub-batch (i.e., a compatibility set). The system records information for each sub-batch, such as a list of medicines, common attributes (e.g., all need to be protected from light, all need to be refrigerated, etc.), and dispensing precautions.

[0053] Embodiment 2 of the present invention provides a prescription dispensing device for an intravenous medication preparation center, comprising the following modules: The information acquisition module is used to acquire multiple medical orders that need to be completed within the preset operating time of the intravenous medication preparation center, as well as the planned medication time T_admin, preparation time T_mix, and in-hospital logistics delivery time T_transport for each medical order; and to generate the latest preparation start time and the latest preparation completion time for each medical order; wherein, the operating time is later than the current time; The initial allocation module for intravenous medication is used to divide the operating time of the intravenous medication preparation center into multiple consecutive time windows, and a set of medication orders corresponding to each time window. The initial value of all medication order sets is empty. For each medication order, the following operations are performed: the latest delivery time of the medication order T_delivery_max = the planned medication time of the medication order T_admin - T_buffer; the latest preparation completion time of the medication order T_mix_end = the latest delivery time of the medication order T_delivery_max - the in-hospital logistics delivery time of the medication order T_transport; the latest preparation start time of the medication order T_mix_start = the latest preparation completion time of the medication order T_mix_end - the preparation time of the medication order T_mix; the target time window into which the latest preparation start time T_mix_start of the medication order falls is obtained, and the medication order is added to the medication order set corresponding to the target time window. The prescription reassignment module performs the following processing for each time window: It divides all medications in the prescription set corresponding to the time window into several high-risk medications and several non-high-risk medications; it constructs a graph model with all non-high-risk medications as nodes, compatibility relationships as edges, and attribute similarity as weights; it uses a graph theory clustering algorithm to generate several compatibility sets, where any two non-high-risk medications in each compatibility set are compatible and their attribute similarity is less than a preset threshold; it then maps all high-risk medications to biosafety cabinets and maps each compatibility set to a different workbench.

[0054] In this embodiment, the graph theory clustering algorithm is specifically the maximum clique search algorithm.

[0055] In this embodiment, the graph theory clustering algorithm is specifically a community detection algorithm.

[0056] In this embodiment, the graph theory clustering algorithm is specifically the Louvain method.

[0057] Embodiment 3 of the present invention provides an electronic device, including: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the medical order allocation method in Embodiment 1.

[0058] Embodiment 4 of the present invention provides a storage medium storing executable instructions, which are used to implement the medical order allocation method in Embodiment 1 when the processor executes them.

[0059] It should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This way of describing the specification is only for clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

[0060] The detailed descriptions listed above are merely specific descriptions of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.

Claims

1. An order distribution method for an intravenous medicine dispensing center, characterized by, The method comprises the following steps: obtaining a plurality of medical orders to be completed in the preset operation time of the intravenous drug dispensing center and a planned drug administration time T_admin, a dispensing time T_mix and an in-hospital logistics delivery time T_transport of each medical order, generating a latest dispensing start time and a latest dispensing completion time corresponding to each medical order; wherein the operation time is later than the current time; the operation time of the intravenous drug dispensing center is divided into a plurality of time windows adjacent in the head and tail, and each time window corresponds to a medical order set, and the initial value of all medical order sets is empty; for each medical order, the following operations are performed: a latest delivery time T_delivery_max of the medical order = a planned drug administration time T_admin of the medical order - a buffer time T_buffer, a latest dispensing completion time T_mix_end of the medical order = a latest delivery time T_delivery_max of the medical order - an in-hospital logistics delivery time T_transport of the medical order, and a latest dispensing start time T_mix_start of the medical order = a latest dispensing completion time T_mix_end of the medical order - a dispensing time T_mix of the medical order; obtaining a target time window in which the latest dispensing start time T_mix_start of the medical order falls, and adding the medical order to the medical order set corresponding to the target time window; for each time window, the following processing is performed: dividing all drugs in the medical order set corresponding to the time window into a plurality of high-risk drugs and a plurality of non-high-risk drugs, constructing a graph model taking all non-high-risk drugs as nodes, taking compatibility relationship as edges and taking attribute similarity as weight, generating a plurality of compatibility sets by using a graph clustering algorithm, in each compatibility set, any two non-high-risk drugs are compatible and the attribute similarity is less than a preset threshold; corresponding all high-risk drugs to a biological safety cabinet, and corresponding each compatibility set to a different workbench.

2. The medical order allocation method according to claim 1, wherein the graph clustering algorithm is specifically a maximum clique search algorithm.

3. The medical order allocation method according to claim 1, wherein the graph clustering algorithm is specifically a community discovery algorithm.

4. The medical order allocation method according to claim 1, wherein the graph clustering algorithm is specifically a Louvain method.

5. An order distribution apparatus for an intravenous admixture center, characterized by The method comprises the following modules: an information acquisition module, configured to obtain a plurality of medical orders to be completed in the preset operation time of the intravenous drug dispensing center and a planned drug administration time T_admin, a dispensing time T_mix and an in-hospital logistics delivery time T_transport of each medical order, generate a latest dispensing start time and a latest dispensing completion time corresponding to each medical order; wherein the operation time is later than the current time; The order initial allocation module is configured to divide the operation time of the intravenous drug dispensing center into a plurality of time windows that are adjacent at the beginning and end, and each time window corresponds to an order set, and the initial value of all order sets is empty; and perform the following operations on each order: a latest delivery time T_delivery_max of the order is equal to a planned administration time T_admin of the order minus a buffer time T_buffer, a latest mixing end time T_mix_end of the order is equal to the latest delivery time T_delivery_max of the order minus an in-hospital logistics delivery time T_transport, and a latest mixing start time T_mix_start of the order is equal to the latest mixing end time T_mix_end of the order minus a mixing time T_mix of the order; and obtain a target time window in which the latest mixing start time T_mix_start of the order falls, and add the order to an order set corresponding to the target time window. The order re-allocation module is configured to perform the following processing on each time window: divide all drugs in the order set corresponding to the time window into a plurality of high-risk drugs and a plurality of non-high-risk drugs, construct a graph model with all non-high-risk drugs as nodes, compatibility relationships as edges, and attribute similarity as weights, generate a plurality of compatibility sets by using a graph clustering algorithm, and in each compatibility set, any two non-high-risk drugs are compatible and the attribute similarity is less than a preset threshold; and correspond all high-risk drugs to a biological safety cabinet, and correspond each compatibility set to a different workbench.

6. The order allocation apparatus according to claim 5, wherein the graph clustering algorithm is specifically a maximum clique search algorithm.

7. The order allocation apparatus according to claim 5, wherein the graph clustering algorithm is specifically a community discovery algorithm.

8. The order allocation apparatus according to claim 5, wherein the graph clustering algorithm is specifically a Louvain method. The apparatus comprises: a memory configured to store executable instructions; a processor configured to execute the executable instructions stored in the memory to implement the order allocation method according to any one of claims 1 to 4.

9. An electronic device, comprising: The apparatus has executable instructions stored therein, and the executable instructions are configured to cause the processor to implement the order allocation method according to any one of claims 1 to 4 when executed. ​ ​ 10. A storage medium, characterized by ​