Method for realizing early warning of schizophrenia long-term hospitalized patient based on deep learning and admission medical records

Through the combination of deep learning and large language models, the problem of low efficiency of single perspective and unstructured information extraction in the existing technology is solved, and high-accuracy early warning for long-term hospitalized patients with schizophrenia is achieved, and prediction accuracy and causality are improved. Comprehensiveness of the analysis.

CN119132573APending Publication Date: 2024-12-13SHANGHAI MENTAL HEALTH CENT (SHANGHAI PSYCHOLOGICAL COUNSELLING TRAINING CENT)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411271041.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The prior art predicts long-term hospitalization patients with schizophrenia, with a single perspective and is unable to effectively combine demographic information, blood test indicators and behavioral variables, resulting in insufficient comprehensive prediction accuracy and causal analysis, and the inability to efficiently extract the admission time. unstructured information reduces the accuracy and clinical practicality of the method.

Method used

Using a deep learning-based method, the electronic medical record data of schizophrenia patients is collected and preprocessed, and linear classification is performed in combination with attention module and multi-layer perceptron module to output long-term hospitalization risks, and unstructured through large language models. Efficient extraction of information to identify key risk factors.

Benefits of technology

High accuracy prediction under multimodal data is achieved, and the comprehensiveness of prediction accuracy and causal analysis is improved. For the first time, local large language models are used in similar methods to perform efficient and accurate unstructured feature extraction, and a prediction of 0.81 is achieved. Accuracy and area under the subject curve of 0.90.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119132573A_ABST
    Figure CN119132573A_ABST
Patent Text Reader

Abstract

The invention relates to a method for realizing early warning of a schizophrenia long-term hospitalized patient based on deep learning and admission medical records, and the method comprises the following steps: (1) collecting the electronic medical record data of the schizophrenia hospitalized patient in a specific data source in a target time period; (2) carrying out data cleaning and preprocessing on the obtained target data, and only reserving short hospitalization record data and long hospitalization record data which meet requirements; (3) performing data set verification, evaluation and language model processing on the target data subjected to data cleaning; (4) converting the data subjected to information extraction into embedded vectors, and sending the embedded vectors into an attention module and a multi-layer perceptron module for linear classification processing; and (5) performing early warning analysis on the final prediction result based on the risk marker of the classification model. By adopting the method provided by the invention, early warning of the schizophrenia long-term hospitalized patient can be carried out based on the three-mode hospitalization data, and the method has high efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning, and in particular to the field of smart medical care, and specifically refers to a method for achieving early warning for long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records. Background Art

[0002] Schizophrenia (SCZ) is a chronic and severe mental disorder that profoundly affects patients' thinking, emotions, and behaviors. Because SCZ is often accompanied by suicide and other health risks, the mortality rate of SCZ patients is high, and their life expectancy is about 15-20 years shorter than that of healthy people. The key to effective management and treatment of SCZ patients lies in hospitalization. However, the rising prevalence of SCZ has brought tremendous pressure on medical institutions. In this context, early warning of long-term hospitalization based on the patient's personalized condition at the time of admission can effectively help medical institutions to make forward-looking medical resource allocation and improve the efficiency and effectiveness of diagnosis and treatment. Therefore, the development of early warning tools for long-term hospitalization of SCZ patients is particularly urgent.

[0003] Early identification of long-term hospitalized patients with schizophrenia at the time of admission is of great significance. From the perspective of medical institutions, by accurately identifying the risk of long-term hospitalization of patients at the time of admission, optimal allocation of resources can be achieved. This method can not only improve the treatment effect, but also enhance the efficiency and pertinence of resource allocation, thereby improving the overall operational efficiency of the hospital. From the patient's perspective, accurate allocation of medical resources can shorten the length of hospital stay and reduce the economic burden on patients. In addition, the early identification of long-term hospitalized patients using multimodal objective indicators can not only improve the accuracy of identification, but also make this identification process more repeatable and stable, greatly increasing the clinical availability of such methods. By discovering the key factors that affect the length of hospital stay, it can help explore the pathogenesis of SCZ and promote the formulation and improvement of future treatment plans.

[0004] On this basis, most previous studies have focused on exploring the univariate differences between long-term and short-term SCZ patients at the time of admission. For example, Newman et al. analyzed the hospitalization data of 7,653 British patients with mental illness and found that male, specific ethnic groups (such as Asian, Caribbean ethnicity), and residential status (homeless or needing support) were associated with longer hospitalization. Bruce et al. explored the relationship between the length of hospitalization and admission characteristics of multi-ethnic mental illness inpatients in London, UK, and found that Caribbean patients had longer hospitalization times than other ethnic groups, and that older age, being single, and having a history of violence and victimization were associated with longer hospitalization times.

[0005] In recent years, some methods have also tried to use machine learning to predict the risk of long hospitalization. Kirchebner et al. combined manually extracted patient characteristics, criminal history, and medical history on a cohort of 143 people to build a machine learning-based forensic psychiatric hospitalization prediction model and found that the length of hospitalization was mainly affected by legal factors, especially the severity of the crime and the degree of victim injury. Cheng et al. developed a regression model that used demographic and biochemical variables to predict hospitalization time and found that marital status and thyroid-stimulating hormone levels were associated with prolonged hospitalization.

[0006] Since the current early warning methods for long-term hospitalization of SCZ patients have a single perspective, there is no method to combine the three modalities of demographic information, blood test indicators, and behavioral variables at the same time, which reduces the prediction accuracy of these methods and the comprehensiveness of causal analysis. Secondly, the current similar methods cannot efficiently extract unstructured information at the time of admission, resulting in existing methods either being developed on the basis of small-scale data sets or having to abandon these unstructured information. Both will significantly reduce the accuracy of the methods and their clinical practicality. Finally, the machine learning model used in the current method is relatively simple, which makes the model less accurate. At the same time, this also further reduces the effectiveness of the risk markers screened.

[0007] Based on this, the early identification of long-term hospitalized patients with schizophrenia has important application value and far-reaching impact in improving medical treatment effects, optimizing hospital resource management, and deeply exploring disease mechanisms and treatment strategies. At the same time, the emergence of new technologies such as large language models also provides a solid technical foundation for the development of such methods. Summary of the invention

[0008] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a method for achieving early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records.

[0009] In order to achieve the above objectives, the method of the present invention for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records is as follows:

[0010] The method for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records has the following main features:

[0011] (1) Collect electronic medical record data of hospitalized patients with schizophrenia from a specific data source during the target time period;

[0012] (2) Clean and preprocess the acquired target data, and only retain the short hospitalization record data and long hospitalization record data that meet the requirements;

[0013] (3) Perform data set verification, evaluation, and language model processing on the target data after data cleaning to achieve unstructured information extraction;

[0014] (4) The data after information extraction is converted into an embedding vector and then sent to the attention module and the multi-layer perceptron module for linear classification processing, and the final prediction is output to obtain the long-term hospitalization risk of the corresponding patient;

[0015] (5) Conduct early warning analysis on the final prediction results based on the risk markers of the classification model.

[0016] Preferably, the electronic medical record data includes blood test data, demographic information, and behavioral data of the patient at the time of admission to the hospital.

[0017] Preferably, according to the average hospitalization duration of Chinese schizophrenia patients, the short hospitalization record data is set to: patient admission record data of less than 30 days; and the long hospitalization record data is set to: patient admission record data of more than 120 days, thereby completing data classification processing.

[0018] Preferably, the step (3) comprises the following steps:

[0019] (3.1) Annotate 100 examples of the three unstructured behavioral variables, namely, blood test data, demographic information, and behavioral data, respectively, to ensure that the ratio of positive samples to negative samples is 1:1;

[0020] (3.2) Use the dataset in step (3.1) as a validation set hyperparameter for adjusting the prompt and input it into the local large language model for training;

[0021] (3.3) setting initial prompts, evaluation and prompt optimization processing for the corresponding data set to obtain the data set counts of correct, incorrect and uncertain entries;

[0022] (3.4) Embed the prompts and data set representation currently obtained by the system into an initial query template, request the remote large language model to optimize the prompts, and replace the optimized prompts with the current prompts to achieve iterative optimization of prompts;

[0023] (3.5) When the verification set no longer has errors, the system outputs the final prompt, thereby completing the unstructured information extraction.

[0024] Preferably, after the data preprocessing, the data also includes encoding the corresponding data using a data binning strategy, specifically:

[0025] The duration of hospitalization was divided into three categories: less than 30 days, 30-600 days, and more than 600 days, coded as 0, 0.5, and 1, respectively; behavioral variable characteristics were coded as 0 or 1; and demographic characteristics were coded as 0, 0.5, and 1.

[0026] Preferably, the step (4) comprises the following steps:

[0027] (4.1) Use time slicing to split the data, use the latest data set as an independent test set, and use the remaining data sets as training sets;

[0028] (4.2) Use leave-one-out cross-validation to select hyperparameters, and exhaustively enumerate the current validation data points, and use the correct prediction ratio finally obtained as the evaluation performance on the validation set;

[0029] (4.3) converting the data after data feature extraction and preprocessing into an embedding vector, and sending it to the attention module and the multi-layer perceptron module to calculate the attention score and deep feature extraction respectively;

[0030] (4.4) Finally, the output results of the attention module and the multi-layer perceptron module are combined and input into the linear module for classification to output the final prediction result, so as to obtain the patient's long hospitalization risk.

[0031] Preferably, the step (5) is specifically as follows:

[0032] The Shapley additive explanation was used to perform interpretability analysis on the above model, and the GradientExplainer method was used to efficiently approximate the SHAP value by using the gradient of the model output relative to the input. Finally, age at admission, disease duration, and marital status were identified as the three key risk factors leading to prolonged hospitalization.

[0033] The method of the present invention for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records was adopted. By constructing an independent test set, in actual application, the data set included the 50 most recent long-term and short-term hospitalized patients, and finally achieved a prediction accuracy (ACC) of 0.81 and a subject area under the curve (AUC) of 0.90 in the test. It is worth mentioning that this is the first time that early warning of long-term hospitalized patients with schizophrenia is performed based on three modal admission data. It is also the first time that a method based on a local large language model is used in similar methods for efficient and accurate unstructured feature extraction, which has a more significant application effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 The figure is a flow chart of the unstructured information extraction process performed in the present invention.

[0035] Figure 2 This is an overall flow chart of the method of the present invention for achieving early warning for long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records. DETAILED DESCRIPTION

[0036] In order to more clearly describe the technical content of the present invention, further description is given below in conjunction with specific embodiments.

[0037] Before describing in detail embodiments according to the present invention, it should be noted that, hereinafter, the terms "comprises", "includes" or any other variations are intended to cover non-exclusive inclusion, whereby a process, method, article or apparatus comprising a series of elements includes not only these elements, but also other elements not explicitly listed or inherent to such process, method, article or apparatus.

[0038] The purpose of this technical solution is to use deep learning technology and multimodal admission data to develop a highly accurate early warning method for long-term hospitalized SCZ patients. Specifically, this case uses the behavioral characteristics, demographic characteristics, and blood test data of SCZ patients at the time of admission extracted by an efficient algorithm to construct a deep learning-based two-classification algorithm for long-term hospitalized patients, and at the same time gives the corresponding risk markers. Among them, the two-classification here refers to predicting the patient's hospitalization time as "long-term hospitalization" and "short-term hospitalization."

[0039] See also Figure 1 and 2 As shown, the method for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records, wherein the method comprises the following steps:

[0040] (1) Collect electronic medical record data of hospitalized patients with schizophrenia from a specific data source during the target time period;

[0041] (2) Clean and preprocess the acquired target data, and only retain the short hospitalization record data and long hospitalization record data that meet the requirements;

[0042] (3) Perform data set verification, evaluation, and language model processing on the target data after data cleaning to achieve unstructured information extraction;

[0043] (4) The data after information extraction is converted into an embedding vector and then sent to the attention module and the multi-layer perceptron module for linear classification processing, and the final prediction is output to obtain the long-term hospitalization risk of the corresponding patient;

[0044] (5) Conduct early warning analysis on the final prediction results based on the risk markers of the classification model.

[0045] As a preferred embodiment of the present invention, the electronic medical record data includes blood test data, demographic information and behavioral data of the patient at the time of admission to the hospital.

[0046] As a preferred embodiment of the present invention, according to the average hospitalization duration of Chinese schizophrenia patients, the short hospitalization record data is set to: patient admission record data of less than 30 days; the long hospitalization record data is set to: patient admission record data of more than 120 days, thereby completing data classification processing.

[0047] As a preferred embodiment of the present invention, the step (3) comprises the following steps:

[0048] (3.1) Annotate 100 examples of the three unstructured behavioral variables, namely, blood test data, demographic information, and behavioral data, respectively, to ensure that the ratio of positive samples to negative samples is 1:1;

[0049] (3.2) Use the dataset in step (3.1) as a validation set hyperparameter for adjusting the prompt and input it into the local large language model for training;

[0050] (3.3) setting initial prompts, evaluation and prompt optimization processing for the corresponding data set to obtain the data set counts of correct, incorrect and uncertain entries;

[0051] (3.4) Embed the prompts and data set representation currently obtained by the system into an initial query template, request the remote large language model to optimize the prompts, and replace the optimized prompts with the current prompts to achieve iterative optimization of prompts;

[0052] (3.5) When the verification set no longer has errors, the system outputs the final prompt, thereby completing the unstructured information extraction.

[0053] As a preferred embodiment of the present invention, after data preprocessing, the data also includes encoding the corresponding data using a data binning strategy, specifically:

[0054] The duration of hospitalization was divided into three categories: less than 30 days, 30-600 days, and more than 600 days, coded as 0, 0.5, and 1, respectively; behavioral variable characteristics were coded as 0 or 1; and demographic characteristics were coded as 0, 0.5, and 1.

[0055] As a preferred embodiment of the present invention, the step (4) comprises the following steps:

[0056] (4.1) Use time slicing to split the data, use the latest data set as an independent test set, and use the remaining data sets as training sets;

[0057] (4.2) Use leave-one-out cross-validation to select hyperparameters, and exhaustively enumerate the current validation data points, and use the correct prediction ratio finally obtained as the evaluation performance on the validation set;

[0058] (4.3) converting the data after data feature extraction and preprocessing into an embedding vector, and sending it to the attention module and the multi-layer perceptron module to calculate the attention score and deep feature extraction respectively;

[0059] (4.4) Finally, the output results of the attention module and the multi-layer perceptron module are combined and input into the linear module for classification to output the final prediction result, so as to obtain the patient's long hospitalization risk.

[0060] As a preferred embodiment of the present invention, the step (5) is specifically as follows:

[0061] The Shapley additive explanation was used to perform interpretability analysis on the above model, and the GradientExplainer method was used to efficiently approximate the SHAP value by using the gradient of the model output relative to the input. Finally, age at admission, disease duration, and marital status were identified as the three key risk factors leading to prolonged hospitalization.

[0062] The following will further explain the various steps of this technical solution in detail in conjunction with specific embodiments:

[0063] Step 1: Data Collection

[0064] The invention was developed based on the electronic medical records of inpatients with schizophrenia (SCZ) discharged from the Shanghai Mental Health Center (SMHC) between 2018 and 2022. The data included blood test data at admission, demographic information, and current medical history records including behavioral data. The use of these data was approved by the Ethics Committee of the Shanghai Mental Health Center (Approval No.: 2022-79), and data confidentiality was strictly observed throughout the data processing process.

[0065] Step 2: Data preprocessing

[0066] We initially obtained a total of 15,104 electronic medical records. First, we excluded patients with a hospital stay of less than three days. This is because we believe that a hospital stay of less than three days is atypical for acute hospitalization of schizophrenia (SCZ) because these patients may not have received adequate treatment due to early discharge. Therefore, such a short hospital stay cannot accurately reflect the patient's treatment effect. After this step, 14,780 records remained in the data set. Second, we excluded patients whose discharge outcomes were other than cure or improvement. These patients may not have met the clinical criteria for cure and require a longer hospital stay for further treatment, but were discharged early for non-medical reasons. After this step, 11,767 records remained in the data set. The last step is to group the records according to the length of hospital stay, converting them into binary data representing the categories of long and short hospital stays. A 2019 study showed that the length of hospital stay for Chinese schizophrenia patients was 73±42 days. Based on this, we defined records with a hospital stay of more than 120 days as long hospitalizations and records with a hospital stay of less than 30 days as short stays. This classification provides the initial data required for the present invention. After excluding missing features, the basic data set used in the present invention includes 1,546 short hospitalization records and 812 long hospitalization records.

[0067] Step 3: Unstructured information extraction method based on efficient algorithm

[0068] Attached Figure 1The workflow of the unstructured information extraction method based on an efficient algorithm is shown. The input electronic medical record information here specifically refers to the unstructured medical record information to be extracted. For example, the goal here is to extract behavioral data from the current medical history information (such as whether there is impulsive behavior, whether there is suicidal negative behavior, whether there is running outside, etc.). We first annotated 100 examples for each of the three unstructured behavioral variables, ensuring that the ratio of positive and negative samples is 1:1, which means that there are 50 entries containing the corresponding features and 50 entries not containing them. These data sets serve as validation sets for adjusting prompts, where the prompt is a hyperparameter of the local large language model. Initially, we manually set an initial prompt and let the local large language model continuously generate five judgments for each entry on the validation set. If the five judgments are consistent, they are considered the final judgment; if they are inconsistent, the final judgment is recorded as "uncertain". This process provides an evaluation of the performance of the prompt on the validation set, and obtains the counts of correct, incorrect, and uncertain entries. Next, we embed the current prompt and its corresponding performance into a query template and request the remote large language model to optimize the prompt. Specifically, we use query templates to request a remote, more advanced large language model to optimize our initial prompts. This step can also be replaced by experienced doctors or engineers, but using a remote large language model facilitates automation of the entire process. The optimized prompts then replace the current prompts. We repeatedly cycle through these steps from inputting the validation set into the local large language model to obtaining the optimized prompts (this step is called iterative prompt optimization). This iterative process continues until no errors are made on the validation set and the performance of the current prompts no longer improves after further optimization.

[0069] When choosing a local large language model in actual development, we used Baichuan2-13B because our dataset is in Chinese. This model shows performance close to GPT-3.5Turbo on various medical question-answering datasets. For a remote high-level large language model, we used GPT-4, which is the most advanced model available at the time of this invention. We accessed the model through a web interface.

[0070] Step 4: Train a deep learning classification model using multimodal data

[0071] When developing this technical solution, the electronic medical record information used includes demographic information (including: age at admission, gender, marital status, course of disease), blood test indicators (hemoglobin, neutrophils, neutrophil %, eosinophils, eosinophils, basophils, basophils, lymphocytes, lymphocytes, monocytes, monocytes, platelets, C-reactive protein, albumin, globulin, total bilirubin, alanine aminotransferase, alkaline phosphatase, γ-glutamyl transferase, sodium, potassium, chloride, neutrophil to lymphocyte ratio, monocyte to lymphocyte ratio, platelet to lymphocyte ratio, systemic inflammatory index, etc.), behavioral data (including whether there is impulsive behavior, whether there is suicidal negative behavior, whether there is running outside, etc.). Unstructured information specifically refers to behavioral data, and its information extraction method has been described in step three. Before inputting the data into the deep neural network, we followed the conventional data preprocessing and encoding steps. Specifically, for the disease duration data, we adopted a data binning strategy to divide the duration into three categories: less than 30 days, 30-600 days, and more than 600 days, coded as 0, 0.5, and 1, respectively. Other binary features, such as behavioral variables, are coded as 0 or 1. Three-category features, such as marital status, are coded as 0, 0.5, and 1. To avoid information leakage, we performed standardization after data partitioning, and the standardized parameters of the test set followed the training set. For data partitioning, we adopted the data splitting method of time slicing. This method uses the latest time data as an independent test set to simulate the future prediction ability of our model and reduce the interference of confounding factors in outcome evaluation. Here, we designated the last 50 long-term hospitalization records and the last 50 short-term hospitalization records, a total of 100 records, as an independent test set, while the rest of the data was used as a training set. We did not separately divide the validation set because we used leave-one-out cross-validation for hyperparameter selection. This method involves iteratively leaving out one data point as validation data. By exhaustively enumerating this validation data point, we finally obtain the proportion of correct predictions as the evaluation performance on the validation set. The main advantage of this method is that it can make full use of the data in the training process. In order to improve computational efficiency, we set the sampling step size of leave-one-out cross-validation to 5 and perform parallel processing of model training.

[0072] The overall process of the deep learning method developed by the present invention is shown in the attached Figure 2As shown. After extracting and preprocessing the data features using the above steps, we convert it into an embedding vector. The embedding vector is sent to the attention module and the multi-layer perceptron module respectively. The attention module calculates the attention score to help the model focus on more important features. The multi-layer perceptron module consists of multiple fully connected layers, batch normalization layers, and dropout layers to extract deep features. Finally, the output results of the attention module and the multi-layer perceptron module are merged and input into the linear module for classification, and the final prediction is output to obtain the patient's risk of long hospitalization.

[0073] Step 5: Risk marker analysis based on classification model

[0074] Our risk marker analysis approach is based on a comprehensive interpretability analysis of the model. Specifically, we used Shapley Additive Explanations (SHAP) to perform interpretability analysis on our model. SHAP is implemented to explain machine learning models by calculating the average marginal contribution of each feature value in all possible combinations. In practice, this technical solution uses the GradientExplainer method to efficiently approximate the SHAP value using the gradient of the model output relative to the input, which is suitable for the deep learning model of this technical solution. After calculating the SHAP value, we used the top three features with the highest SHAP absolute value as the key risk factors we found for prolonged hospitalization in SCZ patients. Ultimately, age at admission (positive correlation), disease duration (positive correlation), and marital status (negative correlation) were identified as the three key risk factors for prolonged hospitalization.

[0075] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0076] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device.

[0077] A person of ordinary skill in the art may understand that all or part of the steps of the method for implementing the above-mentioned embodiment may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0078] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0079] In the description of this specification, the description with reference to the terms "an embodiment", "some embodiments", "example", "specific example", or "embodiment" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0080] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

[0081] The method of the present invention for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records was adopted. By constructing an independent test set, in actual application, the data set included the 50 most recent long-term and short-term hospitalized patients, and finally achieved a prediction accuracy (ACC) of 0.81 and a subject area under the curve (AUC) of 0.90 in the test. It is worth mentioning that this is the first time that early warning of long-term hospitalized patients with schizophrenia is performed based on three modal admission data. It is also the first time that a method based on a local large language model is used in similar methods for efficient and accurate unstructured feature extraction, which has a more significant application effect.

[0082] In this specification, the present invention has been described with reference to specific embodiments thereof. However, it is apparent that various modifications and variations may be made without departing from the spirit and scope of the present invention. Therefore, the specification and drawings should be regarded as illustrative rather than restrictive.

Claims

1. A method for early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records, characterized in that: The method comprises the following steps: (1) Collect electronic medical record data of hospitalized patients with schizophrenia from a specific data source during the target time period; (2) Clean and preprocess the acquired target data, and only retain the short hospitalization record data and long hospitalization record data that meet the requirements; (3) Perform data set verification, evaluation, and language model processing on the target data after data cleaning to achieve unstructured information extraction; (4) The data after information extraction is converted into an embedded vector and then sent to the attention module and the multi-layer perceptron module for linear classification processing, and the final prediction is output to obtain the long-term hospitalization risk of the corresponding patient; (5) Conduct early warning analysis on the final prediction results based on the risk markers of the classification model.

2. The method for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records according to claim 1, characterized in that: The electronic medical record data includes blood test data, demographic information, and behavioral data of the patient at the time of admission to the hospital.

3. The method for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records according to claim 1, characterized in that: According to the average hospitalization duration of schizophrenia patients in China, the short hospitalization record data is set as: the admission record data of patients with a duration shorter than 30 days; the long hospitalization record data is set as: the admission record data of patients with a duration longer than 120 days, thereby completing the data classification process.

4. The method for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records according to claim 2, characterized in that: The step (3) comprises the following steps: (3.1) Annotate 100 examples of the three unstructured behavioral variables, namely, blood test data, demographic information, and behavioral data, respectively, to ensure that the ratio of positive samples to negative samples is 1:1; (3.2) Use the dataset in step (3.1) as a validation set hyperparameter for adjusting the prompt and input it into the local large language model for training; (3.3) setting initial prompts, evaluation and prompt optimization processing for the corresponding data set to obtain the data set counts of correct, incorrect and uncertain entries; (3.4) Embed the prompts and data set representation currently obtained by the system into an initial query template, request the remote large language model to optimize the prompts, and replace the optimized prompts with the current prompts to achieve iterative optimization of prompts; (3.5) When the verification set no longer has errors, the system outputs the final prompt, thereby completing the unstructured information extraction.

5. The method for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records according to claim 4, characterized in that: After data preprocessing, the corresponding data is also encoded using a data binning strategy, specifically: The duration of hospitalization was divided into three categories: less than 30 days, 30-600 days, and more than 600 days, coded as 0, 0.5, and 1, respectively; behavioral variable characteristics were coded as 0 or 1; and demographic characteristics were coded as 0, 0.5, and 1.

6. The method for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records according to claim 5, characterized in that: The step (4) comprises the following steps: (4.1) Use time slicing to split the data, use the latest data set as an independent test set, and use the remaining data sets as training sets; (4.2) Use leave-one-out cross-validation to select hyperparameters, and exhaustively enumerate the current validation data points, and use the correct prediction ratio finally obtained as the evaluation performance on the validation set; (4.3) converting the data after data feature extraction and preprocessing into an embedding vector, and sending it to the attention module and the multi-layer perceptron module to calculate the attention score and deep feature extraction respectively; (4.4) Finally, the output results of the attention module and the multi-layer perceptron module are combined and input into the linear module for classification to output the final prediction result, so as to obtain the patient's long hospitalization risk.

7. The method for realizing early warning of long-term hospitalized patients with schizophrenia based on deep learning and hospital admission medical records according to claim 6, characterized in that: The step (5) is specifically as follows: The Shapley additive explanation was used to perform interpretability analysis on the above model, and the GradientExplainer method was used to efficiently approximate the SHAP value by using the gradient of the model output relative to the input. Finally, age at admission, disease duration, and marital status were identified as the three key risk factors leading to prolonged hospitalization.