A smart dispensing system for hospital pharmacies
By calculating drug similarity through image acquisition and analysis modules, the problem of inaccurate drug identification in hospital pharmacies has been solved, achieving a highly accurate and safe drug dispensing process that adapts to the medication habits of different hospitals and seasonal changes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU LEIGONGHAMMER INFORMATION TECH CO LTD
- Filing Date
- 2023-03-23
- Publication Date
- 2026-08-04
AI Technical Summary
In hospital pharmacies, there are problems with inaccurate drug identification during manual dispensing, especially since bottled drugs lack distinctive features on the top, making it difficult for cameras to identify them accurately and easily leading to oversights.
The image acquisition unit acquires drug image information, the feature extraction module and the analysis module calculate drug similarity, and the combination of historical prescription database and pending drug database identifies and verifies drug associations. The weight correction strategy and seasonal influence strategy are used to improve accuracy.
It achieves high accuracy and security in drug identification, adapts to the medication habits of different hospitals and seasonal changes, and improves the safety and efficiency of the dispensing process.
Smart Images

Figure CN116310421B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical systems, and more specifically to an intelligent dispensing system for hospital pharmacies. Background Technology
[0002] In hospital pharmacies, pharmacists receive prescriptions from doctors and locate the corresponding medications on the shelves, placing them in the dispensing basket. This entire process is done manually, requiring multiple manual checks and making oversights possible. Currently, artificial intelligence is widely used in the medical field, allowing for machine-based monitoring of dispensing results by placing cameras above the dispensing baskets. However, the limited field of view of cameras prevents accurate identification of some medications. When bottled medications are included, their tops lack distinctive markings, making direct camera verification of the dispensing results impossible. Summary of the Invention
[0003] In view of the shortcomings of the existing technology, the purpose of this invention is to provide an intelligent dispensing system for hospital pharmacies, which overcomes the above-mentioned defects in the existing technology. It establishes a correlation between the identifiable drugs and the drugs to be determined, and then calculates the similarity of each drug to screen out the associated drugs with the drug similarity that meet the regulations. It is convenient to use and more accurate.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] A smart dispensing system for hospital pharmacies, including
[0006] An image acquisition unit is positioned above the medicine basket and captures images of the contents of the basket to define as drug image information.
[0007] A feature extraction module receives the drug image information and acquires confirmed drug information and pending drug information. The confirmed drug information reflects the name and corresponding quantity of identifiable drugs, while the pending drug information reflects image information of drugs that cannot be directly identified from the drug image information.
[0008] The analysis module is equipped with a historical prescription database containing historical prescription records. The analysis module acquires the confirmed drug information and calculates a first similarity score, which reflects the probability that a potential drug has a combination relationship with another drug in the historical prescription records. The analysis module also has a potential drug database containing several associated image information entries. These associated image information entries reflect images of drugs that have a combination relationship but are difficult to identify. The analysis module acquires the potential drug information and compares it with the associated image information of the potential drugs in the potential drug database to obtain a second similarity score. Then, the corresponding first and second similarity scores are added to obtain a drug similarity score. If the drug similarity score exceeds a preset similarity score, the drug corresponding to that similarity score is the identified associated drug.
[0009] The medication dispensing record module acquires medication dispensing order information and compares it with associated and confirmed medication information. If they match, the medication dispensing order information is recorded as a historical prescription record in the historical prescription database. If they do not match, a verification signal is output.
[0010] In this invention, preferably, the first similarity is configured with a weight parameter, and the medication record module is configured with a first weight correction strategy. Specifically, when the medication record module obtains medication order information, it distinguishes the associated drugs in the medication order and increases the weight parameter of the corresponding associated drugs, so that the weight parameter of the first similarity is positively correlated with the number of times the medication order is combined for prescription.
[0011] In this invention, preferably, the analysis module is configured with an image recognition strategy, which includes a conventional recognition step. The conventional recognition step includes identifying several circular features within the information of the drug to be determined to define them as base circles, determining the center position of each base circle and defining a group of base circles whose centers coincide as a contour circle group, determining and calculating the base circle with the largest and smallest diameters within the contour circle group and defining them as the major diameter and minor diameter, respectively, and calculating the ratio of the minor diameter to the major diameter to define the contour ratio.
[0012] In this invention, preferably, the image recognition strategy includes an anti-slip texture recognition step. The anti-slip texture recognition step includes locating and extracting a circular bottle body area within the pending drug information using a circle detection method. The bottle body area reflects the coverage of the drug bottle body within the image information. Edge detection is performed within the bottle body area, and anti-slip texture edges are screened to obtain anti-slip texture features. The anti-slip texture features include the number of protrusions, the height-to-circumference ratio, and the shape of the protrusions. The height-to-circumference ratio reflects the ratio of the protrusion height to the length of the center line of the anti-slip texture circle.
[0013] In this invention, preferably, the image recognition strategy includes a specific recognition step, which is set before the regular recognition step. The specific recognition step includes identifying whether there are specific features in the information of the drug to be identified. The specific features are feature information that distinguishes it from other drugs. If there are specific features, the regular recognition step is skipped and a first value is assigned to the second similarity of the corresponding drug, and a second value is assigned to the second similarity of the other drugs, wherein the first value is greater than the second value. If there are no specific features, the regular recognition step is continued.
[0014] In this invention, preferably, the analysis module is configured with an associated image update strategy. Specifically, the associated image update strategy is to record the second similarity of the same drug after each image recognition as the historical similarity. If the value of the second similarity exceeds the value of the historical similarity within a consecutive preset number of detections, the most recently obtained information of the drug to be determined is used as the associated image information of the drug to replace the original associated image information.
[0015] In this invention, preferably, the analysis module is configured with a seasonal influence strategy. Specifically, the seasonal influence strategy involves classifying and statistically analyzing the frequency of each combination of drugs in the historical prescription database according to the season and calculating the frequency of each drug in each season. The more times the drugs are used, the greater the weight parameter of the first similarity in the corresponding season.
[0016] In this invention, preferably, the image recognition strategy includes an image preprocessing step, which is performed after the specific recognition step. The image preprocessing step includes denoising and sharpening the drug image information to enhance the clarity of edges in the image.
[0017] The beneficial effects of this invention are:
[0018] 1. This invention establishes a connection between information on the pending drug and the confirmed drug to obtain a first similarity. Then, it uses image features such as shape and color of the pending drug information to calculate a second similarity for each drug in the pending drug database. By comprehensively considering the first and second similarities, a drug similarity is obtained, thus obtaining a more accurate associated drug. The calculated associated drug is then compared with the user's medication order to determine whether the drug in the cradle is correct. This invention uses machine vision to solve the verification problem of drug dispensing, which is highly accurate, safer, and more effective, thus ensuring the safety of drug dispensing.
[0019] 2. This invention uses a first weight correction strategy to correct the weight parameters of the first similarity in real time. Considering the medication habits of doctors in different hospitals, the special medications or departments with expertise, and the differences in medication preferences among different hospitals, this setting is easy to adapt to the actual use of different hospitals and improves the accuracy of drug similarity calculation. This invention also considers the impact of seasons on medication and changes the weight parameters of the first similarity under different seasons, making the entire model more flexible to use. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the system architecture of the present invention;
[0021] Figure 2 This is a flowchart illustrating the image recognition strategy in this invention.
[0022] Figure label:
[0023] 1. Image acquisition unit; 2. Feature extraction module; 3. Analysis module; 4. Medication dispensing record module. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] It should be noted that when a component is described as "fixed to" another component, it can be directly on the other component or may have a component in between. When a component is considered "connected to" another component, it can be directly connected to the other component or may have a component in between. When a component is considered "set on" another component, it can be directly set on the other component or may have a component in between. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[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 invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0027] Please also see Figures 1 to 2This embodiment provides an intelligent dispensing system for a hospital pharmacy, including an image acquisition unit 1, a feature extraction module 2, an analysis module 3, and a dispensing record module 4. The image acquisition unit 1 is positioned above the dispensing basket and captures images of the inside of the basket to define as drug image information. The image acquisition unit 1 is specifically a camera, and its installation position is fixed, for example, it can be set on the back of the top plate of the shelf used to store dispensing drugs, thus basically achieving direct view of the inside of the dispensing basket.
[0028] Feature extraction module 2 receives drug image information and obtains confirmed drug information and pending drug information. Confirmed drug information reflects the name and corresponding quantity of drugs that can be identified, while pending drug information reflects the image information of drugs that cannot be directly identified through the drug image information, which is equivalent to narrowing down the scope of subsequent image processing.
[0029] Analysis module 3 is equipped with a historical prescription database, which records historical prescription records. Analysis module 3 acquires confirmed drug information and calculates a first similarity score. The first similarity score reflects the probability that a drug in the historical prescription records has a combination relationship with another drug, and its specific value is related to the number of times the combination has occurred in the historical prescription records. For example, if feature extraction module 2 identifies drugs A and B, the historical prescription records first filter out drugs C and D that can be combined with A and B. Then, the first similarity score needs to be calculated for C and D respectively. Analysis module 3 is also equipped with a pending drug database, which records several associated image information. These associated image information reflects drug images that have a combination relationship but are difficult to identify. Analysis module 3 acquires the pending drug information and compares it with the associated image information of the pending drugs in the pending drug database to obtain a second similarity score. Then, the corresponding first and second similarities are added to obtain the drug similarity score. If the drug similarity score exceeds a preset similarity score, the drug corresponding to that similarity score is the identified associated drug. The medication record module 4 obtains the medication order information and compares it with the associated and confirmed medication information. If they match, the medication order information is recorded as a historical prescription record in the historical prescription database. If they do not match, a verification signal is output.
[0030] In this invention, preferably, the first similarity is configured with a weight parameter, and the medication record module 4 is configured with a first weight correction strategy. Specifically, when the medication record module 4 obtains medication order information, it distinguishes related drugs within the medication order and increases the weight parameter of the corresponding related drugs, so that the weight parameter of the first similarity is positively correlated with the number of times medications are prescribed in combination on the medication order. Through the first weight correction strategy, the weight parameter of the first similarity is corrected in real time. Considering the medication habits of doctors in different hospitals, and the differences in medication preferences among different hospitals, this setting is convenient to adapt to the actual usage of different hospitals and improves the accuracy of drug similarity calculation. The specific formula for calculating drug similarity is: Y = αE + βF.
[0031] Where Y represents drug similarity, α represents the weight parameter of the first similarity, E represents the numerical value of the first similarity, β represents the weight parameter of the second similarity, and F represents the numerical value of the second similarity. This expression for drug similarity can be trained in advance.
[0032] In this invention, preferably, the analysis module 3 is configured with an image recognition strategy. The image recognition strategy includes conventional recognition steps, which include identifying several circular features within the information of the drug to be determined to define them as base circles, determining the center position of each base circle and defining a group of base circles whose centers coincide as a contour circle group, determining and calculating the base circle with the largest and smallest diameters within the contour circle group and defining them as the major diameter and minor diameter, respectively, and calculating the ratio of the minor diameter to the major diameter to define the contour ratio.
[0033] In this invention, preferably, the image recognition strategy includes an anti-slip texture recognition step. The anti-slip texture recognition step includes locating and extracting a circular bottle body area within the information to be determined by a circle detection method. The bottle body area reflects the coverage of the bottle body within the image information. Edge detection is performed within the bottle body area, and anti-slip texture edges are screened to obtain anti-slip texture features. The anti-slip texture features include the number of protrusions, the height-to-circumference ratio, and the shape of the protrusions. The height-to-circumference ratio reflects the ratio of the protrusion height to the length of the center line of the anti-slip texture circle.
[0034] In this invention, preferably, the image recognition strategy includes a specific identification step, which is set before the conventional identification step. The specific identification step includes identifying whether there are specific features in the information of the drug to be identified. Specific features are features that distinguish the drug from other drugs. If specific features exist, the conventional identification step is skipped, and a first value is assigned to the second similarity of the corresponding drug, while a second value is assigned to the second similarity of the remaining drugs. The first value is greater than the second value. If no specific features exist, the conventional identification step continues. For example, if it is known that only one drug has a black bottle cap, then the black bottle cap is a specific feature. In this case, a larger value can be assigned to the second similarity of that drug, while smaller values are assigned to the second similarity of the remaining drugs, resulting in a significant difference in their second similarity values.
[0035] In this invention, preferably, the analysis module 3 is configured with an associated image update strategy. Specifically, the associated image update strategy is to record the second similarity of the same drug after each image recognition as the historical similarity. If the value of the second similarity exceeds the value of the historical similarity within a consecutive preset number of detections, the most recently obtained information of the drug to be determined is used as the associated image information of the drug to replace the original associated image information.
[0036] In this invention, preferably, the analysis module 3 is configured with a seasonal influence strategy. Specifically, the seasonal influence strategy is to classify and statistically analyze the frequency of each combination of drugs in the historical prescription database according to the season and calculate the frequency of each drug in each season. The more times the drugs are used, the greater the weight parameter of the first similarity in the corresponding season.
[0037] In this invention, preferably, the image recognition strategy includes an image preprocessing step, performed after the specific recognition step. The image preprocessing step includes denoising and sharpening of the drug image information to enhance the clarity of edges in the image. Image denoising improves a given image, solving the problem of image quality degradation due to noise interference. Denoising techniques can effectively improve image quality, increase the signal-to-noise ratio, and better reflect the information carried by the original image. Image sharpening, on the other hand, enhances the clarity of edges.
[0038] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A smart dispensing system for hospital pharmacies, characterized in that: include Image acquisition unit (1), which is positioned above the dispensing basket and captures images of the contents of the dispensing basket to define them as drug image information. The feature extraction module (2) receives the drug image information and obtains confirmed drug information and unconfirmed drug information. The confirmed drug information reflects the name and corresponding quantity of the drug that can be identified, and the unconfirmed drug information reflects the image information of drugs that cannot be directly identified through the drug image information. Analysis module (3) is configured with a historical prescription database containing historical prescription records. The analysis module (3) acquires the confirmed drug information and calculates a first similarity, which reflects the probability that a drug with a combination relationship exists in the historical prescription records. The analysis module (3) also has a pending drug database containing several associated image information entries. These associated image information entries reflect drug images that have a combination relationship but are difficult to identify. The analysis module (3) acquires the pending drug information and compares its similarity with the associated image information of the pending drugs in the pending drug database. To obtain a second similarity, the corresponding first and second similarities are added together to obtain the drug similarity. If the drug similarity exceeds a preset similarity, the drug corresponding to the drug similarity is the identified associated drug. The analysis module (3) is configured with an image recognition strategy. The image recognition strategy includes a conventional recognition step, which includes identifying several circular features in the drug information to be determined as base circles, determining the center position of each base circle and defining a group of base circles with overlapping centers as a contour circle group, determining and calculating the base circle with the largest and smallest diameter in the contour circle group and defining them as the major diameter and minor diameter, respectively, and calculating the ratio of the minor diameter to the major diameter as the contour ratio. The medication record module (4) acquires the medication order information and compares it with the associated drug and confirmed drug information. If they match, the medication order information is recorded as a historical prescription record in the historical prescription database. If they do not match, a verification signal is output. The first similarity is configured with a weight parameter, and the medication record module (4) is configured with a first weight correction strategy. Specifically, when the medication record module (4) obtains the medication order information, it distinguishes the associated drugs in the medication order and increases the weight parameter of the corresponding associated drugs, so that the weight parameter of the first similarity is positively correlated with the number of times the medication order is combined and prescribed.
2. The intelligent dispensing system for a hospital pharmacy according to claim 1, characterized in that: The image recognition strategy includes an anti-slip texture recognition step, which includes locating and extracting a circular bottle body area within the information of the drug to be determined using a circle detection method. The bottle body area reflects the coverage of the drug bottle body within the image information. Edge detection is performed within the bottle body area, and anti-slip texture edges are screened to obtain anti-slip texture features. The anti-slip texture features include the number of protrusions, the height-to-circumference ratio, and the shape of the protrusions. The height-to-circumference ratio reflects the ratio of the protrusion height to the length of the center line of the anti-slip texture circle.
3. The intelligent dispensing system for a hospital pharmacy according to claim 1, characterized in that: The image recognition strategy includes a specific recognition step, which is set before the regular recognition step. The specific recognition step includes identifying whether there are specific features in the information of the drug to be identified. The specific features are features that distinguish it from other drugs. If there are specific features, the regular recognition step is skipped and a first value is assigned to the second similarity of the corresponding drug, and a second value is assigned to the second similarity of other drugs, wherein the first value is greater than the second value. If there are no specific features, the regular recognition step is continued.
4. The intelligent dispensing system for a hospital pharmacy according to claim 1, characterized in that: The analysis module (3) is configured with an associated image update strategy. Specifically, the associated image update strategy is to record the second similarity of the same drug after each image recognition as the historical similarity. If the value of the second similarity exceeds the value of the historical similarity within a consecutive preset number of detections, the most recently obtained information of the undetermined drug is used as the associated image information of the drug to replace the original associated image information.
5. The intelligent dispensing system for a hospital pharmacy according to claim 1, characterized in that: The analysis module (3) is configured with a seasonal influence strategy. Specifically, the seasonal influence strategy is to classify and count the number of times each combination of drugs in the historical prescription database is used according to the season and calculate the number of times each drug is used in each season. The more times the drugs are used, the greater the weight parameter of the first similarity in the corresponding season.
6. The intelligent dispensing system for a hospital pharmacy according to claim 3, characterized in that: The image recognition strategy includes an image preprocessing step, which is performed after the specific recognition step. The image preprocessing step includes denoising and sharpening the drug image information to enhance the clarity of edges in the image.