A medicine management system and method for managing tracking of patient medicine remaining amount
By dynamically calculating and providing early warnings of remaining drug levels through an intelligent drug management system, the problem of tracking patients' remaining drug levels has been solved. This has enabled automated drug management and medication safety assurance, thereby improving the quality of medical services and the efficiency of resource allocation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN CANCER HOSPITAL
- Filing Date
- 2026-02-09
- Publication Date
- 2026-06-05
AI Technical Summary
Current technologies cannot effectively track and predict patients' remaining medications, leading to medication waste and treatment interruptions, which affect the quality and safety of medical services.
An intelligent drug management system is built, which dynamically calculates and warns of remaining drug quantities through a central server, doctor terminals, pharmacy terminals, a stock calculation and tracking engine, an intelligent early warning module, and patient terminals, and provides a visual interface and drug safety verification.
It enables automated and precise tracking of remaining drug quantities, avoiding drug waste and treatment interruptions, improving the transparency and personalization of medical services, and ensuring medication safety and resource optimization.
Smart Images

Figure CN122157944A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical information technology, and in particular to a drug management system and method for managing and tracking the remaining amount of medications for patients. Background Technology
[0002] In modern healthcare systems, the long-term management of prescription drugs, especially the accurate tracking of remaining medications in patients' hands, remains a long-standing but unresolved practical problem. The core of this problem lies in the significant information gap and monitoring blind spots between the "actual consumption" and "theoretical consumption" of medications throughout the entire process from when a doctor writes a prescription to when the patient actually takes the medication.
[0003] Currently, drug management primarily focuses on internal inventory management within medical institutions, compliance review of prescriptions, and pharmacy dispensing records. Once a patient receives their medication from the pharmacy, the system automatically completes the management loop, and the medication enters a "black box" state. Patients or their families must rely entirely on manual methods, such as memory, handwritten records, or simple pillbox repackaging, to estimate the remaining amount of medication. This method is highly dependent on individual self-awareness and cognitive ability, and is prone to problems due to forgetfulness, calculation errors, or misunderstandings of medication regimens. Common consequences include: patients suddenly discontinuing medication due to not noticing insufficient dosage, affecting the continuity of chronic disease treatment and even causing health risks; or conversely, premature repurchase due to memory lapses, leading to medication stockpiling and expiration at home. Statistics show that the waste of medical resources and unplanned follow-up visits caused by poor medication management account for a significant proportion of medical expenditures.
[0004] From a clinical perspective, this deficiency also severely impacts the quality of medical decisions. During follow-up visits, when doctors ask, "How much medication is left?", patients typically only provide vague answers such as "about half a box left" or "almost finished." Doctors lack objective, quantifiable data to assess a patient's actual medication usage over a past treatment cycle, making it impossible to accurately determine whether a change in condition necessitates dosage adjustments or if the patient is not following instructions. This forces subsequent prescription adjustments (such as increasing or decreasing dosages or changing medications) to rely heavily on empirical speculation rather than precise data support, affecting the personalization and safety of treatment.
[0005] Existing technological attempts, such as simple medication reminder mobile apps, can only solve the problem of reminding users to "take medication on time," but cannot dynamically calculate and predict the remaining dosage. While some smart pillbox hardware can monitor the opening action, it suffers from high costs, requires specific equipment, and is disconnected from existing medical information systems, making it difficult to achieve large-scale adoption. Furthermore, it also lacks automatic linkage with prescription source and pharmacy dispensing data.
[0006] Therefore, the medical field urgently needs a systematic solution that can integrate data from the entire prescription, dispensing, and administration chain, and automatically, intelligently, and accurately track and predict the remaining amount of medication for each patient. This system should proactively provide early warnings, transforming passive service into proactive management, ensuring medication continuity for patients, while providing doctors with objective medication adherence data and accurate inventory information, thereby improving the overall quality of medical services, optimizing resource allocation, and ensuring patient medication safety. This invention is proposed based on this pressing practical need. Summary of the Invention
[0007] The purpose of this invention is to overcome the aforementioned shortcomings of the existing technology and provide a drug management system and method for managing and tracking patients' remaining medication. By constructing an intelligent management system, it automatically integrates prescription, dispensing, and medication feedback data, dynamically calculates and provides early warnings of remaining medication, thereby ensuring patients' medication continuity and avoiding medication interruptions or waste. Simultaneously, it provides doctors with objective medication adherence data to assist clinical decision-making, ultimately improving medication safety and the efficiency of medical services.
[0008] To achieve the above-mentioned objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a drug management system for managing and tracking the remaining amount of medication for patients, comprising: The central server is configured to store patient prescription data, drug dispensing records, and real-time inventory data. The doctor's terminal is connected to the central server and configured to generate and send electronic prescriptions. The electronic prescriptions include at least drug identification information, precise medication plan, total prescription quantity, and prescription validity period. The pharmacy terminal is connected to the central server and is configured to send confirmation information, including the actual amount dispensed, the dispensing time, and the batch number of the medicine, to the central server after the medicine is dispensed. The inventory calculation and tracking engine, deployed on the central server, is configured to dynamically calculate and maintain the real-time estimated remaining quantity of each drug for each patient based on the precise medication plan and patient feedback data. Its core computational logic satisfies: ; in, Indicates the initial stock. Indicates the first Theoretical consumption based on prescription within a given time period. Indicates the first based on patient feedback Consumption deviation correction amount within a time period This indicates the total number of time periods since the drug was issued; The intelligent early warning module is configured to monitor the real-time estimated remaining quantity in real time. , and when When the preset warning triggering conditions are met, a warning notification is generated and distributed. The patient terminal is configured to provide a visual interface to the patient, displaying the real-time estimated remaining amount. It also tracks and monitors the trends of changes in medication use, and receives medication feedback data submitted by patients.
[0009] Furthermore, the warning triggering conditions of the intelligent warning module include at least one combination of the following conditions: (1) Low drug dosage warning: When the real-time estimated remaining amount Below the preset absolute quantity threshold Triggered at time; (2) Time-based early warning: When based on the formula Calculated estimated remaining days Below the preset number of days threshold Triggered at time, where This is the average daily consumption calculated based on historical consumption data; (3) Adherence warning: When medication adherence rate is calculated based on patient feedback data Below the preset compliance threshold Triggered at time, where ; (4) Expiry date warning: When the remaining expiry date of the medicine is... Triggered earlier than the time it takes for the drug to run out, as predicted based on the current consumption rate.
[0010] Furthermore, the stock calculation and tracking engine is also configured as follows: Maintain multiple drug consumption models, including linear regular consumption models, on-demand dosing models, and treatment course phase models; The corresponding consumption model is automatically matched based on the medication characteristics in the electronic prescription or specified by medical personnel. In the absence of recent patient feedback data, the theoretically calculated value based on the matching consumption model is automatically used as... The default value.
[0011] Furthermore, it also includes a medication safety interaction module, configured as follows: Before the patient confirms taking the medication through the patient terminal, a medication safety check is performed, including checking whether the current time is within the medication time window allowed by the prescription, whether the current dose exceeds the maximum safe dose for a single dose, and whether there are any known incompatibilities. Only after all safety checks have passed will the medication feedback be recorded and the real-time estimated remaining dosage updated. .
[0012] On the other hand, the present invention provides a method for managing and tracking remaining drug quantities, comprising the following steps: S1: Prescription Data Standardization Steps: Receive and parse electronic prescriptions, extract drug identifiers. Standard dosage per dose Frequency of medication Route of administration and total dosage ; S2: Inventory Initialization and Traceability Steps: When dispensing medicines at the pharmacy, the actual amount dispensed is recorded by scanning the unique identification code of the medicine. Drug batch number and validity period and set the initial stock. ; S3: Intelligent Consumption Modeling Steps: Based on the medication frequency... The route of administration and drug type are used to determine the drug consumption model corresponding to this prescription allocation. Based on this model and standard dosage per dose, Calculate the theoretical consumption for each cycle. ; S4: Feedback-driven inventory update steps: Receive medication feedback data from the patient terminal and calculate the cycle consumption deviation. And based on the formula Periodically update the real-time estimated remaining amount ; S5: Multi-dimensional early warning judgment and triggering steps: Monitor the real-time estimated remaining amount Based on its calculation, the estimated number of remaining days Medication adherence rate and the remaining expiration date of the medicine At least one of the following: when any monitoring value meets the corresponding early warning condition, an early warning message is generated and pushed.
[0013] Furthermore, the intelligent consumption modeling step in S3 specifically includes: Build a consumption model library ; Establish a prescription feature to consumption model Mapping rules; Among them, the consumption model for matching linear patterns The prescription, its first The formula for calculating the theoretical consumption per cycle is: ; For the first The planned number of medication doses within a cycle is determined by the medication frequency. Decide.
[0014] Furthermore, the feedback-driven inventory update step in S4 also includes a medication safety verification sub-step: When receiving medication feedback data, it is verified whether the medication use complies with safety rules, which include at least one of the following: compliance with medication time window, safety of single dose, and incompatibility checks. Only medication feedback data that has passed safety checks is used in the calculation. And update .
[0015] Furthermore, the multi-dimensional early warning judgment and triggering steps in S5 adopt a tiered push strategy: For expiration date warnings and serious compliance warnings, immediately send them to multiple parties including patients, doctors, and pharmacists; For low medication dosage warnings, the number of days to be preset is pushed to the patient's terminal, and the doctor's terminal is prompted when the patient next contacts the medical institution. For general compliance reminders, they are mainly pushed to the patient's terminal.
[0016] Furthermore, it also includes data calibration and model optimization steps: When a drug replenishment event occurs, the amount of new disbursement will be based on the amount of new drugs distributed. Real-time estimated remaining inventory and calibration inventory before replenishment The benchmark for tracking; Using historical consumption data and feedback data, optimize the personalized consumption model parameters or the average daily consumption for this drug for this patient. The calculation.
[0017] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the drug surplus management and tracking method as described in any one of claims 5 to 9.
[0018] Compared with the prior art, the present invention has the following advantages and beneficial effects: At the individual patient management level, this system achieves a fundamental shift from relying on manual estimation to automated and precise tracking through its inventory calculation and tracking engine. It integrates multi-source data in real time, including prescription plans, pharmacy dispensing records, and patient medication feedback, dynamically calculating the estimated remaining amount of medication. This completely solves the pain points of patients "not remembering or accurately calculating" in traditional methods. This not only effectively avoids the risk of treatment interruption due to medication shortages but also prevents waste caused by expired medications, ensuring patient medication safety and economic benefits.
[0019] At the clinical medical service level, the system provides unprecedented transparency and data support. During follow-up visits, doctors can intuitively obtain precise trends in patients' past medication regimens and quantitative reports on medication adherence, providing a solid objective basis for evaluating treatment effectiveness and adjusting treatment plans, greatly improving the scientific rigor and individualization of treatment decisions. Simultaneously, the intelligent early warning module constructs a proactive and tiered service intervention mechanism. The system can proactively and promptly send differentiated reminders to patients, doctors, and pharmacists when there is insufficient medication, decreased adherence, or potential medication safety risks, upgrading the traditional passive response service model to proactive health management, significantly enhancing the continuity and accountability of medical services.
[0020] At the operational and public health levels, this invention has generated positive extended benefits. On the one hand, the system uses a medication safety interaction module for real-time verification, intervening in potential dosage errors and drug incompatibilities before patients take medication, thus building a new line of defense against medication errors. On the other hand, the anonymized group drug consumption data aggregated by the system provides valuable data insights for medical institutions and management departments to forecast drug demand, manage inventory in a refined manner, and formulate public health policies, helping to optimize resource allocation and control medical costs from a macro perspective. Attached Figure Description
[0021] Figure 1 This is a system architecture diagram of the present invention; Figure 2 The flowchart for the main method of invention; Figure 3 This is an example diagram of the linear model calculation of the present invention. Detailed Implementation
[0022] The present invention will be further described in detail below with reference to experimental examples and specific embodiments. However, this should not be construed as limiting the scope of the above-mentioned subject matter of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.
[0023] Example 1 This embodiment provides a drug management system for managing and tracking patients' remaining medications, including: The central server is configured to store patient prescription data, drug dispensing records, and real-time inventory data. The doctor's terminal is connected to the central server and configured to generate and send electronic prescriptions. The electronic prescriptions include at least drug identification information, precise medication plan, total prescription quantity, and prescription validity period. The pharmacy terminal is connected to the central server and is configured to send confirmation information, including the actual amount dispensed, the dispensing time, and the batch number of the medicine, to the central server after the medicine is dispensed. The inventory calculation and tracking engine, deployed on the central server, is configured to dynamically calculate and maintain the real-time estimated remaining quantity of each drug for each patient based on the precise medication plan and patient feedback data. Its core computational logic satisfies: ; in, Indicates the initial stock. Indicates the first Theoretical consumption based on prescription within a given time period. Indicates the first based on patient feedback Consumption deviation correction amount within a time period This indicates the total number of time periods since the drug was issued; The intelligent early warning module is configured to monitor the real-time estimated remaining quantity in real time. , and when When the preset warning triggering conditions are met, a warning notification is generated and distributed. The patient terminal is configured to provide a visual interface to the patient, displaying the real-time estimated remaining amount. It also tracks and monitors the trends of changes in medication use, and receives medication feedback data submitted by patients.
[0024] like Figure 1 The system architecture shown in this embodiment is deployed and implemented in a hospital environment: Central server: Deployed using cloud computing architecture, the database stores patient Li's electronic prescription data (including drug label "Amlodipine-5mg", single dose Ds=1 tablet, medication frequency F=1 time / day, total prescriptions Qtotal=30).
[0025] Doctor's terminal: Cardiologists issue the above prescriptions in the electronic medical record system, and the system automatically generates structured data and transmits it to the central server.
[0026] Pharmacy terminal: Pharmacists scan the prescription QR code and drug barcode to confirm the actual amount dispensed. The system sets the initial inventory. .
[0027] ; Inventory Calculation and Tracking Engine: Automatically calculates the cumulative planned consumption at midnight every day. On the 10th day of medication, n=10. Films (of which daily) (The patient confirmed via the app that they had taken the medication 9 times.) (pieces), to calculate the real-time estimated remaining quantity: piece; Intelligent early warning module: continuous monitoring value.
[0028] Patient terminal: Li's APP interface shows "21 Amlodipine tablets remaining, expected to last 21 days".
[0029] Example 2 The warning triggering conditions of the intelligent warning module include at least one combination of the following conditions: (1) Low dosage warning: When the above is mentioned, the remaining dosage is estimated in real time. Below the preset absolute quantity threshold Triggered at time; (2) Time-based early warning: When based on the formula Calculated estimated remaining days Below the preset number of days threshold Triggered at time, where This is the average daily consumption calculated based on historical consumption data; (3) Adherence warning: When medication adherence rate is calculated based on patient feedback data Below the preset compliance threshold Triggered at time, where ; (4) Expiry date warning: When the remaining expiry date of the medicine is... Triggered earlier than the time it takes for the drug to run out, as predicted based on the current consumption rate.
[0030] Continuing with the scenario of Example 1: Low dosage warning: Preset absolute threshold Film. When An alert is triggered when the number of tablets drops to 6.
[0031] Time-based alert: The system calculates the average daily consumption. If the number of days per day is calculated based on historical data, then the remaining number of days is estimated. Days. Preset number of days threshold. Heaven, when Triggered at a certain time. Not currently triggered.
[0032] Compliance warning: Calculate the compliance rate for cycles 1-10. Preset threshold In this example No warning was triggered. If another patient took the medication only 7 times during the same period, then... This will trigger a compliance warning.
[0033] Expiry date warning: Drug expiry date Current date: 2025-05-20; Remaining validity period: Days. The predicted time for the drug to run out needs... Heaven, long before Therefore, it is not triggered.
[0034] Example 3 The stock calculation and tracking engine is also configured as follows: Maintain multiple drug consumption models, including linear regular consumption models, on-demand dosing models, and treatment course phase models; The corresponding consumption model is automatically matched based on the medication characteristics in the electronic prescription or specified by medical personnel. In the absence of recent patient feedback data, the theoretically calculated value based on the matching consumption model is automatically used as... The default value.
[0035] Specifically, the model library maintained by the system. .
[0036] For the regular antihypertensive drug in Example 1, an automatic linear model is applied. Theoretical consumption Film / Day.
[0037] For ibuprofen capsules "taken when in pain" ( (Take as needed) Matching Model, default .
[0038] For antibiotics prescribed as "cefixime capsules, twice daily for 7 days," a treatment course model was used. Automatic setting from the 8th day .
[0039] Example 4 It also includes a medication safety interaction module, configured as follows: Before the patient confirms taking the medication through the patient terminal, a medication safety check is performed, including checking whether the current time is within the medication time window allowed by the prescription, whether the current dose exceeds the maximum safe dose for a single dose, and whether there are any known incompatibilities. Only after all safety checks have passed will the medication feedback be recorded and the real-time estimated remaining dosage updated. .
[0040] Patient Wang was treated with warfarin anticoagulation: The medication safety interaction module verifies the medication before Wang confirms his medication use via the app: Check if the current time is within the prescription's allowed time window of "8 p.m. ± 2 hours per day".
[0041] Verify whether the current dose of 3 mg exceeds the patient's individualized maximum safe dose of 5 mg.
[0042] Checking the patient's daily dietary records (entered via the APP), it was found that he consumed a large amount of spinach (rich in vitamin K) at noon. A contraindication reminder popped up: "Today's vitamin K intake may affect the efficacy of the medication. Please confirm whether you are taking the medication?" Only after Mr. Wang confirmed "continue taking the medication" did the system record the feedback and update the inventory.
[0043] Example 5 This embodiment provides a method for managing and tracking remaining drug quantities, such as... Figure 2 The method flowchart shown includes the following steps: S1: Prescription Data Standardization Steps: Receive and parse electronic prescriptions, extract drug identifiers. Standard dosage per dose Frequency of medication Route of administration and total dosage ; S2: Inventory Initialization and Traceability Steps: When dispensing medicines at the pharmacy, the actual amount dispensed is recorded by scanning the unique identification code of the medicine. Drug batch number and validity period and set the initial stock. ; S3: Intelligent Consumption Modeling Steps: Based on the medication frequency... The route of administration and drug type are used to determine the drug consumption model corresponding to this prescription allocation. Based on this model and standard dosage per dose, Calculate the theoretical consumption for each cycle. ; S4: Feedback-driven inventory update steps: Receive medication feedback data from the patient terminal and calculate the cycle consumption deviation. And based on the formula Periodically update the real-time estimated remaining amount ; S5: Multi-dimensional early warning judgment and triggering steps: Monitor the real-time estimated remaining amount Based on its calculation, the estimated number of remaining days Medication adherence rate and the remaining expiration date of the medicine At least one of the following: when any monitoring value meets the corresponding early warning condition, an early warning message is generated and pushed.
[0044] Taking patient Chen's insulin management as an example: S1: The prescription analysis yields "Aspart insulin, 10 units each time, three times a day" ( ).
[0045] S2: Issue one 300-unit pen refill ( ),set up Scan record batch number .
[0046] S3: Matching Model, Daily Theoretical Consumption unit.
[0047] S4: The actual usage over 3 days, as reported by Chen's APP, was 85 units (theoretical 90 units). Calculation unit.
[0048] S5: Calculation unit.
[0049] S6: Calculation Heaven, pre-set The sky has been cleared, triggering an alert.
[0050] Example 6 The intelligent consumption modeling steps in S3 specifically include: Build a consumption model library ; Establish a prescription feature to consumption model Mapping rules; Among them, the consumption model for matching linear patterns The prescription, its first The formula for calculating the theoretical consumption per cycle is: ; For the first The planned number of medication doses within a cycle is determined by the medication frequency. Decide.
[0051] like Figure 3 The following is a schematic diagram of the linear model calculation: Prescription feature vector Mapped to .
[0052] For twice daily The medication system divides a day into two cycles. Each cycle .
[0053] Isosorbide mononitrate sustained-release tablets ,but: ; Daily total theoretical consumption piece.
[0054] Example 7: The feedback-driven inventory update step in S4 also includes a medication safety verification sub-step: When receiving medication feedback data, it is verified whether the medication use complies with safety rules, which include at least one of the following: compliance with medication time window, safety of single dose, and incompatibility checks. Only medication feedback data that has passed safety checks is used in the calculation. And update .
[0055] Specifically, the medication safety verification process is as follows: Patient Zhao submitted feedback stating, "I have taken 0.25mg of digoxin today."
[0056] The system performs the following verification sub-steps: Time window check: The prescription requires "8:00 AM daily", the current time is 7:45 AM, within the allowable ±1 hour.
[0057] Dosage safety: Based on Mr. Zhao's recent serum potassium level of 3.2 mmol / L (below normal), the calculated upper limit of the safe dose was adjusted to 0.125 mg. The current dose of 0.25 mg exceeds this limit, triggering the warning: "Serious potassium is low; please check the digoxin dosage!" Incompatibilities: A check revealed that Mr. Zhao was simultaneously taking furosemide (a potassium-depleting diuretic), and a notification popped up: "You are currently using a potassium-depleting medication; please monitor your blood potassium levels."
[0058] Example 8 The multi-dimensional early warning judgment and triggering steps in S5 adopt a hierarchical push strategy: For expiration date warnings and serious compliance warnings, immediately send them to multiple parties including patients, doctors, and pharmacists; For low medication dosage warnings, the number of days to be preset is pushed to the patient's terminal, and the doctor's terminal is prompted when the patient next contacts the medical institution. For general compliance reminders, they are mainly pushed to the patient's terminal.
[0059] Specifically, the logic for tiered early warning push: Scenario A (High Priority): Patient Liu's remaining insulin validity period The medication was prescribed for 20 days, but the dosage was predicted to last only 20 days, triggering an expiration date warning. A red alert was immediately sent to Mr. Liu, the endocrinologist, and the outpatient pharmacy.
[0060] Scenario B (Medium Priority): Patient Zhou's antihypertensive medication Day (threshold) (day), the system in its The system sends a yellow reminder to the patient's app two days in advance: "Your amlodipine tablets are expected to run out in 7 days." It also marks the reminder in the electronic medical record so that it will automatically pop up on the doctor's workstation when the patient visits the doctor next time.
[0061] Scenario C (Low Priority - Health Reminder): Patient Wu's adherence rate to hypoglycemic medication (in the state) (Within a certain period), the system pushes a non-urgent health guidance message to its app every Monday: "There were 2 missed doses last week. Regular medication will be more effective." This type of message is not defined as an emergency warning and is mainly for educational and guidance purposes.
[0062] Example 9 It also includes data calibration and model optimization steps: When a drug replenishment event occurs, the amount of new disbursement will be based on the amount of new drugs distributed. Real-time estimated remaining inventory and calibration inventory before replenishment The benchmark for tracking; Using historical consumption data and feedback data, optimize the personalized consumption model parameters or the average daily consumption for this drug for this patient. The calculation.
[0063] Specifically, the calibration and optimization process is as follows: The patient, Zheng, initially received losartan potassium tablets. The film was tracked until the 12th day. piece.
[0064] Calibration: Zheng had a follow-up visit and received a new prescription, picking up 14 tablets again. The system automatically calibrates: piece; The new inventory tracking cycle starts with 16 wafers.
[0065] Optimization: Analysis of previous cycle data: Planned consumption was 12 tablets, actual consumption was 12 tablets, deviation. The adherence rate is 100%. The system has increased the patient's personalized medication parameter "on-time medication rate" from the default 85% to 95%, and a more accurate model will be used for future early warning calculations.
[0066] Example 10 When the computer program is executed by the processor, it implements the above-mentioned method for managing and tracking the remaining amount of medicines.
[0067] The system software distribution package includes a DVD-ROM containing the computer program.
[0068] When the hospital's information department installs the program onto the server, the processor executes the program code to implement the method of any of the above embodiments.
[0069] The program contains multiple modules: the prescription parsing module implements S1; the barcode processing module implements S2; the model calculation engine implements S3-S5; the message service module implements S6; and the data cleaning module implements the calibration and optimization function of Example 9.
[0070] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A drug management system for managing and tracking the remaining amount of medication for patients, characterized in that, include: The central server is configured to store patient prescription data, drug dispensing records, and real-time inventory data. The doctor's terminal is connected to the central server and configured to generate and send electronic prescriptions. The electronic prescriptions include at least drug identification information, precise medication plan, total prescription quantity, and prescription validity period. The pharmacy terminal is connected to the central server and is configured to send confirmation information, including the actual amount dispensed, the dispensing time, and the batch number of the medicine, to the central server after the medicine is dispensed. The inventory calculation and tracking engine, deployed on the central server, is configured to dynamically calculate and maintain the real-time estimated remaining quantity of each drug for each patient based on the precise medication plan and patient feedback data. Its core computational logic satisfies: ; in, Indicates the initial stock. Indicates the first Theoretical consumption based on prescription within a given time period. Indicates the first based on patient feedback Consumption deviation correction amount within a time period This indicates the total number of time periods since the drug was issued; The intelligent early warning module is configured to monitor the real-time estimated remaining quantity in real time. , and when When the preset warning triggering conditions are met, a warning notification is generated and distributed. The patient terminal is configured to provide a visual interface to the patient, displaying the real-time estimated remaining amount. It also tracks and monitors the trends of changes in medication use, and receives medication feedback data submitted by patients.
2. The system according to claim 1, characterized in that, The warning triggering conditions of the intelligent warning module include at least one combination of the following conditions: (1) Low drug dosage warning: When the real-time estimated remaining amount Below the preset absolute quantity threshold Triggered at time; (2) Time-based early warning: When based on the formula Calculated estimated remaining days Below the preset number of days threshold Triggered at time, where This is the average daily consumption calculated based on historical consumption data; (3) Adherence warning: When medication adherence rate is calculated based on patient feedback data Below the preset compliance threshold Triggered at time, where ; (4) Expiry date warning: When the remaining expiry date of the medicine is... Triggered earlier than the time it takes for the drug to run out, as predicted based on the current consumption rate.
3. The system according to claim 1, characterized in that, The stock calculation and tracking engine is also configured as follows: Maintain multiple drug consumption models, including linear regular consumption models, on-demand dosing models, and treatment course phase models; The corresponding consumption model is automatically matched based on the medication characteristics in the electronic prescription or specified by medical personnel. In the absence of recent patient feedback data, the theoretically calculated value based on the matching consumption model is automatically used as... The default value.
4. The system according to claim 1, characterized in that, It also includes a medication safety interaction module, configured as follows: Before the patient confirms taking the medication through the patient terminal, a medication safety check is performed, including checking whether the current time is within the medication time window allowed by the prescription, whether the current dose exceeds the maximum safe dose for a single dose, and whether there are any known incompatibilities. Only after all safety checks have passed will the medication feedback be recorded and the real-time estimated remaining dosage updated. .
5. A method for managing and tracking remaining drug quantities, characterized in that, Includes the following steps: S1: Prescription Data Standardization Steps: Receive and parse electronic prescriptions, extract drug identifiers. Standard dosage per dose Frequency of medication Route of administration and total dosage ; S2: Inventory Initialization and Traceability Steps: When dispensing medicines at the pharmacy, the actual amount dispensed is recorded by scanning the unique identification code of the medicine. Drug batch number and validity period And set the initial stock. ; S3: Intelligent Consumption Modeling Steps: Based on the medication frequency... The route of administration and drug type are used to determine the drug consumption model corresponding to this prescription allocation. Based on this model and standard dosage per dose, Calculate the theoretical consumption for each cycle. ; S4: Feedback-driven inventory update steps: Receive medication feedback data from the patient terminal and calculate the cycle consumption deviation. And based on the formula Periodically update the real-time estimated remaining amount ; S5: Multi-dimensional early warning judgment and triggering steps: Monitor the real-time estimated remaining amount Based on its calculation, the estimated number of remaining days Medication adherence rate and the remaining expiration date of the medicine At least one of the following: when any monitoring value meets the corresponding early warning condition, an early warning message is generated and pushed.
6. The method according to claim 5, characterized in that, The intelligent consumption modeling steps in S3 specifically include: Build a consumption model library ; Establish a prescription feature to consumption model Mapping rules; Among them, the consumption model for matching linear patterns The prescription, its first The formula for calculating the theoretical consumption per cycle is: ; For the first The planned number of medication doses within a cycle is determined by the medication frequency. Decide.
7. The method according to claim 5, characterized in that, The feedback-driven inventory update step in S4 also includes a medication safety verification sub-step: When receiving medication feedback data, it is verified whether the medication use complies with safety rules, which include at least one of the following: compliance with medication time window, safety of single dose, and incompatibility checks. Only medication feedback data that has passed safety checks is used in the calculation. And update .
8. The method according to claim 5, characterized in that, The multi-dimensional early warning judgment and triggering steps in S5 adopt a hierarchical push strategy: For expiration date warnings and serious compliance warnings, immediately send them to multiple parties including patients, doctors, and pharmacists; For low medication dosage warnings, the number of days to be preset is pushed to the patient's terminal, and the doctor's terminal is prompted when the patient next contacts the medical institution. For general compliance reminders, they are mainly pushed to the patient's terminal.
9. The method according to claim 5, characterized in that, It also includes data calibration and model optimization steps: When a drug replenishment event occurs, the amount of new disbursement will be based on the amount of new drugs distributed. Real-time estimated remaining inventory and calibration inventory before replenishment The benchmark for tracking; Using historical consumption data and feedback data, optimize the personalized consumption model parameters or the average daily consumption for this drug for this patient. The calculation.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the drug surplus management and tracking method as described in any one of claims 5 to 9.