A stroke binary prognosis prediction method based on super-early multi-center electronic medical record modeling

CN122991653APending Publication Date: 2026-10-27NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610885445.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

该任务边界能够显著区别于院内卒中动态预警方法;解决现有技术中早期可用变量利用不足、跨中心推广能力有限、时间泄漏控制不足、阈值选择不稳定和模型解释性不足的问题

Benefits of technology

[0031]有益效果:与现有技术相比,本发明具有如下显著优点:第一,将预测变量严格限制在卒中相关就诊后4至6小时内,降低未来信息泄漏;第二,通过二元预后终点本体统一内部开发队列和外部验证队列,使不同来源的标签映射至同一预测任务;第三,通过跨中心共享数值特征协同减少变量命名和记录习惯差异对迁移性能的影响;第四,通过冻结式外部验证真实评估部署边界,避免在外部队列再训练后掩盖迁移困难;第五,通过SHAP群体级和患者级解释证据,提高模型输出的临床可审查性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122991653A_ABST
    Figure CN122991653A_ABST
Patent Text Reader

Abstract

The application discloses a stroke binary prognosis prediction method based on super-early multi-center electronic medical record modeling, and proposes a complete scheme composed of multi-center queue construction, unified binary prognosis endpoint, super-early time window limitation, structured feature engineering, cross-center shared feature cooperation, integrated learning modeling, frozen external verification and SHAP interpretive output. The method takes a visit as an analysis unit, extracts demographic characteristics, complications, laboratory examination, vital signs and hemodynamic derived features within 4, 5 and 6 hours after an anchor point; adopts LightGBM, XGBoost and random forest to establish a poor prognosis risk prediction model, and migrates the internally developed preprocessor, feature rules, model parameters and classification threshold to external queue verification after freezing, without retraining; finally, risk probability, risk stratification and group-level and patient-level SHAP explanation are output; the application can realize stroke prognosis stratification in super-early stage, and support cross-center deployment and clinical review.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical artificial intelligence technology, specifically to a method for predicting the binary prognosis of stroke based on ultra-early multicenter electronic medical record modeling. Background Technology

[0002] Stroke patients may exhibit significantly different clinical trajectories upon admission or in the early emergency period. Some patients, after stabilization, may progress to a relatively good recovery path, while others may have poor outcomes due to neurological progression, hypoxia, circulatory instability, infection, metabolic disturbances, or multi-organ stress. Therefore, prognostic stratification within the first few hours is of practical significance for adjusting monitoring intensity, allocating bed and nursing resources, prioritizing senior physician reviews, and triggering subsequent multimodal assessments.

[0003] Traditional stroke prognostic assessments rely heavily on manual scoring, imaging results, treatment response, pre-discharge status, or later-developed medical records. While this information has clinical value, it may not yet be available in scenarios where early stratification is truly necessary. Incorporating variables such as subsequent treatment, complications, or discharge outcomes into the model can easily lead to time leaks or outcome annotations, preventing the predictions from reflecting the independent value of ultra-early available data.

[0004] Structured electronic medical record (EMR) data offers advantages such as routine collection, automatic retrieval, and low deployment costs. Demographic data, comorbidities, laboratory tests, and vital signs include signals of basic risk, metabolic status, oxygenation status, and hemodynamic stability. However, differences exist between institutions in timestamp definitions, variable naming, detection density, patient composition, and data recording processes, making single-center trained models prone to performance degradation when transferred externally. Existing in-hospital stroke dynamic early warning technologies typically focus on the warning window before the event occurs, requiring anchoring the onset time from clinical texts and constructing positive and negative samples before onset. Therefore, existing technologies suffer from insufficient utilization of early-available variables, limited cross-center generalization capabilities, inadequate time leakage control, unstable threshold selection, and insufficient model interpretability. Summary of the Invention

[0005] Objective: This invention aims to provide a binary prognostic prediction method for stroke based on ultra-early multi-center electronic medical record modeling. It focuses on binary prognostic prediction after the stroke-related treatment process has begun, without extracting the onset time of in-hospital stroke or constructing dynamic early warning samples before onset. Instead, it estimates the probability of poor prognosis within a fixed ultra-early window after the treatment anchor point. This task boundary is significantly different from dynamic early warning methods for in-hospital stroke. It addresses the problems of insufficient utilization of early-available variables, limited cross-center generalization ability, insufficient time leakage control, unstable threshold selection, and insufficient model interpretability in existing technologies.

[0006] Technical Solution: The present invention provides a method for predicting the binary prognosis of stroke based on ultra-early multicenter electronic medical record modeling, comprising the following steps:

[0007] Step 1: Access stroke-related electronic medical record data from at least two medical centers, using each visit as the unit of analysis, and determine a unified anchor time.

[0008] Step 2: Based on the unified binary prognostic endpoint definition rules, each patient sample is labeled as having a good or poor prognosis, and the poor prognosis is used as the predicted positive category;

[0009] Step 3: Starting from the anchor time, construct multiple fixed ultra-early observation windows, and only allow electronic medical record data generated within each window to enter subsequent modeling;

[0010] Step 4: Extract demographic features, comorbidity features, laboratory test features, vital sign features, and hemodynamic features derived from vital sign calculations from the ultra-early observation window to form a candidate feature set;

[0011] Step 5: Perform intersection screening of shared numerical features for candidate features from different medical centers, and remove fields such as identity identifiers, timestamps, prognostic labels, discharge destinations, and fields that may cause outcome leakage, to form a unified cross-center shared feature space.

[0012] Step 6: In the internal development queue, fit the missing value interpolator, feature scaler, class imbalance handling oversampling, and binary classification ensemble learning model, and determine the model parameters and classification threshold through internal validation. Then, freeze the interpolator, scaler, oversampling, model parameters, and classification threshold.

[0013] Step 7: Transfer the frozen complete prediction pipeline to an external validation queue and output the probability of poor prognosis for each patient sample without any retraining, reweighting, or recalibration.

[0014] Step 8: Generate a population-level feature importance ranking and feature influence direction summary chart, as well as a patient-level risk contribution waterfall chart, based on the SHAP method, as verifiable interpretable evidence for prognostic prediction results.

[0015] Furthermore, the ultra-early observation windows are three fixed-duration windows at the 4th, 5th, and 6th hours after the anchor time. Each window is used independently for modeling to evaluate the predictive performance under different levels of early information accumulation.

[0016] Furthermore, the unified rule for the binary prognostic endpoint is as follows: good clinical trajectories such as home discharge, home health services, or artificially corrected outcomes are classified as good prognoses; poor clinical trajectories such as hospice care, professional nursing facilities, rehabilitation facilities, long-term care facilities, acute-phase transfers, or artificially corrected outcomes are classified as poor prognoses; and samples that cannot be clearly classified or whose labels conflict with each other are excluded.

[0017] Furthermore, the hemodynamic-derived features include at least mean pulse pressure, mean arterial pressure, and shock index, all of which are calculated from the statistical values ​​of systolic blood pressure, diastolic blood pressure, and heart rate measured repeatedly within the ultra-early observation window, in order to characterize the early circulatory load and perfusion status of stroke patients.

[0018] Furthermore, the unified feature space is formed as follows: only numerical clinical variables that are common to the electronic medical record databases of all participating centers are retained, and the clinical definition and measurement unit of the same variable are consistent across centers, thereby eliminating the degradation of model transfer performance caused by differences in dependent variable naming, recording habits and data structures.

[0019] Furthermore, the ensemble learning model includes one or more combinations of LightGBM, XGBoost, and random forest, with the risk probability of poor prognosis as the main output; the classification threshold is determined by maximizing the Youden index within the training set or training fold, and the threshold is applied to all external validation samples after freezing.

[0020] Furthermore, the class imbalance is handled using synthetic minority class oversampling, and the oversampling operation is only applied to the training fold of the internal cross-validation, not to the validation fold or any external validation queue, in order to ensure the authenticity of the validation process.

[0021] Furthermore, frozen external validation is a one-time migration validation. During the validation process, all preprocessing rules, feature selection rules, model parameters, and classification thresholds generated during the internal development phase are completely locked, and no adjustments or adaptive updates are made based on the data distribution of the external validation queue.

[0022] The present invention discloses a stroke binary prognostic prediction system based on ultra-early multicenter electronic medical record modeling, comprising:

[0023] The data access module is used to read multi-center structured electronic medical records and complete the indexing of patient-level samples, timestamp standardization, and source field mapping.

[0024] The prognostic labeling module is used to perform binary prognostic endpoint ontology mapping, label good or bad prognosis and remove conflicting labels;

[0025] The time window building module is used to generate multiple fixed ultra-early observation windows around the anchor time and perform data truncation within the windows;

[0026] The feature engineering module is used to generate demographic, comorbidity, laboratory test, vital signs, and hemodynamic features.

[0027] The cross-center collaboration module is used to retain the shared numerical characteristics of each center and remove fields such as identity identifiers, tags, discharge destinations, and potential outcome leakage.

[0028] The model training module is used to fit the missing value interpolator, feature scaler, oversampling unit, and binary classification ensemble learning model, and freezes all parameters and rules after internal validation.

[0029] The freeze verification module is used to migrate the frozen prediction pipeline to an external verification queue and output the probability of poor prognosis and confidence interval statistics.

[0030] The output module is used to generate a population-level SHAP feature importance summary chart, a patient-level SHAP waterfall chart, and a risk stratification report.

[0031] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: First, it strictly limits predictive variables to within 4 to 6 hours after stroke-related medical visits, reducing future information leakage; Second, it unifies the internal development queue and external validation queue through a binary prognostic endpoint ontology, enabling labels from different sources to be mapped to the same prediction task; Third, it reduces the impact of differences in variable naming and recording habits on transfer performance through cross-center shared numerical features; Fourth, it realistically assesses deployment boundaries through frozen external validation, avoiding masking transfer difficulties after retraining in the external queue; Fifth, it improves the clinical reviewability of the model output through SHAP population-level and patient-level interpretive evidence. Attached Figure Description

[0032] Figure 1 This is the overall flowchart of the present invention;

[0033] Figure 2 The ROC curve for 4-hour prognostic prediction in the MIMIC-III internal development cohort of this invention;

[0034] Figure 3 The ROC curve for 5-hour prognostic prediction in the MIMIC-III internal development cohort of this invention;

[0035] Figure 4 The ROC curve for 6-hour prognostic prediction of the MIMIC-III internal development cohort of this invention;

[0036] Figure 5The ROC curve for the 4-hour prognostic prediction of the MC-MED external validation cohort of this invention;

[0037] Figure 6 The ROC curve for the 5-hour prognostic prediction of the MC-MED external validation cohort of this invention;

[0038] Figure 7 The ROC curve for the 6-hour prognostic prediction of the MC-MED external validation cohort of this invention;

[0039] Figure 8 This is a summary diagram of the SHAP of the 6-hour XGBoost model within the MIMIC-III internal queue of the present invention.

[0040] Figure 9 This is a summary diagram of the 6-hour XGBoost model SHAP of the MC-MED external queue of the present invention;

[0041] Figure 10 This is a patient-level SHAP waterfall plot of the MIMIC-III internal cohort 6-hour XGBoost model of the present invention;

[0042] Figure 11 This is a patient-level SHAP waterfall plot for the 6-hour XGBoost model of the MC-MED external cohort of the present invention. Detailed Implementation

[0043] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0044] like Figure 1 As shown, this embodiment of the invention provides a method for predicting the binary prognosis of stroke based on ultra-early multicenter electronic medical record modeling, including the following steps:

[0045] S1: Access stroke-related electronic medical record data from at least two centers, and determine a unified analysis anchor time based on the visit as the unit of analysis. Unified analysis of anchor point time To characterize the time of admission, emergency room visit, intensive care unit admission, or first availability of electronic medical records in the early stages of stroke-related medical visits, and to standardize and map these timestamps to the same time coordinates within the center.

[0046] S2: Based on the unified binary prognostic endpoint ontology, each patient visit sample is labeled as having a good or poor prognosis, and poor prognosis is treated as a positive class in the model. The binary prognostic endpoint ontology classifies home discharge, home health services, or manually corrected good trajectories as having a good prognosis, and end-of-life care, professional nursing institutions, rehabilitation institutions, long-term care institutions, acute-phase transfers, or manually corrected poor trajectories as having a poor prognosis, and removes samples that are indeterminate or conflict with each other.

[0047] S3: Surrounding Construct ultra-early observation windows of 4 hours, 5 hours, and 6 hours respectively, allowing only data generated within the window to be included in the modeling; the observation window is defined as follows: , Indicates the first Each patient sample within the observation window length The ultra-early feature extraction interval formed below; Indicates the patient's sample number; Indicates the first The unified analysis anchor time for each patient sample can correspond to the admission time, emergency room arrival time, intensive care unit admission time, or the first time the electronic medical record is available. Indicates the length of the observation window, with a value of , and These are used to construct prognostic prediction tasks under different levels of early information accumulation. Indicates the first The actual end point at which observational data can be obtained for each patient sample; This indicates that the window endpoint is the earlier of the "theoretical window end time" and the "actual available data end time," avoiding the use of data after the window or data that is not actually available for the sample. This observation window is used to limit the feature extraction range, ensuring that the model only uses clinical information generated in the very early stages after the anchor point.

[0048] S4: Extract demographic, comorbidity, laboratory test, vital signs, and hemodynamic-derived features to form a candidate feature set. Demographic features include age and sex. Comorbidity features include at least hypertension, diabetes, hyperlipidemia, ischemic heart disease, chronic kidney disease, atrial fibrillation, and heart failure. Laboratory test features include at least glucose, creatinine, hematocrit, sodium, potassium, blood urea nitrogen, white blood cells, platelets, hemoglobin, bicarbonate, and chloride. For repeated measurements within the window, extract the mean, maximum, minimum, and last values. Vital signs features include at least heart rate, systolic blood pressure, diastolic blood pressure, mean blood pressure, respiratory rate, peripheral oxygen saturation, and body temperature. For repeated measurements within the window, extract the mean, maximum, minimum, and last values. Hemodynamic-derived features include at least mean pulse pressure. ; ; and shock index . The mean pulse pressure is obtained by subtracting the mean diastolic pressure from the mean systolic pressure within the observation window, and is used to reflect the arterial pulsation pressure load. This represents the mean systolic blood pressure within the observation window, reflecting the arterial pressure level during cardiac systole. This represents the mean diastolic pressure within the observation window, reflecting the baseline pressure level maintained by peripheral blood vessels during cardiac diastole. Mean arterial pressure is used to approximate the perfusion pressure of organs throughout the body. This represents the average heart rate within the observation window, reflecting the frequency of heartbeats per unit time. The shock index is calculated by dividing the mean heart rate by the mean systolic blood pressure and is used to reflect the degree of circulatory stress and hemodynamic instability.

[0049] S5: Perform shared numerical feature collaboration on candidate features from different centers, and remove fields such as identity identifiers, timestamps, tags, discharge destinations, and potential outcome leakage to form a unified feature space;

[0050] S6: Develop an in-process queue for fitting a missing value imputer, robust scaler, in-process oversampling, and binary ensemble learning model; class imbalance is handled using SMOTE or equivalent in-process synthetic oversampling, applied only to the training fold of internal cross-validation, not to the validation fold or external validation queue; the missing value imputer fits only within the training data or training fold, continuous variables are imputed using training set statistics, and continuous variable scaling is performed using... Robust scaling is achieved. Binary classification ensemble learning models include one or more of LightGBM, XGBoost, and Random Forest, and are used to assess the probability of poor prognosis. As the primary output.

[0051] S7: Determine model parameters and classification threshold through internal hierarchical cross-validation, and freeze the preprocessor, feature rules, model parameters, and classification threshold; the classification threshold τ is determined by maximizing the Youden exponent of the training fold or the internal training set. It is confirmed that the threshold is used consistently for both the verification fold and the external verification queue.

[0052] S8: Transfer the frozen prediction pipeline to an external validation queue, outputting the probability of poor prognosis, risk stratification results, and verifiable interpretable evidence. External validation is a frozen transfer validation, freezing the feature generation rules, shared feature list, interpolator, scaler, model parameters, and classification thresholds. No retraining, reweighting, or recalibration is performed during external validation. Interpretive evidence includes population-level SHAP feature importance ranking, a summary plot showing the direction of feature values' influence on model output, and a waterfall plot decomposition of individual patient risk outputs.

[0053] The specific process is as follows:

[0054] Example 1: Preparation of a multicenter prognostic cohort

[0055] The internal development dataset was MIMIC-III, and the external validation dataset was MC-MED. Both centers used stroke-related outpatient visits as the unit of analysis, and modeling data were generated according to a unified binary prognostic endpoint definition. In the example implementation, the internal analysis sample size was 1,932 cases, of which 1,170 had a good prognosis and 762 had a poor prognosis; the external analysis sample size was 1,182 cases, of which 819 had a good prognosis and 363 had a poor prognosis.

[0056] Example 2: Construction of Ultra-Early Time Window

[0057] Determine a uniform anchor time for each medical visit sample. Observation windows of 4 hours, 5 hours, and 6 hours were constructed respectively. The feature extraction intervals are: If a patient has no available measurement value within a certain window, the corresponding feature enters the missing value processing flow, and the information after the window is not used for supplementation.

[0058] Example 3: Binary Prognostic Labeling Standardization

[0059] Prognostic trajectories or discharge destinations from different data sources are mapped to favorable and unfavorable prognoses. Favorable prognoses include home discharge or similar favorable trajectories; unfavorable prognoses include death, hospice care, rehabilitation facilities, long-term care facilities, acute-phase transfers, or similar unfavorable trajectories. Labels that are uncertain or conflicting are not included in model training.

[0060] Example 4: Structured Feature Generation

[0061] Candidate features included demographics, comorbidities, laboratory tests, vital signs, and hemodynamically derived variables. For repeated measurements of laboratory and vital signs, mean, maximum, minimum, and last values ​​were extracted within a window. Circulatory load and perfusion-related status were characterized by mean pulse pressure, mean arterial pressure, and the shock index.

[0062] Example 5: Cross-center feature collaboration

[0063] After feature generation is completed in each window, the intersection of shared numerical variables is taken for the MIMIC-III and MC-MED feature columns, and identifiers, timestamps, labels, outcome-related fields, and any variables that may cause target leakage are removed. The example implementation yields 77 uniform features.

[0064] Example 6: Model Training and Threshold Determination

[0065] Missing value imputation and robust scaling are performed on continuous variables. Hierarchical five-fold cross-validation is performed in an internal queue during training, and SMOTE is only executed within the training fold. LightGBM, XGBoost, and Random Forest models are trained separately, and the Youden index of the training fold is used to determine the classification threshold.

[0066] Example 7: Frozen External Validation

[0067] The internally developed interpolator, scaler, shared feature list, model parameters, and classification threshold are all frozen and directly applied to the MC-MED external queue. External validation does not involve retraining, reweighting, or recalibrating, and uncertainty is estimated through 1,000 bootstrap iterations.

[0068] Example 8: Explanatory Output

[0069] Perform SHAP interpretation on the trained model. The population-level SHAP summary plot is used to show the overall impact of age, blood oxygen saturation, heart rate, respiratory rate, systolic blood pressure, blood glucose, and inflammation-related indicators on the model output; the patient-level waterfall plot is used to illustrate the main feature contributions of individual patient risk accumulated from baseline to the final risk output.

[0070] Among them, the observation window: ; Model risk output: ; Mean pulse pressure: ; Mean arterial pressure: ; Shock Index: ; Robust scaling: ; Youden Index: ; Accuracy: ; Recall rate: ; Accuracy: ; F1 value: ; Brier score: ; SHAP decomposition: ;

[0071] in, Represents the original values ​​of a continuous clinical feature; This represents the median of the feature within the internal training set or training compromise; This represents the interquartile range of the feature within the internal training set or training compromise; This represents the standardized feature value after robust scaling. The above statistics are estimated only within the training set or training fold; the validation fold and external validation queue use the frozen statistics to avoid data leakage.

[0072] Indicates the first The probability of poor prognosis for each patient sample; Indicates the first The true binary prognostic labels of each sample, among which This indicates a poor prognosis. This indicates a good prognosis; Indicates the first The feature vectors formed by extracting each sample within the ultra-early observation window; These represent the parameters obtained from model training; Indicates the first Predicted labels for each sample; This indicates an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise. This represents the classification threshold, used to convert continuous risk probabilities into binary prediction labels.

[0073] Indicates threshold The sensitivity is the proportion of samples with poor prognosis that are correctly predicted as having a poor prognosis. Indicates threshold The specificity under the given condition is the proportion of samples with a good prognosis that are correctly predicted to have a good prognosis. The Youden index is used to combine sensitivity and specificity to select the optimal classification threshold within the internal training set or training tradeoffs. TP represents the number of true positive samples, TN represents the number of true negative samples, FP represents the number of false positive samples, and FN represents the number of false negative samples; Accuracy represents precision, Recall represents recall or sensitivity, Precision represents precision or positive predictive value, and F1 represents the harmonic mean of precision and recall.

[0074] N represents the total number of samples participating in the evaluation; the Brier score represents the mean squared error between the predicted probability and the true binary label, used to evaluate the degree of calibration of the probability prediction, and the smaller the value, the closer the probability prediction is to the true outcome. Indicates the first The model output for each sample; This represents the overall baseline value output by the model; M represents the total number of features. Indicates the j-th feature to the j-th feature. The SHAP contribution value of the prediction results for each sample. SHAP decomposition is used to illustrate which features drive the risk prediction for a single patient, and the direction of contribution of each feature to the increase or decrease of risk.

[0075] Table 1. Basic characteristics of internal and external analysis queues

[0076] Table 2 Structured Variables and Extraction Rules

[0077] Table 3 Model Setup and Training Guidelines

[0078] Table 4. MIMIC-III Internal Development Queue Five-Fold Cross-Validation Performance

[0079] Table 5 MC-MED External Validation Queue Freeze Migration Performance

[0080] Table 6 explains the main prognostic drivers as shown in SHAP. .

Claims

1. A method for predicting the binary prognosis of stroke based on ultra-early multicenter electronic medical record modeling, characterized in that, Includes the following steps: Step 1: Access stroke-related electronic medical record data from at least two medical centers, using each visit as the unit of analysis, and determine a unified anchor time. Step 2: Based on the unified binary prognostic endpoint definition rules, each patient sample is labeled as having a good or poor prognosis, and the poor prognosis is used as the predicted positive category; Step 3: Starting from the anchor time, construct multiple fixed ultra-early observation windows, and only allow electronic medical record data generated within each window to enter subsequent modeling; Step 4: Extract demographic features, comorbidity features, laboratory test features, vital sign features, and hemodynamic features derived from vital sign calculations from the ultra-early observation window to form a candidate feature set; Step 5: Perform intersection screening of shared numerical features for candidate features from different medical centers, and remove fields such as identity identifiers, timestamps, prognostic labels, discharge destinations, and fields that may cause outcome leakage, to form a unified cross-center shared feature space. Step 6: In the internal development queue, fit the missing value interpolator, feature scaler, class imbalance handling oversampling, and binary classification ensemble learning model, and determine the model parameters and classification threshold through internal validation. Then, freeze the interpolator, scaler, oversampling, model parameters, and classification threshold. Step 7: Transfer the frozen complete prediction pipeline to an external validation queue and output the probability of poor prognosis for each patient sample without any retraining, reweighting, or recalibration. Step 8: Generate a population-level feature importance ranking and feature influence direction summary chart, as well as a patient-level risk contribution waterfall chart, based on the SHAP method, as verifiable interpretable evidence for prognostic prediction results.

2. The stroke binary prognosis prediction method based on ultra-early multicenter electronic medical record modeling according to claim 1, characterized in that, The ultra-early observation windows are three fixed-duration windows at the 4th, 5th, and 6th hours after the anchor point time. Each window is used independently for modeling to evaluate the predictive performance under different levels of early information accumulation.

3. The stroke binary prognosis prediction method based on ultra-early multicenter electronic medical record modeling according to claim 1, characterized in that, The unified rule for the binary prognostic endpoint is as follows: good clinical trajectories such as home discharge, home health services, or manually corrected outcomes are classified as good prognoses; poor clinical trajectories such as hospice care, professional nursing facilities, rehabilitation facilities, long-term care facilities, acute-phase transfers, or manually corrected outcomes are classified as poor prognoses; and samples that cannot be clearly classified or whose labels conflict with each other are excluded.

4. The stroke binary prognosis prediction method based on ultra-early multicenter electronic medical record modeling according to claim 1, characterized in that, Hemodynamic-derived features include at least mean pulse pressure, mean arterial pressure, and shock index, all of which are calculated from the statistical values ​​of systolic blood pressure, diastolic blood pressure, and heart rate measured repeatedly within the ultra-early observation window, and are used to characterize the early circulatory load and perfusion status of stroke patients.

5. The stroke binary prognosis prediction method based on ultra-early multicenter electronic medical record modeling according to claim 1, characterized in that, The unified feature space is formed as follows: only numerical clinical variables that are common to the electronic medical record databases of all participating centers are retained, and the clinical definition and measurement unit of the same variable are consistent across centers, thereby eliminating the degradation of model transfer performance caused by differences in dependent variable naming, recording habits and data structure.

6. The stroke binary prognosis prediction method based on ultra-early multicenter electronic medical record modeling according to claim 1, characterized in that, The ensemble learning model includes one or more combinations of LightGBM, XGBoost, and random forest, with the risk probability of poor prognosis as the main output; the classification threshold is determined by maximizing the Youden index in the training set or training fold, and the threshold is applied to all external validation samples after freezing.

7. The stroke binary prognosis prediction method based on ultra-early multicenter electronic medical record modeling according to claim 1, characterized in that, The class imbalance is handled by synthetic minority class oversampling, and the oversampling operation is only applied to the training fold of the internal cross-validation, and not to the validation fold or any external validation queue, so as to ensure the authenticity of the validation process.

8. The stroke binary prognosis prediction method based on ultra-early multicenter electronic medical record modeling according to claim 1, characterized in that, Freezing external validation is a one-time migration validation. During the validation process, all preprocessing rules, feature selection rules, model parameters and classification thresholds generated in the internal development phase are completely locked, and no adjustments or adaptive updates are made based on the data distribution of the external validation queue.

9. A stroke binary prognostic prediction system based on ultra-early multicenter electronic medical record modeling, characterized in that, include: The data access module is used to read multi-center structured electronic medical records and complete the indexing of patient-level samples, timestamp standardization, and source field mapping. The prognostic labeling module is used to perform binary prognostic endpoint ontology mapping, label good or bad prognosis and remove conflicting labels; The time window building module is used to generate multiple fixed ultra-early observation windows around the anchor time and perform data truncation within the windows; The feature engineering module is used to generate demographic, comorbidity, laboratory test, vital signs, and hemodynamic features. The cross-center collaboration module is used to retain the shared numerical characteristics of each center and remove fields such as identity identifiers, tags, discharge destinations, and potential outcome leakage. The model training module is used to fit the missing value interpolator, feature scaler, oversampling unit, and binary classification ensemble learning model, and freezes all parameters and rules after internal validation. The freeze verification module is used to migrate the frozen prediction pipeline to an external verification queue and output the probability of poor prognosis and confidence interval statistics. The output module is used to generate a population-level SHAP feature importance summary chart, a patient-level SHAP waterfall chart, and a risk stratification report.