Metadata model-based hospital operation index prediction method, system and equipment
Through the hospital operation index prediction method based on metadata model, a surgical titer ratio calculation model was established, which solved the complex and single problem of indicator prediction in the existing technology, and achieved comprehensive prediction and rational judgment of multiple key indicators. Provides an effective basis for hospital decision-making.
Patent Information
- Application Number
- CN202411648096.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to obtain the prediction results of hospital operation indicators through simple entry, and single indicator prediction results in complex entry parameters and single results, and failure to effectively utilize the metadata model, resulting in inaccurate prediction trends.
Based on the metadata model, by establishing relationships between key indicators such as the proportion of discharged patients and the incidence of surgical complications, a frequent item set is generated, and a surgical titer ratio calculation model is established to predict the number of hospitalization days, costs and complications of patients who are intended to operate. and validated by XGBoost and CatBoost models.
It realizes a comprehensive prediction of hospital operation indicators, provides reasonable judgment, helps patients and hospitals make the best decisions, avoids medical risks and complaints, provides a basis for future trends, and provides decision-making guidance for hospital managers.
Smart Images

Figure SMS_1
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical data and hospital operation management, and in particular to hospital operation indicators based on metadata models. Background Art
[0002] Surgery is an important means of treating many diseases, especially those that are not effectively treated with drugs or other non-surgical treatments. Successful surgery can significantly improve the patient's quality of life, such as restoring mobility, alleviating pain, and improving appearance. For doctors, surgery can enhance their professional skills, gain a sense of professional achievement, and increase their economic income and academic status. For hospitals, high-quality surgical treatment can improve the hospital's service level and competitiveness, enhance the hospital's reputation, attract more patients, and promote medical research.
[0003] In terms of using models to estimate the development trend of medical indicators, the existing technologies include methods and related products for determining medical development trends based on predictive models disclosed in Chinese patents with publication number CN109473177A and publication date March 15, 2019, and medical indicator prediction methods, devices, electronic devices and storage media disclosed in Chinese patents with publication number CN112215424A and publication date January 12, 2021. These technologies do not consider the impact of metadata on the trend of predicted indicators, and the prediction of indicator trends is limited to single indicator prediction. The separation from the metadata model makes the input parameters more complicated, and it is difficult to obtain indicator prediction results through simple input; single indicator prediction requires the input of multiple parameters, but can only obtain the prediction result of one indicator. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that it is difficult to obtain indicator prediction results through simple input in the prior art and the indicator prediction is single, and to provide a hospital operation indicator prediction method, system and device based on a metadata model.
[0005] The present invention is implemented by the following technical solutions. On the one hand, the present invention provides a hospital operation index prediction method based on metadata model, and the method comprises: Step 1: Establish a metadata model, which is used to obtain key indicators, including the proportion of discharged patients undergoing surgery, the proportion of discharged patients undergoing level 4 surgery, the incidence of complications in surgical patients, the average length of stay, hospitalization costs, and mortality rate; Step 2: Obtain the relationship between the key indicators and establish frequent item sets; Step 3: Merge the metadata model with the key indicators in step 1; Step 4: Based on the frequent item sets, a surgery cost-effectiveness calculation model is established, wherein the input of the surgery cost-effectiveness calculation model is the frequent item sets of key indicators, and the output is the surgery cost-effectiveness; Step 5: Predict the length of hospital stay, hospitalization expenses, incidence of surgical complications and mortality of the planned surgical patient, and obtain the key indicators of the planned surgical patient after the surgery; Step 6: Input the key indicators of the planned surgery patients after the surgery in step 5 into the surgery cost-effectiveness calculation model in step 4 to obtain the surgery cost-effectiveness of the planned surgery patients after the surgery.
[0006] Further, step 2 includes: The Apriori algorithm is used to obtain the relationship between the key indicators, specifically: Generate all possible candidate item sets based on the hospital's historical data and goals; For each candidate item set, calculate its support based on the number of times it appears in all historical data; Remove those itemsets whose support is lower than the minimum support threshold to generate frequent itemsets.
[0007] Furthermore, step 3 also includes: based on the metadata model, standardizing and normalizing the metadata model.
[0008] Further, step 4 includes: Step 4.1: According to the actual situation of multiple hospitals and the future goals of this hospital, combined with the frequent item sets and the scores of multiple hospitals in the performance evaluation of public hospitals, the ideal value of each indicator when the cost-effectiveness ratio of surgery is 100 and the worst value of each indicator when the cost-effectiveness ratio of surgery is 0 are set respectively; Step 4.2: Use the frequent item sets of key indicators as the input of the surgical cost-effectiveness calculation model to train the weights of each indicator; Step 4.3: Use the area under the ROC curve to evaluate the surgical cost-effectiveness calculation model; Step 4.4: Generate metadata values of the validation data set in batches and enter them into the model, update the surgical cost-effectiveness ratio, and verify the surgical cost-effectiveness ratio calculation model.
[0009] Furthermore, the surgical cost-effectiveness calculation model is an XGBoost and CatBoost model based on a gradient boosting machine.
[0010] Furthermore, in step 5, the method for predicting the incidence of surgical complications is: Obtaining historical data of the patient to be operated on, including but not limited to age, gender, length of stay in hospital, type of operation and past medical history; Preprocessing the historical data, wherein the preprocessing includes missing value processing, feature coding, and numerical feature standardization; The incidence of surgical complications is predicted using a random forest model, wherein the input of the random forest model is preprocessed historical data.
[0011] Furthermore, in step 5, the method for predicting the case fatality rate is: Obtaining data affecting the mortality rate of patients scheduled for surgery, including basic characteristics of patients, first laboratory test indicators, diagnosis and surgery information, laboratory indicator trend-derived variables, and complications; The data affecting the mortality rate are input into the mortality rate prediction model to obtain the mortality rate. The mortality rate prediction model is an XGBoost and CatBoost model based on a boosting tree.
[0012] In a second aspect, the present invention provides a hospital operation indicator prediction system based on a metadata model, the system comprising: A metadata model building module is used to build a metadata model, and the metadata model is used to obtain key indicators, including the proportion of discharged patients undergoing surgery, the proportion of discharged patients undergoing level 4 surgery, the incidence of complications in surgical patients, the average length of stay, hospitalization expenses, and mortality rate; A frequent item set establishment module is used to obtain the relationship between the key indicators and establish frequent item sets; A data merging module, used for merging the metadata model and key indicators; A surgery cost-effectiveness calculation model calculation module is used to establish a surgery cost-effectiveness calculation model based on frequent item sets, wherein the input of the surgery cost-effectiveness calculation model is the frequent item sets of key indicators, and the output is the surgery cost-effectiveness; The indicator prediction module is used to predict the hospitalization days, hospitalization expenses, surgical complication rate and mortality rate of the patients to be operated on, and obtain the key indicators of the patients to be operated on after the operation; The surgery cost-effectiveness ratio acquisition module is used to input various key indicators of the planned surgery patients after the operation into the surgery cost-effectiveness ratio calculation model to obtain the surgery cost-effectiveness ratio of the planned surgery patients after the operation.
[0013] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the steps of a hospital operation indicator prediction method based on a metadata model as described above are executed.
[0014] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein a plurality of computer instructions are stored in the computer-readable storage medium, and the plurality of computer instructions are used to enable a computer to execute a hospital operation indicator prediction method based on a metadata model as described above.
[0015] Beneficial effects of the present invention: The present invention obtains key indicators by establishing a metadata model, wherein the key indicators include the proportion of discharged patients undergoing surgery, the proportion of discharged patients undergoing level 4 surgery, the incidence of complications of surgical patients, the average length of stay, hospitalization costs and mortality rate; obtains the relationship between the key indicators and establishes a frequent item set; and merges the metadata model and the key indicator data set; establishes a surgical cost-effectiveness calculation model based on the frequent item set; predicts the length of stay, hospitalization costs, surgical complication rate and mortality rate of the intended surgical patient, and obtains various key indicators after the intended surgical patient undergoes surgery; inputs various key indicators after the intended surgical patient undergoes surgery into the surgical cost-effectiveness calculation model, and obtains the surgical cost-effectiveness of the intended surgical patient after the surgery. According to the surgical cost-effectiveness, the rationality of performing surgery on the intended surgical patient can be judged, thereby providing an optimal comprehensive decision for the patient and the hospital. The present invention is based on the metadata model and uses an algorithm to generate a new complex indicator model, which can provide guidance for hospital managers to make comprehensive decisions.
[0016] The present invention is suitable for predicting future changing trends of medical data and hospital operation indicators, and providing a basis for hospital decision makers and data managers to make decisions in advance, thereby avoiding possible medical risks, group events, patient complaints and other problems. DETAILED DESCRIPTION
[0017] The embodiments of the present invention are described in detail below. The embodiments are exemplary and intended to be used to explain the present invention, but should not be construed as limiting the present invention.
[0018] Embodiment 1: A method for predicting hospital operation indicators based on a metadata model, the method comprising: Step 1: Establish a metadata model, which is used to obtain key indicators, including the proportion of discharged patients undergoing surgery, the proportion of discharged patients undergoing level 4 surgery, the incidence of complications in surgical patients, the average length of stay, hospitalization costs, and mortality rate; Step 2: Obtain the relationship between the key indicators and establish frequent item sets; Step 3: Merge the metadata model with the key indicators in step 1; Step 4: Based on the frequent item sets, a surgery cost-effectiveness calculation model is established, wherein the input of the surgery cost-effectiveness calculation model is the frequent item sets of key indicators, and the output is the surgery cost-effectiveness; Step 5: Predict the length of hospital stay, hospitalization expenses, incidence of surgical complications and mortality of the planned surgical patient, and obtain the key indicators of the planned surgical patient after the surgery; Step 6: Input the key indicators of the planned surgery patients after the surgery in step 5 into the surgery cost-effectiveness calculation model in step 4 to obtain the surgery cost-effectiveness of the planned surgery patients after the surgery.
[0019] This implementation method can judge the rationality of performing surgery on the patient to be operated on according to the cost-effectiveness of the surgery, thereby providing an optimal comprehensive decision for the patient and the hospital. This implementation method is based on the metadata model and uses an algorithm to generate a new complex indicator model, which can provide guidance for hospital managers to make comprehensive decisions, predict future trends in medical data and hospital operating indicators, and provide a basis for early decision-making for hospital decision makers and data managers, thereby avoiding possible medical risks, group events, patient complaints and other issues.
[0020] Furthermore, in step 1, metadata includes but is not limited to the number of discharged patients, the number of surgical procedures for discharged patients, the number of surgical procedures for discharged patients at each level, the number of complications for surgical patients, the average length of stay for discharged patients, the hospitalization expenses for discharged patients, the number of deaths for discharged patients, the length of stay for discharged surgical patients, the expenses for discharged surgical patients, and the number of deaths for discharged surgical patients. A metadata model is established for key indicators, and the selected metadata can be used to accurately calculate key indicators, and a database can be formed based on the metadata model for sustainable analysis.
[0021] Implementation method 2: This implementation method is a further limitation on the hospital operation indicator prediction method based on the metadata model as described above. In this implementation method, step 2 is further limited, specifically including: Step 2 includes: The Apriori algorithm is used to obtain the relationship between the key indicators, specifically: Generate all possible candidate item sets based on the hospital's historical data and goals; For each candidate item set, calculate its support based on the number of times it appears in all historical data; Remove those itemsets whose support is lower than the minimum support threshold to generate frequent itemsets.
[0022] In this implementation, because the key indicators are independent of each other, the proportion of discharged patients undergoing surgery, the proportion of discharged patients undergoing level 4 surgery, the incidence of complications in surgical patients, the average length of stay, hospitalization costs, and mortality cannot be derived directly or indirectly, so the Apriori algorithm is used to mine the potential relationships between originally unrelated indicators and identify the linkage between key indicators. The Apriori algorithm is a classic algorithm for association rule learning, which is mainly used to discover frequent item sets in data sets.
[0023] Implementation method 3: This implementation method further limits the hospital operation indicator prediction method based on the metadata model as described above. In this implementation method, step 3 is further limited, specifically including: Step 3 also includes: based on the metadata model, standardizing and normalizing the metadata model.
[0024] In this implementation, if the business system database is accessed every time an indicator is calculated, the indicator calculation performance will be reduced, and even the normal operation of the business system will be affected. Therefore, it is necessary to merge the meta-information and existing key indicators to create a data set containing multiple dimensions, and integrate the meta-information from different sources into one database to ensure data consistency and accessibility.
[0025] Based on a unified model of meta-information, features are standardized and normalized to improve the training effect of the model, including missing value processing, outlier detection, data deduplication, data type conversion, data normalization, data discretization, data filtering, etc.
[0026] Implementation method 4: This implementation method further limits the hospital operation indicator prediction method based on the metadata model as described above. In this implementation method, step 4 is further limited, specifically including: Step 4 includes: Step 4.1: According to the actual situation of multiple hospitals and the future goals of this hospital, combined with the frequent item sets and the scores of multiple hospitals in the performance evaluation of public hospitals, the ideal value of each indicator when the cost-effectiveness ratio of surgery is 100 and the worst value of each indicator when the cost-effectiveness ratio of surgery is 0 are set respectively; Step 4.2: Use the frequent item sets of key indicators as the input of the surgical cost-effectiveness calculation model to train the weights of each indicator; Step 4.3: Use the area under the ROC curve to evaluate the surgical cost-effectiveness calculation model; Step 4.4: Generate metadata values of the validation data set in batches and enter them into the model, update the surgical cost-effectiveness ratio, and verify the surgical cost-effectiveness ratio calculation model.
[0027] From the perspective of hospital management, the ideal indicator results are: the proportion of discharged patients undergoing surgery and the proportion of discharged patients undergoing level 4 surgery are as high as possible, while the incidence of complications and mortality of surgical patients are as low as possible, and the average length of stay and hospitalization costs are gradually reduced compared with the past. However, there is a complex correlation between the indicators. If one indicator is high, the other indicators may be low. In order to achieve satisfactory results, this implementation adopts the new indicator of surgical cost-effectiveness ratio to measure the cost and benefit of surgery.
[0028] The cost-effectiveness ratio of surgery is a measure of the cost of surgery to the effect of surgery, whether the cost is worthwhile, and comes from the cost-effectiveness analysis (CEA) of economics. The CEA method uses specific clinical treatment objectives (physiological parameters, functional status, years of life gained, etc.) as measurement indicators to calculate the cost per unit of treatment effect of different plans or therapies.
[0029] Implementation mode 5: This implementation mode further limits the hospital operation index prediction method based on the metadata model as described above. In this implementation mode, the surgical cost-effectiveness calculation model is further limited, specifically including: The surgical cost-effectiveness ratio calculation model is an XGBoost and CatBoost model based on a gradient boosting machine.
[0030] In this embodiment, the selection of the surgical cost-effectiveness calculation model is to evaluate the effect of each model, and the fitting effect of each model is evaluated using the area under the ROC curve (AUC). The fitting effect of the XGBoost and CatBoost models based on the Gradient Boosting Machines (GBM) is better than that of Random forest, Lasso, Logistic regression and SVM. Further analysis of the difference in the model fitting effect of the training set and the test set found that Catboost was seriously overfitted (training set AUC=0.991, test set AUC=0.882, a large difference), and the effect of Catboost in the test set was not much different from that of XGBoost (Catboost test set AUC=0.882, XGboost test set AUC=0.875, a small difference), so the XGBoost model was selected.
[0031] Implementation method 6: This implementation method further limits the hospital operation indicator prediction method based on the metadata model as described above. In this implementation method, the prediction method of the surgical complication rate in step 5 is further limited, specifically including: In step 5, the method for predicting the incidence of surgical complications is: Obtaining historical data of the patient to be operated on, including but not limited to age, gender, length of stay in hospital, type of operation and past medical history; Preprocessing the historical data, wherein the preprocessing includes missing value processing, feature coding, and numerical feature standardization; The incidence of surgical complications is predicted using a random forest model, wherein the input of the random forest model is preprocessed historical data.
[0032] In this embodiment, age: The patient's age is usually related to the risk of complications. Gender: Gender may affect the manifestation of the disease and the occurrence of complications. Length of hospital stay: The longer the hospital stay, the higher the risk of complications such as infection. Type of surgery: The complexity and type of surgery may affect the occurrence of complications. Past medical history: The presence or absence of a past medical history (such as diabetes, hypertension, etc.) may be closely related to the risk of complications.
[0033] Implementation method 7: This implementation method further limits the hospital operation indicator prediction method based on the metadata model as described above. In this implementation method, the prediction method of the mortality rate in step 5 is further limited, specifically including: In step 5, the method for predicting the case fatality rate is: Obtaining data affecting the mortality rate of patients scheduled for surgery, including basic characteristics of patients, first laboratory test indicators, diagnosis and surgery information, laboratory indicator trend-derived variables, and complications; The data affecting the mortality rate are input into the mortality rate prediction model to obtain the mortality rate. The mortality rate prediction model is an XGBoost and CatBoost model based on a boosting tree.
[0034] In this embodiment, the relevant data that affect the surgical success rate or mortality rate of the planned surgical patient are identified, and these data and the boosted tree model are used to effectively predict the mortality rate. For the prediction of mortality rate, the XGBoost and CatBoost models based on the boosted tree have better fitting effects than Random forest, Lasso, Logistic regression and SVM.
[0035] Embodiment 8: This embodiment is an example of a hospital operation indicator prediction method based on a metadata model as described above, and specifically includes: 1. Identify the metadata information that constitutes the statistical indicator Meta-information analysis: Understand the meta-information contained in the table structure corresponding to the subject table of all current reports, such as field type, data source, timestamp, record frequency, etc.
[0036] Indicators related to surgery generally include the proportion of surgery among discharged patients, the proportion of level 4 surgery among discharged patients, and the incidence of complications among surgical patients. In addition, the average length of stay, hospitalization costs, and mortality rate are also key indicators for assessing hospital performance.
[0037] The above surgery-related indicators can be obtained by calculation from the metadata model. The metadata information involved is shown in the following table.
[0038] Metadata Information Table
[0039] The range of values allowed by metadata fields is also an important part of the metadata model. For example, CV06.00.226 discharge mode code includes 1 discharge by doctor's order, 2 transfer to another hospital by doctor's order, 3 transfer to a community health service institution or a township health center by doctor's order, 4 discharge without doctor's order, 5 death, and 9 other.
[0040] To calculate the proportion of level 4 surgeries, the number of cases with a surgical level code value of 4 in the metadata is extracted according to the time period as the numerator, and the number of cases with a non-empty surgical code field in the metadata during the same period is used as the denominator.
[0041] Therefore, the number of discharged patients, the number of surgeries performed on discharged patients, the number of surgeries of each level on discharged patients, the number of complications on surgical patients, the average length of stay of discharged patients, the hospitalization expenses of discharged patients, the number of deaths among discharged patients, the length of stay of discharged surgical patients, the expenses of discharged surgical patients, and the number of deaths among discharged surgical patients can all be regarded as metadata in statistical analysis.
[0042] Similarly, each statistical indicator can be associated with metadata.
[0043] However, the indicators are independent of each other, and it is impossible to infer the proportion of surgeries among discharged patients, the incidence of complications among surgical patients, the average length of stay, hospitalization costs, mortality rate, etc. from the proportion of level 4 surgeries among discharged patients.
[0044] The proportion of level 4 surgeries is an important indicator for measuring the number of complex and difficult surgeries performed on inpatients in medical institutions. It reflects the severity of the diseases treated by the hospital and is particularly valued by large hospitals. The proportion of level 4 surgeries performed on discharged patients is also included in the performance evaluation indicators of public hospitals.
[0045] For hospital managers, decision-making is very difficult. Because if managers want to increase the proportion of level 4 surgeries, they have no way of knowing the impact of changes in this indicator on indicators such as average length of stay and hospitalization costs. If the proportion of level 4 surgeries is increased, but the incidence of complications, average length of stay, and hospitalization costs all increase, this will cause the hospital to score lower in the national public hospital performance assessment, and such a result is unacceptable.
[0046] 2. Identify the relationships between key indicators and establish frequent item sets.
[0047] The ratios of surgeries among discharged patients, the ratios of Class-IV surgeries among discharged patients, the complication incidence rate among surgical patients, the average length of stay, the hospitalization cost, and the case fatality rate cannot be directly or indirectly derived.
[0048] The present invention uses the Apriori algorithm to mine the potential relationships between originally uncorrelated indicators and identify the linkages between key indicators. The Apriori algorithm is a classic algorithm for association rule learning. It is mainly used to discover frequent item sets in a dataset and generate strong association rules from them.
[0049] Generate candidate item sets: Starting from single items, generate all possible candidate item sets. Combining the hospital's historical data and future goals, assume that the ratio of surgeries among discharged patients is set to 20 values in the range of 26% - 45%, such as 26%, 27%, 28%, 29% of the ratio of surgeries among discharged patients, until 45% of the ratio of surgeries among discharged patients. All other indicators are also set with corresponding values in combination with historical data and future goals. In this way, all possible item sets can be generated. For example Candidate item 1 [Ratio of surgeries among discharged patients: 30%, Ratio of Class-IV surgeries among discharged patients: 20%, Complication incidence rate among surgical patients: 0.5%, Average length of stay: 9 days, Hospitalization cost: 35,000 yuan, Case fatality rate: 0.5%] Candidate item 2 [Ratio of surgeries among discharged patients: 35%, Ratio of Class-IV surgeries among discharged patients: 25%, Complication incidence rate among surgical patients: 0.5%, Average length of stay: 8 days, Hospitalization cost: 25,000 yuan, Case fatality rate: 0.5%] Candidate item 3... N Calculate support: For each candidate item set, calculate the number of times it appears in all historical data to determine its support.
[0050] In the Apriori algorithm, non-empty subsets of frequent item sets must also be frequent. If an item set I does not meet the minimum support threshold s, that is, P(I) < s, then the item set I is not frequent; if an item E is added to I, the resulting item set (i.e., I ∪ E) cannot appear more frequently than I. Therefore, I ∪ E is also not frequent, that is, P(I ∪ E) < s.
[0051] Generate frequent item sets: Based on the support, remove those candidate items with confidence lower than the minimum confidence threshold to form frequent item sets.
[0052] The use of the algorithm is as follows: from apyori import apriori # Candidate item data transactions = [ ['Surgery accounted for 30%', 'Level 4 surgery accounted for 20%', 'Complication rate 0.5%', 'Average hospital stay 9 days', 'Hospitalization cost 35,000 yuan', 'Mortality rate 0.5%'], ['Surgery ratio 35%', 'Level 4 surgery ratio 25%', 'Complication rate 0.5%', 'Average hospital stay 8 days', 'Hospitalization cost 25,000 yuan', 'Mortality rate 0.5%'], ['Surgery accounted for 40%', 'Level 4 surgery accounted for 30%', 'Complication rate 0.6%', 'Average hospital stay 10 days', 'Hospitalization cost 40,000 yuan', 'Mortality rate 0.6%'], # Add more candidates... ] # Generate frequent itemsets using the Apriori algorithm rules = apriori(transactions, min_support=0.1, min_confidence=0.6,min_lift=1.0, min_length=2) # Convert the result to a list results = list(rules) # Output association rules for result in results: # Output association rules and confidence for rule in result.ordered_statistics: if rule.confidence>= 0.6:# Set the minimum confidence threshold to 0.6 print(f"Rule: {rule.items_base} ->{rule.items_add}") print(f"Confidence: {rule.confidence}") print(f"Lift: {rule.lift}") print("-" * 30) 3. Data integration and feature engineering If the business system database is accessed every time an indicator is calculated, the indicator calculation performance will be reduced, and even the normal operation of the business system will be affected. Therefore, it is necessary to merge the meta information and the key indicators of each day to create a data set containing multiple dimensions, and integrate the meta information from different sources into one database to ensure data consistency and accessibility.
[0053] To facilitate model training, we store key indicators of each day as metadata according to natural days, such as the number of discharged patients, the number of surgeries performed on discharged patients, the number of surgeries of each level on discharged patients, the number of complications on surgical patients, the average length of stay of discharged patients, the hospitalization expenses of discharged patients, the number of deaths of discharged patients, the average length of stay of discharged surgical patients, the hospitalization expenses of discharged surgical patients, and the number of deaths of discharged surgical patients. In addition, the dataset also stores patient-centric metadata information for each case to facilitate drill-down and refined analysis of indicators.
[0054] Based on a unified model of meta-information, features are standardized and normalized to improve the training effect of the model, including missing value processing, outlier detection, data deduplication, data type conversion, data normalization, data discretization, data filtering, etc.
[0055] Missing value processing: For missing values in the data, the mean, median, mode or other statistical methods can be used to fill them, or interpolation, regression analysis, decision tree and other methods can be used for estimation. For example, if the actual number of days in hospital is missing in the metadata, it can be calculated based on the discharge time (out of the area time) and the admission time (in of the area time). If the discharge method is missing, it can be inferred based on whether there is a death summary or death cause report card.
[0056] Outlier detection: Use statistical methods such as Z-score, IQR or clustering algorithms, density-based algorithms to identify and handle outliers, such as surgical patients with actual hospital stays of less than one day or more than 365 days.
[0057] Data deduplication: By comparing the keywords in the data records, use sorting and merging methods to identify and delete duplicate data. For example, for a medical record number, there are two medical records in the same time period.
[0058] Data type conversion: Convert data from one type to another, such as converting the actual number of hospitalization days of a string type into a number.
[0059] Data normalization: Scale the data to a specific range, such as whether a complication exists, with 1 indicating yes and 0 indicating no.
[0060] Data discretization: Convert continuous variables into categorical variables to simplify the complexity of the model. For example, the historical percentage of discharged patients undergoing surgery can be rounded off to a categorical variable.
[0061] Data filtering: Filter data according to specific conditions and exclude unnecessary data, such as excluding medical record metadata of newborns born normally in obstetrics.
[0062] 4. Calculate new indicators From the perspective of hospital management, the ideal indicator results are: the proportion of surgeries among discharged patients and the proportion of level 4 surgeries among discharged patients are as high as possible, while the incidence of complications and mortality rate of surgical patients are as low as possible, and the average length of stay and hospitalization costs gradually decrease compared with the past.
[0063] However, there are complex correlations between the indicators. If one indicator is high, the other indicators may be low. How to achieve satisfactory results? The present invention uses a new indicator, the cost-effectiveness ratio of surgery, to measure the cost and benefit of surgery.
[0064] The cost-effectiveness ratio of surgery is essentially a measure of the cost of surgery relative to the effect of surgery, and whether the cost is worthwhile. It comes from the cost-effectiveness analysis (CEA) in economics. The CEA method uses specific clinical treatment objectives (physiological parameters, functional status, years of life gained, etc.) as measurement indicators to calculate the cost per unit of treatment effect of different plans or therapies.
[0065] (1) Based on the actual situation and future goals of many hospitals, as well as the annual scores in the performance appraisal of public hospitals, the ideal values of each indicator were set when the surgical cost-effectiveness ratio was 100 based on frequent item sets. For example, the proportion of discharged patients undergoing surgery was 45%, the proportion of discharged patients undergoing level 4 surgery was 40%, the incidence of complications in surgical patients was 0.1%, the mortality rate was 0%, the average length of stay was 7 days, and the hospitalization cost was 100,000 yuan. In addition, the worst value when the surgical cost-effectiveness ratio was 0 was set.
[0066] (2) Then, all frequent item sets from the worst value to the ideal value of the surgical proportion of discharged patients, the proportion of grade 4 surgery of discharged patients, the incidence of complications of surgical patients, the mortality rate, the average length of stay, and the hospitalization cost are taken as input parameters to train the weights of each component indicator.
[0067] (3) The invention uses multiple algorithms such as decision tree, random forest, gradient boosting machine (GBM), and support vector machine (SVM) to calculate the weight of each indicator.
[0068] Decision Trees and Random Forests: These models estimate the importance of features by building a tree structure. In decision trees, the weight of a feature can be determined by information gain or reduction in Gini impurity. Random forests provide an estimate of feature importance by averaging the results of multiple trees. The advantage of this approach is that feature weights can be obtained directly through the model's feature_importances_ attribute.
[0069] Gradient Boosting Machine (GBM): Algorithms such as XGBoost and LightGBM improve model performance by iteratively building decision trees and focusing on the residuals of previous models. These models also provide feature_importances_ attributes to evaluate the importance of features.
[0070] Support Vector Machine (SVM): In SVM, feature weights are associated with support vectors. The kernel technique in SVM allows finding the optimal splitting plane in high-dimensional space, thereby assigning corresponding weights to different features.
[0071] Feature importance based on linear models: In linear models, the importance of features can be evaluated by the size of the coefficients. For example, in a ridge regression model, the coef_ attribute of the model can be used to obtain the coefficient size of each feature, which reflects the weight of the feature.
[0072] (4) Evaluate the effect of each model. The area under the ROC curve (AUC) was used to evaluate the fitting effect of each model. The XGBoost and CatBoost models based on the Gradient Boosting Machines (GBM) had better fitting effects than Random Forest, Lasso, Logistic Regression and SVM. Further analysis of the difference in model fitting effects between the training set and the test set revealed that Catboost was seriously overfitted (training set AUC = 0.991, test set AUC = 0.882, a large difference), and the effect of Catboost in the test set was not much different from that of XGBoost (Catboost test set AUC = 0.882, XGboost test set AUC = 0.875, a small difference). Therefore, the XGBoost model is recommended.
[0073] (5) Verify the surgical cost-effectiveness calculation model. Generate metadata values of the validation data set in batches, including the number of discharged patients per day, the number of surgical procedures performed on discharged patients, the number of surgical procedures performed on discharged patients at each level, the number of complications of surgical patients, the average length of stay of discharged patients, the hospitalization expenses of discharged patients, the number of deaths of discharged patients, the average length of stay of discharged surgical patients, the hospitalization expenses of discharged surgical patients, and the number of deaths of discharged surgical patients. Enter the values into the model to automatically calculate the new indicator surgical cost-effectiveness.
[0074] 5. Model training and validation Next, for a specific patient scheduled for surgery, we need to calculate what impact the surgery would have on the hospital’s overall surgical cost-effectiveness, whether it would be positive or negative.
[0075] Then, each factor that constitutes the cost-effectiveness ratio of surgery needs to be calculated separately.
[0076] (1) First, calculate the length of hospital stay, hospitalization expenses, incidence of surgical complications, and mortality rate for each patient who is scheduled for surgery.
[0077] (1.1) Prediction of length of hospital stay.
[0078] The present invention uses the LightGBM algorithm to input the medical records, surgical information, diagnosis codes, laboratory results, medication records, basic patient information (age, gender, medical history, etc.), and hospitalization days of historical cases of the same type of surgery of similar patients, and extracts characteristic variables closely related to the hospitalization days, such as diagnosis codes, surgical codes, complication codes, nursing levels (special care, secondary care, primary care), and patient age, to generate possible hospitalization days.
[0079] (1.2)Forecast of hospitalization expenses.
[0080] The present invention uses random forest regression and gradient boosting algorithms, and uses detailed information such as medical history, diagnosis, treatment, medication, examination, and billing item details of similar patients as training set input to obtain features with better performance. Using these features, a hospitalization expense prediction model is generated. In addition, data from other similar patients is used for verification.
[0081] (1.3) Incidence of surgical complications.
[0082] Complete steps and code examples for using a random forest model to predict complication rates in patients, including details on data preparation, feature selection, model training, and evaluation.
[0083] aData Preparation First, historical data about the patient needs to be collected, which should include several characteristics that may affect the incidence of complications. The following are some common characteristics: Age: The patient's age often correlates with the risk of complications.
[0084] Gender: Gender may affect disease presentation and the occurrence of complications.
[0085] Length of stay: The longer you are in the hospital, the higher your risk of complications, such as infection, may be.
[0086] Type of surgery: The complexity and type of surgery may affect the occurrence of complications.
[0087] Past medical history: The presence or absence of a past medical history (such as diabetes, hypertension, etc.) may be closely related to the risk of complications.
[0088] b. Data preprocessing Handling missing values: Make sure there are no missing values in the dataset. If there are missing values, you can choose to delete those samples or fill them using imputation methods.
[0089] Feature encoding: Convert categorical variables (such as gender, type of surgery, and past medical history) into numerical values so that the machine learning model can process them. This can be achieved through One-Hot Encoding.
[0090] Standardize numerical features: Numerical features (such as age and length of stay) should be standardized to ensure that they are on the same scale, which can improve the convergence speed and predictive performance of the model.
[0091] c Random Forest Model Training Random forest is a powerful ensemble learning method that improves prediction accuracy by building multiple decision trees and combining their predictions. When training a model, the dataset is usually divided into a training set and a test set to evaluate the model performance.
[0092] dModel Evaluation The performance of the model was evaluated using a variety of metrics, including: Accuracy: The proportion of correct predictions made by the model.
[0093] Confusion Matrix: Provides detailed information about the prediction results, including the number of true positives, false positives, true negatives, and false negatives.
[0094] Classification report: Contains metrics such as precision, recall, and F1 score to help more comprehensively evaluate model performance.
[0095] (1.4) Case fatality rate: The initial model proposed is as follows.
[0096] a Basic characteristics of patients (gender, age) and first laboratory test indicators were entered into the model b Basic characteristics of the patient (gender, age) + first laboratory test indicators + diagnosis and surgery information entered into the model c Variables derived from the basic characteristics of patients (gender, age) + first laboratory test indicators + diagnosis and surgery information + laboratory indicator change trends were entered into the model.
[0097] d Patient basic characteristics (gender, age) + first laboratory test indicators + diagnosis, surgery information + laboratory indicator change trend derived variables + complications were entered into the model.
[0098] Each scheme uses 6 prediction algorithms: Logistic regression, Lasso, SVM, RandomForest, Xgboost and Catboost.
[0099] The fitting effect of each model was then evaluated using the area under the ROC curve (AUC). The results showed that the fitting effects of the XGBoost and CatBoost models based on the boosted tree were better than those of Random forest, Lasso, Logistic regression, and SVM. Further analysis of the differences in the model fitting effects of the training set and the test set revealed that Catboost was seriously overfitted, and the effect of Catboost in the test set was not much different from that of XGBoost, so the XGBoost model was recommended.
[0100] (2) Secondly, calculate the impact of the planned surgery on the proportion of discharged patients undergoing surgery, the proportion of discharged patients undergoing level 4 surgery, the incidence of complications in surgical patients, the average length of stay, hospitalization costs, and mortality rate, that is, how the values of each indicator will change.
[0101] (3) Finally, the various indicators affected by the new patient are entered into the model to obtain a new surgical cost-effectiveness index, which is then compared with the original surgical cost-effectiveness index to determine whether the impact of the surgery on the overall surgical cost-effectiveness of the hospital will increase, remain the same, or decrease if the patient undergoes surgery.
[0102] If the cost-effectiveness of the surgery improves, it means that the surgery on the patient has a positive impact on the hospital's operations and can improve the hospital's score in performance appraisals.
[0103] If the surgical cost-effectiveness ratio remains the same, it means that the surgery for the patient has no impact on the hospital's operating indicators.
[0104] If the cost-effectiveness of the surgery is reduced, it means that the surgery for the patient has a negative impact on the hospital's operations, which may reduce the hospital's score in the performance evaluation. In this case, hospital management decision makers can take corresponding measures after comprehensive evaluation. In cases where the surgery has high risks, high incidence of complications, high mortality, long hospital stays, and high hospitalization costs, they can consider reducing risks by having experts from other hospitals perform the surgery, thereby reducing the negative impact on patients and hospital operations.
[0105] 6. Prediction and evaluation The final surgical cost-effectiveness model was run for three months and then verified using the latest real desensitization data.
[0106] 1) Cross-validation division: divide the training set into 5-fold CV training set and CV validation set 2) Model hyperparameter search is performed based on cross-validation, with the goal of maximizing the average AUC on the CV validation set, and the optimal hyperparameters of the model are obtained through the Bayesian optimization strategy.
[0107] 3) According to the optimal hyperparameters, the algorithm model is trained again on the entire training set to obtain the final model 4) Evaluate the performance of the model on the training set and independent test set.
[0108] 7. Implementation and monitoring The trained models (such as models of surgical cost-effectiveness, length of stay, hospitalization expenses, complication rate, etc.) are deployed to the hospital's intranet server.
[0109] At the same time, the database server of the intranet server stores metadata information and standardized business data information.
[0110] The system automatically stores metadata information: number of discharges per day, number of surgeries for discharged patients, number of surgeries of each level for discharged patients, number of complications for surgical patients, average length of stay for discharged patients, hospitalization expenses for discharged patients, number of deaths among discharged patients, average length of stay for discharged surgical patients, hospitalization expenses for discharged surgical patients, number of deaths among discharged surgical patients, and automatically generates daily surgical cost-effectiveness ratio based on the metadata information.
[0111] The system automatically monitors patients who have opened surgery applications, calls the model, and automatically calculates the impact of this patient on the proportion of surgeries among discharged patients, the proportion of level 4 surgeries among discharged patients, the incidence of complications among surgical patients, the average length of stay, hospitalization costs, and mortality rate.
[0112] The system automatically calls the model, calculates the surgical cost-effectiveness of the current patient, and compares it with the previous surgical cost-effectiveness value, so as to determine whether the surgical cost-effectiveness of the patient is positive, equal, or negative, which can be used as a reference for decision-making by the surgery applying physician, ward physician, attending physician, chief physician, department director, etc.
[0113] The system automatically displays the changing trend of surgical cost-effectiveness of each surgical department for reference by the director of the medical department, the vice president, and the president, so as to grasp the indicators of the entire hospital, various departments, diagnosis and treatment groups, and doctors. It can also pay attention to surgical patients with negative results and take timely intervention measures to avoid adverse effects on patients and hospital operations and management.
Claims
1. A hospital operation indicator prediction method based on metadata model, characterized in that: The method comprises: Step 1: Establish a metadata model, which is used to obtain key indicators, including the proportion of discharged patients undergoing surgery, the proportion of discharged patients undergoing level 4 surgery, the incidence of complications in surgical patients, the average length of stay, hospitalization costs, and mortality rate; Step 2: Obtain the relationship between the key indicators and establish frequent item sets; Step 3: Merge the metadata model with the key indicators in step 1; Step 4: Based on the frequent item sets, a surgery cost-effectiveness calculation model is established, wherein the input of the surgery cost-effectiveness calculation model is the frequent item sets of key indicators, and the output is the surgery cost-effectiveness; Step 5: Predict the length of hospital stay, hospitalization expenses, incidence of surgical complications and mortality of the planned surgical patient, and obtain the key indicators of the planned surgical patient after the surgery; Step 6: Input the key indicators of the planned surgery patients after the surgery in step 5 into the surgery cost-effectiveness calculation model in step 4 to obtain the surgery cost-effectiveness of the planned surgery patients after the surgery.
2. A hospital operation indicator prediction method based on metadata model according to claim 1, characterized in that: Step 2 includes: The Apriori algorithm is used to obtain the relationship between the key indicators, specifically: Generate all possible candidate item sets based on the hospital's historical data and goals; For each candidate item set, calculate its support based on the number of times it appears in all historical data; Remove those itemsets whose support is lower than the minimum support threshold to generate frequent itemsets.
3. The hospital operation index prediction method based on metadata model according to claim 1 is characterized in that: Step 3 also includes: based on the metadata model, standardizing and normalizing the metadata model.
4. The method for predicting hospital operation indicators based on metadata model according to claim 1, characterized in that: Step 4 includes: Step 4.1: According to the actual situation of multiple hospitals and the future goals of this hospital, combined with the frequent item sets and the scores of multiple hospitals in the performance evaluation of public hospitals, the ideal value of each indicator when the cost-effectiveness ratio of surgery is 100 and the worst value of each indicator when the cost-effectiveness ratio of surgery is 0 are set respectively; Step 4.2: Use the frequent item sets of key indicators as the input of the surgical cost-effectiveness calculation model to train the weights of each indicator; Step 4.3: Use the area under the ROC curve to evaluate the surgical cost-effectiveness calculation model; Step 4.4: Generate metadata values of the validation data set in batches and enter them into the model, update the surgical cost-effectiveness ratio, and verify the surgical cost-effectiveness ratio calculation model.
5. A hospital operation indicator prediction method based on metadata model according to claim 4, characterized in that: The surgical cost-effectiveness ratio calculation model is an XGBoost and CatBoost model based on a gradient boosting machine.
6. The method for predicting hospital operation indicators based on metadata model according to claim 1, characterized in that: In step 5, the method for predicting the incidence of surgical complications is: Obtaining historical data of the patient to be operated on, including but not limited to age, gender, length of stay in hospital, type of operation and past medical history; Preprocessing the historical data, wherein the preprocessing includes missing value processing, feature coding, and numerical feature standardization; The incidence of surgical complications is predicted using a random forest model, wherein the input of the random forest model is preprocessed historical data.
7. The method for predicting hospital operation indicators based on metadata model according to claim 1, characterized in that: In step 5, the method for predicting the case fatality rate is: Obtaining data affecting the mortality rate of patients scheduled for surgery, including basic characteristics of patients, first laboratory test indicators, diagnosis and surgery information, laboratory indicator trend-derived variables, and complications; The data affecting the mortality rate are input into the mortality rate prediction model to obtain the mortality rate. The mortality rate prediction model is an XGBoost and CatBoost model based on a boosting tree.
8. A hospital operation indicator prediction system based on metadata model, characterized in that: The system comprises: A metadata model building module is used to build a metadata model, and the metadata model is used to obtain key indicators, including the proportion of discharged patients undergoing surgery, the proportion of discharged patients undergoing level 4 surgery, the incidence of complications in surgical patients, the average length of stay, hospitalization expenses, and mortality rate; A frequent item set establishment module is used to obtain the relationship between the key indicators and establish frequent item sets; A data merging module, used for merging the metadata model and key indicators; A surgery cost-effectiveness calculation model calculation module is used to establish a surgery cost-effectiveness calculation model based on frequent item sets, wherein the input of the surgery cost-effectiveness calculation model is the frequent item sets of key indicators, and the output is the surgery cost-effectiveness; The indicator prediction module is used to predict the hospitalization days, hospitalization expenses, surgical complication rate and mortality rate of the patients to be operated on, and obtain the key indicators of the patients to be operated on after the operation; The surgery cost-effectiveness ratio acquisition module is used to input various key indicators of the planned surgery patients after the operation into the surgery cost-effectiveness ratio calculation model to obtain the surgery cost-effectiveness ratio of the planned surgery patients after the operation.
9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor runs the computer program stored in the memory, the steps of the method according to any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of computer instructions, and the plurality of computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Inpatient medical management quality assessment method
CN105046406A
Medical evaluation method and device, electronic equipment and storage medium
CN116564487A
Severe illness specialized ability assessment method and system based on machine learning
CN118919089A
Electric walking aids for the elderly and the disabled
KR1020240170734A
