Liver disease electronic medical record analysis and aid decision-making method based on large model
By building a large language model containing key decision information and driving local deployment, the limitations of traditional liver disease diagnosis methods and data privacy issues are solved, the generation of personalized decision-making suggestions is realized, the diagnosis and treatment effect and resource utilization are improved, and the Data security.
Patent Information
- Application Number
- CN202411318534.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional liver disease diagnosis methods have limitations, and external large models may lead to privacy leakage when processing patient data, lacking personalized decision support.
Using large-scale model-based electronic medical record analysis and auxiliary decision-making methods, the large language model driven local deployment is analyzed by building a Prompt with key decision information, generating personalized decision-making suggestions, combining patient data and medical knowledge to optimize treatment plans .
It improves the diagnosis and treatment effect and treatment experience, reduces the risk of misdiagnosis, uses in-hospital data resources, ensures data privacy and processing efficiency, and becomes an important tool for modern liver disease diagnosis and treatment, and promotes the development of medical care to intelligence and precision.
Smart Images

Figure CN119207774A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for analyzing liver disease electronic medical records and assisting decision-making based on a large model, and belongs to the fields of liver disease medicine and natural language processing. Background Art
[0002] With the rapid development of artificial intelligence in recent years, generative artificial intelligence has made remarkable achievements in the field of dialogue. Large language models (referred to as "large models"), led by ChatGPT, have attracted widespread attention from the public. Large models are AI models based on deep learning. Through training with massive data, they can learn complex patterns and relationships, and thus perform well in a variety of tasks.
[0003] Liver disease is a major public health problem worldwide, with complex causes, including viral hepatitis, fatty liver disease, alcoholic liver disease, autoimmune liver disease and other types. Traditional diagnosis and treatment of liver disease mainly rely on the doctor's experience and limited biomarkers, but these methods often have limitations due to individual differences and the complexity of the disease. With the rapid increase in the amount of medical data, such as electronic medical records, imaging data and test data, large models have shown great potential in processing, analyzing and providing decision-making information. However, the use of external private large models may pose a risk of patient privacy data leakage.
[0004] Given the limitations of traditional diagnostic methods and the data privacy risks of external large models, it is of great significance to build large model prompts based on electronic medical records, imaging data, test data and medical standards, and deploy large models locally. A good prompt can not only help doctors analyze patients' conditions more accurately and improve the effectiveness of decision-making recommendations, but also make full use of various data resources in the hospital, saving a lot of medical resources and labor costs. Summary of the invention
[0005] The core objective of the present invention is to provide a method for analyzing and assisting decision-making in liver disease electronic medical records based on a large model, aiming to provide strong auxiliary decision-making support for doctors in the diagnosis and treatment of liver disease. This method aims to help doctors make personalized decision-making recommendations more accurately when formulating liver disease diagnosis and treatment plans, thereby improving the overall effect of diagnosis and treatment and the patient's treatment experience. The method constructs a prompt containing key decision-making information by deeply analyzing and utilizing the patient's disease information and extensive medical knowledge related to liver disease. The prompt is used as input to drive the locally deployed large language model for reasoning and analysis, and finally generate decision-making recommendations suitable for the patient's personal situation. These suggestions can help doctors better judge the condition, choose the most suitable treatment path, and optimize the treatment effect. The method of the present invention not only has a strong ability to integrate medical knowledge, but also can flexibly take into account the patient's specific condition and individual differences. This innovative method is expected to become an important tool in the diagnosis and treatment of modern liver diseases, and promote the development of the medical field in a more intelligent and precise direction.
[0006] The present invention adopts the following technical solutions to solve the above technical problems:
[0007] The present invention provides a method for analyzing liver disease electronic medical records and assisting decision-making based on a large model, and the specific steps are as follows:
[0008] Step 1: Load the large model and set the model role
[0009] Step 2: Obtain patient data and preprocess it
[0010] Step 3: Inject the patient's data into the prompt of the corresponding disease, and provide medical record analysis and recommended decision-making solutions.
[0011] As a further optimization scheme of the present invention, in step 1, the data preprocessing operation includes the following steps:
[0012] (1) Load the Qianwen-72B large model. By loading the model in the local environment, data privacy and processing efficiency can be guaranteed.
[0013] (2) Set up the model role: “You are an assistant with extensive knowledge of liver disease and will give specific decision-making suggestions in Chinese based on the electronic medical record.”
[0014] (3) Open the access interface on the local server. The model can process the data requests sent by the backend and return the processing results. The configuration of the interface must ensure the security of data transmission and the timeliness of response.
[0015] As a further optimization solution of the present invention, in step 2, the data preprocessing operation includes the following steps:
[0016] (1) Send a URL request to obtain structured patient data and process it in Json format.
[0017] (2) Sort the data in the image data field and the inspection check field of the Json data from old to new according to time.
[0018] (3) retain the latest imaging data and inspection data and convert them into character strings;
[0019] (4) Delete empty and repeated fields from the patient’s medical records and convert them into strings. This is to reduce the interference of redundant information and improve the efficiency and accuracy of the model in processing data.
[0020] As a further optimization solution of the present invention, in step 2, the data preprocessing operation includes the following steps:
[0021] (1) According to the main diagnosis field received by the interface, determine whether the patient's disease is fatty liver, drug-induced liver injury, primary liver cancer, cirrhosis, alcoholic liver disease, autoimmune hepatitis, liver cyst and liver hemangioma.
[0022] (2) If it is primary liver cancer. First, stage liver cancer. Write a prompt for primary liver cancer staging based on medical knowledge of primary liver cancer staging and doctor’s feedback. Inject the Json data that has been converted into a string into the prompt, and let the big model judge the staging result. Then, write a prompt for decision-making recommendations for primary liver cancer based on medical knowledge of different stages of primary liver cancer and doctor’s feedback. Inject the staging results and the Json data that has been converted into a string into the prompt, and let the big model generate decision recommendations.
[0023] (3) If it is fatty liver, drug-induced liver injury, cirrhosis, alcoholic liver disease, autoimmune hepatitis, liver cysts and liver hemangioma, write a prompt to generate decision suggestions based on the medical knowledge of the corresponding liver disease and the doctor's feedback, and let the big model generate decision suggestions.
[0024] By adopting the above technical solutions, the present invention has demonstrated many significant beneficial effects. First, in the process of constructing Prompt, the present invention fully combines the patient's disease data, relevant medical knowledge of liver disease and the doctor's clinical feedback, so as to make more accurate and personalized decisions. In practical applications, the present invention effectively utilizes the electronic medical record information of medical institutions and maximizes the value of digital medical information resources. In addition, the present invention also pays attention to the feedback and participation of doctors. The doctor's experience and professional judgment are input into the big model through Prompt, which further optimizes the process of making decision recommendations. This innovative method that combines artificial intelligence and medical expertise not only improves the accuracy and efficiency of diagnosis, but also reduces the risk of misdiagnosis, providing a powerful auxiliary tool for clinicians. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 Schematic diagram of a large model-based method for electronic medical record analysis and decision support for liver disease. DETAILED DESCRIPTION
[0026] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0027] Example: The electronic medical record analysis and decision-making assistance method for liver disease based on a large model proposed in the present invention is as follows: Figure 1 This figure shows the general process of analysis and decision-making recommendation generation, which mainly consists of two parts: primary liver cancer branch and other liver disease branch. The steps of the present invention are described in detail below.
[0028] Experimental environment: The computer configuration is Intel(R) Xeon(R) Silver 4314 processor (2.40GHz) and 125GB random access memory (RAM), four NVIDIA GeForce RTX 4090 graphics cards (GPU), Ubuntu 9.4.0 64-bit operating system. The software environment is Python 3.9, and the Ollama version is 0.1.32.
[0029] The present invention provides a method for analyzing liver disease electronic medical records and assisting decision-making based on a large model; the method comprises the following steps:
[0030] Step 1: Load the large model and set the model role
[0031] (1) Use Ollama to load the Qianwen-72B large model. By loading the model in the local environment, data privacy and processing efficiency can be guaranteed.
[0032] (2) Set up the model role: “You are an assistant with extensive knowledge of liver disease, who will give specific decision-making suggestions in Chinese based on the electronic medical record.”
[0033] (3) Open the access interface on the local server. The model can process the data request sent by the Flask backend and return the processing result. The configuration of the interface must ensure the security of data transmission and the timeliness of response.
[0034] Step 2: Obtain patient data and preprocess it
[0035] (1) Send a URL request to obtain structured patient data and process it in Json format. The main fields of the received Json data are shown in Table 1.
[0036] (2) Use the Sort function to sort the image data field and the inspection check field data of the Json data from old to new according to time.
[0037] (3) retain the latest imaging data and inspection data and convert them into character strings;
[0038] (4) Delete empty and repeated fields from the patient’s medical records and convert them into strings. This is to reduce the interference of redundant information and improve the efficiency and accuracy of the model in processing data.
[0039] Table 1 Formatted processing data
[0040]
[0041]
[0042] Step 3: Inject the patient’s data into the prompt of the corresponding disease and give the recommended decision suggestions.
[0043] (1) According to the main diagnosis field received by the interface, determine whether the patient's disease is fatty liver, drug-induced liver injury, primary liver cancer, cirrhosis, alcoholic liver disease, autoimmune hepatitis, liver cyst and liver hemangioma.
[0044] (2) If it is primary liver cancer. First, stage liver cancer. Write a prompt for primary liver cancer staging based on medical knowledge of primary liver cancer staging and doctor’s feedback. Inject the Json data that has been converted into a string into the prompt, and let the big model judge the staging result. Then, write a prompt for generating decision suggestions for primary liver cancer based on medical knowledge of different stages of primary liver cancer and doctor’s feedback. Inject the staging results and the Json data that has been converted into a string into the prompt, and let the big model generate decision suggestions.
[0045] (3) If it is fatty liver, drug-induced liver injury, cirrhosis, alcoholic liver disease, autoimmune hepatitis, liver cysts and liver hemangioma, write a prompt to generate decision suggestions based on the medical knowledge of the corresponding liver disease and the doctor's feedback, and let the big model generate decision suggestions.
[0046] The above is a preferred implementation mode of the present experiment. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that it is still possible to modify the technical solutions described in the aforementioned embodiments, or to make equivalent replacements for some of the technical features therein; and these modifications or replacements should also be regarded as the scope of protection of the present invention.
Claims
1. A method for analyzing liver disease electronic medical records and assisting decision-making based on a large model, characterized in that: The method comprises the following steps: Step 1: Load the large model and set the model role. Step 2: Obtain patient data and preprocess it. Step 3: Inject the patient's data into the prompt of the corresponding disease and give the analysis results and decision suggestions.
2. The method for analyzing liver disease electronic medical records and assisting decision-making based on a large model according to claim 1, characterized in that: The model loading described in step 1 is as follows: (1) Load the Qianwen-72B large model by loading the model in the local environment. (2) Setting the model role: "You are an assistant with extensive knowledge of liver disease, who will give specific decision-making suggestions in Chinese based on the electronic medical record." (3) Open the access interface on the local server. The model processes the data requests sent by the backend and returns the processing results. The configuration of the interface must ensure the security of data transmission and the timeliness of response.
3. The method for analyzing liver disease electronic medical records and assisting decision-making based on a large model according to claim 1, characterized in that: The patient data preprocessing in step 2 is as follows: (1) Send a URL request to obtain structured patient data and process it in JSON format. (2) Sort the image data field and the inspection field of the Json data in order from old to new. (3) Keep the latest image data and inspection data and convert them into strings. (4) Delete empty and repeated fields from the patient's medical records and convert them into strings.
4. The method for analyzing liver disease electronic medical records and assisting decision-making based on a large model according to claim 1, characterized in that: In step 3, the prompt construction and decision suggestion are recommended. The specific operations are as follows: (1) According to the main diagnosis field received by the interface, determine whether the patient's disease is fatty liver, drug-induced liver injury, primary liver cancer, cirrhosis, alcoholic liver disease, autoimmune hepatitis, liver cyst, or liver hemangioma. (2) If it is primary liver cancer, first stage the liver cancer. Based on the medical knowledge of primary liver cancer staging and the doctor's feedback, write a prompt for primary liver cancer staging, and inject the Json data that has been converted into a string into the prompt. Let the big model judge the staging result. Then, based on the medical knowledge of different stages of primary liver cancer and the doctor's feedback, write a prompt for generating decision suggestions for primary liver cancer. Inject the staging results and the Json data that has been converted into a string into the prompt. Let the big model generate decision suggestions. (3) If it is fatty liver, drug-induced liver injury, cirrhosis, alcoholic liver disease, autoimmune hepatitis, liver cysts and liver hemangioma, write a prompt to generate decision suggestions based on the medical knowledge of the corresponding liver disease and the doctor's feedback, and let the big model generate decision suggestions.
Citation Information
Cited By
Generative AI-driven physiology-music following response intelligent emotion regulation system
CN119896792A
