Electronic medical record construction method and device, electronic equipment, storage medium and product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE CHENGDU INFORMATION & TELECOMM TECH CO LTD
- Filing Date
- 2026-06-25
- Publication Date
- 2026-08-04
AI Technical Summary
[0003]本发明提供一种电子病历构建方法、装置、电子设备、存储介质及产品,用以解决现有技术中采用人工方式来录入电子病历高度依赖个人经验与记忆,存在效率低下的技术问题
[0019] This invention provides an electronic medical record (EMR) construction method, apparatus, electronic device, storage medium, and product. The method involves acquiring a description of a patient's condition; inputting the description into a multi-task large language model to identify the corresponding task type, which includes information extraction and information quality control tasks; calling an expert module within the multi-task large language model corresponding to the task type to process the description, generating medical record data; and constructing an EMR based on the medical record data. This invention solves the technical problem of low efficiency caused by manual input of EMRs, which heavily relies on personal experience and memory. Compared to existing technologies, this invention automatically identifies the task type (information extraction or information quality control) by inputting the description of the patient's condition into a multi-task large language model, and calls the corresponding expert module for processing to generate medical record data, ultimately constructing an EMR. Therefore, on the one hand, it can efficiently extract structured medical record data from the description of the illness, and on the other hand, it can perform quality control processing on the description of the illness itself, identify and prompt any missing, contradictory or non-standard parts, thereby significantly improving the construction efficiency and data standardization of electronic medical records without the need for manual entry. It effectively reduces information errors and omissions caused by differences in personal experience or memory oversights, improves the integrity and accuracy of medical record data, and realizes end-to-end automated construction from unstructured description of illness to high-quality structured electronic medical records.
Smart Images

Figure CN122511468A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart healthcare technology, and in particular to an electronic medical record construction method, apparatus, electronic device, storage medium, and product. Background Technology
[0002] Traditional electronic medical records are primarily created by healthcare professionals through handwritten or keyboard input, manually recording patient descriptions, diagnostic information, and treatment processes into the system. However, this manual method heavily relies on personal experience and memory, resulting in inefficiency. Summary of the Invention
[0003] This invention provides an electronic medical record construction method, apparatus, electronic device, storage medium, and product to solve the technical problem of low efficiency in the prior art where electronic medical records are entered manually, which relies heavily on personal experience and memory.
[0004] This invention provides a method for constructing electronic medical records, comprising the following steps: Obtain the text describing the patient's condition; The text describing the illness is input into a multi-task large language model to identify the task type corresponding to the text describing the illness. The task type includes information extraction tasks and information quality control tasks. The expert module corresponding to the task type in the multi-task large language model is invoked to process the disease description text and generate medical record data; Based on the aforementioned medical record data, an electronic medical record is constructed.
[0005] According to an electronic medical record construction method provided by the present invention, the multi-task large language model includes a feature encoding module and a task routing module; wherein, the step of inputting the medical condition description text into the multi-task large language model and identifying the task type corresponding to the medical condition description text includes: The text describing the illness is input into a multi-task large language model, and the text is processed by the feature encoding module to obtain a semantic encoding vector. The task routing module processes the semantic encoding vector to determine the task type.
[0006] According to an electronic medical record construction method provided by the present invention, the multi-task large language model includes an expert module, a feature processing module, and a text generation module. The expert module includes an information extraction expert and an information quality control expert. The step of calling the expert module in the multi-task large language model corresponding to the task type to process the disease description text and generate medical record data includes: If the task type is an information extraction task, then the information extraction expert is called from the expert module to process the disease description text and obtain information extraction features; If the task type is an information quality control task, then the information quality control expert is called from the expert module to process the disease description text and obtain information quality control features; The feature processing module processes the information extraction features or information quality control features to obtain target features; and the text generation module generates medical record data based on the target features.
[0007] According to an electronic medical record construction method provided by the present invention, if the task type is an information extraction task, an information extraction expert is called from the expert module to process the medical condition description text to obtain information extraction features, including: When the task type is an information extraction task, the information extraction expert is invoked, and the pre-trained weights and the first low-rank matrix weights within the information extraction expert are combined to perform a low-rank transformation on the disease description text to obtain information extraction features.
[0008] According to an electronic medical record construction method provided by the present invention, if the task type is an information quality control task, then an information quality control expert is called from the expert module to process the medical condition description text to obtain information quality control features, including: When the task type is information quality control task, the information quality control expert is invoked, and the pre-trained weights and the second low-rank matrix weights in the information quality control expert are combined to perform low-rank transformation on the disease description text to obtain information quality control features.
[0009] According to an electronic medical record construction method provided by the present invention, when the task type is an information quality control task, the information quality control expert is invoked, and the pre-trained weights and the second low-rank matrix weights within the information quality control expert are combined to perform a low-rank transformation on the disease description text to obtain information quality control features, including: When the task type is an information quality control task, the built-in quality control configuration library of the information quality control expert is obtained; The pre-trained weights are used to perform a forward transformation on the disease description text to obtain the basic features for quality control. Based on the description of the illness, a medical entity relationship graph is constructed; The quality control basic features are transformed using the weights of the second low-rank matrix to obtain preliminary quality control features. Based on the medical entity relationship graph and the quality control configuration library, the preliminary quality control features are dimensionally adapted to obtain information quality control features.
[0010] According to an electronic medical record construction method provided by the present invention, the feature processing module includes a self-attention layer, a first residual connection normalization layer, a feedforward network layer, and a second residual connection normalization layer; The step of processing the information extraction features or information quality control features through the feature processing module to obtain the target features includes: The self-attention layer captures semantic dependencies of the information extraction features or information quality control features to obtain attention features. The attention features are subjected to residual connection and layer normalization through the first residual connection normalization layer to obtain the first normalized features; The feedforward features are obtained by performing a nonlinear transformation on the first normalized features through the feedforward network layer. The feedforward features are obtained by performing residual connection and layer normalization on the second residual connection normalization layer.
[0011] According to an electronic medical record construction method provided by the present invention, the step of obtaining the medical condition description text includes: In response to a trigger command, it collects real-time voice information of the target object; The real-time voice information is simultaneously input into the real-time processing channel and the offline processing channel; In the real-time processing channel, the real-time speech information is transcribed in real-time to generate preliminary text; In the offline processing channel, the real-time voice information is subjected to offline enhancement processing to generate enhanced text; Based on the preliminary text and the enhanced text, the description text of the illness is determined.
[0012] According to an electronic medical record construction method provided by the present invention, the step of simultaneously inputting the real-time voice information into a real-time processing channel and an offline processing channel includes: A voiceprint information database is constructed, wherein the voiceprint information database stores multiple voiceprint templates of medical personnel in different acoustic scenarios; Extract voiceprint feature vectors from the real-time voice information, and compare the voiceprint feature vectors with voiceprint templates in the voiceprint information database to determine the comparison result; Based on the comparison results, it is determined whether the target object has passed authentication; When the target object passes authentication, the real-time voice information is simultaneously input into the real-time processing channel and the offline processing channel.
[0013] According to the present invention, an electronic medical record construction method is provided, wherein the construction of the electronic medical record based on the medical record data includes: Input the description of the illness into the medical record template classification model to determine the initial medical record type; In response to the confirmation or modification of the initial medical record type by medical staff, the target medical record type is determined; Based on the target medical record type, a target medical record template is selected from the medical record template library; The medical record data is then populated back into the target medical record template to construct an electronic medical record.
[0014] According to an electronic medical record construction method provided by the present invention, the method further includes: Deploy lightweight small models; In the offline state, the disease description text is processed by the lightweight small model to generate initial medical record data and initial quality control results, and the initial medical record data and initial quality control results are cached in the local storage space; After the network is restored, the initial medical record data and initial quality control results cached in the local storage space are transmitted to the multi-task large language model; The initial medical record data and the initial quality control results are verified using the multi-task large language model to generate verification results; Based on the verification results, the initial medical record data, and the initial quality control results, a target electronic medical record is generated.
[0015] The present invention also provides an electronic medical record construction device, comprising the following modules: The acquisition module is used to acquire the text describing the patient's condition. The input module is also used to input the disease description text into a multi-task large language model and identify the task type corresponding to the disease description text, wherein the task type includes information extraction tasks and information quality control tasks. The calling module is used to call the expert module in the multi-task large language model corresponding to the task type to process the disease description text and generate medical record data; A construction module is used to construct electronic medical records based on the medical record data.
[0016] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the electronic medical record construction method as described above.
[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the electronic medical record construction method as described above.
[0018] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the electronic medical record construction method as described above.
[0019] This invention provides an electronic medical record (EMR) construction method, apparatus, electronic device, storage medium, and product. The method involves acquiring a description of a patient's condition; inputting the description into a multi-task large language model to identify the corresponding task type, which includes information extraction and information quality control tasks; calling an expert module within the multi-task large language model corresponding to the task type to process the description, generating medical record data; and constructing an EMR based on the medical record data. This invention solves the technical problem of low efficiency caused by manual input of EMRs, which heavily relies on personal experience and memory. Compared to existing technologies, this invention automatically identifies the task type (information extraction or information quality control) by inputting the description of the patient's condition into a multi-task large language model, and calls the corresponding expert module for processing to generate medical record data, ultimately constructing an EMR. Therefore, on the one hand, it can efficiently extract structured medical record data from the description of the illness, and on the other hand, it can perform quality control processing on the description of the illness itself, identify and prompt any missing, contradictory or non-standard parts, thereby significantly improving the construction efficiency and data standardization of electronic medical records without the need for manual entry. It effectively reduces information errors and omissions caused by differences in personal experience or memory oversights, improves the integrity and accuracy of medical record data, and realizes end-to-end automated construction from unstructured description of illness to high-quality structured electronic medical records. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 This is one of the flowcharts illustrating the electronic medical record construction method provided by the present invention.
[0022] Figure 2 This is a schematic diagram of the information extraction task in the electronic medical record construction method provided by the present invention.
[0023] Figure 3 This is a schematic diagram of the information quality control task of the electronic medical record construction method provided by the present invention.
[0024] Figure 4 This is a flowchart of the collaborative processing of large and small models in the electronic medical record construction method provided by the present invention.
[0025] Figure 5 This is the second flowchart of the electronic medical record construction method provided by the present invention.
[0026] Figure 6 This is a multi-task large language model framework diagram of the electronic medical record construction method provided by the present invention.
[0027] Figure 7 This is a schematic diagram of the electronic medical record construction device provided by the present invention.
[0028] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0030] The following is combined with Figure 1 and Figure 5 The present invention describes an electronic medical record construction method applicable to the construction of any electronic medical record. The subject executing this method can be an electronic device or an electronic medical record construction device installed in the electronic device. The electronic medical record construction device can be implemented by software, hardware, or a combination of both.
[0031] Figure 1 This is one of the flowcharts illustrating the electronic medical record construction method provided by the present invention, such as... Figure 1 As shown, the method includes the following: Step 101: Obtain the text describing the patient's condition; It should be noted that the medical condition description text refers to natural language text obtained through voice transcription, text input or other means, used to describe information related to the patient's condition. It carries original medical information such as chief complaint, present illness, past medical history, and diagnosis.
[0032] In specific implementation, the text describing the patient's condition can be obtained in one or more of the following ways: in response to the doctor pressing the voice button on the electronic medical record or saying a preset wake-up word, the doctor's spoken voice stream describing the patient's condition is collected in real time, and the automatic speech recognition module is called to convert the voice stream into text; or, existing consultation record text is read from the hospital information system interface; or, the text description in the pre-consultation form uploaded by the mobile terminal is received.
[0033] For example, after pressing the record button on the electronic medical record tablet in the emergency room, the doctor dictates: "The patient is a 65-year-old male, admitted to the hospital due to chest pain and difficulty breathing for 1 hour, with a history of hypertension for 10 years." The system captures this speech in real time, and after voiceprint verification confirms that it is the doctor, it calls the ASR engine to convert the speech into the above text, which serves as the description of the patient's condition.
[0034] Step 102: Input the description text of the illness into the multi-task large language model to identify the task type corresponding to the description text of the illness, wherein the task type includes information extraction task and information quality control task; It should be noted that the multi-task large language model is a deep learning model based on the Transformer architecture. It integrates a task routing module to perform semantic analysis on the input text and automatically identify the task type corresponding to the current medical condition description text. If identified as an information extraction task (IE task), it extracts structured medical record fields from the medical condition description text to generate structured medical record data. If identified as an information quality control task, it analyzes the medical condition description text to detect issues such as missing information, logical contradictions, or non-standard expressions, and generates quality control suggestions.
[0035] Step 103: Call the expert module in the multi-task large language model corresponding to the task type to process the disease description text and generate medical record data; It should be noted that the multi-task large language model also integrates multiple low-rank adaptation expert modules, such as information extraction experts and information quality control experts. If the task is identified as information extraction, the information extraction expert is invoked to extract structured medical record fields (such as diagnosis, medication, and test results) from the description of the illness, generating structured medical record data. If the task is identified as information quality control, the information quality control expert is invoked to analyze the description of the illness, checking for missing information (such as omission of allergy history or family history), logical contradictions (such as a conflict between the chief complaint of "no hypertension" and the past history of "hypertension for 10 years"), or non-standard expressions (such as the use of non-standard abbreviations). The quality control suggestions are then used as a basis for supplementing or correcting the medical record data, ultimately generating complete medical record data.
[0036] In specific implementations, such as Figure 2As shown, the electronic medical record (EMR) architecture on the left mainly includes: data construction (data collection, cleaning, alignment, and management), model construction (base selection, knowledge fine-tuning, instruction fine-tuning, and parallel training), the core layer of the large EMR model, capability output (medical semantic parsing, knowledge alignment, and key information extraction), and scenario application (EMR generation). The right side shows a specific application example of this architecture, using task routing and information extraction experts to transform a doctor's retelling of a patient's condition into a structured medical record. Specifically, the doctor's retelling of the patient's condition (e.g., "The patient is a middle-aged male with a history of hypertension who fell around 11:00 AM today, hitting his head. The patient is conscious, his vital signs are relatively stable, and the initial diagnosis is trauma") is input into the multi-task large EMR model. The model first classifies the input text through the task classification and routing module. For example, it calculates the probability P(information extraction) of the information extraction task to be 0.8 and the probability P(medical record quality control) of the medical record quality control task to be 0.2, thus routing the current task to the information extraction expert. Subsequently, information extraction experts, combining the pre-trained weights of the large model with their own weights, analyzed the medical semantic information of the patient's condition description. Information was extracted based on key fields in the electronic medical record (including field names, single / multiple choice / text attributes, and options). The model ultimately outputs structured medical record data. For example, the output includes: gender is male, mental status is clear, chief complaint is head injury from a fall, past medical history is hypertension, progress notes are: fell around 11:00 AM today with head impact, initial department is external medicine, and preliminary diagnosis is trauma (fall / sprain).
[0037] In another specific implementation, the model first classifies the input text through a task classification and routing module. For example, it calculates the probability P(information extraction) for an information extraction task to be 0.2 and the probability P(medical record quality control) for a medical record quality control task to be 0.8, thus determining that the current task is an information quality control task. When the task type is an information quality control task, such as... Figure 3As shown, the doctor's restatement of the patient's condition (i.e., the condition description text) is first input into the quality control rule engine for rule matching. The quality control rule engine is pre-configured with several quality control rules to detect common defects in the condition description text, such as missing chief complaint, inconsistencies between the present medical history and the chief complaint, and incomplete key field information. If any rule is matched, the quality control result is directly output, prompting the doctor to supplement or correct the relevant information; if no rule is matched, an information quality control expert is invoked, combining the pre-trained weights of the large model and the quality control expert's weights to analyze the medical semantic information of the condition description text, ultimately outputting the quality control result, including problem identification, modification suggestions, and evidence-based support. Furthermore, doctors can view the modification suggestions and evidence-based support provided by the AI with a single click on the electronic medical record interface. Clicking "Accept" will write the corrected content back to the original medical record to generate medical record data; if the doctor does not accept the modification suggestions, the system prompts them to provide a reason, so that quality control data can be fed back for subsequent fine-tuning and optimization of the model.
[0038] In practical implementation, the ability to recognize medical images (such as handwritten prescriptions, laboratory report photos, and imaging reports) can be enhanced. A multi-task large language model encodes the image into a visual feature vector, which is then fused cross-modally with the semantic encoding vector to aid information extraction (e.g., directly extracting lesion descriptions from imaging reports). Specifically, the input medical image is first preprocessed, including size normalization, contrast enhancement, and noise suppression, to improve image quality. Then, a visual encoder (such as a Vision Transformer or convolutional neural network) maps the preprocessed image into a high-dimensional visual feature vector. Next, the visual feature vector is cross-modally aligned with the semantic encoding vector corresponding to the medical condition description text at the feature level. This can be achieved using a cross-attention mechanism or a multimodal gating fusion network, enabling the model to simultaneously understand medical information in both text and images. Finally, the fused multimodal features are input into the corresponding expert module (information extraction expert or information quality control expert) to achieve more comprehensive medical record data generation or quality control judgment.
[0039] Step 104: Construct electronic medical records based on the medical record data.
[0040] It should be noted that electronic medical records (EMRs) refer to digitized patient medical records that conform to standards such as HL7 or FHIR and are stored in the information system of a medical institution. Building an EMR involves mapping the medical record data generated by the model to the corresponding data tables in the EMR system according to predefined template fields and persistently storing it. The core function of this step is to transform the intermediate results output by the model into formal medical documents that can be used clinically.
[0041] This invention, through its embodiments, inputs a description of a patient's condition into a multi-task large language model, automatically identifies the task type as either information extraction or information quality control, and calls the corresponding expert module for processing to generate medical record data, ultimately constructing an electronic medical record. Thus, on the one hand, it can efficiently extract structured medical record data from the description of the patient's condition; on the other hand, it can perform quality control processing on the description of the condition itself, identifying and highlighting any missing, contradictory, or non-standard elements. This significantly improves the efficiency and standardization of electronic medical record construction without requiring manual, item-by-item entry, effectively reducing information errors and omissions caused by differences in personal experience or memory oversights, improving the completeness and accuracy of medical record data, and achieving end-to-end automated construction from unstructured descriptions of patient conditions to high-quality structured electronic medical records.
[0042] Based on any of the above embodiments, the multi-task large language model includes a feature encoding module and a task routing module; wherein, the step of inputting the medical condition description text into the multi-task large language model and identifying the task type corresponding to the medical condition description text includes: The text describing the illness is input into a multi-task large language model, and the text is processed by the feature encoding module to obtain a semantic encoding vector. The task routing module processes the semantic encoding vector to determine the task type.
[0043] It should be noted that the feature encoding module is an embedding layer responsible for converting the input disease description text into a high-dimensional semantic vector encoding; the task routing module is a lightweight classifier composed of feedforward network layers (FFN). It takes the semantic encoding vector as input, analyzes the semantics of the text to determine the task type (information extraction task or information quality control task), and outputs the task classification result.
[0044] Understandably, during the input encoding stage, the multi-task large language model receives user-input text describing the patient's condition (such as patient descriptions of their condition, consultation dialogues, etc.). The feature encoding module transforms the text into a high-dimensional vector representation through an embedding layer. This embedding layer includes word embeddings, positional embeddings, and other information, converting the original text into a semantic encoding vector containing semantic and positional information. This provides the foundational semantic encoding for subsequent task recognition and feature processing. The task routing module then receives this semantic encoding vector, processes it through a classifier, and outputs a probability distribution of the task type, thereby determining whether the current description of the patient's condition corresponds to an information extraction task or an information quality control task.
[0045] The electronic medical record construction method provided in this invention converts the text describing the patient's condition into a semantic encoding vector through a feature encoding module, and automatically identifies the task type using a task routing module, thereby intelligently separating information extraction tasks from information quality control tasks. This eliminates the need for manual judgment, improving the accuracy of task identification and processing efficiency.
[0046] Based on any of the above embodiments, obtaining the description text of the illness includes: In response to a trigger command, it collects real-time voice information of the target object; The real-time voice information is simultaneously input into the real-time processing channel and the offline processing channel; In the real-time processing channel, the real-time speech information is transcribed in real-time to generate preliminary text; In the offline processing channel, the real-time voice information is subjected to offline enhancement processing to generate enhanced text; Based on the preliminary text and the enhanced text, the description text of the illness is determined.
[0047] It should be noted that the trigger command refers to the control signal issued by the user to start voice acquisition. In the specific implementation, the system supports dual trigger modes: button triggering is suitable for noisy environments, where users can trigger acquisition via physical buttons or touchscreen buttons (such as the virtual voice button on the electronic medical record system interface); wake word triggering is suitable for scenarios where both hands are occupied (such as during surgery), where users can trigger acquisition by saying a preset wake word (such as "start recording"). When either of the above trigger commands is detected, the audio acquisition module is immediately initialized, and audio data is read from the microphone and buffered in frames of fixed duration (such as 20 milliseconds). At the same time, voice activity detection is started. If no valid voice is detected within the preset silence timeout period (such as 5 seconds), acquisition is automatically stopped and resources are released.
[0048] It should be noted that real-time voice information refers to audio stream data continuously received from the microphone without being stored and forwarded. The acquired real-time voice information is split into two paths: one is sent to the real-time processing channel, and the other is sent to the offline processing channel. The two channels execute in parallel without blocking each other.
[0049] In the real-time processing channel, the audio stream is first processed by the VAD (Voice Activity Detection) endpoint detection module. This module uses the FSMN-Monophone VAD model (i.e., a speech activity detection model based on feedforward sequence memory network-monophone) to perform speech endpoint detection. Specifically, the MonophoneVAD model mainly includes an input layer, an FSMN layer, and an output layer. The input layer receives feature parameters of the audio signal (i.e., real-time speech information), such as MFCC (Mel frequency cepstral coefficients) or FBANK (filter bank energy); then, the FSMN layer processes the input features and extracts temporal features through a finite state machine structure (the FSMN layer can effectively capture dynamic changes in the speech signal); finally, the output layer uses the Softmax activation function to output the probability of whether the current moment is a speech activity (1) or an inactivity (0) (i.e., to determine whether it is a speech activity), thereby dynamically identifying the start and end points of the speech and effectively filtering out silent segments. After VAD detection, the real-time channel uses a streaming speech recognition algorithm to incrementally transcribe the effective speech. Each time a certain duration (e.g., 1 second) of audio is accumulated, an incremental recognition is triggered to generate preliminary text. Its core function is to provide instant feedback to meet the interactive needs of doctors' continuous oral narration.
[0050] In the offline processing channel, the system synchronously caches complete audio data. Once the speech ends (triggered by a silence timeout), the system initiates full audio recognition using a non-streaming deep learning algorithm. After recognition, the system further performs offline enhancement processing, including punctuation recovery and text inverse regularization. Punctuation recovery employs a Controllable Time-delay Transformer (CT-Transformer) as the core algorithm. The punctuation-free text output from speech recognition is used as input, encoded with word and position vectors, and then fed into the CT-Transformer model for feature extraction. Finally, the output hidden vectors are fed into a punctuation classifier for punctuation prediction, automatically adding sentence and punctuation marks to improve the readability and structure of the electronic medical record. Text inverse regularization uses WeTextProcessing as the core processing engine to intelligently and structurally transform the raw text output from speech recognition. The engine's processing flow consists of three parts: Tagger (i.e., the annotator / marker) is responsible for parsing the input text to obtain structured information; Reorder (i.e., the reorderer) is responsible for adjusting the order of the structured information; Verbalizer (i.e., the verbalizer) is responsible for piecing together the reordered structured information to standardize special expressions such as numbers and units, thereby ensuring that electronic medical records comply with medical document standards.
[0051] The two channels share the same audio data source but maintain independent states and model instances. For example, a 10-second audio clip, "Male patient, 65 years old, chest pain for one hour," is simultaneously fed into both channels. The real-time channel outputs an intermediate result every second during the speech, while the offline channel performs a one-time recognition of the complete audio after the speech ends, converting "65 years old" to "65 years old" and "one hour" to "1 hour" in the recognition result. Ultimately, the system determines the description of the patient's condition based on both the initial and enhanced text, thus achieving a balance between real-time performance and accuracy.
[0052] The electronic medical record construction method provided in this invention collects real-time voice information in response to trigger commands and utilizes a dual-channel parallel processing architecture. In the real-time channel, preliminary text is rapidly generated to meet immediate interaction needs, while in the offline channel, deep enhancement processing is performed to correct recognition errors. Finally, the dual-channel output results are fused to determine the text describing the patient's condition. This method balances the real-time nature and accuracy of speech transcription, effectively improving the input efficiency and document quality of electronic medical records.
[0053] Based on any of the above embodiments, simultaneously inputting the real-time voice information into the real-time processing channel and the offline processing channel includes: A voiceprint information database is constructed, wherein the voiceprint information database stores multiple voiceprint templates of medical personnel in different acoustic scenarios; Extract voiceprint feature vectors from the real-time voice information, and compare the voiceprint feature vectors with voiceprint templates in the voiceprint information database to determine the comparison result; Based on the comparison results, it is determined whether the target object has passed authentication; When the target object passes authentication, the real-time voice information is simultaneously input into the real-time processing channel and the offline processing channel.
[0054] It should be noted that the voiceprint database is a database storing the voiceprint feature vectors of registered medical personnel. Each feature vector is stored in association with its identity identifier (such as employee ID), department, professional title, registration time, and validity period. Different acoustic scenarios include typical usage environments such as normal clinic volume, voice while wearing a mask, fatigued voice, unstable breathing during exercise, and reading medical terminology. Voiceprint templates refer to the distinctive acoustic feature representations extracted from speech samples in these scenarios. Specifically, using "department-professional title-employee ID" as the unique primary key, it covers all medical personnel with medical record writing permissions. Five different scenario voice packets were collected from the same doctor: ① Normal clinic volume; ② Voice while wearing a mask; ③ Fatigue voice at night; ④ Unsteady voice during brisk ward rounds; ⑤ Reading English terminology.
[0055] Each scenario contains 60 sentences, totaling ≥300 sentences, with each sentence lasting 3-8 seconds. The text content includes commonly used entities in medical records (drugs, test results, and surgery names). The original audio is segmented using a federated learning framework, with the hospital retaining only the encrypted voiceprint template. The original audio is automatically shredded within 7 days to protect personal privacy.
[0056] The system extracts voiceprint vectors based on a voiceprint model (such as ERes2NetV2) and further trains the data on a private GPU cluster in the hospital. Incremental learning is triggered every 180 days. An EER of ≤0.5% is used as the upper limit; if the same doctor fails to register three times, a consultation with a ENT specialist is requested to rule out vocal cord lesions. The final result is a four-tuple consisting of "Doctor ID → Voiceprint Template → Registration Timestamp → Validity Period" for subsequent real-time comparison and retrieval.
[0057] In the specific implementation, while collecting real-time speech information, it is necessary to extract a sufficient length (e.g., more than 3 seconds) of effective speech segment from the real-time speech information and feed it into the same ERes2NetV2 model as in the registration phase to extract the voiceprint feature vector. Then, the cosine similarity between this voiceprint feature vector and all voiceprint templates in the voiceprint information database is calculated to obtain a set of similarity scores. Specifically, after the real-time speech acquisition begins, continuous effective speech is accumulated. When the duration of the effective speech reaches a preset threshold (e.g., 3 seconds), voiceprint feature vector extraction is triggered, and the cosine similarity between the voiceprint feature vector and each voiceprint template in the voiceprint information database is calculated sequentially. The specific calculation formula is as follows: In the formula, n The dimension of the voiceprint feature vector; A This represents the voiceprint feature vector to be identified; The first part represents the voiceprint feature vector A to be identified. One component; B This represents the feature vector of one of the voiceprint templates in the voiceprint information database. Feature vector representing the voiceprint template B The Each component.
[0058] It is understandable that the cosine similarity value ranges from [-1, 1]. In actual voiceprint comparison, since the components of the voiceprint feature vector are usually non-negative, the calculation result falls within the [0, 1] interval. The judgment rule is as follows: Calculate the cosine similarity between the voiceprint feature vector to be identified and all voiceprint templates in the voiceprint database. After obtaining a set of similarity scores, take the highest score (top-1) and its corresponding voiceprint template, and simultaneously record the second highest similarity score (top-2). If both of the following conditions are met (i.e., the highest similarity score is greater than a preset score and the difference between the highest and second highest similarity scores is greater than a preset difference): (1) Top-1 similarity score ≥ 0.45; (2) The difference between top-1 and top-2 is Δ≥0.1.
[0059] At this point, the identity verification is deemed successful, confirming that the speaker is indeed the medical staff member corresponding to the voiceprint template; otherwise, "identity unknown" is returned and recording is terminated, without proceeding to the subsequent real-time or offline processing channels. This strategy effectively balances the accuracy and rejection rate of voiceprint recognition by setting absolute and relative difference thresholds, reducing the risk of false identification and impersonation.
[0060] Understandably, authenticating real-time voice information is a prerequisite for entering dual-channel transcription; only verified real-time voice information will be further transcribed. Specifically, a circular buffer is maintained during audio acquisition. When the VAD detects the start of voice, it begins buffering audio data and simultaneously initiates the voiceprint verification process (using the first 3 seconds of audio). If verification is completed and successful before the end of the voice, buffering continues and subsequent audio is also sent to the dual channels; if verification fails, the buffer is cleared, acquisition stops, and the user is prompted that authentication failed.
[0061] The electronic medical record construction method provided in this invention constructs a voiceprint template library containing voiceprint templates for multiple scenarios, and combines cosine similarity and difference thresholds for decision-making. This effectively resists voice changes and environmental noise, achieving high-precision speaker identification. Simultaneously, the "transcription only after identity verification" condition control avoids the processing of invalid voice and the risk of privacy leaks.
[0062] Based on any of the above embodiments, constructing an electronic medical record based on the medical record data includes: Input the description of the illness into the medical record template classification model to determine the initial medical record type; In response to the confirmation or modification of the initial medical record type by medical staff, the target medical record type is determined; Based on the target medical record type, a target medical record template is selected from the medical record template library; The medical record data is then populated back into the target medical record template to construct an electronic medical record.
[0063] It should be noted that the medical record template classification model is a text classifier based on a deep neural network. Its input is a description of the patient's condition, and its output is a predefined medical record type label (such as "routine medical record," "chest pain medical record," "stroke medical record," "trauma medical record," etc.). The initial medical record type refers to the category automatically predicted by the model and not manually corrected. Medical staff can confirm or manually modify the initial medical record type on the system interface; the corrected type is the target medical record type. Based on the target medical record type, the system retrieves the corresponding electronic medical record template (i.e., the target medical record template) from a pre-set medical record template library. This template defines the field names that need to be processed in subsequent key information extraction stages. Through a collaborative mechanism of "automatic classification by neural network + manual verification by medical staff," the system balances automation efficiency and classification accuracy, precisely locating the field structure required for medical record data backfilling.
[0064] Understandably, backfilling refers to writing the field values from the medical record data generated by the multi-task large language model into the data table of the electronic medical record system according to the field mapping relationship defined in the target medical record template, thereby constructing a complete medical document (i.e., an electronic medical record) that can be viewed, edited, and signed by doctors.
[0065] The electronic medical record construction method provided in this invention improves the accuracy of medical record type determination while ensuring classification efficiency through a collaborative mechanism of "automatic classification by neural networks + manual verification by medical staff". Based on the confirmed target type, it accurately matches medical record templates from the template library and automatically populates the medical record data, effectively reducing the workload of manually selecting templates and filling in data. It adapts to the document differences of different diseases and treatment stages, and improves the standardization and convenience of electronic medical record construction.
[0066] Based on any of the above embodiments, the method further includes: Deploy lightweight small models; In the offline state, the disease description text is processed by the lightweight small model to generate initial medical record data and initial quality control results, and the initial medical record data and initial quality control results are cached in the local storage space; After the network is restored, the initial medical record data and initial quality control results cached in the local storage space are transmitted to the multi-task large language model; The initial medical record data and the initial quality control results are verified using the multi-task large language model to generate verification results; Based on the verification results, the initial medical record data, and the initial quality control results, a target electronic medical record is generated.
[0067] It should be noted that, as Figure 4As shown, the lightweight small model refers to a medically customized small model (such as the medical customized version of TinyBERT and MobileBERT) that is compressed and adapted through model quantization and structural pruning. It comes pre-installed with a medical entity dictionary and a basic quality control rule library, enabling fully localized deployment. When processing the disease description text in a network-off state, the lightweight small model performs the following operations: It quickly extracts core information to generate initial medical record data, including basic patient information (name, age, gender), symptoms and signs, preliminary diagnosis, emergency measures, medication records, etc., and stores it locally in a structured format (such as JSON). Simultaneously, it performs quality control on the generated initial medical record data based on the built-in basic quality control rule library. This quality control includes verification of the completeness of required fields (such as whether a diagnosis or allergy history is missing), verification of format compliance (such as whether the date and medication dosage formats are compliant), and simple logic verification (such as whether the medication dosage for pediatric patients exceeds the standard range for children). It outputs an initial quality control result (such as "Missing allergy history, it is recommended to supplement it") and caches the initial medical record data and the initial quality control result together in the local storage space.
[0068] After network recovery, the initial medical record data and initial quality control results cached in local storage are securely transmitted to the multi-task large language model in the cloud. Specifically, based on medical domain knowledge, the multi-task large language model performs complex logical checks, such as semantic quality control, on the initial medical record data and initial quality control results, generating a check result. If the check result indicates that the initial medical record data and initial quality control results meet the requirements, they are retained as the final result; if the check result indicates that they do not meet the requirements, the initial medical record data and initial quality control results are modified to generate updated medical record data and updated quality control results. The modified information is then returned to medical staff for confirmation and filing, ultimately generating the target electronic medical record.
[0069] The electronic medical record (EMR) construction method provided in this invention achieves rapid local processing during network outages by deploying a lightweight small model, generating initial medical record data and quality control results, and caching them to ensure emergency response capabilities in network outage scenarios such as disasters. After network recovery, the initial data undergoes fine-grained verification, including semantic quality control, through a cloud-based multi-task large model, and the target EMR is generated based on the verification results. This method, through collaborative processing of large and small models, balances availability during network outages with data accuracy after network recovery, effectively improving the robustness and reliability of EMR construction.
[0070] Figure 5 This is the second flowchart illustrating the electronic medical record construction method provided by this invention; as shown... Figure 5 As shown, the multi-task large language model further includes a feature encoding module and a task routing module, and step 103 further includes steps 1031 to 1033: Step 1031: If the task type is an information extraction task, then call the information extraction expert from the expert module to process the disease description text and obtain information extraction features; It should be noted that the information extraction expert is an expert module fine-tuned based on low-rank adaptation (LoRA) technology, specifically designed to extract structured medical record information from disease description text. When the task routing module determines the current task as an information extraction task, the system activates the information extraction expert. This module combines the pre-trained weights of the large model base with its own information extraction expert weights to perform deep semantic analysis on the disease description text, extracting information extraction features related to key fields of the electronic medical record. These features are structured representations of medical entities in the original text, including but not limited to symptoms, signs, disease names, medication information, examination results, and time points.
[0071] Step 1032: If the task type is an information quality control task, then call the information quality control expert from the expert module to process the disease description text and obtain information quality control features; It should be noted that the information quality control expert is an expert module fine-tuned based on low-rank adaptation (LoRA) technology, specifically designed for quality assessment and analysis of medical condition description texts. When the task routing module determines the current task as an information quality control task, the system activates the information quality control expert. This module combines the pre-trained weights of the large model base with its own information quality control expert weights to perform deep semantic analysis on the medical condition description text, extracting information quality control features related to text quality. These features are used to characterize quality problems in the medical condition description text, including but not limited to missing field features (such as failure to mention allergy history or family history), logical contradiction features (such as conflict between the chief complaint and past medical history), and non-standard expression features (such as the use of non-standard abbreviations or colloquial expressions).
[0072] Step 1033: Process the information extraction features or information quality control features through the feature processing module to obtain target features; and generate medical record data based on the target features through the text generation module.
[0073] It should be noted that the feature processing module is used to further process and map information extraction features or information quality control features, converting them into target feature representations that can be adapted by the text generation module. Specifically, the feature processing module may include operations such as feature fusion, feature transformation, and feature filtering: if the input is information extraction features, the feature processing module maps them to structured field features, such as key-value pairs of field names and values; if the input is information quality control features, the feature processing module maps them to quality control result features, such as structured representations of problem type, problem location, and modification suggestions. The text generation module, based on the target features, uses an autoregressive generation method (such as the Transformer decoder) to generate the final natural language text output. For information extraction tasks, it generates structured medical record field text; for information quality control tasks, it generates a quality control report containing problem descriptions and modification suggestions.
[0074] In specific implementations, such as Figure 6 As shown, the multi-task large language model adopts an expert hybrid architecture. First, the medical condition description text is input to the feature encoding layer (Embedding), where the embedding layer transforms the text into a high-dimensional vector representation. This vector is first input to the task routing module, which acts as a classifier to analyze the data and output a task type probability distribution, determining whether the current task is an information extraction task or an information quality control task. Based on the routing result, the corresponding LoRA expert module is immediately activated: if it is an information extraction task, the information extraction expert is invoked; if it is an information quality control task, the information quality control expert is invoked. Subsequently, the activated expert module performs deep processing on the input feature vector. The specific processing flow includes: a self-attention layer, a residual connection normalization layer (Add+Normalize), a feedforward network layer (FFN Layer), and a residual connection normalization layer (Add+Normalize) to fully extract deep semantic features. Finally, the deep semantic features are passed to the output layer to generate the corresponding medical record data (structured medical record fields or quality control results).
[0075] The electronic medical record construction method provided in this invention assigns information extraction experts and information quality control experts to undertake field extraction and quality control verification tasks, respectively. Based on the identified task type, the corresponding experts are invoked to process the data and obtain the relevant task features. These features are then processed by a feature processing module and a text generation module to generate medical record data. This achieves task-driven adaptive invocation of expert modules, enabling the same model to handle both information extraction and information quality control tasks, thereby improving the accuracy and standardization of medical record data generation.
[0076] Based on any of the above embodiments, if the task type is an information extraction task, then an information extraction expert is called from the expert module to process the disease description text and obtain information extraction features, including: When the task type is an information extraction task, the information extraction expert is invoked, and the pre-trained weights and the first low-rank matrix weights within the information extraction expert are combined to perform a low-rank transformation on the disease description text to obtain information extraction features.
[0077] It's important to note that Low-Rank Adaptation (LoRA) technology achieves efficient fine-tuning by introducing a low-rank decomposition matrix alongside the weight matrix of the pre-trained model, without needing to update all pre-training parameters. The information extraction expert internally has a first low-rank matrix, obtained by multiplying two low-rank matrices. One matrix maps the input features to a low-dimensional space, while the other maps the low-dimensional features back to the original dimension. When this expert is invoked, the model maintains its original pre-trained weights while simultaneously using the transformation result of the low-rank matrix as an incremental update. This design allows the model to perform targeted optimization for the information extraction task while retaining the general language knowledge and medical semantic understanding learned during pre-training. Specifically, if the current task is an information extraction task (IE task), key information text is generated, such as "Patient Name: Zhang San, Diagnosis: Type 2 Diabetes, Treatment Plan: Insulin Injection".
[0078] The electronic medical record construction method provided in this invention, when identified as an information extraction task, invokes an information extraction expert and performs a low-rank transformation on the disease description text by combining pre-trained weights and the weights of the first low-rank matrix, thereby obtaining information extraction features. Thus, task adaptation can be achieved by training only a small number of low-rank parameters, significantly reducing computational overhead and storage requirements, while retaining the general medical semantic understanding capabilities of the pre-trained model, improving the efficiency and accuracy of information extraction.
[0079] Based on any of the above embodiments, if the task type is an information quality control task, then an information quality control expert is called from the expert module to process the disease description text and obtain information quality control features, including: When the task type is information quality control task, the information quality control expert is invoked, and the pre-trained weights and the second low-rank matrix weights in the information quality control expert are combined to perform low-rank transformation on the disease description text to obtain information quality control features.
[0080] It's important to note that Low-Rank Adaptation (LoRA) technology achieves efficient fine-tuning by introducing a low-rank decomposition matrix alongside the weight matrix of the pre-trained model, without requiring updates to all pre-training parameters. The information quality control expert internally employs a second low-rank matrix, also obtained by multiplying two low-rank matrices. One matrix maps input features to a low-dimensional space to extract core quality control-related information, while the other maps low-dimensional features back to the original dimension to restore a complete feature representation. When this expert is invoked, the model maintains its original pre-trained weights while simultaneously using the transformation result of the second low-rank matrix as an incremental update. This design allows the model to retain the general language knowledge and medical semantic understanding learned during pre-training, while focusing on targeted optimization for information quality control tasks, concentrating on learning how to identify quality issues such as missing information, logical contradictions, and non-standard expressions in text. Specifically, if the current task is an information quality control task (EMRQA task), quality control suggestion text is generated, such as "Quality control suggestion: The medical record does not record the patient's family medical history and needs to be supplemented."
[0081] The electronic medical record construction method provided in this invention, when identified as an information quality control task, invokes an information quality control expert and performs a low-rank transformation on the medical condition description text by combining pre-trained weights and the weights of the second low-rank matrix, thereby obtaining information quality control features. Thus, only a small number of low-rank parameters need to be trained to achieve efficient adaptation to the quality control task, significantly reducing computational overhead and storage requirements, while retaining the general medical semantic understanding capabilities of the pre-trained model. This allows for accurate identification of missing, contradictory, or non-standard issues in the medical condition description text, improving the accuracy and efficiency of information quality control.
[0082] Based on any of the above embodiments, the step of processing the semantic encoding vector by the information extraction expert or the information quality control expert based on the task type to obtain task adaptation features includes: When the task type is an information extraction task, the information extraction expert is invoked, and the semantic encoding vector is transformed into a low-rank transformation by combining the pre-trained weights and the first low-rank matrix weights in the information extraction expert to obtain the information extraction features. When the task type is information quality control task, the information quality control expert is invoked, and the semantic encoding vector is transformed into a low-rank transformation by combining the pre-trained weights and the weights of the second low-rank matrix in the information quality control expert to obtain information quality control features. Based on the information extraction features or the information quality control features, the task adaptation features are determined.
[0083] It should be noted that, depending on the task type, a parameter-efficient low-rank adaptation (LoRA) strategy can be used for feature transformation to achieve task specialization of the expert module with a very small number of trainable parameters.
[0084] In the specific implementation, when the task routing module determines that the current task type is an information extraction task, the model calls the information extraction expert. This module internally maintains a shared pre-trained weight matrix W0 and independent first low-rank matrix weights, where the first low-rank matrix weights consist of an upper projection matrix and a lower projection matrix. The processing of the semantic encoding vector is as follows: first, the semantic encoding vector is compressed to a low-dimensional space using the lower projection matrix to obtain a low-dimensional intermediate vector; then, the intermediate vector is restored back to the original high-dimensional space using the upper projection matrix to obtain a low-rank update vector; finally, the product of the pre-trained weight matrix and the semantic encoding vector is added to the low-rank update vector to obtain the information extraction features. The entire transformation process only requires training a very small number of parameters in the upper and lower projection matrices, yet it can effectively learn the feature biases specific to the information extraction task.
[0085] In its implementation, when the task type is information quality control, the model invokes an information quality control expert. This module also shares the same pre-trained weight matrix, but is equipped with an independent second low-rank matrix weight. This second low-rank matrix weight is also composed of an upper projection matrix and a lower projection matrix, and its parameters are completely independent of and do not affect the first low-rank matrix weight. The processing of the same semantic encoding vector is as follows: First, the semantic encoding vector is compressed to a low-dimensional space through the lower projection matrix to obtain a low-dimensional intermediate vector; then, the intermediate vector is restored to the original high-dimensional space through the upper projection matrix to obtain a low-rank update vector; finally, the product of the pre-trained weight matrix and the semantic encoding vector is added to the low-rank update vector to obtain the information quality control feature.
[0086] Understandably, unlike information extraction experts, information quality control experts learn feature biases related to the quality control task during training, such as enhancing sensitivity to missing fields and improving the ability to detect contradictory information. Through the above processing, the obtained information quality control features can highlight information on field completeness and logical consistency, providing more suitable feature representations for subsequent feature processing and text generation.
[0087] In practice, personalized low-rank matrix weights can be trained for different doctors or departments, and their preferred writing style and terminology habits can be recorded, so that the generated medical records are more in line with personal style and reduce the amount of manual modification.
[0088] The electronic medical record construction method provided in this invention calls corresponding expert modules for different task types and achieves task specialization with a minimal number of trainable parameters through low-rank transformation. Information extraction experts and information quality control experts share pre-trained weights and maintain only their own independent low-rank matrices. This preserves general semantic knowledge while efficiently learning task-specific feature biases, significantly reducing model storage and computational overhead, and simultaneously improving the accuracy of medical record data generation and task adaptability.
[0089] Based on any of the above embodiments, when the task type is an information quality control task, the information quality control expert is invoked, and the semantic encoding vector is subjected to a low-rank transformation by combining the pre-trained weights and the second low-rank matrix weights within the information quality control expert to obtain information quality control features, including: When the task type is an information quality control task, the built-in quality control configuration library of the information quality control expert is obtained; The pre-trained weights are used to perform a forward transformation on the disease description text to obtain the basic features for quality control. Based on the description of the illness, a medical entity relationship graph is constructed; The quality control basic features are transformed using the weights of the second low-rank matrix to obtain preliminary quality control features. Based on the medical entity relationship graph and the quality control configuration library, the preliminary quality control features are dimensionally adapted to obtain information quality control features.
[0090] It should be noted that when the task routing module determines that the current task type is an information quality control task, it first calls the information quality control expert and retrieves the quality control configuration library built into the module. This configuration library not only includes basic quality control dimensions such as completeness, consistency, format standardization, and terminology standardization, but also allows for further configuration of deeper semantic quality controls such as logical consistency, diagnostic adequacy, drug interactions, and timeliness compliance. This configuration library guides subsequent quality control feature extraction and dimension adaptation, ensuring that the generated features meet the multi-dimensional requirements of medical text quality control. Furthermore, a large language model is used to automatically extract quality control rules from the latest clinical guidelines, expert consensus, and medical insurance policy texts, dynamically updating the quality control configuration library to achieve self-evolution of rules.
[0091] Understandably, after obtaining the quality control configuration library, the pre-trained weights shared by the multi-task large language model can be used to perform a forward transformation on the semantic encoding vector to obtain the basic features of quality control. These pre-trained weights are shared parameters obtained by the large model through pre-training on a general medical corpus, enabling the model to have general medical semantic understanding capabilities, including medical entity recognition, semantic relation extraction, and contextual reasoning.
[0092] Understandably, while or before obtaining the basic features for quality control, medical entities and their relationships are further extracted from the semantic encoding vectors of the disease description text to construct a medical entity relationship graph. Specifically, using the Named Entity Recognition (NER) component in the pre-trained model or a separately deployed medical entity linking tool, entities such as disease, symptoms, drugs, examinations, and surgeries are extracted from the text positions corresponding to the semantic encoding vectors. Then, through a relationship extraction module (such as one based on attention mechanisms or graph convolutional networks), semantic relationships such as "cause," "treatment," "contraindication," and "concurrency" between entities are identified, ultimately forming a directed or undirected graph structure with entities as nodes and relationships as edges.
[0093] Understandably, after obtaining the basic quality control features, a low-rank transformation is performed on these features using the second low-rank matrix weights within the information quality control expert to obtain preliminary quality control features. Specifically, the pre-trained weights remain fixed as shared parameters of the base model, while the second low-rank matrix weights consist of two low-rank matrices with a dimension much smaller than that of the pre-trained weights. The low-rank transformation process involves simultaneously inputting the basic quality control features into both the pre-trained weight path and the low-rank matrix path, then summing the outputs of the two paths to obtain the preliminary quality control features. This transformation, while preserving core quality control information, significantly reduces the number of trainable parameters from the original high-dimensional product level to the sum of the parameters of two low-dimensional matrices. Since the second low-rank matrix weights are trainable parameters unique to the information quality control expert, this transformation achieves task-specific adaptation based on shared pre-trained weights. Only a few parameters need to be updated to adapt the model to the information quality control task, thereby avoiding catastrophic forgetting and significantly reducing computational overhead.
[0094] It should be noted that the dimension adaptation process includes the following sub-steps: First, a graph neural network (such as a graph attention network GAT or a graph convolutional network GCN) is used to encode the medical entity relationship graph, extract the embedding vector of each entity node, and obtain a graph-level representation vector by aggregating neighborhood information; second, this graph representation vector is concatenated or weighted with the preliminary quality control features to inject structured knowledge; then, according to the detection requirements of each dimension (such as completeness, consistency, logic, and timeliness) in the quality control configuration library, targeted linear transformations or nonlinear mappings are performed on the fused features, for example, applying different scaling factors or attention weights to the feature channels corresponding to different quality control dimensions; finally, the final information quality control features are generated through a fully connected layer whose output dimension matches the number of downstream quality control task categories.
[0095] The electronic medical record construction method provided in this invention obtains information quality control features by acquiring a quality control configuration library, enhancing semantic expression based on shared pre-trained weights, generating a medical entity relationship graph, performing dimensionality reduction through low-rank transformation, and combining the graph with the configuration library for dimensionality adaptation. This method, based on shared large-model pre-trained weights, achieves task-specific adaptation through a low-rank matrix, preserving general medical semantic understanding capabilities while reducing computational complexity, thus providing high-quality feature support for medical record quality control.
[0096] Based on any of the above embodiments, the feature processing module includes a self-attention layer, a first residual connection normalization layer, a feedforward network layer, and a second residual connection normalization layer. The step of processing the information extraction features or information quality control features through the feature processing module to obtain the target features includes: The self-attention layer captures semantic dependencies of the information extraction features or information quality control features to obtain attention features. The attention features are subjected to residual connection and layer normalization through the first residual connection normalization layer to obtain the first normalized features; The feedforward features are obtained by performing a nonlinear transformation on the first normalized features through the feedforward network layer. The feedforward features are obtained by performing residual connection and layer normalization on the second residual connection normalization layer.
[0097] It should be noted that when information extraction features or information quality control features are input into the feature processing module, they undergo the following processing in sequence: First, a self-attention layer captures the semantic dependencies between different positions within the feature, enabling the output of each position to aggregate relevant information from the entire sequence and output the attention feature; then, a first residual connection normalization layer (Add & Normalize layer) is passed through this layer. This layer consists of two consecutive operations: residual connection and layer normalization. First, the attention feature is added element-wise to the original information extraction features or information quality control features, allowing the original information to bypass the self-attention layer and be directly transmitted, alleviating the gradient vanishing problem in deep networks. Then, the added result is normalized along the feature dimension, adjusting the feature distribution to have a mean of 0 and a variance of 0. The standard form of 1 is supplemented with learnable scaling and translation to stabilize the feature distribution and accelerate model convergence, resulting in the first normalized feature. Then, the first normalized feature is nonlinearly transformed through a feedforward network layer (FFN layer). First, the feature dimension is expanded to learn richer combination patterns. Nonlinearity is introduced through a nonlinear activation function (such as GELU), and then compressed back to the original dimension to extract high-order semantic features and output the feedforward feature. Finally, the second residual connection normalization layer (another Add&Normalize layer) is passed through the second residual connection normalization layer. Its structure is exactly the same as the first residual connection normalization layer, but the connection objects are different. It adds the feedforward feature to the first normalized feature, so that the incremental information enhanced by the feedforward network is superimposed on the stable basic feature. Then, layer normalization is performed again to obtain the final target feature.
[0098] Understandably, the first residual connection normalization layer is a key sub-layer in the feature processing module, consisting of two consecutive operations: residual connection and layer normalization. The second residual connection normalization layer is another key sub-layer in the feature processing module, also consisting of two consecutive operations: residual connection and layer normalization. Its structure is exactly the same as the first residual connection normalization layer, but its position in the module and the objects it connects to are different.
[0099] The electronic medical record construction method provided in this invention captures semantic dependencies in information extraction features or information quality control features through a self-attention layer, stabilizes feature transmission through a first residual connection normalization layer, enhances nonlinear expression capabilities through a feedforward network layer, and finally outputs target features through a second residual connection normalization layer. This process effectively improves the accuracy and semantic coherence of medical record data generation, making the constructed electronic medical records more in line with clinical documentation standards, while ensuring the stability and convergence efficiency of model training.
[0100] The electronic medical record construction apparatus provided by this invention is described below. The electronic medical record construction apparatus described below can be referred to in correspondence with the electronic medical record construction method described above. For example... Figure 7 As shown, the electronic medical record construction device includes: Module 10 is used to acquire the text describing the patient's condition. The input module 20 is used to input the disease description text into the multi-task large language model and identify the task type corresponding to the disease description text, wherein the task type includes information extraction task and information quality control task; The calling module 30 is used to call the expert module in the multi-task large language model corresponding to the task type to process the disease description text and generate medical record data; Module 40 is used to construct electronic medical records based on the medical record data.
[0101] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, communications interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute an electronic medical record construction method, which includes: acquiring a description of the patient's condition; acquiring a multi-task large language model, wherein the multi-task large language model includes an information extraction expert and an information quality control expert; inputting the description of the patient's condition into the multi-task large language model; processing the description of the patient's condition through the information extraction expert or the information quality control expert to generate medical record data; and constructing an electronic medical record based on the medical record data.
[0102] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0103] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the electronic medical record construction method provided by the above methods. The method includes: acquiring a description of the illness text; acquiring a multi-task large language model, wherein the multi-task large language model includes an information extraction expert and an information quality control expert; inputting the description of the illness text into the multi-task large language model; processing the description of the illness text through the information extraction expert or the information quality control expert to generate medical record data; and constructing an electronic medical record based on the medical record data.
[0104] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the electronic medical record construction method provided by the above methods. The method includes: acquiring a description of a patient's condition; acquiring a multi-task large language model, wherein the multi-task large language model includes an information extraction expert and an information quality control expert; inputting the description of the patient's condition into the multi-task large language model; processing the description of the patient's condition through the information extraction expert or the information quality control expert to generate medical record data; and constructing an electronic medical record based on the medical record data.
[0105] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0106] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these 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 the present invention.
Claims
1. A method for constructing electronic medical records, characterized in that, include: Obtain the text describing the patient's condition; The text describing the illness is input into a multi-task large language model to identify the task type corresponding to the text describing the illness. The task type includes information extraction tasks and information quality control tasks. The expert module corresponding to the task type in the multi-task large language model is invoked to process the disease description text and generate medical record data; Based on the aforementioned medical record data, an electronic medical record is constructed.
2. The electronic medical record construction method according to claim 1, characterized in that, The multi-task large language model includes a feature encoding module and a task routing module; wherein, the step of inputting the medical condition description text into the multi-task large language model and identifying the task type corresponding to the medical condition description text includes: The text describing the illness is input into a multi-task large language model, and the text is processed by the feature encoding module to obtain a semantic encoding vector. The task routing module processes the semantic encoding vector to determine the task type.
3. The electronic medical record construction method according to claim 1, characterized in that, The multi-task large language model includes an expert module, a feature processing module, and a text generation module. The expert module includes an information extraction expert and an information quality control expert. The step of calling the expert module corresponding to the task type in the multi-task large language model to process the medical condition description text and generate medical record data includes: If the task type is an information extraction task, then the information extraction expert is called from the expert module to process the disease description text and obtain information extraction features; If the task type is an information quality control task, then the information quality control expert is called from the expert module to process the disease description text and obtain information quality control features; The feature processing module processes the information extraction features or information quality control features to obtain target features; and the text generation module generates medical record data based on the target features.
4. The electronic medical record construction method according to claim 3, characterized in that, If the task type is an information extraction task, then an information extraction expert is called from the expert module to process the disease description text and obtain information extraction features, including: When the task type is an information extraction task, the information extraction expert is invoked, and the pre-trained weights and the first low-rank matrix weights within the information extraction expert are combined to perform a low-rank transformation on the disease description text to obtain information extraction features.
5. The electronic medical record construction method according to claim 3, characterized in that, If the task type is an information quality control task, then an information quality control expert is called from the expert module to process the disease description text and obtain information quality control features, including: When the task type is information quality control task, the information quality control expert is invoked, and the pre-trained weights and the second low-rank matrix weights in the information quality control expert are combined to perform low-rank transformation on the disease description text to obtain information quality control features.
6. The electronic medical record construction method according to claim 5, characterized in that, When the task type is information quality control, the information quality control expert is invoked, and a low-rank transformation is performed on the disease description text by combining the pre-trained weights and the second low-rank matrix weights within the information quality control expert, to obtain information quality control features, including: When the task type is an information quality control task, the built-in quality control configuration library of the information quality control expert is obtained; The pre-trained weights are used to perform a forward transformation on the disease description text to obtain the basic features for quality control. Based on the description of the illness, a medical entity relationship graph is constructed; The quality control basic features are transformed using the weights of the second low-rank matrix to obtain preliminary quality control features. Based on the medical entity relationship graph and the quality control configuration library, the preliminary quality control features are dimensionally adapted to obtain information quality control features.
7. The electronic medical record construction method according to claim 3, characterized in that, The feature processing module includes a self-attention layer, a first residual connection normalization layer, a feedforward network layer, and a second residual connection normalization layer. The step of processing the information extraction features or information quality control features through the feature processing module to obtain the target features includes: The self-attention layer captures semantic dependencies of the information extraction features or information quality control features to obtain attention features. The attention features are subjected to residual connection and layer normalization through the first residual connection normalization layer to obtain the first normalized features; The feedforward features are obtained by performing a nonlinear transformation on the first normalized features through the feedforward network layer. The feedforward features are obtained by performing residual connection and layer normalization on the second residual connection normalization layer.
8. The electronic medical record construction method according to claim 1, characterized in that, The acquisition of the disease description text includes: In response to a trigger command, it collects real-time voice information of the target object; The real-time voice information is simultaneously input into the real-time processing channel and the offline processing channel; In the real-time processing channel, the real-time speech information is transcribed in real-time to generate preliminary text; In the offline processing channel, the real-time voice information is subjected to offline enhancement processing to generate enhanced text; Based on the preliminary text and the enhanced text, the description text of the illness is determined.
9. The electronic medical record construction method according to claim 8, characterized in that, The step of simultaneously inputting the real-time voice information into both the real-time processing channel and the offline processing channel includes: A voiceprint information database is constructed, wherein the voiceprint information database stores multiple voiceprint templates of medical personnel in different acoustic scenarios; Extract voiceprint feature vectors from the real-time voice information, and compare the voiceprint feature vectors with voiceprint templates in the voiceprint information database to determine the comparison result; Based on the comparison results, it is determined whether the target object has passed authentication; When the target object passes authentication, the real-time voice information is simultaneously input into the real-time processing channel and the offline processing channel.
10. The electronic medical record construction method according to claim 1, characterized in that, The construction of electronic medical records based on the medical record data includes: Input the description of the illness into the medical record template classification model to determine the initial medical record type; In response to the confirmation or modification of the initial medical record type by medical staff, the target medical record type is determined; Based on the target medical record type, a target medical record template is selected from the medical record template library; The medical record data is then populated back into the target medical record template to construct an electronic medical record.
11. The electronic medical record construction method according to claim 1, characterized in that, The method further includes: Deploy lightweight small models; In the offline state, the disease description text is processed by the lightweight small model to generate initial medical record data and initial quality control results, and the initial medical record data and initial quality control results are cached in the local storage space; After the network is restored, the initial medical record data and initial quality control results cached in the local storage space are transmitted to the multi-task large language model; The initial medical record data and the initial quality control results are verified using the multi-task large language model to generate verification results; Based on the verification results, the initial medical record data, and the initial quality control results, a target electronic medical record is generated.
12. An electronic medical record construction device, characterized in that, include: The acquisition module is used to acquire the text describing the patient's condition. The input module is also used to input the disease description text into a multi-task large language model and identify the task type corresponding to the disease description text, wherein the task type includes information extraction tasks and information quality control tasks. The calling module is used to call the expert module in the multi-task large language model corresponding to the task type to process the disease description text and generate medical record data; A construction module is used to construct electronic medical records based on the medical record data.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the electronic medical record construction method as described in any one of claims 1 to 11.
14. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the electronic medical record construction method as described in any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the electronic medical record construction method as described in any one of claims 1 to 11.