Special medical record automatic generation method and device based on artificial intelligence large language model, terminal equipment and storage medium

By using an AI-based large language model, structured medical records that conform to specialist standards are automatically generated, solving the problems of low efficiency and poor quality in existing medical record generation technologies, and achieving efficient and accurate medical record generation.

CN121964029APending Publication Date: 2026-05-01SHENZHEN COORDINATE SOFTWARE GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN COORDINATE SOFTWARE GRP CO LTD
Filing Date
2025-12-31
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing AI-generated electronic medical record systems often produce texts that are colloquial, lack information, or do not conform to specialist standards. This forces doctors to spend a lot of time on secondary processing, failing to effectively improve the efficiency and professional quality of medical record writing.

Method used

Using an AI-based large language model, the system acquires audio recordings of doctor-patient consultations, matches them with specialty and disease templates, performs natural language processing to extract key medical entities, and combines this with the patient's past information to automatically generate structured medical records that conform to specialty standards.

Benefits of technology

Generating high-quality, structured draft medical records significantly improves the efficiency and accuracy of medical record generation, reduces the burden of revisions on doctors, and ensures the standardization and professionalism of medical records.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121964029A_ABST
    Figure CN121964029A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of artificial intelligence and medical health application, and provides an artificial intelligence large language model-based specialized medical record automatic generation method and device, terminal equipment and a storage medium, and the method comprises the steps of obtaining an original audio of doctor-patient inquiry; matching a corresponding first preset template according to the original audio; wherein the first preset template is used for representing a specialized standardized medical record writing specification and a structural framework; and generating a first medical record corresponding to the original audio according to the first preset template and the original audio. According to the method, the generation quality and the generation efficiency of the medical record can be improved, high-quality data support is provided for subsequent clinical research, quality control, diagnosis and treatment scheme recommendation and the like, and the depth and the breadth of medical services are expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence and medical health application technology, and in particular relates to a method, device, terminal equipment and storage medium for automatic generation of specialist medical records based on artificial intelligence large language model. Background Technology

[0002] Medical record writing, as a core task of clinicians, is not only a legal record of the diagnosis and treatment process, but also an important data source for clinical research, teaching and quality control. It has extremely high requirements for the completeness, accuracy and standardization of the content, but has long occupied a lot of doctors' time and energy.

[0003] In existing technologies, artificial intelligence (AI) electronic medical record systems mostly rely on speech transcription and information extraction technologies to assist in the generation of medical records. However, such systems have obvious defects. The generated text often has problems such as colloquial language, missing information, or not conforming to a certain specialty standard. This forces doctors to still spend a lot of energy on "secondary processing," failing to fundamentally improve the efficiency of medical record writing and making it difficult to guarantee the professional quality of medical records. Summary of the Invention

[0004] This application provides a method, apparatus, terminal device, and storage medium for automatically generating specialist medical records based on an artificial intelligence large language model, which can improve the quality and efficiency of medical record generation.

[0005] In a first aspect, embodiments of this application provide a method for automatically generating specialist medical records based on an artificial intelligence large language model, including: Obtain the original audio of doctor-patient consultations; The original audio is matched with its corresponding first preset template; wherein, the first preset template is used to represent a standardized medical record writing specification and structural framework for a specialty. The first medical record corresponding to the original audio is generated based on the first preset template and the original audio.

[0006] In this embodiment, the original audio of the doctor-patient consultation process is first acquired through a data acquisition device, fully recording key diagnostic and treatment information such as the patient's condition description and the doctor's inquiries. Next, the audio data is processed to extract core disease features, which are then matched with a standardized medical record template (i.e., the first preset template) corresponding to a specific specialty from a preset template library. This template clarifies the fixed writing standards and structural framework of specialty medical records, providing a mandatory framework for medical record generation. Finally, using the first preset template as a constraint, and combining the key medical information extracted from the original audio, AI technology is used to complete logical filling and language organization, generating a standardized first medical record that precisely corresponds to the audio consultation content, thus achieving intelligent transformation from consultation audio to a standardized medical record. This method relies on a standardized, pre-set template for a specific specialty to strictly constrain the structural framework and writing standards of medical records. It uses AI technology to accurately extract key medical information from audio and constructs a "mandatory generation framework" through a pre-set, specialized, and disease-specific structured template. This completely reconstructs the model's generation logic, preventing the model from engaging in boundless free creation. Instead, it operates within the clearly defined field specifications, terminology requirements, and structural boundaries of the template. The rigid constraints of the template prevent the model from deviating from the norms (such as fabricating symptoms or omitting required fields), while the anchoring of factual data avoids "illusions" caused by excessive semantic association. Ultimately, this method achieves structured medical record generation that conforms to both specialty standards and the actual situation of patients. It avoids common issues in AI medical record generation, such as colloquial expressions, structural confusion, or missing information, reducing AI "illusions" and human errors, and improving the quality and efficiency of medical record generation.

[0007] In one possible implementation of the first aspect, matching the original audio with its corresponding first preset template includes: The original audio is transcribed into text to obtain the transcribed text; Convert transcribed text into structured text with a preset structure; Match the structured text to its corresponding first preset template.

[0008] In this embodiment, by converting the original audio to text, then converting the text into structured text with a preset structure, and finally matching it with the corresponding first preset template, a framework that conforms to the specialty standards can be quickly locked for subsequent medical record generation. This effectively avoids the problem of non-standard medical records caused by template mismatch, while reducing the time cost of manual template screening, and laying the foundation for improving the efficiency and professionalism of medical record generation.

[0009] In one possible implementation of the first aspect, matching the structured text with its corresponding first preset template includes: Extract the chief complaint keywords from the structured text; these keywords are used to characterize the patient's key disease features. The first preset template is obtained by matching the preset template corresponding to the main complaint keyword from the preset template library.

[0010] In this embodiment, by extracting the chief complaint keywords that represent the key characteristics of the patient's condition from the structured text, and then matching the corresponding preset template from the preset template library to obtain the first preset template, the specialist medical record framework that fits the patient's condition can be quickly locked, effectively avoiding the problem of non-standard medical records caused by template mismatch, while reducing the time cost of manual template screening, laying the foundation for the subsequent generation of standardized medical records, and improving the efficiency and professionalism of medical record generation.

[0011] In one possible implementation of the first aspect, generating a first medical record corresponding to the original audio based on a first preset template and the original audio includes: Entity recognition is performed on the structured text corresponding to the original audio to obtain multiple first entities; among them, the first entities are information units with medical attributes; The first medical record is generated based on the first preset template and multiple first entities.

[0012] In this embodiment of the application, by performing entity recognition on the structured text corresponding to the original audio to obtain multiple first entities with medical attributes, and then combining them with a first preset template to generate a first medical record, it is possible to ensure that the generated medical record accurately integrates key medical information from the consultation and strictly conforms to the specialty standards, effectively avoids information omissions and unprofessional expressions, significantly reduces the burden of doctors to make modifications, and improves the accuracy and efficiency of medical record generation.

[0013] In one possible implementation of the first aspect, generating a first medical record based on a first preset template and multiple first entities includes: The multiple fields contained in the first preset template are mapped one-to-one with the multiple first entities; multiple mapping pairs are obtained; wherein, a mapping pair contains a field and the first entity corresponding to the field; Iterate through all mapping pairs and replace the content corresponding to the field in each mapping pair with the first entity corresponding to the field. The first medical record is obtained based on the first preset template after the entity replacement.

[0014] In this embodiment of the application, by mapping multiple fields of the first preset template to the first entity of multiple medical attributes one by one to form mapping pairs, and then traversing the mapping pairs to replace the field content and generating the first medical record based on the replaced template, it is possible to ensure that the medical record strictly conforms to the specialty template framework, accurately integrates key medical information, effectively avoids information misalignment and omission, significantly improves the standardization, accuracy and efficiency of medical record generation, and greatly reduces the burden of subsequent modifications for doctors.

[0015] In one possible implementation of the first aspect, obtaining the first medical record based on the first preset template after entity replacement includes: Collect basic health data from patients; this includes patients' past medical history, allergy history, and family history. The first medical record is obtained by filling in the content of the first preset template after the entity replacement is completed based on the basic health data.

[0016] In this embodiment, by collecting basic health data of the patient, including past medical history, allergy history and family history, and using this data to fill in the content of a first preset template that has been replaced with physical data, a first medical record is obtained. This enriches the background information of the medical record, ensures the integrity of the medical record, makes the generated medical record more relevant to the individual health condition of the patient, complies with medical document standards, reduces the workload of doctors in supplementing and improving the medical record, and improves the reference value of diagnosis and treatment and the efficiency of medical record generation.

[0017] In one possible implementation of the first aspect, the method further includes: The first medical record will be sent to the electronic medical record terminal interface so that the doctor can confirm or modify it.

[0018] In this embodiment, the generated first medical record is sent to the electronic medical record terminal interface for doctors to confirm or modify. Through the closed loop of "AI automatic generation + professional doctor review", the final accuracy and compliance of the medical record can be guaranteed, while only minor adjustments are required from the doctor, avoiding a large amount of rewriting work, optimizing the human-computer interaction experience, and further improving the efficiency and practicality of the entire medical record generation process.

[0019] Secondly, embodiments of this application provide a constraint-based medical record generation apparatus, comprising: The data acquisition module is used to acquire the original audio of doctor-patient consultations; The template matching module is used to match the original audio with its corresponding first preset template; wherein, the first preset template is used to represent a standardized medical record writing specification and structural framework for a specialty. The medical record generation module is used to generate the first medical record corresponding to the original audio based on the first preset template and the original audio.

[0020] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the constraint-based medical record generation method for automatically generating specialist medical records based on an artificial intelligence large language model, as described in any of the first aspects above.

[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for automatically generating specialist medical records based on an artificial intelligence large language model as described in any of the first aspects above.

[0022] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the specialist medical record automatic generation method based on an artificial intelligence large language model as described in any of the first aspects above.

[0023] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart illustrating the method for automatically generating specialist medical records based on an artificial intelligence large language model provided in this application embodiment; Figure 2 This is a flowchart illustrating the matching template provided in the embodiments of this application. Figure 1 ; Figure 3 This is a flowchart illustrating the matching template provided in the embodiments of this application. Figure 2 ; Figure 4 This is a schematic diagram of the process for generating the first medical record provided in the embodiments of this application. Figure 1 ; Figure 5 This is a schematic diagram of the process for generating the first medical record provided in the embodiments of this application. Figure 2 ; Figure 6 This is a schematic diagram of the process for generating the first medical record provided in the embodiments of this application. Figure 3 ; Figure 7 This is a schematic diagram of the overall structure of the method for automatically generating specialist medical records based on an artificial intelligence large language model provided in the embodiments of this application; Figure 8 This is a structural block diagram of the constraint-based medical record generation device provided in the embodiments of this application; Figure 9 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. Detailed Implementation

[0026] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0027] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0028] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0029] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0030] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0031] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.

[0032] Medical record writing, as a core task of clinicians, is not only a legal record of the diagnosis and treatment process, but also an important data source for clinical research, teaching and quality control. It has extremely high requirements for the completeness, accuracy and standardization of the content, but has long occupied a lot of doctors' time and energy.

[0033] In existing technologies, AI electronic medical record systems mostly rely on speech transcription and information extraction technologies to assist in the generation of medical records. However, such systems have obvious defects. The generated text often has problems such as colloquial language, missing information, or not conforming to a certain specialty standard. This forces doctors to still spend a lot of energy on "secondary processing," failing to fundamentally improve the efficiency of medical record writing and making it difficult to guarantee the professional quality of medical records.

[0034] To address the aforementioned technical issues, this application provides a method for automatically generating specialized medical records based on an artificial intelligence large language model. This method involves collecting doctor-patient dialogues through speech recognition, matching specialized disease templates, extracting key medical entities through Natural Language Processing (NLP), and retrieving patients' past static information. This drives a large language model, finely tuned from a massive medical corpus, to fill in the content within the template's forced framework, automatically generating highly standardized, structured, accurate, and complete draft medical records. This significantly improves doctors' work efficiency and ensures medical safety, and can be widely applied in hospital information systems, internet hospitals, and other healthcare-related fields.

[0035] The core function of the large language model in this application is to integrate key medical information (such as symptoms, duration, and signs) extracted from the audio-to-text transcripts of doctor-patient consultations by the NLP module with the patient's historical medical record data (such as past medical history and allergy history) under the strong constraints of a specialist medical record template. Through professional semantic understanding capabilities provided by fine-tuning the medical corpus, it completes the logical organization, language polishing, and structured filling that conforms to specialist standards. This avoids the "illusion" and colloquial expressions that may occur with free generation, and ensures that the medical record content, while adhering to the template's structural framework, possesses medical logical coherence and terminological accuracy. Ultimately, it generates a high-quality draft medical record, significantly reducing the doctor's revision burden and achieving high efficiency and standardized uniformity in AI-assisted medical record writing.

[0036] See Figure 1 This is a flowchart illustrating the method for automatically generating specialist medical records based on an artificial intelligence large language model provided in this application embodiment. It is intended as an example and not a limitation. The method may include the following steps: S101, obtain the original audio of the doctor-patient consultation.

[0037] In this embodiment of the application, when the doctor and patient begin diagnosis and treatment communication, the system collects the initial and core voice communication data of both parties in real time through a designated device (such as a microphone) related to the patient's condition and diagnosis and treatment. The "first" does not only refer to the "first time", but emphasizes the "core initial audio in the diagnosis and treatment scenario". It is the basic raw data for subsequent speech-to-text conversion, extraction of key information and generation of medical records. It is necessary to ensure the integrity and real-time nature of the collection and not to miss the core consultation content.

[0038] For example, the system pre-deploys adapted audio acquisition devices (such as medical high-sensitivity microphones and built-in audio modules) in doctor's workstations (outpatient computers, mobile medical devices) or consultation scenarios (consultation rooms, online consultation live broadcast rooms), and enables streaming voice acquisition. Acquisition is automatically triggered when doctors and patients start consultation communication. At the same time, the front-end signal processing technology is optimized for medical scenarios to filter environmental noise (such as background noise in the consultation room and equipment interference), and the speech recognition algorithm is adapted to ensure the clarity and recognizability of the audio data. The acquired audio stream is transmitted to the system backend in real time to achieve synchronous linkage between consultation and acquisition.

[0039] S102, Match the corresponding first preset template according to the original audio; wherein, the first preset template is used to represent a standardized medical record writing specification and structural framework for a specialty.

[0040] In this embodiment, the system first acquires the original audio of the doctor-patient consultation (i.e., the initial core voice communication data), processes it to extract key information, and then matches the corresponding "first preset template" from the preset "specialty and disease template library". This template is a standardized framework (such as the scope of specialty medical record template) pre-set for a certain specialty (such as internal medicine or orthopedics), which clarifies the fields, logical structure and professional writing standards that the specialty medical record must cover. It is the mandatory basis for generating compliant medical records in the future, ensuring that the medical record meets the clinical requirements of the corresponding specialty.

[0041] For example, the first preset template, such as the cardiology template, has a core structure of "chief complaint - present illness - past medical history (focusing on recording underlying diseases such as hypertension / diabetes) - physical signs (blood pressure, heart rate, cardiac auscultation) - auxiliary examinations (electrocardiogram, coronary CT, etc.)" and focuses on cardiology-specific expressions such as "ST-T segment depression, coronary artery stenosis, and cardiac function classification".

[0042] Another example, the first preset template, such as the orthopedic template, focuses on the structural logic of "trauma history (injury mechanism, time, location) - symptoms (pain level, range of motion restriction) - signs (deformity, tenderness, abnormal activity) - imaging examinations (X-ray, CT 3D reconstruction)". The terminology revolves around orthopedic professional expressions such as "fracture displacement, ligament tear, internal fixation". The system accurately matches the corresponding template by extracting specialty feature keywords from the audio-to-text translation (such as "chest tightness, ST-T segment" in cardiology and "fall, fracture" in orthopedics). Combined with the template's built-in specialty terminology database and field requirement rules, it ensures that the structure of the generated medical record conforms to the specialty diagnosis and treatment logic and that the terminology complies with specialty standards. See steps S201-S203 below for details.

[0043] In one embodiment, see Figure 2 This is a flowchart illustrating the matching template provided in the embodiments of this application. Figure 1 ,like Figure 2 As shown, step S102 includes: S201, transcribe the original audio into text to obtain the transcribed text.

[0044] In this embodiment, the initial audio of the doctor-patient consultation collected by the system (i.e., the original audio) is converted into text data (i.e., transcribed text) that can be parsed and processed by a computer through speech recognition technology. This step is a key bridge connecting the original voice communication with subsequent information extraction and template matching. The purpose is to transform the colloquial doctor-patient dialogue into structured basic text, providing an analyzable data source for subsequent extraction of medical entities and matching of specialty templates, and ensuring that subsequent processes can accurately obtain the core diagnosis and treatment information in the consultation.

[0045] For example, advanced streaming speech recognition technology can be used to first process the acquired raw audio, filtering out irrelevant noises such as clinic environment noise and equipment interference, thus improving audio clarity. Then, using acoustic and language models optimized for medical terminology, the processed audio stream is analyzed in real time to accurately identify medical terms such as "rectal bleeding" and "gastric ulcer," avoiding deviations in the conversion between colloquial expressions and professional terms. Finally, the continuous audio data is converted into coherent and accurate text records (i.e., transcribed text) in real time, and the entire conversion process is synchronized with audio acquisition, ensuring that the text data can provide timely support for subsequent keyword extraction and specialty template matching, completing the automated conversion from speech to text without manual intervention.

[0046] S202, convert the transcribed text into structured text with a preset structure.

[0047] In this embodiment, the speech-to-text dialogue text (transcribed text), which is colloquial, fragmented, disordered, and only understandable to humans, is transformed into standardized structured data (structured text) that can be accurately identified, classified, and associated by computers through technical processing. The "preset structure" here is essentially a "computer-parsable information organization rule". The core is to break down the ambiguous natural language dialogue into identifiable units with "clear categories + specific content + logical relationships" (such as "symptoms-rectal bleeding" and "duration-3 days"). This not only facilitates the system's subsequent automatic template filling and medical record generation but also ensures that the information can be accurately retrieved and reused, solving the problem that the original text is "unreadable and unusable by machines".

[0048] S203, Match the corresponding first preset template based on the structured text.

[0049] In this embodiment, based on the "structured text with a preset structure", the most suitable "first preset template" is accurately matched from the system's "specialty and disease template library". This template is a standardized medical record framework preset for a specialty (such as gastroenterology or cardiology), which clarifies the specialty-specific field settings, logical order and writing standards. The core purpose of matching is to ensure that the medical records generated subsequently fully conform to the clinical diagnosis and treatment requirements of the corresponding specialty and avoid the standardization deviation caused by the general template.

[0050] In the above method, by converting the original audio to text, and then converting the text into structured text with a preset structure, and finally matching it with the corresponding first preset template, it can quickly lock in a framework that conforms to the specialty standards for subsequent medical record generation, effectively avoid the problem of non-standard medical records caused by template mismatch, and reduce the time cost of manual template screening, laying the foundation for improving the efficiency and professionalism of medical record generation.

[0051] In one embodiment, see Figure 3 This is a flowchart illustrating the matching template provided in the embodiments of this application. Figure 2 ,like Figure 3 As shown, step S203 includes: S301, extract the chief complaint keywords corresponding to the structured text; where the chief complaint keywords are used to characterize the key features of the patient's condition.

[0052] In this embodiment, the NLP module filters out keywords (i.e., chief complaint keywords) that accurately reflect the core characteristics of the patient's condition from the structured text (structured text with clear fields and standardized medical entities) that has been converted into a preset structure. These keywords are usually the core reason for the patient's visit, focusing on core elements such as "key symptoms + duration" (e.g., "blood in stool for 3 days" or "chest pain for 1 hour"). They can not only intuitively reflect the core of the condition, but also serve as the core basis for matching specialist templates and generating chief complaint fields in medical records, ensuring that the chief complaint information is accurate, concise, and in accordance with medical document standards.

[0053] For example, the system's built-in Natural Language Processing (NLP) module can be used to first locate core fields and corresponding medical entities directly related to the patient's condition, such as "symptoms," "duration," and "abnormal signs," from the structured text. Then, by using preset keyword extraction rules (prioritizing the screening of the patient's main symptoms, key signs, and corresponding time information, and eliminating secondary accompanying symptoms, medical history, and other non-core information), and combining relation extraction technology, the association between core entities can be locked (such as the "symptom-duration" association between "rectal bleeding" and "3 days").

[0054] Finally, the core information after association is combined into concise chief complaint keywords (such as "high fever for 3 days" and "joint pain for 1 week") to ensure that it can accurately represent the key symptoms of the patient's condition and provide a core basis for subsequent template matching and chief complaint field generation.

[0055] S302, Match the preset template corresponding to the main complaint keyword from the preset template library to obtain the first preset template.

[0056] In this embodiment, the extracted "chief complaint keywords" (such as "rectal bleeding for 3 days" and "chest pain for 1 hour," which are key characteristics of the patient's condition) are used as the matching criteria. The system then precisely selects the standardized medical record template (i.e., the first preset template) that best matches these characteristics from a pre-built "specialty and disease template library." The core purpose is to ensure that the subsequently generated medical record framework strictly adheres to the specialty of the patient's condition (e.g., "rectal bleeding" corresponds to the gastroenterology template, and "chest pain" corresponds to the cardiology template), ensuring that the medical record structure conforms to specialty treatment guidelines and avoiding content deviations or missing fields caused by generic templates.

[0057] For example, the system first relies on the tag system of the preset template library (specialty and disease template library) to bind the corresponding core disease tags to each specialty and disease template (such as binding the gastroenterology hematochezia medical record template with tags such as "hematochezia, melena, abdominal pain", and binding the cardiology chest pain template with tags such as "chest pain, chest tightness, palpitations").

[0058] Then, the extracted chief complaint keywords (including key symptoms, core signs, etc.) are compared with the binding tags of each template in the template library for similarity. The matching degree is calculated by NLP technology or rule engine, and the 1-3 candidate templates with the highest matching degree are automatically locked. At the same time, the scope is further narrowed by combining the disease details in the chief complaint keywords (such as "childhood high fever" to match the pediatric high fever template, "postoperative wound pain" to match the surgical postoperative template). Finally, the most suitable first preset template is determined. Doctors can also manually adjust and confirm the recommended template according to the patient's actual condition (such as cross-specialty symptoms, special medical records) to ensure that the template is accurately adapted to the condition and specialty requirements.

[0059] In the above method, by extracting the chief complaint keywords that represent the key symptoms of the patient from the structured text, and then matching the corresponding preset template from the preset template library to obtain the first preset template, the specialist medical record framework that fits the patient's condition can be quickly locked, effectively avoiding the problem of non-standard medical records caused by template mismatch, while reducing the time cost of manual template screening, laying the foundation for the subsequent generation of standardized medical records, and improving the efficiency and professionalism of medical record generation.

[0060] S103, Generate the first medical record corresponding to the original audio based on the first preset template and the original audio.

[0061] In this embodiment, a "first preset template" (i.e., a standardized medical record framework for a specific specialty that precisely matches the patient's condition) is used as the mandatory generation basis. Combined with the core diagnostic and treatment information corresponding to the "original audio" (key medical entities extracted through speech-to-text and NLP, as well as background information such as the patient's past medical history), a complete medical record (i.e., the first medical record) that fully corresponds to the audio consultation content and conforms to specialty standards is automatically generated through technical processing. The core purpose is to achieve automated and standardized generation of medical records by relying on the "strict standards" of the template and the "original diagnostic and treatment information" of the audio, ensuring that the medical record not only matches the patient's actual condition but also conforms to clinical writing standards, reducing the burden of manual writing for doctors.

[0062] The above method first acquires the original audio of the doctor-patient consultation process using a data acquisition device, fully recording key diagnostic and treatment information such as the patient's description of their condition and the doctor's inquiries. Next, the audio data is processed to extract core disease features, which are then matched with a standardized medical record template (i.e., the first preset template) from a pre-set template library. This template clearly defines the fixed writing standards and structural framework of the specialty medical record, providing a mandatory framework for medical record generation. Finally, using the first preset template as a constraint, and combining the key medical information extracted from the original audio, AI technology completes the logical filling and language organization, generating a standardized first medical record that precisely corresponds to the audio consultation content, achieving intelligent transformation from consultation audio to standardized medical record. This method relies on a standardized preset template for a specialty, strictly constraining the structural framework and writing standards of the medical record. It accurately extracts key medical information from the audio using AI technology, and the strong constraint mechanism of the template reduces AI "illusions" and human errors, improving the quality and efficiency of medical record generation.

[0063] In one embodiment, see Figure 4 This is a schematic diagram of the process for generating the first medical record provided in the embodiments of this application. Figure 1 ,like Figure 4 As shown, step S103 includes: S401, perform entity recognition on the structured text corresponding to the original audio to obtain multiple first entities; among them, the first entities are information units with medical attributes.

[0064] In this embodiment, the original audio is transcribed and structured to obtain structured text (standardized text with clear fields and conforming to specialist standards). Medical entity recognition is performed using specialized technology to extract multiple independent information units (i.e., first entities) with clear medical attributes. These entities constitute the core medical information of the medical record, covering key content related to the patient's condition and treatment, such as symptoms, signs, duration, causes, medical history, and past medical history (e.g., "hematochezia", ​​"3 days", "gastric ulcer", "penicillin allergy"). This provides accurate core medical information material for subsequent medical record template filling and logical organization.

[0065] Specifically, relying on the system's built-in Natural Language Processing (NLP) module, which is based on a pre-trained language model and fine-tuned and optimized with massive medical corpora, it is specifically adapted to the entity recognition needs of medical scenarios. Through named entity recognition technology, it parses the content of each field in the structured text (such as chief complaint, present illness, past medical history, etc.) sentence by sentence. According to the preset medical entity classification system (covering categories such as symptoms, signs, time, causes, drugs, diseases, allergies, etc.), it accurately filters and marks information units with medical attributes. At the same time, the algorithm filters out auxiliary words without medical meaning (such as "patient", "visit", "self-report", etc.), and finally obtains multiple independent, accurate first entities with clear medical category attributes. This ensures that each entity can directly correspond to the relevant fields of the medical record template, providing standardized core medical information support for subsequent information integration and medical record generation.

[0066] S402, Generate a first medical record based on a first preset template and multiple first entities.

[0067] In this embodiment of the application, it refers to using the "first preset template" (a standardized medical record framework for specific diseases that is precisely matched with the patient's condition, including fixed fields, logical order and specialty specifications) as the mandatory generation basis, combined with "multiple first entities" (core information units with medical attributes extracted from structured text, such as symptoms, signs, duration, past history, etc.), and automatically generating a complete medical record (i.e. the first medical record) that is completely corresponding to the patient's consultation content through technical processing.

[0068] Its core logic is to let the template provide the "standard framework" and the first entity provide the "core content". The combination of the two realizes the standardization and automated generation of medical records, ensuring that the medical records not only meet the requirements of specialty clinical practice, but also fully cover the key information of the patient's condition.

[0069] In the above method, by performing entity recognition on the structured text corresponding to the original audio to obtain multiple first entities with medical attributes, and then combining them with the first preset template to generate the first medical record, it can ensure that the generated medical record accurately integrates key medical information from the consultation and strictly conforms to the specialty standards, effectively avoids information omissions and unprofessional expressions, significantly reduces the doctor's modification burden, and improves the accuracy and efficiency of medical record generation.

[0070] In one embodiment, see Figure 5 This is a schematic diagram of the process for generating the first medical record provided in the embodiments of this application. Figure 2 ,like Figure 5 As shown, step S402 includes: S501, map multiple fields contained in the first preset template to multiple first entities one by one; to obtain multiple sets of mapping pairs; wherein, a mapping pair contains a field and the first entity corresponding to the field.

[0071] In this application, a "first preset template" (a standardized medical record framework tailored to the patient's condition) is used as the basis. Multiple fixed fields preset in the template (such as chief complaint, present illness, past medical history, physical signs, and precipitating factors) are matched one-to-one with multiple "first entities" (core information units with medical attributes, such as "hematochezia," "3 days," "gastric ulcer," and "no obvious cause") extracted from structured text according to the principle of "matching field meaning with entity attributes." This results in multiple sets of "field-entity" mapping pairs (such as "chief complaint - hematochezia for 3 days," "present illness - hematochezia without obvious cause," and "past medical history - gastric ulcer"). The core purpose is to clarify the specific medical information that should be filled in each template field, providing a precise "field-content" correspondence for the subsequent organization of medical record content according to the template framework by the large language model, ensuring that the medical record is filled in correctly and that no information is omitted.

[0072] Specifically, the system analyzes the structure of the first preset template, clarifies all the fixed fields it contains and the meaning of each field, the type of information to be matched (such as the "chief complaint" field matching the "core symptoms + duration" type entity, the "present illness history" field matching the "cause, onset time, symptom characteristics, treatment process" type entity, and the "past medical history" field matching the "past diseases, surgical history" type entity), and forms a "field-matching rule" comparison table.

[0073] Then, multiple first entities are traversed, and the medical attributes of each entity are parsed using natural language processing (NLP) technology (e.g., determining "rectal bleeding" as a "core symptom", "3 days" as a "duration", and "gastric ulcer" as a "past disease"). Next, based on the "field-adaptation rule" lookup table, the entity attributes are precisely matched with the field meanings (e.g., entities with "core symptoms + duration" are matched with the "chief complaint" field, and entities with "past diseases" are matched with the "past history" field), achieving a one-to-one mapping between template fields and first entities. Finally, multiple sets of standardized mapping pairs are generated, each containing only one template field and a first entity with matching attributes specific to that field, ensuring that each field can be filled with the corresponding accurate medical information when subsequent medical records are generated, avoiding misaligned filling across fields.

[0074] S502, iterate through all mapping pairs and replace the content corresponding to the field in each mapping pair with the first entity corresponding to the field.

[0075] In this embodiment, all preset "template field-medical entity" mapping pairs are traversed. With the help of a large language model fine-tuned from medical corpus, the original content corresponding to the template field in each mapping pair is accurately replaced with the first entity matched by that field (i.e., standardized medical information extracted from the doctor-patient consultation text, such as symptoms, signs, examination results, etc.). During the replacement process, the model relies on its own understanding of medical semantics and mastery of specialized terminology to ensure that the replaced content not only conforms to the specialized specifications of the field (e.g., the "blood pressure" field in cardiology corresponds to a specific value, and the "fracture type" field in orthopedics corresponds to a professional diagnostic term), but also maintains logical coherence with the overall context of the medical record, avoiding expression deviations or semantic conflicts, thereby achieving standardized filling and accurate presentation of medical record content.

[0076] Specifically, the large language model first traverses all generated mapping pairs to clarify the unique correspondence between the "template field" and the "first entity" in each mapping pair (ensuring that a field only matches its own first entity without overlap or misalignment); then it retrieves the first preset template and locates the preset position of each field in the template (such as the fixed filling area of ​​the "chief complaint" field and the segmentation module of the "present medical history").

[0077] Next, following the principle of "matching fields with the same name and accurately replacing entities," the content of the first entity in each mapping pair is directly filled into the corresponding field in the template. For example, "bleeding for 3 days" in the mapping pair "chief complaint - hematochezia for 3 days" is filled into the "chief complaint" field of the template; "present illness - dark red bloody stool without obvious cause, lasting for 3 days" is filled into the "present illness" field of the template; and "past medical history - gastric ulcer diagnosed 2 years ago" is filled into the "past medical history" field of the template. At the same time, redundant information without corresponding fields in the mapping pair is automatically filtered to ensure that each field in the template is filled with only the matching medical entity content. This results in a "complete field, accurate content, and standardized structure" filled text, which is prepared for subsequent input into a large language model for logical connection and professional expression optimization.

[0078] S503, obtain the first medical record based on the first preset template after the entity replacement.

[0079] In this embodiment, after completing the "one-to-one mapping and replacement of the first preset template fields and the first entity", the large language model, based on the template filled with core medical information, uses the logical connection and professional expression optimization of the large language model to finally form a complete, standardized medical record (i.e., the first medical record) that meets the requirements of the specialty. Essentially, it upgrades the "structured information prototype" after "field-entity" matching into a complete medical record that is "logically coherent, professionally expressed, and conforms to medical document standards," achieving the final realization from "information filling" to "standardized generation".

[0080] In the above method, by mapping multiple fields of the first preset template to the first entity with multiple medical attributes to form mapping pairs, and then traversing the mapping pairs to replace the field content and generating the first medical record based on the replaced template, it can ensure that the medical record strictly fits the specialty template framework, accurately integrates key medical information, effectively avoids information misalignment and omission, significantly improves the standardization, accuracy and efficiency of medical record generation, and greatly reduces the burden of subsequent modifications for doctors.

[0081] In one embodiment, see Figure 6 This is a schematic diagram of the process for generating the first medical record provided in the embodiments of this application. Figure 3 ,like Figure 6 As shown, step S503 includes: S601, collect the patient's basic health data; the basic health data includes the patient's past medical history, allergy history and family history information.

[0082] In this embodiment, the system collects core background information related to the patient's health status that existed prior to the current consultation in a specific manner. This information specifically covers three categories of key data: past medical history (such as previously diagnosed diseases, surgical history, and treatment experiences), allergy history (such as allergies to medications, foods, and environmental factors), and family history (such as a history of hereditary or common diseases among immediate family members). This data is an important component of the completeness of the medical record, providing crucial reference for current diagnosis and treatment, helping doctors comprehensively assess the condition and formulate safe and reasonable treatment plans. It also serves as important background information supporting the generation of standardized medical records under template constraints.

[0083] Specifically, the system can interface with hospital electronic medical records (EMR) and hospital information systems (HIS). First, it establishes data retrieval links through the patient's unique identifier (such as a patient ID or national ID number). Then, the system automatically accesses the backend database and, based on preset data extraction rules, accurately filters and obtains the patient's past medical history, including diagnoses, surgeries, and treatments; allergy-related information such as medications and foods; and family history information such as hereditary diseases and common chronic diseases among immediate family members. Simultaneously, if some basic health data is missing from the database, the system can prompt the patient or doctor to submit supplementary information via the front-end interface, receiving manually entered supplementary information. Finally, it integrates these to form a complete and accurate set of the patient's basic health data, providing comprehensive background support for subsequent medical record template filling and treatment decisions.

[0084] S602, based on the basic health data, fill in the content of the first preset template after the entity replacement to obtain the first medical record.

[0085] In this embodiment, after the key medical entities (such as symptoms, signs, duration, etc.) have been replaced in the first preset template, the collected basic health data of the patient (including past medical history, allergy history, and family history) is used as important supplementary information and accurately filled into the corresponding exclusive fields of the template, ultimately forming a first medical record with complete fields, comprehensive information, and compliance with specialist standards. Basic health data is an indispensable background information for medical records. Its filling allows the medical record to better reflect the individual health status of the patient, providing a complete reference for diagnosis and treatment decisions, while ensuring that the medical record meets the requirements for completeness of medical documents.

[0086] For example, firstly, the system defines the specific fields (such as "Past Medical History", "Allergy History", and "Family History") corresponding to the basic health data in the first preset template and the filling format requirements; then, it retrieves the collected basic health data of the patient, parses the data attributes through natural language processing (NLP) technology, and maps information such as disease diagnosis and surgical history in the past medical history to the "Past Medical History" field, drug / food allergy information in the allergy history to the "Allergy History" field, and information such as hereditary diseases and chronic diseases of immediate family members in the family history to the "Family History" field.

[0087] Then, following the preset expression specifications of the template, the basic health data is transformed into professional and concise medical text and filled into the corresponding fields (such as "Past medical history: diagnosed with gastric ulcer 2 years ago, no surgical treatment performed" and "Allergy history: penicillin allergy"). Finally, combined with the filled key medical entity information, the overall content is logically verified and the sentence connection is optimized through a large language model that has been fine-tuned by the medical corpus to ensure that the information in each field is coherent and conflict-free, and finally form a complete, standardized and compliant first medical record.

[0088] The above method collects basic health data of patients, including past medical history, allergy history and family history, and uses this data to fill in the content of a first preset template that has been replaced with physical data to obtain the first medical record. This enriches the background information of the medical record, ensures the integrity of the medical record, makes the generated medical record more in line with the individual health status of the patient, complies with medical document standards, reduces the workload of doctors in supplementing and improving the medical record, and improves the reference value of diagnosis and treatment and the efficiency of medical record generation.

[0089] In one embodiment, the method further includes: The first medical record is sent to the electronic medical record terminal interface so that the doctor can confirm or modify it.

[0090] In this embodiment, the first medical record (a structured draft medical record conforming to specialty standards) generated by template constraints and integrating real-time diagnosis and treatment information and basic health data is pushed to the electronic medical record terminal interface (such as the doctor's workstation of the hospital HIS / EMR system or the interface of a mobile medical app) through system data transmission. The core purpose is to provide doctors with an intuitive medical record preview window, allowing doctors to quickly check the completeness, accuracy and standardization of the medical record, make necessary minor modifications or directly confirm it, and finally form a legally valid formal medical record, while completing the closed loop from "AI automatic generation" to "final clinical confirmation".

[0091] For example, after the system completes the generation of the first medical record, it automatically performs standardized format conversion on the medical record data to ensure that it is compatible with the interface protocol and display specifications of the electronic medical record terminal (such as matching the field mapping rules of the EMR system and supporting paragraph and field dual-mode display). Subsequently, through the hospital's internal network or secure data transmission channel, the complete data of the first medical record (including all template field contents such as chief complaint, present illness, and past medical history) is pushed to the corresponding doctor's electronic medical record terminal interface in real time, and the medical record status is marked as "pending review" and the terminal message prompt is triggered (such as interface pop-up window and message red dot).

[0092] The terminal interface is laid out according to the preset layout of the specialty template, clearly displaying the content of each field of the medical record. Doctors can directly modify and supplement the corresponding fields (such as adding special treatment details and correcting expression deviations), while retaining the original content generated by AI for comparison and reference. After the doctor completes the confirmation or modification, the system receives the final version feedback from the terminal, automatically updates the medical record status to "confirmed" and synchronously stores it in the patient's electronic medical record database, forming a traceable treatment record, ensuring that the entire transmission and interaction process is safe, efficient and in compliance with medical data management standards.

[0093] In the above method, in this embodiment of the application, the generated first medical record is sent to the electronic medical record terminal interface for the doctor to confirm or modify. Through the closed loop of "AI automatic generation + doctor professional review", the final accuracy and compliance of the medical record can be guaranteed, and only minor adjustments are required from the doctor, avoiding a lot of rewriting work, optimizing the human-computer interaction experience, and further improving the efficiency and practicality of the entire medical record generation process.

[0094] See Figure 7 This is a schematic diagram of the overall architecture of the method for automatically generating specialist medical records based on an artificial intelligence large language model provided in the embodiments of this application, as shown below. Figure 7 As shown, the specific steps include: I. Architecture Composition Audio Acquisition Layer (Perception Boundary): Real-time audio of doctor-patient consultations is acquired through terminals such as fixed microphones in the examination room, doctor's handheld devices, and online consultation platforms.

[0095] Core processing layer (central brain): includes ASR engine (converts speech to text), NLP module (extracts entities / keywords), template matching engine (matches specialized templates), and LLM generation core (fills in and polishes content under template constraints).

[0096] Data and Knowledge Layer (Underlying Support): Provides a specialist medical record template library (structured templates), a medical knowledge graph (logical connections), and a patient history database (past medical history, etc.) to provide constraints and factual support for the processing layer.

[0097] Output and Application Layer (Closed-Loop Implementation): After the initial draft of the medical record is generated and confirmed by the doctor's review interface, it is synchronized to the HIS / EMR system for structured storage.

[0098] II. Process Steps Audio capture and real-time push The audio acquisition layer terminals (clinic microphones / doctor's handheld devices / online consultation platforms) capture doctor-patient consultation conversations in real time and continuously push the audio stream to the core processing layer to ensure that the content is transmitted without delay.

[0099] Speech-to-text The core processing layer's ASR engine receives audio streams and uses speech recognition technology to translate them sentence by sentence into plain text (such as "Patient's chief complaint: recurrent chest tightness for 3 years, worsening for 1 week"), which serves as the basic material for subsequent processing.

[0100] Medical Entities and Keyword Extraction The NLP module performs semantic analysis on the transcribed text, extracting medical entities (such as symptoms "chest tightness", duration "3 years", and signs "blood pressure 140 / 90 mmHg") and specialty keywords (such as "ST-T segment depression"), while filtering out colloquial and redundant content.

[0101] Specialty medical record template matching template matching The engine calls the "specialty medical record template library" in the data and knowledge layer. Based on the specialty keywords extracted by NLP (such as "chest tightness" corresponding to cardiology and "fracture" corresponding to orthopedics), it automatically matches the corresponding standardized specialty template (such as the cardiology template) and loads the field constraint rules of the template.

[0102] Factual Information Enhancement and Supplement After template matching is completed, the system retrieves the "medical knowledge graph" (to supplement the logic of specialized terminology, such as associating "chest tightness" with "cardiac function classification") and the "patient history database" (to retrieve past medical history, allergy history, etc.) from the data and knowledge layer to provide factual basis for LLM generation and avoid content "illusion".

[0103] LLM Constraint Filling and Polishing The core of LLM generation uses a well-matched specialty template as a strong constraint framework. It fills the corresponding fields of the template with entity information extracted by NLP, logical connections of knowledge graph, and factual content of historical data. At the same time, it performs medical language polishing (such as standardizing the colloquial phrase "chest tightness" to "chest tightness"), and finally generates a draft medical record that conforms to the specialty standard.

[0104] Manual review and system synchronization The output and application layer pushes the initial draft of the medical record to the doctor's review interface. The doctor checks and fine-tunes the content (such as adding details). After confirming that there are no errors, the system synchronizes the medical record to the HIS / EMR system to complete the structured storage and form a closed loop of "collection-processing-generation-review-storage".

[0105] The entire process is a closed loop of "from audio to text → from text to information → from information to template → from template to medical record", which realizes the automated transformation of consultation information into standardized medical records.

[0106] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0107] Corresponding to the above embodiment of the method for automatically generating specialist medical records based on an artificial intelligence large language model, Figure 8 This is a structural block diagram of a constraint-based medical record generation device provided in the embodiments of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0108] Reference Figure 8 The device includes: Data acquisition module 81 is used to acquire the original audio of doctor-patient consultations; The template matching module 82 is used to match the original audio with its corresponding first preset template; wherein, the first preset template is used to represent a standardized medical record writing specification and structural framework for a specialty. The medical record generation module 83 is used to generate the first medical record corresponding to the original audio based on the first preset template and the original audio.

[0109] Optionally, the template matching module 82 is also used for: The original audio is transcribed into text to obtain the transcribed text; Convert transcribed text into structured text with a preset structure; Match the structured text to its corresponding first preset template.

[0110] Optionally, the template matching module 82 is also used for: Extract the chief complaint keywords from the structured text; these keywords are used to characterize the patient's key disease features. The first preset template is obtained by matching the preset template corresponding to the main complaint keyword from the preset template library.

[0111] Optionally, the medical record generation module 83 is also used for: Entity recognition is performed on the structured text corresponding to the original audio to obtain multiple first entities; among them, the first entities are information units with medical attributes; The first medical record is generated based on the first preset template and multiple first entities.

[0112] Optionally, the medical record generation module 83 is also used for: The multiple fields contained in the first preset template are mapped one-to-one with the multiple first entities; multiple mapping pairs are obtained; wherein, a mapping pair contains a field and the first entity corresponding to the field; Iterate through all mapping pairs and replace the content corresponding to the field in each mapping pair with the first entity corresponding to the field. The first medical record is obtained based on the first preset template after the entity replacement.

[0113] Optionally, the medical record generation module 83 is also used for: Collect basic health data from patients; this includes patients' past medical history, allergy history, and family history. The first medical record is obtained by filling in the content of the first preset template after the entity replacement is completed based on the basic health data.

[0114] The constraint-based medical record generation device 8 also includes a medical record generation module 85, used for: The first medical record is pushed to the electronic medical record terminal interface so that the doctor can confirm or modify it.

[0115] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0116] in addition, Figure 8 The constraint-based medical record generation device shown can be a software unit, a hardware unit, or a combination of software and hardware built into existing terminal devices. It can also be integrated into terminal devices as an independent component or exist as a standalone terminal device.

[0117] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0118] Figure 9 This is a schematic diagram of the structure of the terminal device provided in the embodiments of this application. For example... Figure 9 As shown, the terminal device 9 of this embodiment includes: at least one processor 90 ( Figure 9 (Only one is shown in the image) a processor, a memory 91, and a computer program 92 stored in the memory 91 and capable of running on at least one processor 90. When the processor 90 executes the computer program 92, it implements the steps in any of the above embodiments of the automatic generation method for specialist medical records based on artificial intelligence large language models.

[0119] The terminal device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. This terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 9 This is merely an example of terminal device 9 and does not constitute a limitation on terminal device 9. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0120] The processor 90 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0121] In some embodiments, memory 91 may be an internal storage unit of terminal device 9, such as a hard disk or memory of terminal device 9. In other embodiments, memory 91 may be an external storage device of terminal device 9, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on terminal device 9. Furthermore, memory 91 may include both internal storage units and external storage devices of terminal device 9. Memory 91 is used to store operating system, application programs, bootloader, data, and other programs, such as program code of computer programs. Memory 91 can also be used to temporarily store data that has been output or will be output.

[0122] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.

[0123] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.

[0124] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0125] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0126] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0127] In the embodiments provided in this application, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0129] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for automatically generating specialist medical records based on an artificial intelligence large language model, characterized in that, The method includes: Obtain the original audio of doctor-patient consultations; The original audio is matched with its corresponding first preset template; wherein, the first preset template is used to represent a standardized medical record writing specification and structural framework for a specialty. The first medical record corresponding to the original audio is generated based on the first preset template and the original audio.

2. The method for automatically generating specialist medical records based on an artificial intelligence large language model as described in claim 1, characterized in that, The step of matching the original audio with its corresponding first preset template includes: The original audio is transcribed into text to obtain the transcribed text; The transcribed text is converted into structured text with a preset structure; The structured text is matched with its corresponding first preset template.

3. The method for automatically generating specialist medical records based on an artificial intelligence large language model as described in claim 2, characterized in that, The step of matching the structured text with its corresponding first preset template includes: Extract the main complaint keywords corresponding to the structured text; wherein, the main complaint keywords are used to characterize the key disease features of the patient; The first preset template is obtained by matching the preset template corresponding to the main complaint keyword from the preset template library.

4. The method for automatically generating specialist medical records based on an artificial intelligence large language model as described in claim 3, characterized in that, The step of generating the first medical record corresponding to the original audio based on the first preset template and the original audio includes: Entity recognition is performed on the structured text corresponding to the original audio to obtain multiple first entities; wherein, the first entity is an information unit with medical attributes; The first medical record is generated based on the first preset template and multiple first entities.

5. The method for automatically generating specialist medical records based on an artificial intelligence large language model as described in claim 4, characterized in that, The step of generating the first medical record based on the first preset template and multiple first entities includes: The multiple fields contained in the first preset template are mapped one-to-one with the multiple first entities to obtain multiple sets of mapping pairs; wherein, each mapping pair contains a field and the first entity corresponding to the field; Iterate through all the mapping pairs and replace the content corresponding to the field in each mapping pair with the first entity corresponding to the field. The first medical record is obtained based on the first preset template after the entity replacement.

6. The method for automatically generating specialist medical records based on an artificial intelligence large language model as described in claim 5, characterized in that, The process of obtaining the first medical record based on the first preset template after entity replacement includes: Collect the patient's basic health data; wherein, the basic health data includes the patient's past medical history, allergy history and family history information; The first preset template, after entity replacement, is populated with content based on the basic health data to obtain the first medical record.

7. The method for automatically generating specialist medical records based on an artificial intelligence large language model as described in claim 6, characterized in that, The method further includes: The first medical record is pushed to the electronic medical record terminal interface so that the doctor can confirm or modify the first medical record.

8. A constraint-based medical record generation device, characterized in that, include: The data acquisition module is used to acquire the original audio of doctor-patient consultations; The template matching module is used to match the original audio with its corresponding first preset template; wherein, the first preset template is used to represent a standardized medical record writing specification and structural framework for a specialty. The medical record generation module is used to generate a first medical record corresponding to the original audio based on the first preset template and the original audio.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.