Day surgery postoperative course management system based on structured electronic medical records
By analyzing the universality and health status sets of preoperative factor characteristics in the day surgery postoperative course management system, the final availability and residual contribution of each postoperative personnel were calculated, and the construction process of the XGBoost model was adjusted, which solved the problem that residuals in the XGBoost model affect the next tree, and improved the prediction accuracy of the model.
Patent Information
- Application Number
- CN202510142474.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-10
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-02-10
AI Technical Summary
When XGBoost calculates the residuals of each row of features based on the predicted values of the current model, a large residual will have a great impact on building the next tree, resulting in poor model performance.
By determining the importance and universality of each preoperative factor feature in the universal analysis of preoperative factor features, combining the health status set and trend availability of postoperative personnel, the final availability of each postoperative personnel to construct the initial feature matrix is calculated, and the residual contribution of each row of the initial feature matrix is determined, and the construction process of the XGBoost model is adjusted.
It effectively solves the problem that the large residuals in the XGBoost model affect the performance of the next tree, improves the overall performance and prediction accuracy of the model, and ensures that the decision tree constructed at each iteration better fits the truly contributed residuals.
Smart Images

Figure CN119601251B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of disease course risk assessment, and in particular to a day surgery postoperative disease course management system based on structured electronic medical records. Background Art
[0002] Day surgery, also known as outpatient surgery or same-day surgery, is a medical procedure in which patients receive treatment on the same day of surgery and do not need to be hospitalized after surgery. Since day surgery takes a shorter time, hospitals cannot monitor patients for a long time like hospitalization. Therefore, it is very important to predict the postoperative recovery status of surgery. It can identify patients who may be at risk and ensure that necessary intervention measures are taken in time after surgery, thereby reducing the occurrence of complications and adverse events.
[0003] Currently, XGBoost is usually used to train a model based on a large amount of structured case data to predict the recovery status of day surgery one week after surgery. Specifically, it is first necessary to convert the structured case data into a feature matrix through feature engineering as the model input. Then, XGBoost gradually builds decision trees to fit the residual of the current model. The training goal of each tree is to optimize the error of the previous tree. The model is continuously adjusted through the gradient boosting method. Finally, the prediction results of each tree are weighted and summed to improve the overall performance of the model. When constructing the initial input feature matrix, each set of features must correspond to a unique recovery status. The large number of structured cases collected may result in many cases with different health conditions in the same feature group. At this time, it is difficult to obtain the recovery status that the feature truly corresponds to. At the beginning of each iteration, XGBoost will calculate the residual of each row of features based on the predicted value of the current model. XGBoost needs to build a new tree based on these residuals. However, due to the large individual differences that may exist among patients, the contribution rate of some rows of features to the actual results may not be high. If the residual is large, it will have a great impact on the next tree to be constructed. Summary of the invention
[0004] In order to solve the technical problem that when XGBoost calculates the residual of each row of features according to the predicted value of the current model, when the residual is large, it will have a great impact on the next tree to be constructed, the purpose of the present invention is to provide a postoperative course management system for day surgery based on structured electronic medical records, and the technical solution adopted is as follows:
[0005] In a first aspect, an embodiment of the present invention provides a postoperative course management system for day surgery based on structured electronic medical records, the system comprising the following modules:
[0006] The preoperative data acquisition module is used to obtain the preoperative factor characteristics of postoperative personnel before laparoscopic surgery;
[0007] The universality analysis module is used to determine the importance of each preoperative factor feature based on the similar characteristics of the preoperative factor features of different postoperative personnel; and to determine the universality of each preoperative factor feature based on the importance of the preoperative factor feature and the frequency of occurrence of the feature;
[0008] The first determination module is used to analyze the preoperative factor characteristics of different postoperative personnel to obtain a set of health conditions of the postoperative personnel; and weight the universality in combination with the set of health conditions of the postoperative personnel to obtain the trend availability of the postoperative personnel;
[0009] A second determination module is used to weight the trend availability according to the aggregation of the preoperative factor characteristics of the postoperative personnel, so as to obtain the final availability of the postoperative personnel for constructing the initial feature matrix;
[0010] The model building module is used to determine the residual contribution of each row of the initial feature matrix according to the final availability and the preoperative factor characteristics of the postoperative personnel; construct the residual of each postoperative personnel in each iteration according to the residual contribution, train a new decision tree based on the residual, and build an XGBoost model; input the preoperative factor characteristics of the postoperative personnel to be analyzed into the XGBoost model to obtain the health status prediction value.
[0011] Preferably, determining the importance of each preoperative factor feature according to similar features of preoperative factor features of different postoperative personnel includes:
[0012] Any preoperative factor feature was taken as the target preoperative factor feature, and the cosine similarity between the target preoperative factor feature of all postoperative personnel and the SF-6 scale score of the postoperative personnel one week after surgery was calculated as the importance of the target preoperative factor feature.
[0013] Preferably, determining the universality of each preoperative factor feature based on the importance of the preoperative factor feature and the frequency of occurrence of the feature includes:
[0014] Taking any preoperative factor feature as the target preoperative factor feature, calculate the proportion of the universality of the target preoperative factor feature to the universality of all preoperative factor features as the first product value;
[0015] Taking any characteristic value in the target preoperative factor feature as the target characteristic value, calculating the frequency of occurrence of the target characteristic value in the target preoperative factor feature as the second product value;
[0016] taking the product of the first product value and the second product value as the characteristic value universality of the target characteristic value in the target preoperative factor characteristic;
[0017] The eigenvalue universalities of all eigenvalues in the target preoperative factor feature are summed to obtain the universality of the target preoperative factor feature.
[0018] Preferably, the analysis of the preoperative factor characteristics of different postoperative personnel to obtain a set of health conditions of the postoperative personnel includes:
[0019] The health status of each postoperative patient was summarized by the SF-6 scale score every day for seven days after surgery.
[0020] Preferably, the calculation formula for the trend availability of postoperative personnel is:
[0021] ;
[0022] in, is the trend availability of the jth postoperative personnel; is the universality of the u-th preoperative factor characteristic; is the health status set of the jth postoperative personnel; is the health status set of the vth postoperative personnel under the uth preoperative factor characteristics; is the Pearson correlation coefficient of the seven-day health status set of the jth postoperative person and the vth postoperative person under the uth preoperative factor characteristics; N is the number of preoperative factor characteristics; M is the number of postoperative people; f is the maximum and minimum normalization function.
[0023] Preferably, the trend availability is weighted according to the aggregation of the preoperative factor characteristics of the postoperative personnel to obtain the final availability of the postoperative personnel for constructing the initial feature matrix, including:
[0024] Any postoperative personnel is taken as the target postoperative personnel, and based on all postoperative personnel, the local outlier factor of the SF-6 scale score of the target postoperative personnel in the next week is calculated as the outlier characteristic value; the outlier characteristic value of the target postoperative personnel is negatively correlated and normalized, and the product of the mapped result value and the trend availability of the target postoperative personnel is taken as the final availability of the target postoperative personnel for constructing the initial feature matrix.
[0025] Preferably, determining the residual contribution of each row of the initial feature matrix according to the final availability and the preoperative factor characteristics of the postoperative personnel includes:
[0026] The difference between the SF-6 scale score of the postoperative personnel and the overall level of the SF-6 scale score of all postoperative personnel was calculated as the scale score difference of the postoperative personnel;
[0027] The residual contribution of each row of the initial feature matrix is determined according to the scale score difference and the final availability of the postoperative personnel for constructing the initial feature matrix.
[0028] Preferably, determining the residual contribution of each row of the initial feature matrix according to the scale score difference and the final availability of the postoperative personnel for constructing the initial feature matrix includes:
[0029] The reciprocal of the product of the scale score difference and the final availability of the postoperative personnel to construct the initial feature matrix is taken as the residual contribution of each row of the initial feature matrix.
[0030] Preferably, constructing the residual of each postoperative person in each iteration according to the residual contribution includes:
[0031] At the K+1th iteration, the residual of the postoperative personnel corresponding to the i-th row is:
[0032]
[0033] in, represents the residual of the postoperative personnel corresponding to the i-th row at the K+1th iteration, represents the residual contribution of the i-th row of the initial feature matrix, is the SF-6 scale score corresponding to the i-th row of the initial feature matrix, K means that K decision trees have been trained before, Represents the predicted value of the kth i-th row of the K decision trees trained previously.
[0034] Preferably, the method of training a new decision tree based on residuals to construct an XGBoost model includes:
[0035] In each round, a new tree is trained based on the previous model. Each training obtains the fitting residual, updates the corresponding prediction value, calculates the new residual, and then trains a new decision tree based on the residual. After the training, XGBoost obtains the final prediction through the weighted sum of all decision trees.
[0036] In a second aspect, a method for postoperative course management of day surgery based on structured electronic medical records is provided, the method comprising the following steps:
[0037] Step S100, obtaining the preoperative factor characteristics of the postoperative personnel before undergoing laparoscopic surgery;
[0038] Step S200, determining the importance of each preoperative factor feature according to the similar features of the preoperative factor features of different postoperative personnel; determining the universality of each preoperative factor feature according to the importance of the preoperative factor feature and the frequency of occurrence of the feature;
[0039] Step S300, analyzing the preoperative factor characteristics of different postoperative personnel to obtain a set of health conditions of the postoperative personnel; combining the set of health conditions of the postoperative personnel, weighting the universality to obtain the trend availability of the postoperative personnel;
[0040] Step S400, weighting the trend availability according to the aggregation of the preoperative factor characteristics of the postoperative personnel to obtain the final availability of the postoperative personnel for constructing the initial feature matrix;
[0041] Step S500, according to the final availability and the preoperative factor characteristics of the postoperative personnel, determine the residual contribution of each row of the initial feature matrix; according to the residual contribution, construct the residual of each postoperative personnel in each iteration, train a new decision tree based on the residual, and construct an XGBoost model; input the preoperative factor characteristics of the postoperative personnel to be analyzed into the XGBoost model to obtain the health status prediction value.
[0042] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, various possible embodiments of the first aspect are implemented.
[0043] In a fourth aspect, an embodiment of the present invention provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0044] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute various possible implementations of the first aspect.
[0045] The embodiments of the present invention have at least the following beneficial effects:
[0046] Compared with the problem that many cases with different health conditions may appear in the same preoperative factor group, it is difficult to obtain the rehabilitation status that this group of preoperative factor characteristics truly corresponds to. The present invention starts from the universality of preoperative factor characteristics, and gradually obtains the availability of the health status of each postoperative user by analyzing the preoperative factor characteristics, and obtains the final availability as the rehabilitation status that this group of characteristics truly corresponds to, and then combines the final availability and the preoperative factor characteristics of the postoperative personnel to determine the residual contribution of each row in the initial feature matrix. Compared with the general XGBoost model that does not consider the true residual contribution of each row and directly iterates to cause a poor model, the present invention introduces the residual contribution rate of each row and applies it to each iteration process, so that the next decision tree constructed each time can better fit the truly contributing residual, avoiding the problem that when the residual of each row of features is calculated, the residual is large and it will affect the construction of the next decision tree. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A system block diagram of a postoperative course management system for day surgery based on structured electronic medical records provided by one embodiment of the present invention;
[0049] Figure 2 A method flow chart of a method for postoperative course management of day surgery based on structured electronic medical records provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the specific implementation method, structure, characteristics and effects of the postoperative course management system for day surgery based on structured electronic medical records proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.
[0051] In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0052] Among them, in the description of the embodiments of the present invention, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" refers to two or more than two.
[0053] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0054] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0055] The embodiments of the present invention are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0056] The specific scheme of the postoperative course management system for day surgery based on structured electronic medical records provided by the present invention is described in detail below with reference to the accompanying drawings.
[0057] See also Figure 1 , which shows a system block diagram of a postoperative course management system for day surgery based on structured electronic medical records provided by an embodiment of the present invention, the system includes the following modules:
[0058] The preoperative data acquisition module 10 is used to obtain the preoperative factor characteristics of the postoperative personnel before undergoing laparoscopic surgery.
[0059] In order to use the XGBoost model to predict the patient's recovery status one week after laparoscopic surgery, the features related to the patient's recovery status one week after laparoscopic surgery are selected as preoperative factor features. Preoperative factor features include: height, age, weight, etc.
[0060] All preoperative factor characteristics of each postoperative person who underwent laparoscopic surgery were collected. The preoperative factor characteristics were quantified to 0-100, and the SF-6 scale score was used to judge the health status of the postoperative person every day within one week after surgery as the patient's structured case.
[0061] Assume that there are M postoperative personnel in total, and fill each postoperative personnel as a row in the following Table 1. It should be noted that Table 1 only uses the preoperative factor characteristics and the SF-6 scale score data on the seventh day after surgery, and does not use the SF-6 scale scores corresponding to the other six days. Please refer to Table 1, which is an example table containing preoperative factor characteristics and scale scores.
[0062] Table 1
[0063]
[0064] The universality analysis module 20 is used to determine the importance of each preoperative factor feature based on the similar characteristics of the preoperative factor features of different postoperative personnel; and determine the universality of each preoperative factor feature based on the importance of the preoperative factor feature and the frequency of occurrence of the feature.
[0065] For the N preoperative factor characteristics that appear in total, the impact of these N preoperative factor characteristics on health status is not the same. Now we need to determine the impact of each of the N preoperative factor characteristics on health status, or the correlation with health status. Here, we use the M cases collected, that is, the collection of all characteristics of the M postoperative personnel collected and the SF-6 score one week after surgery to construct the cosine similarity to construct the following formula to represent the importance of the Tth feature. That is, according to the similar characteristics of the preoperative factor characteristics of different postoperative personnel, the importance of each preoperative factor feature is determined.
[0066] Any preoperative factor feature was taken as the target preoperative factor feature, and the cosine similarity between the target preoperative factor feature of all postoperative personnel and the SF-6 scale score of the postoperative personnel one week after surgery was calculated as the importance of the target preoperative factor feature.
[0067] Taking the Tth preoperative factor feature as the target preoperative factor feature, the calculation formula for the importance of the target preoperative factor feature is:
[0068] ;
[0069] in, is the importance of the Tth preoperative factor feature; f is the maximum and minimum normalization function; M is the number of postoperative personnel; is the characteristic value of the Tth preoperative factor characteristic of the tth postoperative person; The SF-6 scale score of the tth postoperative patient one week after surgery was calculated.
[0070] Represents the cosine similarity between the set of preoperative factor characteristics and the set of SF-6 scores one week after surgery for M postoperative personnel.
[0071] For each preoperative factor feature, when a feature value appears more frequently, it usually means that the feature value can be applied to more user groups, that is, it has a high representativeness in the user group and can effectively reflect the situation of the majority of cases. In other words, the more times this feature value appears, the higher the universality of this feature value. For example, for the preoperative factor feature "age", when the frequency of postoperative personnel aged 46 appears more, the universality of 46 is higher.
[0072] For different preoperative factor characteristics, the contribution of universality is different. Now we need to increase the universality of the eigenvalues corresponding to the preoperative factor characteristics with high importance. Therefore, based on the importance of all preoperative factor characteristics obtained by the above formula, and then combined with the relative number of occurrences of this eigenvalue under each group of preoperative factor characteristics, we can construct the following formula to represent the universality of the i-th preoperative factor characteristic.
[0073] Taking any preoperative factor feature as the target preoperative factor feature, calculate the proportion of the universality of the target preoperative factor feature in the universality of all preoperative factor features as the first product value; taking any characteristic value in the target preoperative factor feature as the target characteristic value, calculate the frequency of occurrence of the target characteristic value in the target preoperative factor feature as the second product value; taking the product of the first product value and the second product value as the characteristic value universality of the target characteristic value in the target preoperative factor feature; summing the characteristic value universalities of all characteristic values in the target preoperative factor feature to obtain the universality of the target preoperative factor feature.
[0074] For the i-th preoperative factor feature, the calculation formula for the universality of the preoperative factor feature is:
[0075] ;
[0076] in, is the universality of the i-th preoperative factor feature; C is the number of eigenvalues of the i-th preoperative factor feature; N is the number of preoperative factor features; is the importance of the i-th preoperative factor feature; is the normalized value of the number of occurrences of the cth eigenvalue in the i-th preoperative factor feature; is the number of occurrences of the cth eigenvalue in the ith preoperative factor feature; f is the maximum and minimum normalization function.
[0077] Then, the universality of the characteristics of all preoperative factors was determined.
[0078] The first determination module 30 is used to analyze the preoperative factor characteristics of different postoperative personnel to obtain a set of health conditions of the postoperative personnel; and weight the universality in combination with the set of health conditions of the postoperative personnel to obtain the trend availability of the postoperative personnel.
[0079] Day surgery is usually a small, minimally invasive, simple operation, and uses standardized surgical techniques and procedures. The standardization and consistency of the surgery make the recovery process of most patients similar. For example, if two patients undergo the same laparoscopic surgery, the technique and treatment of the surgery itself will not be much different, so the general trend of recovery one week and seven days after surgery will also be similar.
[0080] The preoperative factor characteristics of different postoperative personnel were analyzed to obtain the health status set of postoperative personnel. Specifically, the health status set of postoperative personnel was formed by the daily SF-6 scale score of each postoperative personnel for seven days after surgery. For the jth postoperative personnel, the health status set of the postoperative personnel seven days after surgery is as follows:
[0081] ;
[0082] in, is the health status set of the jth postoperative personnel; The SF-6 scale score of the jth postoperative person on the first postoperative day; The SF-6 scale score of the jth postoperative person on the second day after surgery; The SF-6 scale score for the jth postoperative person on the sixth day after surgery; It is the SF-6 scale score of the jth postoperative person one week after surgery, that is, it is the SF-6 scale score of the jth postoperative person on the seventh day after surgery.
[0083] Combined with the health status set of the postoperative personnel, the universality of the postoperative personnel is weighted to obtain the trend availability of the preoperative characteristics of the postoperative personnel.
[0084] Now compare the recovery trend of any postoperative personnel with that of other postoperative personnel. The more similar the recovery trends are, the better. The greater the universality of the preoperative factor characteristics corresponding to other postoperative personnel, the more representative the results of trend availability are. Therefore, the universality obtained above can be used to weight and construct the following formula to represent the trend availability of the jth postoperative personnel.
[0085] The trend availability is calculated as:
[0086] ;
[0087] in, is the trend availability of the jth postoperative personnel; is the universality of the u-th preoperative factor characteristic; is the health status set of the jth postoperative personnel; is the health status set of the vth postoperative personnel under the uth preoperative factor characteristics; is the Pearson correlation coefficient of the seven-day health status set of the jth postoperative person and the vth postoperative person under the uth preoperative factor characteristics; N is the number of preoperative factor characteristics; M is the number of postoperative people; f is the maximum and minimum normalization function.
[0088] The second determination module 40 is used to weight the trend availability according to the aggregation of the preoperative factor characteristics of the postoperative personnel, so as to obtain the final availability of the postoperative personnel for constructing the initial feature matrix.
[0089] Under the same set of preoperative factor characteristics, the patient's physical condition, immune response and recovery ability also tend to be similar, so the postoperative pain, recovery speed, complications, etc. should also be similar, that is, based on the trend availability, the health score one week after surgery should also be similar, corresponding to higher aggregation, and there are more postoperative personnel collected, so there may be some extreme values, such as individuals with particularly high or low health scores. Therefore, based on the trend availability, the LOF anomaly detection algorithm is used to plot the SF-6 scale scores of all postoperative personnel one week after surgery under the i-th group of preoperative factor characteristics on a two-dimensional plane, where both dimensions of the two-dimensional plane are SF-6 scale scores. To find more clustered cases to construct the following formula to represent the final availability of the j-th postoperative personnel under the i-th preoperative factor characteristics to construct the initial feature matrix.
[0090] The method for obtaining the final availability of postoperative personnel for constructing the initial feature matrix is as follows: taking any postoperative personnel as the target postoperative personnel, and based on all postoperative personnel, calculating the local outlier factor of the SF-6 scale score of the target postoperative personnel in the next week as the outlier characteristic value; performing negative correlation normalization mapping on the outlier characteristic value of the target postoperative personnel, and taking the product of the mapped result value and the trend availability of the target postoperative personnel as the final availability of the target postoperative personnel for constructing the initial feature matrix.
[0091] Taking the jth postoperative person as the target postoperative person, the calculation formula for the final availability of the target postoperative person for constructing the initial feature matrix is:
[0092] ;
[0093] in, is the final availability of the initial feature matrix constructed for the jth postoperative personnel pair; exp is an exponential function with a natural constant as the base; The SF-6 scale score of the jth postoperative patient one week after surgery; The local outlier factor for the jth postoperative person based on the SF-6 scale scores of all postoperative persons one week after surgery; It characterizes the clustering of the jth postoperative personnel under the ith preoperative factor characteristics; is the trend availability of the jth postoperative person.
[0094] The final availability of all postoperative personnel for constructing the initial feature matrix was then obtained.
[0095] The model building module 50 is used to determine the residual contribution of each row of the initial feature matrix according to the final availability and the preoperative factor characteristics of the postoperative personnel; construct the residual of each postoperative personnel in each iteration according to the residual contribution, train a new decision tree based on the residual, and construct an XGBoost model; input the preoperative factor characteristics of the postoperative personnel to be analyzed into the XGBoost model to obtain the health status prediction value.
[0096] For the initial feature matrix, one preoperative factor feature can only correspond to one unique SF-6 scale score. The above has determined the final availability of each postoperative person under a set of preoperative factor features for constructing the initial feature matrix. Now, for the postoperative person with the largest final availability under the same preoperative factor features, the postoperative person with the largest final availability is taken as the representative postoperative person of the preoperative factor features. The i-th group of preoperative factor features has The personnel with the highest final availability are . Then the initial feature matrix can be obtained.
[0097] However, the preoperative personnel with the highest final availability selected above cannot be said to fully represent the SF-6 scale score one week after surgery under the preoperative factor characteristics of this line. Now we need to see to what extent it can fully represent this line (residual contribution rate). If it can fully represent this line, the average error with other cases' scores under availability should not vary too much to prevent some cases with individual differences.
[0098] According to the final availability and the preoperative factor characteristics of the postoperative personnel, the residual contribution of each row of the initial feature matrix is determined. The calculation formula of the residual contribution is:
[0099] ;
[0100] in, is the residual contribution of the i-th row in the initial feature matrix; The final availability of constructing the initial feature matrix for the i-th postoperative person pair; Represents the SF-6 scale scores corresponding to all rows in the initial feature matrix; is the SF-6 scale score of the preoperative factor characteristics corresponding to the i-th row in the initial feature matrix, that is, the SF-6 scale score of the preoperative factor characteristics corresponding to the i-th postoperative personnel; is a hyperparameter.
[0101] In the embodiment of the present invention, the value of the hyperparameter is 0.01. In other embodiments, the value may be adjusted by the implementer according to actual conditions.
[0102] Furthermore, the residual error in each iteration of XGBoost was corrected to build a better XGBoost model for predicting health status one week after laparoscopic surgery.
[0103] First, train the first decision tree based on the initial feature matrix. Then use the decision tree to obtain the residual between the predicted value and the actual value for each row to iteratively train the second decision tree. Then continue to train using the residual between the predicted value and the actual value. Assuming that the decision tree is to be trained for the K+1th iterative training, the residual for each row is the difference between the actual value and the decision tree obtained from the previous K trainings.
[0104] Please refer to Table 2, which is an example table containing preoperative factor characteristics and residuals at the K+1th iteration.
[0105] Table 2
[0106]
[0107] It has been found that the residual contribution rate of each row is different. In order to make the residual of this row truly represent this row, the following formula is constructed to represent the residual of the i-th row at the K+1th iteration:
[0108] ;
[0109] in, represents the residual of the i-th row at the K+1-th iteration, represents the residual contribution of the i-th row of the initial feature matrix, the SF-6 scale score corresponding to the i-th row of the initial feature matrix, and K represents that K decision trees have been trained before z. Represents the predicted value of the kth i-th row of the K decision trees trained previously.
[0110] In each round, a new tree is trained based on the previous model. Each training gets the fitted residuals, the corresponding updated predictions, and the new residuals are calculated. Then, a new decision tree is trained based on the residuals. After the training, XGBoost gets the final prediction by the weighted sum of all decision trees. More specifically: In each round, a new tree is trained based on the previous model, and the prediction ability of the model is improved by fitting the residuals. Each time, the predictions are updated, and new residuals are calculated, and then a new decision tree is trained based on these residuals. After the training, XGBoost gets the final prediction by the weighted sum of all trees.
[0111] Finally, postoperative health management notifications are implemented through the XGBoost prediction model. Based on the XGBoost model constructed in the above steps, the different preoperative factor characteristics of each laparoscopic surgery patient can be input to give a prediction of the patient's health status one week after surgery. That is, the preoperative factor characteristics of the postoperative personnel to be analyzed are input into the XGBoost model to obtain the predicted value as the health status prediction value. When the health status prediction value of the model deviates from the patient's actual postoperative health status by more than 5 units, the system automatically issues an alarm to remind the medical team to re-evaluate the treatment plan and adjust the care plan.
[0112] The introduction of this system means that doctors no longer need to rely solely on experience or manual records to judge the patient's postoperative recovery, but instead have an intelligent support system based on data and algorithms. Through this prediction and automatic alarm mechanism, human omissions can be reduced, the accuracy and timeliness of treatment can be improved, thereby improving the patient's prognosis and the medical service level of the entire hospital.
[0113] See also Figure 2 , which shows that an embodiment of the present invention provides a method for postoperative course management of day surgery based on structured electronic medical records, the method comprising the following steps:
[0114] Step S100, obtaining the preoperative factor characteristics of the postoperative personnel before undergoing laparoscopic surgery;
[0115] Step S200, determining the importance of each preoperative factor feature according to the similar features of the preoperative factor features of different postoperative personnel; determining the universality of each preoperative factor feature according to the importance of the preoperative factor feature and the frequency of occurrence of the feature;
[0116] Step S300, analyzing the preoperative factor characteristics of different postoperative personnel to obtain a set of health conditions of the postoperative personnel; combining the set of health conditions of the postoperative personnel, weighting the universality to obtain the trend availability of the postoperative personnel;
[0117] Step S400, weighting the trend availability according to the aggregation of the preoperative factor characteristics of the postoperative personnel to obtain the final availability of the postoperative personnel for constructing the initial feature matrix;
[0118] Step S500, according to the final availability and the preoperative factor characteristics of the postoperative personnel, determine the residual contribution of each row of the initial feature matrix; according to the residual contribution, construct the residual of each postoperative personnel in each iteration, train a new decision tree based on the residual, and construct an XGBoost model; input the preoperative factor characteristics of the postoperative personnel to be analyzed into the XGBoost model to obtain the health status prediction value.
[0119] Optionally, the transmission medium may be a wired link, such as but not limited to coaxial cable, optical fiber, and digital subscriber line, or a wireless link, such as but not limited to Wireless Fidelity (WIFI), Bluetooth, and mobile device network.
[0120] It should be noted that the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above.
[0121] A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Exemplarily, the computer device includes: a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the computer device can execute any of the above-mentioned day surgery postoperative course management systems based on structured electronic medical records.
[0122] In addition, an embodiment of the present invention also protects a device, which may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to execute the day surgery postoperative course management system based on structured electronic medical records provided by an embodiment of the present invention.
[0123] The embodiment of the present invention can divide the functional modules of the device according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0124] In the case of dividing each module according to each function, the device may also include a signal uploading module, a determining module, an adjusting module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0125] It should be understood that the device provided in the embodiment of the present invention is used to execute the above-mentioned day surgery postoperative course management system based on structured electronic medical records, and thus can achieve the same effect as the above-mentioned implementation method.
[0126] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a device, the processing module may be used to control and manage the actions of the device. The storage module may be used to support the device to execute mutual program codes, etc. The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0127] In addition, the device provided in the embodiment of the present invention can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the postoperative course management system for day surgery based on structured electronic medical records provided in the above embodiment.
[0128] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement the postoperative course management system for day surgery based on structured electronic medical records provided by the above-mentioned embodiment.
[0129] An embodiment of the present invention also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement the postoperative course management system for day surgery based on structured electronic medical records provided by the above-mentioned embodiment.
[0130] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present invention are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Through the description of the above implementation methods, technicians in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways.
[0131] The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. There may be other divisions in actual implementation. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
[0132] It should also be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0133] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0134] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0135] The above contents are only specific implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention.
Claims
1. A postoperative course management system for day surgery based on structured electronic medical records, characterized in that: The system includes the following modules: The preoperative data acquisition module is used to obtain the preoperative factor characteristics of postoperative personnel before laparoscopic surgery; The universal analysis module is used to determine the importance of each preoperative factor feature based on the similar characteristics of preoperative factor features of different postoperative personnel; According to the importance of the preoperative factor characteristics and the frequency of occurrence of the characteristics, the universality of each preoperative factor characteristic was determined; The first determination module is used to analyze the preoperative factor characteristics of different postoperative personnel to obtain a set of health conditions of the postoperative personnel; and weight the universality in combination with the set of health conditions of the postoperative personnel to obtain the trend availability of the postoperative personnel; A second determination module is used to weight the trend availability according to the aggregation of the preoperative factor characteristics of the postoperative personnel, so as to obtain the final availability of the postoperative personnel for constructing the initial feature matrix; Among them, the method for determining the universality of each preoperative factor feature is: taking any preoperative factor feature as the target preoperative factor feature, calculating the proportion of the universality of the target preoperative factor feature in the universality of all preoperative factor features as the first product value; taking any characteristic value in the target preoperative factor feature as the target characteristic value, calculating the frequency of occurrence of the target characteristic value in the target preoperative factor feature as the second product value; taking the product of the first product value and the second product value as the characteristic value universality of the target characteristic value in the target preoperative factor feature; summing the characteristic value universalities of all characteristic values in the target preoperative factor feature to obtain the universality of the target preoperative factor feature; The model building module is used to determine the residual contribution of each row of the initial feature matrix according to the final availability and the preoperative factor characteristics of the postoperative personnel; construct the residual of each postoperative personnel in each iteration according to the residual contribution, train a new decision tree based on the residual, and build an XGBoost model; input the preoperative factor characteristics of the postoperative personnel to be analyzed into the XGBoost model to obtain the health status prediction value.
2. The postoperative course management system for day surgery based on structured electronic medical records according to claim 1 is characterized in that: Determining the importance of each preoperative factor feature based on similar features of preoperative factor features of different postoperative personnel includes: Any preoperative factor feature was taken as the target preoperative factor feature, and the cosine similarity between the target preoperative factor feature of all postoperative personnel and the SF-6 scale score of the postoperative personnel one week after surgery was calculated as the importance of the target preoperative factor feature.
3. The postoperative course management system for day surgery based on structured electronic medical records according to claim 1 is characterized in that: The analysis of the preoperative factor characteristics of different postoperative personnel to obtain a set of health conditions of the postoperative personnel includes: The health status of each postoperative patient was summarized by the SF-6 scale score every day for seven days after surgery.
4. The postoperative course management system for day surgery based on structured electronic medical records according to claim 1 is characterized in that: The calculation formula for the trend availability of the postoperative personnel is: ; in, is the trend availability of the jth postoperative personnel; is the universality of the u-th preoperative factor characteristic; is the health status set of the jth postoperative personnel; is the health status set of the vth postoperative personnel under the uth preoperative factor characteristics; is the Pearson correlation coefficient of the seven-day health status set of the jth postoperative person and the vth postoperative person under the uth preoperative factor characteristics; N is the number of preoperative factor characteristics; M is the number of postoperative people; f is the maximum and minimum normalization function.
5. The postoperative course management system for day surgery based on structured electronic medical records according to claim 1 is characterized in that: According to the aggregation of the preoperative factor characteristics of the postoperative personnel, the trend availability is weighted to obtain the final availability of the postoperative personnel for constructing the initial feature matrix, including: Any postoperative personnel is taken as the target postoperative personnel, and based on all postoperative personnel, the local outlier factor of the SF-6 scale score of the target postoperative personnel in the next week is calculated as the outlier characteristic value; the outlier characteristic value of the target postoperative personnel is negatively correlated and normalized, and the product of the mapped result value and the trend availability of the target postoperative personnel is taken as the final availability of the target postoperative personnel for constructing the initial feature matrix.
6. The postoperative course management system for day surgery based on structured electronic medical records according to claim 1 is characterized in that: Determining the residual contribution of each row of the initial feature matrix according to the final availability and the preoperative factor characteristics of the postoperative personnel includes: The difference between the SF-6 scale score of the postoperative personnel and the overall level of the SF-6 scale score of all postoperative personnel was calculated as the scale score difference of the postoperative personnel; The residual contribution of each row of the initial feature matrix is determined according to the scale score difference and the final availability of the postoperative personnel for constructing the initial feature matrix.
7. The postoperative course management system for day surgery based on structured electronic medical records according to claim 6 is characterized in that: Determining the residual contribution of each row of the initial feature matrix according to the scale score difference and the final availability of the postoperative personnel for constructing the initial feature matrix includes: The reciprocal of the product of the scale score difference and the final availability of the postoperative personnel to construct the initial feature matrix is taken as the residual contribution of each row of the initial feature matrix.
8. The postoperative course management system for day surgery based on structured electronic medical records according to claim 1 is characterized in that: According to the residual contribution, the residual of each postoperative person in each iteration is constructed, including: At the K+1th iteration, the residual of the postoperative personnel corresponding to the i-th row is: in, represents the residual of the postoperative personnel corresponding to the i-th row at the K+1th iteration, represents the residual contribution of the i-th row of the initial feature matrix, is the SF-6 scale score corresponding to the i-th row of the initial feature matrix, K means that K decision trees have been trained before, Represents the predicted value of the kth i-th row of the K decision trees trained previously.
9. The postoperative course management system for day surgery based on structured electronic medical records according to claim 1 is characterized in that: The method of training a new decision tree based on residuals and constructing an XGBoost model includes: In each round, a new tree is trained based on the previous model. Each training obtains the fitting residual, updates the corresponding prediction value, calculates the new residual, and then trains a new decision tree based on the residual. After the training, XGBoost obtains the final prediction through the weighted sum of all decision trees.
Citation Information
Patent Citations
Method for establishing intestinal health state diagnosis model based on fat-soluble metabolite factor in serum and application
CN110376315A
Method, device and system for predicting postoperative delirium occurrence risk
CN116168840A