Drug distribution management method and system, medium and terminal

By identifying and recording the traceability code of the drug during the drug distribution process, and using robotics and visual recognition cameras to synchronize the traceability code and prescription sheet in real time, the problem of low efficiency in drug distribution and distribution operations is solved, and the accuracy of drug distribution and traceability of the entire process is achieved.

CN119905195APending Publication Date: 2025-04-29SHENZHEN LACHESIS MOBILE MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411857251.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The efficiency of drug distribution and distribution operations is low, which is prone to irregular operations and errors in the distribution of drugs of type or quantity, affecting the safety and effectiveness of patients' medications.

Method used

By identifying and recording the traceability code of the drug, the entire process of the drug can be traced, and the traceability code and prescription sheet are synchronized in real time during the drug distribution process to ensure the accuracy of the drug distribution.

Benefits of technology

It improves the accuracy and efficiency of drug distribution management, can quickly locate the problems of abnormal drug distribution, and ensures the full process monitoring of drug circulation and use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119905195A_ABST
    Figure CN119905195A_ABST
Patent Text Reader

Abstract

The invention discloses a medicine dispensing management method and system, a medium and a terminal, and the method comprises the steps: obtaining a prescription when a prescription dispensing signal is received; traversing each drug type in the prescription, and selecting a to-be-identified drug corresponding to the currently traversed drug type from a drug library for one or more times; after each time of selection, the medicine is controlled to move through a mechanical arm, the traceability code on the surface of the medicine is recognized through a visual recognition camera in the moving process, then the prescription is filled with the traceability code, then the medicine is moved and placed in a medicine taking opening through the mechanical arm, and the distribution number of the type is increased by 1; and when the distribution number of the current traversal drug types is equal to the demand number of the drug types, stopping selecting the to-be-identified drugs corresponding to the current traversal drug types from the drug library, and uploading the current prescription to a background management system. According to the invention, the traceability code of the dispensed medicine is identified and recorded in the medicine dispensing process, so that the whole-process traceability of the medicine is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of drug management, and in particular to a drug distribution management method, system, medium and terminal. Background Art

[0002] With the gradual development of the pharmaceutical industry, the types of medicines are increasing, and it is inevitable that there are similarities in the appearance of various types of medicines. Therefore, when the tasks of drug distribution are numerous, the efficiency of drug preparation and distribution is low, and it is easy to produce errors such as non-standard operations and incorrect drug types or quantities during the operation, which in turn cause medical problems and even affect the safety and effectiveness of patients' medication.

[0003] At present, intelligent medicine dispensing machines are usually used to dispense medicines. The medicines to be dispensed are placed in a drawer or a basket, and a push device is used to push the drawer or basket containing the medicines to the medicine dispensing table. However, the above method only focuses on improving the speed of dispensing medicines, but does not take relevant measures to optimize the accuracy of medicine dispensing. In addition, when the type or quantity of medicines is dispensed incorrectly, it is impossible to quickly locate the cause of the problem. Summary of the invention

[0004] The embodiments of the present invention provide a drug dispensing management method, system, medium and terminal, which identify and record the traceability code of the dispensed drugs during the drug dispensing process, realize the full process traceability and circulation security of the drugs, and facilitate the rapid location of abnormal drug dispensing problems.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a drug dispensing management method, comprising:

[0006] When a prescription drug dispensing signal is received, obtaining a corresponding prescription sheet based on the prescription drug dispensing signal;

[0007] Traversing each drug category in the prescription, and selecting a drug to be identified corresponding to the currently traversed drug category from the drug library once or multiple times;

[0008] After each time the to-be-identified drug corresponding to the currently traversed drug category is selected, the robot arm controls the movement of the current to-be-identified drug, and during the movement, the visual recognition camera is used to identify the traceability code on the surface of the current to-be-identified drug, and then the traceability code is filled into the current prescription, and then the robot arm moves the current to-be-identified drug to the drug dispensing port, and the number of dispensed drugs of the currently traversed drug category is increased by 1;

[0009] When the dispensing number of the currently traversed drug type is equal to the preset value, stop selecting the to-be-identified drugs corresponding to the currently traversed drug type from the drug library, and upload the current prescription to the background management system to complete the drug dispensing management of the currently traversed drug type; wherein the preset value is equal to the required number corresponding to the currently traversed drug type in the prescription.

[0010] In the implementation of the embodiment of the present invention, when a prescription drug dispensing signal is received, a corresponding prescription is obtained in real time in response to and based on the prescription drug dispensing signal, and then each drug type in the prescription is traversed, and the to-be-identified drug corresponding to the currently traversed drug type is selected from the drug library once or multiple times, and after each selection of the to-be-identified drug corresponding to the currently traversed drug type, that is, after each selection of a to-be-identified drug corresponding to the currently traversed drug type, the robot controls the movement of the current to-be-identified drug, and during the movement, uses a visual recognition camera to identify the traceability code on the surface of the current to-be-identified drug, and then fills the traceability code on the surface of the current to-be-identified drug into the current prescription, so as to synchronize the association between the traceability code and the drug to the prescription in real time during the drug dispensing process, and ensure that each The dispensed drugs are precisely matched with the types and numbers required in the prescription, and then the current drug to be identified is moved to the medicine dispensing port by the robot, and the dispensed number of the currently traversed drug type is increased by 1, and when the dispensed number of the currently traversed drug type is equal to the required number corresponding to the currently traversed drug type in the prescription, stop selecting the drugs to be identified corresponding to the currently traversed drug type from the drug library, and upload the current prescription to the background management system to complete the drug dispensing management of the currently traversed drug type, that is, when the dispensing of each type of drug is completed, the prescription containing the traceability code corresponding to each drug one by one is synchronized to the background management system to realize the full process traceability of the drug, facilitate the full process monitoring of the circulation and use of drugs, thereby improving the overall drug dispensing management level. In addition, users can input new prescription dispensing signals at any time according to actual needs, so that hardware structures such as robots and visual recognition cameras can respond to user operations in real time. There is no need to wait for the last dispensing operation to be completed before executing the next dispensing instruction signal. Before placing the current medicine at the medicine dispensing port, it can also respond to the newly received prescription dispensing signal in real time, and promptly correct abnormal prescription dispensing signals or medicine dispensing operations, thereby greatly improving the efficiency of medicine dispensing.

[0011] As a preferred solution, each time after selecting the drug to be identified corresponding to the currently traversed drug category, the robot is used to control the movement of the current drug to be identified, and during the movement, the visual recognition camera is used to identify the traceability code on the surface of the current drug to be identified, specifically:

[0012] After each time a drug to be identified corresponding to the currently traversed drug category is selected, the current drug to be identified is adsorbed by the suction cup on the manipulator, and the manipulator controls the movement of the current drug to be identified and stops it at a target stop position; wherein the target stop position is the position directly in front of the visual recognition camera;

[0013] The robot arm is used to control the rotation of the current drug to be identified, and during the rotation of the current drug to be identified, the visual recognition camera is used to take multiple photos of the current drug to be identified to obtain multiple corresponding drug images, and then the traceability code on the surface of the current drug to be identified is identified based on all the drug images.

[0014] In the preferred solution of the embodiment of the present invention, since the current drugs to be identified may have different shapes and sizes, or the drug packaging may have problems such as reflection or irregular surface, by rotating the current drugs to be identified and taking multiple photos, it can better adapt to drugs of various shapes. Multi-angle images provide more contextual information, reduce the errors that may be caused by single-angle images, and reduce the impact of factors such as the appearance of the drug or the environment in which the drug is located on the recognition accuracy, thereby improving the versatility of the recognition system. In addition, multi-angle images can provide more evidence when disputes arise, which helps to resolve possible disputes.

[0015] As a preferred solution, each time after selecting the to-be-identified drug corresponding to the currently traversed drug category, the suction cup on the manipulator adsorbs the current to-be-identified drug, and the manipulator controls the movement of the current to-be-identified drug and stops it at the target stop position, specifically:

[0016] After each time a drug to be identified corresponding to the currently traversed drug type is selected, the positioning information of the current drug to be identified and the position information corresponding to the target stop position are obtained in real time, and the first motion path and the second motion path of the manipulator are analyzed based on the positioning information of the current drug to be identified and the position information corresponding to the target stop position;

[0017] Controlling the manipulator to move to the top of the current drug to be identified according to the first motion path, and then activating the suction cup of the manipulator to absorb the current drug to be identified;

[0018] The manipulator is controlled to move according to the second motion path so that the manipulator drives the current drug to be identified and stays at the target stop position.

[0019] According to the preferred solution of the embodiment of the present invention, after selecting the drug to be identified corresponding to the currently traversed drug type each time, the positioning information of the current drug to be identified and the position information corresponding to the target stop position are obtained in real time, and the movement path of the manipulator is optimized by analyzing the positioning information of the current drug to be identified and the position information corresponding to the target stop position, thereby reducing the ineffective movement of the manipulator and reducing the risk of collision between the manipulator and other objects or equipment during movement, ensuring the continuity and smoothness of the operation, and improving the operation accuracy and efficiency of the drug dispensing process. In addition, a negative pressure environment is formed by using a suction cup to generate sufficient suction force, so that the current drug to be identified can be firmly adsorbed to avoid accidental slipping of the drug during movement and causing damage, and the suction cup adsorption is activated only after the manipulator moves above the drug, ensuring the accuracy and stability of adsorption.

[0020] As a preferred solution, traversing each drug type in the prescription list and selecting a drug to be identified corresponding to the currently traversed drug type from the drug library once or multiple times is specifically as follows:

[0021] Traversing each drug type in the prescription, and based on the relevant information of the currently traversed drug type, screening one or more medicine boxes to be dispensed associated with the currently traversed drug type; wherein one or more drugs to be checked are placed in the medicine boxes to be dispensed;

[0022] When the number of medicine boxes to be dispensed associated with the currently traversed drug is equal to 1, control the fork to fork the medicine box to be dispensed from the drug library, and move the medicine box to be dispensed to the drug identification area, then screen out the drug template corresponding to the currently traversed drug type, and check any one of the to-be-checked drugs in the medicine box to be dispensed in the drug identification area with the drug template corresponding to the currently traversed drug type;

[0023] If the verification is successful, when the total number of drugs to be verified in the medicine box to be dispensed is greater than or equal to the preset value, one drug to be verified is selected from the medicine box to be dispensed once or multiple times as the drug to be identified corresponding to the currently traversed drug type;

[0024] If the verification is successful, when the total number of the to-be-verified drugs in the to-be-dispensed medicine box is less than the preset value, each of the to-be-verified drugs in the to-be-dispensed medicine box is selected as the to-be-identified drug corresponding to the currently traversed drug type, and an alarm signal is issued to warn that the current inventory is insufficient;

[0025] If the verification fails, it is determined that the current prescription has failed to dispense the medicine.

[0026] A preferred scheme for implementing the embodiment of the present invention is to traverse each drug type in the prescription, and based on the relevant information of the currently traversed drug type, screen one or more to-be-dispensed medicine boxes associated with the currently traversed drug type to preliminarily ensure that the dispensed drugs are consistent with the prescription requirements. When the number of to-be-dispensed medicine boxes associated with the currently traversed drug is equal to 1, control the fork to fork the to-be-dispensed medicine box from the drug library, and move the to-be-dispensed medicine box to the drug identification area, and then screen out the drug template corresponding to the currently traversed drug type, and check any to-be-checked drug in the to-be-dispensed medicine box in the drug identification area with the drug template corresponding to the currently traversed drug type, so as to further verify the consistency of the drug with the prescription requirements and reduce the risk of dispensing errors. In addition, when any drug to be checked in the medicine box to be dispensed in the medicine identification area is successfully checked and the total number of drugs to be checked in the medicine box to be dispensed is less than a preset value, each drug to be checked in the medicine box to be dispensed is selected as the drug to be identified corresponding to the currently traversed drug type, and an alarm signal is issued to warn of the current insufficient inventory and promptly remind the administrator of unsuccessful inventory to avoid dispensing failures due to insufficient inventory.

[0027] As a preferred solution, the step of checking any drug to be checked in the medicine box to be dispensed in the medicine identification area with the drug template corresponding to the currently traversed drug type is as follows:

[0028] Collecting multiple feature points of any drug to be checked in the drug box to be dispensed in the drug identification area;

[0029] All the feature points of any drug to be checked in the medicine box to be dispensed are compared with the drug template corresponding to the currently traversed drug type, so as to realize the verification between any drug to be checked in the medicine box to be dispensed in the drug identification area and the drug template corresponding to the currently traversed drug type.

[0030] A preferred scheme for implementing the embodiments of the present invention collects multiple feature points of any drug to be checked in the medicine box to be dispensed in the medicine identification area, such as detailed information such as label, color, shape and other visual feature information, and performs a multi-feature point comparison between all the collected feature points of any drug to be checked in the medicine box to be dispensed and the drug template corresponding to the currently traversed drug type, which can better resist the influence of external interference and changes in drug packaging and ensure the accuracy of the verification.

[0031] As a preferred solution, traversing each drug type in the prescription list and selecting a drug to be identified corresponding to the currently traversed drug type from the drug library once or multiple times is specifically as follows:

[0032] Traversing each drug type in the prescription, and based on the relevant information of the currently traversed drug type, screening one or more medicine boxes to be dispensed associated with the currently traversed drug type; wherein one or more drugs to be checked are placed in the medicine boxes to be dispensed;

[0033] When the number of medicine boxes to be dispensed associated with the currently traversed medicine is greater than 1, all the medicine boxes to be dispensed are arranged in ascending order according to the time interval between the validity period of the medicine in each of the medicine boxes to be dispensed and the current date, and then each of the medicine boxes to be dispensed in the arrangement result is traversed in turn, the fork is controlled to fork the currently traversed medicine box to be dispensed from the medicine library, and the currently traversed medicine box to be dispensed is moved to the medicine identification area;

[0034] Filter out the drug template corresponding to the currently traversed drug type, and check any drug to be checked in the currently traversed medicine box to be dispensed with the drug template corresponding to the currently traversed drug type;

[0035] If the verification is successful, when the total number of drugs to be verified in the currently traversed medicine box to be dispensed is greater than or equal to the preset value, one drug to be verified is selected from the medicine box to be dispensed once or multiple times as the drug to be identified corresponding to the currently traversed drug type, and the traversal of each medicine box to be dispensed in the arrangement result is terminated;

[0036] If the verification is successful, when the total number of drugs to be verified in the currently traversed medicine box to be dispensed is less than the preset value, each of the drugs to be verified in the medicine box to be dispensed is selected as the drug to be identified corresponding to the currently traversed drug type, and continue to traverse the next medicine box to be dispensed in the arrangement result;

[0037] If the verification fails, it is determined that the current prescription has failed to dispense the medicine.

[0038] A preferred scheme for implementing an embodiment of the present invention is to traverse each drug type in the prescription, and based on the relevant information of the currently traversed drug type, screen one or more medicine boxes to be dispensed associated with the currently traversed drug type to preliminarily ensure that the dispensed drugs are consistent with the prescription requirements. When the number of medicine boxes to be dispensed associated with the currently traversed drug is greater than 1, all medicine boxes to be dispensed are arranged in ascending order according to the time interval between the expiration date of the drugs in each medicine box to be dispensed and the current date, and then traverse each medicine box to be dispensed in the arrangement result in turn, control the fork to fork the currently traversed medicine box to be dispensed from the drug library, and move the currently traversed medicine box to be dispensed to the drug identification area for subsequent verification and dispensing operations, thereby ensuring the use of drugs with a relatively recent expiration date and reducing the waste and potential risks of expired drugs. Then, the drug template corresponding to the currently traversed drug type is screened out, and any to-be-checked drug in the currently traversed medicine box to be dispensed is checked with the drug template corresponding to the currently traversed drug type to further verify the consistency of the drug with the prescription requirements. In addition, when drug verification fails, it can immediately determine that the dispensing has failed and stop the dispensing process, preventing incorrect drugs from entering the dispensing process and improving the safety of drug dispensing.

[0039] As a preferred solution, the robot moves the current drug to be identified to the drug dispensing port, specifically:

[0040] Controlling the manipulator to move along a third motion path so that the manipulator drives the current drug to be identified and stays above the drug dispensing port;

[0041] The breaking valve on the manipulator is opened to allow the current medicine to be identified to be separated from the suction cup on the manipulator and placed in the medicine taking port.

[0042] The preferred solution of the embodiment of the present invention is implemented to control the manipulator to move according to the preset third motion path, ensuring that the medicine is accurately moved above the medicine taking port to reduce the position error and thus improve the accuracy of the operation.

[0043] In order to solve the same technical problem, an embodiment of the present invention further provides a drug dispensing management system, comprising:

[0044] A data acquisition module, configured to acquire a corresponding prescription based on the prescription dispensing signal when receiving the prescription dispensing signal;

[0045] A drug selection module, used to traverse each drug category in the prescription, and select a drug to be identified corresponding to the currently traversed drug category from the drug library once or multiple times;

[0046] The drug dispensing management module is used to control the movement of the current drug to be identified through a manipulator after each selection of the drug to be identified corresponding to the currently traversed drug category, and during the movement, use a visual recognition camera to identify the traceability code on the surface of the current drug to be identified, and then fill the traceability code into the current prescription, and then use the manipulator to move the current drug to be identified to the drug dispensing port, and increase the dispensing number of the currently traversed drug category by 1; when the dispensing number of the currently traversed drug category is equal to a preset value, stop selecting the drug to be identified corresponding to the currently traversed drug category from the drug library, and upload the current prescription to the background management system to complete the drug dispensing management of the currently traversed drug category; wherein, the preset value is equal to the required number corresponding to the currently traversed drug category in the prescription.

[0047] In order to solve the same technical problem, the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the drug dispensing management method.

[0048] In order to solve the same technical problem, the present invention also provides a terminal, including a processor, a memory and a computer program stored in the memory; wherein the computer program can be executed by the processor to implement the drug dispensing management method. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 : A flowchart of a drug dispensing management method provided in Example 1 of the present invention;

[0050] Figure 2 : A structural diagram of a drug dispensing management system provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Embodiment one:

[0053] Please refer to Figure 1 , is a drug dispensing management method provided by an embodiment of the present invention, the method includes steps S1 to S4, each step is specifically as follows:

[0054] Step S1, when a prescription drug dispensing signal is received, a corresponding prescription sheet is obtained based on the prescription drug dispensing signal.

[0055] In this embodiment, the prescription includes but is not limited to the types of medicines to be dispensed, the required quantity of each medicine type, and patient-related information. Based on the prescription, the dispensing order can be determined, and each medicine type in the prescription is traversed in turn according to the dispensing order.

[0056] Step S2, traverse each drug type in the prescription, and select the drug to be identified corresponding to the currently traversed drug type from the drug library once or multiple times.

[0057] As a preferred solution, step S2 may include steps S201 to S205, each of which is specifically as follows:

[0058] Step S201, traverse each drug type in the prescription, and based on the relevant information of the currently traversed drug type, screen one or more to-be-dispensed medicine boxes associated with the currently traversed drug type.

[0059] Among them, one or more medicines to be checked are placed in the medicine box to be distributed.

[0060] Step S202, when the number of medicine boxes to be dispensed associated with the currently traversed drug is equal to 1, control the fork to fork the medicine box to be dispensed from the drug library, and move the medicine box to be dispensed to the drug identification area, and then filter out the drug template corresponding to the currently traversed drug type, and check any to-be-checked drug in the medicine box to be dispensed in the drug identification area with the drug template corresponding to the currently traversed drug type.

[0061] In this embodiment, the medicine template is a pre-recorded template of the front and back sides of the medicine, so that it can be automatically identified when the medicine box arrives at the identification area.

[0062] As a preferred solution, step S202 includes step S2021 to step S2023, and each step is specifically as follows:

[0063] Step S2021, when the number of medicine boxes to be dispensed associated with the currently traversed drug is equal to 1, control the fork to fork the medicine box to be dispensed from the drug library, and move the medicine box to be dispensed to the drug identification area, and then filter out the drug template corresponding to the currently traversed drug type.

[0064] In this embodiment, the specific process of the fork movement is as follows: the motor drives the gear rack to transmit the gear rack, and the gear rack is used to control the fork to pick up and place the medicine box. Among them, one or more positioning pins / positioning slots are set on the pallet on the fork to fix the medicine box to avoid the position of the medicine box being offset during the movement of the fork, and the limit sensor can be set in the middle, left or right according to actual needs, and the limit sensor is used to set the telescopic limit position of the fork. In addition, a presence sensor such as a photoelectric sensor can be set to send a light signal to detect whether a medicine box is already on the fork.

[0065] Step S2022, collecting multiple feature points of any drug to be checked in the medicine box to be dispensed in the drug identification area.

[0066] Step S2023, compare all feature points of any drug to be checked in the medicine box to be dispensed with the drug template corresponding to the currently traversed drug type, so as to realize the verification between any drug to be checked in the medicine box to be dispensed in the drug identification area and the drug template corresponding to the currently traversed drug type.

[0067] Step S203, if the verification is successful, then when the total number of drugs to be verified in the medicine box to be dispensed is greater than or equal to a preset value, one drug to be verified is selected from the medicine box to be dispensed once or multiple times as the drug to be identified corresponding to the currently traversed drug type.

[0068] It should be noted that if the total number of drugs to be checked in the medicine box to be dispensed is greater than or equal to the preset value, it means that the medicine inventory in the medicine box to be dispensed is sufficient. Therefore, one or more drugs to be checked are selected directly from the medicine box to be dispensed to meet the prescription requirements.

[0069] Step S204, if the verification is successful, then when the total number of drugs to be verified in the medicine box to be distributed is less than the preset value, each drug to be verified in the medicine box to be distributed is selected as the drug to be identified corresponding to the currently traversed drug type, and an alarm signal is issued to warn of the current insufficient inventory.

[0070] It should be noted that if the total number of unchecked medicines in the medicine box to be dispensed is less than the preset value, it means that the medicine inventory in the medicine box to be dispensed is insufficient. However, since there is only one medicine box to be dispensed associated with the currently traversed medicine, while each unchecked medicine in the medicine box to be dispensed is selected as the unidentified medicine corresponding to the currently traversed drug type, an alarm signal is issued to remind the management personnel to replenish the inventory in time, and also to remind patients or their families who are in urgent need of medicine to go to the manual window to get the medicine.

[0071] Step S205: If the verification fails, it is determined that the current prescription has failed to dispense the medicine, and the current medicine to be verified is put back into its corresponding medicine box to be dispensed.

[0072] As a preferred solution, step S2 may further include step S206 to step S211, each step being specifically as follows:

[0073] Step S206, traverse each drug type in the prescription, and based on the relevant information of the currently traversed drug type, screen one or more to-be-dispensed medicine boxes associated with the currently traversed drug type.

[0074] Among them, one or more medicines to be checked are placed in the medicine box to be distributed.

[0075] Step S207, when the number of medicine boxes to be dispensed associated with the currently traversed medicine is greater than 1, all medicine boxes to be dispensed are arranged in ascending order according to the time interval between the expiration date of the medicine in each medicine box to be dispensed and the current date, and then each medicine box to be dispensed in the arrangement result is traversed in turn, the fork is controlled to fork the currently traversed medicine box to be dispensed from the medicine library, and the currently traversed medicine box to be dispensed is moved to the medicine identification area.

[0076] Step S208, filter out the drug template corresponding to the currently traversed drug type, and check any drug to be checked in the currently traversed medicine box to be dispensed with the drug template corresponding to the currently traversed drug type.

[0077] Step S209, if the verification is successful, then when the total number of drugs to be verified in the currently traversed medicine box to be dispensed is greater than or equal to the preset value, one drug to be verified is selected from the medicine box to be dispensed once or multiple times as the drug to be identified corresponding to the currently traversed drug type, and the traversal of each medicine box to be dispensed in the arrangement result is ended.

[0078] As an example, the number of drug A requirements in the prescription is 3, and the number of medicine boxes to be dispensed associated with drug A is 4. All medicine boxes to be dispensed are arranged in order from small to large according to the time interval between the expiration date of the drugs in each medicine box to be dispensed and the current date. The resulting arrangement is medicine box A, medicine box B, medicine box C and medicine box D, and medicine box A contains 2 drugs A, medicine box B contains 2 drugs A, medicine box C contains 1 drug A, and medicine box D contains 3 drugs A. In this regard, it is preferred to select 2 drugs A from medicine box A in sequence, then put medicine box A back to the original storage position, then fork medicine box B, and then select 1 drug A from medicine box B to meet the demand for drug A in the prescription.

[0079] In this embodiment, when it is necessary to select another medicine box to dispense medicine, if there are multiple medicine boxes to be selected at the same time, and the most recent expiration dates of the medicines in each medicine box are the same, the medicine box with the lowest medicine content will be used as the next fork object.

[0080] Step S210, if the verification is successful, then when the total number of drugs to be verified in the currently traversed medicine box to be dispensed is less than the preset value, each drug to be verified in the medicine box to be dispensed is selected as the drug to be identified corresponding to the currently traversed drug type, and continue to traverse the next medicine box to be dispensed in the arrangement result.

[0081] Step S211: If the verification fails, it is determined that the current prescription fails to dispense the medicine.

[0082] Step S3, after each time the drug to be identified corresponding to the currently traversed drug type is selected, the robot arm is used to control the movement of the current drug to be identified, and during the movement, the visual recognition camera is used to identify the traceability code on the surface of the current drug to be identified, and then the traceability code is filled into the current prescription to update the prescription, and then the robot arm is used to move the current drug to be identified and place it at the medicine dispensing port, and the number of drugs dispensed for the currently traversed drug type is increased by 1.

[0083] It should be noted that in addition to the traceability code, the surface of the drug will also have a drug product code that will be captured by the camera. At this time, the traceability code can only be screened and the product code can be filtered out by the algorithm. And the screened traceability code will be recorded and reported to the upper-level software. After receiving the traceability code information of the drug, the upper-level software will bind it to the drug collection record this time, so that one traceability code is recorded for each box of medicine. After a medication accident occurs, medical staff can trace the information of the drug from raw materials, production, warehousing, distribution, logistics, sales and other links through the traceability code in the drug collection record. This means that once there is a problem with the drug, the source of the problem can be quickly located, and the problematic drugs can be recalled in time to ensure the safety of patients' medication.

[0084] As a preferred solution, step S3 includes step S301 to step S302, and each step is specifically as follows:

[0085] Step S301, after each selection of the to-be-identified drug corresponding to the currently traversed drug category, the suction cup on the manipulator adsorbs the current to-be-identified drug, and the manipulator controls the movement of the current to-be-identified drug and keeps it at the target stop position.

[0086] Among them, the target stop position is the position directly in front of the visual recognition camera.

[0087] In this embodiment, the suction cup structure includes a manipulator, a vacuum suction cup on the manipulator, and a rotating mechanism. The manipulator is used to move according to a preset program and path; the vacuum suction cup is used to extract the gas on one side connected to the suction cup through a vacuum pump to form a negative pressure environment inside the suction cup, and a pressure difference is formed between the suction cup and the medicine to achieve the adsorption of the medicine, and by opening the destruction valve (also called the vent valve), the negative pressure environment is quickly destroyed to make the medicine detach from the suction cup; the rotating mechanism is used to drive the manipulator (including the vacuum suction cup and the medicine adsorbed by the suction cup) to rotate; wherein the rotating mechanism can be a rotating shaft driven by a motor or a similar mechanical structure.

[0088] As a preferred solution, step S31 includes step S311 to step S313, and each step is specifically as follows:

[0089] Step S311, after each time a drug to be identified corresponding to the currently traversed drug type is selected, the positioning information of the current drug to be identified and the position information corresponding to the target stop position are obtained in real time, and based on the positioning information of the current drug to be identified and the position information corresponding to the target stop position, the first motion path and the second motion path of the manipulator are analyzed and obtained.

[0090] Step S312, controlling the robot to move to the top of the current drug to be identified according to the first motion path, and then activating the suction cup of the robot to absorb the current drug to be identified.

[0091] Step S313, controlling the manipulator to move according to the second motion path, so that the manipulator drives the current drug to be identified and stays at the target stop position.

[0092] During the movement of the manipulator, if the drug needs to be rotated, the rotating mechanism is started to rotate the manipulator. The rotation angle and speed of the rotating mechanism can be calculated according to the characteristics of the drug and the dispensing requirements.

[0093] In step S302, the current drug to be identified is controlled to rotate by a manipulator, and during the rotation of the current drug to be identified, the visual recognition camera is used to take multiple photos of the current drug to be identified to obtain multiple corresponding drug images, and then the traceability code on the surface of the current drug to be identified is identified based on all drug images.

[0094] Step S303, fill in the traceability code into the current prescription.

[0095] Step S304: Move the current drug to be identified to the drug dispensing port through the robot arm, and increase the dispensing number of the currently traversed drug type by 1.

[0096] As a preferred solution, step S304 includes step S3041 to step S3043, and each step is specifically as follows:

[0097] Step S3041, controlling the manipulator to move according to the third motion path, so that the manipulator drives the current drug to be identified and stays above the drug dispensing port.

[0098] Step S3042, open the breaking valve on the robot to make the current drug to be identified separate from the suction cup on the robot and placed in the drug removal port.

[0099] Step S3043, increase the dispensing quantity of the currently traversed drug type by 1.

[0100] Step S4, when the number of drugs currently traversed is equal to the preset value, stop selecting the drugs to be identified corresponding to the currently traversed drug type from the drug library, and upload the current prescription to the background management system to complete the drug dispensing management of the currently traversed drug type.

[0101] Among them, the preset value is equal to the number of requirements corresponding to the type of medicine currently traversed in the prescription.

[0102] In this embodiment, when the backend management system receives the updated prescription, it generates a medication collection record in real time based on the prescription containing the traceability code.

[0103] Please refer to Figure 2 , is a schematic diagram of the structure of a drug dispensing management system provided by an embodiment of the present invention, the system includes a data acquisition module M1, a drug selection module M2 and a drug dispensing management module M3, and the specific details of each module are as follows:

[0104] The data acquisition module M1 is used to acquire the corresponding prescription sheet based on the prescription dispensing signal when receiving the prescription dispensing signal;

[0105] The drug selection module M2 is used to traverse each drug type in the prescription list and select the drug to be identified corresponding to the currently traversed drug type from the drug library once or multiple times;

[0106] The drug dispensing management module M3 is used to control the movement of the current drug to be identified through a manipulator after each selection of the drug to be identified corresponding to the currently traversed drug category, and during the movement, use the visual recognition camera to identify the traceability code on the surface of the current drug to be identified, and then fill the traceability code into the current prescription, and then use the manipulator to move the current drug to be identified and place it at the drug dispensing port, and increase the dispensing number of the currently traversed drug category by 1; when the dispensing number of the currently traversed drug category is equal to the preset value, stop selecting the drug to be identified corresponding to the currently traversed drug category from the drug library, and upload the current prescription to the background management system to complete the drug dispensing management of the currently traversed drug category; wherein the preset value is equal to the required number corresponding to the currently traversed drug category in the prescription.

[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0108] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a drug dispensing management method described in embodiment 1.

[0109] An embodiment of the present invention further provides a terminal, comprising a processor, a memory, and a computer program stored in the memory; wherein the computer program can be executed by the processor to implement a drug dispensing management method described in the first embodiment.

[0110] Preferably, the computer program can be divided into one or more modules / units (such as computer program, computer program), one or more modules / units are stored in the memory and executed by the processor to complete the present invention. One or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal.

[0111] The processor can be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor. The processor is the control center of the terminal, and various parts of the terminal are connected using various interfaces and lines.

[0112] The memory mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (Smart Med iaCard, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory can also be other volatile solid-state storage devices.

[0113] It should be noted that the above-mentioned terminal may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that the above-mentioned terminal is merely an example and does not constitute a limitation on the terminal. It may include more or fewer components, or a combination of certain components, or different components.

[0114] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0115] The present invention provides a drug dispensing management method, system, medium and terminal. When a prescription drug dispensing signal is received, the method responds in real time and obtains a corresponding prescription based on the prescription drug dispensing signal, then traverses each drug type in the prescription, selects a to-be-identified drug corresponding to the currently traversed drug type from the drug library once or multiple times, and after each selection of the to-be-identified drug corresponding to the currently traversed drug type, that is, after each selection of a to-be-identified drug corresponding to the currently traversed drug type, the robot controls the movement of the current to-be-identified drug, and during the movement, uses a visual recognition camera to identify the traceability code on the surface of the current to-be-identified drug, and then fills the traceability code on the surface of the current to-be-identified drug into the current prescription, so as to realize the relationship between the traceability code and the drug during the drug dispensing process. The association relationship is synchronized to the prescription in real time to ensure that each dispensed drug accurately matches the type and number required in the prescription. Then, the current drug to be identified is moved to the drug dispensing port through a robotic arm, and the dispensing number of the currently traversed drug type is increased by 1. When the dispensing number of the currently traversed drug type is equal to the required number corresponding to the currently traversed drug type in the prescription, stop selecting the drug to be identified corresponding to the currently traversed drug type from the drug library, and upload the current prescription to the background management system to complete the drug dispensing management of the currently traversed drug type, that is, when the dispensing of each type of drug is completed, the prescription containing the traceability code corresponding to each drug one by one is synchronized to the background management system to achieve full-process traceability of the drug and facilitate full-process monitoring of drug circulation and use. In addition, users can input new prescription dispensing signals at any time according to actual needs, so that hardware structures such as robots and visual recognition cameras can respond to user operations in real time. There is no need to wait for the last dispensing operation to be completed before executing the next dispensing instruction signal. Before placing the current medicine at the medicine dispensing port, it can also respond to the newly received prescription dispensing signal in real time, and promptly correct abnormal prescription dispensing signals or medicine dispensing operations, thereby greatly improving the efficiency of medicine dispensing.

[0116] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A drug dispensing management method, characterized in that: include: When a prescription drug dispensing signal is received, obtaining a corresponding prescription sheet based on the prescription drug dispensing signal; Traversing each drug category in the prescription, and selecting a drug to be identified corresponding to the currently traversed drug category from the drug library once or multiple times; After each time the to-be-identified drug corresponding to the currently traversed drug category is selected, the robot arm controls the movement of the current to-be-identified drug, and during the movement, the visual recognition camera is used to identify the traceability code on the surface of the current to-be-identified drug, and then the traceability code is filled into the current prescription, and then the robot arm moves the current to-be-identified drug to the drug dispensing port, and the number of dispensed drugs of the currently traversed drug category is increased by 1; When the dispensing number of the currently traversed drug type is equal to the preset value, stop selecting the to-be-identified drugs corresponding to the currently traversed drug type from the drug library, and upload the current prescription to the background management system to complete the drug dispensing management of the currently traversed drug type; wherein the preset value is equal to the required number corresponding to the currently traversed drug type in the prescription.

2. A drug dispensing management method as claimed in claim 1, characterized in that: After each time the drug to be identified corresponding to the currently traversed drug type is selected, the robot is used to control the movement of the current drug to be identified, and during the movement, the visual recognition camera is used to identify the traceability code on the surface of the current drug to be identified, specifically: After each time a drug to be identified corresponding to the currently traversed drug category is selected, the current drug to be identified is adsorbed by the suction cup on the manipulator, and the manipulator controls the movement of the current drug to be identified and stops it at a target stop position; wherein the target stop position is the position directly in front of the visual recognition camera; The robot arm is used to control the rotation of the current drug to be identified, and during the rotation of the current drug to be identified, the visual recognition camera is used to take multiple photos of the current drug to be identified to obtain multiple corresponding drug images, and then the traceability code on the surface of the current drug to be identified is identified based on all the drug images.

3. A drug dispensing management method as claimed in claim 2, characterized in that: After each time a drug to be identified corresponding to the currently traversed drug type is selected, the current drug to be identified is adsorbed by the suction cup on the manipulator, and the manipulator controls the movement of the current drug to be identified and stops at the target stop position, specifically: After each time a drug to be identified corresponding to the currently traversed drug type is selected, the positioning information of the current drug to be identified and the position information corresponding to the target stop position are obtained in real time, and the first motion path and the second motion path of the manipulator are analyzed based on the positioning information of the current drug to be identified and the position information corresponding to the target stop position; Controlling the manipulator to move to the top of the current drug to be identified according to the first motion path, and then activating the suction cup of the manipulator to absorb the current drug to be identified; The manipulator is controlled to move according to the second motion path so that the manipulator drives the current drug to be identified and stays at the target stop position.

4. A drug dispensing management method as claimed in claim 1, characterized in that: The step of traversing each drug type in the prescription list and selecting a drug to be identified corresponding to the currently traversed drug type from the drug library once or multiple times is as follows: Traversing each drug type in the prescription, and based on the relevant information of the currently traversed drug type, screening one or more medicine boxes to be dispensed associated with the currently traversed drug type; wherein one or more drugs to be checked are placed in the medicine boxes to be dispensed; When the number of medicine boxes to be dispensed associated with the currently traversed drug is equal to 1, control the fork to fork the medicine box to be dispensed from the drug library, and move the medicine box to be dispensed to the drug identification area, then screen out the drug template corresponding to the currently traversed drug type, and check any one of the to-be-checked drugs in the medicine box to be dispensed in the drug identification area with the drug template corresponding to the currently traversed drug type; If the verification is successful, when the total number of drugs to be verified in the medicine box to be dispensed is greater than or equal to the preset value, one drug to be verified is selected from the medicine box to be dispensed once or multiple times as the drug to be identified corresponding to the currently traversed drug type; If the verification is successful, when the total number of the to-be-verified drugs in the to-be-dispensed medicine box is less than the preset value, each of the to-be-verified drugs in the to-be-dispensed medicine box is selected as the to-be-identified drug corresponding to the currently traversed drug type, and an alarm signal is issued to warn that the current inventory is insufficient; If the verification fails, it is determined that the current prescription has failed to dispense the medicine.

5. A drug dispensing management method as claimed in claim 4, characterized in that: The step of checking any drug to be checked in the drug box to be dispensed in the drug identification area with the drug template corresponding to the currently traversed drug type is specifically as follows: Collecting multiple feature points of any drug to be checked in the drug box to be dispensed in the drug identification area; All the feature points of any drug to be checked in the medicine box to be dispensed are compared with the drug template corresponding to the currently traversed drug type, so as to realize the verification between any drug to be checked in the medicine box to be dispensed in the drug identification area and the drug template corresponding to the currently traversed drug type.

6. A drug dispensing management method as claimed in claim 1, characterized in that: The step of traversing each drug type in the prescription list and selecting a drug to be identified corresponding to the currently traversed drug type from the drug library once or multiple times is as follows: Traversing each drug type in the prescription, and based on the relevant information of the currently traversed drug type, screening one or more medicine boxes to be dispensed associated with the currently traversed drug type; wherein one or more drugs to be checked are placed in the medicine boxes to be dispensed; When the number of medicine boxes to be dispensed associated with the currently traversed medicine is greater than 1, all the medicine boxes to be dispensed are arranged in ascending order according to the time interval between the validity period of the medicine in each of the medicine boxes to be dispensed and the current date, and then each of the medicine boxes to be dispensed in the arrangement result is traversed in turn, the fork is controlled to fork the currently traversed medicine box to be dispensed from the medicine library, and the currently traversed medicine box to be dispensed is moved to the medicine identification area; Filter out the drug template corresponding to the currently traversed drug type, and check any drug to be checked in the currently traversed medicine box to be dispensed with the drug template corresponding to the currently traversed drug type; If the verification is successful, when the total number of drugs to be verified in the currently traversed medicine box to be dispensed is greater than or equal to the preset value, one drug to be verified is selected from the medicine box to be dispensed once or multiple times as the drug to be identified corresponding to the currently traversed drug type, and the traversal of each medicine box to be dispensed in the arrangement result is terminated; If the verification is successful, when the total number of drugs to be verified in the currently traversed medicine box to be dispensed is less than the preset value, each of the drugs to be verified in the medicine box to be dispensed is selected as the drug to be identified corresponding to the currently traversed drug type, and continue to traverse the next medicine box to be dispensed in the arrangement result; If the verification fails, it is determined that the current prescription has failed to dispense the medicine.

7. A drug dispensing management method as claimed in claim 1, characterized in that: The robot moves the current drug to be identified to the drug dispensing port, specifically: Controlling the manipulator to move along a third motion path so that the manipulator drives the current drug to be identified and stays above the drug dispensing port; The breaking valve on the manipulator is opened to allow the current medicine to be identified to be separated from the suction cup on the manipulator and placed in the medicine taking port.

8. A drug distribution management system, characterized in that: include: A data acquisition module, configured to acquire a corresponding prescription based on the prescription dispensing signal when receiving the prescription dispensing signal; A drug selection module, used to traverse each drug category in the prescription, and select a drug to be identified corresponding to the currently traversed drug category from the drug library once or multiple times; The drug dispensing management module is used to control the movement of the current drug to be identified through a manipulator after each selection of the drug to be identified corresponding to the currently traversed drug category, and during the movement, use a visual recognition camera to identify the traceability code on the surface of the current drug to be identified, and then fill the traceability code into the current prescription, and then use the manipulator to move the current drug to be identified to the drug dispensing port, and increase the dispensing number of the currently traversed drug category by 1; when the dispensing number of the currently traversed drug category is equal to a preset value, stop selecting the drug to be identified corresponding to the currently traversed drug category from the drug library, and upload the current prescription to the background management system to complete the drug dispensing management of the currently traversed drug category; wherein, the preset value is equal to the required number corresponding to the currently traversed drug category in the prescription.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program; wherein, when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute a drug dispensing management method as described in any one of claims 1 to 7.

10. A terminal, characterized in that: It comprises a processor, a memory and a computer program stored in the memory; wherein the computer program can be executed by the processor to implement a drug dispensing management method as described in any one of claims 1 to 7.