A method for generating intelligent electronic medical records based on reinforcement learning optimization, an electronic device, and a storage medium.
By combining large-scale pre-trained language models and reinforcement learning techniques, the generation of electronic medical records is optimized, solving the problems of insufficient data integration and contextual consistency in existing technologies. This enables the generation of high-quality, personalized electronic medical records, improving the intelligence level and medical rationality of medical record generation.
Patent Information
- Application Number
- CN202510636399.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-11-17
AI Technical Summary
Existing electronic medical record generation technologies have shortcomings in data integration, contextual consistency, medical rationality, and interactive experience. They cannot effectively utilize patients' historical medical records and doctors' personalized habits, resulting in inaccurate, incoherent, and logically flawed medical records with low utilization rates reported by doctors.
By employing a large-scale pre-trained language model combined with reinforcement learning and medical knowledge enhancement techniques, and through adaptive knowledge fusion networks, time-series disease progression models, and clinical reasoning regularization, electronic medical record generation is optimized, multi-source medical data is integrated, disease trend suggestions are added, and medical record content is adjusted to improve logical consistency and medical rationality.
It enables intelligent generation of electronic medical records, improving the logical consistency, clinical rationality, and professionalism of medical records, reducing the workload of doctors, enhancing the personalized adaptability and feedback mechanism of medical record generation, and improving the quality of medical record generation.
Smart Images

Figure CN123120167A_ABST
Abstract
Description
Technical Field
[0001] This application provides a method for generating intelligent electronic medical records based on reinforcement learning optimization, an electronic device, and a storage medium, relating to the field of medical information technology. Background Technology
[0002] Current electronic medical record generation technologies have significant shortcomings in the following aspects:
[0003] (1) The complexity and integration challenges of medical data
[0004] Electronic medical records contain structured data (patient basic information, examination data), semi-structured data (tables, indicators), and unstructured data (doctors' free text descriptions). Existing medical record generation systems struggle to efficiently integrate this data: traditional methods rely on templates or rule-based filling, failing to flexibly adapt to the writing habits of different hospitals or doctors. Medical records need to combine medical guidelines, patient history, and real-time clinical data, but current technologies have limited ability to integrate dynamic medical knowledge, easily leading to inaccurate content or a lack of up-to-date medical evidence.
[0005] (2) Insufficient contextual consistency in generated medical records
[0006] Existing automated medical record generation systems often only process text generated from a single visit, lacking a long-term understanding of the patient's disease progression. This manifests in several ways: inability to fully utilize the patient's historical medical record data, leading to inconsistencies in past visits; inability to automatically analyze disease progression trends, requiring doctors to manually supplement medical history, increasing their workload; and a standardized format for electronic medical records, failing to adapt to doctors' personalized writing habits, resulting in decreased usage.
[0007] (3) Insufficient medical rationality and clinical reasoning ability of electronic medical records
[0008] Traditional electronic medical record (EMR) generation systems typically lack medical reasoning capabilities, relying solely on rule-based filling. This can easily lead to errors in diagnostic logic, such as missing key symptom descriptions, affecting the completeness of the diagnosis. Low matching rates between diagnoses and treatment plans can result in incorrect medical record recommendations, impacting physician decision-making. Existing EMR systems cannot automatically check the medical rationality of medical record content, requiring physicians to repeatedly proofread, increasing their workload.
[0009] (4) Insufficient interactive experience and low utilization rate of doctor feedback.
[0010] Existing electronic medical record systems typically generate records in a one-way manner; doctors' modifications are not fed back into the system, preventing continuous optimization of record quality. The systems lack adaptability and cannot learn from doctors' editing habits, meaning that each generated record may still have the same problems, failing to provide truly intelligent support. Summary of the Invention
[0011] The technical problem this application aims to solve is how to optimize the intelligent generation of electronic medical records by combining large-scale pre-trained language models (LLM) with reinforcement learning and medical knowledge enhancement techniques.
[0012] To address the aforementioned technical problems, this application provides a method for generating intelligent electronic medical records based on reinforcement learning optimization, comprising:
[0013] S1 collects patient medical records and preprocesses them to obtain structured data;
[0014] S2 enhances medical record content based on dynamic medical knowledge;
[0015] S3 identifies time-series changes in medical record content. If time-series changes exist, it establishes a prediction of disease trend based on the time-series changes in medical record content and supplements disease trend suggestions.
[0016] S4 generates electronic medical records.
[0017] Preferably, the collected patient medical record content includes the patient's historical medical record information and the knowledge representation of the hospital's electronic medical record database, and the collected patient medical record content is converted into structured data through natural language processing or large text processing models.
[0018] Preferably, step S2 includes:
[0019] Based on the patient's historical medical record information, the latest medical literature, external knowledge from medical guidelines, and knowledge representations from the hospital's electronic medical record database, the three types of content are fused through an adaptive knowledge fusion network model. The fusion result is adjusted by knowledge fusion weights λ1, λ2, and λ3 to obtain the fused medical record content.
[0020] The fused medical record content K final =λ1K local +λ2K global +λ3K historical ;
[0021] in,
[0022] K local Knowledge representation of hospital electronic medical record databases;
[0023] K global The latest medical literature, medical guidelines, and external knowledge;
[0024] K historical Patient's medical history;
[0025] The knowledge fusion weights λ1, λ2, and λ3 satisfy λ1 + λ2 + λ3 = 1.
[0026] Furthermore, step S2 also includes:
[0027] The system employs structured knowledge graph reasoning to enhance medical record content; it establishes relationships between medical concepts through a medical knowledge graph, including relationships between drug, diagnosis, and efficacy concepts; it queries drug efficacy within the medical knowledge graph; it matches diagnostic needs; it confirms efficacy and performs cross-matching to supplement medical record content.
[0028] Preferably, step S3 includes:
[0029] By integrating patients' longitudinal medical data and inputting it into a time-series disease progression model, a disease trend prediction based on time-series analysis is constructed, and the prediction results are fused to obtain the final disease prediction state P. updated ;
[0030] P updated =β1P current +β2P historical +β3P trend
[0031] in,
[0032] P updated Final disease prediction status;
[0033] P current Current disease status;
[0034] P historical Disease status in historical medical records;
[0035] P trend Disease trend prediction based on time series analysis;
[0036] β1, β2, β3: weighting coefficients, satisfying β1+β2+β3=1.
[0037] Furthermore, the time series disease progression model is set as a time series prediction model fine-tuned by the disease progression dataset.
[0038] Preferably, step S4 includes:
[0039] S41 generates preliminary electronic medical records and optimizes and adjusts the medical records based on strategies.
[0040] S42 calculates the diagnosis and treatment matching degree of medical records based on clinical reasoning regularization. If the diagnosis and treatment matching degree is less than a preset threshold, the doctor is prompted to make corrections.
[0041] S43 generates the final medical record.
[0042] Furthermore, the strategy-based optimization and adjustment of medical records described in step S41 includes:
[0043] Based on the near-end policy optimization algorithm, design the objective function J. GRPO for:
[0044]
[0045] in,
[0046] E[] represents the mathematical expectation;
[0047] o i Output candidate electronic medical record texts;
[0048] G represents the number of candidate electronic medical record text outputs;
[0049] A i This is the advantage estimate (a measure of the quality of the text output);
[0050] ∈ represents the pruning range to prevent instability caused by excessively large policy updates;
[0051] Clip(,,) is the clipping function in the near-end policy optimization algorithm;
[0052] D KL For strategy π θ And the old strategy π θold The KL divergence between them is used to prevent the model from deviating too much from the doctor's style;
[0053] β is the weight of the KL regularization term, which controls the update magnitude;
[0054] Based on the objective function, a proximal strategy optimization algorithm is executed to steadily improve the quality of medical record generation.
[0055] Step S42 includes: measuring the logical rigor of electronic medical records through diagnosis-treatment matching degree calculation, where the diagnosis-treatment matching degree S... match The calculation formula is:
[0056]
[0057] in,
[0058] D i For diagnostic item i;
[0059] T i For the corresponding treatment plan i;
[0060] ω i Assign a weight to the importance of the diagnosis;
[0061] n represents the number of diagnostic items;
[0062] δ(D i ,T iLet D be the matching function. i and T i If the logical match is found, the value is 1; otherwise, the value is 0.
[0063] When S match If the value is below a preset threshold, a logical problem is considered to exist, prompting the doctor to review and revise the medical records, thereby improving the medical rationality of the medical records.
[0064] This application also provides an electronic device, including: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement the aforementioned intelligent electronic medical record generation method based on reinforcement learning optimization.
[0065] This application also provides a computer-readable storage medium for storing a computer program that, when executed, implements the aforementioned intelligent electronic medical record generation method based on reinforcement learning optimization.
[0066] The electronic medical record generation method provided in this application sequentially collects patient medical record content, preprocesses to obtain structured data, enhances medical record content based on dynamic medical knowledge, and supplements disease trend suggestions to obtain electronic medical records, thereby intelligently improving electronic medical records and enhancing the logical consistency, clinical rationality, and professionalism of medical records. Attached Figure Description
[0067] Figure 1 A schematic diagram illustrating the steps of an intelligent electronic medical record generation method based on reinforcement learning optimization provided in an embodiment of this application;
[0068] Figure 2 This is a schematic diagram illustrating the steps for collecting patient medical records according to an embodiment of this application;
[0069] Figure 3 A schematic diagram illustrating the knowledge fusion-derived fused medical record content provided in an embodiment of this application;
[0070] Figure 4 This is a schematic diagram illustrating the steps for generating an electronic medical record according to an embodiment of this application. Detailed Implementation
[0071] To make this application more apparent and understandable, various exemplary embodiments will be described below. These examples are non-limiting and should be understood as illustrating aspects of the broader application of the apparatus, system, and method. These embodiments can be varied and substituted with equivalents without departing from the spirit and scope of this application. Furthermore, various variations can be made to adapt to specific circumstances, materials, material compositions, processing types, processing actions, or steps to suit the purpose, content, or scope of this application. All such variations will be within the protection scope of this application.
[0072] Any materials, dimensions, or quantities described in the overview or detailed description are merely examples and are not intended to limit the subject matter of this application. Furthermore, the various implementations of the embodiments described herein are complementary rather than purely alternating, unless otherwise stated. In other words, implementations from one embodiment can be freely combined with implementations from other embodiments, as will readily be apparent to those skilled in the art, unless these implementations are stated to be used only as substitutions.
[0073] In the description of this application, it should be noted that the terms "inner" and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product is in use. They are used only for the convenience of describing this application and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. Furthermore, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0074] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "setup" and "connection" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0075] Example 1
[0076] This application provides an intelligent electronic medical record generation method based on reinforcement learning optimization, which assists doctors in generating electronic medical records, reduces the burden of medical record writing for doctors, and improves the intelligence level of electronic medical record document generation, ensuring the integrity, accuracy and personalized expression of medical records.
[0077] For details, see Figure 1 The methods include:
[0078] S1 collects patient medical records and preprocesses them to obtain structured data;
[0079] Collect patient medical record content, including the patient's historical medical record information and knowledge representations from the hospital's electronic medical record database. For example, the patient's historical medical record information includes, but is not limited to, structured (basic patient information, examination data), semi-structured (tables, indicators), and unstructured (free text descriptions by medical staff) data from various medical databases such as electronic medical record systems, clinical data centers, and hospital information management systems. This data needs to be uniformly processed into structured data for subsequent steps. Existing tools such as natural language processing or large-scale text processing models (e.g., BERT, GPT, DeepSeek) can be used to extract structured information from unstructured data and generate structured data according to a unified data format.
[0080] For example, structured data formats can be CSV, JSON, or XML; taking JSON as an example, the structured data format for patient name and age information is as follows:
[0081]
[0082] The structured data format of some patient examination reports is as follows:
[0083]
[0084]
[0085]
[0086] In a further implementation, see Figure 2 The collection of patient medical records also specifically includes:
[0087] S11 collects patient data;
[0088] S12 Doctor enters chief complaint information;
[0089] S13 calls the hospital's HIS system to obtain the patient's medical records, laboratory test results, and other information during this hospitalization, as well as the patient's historical medical records.
[0090] S14 allows you to access external medical information (medical guidelines, latest research, etc.);
[0091] S15 parses the text input and converts it into structured data.
[0092] S2 enhances medical record content based on dynamic medical knowledge.
[0093] In step S2, it is first determined whether dynamic knowledge enhancement is needed. For the originally collected patient medical records, there may be anomalies such as missing information, inconsistent symptom descriptions, discrepancies between medication and diagnosis, contradictory content, improper timeline arrangement, and abnormal detection values. For such anomalies, a dynamic medical knowledge enhancement mechanism can be used to improve the medical record content. This mechanism employs an Adaptive Knowledge Fusion Network (AKFN) to enhance the medical record content. AKFN is a deep learning model used in the healthcare field that can dynamically integrate and update medical knowledge to improve the accuracy and timeliness of diagnoses and treatment recommendations.
[0094] The dynamic medical knowledge enhancement mechanism is used to enhance medical record content, performing the following: real-time content supplementation, identification and filling of information gaps in medical records, dynamic updating of medical history records based on the patient's latest examination results, adjustment of relevant symptom descriptions according to changes in diagnosis, context-aware correction, detection and correction of contradictory content in medical records, automatic adjustment of event sequence based on timeline, identification and annotation of abnormal detection values, knowledge-guided structuring, implementation of standardized medical terminology, and establishment of correlations between symptoms, diagnosis, and treatment.
[0095] Then, during the electronic medical record generation process, the adaptive knowledge fusion network model dynamically adjusts the professionalism of the generated medical record content by referencing the latest medical knowledge, such as medical guidelines and clinical case databases. Specifically, this includes:
[0096] Based on three categories of content—patient's historical medical records, external knowledge such as the latest medical literature and guidelines, and knowledge representation from the hospital's electronic medical record database—an adaptive knowledge fusion network model is used to fuse these three categories of content. (See [link to relevant documentation]). Figure 3 By adjusting the fusion results using knowledge fusion weights λ1, λ2, and λ3, the fused medical record content is obtained. The content fusion formula is:
[0097] K final =λ1K local +λ2K global +λ3K historical
[0098] in,
[0099] K local Knowledge representation of hospital electronic medical record databases;
[0100] K global External knowledge such as the latest medical literature and medical guidelines;
[0101] K historical Patient's medical history;
[0102] The knowledge fusion weights λ1, λ2, and λ3 satisfy λ1 + λ2 + λ3 = 1.
[0103] Adaptive knowledge fusion networks, as deep learning models used in the healthcare field, take three types of input: patients' historical medical records, external knowledge such as the latest medical literature and guidelines, and knowledge representations from hospital electronic medical record databases. The characteristic of adaptive knowledge fusion networks lies in their ability to adaptively adjust the contribution weights of different knowledge sources based on the characteristics of the input information, fusing information from multiple sources to obtain fused medical record content. This ensures that the fused medical record content is not only based on doctor input but also dynamically combines local hospital knowledge, external medical updates, and individualized patient data, thereby improving the professionalism and consistency of the generated content. Furthermore, by adjusting the knowledge fusion weights, the proportion of information sources can be controlled. Understandably, when it is not necessary to introduce external knowledge such as the latest medical literature and guidelines, λ² = 0 can be directly constrained, in which case the fused medical record content is limited to knowledge representations from the hospital's electronic medical record database and the patient's historical medical record information.
[0104] In a further implementation, enhancing medical record content based on dynamic medical knowledge also includes using structured knowledge graph reasoning (MKG) to enhance medical record content; by establishing relationships between medical concepts through medical knowledge graphs, the content of medical records is enhanced, assisting doctors in making accurate decisions;
[0105] Relationships between medical concepts such as drugs, diagnoses, and drug efficacy are established based on medical knowledge graphs. For example, the medical knowledge graph KG is shown in the table below.
[0106]
[0107] In a medical knowledge graph, the query for searching drug efficacy is:
[0108] R med (D,M)={E|(M,"possess",E)∈KG}
[0109] Input: Given that drug M = "Aspirin"
[0110] Knowledge graph query: Aspirin's pharmacological effects (E) → antiplatelet aggregation, anti-inflammation, analgesia;
[0111] To match diagnostic needs, the query is:
[0112] R dig (D) = {E|(D,"Need",E)∈KG}
[0113] Input: Known diagnosis D = "Coronary heart disease"
[0114] Knowledge graph query: Coronary artery disease → Requires antiplatelet aggregation
[0115] To confirm efficacy, the matching formula is:
[0116] E final =R med (D,M)∩R dig (D)
[0117] Cross-match: Aspirin's effects ∩ the effects required for coronary heart disease → antiplatelet aggregation. Supplementary medical record content: "Aspirin was given to inhibit platelet aggregation."
[0118] This application provides an embodiment that enhances medical record content using structured knowledge graph reasoning (MKG). By searching and matching relationships between medical concepts through the medical knowledge graph, it supplements and enhances missing or related parts of the medical record content, assisting doctors in making accurate decisions. It is understood that medical knowledge graphs fall within the scope of existing technology, and their establishment, maintenance, and updating rely on medical norms, such as various medical standards: ICD (International Classification of Diseases): disease classification codes published by the World Health Organization, such as ICD-10 / ICD-11; SNOMED CT (Systematic Medical Terminology): standardized terminology covering diseases, symptoms, anatomical structures, etc.; LOINC (Logical Naming and Coding System for Observational Indicators): used for standardization of laboratory test items; MeSH (Medical Subject Headings): used for literature retrieval and biomedical concept classification; and clinical guidelines published by various authoritative institutions such as NCCN, WHO, and the Chinese Medical Association.
[0119] S3 identifies time-series changes in medical record content. If time-series changes exist, it establishes a prediction of disease trend based on the time-series changes in medical record content and supplements disease trend suggestions.
[0120] Typically, a patient's condition is time-dependent; therefore, the generation of electronic medical records should consider the historical evolution of the condition. The trend of the condition can be assessed by calculating the time decay weight. In a further embodiment, this application uses a time series disease progression model (based on a time series prediction model, such as the N-BEATS model, DeepAR model, Spacetimeformer model, Temporal Fusion Transformer or TFT model, TSFormer model, to predict the disease progression) to supplement the content of the trend of the condition.
[0121] The time-series disease progression model integrates patients' longitudinal medical data (such as laboratory tests, imaging reports, medication records, and other disease indicator data), inputs this data into a time-series prediction model, constructs a time-dependent disease progression model, and fuses the results to obtain the final predicted disease state, as shown in the following formula:
[0122] P updated =β1P current +β2P historical +β3P trend
[0123] in,
[0124] P updated Final disease prediction status;
[0125] P current Current disease status;
[0126] P historical Disease status in historical medical records;
[0127] P trend Disease trend prediction based on time series analysis;
[0128] β1, β2, β3: weighting coefficients, satisfying β1+β2+β3=1.
[0129] As a deep learning model that makes predictions based on time series data, the time series prediction model can effectively predict future changes in a patient's condition by inputting the disease status from historical medical records and the current disease status, and intelligently supplement disease trend suggestions, thereby improving the comprehensiveness of diagnosis and treatment.
[0130] For example, consider the case of a male patient with type 2 diabetes (diagnosed 8 years ago) and hypertension (diagnosed 5 years ago), whose medication history includes metformin and irbesartan;
[0131] Patient history indicators (reflecting the disease state in the patient's medical history, P) historical )for:
[0132]
[0133] Patient's current indicators (reflecting current disease state, P) current )for:
[0134]
[0135]
[0136] The patient's disease status (P) in their medical history historical ) and the patient's current disease status (P current The input is a time series prediction model, and the output is a disease trend prediction based on time series analysis (P). trend ):
[0137]
[0138] Finally, the disease status (P) in the patient's medical history is integrated. historical Information, patient's current disease status (P) current Information and disease trend prediction (P) trend The information yields the final predicted disease status (P). updated ).
[0139] In a further implementation, the time series disease progression model is a deep learning model fine-tuned based on the existing time series prediction model. The time series prediction model is fine-tuned using a disease progression dataset, which includes historical medical records collected and actual disease trends. The disease trends are manually verified by medical experts to ensure the accuracy of the dataset.
[0140] The fine-tuning method can be LoRA, or it can be a combination of incremental learning + reinforcement fine-tuning and supervised fine-tuning (IL+RLFT, SFT) to fine-tune the time series prediction model using the disease course evolution dataset. The fine-tuned time series prediction model is the time series disease course evolution model used in this embodiment, and the prediction results are more reasonable and more in line with the medical scenario.
[0141] S4 generates electronic medical records. By enhancing and supplementing the medical record content through the aforementioned steps, electronic medical records can be generated according to a preset format.
[0142] The electronic medical record generation method provided in this application sequentially collects patient medical record content, preprocesses it to obtain structured data, enhances the medical record content based on dynamic medical knowledge, and supplements it with disease trend suggestions to obtain an electronic medical record, thereby intelligently improving the electronic medical record. Specifically, it achieves multi-source medical data fusion, utilizing a dynamic medical knowledge enhancement mechanism to integrate the hospital's local medical record database, the latest medical guidelines, and patient historical data, improving the medical professionalism of the generated medical record; it employs time-series disease modeling, using time decay weights and trend prediction mechanisms to ensure that the generated medical record conforms to the patient's disease progression, improving the logical consistency and clinical rationality of the preceding and following medical records.
[0143] Example 2
[0144] Based on Example 1, see Figure 4 Step S4 also includes:
[0145] S41 generates preliminary electronic medical records and optimizes and adjusts the medical records based on strategies.
[0146] To further improve the quality of electronic medical records, this application embodiment adjusts the medical records based on the initial electronic medical records through strategy optimization, specifically referring to adjusting the medical records based on the proximal strategy optimization algorithm.
[0147] Based on the near-end policy optimization algorithm, the objective function is designed as follows:
[0148]
[0149] in,
[0150] E[] represents the mathematical expectation;
[0151] o i Output candidate electronic medical record texts;
[0152] G represents the number of candidate electronic medical record text outputs;
[0153] A i This is the advantage estimate (a measure of the quality of the text output);
[0154] ∈ represents the pruning range to prevent instability caused by excessively large policy updates;
[0155] Clip(,,) is the clipping function in the near-end policy optimization algorithm;
[0156] D KL For strategy π θ And the old strategy π θold The KL divergence between them is used to prevent the model from deviating too much from the doctor's style;
[0157] β is the weight of the KL regularization term, which controls the update magnitude.
[0158] Based on this objective function, a proximal strategy optimization algorithm is executed to steadily improve the quality of medical record generation while avoiding style drift caused by excessively rapid updates.
[0159] S42 calculates the diagnosis and treatment matching degree of medical records based on clinical reasoning regularization. If the diagnosis and treatment matching degree is less than a preset threshold, the doctor is prompted to make corrections.
[0160] Step S42 is mainly used to determine the logical rigor of electronic medical records. Logical rigor is crucial for electronic medical records. This embodiment introduces clinical reasoning regularization (MIR) to ensure the consistency of symptoms, diagnosis, and treatment plans.
[0161] Specifically, clinical reasoning regularization measures the logical rigor of electronic medical records through diagnosis-treatment matching degree calculation, where the diagnosis-treatment matching degree S... match The calculation is shown in the following formula:
[0162]
[0163] in,
[0164] D i For diagnostic item i;
[0165] T i For the corresponding treatment plan i;
[0166] ω i Assign a weight to the importance of the diagnosis;
[0167] n represents the number of diagnostic items;
[0168] δ(D i ,T i Let D be the matching function. i and T i If the logical match is found, the value is 1; otherwise, the value is 0.
[0169] When S match If the value is below a preset threshold, a logical problem is considered to exist. In this case, the doctor should be prompted to review and revise the medical records to improve their medical rationality.
[0170] S43 generates the final medical record after the above steps.
[0171] In a further implementation, in step S42, by collecting before-and-after comparisons of doctors' revised content and utilizing doctors' feedback, the medical record generation model is continuously adjusted to gradually adapt to doctors' personal writing styles, thereby improving readability and doctor satisfaction.
[0172] It is understood that the medical record generation methods provided in the embodiments of this application rely on computer programs to allocate or instruct corresponding hardware such as storage devices and processors to complete all or part of the process. After reading and understanding all or part of the process of the medical record generation methods provided in the embodiments of this application, those skilled in the art can easily implement them by computer programs. There are no technical obstacles and no creative effort is required for those skilled in the art.
[0173] Example 3
[0174] In another embodiment, this application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, it implements the medical record generation method provided in this application.
[0175] This application also provides an electronic device, specifically including: a processor and a memory, wherein the memory is used to store a computer program, the computer program being loaded and executed by the processor to implement a medical record generation method.
[0176] The above description is merely a preferred embodiment of this application and does not constitute any limitation on this application in any form or substance. It should be noted that those skilled in the art can make several improvements and additions without departing from this application, and these improvements and additions should also be considered within the scope of protection of this application. Any modifications, alterations, and equivalent variations made by those skilled in the art based on the disclosed technical content without departing from the content and scope of this application are equivalent embodiments of this application. Furthermore, any equivalent changes, alterations, and variations made to the above embodiments based on the essential technology of this application still fall within the scope of the technical solution of this application.
Claims
1. An intelligent electronic medical record generation method based on reinforcement learning optimization, for generating an electronic medical record, characterized in that, include: S1 collects patient medical records and preprocesses them to obtain structured data; S2 enhances medical record content based on dynamic medical knowledge; S3 identifies time-series changes in medical record content. If time-series changes exist, it establishes a prediction of disease trend based on the time-series changes in medical record content and supplements disease trend suggestions. S4 generates electronic medical records. 2.The method of claim 1, wherein, The collected patient medical records include the patient's historical medical records and knowledge representations from the hospital's electronic medical record database. The collected patient medical records are then converted into structured data using natural language processing or large text processing models. 3.The method of claim 1, wherein, Step S2 includes: Based on the patient's historical medical record information, the latest medical literature, external knowledge from medical guidelines, and knowledge representations from the hospital's electronic medical record database, the three types of content are fused through an adaptive knowledge fusion network model. The fusion result is adjusted by knowledge fusion weights λ1, λ2, and λ3 to obtain the fused medical record content. The fused medical record content K final =λ1K local +λ2K global +λ3K historical ; in, K local Knowledge representation of hospital electronic medical record databases; K global : up-to-date medical literature, medical guidelines external knowledge; K historical : patient's historical medical record information; The knowledge fusion weights λ1, λ2, and λ3 satisfy λ1 + λ2 + λ3 = 1.
4. The intelligent electronic medical record generation method based on reinforcement learning optimization according to claim 3, characterized in that, Step S2 also includes: The system employs structured knowledge graph reasoning to enhance medical record content; it establishes relationships between medical concepts through a medical knowledge graph, including relationships between drug, diagnosis, and efficacy concepts; it queries drug efficacy within the medical knowledge graph; it matches diagnostic needs; it confirms efficacy and performs cross-matching to supplement medical record content.
5. The method of claim 1, wherein the method is based on reinforcement learning optimization. Step S3 includes: By integrating the longitudinal medical data of the patient, inputting the time series disease evolution model, constructing the disease trend prediction of time series analysis, and fusing the prediction results to obtain the final disease prediction state P updated ; P updated = β1P current + β2P historical + β3P trend in, P updated : final disease prediction state; P current : current disease state; P historical : disease state in historical medical records; P trend Disease trend prediction based on time series analysis; β1, β2, β3: weighting coefficients, satisfying β1+β2+β3=1.
6. The intelligent electronic medical record generation method based on reinforcement learning optimization according to claim 5, wherein, The time series disease progression model is set as a time series prediction model fine-tuned with a disease progression dataset.
7. The method of claim 1, wherein the method is based on reinforcement learning optimization. Step S4 includes: S41 generates preliminary electronic medical records and optimizes and adjusts the medical records based on strategies. S42 calculates the diagnosis and treatment matching degree of medical records based on clinical reasoning regularization. If the diagnosis and treatment matching degree is less than a preset threshold, the doctor is prompted to make corrections. S43 generates the final medical record. 8.The method of claim 7, wherein, The strategy-based optimization and adjustment of medical records mentioned in step S41 includes: Based on the proximal policy optimization algorithm, the objective function J is designed GRPO is: in, E[] represents the mathematical expectation; o i candidate electronic medical record text output; G represents the number of candidate electronic medical record text outputs; A i For the advantage estimate value (measure the pros and cons of the text output); ∈ represents the pruning range to prevent instability caused by excessively large policy updates; Clip(,,) is the clipping function in the near-end policy optimization algorithm; D KL For the KL divergence between the policy π θ and the old policy π θold to prevent the model from deviating too much from the doctor's style; β is the weight of the KL regularization term, which controls the update magnitude; Based on the objective function, a proximal strategy optimization algorithm is executed to steadily improve the quality of medical record generation. Step S42 includes: measuring the logical rigor of electronic medical records through diagnosis-treatment matching degree calculation, where the diagnosis-treatment matching degree S... match The calculation formula is: in, D i For diagnosis item i; T i for the corresponding treatment regimen i; ω i is the importance weight for this diagnosis; n represents the number of diagnostic items; δ(D i ,T i Let D be the matching function. i and T i If the logical match is found, the value is 1; otherwise, the value is 0. When S match If the value is below a preset threshold, a logical problem is considered to exist, prompting the doctor to review and revise the medical records, thereby improving the medical rationality of the medical records.
9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program to implement the intelligent electronic medical record generation method based on reinforcement learning optimization as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed, implements the intelligent electronic medical record generation method based on reinforcement learning optimization as described in any one of claims 8.
