Prescription data analysis processing method and system
By eliminating prescription data with pharmacological mismatches and merging medication collection sets, optimizing medication collection routes, and utilizing video data and automatic medication dispensing technology, the problems of low medication collection efficiency and poor user experience in pharmacies have been solved, achieving an efficient and safe medication preparation and collection process.
Patent Information
- Application Number
- CN202510747541.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-05
AI Technical Summary
In the existing technology, pharmacy medication collection efficiency is low and the user experience is poor, especially due to the pharmacist's manual entry of information and the failure to timely prepare medicines, which leads to long waiting times and the risk of medication errors.
By obtaining user data and prescription data from the medication collection queue, eliminating unmatched prescription data, and merging prescription data into a medication collection set when there are a large number of people in the medication collection queue, the medication collection path is optimized, and the location of the medication collection personnel is determined using video data to generate the optimal medication collection path. Combined with the automatic configuration of non-manually dispensed drugs, the medication collection plan is adjusted to reduce waiting time.
It improves the efficiency of drug collection, reduces user waiting time, ensures the accuracy and safety of drug preparation, and enhances user experience.
Smart Images

Figure CN120600219A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for processing medical big data, and in particular to a method for analyzing and processing prescription data. Background Art
[0002] Traditionally, after a doctor prescribes a prescription, the patient must wait in line at the pharmacy with a paper prescription, where the pharmacist manually enters the information and dispenses the medication. With the optimization of real-time prescription transmission and pre-dispensing processes, the hospital information system now enables real-time transmission of doctor prescriptions. The doctor clicks "Save" in the office, and the information is instantly transmitted to the pharmacy system. The pharmacist then prepares the prescription in advance, and the medication is almost ready once the patient pays. For example, for a common cold medicine prescription, patients used to wait 15-20 minutes after paying and arriving at the pharmacy. Now, the pharmacy completes the prescription before payment is made. After the patient verifies their information, they can pick up their medication in just one to two minutes, significantly reducing wait times.
[0003] An intelligent prescription review system has been introduced to conduct real-time audits of prescriptions issued by doctors. Based on drug inserts, clinical medication guidelines, and hospital medication regulations, the system conducts a comprehensive review of drug dosage, usage, incompatibilities, indications, and more in prescriptions. Once a problem is discovered, such as a child's dosage exceeding the safe range or two interacting drugs being prescribed simultaneously, the system will immediately pop up an alert window, prompting the doctor to make changes. The doctor will adjust the prescription based on the prompts, ensuring that the prescription is accurate before transmitting it to the pharmacy. This measure effectively reduces medication delays and medication risks caused by prescription errors, ensures patient medication safety, and makes pharmacy dispensing work smoother and more efficient.
[0004] In other words, if the pharmacy configures and reviews the equipment in advance before patients line up, it will inevitably reduce waiting time and greatly improve the pharmacy's work efficiency.
[0005] Furthermore, inexperienced pharmacists often prepare medications in the order of each prescription, which results in lower processing efficiency and a poorer user experience compared to pharmacists who are familiar with cross-prescription medications.
[0006] Therefore, there is a need for a prescription data analysis and processing method that can improve the efficiency of all medication personnel and enhance user experience. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a prescription data analysis and processing method that can improve the efficiency of all medication collection personnel and enhance user experience.
[0008] The present invention provides a prescription data analysis and processing method, comprising: S100: Obtain user data of the medication collection queue and prescription data corresponding to each user data, and eliminate unmatched prescription data based on the user data; S200: Determine whether the number of user data in the medication pickup queue exceeds a first threshold number of users. If so, merge the first number of prescription data into a first medication pickup set. S300: Obtain video data of the pharmacy, and output the location of each person picking up medicine based on the video data; output a first optimal medicine-picking path for each person picking up medicine based on the configuration location of each medicine in the first medicine-picking set and the location of the person picking up medicine; S400: Determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds a first quantity threshold. If the number does not exceed the first quantity threshold, configure the first optimal drug collection path as the drug collection plan. If the number exceeds the first quantity threshold, configure the non-manually dispensed drugs into a second drug collection set. Based on the configuration position of each drug in the second drug collection set and the personnel position of the drug collection personnel, output a second optimal drug collection path for each drug collection personnel. Based on the configuration position of each drug in the first drug collection set other than the second drug collection set and the personnel position of the drug collection personnel at the end of the second optimal drug collection path, output a third optimal drug collection path for each drug collection personnel. Combine the second optimal drug collection path and the third optimal drug collection path to form a drug collection plan. S500, determining whether the waiting time of the user with the longest waiting time corresponding to the medication plan exceeds the waiting threshold, if so, reducing the first amount and jumping to S200; if not, jumping to S600; S600: Output the medication plan.
[0009] The present invention provides a prescription data analysis and processing method, wherein determining whether the quantity of non-manually dispensed drugs in a first optimal drug collection path exceeds a first quantity threshold comprises: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, lower the algorithm quantity threshold each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
[0010] The present invention provides a prescription data analysis and processing method, wherein determining whether the quantity of non-manually dispensed drugs in a first optimal drug collection path exceeds a first quantity threshold comprises: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, increase the quantity of each category of the first histogram each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
[0011] The present invention provides a prescription data analysis and processing method, wherein drugs having the same pickup location and similar pickup time are classified, including: Non-manually prepared medicines in the same cabinet are classified as one category, other medicines in the same cabinet are classified as one category, and medicines in different cabinets are classified as different categories.
[0012] The present invention provides a prescription data analysis and processing method, wherein determining whether the overlapping area of the first histogram that best matches the second histogram exceeds an image threshold comprises: The minimum number of the same class in the first and second histograms is the overlapping area of this class.
[0013] The present invention provides a prescription data analysis and processing system, comprising an input module, a video collector, and a processor; the processor operates according to the following steps: S100: The input module obtains user data of the medicine collection queue and prescription data corresponding to each user data, and eliminates unmatched prescription data based on the user data; S200: The processor determines whether the number of user data in the medicine collection queue exceeds a first threshold number of people. If so, the processor merges the first number of prescription data into a first medicine collection set. S300: The video collector acquires video data of the pharmacy and outputs the location of each person picking up medicine based on the video data; outputs a first optimal medicine-picking path for each person picking up medicine based on the configuration location of each medicine in the first medicine-picking set and the location of the person picking up medicine; S400. The processor determines whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds a first quantity threshold. If the number does not exceed the first quantity threshold, the first optimal drug collection path is configured as the drug collection plan. If the number exceeds the first quantity threshold, the non-manually dispensed drugs are configured as a second drug collection set. Based on the configuration position of each drug in the second drug collection set and the personnel position of the drug collection personnel, a second optimal drug collection path is output for each drug collection personnel. Based on the configuration position of each drug in the first drug collection set other than the second drug collection set and the personnel position of the drug collection personnel at the end of the second optimal drug collection path, a third optimal drug collection path is output for each drug collection personnel. The second optimal drug collection path and the third optimal drug collection path are combined to form a drug collection plan. S500, the processor determines whether the waiting time of the user with the longest waiting time corresponding to the medication plan exceeds the waiting threshold, and if so, reduces the first amount and jumps to S200; if not, jumps to S600; S600: The processor outputs a medication taking plan.
[0014] The present invention provides a prescription data analysis and processing system, wherein determining whether the quantity of non-manually dispensed drugs in a first optimal drug collection path exceeds a first quantity threshold comprises: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, lower the algorithm quantity threshold each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
[0015] The present invention provides a prescription data analysis and processing system, wherein determining whether the quantity of non-manually dispensed drugs in a first optimal drug collection path exceeds a first quantity threshold comprises: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, increase the quantity of each category of the first histogram each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
[0016] The present invention provides a prescription data analysis and processing system, wherein medicines having the same medication collection location and similar medication collection time are classified, including: Non-manually prepared medicines in the same cabinet are classified as one category, other medicines in the same cabinet are classified as one category, and medicines in different cabinets are classified as different categories.
[0017] The present invention provides a prescription data analysis and processing system, wherein determining whether the overlapping area of the first histogram that best matches the second histogram exceeds an image threshold comprises: The minimum number of the same class in the first and second histograms is the overlapping area of this class.
[0018] The prescription data analysis and processing method of the present invention differs from the prior art in that it first eliminates prescription data that pharmacologically mismatches user data. Then, when there are a large number of users in the medication collection queue, it merges the first set of prescription data into a single, first medication collection set. This allows the person collecting medications corresponding to multiple prescription data sets in the first set to be collected simultaneously, allowing for cross-pollination of multiple prescription data sets and improving overall medication collection efficiency. Furthermore, since some medications with longer collection times can be dispensed automatically rather than manually, other medication collection operations can be completed during the waiting time. Therefore, non-manually dispensed medications should be routed accordingly. After automatic dispensing, these non-manually dispensed medications can be considered directly available for collection, or manually dispensed medications. This allows the second and third optimal medication collection routes to be mapped and output based on the priority of the paths. Furthermore, the number of cross-pollinated prescription data sets can be adjusted to account for the issue of users with the longest waiting times. While minimizing the total waiting time for all users in the medication collection queue, this ensures that individual users do not wait excessively, thus ensuring medication collection efficiency and user experience.
[0019] A prescription data analysis and processing method of the present invention will be further described below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of a prescription data analysis and processing method; Figure 2 The bar graph is a schematic diagram. DETAILED DESCRIPTION
[0021] like Figure 1 As shown, the present invention provides a prescription data analysis and processing method, including: S100: Obtain user data of the medication collection queue and prescription data corresponding to each user data, and eliminate unmatched prescription data based on the user data; S200: Determine whether the number of user data in the medication pickup queue exceeds a first threshold number of users. If so, merge the first number of prescription data into a first medication pickup set. S300: Obtain video data of the pharmacy, and output the location of each person picking up medicine based on the video data; output a first optimal medicine-picking path for each person picking up medicine based on the configuration location of each medicine in the first medicine-picking set and the location of the person picking up medicine; S400: Determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds a first quantity threshold. If the number does not exceed the first quantity threshold, configure the first optimal drug collection path as the drug collection plan. If the number exceeds the first quantity threshold, configure the non-manually dispensed drugs into a second drug collection set. Based on the configuration position of each drug in the second drug collection set and the personnel position of the drug collection personnel, output a second optimal drug collection path for each drug collection personnel. Based on the configuration position of each drug in the first drug collection set other than the second drug collection set and the personnel position of the drug collection personnel at the end of the second optimal drug collection path, output a third optimal drug collection path for each drug collection personnel. Combine the second optimal drug collection path and the third optimal drug collection path to form a drug collection plan. S500, determining whether the waiting time of the user with the longest waiting time corresponding to the medication plan exceeds the waiting threshold, if so, reducing the first amount and jumping to S200; if not, jumping to S600; S600: Output the medication plan.
[0022] The present invention first eliminates prescription data that pharmacologically does not match the user data. Then, when there are a large number of users in the medication collection queue, the first amount of prescription data is merged into the same first medication collection set. This allows the person collecting the medication to collect the medications corresponding to multiple prescription data in the first amount at once, allowing the multiple prescription data to be interleaved, thereby improving overall medication collection efficiency. Furthermore, since some medications with longer collection times can be dispensed automatically rather than manually, other medication collection operations can be completed during the waiting time. Therefore, we should first navigate the non-manually dispensed medications accordingly. After the non-manually dispensed medications are automatically dispensed, they can be considered as medications that can be taken directly or manually dispensed. Then, we can plan the second and third optimal medication collection paths and output a medication collection plan based on the priority order of the paths. Based on the issue of the user with the longest waiting time being too long, the number of interleaved prescription data is adjusted. While minimizing the total waiting time for all users in the medication collection queue, this ensures that individual users do not wait too long, thereby ensuring medication collection efficiency and user experience.
[0023] Among them, S100, obtaining the user data of the medication collection queue and the prescription data corresponding to each user data, and eliminating unmatched prescription data based on the user data, can be understood as follows: the medication collection queue is the queue of users currently queuing in front of the medication collection counter. We can obtain the user data of each user in the above queue through the card swiping order of each user or image face recognition; each user data can be the user's various physical indicators, name, ID number and other personal information; when the doctor is in the outpatient clinic, a prescription data is issued for the user. This prescription data can be a paper prescription held by the user, or the doctor directly sends the prescription data corresponding to the user data to the order through the Internet system during the outpatient clinic. In other words, before the pharmacy picks up the medicine, it can already understand the situation of the prescription to be configured and the corresponding user.
[0024] Once we know the user data and prescription data, we can eliminate mismatched pharmacies based on historical data stored in the database or common knowledge to avoid prescribing the wrong medicine or problematic prescriptions.
[0025] Among them, S200, determines whether the number of user data in the medicine collection queue exceeds the first number threshold. If it exceeds, the first number of prescription data is merged into a first medicine collection set, which can be understood as follows: Among them, the first number threshold and the first number can be shown in the following table:
[0026] The corresponding content in the above table is only a schematic illustration, and technicians implementing the present invention can adjust different first number thresholds and first quantities according to actual needs to suit different pharmacies.
[0027] That is, different first number thresholds represent different numbers of people in the medication collection queue, and can correspond to different first numbers as thresholds.
[0028] That is to say, the above table can be understood as technicians in the field configuring different first number thresholds and corresponding first quantities according to different pharmacies.
[0029] The present invention is further illustrated below by taking the first threshold of number of people being 10 and the first quantity being 4.
[0030] When the queue exceeds 10, the staff will pick up medications in the order they're in line. Once the queue exceeds 10, the staff will collect all medications from four prescriptions at once, then pack them into four bags, one for each user, and distribute them to the user. This allows staff to pick up multiple medications at once, reducing the number of trips required, making the pharmacy more convenient, and shortening the total waiting time for those 10 or more people waiting.
[0031] All the medicines for the above four people are the first medicine set.
[0032] Among them, S300, obtaining the video data of the pharmacy, and outputting the personnel position of each person picking up medicine based on the video data, can be understood as: the number of people picking up medicine at a pharmacy counter can be 1 or more, and the position of each person picking up medicine can be intuitively captured through video data, and even a three-dimensional model corresponding to the pharmacy, the location of the medicine, and the location of the person picking up medicine can be generated through digital twins for subsequent use in finding the optimal medicine-picking route.
[0033] Among them, based on the configuration location of each drug in the first drug collection set and the personnel location of the drug collection personnel, the first optimal drug collection path for each drug collection personnel is output. It can be understood that: regardless of the number of drug collection personnel, there can be generated a navigation path with the shortest overall journey time or the shortest path for each drug collection personnel through enumeration method, convolutional neural network, artificial intelligence AI model, or existing taxi software pathfinding algorithm. This allows less experienced drug collection personnel to quickly find the location where they need to pick up the drug and take the shortest path or the shortest time. This path is the first optimal drug collection path.
[0034] Among them, S400, determining whether the number of non-manually dispensed drugs in the first optimal drug-collecting path exceeds the first quantity threshold, can be understood as follows: See the following table:
[0035] Each drug in the pharmacy has a corresponding pickup time. However, experienced pickup staff usually prioritize non-manually dispensed drugs, then other drugs, and finally come back to pick up these processed non-manually dispensed drugs, or simply treat the processed non-manually dispensed drugs as other drugs, so as to find the way, which will have a short total time to reduce the user's waiting time.
[0036] The first quantity threshold may be 1 to 5, preferably 2.
[0037] Among them, if the first quantity threshold is not exceeded, the first optimal drug collection path is configured as the drug collection plan, which can be understood as: that is, when the above-mentioned non-manually dispensed drugs are 1 or 2, the impact on the total time is not significant, and the first optimal drug collection path originally generated and configured based on the path-finding priority principle can be used as the drug collection plan; and once the number of non-manually dispensed drugs exceeds 2, we should first process the non-manually dispensed drugs as the second drug collection set, and then process other drugs to reduce the overall drug collection time.
[0038] Among them, if the first quantity threshold is exceeded, the non-manually dispensed drugs are configured as a second drug collection set, and the second optimal drug collection path for each drug collection person is output according to the configuration position of each drug in the second drug collection set and the personnel position of the drug collection person; according to the configuration position of each drug in the first drug collection set other than the second drug collection set and the personnel position of the drug collection person at the end of the second optimal drug collection path, the third optimal drug collection path for each drug collection person is output; the second optimal drug collection path and the third optimal drug collection path are combined into a drug collection plan, which can be understood as: the first quantity threshold can be 2, for example. Of course, those skilled in the art can also adjust it accordingly. If there are more than 2 non-manually dispensed drugs, the non-manually dispensed drugs are used as the second drug collection set, and a second optimal drug collection path is first generated with this second drug collection set using the same method as above; then a third optimal drug collection path is generated for the other drugs in the first drug collection set, and the above second and third optimal drug collection paths are combined to obtain a drug collection path to generate a drug collection plan.
[0039] It should be noted that the medication collection plan generated by the path formed by fusing the first optimal medication collection path or the second and third optimal medication collection paths can be: The above path can be understood as a navigation path. That is, first, navigation software corresponding to the path is configured on the user terminal, and this path is used as the navigation path for the navigation software to navigate. When the user arrives at the corresponding medication location, it can be more convenient to find the corresponding medication. In order to facilitate accurate positioning from the path to the actual user's location, we can also display the corresponding medication photo or placement photo to the user terminal's navigation software when arriving at the corresponding medication location to facilitate medication collection. Secondly, after the user has completed the collection of all medications in the first medication collection set, they can distribute the medications in the first medication collection set into prescription data medication sets corresponding to each prescription data at the counter according to the corresponding prescription data of the user data in the medication collection queue; and send the prescription data medication sets to each user in the medication collection queue. This is the medication collection plan.
[0040] In other words, the medicine collection plan is a collection of medicines that are sorted and output with corresponding prescription data for the first medicine collection set.
[0041] In S500, it is determined whether the waiting time of the user with the longest waiting time corresponding to the medication collection plan exceeds the waiting threshold. If so, the first number is reduced and the process proceeds to S200. If not, the process proceeds to S600. This can be understood as follows: the longest waiting time can be the longest waiting time for the first number of users in the first medication collection set. Essentially, the first number of users in the medication collection queue may be the user with the longest waiting time. For example, the first number is 4, and the waiting threshold is 10 minutes. In our medication collection queue, the fourth user, as the last member of the first medication collection set, has the longest waiting time. If his waiting time is not excessively long, other users may also feel that their waiting time is not excessively long. Therefore, the fourth user's waiting time is compared with the waiting threshold of 10 minutes. If it is less than 10 minutes, the medication collection plan can be output normally. If it is more than 10 minutes, the first number can be reduced to reduce the number of users in the first medication collection set, thereby reducing the number of medications in the first medication collection set. This reduces the longest waiting time in the first medication collection set, preventing users from waiting too long and degrading the user experience.
[0042] It's important to note that even though users who were originally in the first pickup group are now in the next first pickup group, their wait time may be longer. However, due to the characteristics of modern pickup queues, pharmacies can group each of the first number of users into a first pickup group. This allows users in this first pickup group to oversee the pharmacy staff's medication collection, dispensing, and delivery. Users not in this first pickup group can rest anywhere without having to wait at the counter, and their waiting time is negligible.
[0043] The first number can be reduced by one each time, and the first number should not be lower than 1.
[0044] In some embodiments, see Figure 1 、 2 The determining whether the quantity of non-manually dispensed drugs in the first optimal drug-collecting route exceeds a first quantity threshold comprises: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, lower the algorithm quantity threshold each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
[0045] The present invention first categorizes the medicines in each medicine cabinet that were taken at the same time using historical data, and configures the data for storage in a database. Historical data with excessively large first quantity differences is first eliminated, and a first bar chart is created based on the types of classification and the quantity of each category. The same method is then used to configure a second bar chart for the current first medicine collection. By aligning each category in the two second bar charts and calculating the relationship between the overlapping area and the image threshold, it is possible to determine whether the most matching historical data and the current first medicine collection are relatively well matched. The matching can directly apply the first quantity threshold of the historical data to determine the optimal solution for allocating multiple non-manually dispensed medicines and other medicines in the right proportions. If the historical data cannot guide our processing, that is, if the historical data is not well matched, we can enrich the historical data with new judgment logic. The specific new judgment logic can be: first, a convolutional neural network or enumeration method is used to generate an algorithm quantity threshold corresponding to a medication plan with the shortest waiting time for all users, and this algorithm quantity threshold is used as an intermediate medium. Since the first quantity threshold generated by it is to change with the first quantity, then, in the step of jumping from S500 to S200, the first quantity is reduced, then the first quantity threshold should also be reduced as the first quantity is reduced, so as to comply with the overall operation logic, and the judgment of the weight of the proportion of non-manually dispensed drugs will not be increased due to the reduction in the number of users in the first medication collection. Of course, if the number of jumps is large, in order to avoid the first quantity being reduced to the point where a complete first medication collection cannot be output, when the number of jumps is too large, the weight of non-manually dispensed drugs is increased to ensure that the method runs smoothly until there is an output result.
[0046] The historical data, which includes the type, quantity, first quantity threshold, and first quantity of each drug in each first medication collection set, can be understood as follows: Historical data is pre-stored in the database, either from previous use of the algorithm or from actual occurrences; this data may be based on the experience of medication collection personnel or generated by the algorithm. If appropriate historical data can be used as guidance for the first quantity threshold for this first medication collection set, this will undoubtedly increase the accuracy and convenience of this first quantity threshold.
[0047] Of course, as an alternative, the first quantity threshold may be 50% of the first quantity, a quantity obtained by rounding.
[0048] Here, if the difference between the first quantity of the first medication collection set in the historical data and the first quantity of the first medication collection set formed by combining the prescription data of the first quantity is greater than a difference threshold, it can be understood that the difference threshold can be 10% of the first quantity, with a value of 1 if it is less than 1 and rounded up if it is greater than 1. Alternatively, it can be a fixed value of 2. For example, in the example of the present invention, the first quantity is 4. Then, the difference threshold is 1. First medication collection sets with first quantities of 3, 4, and 5 in the historical data can be retained, and the others are eliminated.
[0049] As an example, the first medication collection set formed by merging the first number of prescription data and each first medication collection set in the historical data may be in the following table:
[0050] However, the above table is only a representation and lacks corresponding classification, which is highlighted in the subordinate content.
[0051] Among them, see Figure 2 , classify the medicines according to the same medicine collection location and similar medicine collection time, and make a first bar chart of the first medicine collection set belonging to the historical data according to the quantity of the classified medicines. It can be understood as follows: Since many types of medicines belong to the same medicine storage cabinet, currently limited by navigation accuracy and data search convenience, navigation can only be accurate to the cabinet where the medicine prescription is stored, and cannot be specific to the medicine grid. Then, the non-manually prepared medicines in the same cabinet are classified as one category, other medicines in the same cabinet are classified as one category, and medicines in different cabinets are classified as different categories. With this classification method, it is convenient to adapt to the path-finding algorithm with different navigation priority orders, reduce the pressure of historical data matching, and find historical data that is more suitable for the first medicine collection set this time as a reference, reducing the calculation and processing burden.
[0052] For example, in the following table, configure the first histogram:
[0053] Then, the coordinates of each bar in the first histogram are (East Cabinet 1, 8), (East Cabinet 2, 1), (West Cabinet 2, 1), and (South Cabinet 1, 7). The width of each bar can be unity, making it easier to calculate the area of each bar and the area of all bars in the entire histogram.
[0054] Among them, in the step of classifying drugs of the same type and with similar drug pickup time, similar drug pickup time may be: drugs with a waiting time less than 1 / 5 of the waiting threshold are called similar drug pickup time.
[0055] The present invention groups drugs with the same location and similar waiting time into one category. Drugs of the same category are used as columns in the same histogram, and the column heights are calculated. This facilitates the closest possible match between the current first drug collection set and the first drug collection set in historical data, thereby guiding the corresponding first quantity threshold.
[0056] Among them, based on the first medication collection set formed by merging the first number of prescription data, the drugs with the same medication collection location and similar medication collection time are classified according to their types, and the classified drugs are used to create a second bar chart belonging to the first medication collection set formed by merging the first number of prescription data according to their quantity. It can be understood that the reference object of the second bar chart is the first medication collection set in the current queue, and the first bar chart is the first medication collection set of historical data. The generation method is similar.
[0057] The method determines whether the overlapping area of the first histogram that best matches the second histogram exceeds an image threshold. If so, the first quantity threshold for the first medication collection set corresponding to the best-matching first histogram in the historical data is output. This threshold can be understood as 60% of the second histogram. The overlapping area represents the overlap of each category between the first and second histograms. The best-matching first histogram can be understood as the first histogram with the largest overlapping area with the second histogram. The minimum number of common categories between the first and second histograms is the overlapping area for that category. The overlapping areas of all categories are summed and compared to 60% of the sum of the total number (i.e., total area) of the second histogram. If this exceeds 60%, the historical data has sufficient phase velocity. Otherwise, there is no best-matching first histogram.
[0058] If the image threshold is not exceeded, then the algorithm output corresponding to the algorithm quantity threshold for the first medication collection plan with the shortest user waiting time in the first medication collection set formed by combining the first number of prescription data, based on the convolutional neural network algorithm output, determines whether the number of times the first medication collection set jumps to S200 exceeds the jump threshold. This can be understood as follows: if there is no best-matching first histogram, then historical data should not be used as a reference, and a new mechanism should be developed to generate the first quantity threshold. A convolutional neural network or enumeration method can be used to generate multiple medication collection plans and select the one with the shortest user waiting time. This solution may seem attractive, but it still needs to be constrained, otherwise it may be exaggerated in certain data. The constraint method can be to search for the number of times the first quantity was reduced in S500 and jumped to S200, and determine whether it is excessive. The quantity threshold is used as the dividing line, where the quantity threshold can be 2. If the jump exceeds 2 times, for example 3 times, it is excessive, meaning it exceeds the jump threshold.
[0059] If the jump threshold is exceeded, the first quantity threshold equal to the first quantity threshold before jumping to S200 is output; if the jump threshold is not exceeded, the algorithm quantity threshold is lowered each time jumping to S200, and the first quantity threshold is output according to the algorithm quantity threshold. This can be understood as follows: if there are too many jumps, the first quantity threshold is no longer changed, and the first quantity threshold before the jump is directly referenced, thereby increasing the weight of the first quantity threshold because the first quantity threshold has not been lowered, while the first quantity has been reduced. If the jump threshold is not exceeded, the first quantity threshold is lowered accordingly to match the reduction in the first quantity. The first quantity threshold can be lowered by lowering the first quantity threshold to the ratio of the first quantity threshold before the jump to the first quantity, wherein the first quantity threshold can be rounded up. For example, if the original first quantity is 4, minus one is 3. Therefore, the first quantity threshold should be multiplied by 3 / 4 and rounded up. In other words, by maintaining a similar ratio, lowering the first quantity threshold, for example by 10% each time, this ensures or roughly ensures that the first quantity threshold and the first quantity ratio are harmonious, thus not changing the original intention of setting the first quantity threshold. However, because the ratio is not an absolute change, the fluctuation of the ratio helps to increase different calculation samples and select a more appropriate first histogram for subsequent historical data. Lowering the algorithm quantity threshold is equivalent to reducing the first quantity threshold as mentioned above.
[0060] Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug-taking path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug-taking path exceeds the product of the first quantity and the alarm ratio. It can be understood that: although we have adjusted the roughly harmonious relationship between the first quantity threshold and the first quantity according to the corresponding ratio, in some cases, the minus one of the first quantity may cause a greater problem, resulting in the ratio exceeding the alarm ratio. For example, the alarm ratio can be 10% to 100%, preferably 30%, that is, 30% non-manually dispensed drugs. We can directly output the first quantity threshold according to 30% of the first quantity.
[0061] As a variation of this embodiment, see Figure 1 、 2 The determining whether the quantity of non-manually dispensed drugs in the first optimal drug-collecting route exceeds a first quantity threshold comprises: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, increase the quantity of each category of the first histogram each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
[0062] The present invention first categorizes the medicines in each medicine cabinet that were taken at the same time using historical data, and configures the data for storage in a database. Historical data with excessively large first quantity differences is first eliminated, and a first bar chart is created based on the types of classification and the quantity of each category. The same method is then used to configure a second bar chart for the current first medicine collection. By aligning each category in the two second bar charts and calculating the relationship between the overlapping area and the image threshold, it is possible to determine whether the most matching historical data and the current first medicine collection are relatively well matched. The matching can directly apply the first quantity threshold of the historical data to determine the optimal solution for allocating multiple non-manually dispensed medicines and other medicines in the right proportions. If the historical data cannot guide our processing, that is, if the historical data is not well matched, we can enrich the historical data with new judgment logic. The specific new judgment logic may be: first, a convolutional neural network or enumeration method is used to generate an algorithm quantity threshold corresponding to a medication plan with the shortest waiting time for all users, and this algorithm quantity threshold is used as an intermediate medium. Since the first quantity threshold generated by it is to change with the first quantity, then, in the step of jumping from S500 to S200, the area of the first bar graph is increased, so that more first bar graphs are matched, so as to reduce the computational burden, increase the computational speed, and improve the computational efficiency by drawing on more historical data within the allowable error range. Of course, if the number of jumps is large, in order to avoid the first quantity being reduced to the point where a complete first medication set cannot be output, when the number of jumps is too large, the weight of non-manually dispensed drugs is increased to ensure that the method runs smoothly until there is an output result.
[0063] Increasing the number of categories in each first histogram each time the process jumps to S200 can be understood as: by grouping historical data into the same category and expanding the number of categories in the first histogram, the number of categories in the first histogram can be increased by the jump threshold within the jump threshold. For example, if the jump threshold is 2, the number of categories in each first histogram can be increased by 10%, up to a maximum of 121%. This allows more first histograms to be matched, thereby reducing the computational burden, increasing computational speed, and improving computational efficiency by drawing on more historical data within an acceptable error range.
[0064] In some embodiments, see Figure 1 、 2 , classify drugs with the same medication collection location and similar medication collection time, including: Non-manually prepared medicines in the same cabinet are classified as one category, other medicines in the same cabinet are classified as one category, and medicines in different cabinets are classified as different categories.
[0065] Because multiple medications are stored in the same medicine cabinet, navigation accuracy and data search capabilities currently limit navigation to the cabinet containing the prescription, not the specific medication compartment. Therefore, non-manually dispensed medications in the same cabinet are grouped together, other medications in the same cabinet are grouped together, and medications in different cabinets are grouped together. This categorization method facilitates pathfinding algorithms that adapt to different navigation priorities, reduces the burden of historical data matching, and finds historical data that is more suitable for the first medication collection set, reducing computational and processing overhead.
[0066] In some embodiments, see Figure 1 、 2 , determining whether an overlapping area of the first histogram that best matches the second histogram exceeds an image threshold, including: The minimum number of the same class in the first and second histograms is the overlapping area of this class.
[0067] The image threshold can be set at 60% of the second histogram. The overlapping area represents the overlap of each class between the first and second histograms. The best-matching first histogram can be understood as the first histogram with the largest overlapping area with the second histogram. The minimum number of common classes between the first and second histograms is the overlapping area for that class. The sum of the overlapping areas for all classes is compared to 60% of the sum of the total number (i.e., total area) of the second histogram. If this value exceeds 60%, the historical data has sufficient phase velocity. Otherwise, there is no best-matching first histogram.
[0068] like Figure 1 As shown, the present invention provides a prescription data analysis and processing system, including an input module, a video collector, and a processor; the processor operates according to the following steps: S100: The input module obtains user data of the medicine collection queue and prescription data corresponding to each user data, and eliminates unmatched prescription data based on the user data; S200: The processor determines whether the number of user data in the medicine collection queue exceeds a first threshold number of people. If so, the processor merges the first number of prescription data into a first medicine collection set. S300: The video collector acquires video data of the pharmacy and outputs the location of each person picking up medicine based on the video data; outputs a first optimal medicine-picking path for each person picking up medicine based on the configuration location of each medicine in the first medicine-picking set and the location of the person picking up medicine; S400. The processor determines whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds a first quantity threshold. If the number does not exceed the first quantity threshold, the first optimal drug collection path is configured as the drug collection plan. If the number exceeds the first quantity threshold, the non-manually dispensed drugs are configured as a second drug collection set. Based on the configuration position of each drug in the second drug collection set and the personnel position of the drug collection personnel, a second optimal drug collection path is output for each drug collection personnel. Based on the configuration position of each drug in the first drug collection set other than the second drug collection set and the personnel position of the drug collection personnel at the end of the second optimal drug collection path, a third optimal drug collection path is output for each drug collection personnel. The second optimal drug collection path and the third optimal drug collection path are combined to form a drug collection plan. S500, the processor determines whether the waiting time of the user with the longest waiting time corresponding to the medication plan exceeds the waiting threshold, and if so, reduces the first amount and jumps to S200; if not, jumps to S600; S600: The processor outputs a medication taking plan.
[0069] The present invention first eliminates prescription data that pharmacologically does not match the user data. Then, when there are a large number of users in the medication collection queue, the first amount of prescription data is merged into the same first medication collection set. This allows the person collecting the medication to collect the medications corresponding to multiple prescription data in the first amount at once, allowing the multiple prescription data to be interleaved, thereby improving overall medication collection efficiency. Furthermore, since some medications with longer collection times can be dispensed automatically rather than manually, other medication collection operations can be completed during the waiting time. Therefore, we should first navigate the non-manually dispensed medications accordingly. After the non-manually dispensed medications are automatically dispensed, they can be considered as medications that can be taken directly or manually dispensed. Then, we can plan the second and third optimal medication collection paths and output a medication collection plan based on the priority order of the paths. Based on the issue of the user with the longest waiting time being too long, the number of interleaved prescription data is adjusted. While minimizing the total waiting time for all users in the medication collection queue, this ensures that individual users do not wait too long, thereby ensuring medication collection efficiency and user experience.
[0070] In some embodiments, see Figure 1 、 2 The determining whether the quantity of non-manually dispensed drugs in the first optimal drug-collecting route exceeds a first quantity threshold comprises: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, lower the algorithm quantity threshold each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
[0071] The present invention first categorizes the medicines in each medicine cabinet that were taken at the same time using historical data, and configures the data for storage in a database. Historical data with excessively large first quantity differences is first eliminated, and a first bar chart is created based on the types of classification and the quantity of each category. The same method is then used to configure a second bar chart for the current first medicine collection. By aligning each category in the two second bar charts and calculating the relationship between the overlapping area and the image threshold, it is possible to determine whether the most matching historical data and the current first medicine collection are relatively well matched. The matching can directly apply the first quantity threshold of the historical data to determine the optimal solution for allocating multiple non-manually dispensed medicines and other medicines in the right proportions. If the historical data cannot guide our processing, that is, if the historical data is not well matched, we can enrich the historical data with new judgment logic. The specific new judgment logic can be: first, a convolutional neural network or enumeration method is used to generate an algorithm quantity threshold corresponding to a medication plan with the shortest waiting time for all users, and this algorithm quantity threshold is used as an intermediate medium. Since the first quantity threshold generated by it is to change with the first quantity, then, in the step of jumping from S500 to S200, the first quantity is reduced, then the first quantity threshold should also be reduced as the first quantity is reduced, so as to comply with the overall operation logic, and the judgment of the weight of the proportion of non-manually dispensed drugs will not be increased due to the reduction in the number of users in the first medication collection. Of course, if the number of jumps is large, in order to avoid the first quantity being reduced to the point where a complete first medication collection cannot be output, when the number of jumps is too large, the weight of non-manually dispensed drugs is increased to ensure that the method runs smoothly until there is an output result.
[0072] As a variation of this embodiment, see Figure 1 、 2 The determining whether the quantity of non-manually dispensed drugs in the first optimal drug-collecting route exceeds a first quantity threshold comprises: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, increase the quantity of each category of the first histogram each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
[0073] The present invention first categorizes the medicines in each medicine cabinet that were taken at the same time using historical data, and configures the data for storage in a database. Historical data with excessively large first quantity differences is first eliminated, and a first bar chart is created based on the types of classification and the quantity of each category. The same method is then used to configure a second bar chart for the current first medicine collection. By aligning each category in the two second bar charts and calculating the relationship between the overlapping area and the image threshold, it is possible to determine whether the most matching historical data and the current first medicine collection are relatively well matched. The matching can directly apply the first quantity threshold of the historical data to determine the optimal solution for allocating multiple non-manually dispensed medicines and other medicines in the right proportions. If the historical data cannot guide our processing, that is, if the historical data is not well matched, we can enrich the historical data with new judgment logic. The specific new judgment logic may be: first, a convolutional neural network or enumeration method is used to generate an algorithm quantity threshold corresponding to a medication plan with the shortest waiting time for all users, and this algorithm quantity threshold is used as an intermediate medium. Since the first quantity threshold generated by it is to change with the first quantity, then, in the step of jumping from S500 to S200, the area of the first bar graph is increased, so that more first bar graphs are matched, so as to reduce the computational burden, increase the computational speed, and improve the computational efficiency by drawing on more historical data within the allowable error range. Of course, if the number of jumps is large, in order to avoid the first quantity being reduced to the point where a complete first medication set cannot be output, when the number of jumps is too large, the weight of non-manually dispensed drugs is increased to ensure that the method runs smoothly until there is an output result.
[0074] In some embodiments, see Figure 1 、 2 , classify drugs with the same medication collection location and similar medication collection time, including: Non-manually prepared medicines in the same cabinet are classified as one category, other medicines in the same cabinet are classified as one category, and medicines in different cabinets are classified as different categories.
[0075] Because multiple medications are stored in the same medicine cabinet, navigation accuracy and data search capabilities currently limit navigation to the cabinet containing the prescription, not the specific medication compartment. Therefore, non-manually dispensed medications in the same cabinet are grouped together, other medications in the same cabinet are grouped together, and medications in different cabinets are grouped together. This categorization method facilitates pathfinding algorithms that adapt to different navigation priorities, reduces the burden of historical data matching, and finds historical data that is more suitable for the first medication collection set, reducing computational and processing overhead.
[0076] In some embodiments, see Figure 1 、 2, determining whether an overlapping area of the first histogram that best matches the second histogram exceeds an image threshold, including: The minimum number of the same class in the first and second histograms is the overlapping area of this class.
[0077] The image threshold can be set at 60% of the second histogram. The overlapping area represents the overlap of each class between the first and second histograms. The best-matching first histogram can be understood as the first histogram with the largest overlapping area with the second histogram. The minimum number of common classes between the first and second histograms is the overlapping area for that class. The sum of the overlapping areas for all classes is compared to 60% of the sum of the total number (i.e., total area) of the second histogram. If this value exceeds 60%, the historical data has sufficient phase velocity. Otherwise, there is no best-matching first histogram.
[0078] The embodiments described above are merely descriptions of preferred implementations of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should fall within the scope of protection determined by the claims of the present invention.
Claims
1. A method for analyzing and processing prescription data, characterized in that: include S100: Obtain user data of the medication collection queue and prescription data corresponding to each user data, and eliminate unmatched prescription data based on the user data; S200: Determine whether the number of user data in the medication pickup queue exceeds a first threshold number of users. If so, merge the first number of prescription data into a first medication pickup set. S300: Obtain video data of the pharmacy, and output the location of each person picking up medicine based on the video data; output a first optimal medicine-picking path for each person picking up medicine based on the configuration location of each medicine in the first medicine-picking set and the location of the person picking up medicine; S400: Determine whether the quantity of non-manually dispensed drugs in the first optimal drug dispensing route exceeds a first quantity threshold; if not, configure the first optimal drug dispensing route as the drug dispensing plan; If the number exceeds the first threshold, the non-manually dispensed drugs are configured as a second drug collection set, and the second optimal drug collection path for each drug collection person is output based on the configuration position of each drug in the second drug collection set and the personnel position of the drug collection person; the third optimal drug collection path for each drug collection person is output based on the configuration position of each drug in the first drug collection set other than the second drug collection set and the personnel position of the drug collection person at the end of the second optimal drug collection path; the second optimal drug collection path and the third optimal drug collection path are combined into a drug collection plan; S500, determining whether the waiting time of the user with the longest waiting time corresponding to the medication plan exceeds the waiting threshold, if so, reducing the first amount and jumping to S200; if not, jumping to S600; S600: Output the medication plan.
2. The method for analyzing and processing prescription data according to claim 1, wherein: The determining whether the quantity of non-manually dispensed drugs in the first optimal drug-collecting route exceeds a first quantity threshold includes: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, lower the algorithm quantity threshold each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
3. The prescription data analysis and processing method according to claim 1, characterized in that: The determining whether the quantity of non-manually dispensed drugs in the first optimal drug-collecting route exceeds a first quantity threshold includes: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, increase the quantity of each category of the first histogram each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
4. A prescription data analysis and processing method according to any one of claims 2 to 3, characterized in that: Classify drugs with the same pickup location and similar pickup time, including: Non-manually prepared medicines in the same cabinet are classified as one category, other medicines in the same cabinet are classified as one category, and medicines in different cabinets are classified as different categories.
5. The method for analyzing and processing prescription data according to any one of claims 2 to 3, characterized in that: Determining whether an overlapping area of the first histogram that best matches the second histogram exceeds an image threshold includes: The minimum number of the same class in the first and second histograms is the overlapping area of this class.
6. A prescription data analysis and processing system, characterized by: It includes an input module, a video collector, and a processor; the processor operates according to the following steps: S100: The input module obtains user data of the medicine collection queue and prescription data corresponding to each user data, and eliminates unmatched prescription data based on the user data; S200: The processor determines whether the number of user data in the medicine collection queue exceeds a first threshold number of people. If so, the processor merges the first number of prescription data into a first medicine collection set. S300: The video collector acquires video data of the pharmacy and outputs the location of each person picking up medicine based on the video data; outputs a first optimal medicine-picking path for each person picking up medicine based on the configuration location of each medicine in the first medicine-picking set and the location of the person picking up medicine; S400: The processor determines whether the quantity of non-manually dispensed drugs in the first optimal drug dispensing route exceeds a first quantity threshold; if not, the first optimal drug dispensing route is configured as the drug dispensing plan; If the number exceeds the first threshold, the non-manually dispensed drugs are configured as a second drug collection set, and the second optimal drug collection path for each drug collection person is output based on the configuration position of each drug in the second drug collection set and the personnel position of the drug collection person; the third optimal drug collection path for each drug collection person is output based on the configuration position of each drug in the first drug collection set other than the second drug collection set and the personnel position of the drug collection person at the end of the second optimal drug collection path; the second optimal drug collection path and the third optimal drug collection path are combined into a drug collection plan; S500, the processor determines whether the waiting time of the user with the longest waiting time corresponding to the medication plan exceeds the waiting threshold, and if so, reduces the first amount and jumps to S200; if not, jumps to S600; S600: The processor outputs a medication taking plan.
7. The prescription data analysis and processing system according to claim 6, characterized in that: The determining whether the quantity of non-manually dispensed drugs in the first optimal drug-collecting route exceeds a first quantity threshold includes: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, lower the algorithm quantity threshold each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
8. The prescription data analysis and processing system according to claim 7, characterized in that: The determining whether the quantity of non-manually dispensed drugs in the first optimal drug-collecting route exceeds a first quantity threshold includes: Based on the type, quantity, first quantity threshold, and first quantity of each drug in each first drug collection set in the historical data, first drug collection sets of the historical data where the difference between the first quantity of the first drug collection set of the historical data and the first quantity of the first drug collection set formed by combining the prescription data of the first quantity is greater than the difference threshold are eliminated; drugs with the same type and similar drug collection location are classified, and a first histogram belonging to the first drug collection set of the historical data is created for the classified drugs according to quantity; According to the first medication collection set formed by merging the first number of prescription data, classify the drugs according to the same medication collection location and similar medication collection time, and create a second histogram of the classified drugs according to quantity belonging to the first medication collection set formed by merging the first number of prescription data; Determine whether the overlapping area of the first histogram that best matches the second histogram exceeds the image threshold; if it exceeds the image threshold, output the first quantity threshold of the first medication set corresponding to the first histogram that best matches the historical data; if it does not exceed the image threshold, output the algorithm quantity threshold corresponding to the medication plan for the first medication set merged with the first quantity of prescription data according to the convolutional neural network algorithm, and determine whether the number of times the first medication set merged with the first quantity of prescription data jumps to S200 exceeds the jump threshold; if it exceeds the jump threshold, output the first quantity threshold that is the same as the first quantity threshold before jumping to S200; if it does not exceed the jump threshold, increase the quantity of each category of the first histogram each time jumping to S200, and output the first quantity threshold according to the algorithm quantity threshold; Determine whether the ratio of the output first quantity threshold to the first quantity exceeds the alarm ratio. If it does not exceed the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the first quantity threshold; if it exceeds the alarm ratio, then determine whether the number of non-manually dispensed drugs in the first optimal drug collection path exceeds the product of the first quantity and the alarm ratio.
9. A prescription data analysis and processing system according to any one of claims 7 to 8, characterized in that: Classify drugs with the same pickup location and similar pickup time, including: Non-manually prepared medicines in the same cabinet are classified as one category, other medicines in the same cabinet are classified as one category, and medicines in different cabinets are classified as different categories.
10. A prescription data analysis and processing system according to any one of claims 7 to 8, characterized in that: Determining whether an overlapping area of the first histogram that best matches the second histogram exceeds an image threshold includes: The minimum number of the same class in the first and second histograms is the overlapping area of this class.