A medication dispensing system and method for a hospital pharmacy dispensing department

By adopting a robotic arm with dual-station time-sharing scheduling and a two-level verification link in the front-end dispensing system of the hospital's pharmacy dispensing department, combined with inventory scheduling and full-process identification and traceability, the problems of low equipment utilization and low verification efficiency have been solved, and an efficient, safe and standardized dispensing process has been achieved.

CN123120189APending Publication Date: 2026-11-17THE FIRST AFFILIATED HOSPITAL OF ZHEJIANG CHINESE MEDICAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611343812.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

The existing front-end dispensing system in hospital pharmacy dispensing departments suffers from problems such as low equipment utilization, low verification efficiency, easy errors in manual verification, and discontinuous dispensing process. It is difficult to meet the requirements of the "Regulations on Pharmaceutical Management of Medical Institutions" for double verification of prescription dispensing and dispensing, and the management of drugs that are not collected in a timely manner is not standardized.

Method used

A dual-station time-sharing scheduling structure with a single robotic arm connecting two dispensing sub-windows is adopted. A two-level, multi-dimensional verification link is constructed, combined with an automatic drug retrieval status determination mechanism, and integrated with inventory scheduling logic and a full-process identification and traceability structure. This enables the orderly temporary storage of drugs in the buffer zone and the orderly release of drugs from the workstation. The dispensing throughput is improved by using dual dispensing sub-windows with a robotic arm and dual-station time-sharing scheduling logic. A full-process automated verification mechanism for prescription usage and dosage is also constructed.

Benefits of technology

It improved the reliability and efficiency of medication verification, ensured the continuous and stable operation of the medication dispensing process, reduced the omissions caused by manual verification, and realized an efficient, safe, and standardized medication dispensing process for the pharmaceutical dispensing department.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123120189A_ABST
    Figure CN123120189A_ABST
Patent Text Reader

Abstract

This invention discloses a medication dispensing system and method for a hospital pharmacy. The system uses a single dispensing window with a single robotic arm connecting to two dispensing sub-windows. A dual-station time-sharing scheduling logic switches between the medication preparation and transfer, dispensing, and tray reset processes in the two sub-windows. A two-level verification link is constructed: the first level weighs the tray and combines visual inspection with a drug verification algorithm to verify the accuracy of dispensing; the second level weighs the tray to determine the patient's medication dispensing progress and result. A drug buffer with an integrated inventory storage algorithm manages the set of undispensed drugs and the set of drugs with failed verification. A visual verification unit for remaining tray materials and an RFID tagging unit are provided to achieve residue detection and full-process traceability. The method includes steps such as check-in queuing and pre-prescription verification, pre-dispensing verification, queuing and display, medication dispensing, tray reset verification, and handling of abnormal situations. This invention saves manpower, improves the utilization rate of the robotic arm, reduces hardware investment, and improves verification reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated dispensing technology in hospital pharmacy departments, specifically to a medication dispensing system and method for hospital pharmacy departments. Background Technology

[0002] The medication dispensing system in pharmaceutical dispensing departments is used to manage the processes of medication dispensing, prescription verification, patient medication collection, and medication handover at the front-end window of pharmaceutical dispensing departments. It is an important technical link to improve the efficiency of medication dispensing in pharmaceutical dispensing departments and ensure the safety of clinical medication use.

[0003] Existing automated pharmacy front-end dispensing windows mostly employ a deployment structure where prescriptions are transported one by one to the corresponding individual window via conveyor belts. Each conveyor belt is only responsible for the medication transfer operation of a single window, resulting in long waiting times for patients and low fault tolerance of the equipment in the event of abnormal events. Furthermore, each window independently schedules its medication preparation and dispensing processes, leaving the automated dispensing equipment and conveyor belts idle during the window periods when medication is being verified and patients are waiting to pick up their medications. This leads to low workstation utilization and a significant bottleneck in overall dispensing efficiency. Although existing dispensing windows rely on medication location identification programs or visual verification devices to check the accuracy of medication dispensing, this reliance on only these programs provides a single verification dimension and fails to meet the requirement of double verification for prescription dispensing as mandated by the "Regulations on Pharmaceutical Management in Medical Institutions." A single medication location identification program cannot cover issues such as medication appearance and packaging errors, limiting the reliability of verification. On the other hand, visual verification devices require verification of each box of medication, resulting in extremely low efficiency. Meanwhile, the status of patients picking up their medication is mostly confirmed manually, which is inefficient and prone to oversights. It is difficult to promptly check and trace cases of incorrect or missed medications. For medications that patients do not pick up in time after verification, they are usually just temporarily placed in the medication preparation area. Temporary storage management relies on manual sorting, which lacks a systematic scheduling logic. This can easily occupy the medication preparation workstation, disrupt the execution rhythm of subsequent medication dispensing tasks, and affect the continuity of the medication dispensing process. Summary of the Invention

[0004] The purpose of this invention is to address the aforementioned shortcomings of existing front-end dispensing systems in hospital pharmacy departments by providing a dispensing system and method for hospital pharmacy departments. This system employs a dual-station time-sharing scheduling structure where a single dispensing window is configured with a single robotic arm to connect to two dispensing sub-windows. This fully utilizes the intervals between verification and temporary storage at one window to execute operations at the other sub-window, improving the utilization rate of the robotic arm station and reducing hardware investment costs in multi-window scenarios. A two-level, multi-dimensional verification link combined with an automatic dispensing status determination mechanism is constructed to overcome the limitations of single-mode verification, improve the reliability of dispensing verification, and reduce omissions from manual verification. A drug buffer and a full-process identification and traceability structure integrated with inventory scheduling logic are included to achieve orderly temporary storage of uncollected drugs and orderly release of dispensing stations, ensuring the smooth operation of the dispensing process. Continuous and stable operation improves the overall efficiency and medication safety of the pharmacy dispensing department. By combining dual dispensing sub-windows with a robotic arm dual-station time-sharing scheduling logic and a drug preparation cache intelligent scheduling mechanism, dispensing throughput is enhanced. Simultaneously, the entire process of prescription usage and dosage verification is automated. Prescriptions with incorrect usage or dosage are pre-marked and patients are prompted to consult a human agent during dispensing. A closed-loop processing system for failed prescription verification is also established, relying on a two-level verification link to identify erroneous drugs. Through binding tags, targeted recycling and disposal, and simultaneous guidance to the corresponding patient at the human agent window, coupled with full-process drug traceability, tray surplus verification, and overdue drug management mechanisms, the system comprehensively ensures dispensing accuracy, medication safety, and standardized pharmacy operations.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a medication dispensing system for a hospital pharmacy dispensing department, comprising a robotic arm medication dispensing execution module, a dual-dispensing sub-window unit, a medication preparation cache unit, a verification and validation unit, a host control unit, and an interactive interface unit; The dual-firing sub-window unit includes a first firing sub-window and a second firing sub-window, and each firing sub-window is equipped with a second-level weighing tray. The robotic arm dispensing module is configured to connect with the drug transfer tasks of two dispensing sub-windows through a dual-station time-sharing scheduling logic, and switch between the drug preparation transfer, dispensing, and tray reset processes in the two sub-windows. The drug preparation cache unit includes a drug preparation module and a drug buffer. The drug preparation module connects to the backend dispensing equipment to complete the drug dispensing. The drug buffer is connected to the inventory storage algorithm to perform temporary storage management and task queue scheduling on the set of unretrieved drugs that have been verified. The verification unit includes a weight verification module, a visual verification module, and a drug verification algorithm module. A two-level verification chain is constructed: the first-level weighing tray, in conjunction with the visual verification module and the drug verification algorithm module, verifies the accuracy of the dispensing equipment; the second-level weighing tray determines the patient's medication collection process and the medication collection result. The upper-level control unit is connected to the queuing system, HIS system and back-end automatic dispensing equipment to realize the synchronization of check-in messages, window allocation, dispensing queue management, queuing display and prescription status update. The system is also equipped with a pallet waste visual verification unit and an RFID identification unit. The pallet waste visual verification unit performs residual debris detection in the pallet before the empty pallet is returned to its place. The RFID identification unit binds the drug collection and corresponding prescription information to realize the traceability and differentiation of drugs throughout the entire process.

[0006] This system adopts an architecture with dual dispensing sub-windows and unified scheduling of robotic arms, replacing the traditional deployment mode of independent single-window transfer. Through time-sharing scheduling logic, it fully taps the operational potential of the equipment, reduces idle time, and effectively improves the overall dispensing throughput capacity of the system. The two-level verification link complements each other from the two dimensions of total quantity verification and detailed verification, meeting the management requirements of double verification for prescription dispensing and improving the accuracy of dispensing. The drug preparation cache unit realizes the standardized temporary storage of uncollected drugs and dynamic release of workstations through algorithmic scheduling, ensuring the continuous and orderly dispensing process. The supporting tray verification and full-process traceability mechanism further improves the quality control of the entire process, and solves the shortcomings of existing technologies from multiple dimensions such as dispensing efficiency, verification reliability, anomaly handling, and process control.

[0007] Furthermore, the upper-level control unit has a built-in medication queue management module. This module receives the medication queue and patient prescription information allocated by the HIS system. Based on the system's built-in medication usage and dosage verification program, if a patient's prescription in the medication queue has abnormal usage or dosage, the system pushes the prescription to a human pharmacist for review. If the review is successful, the system continues to execute the subsequent process; if the review fails, the system marks the usage or dosage as incorrect and prompts the patient to consult a human pharmacist for a solution during the execution of the sub-window medication dispensing task.

[0008] Embedding prescription usage and dosage verification into the medication dispensing queue management process is a proactive measure for medication safety control. Compliance screening is completed before prescriptions enter the dispensing stage, which can intercept prescriptions with medication risks in advance and prevent unreasonable prescriptions from interfering with the normal medication dispensing order after entering the automated medication dispensing process. During the medication dispensing process, patients with abnormal prescriptions are proactively notified and guided to the manual window, which not only protects the patient's right to know, but also realizes the diversion and handling of risky prescriptions, thus strengthening medication safety control while maintaining the efficiency of automated medication dispensing.

[0009] Furthermore, the medication preparation cache unit also includes a timeout processing module. The timeout processing module is connected to the inventory storage algorithm. When a patient whose number has been called does not arrive at the medication window and the timeout for scanning the code to check in for medication expires, the corresponding medication set in the buffer is automatically marked as not picked up and transferred to the inventory temporary storage queue. At the same time, the corresponding prescription is updated to the not picked up status through the HIS system, and the current buffer workstation is released for subsequent medication preparation tasks.

[0010] The timeout handling module works in conjunction with the inventory storage algorithm to automate the status flow and workstation retrieval of overdue medications. This eliminates the need for manual sorting of temporarily stored medications, preventing overdue medications from occupying cache workstation resources for extended periods. It ensures the orderly continuation of subsequent medication preparation tasks, effectively maintains the continuity and stability of the entire medication dispensing process, and reduces the workload and risk of oversight in manual management.

[0011] Furthermore, in the two-level verification link of the verification unit, the first-level weighing tray collects the total weight data of the medicine after dispensing, and performs weight matching verification by combining the single-item weight database in the medicine verification algorithm with the prescription drug list. The visual inspection module simultaneously collects the appearance and packaging label information of the medicine, and performs a second comparison verification with the prescription drug information. Only after the double verification is passed can the medicine be temporarily stored in the buffer.

[0012] The first-level verification adopts a dual verification mode that combines weight matching and visual comparison. Weight verification can quickly complete the overall total quantity verification of the drug set, with high verification efficiency. Visual verification can supplement the identification of drug appearance, packaging labels, specification details, and other issues that weight verification cannot cover. The two technologies complement each other, which not only makes up for the reliability shortcomings of a single verification dimension, but also avoids the problem of low efficiency of pure box-by-box visual verification. The mechanism of passing dual verification complies with the management specifications of prescription dispensing and issuance dual verification, effectively improving the comprehensiveness and reliability of medication verification.

[0013] Furthermore, in the two-level verification link of the verification unit, the first-level weighing tray collects the total weight data of the medicine after dispensing, and performs weight matching verification by combining the single-item weight database in the medicine verification algorithm with the prescription drug list. The visual verification module simultaneously collects the appearance and packaging label information of the medicine and performs a second comparison verification with the prescription drug information. If the double verification fails, the system marks the corresponding prescription information as a dispensing error and prompts the patient to consult the manual window for a solution during the dispensing task in the sub-window. At the same time, the medicine is poured into the recycling area and the tray is returned to its place.

[0014] A complete closed-loop processing chain is constructed for prescriptions that fail verification. By binding identifiers, erroneous prescriptions are given unique identification marks to avoid confusion with normally stored prescriptions. Simultaneously, the abnormal status is marked in the system and the prescriptions are transferred to the recycling area for disposal, which can effectively prevent erroneous prescriptions from entering the normal dispensing process. The corresponding patient-side prompting and guidance mechanism can proactively inform the corresponding patient of the abnormality when picking up the prescription and guide them to the manual window for processing, avoiding unnecessary waiting for the patient. At the same time, it can realize full-chain traceability of error events, which facilitates subsequent error statistics and process optimization.

[0015] Furthermore, each sub-window of the dual-dispensing sub-window unit is equipped with a QR code scanning interaction module, a voice broadcast module, and a printing device. The QR code scanning interaction module is used to read the patient's medical record number to complete the check-in and prescription confirmation at the dispensing sub-window. The voice broadcast module simultaneously pushes voice information such as medication pickup prompts, prescription verification, and medication instructions, and simultaneously displays the electronic prescription information for the patient to verify. The printing device is used to print the patient's medication instruction sheet.

[0016] The sub-window is equipped with a self-service interactive module, which enables patients to check in and confirm their prescription identity, reducing the workload of manual window verification and improving the processing efficiency of the medication collection process. The combination of voice broadcast and electronic information display can simultaneously complete medication collection guidance, prescription verification and medication notification, improve the information transparency of the medication collection process, protect patients' right to know about medication, and optimize the medication collection experience. The printing device can simultaneously print the patient's medication instruction sheet.

[0017] Based on the aforementioned hospital pharmacy dispensing system, this invention also provides a method for obtaining medication from a hospital pharmacy dispensing department, comprising the following steps: S1 Check-in Queue and Prescription Pre-verification: After a patient scans the code to check in at the check-in machine in the medication area, the check-in message is synchronized to the HIS system, a medication window is assigned, and the patient is added to the corresponding medication queue; the medication queue management module built into the upper control unit receives the medication queue assigned by the HIS system and the patient's medication prescription information, and verifies the prescription based on the built-in medication usage and dosage verification program. For patients whose medication prescriptions have errors after confirmation due to abnormal usage and dosage, the medication usage and dosage errors are marked in the system. S2 Pre-dispensing and Level 1 Verification: The upper control unit issues dispensing instructions to the backend automated dispensing equipment based on the dispensing queue. The dispensed medication set is transferred to the first-level weighing tray for dual Level 1 verification: the total weight of the medication after dispensing is collected, and a weight matching verification is performed by combining the individual weight database within the medication verification algorithm with the prescription drug list; the visual verification module simultaneously collects the appearance and packaging label information of the medication and performs a secondary comparison verification with the prescription drug information; after the dual verification passes, the medication set is transferred to the medication buffer for temporary storage; if the dual verification fails, the system marks the corresponding prescription information as a dispensing error. The first-level verification link of this invention can also be adapted to scenarios where the back-end automated dispensing equipment has a built-in verification module. If the back-end automated dispensing equipment is equipped with a first-level pre-verification such as drug barcode recognition and location recognition, then the first-level verification link of this system can select only one of the weighing verification module or the visual verification module as the second-level verification method. The prescription dispensing double verification requirement is completed by combining the first-level built-in verification of the front-end equipment with the first-level single-type verification of this system. This implementation method can also achieve medication error interception, simplify hardware configuration, adapt to low-cost transformation scenarios, and still fall within the two-level verification control logic framework of this invention. S3 Calling System and Medication Dispensing: The upper control unit synchronously calls numbers to the calling system according to the order of the temporarily stored medications in the medication buffer. The called patient scans the code to sign in and confirms the prescription at the dispensing sub-window. If the prescription is marked as incorrect in usage or dosage or incorrect in dispensing, the system prompts the patient to consult a human window for a solution during this dispensing task. The robotic arm retrieves the corresponding medication set from the medication buffer and transfers it to the second-level weighing tray at the sub-window, monitoring weight changes in real time to determine the patient's medication dispensing progress. S4 Tray Reset and Verification: After the patient completes medication collection, the robotic arm moves the empty tray to the tray residue vision verification unit to perform residue detection. If no abnormalities are found, the tray is returned to its original position and released from the corresponding buffer station.

[0018] This method automates the entire process of check-in queuing, medication verification, dispensing by number, and tray reset. It works in tandem with the functional units of the aforementioned system, forming a complete closed loop for prescription distribution, medication verification, dispensing determination, and tray verification. The process follows the logic of "verification before storage and dispensing by number," which can effectively intercept medication errors and ensure dispensing accuracy. At the same time, it improves dispensing efficiency through automated transfer and intelligent scheduling, fully adapting to the automated dispensing needs of hospital pharmacy dispensing departments and addressing various problems in existing technologies, such as low efficiency, weak verification, chaotic management, and numerous errors.

[0019] Furthermore, in step S2, the robotic arm adopts a dual-station time-sharing scheduling mode to execute the task of the current medication dispensing window. When the first medication dispensing sub-window is in the patient medication waiting or second-level verification stage, the robotic arm automatically switches to the second medication dispensing sub-window to execute the call number display and buffer drug collection and transfer, and promotes the medication dispensing process of the two windows in parallel. In step S2, the robotic arm uses a dual-station time-sharing scheduling mode to execute the task of the current medication dispensing window. When both medication dispensing sub-windows are in the patient medication waiting or second-level verification stage, the robotic arm automatically starts the preparation process for the next prescription in the medication dispensing queue. Step S2 also includes a buffer temporary storage management sub-step: After the drug collection is verified and enters the buffer, the system records the prescription information and storage location corresponding to the drug collection through the inventory storage algorithm. If the corresponding patient does not come to the pharmacy window to scan the code and sign in to pick up the medicine within the preset time, the system automatically transfers the drug collection to the inventory temporary storage queue, updates the prescription status of the HIS system synchronously, and releases the buffer workstation to undertake new drug preparation tasks.

[0020] The dual-station time-sharing scheduling mode can dynamically allocate the execution resources of the robotic arm according to the real-time task status of the two sub-windows. When the window is in a stage where no robotic arm operation is required, such as waiting or verification, it can automatically switch to the dispensing task of other windows or a new preparation task, making full use of the idle time of the equipment and avoiding the idle waiting of the back-end automatic dispensing equipment and robotic arm, effectively improving the equipment utilization rate and the overall dispensing efficiency of the system. The buffer temporary storage management sub-step realizes the systematic and algorithmic control of temporarily stored medicines. Expired medicines can automatically complete the status transition and release at the workstation, ensuring the efficient reuse of cached resources and maintaining the continuous and orderly dispensing process.

[0021] Furthermore, in step S3, the specific process of determining the medication retrieval result by the second-level weighing tray is as follows: the second-level weighing tray collects tray weight data in real time. When the weight drops to the preset empty tray threshold and remains stable for a certain period of time, it is determined that the patient has completed medication retrieval. If the weight change value deviates from the total weight of the prescription drugs beyond the preset range, and the tray weight does not change within a certain period of time after the system repeats the voice prompt, the system performs a visual verification of the remaining materials and returns the tray to its original position.

[0022] The automatic determination of the patient's medication dispensing progress and results by measuring the weight changes of the second-level weighing tray is an automated, non-contact determination method that replaces the traditional manual verification mode. It can monitor the medication dispensing status in real time, reducing the omissions and workload of manual verification. A review mechanism is set up for cases of abnormal weight, which can promptly identify abnormal medication dispensing events, ensure the accuracy of medication dispensing results, and retain abnormal records for subsequent traceability and verification.

[0023] Furthermore, each drug collection is bound to a unique RFID tag throughout the entire process. The tag contains the corresponding prescription number, drug collection details, and circulation node information. RFID information is read and verified at each node of drug dispensing, verification, temporary storage, and dispensing to complete the matching of information across the entire drug collection and the differentiation of individual drugs.

[0024] The end-to-end RFID binding and node verification mechanism assigns a unique and traceable identity to each collection of medicines. It automatically completes the information matching and verification between medicines and prescriptions at each circulation node, which can effectively avoid confusion and misdispensing of different prescription medicines. At the same time, it fully records the entire circulation path of medicines, realizes the traceability of medicines throughout the entire chain, and improves the control standardization and error tracing efficiency of the dispensing process.

[0025] Compared with the prior art, the present invention provides a medication dispensing system and method for hospital pharmacy dispensing departments, which has the following beneficial effects: Compared with the existing deployment method of delivering medicines one by one through a single window and a single conveyor belt, this invention adopts a structure in which a single robotic arm connects to two dispensing sub-windows. Through dual-station time-sharing scheduling logic, the operation is switched between the drug preparation and transfer, dispensing, and tray reset processes in the two sub-windows. This can make full use of the gap time between the verification and temporary storage of a single sub-window to perform the operation of the other sub-window, effectively improving the workstation utilization rate of the robotic arm, improving the reliability of drug dispensing verification, and ensuring the dispensing efficiency of the pharmaceutical dispensing department and the safety of clinical medication.

[0026] Compared with the existing methods of manual drug verification, manual confirmation of drug dispensing, and manual temporary storage management, this invention constructs a two-level verification link. The first-level weighing tray, combined with a visual inspection module and a drug verification algorithm module, completes the verification of the accuracy of drug dispensing. The second-level weighing tray realizes the automatic determination of the patient's drug dispensing process and results, forming a multi-dimensional drug dispensing-dispensing verification system, making up for the limitations of manual drug verification and improving the accuracy of drug dispensing. This invention also achieves pre-emptive and automated verification of prescription usage and dosage, strengthening the ability to control clinical medication safety. The invention incorporates a medication usage and dosage verification program into the dispensing queue management module of the upper-level control unit, embedding prescription usage and dosage verification into the queue management stage before dispensing. It can automatically screen prescription compliance from multiple dimensions, including dosage, frequency, rationality of treatment course, and interactions of combined medications. For prescriptions with abnormal usage and dosage that are confirmed as incorrect, the system pre-marks and intercepts their automatic dispensing path. When the patient arrives at the dispensing sub-window to collect their medication, the system proactively prompts the patient to consult a human window for assistance during the dispensing task. This shifts the medication safety control point from the dispensing verification stage to the prescription queuing stage, blocking the risk of dispensing unreasonable prescriptions at the source, further ensuring patient medication safety, and compensating for the shortcomings of existing automated dispensing systems that lack pre-emptive medication safety control. The accompanying drug buffer zone incorporates an inventory storage algorithm to enable the orderly temporary storage and task scheduling of unclaimed drugs, preventing long-term occupation of workstations. In conjunction with RFID identification units that bind drug collections and prescription information, it achieves full-process traceability and differentiation of drugs. At the same time, the pallet residual material visual verification unit can detect residual debris before the pallet is returned to its place, ensuring the stable operation of the subsequent drug dispensing process. Attached Figure Description

[0027] Figure 1 This is a system architecture diagram of a medication dispensing system and method for a hospital pharmacy dispensing department according to the present invention; Figure 2 This is a flowchart illustrating the steps of a medication dispensing system and method for a hospital pharmacy dispensing department according to the present invention. Detailed Implementation

[0028] Please see Figure 1-2This invention provides a technical solution: a medication dispensing system and method for hospital pharmacy dispensing departments. It can be applied to front-end medication dispensing scenarios in hospital pharmacy dispensing departments. Through a single robotic arm docking with a dual-window structure and a two-level verification control logic, it achieves unattended automated medication dispensing. The specific implementation methods of this invention are described in detail below, combining the overall system architecture and operation flow.

[0029] This system comprises a robotic arm dispensing module, a dual-dispensing sub-window unit, a medication preparation cache unit, a verification and validation unit, a higher-level control unit, an interactive interface unit, a tray surplus visual verification unit, and an RFID tagging unit. Each unit achieves unified command scheduling and data interaction through the higher-level control unit. The system is deployed in the front-end dispensing area of ​​the pharmacy department, and interfaces with the hospital's existing HIS system, queuing system, and automated dispensing equipment at the back end. It provides self-service medication retrieval for patients, eliminating the need for manual intervention in medication transfer, verification, and distribution throughout the entire process.

[0030] The robotic arm dispensing module, as the core execution mechanism for drug transfer, utilizes a multi-joint industrial robotic arm with multi-degree-of-freedom motion capabilities. It covers the entire operational area, including the drug preparation area, two dispensing sub-windows, the drug buffer zone, and the pallet verification station. The robotic arm's end effector is equipped with a dedicated pallet gripping mechanism. This mechanism is adapted to the dimensions of standard weighing pallets and uses a two-sided gripping method to secure the pallet. During gripping, it only contacts the side areas of the pallet, avoiding contact with the drugs inside. This ensures the stability of the drugs' position during transfer, preventing tipping or displacement that could affect the accuracy of subsequent weighing and verification. The robotic arm communicates with the upper-level control unit via a motion control interface, receiving transfer commands from the upper-level control unit and completing the transfer of the pallet between different workstations according to a preset motion path. Simultaneously, it provides real-time feedback to the upper-level control unit on its motion status and workstation position information. The robotic arm's motion control logic incorporates a dual-station time-sharing scheduling algorithm. This algorithm dynamically adjusts the robotic arm's work sequence and path planning based on the task status and process nodes of the two sub-windows. It automatically switches to the transfer operation of the other sub-window during the waiting process of one sub-window, achieving full-process operation coverage of both sub-windows with a single robotic arm without manual intervention. The dual-station time-sharing scheduling logic decomposes the time sequence of each process in the entire medication dispensing process. Processes that do not require continuous robotic arm operation, such as drug verification, buffer storage, and waiting for patients to pick up their medication, are marked as waiting periods. Tasks such as medication preparation and transfer, and tray transfer from the other sub-window are inserted into these waiting periods. Through task priority determination and path optimization, it ensures that the work processes of the two sub-windows do not interfere with each other and are smoothly connected, maximizing the effective working time of the robotic arm and avoiding idle equipment.

[0031] The dual-dispensing sub-window unit comprises a first dispensing sub-window and a second dispensing sub-window, positioned side-by-side in the medication collection area at the front of the pharmacy dispensing department. Each window has an identical structure, including a corresponding second-level weighing tray. The window body uses a safety glass partition to separate the internal work area of ​​the pharmacy dispensing department from the external patient medication collection area. A controllable dispensing port is located in the center of the window, its opening and closing controlled by a higher-level control unit. It is only opened during the dispensing phase and remains closed at other times to ensure operational safety within the pharmacy dispensing department. A tray support platform is located inside the dispensing port, and the second-level weighing tray is embedded within this platform. A weighing sensor is installed below the platform, collecting real-time data on the total weight of the tray and the medications within it, and uploading this data to the verification unit. The second-level weighing tray primarily holds the dispensed medications and monitors weight changes in real-time during patient medication collection to determine the progress and outcome of the patient's medication collection. Each medication dispensing window has a primary weighing tray located in the preparation area within the pharmacy dispensing department, near the dispensing position of the automated dispensing equipment. This tray receives prescription medications dispensed by the automated equipment and completes the first-level weight verification process. Each dispensing sub-window is also equipped with a barcode scanning module, a voice broadcast module, and a printing device. The barcode scanning module is located in the patient operation area outside the window. It uses a barcode and QR code compatible scanner to read barcodes on the patient's medical record or QR codes on the electronic medical record, allowing the patient to sign in at the dispensing sub-window and confirm their prescription. The voice broadcast module is integrated into the upper outer part of the window and works in conjunction with the upper control unit. It plays corresponding voice messages at key points such as call reminders, medication guidance, verification result prompts, and medication instructions, guiding patients through the medication dispensing process. An electronic display area is also located outside the window, simultaneously displaying the current call number, the corresponding prescription medication details, and medication dispensing precautions, allowing patients to verify their prescription information and improving transparency. The printing device can simultaneously print the patient's medication instruction sheet.

[0032] The medication preparation and buffer unit includes a medication preparation module and a medication buffer. The medication preparation module interfaces with the backend automated dispensing equipment, serving as the connecting mechanism between backend medication preparation and frontend dispensing. The medication preparation module includes a dispensing connection mechanism that can receive a single prescription medication set from the automated dispensing equipment and smoothly transfer the medication set to the first-level weighing tray at the corresponding dispensing window, completing the connection between the dispensing and verification station. The medication buffer is located in the transition area between the medication preparation area and the dispensing sub-window, serving as an intermediate temporary storage node between the medication preparation and dispensing processes. The buffer has several independent temporary storage stations, each corresponding to the storage location of a standard tray. Each station is equipped with a position detection sensor to detect whether the tray is placed correctly and uploads the position signal to the upper control unit. Each temporary storage station has a unique station identifier, corresponding one-to-one with the storage address in the inventory storage algorithm, enabling precise positioning and scheduling of the medication set's temporary storage location. The medication buffer is connected to the inventory storage algorithm, which runs within the upper control unit, performing unified temporary storage management and task queue scheduling for all medication sets entering the buffer. The inventory storage algorithm records information such as the prescription number, workstation number, storage time, and preset timeout time for each temporarily stored drug set. It sorts and manages the temporarily stored drugs according to the first-in, first-out (FIFO) principle. Simultaneously, based on the trigger command for a retrieval task, it schedules a robotic arm to retrieve the drugs from the corresponding workstation and transfer them to the dispensing sub-window. When a patient fails to sign in and confirm medication at the dispensing window in time, the inventory storage algorithm automatically determines if a timeout has occurred. It then transfers the expired prescription to a dedicated temporary storage area and releases the corresponding buffer workstation for subsequent drug preparation tasks, preventing individual expired tasks from occupying buffer workstations and affecting the overall dispensing queue's operation. The drug preparation buffer unit is also equipped with a timeout handling module. This module works in conjunction with the inventory storage algorithm, setting a unified threshold for drug retrieval waiting time. When the waiting time for a drug set in the buffer reaches this threshold, the timeout handling process is automatically triggered. In the timeout handling process, the system first marks the corresponding set of medicines as unretrieved and updates its storage status to temporary storage pending processing. Then, a robotic arm is dispatched to move the set of medicines to the temporary storage area. Simultaneously, a status update command is sent to the HIS system via the communication interface to update the status of the corresponding prescription to unretrieved, ensuring synchronization between the hospital information system and the front-end dispensing equipment. After completing the timeout handling, the system automatically releases the corresponding buffer station, marks it as available, and prepares it for subsequent medication tasks, ensuring the efficient reuse of the buffer station.

[0033] The verification unit comprises a weight verification module, a visual inspection module, and a drug verification algorithm module. These three modules work together to construct a two-level verification chain, corresponding to accuracy verification in the dispensing and medication dispensing stage and status determination in the patient medication collection stage, respectively. The weight verification module includes a high-precision weighing sensor, a signal acquisition circuit, and a data processing subunit. The first-level and second-level weighing trays are each equipped with independent weighing sensors and signal acquisition circuits, enabling real-time acquisition of weight data on the trays. The analog signals are converted to digital signals and uploaded to the data processing subunit, ultimately synchronizing with the upper-level control unit. The drug verification algorithm module has a built-in drug basic information database, storing basic parameters for all drugs in the pharmacy dispensing department, including standard weight of each item, allowable weight deviation range, packaging specifications, dosage form type, and appearance characteristics. Upon receiving prescription information, the drug verification algorithm automatically extracts all drug entries from the prescription, calculates the theoretical total weight of the prescription, and generates a weight verification interval based on the allowable deviation range for comparison with the measured weight.

[0034] The first-level verification link corresponds to the medication dispensing stage and is jointly completed by the first-level weighing tray, weight verification module, visual inspection module, and drug verification algorithm module. It is used to verify the accuracy of medication dispensing by the automated dispensing equipment. After the dispensed medication set is transferred to the first-level weighing tray, the weight verification module collects the actual total weight of the medication and compares it with the theoretical weight range generated by the drug verification algorithm. If the actual weight is within the theoretical range, the weight verification is considered successful; if it exceeds the deviation range, the weight verification is considered unsuccessful. The system marks the corresponding prescription information as a dispensing error, schedules the robotic arm to pour the medication into the recycling area, and moves the tray back to the initial standby station. Simultaneously with weight verification, the visual inspection module performs appearance verification. The visual inspection module includes an industrial camera, supplementary lighting, and an image recognition processing subunit. The industrial camera is mounted directly above the first-level weighing tray, and the supplementary lighting uses a diffused cold light source to avoid glare from the medication packaging affecting image acquisition quality. After image acquisition, the image recognition processing subunit preprocesses and extracts features from the image, identifying the appearance features of the drug packaging, such as shape, color, text markings, and specification markings. These features are then matched against the corresponding feature parameters in the drug basic information database. If the matching degree reaches a preset threshold, the visual verification is considered passed; otherwise, it is considered failed. Only after both weight and visual verifications pass can the drug proceed to the next process. This dual verification of weight and appearance effectively covers various dispensing error scenarios, such as incorrect drug quantity, incorrect drug specification, and damaged packaging, overcoming the limitations of a single weight verification dimension and improving the reliability of dispensing verification.

[0035] The second-level verification link corresponds to the patient's medication dispensing process. It is completed by a second-level weighing tray and a weight verification module, used to determine the patient's medication dispensing progress and result. After the medication is transferred to the second-level weighing tray, the weight verification module monitors the tray's weight data in real time. When the patient takes the medication, the tray weight will show a significant decrease. When the weight drops to a preset empty tray weight threshold and remains stable for a preset time, the system determines that the patient has completed medication dispensing. If the weight change deviates from the total weight of the prescription medication beyond a preset range, and the tray weight does not change within a certain period after repeated voice prompts from the system, the system performs a visual verification of remaining medication and returns the tray to its original position.

[0036] The upper-level control unit, serving as the core of the entire system, employs an industrial-grade control host with a built-in processor, storage module, and multiple communication interfaces. It carries all the system's scheduling logic, algorithm execution, and data interaction functions. The upper-level control unit establishes communication connections with the queuing system, HIS system, and backend automated dispensing equipment through interactive interface units. This enables synchronous reception of patient check-in messages, allocation of dispensing windows, management of dispensing queues, synchronous updates of prescription status, and issuance of medication preparation instructions. The interactive interface units include various types of communication interfaces, supporting multiple communication protocols such as hospital intranet communication, industrial bus communication, and serial communication. They are compatible with the interface standards of various existing hospital systems, achieving seamless system integration. The upper-level control unit runs a dispensing queue management module, which maintains the dispensing task queue at the dispensing windows. This task queue is arranged according to the order of patient check-in, and each task record includes complete information such as prescription number, patient identifier, medication preparation status, verification result, temporary storage location, and queuing status. The medication dispensing queue management module can obtain real-time information such as the current workstation status of the robotic arm, the task progress of the two sub-windows, and the workstation occupancy status of the buffer zone. Based on the task load of the medication retrieval window and the status of the robotic arm, it dynamically adjusts the medication preparation start sequence and medication dispensing execution order of the medication retrieval window. When the medication dispensing task of the current sub-window enters the stage of waiting for the patient to pick up the medication and the robotic arm is in an idle state, the medication dispensing queue management module automatically triggers the medication preparation instruction for the next prescription, scheduling the robotic arm to execute the medication preparation and transfer operation of the medication retrieval window. This enables the medication dispensing and preparation processes of the two sub-windows to run in parallel with off-peak times, further reducing the idle time of the robotic arm and improving the overall medication dispensing capacity of the two windows.

[0037] The pallet residue visual verification unit is located on the pallet return path and is specifically designed for detecting residual debris before empty pallets are returned to their original positions. This unit includes a verification station, an industrial inspection camera, and an image processing subunit. The verification station features a standard pallet positioning structure to ensure consistent placement of empty pallets. The industrial inspection camera is positioned directly above the verification station to capture panoramic images of the pallet's bottom surface. After a patient retrieves their medication, the robotic arm moves the empty pallet to the verification station. The image processing subunit performs foreign object detection on the captured pallet image, comparing the current pallet image with a standard empty pallet image using an image comparison algorithm to identify any remaining medication, packaging debris, or other debris. If residual foreign objects are detected, the system marks the entire medication set as abnormal and records the image. The robotic arm then removes the residue and returns the pallet to its original position. If no foreign objects are detected, the verification is considered successful, and the robotic arm moves the pallet back to its initial position to complete the return process. By verifying the remaining materials on the pallet, residual items from previous dispensing tasks can be prevented from being mixed into subsequent dispensing processes, ensuring the accuracy of each round of dispensing and the cleanliness of the pallets, and preventing residual debris from affecting the accuracy of subsequent weighing and verification.

[0038] The RFID identification unit is used to achieve end-to-end identification and traceability of drug collections. It includes RFID electronic tags, tag binding workstations, and multiple RFID readers. The tag binding workstation is located in the drug preparation area. After each prescription drug is dispensed, a unique RFID electronic tag is bound to that drug collection at the binding workstation. The tag contains identification information such as the corresponding prescription number, drug details, and dispensing time. The tag is affixed to the side of the drug tray or a designated location, without affecting the transfer and verification of the drug collection. RFID readers are installed at the first-level weighing tray station, each temporary storage station in the drug buffer zone, the second-level weighing tray station, and the tray verification station. When a drug-carrying tray passes through or stops at the corresponding station, the reader automatically reads the RFID tag information on the tray and uploads the read information to the upper control unit for comparison with the current station's prescription information. If the tag information matches the task information, the process is allowed to proceed to the next step; if they do not match, an alarm is triggered, the process is paused, and staff are prompted to check. By verifying information through RFID throughout the entire process, it is possible to effectively prevent confusion and misdispensing of medications to different patients. At the same time, it can fully record the flow time and status of medications at each workstation, forming a complete flow traceability chain. When abnormal problems occur, the corresponding problematic link can be quickly located, improving the precision and traceability of medication management.

[0039] The medication dispensing method implemented based on the aforementioned hospital pharmacy dispensing system is divided into four steps according to the process sequence: check-in and queuing, pre-dispensing and primary verification, number calling and dispensing, and tray reset and verification. The entire process is uniformly scheduled by the upper-level control unit, and each link is automatically connected. The specific implementation process is as follows: S1 Check-in Queuing and Prescription Pre-verification: Patients bring their medical card, electronic medical insurance voucher, or medication receipt to the check-in machine in the pharmacy lobby and scan the code to check in. The machine's scanning module reads the patient's unique identification information and synchronizes the check-in message to the HIS system via the hospital's local area network. The HIS system retrieves the corresponding valid prescription information based on the patient's identification, and, considering the current load of each dispensing window, assigns the patient to a dispensing window, adds the patient to the corresponding window's dispensing queue, and synchronizes prescription details, patient information, queue number, and other data to the upper control unit. Upon receiving the prescription information, the upper control unit's dispensing queue management module immediately initiates the drug usage and dosage verification program, sequentially verifying the dosage, frequency, course of treatment, and drug interactions from five dimensions. The system performs verification on prescriptions. For prescriptions that pass all verifications, their original order in the dispensing queue is maintained, awaiting subsequent dispensing. For prescriptions with any abnormal dosage or usage, the system pushes the prescription to a human pharmacist for review. If the review is successful, the system continues with the subsequent process. If the review fails, the system marks the prescription with a dosage / usage error tag in the database, records the specific error type and details, and marks the prescription as requiring manual intervention, suspending its automatic dispensing process. The upper-level control unit monitors the occupancy status of the two dispensing sub-windows in real time. Subsequently, based on the availability of the sub-windows, patients will be dynamically assigned to the corresponding available sub-windows to collect their medication according to the queue order. When both sub-windows are occupied, the dispensing and caching process for the next prescription in the dispensing queue will be initiated.

[0040] S2 Pre-dispensing and First-Level Verification: The upper-level control unit sends dispensing instructions to the back-end automated dispensing equipment in sequence according to the dispensing queue. These instructions include core information such as prescription number, drug details, and drug quantity. Upon receiving the dispensing instructions, the back-end automated dispensing equipment accurately retrieves the corresponding specifications and quantities of drugs from its internal pharmacy. After dispensing, the drugs are transported to a standard drug tray via the preparation module's conveyor line. Once the tray reaches the verification station of the first-level weighing tray, the photoelectric sensor triggers the verification start signal, simultaneously initiating the first-level weighing verification and visual inspection. Weight verification process... The first-level weighing pallet continuously collects 10 sets of weight data. After moving average filtering, the measured total weight is obtained. The drug verification algorithm module retrieves the single-item weight database to calculate the theoretical total weight of the prescription, compares the deviation rate, and compares it with the ±3% pass threshold to output the weight verification result. In the visual verification stage, an industrial camera captures images of the drugs in the pallet, which undergo image preprocessing, drug instance segmentation, and OCR character recognition in sequence. The images are then compared with the prescription list one by one to output the visual verification result. When both verifications pass, the first-level verification is deemed successful, and the workstation allocation sub-algorithm of the inventory storage algorithm allocates the most suitable drug. In the idle buffer station, the robotic arm's dispensing module receives a temporary storage instruction, picks up the tray, and moves it to the corresponding buffer station. After the station's arrival sensor provides a signal, the system records the temporary storage time of the medicine, the station number, and the correspondence with the prescription, completing the buffer storage. If any verification fails, the first-level verification is deemed a failure, the system marks the prescription as incorrect, the robotic arm moves the medicine to the recycling area to empty it, the empty tray is reset, and an error record is generated and synchronized to the pharmacy management terminal. The prescription is then transferred to the manual window for processing. Throughout the entire medicine preparation and verification process, the robotic arm operates in a dual-station time-sharing scheduling mode. When the first dispensing sub-window is in the patient medication waiting stage or the second-level weighing and verification stage, and there are no high-priority dispensing tasks, the scheduling system automatically switches the robotic arm to the second dispensing sub-window to perform the medication preparation and transfer or medication delivery tasks in the second sub-window. When both dispensing sub-windows are in the patient medication waiting stage or the second-level verification stage, and there are no high-priority tasks, the robotic arm automatically starts the dispensing and caching process for the next prescription in the dispensing queue, making full use of the robotic arm's idle time and improving the overall dispensing efficiency. When switching tasks, the robotic arm first moves to a safe waiting position to avoid path conflicts and medication spillage.

[0041] As a simplified implementation, when the backend automated dispensing equipment integrates pre-verification such as barcode scanning verification and location matching verification, the first-level verification process can perform only a single weight matching verification or only a single visual appearance comparison verification. Relying on the pre-verification of the backend automated dispensing equipment and the first-level single-dimensional verification of this system to form a dual-verification link, there is no need to simultaneously start two sets of verifications for weight and vision. This simplified implementation still relies on the core architecture of this invention, such as dual-station robotic arm scheduling, buffer inventory algorithm, second-level drug dispensing weighing judgment, and RFID full-process traceability, and can adapt to the low-cost upgrade needs of existing pharmacies.

[0042] S3 Calling System and Medication Dispensing: The upper-level control unit scans the temporarily stored medications in the medication buffer in real time, generates a calling sequence according to the order in which they were stored, and sends calling instructions to the calling system sequentially. Upon receiving the instructions, the calling system updates the patient's name, medication window number, and serial number on the integrated display screen in the dispensing hall, and simultaneously broadcasts the calls via the hall's public address system. The upper-level control unit monitors the medication collection status of patients at the two dispensing sub-windows under the current medication window. When a dispensing sub-window becomes idle, it dispatches the next patient to that idle sub-window according to the order of the unified dispensing queue. The patient whose number is called goes to the idle dispensing sub-window according to the prompts, scans their medical card or electronic voucher against the scanning module of the sub-window to complete prescription identity verification. The scanning module uploads the read patient identifier to the upper-level control unit, and the system matches the corresponding prescription information and verifies the prescription status. If the prescription has been marked as incorrect in usage, dosage, or dispensing, the system immediately announces this through the sub-window's voice broadcast module. An error message will alert the patient that their prescription is incorrect and they should consult a designated manual window for assistance. Simultaneously, the sub-window display will show a message indicating that the prescription will not be automatically dispensed. If the prescription is in good condition, the system will send a dispensing command to the robotic arm. The robotic arm will retrieve the prescription's medication tray from the corresponding station in the medication buffer and accurately transfer it to the second-level weighing tray in the sub-window. Once the tray is in place, the second-level weighing tray will weigh the medication to confirm correct dispensing. A voice prompt will then remind the patient to collect their medication. The sub-window display will simultaneously show and verbally announce the prescription details, dosage, and precautions for patient verification. A medication instruction sheet will also be printed simultaneously. During medication collection, the second-level weighing tray will monitor weight changes in real time, using the weight trend to determine progress. If the patient has not collected their medication within 30 seconds, the system will issue a reminder every 30 seconds. If there is still no weight change after two reminders, the system will perform a visual verification procedure and return the tray to its original position.

[0043] S4 Tray Reset and Verification: After the second-level weighing tray determines that the patient has taken medication, the system issues a tray reset command to the robotic arm. The robotic arm grabs the tray from the sub-window and moves it to the detection station of the tray residue visual verification unit according to the preset path. The tray residue visual verification unit starts the image acquisition and residue detection algorithm, compares the current tray image with the standard empty tray template, and detects whether there are any residual drug fragments, packaging paper scraps, or other debris in the tray. If no abnormality is detected, the robotic arm moves the tray to the initial reset station, and the tray enters the standby state, waiting for the next round of medication dispensing. The corresponding buffer station is released synchronously, the status is updated to idle, and it is added to the idle station pool for subsequent medication allocation. If residual debris is detected, the system marks the drug set as abnormal and records the image at the same time. The robotic arm is dispatched to move the tray to the recycling area to empty it. The empty tray is reset, and an abnormal record is generated and synchronized to the pharmacy management terminal. After the tray is returned to its original position, the upper control unit updates the status of the corresponding prescription to "medication taken" and synchronizes it to the HIS system through the HL7 interface, completing the state closed loop of the entire prescription medication dispensing process.

[0044] Throughout the entire process described above, RFID readers at each distribution node read the RFID tag information on the tray in real time and match and verify it with the system's prescription data. This ensures that the medication collection corresponds one-to-one with the prescription, enabling full-process traceability and individual differentiation. This effectively avoids errors such as mixed medications and incorrect dispensing, guaranteeing medication safety and accuracy. All preset parameters of the system, including medication dispensing timeout thresholds, weight verification deviation thresholds, visual detection sensitivity, robotic arm movement speed, and voice broadcast volume, can be configured and adjusted through the management interface of the upper-level control unit. This adapts to the usage scenarios of hospital pharmacy dispensing departments of different sizes and dispensing volumes, demonstrating strong versatility and scalability. The system also has a complete fault degradation mechanism. When a module malfunctions, it can automatically switch to a degradation mode. For example, if the weighing sensor fails, it can temporarily switch to a pure vision verification mode; if the vision module fails, it can switch to a pure weight verification mode; if the robotic arm fails, it can automatically pause the automatic dispensing process and switch to manual dispensing mode, while issuing a fault alarm to notify maintenance personnel to repair it in time, ensuring the continuity and stability of the dispensing business of the pharmacy dispensing department.

Claims

1. A medication dispensing system for a hospital pharmacy, characterized in that, It includes a robotic arm drug dispensing execution module, a dual-dispensing sub-window unit, a drug preparation cache unit, a verification and validation unit, a host control unit, and an interactive interface unit; The dual-firing sub-window unit includes a first firing sub-window and a second firing sub-window, and each firing sub-window is equipped with a second-level weighing tray. The robotic arm dispensing module is configured to connect with the drug transfer tasks of two dispensing sub-windows through a dual-station time-sharing scheduling logic, and switch between the drug preparation transfer, dispensing, and tray reset processes in the two sub-windows. The drug preparation cache unit includes a drug preparation module and a drug buffer. The drug preparation module connects to the backend dispensing equipment to complete the drug dispensing. The drug buffer is connected to the inventory storage algorithm to perform temporary storage management and task queue scheduling on the set of unretrieved drugs that have been verified. The verification unit includes a weight verification module, a visual verification module, and a drug verification algorithm module. A two-level verification chain is constructed: the first-level weighing tray, in conjunction with the visual verification module and the drug verification algorithm module, verifies the accuracy of the dispensing equipment; the second-level weighing tray determines the patient's medication collection process and the medication collection result. The upper-level control unit is connected to the queuing system, HIS system and back-end automatic dispensing equipment to realize the synchronization of check-in messages, window allocation, dispensing queue management, queuing display and prescription status update. The system is also equipped with a pallet waste visual verification unit and an RFID identification unit. The pallet waste visual verification unit performs residual debris detection in the pallet before the empty pallet is returned to its place. The RFID identification unit binds the drug collection and corresponding prescription information to realize the traceability and differentiation of drugs throughout the entire process.

2. The hospital pharmacy dispensing system according to claim 1, characterized in that, The upper-level control unit has a built-in medication queue management module. This module receives patient medication prescription information from the window assigned by the HIS system. Based on the system's built-in medication usage and dosage verification program, if a patient's medication prescription in the medication queue has abnormal usage or dosage, the system pushes the prescription to a manual pharmacist for review. If the review is successful, the system continues to execute the subsequent process; if the review fails, the system marks the usage or dosage as incorrect and prompts the patient to consult a manual pharmacist for a solution during the medication dispensing task in the sub-window.

3. The hospital pharmacy dispensing system according to claim 1, characterized in that, The medication preparation cache unit also includes a timeout processing module. The timeout processing module is connected to the inventory storage algorithm. When a patient whose number has been called does not arrive at the medication window and the timeout for scanning the code to check in for medication expires, the corresponding medication set in the buffer is automatically marked as not picked up and transferred to the inventory temporary storage queue. At the same time, the corresponding prescription is updated to the not picked up status through the HIS system, and the current buffer workstation is released for subsequent medication preparation tasks.

4. The hospital pharmacy dispensing system according to claim 1, characterized in that, In the two-level verification link of the verification unit, the first-level weighing tray collects the total weight data of the medicine after dispensing, and performs weight matching verification by combining the single-item weight database in the medicine verification algorithm with the prescription drug list. The visual inspection module simultaneously collects the appearance and packaging label information of the medicine, and performs a second comparison verification with the prescription drug information. Only after the double verification is passed can the medicine be temporarily stored in the buffer.

5. The hospital pharmacy dispensing system according to claim 1, characterized in that, In the two-level verification link of the verification unit, the first-level weighing tray collects the total weight data of the medicine after dispensing, and performs weight matching verification by combining the single-item weight database in the medicine verification algorithm with the prescription drug list. The visual verification module simultaneously collects the appearance and packaging label information of the medicine and performs a second comparison verification with the prescription drug information. If the double verification fails, the system will mark the corresponding prescription information as dispensing error and prompt the patient to consult the manual window for a solution during the dispensing task in the sub-window. At the same time, the medicine is poured into the recycling area and the tray is returned to its place.

6. The hospital pharmacy dispensing system according to claim 1, characterized in that, Each sub-window of the dual-dispensing sub-window unit is equipped with a QR code scanning interaction module, a voice broadcast module, and a printing device. The QR code scanning interaction module is used to read the patient's medical record number to complete the check-in and prescription confirmation at the dispensing sub-window. The voice broadcast module simultaneously pushes voice information such as medication collection prompts, prescription verification, and medication instructions, and simultaneously displays the electronic prescription information for the patient to verify. The printing device is used to print the patient's medication instruction sheet.

7. A method for obtaining medication from a hospital pharmacy dispensing department, implemented based on the hospital pharmacy dispensing department medication system described in claim 1, characterized in that, Includes the following steps: S1 Check-in Queue and Prescription Pre-verification: After a patient scans the code to check in at the check-in machine in the medication area, the check-in message is synchronized to the HIS system, a medication window is assigned, and the patient is added to the corresponding medication queue; the medication queue management module built into the upper control unit receives the medication queue assigned by the HIS system and the patient's medication prescription information, and verifies the prescription based on the built-in medication usage and dosage verification program. For patients whose medication prescriptions have errors in usage and dosage after confirmation, the medication usage and dosage errors are marked in the system. S2 Pre-dispensing and Level 1 Verification: The upper control unit issues dispensing instructions to the backend automated dispensing equipment based on the dispensing queue. The dispensed medication set is transferred to the first-level weighing tray for dual Level 1 verification: the total weight of the medication after dispensing is collected, and a weight matching verification is performed by combining the individual weight database within the medication verification algorithm with the prescription drug list; the visual verification module simultaneously collects the appearance and packaging label information of the medication and performs a secondary comparison verification with the prescription drug information; after the dual verification passes, the medication set is transferred to the medication buffer for temporary storage; if the dual verification fails, the system marks the corresponding prescription information as a dispensing error. S3 Calling System and Medication Dispensing: The upper control unit synchronously calls numbers to the calling system according to the order of the temporarily stored drugs in the drug buffer. The called patient goes to the dispensing sub-window to scan the code to sign in and confirm the prescription. If the prescription is marked as incorrect in usage or dosage or incorrect in dispensing, the system prompts the patient to consult the manual window for a solution during this dispensing task execution phase. The robotic arm retrieves the corresponding set of medicines from the medicine buffer and transfers it to the second-level weighing tray in the sub-window, monitoring weight changes in real time to determine the patient's medication retrieval progress. S4 Tray Reset and Verification: After the patient completes medication collection, the robotic arm moves the empty tray to the tray residue vision verification unit to perform residue detection. If no abnormalities are found, the tray is returned to its original position and released from the corresponding buffer station.

8. The method for obtaining medication from a hospital pharmacy dispensing department according to claim 7, characterized in that, In step S2, the robotic arm uses a dual-station time-sharing scheduling mode to execute the task of the current medication dispensing window. When the first medication dispensing sub-window is in the patient medication waiting or second-level verification stage, the robotic arm automatically switches to the second medication dispensing sub-window to execute the call number display and buffer drug collection and transfer, and promotes the medication dispensing process of the two windows in parallel. In step S2, the robotic arm uses a dual-station time-sharing scheduling mode to execute the task of the current medication dispensing window. When both medication dispensing sub-windows are in the patient medication waiting or second-level verification stage, the robotic arm automatically starts the preparation process for the next prescription in the medication dispensing queue. Step S2 also includes a buffer temporary storage management sub-step: After the drug collection is verified and enters the buffer, the system records the prescription information and storage location corresponding to the drug collection through the inventory storage algorithm. If the corresponding patient does not come to the pharmacy window to scan the code and sign in to pick up the medicine within the preset time, the system automatically transfers the drug collection to the inventory temporary storage queue, updates the prescription status of the HIS system synchronously, and releases the buffer workstation to undertake new drug preparation tasks.

9. The method for obtaining medication from a hospital pharmacy dispensing department according to claim 7, characterized in that, In step S3, the specific process of determining the medication retrieval result by the second-level weighing tray is as follows: The second-level weighing tray collects the tray weight data in real time. When the weight drops to the preset empty tray threshold and remains stable for a certain period of time, it is determined that the patient has completed medication retrieval. If the weight change value deviates from the total weight of the prescription drugs beyond the preset range, and the tray weight does not change within a certain period of time after the system repeats the voice prompt, the system performs a visual verification of the remaining materials and returns the tray to its original position.

10. The method for obtaining medication from a hospital pharmacy dispensing department according to claim 7, characterized in that, Throughout the entire process, each drug collection is bound to a unique RFID tag. The tag contains the corresponding prescription number, drug collection details, and circulation node information. RFID information is read and verified at each node of drug dispensing, verification, temporary storage, and dispensing to complete the matching of information across the entire drug collection and the differentiation of individual drugs.