Drug management method and device based on traceability code and medium

By building a virtual traceability code mapping database and an intelligent management and control model, the problems of code scanning mismatch and uncontrolled splitting in drug traceability code management are solved, intelligent management of the drug dispensing process and real-time compliance assessment of data are realized, and the accuracy and completeness of the data are improved.

CN120766909AActive Publication Date: 2025-10-10四川互慧软件有限公司

Patent Information

Application Number
CN202511271066.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-10-10
Estimated Expiration
2045-09-08

AI Technical Summary

Technical Problem

The existing drug traceability code management method in hospitals has problems such as code scanning mismatch, uncontrolled splitting, and difficulty in uploading compliance, making it difficult to ensure data accuracy and completeness.

Method used

Build a virtual traceability code mapping database and adopt an intelligent management and control model to achieve intelligent matching of drugs and traceability codes, dynamic monitoring of disassembly behavior and real-time compliance assessment of the drug dispensing process, and combine risk warning strategies to control drug dispensing behavior.

Benefits of technology

It improves the accuracy of drug dispensing operations and the integrity of traceability data, reduces the risks of medical insurance uploading errors and unclear responsibilities, and builds an efficient, closed-loop drug management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120766909A_ABST
    Figure CN120766909A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical information processing, and discloses a traceability-code-based drug management method and device and a medium, and the method comprises the steps: collecting hospital dispensing original data, carrying out the preprocessing of the collected original data, and constructing a virtual traceability code mapping database; taking the preprocessed data and the mapping database as a training set, and constructing an intelligent management and control model used for realizing intelligent matching between the medicine and the traceability code, dynamic monitoring of the zero removal behavior and real-time compliance evaluation of the medicine dispensing process; and based on the intelligent management and control model, setting a risk early warning strategy, managing and controlling a medicine dispensing compliance behavior, and storing and uploading a compliance record. The invention provides an intelligent traceability code generation and behavior management and control method for solving the key problems of mismatching of traceability codes, out-of-control disassembly, difficulty in uploading compliance and the like in use of hospitalized drugs, virtual code binding, disassembly identification and drug dispensing behavior verification can be automatically completed, and a whole-process closed-loop control mechanism is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical information processing, and in particular to a drug management method, device and medium based on traceability codes. Background Art

[0002] In the modern healthcare system, the full-process management of drug traceability codes has become a crucial means of ensuring medication safety, meeting medical insurance compliance, and achieving refined oversight. Especially during the internal circulation and use of drugs within hospitals, accurately linking each box of medication traceability code to a specific patient's prescription is crucial for ensuring the validity and compliance of uploaded data. However, in actual hospitalization scenarios, existing drug traceability code management methods face numerous challenges.

[0003] Currently, inpatient pharmacies distribute medicines to various wards in batches. Nurses dispense medicines in the wards according to patient orders and are required to manually scan the traceability code and enter it into the system. Due to the high similarity in packaging of similar medicines and the heavy workload of nurses, code scanning mismatches occur frequently, which can easily lead to incorrect binding of the traceability code to the patient's order, affecting medical insurance reimbursement. To further complicate matters, a large number of inpatient medicines are distributed in small quantities, and the traceability code only exists on the original packaging. After the medicines are divided into small quantities, the information is missing when the code is scanned, resulting in abnormal traceability data or upload failure. In addition, the reuse of small-quantity medicines often causes system misjudgment, resulting in the same traceability code being uploaded more than once, and it is impossible to achieve effective dosage control.

[0004] A common approach is to rely on upstream suppliers or platforms to provide a complete list of traceability codes to achieve this. However, hospitals cannot scan the codes box by box during the warehousing process, making it difficult to establish a one-to-one correspondence between each box of medication and its batch number. Furthermore, relying solely on manual data entry and static rule configuration is unable to adapt to the diverse and dynamic dispensing patterns in hospital settings, increasing the burden on frontline nurses and making it difficult to ensure data accuracy and integrity. Summary of the Invention

[0005] In view of this, the present invention provides a drug management method, device and medium based on traceability code to solve the above problems.

[0006] To solve the above technical problems, the present invention provides a drug management method based on traceability code, comprising: Collect original data on inpatient medication dispensing, including patient order information, incoming batches and packaging specifications, nurse code scanning logs, and samples of unpacking operations; After pre-processing the collected raw data, a virtual traceability code mapping database is constructed; Using pre-processed data and the mapping database as training sets, we built an intelligent management and control model for intelligent matching between drugs and traceability codes, dynamic monitoring of drug dispensing behavior, and real-time compliance assessment of the drug dispensing process. Based on the intelligent management and control model, a risk early warning strategy is set to control the dispensing compliance behavior, and the compliance record is saved and uploaded.

[0007] As an optional way, constructing the virtual traceability code mapping database includes: Using the pre-processed traceability code and packaging information, the drug identification code is extracted and the corresponding virtual traceability sub-code set is automatically generated. The identification code, virtual sub-code, batch, state and other information are written into the mapping table and indexed to complete the initialization of the mapping database.

[0008] As an optional way, the intelligent management and control model includes a traceability code intelligent allocation and binding prediction module, a disassembly behavior recognition and use frequency limitation module, and a dispensing behavior compliance verification and risk early warning module. The traceability code intelligent allocation and binding prediction module is used to receive drug attribute information, and based on a lightweight prototype network, a traceability code allocation prediction model is constructed to output the optimal virtual traceability sub-code matched for each medical order and its allocation probability. The disassembly behavior recognition and use frequency limitation module is used to collect the scanning log and drug use record formed by nurses in actual dispensing operation, and to construct a method based on time series variable point detection to model the scanning event sequence of each traceability code for behavior, to identify whether there is abnormal disassembly or excessive use behavior. The dispensing behavior compliance verification and risk early warning module is used to make full-process compliance judgment and risk prompt on the operation behavior in the scanning dispensing process.

[0009] As an optional way, the dispensing compliance behavior is controlled, which includes: After scanning the real traceability code and collecting the patient's medical order, the trained intelligent management and control model is called to automatically match and allocate the optimal virtual sub-code, bind the real code, virtual code and medical order, and update the binding state.

[0010] As an optional way, the automatic matching and allocation of the optimal virtual sub-code, the binding of the real code, the virtual code and the medical order include: After recognizing that the real traceability code on the drug packaging is scanned and there is a determined target patient medical order, the intelligent management and control model is called synchronously to model the context of the current dispensing behavior; Recognize the prefix of the real traceability code, and match its associated record in the virtual traceability code mapping database to form a candidate virtual sub-code set; Analyze the attribute elements of the medical order, combine the historical binding samples and the state information of the currently available virtual sub-code, and select the optimal matching sub-code from the candidate virtual sub-code for the current medical order, and judge whether there is a disassembly requirement; Complete the tripartite binding of the virtual subcode, the corresponding real code, and the medical order number in the system, update the traceability code binding table, mark the status of the virtual subcode, and record the binding timestamp and operator number.

[0011] As an optional approach, risk early warning strategies include: The system identifies and marks the splitting behavior based on the real-time sequence of the relationship between the scanning time and the dosage, and accumulates the number of uses. When the preset threshold is reached, the traceability code is automatically locked and an alarm is issued.

[0012] As an optional approach, the risk early warning strategy also includes: Collect the complete operation path, call the model to perform process compliance verification and anomaly detection, conduct real-time compliance analysis and risk assessment on the complete operation path in the drug dispensing process, and dynamically control the upload permission of traceability code data based on the anomaly identification results, automatically block illegal operations and mark responsibilities.

[0013] As an optional method, the model is used to perform process compliance verification and anomaly detection, and to conduct real-time compliance analysis and risk assessment of the entire operation path in the medication dispensing process, including: The drug dispensing process is abstracted into state nodes using a finite state machine and state transition rules are defined. Based on the structured operation path, the actual state transitions are compared with the state transition rules for consistency. If key steps are skipped, the behavior sequence is abnormal, or the transition path does not exist, the process is deemed non-compliant and the violation node and explanation are recorded. The isolation forest model is used to model the multi-dimensional features of operational behaviors. The multi-dimensional features include the time interval for scanning codes, the time required for dispensing medicines, the average operation rate, the frequency of equipment switching, the number of traceability codes handled by a single person, and the proportion of split-up codes. The average path length of the behavior vector is calculated by randomly splitting trees in the isolation forest to generate an anomaly score. If the anomaly score is lower than the set threshold, it is marked as a statistical anomaly.

[0014] On the other hand, the present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the above-mentioned drug management method based on traceability codes when executing the computer program.

[0015] On the other hand, the present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned drug management method based on traceability code are implemented.

[0016] The beneficial effects of the present invention are: Aiming at the key issues of mismatch of traceability codes, uncontrolled splitting and difficulty in uploading compliance in the use of inpatient drugs, the present invention proposes an intelligent traceability code generation and behavior control method, which can automatically complete virtual code binding, splitting identification and drug dispensing behavior verification, and build a closed-loop control mechanism for the entire process. By introducing the splitting behavior identification and usage frequency control mechanism, the system can effectively monitor the risk of drug splitting and prevent repeated use and excessive binding. At the same time, combined with process state modeling and abnormal behavior detection technology, compliance judgment and risk warning are carried out on the drug dispensing process, and irregular operation behaviors are dynamically blocked. This method significantly improves the accuracy of drug dispensing operations and the integrity of traceability data, reduces the risks of medical insurance upload errors and unclear responsibilities, and provides reliable support for hospitals to build an efficient, closed-loop and traceable drug management system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a schematic diagram of the drug management process based on the traceability code provided by the present invention. DETAILED DESCRIPTION

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more apparent, various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will appreciate that many technical details are provided in various embodiments of the present invention to help readers better understand the present invention. However, even without these technical details and various variations and modifications based on the following embodiments, the technical solutions claimed in the present invention can still be implemented.

[0019] like Figure 1 As shown, this embodiment provides a drug management method based on traceability codes, including: collecting original data on inpatient drug dispensing, including patient medical order information, inventory batches and packaging specifications, nurse code scanning logs, and samples of unpacking operations; preprocessing the collected original data, and then building a virtual traceability code mapping database; using the preprocessed data and the mapping database as a training set, building an intelligent management and control model for realizing intelligent matching between drugs and traceability codes, dynamic monitoring of unpacking behavior, and real-time compliance assessment of the drug dispensing process; based on the intelligent management and control model, setting a risk warning strategy, controlling drug dispensing compliance behavior, and saving and uploading compliance records.

[0020] In one embodiment of the application, the collection of original data on inpatient medication dispensing includes: collecting patient medical order information (drug name, dosage, unit, medical order ID), inventory batch and packaging specifications, nurse code scanning logs (timestamp, device ID, nurse ID, real traceability code) and samples of disassembly operations, etc., to provide a complete data foundation for subsequent model construction and mapping database initialization.

[0021] Data preprocessing then begins. The collected raw data undergoes traceability code format verification and segmentation, medical order field standardization and missing value filling, code scanning log deduplication and time series completion, and feature vectorization and normalization. This generates a structured training set and mapping database initialization input. This embodiment does not restrict the preprocessing process and content, and can be customized based on the hospital's needs.

[0022] Then, using the pre-processed traceability code and packaging information, the drug identification code is extracted and the corresponding virtual traceability sub-code set is automatically generated. The identification code, virtual sub-code, batch, status and other information are written into the mapping table and indexed to complete the initialization of the mapping database. In this step, in an optional scenario, the following methods can be implemented: Upon entry or first use of a drug, the system uses a scanner to read the drug's actual traceability code and truncates the first seven digits as the drug identification code (PREFIX). The mapping engine then automatically generates several virtual traceability subcodes (SUFFIX) of customizable length, combining them with the batch number (BATCH_ID) and the packaging specification (PACK_SPEC). These subcodes, combined with the PREFIX, form a unique mapping identifier within the system. Each mapping record also maintains a status field (STATUS, indicating status, including but not limited to unused, used, split, locked, and abnormal) and key timestamps (CREATED_AT, BOUND_AT, and LOCKED_AT) for auditing and control purposes. When generating the SUFFIX, the mapping engine first obtains a quick fingerprint of the PREFIX using SimHash and verifies its uniqueness using a Bloom filter or similar mechanism. If a conflict occurs, the mapping engine automatically iterates to generate the next SUFFIX. If a retry limit is exceeded, the transaction is rolled back and the exception is logged to ensure database consistency. To support high concurrent usage, a hash index is established for the PREFIX+SUFFIX combination, and an available SUFFIX queue is maintained at the cache layer to achieve efficient allocation and management of virtual subcodes.

[0023] After initializing the mapping database, an end-to-end intelligent management and control model is constructed using the preprocessed data and mapping database as the training set. In this step, an intelligent traceability code management and control model is constructed for inpatient drug dispensing scenarios. The model adopts a layered, pipelined design, consisting of a module for intelligent traceability code allocation and binding prediction, a module for identifying and limiting the number of times a drug is dispensed, and a module for compliance verification and risk warning of drug dispensing behaviors. This model is used to achieve intelligent matching between drugs and traceability codes, dynamic monitoring of dispensing behaviors, and real-time compliance assessment of the drug dispensing process, thereby establishing a complete closed-loop traceability management system.

[0024] The process includes: First, the drug attribute information (such as variety, specification, production batch number, etc.) and related environmental characteristics are input into the traceability code intelligent allocation and binding prediction module. This module builds a traceability code allocation prediction model based on a lightweight prototype network to output the optimal virtual traceability sub-code and its allocation probability for each medical order. Specifically, an embedding sub-network is constructed. , map the drug samples xi to the low-dimensional embedding space, and calculate the prototype center ck of the support sample set Sk of each type of drug k. The formula is as follows:

[0025] For the drug x to be predicted, calculate its Euclidean distance dk from the center of each category, and obtain its distribution probability by normalizing it with the softmax function:

[0026] Where yi represents the true class label and yi^ represents the predicted probability. To improve deployment efficiency, the embedding network can be implemented using a lightweight convolutional architecture or a shallow fully connected network. The prediction output by this module represents the optimal match between the traceability subcode and the medication order, and serves as the structured input for subsequent modules.

[0027] The system then affixes the generated traceability code to the drug packaging. Nurses then create scan logs and medication usage records during medication dispensing. This data is fed into the split-and-remove behavior recognition and usage limit module. This module uses a time series change point detection method to model the scanning event sequence of each traceability code, identifying any abnormal split-and-remove behavior or excessive usage.

[0028] Specifically, suppose the scanning record sequence of a traceability code si is , where xt represents the timestamp or scan feature, including but not limited to the operation source and time interval. When the statistical characteristics of the sequence undergo a sudden change, including but not limited to the scan frequency and delay distribution, it may indicate that the drug is being used repeatedly. To this end, the minimum variance partitioning algorithm is introduced. Under the assumption that the change point occurs at time t, the sequence is divided into two segments and the means μ1 and μ2 of each segment are calculated. The objective function is as follows:

[0029] Where t* represents a possible mutation point for splitting. If a significant distribution variation is detected, the system marks it as a splitting risk zone. Furthermore, a maximum usage threshold, Nmax, is set for each traceability code. When the cumulative number of scans, ni, for a code exceeds Nmax, it is automatically marked as locked, prohibiting subsequent binding. The splitting behavior identification results and usage frequency status output by this module serve as one of the input contexts for the compliance module.

[0030] Finally, a medication dispensing compliance verification and risk warning module was constructed to assess the compliance of nurses' actions during the entire medication dispensing process and provide risk warnings. This module combines a finite state machine (FSM) with an isolation forest anomaly detection (IF) algorithm to monitor the legality of medication dispensing behavior from both the operational path and statistical characteristics perspectives.

[0031] The FSM modeled the medication dispensing process as a series of legal state nodes, including but not limited to prescription confirmation, medication delivery, scanning the traceability code, placing the medication on the shelf, and dispensing completion. It also defined legal transition paths between each state. The system compared the sequence of nurse-operated events in real time. If a state transition violated pre-set rules, such as skipping the code scan and directly dispensing medication, it was immediately identified as a violation and an exception flag was issued.

[0032] At the same time, each drug dispensing operation is constructed as a feature vector x, which includes variables such as the scanning time interval, the number of drugs, and the device ID. By training the isolation forest model and performing multiple rounds of random segmentation, the average path length E[h(x)] of the sample in the forest is obtained, combined with the normalization constant , calculate its anomaly score:

[0033] When abnormal score When the value is less than the set threshold, the system considers it a statistically high-risk operation, triggering a risk warning or upload blocking. The module ultimately outputs a compliance mark and anomaly score, which assists the system in determining whether to allow the record to be uploaded, whether the traceability code needs to be locked, or whether manual review is required.

[0034] Based on the above, the three modules are bound to the database and operation log service through a unified traceability code to realize data flow and connect with other processes of this embodiment.

[0035] After the model is built, in the real-time medication dispensing process, the nurse scans the real traceability code and collects the patient's medical instructions, and then calls the trained intelligent management and control model to automatically match and assign the optimal virtual sub-code, bind the real code, virtual code and medical instructions, and update the binding status.

[0036] Specifically, this step is mainly aimed at nurses performing the actual code scanning and medication dispensing process in the ward. By calling the traceability code intelligent management and control model trained above, the system dynamically completes the optimal virtual sub-code allocation and binding between the real traceability code and the medical order, thereby improving the code scanning efficiency and ensuring the accuracy and traceability of the medication dispensing operation.

[0037] Specifically, after a nurse uses a mobile device such as a PDA to scan the actual traceability code on a drug package and selects the target patient's prescription, the system simultaneously invokes the deployed traceability code intelligent management and control model to perform contextual modeling of the current medication dispensing behavior. The system first identifies the actual traceability code prefix PREFIX and matches it with associated records in the virtual traceability code mapping database to form a set of candidate virtual subcodes SUFFIX.

[0038] The model then comprehensively analyzes the order's dosage, unit, specification, usage, and other factors. Combining historical binding samples with the status of currently available virtual subcodes, it performs embedded matching and distance calculations, selecting the subcode from the candidate virtual subcodes that best matches the current order and determining whether there's a need for splitting. The selected virtual subcode is then bound to the corresponding real code and the order number (ORDER_ID) in the system. The traceability code binding table is updated, marking the virtual subcode's status as "Used" or "Split in Progress," and recording the binding timestamp (BOUND_AT) and the nurse number (NURSE_ID) who performed the procedure.

[0039] To improve response speed, this process implements millisecond-level query and update through the SUFFIX available queue and hash index structure in the cache; if all virtual subcodes under the current PREFIX are in the [locked] or [abnormal] state, the system fallback mechanism is triggered and manual audit processing is performed.

[0040] Ultimately, the binding relationship will be recorded in the operation log and audit chain list, providing structured input data for the subsequent piecemeal identification module and behavioral compliance module, ensuring automatic identification, optimal matching, full traceability and accountability of the entire QR code scanning and dispensing process.

[0041] The risk warning strategy of this embodiment includes identifying and marking split-up behavior based on the real-time sequence relationship between code scanning time and dosage, while also accumulating the number of uses. When a preset threshold is reached, the traceability code is automatically locked and an alarm is issued. In this embodiment, the system implements passive identification of drug split-up behavior and limited control of usage counts based on the traceability code intelligent management and control model. This is used to automatically detect abnormal split-up patterns and control the status of traceability codes without relying on manual active marking, thereby improving the controllability and data compliance of drug use.

[0042] This step relies on the trained sub-model in the Disassembly Behavior Recognition and Usage Limitation module. Its input is the real-time binary sequence [scan time – dosage used]. This sequence is automatically generated each time a nurse scans a code on a PDA terminal. Fields include: scan timestamp (SCAN_TS), device ID, order ID, corresponding dosage value (DOSE), and unit of use. The system sorts all scan records for the same traceability code in ascending chronological order to form the behavioral path sequence for that traceability code.

[0043] The model first analyzes the changing trends of dosage fluctuations in the time series and performs a sliding window modeling of the joint characteristics of time interval and dosage usage. Using a change point detection algorithm, the system automatically determines whether there is a sudden change in the behavioral statistical characteristics at a certain moment. If so, it is identified as a zero-splitting mutation point and the scan operation and subsequent continuous records are marked as "Zero-splitting in use." This status is recorded in the traceability code usage record table (MED_TRACE_LOG), and the STATUS field of the sub-code in the traceability code binding table is simultaneously updated to "Zero-splitting in progress."

[0044] The system also maintains a usage counter, ni, for each traceability code, which increments with each valid binding. When the cumulative usage reaches or exceeds the system-defined threshold, Nmax (the model sets the minimum unit volume and common split quantity for the drug to Nmax), the model automatically updates the traceability code's status to [Locked], triggering an alarm, generating a risk warning record, and removing the sub-code from the bindable queue. Abnormal status records key fields: locked time (LOCKED_AT), trigger source, and alarm level, making them available for centralized review and accountability by system administrators.

[0045] Through this mechanism, the system can automatically mark and control the behavior of splitting without relying on human judgment, which not only ensures the accuracy of traceability data, but also effectively curbs common violations such as repeated splitting and excessive bundling in drug use, and builds a dynamic compliance defense line at the drug use level.

[0046] Finally, based on the compliance verification and risk warning model of medication dispensing behavior, this embodiment conducts real-time compliance analysis and risk assessment on the complete operation path of nurses during the inpatient medication dispensing process, and dynamically controls the upload permission of traceability code data in combination with the abnormal identification results, thereby realizing automatic blocking and responsibility labeling of illegal operations.

[0047] Specifically, first of all, through the client log collection module, the key behavior node data of the nurse in the process of performing the dispensing task is collected, including but not limited to: order confirmation time (ORDER_CONFIRMED_AT), code scanning time (SCAN_TS), code scanning object code value, drug quantity, binding confirmation time (BIND_CONFIRMED_AT), dispensing submission time (SUBMIT_AT) and the like, to build a complete behavior path sequence. All events are recorded in chronological order, and are associated with the current operator (NURSE_ID), device (DEVICE_ID) and dispensing batch number (BATCH_NO), to form a structured operation path.

[0048] Subsequently, the system calls a pre-constructed dispensing behavior compliance verification model. First, FSM is introduced at the process level to abstract the dispensing process into a set of state nodes and define state transition rules. The system compares whether the state transition is legal according to the current actual behavior path. If it is found that a key step is skipped, the behavior order is abnormal or the transition path does not exist, it is immediately determined that the process is not compliant, the violation node is recorded and a violation explanation is added.

[0049] On this basis, in order to capture more fine-grained behavior abnormalities, the system further uses an IF model to model the operation behavior with multiple features. The model input feature vector includes but is not limited to code scanning time interval, dispensing time consumption, average operation rate, device switching frequency, single person processing traceable code quantity, and disassembled proportion. The average path length E[h(x)] of each behavior vector is calculated by multiple randomly split trees in the forest, and an abnormal score is generated accordingly:

[0050] When the score of a dispensing behavior is S(x) below the abnormal threshold set by the system, it is marked as a statistical abnormal behavior, triggering the system to generate a risk report, including but not limited to abnormal operation number, responsible person, risk level, abnormal feature description field, and is recorded in the behavior risk audit table at the same time.

[0051] The outputs of the compliance model and the abnormality detection module will jointly determine whether this dispensing operation is allowed to be uploaded to the medical insurance platform or the traceability platform. For operations marked as non-compliant or high-risk, the system will automatically block the data upload process, display a prompt message to the client, and move the record to the audit queue. Subsequently, it is manually reviewed by the administrator, the responsibility is confirmed or the model review process is triggered again.

[0052] Through this technical approach, the system can effectively intercept and close the accountability loop for all potential violations in inpatient drug dispensing operations, supporting hospitals in establishing an auditable and accountable intelligent drug use supervision system. Optionally, only records bound to the model that are deemed compliant will be uploaded to the medical insurance or traceability platform. Awaiting review or abnormal records will be retained in an audit queue for management review or re-triggering of the model, ensuring a closed-loop traceability of the entire process.

[0053] On the other hand, this embodiment further provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the above-mentioned drug management method based on traceability codes when executing the computer program.

[0054] On the other hand, this embodiment further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned drug management method based on traceability code are implemented.

[0055] The above is a detailed introduction to the embodiments of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A drug management method based on traceability code, characterized in that: include: Collect original data on inpatient medication dispensing, including patient order information, incoming batches and packaging specifications, nurse code scanning logs, and samples of unpacking operations; After pre-processing the collected raw data, a virtual traceability code mapping database is constructed; Using the pre-processed data and mapping database as a training set, an intelligent management and control model is constructed to achieve intelligent matching between drugs and traceability codes, dynamic monitoring of split-up behavior, and real-time compliance assessment of the drug dispensing process; Based on the intelligent management and control model, a risk warning strategy is set to control the compliance behavior of drug dispensing, and the compliance records are saved and uploaded.

2. A drug management method based on traceability code according to claim 1, characterized in that: The construction of the virtual traceability code mapping database includes: Using the preprocessed traceability code and packaging information, the drug identification code is extracted and the corresponding virtual traceability subcode set is automatically generated. The identification code, virtual subcode, batch, and status information are written into the mapping table and indexed to complete the mapping database initialization.

3. The drug management method based on traceability code according to claim 1, characterized in that: The intelligent management and control model includes a traceability code intelligent allocation and binding prediction module, a module for identifying and limiting the number of times the drug is dispensed, and a module for compliance verification and risk warning of drug dispensing behavior. The traceability code intelligent allocation and binding prediction module is used to receive drug attribute information and build a traceability code allocation prediction model based on a lightweight prototype network to output the optimal virtual traceability sub-code and its allocation probability matched to each medical order; The module for identifying and limiting the number of times a drug is used to collect the scanning logs and drug usage records generated by nurses during actual drug dispensing operations, and to construct a behavioral model for the scanning event sequence of each traceability code based on a time series change point detection method to identify whether there is abnormal splitting or excessive use. The drug dispensing compliance verification and risk warning module is used to perform full-process compliance judgment and risk warning on the operational behaviors in the process of scanning the code to dispense the medicine.

4. The drug management method based on traceability code according to claim 1, characterized in that: The control over compliance of drug dispensing includes: After scanning the real traceability code and collecting the patient's medical instructions, the trained intelligent management and control model is called to automatically match and assign the optimal virtual sub-code, bind the real code, virtual code and medical instructions, and update the binding status.

5. A drug management method based on traceability code according to claim 4, characterized in that: The automatic matching and allocation of the optimal virtual subcode and the binding of the real code, the virtual code and the medical order include: After recognizing that the real traceability code on the drug package has been scanned and there is a confirmed target patient's medical order, the intelligent management and control model is synchronously called to perform context modeling on the current drug dispensing behavior; Identify the real traceability code prefix and match it with its associated records in the virtual traceability code mapping database to form a candidate virtual sub-code set; Analyze the attribute elements of the medical order, combine historical binding samples and the status information of the currently available virtual subcodes, select the subcode that best matches the current medical order from the candidate virtual subcodes, and determine whether there is a need to split the subcode into smaller parts; Complete the tripartite binding of the virtual subcode, the corresponding real code, and the medical order number in the system, update the traceability code binding table, mark the status of the virtual subcode, and record the binding timestamp and operator number.

6. The drug management method based on traceability code according to claim 1, characterized in that: The risk early warning strategy includes: The system identifies and marks the splitting behavior based on the real-time sequence of the relationship between the scanning time and the dosage, and accumulates the number of uses. When the preset threshold is reached, the traceability code is automatically locked and an alarm is issued.

7. A drug management method based on traceability code according to claim 6, characterized in that: The risk early warning strategy also includes: Collect the complete operation path, call the model to perform process compliance verification and anomaly detection, conduct real-time compliance analysis and risk assessment on the complete operation path in the drug dispensing process, and dynamically control the upload permission of traceability code data based on the anomaly identification results, automatically block illegal operations and mark responsibilities.

8. A drug management method based on traceability code according to claim 7, characterized in that: The call model performs process compliance verification and anomaly detection, and performs real-time compliance analysis and risk assessment on the complete operation path during the medication dispensing process, including: The drug dispensing process is abstracted into state nodes using a finite state machine and state transition rules are defined. Based on the structured operation path, the actual state transition is compared with the state transition rules. If key steps are skipped, the behavior sequence is abnormal, or the transition path does not exist, the process is determined to be non-compliant and the violation node and explanation are recorded. The isolation forest model is used to model the multidimensional features of operational behaviors. The multidimensional features include the time interval for scanning codes, the time consumed in dispensing medicines, the average operation rate, the frequency of equipment switching, the number of traceability codes handled by a single person, and the proportion of split-up codes. The average path length of the behavior vector is calculated by randomly splitting trees in the isolation forest to generate an anomaly score. If the anomaly score is lower than the set threshold, it is marked as a statistical anomaly behavior.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the drug management method based on traceability codes as described in any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the drug management method based on traceability codes as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Prescription medicine split charging guide system, terminal and medium

    CN110867234A

  • Medicine dispensing system and medicine dispensing method thereof

    CN113539415A

  • Processing method of in-hospital logistics information system based on uniform medicine coding

    CN114093478A

  • Hospital dismantled medicine management method

    CN116913552A

  • Medical supply data intelligent tracing and risk early warning system based on block chain

    CN119601190A

Cited By

  • Digital full-link sample monitoring method and system based on OCR

    CN121258550A