A medicine expiration date intelligent early warning management and control system
Patent Information
- Application Number
- CN202610983954.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-10-09
AI Technical Summary
这种开环结构使得系统无法识别特定批次药品可能存在的异常降解模式,也无法根据历史用药数据动态调整同类型新入库药品的预警灵敏度
1.预测精度质的飞跃:通过引入温湿度、光照、震动等多维微环境传感器数据,并结合阿伦尼乌斯方程等化学动力学原理构建非线性衰减模型,本发明能够计算出药品当前的“真实”剩余有效期,而非纸面上的理论效期。这极大地降低了因存储环境波动导致的药品提前失效风险,同时也避免了因过度保守而造成的药品浪费。
Smart Images

Figure CN122887350A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pharmaceutical supply chain and medical logistics management technology, and specifically relates to an intelligent early warning and control system for drug expiration dates. Background Technology
[0002] In the existing drug distribution system, drugs, as a special commodity, are directly related to the safety and effectiveness of clinical use due to their expiration date management. However, in the process of realizing this invention, the inventors, through extensive field research and data analysis, discovered that the existing control model has many inherent defects that are difficult to overcome. These defects cannot be solved by simple program optimization, but are rooted in the data isolation and the lag in processing methods at the underlying logic level.
[0003] First, current technologies generally employ a linear countdown expiration date management method based on a single warehousing time. This method mechanically records the production date and expiration date of a drug, ignoring the environmental heterogeneity of drugs during actual storage. For example, drugs from the same batch may exhibit different rates of chemical degradation due to different storage locations (such as near ventilation openings or in dark places). Current technologies cannot capture the dynamic impact of such micro-environmental changes on the active ingredients of drugs, resulting in the so-called "expiration date" being merely a theoretical value rather than a "real-world" period reflecting the true quality of the drug. This disconnect between theory and practice easily leads to the risk of drugs being expired within their stated expiration date, or being mistakenly deemed unusable while still active due to excessive conservatism, resulting in a waste of medical resources.
[0004] Secondly, existing inventory turnover strategies mostly employ the static "First-In, First-Out" (FIFO) rule. The inventors found that this rule is inflexible when facing complex and ever-changing clinical needs. For example, when multiple batches of a drug coexist, FIFO only considers the order of entry, neglecting the matching relationship between the current remaining shelf life of each batch and the predicted release frequency. If one batch of drug entered the warehouse earlier but has ample remaining shelf life, while another batch entered later but is nearing its expiration date, a simple FIFO approach may lead to the latter being stockpiled for a long time until it expires. Furthermore, existing technologies lack differentiated consideration of the degradation characteristics of different dosage forms. For example, the stability of lyophilized powder injections and aqueous injections is drastically different in its sensitivity to environmental humidity, but existing technologies usually treat them all the same, failing to perform personalized shelf-life decay modeling based on drug attributes.
[0005] Secondly, existing early warning mechanisms largely rely on manual periodic inventory checks and threshold-triggered alarms. This approach suffers from significant delays. Manual inventory checks are not only time-consuming and labor-intensive but also prone to data entry errors due to human error. Threshold alarms (such as setting alarms for expiration dates less than 30 days) often only respond passively when problems are about to occur or have already occurred, lacking proactive intervention capabilities. More importantly, current technology cannot link expiration risk with replenishment decisions. When the system detects an impending shortage of a certain drug, it often ignores the expiration status of that batch and blindly replenishes stock, resulting in a mix of new and old drugs, further exacerbating the chaos in expiration date management. Furthermore, existing data presentation methods are mostly simple list displays, failing to intuitively reflect the expiration date distribution across different areas and shelves within the warehouse, making it difficult for managers to grasp the overall health of the inventory from a macro perspective.
[0006] Finally, existing drug control systems typically operate in isolation, failing to establish a closed-loop feedback system with hospital information systems (HIS), laboratory information systems (LIS), and patient medication terminals. Once a drug leaves the warehouse, information such as its therapeutic effects and adverse events in patients cannot be fed back into the expiration date management system to revise the drug quality assessment model. This open-loop structure prevents the system from identifying potential abnormal degradation patterns in specific batches of drugs and from dynamically adjusting the alert sensitivity for newly added drugs of the same type based on historical medication data.
[0007] In summary, existing technologies, limited by linear models, static rules, delayed early warning, and open-loop structures, cannot solve the problem of precise dynamic expiration control of drugs throughout their entire life cycle. Therefore, there is an urgent need for an intelligent early warning and control system that can integrate multi-dimensional environmental data, combine nonlinear decay prediction, and enable proactive intervention to address these deeply rooted technical challenges. Summary of the Invention
[0008] In view of this, the present invention provides an intelligent early warning and control system for drug expiration dates, in order to solve or alleviate one of the technical problems existing in the prior art, and at least provide a beneficial alternative.
[0009] The technical solution of this invention is implemented as follows: A drug expiration date intelligent early warning and control system, comprising: The multi-source heterogeneous data acquisition module is configured to capture in real time the static attribute dataset, dynamic flow trajectory dataset, and micro-environment perception dataset of drugs during their storage period; The microenvironment sensing dataset includes at least time-series data of temperature, relative humidity, light intensity, and mechanical vibration frequency, and the microenvironment sensing dataset is spatially mapped and bound to the physical storage location identifier of the medicine. The multi-source heterogeneous data acquisition module also integrates specialized sensing data acquisition logic for oral medications that have been repackaged in smaller quantities. It specifically collects data on the repackaging time, repackaging equipment number, drug appearance and color characteristics, and storage environment parameters for oral medications repackaged in smaller quantities and stored in pharmacy packaging machines, providing data support for short-term management and deterioration identification. The system implements tiered expiration date management rules for oral medications repackaged in smaller quantities: For remaining bulk medications after repackaging from a full bottle and stored in the pharmacy packaging machine, the expiration date is automatically locked at 6 months from the date of repackaging, and must not exceed the legal expiration date of the original outer packaging. For oral medications repackaged in smaller quantities and distributed to patients, the short-term expiration date standard is strictly enforced. Simultaneously, the system collects real-time image data of the medications, capturing changes in color depth, abnormal color, discoloration, and other appearance deterioration characteristics as criteria for determining expiration and quality deterioration.
[0010] The shelf-life decay modeling module is communicatively connected to the multi-source heterogeneous data acquisition module. It is configured to parse the static attribute dataset to obtain the physicochemical properties of the drug, and combine it with the micro-environment perception dataset to construct a nonlinear remaining shelf-life prediction function by introducing an environmental stress factor, and output the dynamic predicted failure timestamp of each independent drug packaging unit. The nonlinear remaining shelf life prediction function is based on chemical kinetic equations and continuously integrates and corrects the baseline decay rate according to real-time collected microenvironment data, rather than performing a linear countdown based on a fixed expiration date. Specifically, for oral medications that are repackaged in smaller quantities, the nonlinear remaining shelf life prediction function is equipped with a correction coefficient specifically for repackaging. Taking the repackaging time as the starting node, it forcibly constrains the maximum effective period of repackaged medications to be 6 months, and matches the corresponding short-term threshold to the repackaged medications at the patient end. At the same time, it incorporates the abnormal color change characteristics of the medication into the decay rate correction factor. When the color deterioration of the medication is detected, it automatically accelerates the calculation of shelf life decay and provides an early warning timestamp for expiration. The dynamic weight allocation module is communicatively connected to the shelf-life decay modeling module and is configured to receive the dynamically predicted failure timestamp and perform multi-objective fusion calculations with the drug's inventory level, historical outbound frequency, and clinical demand urgency to generate a turnover priority weight vector characterizing the urgency of drug outbound. The turnover priority weight vector is used to break the traditional first-in-first-out constraint and realize adaptive inventory scheduling based on expiration date risk. For oral medications sold in smaller quantities, the dynamic weight allocation module prioritizes the turnover of medications that are nearing their 6-month expiration date or have shown slight color changes. It also prioritizes the dispatch and clearance of high-risk medications sold in smaller quantities to prevent them from being stored beyond their expiration date or from deteriorating. The graded early warning and intervention module is communicatively connected to the dynamic weight allocation module and is configured to set an early warning boundary system containing multiple elastic thresholds. Based on the threshold range where the turnover priority weight vector is located, it triggers early warning signals of different levels and generates corresponding inventory adjustment, environmental control or loss reporting instructions according to the preset automated handling rule library. The tiered early warning and intervention module has built-in exclusive early warning rules for oral medications sold in smaller quantities: a level two early warning is triggered when medications sold in smaller quantities in the packaging machine are less than 30 days away from the 6-month threshold for being sold in smaller quantities, or when a slight color change is detected in the medications; a level three intervention early warning is directly triggered when medications sold in smaller quantities reach the maximum 6-month time limit for being sold in smaller quantities, or when obvious discoloration or deterioration occurs, the usage rights of the batch of medications sold in smaller quantities are automatically locked, a damage report and replacement work order are forcibly generated, and if the medication packages repackaged by the patient exceed the corresponding short-term shelf life, they are automatically marked as invalid and prohibited from being released from the warehouse. The closed-loop feedback correction module is communicatively connected to an external medical information system and the shelf-life decay modeling module. It is configured to collect clinical efficacy feedback data and adverse reaction event data after the drug is released from the warehouse, extract the quality deviation features, and send the quality deviation features back to the shelf-life decay modeling module as a negative feedback signal to dynamically adjust the environmental stress factor weight in the nonlinear remaining shelf-life prediction function, thereby realizing online iterative optimization of the model.
[0011] The closed-loop feedback correction module simultaneously collects clinical use feedback on discolored drugs after being dispensed and drugs that have been dispensed for more than 6 months, optimizes the expiration rate decay coefficient and color deterioration judgment threshold of drugs dispensed, and continuously improves the accuracy of identifying quality risks of drugs dispensed.
[0012] Preferably, the efficacy decay modeling module further includes: The feature vectorization submodule is used to convert the drug dosage form, active ingredient stability parameters, and packaging material permeability index in the static attribute dataset into a first feature vector, and to convert the temperature and humidity fluctuation amplitude, ultraviolet cumulative dose, and vibration acceleration in the microenvironment sensing dataset into a second feature vector. The feature vectorization submodule further transforms the oral drug dispensing status, dispensing time, appearance color RGB feature parameters, and packaging machine dispensing and storage status into a third exclusive feature vector, which is used to participate in the drug shelf life decay modeling calculation. The decay rate calculation submodule is configured to determine the reference decay rate constant based on the Arrhenius equation or the Hilbert equation, using the first eigenvector as the input parameter, and to calculate the environmental acceleration factor using the second eigenvector as the input parameter. The environmental acceleration factor is used to characterize the severity of the current microenvironment relative to standard storage conditions; The remaining life integration submodule is configured to numerically integrate the curve of the change of the environmental acceleration factor over time to obtain the cumulative environmental damage value, and use the cumulative environmental damage value to modulate the reference decay rate constant, thereby solving for the real-time remaining life prediction value. The output of the shelf-life decay modeling module includes a dynamically changing predicted expiration date, which is updated in real time as the microenvironment sensing data is updated, and may deviate from the legal expiration date of the drug.
[0013] For pharmacy packaging machines that dispense and retain medicines in smaller quantities, the module forces the output of a dynamic expiration date corresponding to the 6-month time limit for dispensing medicines, and overlays color deterioration and damage correction to achieve two-dimensional expiration date calibration. Preferably, the dynamic weight allocation module further includes: The expiration date urgency calculation submodule is configured to calculate the difference between the current time and the dynamically predicted expiration timestamp, and then normalize the difference to obtain the first weighted component. The expiration date urgency calculation submodule adds a weight for the urgency of dispensing time for dispensing drugs, using a 6-month expiration period as the limit threshold, and linearly increasing the expiration date risk weight as the dispensing time increases. The turnover frequency analysis submodule is configured to statistically analyze the frequency of drug outbound shipments and the probability of prescription issuance within a preset historical time window, and generate a second weighted component. The cost-risk coupling submodule is configured to obtain the purchase price and inventory cost of the drug, calculate the cost-risk product by combining it with the first weighted component, and perform a nonlinear transformation to generate a third weighted component. The multi-objective optimization submodule is configured to use a weighted summation or fuzzy logic algorithm to fuse the first, second, and third weight components into a single turnover priority weight vector. The weighting coefficients of the weighted summation can be adaptively adjusted according to the classification attributes of the drugs (such as emergency drugs, chronic disease drugs, and high-value consumables), so that the system can output the optimal outbound sorting in different scenarios.
[0014] The multi-objective optimization submodule assigns a risk-weighted priority coefficient to discolored drugs that have been sold in smaller quantities and drugs nearing their 6-month expiration date, prioritizing the disposal of high-risk drugs sold in smaller quantities. Preferably, the early warning boundary system in the hierarchical early warning and intervention module includes: The first-level attention threshold is set when the turnover priority weight vector reaches the first preset value. The trigger condition is that the microenvironment monitoring data shows instantaneous fluctuations but does not exceed the standard. The system only records logs and does not interfere with the operation. For medications sold in smaller quantities, an additional Level 1 attention threshold is applied: if medications sold in smaller quantities by the packaging machine have been sold for more than 3 months or show slight color differences, the system will automatically record a special risk log and continuously track changes in status. The level 2 warning threshold is set when the turnover priority weight vector reaches the second preset value. The triggering condition is that the advance of the dynamic prediction failure timestamp exceeds the preset number of days, or the environmental stress factor continuously exceeds the warning line. The system pushes a prompt message to the management personnel terminal and suggests physical relocation between storage locations. For medicines sold in smaller quantities, the trigger conditions for a Level 2 warning include: medicines sold in smaller quantities by the packaging machine have been sold for more than 5 months, or medicines show slight deterioration such as local discoloration or darkening. The system will then push a prompt to prioritize the release of the medicines sold in smaller quantities and to check and verify them. The three-level intervention threshold is set when the turnover priority weight vector reaches the third preset value. The triggering condition is that the remaining validity period is insufficient to support a complete regular prescription cycle, or abnormal clustering of clinical feedback data occurs. The system automatically locks the distribution authority of the batch of drugs and forcibly generates a return, damage report or quality inspection work order. For medications sold in smaller quantities, the three-level intervention mandatory trigger conditions include: the medications sold in smaller quantities have been stored in the medication packaging machine for more than 6 months, the medications are repackaged into patient medication packages that exceed the short-term shelf life standard, and the medications show obvious signs of deterioration such as discoloration, fading, or discoloration. The system will immediately lock the medication usage rights and force the loss to be reported and disposed of. The tiered early warning and intervention module is also equipped with a simulation function, which is used to simulate the impact of different intervention measures (such as increasing air conditioning power or moving to the cold storage area) on the predicted future failure date before the early warning is triggered, to assist managers in decision-making.
[0015] The simulation function can simulate the impact of different storage environments on the color change of repackaged medicines and the decay rate of the 6-month shelf life after repackaging, thereby optimizing the storage management plan for repackaged medicines. Preferably, the closed-loop feedback correction module specifically includes: The efficacy data interface submodule is configured to exchange data with the hospital information system, laboratory information system and electronic medical record system through the HL7 or FHIR standard protocol, and to capture data on changes in biochemical indicators, symptom improvement scores and adverse reaction reports after patients take medication. The quality correlation analysis submodule is configured to use statistical methods or machine learning clustering algorithms to analyze the correlation between specific batches of drugs and efficacy deviations, and identify drug batches with potential quality risks. The quality correlation analysis submodule focuses on correlation analysis of adverse drug reaction data of drugs that have been separated from other products for more than 6 months and drugs that have changed color or deteriorated, so as to accurately identify drug quality risks caused by improper storage after separation from other products; The model parameter self-tuning submodule is configured to extract the microenvironmental data features of the batch of drugs throughout their entire life cycle when a quality hazard is identified, calculate the residual between the actual degradation rate and the predicted degradation rate, and use this residual as the input of the gradient descent method to update the weight parameters of the neural network or regression model in the shelf-life decay modeling module. The closed-loop feedback correction module enables the system to continuously improve prediction accuracy as data accumulates, and can identify the hidden failure risk of drugs that have passed factory acceptance due to improper subsequent storage.
[0016] It can simultaneously iteratively optimize the 6-month shelf life threshold and color deterioration identification model parameters for disassembled drugs, adapting to the decay characteristics of different categories of oral disassembled drugs.
[0017] Preferably, the multi-source heterogeneous data acquisition module further includes: The spatial grid management submodule is configured to divide the warehouse storage space into several independent micro-environment control units, each equipped with an independent sensor group; The drug-location binding submodule uses radio frequency identification (RFID) or ultra-wideband (UWB) technology to track the location changes of drugs in the warehouse in real time and automatically update the association between drugs and the microenvironment control unit. The abnormal event capture submodule is configured to monitor the operating status of cold chain equipment (such as the number of times the refrigerator door is opened and closed, and the compressor start-stop frequency), and include such equipment operating data into the scope of the micro-environment perception dataset to assess the potential threat of equipment aging or failure to the shelf life of medicines. The multi-source heterogeneous data acquisition module adds a special acquisition unit for disassembled medicines, which connects to the pharmacy medicine packaging machine system and high-definition image acquisition equipment. It automatically collects information such as the time of disassembly, the batch of medicines, the working status of the medicine packaging machine, and the appearance and color of the medicines. It retains the full-cycle data of disassembled medicines in real time, and realizes full-process traceability monitoring of disassembly time, appearance deterioration, and expired status. The data stream output by the multi-source heterogeneous data acquisition module has timestamp synchronization characteristics, ensuring that the validity period decay modeling module can obtain strictly time-aligned multi-dimensional data slices when performing calculations.
[0018] Preferably, the dynamic weight allocation module further integrates a supply chain collaboration submodule, which is configured as follows: The calculated turnover priority weight vector is jointly analyzed with external supplier replenishment cycle and logistics delivery time data; When it is predicted that the availability of a certain drug will decrease due to its rapid expiration in a specific period of time, an early warning message will be automatically sent to the upstream of the supply chain to request adjustments to the shipment batch or to speed up the delivery frequency. Based on the current inventory weight distribution, suggestions for splitting sales or inter-departmental transfers are automatically generated to balance the expiration risk between different storage points and prevent the "dammed lake" phenomenon of concentrated expiration dates in local areas.
[0019] The supply chain collaboration submodule can statistically analyze the distribution of drugs that have expired within 6 months from the packaging machines in all pharmacies of the hospital, provide early warning of the risk of concentrated expiration, and generate cross-departmental drug requisition and clearance plans. Preferably, the automated treatment rule base in the tiered early warning and intervention module supports custom script writing, allowing users to define complex treatment logic according to the hospital's specific management standards; For example, the rule base contains the following logical branches: If the drug that triggers a Level II warning is a "selected variety in the national centralized procurement", the action of "sending a recommendation notice for alternative drugs to clinical departments" will be implemented first, rather than directly implementing the "return to inventory" action, in order to avoid violating the assessment requirements of the centralized procurement agreement; The rule base has a built-in logic for handling dispensing medicines in smaller quantities: medicines dispensed from the packaging machine that are nearing their 6-month expiration date or have slightly discolored should be prioritized for internal clearing and refilling, and should not be distributed to patients; medicines dispensed from smaller quantities that are more than 6 months old or have obviously changed color or deteriorated should be forcibly scrapped and reported as damaged, and should be prohibited from being released from the warehouse for use in any scenario. The graded early warning and intervention module also has a visualization rendering engine, which can overlay the shelf-life risk level of each microenvironment control unit in the warehouse onto the warehouse floor plan in the form of a heat map, intuitively showing the spatial distribution of high-risk areas.
[0020] The visualization rendering engine can display the expiration risk heat map of each pharmacy's dispensing machine for dispensing medicines in smaller quantities, accurately locating high-risk medicines that have expired, changed color, or deteriorated, as well as their storage areas. Preferably, the system further includes a digital twin simulation module, which is configured as follows: Based on historically accumulated multi-source heterogeneous data, a virtual mirror model of a drug warehouse is constructed; the cumulative impact of different seasonal changes, equipment failure scenarios, or human operational behaviors on the shelf life of drugs is simulated in the virtual model. By using Monte Carlo simulation or discrete event simulation, the shelf life distribution curve for a future period can be predicted, and the optimal warehouse layout adjustment scheme or air conditioning system operating parameter settings can be recommended. The digital twin simulation module supports simulating the 6-month shelf-life decay pattern and color deterioration rate of oral medications under different temperature, humidity, and light conditions, thus optimizing the medication storage environment parameters of the packaging machine. The output of the digital twin simulation module is used to guide the physical transformation of the warehouse or the optimization of management processes, so as to achieve the goal of reducing shelf-life loss from the source.
[0021] Preferably, the system operates by including the following steps: Initialization steps: Input static attributes of the drug, deploy the microenvironment sensor network, and establish a spatial mapping relationship between the drug and the sensors; The initialization process synchronously inputs the expiration date standards for various oral medications when they are sold in smaller quantities, binds the information of the medicine packaging machine, and presets the maximum expiration date threshold of 6 months for medications sold in smaller quantities and the normal color baseline spectrum of the medications. Real-time monitoring steps: Collect environmental data at a frequency of seconds or minutes, and collect circulation data at a transaction-level frequency to form a continuous data stream; The real-time monitoring process continuously collects data on the disassembly time of the medicine packaging machine and the appearance image data of the medicine, compares it with the baseline spectrum in real time, and dynamically identifies changes in the color of the medicine and the risk of deterioration. Dynamic modeling steps: Every preset calculation period (e.g., hourly), the nonlinear remaining shelf life prediction function is invoked to update the prediction of all drugs in the database. The dynamic modeling process models the disassembled medicines separately, taking the disassembly time as the starting node, dynamically updating the remaining shelf life of 6 months, overlaying color deterioration correction parameters, and refreshing the expiration warning time in real time. Intelligent scheduling steps: Upon receiving an outbound request, the system recommends the optimal outbound batch and storage location in real time based on the latest turnover priority weight vector; The intelligent scheduling process prioritizes intercepting drugs that have been dispensed in smaller quantities more than 6 months old or have changed color or deteriorated before being released from the warehouse, and prioritizes scheduling drugs that are close to their expiration date to complete the in-hospital turnover clearance. Closed-loop evolution steps: periodically (e.g., monthly) summarize clinical feedback data, execute the model parameter self-tuning process, and release the updated efficacy prediction model; The closed-loop evolution steps focus on iterating the expiration date algorithm for dispensing drugs in smaller quantities and the color deterioration identification model, and optimizing the accuracy of the 6-month expiration date control for dispensing drugs in smaller quantities. The calculation cycle in the dynamic modeling step can be adaptively adjusted according to the value density and stability of the drug. For high-value or unstable drugs, the calculation cycle is shortened to the minute level, while for conventional stable drugs, the calculation cycle is extended to the day level.
[0022] Among them, for easily perishable medicines that are broken into smaller quantities in pharmacy packaging machines, the system adaptively shortens the modeling and calculation cycle to the minute level, and monitors the breaking time and color change risk at high frequency to ensure the safety of the medicines being broken into smaller quantities.
[0023] The embodiments of the present invention have the following advantages due to the adoption of the above technical solutions: 1. A qualitative leap in prediction accuracy: By incorporating multi-dimensional microenvironment sensor data such as temperature, humidity, light, and vibration, and combining it with chemical kinetic principles such as the Arrhenius equation to construct a nonlinear decay model, this invention can calculate the current "true" remaining shelf life of a drug, rather than the theoretical shelf life on paper. This greatly reduces the risk of premature drug expiration due to fluctuations in the storage environment, and also avoids drug waste caused by excessive conservatism.
[0024] 2. Ultimate Optimization of Inventory Turnover Efficiency: The dynamic weight allocation module breaks the constraints of traditional FIFO. It automatically adjusts the outbound order by quantitatively calculating the "urgency" of each box of medicine in the current environment. For example, the system might determine that a batch of medicine that entered the warehouse later but is located on the edge of a high-temperature, high-humidity zone has a higher priority than medicine that entered the warehouse earlier but is located in a constant-temperature, constant-humidity zone, thus achieving risk-based intelligent inventory scheduling.
[0025] 3. Proactive and Foresightful Early Warning Mechanism: This invention no longer waits for the expiration date to reach zero before issuing an alarm; instead, it proactively predicts based on the changing trend of the decay rate. When the system detects an abnormally rapid decay rate of a drug in a certain area, it will trigger an early warning even if there is still a considerable amount of time before the expiration date, prompting management personnel to check environmental control equipment. This "prevention-oriented" early warning model prioritizes risk management and significantly improves medication safety.
[0026] 4. Intelligent and automated decision support: The system can seamlessly integrate expiration date management with replenishment, returns, and damage reporting processes. When a sharp drop in expiration dates is predicted at a future point in time, the system will automatically generate promotional suggestions, restocking requests, or return alerts, completing complex inventory optimization operations without manual intervention and significantly reducing the workload of the pharmacy department.
[0027] 5. Full Lifecycle Quality Traceability and Closed-Loop Improvement: By connecting with patient feedback on treatment efficacy, the system forms a complete quality control closed loop. If the clinical efficacy of a batch of drugs is found to be significantly lower than the historical average, the system will not only lock down that batch but also analyze its storage trajectory to uncover the root cause of the quality abnormality. This cause will then be added as a feature vector to the model training set, making subsequent expiration date predictions more accurate.
[0028] The above overview is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the invention will become readily apparent from the accompanying drawings and the following detailed description. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart illustrating the overall system workflow of the present invention. Figure 2 This is a flowchart illustrating the effect decay modeling of the present invention. Detailed Implementation
[0031] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0032] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0033] Example 1: Routine Drug Management in a General Hospital Inpatient Pharmacy
[0034] This embodiment is applied to the inpatient pharmacy of a tertiary general hospital, mainly focusing on the expiration date management of common oral preparations such as tablets and capsules. The system deployment architecture in this embodiment is as follows: Figure 1 As shown.
[0035] In this scenario, the system first undergoes initial configuration via a multi-source heterogeneous data acquisition module. Unlike existing technologies that only scan barcodes to obtain drug names and batch numbers, this embodiment embeds a miniature environmental sensor array at each level of the shelf to collect data on temperature, relative humidity, ultraviolet intensity, and minute vibration frequencies. When each box of medicine is placed on the shelf, its RFID tag is bound to the sensor ID at its location.
[0036] Table 1-1: Initial Static Attributes and Binding Information of Drugs Upon Entry
[0037] Subsequently, the shelf-life decay modeling module is activated. This module does not simply read the "legal expiration date," but rather uses a built-in non-Arrhenius model to perform calculations based on collected microenvironmental data. For tablet drugs, the system focuses on the impact of humidity on disintegration time. A baseline decay rate is set by the system. And calculate the correction coefficient based on real-time environmental data. .
[0038] Table 1-2: Dynamic Correction Table for Shelf Life Decay Factor Based on Microenvironment
[0039] As shown in Table 1-2, although the atorvastatin calcium tablets at the SENSOR-A03-B06 position have a longer legal shelf life, their overall degradation rate is affected by the high ambient humidity (62% RH). The price of this drug in that location is higher than other drugs. Based on this, the system calculates that the actual predicted expiration date of the drug in that location may be earlier than the legal expiration date.
[0040] The dynamic weight allocation module calculates the outbound priority weight according to the following formula. :
[0041] in, The current remaining validity period, The remaining validity period at the time of warehousing. To predict the expiration date, The legal expiry date. This represents the historical average daily delivery frequency of the drug. This is the dynamic adjustment coefficient.
[0042] Table 1-3: Dynamic Calculation Table of Outbound Priority Weight
[0043] As shown in Table 1-3, although P-1002-B does not have the shortest legal expiration date, its predicted expiration date is shortened due to environmental factors, and the system comprehensively considers the dispensing frequency, thus assigning it the highest dispensing weight (0.745). When pharmacists perform dispensing operations, the system automatically recommends prioritizing the dispensing of P-1002-B, achieving intelligent "first-come, first-served" dispensing.
[0044] The tiered early warning and intervention module continuously monitors... The change in value. When When the value exceeds the preset first-level threshold (e.g., 0.8), the system only marks it as a concern in the background; when it exceeds the second-level threshold (e.g., 0.9), the system sends a yellow warning to the front-end terminal, reminding pharmacists to pay attention to the check during dispensing; when it exceeds the third-level threshold (e.g., 0.95), the system locks the drug, prohibits its release from the warehouse, and automatically generates a damage report or return application form.
[0045] Table 1-4: Multi-level Early Warning Triggering and Handling Log Table
[0046] Through the implementation of this embodiment, the pharmacy successfully avoided the risk of the entire batch of medicines becoming ineffective due to localized dampness, and the inventory turnover rate increased by about 18%, while the backlog rate of near-expiry medicines decreased by 40%.
[0047] Hospitalization Procedures for Managing the Expiration Dates of Individually Distributed Oral Medication Packets
[0048] 1. Upon receiving raw materials into the pharmacy, the system scans and enters the barcodes, identifies the drug type (ordinary tablets / live bacteria / effervescent tablets), and pre-stores the corresponding repackaging time limit; 2. When using the oral medication dispensing machine to scan the code to dispense medication, if the system checks the original medication and it is under an orange / red alert, dispensing will be prohibited. 3. Once the dispensing is complete, the system automatically calculates the dispensing expiration date, and labels are printed simultaneously with patient information, dispensing date, and expiration date of the medicine pack. 4. Once the medicine package is delivered to the smart medicine cabinet in the ward and scanned for storage, the system begins a countdown. 5. Nurse dispensing medication by scanning the code: A yellow pop-up reminder will appear if the medication package has ≤48 hours remaining; a red blocking window will appear if the expiration date has arrived, and medication cannot be dispensed. 6. Every day at midnight, the system automatically exports a list of expired and overdue medication packages in the wards. The pharmacy collects these packages and enters them into the isolation ledger by scanning the codes.
[0049] Example 2: Cold Chain Drug Management in Intravenous Admixture Centers (PIVAS) of Cancer Specialty Hospitals
[0050] This example focuses on high-value, highly sensitive cold-chain drugs (such as monoclonal antibody drugs and cytotoxic drugs) in the intravenous drug preparation center of a cancer hospital. These drugs are extremely sensitive to temperature fluctuations and are expensive; mismanagement of their expiration dates can lead to significant economic losses and medical risks.
[0051] In this scenario, the multi-source heterogeneous data acquisition module incorporates a high-precision temperature sensor (accuracy ±0.1℃) and a door magnetic switch sensor. The system pays particular attention to the devastating impact of "cold chain disruption" events on the shelf life of pharmaceutical products. Unlike existing technologies that only alarm when the temperature exceeds the limit, this invention focuses on the cumulative "erosion" of the active ingredients in pharmaceutical products by every tiny temperature fluctuation.
[0052] Table 2-1: Cold Chain Medicine Warehousing and Temperature Control Record Form
[0053] Note: Heat exposure integral refers to the cumulative effect quantification of the temperature deviation from the set value (e.g., 2-8℃) during the transportation or brief removal of the cold chain of a drug.
[0054] The efficacy decay modeling module employs a cumulative damage model based on the Q10 coefficient (temperature coefficient). The system calculates the drug's "thermal age" in real time. For example, for bevacizumab, every hour spent in a 10°C environment results in the same amount of active ingredient degradation as several hours of storage at 5°C. Through integral calculations, the system concludes that the drug's actual "age" is far greater than its physical storage time.
[0055] Table 2-2: Calculation Table of Dynamic Thermal Age and Shelf Life of Cold Chain Medicines
[0056] As shown in Table 2-2, although bevacizumab had a shorter physical storage time, its remaining shelf life, after dynamic conversion, was reduced by 6.2% due to the high heat exposure it experienced during transportation, which is much higher than the other two drugs.
[0057] In this scenario, the dynamic weight allocation module introduces a "cost-risk weight." Because these drugs are extremely expensive, the system considers not only the expiration date but also the unit cost of the drug and the department's billing cycle when calculating the order of dispensing. The system prioritizes consuming drugs with both high expiration date risk and high cost to prevent huge losses from expired waste.
[0058] Table 2-3: Outbound Priority Matrix Based on Cost-Expiration Dimensions
[0059] As shown in Table 2-3, although bevacizumab is not the most expensive, its shelf-life risk index is as high as 0.92, which makes its cost-risk product and reorganization priority the highest.
[0060] The tiered early warning and intervention module includes a "chain break traceability" sub-module for cold chain medicines. In the event of a refrigerator malfunction or the door being left open for an extended period, the system will not only sound an alarm but also immediately retrieve the heat exposure scores of all medicines in the refrigerator, recalculate the remaining expiration date of each medicine, and generate an "emergency response list."
[0061] Table 2-4: Emergency Response and Handling Table for Cold Chain Abnormal Events
[0062] Through the implementation of this embodiment, the PIVAS Center has achieved refined management of high-value cold chain medicines, successfully intercepted three incidents of batch medicine failure that could have been caused by refrigerator malfunctions, and saved hundreds of thousands of yuan in economic losses. At the same time, it ensured that every medicine used by patients was within the dynamically verified validity period.
[0063] Dynamic Expiry Date Correction Management of Cold Chain Biologics
[0064] 1. Cold chain medicines are stored in refrigerated cabinets at 2–8℃, and IoT sensors continuously upload temperature and humidity data; 2. If the refrigerator malfunctions and the temperature rises to 12℃ for 2 hours, the system will automatically calculate the loss factor and shorten the remaining shelf life of the corresponding batch of medicines. 3. After conversion, the remaining shelf life is set to zero, and the system simultaneously pushes a red alert to the pharmacy supervisor; the HIS directly intercepts prescriptions for this batch of drugs when issuing prescriptions; 4. Scan the barcode of medicines and move them into the expired cold chain medicine isolation cabinet, generating a record of temperature and humidity exceeding the standard and an analysis report of expiration date loss, which is used for equipment maintenance and quality control review.
[0065] Example 3: Integrated Management and Feedback Closed Loop of Chronic Disease Management Stations in Community Health Centers
[0066] This embodiment is applied to primary community health centers, primarily serving the long-term medication management of patients with chronic diseases such as hypertension and diabetes. This scenario is characterized by low drug prices, relatively fixed drug types, and significant differences in patient compliance. The core of this invention in this scenario lies in utilizing a closed-loop feedback correction module to establish a data link between the pharmacy, patient, and doctor.
[0067] In this scenario, the system not only manages pharmacy inventory but also extends to the patient end. When a patient picks up their medication, the system records the batch of medication received by linking it to their medical insurance card information. When patients have follow-up visits or upload health data via wearable devices, the system collects feedback on treatment effectiveness.
[0068] Table 3-1: Record of Chronic Disease Drug Issuance and Patient Association
[0069] The closed-loop feedback correction module periodically analyzes patient follow-up data. For example, the system found that the blood pressure control rate of patients taking batch OUT-001 was slightly lower than that of patients taking other batches of the same drug, and the adverse reaction reporting rate was slightly higher.
[0070] Table 3-2: Correlation Analysis Table Between Patient Treatment Feedback and Drug Quality
[0071] The system did not directly determine that batch D20240120 of drugs was substandard. Instead, it input this information as a "soft signal" into the shelf-life degradation modeling module. The system speculated that this batch of drugs may have experienced specific microenvironmental stresses (such as brief exposure to high temperatures) at some stage, causing its active ingredient, although still within legal standards, to have its actual bioavailability at a critical level. Therefore, the system automatically increased the degradation correction factor for the remaining drugs in this batch. .
[0072] Table 3-3: Dynamic Adjustment Table of Model Parameters Based on Feedback Data
[0073] The dynamic weight allocation module immediately adjusted the outbound strategy for this batch of drugs based on the corrected parameters. The system prioritized distributing batch D20240120 to younger patients with milder conditions and better tolerance, while reserving batch B20240501, which had better quality feedback, for older patients or those with more complications.
[0074] Table 3-4: Stratified Medication Guidance Table Based on Closed-Loop Feedback
[0075] The tiered early warning and intervention module generates a new "quality trend warning." It's not based on absolute expiration, but on relative quality decline. The system will prompt administrators: "Batch D20240120 of medicine shows a slight trend of group efficacy decline; it is recommended to accelerate consumption and conduct sample testing."
[0076] Through the implementation of this embodiment, community health centers not only optimized their inventory but, more importantly, established a "socially conscious" network for drug quality. The system continuously self-corrects based on real clinical feedback data, transforming expiration date prediction from simple physicochemical calculations into a comprehensive intelligent judgment combining clinical medical effects, significantly improving the safety baseline and quality ceiling for medication use at the grassroots level.
[0077] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in the present invention, and these should all be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A drug expiration date intelligent early warning and control system, characterized in that, include: The multi-source heterogeneous data acquisition module is configured to capture in real time the static attribute dataset, dynamic flow trajectory dataset, and micro-environment perception dataset of drugs during their storage period; The microenvironment sensing dataset includes at least time-series data of temperature, relative humidity, light intensity, and mechanical vibration frequency, and the microenvironment sensing dataset is spatially mapped and bound to the physical storage location identifier of the medicine. The multi-source heterogeneous data acquisition module also integrates specialized sensing data acquisition logic for oral medications that have been repackaged in smaller quantities. It specifically collects data on the repackaging time, repackaging equipment number, drug appearance and color characteristics, and storage environment parameters for oral medications repackaged in smaller quantities and stored in pharmacy packaging machines, providing data support for short-term management and deterioration identification. The system implements tiered expiration date management rules for oral medications repackaged in smaller quantities: For remaining bulk medications after repackaging from a full bottle and stored in the pharmacy packaging machine, the expiration date is automatically locked at 6 months from the date of repackaging, and must not exceed the legal expiration date of the original outer packaging. For oral medications repackaged in smaller quantities and distributed to patients, the short-term expiration date standard is strictly enforced. Simultaneously, the system collects real-time image data of the medications, capturing changes in color depth, abnormal color, discoloration, and other appearance deterioration characteristics as criteria for determining expiration and quality deterioration. The shelf-life decay modeling module is communicatively connected to the multi-source heterogeneous data acquisition module. It is configured to parse the static attribute dataset to obtain the physicochemical properties of the drug, and combine it with the micro-environment perception dataset to construct a nonlinear remaining shelf-life prediction function by introducing an environmental stress factor, and output the dynamic predicted failure timestamp of each independent drug packaging unit. The nonlinear remaining shelf life prediction function is based on chemical kinetic equations and continuously integrates and corrects the baseline decay rate according to real-time collected microenvironment data, rather than performing a linear countdown based on a fixed expiration date. Specifically, for oral medications that are repackaged in smaller quantities, the nonlinear remaining shelf life prediction function is equipped with a correction coefficient specifically for repackaging. Taking the repackaging time as the starting node, it forcibly constrains the maximum effective period of repackaged medications to be 6 months, and matches the corresponding short-term threshold to the repackaged medications at the patient end. At the same time, it incorporates the abnormal color change characteristics of the medication into the decay rate correction factor. When the color deterioration of the medication is detected, it automatically accelerates the calculation of shelf life decay and provides an early warning timestamp for expiration. The dynamic weight allocation module is communicatively connected to the shelf-life decay modeling module and is configured to receive the dynamically predicted failure timestamp and perform multi-objective fusion calculations with the drug's inventory level, historical outbound frequency, and clinical demand urgency to generate a turnover priority weight vector characterizing the urgency of drug outbound. The turnover priority weight vector is used to break the traditional first-in-first-out constraint and realize adaptive inventory scheduling based on expiration date risk. For oral medications sold in smaller quantities, the dynamic weight allocation module prioritizes the turnover of medications that are nearing their 6-month expiration date or have shown slight color changes. It also prioritizes the dispatch and clearance of high-risk medications sold in smaller quantities to prevent them from being stored beyond their expiration date or from deteriorating. The graded early warning and intervention module is communicatively connected to the dynamic weight allocation module and is configured to set an early warning boundary system containing multiple elastic thresholds. Based on the threshold range where the turnover priority weight vector is located, it triggers early warning signals of different levels and generates corresponding inventory adjustment, environmental control or loss reporting instructions according to the preset automated handling rule library. The tiered early warning and intervention module has built-in exclusive early warning rules for oral medications sold in smaller quantities: a level two early warning is triggered when medications sold in smaller quantities in the packaging machine are less than 30 days away from the 6-month threshold for being sold in smaller quantities, or when a slight color change is detected in the medications; a level three intervention early warning is directly triggered when medications sold in smaller quantities reach the maximum 6-month time limit for being sold in smaller quantities, or when obvious discoloration or deterioration occurs, the usage rights of the batch of medications sold in smaller quantities are automatically locked, a damage report and replacement work order are forcibly generated, and if the medication packages repackaged by the patient exceed the corresponding short-term shelf life, they are automatically marked as invalid and prohibited from being released from the warehouse. The closed-loop feedback correction module is communicatively connected to an external medical information system and the shelf-life decay modeling module. It is configured to collect clinical efficacy feedback data and adverse reaction event data after the drug is released from the warehouse, extract the quality deviation features, and send the quality deviation features back to the shelf-life decay modeling module as a negative feedback signal to dynamically adjust the environmental stress factor weight in the nonlinear remaining shelf-life prediction function and realize online iterative optimization of the model. The closed-loop feedback correction module simultaneously collects clinical use feedback on discolored drugs after being dispensed and drugs that have been dispensed for more than 6 months, optimizes the expiration rate decay coefficient and color deterioration judgment threshold of drugs dispensed, and continuously improves the accuracy of identifying quality risks of drugs dispensed.
2. The intelligent early warning and control system for drug expiration dates according to claim 1, characterized in that, The efficacy decay modeling module further includes: The feature vectorization submodule is used to convert the drug dosage form, active ingredient stability parameters, and packaging material permeability index in the static attribute dataset into a first feature vector, and to convert the temperature and humidity fluctuation amplitude, ultraviolet cumulative dose, and vibration acceleration in the microenvironment sensing dataset into a second feature vector. The feature vectorization submodule further transforms the oral drug dispensing status, dispensing time, appearance color RGB feature parameters, and packaging machine dispensing and storage status into a third exclusive feature vector, which is used to participate in the drug shelf life decay modeling calculation. The decay rate calculation submodule is configured to determine the reference decay rate constant based on the Arrhenius equation or the Hilbert equation, using the first eigenvector as the input parameter, and to calculate the environmental acceleration factor using the second eigenvector as the input parameter. The environmental acceleration factor is used to characterize the severity of the current microenvironment relative to standard storage conditions; The remaining life integration submodule is configured to numerically integrate the curve of the change of the environmental acceleration factor over time to obtain the cumulative environmental damage value, and use the cumulative environmental damage value to modulate the reference decay rate constant, thereby solving for the real-time remaining life prediction value. The output of the shelf-life decay modeling module includes a dynamically changing predicted expiration date, which is updated in real time as the microenvironment sensing data is updated, and may deviate from the legal expiration date of the drug. For medicines stored in smaller quantities after being dispensed by pharmacy packaging machines, the module forces the output of a dynamic expiration date corresponding to a 6-month time limit after dispensing, and overlays color deterioration and damage correction to achieve two-dimensional expiration date calibration.
3. The intelligent early warning and control system for drug expiration dates according to claim 1, characterized in that, The dynamic weight allocation module further includes: The expiration date urgency calculation submodule is configured to calculate the difference between the current time and the dynamically predicted expiration timestamp, and then normalize the difference to obtain the first weighted component. The expiration date urgency calculation submodule adds a weight for the urgency of dispensing time for dispensing drugs, using a 6-month expiration period as the limit threshold, and linearly increasing the expiration date risk weight as the dispensing time increases. The turnover frequency analysis submodule is configured to statistically analyze the frequency of drug outbound shipments and the probability of prescription issuance within a preset historical time window, and generate a second weighted component. The cost-risk coupling submodule is configured to obtain the purchase price and inventory cost of the drug, calculate the cost-risk product by combining it with the first weighted component, and perform a nonlinear transformation to generate a third weighted component. The multi-objective optimization submodule is configured to use a weighted summation or fuzzy logic algorithm to fuse the first, second, and third weight components into a single turnover priority weight vector. The weighting coefficients of the weighted summation can be adaptively adjusted according to the classification attributes of the drugs (such as emergency drugs, chronic disease drugs, and high-value consumables), so that the system can output the optimal outbound sorting in different scenarios. The multi-objective optimization submodule assigns a risk-weighted priority coefficient to discolored drugs that have been split into smaller quantities and drugs nearing their 6-month expiration date, prioritizing the disposal of high-risk drugs that have been split into smaller quantities.
4. The intelligent early warning and control system for drug expiration dates according to claim 1, characterized in that, The early warning boundary system in the hierarchical early warning and intervention module includes: The first-level attention threshold is set when the turnover priority weight vector reaches the first preset value. The trigger condition is that the microenvironment monitoring data shows instantaneous fluctuations but does not exceed the standard. The system only records logs and does not interfere with the operation. For medications sold in smaller quantities, an additional Level 1 attention threshold is applied: if medications sold in smaller quantities by the packaging machine have been sold for more than 3 months or show slight color differences, the system will automatically record a special risk log and continuously track changes in status. The level 2 warning threshold is set when the turnover priority weight vector reaches the second preset value. The triggering condition is that the advance of the dynamic prediction failure timestamp exceeds the preset number of days, or the environmental stress factor continuously exceeds the warning line. The system pushes a prompt message to the management personnel terminal and suggests physical relocation between storage locations. For medicines sold in smaller quantities, the trigger conditions for a Level 2 warning include: medicines sold in smaller quantities by the packaging machine have been sold for more than 5 months, or medicines show slight deterioration such as local discoloration or darkening. The system will then push a prompt to prioritize the release of the medicines sold in smaller quantities and to check and verify them. The three-level intervention threshold is set when the turnover priority weight vector reaches the third preset value. The triggering condition is that the remaining validity period is insufficient to support a complete regular prescription cycle, or abnormal clustering of clinical feedback data occurs. The system automatically locks the distribution authority of the batch of drugs and forcibly generates a return, damage report or quality inspection work order. For medications sold in smaller quantities, the three-level intervention mandatory trigger conditions include: the medications sold in smaller quantities have been stored in the medication packaging machine for more than 6 months, the medications are repackaged into patient medication packages that exceed the short-term shelf life standard, and the medications show obvious signs of deterioration such as discoloration, fading, or discoloration. The system will immediately lock the medication usage rights and force the loss to be reported and disposed of. The tiered early warning and intervention module is also equipped with a simulation function, which is used to simulate the impact of different intervention measures (such as increasing air conditioning power or moving to the cold storage area) on the predicted future failure date before the early warning is triggered, to assist managers in decision-making. The simulation function can simulate the impact of different storage environments on the color change of disassembled medicines and the decay rate of the 6-month shelf life after disassembly, thereby optimizing the storage management plan for disassembled medicines.
5. The intelligent early warning and control system for drug expiration dates according to claim 1, characterized in that, The closed-loop feedback correction module specifically includes: The efficacy data interface submodule is configured to exchange data with the hospital information system, laboratory information system and electronic medical record system through the HL7 or FHIR standard protocol, and to capture data on changes in biochemical indicators, symptom improvement scores and adverse reaction reports after patients take medication. The quality correlation analysis submodule is configured to use statistical methods or machine learning clustering algorithms to analyze the correlation between specific batches of drugs and efficacy deviations, and identify drug batches with potential quality risks. The quality correlation analysis submodule focuses on correlation analysis of adverse drug reaction data of drugs that have been separated from other products for more than 6 months and drugs that have changed color or deteriorated, so as to accurately identify drug quality risks caused by improper storage after separation from other products; The model parameter self-tuning submodule is configured to extract the microenvironmental data features of the batch of drugs throughout their entire life cycle when a quality hazard is identified, calculate the residual between the actual degradation rate and the predicted degradation rate, and use this residual as the input of the gradient descent method to update the weight parameters of the neural network or regression model in the shelf-life decay modeling module. The closed-loop feedback correction module enables the system to continuously improve prediction accuracy as data accumulates, and can identify the hidden failure risk of drugs that have passed factory acceptance due to improper subsequent storage. It can simultaneously iteratively optimize the 6-month shelf life threshold and color deterioration identification model parameters for disassembled drugs, adapting to the decay characteristics of different categories of oral disassembled drugs.
6. The intelligent early warning and control system for drug expiration dates according to claim 1, characterized in that, The multi-source heterogeneous data acquisition module also includes: The spatial grid management submodule is configured to divide the warehouse storage space into several independent micro-environment control units, each equipped with an independent sensor group; The drug-location binding submodule uses radio frequency identification (RFID) or ultra-wideband (UWB) technology to track the location changes of drugs in the warehouse in real time and automatically update the association between drugs and the microenvironment control unit. The abnormal event capture submodule is configured to monitor the operating status of cold chain equipment (such as the number of times the refrigerator door is opened and closed, and the compressor start-stop frequency), and include such equipment operating data into the scope of the micro-environment perception dataset to assess the potential threat of equipment aging or failure to the shelf life of medicines. The multi-source heterogeneous data acquisition module adds a special acquisition unit for disassembled medicines, which connects to the pharmacy medicine packaging machine system and high-definition image acquisition equipment. It automatically collects information such as the time of disassembly, the batch of medicines, the working status of the medicine packaging machine, and the appearance and color of the medicines. It retains the full-cycle data of disassembled medicines in real time, and realizes full-process traceability monitoring of disassembly time, appearance deterioration, and expired status. The data stream output by the multi-source heterogeneous data acquisition module has timestamp synchronization characteristics, ensuring that the validity period decay modeling module can obtain strictly time-aligned multi-dimensional data slices when performing calculations.
7. The intelligent early warning and control system for drug expiration dates according to claim 3, characterized in that, The dynamic weight allocation module also integrates a supply chain collaboration submodule, which is configured as follows: The calculated turnover priority weight vector is jointly analyzed with external supplier replenishment cycle and logistics delivery time data; When it is predicted that the availability of a certain drug will decrease due to its rapid expiration in a specific period of time, an early warning message will be automatically sent to the upstream of the supply chain to request adjustments to the shipment batch or to speed up the delivery frequency. Based on the current weight distribution of inventory, suggestions for splitting sales or inter-departmental transfers are automatically generated to balance the expiration risk between different storage points and prevent the "dammed lake" phenomenon of concentrated expiration in local areas. The supply chain collaboration submodule can statistically analyze the distribution of drugs that have expired within 6 months from the packaging machines in all pharmacies of the hospital, provide early warnings of the risk of concentrated expiration, and generate cross-departmental drug requisition and clearance plans.
8. The intelligent early warning and control system for drug expiration dates according to claim 4, characterized in that, The automated treatment rule base in the tiered early warning and intervention module supports custom script writing, allowing users to define complex treatment logic according to the hospital's specific management standards. For example, the rule base contains the following logical branches: If the drug that triggers a Level II warning is a "selected variety in the national centralized procurement", the action of "sending a recommendation notice for alternative drugs to clinical departments" will be implemented first, rather than directly implementing the "return to inventory" action, in order to avoid violating the assessment requirements of the centralized procurement agreement; The rule base has a built-in logic for handling dispensing medicines in smaller quantities: if medicines dispensed from the medicine packaging machine are nearing their 6-month expiration date or show slight discoloration, they should be prioritized for internal clearing and reassignment to prevent them from being distributed to patients. Medicines that have been separated from their original quantity and are more than 6 months old or have obviously changed color or deteriorated must be scrapped and reported as damaged, and are prohibited from being released from the warehouse for use in any scenario. The graded early warning and intervention module also has a visualization rendering engine, which can overlay the shelf-life risk level of each microenvironment control unit in the warehouse onto the warehouse floor plan in the form of a heat map, intuitively showing the spatial distribution of high-risk areas. The visualization rendering engine can display the expiration date risk heat map of each pharmacy's dispensing machine for dispensing medicines, accurately locating high-risk medicines that have expired, changed color, or deteriorated, as well as their storage areas.
9. The intelligent early warning and control system for drug expiration dates according to claim 1, characterized in that, The system also includes a digital twin simulation module, which is configured as follows: Based on historically accumulated multi-source heterogeneous data, a virtual mirror model of a drug warehouse is constructed; the cumulative impact of different seasonal changes, equipment failure scenarios, or human operational behaviors on the shelf life of drugs is simulated in the virtual model. By using Monte Carlo simulation or discrete event simulation, the shelf life distribution curve for a future period can be predicted, and the optimal warehouse layout adjustment scheme or air conditioning system operating parameter settings can be recommended. The digital twin simulation module supports simulating the 6-month shelf-life decay pattern and color deterioration rate of oral medications under different temperature, humidity, and light conditions, thus optimizing the medication storage environment parameters of the packaging machine. The output of the digital twin simulation module is used to guide the physical transformation of the warehouse or the optimization of management processes, so as to achieve the goal of reducing shelf-life loss from the source.
10. A drug expiration date intelligent early warning and control system according to any one of claims 1-9, characterized in that, The system operates by including the following steps: Initialization steps: Input static attributes of the drug, deploy the microenvironment sensor network, and establish a spatial mapping relationship between the drug and the sensors; The initialization process synchronously inputs the expiration date standards for various oral medications when they are sold in smaller quantities, binds the information of the medicine packaging machine, and presets the maximum expiration date threshold of 6 months for medications sold in smaller quantities and the normal color baseline spectrum of the medications. Real-time monitoring steps: Collect environmental data at a frequency of seconds or minutes, and collect circulation data at a transaction-level frequency to form a continuous data stream; The real-time monitoring process continuously collects data on the disassembly time of the medicine packaging machine and the appearance image data of the medicine, compares it with the baseline spectrum in real time, and dynamically identifies changes in the color of the medicine and the risk of deterioration. Dynamic modeling steps: Every preset calculation cycle (e.g., every hour), call the nonlinear remaining shelf life prediction function to update the prediction of all drugs in the database; The dynamic modeling process models the disassembled medicines separately, taking the disassembly time as the starting node, dynamically updating the remaining shelf life of 6 months, overlaying color deterioration correction parameters, and refreshing the expiration warning time in real time. Intelligent scheduling steps: Upon receiving an outbound request, the system recommends the optimal outbound batch and storage location in real time based on the latest turnover priority weight vector; The intelligent scheduling process prioritizes intercepting drugs that have been dispensed in smaller quantities more than 6 months old or have changed color or deteriorated before being released from the warehouse, and prioritizes scheduling drugs that are close to their expiration date to complete the in-hospital turnover clearance. Closed-loop evolution steps: periodically (e.g., monthly) summarize clinical feedback data, execute the model parameter self-tuning process, and release the updated efficacy prediction model; The closed-loop evolution steps focus on iterating the expiration date algorithm for dispensing drugs in smaller quantities and the color deterioration identification model, and optimizing the accuracy of the 6-month expiration date control for dispensing drugs in smaller quantities. The calculation cycle in the dynamic modeling step can be adaptively adjusted according to the value density and stability of the drug. For high-value or unstable drugs, the calculation cycle is shortened to the minute level, while for conventional stable drugs, the calculation cycle is extended to the day level. Among them, for easily perishable medicines that are broken into smaller quantities in pharmacy packaging machines, the system adaptively shortens the modeling and calculation cycle to the minute level, and monitors the breaking time and color change risk at high frequency to ensure the safety of the medicines being broken into smaller quantities.