Peritoneal dialysis malnutrition assessment method based on clinical diagnosis and machine learning double-track fusion

By employing a dual-track assessment method that integrates clinical diagnosis and machine learning, the problems of low coverage, low efficiency, and poor stability in the assessment of malnutrition in peritoneal dialysis patients have been solved, enabling efficient, accurate, and adaptive malnutrition risk assessment in primary hospitals.

CN122868034BActive Publication Date: 2026-11-03SHENTAIWANG HEALTHCARE TECH NANJING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611348652.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-03
Estimated Expiration
2046-09-02

AI Technical Summary

Technical Problem

Existing technologies for assessing malnutrition in peritoneal dialysis patients suffer from low coverage, low efficiency, poor stability due to rigid data cleaning rules, and inability to adapt to data distribution drift after model deployment. Furthermore, they fail to effectively utilize clinical diagnostic records.

Method used

We employ an assessment method that integrates clinical diagnosis and machine learning. Through cleaning and standardizing multi-source heterogeneous data, we introduce incremental data extraction and differential filtering. We combine clinical diagnostic records with machine learning models to assess the risk of malnutrition. We use an incremental mechanism and multi-layer fault-tolerant design to dynamically adjust the model features.

Benefits of technology

It improves assessment coverage and accuracy, reduces computational overhead, enables adaptive model maintenance, ensures stable operation in abnormal data environments, and forms a continuous risk change trajectory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122868034B_ABST
    Figure CN122868034B_ABST
Patent Text Reader

Abstract

The present application provides a kind of peritoneal dialysis malnutrition assessment method based on clinical diagnosis and machine learning double-track fusion, comprising the following steps: S1: the cleaning and standardization processing of multi-source heterogeneous data;S2: synchronous incremental patient prediction record;S3: double-track malnutrition risk assessment;Incremental multi-source medical data is pulled in an incremental manner and is differentially cleaned;Based on the cleaning result, generate or update the prediction record for all patients in the tube for the day;Finally, for each evaluation record, diagnosis grading priority, machine learning supplement, bottom-up marking bottom line three-level evaluation is carried out, and the result is written into the prediction record table.The present application improves the evaluation coverage, the evaluation accuracy is high, reduces the computing overhead, supports daily dynamic evaluation, enhances the tolerance of the system to abnormal data, realizes the adaptive maintenance of model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical informatics and artificial intelligence, specifically to a method for assessing malnutrition in peritoneal dialysis based on the fusion of clinical diagnosis and machine learning. Background Technology

[0002] Currently, the mainstream approach for automated risk assessment of malnutrition in peritoneal dialysis patients still relies on pure machine learning models. A typical workflow includes: first, data cleaning, extracting all patient laboratory test data from the hospital information system, performing a standard ETL (extract, transform, load) process, standardizing the format, and filtering out obviously invalid records. Then, a classification model is trained based on the cleaned dataset. Finally, the model is re-run on all patients' full historical data at fixed intervals (daily or weekly) to output the assessment results. While this approach is indeed more efficient than traditional manual assessment and automates the assessment process to some extent, the following problems exist in actual clinical deployment: First, the assessment coverage is low, wasting valuable data. Existing methods rely solely on laboratory data, requiring extremely high data completeness. Incomplete lab test orders are common among peritoneal dialysis patients, especially those in primary care hospitals, with missing rates often exceeding 40%. The model, lacking sufficient features, cannot output results, leading to a large number of missed assessments. Simultaneously, existing clinical diagnostic records (highly reliable conclusions made by physicians) within the HIS system are completely unused in current solutions, resulting in the idleness of valuable information.

[0003] Secondly, the full recalculation mechanism leads to inefficiency and timeline breaks. The existing system uses a full recalculation strategy, requiring the scanning and processing of all patients' historical data for each task. Actual test data shows that processing 1200 patients takes approximately 120 minutes, which is insufficient to support daily rolling assessments of large populations. More importantly, due to the lack of an incremental recording mechanism, historical predictions are overwritten after each recalculation, making it impossible to continuously track changes in patient risk and hindering clinicians' ability to predict disease progression.

[0004] Third, the data cleaning rules are too rigid and lack fault tolerance. Conventional ETL uses uniform rules to filter invalid values, and test results with symbols such as ">" and "<" (e.g., "<2.5") are mistakenly judged as invalid and discarded, even though these are the core indicators needed for evaluation. There is a lack of a fallback mechanism for handling null values. Once the input contains null values, the entire process will throw an exception and be interrupted. The system has poor stability in grassroots environments with uneven data quality and is difficult to implement.

[0005] Fourth, once deployed, the model becomes fixed and cannot adapt to shifts in the distribution of clinical data; after training, the model's feature set and decision threshold remain fixed. However, in clinical practice, updates to testing equipment and changes in reagent batches can cause shifts in the distribution of the same indicator's measurement values. Consequently, the mapping relationship established by the model based on old data becomes invalid, and the accuracy gradually decreases. Furthermore, model maintenance relies on manual intervention, making timely responses difficult in actual operation and maintenance. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of existing technologies by proposing a peritoneal dialysis malnutrition assessment method based on the fusion of clinical diagnosis and machine learning.

[0007] To achieve the above objectives, the present invention adopts the following technical solution: A method for assessing malnutrition in peritoneal dialysis patients based on a dual-track fusion of clinical diagnosis and machine learning includes the following steps: S1: Cleaning and standardization of multi-source heterogeneous data; Based on the execution time of the last ETL task, incremental data is extracted, basic information is completed, evaluation indicators are filtered differently, business primary keys are constructed to remove duplicates, null values ​​are filled in the median, and the processed standardized data is written into the follow-up record table. S2: Synchronous incremental patient prediction record; Based on the follow-up record table, new global data is detected. If new data exists, the patient list is merged to generate a single patient differential record, which is then written to the prediction record table in batches. S3: Dual-track malnutrition risk assessment; Load all records to be evaluated from the prediction record table, attempt to diagnose and match them one by one. If no match is found and the missing data rate is less than 60%, perform machine learning prediction. Otherwise, evaluation is not possible. All results are batch updated and written to the prediction record table.

[0008] Furthermore, step S1 includes: S11: Extract incremental data; Query the maximum value of the creation date in the follow-up record table, record the execution time of the last ETL task, and use the execution time of the last ETL task as the base time to extract incremental data from the source database. The incremental data includes patient basic information, test records, diagnosis records, and follow-up data. Among them, the test report time of the test records is after the base time. If it is the first run, the base time is the current time minus the number of days in the extended window. S12: Complete the basic information; For patients with test records but missing basic information, the basic information table is retrieved and filled in based on the patient ID. The filled information includes name, gender, age, catheter insertion time, and first dialysis time. S13: Differentiated indicator filtering; According to the test records, the original values ​​of the special symbols for the eight core assessment indicators of malnutrition were fully retained, while the remaining non-core indicators were filtered according to the usual rules to remove invalid values. The core assessment indicators for malnutrition include serum albumin, prealbumin, hemoglobin, neutrophil count, lymphocyte count, C-reactive protein, serum creatinine, and blood urea nitrogen. S14: Deduplicate business primary keys; A composite business primary key is constructed using six fields: patient ID, test item name, indicator test value, test report time, age, and body mass index (BMI). If the composite business primary key is the same, it is determined to be a duplicate test record, and deduplication is performed, keeping only one test record. S15: Null value safety handling; After deduplication, data analysis and feature construction are performed to check whether there are null values ​​in the indicator test values. If there are, the median of the indicator test values ​​with the same test item name is used as a catch-all to fill the null values; otherwise, no null value filling is required. S16: Write the follow-up record form; The standardized data after cleaning is written into the follow-up record table, and the timestamp of writing is recorded as the record creation timestamp; the follow-up record table is stored in the target database.

[0009] Furthermore, the follow-up record form includes patient ID, test item name, indicator test value, test report time, follow-up date, record creation timestamp, and patient basic information; The source database includes the patient master database, the HIS interface database, and the dialysis follow-up database; The patient master database contains a patient basic information table and a patient HIS association mapping table; The patient basic information form includes patient ID, patient name, gender, date of birth, height, weight, catheter placement time, first dialysis time, and body mass index (BMI). The patient HIS association mapping table includes HIS patient ID and patient ID; The HIS interface database includes test record forms and clinical diagnosis record forms; The laboratory record form includes the laboratory report number, laboratory report date, laboratory test name, test value, and patient ID; the laboratory record is the laboratory data extracted from the laboratory record form. The clinical diagnosis record form includes the diagnosis name, ICD disease code, date of visit, and HIS patient ID; The dialysis follow-up database includes the follow-up record time, follow-up content, and follow-up sub-item names; The extended window number of days is a manually set threshold for the number of days of historical data to be retrieved.

[0010] Furthermore, step S2 includes: S21: Detect newly added data globally; Based on the follow-up record table, check whether there are any new records in the follow-up record table within the time range from 0:00 on the same day to the current time. If the number of new records is 0, the task will end directly; otherwise, proceed to the next step. S22: List of merged patients; Extract patient IDs from two categories, merge and remove duplicates to form the union list of patients that need to be synchronized this time: Category 1: Query the follow-up record table for deduplicated patient IDs whose record creation timestamp is within the most recent 90 days; The second category: Query all unique patient IDs from the prediction record table; Merge the two types of patient IDs and take the union; S23: Differentiated generation of patient prediction records for the day; Iterate through each patient ID in the patient list, query the prediction record table and follow-up record table, and generate the corresponding daily prediction record according to the business scenario. S24: Batch write to the prediction record table; Write the patient's prediction records for the day into the prediction record table in batches.

[0011] Furthermore, business scenarios include patients who already have prediction records for the day, patients with new follow-up / test data for the day, and patients with no new data for the day; If the patient already has a prediction record for the day, skip the current patient and do not create a new record; If a patient has new follow-up / test data on the same day, create a new blank record marked as pending evaluation, fill in only the patient ID and creation time, and leave all other prediction fields blank; If no new data is added for the patient on that day, copy the patient's previous prediction record from the prediction record table, and copy all prediction field values ​​from the prediction record table; only update the creation time to the current task execution time.

[0012] Furthermore, the risk levels assessed include: Level 0: No risk; Level 1: Low risk of malnutrition; Level 2: Medium risk of malnutrition; Level 3: High risk of malnutrition; Level 4: Definite malnutrition; Level 5: Missing data. Step S3 includes: S31: Load records to be evaluated; Load the records to be evaluated created on the same day and whose prediction fields are empty from the prediction record table; S32: Prepare the model; The ICD-10 diagnostic grading library and the random forest evaluation model were pre-built and pre-trained. The random forest evaluation model and the ICD-10 malnutrition diagnostic grading library were then loaded. S33: Single-record three-level stratified assessment; S331: Report time verification; Iterate through the records to be evaluated, and look up the corresponding test report time according to the follow-up record table. If it is missing, mark it as level 5 and end the evaluation process for this record directly; otherwise, execute S332. S332: Diagnostic classification; Based on the patient ID in the follow-up record table, the patient HIS association mapping table is called to map the patient ID to the HIS patient ID. Using the HIS patient ID as the key, the clinical diagnosis record table is queried for diagnosis records within 30 days before and after the test report time. The diagnosis name and ICD disease code are matched with the ICD-10 diagnostic grading library. If the match is successful, level 4 is directly used as the result of the assessment prediction level, and machine learning prediction is not performed again, and the evaluation process of this record ends. Otherwise, S333 is executed. S333: Machine learning prediction; If there is no diagnostic record or assessment prediction grade within 30 days, calculate the missing rate of the 8 core assessment indicators of malnutrition in the follow-up record form. If the missing rate is <60%, median imputation is performed, and three derived features are calculated. After Z-score standardization of the core assessment indicators of malnutrition and the derived features, the data is input into a pre-trained random forest assessment model. The random forest assessment model outputs the probability distribution of each risk level. The probabilities are compared. If the difference between the highest probability and the second highest probability is >0.2, the level corresponding to the highest probability is directly adopted. If the probability difference is ≤0.2 but the highest probability is >0.45, it is judged as level 2. Otherwise, the model confidence is marked as insufficient, and the process reverts to S332 diagnostic grading. If there is no diagnosis, the model is marked as unusable. S334: Cover mark; If the missing data rate is ≥60% or the model is unusable, it will be uniformly marked as level 5; S34: Update results; The generated prediction results are then updated in batches to the prediction record table.

[0013] Furthermore, it also includes: S321: Pre-built ICD-10 diagnostic grading library; First, we screened malnutrition-related codes and established a basic coding index. Next, the text is standardized: based on the historical diagnostic data of medical institutions, the diagnostic names are standardized and cleaned and synonyms are merged by combining regular expressions and dictionary matching. For diagnostic records that contain both core disease terms and complication terms, they are mapped to composite risk level nodes according to predefined merging rules. The predefined merging rules include the mapping relationship between disease comorbidities and risk levels; The ICD-10 diagnostic grading database is stored in a graph database, with ICD codes and standardized diagnostic names as nodes, and relationships such as synonym merging, complication association, and merging as edges; S322: Pre-trained random forest evaluation model; First, construct a sample set; collect records with clear risk levels through diagnosis, use the risk level as a label, extract the test records associated with the patient ID, and generate the sample set; Then feature engineering is performed; 1) Missing value handling: Iterative regression tree imputation is used for missing values ​​in a single sample. The missing features are predicted and filled by constructing a temporary regression tree using the non-missing features. The convergence threshold is 0.01 and the maximum number of iterations is 10. 2) Constructing derived features: Eight core assessment indicators of malnutrition were extracted as features, and derived features were generated based on the core assessment indicators of malnutrition, including albumin to globulin ratio, neutrophil to lymphocyte ratio, and the rate of change of each indicator relative to the patient's historical baseline. 3) Standardization: Robust Scaler is used, with the median as the center and the interquartile range as the scaling scale, to uniformly scale all features to the same numerical range; Finally, the model was trained: the sample set after feature engineering was divided into training set and validation set in an 8:2 ratio. The eight core assessment indicators of malnutrition and their derived features in the training set were input into the random forest model. The model was optimized on the training set through grid search and five-fold cross-validation. The objective function was macro-average. The model was then validated on the validation set to obtain the random forest evaluation model. S323: Load the random forest evaluation model and the ICD-10 malnutrition diagnostic grading library.

[0014] Furthermore, the parameters of the pre-trained random forest evaluation model are: 100 base learners, 8 layers at maximum depth, 5 samples per leaf node, and the feature sampling ratio is the square root of the total number of features.

[0015] Furthermore, if the random forest evaluation model is missing, the model is retrained using the prediction results already in the prediction record table for the most recent 3 months as labels and the corresponding test data in the follow-up record table as features. During model retraining, permutation tests are performed sequentially on the eight core malnutrition assessment indicators: all sample values ​​for a single indicator are randomly shuffled, the model is re-inferred, and the decrease in the objective function of the validation set is calculated. The decrease is the contribution of the indicator. A contribution threshold is set. If the contribution of an indicator is less than or equal to the contribution threshold, the indicator feature is temporarily removed and will not be used in this retraining or online inference. The historical contribution of each removed indicator is recorded. If the contribution rises above the contribution threshold after three consecutive retraining cycles, the indicator feature is re-included in training and prediction.

[0016] Furthermore, a scheduled task is created to drive the execution of steps S1-S3 daily.

[0017] Compared with the prior art, the beneficial effects of the present invention are: (1) The present invention retains the available data to the greatest extent through differential filtering and null value fallback; it introduces diagnostic grading as an independent evaluation path, and can still output results as long as there are diagnostic records when the test data is seriously missing, thus solving the vicious cycle problem that the test data of peritoneal dialysis patients in primary hospitals is generally missing by more than 40%, and the model that relies solely on test data is difficult to output effective results.

[0018] (2) This invention uses incremental extraction of new data and generates records for patients only when there is new data in the daily follow-up record table. When there is no new data, the historical records are directly copied to avoid duplicate calculations. When assessing the prediction level, only the records to be assessed are processed. The entire process adopts an incremental mechanism to form a complete incremental processing chain, enabling daily assessment of tens of thousands of patients to be achieved within the acceptable range of computing resources, and making daily dynamic assessment feasible in a large population.

[0019] (3) In step S2, when there is no new patient data, the previous historical prediction record is copied and only the timestamp is updated. The evaluation result in step S3 is written into the same record. The two-step collaboration ensures that each patient has a prediction record every day, forming a complete time series and a continuous risk change trajectory. This solves the problem of historical records being overwritten or timelines being broken after a full recalculation in traditional methods.

[0020] (4) Step S1 of the present invention performs differential index filtering, retains symbols such as ">" and "<" for core indicators, and uses the median as a fallback for null values; Step S2 uses INSERT IGNORE to prevent duplicate insertion anomalies; Step S3 uses report time verification and fallback marking to ensure that each record has a definite output. Each of the three steps has a built-in fault tolerance strategy, forming a multi-layered protection, which enables stable operation even in abnormal data environments.

[0021] (5) This invention can maintain the accuracy of the model after long-term deployment; it achieves automatic detection and correction through dynamic evaluation of feature contribution, actively identifies temporarily invalid indicators and temporarily removes and isolates them, and reintegrates them after they recover, so that the model can maintain a high judgment accuracy in the long term and reduce the burden of manual operation and maintenance. It enables the model to run stably in the clinical environment for a long time, adaptively responding to data distribution drift caused by changes in testing equipment, reagents, and patient population structure, and reducing the frequency of manual model maintenance. Attached Figure Description

[0022] Figure 1 This is a flowchart of the steps in Embodiment 1 of the present invention; Figure 2 This is a flowchart of step S1 in Embodiment 1 of the present invention; Figure 3 This is a flowchart of step S2 in Embodiment 1 of the present invention; Figure 4 This is a flowchart of step S3 in Embodiment 1 of the present invention; Figure 5 This is a system architecture diagram of Embodiment 2 of the present invention. Detailed Implementation

[0023] To provide a further understanding of the purpose, structure, features, and functions of the present invention, detailed descriptions are provided below with reference to specific embodiments.

[0024] Example 1

[0025] Please refer to the reference. Figures 1-4 This invention provides a method for assessing malnutrition in peritoneal dialysis based on a dual-track fusion of clinical diagnosis and machine learning, comprising the following steps: S1: Cleaning and standardization of multi-source heterogeneous data; Based on the execution time of the last ETL task, incremental data is extracted, basic information is completed, evaluation indicators are filtered for differences, business primary keys are constructed to remove duplicates, null values ​​are filled in the median, and the processed standardized data is written into the follow-up record table.

[0026] S11: Extract incremental data; The system queries the follow-up record table for the maximum creation date, records the last ETL task execution time, and uses that time as the baseline. It then extracts test records from the source database whose report dates are after that baseline time. The extracted incremental data includes patient basic information, test records, diagnostic records, and follow-up data.

[0027] The follow-up record table is an intermediate data table used to store multi-source follow-up and test data of patients after ETL cleaning and standardization. The follow-up record table includes patient ID, test item name, indicator test value, test report time, follow-up date, record creation timestamp, and basic patient information.

[0028] The source database is the data source for ETL incremental extraction, storing unwashed, heterogeneous raw medical business data. The source database stores patient basic information, test records, diagnostic records, and follow-up data; it includes the main patient database, HIS interface database, dialysis follow-up database, etc. The patient master database includes a patient basic information table, a patient HIS association mapping table, etc. The patient basic information table includes fields such as patient ID, patient name, gender, date of birth, height, weight, catheter placement time, first dialysis time, and body mass index (BMI).

[0029] The patient HIS association mapping table includes HIS patient ID, patient ID, etc.

[0030] The HIS interface database includes test record forms, clinical diagnosis record forms, etc. The laboratory record form includes the laboratory report number, laboratory report date, laboratory test name, test value, patient ID, etc. The clinical diagnosis record form includes the diagnosis name, ICD disease code, date of visit, and HIS patient ID.

[0031] The dialysis follow-up database includes follow-up record time, follow-up content, and follow-up sub-item names.

[0032] Laboratory records are laboratory data extracted from laboratory record sheets, including laboratory report number, laboratory report date, laboratory test name, test value, patient ID, etc.

[0033] Furthermore, during the initial run, the current time minus the number of days in the extended window is used as the base time, and the test records after the base time are extracted.

[0034] The extended window number of days is a manually set threshold for the number of days of historical data to be retrieved.

[0035] S12: Complete the basic information; For patients with test records but missing basic information, based on the patient ID, query and complete the following five items from the patient's basic information table: name, gender (converted to "male" / "female"), age (dynamically calculated based on the date of birth), catheter placement time, and first dialysis time.

[0036] S13: Differentiated indicator filtering; Based on the test item names in the test records, for the eight core malnutrition assessment indicators, specifically serum albumin, prealbumin, hemoglobin, neutrophil count, lymphocyte count, C-reactive protein, serum creatinine, and blood urea nitrogen, the routine invalid value filtering rules were skipped, and the original values ​​containing special symbols such as ">" and "<" were retained intact. The remaining non-core indicators were filtered according to the routine rules, removing the following invalid values: "-", "--", "not done", "not tested", "not detected", "not checked", "not measured", values ​​starting with "*", values ​​starting with "reject", and empty strings. Non-core indicators include serum albumin.

[0037] S14: Deduplicate business primary keys; A composite business primary key is constructed using six fields: patient ID, test item name, indicator test value, test report time, age, and BMI. If the composite business primary key is the same, it is determined to be a duplicate test record, and deduplication is performed, retaining only one test record.

[0038] Furthermore, hash values ​​based on all business fields are generated simultaneously to assist in deduplication; In addition to the six fields of the business primary key, all business fields also include patient name, gender, catheter placement time, first dialysis time, height, and weight.

[0039] S15: Null value safety handling; After deduplication, data analysis and feature construction are performed to check whether there are null values ​​in the indicator test values. If so, the median of the indicator test values ​​with the same test item name is used as a catch-all to fill the null values; otherwise, no null value filling is required.

[0040] The median is the middle value among the test values ​​of the same item name in the test records of all the sampled patients, sorted from smallest to largest.

[0041] S16: Write the follow-up record form; The standardized data after cleaning is written into the follow-up record table, and the timestamp of writing is recorded as the record creation timestamp; the follow-up record table is stored in the target database for querying.

[0042] The follow-up record form includes patient ID, test item name, indicator test value, test report time, follow-up date, record creation timestamp, and basic patient information.

[0043] S2: Synchronous incremental patient prediction record; Based on the follow-up record table, new global data is detected. If new data is found, the patient list is merged to generate a single patient differential record, which is then written to the prediction record table in batches.

[0044] S21: Detect newly added data globally; Based on the follow-up record table, check if there are any new records in the follow-up record table within the time range from 0:00 on the same day to the current time. If the number of new records is 0, the task will end directly to avoid invalid calculations; otherwise, proceed to the next step.

[0045] S22: List of merged patients; Extract patient IDs from two categories, merge and remove duplicates to form the union list of patients that need to be synchronized this time: Category 1: Active patients with follow-up records within the past 90 days. Search the follow-up record table for deduplicated patient IDs whose record creation timestamp is within the past 90 days. The second category is patients who already exist in the prediction record table. All unique patient IDs are retrieved from the prediction record table.

[0046] The two types of patient IDs were merged and their union was taken. This ensured that all dialysis patients under continuous management within the hospital were covered, and no patients were missed.

[0047] The prediction record sheet is used to store the daily malnutrition risk assessment records for each peritoneal dialysis patient and needs to be created in advance for the first run.

[0048] S23: Differentiated generation of patient prediction records for the day; Iterate through each patient ID in the patient list, query the prediction record table and follow-up record table, and generate the corresponding daily prediction record according to the business scenario: The business scenarios include patients who already have prediction records for the day, patients with new follow-up / test data for the day, and patients with no new data for the day.

[0049] If a prediction record already exists for a patient ID in the prediction record table for that day, it is determined that the patient already has a prediction record for that day. When a new record is added to the patient ID in the follow-up record table, it is determined that the patient has new follow-up / test data on that day. If there are no new records for the patient ID in the follow-up record table, it is determined that there is no new data for the patient on that day. (1) If the patient already has a prediction record for the day, skip the current patient and do not create a new record.

[0050] (2) If there is new follow-up / test data for the patient on the same day, create a new blank record marked "to be evaluated", fill in only the patient ID and creation time, and set all other prediction fields to empty.

[0051] (3) If there is no new data for the patient on the same day, copy the previous prediction record of the patient in the prediction record table and copy all prediction field values ​​in the prediction record table; only update the creation time to the current task execution time.

[0052] The processing logic is shown in Table 1:

[0053] S24: Batch write to the prediction record table; The patient's daily prediction records are written to the prediction record table using the batch insert statement INSERT IGNORE INTO to prevent duplicate insertions.

[0054] S3: Dual-track malnutrition risk assessment; Load all records to be evaluated from the prediction record table, attempt diagnostic matching one by one, perform machine learning prediction when no match is found and the missing data rate is less than 60%, otherwise mark it as level 5, and batch update and write all results to the prediction record table.

[0055] S31: Load records to be evaluated; Load the "To be evaluated" records created on the same day from the prediction record table that have an empty prediction result field.

[0056] S32: Prepare the model; The ICD-10 diagnostic grading library and the random forest evaluation model were pre-built and pre-trained. The random forest evaluation model and the ICD-10 malnutrition diagnostic grading library were then loaded.

[0057] S321: Pre-built ICD-10 diagnostic grading library; First, we screened malnutrition-related codes: we extracted the ICD codes and hierarchical relationships corresponding to malnutrition and its related causes from the standard ICD-10 coding system, and established a basic coding index. ICD codes include: E40-E46 (various types of protein-energy malnutrition), R63.4 (weight loss), E83 (abnormal protein metabolism), N18 (chronic kidney disease stages 3-5), N18.6 end-stage renal disease, and N18.9 combined with hypoalbuminemia. The hierarchical relationship follows a single-axis hierarchical structure of chapter-block-category-subcategory, progressively coding disease diagnoses from broad to precise.

[0058] Next, the text is standardized: based on historical diagnostic data from medical institutions, a combination of regular expressions and dictionary matching is used to standardize and clean diagnostic names and merge synonyms, including merging "malnutrition," "insufficient nutrition," and "protein-energy malnutrition" into the same concept node. For diagnostic records that contain both core disease terms and complication terms, they are mapped to composite risk level nodes according to predefined merging rules.

[0059] The predefined merging rules include the mapping relationship between disease, complications, and risk levels. For example, if the diagnosis record is stage 5 chronic kidney disease and hypoalbuminemia, it is broken down into "stage 5 chronic kidney disease" combined with "hypoalbuminemia". According to the predefined merging rules, if the result is high-risk level 4, that is, CKD5 + hypoalbuminemia → high-risk level 4, a composite risk level node is created and stored in a graph.

[0060] The ICD-10 diagnostic classification database is stored in a graph database, with ICD codes and standardized diagnostic names as nodes, and relationships such as synonym merging (subClassOf), complication association (hasComplication), and merging as edges.

[0061] S322: Pre-trained random forest evaluation model; First, a sample set is constructed. Records with a clear risk level (0 / 1 / 2 / 3, where 0 / 1 / 2 / 3 represent no risk, low risk of malnutrition, medium risk of malnutrition, and high risk of malnutrition, respectively) are collected through diagnosis. The test records associated with the patient ID are extracted using the risk level as a label to generate the sample set. The sample set includes the patient ID, test records, and risk labels.

[0062] Then feature engineering is performed; (1) missing value processing: the missing values ​​in a single sample are imputed by iterative regression tree, and the missing features are predicted and filled by constructing a temporary regression tree using the non-missing features. The convergence threshold is 0.01 and the maximum number of iterations is 10.

[0063] (2) Construction of derivative features: Eight core assessment indicators of malnutrition were extracted as features, and three types of derivative features were generated based on the core assessment indicators of malnutrition, including albumin to globulin ratio, neutrophil to lymphocyte ratio, and the rate of change of each indicator relative to the patient's historical baseline. The albumin to globulin ratio is serum albumin / serum globulin. The neutrophil-to-lymphocyte ratio is calculated as neutrophil count / lymphocyte count. The patient's historical baseline is the mean of the patient's baseline indicators over the past 90 days.

[0064] The rate of change of each indicator relative to the patient's historical baseline = current indicator / mean of the patient's current indicator over the past 90 days.

[0065] (3) Standardization: Robust Scaler is used, with the median as the center and the interquartile range as the scaling scale, to uniformly scale all features to the same numerical range and eliminate differences in the dimensions of the indicators. Robust Scaler is a robust scaler used for feature scaling to adjust the data to a similar scale.

[0066] Finally, the model was trained by dividing the feature-engineered sample set into training and validation sets in an 8:2 ratio using hierarchical five-fold cross-validation. The distribution ratio of level 0 / 1 / 2 / 3 samples in the training and validation sets was consistent. The eight core malnutrition assessment indicators and their derived features from the training set were input into the random forest model. The model was optimized on the training set using grid search and five-fold cross-validation, with the objective function being the macro-average F1 score. The model was then validated using the validation set to obtain the random forest evaluation model.

[0067] The pre-trained random forest evaluation model has the following parameters: 100 base learners, a maximum depth of 8 layers, a minimum number of leaf node samples of 5, and a feature sampling ratio of the square root of the total number of features. The random forest outputs the probability distribution for each risk level.

[0068] S323: Load the random forest evaluation model and the ICD-10 malnutrition diagnostic grading library.

[0069] Furthermore, if the random forest evaluation model is missing, the model is retrained using the existing prediction results (records with non-empty prediction result fields) from the prediction record table for the most recent 3 months as labels, and the corresponding test data from the follow-up record table as features, employing the same method as S322 to ensure timeliness. Only the system's own historical predictions of levels 0-3 are used, discarding externally labeled data.

[0070] Furthermore, during model retraining, permutation tests were performed sequentially on the eight core malnutrition assessment indicators: all sample values ​​for a single indicator were randomly shuffled, the model was re-inferred, and the decrease in the validation set accuracy (objective function) F1 was calculated. The decrease in F1 was the contribution of that indicator.

[0071] Set a contribution threshold. If the contribution of an indicator is less than or equal to the threshold, temporarily remove that indicator feature, and it will not be used in this retraining or online inference. Record the historical contribution of each removed indicator; if the contribution rises above the threshold after three consecutive retraining iterations, the indicator feature will be reintroduced into training and prediction.

[0072] This enables the model to operate stably in a clinical environment for a long time, adaptively responding to data distribution drift caused by changes in testing equipment, reagents, and patient population structure, thereby reducing the frequency of manual model maintenance.

[0073] After a primary care hospital deployed this system, it changed the C-reactive protein (CRP) testing reagent, causing an overall shift in the measured values ​​of this indicator and a temporary weakening of its correlation with malnutrition at the data level. Traditional fixed-feature models would misjudge due to this distorted indicator. This invention automatically detects a "significant decrease in CRP contribution" during retraining and temporarily removes it, relying on the remaining seven indicators for judgment to avoid misjudgment. Once subsequent data accumulation and the correlation between this indicator and other indicators stabilizes, it will be re-enabled.

[0074] S33: Single-record three-level stratified assessment; The evaluation prediction level is obtained by iterating through the records to be evaluated and successively verifying the report time, diagnosing and classifying the diagnosis, or making a machine learning prediction.

[0075] The assessment levels include six risk levels, which are as follows: Level 0: No risk; Level 1: Low risk of malnutrition (mild); Level 2: Moderate risk of malnutrition; Level 3: High risk of malnutrition (severe); Grade 4: Definite malnutrition (Patients with a clear diagnosis, regardless of their severity, are classified into this grade). Level 5: Data missing (cannot be evaluated).

[0076] S331: Report time verification; If the corresponding test report time is missing from the follow-up record table, it is marked as Level 5 (data missing), and the evaluation process for this record ends immediately. Otherwise, proceed to S332.

[0077] S332: Diagnostic classification; Based on the patient ID in the follow-up record table, the patient's HIS association mapping table is invoked to map the patient ID to the HIS patient ID. Using the HIS patient ID as the key, diagnostic records within 30 days before and after the test report time are queried in the clinical diagnosis record table. The diagnosis name and ICD disease code are matched with the ICD-10 diagnostic grading database. If a match is successful, regardless of the cause of diagnosis, Level 4 (determined malnutrition) is directly adopted as the assessment result, and machine learning prediction is not performed, ending the assessment process for this record. Otherwise, S333 is executed. This assessment result has the highest priority in clinical diagnosis.

[0078] S333: Machine learning prediction; If there is no diagnostic record or assessment prediction grade within 30 days, calculate the missing rate of the 8 core assessment indicators of malnutrition in the follow-up record form. Missing rate = null values ​​in the indicator / total number of indicators.

[0079] If the missing rate is <60%, median imputation is performed, and three derived features are calculated. The core malnutrition assessment indicators and derived features are Z-score standardized and then input into a pre-trained random forest assessment model. The random forest assessment model outputs the probability distribution of each risk level. The probabilities are compared. If the difference between the highest and second-highest probabilities is greater than 0.2, the level corresponding to the highest probability is directly adopted. If the probability difference is ≤0.2 but the highest probability is >0.45, it is determined to be a conservative boundary level (Level 2); the assessment prediction level is obtained. Otherwise, a "model confidence insufficient" flag is triggered, and the process reverts to S332 diagnostic grading. If no diagnosis is found, the model is marked as unusable.

[0080] S334: Cover mark; If the missing data rate is ≥60% or the model is unusable, it is uniformly marked as level 5 (missing data).

[0081] S34: Update results; The generated prediction results will be updated in batches to the prediction record table, with the update conditions being that the patient ID and creation time match the record to be evaluated.

[0082] The prediction results include the prediction level, the assessment time, and a description of the assessment method.

[0083] The assessment time is the timestamp when the assessment prediction level was obtained.

[0084] The assessment methodology includes report time verification, diagnostic grading, machine learning prediction, and fallback labeling.

[0085] Furthermore, a scheduled task is created to trigger the daily execution of steps S1-S3. First, multi-source medical data newly added within the past 7 days is retrieved incrementally and differentially cleaned. Then, based on the cleaning results, daily prediction records are generated or updated for all managed patients. Finally, a three-level assessment of each record to be evaluated is performed: "diagnosis and grading priority, machine learning supplement, and fallback labeling as a safety net". The results are written into the prediction record table for clinical review.

[0086] Example 2

[0087] like Figure 5 The system consists of a data source layer (HIS, LIS, follow-up system), an ETL processing module, an incremental synchronization module, a dual-track evaluation module, and a result output interface. The data source layer provides raw data to the ETL module, which outputs to the follow-up record table. The incremental synchronization module reads this table to generate a prediction record table, the dual-track evaluation module loads the records to be evaluated from the prediction record table and writes back the results, which are finally displayed by the interface layer.

[0088] After the daily scheduled trigger, the system first pulls incremental data and performs cleaning, completion, deduplication, and null value processing, then loads it into the follow-up record table. Next, it checks if any new data has entered the follow-up record table that day. If so, it merges the lists of active patients and historical patients, generating a new assessment record for each patient for that day (if new data is available, it marks the record as pending assessment; otherwise, it copies the previous historical record). Finally, it loads all pending assessment records and attempts to match them diagnostically one by one. If a match is successful, it is marked as Level 4 (confirmed malnutrition). If no match is found and the missing data rate is less than 60%, machine learning prediction (Levels 0-3) is used; otherwise, it is marked as Level 5 (missing data). All results are then batch-updated into the database.

[0089] This invention can solve the following problems: First, improve assessment coverage. By introducing clinical diagnostic data as an independent assessment pathway, results can still be output even when laboratory data is missing, reducing missed assessments.

[0090] Second, improve the accuracy of the assessment. By hierarchically fusing highly reliable clinical diagnostic information with machine learning prediction results, the two information sources can be cross-verified.

[0091] Third, it reduces computational overhead and supports daily dynamic assessment. Replacing full recalculation with incremental processing makes daily rolling assessment of all managed patients feasible in engineering practice.

[0092] Fourth, the system's tolerance for abnormal data has been enhanced. Through differentiated filtering, null value fallback, and multi-layered fault-tolerant design, the system can still operate stably in the complex data environment of primary hospitals.

[0093] Fifth, it enables adaptive model maintenance. Through a dynamic feature contribution evaluation mechanism, the model automatically detects and filters out indicators that are temporarily invalid due to data drift, reducing the frequency of manual intervention.

[0094] The present invention has been described in the above-described embodiments; however, these embodiments are merely examples for implementing the present invention. It must be noted that the disclosed embodiments do not limit the scope of the present invention. Conversely, any modifications and refinements made without departing from the spirit and scope of the present invention are within the scope of patent protection of the present invention.

Claims

1. A method for assessing malnutrition in peritoneal dialysis based on a dual-track fusion of clinical diagnosis and machine learning, characterized in that: Includes the following steps: S1: Cleaning and standardization of multi-source heterogeneous data; Based on the execution time of the last ETL task, incremental data is extracted, basic information is completed, evaluation indicators are filtered differently, business primary keys are constructed to remove duplicates, null values ​​are filled in the median, and the processed standardized data is written into the follow-up record table. S2: Synchronous incremental patient prediction record; Based on the follow-up record table, new global data is detected. If new data exists, the patient list is merged to generate a single patient differential record, which is then written to the prediction record table in batches. S3: Dual-track malnutrition risk assessment; Load all records to be evaluated from the prediction record table, attempt to diagnose and match them one by one. If no match is found and the missing data rate is less than 60%, perform machine learning prediction. Otherwise, evaluation is not possible. All results are batch updated and written to the prediction record table. The risk levels assessed are as follows: Level 0: No risk; Level 1: Low risk of malnutrition; Level 2: Medium risk of malnutrition; Level 3: High risk of malnutrition; Level 4: Definite malnutrition; Level 5: Missing data. S31: Load records to be evaluated; Load the records to be evaluated created on the same day and whose prediction fields are empty from the prediction record table; S32: Prepare the model; The ICD-10 diagnostic grading library and the random forest evaluation model were pre-built and pre-trained. The random forest evaluation model and the ICD-10 malnutrition diagnostic grading library were then loaded. S33: Single-record three-level stratified assessment; S331: Report time verification; Iterate through the records to be evaluated, and look up the corresponding test report time according to the follow-up record table. If it is missing, mark it as level 5 and end the evaluation process for this record directly; otherwise, execute S332. S332: Diagnostic classification; Based on the patient ID in the follow-up record table, the patient HIS association mapping table is called to map the patient ID to the HIS patient ID. Using the HIS patient ID as the key, the clinical diagnosis record table is queried for diagnosis records within 30 days before and after the test report time. The diagnosis name and ICD disease code are matched with the ICD-10 diagnostic grading library. If the match is successful, level 4 is directly used as the result of the assessment prediction level, and machine learning prediction is not performed again, and the evaluation process of this record ends. Otherwise, S333 is executed. S333: Machine learning prediction; If there is no diagnostic record or assessment prediction grade within 30 days, calculate the missing rate of the 8 core assessment indicators of malnutrition in the follow-up record form. If the missing rate is <60%, median imputation is performed, and three derived features are calculated. After Z-score standardization of the core assessment indicators of malnutrition and the derived features, the data is input into a pre-trained random forest assessment model. The random forest assessment model outputs the probability distribution of each risk level. The probabilities are compared. If the difference between the highest probability and the second highest probability is >0.2, the level corresponding to the highest probability is directly adopted. If the probability difference is ≤0.2 but the highest probability is >0.45, it is judged as level 2. Otherwise, the model confidence is marked as insufficient, and the process reverts to S332 diagnostic grading. If there is no diagnosis, the model is marked as unusable. S334: Cover mark; If the missing data rate is ≥60% or the model is unusable, it will be uniformly marked as level 5; S34: Update results; The generated prediction results are then updated in batches to the prediction record table.

2. The peritoneal dialysis malnutrition assessment method based on the dual-track fusion of clinical diagnosis and machine learning as described in claim 1, characterized in that: Step S1 includes: S11: Extract incremental data; Query the maximum value of the creation date in the follow-up record table, record the execution time of the last ETL task, and use the execution time of the last ETL task as the base time to extract incremental data from the source database. The incremental data includes patient basic information, test records, diagnosis records, and follow-up data. Among them, the test report time of the test records is after the base time. If it is the first run, the base time is the current time minus the number of days in the extended window. S12: Complete the basic information; For patients with test records but missing basic information, the basic information table is retrieved and filled in based on the patient ID. The filled information includes name, gender, age, catheter insertion time, and first dialysis time. S13: Differentiated indicator filtering; According to the test records, the original values ​​of the special symbols for the eight core assessment indicators of malnutrition were fully retained, while the remaining non-core indicators were filtered according to the usual rules to remove invalid values. The core assessment indicators for malnutrition include serum albumin, prealbumin, hemoglobin, neutrophil count, lymphocyte count, C-reactive protein, serum creatinine, and blood urea nitrogen. S14: Deduplicate business primary keys; A composite business primary key is constructed using six fields: patient ID, test item name, indicator test value, test report time, age, and body mass index (BMI). If the composite business primary key is the same, it is determined to be a duplicate test record, and deduplication is performed, keeping only one test record. S15: Null value safety handling; After deduplication, data analysis and feature construction are performed to check whether there are null values ​​in the indicator test values. If there are, the median of the indicator test values ​​with the same test item name is used as a catch-all to fill the null values; otherwise, no null value filling is required. S16: Write the follow-up record form; The standardized data after cleaning is written into the follow-up record table, and the timestamp of writing is recorded as the record creation timestamp; the follow-up record table is stored in the target database.

3. The peritoneal dialysis malnutrition assessment method based on the dual-track fusion of clinical diagnosis and machine learning as described in claim 2, characterized in that: The follow-up record form includes patient ID, test item name, indicator test value, test report time, follow-up date, record creation timestamp, and patient basic information; The source database includes the patient master database, the HIS interface database, and the dialysis follow-up database; The patient master database contains a patient basic information table and a patient HIS association mapping table; The patient basic information form includes patient ID, patient name, gender, date of birth, height, weight, catheter placement time, first dialysis time, and body mass index (BMI). The patient HIS association mapping table includes HIS patient ID and patient ID; The HIS interface database includes test record forms and clinical diagnosis record forms; The laboratory record form includes the laboratory report number, laboratory report date, laboratory test name, test value, and patient ID; the laboratory record is the laboratory data extracted from the laboratory record form. The clinical diagnosis record form includes the diagnosis name, ICD disease code, date of visit, and HIS patient ID; The dialysis follow-up database includes the follow-up record time, follow-up content, and follow-up sub-item names; The extended window number of days is a manually set threshold for the number of days of historical data to be retrieved.

4. The peritoneal dialysis malnutrition assessment method based on the dual-track fusion of clinical diagnosis and machine learning as described in claim 1, characterized in that: Step S2 includes: S21: Detect newly added data globally; Based on the follow-up record table, check whether there are any new records in the follow-up record table within the time range from 0:00 on the same day to the current time. If the number of new records is 0, the task will end directly; otherwise, proceed to the next step. S22: List of merged patients; Extract patient IDs from two categories, merge and remove duplicates to form the union list of patients that need to be synchronized this time: Category 1: Query the follow-up record table for deduplicated patient IDs whose record creation timestamp is within the most recent 90 days; The second category: Query all unique patient IDs from the prediction record table; Merge the two types of patient IDs and take the union; S23: Generate patient prediction records for the day based on differentiation; Iterate through each patient ID in the patient list, query the prediction record table and follow-up record table, and generate the corresponding daily prediction record according to the business scenario. S24: Batch write to the prediction record table; Write the patient's prediction records for the day into the prediction record table in batches.

5. The peritoneal dialysis malnutrition assessment method based on the dual-track fusion of clinical diagnosis and machine learning as described in claim 4, characterized in that: Business scenarios include patients who already have prediction records for the day, patients with new follow-up / test data for the day, and patients with no new data for the day; If the patient already has a prediction record for the day, skip the current patient and do not create a new record; If a patient has new follow-up / test data on the same day, create a new blank record marked as pending evaluation, fill in only the patient ID and creation time, and leave all other prediction fields blank; If no new data is added for the patient on that day, copy the patient's previous prediction record from the prediction record table, and copy all prediction field values ​​from the prediction record table; only update the creation time to the current task execution time.

6. The peritoneal dialysis malnutrition assessment method based on the dual-track fusion of clinical diagnosis and machine learning as described in claim 1, characterized in that: Also includes: S321: Pre-built ICD-10 diagnostic grading library; First, we screened malnutrition-related codes and established a basic coding index. Next, the text is standardized: based on the historical diagnostic data of medical institutions, the diagnostic names are standardized and cleaned and synonyms are merged by combining regular expressions and dictionary matching. For diagnostic records that contain both core disease terms and complication terms, they are mapped to composite risk level nodes according to predefined merging rules. The predefined merging rules include the mapping relationship between disease comorbidities and risk levels; The ICD-10 diagnostic grading database is stored in a graph database, with ICD codes and standardized diagnostic names as nodes, and relationships such as synonym merging, complication association, and merging as edges; S322: Pre-trained random forest evaluation model; First, construct a sample set; collect records with clear risk levels through diagnosis, use the risk level as a label, extract the test records associated with the patient ID, and generate the sample set; Then feature engineering is performed; 1) Missing value handling: Iterative regression tree imputation is used for missing values ​​in a single sample. The missing features are predicted and filled by constructing a temporary regression tree using the non-missing features. The convergence threshold is 0.01 and the maximum number of iterations is 10. 2) Constructing derived features: Eight core assessment indicators of malnutrition were extracted as features, and derived features were generated based on the core assessment indicators of malnutrition, including albumin to globulin ratio, neutrophil to lymphocyte ratio, and the rate of change of each indicator relative to the patient's historical baseline. 3) Standardization: Robust Scaler is used, with the median as the center and the interquartile range as the scaling scale, to uniformly scale all features to the same numerical range; Finally, the model was trained: the sample set after feature engineering was divided into training set and validation set in an 8:2 ratio. The eight core assessment indicators of malnutrition and their derived features in the training set were input into the random forest model. The model was optimized on the training set through grid search and five-fold cross-validation. The objective function was macro-average. The model was then validated on the validation set to obtain the random forest evaluation model. S323: Load the random forest evaluation model and the ICD-10 malnutrition diagnostic grading library.

7. The peritoneal dialysis malnutrition assessment method based on the dual-track fusion of clinical diagnosis and machine learning as described in claim 6, characterized in that: The parameters of the pre-trained random forest evaluation model are: 100 base learners, 8 layers at maximum depth, 5 samples per leaf node, and the feature sampling ratio is the square root of the total number of features.

8. The peritoneal dialysis malnutrition assessment method based on the dual-track fusion of clinical diagnosis and machine learning as described in claim 1, characterized in that: If the random forest evaluation model is missing, the model is retrained using the prediction results in the prediction record table of the most recent 3 months as labels and the corresponding test data in the follow-up record table as features. During model retraining, permutation tests are performed sequentially on the eight core malnutrition assessment indicators: all sample values ​​for a single indicator are randomly shuffled, the model is re-inferred, the decrease in the objective function of the validation set is calculated, the decrease is the indicator contribution, a contribution threshold is set, if the indicator contribution is less than or equal to the contribution threshold, the assessment indicator is temporarily removed and will not be used in this retraining or online inference, and the historical contribution of each removed indicator is recorded; if the contribution rises above the contribution threshold after three consecutive retrainings, the assessment indicator is re-included in training and prediction.

9. The peritoneal dialysis malnutrition assessment method based on the dual-track fusion of clinical diagnosis and machine learning as described in claim 1, characterized in that: Create a scheduled task to trigger the execution of steps S1-S3 daily.

Citation Information

Patent Citations

  • VTE intelligent evaluation and prevention decision support system

    CN121148709A

  • Health management early warning system based on big data and physical condition fusion

    CN121687365A