A medicine supply analysis management system and method based on big data
By configuring dedicated analysis rules for the basic data units and management indicators of the pharmaceutical supply chain, combining semantic similarity and hierarchical analysis method data matching, and dynamically generating analysis rules, the problems of single rules and imprecise data processing in traditional pharmaceutical supply analysis and management are solved, and refined management and scientific improvement of the supply chain are achieved.
Patent Information
- Application Number
- CN202510953736.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-07-11
AI Technical Summary
Traditional pharmaceutical supply analysis and management uses a unified model to process drug classification data. It is unable to configure dedicated analysis rules for different data types and management indicators, making it difficult to achieve effective management of key indicators of supply stability and cost control. Existing big data-based solutions have shortcomings in data processing precision, rule flexibility, and analysis accuracy.
By acquiring historical data and decomposing it into basic data units, the first and second analysis rules are configured for each basic data unit and management indicator, and a corresponding rule base is generated. Data matching is performed through the semantic similarity algorithm and hierarchical analysis method, and the third and fourth analysis rules are dynamically generated. The B+ tree index and rule execution graph are combined to optimize rule execution and generate supply trend forecasts and strategy recommendations.
It has achieved refined management of the pharmaceutical supply chain, improved the precision of data processing and the flexibility of rules, improved the accuracy of analysis and the scientificity and effectiveness of supply chain management, and ensured supply stability and cost control.
Smart Images

Figure CN120452724B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a medicine supply analysis management system and method based on big data. Background Art
[0002] With the expansion of the pharmaceutical industry and the diversification of medical needs, the complexity of pharmaceutical supply chain management has increased dramatically. The amount of inventory change data and purchase order data is huge and changes dynamically. Traditional manual experience and simple statistical methods are difficult to meet the timeliness and accuracy requirements for supply trend forecasting and strategy formulation. There is an urgent need for a scientific and efficient analysis and management system to ensure the stability of pharmaceutical supply.
[0003] Traditional pharmaceutical supply analysis and management uses a unified model to process drug classification data. It is unable to configure dedicated analysis rules for different data types and management indicators, making it difficult to achieve effective management of key indicators of supply stability and cost control. Existing big data-based solutions have shortcomings in data processing precision, rule flexibility, and analysis accuracy. Summary of the Invention
[0004] The technical problem solved by the present invention is that traditional pharmaceutical supply analysis and management uses a unified model to process drug classification data, and is unable to configure dedicated analysis rules for different data types and management indicators, making it difficult to achieve effective management of key indicators of supply stability and cost control. Existing big data-based solutions have shortcomings in data processing precision, rule flexibility and analysis accuracy.
[0005] To solve the above technical problems, the present invention provides the following technical solution: a medicine supply analysis and management method based on big data, comprising the following steps:
[0006] Step S1: Acquire historical data and decompose it into basic data units, configure the first analysis rule and the second analysis rule for each basic data unit and management indicator, and generate a corresponding rule base;
[0007] Step S2: storing the corresponding rule bases into corresponding rule spaces respectively;
[0008] Step S3: Decomposing the pharmaceutical supply data to be analyzed into data elements and basic data units, performing a validity check on the data elements, and performing rule matching on the data elements that pass the check. Specifically, the steps include:
[0009] Matching the verified data elements with the basic data units in terms of data type, business meaning and time granularity based on a semantic similarity algorithm;
[0010] The semantic similarity algorithm uses the hierarchical analysis method to determine the dimension weights. The sum of the weights of the data type and business meaning is not less than a first ratio threshold, and the time granularity weight is not higher than a second ratio threshold. It is verified through a business scenario survey and data matching in the pharmaceutical industry.
[0011] The data type is used to check whether the data type is consistent, and the data type is compared through data metadata information;
[0012] The business meaning matches a pharmaceutical field data classification hierarchy generated based on historical data analysis, wherein the hierarchy adopts a hierarchical structure including a category structure of drug classification inventory data classification and supplier classification;
[0013] The time granularity is used to compare whether the data time unit is at the daily level, weekly level, monthly level, quarterly level and annual level;
[0014] The category structure includes large categories, medium categories, and detailed categories. Based on the overlap ratio of path lengths, the hierarchical distance between the data elements and the basic data units in the category structure is determined by calculating the node path overlap between the data elements and the basic data units. A higher path overlap indicates a smaller hierarchical distance and a higher matching degree.
[0015] Determining whether the data element and the basic data unit are successfully matched based on the comprehensive score of the data type, business meaning, and time granularity, and determining that the match is successful when the comprehensive score is greater than or equal to a third ratio threshold;
[0016] In response to a successful match of any data element, obtaining a first analysis rule associated with the basic data unit from the first rule space for generating a drug purchase recommendation;
[0017] Based on the business attributes of the data elements, obtaining a second analysis rule set associated with the current management indicator from the second rule space;
[0018] The business attributes include drug category, supplier level, and inventory type;
[0019] The preset management indicator mapping table maps the business attributes of data elements to corresponding management indicators;
[0020] According to the mapping result, a second analysis rule set associated with the target management indicator in the second rule space is extracted for subsequent scenario parameter adjustment;
[0021] Step S4: Input parameters for the data elements and generate a third analysis rule and a fourth analysis rule;
[0022] Step S5: Step S5 includes the following sub-steps:
[0023] Step S501: Create a relationship table between data elements and rules;
[0024] The association table records the third analysis rule and the fourth analysis rule corresponding to each data element, and marks the data collection time, rule validity period and scenario parameters, and realizes the one-to-one correspondence between data elements and rules through unique identifiers;
[0025] Step S502: creating an analysis execution space, wherein the analysis execution space includes a data storage area, a third rule execution area, and a fourth rule application area;
[0026] The data storage area is used to store data elements;
[0027] The third rule execution area is used to execute the third analysis rule including the timeliness constraint;
[0028] The fourth rule application area is used to apply a fourth analysis rule including a scene adaptation logic;
[0029] Marking the time association between the data element and the third analysis rule and the scene association between the data element and the fourth analysis rule through a B+ tree index;
[0030] Step S503: partition and store the data elements according to the combination of drug classification, time series, and scenario type, and establish a B+ tree index in each partition to support efficient query;
[0031] The drug classification is used to distinguish different types of drug data;
[0032] The time series is used to segment data according to the data collection time;
[0033] The scene type divides the data according to the scene parameters;
[0034] Step S504: establishing a time constraint association relationship between the third analysis rule and the corresponding data element, wherein the time constraint association relationship is that the data collection time of the data element must be within the validity period of the third analysis rule;
[0035] Establishing a scenario constraint association relationship between the fourth analysis rule and the corresponding data element, wherein the scenario constraint association relationship is that the scenario type identifier of the data element must match the applicable scenario type of the fourth analysis rule;
[0036] Step S505: Based on the time constraint association relationship between the third analysis rule and the data element, and the scenario constraint association relationship between the fourth analysis rule and the data element, directed edges are automatically generated based on the constraint association relationships to form a topological sorting of rule execution and construct a rule execution dependency graph. The dependency graph is represented by a directed acyclic graph and includes: rule triggering conditions, rule execution order, and data flow direction;
[0037] The rule triggering condition defines the preconditions for rule execution;
[0038] The rule execution order determines the execution priority of the rules based on time and scenario constraints;
[0039] The data flow direction marks the transmission path of data during the rule execution process;
[0040] During the execution process, if a rule conflict occurs, the execution will be suspended immediately, the conflict information will be recorded and an alert will be issued. At the same time, the manual priority adjustment function will be provided.
[0041] If a calculation error occurs, the calculation is terminated immediately, the error data and calculation process log are saved, and then the backup calculation method is used to recalculate. If the problem is still not solved, the manual troubleshooting program is started. After the problem is fixed, the relevant rules are restarted.
[0042] Step S6: Generate supply trend forecast and supply strategy recommendations.
[0043] As a preferred solution of the big data-based pharmaceutical supply analysis and management method of the present invention, wherein: the historical data includes inventory change records and purchase order records;
[0044] The basic data units include drug classification data, inventory status data and supplier evaluation data;
[0045] The first analysis rule is used to analyze the intrinsic characteristics and correlation relationships of a single data unit, and directly affects the analysis and processing of specific data elements; the second analysis rule is used for indicator monitoring, risk judgment and strategy optimization across data units.
[0046] As a preferred solution of the big data-based medicine supply analysis and management method of the present invention, wherein: the rule base includes a first analysis rule base and a second analysis rule base;
[0047] Configuring a first analysis rule for each of the basic data units and generating a corresponding first analysis rule base specifically includes:
[0048] configuring drug characteristic association rules for the drug classification data;
[0049] Configuring replenishment cycle calculation rules for the inventory status data;
[0050] configuring supply risk assessment rules for the supplier assessment data;
[0051] Configuring a second analysis rule for each of the management indicators to generate a second analysis rule base specifically includes:
[0052] Configure fluctuation threshold rules for supply stability indicators;
[0053] Configure cost-benefit analysis rules for cost control indicators;
[0054] Configure provisioning delay judgment rules for service quality indicators.
[0055] As a preferred solution of the big data-based medicine supply analysis and management method of the present invention, the rule space includes a first rule space and a second rule space, and step S2 includes the following sub-steps:
[0056] Step S201: storing the first analysis rule base in a first rule space in an object-oriented rule class structure, wherein the rule class structure includes a rule identifier, a rule condition, and a rule execution body;
[0057] The rule identifier is used to uniquely identify each analysis rule;
[0058] The rule conditions are used to define the prerequisites for triggering the execution of the rule;
[0059] The rule execution body is used to encapsulate the calculation logic or operation instructions corresponding to the conditions;
[0060] Step S202: storing the second analysis rule base in a second rule space in the form of a metadata-driven rule set, wherein the rule set includes a rule group identifier, a rule priority, and a rule triggering condition;
[0061] The rule group identifier is used to divide the rules into different business logic groups;
[0062] The rule priority is used to define the order weight of rule execution;
[0063] The rule triggering condition includes a configurable logical expression used to determine whether the rule should be executed;
[0064] Step S203: establishing a version control mechanism for the first analysis rule base and the second analysis rule base, with the administrator responsible for recording the time, operator, update content, and impact scope of each rule update;
[0065] The automatic review cycle of the first analysis rule base and the second analysis rule base is set through the version control mechanism.
[0066] As a preferred solution of the big data-based medicine supply analysis and management method of the present invention, step S3 includes the following sub-steps:
[0067] Step S301: parsing the pharmaceutical supply data to be analyzed into independent data elements through a data parsing engine;
[0068] The data parsing engine is configured to parse structured data, semi-structured data, and unstructured data;
[0069] The structured data includes Excel and databases, and data elements are extracted based on field mapping generated by historical data analysis;
[0070] The semi-structured data includes XML and JSON, and data elements are extracted through path expressions;
[0071] The unstructured data includes text contracts, and data elements are extracted by matching a preset regular expression template with a fixed format;
[0072] The data elements include drug identification elements, timestamp elements, inventory status elements and supplier code elements;
[0073] Step S302: Performing a validity check on the data elements, verifying the extracted data elements based on the verification rules generated by historical data analysis, specifically including:
[0074] The drug identification elements must comply with national drug coding standards;
[0075] The timestamp element must be within the valid time range;
[0076] The inventory status element must meet the logical constraints of "inventory quantity greater than or equal to D" and "validity period greater than or equal to safety stock period";
[0077] Data elements that pass the verification are matched with rules, and data elements that fail the verification are marked as "abnormal" and trigger a manual verification process, which is followed up by the data quality manager.
[0078] As a preferred solution of the big data-based medicine supply analysis and management method of the present invention, the rule matching of the verified data elements specifically includes:
[0079] Matching the verified data elements with basic data units in terms of data type, business meaning, and time granularity based on a semantic similarity algorithm;
[0080] The semantic similarity algorithm uses the hierarchical analysis method to determine the dimension weights. The sum of the weights of the data type and business meaning is not less than a first ratio threshold, and the time granularity weight is not higher than a second ratio threshold. It is verified through a business scenario survey and data matching in the pharmaceutical industry.
[0081] The data type is used to check whether the data type is consistent, and the data type is compared through data metadata information;
[0082] The business meaning matches a medical field data classification hierarchy generated based on historical data analysis, wherein the hierarchy adopts a hierarchical structure including a category structure of drug classification, inventory data classification, and supplier classification;
[0083] The time granularity is used to compare whether the data time unit is at the daily level, weekly level, monthly level, quarterly level and annual level;
[0084] The category structure includes large categories, medium categories, and detailed categories. Based on the overlap ratio of path lengths, the hierarchical distance between the data elements and the basic data units in the category structure is determined by calculating the node path overlap between the data elements and the basic data units. A higher path overlap indicates a smaller hierarchical distance and a higher matching degree.
[0085] Determining whether the data element and the basic data unit are successfully matched based on the comprehensive score of the data type, business meaning, and time granularity, and determining that the match is successful when the comprehensive score is greater than or equal to a third ratio threshold;
[0086] Step S304: In response to a successful match of any data element, obtaining a first analysis rule associated with the basic data unit from the first rule space for generating a drug purchase recommendation;
[0087] Based on the business attributes of the data elements, obtaining a second analysis rule set associated with the current management indicator from the second rule space;
[0088] The business attributes include drug category, supplier level, and inventory type;
[0089] The preset management indicator mapping table maps the business attributes of data elements to corresponding management indicators;
[0090] According to the mapping result, a second analysis rule set associated with the target management indicator in the second rule space is extracted for subsequent scenario parameter adjustment.
[0091] As a preferred embodiment of the method for analyzing and managing pharmaceutical supply based on big data according to the present invention, the parameters include time parameters and scenario parameters, the time parameters include time window parameters and time period parameters, and step S4 includes the following sub-steps:
[0092] Step S401: Associating a time window parameter and a time period parameter for each data element;
[0093] The time window parameter sets different time windows and data update frequencies according to the length of the prediction period. The data update frequency refers to the update frequency of the basic data unit associated with the data element, including real-time update, daily update and weekly update;
[0094] The forecast period includes short-term forecast, medium-term forecast and long-term forecast;
[0095] The short-term prediction is less than or equal to the first time threshold, and a fourth time threshold sliding time window is used, and the data update frequency is once a day;
[0096] The medium-term forecast is the second time threshold, using the fifth time threshold sliding time window, and the data update frequency is once a week;
[0097] The long-term forecast is greater than or equal to the third time threshold, and the sixth time threshold sliding time window is used, and the data update frequency is once a month;
[0098] The time period parameters include data collection time, rule validity period and historical data time span;
[0099] The data collection time is used to clarify the time point or time period of data collection;
[0100] The rule validity period is used to set the validity period of the analysis rule;
[0101] The time span of the historical data is dynamically adjusted according to the characteristics of the drug, including setting the time span of the historical data according to the fourth ratio threshold to the fifth ratio threshold of the validity period according to the length of the validity period of the drug;
[0102] Based on the time window parameter and the time period parameter, the time-related calculation logic and data screening conditions in the initially set first analysis rule are dynamically updated to generate a third analysis rule including a timeliness constraint. The third analysis rule dynamically adjusts the first analysis rule by associating the time window parameter and the time period parameter. The adjustment includes updating the time-related calculation logic and data screening conditions in the first analysis rule to generate a forecast result. The forecast result includes a supply quantity trend, a supply time trend, and a supply price trend.
[0103] Step S402: The scene parameters include a scene type identifier and a scene priority parameter;
[0104] Configuring a scene type identifier and scene priority parameters for each of the data elements;
[0105] The scenario type identifier extracts hospital name keywords and matches them with a preset scenario type library to determine the application scenario to which the data element belongs;
[0106] The scenario priority parameters are automatically identified based on the hospital level, specifically including:
[0107] Class-A tertiary hospitals: The corresponding priority parameter value is "high", and the corresponding rule threshold is tightened to the sixth ratio threshold based on the default benchmark;
[0108] Secondary hospitals: The corresponding priority parameter value is "medium", and the default threshold is used;
[0109] Primary medical institutions: The corresponding priority parameter value is "low", and the corresponding rule threshold is relaxed to the seventh ratio threshold based on the default benchmark;
[0110] Based on the scenario type identifier and the scenario priority parameter, the second analysis rule base is updated, including filtering the applicable scope of the rule and adjusting the rule execution parameters;
[0111] The scope of application of the filtering rules is determined by identifying the scenario type, eliminating rules that do not match the current scenario and retaining only applicable rules;
[0112] The adjustment rule execution parameters dynamically adjust the threshold judgment criteria of the rule according to the scenario priority parameters;
[0113] The rule set that has completed screening and parameter adjustment is encapsulated as a fourth analysis rule that includes scenario adaptation logic. The fourth analysis rule dynamically adjusts the second analysis rule by associating the scenario type identifier and the scenario priority parameter. The adjustment includes the applicable scope of the screening rule and the threshold standard for adjusting the rule, which is used to generate supply strategy recommendations. The supply strategy recommendations include inventory management strategy, procurement planning strategy, and supplier selection strategy.
[0114] Step S403: When the time parameter update causes the forecast period to span quarters, the system automatically connects to the national pharmaceutical industry standard database, obtains the latest standard file through the API interface, and compares and checks the rule thresholds and data formats in the scenario parameters to ensure that the rules comply with industry standards;
[0115] When the hospital level in the scenario parameters changes, the rationality of the time window parameters is re-evaluated and the time window parameters are adjusted according to the evaluation results to ensure that the analysis rules match the scenario requirements;
[0116] When any of the following situations occurs, the regular cycle review is skipped and the rule base update is triggered immediately, including:
[0117] "Major supply incidents" appear in the supplier evaluation data. Major supply incidents include A consecutive delivery delays exceeding B hours or a quality failure rate greater than or equal to the ninth ratio threshold;
[0118] The regular periodic audit is a process of comprehensively checking and verifying the rule base at preset time intervals;
[0119] The management indicator threshold exceeds the warning line, which is used to trigger a rule base update or early warning prompt. The warning line is a pre-set threshold boundary, including the supply stability fluctuation exceeding the tenth ratio threshold range.
[0120] As a preferred solution of the big data-based medicine supply analysis and management method of the present invention, step S5 includes the following sub-steps:
[0121] Step S501: Create a relationship table between data elements and rules;
[0122] The association table records the third analysis rule and the fourth analysis rule corresponding to each data element, and marks the data collection time, rule validity period and scenario parameters, and realizes the one-to-one correspondence between data elements and rules through unique identifiers;
[0123] Step S502: creating an analysis execution space, wherein the analysis execution space includes a data storage area, a third rule execution area, and a fourth rule application area;
[0124] The data storage area is used to store data elements;
[0125] The third rule execution area is used to execute the third analysis rule including the timeliness constraint;
[0126] The fourth rule application area is used to apply a fourth analysis rule including a scene adaptation logic;
[0127] Marking the time association between the data element and the third analysis rule and the scene association between the data element and the fourth analysis rule through a B+ tree index;
[0128] Step S503: partition and store the data elements according to the combination of drug classification, time series, and scenario type, and establish a B+ tree index in each partition to support efficient query;
[0129] The drug classification is used to distinguish different types of drug data;
[0130] The time series is used to segment data according to the data collection time;
[0131] The scene type divides the data according to the scene parameters;
[0132] Step S504: establishing a time constraint association relationship between the third analysis rule and the corresponding data element, wherein the time constraint association relationship is that the data collection time of the data element must be within the validity period of the third analysis rule;
[0133] Establishing a scenario constraint association relationship between the fourth analysis rule and the corresponding data element, wherein the scenario constraint association relationship is that the scenario type identifier of the data element must match the applicable scenario type of the fourth analysis rule;
[0134] Step S505: Based on the time constraint association relationship between the third analysis rule and the data element, and the scenario constraint association relationship between the fourth analysis rule and the data element, directed edges are automatically generated based on the constraint association relationships to form a topological sorting of rule execution and construct a rule execution dependency graph. The dependency graph is represented by a directed acyclic graph and includes: rule triggering conditions, rule execution order, and data flow direction;
[0135] The rule triggering condition defines the preconditions for rule execution;
[0136] The rule execution order determines the execution priority of the rules based on time and scenario constraints;
[0137] The data flow direction marks the transmission path of data during the rule execution process;
[0138] During the execution process, if a rule conflict occurs, the execution will be suspended immediately, the conflict information will be recorded and an alert will be issued. At the same time, the manual priority adjustment function will be provided.
[0139] If a calculation error occurs, the calculation will be terminated immediately, the error data and the calculation process log will be saved, and then the backup calculation method will be enabled to recalculate. If the problem is still not solved, the manual troubleshooting program will be started. After the problem is fixed, the relevant rules will be restarted.
[0140] As a preferred solution of the big data-based medicine supply analysis and management method of the present invention, step S6 includes the following sub-steps:
[0141] Step S601: Generate a prediction result based on the time factor and data processing logic in the third analysis rule;
[0142] The forecast results include supply quantity trend, supply time trend and supply price trend;
[0143] Step S602: Correlate and align the data elements in the third analysis rule, including the generated results, with the management indicators in the fourth analysis rule to generate a rule alignment matrix, specifically including:
[0144] Calculate the association strength value between data elements and management indicators based on the frequency and correlation coefficient of the simultaneous occurrence of data elements and management indicators in historical data;
[0145] Pre-set the rule application priority based on the importance of the business process, with a value range of C;
[0146] Use A / B testing to evaluate the weight of new strategies;
[0147] Use historical data to evaluate weights for old strategies;
[0148] When the comprehensive evaluation value calculated based on the association strength value, rule application priority, and policy impact weight is greater than or equal to the eleventh ratio threshold, a corresponding supply policy recommendation is generated, including the new policy and the old policy;
[0149] Said strategic recommendations include inventory management strategy, procurement planning strategy and supplier selection strategy;
[0150] The rule registration matrix includes the association strength values between data elements and management indicators, rule application priorities and policy impact weights.
[0151] A medicine supply analysis and management system based on big data, which is applied to a medicine supply analysis and management method based on big data, includes a data configuration module, a rule storage module, a data matching analysis module, a dynamic rule generation module, an analysis execution module and a result generation module;
[0152] The data configuration module is used to obtain historical data and decompose it into basic data units, configure the first analysis rule and the second analysis rule for each basic data unit and management indicator, and generate a corresponding rule base;
[0153] The rule storage module is used to store the corresponding rule bases into corresponding rule spaces respectively;
[0154] The data matching analysis module is used to decompose the medicine supply data to be analyzed into data elements and match them with basic data units to obtain a first analysis rule;
[0155] The dynamic rule generation module is used to input parameters for the data elements and generate a third analysis rule and a fourth analysis rule;
[0156] The analysis execution module is used to store the data to be analyzed and the corresponding third analysis rules and fourth analysis rules into the analysis execution space;
[0157] The result generation module is used to generate supply trend forecasts and supply strategy recommendations based on the data and rules in the analysis execution space.
[0158] The beneficial effects of the present invention are as follows: The present invention solves the defects of traditional methods through data unit decomposition, multi-rule configuration and dynamic scenario rule generation, decomposes historical and to-be-analyzed data into basic units and elements of drug classification, replaces traditional extensive processing, and realizes refined data analysis; configures the first and second analysis rules for basic data units and management indicators, such as drug characteristic association rules and supply stability fluctuation threshold rules, breaking through the single rule mode; dynamically generates the third and fourth analysis rules by inputting time and scenario parameters, and adjusts the threshold and logic as needed, among which the time parameter covers the prediction period and the scenario parameter involves the hospital level. This solution makes up for the shortcomings of traditional data processing, single rules and large result deviation, and significantly improves the scientificity and effectiveness of pharmaceutical supply chain management. BRIEF DESCRIPTION OF THE DRAWINGS
[0159] Figure 1 A schematic flow chart of the steps of a big data-based medicine supply analysis and management method provided in accordance with one embodiment of the present invention.
[0160] Figure 2 A basic flow chart of a medicine supply analysis and management system based on big data provided by one embodiment of the present invention DETAILED DESCRIPTION
[0161] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, but not all of the embodiments.
[0162] Example 1, with reference to Figure 1 , as one embodiment of the present invention, provides a medicine supply analysis and management method based on big data, comprising the following steps:
[0163] Step S1: Acquire historical data and decompose it into basic data units, configure the first analysis rule and the second analysis rule for each basic data unit and management indicator, and generate a corresponding rule base;
[0164] Step S2: storing the corresponding rule bases into the corresponding rule spaces respectively;
[0165] Step S3: Decomposing the medicine supply data to be analyzed into data elements and matching them with basic data units to obtain a first analysis rule;
[0166] Step S4: Input parameters for the data elements and generate the third analysis rule and the fourth analysis rule;
[0167] Step S5: storing the data to be analyzed and the corresponding third analysis rule and fourth analysis rule into the analysis execution space;
[0168] Step S6: generating supply trend prediction and supply strategy suggestion.
[0169] In one of the embodiments, historical data is acquired and decomposed into basic data units, first analysis rules and second analysis rules are configured for each basic data unit and management index, corresponding rule libraries are generated, the corresponding rule libraries are respectively stored in corresponding rule spaces, the medical supply data to be analyzed is decomposed into data elements, first analysis rules are acquired by matching the data elements and the basic data units, parameters are input for the data elements, third analysis rules and fourth analysis rules are generated, the data to be analyzed and the corresponding third analysis rules and fourth analysis rules are stored in an analysis execution space, and supply trend prediction and supply strategy suggestion are generated.
[0170] The historical data includes inventory change records and purchase order records.
[0171] The basic data units include drug classification data, inventory status data, and supplier evaluation data.
[0172] The first analysis rules are used to analyze the internal characteristics and correlation of a single data unit, and directly act on the analysis and processing of specific data elements; the second analysis rules are used for cross-data unit index monitoring, risk judgment, and strategy optimization.
[0173] In one of the embodiments, the historical data includes inventory change records and purchase order records.
[0174] The basic data units include drug classification data, inventory status data, and supplier evaluation data.
[0175] The internal characteristics of the drug classification data include basic classification information, attribute and specification information, and management-related information.
[0176] The basic classification information includes drug generic name, drug trade name, and drug category; the attribute and specification information includes main ingredients and content, indications, and usage and dosage; the management-related information includes approval number (such as the State Drug Standard Number H / Z / S) and manufacturer, and expiration date / shelf life.
[0177] The inventory status data includes inventory quantity, inventory status, and supply chain association.
[0178] The internal characteristics of the inventory quantity include current inventory quantity (real-time available quantity), safety inventory quantity (pre-warning threshold), and warehouse-in quantity / warehouse-out quantity (recorded by time); the inventory status includes batch information (production batch number and expiration date), inventory location (such as warehouse partition and shelf number), and inventory status (such as normal, slow-selling, near-expiration, expired, and damaged); the supply chain association includes supplier information (corresponding to the supplier of the purchase order), purchase cycle / replenishment cycle, and inventory cost (such as unit cost and total cost).
[0179] The inherent characteristics of supplier evaluation data include basic supplier information, supply capability indicators, and cooperation performance;
[0180] Basic supplier information includes supplier name / supplier code, company qualifications (such as business license, production license, and operating license), contact information, and address. Supply capacity indicators include delivery timeliness (the proportion of orders delivered on time), product quality qualification rate (drug sampling inspection results), and supply price competitiveness (compared with the market average price). Cooperation performance includes after-sales service quality (such as return and exchange response speed and complaint handling efficiency), breach of contract record (such as the number of delayed deliveries and quality issues), and financial indicators (such as payment cycle and invoice compliance).
[0181] The first analysis rule is a business logic rule for basic data units. It is used to analyze the inherent characteristics and association relationships of a single data unit and directly affects the analysis and processing of specific data elements. The applicable objects of the first analysis rule include the basic data unit of drug classification data. The types of first analysis rules include drug characteristic association rules, replenishment cycle calculation rules, and supply risk assessment rules.
[0182] The second analysis rule is a comprehensive evaluation rule for management indicators, which is used for indicator monitoring, risk judgment and strategy optimization across data units. The applicable objects of the second analysis rule include supply stability indicators and cost control indicator management objectives. The types of the second analysis rule include fluctuation threshold rules, cost-benefit analysis rules and supply delay judgment rules.
[0183] The rule base includes a first analysis rule base and a second analysis rule base;
[0184] Configuring a first analysis rule for each basic data unit and generating a corresponding first analysis rule base specifically includes:
[0185] Configure drug characteristic association rules for drug classification data;
[0186] Configure replenishment cycle calculation rules for inventory status data;
[0187] Configure supply risk assessment rules for supplier assessment data;
[0188] Configure the second analysis rule for each management indicator and generate the second analysis rule base, which specifically includes:
[0189] Configure fluctuation threshold rules for supply stability indicators;
[0190] Configure cost-benefit analysis rules for cost control indicators;
[0191] Configure provisioning delay judgment rules for service quality indicators.
[0192] In one of the embodiments, the drug property association rule: according to the classification property, dosage form property and ingredient property of the drug, associate its special requirements and precautions in the procurement link and storage link, for example, for some special dosage form (such as injection) of the drug, associate its cold chain transportation and storage requirements; for the drug with specific ingredients, associate the information of other drugs that interact with it;
[0193] Replenishment cycle calculation rule: considering the factors of inventory turnover rate and safety stock, calculate the reasonable replenishment cycle under the inventory state data, at the same time, combined with the procurement lead time of the drug and the delivery stability of the supplier, determine the best replenishment time point, for example, for the commonly used drugs with fast inventory consumption speed, set a shorter replenishment cycle to ensure that the inventory always meets the market supply;
[0194] Supply risk assessment rule: based on the supplier evaluation data, evaluate the supply risk of the supplier from the on-time delivery rate, product quality pass rate and supply price fluctuation, for the supplier with high risk, develop corresponding countermeasures, such as increasing backup suppliers, adjusting the procurement quantity, for example, if the on-time delivery rate of a supplier is continuously lower than a certain threshold, increase its supply risk level, and take corresponding measures to reduce the risk of supply interruption.
[0195] Fluctuation threshold rule: set a reasonable fluctuation threshold range for the supply stability index, when the fluctuation of supply quantity and supply time index exceeds the threshold, trigger the corresponding early warning mechanism, so as to take measures to adjust the supply strategy in time to ensure the stability of the supply, for example, when the supply quantity of a certain drug is continuously lower than a certain proportion of the normal level for two weeks, issue a supply shortage warning.
[0196] Cost-benefit analysis rule: in terms of cost control indicators, through the comparison between the relationships of procurement cost, inventory cost and transportation cost, carry out cost-benefit analysis to determine the optimal cost control strategy, reduce the operating cost on the premise of ensuring service quality, for example, by analyzing the price and service quality of different suppliers, select the supplier with the highest cost performance, at the same time optimize the inventory structure to reduce the inventory backlog cost;
[0197] Supply delay judgment rule: according to the service quality index, determine the judgment standard of supply delay, when the delivery time of the supplier exceeds the specified period, handle it according to the established rules, such as deducting the corresponding amount from the supplier, reducing its credit rating, in order to protect the interests of customers and service quality, for example, if the supplier fails to deliver goods within the delivery period agreed in the contract, and the delay time exceeds a certain number of days, it will be punished according to the supply delay judgment rule.
[0198] The rule space includes a first rule space and a second rule space, and step S2 includes the following sub-steps:
[0199] Step S201: storing the first analysis rule base in the first rule space in an object-oriented rule class structure, wherein the rule class structure includes a rule identifier, a rule condition, and a rule execution body;
[0200] Rule ID, used to uniquely identify each analysis rule;
[0201] Rule conditions, which are used to define the prerequisites for triggering rule execution;
[0202] Rule execution body, which is used to encapsulate the calculation logic or operation instructions corresponding to the conditions;
[0203] Step S202: storing the second analysis rule base in the second rule space in the form of a metadata-driven rule set, where the rule set includes a rule group identifier, a rule priority, and a rule triggering condition;
[0204] Rule group identifier, used to divide rules into different business logic groups;
[0205] Rule priority, which is used to define the order weight of rule execution;
[0206] Rule triggering conditions, including configurable logical expressions, are used to determine whether the rule should be executed;
[0207] Step S203: Establishing a version control mechanism for the first analysis rule base and the second analysis rule base, with the administrator responsible for recording the time, operator, update content, and impact scope of each rule update;
[0208] The automatic review cycle of the first analysis rule base and the second analysis rule base is set through the version control mechanism.
[0209] In one embodiment, the rule identifier uses the UUID algorithm to generate a unique code, and the rule conditions support compound logic of "and", "or" and "not", which can be associated with drug classification and supplier level data attributes; the rule execution body is implemented in code form and supports dynamic loading and replacement to facilitate functional expansion;
[0210] Rule group identifiers are divided by business scenario (e.g., "Inventory Management Group," "Supplier Evaluation Group"). Rule priorities are numerically weighted (1-100), with rules with higher weights being executed first. Rule trigger conditions support a visual configuration interface, allowing users to combine data elements and operators by dragging and dropping (e.g., "trigger a replenishment rule when inventory quantity falls below safety stock").
[0211] Each rule update generates a version number (e.g., V1.0 and V1.1), and records the information in the database log table. The automatic review cycle is set based on business complexity (e.g., weekly review of core rules, monthly review of secondary rules). The review content includes rule conflict detection, execution efficiency assessment, and compliance verification. Abnormal situations automatically trigger the manual review process.
[0212] Step S3 includes the following sub-steps:
[0213] Step S301: parsing the pharmaceutical supply data to be analyzed into independent data elements through a data parsing engine;
[0214] The data parsing engine is configured to parse structured data, semi-structured data, and unstructured data;
[0215] Structured data includes Excel and databases, and data elements are extracted based on field mapping generated by historical data analysis;
[0216] Semi-structured data includes XML and JSON, and data elements are extracted through path expressions;
[0217] Unstructured data includes text contracts, and data elements are extracted through fixed format matching using preset regular expression templates;
[0218] Data elements include drug identification elements, timestamp elements, inventory status elements, and supplier code elements;
[0219] Step S302: Verify the validity of the data elements. Verify the extracted data elements based on the verification rules generated by historical data analysis. Specifically, the following steps are performed:
[0220] Drug identification elements must comply with national drug coding standards;
[0221] The timestamp element must be within the valid time range;
[0222] The inventory status element must meet the logical constraints of "inventory quantity greater than or equal to D" and "validity period ≥ safety stock cycle";
[0223] Data elements that pass the verification are matched with rules, and data elements that fail the verification are marked as "abnormal" and trigger a manual verification process, which is followed up by the data quality manager.
[0224] In one embodiment, a standard template format is preset for Excel files, and data is extracted in batches based on field name mapping rules, such as "drug name" corresponding to database table fields; database data is extracted based on table structure and SQL query statements, and custom mapping configuration is supported;
[0225] XML data uses XPath path expressions, such as / root / medicine[id='123'], and JSON data uses JSONPath, such as $.medicine[*].name, to locate and extract target data. Wildcards and hierarchical traversal are supported.
[0226] The regular expression template library has multiple built-in rules, such as the drug code regular expression ^H(\d{8})$, which matches the chemical drug approval number, and the date format regular expression \d{4}-\d{2}-\d{2}, which identifies timestamps. It supports dynamic template addition, modification, and version management.
[0227] Drug identification elements: Connect to the National Drug Administration database to verify the standardization and validity of drug coding in real time;
[0228] Timestamp element: The default setting is that the effective time range is 3 years before and after the current date, and the administrator can manually adjust it;
[0229] Inventory status elements: logical constraints that the inventory quantity is greater than or equal to D(0) and the validity period is greater than or equal to the safety inventory cycle. Safety inventory cycle = k × (average procurement cycle + average transportation cycle + average acceptance cycle), k is the safety factor (k ≥ 1), which can be dynamically adjusted according to the drug supply risk level; the D value is set to a default value based on the drug type, for example, D = 0 for ordinary drugs and D = 5 for emergency drugs, and custom configuration is supported;
[0230] Abnormal data automatically generates a detailed log including the original data, error type and verification rules; notifies the data quality administrator via email and system messages, and marks the priority (urgent / normal) according to the severity; establishes an abnormal data processing ledger to record the processing process and results.
[0231] The rule matching of the verified data elements specifically includes:
[0232] Based on the semantic similarity algorithm, the verified data elements are matched with the basic data units in terms of data type, business meaning and time granularity;
[0233] The semantic similarity algorithm uses the hierarchical analysis method to determine the dimension weights. The sum of the weights of data type and business meaning is no less than the first ratio threshold, and the time granularity weight is no more than the second ratio threshold. This algorithm is verified through business scenario research and data matching in the pharmaceutical industry.
[0234] The data type is used to check whether the data type is consistent and compare the data type through data metadata information;
[0235] Business meaning matching is based on the pharmaceutical data classification hierarchy generated by historical data analysis. The hierarchy adopts a hierarchical structure, including the category structure of drug classification, inventory data classification and supplier classification;
[0236] Time granularity is used to compare whether the data time unit is at the daily, weekly, monthly, quarterly, and annual levels;
[0237] The category structure includes major categories, medium categories, and detailed categories. Based on the overlap ratio of path lengths, the hierarchical distance between data elements and basic data units is determined by calculating the node path overlap between data elements and basic data units in the category structure. The higher the path overlap, the smaller the hierarchical distance and the higher the matching degree.
[0238] The data element and the basic data unit are determined to be matched successfully based on a comprehensive score of data type, business meaning, and time granularity. A match is determined to be successful when the comprehensive score is greater than or equal to the third ratio threshold.
[0239] Step S304: In response to a successful match of any data element, a first analysis rule associated with the basic data unit is obtained from the first rule space for generating a drug purchase recommendation;
[0240] Based on the business attributes of the data elements, obtaining a second analysis rule set associated with the current management indicator from the second rule space;
[0241] Business attributes include drug category, supplier level, and inventory type;
[0242] The preset management indicator mapping table maps the business attributes of data elements to corresponding management indicators;
[0243] According to the mapping result, a second analysis rule set associated with the target management indicator in the second rule space is extracted for subsequent scenario parameter adjustment.
[0244] In one implementation, the analytic hierarchy process (AHP) was used to determine dimension weights. Pharmaceutical industry experts were invited to rate the importance of data type, business significance, and time granularity (e.g., "business significance is three times more important than data type"). This was then used to form a judgment matrix and calculate the weights for each dimension. After evaluation and verification, a weight of 30% was assigned to data type, 35% to business significance, and 25% to time granularity, satisfying the constraints of "the sum of the weights of data type and business significance must be no less than 60%, and the weight of time granularity must be no more than 30%."
[0245] The comprehensive score is equal to the data type score × weight + business significance score × weight + time granularity score × weight;
[0246] The data element and basic data unit are successfully matched based on a comprehensive score of data type, business meaning, and time granularity. A successful match is determined when the comprehensive score is greater than or equal to 70%.
[0247] Comparing data types of data meta information, including establishing a data meta information library, including definitions and specifications of various data types, for example, the data type of drug identification elements is a string, and the length and format comply with the national drug coding standards; the data type of timestamp elements is a date and time type, and the format is "YYYY-MM-DD HH:MM:SS"; Establishing a data meta information library, including definitions and specifications of various data types, for example, the data type of drug identification elements is a string, and the length and format comply with the national drug coding standards; the data type of timestamp elements is a date and time type, and the format is "YYYY-MM-DD HH:MM:SS";
[0248] Business meaning matching is achieved through the construction of a data classification hierarchy in the pharmaceutical field, including drug classification, inventory data classification, and supplier classification;
[0249] Drug classification includes major categories, medium categories and fine categories; major categories include chemical drugs, traditional Chinese medicines, and biological products; medium categories include chemical drugs, which can be further divided into antibiotics and cardiovascular drugs; fine categories include antibiotics, which can be divided into penicillins and cephalosporins;
[0250] Inventory data classification includes major categories, medium categories and detailed categories; major categories include normal inventory, expiring inventory and scrapped inventory; medium categories include normal inventory which can be further classified by storage location; detailed categories include specific drug inventory on a certain shelf;
[0251] Supplier classification includes major categories, medium categories and detailed categories; major categories can be divided into domestic suppliers and foreign suppliers; medium categories include domestic suppliers classified by region; detailed categories include specific suppliers in a certain region;
[0252] Calculate the node path overlap. Take drug classification as an example. Assume that the data element is "Amoxicillin Capsules". The path of "Amoxicillin Capsules" in the drug classification hierarchy is "Chemical Drugs → Antibiotics → Penicillins → Amoxicillin Capsules". The corresponding path in the basic data unit is "Chemical Drugs → Antibiotics → Penicillins". Calculate the path length overlap ratio, that is, the overlapping path length (the length of "Chemical Drugs → Antibiotics → Penicillins") divided by the basic data unit path length (the length of "Chemical Drugs → Antibiotics → Penicillins"). The path overlap ratio is 1. Hierarchical distance = 1-path overlap ratio. Therefore, the hierarchical distance is 0 and the matching degree is 100%.
[0253] The content of the management indicator mapping table includes management indicator mapping table examples and mapping table maintenance;
[0254] Example of a management indicator mapping table:
[0255] Mapping of drug categories and management indicators:
[0256] Emergency medicines: supply stability and service quality;
[0257] Chronic disease medication: cost control and supply stability;
[0258] Mapping of supplier grades and management indicators:
[0259] A-level supplier: service quality and supply stability;
[0260] B-level suppliers: cost control and supply stability;
[0261] Mapping of inventory types and management indicators:
[0262] Near-expiring inventory: cost control;
[0263] Normal inventory: supply stability, cost control;
[0264] Mapping table maintenance:
[0265] Provides a visual interface for administrators to maintain the mapping table. Administrators can add, modify or delete the mapping relationship between the business attributes of data elements and management indicators on the interface;
[0266] When business requirements change or data structures are adjusted, administrators can update the mapping table in a timely manner to ensure the accuracy and adaptability of the system.
[0267] The parameters include time parameters and scene parameters. The time parameters include time window parameters and time period parameters. Step S4 includes the following sub-steps:
[0268] Step S401: Associating a time window parameter and a time period parameter for each data element;
[0269] The time window parameter sets different time windows and data update frequencies according to the length of the forecast period. The data update frequency refers to the update frequency of the basic data units associated with the data elements, including real-time updates, daily updates, and weekly updates.
[0270] The forecast cycle includes short-term forecast, medium-term forecast and long-term forecast;
[0271] For short-term predictions that are less than or equal to the first time threshold, a sliding time window with the fourth time threshold is used, and the data is updated once a day;
[0272] The medium-term forecast is the second time threshold, using the fifth time threshold sliding time window, and the data update frequency is once a week;
[0273] For long-term predictions greater than or equal to the third time threshold, a sliding time window with the sixth time threshold is used, and the data update frequency is once a month;
[0274] Time period parameters include data collection time, rule validity period, and historical data time span;
[0275] Data collection time is used to clarify the time point or time period for data collection;
[0276] The rule validity period is used to set the validity period of the analysis rule;
[0277] The time span of historical data is dynamically adjusted according to the characteristics of the drug, including setting the time span of historical data according to the fourth to fifth ratio thresholds of the validity period based on the length of the drug's validity period;
[0278] Based on the time window parameter and the time period parameter, the time-related calculation logic and data screening conditions in the initially set first analysis rule are dynamically updated to generate a third analysis rule including a timeliness constraint. The third analysis rule dynamically adjusts the first analysis rule by associating the time window parameter and the time period parameter. The adjustment includes updating the time-related calculation logic and data screening conditions in the first analysis rule to generate a forecast result. The forecast result includes a supply quantity trend, a supply time trend, and a supply price trend.
[0279] Step S402: The scene parameters include a scene type identifier and a scene priority parameter;
[0280] Configure scenario type identifier and scenario priority parameters for each data element;
[0281] The scenario type identification extracts hospital name keywords and matches them with the preset scenario type library to determine the application scenario to which the data element belongs;
[0282] Scenario priority parameters are automatically identified based on hospital level, including:
[0283] Class-A tertiary hospitals: The corresponding priority parameter value is "high", and the corresponding rule threshold is tightened to the sixth ratio threshold based on the default benchmark;
[0284] Secondary hospitals: The corresponding priority parameter value is "medium", and the default threshold is used;
[0285] Primary medical institutions: The corresponding priority parameter value is "low", and the corresponding rule threshold is relaxed to the seventh ratio threshold based on the default benchmark;
[0286] Based on the scenario type identifier and the scenario priority parameter, the second analysis rule base is updated, including filtering the applicable scope of the rule and adjusting the rule execution parameters;
[0287] Filter the scope of application of rules. According to the scenario type identifier, eliminate the rules that do not match the current scenario and retain only the applicable rules;
[0288] Adjust the rule execution parameters and dynamically adjust the rule threshold judgment criteria based on the scenario priority parameters;
[0289] The set of rules that have completed screening and parameter adjustment is encapsulated as a fourth analysis rule that includes scenario adaptation logic. The fourth analysis rule dynamically adjusts the second analysis rule by associating the scenario type identifier and scenario priority parameter. The adjustments include the scope of application of the screening rule and the threshold standard for adjusting the rule. The fourth analysis rule is used to generate supply strategy recommendations. The supply strategy recommendations include inventory management strategy, procurement planning strategy, and supplier selection strategy.
[0290] Step S403: When the time parameter update causes the forecast period to span quarters, the system automatically connects to the national pharmaceutical industry standard database, obtains the latest standard file through the API interface, and compares and checks the rule thresholds and data formats in the scenario parameters to ensure that the rules comply with industry standards;
[0291] When the hospital level in the scenario parameters changes, the rationality of the time window parameters is re-evaluated and the time window parameters are adjusted according to the evaluation results to ensure that the analysis rules match the scenario requirements;
[0292] When any of the following situations occurs, the regular cycle review is skipped and the rule base update is triggered immediately, including:
[0293] "Major supply incidents" appear in the supplier evaluation data. Major supply incidents include A consecutive delivery delays exceeding B hours or a quality failure rate greater than or equal to the ninth ratio threshold;
[0294] Regular cycle audit is a process of comprehensive inspection and verification of the rule base at preset time intervals;
[0295] The management indicator threshold exceeds the warning line, which is used to trigger the rule base update or warning prompt. The warning line has a pre-set threshold boundary, including the supply stability fluctuation exceeding the tenth ratio threshold range.
[0296] In one embodiment, the parameters include time parameters and scene parameters, the time parameters include time window parameters and time period parameters, and step S4 includes the following sub-steps:
[0297] Step S401: Associating a time window parameter and a time period parameter for each data element;
[0298] The time window parameter sets different time windows and data update frequencies based on the length of the forecast period. The data update frequency refers to the update frequency of the basic data units associated with the data elements, including real-time updates, daily updates, and weekly updates. For example, inventory data involving emergency medicines is set to real-time updates due to the high requirements for timely supply.
[0299] The time span of historical data is dynamically adjusted based on the characteristics of the drug. For example, the time span of historical data is set at 1 / 3 to 1 / 2 of the validity period based on the validity period of the drug. For example, for a drug with a validity period of 12 months, the time span of historical data is set to 4-6 months.
[0300] Based on the time window parameter and the time period parameter, the time-related calculation logic and data screening conditions in the initially set first analysis rule are dynamically updated to generate a third analysis rule including a timeliness constraint. The third analysis rule dynamically adjusts the first analysis rule by associating the time window parameter and the time period parameter. The adjustment includes updating the time-related calculation logic and data screening conditions in the first analysis rule to generate a prediction result. The prediction result includes a supply quantity trend and a supply time trend. The third analysis rule is generated to accurately predict the supply quantity and time trend of the drug.
[0301] Step S402: The scene parameters include a scene type identifier and a scene priority parameter;
[0302] Configure scenario type identifier and scenario priority parameters for each data element;
[0303] The scenario type identifier extracts keywords from the hospital name and matches them with the preset scenario type library to determine the application scenario to which the data element belongs. For example, if the name contains the keyword "tumor", it will be matched to the "tumor specialist hospital" scenario type; if it contains the keyword "maternal and child", it will be matched to the "maternal and child health care hospital" scenario type;
[0304] Scenario priority parameters are automatically identified based on hospital level, including:
[0305] For Class A tertiary hospitals, the corresponding priority parameter value is "High," and the corresponding rule threshold is tightened by 20% from the default baseline. For example, in the supply stability rule, the tolerance for supply delays in Class A hospitals is lower, and the rule threshold is tightened. Once the supply fluctuation exceeds the narrower range, an alert is triggered.
[0306] Secondary hospitals: The corresponding priority parameter value is "medium", and the default threshold is used. Secondary hospitals have a moderate business scale and complexity, and are evaluated according to the default rule threshold;
[0307] Primary healthcare institutions: The corresponding priority parameter value is "low", and the corresponding rule threshold is relaxed by 20% from the default benchmark. Primary healthcare institutions have relatively stable drug demand and small scale, so the rule threshold is appropriately relaxed to reduce unnecessary warnings;
[0308] Based on the scenario type identifier and the scenario priority parameter, the second analysis rule base is updated, including filtering the applicable scope of the rule and adjusting the rule execution parameters;
[0309] Filter the scope of application of rules. Based on the scenario type identifier, remove rules that do not match the current scenario and retain only applicable rules. For example, in the "Maternal and Child Health Hospital" scenario, remove rules related to the supply of geriatric drugs.
[0310] Adjust the rule execution parameters and dynamically adjust the rule threshold judgment criteria based on the scenario priority parameters;
[0311] The set of rules that have completed screening and parameter adjustment is encapsulated into a fourth analysis rule that includes scenario adaptation logic. This fourth analysis rule dynamically adjusts the second analysis rule by associating it with the scenario type identifier and scenario priority parameter. The adjustments include the scope of application of the screening rule and the threshold standard for adjusting the rule. This is used to generate supply strategy recommendations. The supply strategy recommendations include inventory management strategies, procurement planning strategies, and supplier selection strategies. For example, for the "high" priority scenario of tertiary hospitals, a more stringent and efficient supply strategy is generated to ensure drug supply.
[0312] Step S403: When the update of the time parameters causes the forecast period to span across quarters, the system automatically connects to the national pharmaceutical industry standard database and obtains the latest standard file through the API interface. The system then compares and checks the rule thresholds and data formats in the scenario parameters to ensure that the rules comply with industry standards. For example, when the quarters change, the system checks whether the rule thresholds for drug expiration dates comply with the latest industry standards.
[0313] When the hospital level in the scenario parameters changes, the rationality of the time window parameters is re-evaluated and adjusted based on the evaluation results to ensure that the analysis rules match the scenario requirements. For example, if a hospital is upgraded from Grade II to Grade III, the time window is re-evaluated and shortened, and the data update frequency is increased to adapt to higher priority requirements.
[0314] When any of the following situations occurs, the regular cycle review is skipped and the rule base update is triggered immediately, including:
[0315] If a supplier experiences a "major supply incident" in the supplier evaluation data, which includes three consecutive delivery delays exceeding 48 hours or a quality failure rate greater than or equal to 10%, the rule base will be updated immediately to adjust the supplier evaluation and supply strategy rules.
[0316] Regular cycle audit is a process of comprehensive inspection and verification of the rule base at preset time intervals;
[0317] When the management indicator threshold exceeds the warning line, it is used to trigger the rule base update or warning prompt. The warning line has pre-set threshold boundaries, including supply stability fluctuations exceeding ±15%. When the supply stability indicator fluctuates by more than ±15%, it triggers the rule base update, optimizes the supply strategy, or sends a warning prompt to the administrator for timely intervention.
[0318] Step S5 includes the following sub-steps:
[0319] Step S501: Create a relationship table between data elements and rules;
[0320] The association table records the third and fourth analysis rules corresponding to each data element, and annotates the data collection time, rule validity period, and scenario parameters. The unique identifier is used to achieve a one-to-one correspondence between the data element and the rule.
[0321] Step S502: creating an analysis execution space, the analysis execution space including a data storage area, a third rule execution area, and a fourth rule application area;
[0322] Data storage area, used to store data elements;
[0323] A third rule execution area, for executing a third analysis rule including a timeliness constraint;
[0324] a fourth rule application area, for applying a fourth analysis rule including scenario adaptation logic;
[0325] Marking the time association between the data element and the third analysis rule and the scene association between the data element and the fourth analysis rule through a B+ tree index;
[0326] Step S503: partition and store the data elements according to the combination of drug classification, time series, and scenario type, and establish a B+ tree index in each partition to support efficient query;
[0327] Drug classification, used to distinguish different types of drug data;
[0328] Time series, used to segment data by collection time;
[0329] Scenario type, which divides data according to scenario parameters;
[0330] Step S504: establishing a time constraint association relationship between the third analysis rule and the corresponding data element, wherein the time constraint association relationship is that the data collection time of the data element must be within the validity period of the third analysis rule;
[0331] Establishing a scenario constraint association relationship between the fourth analysis rule and the corresponding data element, where the scenario constraint association relationship is that the scenario type identifier of the data element must match the applicable scenario type of the fourth analysis rule;
[0332] Step S505: Based on the time constraint association relationship between the third analysis rule and the data element, and the scenario constraint association relationship between the fourth analysis rule and the data element, directed edges are automatically generated based on the constraint association relationships to form a topological sorting of rule execution and construct a rule execution dependency graph. The dependency graph is represented by a directed acyclic graph and includes: rule triggering conditions, rule execution order, and data flow direction;
[0333] Rule triggering conditions, which define the preconditions for rule execution;
[0334] Rule execution order, which determines the execution priority of rules based on time and scenario constraints;
[0335] Data flow direction, marking the data transmission path during the rule execution process;
[0336] During the execution process, if a rule conflict occurs, the execution will be suspended immediately, the conflict information will be recorded and an alert will be issued. At the same time, the manual priority adjustment function will be provided.
[0337] If a calculation error occurs, the calculation will be terminated immediately, the error data and the calculation process log will be saved, and then the backup calculation method will be enabled to recalculate. If the problem is still not solved, the manual troubleshooting program will be started. After the problem is fixed, the relevant rules will be restarted.
[0338] In one embodiment, the association table is stored in a relational database, with each field specifying data types and constraints. The unique identifier field is generated using a UUID algorithm to ensure global uniqueness. The data collection time and rule validity period fields use the TIMESTAMP type, accurate to milliseconds, and record time zone information. The scene parameter field is stored in JSON format, including scene type and applicable object structured information, such as {"scene_type": "outpatient medication", "patient_group": "adult"}. Foreign key constraints are used to ensure that the rule IDs referenced by the third and fourth analysis rule fields exist in the rule table. A joint unique constraint is established for the data element ID, the third analysis rule ID, and the fourth analysis rule ID to avoid duplicate association records.
[0339] The time-related B+tree index uses the data element ID and data collection time as the joint index key, supporting fast queries of data elements associated with the third analysis rule by time range, such as retrieving data collected within the past week and associated with a specific third analysis rule. The scenario-related B+tree index uses the data element ID and scenario type as the joint index key, facilitating the rapid location of data elements matching the fourth analysis rule scenario, such as searching for relevant data in the "hospitalization medication" scenario. The third rule execution area uses a stream processing framework (such as Flink) to implement real-time calculations including time-sensitive constraint rules. The fourth rule application area is built on a rule engine (such as Drools) to support dynamic loading and execution of scenario adaptation logic.
[0340] Drug classification is based on the "National Drug Classification Standard," with drug data divided into the primary categories of anti-infective and cardiovascular drugs, and their secondary subcategories. Time series support dynamic time window configuration, with daily granularity by default, which can be adjusted to hourly, weekly, or monthly granularity as needed. Scenario types are divided based on the scene_type field in the scenario parameters, with a dictionary table maintaining the parent-child hierarchical relationship between scenario types. For example, "outpatient scenario" includes "general outpatient clinic" and "chronic disease outpatient clinic" sub-scenarios. Each data partition is independently indexed by a B+ tree, and the index is updated through scheduled tasks or data change triggers to ensure query performance.
[0341] The time constraint specifies that "data collection time is within the rule validity period" is a closed interval check. The data collection time must be greater than or equal to the rule effective time and less than or equal to the rule expiration time. When the rule validity period is empty, all time data is matched by default. Scenario constraints support exact matching (completely consistent scenario types) and fuzzy matching (matching based on the scenario hierarchy inheritance relationship). For example, if the rule applies to the "outpatient scenario", the "general outpatient" and "emergency" sub-scenario data under it will be automatically matched. At the same time, conditional verification of numerical fields in scenario parameters (such as medication dosage range) is supported.
[0342] Directed edge generation rules include:
[0343] When the collection time of the data element meets the validity period of the third analysis rule, a directed edge is generated from the data element node to the third analysis rule node, marking the "time valid" trigger condition;
[0344] When the scenario type of the data element matches the applicable scenario of the fourth analysis rule, a directed edge is generated from the data element node to the fourth analysis rule node, and a "scenario match" trigger condition is marked;
[0345] Priority algorithms include: time priority is based on the urgency of the rule validity period, with rules about to expire being executed first; scenario priority is based on the business weight of the scenario type, such as "emergency scenario" rules have a higher priority than "general scenario" rules; if the priorities are the same, the execution order is determined by the reverse order of rule creation time (the latest rule takes precedence) or manually configured weights;
[0346] Conflict detection monitors the rule execution process in real time, identifying the types of data input conflicts (the same data is modified by multiple rules) and logical contradiction conflicts (mutually exclusive rule conclusions); when a rule conflict occurs, the system suspends execution, records the conflict rule ID, conflict data and time, and issues an early warning; provides a visual interface for users to manually adjust the rule priority, or automatically handle it according to the preset conflict resolution strategy (such as retaining high-priority rules); when a calculation error occurs, immediately terminates the current calculation, saves the erroneous data, calculation steps and related logs; enables alternative calculation methods (such as switching rule versions, adjusting calculation parameters) and recalculates; if the problem is not resolved, generates a report including detailed error information, triggers a manual troubleshooting process, and restarts the rule execution from the breakpoint after repair.
[0347] Step S6 includes the following sub-steps:
[0348] Step S601: Generate a prediction result based on the time factor and data processing logic in the third analysis rule;
[0349] The forecast results include supply quantity trend, supply time trend and supply price trend;
[0350] Step S602: Correlate and align the data elements in the third analysis rule, including the generated results, with the management indicators in the fourth analysis rule to generate a rule alignment matrix, specifically including:
[0351] Calculate the association strength value between data elements and management indicators based on the frequency and correlation coefficient of the simultaneous occurrence of data elements and management indicators in historical data;
[0352] Pre-set the rule application priority based on the importance of the business process, with a value range of C;
[0353] Use A / B testing to evaluate the weight of new strategies;
[0354] Use historical data to evaluate weights for old strategies;
[0355] When the comprehensive evaluation value calculated based on the association strength value, rule application priority, and policy impact weight is greater than or equal to the eleventh ratio threshold, a corresponding supply policy recommendation is generated. The policy includes both new and old policies.
[0356] Strategic recommendations include inventory management strategies, procurement planning strategies, and supplier selection strategies;
[0357] The rule registration matrix includes the association strength value between data elements and management indicators, rule application priority and policy impact weight.
[0358] In one embodiment, step S6 includes the following sub-steps:
[0359] Step S601: Generate a prediction result based on the time factor and data processing logic in the third analysis rule. Time factor processing involves segmenting and aggregating data elements in the third analysis rule according to time series, including the time factor of the data collection time, the rule validity period, and the time window (such as day, week, and month). For example, the data processing logic uses moving average and trend fitting statistical methods to analyze the changing patterns of historical data and generate supply quantity trends (such as the growth or decline in the supply of a certain drug in the next week), supply time trends (such as the periodic changes in delayed or early arrival of drugs), and supply price trends (such as the price fluctuation range of a certain type of drug). The prediction results are output as visual charts or structured data. The prediction results include supply quantity trends, supply time trends, and supply price trends.
[0360] Step S602: Correlate and align the data elements in the third analysis rule, including the generated results, with the management indicators in the fourth analysis rule to generate a rule alignment matrix, specifically including:
[0361] Calculate the correlation strength between data elements and management indicators based on the frequency and correlation of the simultaneous occurrence of data elements and management indicators in historical data. For example, count the number of times the "drug inventory turnover rate" (data element) and the "purchasing cost control rate" (management indicator) changed simultaneously in the past 12 months. Combined with the unidirectionality of their fluctuation trends (positive correlation in the same direction, negative correlation in the opposite direction), the correlation is divided into three levels: strong (greater than or equal to 80%), medium (50%-79%), and weak (less than 50%).
[0362] The priority of rules is pre-set based on the importance of the business process. The value range is 1-5, with level 1 being the highest priority (such as emergency drug procurement rules) and level 5 being the lowest priority (such as routine consumables management rules). Priorities are manually set by business experts based on process importance and compliance requirements. For example, the "supplier qualification review" rule has a higher priority than the "inventory counting process" rule.
[0363] Use A / B testing to evaluate the weight of new strategies. Apply the new strategy (such as introducing a new supplier) to certain business scenarios (such as a regional warehouse) and compare key indicators (such as procurement costs and supply time) in scenarios where the strategy has not been applied. Weights of 0-100 are assigned based on the difference in effectiveness, with more significant improvements receiving higher weights.
[0364] Assess the weights of old strategies based on historical data. Calculate the achievement rate of business indicators after the old strategy (such as cooperation with existing suppliers) was implemented over the past 12 months. Achievement rates greater than or equal to 90% are assigned a high weight (80-100), while those less than 70% are assigned a low weight (0-20). For example, a procurement strategy with a 92% on-time supply rate (weight 85), a 35-day inventory turnover rate (achievement rate 85.7%, weight 50), and an 8% over-budget procurement cost (achievement rate 62.5%, weight 10) over the past 12 months has an overall weight of 48.3 (less than 60%). Therefore, the strategy needs to be optimized. The specific calculation process is to assign weights based on the corresponding range of indicator achievement rates. For example, if the achievement rate is ≥90%, it is assigned 80-100, and if it is less than 70%, it is assigned 0-20. The average of multiple indicators is taken. In this example, the weights of the three indicators are (85 + 50 + 10) ÷ 3 = 48.3.
[0365] When the comprehensive evaluation value calculated based on the association strength value, rule application priority, and policy impact weight is greater than or equal to 60%, corresponding supply strategy recommendations are generated. The strategies include new and old strategies. The comprehensive evaluation value = association strength value weight (40%) × rule application priority weight (30%) × policy impact weight (30%). The administrator can configure and adjust each weight in the system. When the comprehensive evaluation value is greater than or equal to 60%, inventory management strategy recommendations (such as safety stock adjustment), procurement planning strategy (such as procurement batch optimization), and supplier selection strategy (such as adding suppliers / eliminating suppliers) are generated. The association strength value, rule application priority, and policy impact weight of data elements and management indicators are stored in table format, supporting queries sorted by priority or association strength.
[0366] Strategic recommendations include inventory management strategies, procurement planning strategies, and supplier selection strategies;
[0367] The rule registration matrix includes the association strength value between data elements and management indicators, rule application priority and policy impact weight.
[0368] Example 2, reference Figure 2 Another embodiment of the present invention differs from the first embodiment in that it provides a medicine supply analysis and management system based on big data, including a data configuration module, a rule storage module, a data matching analysis module, a dynamic rule generation module, an analysis execution module, and a result generation module;
[0369] A data configuration module is used to obtain historical data and decompose it into basic data units, configure the first analysis rule and the second analysis rule for each basic data unit and management indicator, and generate a corresponding rule base;
[0370] A rule storage module is used to store the corresponding rule bases into the corresponding rule spaces;
[0371] a data matching analysis module, configured to decompose the pharmaceutical supply data to be analyzed into data elements and match them with basic data units to obtain a first analysis rule;
[0372] A dynamic rule generation module, configured to input parameters for data elements and generate a third analysis rule and a fourth analysis rule;
[0373] An analysis execution module, configured to store the data to be analyzed and the corresponding third analysis rules and fourth analysis rules into an analysis execution space;
[0374] The result generation module is used to generate supply trend forecasts and supply strategy recommendations based on the data and rules in the analysis execution space.
[0375] In one embodiment, historical data is obtained and decomposed into basic data units, a first analysis rule and a second analysis rule are configured for each basic data unit and management indicator, a corresponding rule library is generated, and the corresponding rule library is stored in a corresponding rule space. The pharmaceutical supply data to be analyzed is then decomposed into data elements and matched with the basic data units to obtain the first analysis rule, parameters are input for the data elements, a third analysis rule and a fourth analysis rule are generated, the data to be analyzed and the corresponding third analysis rule and fourth analysis rule are stored in an analysis execution space, and supply trend forecasts and supply strategy recommendations are generated based on the data and rules in the analysis execution space.
[0376] The present invention solves the defects of traditional methods through data unit decomposition, multi-rule configuration and dynamic scenario-based rule generation, decomposes historical and to-be-analyzed data into basic units and elements of drug classification, replaces traditional extensive processing, and realizes refined data analysis; configures the first and second analysis rules for basic data units and management indicators, such as drug characteristic association rules and supply stability fluctuation threshold rules, breaking through the single rule mode; dynamically generates the third and fourth analysis rules by inputting time and scenario parameters, and adjusts the threshold and logic as needed. Among them, the time parameter covers the prediction period, and the scenario parameter involves the hospital level. This solution makes up for the shortcomings of traditional data processing, single rules and large result deviation, and significantly improves the scientificity and effectiveness of pharmaceutical supply chain management.
[0377] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, a system or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (or computer- readable storage media) having computer-usable program code embodied in the medium. The medium can be any available medium or combination thereof that is accessible by a general purpose or special purpose computer. By way of example, such computer-usable storage media can include a volatile memory, such as a random access memory (RAM), a non-volatile memory, such as a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a floppy diskette, a compact disk, a hard disk, or any other medium that can be used to carry or store computer-usable program code in the form of computer-usable instructions or data structures and that can be accessed by a general purpose or special purpose computer, or a general-purpose or special-purpose processor. Also, the present application can be embodied in a computer program product which can be executed in particu Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks
[0378] It should be noted that the above-mentioned embodiments are only used to illustrate but not to limit the technical solutions of the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalent replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.
Claims
1. A medicine supply analysis and management method based on big data, characterized in that: The following steps are involved: Step S1: Acquire historical data and decompose it into basic data units, configure the first analysis rule and the second analysis rule for each basic data unit and management indicator, and generate a corresponding rule base; The first analysis rule is a business logic rule for the basic data unit, used to analyze the inherent characteristics and association relationships of a single data unit, and acts on the analysis and processing of specific data elements. The applicable objects of the first analysis rule include the basic data unit of drug classification data. The types of the first analysis rule include drug characteristic association rules, replenishment cycle calculation rules, and supply risk assessment rules; The second analysis rule is a comprehensive evaluation rule for management indicators, which is used for indicator monitoring, risk judgment and strategy optimization across data units. The applicable objects of the second analysis rule include supply stability indicators and cost control indicator management objectives. The types of second analysis rules include fluctuation threshold rules, cost-benefit analysis rules and supply delay judgment rules. Step S2: storing the corresponding rule bases into corresponding rule spaces respectively; Step S3: Decomposing the pharmaceutical supply data to be analyzed into data elements and basic data units, performing a validity check on the data elements, and performing rule matching on the data elements that pass the check. Specifically, the steps include: Matching the verified data elements with basic data units in terms of data type, business meaning, and time granularity based on a semantic similarity algorithm; The semantic similarity algorithm uses the hierarchical analysis method to determine the dimension weights. The sum of the weights of the data type and business meaning is not less than a first ratio threshold, and the time granularity weight is not higher than a second ratio threshold. It is verified through a business scenario survey and data matching in the pharmaceutical industry. The data type is used to check whether the data type is consistent, and the data type is compared through data metadata information; The business meaning matches a pharmaceutical field data classification hierarchy generated based on historical data analysis, wherein the hierarchy adopts a hierarchical structure including a category structure of drug classification inventory data classification and supplier classification; The time granularity is used to compare whether the data time unit is at the daily level, weekly level, monthly level, quarterly level and annual level; The category structure includes large categories, medium categories, and detailed categories. Based on the overlap ratio of path lengths, the hierarchical distance between the data elements and the basic data units in the category structure is determined by calculating the node path overlap between the data elements and the basic data units. A higher path overlap indicates a smaller hierarchical distance and a higher matching degree. Determining whether the data element and the basic data unit are successfully matched based on the comprehensive score of the data type, business meaning, and time granularity, and determining that the match is successful when the comprehensive score is greater than or equal to a third ratio threshold; In response to a successful match of any data element, obtaining a first analysis rule associated with the basic data unit from the first rule space for generating a drug purchase recommendation; Based on the business attributes of the data elements, obtaining a second analysis rule set associated with the current management indicator from the second rule space; The business attributes include drug category, supplier level, and inventory type; The preset management indicator mapping table maps the business attributes of data elements to corresponding management indicators; According to the mapping result, a second analysis rule set associated with the target management indicator in the second rule space is extracted for subsequent scenario parameter adjustment; Step S4: Input parameters for the data elements and generate a third analysis rule and a fourth analysis rule; The third analysis rule dynamically adjusts the first analysis rule by associating a time window parameter with a time period parameter. The adjustment includes updating the time-related calculation logic and data screening conditions in the first analysis rule to generate a forecast result. The forecast result includes a supply quantity trend and a supply time trend, and generates the third analysis rule. The fourth analysis rule dynamically adjusts the second analysis rule by associating the scenario type identifier and the scenario priority parameter, and the adjustment includes filtering the applicable scope of the rule and adjusting the rule threshold standard, so as to generate a supply strategy recommendation; Step S5: Step S5 includes the following sub-steps: Step S501: Create a relationship table between data elements and rules; The association table records the third analysis rule and the fourth analysis rule corresponding to each data element, and marks the data collection time, rule validity period and scenario parameters, and realizes the one-to-one correspondence between data elements and rules through unique identifiers; Step S502: creating an analysis execution space, wherein the analysis execution space includes a data storage area, a third rule execution area, and a fourth rule application area; The data storage area is used to store data elements; The third rule execution area is used to execute the third analysis rule including the timeliness constraint; The fourth rule application area is used to apply a fourth analysis rule including a scene adaptation logic; Marking the time association between the data element and the third analysis rule and the scene association between the data element and the fourth analysis rule through a B+ tree index; Step S503: partition and store the data elements according to the combination of drug classification, time series, and scenario type, and establish a B+ tree index in each partition to support efficient query; The drug classification is used to distinguish different types of drug data; The time series is used to segment data according to the data collection time; The scene type divides the data according to the scene parameters; Step S504: establishing a time constraint association relationship between the third analysis rule and the corresponding data element, wherein the time constraint association relationship is that the data collection time of the data element must be within the validity period of the third analysis rule; Establishing a scenario constraint association relationship between the fourth analysis rule and the corresponding data element, wherein the scenario constraint association relationship is that the scenario type identifier of the data element must match the applicable scenario type of the fourth analysis rule; Step S505: Based on the time constraint association relationship between the third analysis rule and the data element, and the scenario constraint association relationship between the fourth analysis rule and the data element, directed edges are automatically generated based on the constraint association relationships to form a topological sorting of rule execution and construct a rule execution dependency graph. The dependency graph is represented by a directed acyclic graph and includes: rule triggering conditions, rule execution order, and data flow direction; The rule triggering condition defines the preconditions for rule execution; The rule execution order determines the execution priority of the rules based on time and scenario constraints; The data flow direction marks the transmission path of data during the rule execution process; During the execution process, if a rule conflict occurs, the execution will be suspended immediately, the conflict information will be recorded and an alert will be issued. At the same time, the manual priority adjustment function will be provided. If a calculation error occurs, the calculation is terminated immediately, the error data and calculation process log are saved, and then the backup calculation method is used to recalculate. If the problem is still not solved, the manual troubleshooting program is started. After the problem is fixed, the relevant rules are restarted. Step S6: Generate supply trend forecast and supply strategy recommendations.
2. The method for analyzing and managing pharmaceutical supply based on big data according to claim 1, wherein: The historical data includes inventory change records and purchase order records; The basic data units include drug classification data, inventory status data and supplier evaluation data; The first analysis rule is used to analyze the intrinsic characteristics and correlation relationships of a single data unit, and directly affects the analysis and processing of specific data elements; the second analysis rule is used for indicator monitoring, risk judgment and strategy optimization across data units.
3. The method for analyzing and managing pharmaceutical supply based on big data according to claim 2, wherein: The rule base includes a first analysis rule base and a second analysis rule base; Configuring a first analysis rule for each of the basic data units and generating a corresponding first analysis rule base specifically includes: configuring drug characteristic association rules for the drug classification data; Configuring replenishment cycle calculation rules for the inventory status data; configuring supply risk assessment rules for the supplier assessment data; Configuring a second analysis rule for each of the management indicators to generate a second analysis rule base specifically includes: Configure fluctuation threshold rules for supply stability indicators; Configure cost-benefit analysis rules for cost control indicators; Configure provisioning delay judgment rules for service quality indicators.
4. The method for analyzing and managing pharmaceutical supply based on big data according to claim 3, wherein: The rule space includes a first rule space and a second rule space, and step S2 includes the following sub-steps: Step S201: storing the first analysis rule base in a first rule space in an object-oriented rule class structure, wherein the rule class structure includes a rule identifier, a rule condition, and a rule execution body; The rule identifier is used to uniquely identify each analysis rule; The rule conditions are used to define the prerequisites for triggering the execution of the rule; The rule execution body is used to encapsulate the calculation logic or operation instructions corresponding to the conditions; Step S202: storing the second analysis rule base in a second rule space in the form of a metadata-driven rule set, wherein the rule set includes a rule group identifier, a rule priority, and a rule triggering condition; The rule group identifier is used to divide the rules into different business logic groups; The rule priority is used to define the order weight of rule execution; The rule triggering condition includes a configurable logical expression used to determine whether the rule should be executed; Step S203: establishing a version control mechanism for the first analysis rule base and the second analysis rule base, with the administrator responsible for recording the time, operator, update content, and impact scope of each rule update; The automatic review cycle of the first analysis rule base and the second analysis rule base is set through the version control mechanism.
5. The method for analyzing and managing medicine supply based on big data according to claim 4, wherein: The step S3 includes the following sub-steps: Step S301: parsing the pharmaceutical supply data to be analyzed into independent data elements through a data parsing engine; The data parsing engine is configured to parse structured data, semi-structured data, and unstructured data; The structured data includes Excel and databases, and data elements are extracted based on field mapping generated by historical data analysis; The semi-structured data includes XML and JSON, and data elements are extracted through path expressions; The unstructured data includes text contracts, and data elements are extracted by matching a preset regular expression template with a fixed format; The data elements include drug identification elements, timestamp elements, inventory status elements and supplier code elements; Step S302: Performing a validity check on the data elements, verifying the extracted data elements based on the verification rules generated by historical data analysis, specifically including: The drug identification elements must comply with national drug coding standards; The timestamp element must be within the valid time range; The inventory status element must meet the logical constraints of "inventory quantity greater than or equal to D" and "validity period greater than or equal to safety stock period"; Data elements that pass the verification are matched with rules, and data elements that fail the verification are marked as "abnormal" and trigger a manual verification process, which is followed up by the data quality manager.
6. The method for analyzing and managing pharmaceutical supply based on big data according to claim 1, wherein: The parameters include time parameters and scene parameters, the time parameters include time window parameters and time period parameters, and step S4 includes the following sub-steps: Step S401: Associating a time window parameter and a time period parameter for each data element; The time window parameter sets different time windows and data update frequencies according to the length of the prediction period. The data update frequency refers to the update frequency of the basic data unit associated with the data element, including real-time update, daily update and weekly update; The forecast period includes short-term forecast, medium-term forecast and long-term forecast; The short-term prediction is less than or equal to the first time threshold, and a fourth time threshold sliding time window is used, and the data update frequency is once a day; The medium-term forecast is the second time threshold, using the fifth time threshold sliding time window, and the data update frequency is once a week; The long-term forecast is greater than or equal to the third time threshold, and the sixth time threshold sliding time window is used, and the data update frequency is once a month; The time period parameters include data collection time, rule validity period and historical data time span; The data collection time is used to clarify the time point or time period of data collection; The rule validity period is used to set the validity period of the analysis rule; The time span of the historical data is dynamically adjusted according to the characteristics of the drug, including setting the time span of the historical data according to the fourth ratio threshold to the fifth ratio threshold of the validity period according to the length of the validity period of the drug; Based on the time window parameter and the time period parameter, dynamically updating the time-related calculation logic and data screening conditions in the initially set first analysis rule to generate a third analysis rule including a timeliness constraint; Step S402: The scene parameters include a scene type identifier and a scene priority parameter; Configuring a scene type identifier and scene priority parameters for each of the data elements; The scenario type identifier extracts hospital name keywords and matches them with a preset scenario type library to determine the application scenario to which the data element belongs; The scenario priority parameters are automatically identified based on the hospital level, specifically including: For Class A tertiary hospitals, the corresponding priority parameter value is "High" and the corresponding rule threshold is tightened to the sixth ratio threshold based on the default benchmark. Secondary hospitals: The corresponding priority parameter value is "medium", and the default threshold is used; Primary medical institutions: The corresponding priority parameter value is "Low", and the corresponding rule threshold is relaxed from the default benchmark to the seventh ratio threshold; Based on the scenario type identifier and the scenario priority parameter, the second analysis rule base is updated, including filtering the applicable scope of the rule and adjusting the rule execution parameters; The scope of application of the filtering rules is determined by identifying the scenario type, eliminating rules that do not match the current scenario and retaining only applicable rules; The adjustment rule execution parameters dynamically adjust the threshold judgment criteria of the rule according to the scenario priority parameters; The rule set that has completed screening and parameter adjustment is encapsulated into a fourth analysis rule including scenario adaptation logic, wherein the supply strategy recommendation includes inventory management strategy, procurement planning strategy, and supplier selection strategy; Step S403: When the time parameter update causes the forecast period to span quarters, the system automatically connects to the national pharmaceutical industry standard database, obtains the latest standard file through the API interface, and compares and checks the rule thresholds and data formats in the scenario parameters to ensure that the rules comply with industry standards; When the hospital level in the scenario parameters changes, the rationality of the time window parameters is re-evaluated and the time window parameters are adjusted according to the evaluation results to ensure that the analysis rules match the scenario requirements; When any of the following situations occurs, the regular cycle review is skipped and the rule base update is triggered immediately, including: "Major supply incidents" appear in the supplier evaluation data. Major supply incidents include A consecutive delivery delays exceeding B hours or a quality failure rate greater than or equal to the ninth ratio threshold; The regular periodic audit is a process of comprehensively checking and verifying the rule base at preset time intervals; The management indicator threshold exceeds the warning line, which is used to trigger a rule base update or early warning prompt. The warning line is a pre-set threshold boundary, including the supply stability fluctuation exceeding the tenth ratio threshold range.
7. The method for analyzing and managing medicine supply based on big data according to claim 1, wherein: The step S6 includes the following sub-steps: Step S601: Generate a prediction result based on the time factor and data processing logic in the third analysis rule; The forecast results include supply quantity trend, supply time trend and supply price trend; Step S602: Correlate and align the data elements in the third analysis rule, including the generated results, with the management indicators in the fourth analysis rule to generate a rule alignment matrix, specifically including: Calculate the association strength value between data elements and management indicators based on the frequency and correlation coefficient of the simultaneous occurrence of data elements and management indicators in historical data; Pre-set the rule application priority based on the importance of the business process, with a value range of C; Use A / B testing to evaluate the weight of new strategies; Use historical data to evaluate weights for old strategies; When the comprehensive evaluation value calculated based on the association strength value, rule application priority, and policy impact weight is greater than or equal to the eleventh ratio threshold, a corresponding supply policy recommendation is generated, including the new policy and the old policy; Said strategic recommendations include inventory management strategy, procurement planning strategy and supplier selection strategy; The rule registration matrix includes the association strength values between data elements and management indicators, rule application priorities and policy impact weights.
8. A medicine supply analysis and management system based on big data, which is applied to the medicine supply analysis and management method based on big data as described in any one of claims 1 to 7, characterized in that: It includes data configuration module, rule storage module, data matching analysis module, dynamic rule generation module, analysis execution module and result generation module; The data configuration module is used to obtain historical data and decompose it into basic data units, configure the first analysis rule and the second analysis rule for each basic data unit and management indicator, and generate a corresponding rule base; The rule storage module is used to store the corresponding rule bases into corresponding rule spaces respectively; The data matching analysis module is used to decompose the medicine supply data to be analyzed into data elements and match them with basic data units to obtain a first analysis rule; The dynamic rule generation module is used to input parameters for the data elements and generate a third analysis rule and a fourth analysis rule; The analysis execution module is used to store the data to be analyzed and the corresponding third analysis rules and fourth analysis rules into the analysis execution space; The result generation module is used to generate supply trend forecasts and supply strategy recommendations based on the data and rules in the analysis execution space.
Citation Information
Patent Citations
Big data-based medicine supply analysis management system and method
CN116777508A
Storage processing system and method for medical information data
CN118227603A