Tracing code-based drug management method and system
By splitting the drug traceability code into traceability code and batch code, building a resource code-spec mapping database, and achieving rapid matching and full-code review of the drug delivery process, the problem of time spent and operational errors in the traditional full-code scanning mode is solved, and the efficiency and accuracy of drug delivery is improved.
Patent Information
- Application Number
- CN202510549784.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The traditional full-code scanning mode leads to an increase in the time spent on a single drug issuance. Pharmacists need to frequently switch to review drugs and scan code operations, which can easily cause operational errors. Some drugs are incompletely assigned or missing code scanning functions in the database, resulting in the drug issuance process that cannot verify the effectiveness of traceability codes, and there is a management loophole of "fake code scanning and no review".
Split the 20-bit traceability code into the first 7-bit traceability code and the last 13-bit batch code to build a resource code-spec mapping database to achieve rapid matching of the drug issuance process. When issuing the medicine, only the first 7 digits of the traceability code need to be scanned to compare the prescription drug specification information in real time; if the matching fails, the full code review process will be triggered.
Through the fast matching and full-code review process, the needs of efficient drug delivery are not only met, but also ensured the accuracy and traceability of the drug, reducing the risk of operational errors.
Smart Images

Figure CN120072239A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of medical systems, and particularly to a drug management method and system based on traceability codes. Background Art
[0002] As the "electronic ID card" of each box of drugs, the uniqueness and full-process traceability of drug traceability codes have been incorporated into the core link of the safety supervision of medical insurance funds. However, the daily outpatient volume of medical institutions is relatively large. The traditional full-code scanning mode increases the time-consuming for single-dose dispensing. Pharmacists need to frequently switch between drug review and scanning operations, which is prone to operation errors; for some drugs, due to incomplete code assignment or lack of in-warehouse scanning function, the effectiveness of traceability codes cannot be verified in the dispensing link, resulting in management loopholes of "false scanning and no recheck"; the mapping relationship between the existing HIS system and the traceability code database has not been standardized, and the association between the first 7-digit resource codes of some drugs and prescription specification information is loose, making it difficult to achieve accurate comparison; In view of the above problems, there is an urgent need for a drug management method and system based on traceability codes, which splits the 20-digit traceability code into the first 7-digit traceability code and the last 13-digit batch code, constructs a resource code-specification mapping database, and realizes rapid matching in the dispensing link; when dispensing drugs, only the first 7-digit traceability code needs to be scanned to compare the prescription drug specification information in real time; if the matching fails, a full-code recheck process is triggered, taking into account both efficiency and accuracy; through the technical path of "lightweight scanning-intelligent comparison-hierarchical disposal", it not only meets the rigid requirements of "should be collected as much as possible and settled with codes", but also adapts to the efficiency and fault tolerance requirements in high-load medical scenarios. Summary of the Invention
[0003] This application aims at the problems that the traditional full-code scanning mode in current medical institutions increases the time-consuming for single-dose dispensing, pharmacists need to frequently switch between drug review and scanning operations, which is prone to operation errors, and it is difficult to achieve accurate comparison between prescription information and drugs. A method is provided to split the 20-digit traceability code into the first 7-digit traceability code and the last 13-digit batch code, construct a resource code-specification mapping database, and realize rapid matching in the dispensing link. When dispensing drugs, only the first 7-digit traceability code needs to be scanned to compare the prescription drug specification information in real time; if the matching fails, a full-code recheck process is triggered, taking into account both efficiency and accuracy. The specific technical solutions are as follows: In the first aspect of this application, a drug management method based on traceability codes is provided, including: By splitting the first 7 digits of the drug traceability code as the traceability code and binding it with the drug specification information, a traceability code database is formed, and the mapping relationship between the first 7-digit traceability code of the drug and the HIS system prescription information is input and maintained manually or semi-automatically; In the medicine dispensing process, the first 7 digits of the traceability code are extracted by scanning the medicine traceability code and automatically compared with the prescription information. If the traceability code matches successfully, the medicine dispensing is completed, and the complete medicine dispensing process and the complete medicine traceability code are recorded in the database. If the match fails, an alarm is triggered and the medicine dispensing process is paused.
[0004] In an embodiment of the present application, the medicine dispensing process specifically includes: Synchronously collect images of the appearances of multiple medicines in the scanning area through an image recognition device, and locate and segment the traceability code area based on an image recognition algorithm; After extracting the first 7 digits of each medicine traceability code, merge multiple traceability codes into a single data stream and synchronously transmit it to the HIS system; The HIS system batch-compares multiple traceability codes according to the types and quantities of medicines in the prescription. If there is a failed match item, an alarm is triggered and the medicine dispensing process is paused.
[0005] In an embodiment of the present application, when extracting the first 7 digits of each medicine traceability code, it further includes: Perform contour detection and material analysis on the appearance of the medicine in the scanning area through an image recognition device. If the appearance of the medicine is recognized but the traceability code identification area is not detected, trigger the following processing flow: Generate a visual positioning frame based on the appearance characteristics of the medicine, and display the position and appearance image of the medicine lacking the traceability code through the HIS terminal interface; Prompt the operator for manual review through sound and light signals; when the traceability code is normally recognized after the operator manually reviews and adjusts the position of the medicine, resume the medicine dispensing process.
[0006] In an embodiment of the present application, when extracting the first 7 digits of each medicine traceability code, it further includes: If it is recognized that the traceability code identification area of the medicine has situations such as foreign object coverage, appearance displacement, or damage, generate a visual positioning frame based on the appearance characteristics of the medicine, and display the position and appearance image of the medicine with an unclear traceability code through the HIS terminal interface; Prompt the operator for manual review through sound and light signals; when the abnormality of the medicine traceability code area is repaired after the operator manually reviews and the traceability code is normally recognized, resume the medicine dispensing process; when the operator manually reviews and confirms that the traceability code cannot be repaired, pause the medicine dispensing process of this medicine and trigger the medicine recall protocol.
[0007] In an embodiment of the present application, before the medicine dispensing process, it further includes: Establish a medicine feature library, which includes name features and appearance features, and the appearance features include text layout, appearance color, shape, and traceability code identification position information; Real-time collect the appearance image of the medicine to be dispensed through an image recognition device, and extract its outer contour, color distribution, and text area features; Calculate the name similarity and appearance similarity between the current drug and all drugs in the feature library based on the feature similarity algorithm. If there is any drug with a similarity exceeding the preset threshold, display the comparison images and drug names of the drugs with high similarity through the HIS terminal interface, and mark the different regions; generate a review reminder instruction, including audible and visual alarms and manual review operation guidelines; If the manual review confirms that the drug is correctly matched, record the review result and continue the drug dispensing process; if the review finds a matching error, suspend the drug dispensing and start the drug traceability verification by associating the traceability code.
[0008] In an embodiment of the present application, after the operator completes the drug dispensing and discovers an incorrect drug dispensing through the complete drug dispensing process and the complete drug traceability code, it further includes: Calculate the name similarity and appearance similarity between the two based on the traceability code identification position, appearance color distribution, and text layout features of the prescribed drug and the incorrect drug; If the name similarity exceeds the first threshold and the appearance similarity is lower than the second threshold, it is determined that the drug dispensing error is caused by drug name confusion; if the appearance similarity exceeds the second threshold and the name similarity is lower than the first threshold, it is determined that the drug dispensing error is caused by appearance confusion; Generate a targeted training reminder instruction according to the error type and associate the operator information. The instruction includes at least one of the following: Push the drug name pronunciation comparison training and the generic name - trade name mapping relationship database to the operator with name confusion; push the different region marking atlas of drugs with highly similar appearances and the three - dimensional rotation view training module to the operator with appearance confusion; The targeted training reminder instruction is automatically sent through the built - in learning platform of the HIS system, and the training completion status and assessment results are recorded.
[0009] In an embodiment of the present application, after calculating the name similarity and appearance similarity between the current drug and all drugs in the feature library based on the feature similarity algorithm, it further includes: If the operator corresponding to the current drug has made incorrect drug dispensing due to drug name confusion in historical drug dispensing, reduce the preset threshold of name similarity. The more times of incorrect drug dispensing caused by drug name confusion, the more the preset threshold of name similarity is reduced; If the operator corresponding to the current drug has made incorrect drug dispensing due to drug appearance confusion in historical drug dispensing, reduce the preset threshold of appearance similarity. The more times of incorrect drug dispensing caused by drug appearance confusion, the more the preset threshold of appearance similarity is reduced.
[0010] In an embodiment of the present application, when extracting the first 7 digits of each drug traceability code, the edge computing device performs the following steps: The traceability code area on the appearance of the drug is captured in real time through an image sensor. Based on the preset physical position characteristics of the first 7 digits of the drug traceability code, the first 7-digit character area is directly located and segmented; A lightweight image recognition algorithm is used to independently decode the first 7 digits of the characters to generate a drug resource code string; The drug resource code string is matched with the local drug feature library through an edge computing node. If the match is successful, the drug basic information is directly returned to the HIS system; if the match fails, the full-code recognition process is triggered.
[0011] In an embodiment of the present application, it further includes: When it is detected that the number of people queuing at the dispensing window exceeds the preset threshold or it is judged by the historical data prediction model that there will be a dispensing peak in the future period, a dynamic speed regulation mechanism is started: Peak period processing mode. Through the edge computing device, only the first 7 digits of the drug traceability code are recognized, and the drug basic information is quickly matched based on the traceability code. The full-code image is temporarily stored in the local cache queue; Idle time completion mode. During the non-peak period, the full-code image is called to perform complete traceability code parsing, and the drug batch and expiration date information are supplemented and recorded in the database; an error correction algorithm is started for the full-code images that have not been matched in the cache queue, including occlusion repair and blurred character enhancement processing; Data synchronization mechanism. The traceability code matching records generated during the peak period and the complete traceability code data completed during the idle time are synchronously uploaded to the database after being associated by the time stamp.
[0012] In the second aspect of the present application, a drug management system based on the traceability code is further provided, including: A splitting module. The first 7 digits of the drug traceability code are used as the traceability code for splitting and are bound to the drug specification information to form a traceability code database. The mapping relationship between the first 7-digit traceability code of the drug and the prescription information of the HIS system is entered and maintained manually or semi-automatically; A matching module. During the drug dispensing link, the first 7 digits of the traceability code are extracted by scanning the drug traceability code and automatically compared with the prescription information; if the traceability code match is successful, the drug dispensing is completed, and the complete drug dispensing process and the complete drug traceability code are recorded in the database; if the match fails, an alarm is triggered and the drug dispensing process is paused.
[0013] In an embodiment of the present application, the matching module includes: An image acquisition sub-module. Through an image recognition device, synchronous image acquisition of the appearances of multiple drugs in the scanning area is performed, and the traceability code area is located and segmented based on the image recognition algorithm; A traceability code merging sub-module. After extracting the first 7 digits of each drug traceability code, multiple traceability codes are merged into a single data stream and synchronously transmitted to the HIS system; Comparison sub-module. The HIS system batch-compares multiple traceability codes according to the types and quantities of drugs in the prescription. If there are items with failed matches, an alarm is triggered and the drug dispensing process is paused.
[0014] In an embodiment of the present application, when the matching module extracts the first 7 digits of each drug traceability code, it further includes: Packaging recognition sub-module. The outline of the drug appearance in the scanning area is detected and the material is analyzed through an image recognition device. If the drug appearance is recognized but the traceability code identification area is not detected, the following processing flow is triggered: Visual positioning sub-module. A visual positioning frame is generated based on the drug appearance characteristics, and the position and appearance image of the drug lacking the traceability code are displayed through the HIS terminal interface. Prompt for recheck sub-module. The operator is prompted for manual recheck through sound and light signals; when the traceability code is normally recognized after the operator manually rechecks and adjusts the drug position, the drug dispensing process is resumed.
[0015] In an embodiment of the present application, when the matching module extracts the first 7 digits of each drug traceability code, it further includes: Foreign object recognition sub-module. If it is recognized that there are situations such as foreign object coverage, appearance displacement, or damage in the traceability code identification area of the drug, a visual positioning frame is generated based on the drug appearance characteristics, and the position and appearance image of the drug with an unclear traceability code are displayed through the HIS terminal interface. Repair sub-module. The operator is prompted for manual recheck through sound and light signals; when the abnormality in the drug traceability code area is repaired after the operator manually rechecks and the traceability code is normally recognized, the drug dispensing process is resumed; when it is confirmed through manual recheck that the traceability code cannot be repaired, the drug dispensing process for this drug is paused and a drug recall protocol is triggered.
[0016] In an embodiment of the present application, before the drug dispensing link of the matching module, it further includes: Feature library sub-module. A drug feature library is established, and the feature library includes name features and appearance features. The appearance features include text layout, appearance color, shape, and traceability code identification position information. Feature collection sub-module. The appearance image of the drug to be dispensed is collected in real time through an image recognition device, and its outer contour, color distribution, and text area features are extracted. Recognition difference sub-module. Based on the feature similarity algorithm, the name similarity and appearance similarity between the current drug and all drugs in the feature library are calculated. If there is any drug with a similarity exceeding the preset threshold, the comparison images and drug names of the drugs with high similarity are displayed through the HIS terminal interface, and the difference areas are marked; a recheck reminder instruction is generated, including sound and light alarms and manual recheck operation guidelines. Process recovery sub-module. If it is confirmed through manual recheck that the drugs match correctly, the recheck result is recorded and the drug dispensing process continues; if it is found through recheck that there is a matching error, the drug dispensing is paused and the drug traceability verification is started by associating the traceability code.
[0017] In an embodiment of the present application, after the operator of the matching module completes drug dispensing and discovers a wrong drug dispensing through the complete drug dispensing process and the complete drug traceability code, an error review module is further included: Based on the traceability code identification position, appearance color distribution, and text layout features of the prescribed drug and the wrong drug, calculate the name similarity and appearance similarity between the two; If the name similarity exceeds the first threshold and the appearance similarity is lower than the second threshold, it is determined that the wrong drug dispensing is caused by drug name confusion; if the appearance similarity exceeds the second threshold and the name similarity is lower than the first threshold, it is determined that the wrong drug dispensing is caused by appearance confusion; Generate a targeted training reminder instruction according to the error type and associate the operator information. The instruction includes at least one of the following: Push the drug name pronunciation comparison training and the generic name - trade name mapping relationship database to the operator with name confusion; push the difference area marking atlas of highly similar appearance drugs and the three - dimensional rotation view training module to the operator with appearance confusion; The targeted training reminder instruction is automatically issued through the built - in learning platform of the HIS system, and the training completion status and assessment results are recorded.
[0018] In an embodiment of the present application, after the error review module calculates the name similarity and appearance similarity between the current drug and all drugs in the feature library based on the feature similarity algorithm, a threshold adjustment module is further included: If the operator corresponding to the current drug has made a wrong drug dispensing with drug name confusion in historical drug dispensing, reduce the preset threshold of name similarity. The more times of wrong drug dispensing caused by name confusion, the more the preset threshold of name similarity is reduced; If the operator corresponding to the current drug has made a wrong drug dispensing with drug appearance confusion in historical drug dispensing, reduce the preset threshold of appearance similarity. The more times of wrong drug dispensing caused by appearance confusion, the more the preset threshold of appearance similarity is reduced.
[0019] In an embodiment of the present application, when the matching module extracts the first 7 digits of each drug traceability code, an edge computing device is used to perform the following steps: Real - time capture the traceability code area on the drug appearance through an image sensor, and directly locate and segment the first 7 - digit character area based on the preset physical position features of the first 7 digits of the drug traceability code; Use a lightweight image recognition algorithm to independently decode the first 7 digits of the characters and generate a drug resource code string; Match the drug resource code string with the local drug feature library through the edge computing node. If the match is successful, directly return the drug basic information to the HIS system; if the match fails, trigger the full code recognition process.
[0020] In an embodiment of the present application, the matching module further includes a peak period dynamic speed regulation sub-module: When it is detected that the number of people queuing at the dispensing window exceeds the preset threshold or it is judged by the historical data prediction model that there will be a dispensing peak in the future period, start the dynamic speed regulation mechanism: Peak period processing mode, only recognize the first 7 digits of the drug traceability code as the traceability code through the edge computing device, quickly match the drug basic information based on the traceability code, and temporarily store the full code image in the local cache queue; Idle time completion mode, call the full code image in non-peak periods to perform complete traceability code parsing, and supplement the drug batch and expiration date information to the database; start an error correction algorithm for the full code images that have not been matched in the cache queue, including occlusion repair and blurred character enhancement processing; Data synchronization mechanism, the traceability code matching records generated during the peak period and the complete traceability code data completed during the idle time are synchronously uploaded to the database after being associated by the time stamp.
[0021] The present application has the following beneficial effects: 1. After scanning the drug traceability code, intercept the first 7 digits as the traceability code, and use the split first 7 digits as the key index to solve the problems of low efficiency and data redundancy in traditional full code scanning. The establishment of the mapping database enables the HIS system to directly call the drug basic information without repeatedly parsing the full code, reducing the system operation load; query the mapping database to obtain the HIS code of the corresponding drug, and perform consistency verification with the HIS code of the drug in the current prescription. If they match, record the complete traceability code (including batch and expiration date) in the database. If they do not match (such as the drug does not match the prescription or the mapping library is missing), the system locks the dispensing process and pushes a warning to the operator's terminal, and at the same time records the error type (such as "specification does not match", "manufacturer error"); the present application solves the problem of easy omission in traditional manual verification through double verification (traceability code mapping + prescription information). For example, when a pharmacist accidentally takes drugs with the same generic name but different specifications (such as 0.25g and 0.5g amoxicillin), the system can accurately intercept and avoid medication errors. In addition, the recording of the complete traceability code supports subsequent quality traceability. For example, when recalling problems, the affected batches of patients can be quickly located through the database; at the same time, by only comparing the first 7 digits of the traceability code for prescriptions, the data parsing process is simplified, and the full code information is saved, which not only meets the requirements of the whole process traceability of drug supervision but also adapts to the lightweight operation needs of the HIS, especially suitable for the outpatient pharmacy scenario with a high flow of people.
[0022] 2. Through the technology of parallel collection of multiple drugs + batch comparison, the efficiency bottleneck of traditional barcode scanners scanning box by box is solved, the limitation of single barcode scanning equipment is broken, and image recognition is used to achieve "one scan, multiple codes", reducing the cost of hardware deployment; it is especially suitable for outpatient peak hours; at the same time, the HIS system performs a hash check on the received traceability code list, and then performs a difference operation with the HIS code set of the drugs in the current prescription. If the difference set is not empty (that is, there are unmatched items), a hierarchical alarm is triggered: Level 1 alarm (key mismatch), triggering conditions: the traceability code of the necessary drugs in the prescription (such as antibiotics, emergency drugs) is not matched successfully, or there are high-risk drug specifications / manufacturers that do not match (such as drugs with concentration differences that may cause serious adverse reactions). Treatment measures: immediately suspend the drug dispensing process and lock the current operation interface; push the alarm to the pharmacist terminal, the pharmacy management screen and the supervision platform, triggering the sound and light alarm; mandatory manual review, and the alarm can only be lifted after confirmation by two pharmacists.
[0023] Level 2 alarm (auxiliary mismatch) triggering conditions: excess or insufficient quantity of auxiliary drugs (such as vitamins and nutritional supplements); substitution of similar drugs (such as drugs with the same generic name from different manufacturers) fails the clinical equivalence test. Handling measures: A pop-up window prompts the pharmacist to manually confirm, allowing "mandatory release" or "re-prescription"; record the operation log and mark it as "low-risk abnormality" for subsequent quality traceability analysis; if the same type of level 2 alarm is triggered continuously (such as frequent overdose of a certain drug), it will automatically upgrade to a level 1 alarm. Introduce a confidence threshold (such as similarity ≥ 95% for substitution), and dynamically adjust the judgment criteria based on historical medication data.
[0024] Level 3 alarm (mapping library missing) triggering conditions: the scanned traceability code is not bound to the HIS code, or the mapping relationship is invalid due to packaging specification changes or supplier updates. Processing measures: automatically initiate a mapping relationship creation request and push it to the drug library administrator terminal; allow temporary binding of emergency codes (must be synchronized to the main database after manual review); if not processed within 30 minutes, trigger a level 2 alarm and notify the superior supervision node. Adopt a fault-tolerant queue mechanism to temporarily store unrecognized traceability codes in a temporary database, and retry matching through asynchronous tasks.
[0025] Through a grading strategy, unnecessary process interruptions are reduced, the proportion of level one alarms is low, and the average time required for manual processing of level two alarms is effectively reduced; combined with clinical importance graded interception, high-risk operations are intercepted.
[0026] 3. When a drug fails to scan its traceability code, an alarm reminder is issued. Further identify whether it is due to the position of the drug packaging or damage to the traceability code area that causes the failure to be recognized. Adjust the drug packaging or clean the traceability code area. If the traceability code is missing or cannot be repaired, suspend the drug dispensing process and trigger the drug recall protocol to prevent drugs without traceability codes from entering the market. At the same time, by integrating material analysis and contour detection, damaged packaging and high-quality imitations (such as fake drugs using compliant materials but with inconsistent printing processes) can be identified. Further, the abnormal types can be directly distinguished by the color of the RGB LED strip (red for missing code, yellow for code defacement), the buzzer frequency indicates the urgency level, and the HIS interface automatically pops up the standardized review steps (such as "rotate the medicine box so that the label side faces up" and "wipe the barcode area").
[0027] 4. Through multi-dimensional similarity calculation: Name similarity: Based on the BERT-ED semantic model, calculate the edit distance and semantic correlation of drug names (for example, the similarity between "Ceftriaxone Sodium" and "Cefotaxime Sodium" reaches 85%); Appearance similarity: Compare the color histogram (weight 40%), shape parameters (weight 30%), and text area matching degree (weight 30%) through cosine similarity. The comprehensive threshold is set at 90%. The HIS interface highlights the different areas in an AR overlay manner (such as the traceability code position deviation > 5mm or the main color deviation > 10%) and generates a three-dimensional comparison view. The hierarchical alarm strategy includes: Level 1 alarm (similarity ≥ 95%): Sound and light prompt a yellow warning, requiring double-person review; Level 2 alarm (80% ≤ similarity < 95%): Pop-up prompt to focus on checking the different items; Level 3 alarm (similarity < 80%): Directly intercept and initiate a traceability verification. By establishing a drug feature library in advance, during the drug dispensing process, if there is a drug in the drugs to be dispensed with a similarity exceeding the threshold with other drugs (relatively high risk of mis-taking), the operator is reminded to conduct a verification to further prevent the mis-dispensing of drugs.
[0028] 5. Considering that different operators have different habits and attention biases, and thus the error-prone directions are also different. If an operator has drug confusion due to similar drug names, the system automatically reduces its name similarity threshold, forcibly triggers a Level 2 alarm, and increases the review steps. At the same time, according to the operator's historical error data (such as the number of name confusion times), the name similarity threshold and / or appearance similarity threshold are adaptively reduced (such as from 90% to 85%) to reduce the misjudgment risk of easily confused drugs such as "Omeprazole Enteric Capsules" and "Omeprazole Magnesium Enteric Tablets". This solution converts error data into training resources and threshold adjustment bases through machine learning, constructs a continuous optimization chain of "error discovery - analysis - improvement", and provides a two-way empowerment model of "intelligent error correction - ability improvement".
[0029] 6. Automatically switch the processing mode based on the queuing prediction model, only parse the first 7 digits of the drug identification code, and quickly match through the local drug feature library (storing the generic name, dosage form, and specification of the drug); name the full-code image with a timestamp (such as 20250416143000_001.jpg) and temporarily store it in the SSD hard disk of the edge node; call the enhanced version of Tesseract-OCR to parse the complete 20-digit traceability code, supplement the production batch and expiration date to the database, and associate them with the peak-period resource code records through the timestamp; by deeply coupling the edge computing efficiency with the drug traceability rules, only process the key identification fields (the first 7 digits) during the peak period, and supplement the auxiliary information (production batch, expiration date) during idle time, which conforms to the supervision logic of "verify the identity first and then trace the details" in drug circulation; this solution breaks through the efficiency bottleneck under the premise of ensuring compliance through a hierarchical strategy of quick matching of the first 7 digits + supplementing during idle time. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure.
[0031] Figure 1 Schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present application.
[0032] Figure 2 Flowchart of a drug management method provided by the embodiments of the present application.
[0033] Figure 3 Implementation manner of the review reminder in a drug management method provided by the embodiments of the present application.
[0034] Figure 4 Implementation manner of the quick identification of the traceability code in a drug management method provided by the embodiments of the present application.
[0035] Figure 5 Schematic diagram of the functional modules of a drug management system provided by the embodiments of the present application.
[0036] Labels in the figure: 1001 - Processor, 1002 - Communication bus, 1003 - User interface, 1004 - Network interface, 1005 - Memory. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present application belong to the scope of protection of the present application.
[0038] The solution of the present application will be further described below with reference to the accompanying drawings.
[0039] As Figure 1 shown, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0040] Those skilled in the art can understand that Figure 1 the structure shown in
[0041] does not constitute a limitation on the electronic device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 1 As
[0042] shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and a data storage module. Figure 1 In the electronic device shown in
[0043] the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention may be disposed in the electronic device, and the electronic device calls a drug management method based on a traceability code stored in the data storage module of the memory 1005 through the processor 1001 and executes the liquid output monitoring system of the present application. Figure 2 Based on the foregoing hardware operating environment and system architecture, in the first aspect of the present application, as shown in By splitting the first 7 digits of the drug traceability code as the traceability code and binding it with the drug specification information, a traceability code database is formed, and the mapping relationship between the first 7 digits of the drug traceability code and the prescription information of the HIS system is entered and maintained manually or semi-automatically; It should be noted that the first 7 digits of the drug traceability code are used as the core identification part to uniquely identify the basic information of the drug, including: marketing authorization holder / manufacturer: registration information of the associated drug manufacturer; generic name of the drug: standardized names such as "Amoxicillin Capsules"; dosage form and specifications: such as tablets, injections, and the amount of each box / bottle (such as 10 tablets / box, 0.5g / stick); approval number and packaging specifications: for example, "National Medicine Standard H20230001" and different packaging specifications (such as 24 tablets / box or 36 tablets / box). Take the traceability code xxxxxxxyyyyyyyyyzzzz as an example: the first 7 digits (xxxxxxx): identify the basic information of the drug (such as a certain specification of aspirin tablets produced by a certain company); the 8th to 16th digits (yyyyyyyyyy): production identification code, including production batch number, expiration date, single product serial number, etc.; the last 4 digits (zzzz): check digit, the validity of the traceability code is verified by the algorithm.
[0044] It should be noted that the construction of the mapping relationship includes: manual entry. For newly launched drugs, pharmacists manually enter the traceability code through the HIS system interface and associate it with the specification parameters in the drug instructions (such as tablet specifications, injection volume); semi-automatic entry: through the National Drug Traceability System API interface, batch capture of the traceability codes and specification correspondences of coded drugs, and automatic updating of the database every morning; or based on the traceability codes and specifications of the drugs in the hospital's drug procurement list.
[0045] During the drug dispensing process, the first 7 digits of the traceability code are extracted by scanning the drug traceability code and automatically compared with the prescription information; if the traceability code matches successfully, the drug dispensing is completed, and the complete drug dispensing process and the complete drug traceability code are recorded in the database; if the match fails, an alarm is triggered and the drug dispensing process is suspended.
[0046] In this embodiment, after scanning the drug traceability code, the first 7 digits are intercepted as the traceability code. By splitting the first 7 digits as the key index, the problems of low efficiency and data redundancy in traditional full-code scanning are solved. The establishment of the mapping database enables the HIS system to directly call the basic drug information without repeatedly parsing the full code, reducing the system operation load; querying the mapping database to obtain the HIS code of the corresponding drug and performing consistency verification with the HIS code of the drug in the current prescription. If they match, the complete traceability code (including batch number and expiration date) is recorded in the database. If they do not match (such as the drug does not match the prescription or the mapping library is missing), the system locks the drug dispensing process and pushes an alarm to the operator's terminal, and at the same time records the error type (such as "specification does not match", "manufacturer error"); this application solves the problem of easy omission in traditional manual verification through double verification (traceability code mapping + prescription information). For example, when a pharmacist accidentally takes drugs with the same generic name but different specifications (such as 0.25g and 0.5g amoxicillin), the system can accurately intercept and avoid medication errors. In addition, the recording of the complete traceability code supports subsequent quality traceability. For example, when recalling problems, the patients affected by the batch can be quickly located through the database; at the same time, by only comparing the first 7 digits of the traceability code for prescriptions, the data parsing process is simplified, and the full-code information is saved, which not only meets the requirements of the full-process traceability of drug supervision but also adapts to the lightweight operation requirements of HIS, especially suitable for the outpatient pharmacy scenario with a high flow of people.
[0047] In an embodiment of the present application, the drug dispensing link specifically includes: Synchronously collecting images of the appearances of multiple drugs in the scanning area through an image recognition device, and positioning and segmenting the traceability code area based on an image recognition algorithm; After extracting the first 7 digits of each drug traceability code, multiple traceability codes are merged into a single data stream and synchronously transmitted to the HIS system; The HIS system performs batch comparison on multiple traceability codes according to the types and quantities of drugs in the prescription. If there are items that fail to match, an alarm is triggered and the drug dispensing process is paused.
[0048] It should be noted that the image recognition algorithm uses an improved YOLOv8 model to perform parallel detection on multiple boxes of drugs in the scanning area (such as a medicine basket or a drug dispensing table), and combines the U-Net network to segment the traceability code area. The model realizes accurate positioning through a pre-trained drug packaging feature library (such as barcode position, medicine box size ratio), and supports processing complex scenarios such as distortion, reflection, and occlusion; multiple traceability codes are encapsulated into a JSON array in the prescription order, and an SHA-256 hash check value is attached to prevent tampering; In this implementation, the efficiency bottleneck of traditional barcode scanners scanning boxes one by one is solved through the technology of parallel collection of multiple drugs + batch comparison, breaking through the limitation of single barcode scanner equipment, and realizing "one scan for multiple codes" by using image recognition, reducing the hardware deployment cost; it is especially suitable for outpatient peak hours; at the same time, the HIS system performs a hash check on the received traceability code list, and then performs a difference operation with the HIS code set of the drugs in the current prescription. If the difference set is not empty (that is, there are unmatched items), a hierarchical alarm is triggered: Level 1 alarm (key mismatch), triggering conditions: the traceability code of the necessary drugs in the prescription (such as antibiotics, emergency drugs) is not matched successfully, or there are high-risk drug specifications / manufacturers that do not match (such as drugs with concentration differences that may cause serious adverse reactions). Treatment measures: immediately suspend the drug dispensing process and lock the current operation interface; push the alarm to the pharmacist terminal, the pharmacy management screen and the supervision platform, triggering the sound and light alarm; mandatory manual review, and the alarm can only be lifted after confirmation by two pharmacists.
[0049] Level 2 alarm (auxiliary mismatch) triggering conditions: excess or insufficient quantity of auxiliary drugs (such as vitamins and nutritional supplements); substitution of similar drugs (such as drugs with the same generic name from different manufacturers) fails the clinical equivalence test. Handling measures: A pop-up window prompts the pharmacist to manually confirm, allowing "mandatory release" or "re-prescription"; record the operation log and mark it as "low-risk abnormality" for subsequent quality traceability analysis; if the same type of level 2 alarm is triggered continuously (such as frequent overdose of a certain drug), it will automatically upgrade to a level 1 alarm. Introduce a confidence threshold (such as similarity ≥ 95% for substitution), and dynamically adjust the judgment criteria based on historical medication data.
[0050] Level 3 alarm (mapping library missing) triggering conditions: the scanned traceability code is not bound to the HIS code, or the mapping relationship is invalid due to packaging specification changes or supplier updates. Processing measures: automatically initiate a mapping relationship creation request and push it to the drug library administrator terminal; allow temporary binding of emergency codes (must be synchronized to the main database after manual review); if not processed within 30 minutes, trigger a level 2 alarm and notify the superior supervision node. Adopt a fault-tolerant queue mechanism to temporarily store unrecognized traceability codes in a temporary database, and retry matching through asynchronous tasks.
[0051] Through a grading strategy, unnecessary process interruptions are reduced, the proportion of level one alarms is low, and the average time required for manual processing of level two alarms is effectively reduced; combined with clinical importance graded interception, high-risk operations are intercepted.
[0052] In one embodiment of the present application, the extraction of the first 7 digits of each drug traceability code also includes: The image recognition device performs contour detection and material analysis on the appearance of the drug in the scanning area. If the appearance of the drug is recognized but the traceability code identification area is not detected, the following processing flow is triggered: Generate a visual positioning frame based on the appearance characteristics of the medicine, and display the position and appearance image of the medicine lacking the traceability code through the HIS terminal interface; Prompt the operator to conduct manual verification through acoustic and optical signals; when the traceability code is normally recognized after the operator manually verifies and adjusts the position of the medicine, resume the medicine dispensing process.
[0053] It should be noted that by adopting a multi-task deep learning model improved based on YOLOv8, the medicine contour detection, material analysis and traceability code positioning are synchronously executed to confirm that the recognized item is a medicine. If the traceability code area is not detected in 3 consecutive frames of images (with an interval of 0.2 seconds), it is determined as a "missing code" event. For example, if the side of the medicine package printed with the traceability code is not aligned with the scanning area, the system generates a visual positioning frame with an AR overlay effect on the HIS terminal, marks the three-dimensional coordinates (X / Y / Z axes) of the abnormal medicine in the scanning area, and magnifies and displays the appearance image; it is convenient for the operator to find the position of the medicine lacking the traceability code and make corresponding adjustments; In an embodiment of the present application, when extracting the first 7 digits of each medicine traceability code, it further includes: If it is recognized that there are situations such as foreign object coverage, appearance displacement or damage in the traceability code identification area of the medicine, generate a visual positioning frame based on the appearance characteristics of the medicine, and display the position and appearance image of the medicine with an unclear traceability code through the HIS terminal interface; Prompt the operator to conduct manual verification through acoustic and optical signals; when the traceability code area of the medicine is normally recognized after the operator manually verifies and repairs the abnormality, resume the medicine dispensing process; when the operator manually verifies and confirms that the traceability code cannot be repaired, suspend the medicine dispensing process of this medicine and trigger the medicine recall protocol.
[0054] In this embodiment, when a medicine fails to scan the traceability code, an alarm reminder is given, and it is further identified whether it is due to the position of the medicine package or the damage of the traceability code area that causes the failure to recognize. Adjust the medicine package or clean the traceability code area. If the traceability code is missing and cannot be repaired, suspend the medicine dispensing process of this medicine and trigger the medicine recall protocol to prevent the medicine lacking the traceability code from flowing into the market. At the same time, by integrating material analysis and contour detection, damaged packages and high imitation packages can be recognized; further, the abnormal types can be directly distinguished by the color of the RGB LED light strip (red for missing code, yellow for code smudging), the frequency of the buzzer indicates the urgency, and the HIS interface automatically pops up the standardized verification steps (such as "rotate the medicine box so that the label side faces up" "wipe the barcode area").
[0055] In an embodiment of the present application, referring to Figure 3 as shown, before the medicine dispensing link, it further includes: Establish a medicine feature library, which includes name features and appearance features, and the appearance features include text layout, appearance color, shape and traceability code identification position information; The appearance image of the drug to be dispensed is collected in real time by the image recognition device, and its outer contour, color distribution and text area features are extracted; Based on the feature similarity algorithm, calculate the name similarity and appearance similarity between the current drug and all drugs in the feature library. If there is any drug with a similarity exceeding the preset threshold, display the comparison image and drug name of the drug with high similarity through the HIS terminal interface, and mark the difference area; generate a review reminder instruction, including audible and visual alarms and manual review operation guidelines; If the manual review confirms that the drug is correctly matched, record the review result and continue the drug dispensing process; if the review finds a mismatch, suspend the drug dispensing and start the drug traceability verification by associating the traceability code.
[0056] It should be noted that the name features integrate semantic information such as the generic name, trade name, and alias of the drug (such as the mapping between "aspirin" and "acetylsalicylic acid"). The appearance features generate a standardized template by parsing the drug packaging image library, including text layout (such as font size, logo position), color distribution (HSV histogram), shape parameters (aspect ratio, edge curvature), and the coordinate of the traceability code area (positioned based on the YOLOv8 pre-trained model); In this embodiment, through multi-dimensional similarity calculation: Name similarity: Based on the BERT-ED semantic model, calculate the edit distance and semantic correlation degree of the drug name (such as the similarity between "ceftriaxone sodium" and "cefotaxime sodium" reaches 85%); Appearance similarity: Compare the color histogram (weight 40%), shape parameters (weight 30%), and text area matching degree (weight 30%) through cosine similarity. The comprehensive threshold is set to 90%; The HIS interface highlights the difference area in an AR overlay manner (such as the traceability code position offset > 5mm or the main color deviation > 10%), and generates a three-dimensional comparison view; The hierarchical alarm strategy includes: Level 1 alarm (similarity ≥ 95%): Audible and visual yellow warning, requiring double review; Level 2 alarm (80% ≤ similarity < 95%): Pop-up window prompts to focus on checking the difference items; Level 3 alarm (similarity < 80%): Directly intercept and start the traceability verification; By establishing the drug feature library in advance, during the drug dispensing process, if there is a drug with a similarity exceeding the threshold among the drugs to be dispensed (relatively high risk of mis-taking), the operator is reminded to conduct a verification, further avoiding the mis-dispensing of drugs.
[0057] In an embodiment of the present application, after the operator completes the drug dispensing, when it is found that there is a mis-dispensing through the complete drug dispensing process and the complete drug traceability code, it further includes: Based on the traceability code identification position, appearance color distribution, and text layout features of the prescribed drug and the wrong drug, calculate the name similarity and appearance similarity between the two; If the name similarity exceeds the first threshold and the appearance similarity is lower than the second threshold, it is determined as a dispensing error caused by drug name confusion; if the appearance similarity exceeds the second threshold and the name similarity is lower than the first threshold, it is determined as a dispensing error caused by appearance confusion. Generate a targeted training reminder instruction according to the error type and associate the operator information. The instruction includes at least one of the following: Push the drug name pronunciation comparison training and the generic name - trade name mapping relationship database to the operator with name confusion; push the difference area marking atlas of highly similar appearance drugs and the 3D rotation view training module to the operator with appearance confusion. The targeted training reminder instruction is automatically issued through the built - in learning platform of the HIS system, and the training completion status and assessment results are recorded.
[0058] In an embodiment of the present application, after calculating the name similarity and appearance similarity of the current drug and all drugs in the feature library based on the feature similarity algorithm, it further includes: If the operator corresponding to the current drug has made a dispensing error due to drug name confusion in historical dispensing, the preset threshold of name similarity is reduced. The more times of dispensing errors caused by drug name confusion, the more the preset threshold of name similarity is reduced. If the operator corresponding to the current drug has made a dispensing error due to drug appearance confusion in historical dispensing, the preset threshold of appearance similarity is reduced. The more times of dispensing errors caused by drug appearance confusion, the more the preset threshold of appearance similarity is reduced.
[0059] It should be noted that for the name confusion training module: pronunciation comparison training: for "phonetically similar drugs" (such as "nicotinamide for injection" and "hydrochloric acid for injection"), the voice difference recognition is strengthened through audio comparison; mapping database: integrate the generic name - trade name mapping relationship (such as "azithromycin" corresponding to "Zithromax", "Tylosin"), support semantic retrieval and visualization of the association graph; for the appearance confusion training module: difference marking atlas: highlight the difference areas of highly similar drugs (such as the main packaging color deviation > 10% or the LOGO position deviation > 5mm); 3D rotation view: generate a 360° comparison model of the medicine box based on AR technology, support zooming in to observe details (such as the difference in font printing process). In this embodiment, considering that different operators have different habits and attention biases, the directions in which they are prone to make mistakes are also different. If an operator makes a drug confusion due to similar drug names, the system automatically reduces its name similarity threshold, forcibly triggers a secondary alarm and adds a review step; at the same time, according to the operator's historical error data (such as the number of name confusions), the name similarity threshold and / or the appearance similarity threshold are adaptively reduced (such as from 90% to 85%) to reduce the misjudgment risk of easily confused drugs such as "Omeprazole Enteric Capsules" and "Omeprazole Magnesium Enteric Tablets"; this solution converts error data into training resources and threshold adjustment bases through machine learning, constructs a continuous optimization chain of "error discovery - analysis - improvement", and provides a two-way empowerment model of "intelligent error correction - ability improvement".
[0060] In an embodiment of the present application, referring to Figure 4 as shown, when extracting the first 7 digits of each drug traceability code, the edge computing device performs the following steps: Real-time capture the traceability code area on the drug appearance through an image sensor, and directly locate and segment the first 7-character area based on the preset physical position characteristics of the first 7 digits of the drug traceability code; Adopt a lightweight image recognition algorithm to independently decode the first 7 characters and generate a drug resource code string; Match the drug resource code string with the local drug feature library through the edge computing node. If the match is successful, directly return the drug basic information to the HIS system; if the match fails, trigger the full-code recognition process.
[0061] In an embodiment of the present application, it further includes: When it is detected that the number of people queuing at the dispensing window exceeds the preset threshold or it is judged by the historical data prediction model that there will be a dispensing peak in the future period, start the dynamic speed regulation mechanism: Peak period processing mode, only identify the first 7 digits of the drug traceability code through the edge computing device, quickly match the drug basic information based on the traceability code, and temporarily store the full-code image in the local cache queue; Idle time completion mode, call the full-code image in the non-peak period to perform complete traceability code parsing, and supplement the drug batch and expiration date information to the database; start the error correction algorithm for the full-code images that have not been matched in the cache queue, including occlusion repair and blurred character enhancement processing; Data synchronization mechanism, the traceability code matching records generated during the peak period and the complete traceability code data completed during the idle time are synchronously uploaded to the database after being associated by the time stamp.
[0062] It should be noted that the queuing prediction model analyzes historical prescription data (such as time periods and prescription quantities) based on the LSTM algorithm to predict the prescription demand in the next 30-minute window period. The trigger threshold is set as the queuing number > 8 or the predicted prescription quantity > 200 prescriptions per hour. The edge algorithm only identifies the traceability code area and directly identifies the first 7 digits of the traceability code according to the method including the text direction, which is different from the method of first identifying the full code and then splitting the first 7 digits. It processes a smaller amount of data and has a faster recognition speed. In this embodiment, the processing mode is automatically switched based on the queuing prediction model. Only the first 7 digits of the drug identification code are parsed and quickly matched through the local drug feature library (storing the drug generic name, dosage form, and specification). The full code image is named with a timestamp (such as 20250416143000_001.jpg) and temporarily stored in the SSD hard disk of the edge node. The enhanced version of Tesseract-OCR is called to parse the complete 20-digit traceability code, and the production batch and expiration date are supplemented and recorded in the database, which is associated with the peak period resource code record through the timestamp. By deeply coupling the edge computing efficiency with the drug traceability rules, only the key identification fields (the first 7 digits) are processed during the peak period, and the auxiliary information (production batch and expiration date) is supplemented during the idle period. Through the supervision logic of "first identifying the identity and then tracing the details" and the hierarchical strategy of quick matching of the first 7 digits + supplementing during the idle period, the efficiency bottleneck is broken through on the premise of ensuring compliance.
[0063] In the second aspect of the present application, a drug management system based on the traceability code is provided. Referring to Figure 5 as shown, it includes: A splitting module splits the first 7 digits of the drug traceability code as the traceability code and binds it with the drug specification information to form a traceability code database. The mapping relationship between the first 7 digits of the drug traceability code and the HIS system prescription information is entered and maintained manually or semi-automatically. A matching module extracts the first 7 digits of the traceability code by scanning the drug traceability code during the drug dispensing process and automatically compares it with the prescription information. If the traceability code matches successfully, the drug dispensing is completed, and the complete drug dispensing process and the complete drug traceability code are recorded in the database. If the match fails, an alarm is triggered and the drug dispensing process is paused.
[0064] It should be noted that the specific implementation manner of a drug management method based on the traceability code in the embodiments of the present application refers to the specific implementation manner of a drug management method based on the traceability code proposed in the first aspect of the embodiments of the present application described above, and will not be elaborated here.
[0065] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that an article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such article or device. Without further limitation, the elements defined by the statement "including..." do not exclude the presence of additional identical elements in the article or device including the elements.
[0066] The above has introduced in detail a drug management method based on a traceability code. In this article, specific examples are used to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand a drug management method based on a traceability code of this application and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A drug management method based on traceability code, characterized in that: include: By splitting the first 7 digits of the drug traceability code as the traceability code and binding it with the drug specification information, a traceability code database is formed, and the mapping relationship between the first 7 digits of the drug traceability code and the prescription information of the HIS system is entered and maintained manually or semi-automatically; During the drug dispensing process, the first 7 digits of the traceability code are extracted by scanning the drug traceability code and automatically compared with the prescription information; if the traceability code matches successfully, the drug dispensing is completed, and the complete drug dispensing process and the complete drug traceability code are recorded in the database; if the match fails, an alarm is triggered and the drug dispensing process is suspended.
2. A drug management method based on traceability code according to claim 1, characterized in that: The drug dispensing process specifically includes: The image recognition device is used to synchronously capture images of the appearance of multiple drugs in the scanning area, and the traceability code area is located and segmented based on the image recognition algorithm; After extracting the first 7 digits of each drug traceability code, multiple traceability codes are merged into a single data stream and transmitted synchronously to the HIS system; The HIS system performs batch comparison on multiple traceability codes according to the types and quantities of drugs in the prescription. If there is a match failure, an alarm is triggered and the drug dispensing process is suspended.
3. A drug management method based on traceability code according to claim 2, characterized in that: The extraction of the first 7 digits of each drug traceability code also includes: The image recognition device performs contour detection and material analysis on the appearance of the drug in the scanning area. If the appearance of the drug is recognized but the traceability code identification area is not detected, the following processing flow is triggered: Generate a visual positioning frame based on the appearance features of the drug, and display the location and appearance image of the drug with missing traceability code through the HIS terminal interface; The operator is prompted to manually review the drug through sound and light signals; when the position of the drug is adjusted after manual review, the traceability code is recognized normally and the drug dispensing process is restored.
4. A drug management method based on traceability code according to claim 2, characterized in that: The extraction of the first 7 digits of each drug traceability code also includes: If the drug traceability code identification area is found to be covered by foreign matter, displaced in appearance, or damaged, a visual positioning frame is generated based on the drug appearance features, and the location and appearance image of the drug with unclear traceability code are displayed through the HIS terminal interface; The operator is prompted to conduct manual review through sound and light signals; when the abnormality in the drug traceability code area is repaired through manual review and the traceability code is recognized normally, the drug dispensing process is resumed; when manual review confirms that the traceability code cannot be repaired, the drug dispensing process is suspended and the drug recall agreement is triggered.
5. A drug management method based on traceability code according to claim 1, characterized in that: The drug dispensing process also includes: Establishing a drug feature library, the feature library includes name features and appearance features, the appearance features include text layout, appearance color, shape and traceability code identification position information; The image recognition device is used to collect the appearance image of the drug to be dispatched in real time, and extract its outer contour, color distribution and text area features; Based on the feature similarity algorithm, the name similarity and appearance similarity between the current drug and all drugs in the feature library are calculated. If there is any drug whose similarity exceeds the preset threshold, the comparison image and drug name of the highly similar drug will be displayed through the HIS terminal interface, and the difference area will be marked; a review reminder instruction will be generated, including sound and light alarms and manual review operation instructions; If manual review confirms that the drug match is correct, the review result is recorded and the drug dispensing process continues; if the review finds a matching error, the drug dispensing is suspended and the traceability code is associated to initiate drug traceability verification.
6. A drug management method based on traceability code according to claim 5, characterized in that: After the operator has completed the dispensing of the medicine, if the operator finds that the medicine has been dispensed incorrectly through the complete dispensing process and the complete medicine traceability code, it also includes: Based on the traceability code identification position, appearance color distribution and text layout characteristics of the prescription drug and the erroneous drug, the name similarity and appearance similarity between the two are calculated; If the name similarity exceeds the first threshold and the appearance similarity is lower than the second threshold, it is determined that the medication is mis-dispensed due to confusion of drug names; if the appearance similarity exceeds the second threshold and the name similarity is lower than the first threshold, it is determined that the medication is mis-dispensed due to confusion of appearance; Generate a directional training reminder instruction based on the error type and associate it with operator information, the instruction including at least one of the following: For operators who are confused about the names, we push the pronunciation comparison training of drug names and the generic name-trade name mapping relationship database; for operators who are confused about the appearance, we push the difference area annotation atlas and 3D rotation view training module of drugs with highly similar appearance; The directional training reminder instruction is automatically issued through the built-in learning platform of the HIS system, and the training completion status and assessment results are recorded.
7. A drug management method based on traceability code according to claim 6, characterized in that: After calculating the name similarity and appearance similarity of the current drug and all drugs in the feature library based on the feature similarity algorithm, the method further includes: If the operator corresponding to the current drug has mis-dispensed the drug due to confusion of the drug name in the history of drug dispensing, the preset threshold of the name familiarity is lowered. The more times the number of mis-dispensing caused by name confusion is, the more the preset threshold of the name familiarity is lowered. If the operator corresponding to the current drug has made an erroneous dispensing of the drug due to confusion about the appearance in the historical dispensing, the preset threshold of the appearance familiarity will be lowered. The more times the erroneous dispensing of the drug is caused by confusion about the appearance, the more the preset threshold of the appearance familiarity will be lowered.
8. A drug management method based on traceability code according to any one of claims 1 to 4, characterized in that: When extracting the first 7 digits of each drug traceability code, the edge computing device is used to perform the following steps: The traceability code area on the appearance of the drug is captured in real time through an image sensor, and the first 7-digit character area is directly located and segmented based on the preset physical location features of the first 7 digits of the drug traceability code; A lightweight image recognition algorithm is used to independently decode the first 7 characters to generate a drug resource code string; The drug resource code string is matched with the local drug feature library through the edge computing node. If the match is successful, the basic drug information is directly returned to the HIS system; if the match fails, the full code recognition process is triggered.
9. A drug management method based on traceability code according to claim 8, characterized in that: Also includes: When it is detected that the number of people queuing at the medication window exceeds the preset threshold or the historical data prediction model determines that there will be a medication peak in the future period, the dynamic speed adjustment mechanism is activated: In the peak processing mode, the edge computing device only recognizes the first 7 digits of the drug traceability code, quickly matches the basic information of the drug based on the traceability code, and temporarily stores the full code image in the local cache queue; In the off-peak completion mode, the full code image is called during non-peak hours to perform complete traceability code analysis, and the drug batch and expiration date information is added to the database; the error correction algorithm is activated for the unmatched full code images in the cache queue, including occlusion repair and fuzzy character enhancement processing; Data synchronization mechanism: the traceability code matching records generated during peak hours and the complete traceability code data completed during off-peak hours are uploaded to the database synchronously after being associated with timestamps.
10. A drug management system based on traceability code, characterized in that: include: The splitting module splits the first 7 digits of the drug traceability code as the traceability code and binds it with the drug specification information to form a traceability code database. The mapping relationship between the first 7 digits of the drug traceability code and the prescription information of the HIS system is entered and maintained manually or semi-automatically; The matching module extracts the first 7 digits of the traceability code by scanning the drug traceability code during the drug dispensing process, and automatically compares it with the prescription information; if the traceability code matches successfully, the drug dispensing is completed, and the complete drug dispensing process and the complete drug traceability code are recorded in the database; if the match fails, an alarm is triggered and the drug dispensing process is suspended.
Citation Information
Patent Citations
Drug supply and distribution processing system and method
CN116958972A
Drug traceability code acquisition method, system and device based on image recognition and medium
CN119647502A
Tracing method and system based on drug consumable traceability code
CN119648247A
Warehouse-in and warehouse-out management system and equipment for medical supplies and storage medium
CN119851894A
Product tracing information query method and device, equipment and storage medium
CN119887237A
Cited By
Multi-role collaborative management architecture based on RBAC + HIS synchronization
CN120354459A
Drug management method and device based on traceability code and medium
CN120766909A
Security risk management platform for multi-point collaborative analysis
CN120875592A
Picture data analysis system based on artificial intelligence
CN121482809A