Drug dispensing method and drug dispensing equipment based on traceability code verification
The drug dispensing method using traceability codes automatically reads and verifies drug traceability code data, solving the problem of low drug dispensing efficiency and improving drug accuracy and safety. It is suitable for high-traffic pharmacies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-04-03
AI Technical Summary
The current drug dispensing process is inefficient and prone to human errors such as missed scanning and incorrect scanning, which leads to errors in the binding of drug traceability information with prescriptions and fails to meet the requirements of drug circulation supervision.
A drug dispensing method based on traceability code verification is adopted. The traceability code scanning module automatically reads the drug traceability code data and matches it with the prescription requirements to ensure the correctness of the drug. If the verification is successful, the dispensing cover is unlocked; otherwise, the drug is sent to the recycling area.
It improves the efficiency of drug dispensing, ensures the accuracy and safety of drugs, is suitable for high-volume pharmacies or hospitals, reduces human error, and enhances the transparency and reliability of drug distribution and supervision.
Smart Images

Figure CN121789346A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drug dispensing, and in particular to a drug dispensing method and apparatus based on traceability code verification. Background Technology
[0002] In the field of drug distribution, ensuring that the correct drugs and their corresponding traceability information are delivered to users accurately and efficiently is a core aspect in scenarios such as medical institution pharmacies and retail pharmacies. It is directly related to the user's medication safety and the full traceability of drugs.
[0003] In existing technologies, the main method relies on manual scanning and verification of each medication at the dispensing window. Since the entire process is done manually by pharmacists or staff, it is inefficient, labor-intensive, and prone to errors such as missed or incorrect scanning when dealing with a large number of prescriptions. This can lead to misalignment of medication traceability information with prescriptions, failing to meet the requirements for drug distribution supervision. Summary of the Invention
[0004] This invention provides a drug dispensing method and apparatus based on traceability code verification, which can solve the problem in the prior art that it is difficult to improve the efficiency of drug dispensing while ensuring the correctness of dispensing.
[0005] In a first aspect, embodiments of the present invention provide a drug dispensing method based on traceability code verification, applicable to a drug dispensing system. The drug dispensing system includes a drug storage terminal, a drug dispensing terminal, and a transmission mechanism. The drug dispensing terminal includes a traceability code scanning module, a dispensing port, a dispensing cover, and a recycling area. The drug dispensing method includes: In response to the medication request corresponding to the prescription, the medication dispensing cover is locked, and the medication storage end dispenses each medication according to the prescription. Then, the transmission mechanism transmits each medication to the traceability code scanning module one by one. The traceability code scanning module sequentially reads the traceability code data corresponding to each drug and sequentially matches and verifies the traceability code data corresponding to each drug with the prescription requirements in the prescription to obtain the verification result corresponding to each drug. If the verification results for each of the aforementioned drugs are all verified, the dispensing cover will be unlocked and a dispensing notification will be sent to the user. If any of the verification results for each of the aforementioned drugs fails verification, then each of the aforementioned drugs will be sent to the recycling area, and a drug dispensing failure notification will be sent to the user.
[0006] This embodiment responds to medication requests, controls the dispensing of medication according to the prescription from the storage terminal, and uses a transmission mechanism to deliver each medication to the traceability code scanning module, requiring no manual intervention. During the verification process, the system automatically reads the traceability code data of each medication box and matches it with the prescription requirements to ensure medication accuracy. If all medications pass verification, the dispensing cover is automatically unlocked and the user is notified to collect their medication; if any fail verification, the medication is automatically sent to the recycling area and the user is notified of the failure. This effectively prevents the risk of incorrect medications being taken by users and significantly shortens dispensing time, making it particularly suitable for high-traffic pharmacies or hospitals. Therefore, this application solves the problem in existing technologies where medication dispensing is difficult to improve efficiency while ensuring correct dispensing.
[0007] As a preferred example of the first aspect, the step of sequentially matching and verifying the traceability code data corresponding to each of the medicines with the prescription requirements in the prescription to obtain the verification result corresponding to each of the medicines is specifically as follows: Iterate through the traceability code data corresponding to each of the drugs, and output the verification result corresponding to each drug based on the traceability code data corresponding to each drug and the prescription requirements in the prescription. During each traversal, the quantity information and drug information corresponding to the currently traversed drug in the prescription requirements are obtained, and the traceability code data of the currently traversed drug are matched sequentially with the quantity information and drug information corresponding to the currently traversed drug to obtain the verification result corresponding to each drug.
[0008] In this preferred example, by automatically iterating through each medication and performing the same verification process, the risk of human error is eliminated. During each iteration, the system obtains the quantity and medication information of the current medication in the prescription and precisely matches it with the traceability code data, ensuring that each box of medication meets the prescription requirements in both quantity and type. This step-by-step verification mechanism improves the reliability of the dispensing process and prevents errors in individual medications from affecting the overall accuracy of the prescription. Simultaneously, automated iteration improves processing efficiency, enabling the system to quickly process complex prescriptions, shorten user waiting time, and provide a complete foundation for subsequent data binding and traceability.
[0009] As a preferred example of the first aspect, the step of sequentially matching the traceability code data currently being traversed with the quantity information and drug information corresponding to the currently traversed drug to obtain the verification result corresponding to each drug is specifically as follows: The traceability code data being iterated over is matched sequentially with the quantity information and drug information corresponding to the drug being iterated over. If both match successfully, the verification result corresponding to the drug being iterated over is output as passed; otherwise, the verification result corresponding to the drug being iterated over is output as failed.
[0010] In this preferred example, the system automatically performs a double check to ensure the accuracy and compliance of medication dispensing. Quantity matching prevents over- or under-dispensing of medications, while medication information matching ensures the correctness of key attributes such as medication name, specifications, and batch number, fundamentally reducing the risk of medication errors. This standardized judgment avoids inconsistencies caused by human factors, improving the reliability and repeatability of the medication dispensing process. For regulatory purposes, this mechanism ensures that every box of medication dispensed fully complies with prescription requirements, facilitating traceability and auditing, and enhancing the transparency of medication distribution. Furthermore, when verification fails, the system automatically triggers a recall process to prevent erroneous medications from being released, improving overall security. This method strengthens medication quality management through refined verification, meeting medical safety standards.
[0011] As a preferred example of the first aspect, the step of sequentially reading the traceability code data corresponding to each of the medicines through the traceability code scanning module specifically involves: The traceability code scanning module sequentially scans each of the medicines to obtain the traceability code image corresponding to each medicine, and then decodes each traceability code image to obtain the traceability code data corresponding to each medicine.
[0012] In this preferred example, an automated scanning module ensures that each medicine is stably scanned during transmission, acquiring a clear traceability code image. The system then quickly decodes the image to extract readable traceability code data. This process reduces data acquisition failures due to blurry or damaged images, improving the reliability and speed of data collection. The one-by-one scanning mechanism ensures that the traceability code for each medicine is processed independently, avoiding medicine confusion or omissions, which is particularly suitable for high-frequency dispensing environments. Furthermore, scanning and transmission are performed synchronously without additional interruptions, optimizing overall process efficiency. In this way, the system can efficiently process large volumes of medicines, increasing dispensing throughput while providing an accurate data foundation for subsequent validation. This design also reduces equipment dependency risks and enhances the system's robustness and applicability.
[0013] As a preferred example of the first aspect, after sending the medication pickup notification to the user, the method further includes: The traceability code data corresponding to each of the aforementioned drugs is bound to the prescription for dispensing the medication to obtain drug binding information, and the drug binding information is uploaded to the preset drug traceability management platform.
[0014] In this preferred example, the system's automatic binding and uploading ensures a precise association between prescriptions and medications, improving data integrity and timeliness. This step strengthens the traceability of the entire drug distribution chain, allowing regulatory authorities, medical institutions, or users to access real-time information on drug origin, flow, and prescription association, enhancing transparency and accountability.
[0015] Secondly, the present invention provides a drug dispensing device, comprising: a control device, a drug storage end, a drug dispensing end, and a transmission mechanism, wherein the drug dispensing end includes a traceability code scanning module, a drug dispensing port, a drug dispensing cover, and a recycling area, and the control device includes a first control module, a second control module, a third control module, and a fourth control module; The first control module is used to respond to the medication request corresponding to the prescription, so as to lock the medication cover and release each medicine according to the prescription at the storage end, and then the transmission mechanism transmits each medicine to the traceability code scanning module one by one. The second control module is used to sequentially read the traceability code data corresponding to each of the medicines through the traceability code scanning module, and sequentially match and verify the traceability code data corresponding to each of the medicines with the prescription requirements in the prescription to obtain the verification result corresponding to each of the medicines. The third control module is used to unlock the dispensing cover and send a dispensing notification to the user if the verification results for each of the drugs are verified to be successful. The fourth control module is used to send each drug into the recycling area and send a drug dispensing failure notification to the user if any of the verification results for each drug fails the verification.
[0016] As a preferred example of the second aspect, the second control module includes a first control unit and a second control unit; The first control unit is used to traverse the traceability code data corresponding to each of the drugs, and output the verification result corresponding to each of the drugs according to the traceability code data corresponding to each drug and the prescription requirements in the prescription. The second control unit is used to obtain the quantity information and drug information corresponding to the drug currently being traversed in the prescription requirements during each traversal, and to match the traceability code data of the current traversal with the quantity information and drug information corresponding to the drug currently being traversed in sequence to obtain the verification result corresponding to each drug.
[0017] As a preferred example of the second aspect, the second control unit includes a first control subunit; The first control subunit is used to match the traceability code data currently being traversed with the quantity information and drug information corresponding to the drug currently being traversed in sequence. If both match successfully, the verification result corresponding to the drug currently being traversed is output as passed; otherwise, the verification result corresponding to the drug currently being traversed is output as failed.
[0018] As a preferred example of the second aspect, the second control module further includes a third control unit; The third control unit is used to sequentially scan each of the medicines through the traceability code scanning module to obtain the traceability code image corresponding to each medicine, and to decode each traceability code image to obtain the traceability code data corresponding to each medicine.
[0019] As a preferred example of the second aspect, the third control module further includes a fourth control unit; The fourth control unit is used to bind the traceability code data corresponding to each drug with the prescription for dispensing the drug, obtain drug binding information, and upload the drug binding information to a preset drug traceability management platform.
[0020] In summary, this embodiment responds to medication requests, controls the dispensing of medication according to the prescription, and utilizes a transmission mechanism to deliver each medication to the traceability code scanning module, eliminating the need for manual intervention. During the verification process, the system automatically reads the traceability code data of each medication box and matches it against the prescription requirements to ensure medication accuracy. If all medications pass verification, the dispensing cover is automatically unlocked and the user is notified to collect their medication; if any fail verification, the medication is automatically sent to the recycling area and the user is notified of the failure. This effectively prevents the risk of incorrect medications being taken by users and significantly shortens dispensing time, making it particularly suitable for high-traffic pharmacies or hospitals. Therefore, this application solves the problem in existing technologies where medication dispensing is difficult to improve efficiency while ensuring correct dispensing.
[0021] Another embodiment of the present invention provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps of the drug dispensing method based on traceability code verification as described in the present invention.
[0022] Another embodiment of the present invention provides a computer-readable storage medium item, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform the steps of the drug dispensing method based on traceability code verification of the present invention. Attached Figure Description
[0023] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating an embodiment of a drug dispensing method based on traceability code verification provided by the present invention. Figure 2This is a flowchart illustrating an embodiment of a drug dispensing method based on traceability code verification provided by the present invention. Figure 3 This is a schematic diagram of one embodiment of a drug dispensing device provided by the present invention; Figure 4 This is a schematic diagram of a module of an embodiment of a control device in a drug dispensing device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0027] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0029] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0030] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0031] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0032] Example 1 See Figure 1 To address the problem of ensuring accurate dispensing while improving dispensing efficiency in existing drug dispensing technologies, an embodiment of the present invention provides a drug dispensing method based on traceability code verification, applicable to a drug dispensing system. The dispensing system includes a drug storage end, a dispensing end, and a transmission mechanism. The dispensing end includes a traceability code scanning module, a dispensing port, a dispensing cover, and a recycling area. The drug dispensing method includes: S1. Responding to the medication request corresponding to the prescription, the medication dispensing cover is locked, and the medication storage end releases each medication according to the prescription. Then, the transmission mechanism transmits each medication to the traceability code scanning module one by one. S2. The traceability code scanning module sequentially reads the traceability code data corresponding to each drug, and sequentially matches and verifies the traceability code data corresponding to each drug with the prescription requirements in the prescription to obtain the verification result corresponding to each drug. In some embodiments of this application, the step of sequentially reading the traceability code data corresponding to each of the medicines through the traceability code scanning module specifically includes: The traceability code scanning module sequentially scans each of the medicines to obtain the traceability code image corresponding to each medicine, and then decodes each traceability code image to obtain the traceability code data corresponding to each medicine.
[0033] In some embodiments of this application, the step of sequentially matching and verifying the traceability code data corresponding to each drug with the prescription requirements in the prescription to obtain the verification result corresponding to each drug is specifically as follows: Iterate through the traceability code data corresponding to each of the drugs, and output the verification result corresponding to each drug based on the traceability code data corresponding to each drug and the prescription requirements in the prescription. During each traversal, the quantity information and drug information corresponding to the currently traversed drug in the prescription requirements are obtained, and the traceability code data of the currently traversed drug are matched sequentially with the quantity information and drug information corresponding to the currently traversed drug to obtain the verification result corresponding to each drug.
[0034] In some embodiments of this application, the step of sequentially matching the currently traversed traceability code data with the quantity information and drug information corresponding to the currently traversed drug to obtain the verification result corresponding to each drug is specifically as follows: The traceability code data being iterated over is matched sequentially with the quantity information and drug information corresponding to the drug being iterated over. If both match successfully, the verification result corresponding to the drug being iterated over is output as passed; otherwise, the verification result corresponding to the drug being iterated over is output as failed.
[0035] S3. If the verification results for each of the aforementioned drugs are all verified, the dispensing cover is unlocked and a dispensing notification is sent to the user. In some embodiments of this application, after sending the medication pickup notification to the user, the method further includes: The traceability code data corresponding to each of the aforementioned drugs is bound to the prescription for dispensing the medication to obtain drug binding information, and the drug binding information is uploaded to the preset drug traceability management platform.
[0036] S4. If any of the verification results for each of the drugs fails the verification, then each drug will be sent to the recycling area and a drug dispensing failure notification will be sent to the user.
[0037] Specifically, such as Figure 2 As shown, to fully explain the above steps, the following scheme will be used as an example: ① When the prescription is scanned to pick up the medicine, the cover of the medicine dispensing slot is locked; ② The system analyzes the prescription information to determine the type and quantity of the medication and sends this information to the medication storage terminal for dispensing. After dispensing, the medication receiving and delivery mechanism sends each medication to the medication traceability code scanning module for scanning. The scanning module records the number of medication traceability codes and the traceability code information. ③ After all medications have been scanned, the quantity and traceability code information will be compared with the prescription medication information to verify their accuracy. If correct, the dispensing slot cover will automatically unlock, notifying the user to collect the medication. If the quantity or information is incorrect, the medication will be recycled, and the user will be notified of the incorrect dispensing and will need to scan the code again to collect the medication.
[0038] In summary, this embodiment responds to medication requests, controls the dispensing of medication according to the prescription, and utilizes a transmission mechanism to deliver each medication to the traceability code scanning module, eliminating the need for manual intervention. During the verification process, the system automatically reads the traceability code data of each medication box and matches it against the prescription requirements to ensure medication accuracy. If all medications pass verification, the dispensing cover is automatically unlocked and the user is notified to collect their medication; if any fail verification, the medication is automatically sent to the recycling area and the user is notified of the failure. This effectively prevents the risk of incorrect medications being taken by users and significantly shortens dispensing time, making it particularly suitable for high-traffic pharmacies or hospitals. Therefore, this application solves the problem in existing technologies where medication dispensing is difficult to improve efficiency while ensuring correct dispensing.
[0039] Example 2 See Figure 3 Based on the above method embodiments, corresponding physical device embodiments are provided; An embodiment of the present invention provides a drug dispensing device, comprising: a control device, a drug storage end, a drug dispensing end, and a transmission mechanism, wherein the drug dispensing end includes a traceability code scanning module, a dispensing port, a dispensing cover, and a recycling area; the control device includes a first control module 41, a second control module 42, a third control module 43, and a fourth control module 44; wherein, the schematic structure of the control device is shown below. Figure 4 As shown; The first control module 41 is used to respond to the medication request corresponding to the prescription, so as to lock the medication cover and release each medicine according to the prescription at the storage end, and then the transmission mechanism transmits each medicine to the traceability code scanning module one by one. The second control module 42 is used to sequentially read the traceability code data corresponding to each of the drugs through the traceability code scanning module, and sequentially match and verify the traceability code data corresponding to each of the drugs with the prescription requirements in the prescription to obtain the verification result corresponding to each of the drugs. The third control module 43 is used to unlock the medicine dispensing cover and send a medicine dispensing notification to the user if the verification results corresponding to each of the medicines are verified to be successful. The fourth control module 44 is used to send each of the drugs into the recycling area and send a drug dispensing failure notification to the user if any of the verification results corresponding to each drug fails the verification.
[0040] In some embodiments of this application, the second control module 42 includes a first control unit and a second control unit; The first control unit is used to traverse the traceability code data corresponding to each of the drugs, and output the verification result corresponding to each of the drugs according to the traceability code data corresponding to each drug and the prescription requirements in the prescription. The second control unit is used to obtain the quantity information and drug information corresponding to the drug currently being traversed in the prescription requirements during each traversal, and to match the traceability code data of the current traversal with the quantity information and drug information corresponding to the drug currently being traversed in sequence to obtain the verification result corresponding to each drug.
[0041] In some embodiments of this application, the second control unit includes a first control subunit; The first control subunit is used to match the traceability code data currently being traversed with the quantity information and drug information corresponding to the drug currently being traversed in sequence. If both match successfully, the verification result corresponding to the drug currently being traversed is output as passed; otherwise, the verification result corresponding to the drug currently being traversed is output as failed.
[0042] In some embodiments of this application, the second control module 42 further includes a third control unit; The third control unit is used to sequentially scan each of the medicines through the traceability code scanning module to obtain the traceability code image corresponding to each medicine, and to decode each traceability code image to obtain the traceability code data corresponding to each medicine.
[0043] In some embodiments of this application, the third control module 43 further includes a fourth control unit; The fourth control unit is used to bind the traceability code data corresponding to each drug with the prescription for dispensing the drug, obtain drug binding information, and upload the drug binding information to a preset drug traceability management platform.
[0044] For more detailed steps and working principles of this embodiment, please refer to the relevant description in Embodiment 1, but not limited to these descriptions.
[0045] In summary, this embodiment responds to medication requests, controls the dispensing of medication according to the prescription, and utilizes a transmission mechanism to deliver each medication to the traceability code scanning module, eliminating the need for manual intervention. During the verification process, the system automatically reads the traceability code data of each medication box and matches it against the prescription requirements to ensure medication accuracy. If all medications pass verification, the dispensing cover is automatically unlocked and the user is notified to collect their medication; if any fail verification, the medication is automatically sent to the recycling area and the user is notified of the failure. This effectively prevents the risk of incorrect medications being taken by users and significantly shortens dispensing time, making it particularly suitable for high-traffic pharmacies or hospitals. Therefore, this application solves the problem in existing technologies where medication dispensing is difficult to improve efficiency while ensuring correct dispensing.
[0046] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the drug dispensing method based on traceability code verification provided by any of the above-described method embodiments of the present invention.
[0047] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0048] Example 3 Based on the above embodiments of the drug dispensing method based on traceability code verification, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the drug dispensing method based on traceability code verification of any embodiment of the present invention.
[0049] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0050] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0051] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0052] Example 4 Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the drug dispensing method based on traceability code verification as described in any of the above-described method embodiments of the present invention.
[0053] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0054] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for dispensing medicines based on traceability code verification, characterized in that, This is applicable to a medication dispensing system, wherein the system includes a medication storage end, a medication dispensing end, and a transmission mechanism; the medication dispensing end includes a traceability code scanning module, a dispensing port, a dispensing cover, and a recycling area; and the medication dispensing method includes: In response to the medication request corresponding to the prescription, the medication dispensing cover is locked, and the medication storage end dispenses each medication according to the prescription. Then, the transmission mechanism transmits each medication to the traceability code scanning module one by one. The traceability code scanning module sequentially reads the traceability code data corresponding to each drug and sequentially matches and verifies the traceability code data corresponding to each drug with the prescription requirements in the prescription to obtain the verification result corresponding to each drug. If the verification results for each of the aforementioned drugs are all verified, the dispensing cover will be unlocked and a dispensing notification will be sent to the user. If any of the verification results for each of the aforementioned drugs fails verification, then each of the aforementioned drugs will be sent to the recycling area, and a drug dispensing failure notification will be sent to the user.
2. The drug dispensing method based on traceability code verification as described in claim 1, characterized in that, The step of sequentially matching and verifying the traceability code data corresponding to each of the aforementioned drugs with the prescription requirements in the dispensing prescription to obtain the verification result corresponding to each of the aforementioned drugs is as follows: Iterate through the traceability code data corresponding to each of the drugs, and output the verification result corresponding to each drug based on the traceability code data corresponding to each drug and the prescription requirements in the prescription. During each traversal, the quantity information and drug information corresponding to the currently traversed drug in the prescription requirements are obtained, and the traceability code data of the currently traversed drug are matched sequentially with the quantity information and drug information corresponding to the currently traversed drug to obtain the verification result corresponding to each drug.
3. The drug dispensing method based on traceability code verification as described in claim 2, characterized in that, The process of matching the currently traversed traceability code data with the quantity information and drug information corresponding to the currently traversed drug in sequence to obtain the verification result corresponding to each drug is as follows: The traceability code data being iterated over is matched sequentially with the quantity information and drug information corresponding to the drug being iterated over. If both match successfully, the verification result corresponding to the drug being iterated over is output as passed; otherwise, the verification result corresponding to the drug being iterated over is output as failed.
4. The drug dispensing method based on traceability code verification as described in claim 1, characterized in that, The step of sequentially reading the traceability code data corresponding to each drug through the traceability code scanning module is specifically as follows: The traceability code scanning module sequentially scans each of the medicines to obtain the traceability code image corresponding to each medicine, and then decodes each traceability code image to obtain the traceability code data corresponding to each medicine.
5. The drug dispensing method based on traceability code verification as described in claim 1, characterized in that, After sending the medication pickup notification to the user, the process also includes: The traceability code data corresponding to each of the aforementioned drugs is bound to the prescription for dispensing the medication to obtain drug binding information, and the drug binding information is uploaded to the preset drug traceability management platform.
6. A drug dispensing device, characterized in that, include: The device includes a control unit, a medicine storage end, a medicine dispensing end, and a transmission mechanism. The medicine dispensing end includes a traceability code scanning module, a medicine dispensing port, a medicine dispensing cover, and a recycling area. The control unit includes a first control module, a second control module, a third control module, and a fourth control module. The first control module is used to respond to the medication request corresponding to the prescription, so as to lock the medication cover and release each medicine according to the prescription at the storage end, and then the transmission mechanism transmits each medicine to the traceability code scanning module one by one. The second control module is used to sequentially read the traceability code data corresponding to each of the medicines through the traceability code scanning module, and sequentially match and verify the traceability code data corresponding to each of the medicines with the prescription requirements in the prescription to obtain the verification result corresponding to each of the medicines. The third control module is used to unlock the dispensing cover and send a dispensing notification to the user if the verification results for each of the drugs are verified to be successful. The fourth control module is used to send each drug into the recycling area and send a drug dispensing failure notification to the user if any of the verification results for each drug fails the verification.
7. A drug dispensing device as described in claim 6, characterized in that, The second control module includes a first control unit and a second control unit; The first control unit is used to traverse the traceability code data corresponding to each of the drugs, and output the verification result corresponding to each of the drugs according to the traceability code data corresponding to each drug and the prescription requirements in the prescription. The second control unit is used to obtain the quantity information and drug information corresponding to the drug currently being traversed in the prescription requirements during each traversal, and to match the traceability code data of the current traversal with the quantity information and drug information corresponding to the drug currently being traversed in sequence to obtain the verification result corresponding to each drug.
8. A drug dispensing device as described in claim 7, characterized in that, The second control unit includes a first control subunit; The first control subunit is used to match the traceability code data currently being traversed with the quantity information and drug information corresponding to the drug currently being traversed in sequence. If both match successfully, the verification result corresponding to the drug currently being traversed is output as passed; otherwise, the verification result corresponding to the drug currently being traversed is output as failed.
9. A drug dispensing device as described in claim 6, characterized in that, The second control module also includes a third control unit; The third control unit is used to sequentially scan each of the medicines through the traceability code scanning module to obtain the traceability code image corresponding to each medicine, and to decode each traceability code image to obtain the traceability code data corresponding to each medicine.
10. A drug dispensing device as described in claim 6, characterized in that, The third control module also includes a fourth control unit; The fourth control unit is used to bind the traceability code data corresponding to each drug with the prescription for dispensing the drug, obtain drug binding information, and upload the drug binding information to a preset drug traceability management platform.