Intelligent drug purchase quantity prediction method based on medical insurance consumption data

By constructing a drug demand feature matrix using medical insurance consumption data and combining it with time series decomposition and ensemble learning models, the problems of low accuracy and delayed response in traditional drug procurement forecasting have been solved, enabling more accurate procurement volume forecasting and inventory management.

CN120996698APending Publication Date: 2025-11-21SICHUAN KAICHENG CLOUD TECHNOLOGY DEVELOPMENT CO LTD

Patent Information

Application Number
CN202511018310.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Traditional drug procurement methods rely on manual experience or simple statistics, failing to effectively consider seasonal fluctuations and changes in patient structure, resulting in low prediction accuracy, insufficient data utilization, and difficulty in adjusting procurement strategies in a timely manner when responding to public health emergencies.

Method used

By preprocessing medical insurance consumption data, a drug demand feature matrix is ​​constructed. Time series decomposition and ensemble learning models are used to predict drug procurement volume. LSTM neural networks are combined to capture long-term time dependencies, and a safety stock threshold is set to optimize inventory management.

Benefits of technology

It improved the accuracy of drug procurement forecasting, reduced inventory backlog and shortages, and enhanced the flexibility and responsiveness of procurement strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996698A_ABST
    Figure CN120996698A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of drug purchase quantity prediction, in particular to an intelligent drug purchase quantity prediction method using medical insurance consumption data, comprising the following steps: S1, acquiring historical medical insurance consumption data including drug names, sales quantity, sales time, medical institution information and patient classification information; s2, preprocessing the medical insurance consumption data, including data cleaning, missing value filling and abnormal value correction, to form a standardized data set; and S3, based on the standardized data set, a drug demand feature matrix X is constructed, and each row represents a drug consumption record of one time period. According to the intelligent drug purchase quantity prediction method based on the medical insurance consumption data, trend, seasonal and random fluctuations are decomposed and separated through a time sequence, and noise interference is reduced; and combining an XGBoost and LSTM integrated model, comprehensively capturing a linear and nonlinear relationship, reducing a final prediction error rate, dynamically calculating a safe inventory threshold value, and avoiding excessive stockpiling of drugs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drug procurement volume forecasting technology, specifically a method for intelligently forecasting drug procurement volume using medical insurance consumption data. Background Technology

[0002] Drug procurement management refers to the scientific management of the entire process of drug procurement by medical institutions or pharmaceutical distribution companies through systematic methods, including demand forecasting, supplier selection, procurement planning, inventory control, and cost optimization, thereby achieving supply assurance, cost control, quality and safety, and efficiency improvement.

[0003] Traditional procurement methods rely mainly on manual experience or simple statistical methods, which have the following problems: low prediction accuracy: they do not take into account factors such as seasonal fluctuations and changes in patient structure, leading to inventory backlogs or shortages; insufficient data utilization: medical insurance consumption data contains rich information on drug usage, but it is not fully used for intelligent prediction; and delayed response: in the event of a public health emergency (such as an epidemic), traditional methods are unable to adjust procurement strategies in a timely manner.

[0004] To address the aforementioned issues, we propose an improved method for intelligently predicting drug procurement volume based on medical insurance consumption data. Summary of the Invention

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] This invention provides a method for intelligently predicting drug procurement volume using medical insurance consumption data, comprising the following steps:

[0007] S1. Obtain historical medical insurance consumption data, including drug name, sales quantity, sales time, medical institution information, and patient classification information;

[0008] S2. Preprocess the medical insurance consumption data, including data cleaning, missing value imputation and outlier correction, to form a standardized dataset;

[0009] S3. Based on the standardized dataset, construct a drug demand feature matrix X, where each row represents a drug consumption record for a time period, and each column represents a feature variable affecting drug demand. The mathematical expression of the feature matrix X is as follows:

[0010]

[0011] S4. Use a time series decomposition algorithm to perform trend analysis on drug consumption data and extract the long-term trend component T. t Seasonal component S t and random fluctuation component R t The calculation formula is as follows:

[0012] Yt =T t +S t +R t

[0013] Among them, Y t This represents the actual drug consumption in the t-th time period;

[0014] S5. Based on the feature matrix X and the decomposed time series components, train a machine learning prediction model and output the predicted value of drug procurement volume for future periods.

[0015] S6. Generate drug procurement recommendations based on the forecast results and optimize inventory management strategies.

[0016] As a preferred embodiment of the present invention, the data cleaning in step S2 includes deleting duplicate records, correcting incorrectly coded drug information, standardizing the naming rules for medical institutions and patient classifications, and filling in missing sales data using linear interpolation. The specific calculation formula is as follows:

[0017]

[0018] Among them, y fill For the fill value, y prev and y next t represents the sales quantity of the nearest valid data point before and after the missing time point. next and t prev These represent the timestamps of the nearest valid data points before and after the missing time point, t missing The timestamp for the missing time point.

[0019] As a preferred technical solution of the present invention, the feature matrix X in step S3 includes the following feature variables: historical drug sales volume, medical institution level, seasonality index, patient age distribution and medical insurance reimbursement ratio.

[0020] As a preferred embodiment of the present invention, the time series decomposition in step S4 employs the STL algorithm, specifically using the sliding window smoothing method to calculate the trend component T. t Fourier transform was used to extract the seasonal component S. t The remaining part is taken as the random fluctuation component R. t .

[0021] As a preferred embodiment of the present invention, the machine learning prediction model in step S5 employs an ensemble learning method, including the following steps:

[0022] a. Use the random forest algorithm to rank features by importance and screen key influencing variables;

[0023] b. Preliminary predictions are made using the XGBoost model, with the objective function as follows:

[0024]

[0025] Where θ represents the model parameters and λ represents the regularization coefficient. For the first The actual drug procurement volume of a sample For the first The model prediction value for each sample. The total number of training samples;

[0026] c. Combine LSTM neural networks to capture long-term time dependencies and optimize prediction results.

[0027] As a preferred embodiment of the present invention, the LSTM neural network structure in step c includes:

[0028] Input layer: Receives feature matrix X and time series components T t S t R t ;

[0029] Hidden layers: two LSTM units, each with 64 neurons;

[0030] Output layer: Fully connected layer, outputting the predicted drug procurement volume for the next κ periods.

[0031] As a preferred embodiment of the present invention, the method for generating procurement suggestions in step S6 includes:

[0032] a. Set the safety stock threshold Q safe The calculation formula is as follows:

[0033] Q safe =μ+z·σ

[0034] Where μ is the average demand, z is the standard deviation, and σ is the confidence level coefficient;

[0035] b. When forecasting purchase volume A replenishment alert is triggered when the inventory falls below the difference between the current inventory and the safety stock.

[0036] c. Adjust the procurement plan dynamically based on the supplier's delivery cycle.

[0037] 8. The intelligent prediction method for drug procurement volume using medical insurance consumption data according to claim 1, characterized in that it further includes a visualization module for the prediction results, used to generate a drug demand trend chart, compare historical data with predicted values; mark periods of abnormal fluctuations and provide cause analysis; and support multi-dimensional data drilling by medical institution and drug category.

[0038] The beneficial effects of this invention are:

[0039] I. This intelligent prediction method for drug procurement volume using medical insurance consumption data separates trends, seasonality, and random fluctuations through time series decomposition to reduce noise interference; and combines the XGBoost and LSTM ensemble model to comprehensively capture linear and nonlinear relationships, thereby reducing the final prediction error rate.

[0040] Second, this intelligent prediction method for drug procurement volume using medical insurance consumption data dynamically calculates the safety stock threshold based on the confidence level coefficient and real-time demand fluctuations, thus avoiding excessive stockpiling of drugs. Attached Figure Description

[0041] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0042] In the attached diagram:

[0043] Figure 1 This is a flowchart illustrating the intelligent prediction method for drug procurement volume using medical insurance consumption data, as described in this invention.

[0044] Figure 2 This is a schematic diagram illustrating the ensemble learning method used in machine learning prediction models.

[0045] Figure 3 This is a schematic diagram of the procurement process; Detailed Implementation

[0046] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0047] Example: Figures 1-3 As shown, the intelligent prediction method for drug procurement volume using medical insurance consumption data includes the following steps:

[0048] S1. Obtain historical medical insurance consumption data, including drug name, sales quantity, sales time, medical institution information, and patient classification information;

[0049] The consumption data for antihypertensive drugs from January to April 2022 were obtained from the medical insurance system. The raw data is shown in the table below.

[0050]

[0051] S2. Preprocess the medical insurance consumption data, including data cleaning, missing value imputation and outlier correction, to form a standardized dataset;

[0052] The data cleaning in step S2 includes deleting duplicate records, correcting incorrectly coded drug information, standardizing naming rules for medical institutions and patient classifications, and filling in missing sales data using linear interpolation. The specific calculation formula is as follows:

[0053]

[0054] Among them, y fill For the fill value, y prev and y next t represents the sales quantity of the nearest valid data point before and after the missing time point. next and t prev These represent the timestamps of the nearest valid data points before and after the missing time point, t missing The timestamp for the missing time point.

[0055] Linear interpolation was used to fill in the missing data for January, according to the formula above:

[0056]

[0057] And so on, all missing data from January to April 2022 were calculated.

[0058] S3. Based on the standardized dataset, construct a drug demand feature matrix X, where each row represents a drug consumption record for a time period, and each column represents a feature variable affecting drug demand. The mathematical expression of the feature matrix X is as follows:

[0059]

[0060] In step S3, the feature matrix X includes the following feature variables: historical drug sales volume, medical institution level, seasonality index, patient age distribution, and medical insurance reimbursement ratio.

[0061] The feature matrix X is constructed after monthly aggregation, as shown in the table below:

[0062]

[0063]

[0064] S4. Use a time series decomposition algorithm to perform trend analysis on drug consumption data and extract the long-term trend component T. t Seasonal component S t and random fluctuation component Rt The calculation formula is as follows:

[0065] Y t =T t +S t +R t

[0066] Among them, Y t This represents the actual drug consumption in the t-th time period;

[0067] The time series decomposition in step S4 uses the STL algorithm, specifically the sliding window smoothing method to calculate the trend component T. t Fourier transform was used to extract the seasonal component S. t The remaining part is taken as the random fluctuation component R. t .

[0068]

[0069] Trend component T t The seasonal component S is the average of a three-month sliding window. t The annual periodic harmonic components extracted by Fourier transform, random fluctuation R t For Y t -(T t +S t ).

[0070] S5. Based on the feature matrix X and the decomposed time series components, train a machine learning prediction model and output the predicted value of drug procurement volume for future periods.

[0071] The machine learning prediction model in step S5 employs an ensemble learning approach, including the following steps:

[0072] a. Use the random forest algorithm to rank features by importance and screen key influencing variables;

[0073] Parameter settings: Number of decision trees is 100, maximum depth is 5, and feature importance is calculated using the Gini impurity decreasing mean.

[0074] The output results are shown in the table below:

[0075]

[0076] Screening criteria: Retain features with an importance score > 0.1 (i.e., exclude "Medical Institution Level").

[0077] b. Preliminary predictions are made using the XGBoost model, with the objective function as follows:

[0078]

[0079] Where θ represents the model parameters and λ represents the regularization coefficient. For the first The actual drug procurement volume of a sample For the first The model prediction value for each sample. The total number of training samples;

[0080] Parameter settings: learning rate η is 0.1, maximum tree depth is 6, regularization coefficient λ is 0.5, and number of iterations (n) is 100.

[0081] The data was input sequentially (the training set was from January 2022 to April 2023, and the validation set was from July to September 2023), feature standardization was performed, and the prediction results were validated. The results are shown in the table below:

[0082] Time period Actual sales Forecasted sales absolute error 2023-07 490 476 14 2023-08 480 465 15 2023-09 510 498 12

[0083] c. Combine LSTM neural networks to capture long-term time dependencies and optimize prediction results.

[0084] The LSTM neural network structure in step c includes:

[0085] Input layer: Receives feature matrix X and time series components T t S t R t ;

[0086] Hidden layers: two LSTM units, each with 64 neurons;

[0087] Output layer: Fully connected layer, outputting the predicted drug procurement volume for the next κ periods.

[0088] The comparison of model prediction results is shown in the table below:

[0089] Model MAE (box) Prediction time (ms / test) XGBoost 13.2 15 LSTM 9.8 45 Integration results 8.5 60

[0090] S6. Generate drug procurement recommendations based on the forecast results and optimize inventory management strategies.

[0091] The procurement suggestion generation method in step S6 includes:

[0092] a. Set the safety stock threshold Q safe The calculation formula is as follows:

[0093] Q safe =μ+z·σ

[0094] Where μ is the average demand, z is the standard deviation, and σ is the confidence level coefficient;

[0095] b. When forecasting purchase volume A replenishment alert is triggered when the inventory falls below the difference between the current inventory and the safety stock.

[0096] c. Adjust the procurement plan dynamically based on the supplier's delivery cycle.

[0097] Safety stock calculation: Q safe =μ+z·σ=450+1.96×25≈500(box)

[0098] Where μ is the average monthly sales in 2023; σ is the standard deviation (based on data from 2022 to 2023); and z is the confidence level coefficient. According to the characteristics of the pharmaceutical industry, for conventional drugs: service level ≥ 95% (corresponding to z = 1.96).

[0099] It also includes a visualization module for forecast results, which generates drug demand trend charts, compares historical data with forecast values, marks periods of abnormal fluctuations and provides cause analysis, and supports multi-dimensional data drill-down by medical institution and drug category.

[0100] Finally, it should be noted that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for intelligently predicting drug procurement volume using medical insurance consumption data, characterized in that: Includes the following steps: S1. Obtain historical medical insurance consumption data, including drug name, sales quantity, sales time, medical institution information, and patient classification information; S2. Preprocess the medical insurance consumption data, including data cleaning, missing value imputation and outlier correction, to form a standardized dataset; S3. Based on the standardized dataset, construct a drug demand feature matrix X, where each row represents a drug consumption record for a time period, and each column represents a feature variable affecting drug demand. The mathematical expression of the feature matrix X is as follows: S4. Use a time series decomposition algorithm to perform trend analysis on drug consumption data and extract the long-term trend component T. t Seasonal component S t and random fluctuation component R t The calculation formula is as follows: Y t =T t +S t +R t Among them, Y t This represents the actual drug consumption in the t-th time period; S5. Based on the feature matrix X and the decomposed time series components, train a machine learning prediction model and output the predicted value of drug procurement volume for future periods. S6. Generate drug procurement recommendations based on the forecast results and optimize inventory management strategies.

2. The intelligent prediction method for drug procurement volume using medical insurance consumption data according to claim 1, characterized in that, The data cleaning in step S2 includes deleting duplicate records, correcting incorrectly coded drug information, standardizing naming rules for medical institutions and patient classifications, and filling in missing sales data using linear interpolation. The specific calculation formula is as follows: Among them, y fill For the fill value, y prev and y next t represents the sales quantity of the nearest valid data point before and after the missing time point. next and t prev These represent the timestamps of the nearest valid data points before and after the missing time point, t missing The timestamp for the missing time point.

3. The intelligent prediction method for drug procurement volume using medical insurance consumption data according to claim 1, characterized in that, In step S3, the feature matrix X includes the following feature variables: historical drug sales volume, medical institution level, seasonality index, patient age distribution, and medical insurance reimbursement ratio.

4. The intelligent prediction method for drug procurement volume using medical insurance consumption data according to claim 1, characterized in that, The time series decomposition in step S4 employs the STL algorithm, specifically using the sliding window smoothing method to calculate the trend component T. i Fourier transform was used to extract the seasonal component S. t The remaining part is taken as the random fluctuation component R. t .

5. The intelligent prediction method for drug procurement volume using medical insurance consumption data according to claim 1, characterized in that, The machine learning prediction model in step S5 employs an ensemble learning method, including the following steps: a. Use the random forest algorithm to rank features by importance and screen key influencing variables; b. Preliminary predictions are made using the XGBoost model, with the objective function as follows: Where θ represents the model parameters and λ represents the regularization coefficient. Let i be the actual drug purchase volume of the i-th sample. Let i be the model prediction value for the i-th sample. The total number of training samples; c. Combine LSTM neural networks to capture long-term time dependencies and optimize prediction results.

6. The intelligent prediction method for drug procurement volume using medical insurance consumption data according to claim 5, characterized in that, The LSTM neural network structure in step c includes: Input layer: Receives the feature matrix X and the time series component T t S t R t ; Hidden layers: two LSTM units, each with 64 neurons; Output layer: Fully connected layer, outputting the predicted drug procurement volume for the next κ periods.

7. The intelligent prediction method for drug procurement volume using medical insurance consumption data according to claim 1, characterized in that, The method for generating procurement suggestions in step S6 includes: a. Set the safety stock threshold Q safe The calculation formula is as follows: Q safe =μ+z·σ Where μ is the average demand, z is the standard deviation, and σ is the confidence level coefficient; b. When forecasting purchase volume A replenishment alert is triggered when the inventory falls below the difference between the current inventory and the safety stock. c. Adjust the procurement plan dynamically based on the supplier's delivery cycle.

8. The intelligent prediction method for drug procurement volume using medical insurance consumption data according to claim 1, characterized in that, It also includes a visualization module for forecast results, used to generate drug demand trend charts, compare historical data with forecast values, mark periods of abnormal fluctuations and provide cause analysis, and support multi-dimensional data drill-down by medical institution and drug category.

Citation Information

Patent Citations

  • Medical data sales prediction method and system of hybrid model based on time series

    CN116703455A

  • Intelligent warehousing system and method based on supply chain management

    CN118154089A

  • Drug inventory optimization method and system based on privacy calculation and deep learning

    CN118333518A

  • Intelligent medicine inventory management and optimization system

    CN119130332A

  • Visual display method based on multi-source economic data mining

    CN120277146A

Cited By

  • Demand degree and inventory optimization-based pharmaceutical data dynamic management method and system

    CN121481432A