An intelligent electronic medical record generation method based on a portable robot

By constructing a medical knowledge graph and using speech recognition technology, the problem of incomplete information linking doctor-patient dialogue records with medical records was solved, realizing the automated conversion from unstructured dialogues to standardized electronic medical records, and improving the quality and utilization efficiency of medical data.

CN120633608BActive Publication Date: 2025-10-21HUNAN HEXIN ANHUA BLOCKCHAIN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511096060.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-10-21
Estimated Expiration
2045-08-06

AI Technical Summary

Technical Problem

Existing technologies lack a medical-specific model for linking doctor-patient dialogue records with medical records, resulting in incomplete or erroneous information extraction, making it impossible to achieve standardized and intelligent management, and affecting the continuity of diagnosis and treatment information.

Method used

A medical knowledge graph is constructed based on the ICD-11 terminology database and real-time data. Through speech recognition and natural language processing technologies, doctor-patient dialogues are transformed into structured text, which is then semantically matched with the knowledge graph and finally converted into standardized electronic medical record data.

Benefits of technology

It has achieved automated conversion from unstructured conversations to standardized electronic medical records, improving the quality and utilization efficiency of medical data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633608B_ABST
    Figure CN120633608B_ABST
Patent Text Reader

Abstract

The application provides an intelligent electronic medical record generation method based on a portable robot, comprising the following steps: firstly, constructing a medical knowledge graph from an ICD-11 term library and real-time data and generating a standardized entity relationship set, and generating a knowledge vector supporting semantic reasoning by using a graph embedding algorithm; then, converting doctor-patient conversation audio into structured text by using a medical voice model, combining the knowledge vector to match the graph entity to generate semantic annotation data; when the matching degree exceeds a dynamic threshold, automatically converting into HL7 FHIR standard data, after automatic checking and compatibility with an existing graph, finally completing electronic medical record synchronous updating through template alignment and API adaptation. The application realizes automatic conversion from unstructured conversation to standardized electronic medical record, and improves the quality and utilization efficiency of medical data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to an intelligent electronic medical record generation method based on a portable robot. Background Art

[0002] The intelligent development of the medical and health sector is of key significance to improving diagnosis and treatment efficiency and patient experience. The combination of portable smart devices and medical knowledge graphs provides an important opportunity for achieving accurate and efficient diagnosis and treatment information management. However, existing solutions still have significant limitations in linking doctor-patient conversation records with medical records. Traditional voice recording systems lack the support of specialized models in the medical field and have difficulty accurately identifying professional terms and complex semantics, resulting in incomplete or erroneous information extraction. Systems based on general knowledge graphs cannot fully adapt to medical scenarios and lack accurate expression of complex relationships between entities such as diseases, symptoms, and drugs, which limits effective docking with hospital information systems. These defects make it impossible to achieve standardized and intelligent management of diagnosis and treatment information, affecting the continuity of patients' subsequent treatment.

[0003] Therefore, how to build a high-quality medical knowledge graph based on the ICD-11 terminology library and real-time data, support portable robots to accurately extract doctor-patient conversation information through dedicated voice models, and achieve standardized docking with electronic medical records and hospital information systems has become a key issue in this study. Summary of the Invention

[0004] To solve the above problems, this application provides an intelligent electronic medical record generation method based on a portable robot, which mainly includes:

[0005] Step S101. The portable robot obtains entity and relationship data from the ICD-11 terminology library and real-time data, constructs a medical knowledge graph containing entities and relationships, and generates a standardized entity relationship set;

[0006] Step S102: Generate a knowledge representation vector supporting semantic reasoning based on the standardized entity relationship set;

[0007] Step S103: Obtain the audio signal of the doctor-patient conversation, transcribe it using a pre-trained medical speech model at a preset audio sampling frequency, and obtain a transcribed text;

[0008] Step S104: Perform word segmentation on the transcribed text, identify the doctor and patient's speech by combining dialogue role annotation, and generate a structured dialogue text;

[0009] Step S105. Using a natural language processing model based on knowledge representation vectors, the structured conversation text is matched with entities and relationships in the medical knowledge graph to generate semantically annotated data.

[0010] Step S106. If the matching degree between the semantically annotated data and the medical knowledge graph exceeds a preset threshold after dynamic threshold adjustment, convert the semantically annotated data into structured medical data in accordance with the HL7 FHIR standard;

[0011] Step S107. Obtain an electronic medical record template, use API adaptation technology to align the structured medical data with the electronic medical record template, generate importable docking preparation data, and then complete the electronic medical record synchronization update based on the docking preparation data to obtain updated electronic medical record data.

[0012] Preferably, the step S101 includes:

[0013] The portable robot obtains disease, symptom, and drug entity and relationship data from the ICD-11 terminology library and real-time data, extracts structured entities using named entity recognition technology, and obtains an initial entity set;

[0014] Semantically aligning the initial entity set through ontology mapping, integrating clinical pathway data, and generating a semantically consistent entity relationship set;

[0015] Obtain medical literature data, extract entity relationships in the literature using text mining technology, and obtain a set of literature entity relationships;

[0016] If the semantically consistent entity relationship set and the document entity relationship set have an intersection, the confidence level is automatically evaluated and high-confidence relationships are prioritized during the merging process to generate a unified entity relationship set.

[0017] For a unified entity relationship set, graph database technology is used to build a medical knowledge graph and generate a structured knowledge graph;

[0018] Through standardized data format conversion, structured knowledge graphs are processed to generate standardized entity relationship sets.

[0019] Preferably, the step S102 includes:

[0020] Acquiring structured data from the standardized entity relationship set and determining a topological structure of the relationship set;

[0021] Using graph embedding algorithms, we generate low-dimensional vector representations for the topological structure and obtain vector representations of nodes and relationships.

[0022] If the dimension of the vector representation is higher than a preset threshold, the vector representation is adjusted using data dimensionality reduction technology to obtain an optimized low-dimensional vector representation, wherein the preset threshold is dynamically adjusted according to different medical scenarios;

[0023] Based on the optimized low-dimensional vector representation, a vector space mapping is constructed to obtain a semantically consistent vector representation;

[0024] For semantically consistent vector representations, perform reasoning logic consistency checks to determine the logical integrity of the knowledge representation vectors.

[0025] Through vector representation quality assessment, the performance indicators of the knowledge representation vector are obtained to determine the vector's ability to support semantic reasoning. If the performance indicators meet the preset threshold, the final knowledge representation vector is output, completing the generation of a vector that supports semantic reasoning.

[0026] Preferably, the step S103 includes:

[0027] The audio signal of the doctor-patient conversation is obtained and an optimized audio signal is generated through a noise reduction algorithm. If the signal-to-noise ratio of the optimized audio signal meets the preset threshold, noise filtering technology is used to further remove background noise to obtain a clear audio signal. Based on the clear audio signal, a pre-trained medical speech model is used for speech recognition to generate an initial transcription text. If the word error rate of the initial transcription text is lower than the preset threshold, the initial transcription text is semantically corrected through text generation technology to obtain a transcribed text.

[0028] Preferably, the step S104 includes:

[0029] Based on the transcribed text, a preprocessing technology is used to remove noise to obtain first text data; the first text data is segmented using a word segmentation granularity control technology to generate second text data; based on the second text data, a dialogue role labeling model is used to identify doctor speeches and patient speeches, and annotated text data is generated based on a real-time feedback mechanism; if there are doctor speeches in the annotated text data, keywords related to the condition are extracted to generate first condition information; if there are patient speeches in the annotated text data, sentences related to the condition description are extracted to generate second condition information; the first condition information and the second condition information are integrated, and the text organization logic is optimized to generate a structured dialogue text.

[0030] Preferably, the step S105 includes:

[0031] Based on the structured dialogue text, word segmentation and syntactic analysis are performed through a natural language processing model to obtain a semantic unit sequence of the structured dialogue text; the semantic unit sequence is converted into a semantic vector using a knowledge representation vector model to generate a semantic vector set of the structured dialogue text; based on the medical knowledge graph, entities in the semantic vector set are matched, and if the vector similarity exceeds a preset threshold, an entity matching result is generated; based on the entity matching result, the relationship in the knowledge graph is extracted, and if the correlation between the relationship vector and the semantic vector set exceeds a preset threshold, a relationship extraction result is generated; based on the entity matching result and the relationship extraction result, semantic annotation data containing entities and relationships is generated; through the accuracy evaluation index, the entity matching accuracy and the relationship extraction accuracy are calculated to obtain an evaluation result, and the parameters of the natural language processing model are optimized based on the evaluation result to obtain optimized semantic annotation data.

[0032] Preferably, step S106 includes: extracting feature vectors from the semantically annotated data through semantic analysis to obtain a feature vector representation; if the knowledge graph matching degree of the feature vector exceeds a preset threshold after dynamic adjustment, verifying the matching degree using a pre-trained graph neural network model to determine a valid matching result; based on the verified valid matching result, converting the semantically annotated data into structured medical data according to the HL7FHIR standard using an FHIR mapping template, and ensuring that no information is lost during the format conversion through a two-way verification mechanism (such as inferring the original semantically annotated data from the FHIR data) to obtain standardized data output.

[0033] Preferably, the step S107 includes:

[0034] The electronic medical record template is obtained from the hospital information system, and the template field definitions and data structure standards are parsed to obtain the template metadata. Structured medical data is obtained through API adaptation technology, and the template metadata is used for field mapping to determine the alignment rules between the medical data and the template. If the medical data fields do not match the template metadata, a data format conversion algorithm (such as JSON to XML conversion) is used to adjust the data structure to obtain intermediate data with consistent format. Data verification logic is executed on the intermediate data. If the data value exceeds the range defined by the template, it is marked as abnormal data, and the verified standard data is obtained. Based on the mapping relationship between the standard data and the template metadata, importable docking preparation data is generated and the data packet is encapsulated using a data transmission protocol. Through system interface adaptation, the import interface of the hospital information system is called, the data packet is transmitted, and the import status is determined to be successful. Feedback on the import status is obtained. If the status is abnormal, a retry mechanism is triggered, and the data packet is retransmitted to obtain data confirmation that the final docking is completed. An exponential backoff strategy is added to the retry mechanism to avoid frequent retries that may cause excessive load on the hospital system. The docking preparation data is transmitted according to the hospital information system interface specifications through real-time message queue technology to complete the synchronous update of the electronic medical record and obtain the updated electronic medical record data.

[0035] The technical solution provided by the embodiments of the present application may include the following beneficial effects: The present application discloses an intelligent electronic medical record generation method based on a portable robot. The method first constructs a medical knowledge graph from multi-source data and generates a knowledge representation vector. Then, through speech recognition and natural language processing technology, the doctor-patient conversation is converted into structured text and semantically matched with the knowledge graph. After the matching result reaches the threshold, it is converted into standardized medical data and connected to the electronic medical record template to realize the automatic update of the electronic medical record. The present application realizes the automated conversion from unstructured conversation to standardized electronic medical records, improving the quality and utilization efficiency of medical data. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a flowchart of a method for generating intelligent electronic medical records based on a portable robot according to the present application.

[0037] Figure 2 This is a schematic diagram of the process of step S104 of this application.

[0038] Figure 3 This is a schematic diagram of the process of step S105 of this application. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of this application clearer, this application is described in detail below with reference to the accompanying drawings and specific embodiments.

[0040] like Figure 1In this embodiment, a method for generating an intelligent electronic medical record based on a portable robot may specifically include:

[0041] S101. Obtain disease, symptom, drug entity and relationship data from the ICD-11 terminology library and real-time data, use the ontology mapping method to integrate clinical pathways and medical literature data, construct a medical knowledge graph containing entities and relationships, and generate a standardized entity relationship set.

[0042] Disease, symptom, and drug entity and relationship data are obtained from the ICD-11 terminology database and real-time data. Named entity recognition technology is used to extract structured entities to obtain an initial entity set. The initial entity set is semantically aligned through ontology mapping methods, and clinical pathway data is integrated to generate a semantically consistent entity relationship set. Medical literature data is obtained, and text mining technology is used to extract entity relationships from the literature to obtain a document entity relationship set. If the semantically consistent entity relationship set and the document entity relationship set intersect, the confidence level is automatically assessed during the merging process, and high-confidence relationships are prioritized to generate a unified entity relationship set. For the unified entity relationship set, a medical knowledge graph is constructed using graph database technology to obtain a structured knowledge graph. The structured knowledge graph is processed through standardized data format conversion to generate a standardized entity relationship set.

[0043] Specifically, disease, symptom, and drug entity and relationship data are obtained from the ICD-11 terminology database and real-time data, ensuring that the data source is authoritative and comprehensive. For example, diseases such as "diabetes" and their symptoms "polyuria and thirst," as well as drugs such as "insulin" and their relationships "treatment" can be extracted from the official ICD-11 database. Structured entities are extracted using named entity recognition technology, often using a pre-trained BERT-based model, to identify entities in text and label their categories. Real-time data includes clinical electronic medical records and the latest medical guidelines.

[0044] In one possible implementation, clinical records are processed to identify "diabetes-polyuria" as a disease-symptom pair, generating an initial entity set consisting of approximately 1,000 entities and 500 relationships. Semantic alignment is then performed using ontology mapping, integrating clinical pathway data to generate a semantically consistent set of entity relationships.

[0045] Preferably, clinical pathway data can provide the "diabetes-insulin-treatment" relationship, supplementing approximately 200 standard relationships and improving data consistency by approximately 30%. Medical literature data is obtained and entity relationships are extracted using text mining technology. For example, the "insulin-diabetes-treatment effect" relationship is mined from PubMed literature to generate a document entity relationship set containing approximately 300 relationships. If the semantically consistent entity relationship set intersects with the document entity relationship set, such as the "diabetes-insulin" relationship, knowledge fusion technology is used to merge them.

[0046] For example, during the merging process, confidence levels are automatically assessed and high-confidence relationships are prioritized. A weighted voting mechanism is used to prioritize high-confidence relationships and eliminate low-quality data. This results in a unified entity relationship set containing approximately 600 relationships, with an accuracy rate of 90%. For this unified entity relationship set, a medical knowledge graph is constructed using graph database technology.

[0047] In one embodiment, Neo4j was used to store the nodes "diabetes" and "insulin" and the edge "treatment," generating a structured knowledge graph containing approximately 800 nodes and 600 edges, improving query efficiency by 50%. Through standardized data format conversion, the structured knowledge graph was processed to generate a standardized set of entity relationships, for example, by converting it to RDF format, ensuring cross-system compatibility.

[0048] S102. Use a graph embedding algorithm on the standardized entity relationship set to generate a low-dimensional vector representation to obtain a knowledge representation vector that supports semantic reasoning.

[0049] In this embodiment, structured data is obtained from an entity-relationship set through normalization, and the topological structure of the relationship set is determined. A graph embedding algorithm is then used to generate a low-dimensional vector representation of the topological structure, resulting in a vector mapping of nodes and relationships. If the dimensionality of the vector mapping exceeds a preset threshold, the vector representation is adjusted using data dimensionality reduction techniques to obtain an optimized low-dimensional vector representation. The preset threshold is dynamically adjusted to suit different medical scenarios. The core concept of dynamic adjustment is to allow the preset threshold to automatically or semi-automatically change based on the specific medical application scenario, data characteristics, or real-time performance feedback. For example, in real-time patient risk warning scenarios, large amounts of patient data streams (newly admitted patients, monitor data) must be processed within milliseconds to hundreds of milliseconds to quickly calculate risk scores. In this case, the preset threshold is set very low (e.g., 32, 64, 128) to prioritize speed and computational resource efficiency. In deep electronic medical record analysis scenarios, historical electronic medical records must be analyzed to explore complex disease subtypes, drug side effect patterns, and long-term prognostic factors, capturing even the most subtle associations. In this case, the preset threshold is set higher (e.g., 256, 512, or even higher) to retain more information. Based on the optimized low-dimensional vector representation, a vector space mapping is constructed to determine whether the mapping captures the relational semantics, resulting in a semantically consistent vector representation. A reasoning logic consistency check is performed on the semantically consistent vector representation to determine the logical integrity of the knowledge representation vector. Through vector representation quality assessment, performance metrics of the knowledge representation vector are obtained to determine its ability to support semantic reasoning. If the performance metrics meet the preset threshold, the final knowledge representation vector is output, completing the generation of a vector that supports semantic reasoning.

[0050] Specifically, in the field of medical knowledge graphs, standardization is key to ensuring the consistency of entity relationship sets. For example, entity relationships for diseases, symptoms, and medications extracted from the ICD-11 terminology library and real-time data may contain multiple expressions, such as "hypertension" and "arterial hypertension." Standardization generates structured data by unifying terminology and mapping these different expressions to standard terms, such as the ICD-11 code "BA00." This approach facilitates subsequent analysis and ensures data consistency.

[0051] Specifically, graph analysis techniques can be used to determine the topological structure of a relationship set.

[0052] For example, for the relationship "high blood pressure - causes - headache," topological analysis would identify "high blood pressure" as the central node, connecting symptom nodes like "headache" to form a directed graph. In practice, the connections between nodes can be represented using an adjacency matrix, where, for example, the edge weight from "high blood pressure" to "headache" is 1. This topological structure provides the foundation for subsequent vector representation.

[0053] Preferably, when the graph embedding algorithm generates a low-dimensional vector representation, the Node2Vec algorithm can be used. Node2Vec captures node neighbor relationships through random walks and represents the "hypertension" node as a 128-dimensional vector.

[0054] In one possible implementation, assuming the initial vector dimension is 128, if the preset threshold is 64, dimensionality reduction is required. Data dimensionality reduction techniques such as principal component analysis can compress the vector dimension to 64, preserving the main semantic information and reducing computational complexity.

[0055] It's understandable that when constructing a vector space mapping, it's necessary to determine whether the semantics of the relationship are captured. For example, "hypertension-cause-headache" and "hypertension-treatment-antihypertensive medication" should have different distances in the vector space. In implementation, cosine similarity can be used to assess semantic consistency between vectors. For example, a vector similarity of 0.8 between "hypertension" and "headache" indicates a close semantic connection. This mapping supports subsequent reasoning.

[0056] In one embodiment, the consistency of inference logic can be verified through rule validation. For example, a rule stipulates that in the "disease-cause-symptom" relationship, symptoms cannot reversely cause the disease. During verification, if "headache-cause-high blood pressure" is found, it is marked as a logical error and requires correction. This verification ensures the logical integrity of the knowledge representation.

[0057] It's important to note that vector representation quality assessment uses performance metrics to determine reasoning capabilities. For example, the evaluation metric includes the F1 score. Assuming the F1 score for reasoning about the "high blood pressure" relationship is 0.9, which is higher than the preset threshold of 0.85, it indicates that the vector supports efficient semantic reasoning. This can be verified in practice using a test set. For example, if the input "high blood pressure" is used to query related symptoms, the output "headache" and "dizziness" are accurate.

[0058] S103: Obtain the audio signal of the doctor-patient conversation, use a pre-trained medical speech model combined with noise filtering technology, transcribe it according to the preset audio sampling frequency, and obtain an initial transcription text.

[0059] In this embodiment, an audio signal of a doctor-patient conversation is obtained, preprocessed using signal processing techniques, and then generated using a noise reduction algorithm to optimize the audio signal. If the signal-to-noise ratio of the optimized audio signal meets a preset threshold, noise filtering techniques are used to further remove background noise, resulting in a clear audio signal. Based on the clear audio signal, speech recognition is performed using a pretrained medical speech model to generate an initial transcript. If the word error rate of the initial transcript falls below a preset threshold, semantic correction is performed on the initial transcript using text generation techniques to generate a corrected transcript.

[0060] For example, when acquiring audio signals from doctor-patient conversations, the original audio is typically collected using professional recording equipment or a mobile device microphone, with a sampling rate set to 16kHz to ensure speech clarity. The signal may contain ambient noise, such as footsteps in hospital corridors or the sound of equipment running. When using signal processing technology for preprocessing, spectral analysis methods can be used to separate speech from noise. For example, short-time Fourier transform is used to decompose the audio into the frequency domain, identify and attenuate non-speech frequency components, and generate a preliminary optimized audio signal.

[0061] In one possible implementation, the noise reduction algorithm can use adaptive filtering techniques, such as a minimum mean square error (MSS) filter, to process audio with a signal-to-noise ratio (SNR) below 10dB. If the SNR of the optimized audio signal reaches 15dB or higher, meeting a preset threshold, further noise filtering techniques are applied.

[0062] Specifically, spectral subtraction can be used to remove residual background noise, such as the low-frequency hum of an air conditioner, to produce a clear audio signal. This step significantly improves speech recognition accuracy.

[0063] It should be noted that pre-trained medical speech models, such as those based on the Transformer architecture and optimized for medical terminology, can be used during the speech recognition phase. For example, the model can accurately identify specialized terms such as "electrocardiogram abnormality" or "antibiotic treatment." If the word error rate of the initial transcription is below 5%, the system enters the semantic correction phase. Semantic correction corrects recognition errors through contextual analysis. For example, if "irregular heartbeat" is mistakenly recognized as "incomplete heartbeat," it will automatically correct the error based on the context of the preceding and following sentences.

[0064] S104. For the initial transcription text, word segmentation is performed using word segmentation granularity control technology, and combined with dialogue role annotation, the doctor and patient's speeches are identified to generate a structured dialogue text containing a description of the condition.

[0065] In this embodiment, Figure 2 This is a schematic flow diagram of step S104 in this embodiment. The initial transcription text is obtained, and the preprocessing technology is used to remove noise to obtain the first text data. The first text data is segmented by the word segmentation granularity control technology to generate the second text data. The dialogue role annotation model is used to analyze the second text data, identify the doctor's speech and the patient's speech, and obtain the annotated text data based on the real-time feedback mechanism. If there are doctor's speeches in the annotated text data, the keywords related to the condition are extracted to generate the first condition information. If there are patient speeches in the annotated text data, the semantic content is analyzed, and the sentences related to the condition description are extracted to generate the second condition information. The first condition information and the second condition information are integrated through the text organization algorithm to generate a structured dialogue text. Based on the structured dialogue text, the content analysis technology is used to optimize the text organization logic to obtain the final dialogue text.

[0066] Specifically, the purpose of obtaining annotated text data based on the real-time feedback mechanism is to dynamically correct annotation errors and continuously optimize the model. For example, in the original audio clip: Doctor: "How often have my chest pain attacks occurred recently?" Patient: "I had three last week, each lasting about two minutes." Doctor: "Is it getting worse or better compared to before?" Patient: "It seems... (coughing)...more frequent" (the model mistakenly identified the patient's cough as the doctor's speech). The entire real-time feedback process includes initial annotation and confidence level checking; prompts on the doctor's terminal interface; and corrections by the doctor, triggered by pressing the F1 key.

[0067] Specifically, after obtaining the initial transcript, preprocessing techniques are needed to remove noise and generate the first text data. For example, in a doctor-patient conversation scenario, the initial transcript may contain irrelevant words due to environmental noise or speech overlap. Preprocessing techniques can include text cleaning methods.

[0068] Specifically, regular expressions are used to filter out non-semantic characters, such as colloquial pause words like "hmm" and "ah," or word frequency analysis is used to eliminate low-frequency noise words, retaining medical-related semantic content.

[0069] For example, in a transcribed text "The patient... um... has a severe headache...", after cleaning, the first text data "The patient has a severe headache" is obtained, ensuring that the data for subsequent processing is purer. Using the word segmentation granularity control technology, the first text data is segmented to generate the second text data.

[0070] It is understandable that the word segmentation granularity control requires adjusting the word segmentation rules according to the medical scenario.

[0071] Preferably, a word segmentation model based on a medical vocabulary is used to segment "headache is very severe" into "headache / very / severe", avoiding splitting "headache" into "head / pain".

[0072] In one embodiment, if a conversation involves complex terms such as "increased intracranial pressure," a pre-trained medical word segmentation model can be used to ensure term integrity, generating more accurate second text data for subsequent analysis. A conversation role annotation model is used to analyze the second text data, identify the doctor and patient's speech, and generate annotated text data.

[0073] Specifically, the pre-trained BERT model can be used, combined with contextual semantics, to label "Doctor: CT scan recommended" and "Patient: I have had a headache for three days" as different roles.

[0074] For example, in a conversation like "Doctor: What are your recent symptoms? Patient: I've had a headache for three days," the model outputs annotated text data to clearly distinguish the roles and facilitate subsequent information extraction. If the annotated text data contains a doctor's speech, keywords related to the condition are extracted to generate the first condition information.

[0075] In one possible implementation, keyword matching technology, combined with a medical knowledge graph, can be used to extract keywords such as "CT scan" and "inflammation." For example, a doctor's statement, "It is recommended to check for inflammation," can generate the primary condition information, "Inflammation examination," providing a basis for subsequent diagnosis. If patient statements are present in the annotated text data, their semantic content can be analyzed to extract sentences related to the condition description, generating the secondary condition information.

[0076] It should be noted that semantic analysis models, such as the TextRank algorithm, can be used to extract the key phrase "headache for three days, accompanied by nausea" from the patient's statement "headache for three days, accompanied by nausea" to generate secondary condition information, ensuring that the patient's chief complaint is accurately recorded. Through a text organization algorithm, the primary and secondary condition information are integrated to generate structured conversation text. For example, "inflammation examination" and "headache for three days accompanied by nausea" can be integrated into "Patient's chief complaint: headache for three days, accompanied by nausea; doctor's advice: check for inflammation," forming a logically clear and structured text.

[0077] In one embodiment, template filling technology can be used to organize information into a "main complaint-suggestion" format to improve text readability. Based on the structured dialogue text, content analysis technology is used to optimize the text organization logic to obtain the final dialogue text.

[0078] Preferably, dependency parsing can be used to adjust the order of sentences and ensure logical flow. For example, optimizing "Check for inflammation, the patient has had a headache for three days" to "The patient has had a headache for three days, it is recommended to check for inflammation" makes the final dialogue text more consistent with the narrative habits of medical records and easier to use in clinical practice.

[0079] S105. For structured conversation text, a natural language processing model based on knowledge representation vector is used to match entities and relationships in the medical knowledge graph. The entity matching accuracy and relationship extraction accuracy are evaluated to generate semantically annotated data.

[0080] In this embodiment, Figure 3 This is a schematic diagram of the process of step S105 of this embodiment. A structured conversation text is obtained, and word segmentation and syntactic analysis are performed through a natural language processing model to obtain a sequence of semantic units of the conversation text. A knowledge representation vector model is used to convert the sequence of semantic units into a vector representation to obtain a semantic vector set of the conversation text. Through the medical knowledge graph, entities in the semantic vector set are matched. If the vector similarity exceeds a preset threshold, the matching entity is determined to obtain an entity matching result. Based on the entity matching result, the relationship in the knowledge graph is extracted. If the correlation between the relationship vector and the semantic vector set exceeds a preset threshold, the relationship is judged to be valid, and a relationship extraction result is obtained. Based on the entity matching result and the relationship extraction result, semantic annotation data is generated to obtain an annotation data set containing entities and relationships. Through the precision evaluation index, the entity matching accuracy and the relationship extraction accuracy are calculated to obtain an evaluation result. The evaluation result is used to optimize the parameters of the natural language processing model, update the knowledge representation vector, and obtain optimized semantic annotation data.

[0081] For example, in the field of medical conversation analysis, after obtaining structured conversation text, word segmentation and syntactic analysis can be performed through a natural language processing model. Word segmentation breaks down the conversation text into the smallest semantic units. For example, "the patient describes chest pain" can be divided into "patient," "description," and "chest pain." Syntactic analysis identifies sentence structure, such as subject-verb-object relationships, and generates a sequence of semantic units. For example, a patient says, "I had chest pain lasting two hours last night." After word segmentation, it becomes "I / last night / chest pain / lasting / two hours." Syntactic analysis confirms that "chest pain" is the core symptom description and generates a sequence of semantic units. This process ensures that the semantic structure of the conversation content is clear, facilitating subsequent analysis.

[0082] In one possible implementation, the knowledge representation vector model converts a sequence of semantic units into a vector representation. Each semantic unit is mapped to a high-dimensional vector, capturing the semantic relationships between words. For example, "chest pain" might be mapped to the vector [0.73, -0.12, ...], and "angina pectoris" to [0.71, -0.15, ...]. These two vectors are close due to their semantic similarity. A set of semantic vectors is generated for the entire sequence of semantic units in the conversation text, preserving the contextual relationships. This vector representation facilitates semantic matching with the knowledge graph, enhancing the accuracy of information extraction.

[0083] Specifically, the medical knowledge graph is used to match entities in a semantic vector set. The knowledge graph contains nodes such as diseases, symptoms, and medications, and their relationships. For example, "chest pain" and "myocardial infarction" are connected through the "symptom-disease" relationship. If the similarity between the "chest pain" vector and the vector of the "chest pain" node in the graph exceeds 0.85, the match is confirmed to be successful, and an entity matching result is generated. For example, if a patient describes "chest pain accompanied by sweating," the two entities "chest pain" and "sweating" will be matched. This matching method leverages the structured knowledge of the graph to improve the reliability of entity recognition.

[0084] Preferably, relationship extraction is performed based on entity matching results. If the correlation between the relationship vector of "chest pain" and "myocardial infarction" in the knowledge graph and the semantic vector set exceeds 0.9, the relationship is confirmed to be valid. For example, the "chest pain" in the patient's speech and the "myocardial infarction" mentioned by the doctor are associated through semantic vectors, and the "chest pain-possible diagnosis-myocardial infarction" relationship is extracted. The relationship extraction results provide a basis for subsequent semantic annotation, ensuring that the output structured data contains complete relationship information.

[0085] In one embodiment, semantically annotated data is generated based on entity matching and relationship extraction results. For example, a labeled dataset might include "entity: chest pain, relationship: possible diagnosis, target entity: myocardial infarction." This type of annotated data clearly describes the key information in the conversation, facilitating the generation of structured medical reports.

[0086] It's important to note that the annotation process relies on the accuracy of the preceding steps; deviations in any step can impact the final data quality. For example, precision evaluation metrics are used to assess the accuracy of entity matching and relationship extraction. Entity matching accuracy is calculated by comparing the overlap between predicted entities and actual entities. For example, if 90 of 100 entities are predicted and correctly matched, the accuracy is 90%. Relationship extraction accuracy is similarly evaluated, assessing the degree of match between predicted and actual relationships. These evaluation results guide model optimization and ensure the reliability of subsequent analysis.

[0087] It's understandable that natural language processing model parameters are optimized based on the evaluation results. For example, if entity matching accuracy is low, the threshold of the word segmentation model or the training data of the vector model can be adjusted. The updated knowledge representation vector further improves the quality of the semantically annotated data.

[0088] S106. If the matching degree between the semantically annotated data and the knowledge graph exceeds the preset threshold after the dynamic threshold adjustment, the semantically annotated data is converted into structured medical data in accordance with the HL7 FHIR standard using the FHIR mapping template.

[0089] In this embodiment, semantic analysis extracts feature vectors from semantically annotated data to generate a feature representation. If the knowledge graph match of the feature vector exceeds a dynamically adjusted preset threshold, a pre-trained graph neural network model is used to verify the match and determine a valid match. Based on the verified valid match, the semantically annotated data is converted into structured medical data according to the HL7 FHIR standard using an FHIR mapping template, resulting in standardized data output.

[0090] For example, the process of extracting feature vectors from semantically annotated data can be understood as converting complex medical conversation text into a computable mathematical representation. Semantically annotated data typically contains conversations between doctors and patients, such as symptom descriptions or diagnostic recommendations. A pre-trained natural language processing model, such as BERT, is used to perform word segmentation and semantic analysis on the conversation text, generating a feature vector for each semantic unit.

[0091] In one possible implementation, the knowledge graph matching calculation for feature vectors relies on a medical knowledge graph, such as a graph database containing relationships between diseases, symptoms, and treatments. A dynamically adjusted preset threshold can be automatically optimized based on the data distribution. For example, if the initial threshold is set to 0.85 and the similarity between a feature vector and the "myocardial infarction" node in the knowledge graph is 0.87, the match is considered to exceed the dynamically adjusted preset threshold.

[0092] A pre-trained graph neural network model is used to verify the matching degree. Graph neural networks enhance the robustness of matching by aggregating information from neighboring nodes in the knowledge graph. For example, when verifying whether "chest pain" is related to "myocardial infarction," the model analyzes the strength of the association between "chest pain" and neighboring nodes such as "angina pectoris" and "abnormal heart rate" in the graph. If the verification passes, the match result is valid. This approach effectively reduces errors caused by semantic ambiguity.

[0093] The FHIR mapping template converts semantically annotated data into the HL7 FHIR standard format. The FHIR template defines a standardized resource structure, such as a Condition resource that records disease information. For example, if the input data is "patient diagnosed with myocardial infarction," the template mapping generates FHIRJSON data containing the patient ID and the ICD-10 diagnosis code I21.9. This standardized output facilitates cross-system sharing and promotes data interoperability.

[0094] S107. Obtain the electronic medical record template from the hospital information system, use API adaptation technology to align the structured medical data with the template, ensure data structure consistency, and generate importable docking preparation data.

[0095] In this embodiment, an electronic medical record template is obtained from a hospital information system, and the template field definitions and data structure standards are parsed to obtain template metadata. Structured medical data is obtained through API adaptation technology, and field mapping is performed using the template metadata to determine the alignment rules between the medical data and the template. If the medical data fields do not match the template metadata, a data format conversion algorithm (such as JSON to XML conversion) is used to adjust the data structure to obtain intermediate data with a consistent format. Data validation logic is executed on the intermediate data, and if the data value exceeds the range defined by the template, it is marked as abnormal data. A real-time alert is triggered for the marked abnormal data (such as a value outside the template range), and the clinical knowledge base is linked to provide possible explanations of the cause.

[0096] Based on the mapping relationship between standard data and template metadata, importable docking preparation data is generated, and the data packet is encapsulated using the data transmission protocol; through system interface adaptation, the import interface of the hospital information system is called, the data packet is transmitted, and the success of the import is determined; feedback on the import status is obtained, and if the status is abnormal, the retry mechanism is triggered, the data packet is retransmitted, and the final data confirmation of the completion of the docking is obtained; after automatically verifying the compatibility with the existing map, the docking preparation data is transmitted according to the hospital information system interface specification through real-time message queue technology, the electronic medical record synchronization update is completed, and the updated electronic medical record data is obtained.

[0097] For example, obtaining an electronic medical record template from a hospital information system typically involves parsing a standardized template file, such as one based on HL7 CDA. The template contains field definitions, such as patient name, diagnosis code, and examination time, as well as data types and length restrictions. The parsing process extracts metadata using an XML parser, generating key-value pairs for field names, types, and constraints. For example, one template specifies that the "diagnosis code" field must be an ICD-10 code with a length of 3-7 characters. After parsing, the metadata is stored in JSON format for easy subsequent mapping.

[0098] In one possible implementation, when acquiring structured medical data through API adaptation technology, a RESTful API can be used to extract JSON-formatted patient records from a hospital database. For example, the API returns data containing the patient ID, diagnosis code, and test results. During the field mapping phase, the "diagnosis code" in the template metadata is aligned with the "diagnosis_code" returned by the API, using a direct name matching rule. If the field name is inconsistent, such as when the API returns "diag_code," semantic alignment is performed using a predefined synonym table. The mapping rules ensure a one-to-one correspondence between the data fields and the template.

[0099] Specifically, if the medical data fields do not match the template metadata, for example, if the API returns JSON format but the template requires XML, a data format conversion algorithm is used, such as using an XSLT transformation tool to convert the JSON data into an XML structure.

[0100] Specifically, the "patient_name" field in JSON is converted to XML <patient> <name>Tags keep the data semantics unchanged. After conversion, the intermediate data is consistent with the template format, which facilitates subsequent verification.

[0101] Optimally, data validation logic checks whether intermediate data conforms to template constraints. For example, if the template requires the "Body Temperature" field to be within the range of 35.0-42.0 degrees Celsius, a data value of 42.5 is marked as abnormal. The validation process records abnormal fields and values, such as "Body Temperature: 42.5, exceeds the upper limit," and generates standard data. This step ensures data compliance and improves the success rate of import.

[0102] For example, the "diagnosis code" from a patient record is populated into the ICD-10 field of the template, generating an HL7-formatted data packet. This data packet is encapsulated using the FHIR standard, containing patient information and metadata for easy system identification. The data packet is transmitted using HL7v2.x over TCP / IP.

[0103] In one embodiment, when calling the hospital information system import interface, a data packet is pushed using the SOAP protocol. The interface returns the import status, such as "success" or "failed: field missing." If the status is abnormal, a retry mechanism is triggered, resending the data packet for up to three attempts. The retry interval is set to 5 seconds to avoid system overload, and the data import is finally confirmed to be successful.

[0104] Message queue technology is used in medical data processing to efficiently obtain and prepare data. For example, in hospital information systems, message queues can use RabbitMQ to implement asynchronous data transmission.

[0105] For example, after an electronic medical record system generates patient medical records, the data is pushed to a queue in JSON format. The queue manager ensures that the data arrives in order at the processing module. When parsing the data format, it checks whether the JSON structure contains necessary fields, such as patient ID, treatment time, and diagnosis results. If any fields are missing, the data is marked as incomplete, logged, and the data provider is notified to supplement.

[0106] In one possible implementation, data integrity is determined based on predefined validation rules. Specifically, the system verifies that the data contains all required fields and that the field values ​​conform to the specifications, such as the YYYY-MM-DD format for treatment times. If the data is complete, it is marked as pending transmission. Hospital information system interface specifications typically require data to comply with the HL7 standard, so JSON format must be converted to XML.

[0107] Preferably, the conversion tool can parse the patient information fields in JSON and map them to HL7 PID segments to generate standardized transmission data. When transmitting data using queue technology, Kafka is used to ensure high throughput and reliability.

[0108] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include such modifications and variations.< / name> < / patient>

Claims

1. A method for generating intelligent electronic medical records based on a portable robot, characterized in that: The method comprises the following steps: S101, the portable robot obtains entity and relationship data from the ICD-11 terminology library and real-time data, constructs a medical knowledge graph containing entities and relationships, and generates a standardized entity relationship set; S102, generating a knowledge representation vector supporting semantic reasoning based on the standardized entity relationship set; S103, obtaining an audio signal of a doctor-patient conversation, and transcribing it using a pre-trained medical speech model at a preset audio sampling frequency to obtain a transcribed text; S104: performing word segmentation processing on the transcribed text, identifying the doctor and patient's speech in combination with dialogue role annotation, and generating a structured dialogue text; S105, using a natural language processing model based on knowledge representation vectors for the structured conversation text, matching entities and relationships in the medical knowledge graph to generate semantically annotated data; S106, if the matching degree between the semantically annotated data and the medical knowledge graph exceeds a preset threshold value after dynamic threshold adjustment, converting the semantically annotated data into structured medical data in accordance with the HL7 FHIR standard; S107, obtaining an electronic medical record template, aligning the structured medical data with the electronic medical record template using API adaptation technology, generating importable docking preparation data, and then completing a synchronous update of the electronic medical record based on the docking preparation data to obtain updated electronic medical record data; The step S102 includes: Acquiring structured data from the standardized entity relationship set and determining a topological structure of the relationship set; Using graph embedding algorithms, we generate low-dimensional vector representations for the topological structure and obtain vector representations of nodes and relationships. If the dimension of the vector representation is higher than a preset threshold, the vector representation is adjusted using data dimensionality reduction technology to obtain an optimized low-dimensional vector representation, wherein the preset threshold is dynamically adjusted according to different medical scenarios; Based on the optimized low-dimensional vector representation, a vector space mapping is constructed to obtain a semantically consistent vector representation; For semantically consistent vector representations, perform reasoning logic consistency checks to determine the logical integrity of the knowledge representation vectors. Through vector representation quality assessment, the performance indicators of the knowledge representation vector are obtained to determine the vector's ability to support semantic reasoning. If the performance indicators meet the preset threshold, the final knowledge representation vector is output, completing the generation of a vector that supports semantic reasoning. The step S105 includes: Based on the structured dialogue text, performing word segmentation and syntactic analysis using a natural language processing model to obtain a semantic unit sequence of the structured dialogue text; Converting the semantic unit sequence into a semantic vector using a knowledge representation vector model to generate a semantic vector set of the structured dialogue text; Based on the medical knowledge graph, matching entities in the semantic vector set, if the vector similarity exceeds a preset threshold, generating an entity matching result; Based on the entity matching results, the relationship in the knowledge graph is extracted. If the correlation between the relationship vector and the semantic vector set exceeds the preset threshold, the relationship extraction result is generated; Generate semantic annotation data containing entities and relationships based on entity matching results and relationship extraction results; The entity matching accuracy and relationship extraction accuracy are calculated through the precision evaluation index to obtain the evaluation results. The parameters of the natural language processing model are optimized based on the evaluation results to obtain the optimized semantic annotation data.

2. The method according to claim 1, characterized in that The step S101 includes: The portable robot obtains disease, symptom, and drug entity and relationship data from the ICD-11 terminology library and real-time data, extracts structured entities using named entity recognition technology, and obtains an initial entity set; Semantically aligning the initial entity set through ontology mapping, integrating clinical pathway data, and generating a semantically consistent entity relationship set; Obtain medical literature data, extract entity relationships in the literature using text mining technology, and obtain a set of literature entity relationships; If the semantically consistent entity relationship set and the document entity relationship set have an intersection, the confidence level is automatically evaluated and high-confidence relationships are prioritized during the merging process to generate a unified entity relationship set. For a unified entity relationship set, graph database technology is used to build a medical knowledge graph and generate a structured knowledge graph; Through standardized data format conversion, structured knowledge graphs are processed to generate standardized entity relationship sets.

3. The method according to claim 1, characterized in that The step S103 includes: Obtain audio signals of doctor-patient conversations and generate optimized audio signals through noise reduction algorithms; If the signal-to-noise ratio of the optimized audio signal meets the preset threshold, noise filtering technology is used to further remove background noise to obtain a clear audio signal; Based on the clear audio signal, a pre-trained medical speech model is used for speech recognition to generate initial transcription text; If the word error rate of the initial transcription text is lower than a preset threshold, the initial transcription text is semantically corrected using text generation technology to obtain a transcribed text.

4. The method according to claim 1, wherein The step S104 includes: Based on the transcribed text, a preprocessing technology is used to remove noise to obtain first text data; Performing word segmentation processing on the first text data using a word segmentation granularity control technology to generate second text data; Based on the second text data, a dialogue role labeling model is used to identify the doctor's speech and the patient's speech, and annotated text data is generated based on a real-time feedback mechanism; If there are doctor speeches in the annotated text data, keywords related to the condition are extracted to generate first condition information; if there are patient speeches in the annotated text data, sentences related to the condition description are extracted to generate second condition information; The first condition information and the second condition information are integrated, and the text organization logic is optimized to generate a structured dialogue text.

5. The method according to claim 1, wherein The step S106 includes: Extract feature vectors from semantically annotated data through semantic analysis to obtain feature vector representation; If the knowledge graph matching degree of the feature vector exceeds the preset threshold after dynamic adjustment, the pre-trained graph neural network model is used to verify the matching degree and determine the valid matching result; According to the verified valid matching results, the FHIR mapping template is used to convert the semantically annotated data into structured medical data according to the HL7FHIR standard to obtain standardized data output.

6. The method according to claim 1, characterized in that The step S107 includes: Obtain electronic medical record templates from the hospital information system, parse the template field definitions and data structure standards, and obtain template metadata; Through API adaptation technology, structured medical data is obtained, and template metadata is used for field mapping to determine the alignment rules between medical data and templates; If the medical data fields do not match the template metadata, a data format conversion algorithm is used to adjust the data structure to obtain intermediate data with the same format; For the intermediate data, the data verification logic is executed. If the data value exceeds the range defined by the template, it is marked as abnormal data and the verified standard data is obtained; Generate importable docking preparation data based on the mapping relationship between standard data and template metadata, and encapsulate the data package using the data transmission protocol; Through system interface adaptation, call the import interface of the hospital information system, transmit data packets, and determine whether the import status is successful; Obtain import status feedback. If the status is abnormal, trigger the retry mechanism and retransmit the data packet to obtain final data confirmation of docking completion. Through real-time message queue technology, the docking preparation data is transmitted according to the hospital information system interface specifications, the electronic medical record synchronization update is completed, and the updated electronic medical record data is obtained.

Citation Information

Patent Citations

  • Traditional Chinese medicine knowledge graph fusion system based on semantic alignment

    CN120600343A