A method and system for generating nursing medical records
Through the bidirectional text vectorization model and cosine similarity calculation, combined with the application of semantic correlation list, the problems of insufficient semantic information capture and lack of information screening mechanism in the traditional nursing medical record generation method are solved, and efficient and accurate nursing medical record generation is achieved , improves generation efficiency and quality.
Patent Information
- Application Number
- CN202411441858.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-16
AI Technical Summary
Traditional nursing medical record generation methods are difficult to effectively capture the deep semantic information of text, and the complexity and diversity of processing medical texts are limited, lack of comprehensive considerations of overall semantics and local semantics, and lack of intelligent information screening mechanisms, resulting in the generated medical record list. Unstable quality.
Using a two-way text vectorization model, the patient text data and nursing medical record templates are converted into vector space. By calculating the cosine similarity between the text average word vector and the template library word vector, the most matching template is selected, and the semantic correlation list is performed. Field fill.
It realizes efficient and accurate nursing medical record generation, which not only captures the overall semantic structure, but also identifies detailed information, improves the accuracy and applicability of medical record, and significantly improves the generation efficiency and quality.
Smart Images

Figure CN118969163B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of nursing medical record generation, and in particular to a nursing medical record generation method and system. Background Art
[0002] There are many technical problems in the traditional method and system of generating nursing medical records.
[0003] First, these systems usually adopt simple keyword matching or rule-based methods, which cannot effectively capture the deep semantic information of the text, resulting in low accuracy in template selection and information filling.
[0004] Secondly, traditional methods have difficulty handling the complexity and diversity of medical texts. They can often only process structured data and have limited processing capabilities for unstructured texts. Furthermore, these systems lack comprehensive consideration of overall semantics and local semantics, and are unable to grasp the overall semantic structure of the text while retaining detailed information. In addition, traditional methods lack a flexible semantic relevance evaluation mechanism during information extraction and filling, and are prone to introducing irrelevant or inaccurate information. At the same time, these systems usually do not establish an effective text-vector mapping relationship, making it difficult to achieve accurate information tracing and context understanding.
[0005] Finally, traditional methods lack an intelligent information screening mechanism and are unable to automatically adjust the importance of filled content based on semantic relevance, which results in unstable quality of generated medical records and makes it difficult to meet the high efficiency and high accuracy requirements of modern medical practice.
[0006] The above technical problems combined have severely limited the efficiency and practicality of the traditional nursing medical record generation system. Summary of the invention
[0007] The purpose of the present invention is to provide a method and system for generating a nursing medical record to solve the problems raised in the above-mentioned background technology.
[0008] To achieve the above object, one of the objects of the present invention is to provide a method for generating a nursing medical record, comprising the following method steps:
[0009] S1. Collecting nursing medical record template library and patient text data, wherein the patient text data includes multiple semantic units;
[0010] S2. Using a bidirectional text vectorization model, by mapping multiple semantic units in the patient text data into a vector space, multiple text word vectors are generated to capture the semantic information of words in the patient text data; and all templates in the nursing medical record template library are converted into multiple template library word vectors to capture the semantic information of the templates;
[0011] S3. Based on multiple text word vectors, by calculating the arithmetic mean of multiple text word vectors, an average text word vector is obtained to capture the overall semantic information; and the cosine similarity between the text average word vector and multiple template library word vectors is calculated as the template matching similarity score, and by comparing the cosine similarity of the overall semantic information of the text average word vector with the semantic information of all templates, the template with the largest template matching similarity score is selected as the nursing medical record template to be used;
[0012] S4. Parse the nursing medical record template to be used, parse out the various fields in the nursing medical record template to be used, and generate field word vectors; calculate the cosine similarity between the field word vector and multiple text word vectors as the field filling similarity score, which is used to locate the semantic matching information related to the field in the text; and generate a list of semantic correlations between each field in the nursing medical record template to be used and multiple text word vectors according to the size of the field filling similarity score; fill in the corresponding fields of the nursing medical record template according to the semantic correlation list to improve the filling accuracy of the semantic requirements of specific fields.
[0013] As a further improvement of the present technical solution, the nursing medical record template library is collected through a public database, and the nursing medical record template library includes multiple fields, including patient basic information, symptom description, treatment plan and nursing observation; the patient text data represents the patient's current status, including the latest symptom description, vital signs and treatment response.
[0014] As a further improvement of the technical solution, the process of the bidirectional text vectorization model specifically includes:
[0015] Clean the patient text data, including removing special characters and punctuation marks, and performing word segmentation; perform the same cleaning and word segmentation on each template in the nursing medical record template library;
[0016] Obtain pre-trained medical word embedding models from public databases. Word embedding models are a technique that maps words into a high-dimensional vector space and can capture the semantic relationship between words.
[0017] The preprocessed patient text data is divided into multiple semantic units, where a semantic unit refers to the smallest unit with complete semantics in the text, usually a sentence or a paragraph, which contains relatively independent information. Each word in each semantic unit is mapped to the vector space through a word embedding model to obtain a word vector, and the average value of all word vectors in the semantic unit is calculated to obtain a text word vector, and finally multiple text word vectors are obtained, each vector corresponding to a semantic unit in the patient text data; wherein: a unique identifier is assigned to each semantic unit, and when the semantic unit is converted into a text word vector, the corresponding mapping relationship between the vector and the semantic unit is saved, by creating a data structure, in which the key is the identifier of the text word vector and the value is the corresponding semantic unit. When the text word vector is generated, the position information of the semantic unit corresponding to the vector is also recorded;
[0018] Each word in the field corresponding to each template in the nursing medical record template library is mapped to the vector space through the word embedding model to obtain the field word vector; the average value of all field word vectors in the field is calculated to obtain a field word vector; all field word vectors are combined to form a complete template word vector; the above process is repeated for all templates in the template library, and finally multiple template library word vectors are obtained.
[0019] As a further improvement of this technical solution, the calculation process of the text average word vector is as follows:
[0020] Using multiple text word vectors, the arithmetic mean of the text word vectors is calculated. By adding all the text word vectors by dimension and dividing the sum vector by the total number of text word vectors, a single text average word vector is obtained, which represents the semantic information of the entire patient text data.
[0021] As a further improvement of the present technical solution, the calculation process of the template matching similarity score is as follows:
[0022] For each template library word vector, calculate the cosine similarity between the text average word vector and each template library word vector as the template matching similarity score. The calculation formula of the template matching similarity score cos(a) is as follows:
[0023] cos(a)=(A·B) / (||A||*||B||), where A is the average word vector of the text, B is the word vector of the template library, · represents the vector dot product, ||A|| and ||B|| represent the Euclidean norm of vectors A and B respectively;
[0024] Compare all calculated template matching similarity scores, select the template corresponding to the maximum template matching similarity score, and determine the template as the nursing medical record template to be used.
[0025] As a further improvement of the technical solution, the calculation process of the field filling similarity score is as follows:
[0026] For each text word vector and field word vector, the cosine similarity between each text word vector and each field word vector is calculated as the field filling similarity score. The calculation formula of the field filling similarity score cos(b) is as follows:
[0027] cos(b)=(C·D) / (||C||*||D||), where C is the field word vector and D is the text word vector; for each field.
[0028] As a further improvement of the technical solution, the method generates a semantic correlation list between each field in the nursing medical record template to be used and multiple text word vectors according to the size of the field filling similarity score, and fills the nursing medical record template according to the semantic correlation list, specifically including:
[0029] For each field, create a list containing the field name, each text word vector, and the filling similarity score of the two, and sort these lists in descending order of filling similarity score to form a comprehensive semantic relevance list;
[0030] According to the semantic relevance list, the relevance threshold is set using the percentile statistical method, and the corresponding semantic unit is extracted according to the relevance threshold. By traversing each field in the semantic relevance list, the relevance threshold is compared with the filling similarity score of each field. If the filling similarity score exceeds the relevance threshold, the corresponding semantic unit is extracted through the saved mapping relationship, and the text corresponding to the semantic unit is filled into the corresponding field.
[0031] As a further improvement of the technical solution, the correlation threshold setting process is as follows:
[0032] According to the semantic relevance list, obtain the filling similarity scores of all fields and each text word vector, and form a score list in ascending order of filling similarity scores;
[0033] The 75th percentile of the score list is calculated and set as the correlation threshold, where the 75th percentile represents the third division point when the score list is divided into four equal parts, that is, 75% of the data is less than or equal to this value.
[0034] The second object of the present invention is to provide a system for generating a nursing medical record, including a data collection module, a data processing module, a template determination module and a filling module.
[0035] The data collection module collects nursing medical record template library and patient text data;
[0036] The data processing module uses a bidirectional text vectorization model to convert patient text data into multiple text word vectors, and converts all templates in the nursing medical record template library into multiple template library word vectors;
[0037] The template determination module calculates an average text word vector based on multiple text word vectors; and calculates the cosine similarity between the average text word vector and multiple template library word vectors as a template matching similarity score, and selects the template with the largest template matching similarity score as the nursing medical record template to be used;
[0038] The filling module parses the nursing medical record template to be used, and parses out the various fields in the nursing medical record template to be used; calculates the cosine similarity between each field and multiple text word vectors as the field filling similarity score, and generates a semantic correlation list between each field in the nursing medical record template to be used and multiple text word vectors according to the size of the field filling similarity score; and fills the nursing medical record template according to the semantic correlation list.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] 1. The method and system for generating nursing medical records realize efficient and accurate generation of nursing medical records through multiple applications of multiple text word vectors; first, the average text word vector is obtained by calculating the average value of multiple text word vectors. This step effectively integrates the comprehensive semantic information in the patient's text data; then, by calculating the cosine similarity between the text average word vector and the template library word vector, the most matching nursing medical record template is accurately selected; this method not only considers the overall semantics, but also retains the importance of local semantic information; secondly, by calculating the cosine similarity between each field and multiple text word vectors, a detailed list of semantic relevance is generated; this step makes full use of the local semantic information of the text word vector to ensure the accuracy of filling in the medical record; through this multi-level vector application, the method can capture the overall semantic structure and identify detailed information, thereby greatly improving the accuracy and applicability of nursing medical record generation.
[0041] 2. The bidirectional text vectorization model and cosine similarity calculation adopted by the method and system for generating nursing medical records, combined with the application of semantic relevance list, greatly improve the efficiency and accuracy of generating nursing medical records; the bidirectional text vectorization model can simultaneously consider the patient text data and the nursing medical record template, map the two to the same vector space, make the semantic comparison more intuitive and accurate, and save the corresponding mapping relationship between the vector and the semantic unit. The establishment and maintenance of this mapping relationship enables the system to trace back to the specific content and position of the original text at any time while performing calculations and comparisons in the vector space. When the system identifies highly relevant text vectors according to the semantic relevance list, it can immediately locate the corresponding semantic unit in the original text through this mapping relationship, thereby accurately extracting the required information. This not only improves the accuracy of the filling process, but also ensures the contextual integrity of the filled content. In addition, by generating a semantic relevance list and setting a relevance threshold, the method can intelligently screen out the most relevant information for filling, avoiding the interference of irrelevant information. This semantic-based intelligent filling method greatly improves the quality and consistency of the medical record, while significantly reducing the workload of medical staff. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram of the overall module of the present invention;
[0043] Figure 2 It is a schematic diagram of the overall method flow of the present invention.
[0044] In the figure: 100, data collection module; 200, data processing module; 300, template determination module; 400, filling module. DETAILED DESCRIPTION
[0045] The following will be combined with the accompanying drawings in the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0047] The following are some definitions of terms:
[0048] Bidirectional text vectorization model: an algorithm that converts text into numeric vectors, which can process patient text data and nursing record templates simultaneously, mapping both into the same vector space for semantic comparison;
[0049] Multiple text word vectors: a series of vectors converted from multiple semantic units in the patient text data, each vector represents the semantic information of a semantic unit;
[0050] Multiple template library word vectors: a series of vectors converted from multiple templates in the nursing medical record template library. Each vector represents the semantic information of a complete nursing medical record template.
[0051] Text average word vector: A single vector obtained by calculating the arithmetic mean of multiple text word vectors, which comprehensively represents the semantic information of the entire patient text data;
[0052] Template matching similarity score: The cosine similarity calculated between the average word vector of the text and the word vector of each template library is used to evaluate the matching degree between the patient text data and each nursing medical record template;
[0053] Nursing medical record form template to be used: the most matching nursing medical record form template selected according to the template matching similarity score, which is used for subsequent information filling;
[0054] Field filling similarity score: The cosine similarity calculated between each field in the nursing medical record template to be used and multiple text word vectors is used to evaluate the relevance of each field to each semantic unit in the patient text data;
[0055] Semantic relevance list: A list generated based on the field filling similarity score, containing the relevance information between each field in the nursing medical record template to be used and multiple text word vectors, which is used to guide the subsequent information filling process.
[0056] Next, see Figure 1-Figure 2 One of the purposes of this embodiment is to provide a method for generating a nursing medical record, comprising the following steps:
[0057] S1, collect nursing medical record template library and patient text data;
[0058] S2, using a bidirectional text vectorization model, converting patient text data into multiple text word vectors, and converting all templates in a nursing medical record template library into multiple template library word vectors;
[0059] S3. Calculate the average word vector of the text based on multiple text word vectors; and calculate the cosine similarity between the average word vector of the text and the word vectors of multiple template libraries as the template matching similarity score, and select the template with the largest template matching similarity score as the nursing medical record template to be used;
[0060] S4. Parse the nursing medical record template to be used to parse out the various fields in the nursing medical record template to be used; calculate the cosine similarity between the various fields and multiple text word vectors as the field filling similarity score, and generate a semantic correlation list between the various fields in the nursing medical record template to be used and the multiple text word vectors according to the size of the field filling similarity score; fill the nursing medical record template according to the semantic correlation list.
[0061] Specifically include:
[0062] S1. Use a public database to collect a nursing medical record template library, wherein the nursing medical record template library contains a variety of different types of nursing medical record templates to adapt to different nursing scenarios, departments or disease types; each template in the nursing medical record template library contains multiple predefined fields, including basic patient information, symptom description, treatment plan and nursing observation, etc.;
[0063] By connecting with the hospital's existing electronic medical record system, the latest patient information can be obtained in real time as patient text data, which reflects the patient's current status, including the latest symptom description, vital signs and treatment response.
[0064] S2. Use the bidirectional text vectorization model to convert patient text data into multiple text word vectors, and convert all templates in the nursing medical record template library into multiple template library word vectors, including:
[0065] Clean the patient text data, including removing special characters and punctuation marks, and performing word segmentation; perform the same cleaning and word segmentation on each template in the nursing medical record template library;
[0066] Obtain pre-trained medical word embedding models from public databases. Word embedding models are a technique that maps words into a high-dimensional vector space and can capture the semantic relationship between words.
[0067] The preprocessed patient text data is divided into multiple semantic units, where a semantic unit refers to the smallest unit with complete semantics in the text, usually a sentence or a paragraph, containing a relatively independent information or concept. Each word in each semantic unit is mapped to the vector space through a word embedding model to obtain a word vector, and the average value of all word vectors in the semantic unit is calculated to obtain a text word vector, and finally multiple text word vectors are obtained, each vector corresponding to a semantic unit in the patient text data; wherein: a unique identifier is assigned to each semantic unit, and when the semantic unit is converted into a text word vector, the corresponding relationship between the vector and the semantic unit is saved, by creating a data structure (such as a dictionary or a hash table), in which the key is the identifier of the text word vector and the value is the corresponding semantic unit. When generating the text word vector, the position information of the semantic unit corresponding to the vector (such as the starting and ending positions in the original text) is also recorded;
[0068] Each word in the field corresponding to each template in the nursing medical record template library is mapped to the vector space through the word embedding model to obtain the field word vector; the average value of all field word vectors in the field is calculated to obtain a field word vector; all field word vectors are combined to form a complete template word vector; the above process is repeated for all templates in the template library, and finally multiple template library word vectors are obtained.
[0069] S3. Calculate the average word vector of the text based on multiple text word vectors; and calculate the cosine similarity between the average word vector of the text and the word vectors of multiple template libraries as the template matching similarity score, and select the template with the largest template matching similarity score as the nursing medical record template to be used, specifically including:
[0070] Using the multiple text word vectors obtained in step S2 (each vector corresponds to a semantic unit in the patient's text data), calculate the arithmetic mean of the text word vectors, and obtain a single text average word vector by adding all the text word vectors by dimension and dividing the obtained sum vector by the total number of text word vectors. The vector comprehensively represents the semantic information of the entire patient's text data;
[0071] For each template library word vector obtained in step S2, the cosine similarity between the text average word vector and each template library word vector is calculated as the template matching similarity score. The calculation formula of the template matching similarity score cos(a) is as follows:
[0072] cos(a)=(A·B) / (||A||*||B||), where A is the average word vector of the text, B is the word vector of the template library, · represents the vector dot product, ||A|| and ||B|| represent the Euclidean norm of vectors A and B respectively;
[0073] Compare all calculated template matching similarity scores, select the template corresponding to the value with the largest template matching similarity score, and determine the template as the nursing medical record template to be used.
[0074] S4, parsing the nursing medical record template to be used, parsing out each field in the nursing medical record template to be used; calculating the cosine similarity between each field and multiple text word vectors as the field filling similarity score, and generating a semantic correlation list between each field in the nursing medical record template to be used and multiple text word vectors according to the size of the field filling similarity score; filling the nursing medical record template according to the semantic correlation list, specifically including:
[0075] Identify and extract the various fields in the nursing medical record template to be used determined in step S3, and create an empty data structure for each field for subsequent filling;
[0076] For each text word vector (corresponding to a semantic unit in the patient text data) and field word vector obtained in step S2, the cosine similarity between each text word vector and each field word vector is calculated as the field filling similarity score. The field filling similarity score cos(b) is calculated as follows:
[0077] cos(b)=(C·D) / (||C||*||D||), where C is the field word vector and D is the text word vector; for each field;
[0078] For each field, create a list containing the field name, each text word vector, and the filling similarity score of the two, and sort these lists in descending order of filling similarity score to form a comprehensive semantic relevance list;
[0079] According to the semantic relevance list, a relevance threshold is set using the percentile statistical method, and the corresponding semantic unit is extracted according to the relevance threshold. By traversing each field in the semantic relevance list, the relevance threshold is compared with the filling similarity score of each field. If the filling similarity score exceeds the relevance threshold, the corresponding semantic unit is extracted through the mapping relationship saved in step S2, and the text corresponding to the semantic unit is filled into the corresponding field; wherein the predetermined relevance threshold is set according to the semantic relevance list and the percentile statistical method, as follows:
[0080] According to the semantic relevance list, obtain the filling similarity scores of all fields and each text word vector, and form a score list in ascending order of filling similarity scores;
[0081] The 75th percentile of the score list is calculated and set as the correlation threshold, where the 75th percentile represents the third division point when the score list is divided into four equal parts, that is, 75% of the data is less than or equal to this value.
[0082] For ease of understanding, the following briefly describes the process of this method using hypothetical data:
[0083] S1: Assume that there is a nursing medical record template library, which contains 5 different types of templates: general ward, intensive care, postoperative care, chronic disease management, and psychiatric care;
[0084] The patient text data collected for a patient named Zhang San is as follows:
[0085] "A 56-year-old male patient, Zhang San, was admitted to the hospital due to persistent chest pain for 3 days. The patient has a history of hypertension for 10 years and is currently taking nifedipine to control it. On admission, his blood pressure was 160 / 95 mmHg and his heart rate was 88 beats / min. The electrocardiogram showed ST segment depression. Laboratory tests showed elevated troponin I."
[0086] S2: Use the pre-trained medical word embedding model to convert text data into vectors. Assume that each word is mapped to a 5-dimensional vector space. For example, "chest pain" may be mapped to [0.2, -0.5, 0.8, 0.1, -0.3], and "hypertension" may be mapped to [0.7, 0.3, -0.2, 0.6, 0.1];
[0087] The entire text is divided into several semantic units, such as: "56-year-old male patient Zhang San was admitted to the hospital due to persistent chest pain for 3 days.", "The patient has a history of hypertension for 10 years and is currently taking nifedipine to control it.", "Blood pressure was 160 / 95 mmHg and heart rate was 88 beats / min at admission.", "ECG showed ST segment depression.", "Laboratory tests showed elevated troponin I." Each semantic unit is converted into a text word vector;
[0088] S3: Calculate the average word vector of the text. Assume that [0.4, 0.1, 0.3, 0.2, -0.1] is obtained. Calculate the cosine similarity between this vector and each template vector:
[0089] General ward template: 0.85, intensive care template: 0.92, postoperative care template: 0.78, chronic disease management template: 0.81, psychiatric care template: 0.65;
[0090] The intensive care template with the highest similarity (0.92) was selected as the template to be used;
[0091] S4: Assume that the critical care template contains the following fields: basic patient information, chief complaint, medical history, vital signs, and auxiliary examination results;
[0092] Calculate the similarity between each field and each semantic unit to obtain a list of semantic relevance, for example:
[0093] Basic information of the patient:
[0094] Semantic unit 1: 0.95, semantic unit 2: 0.30, semantic unit 3: 0.25, semantic unit 4: 0.10, semantic unit 5: 0.05;
[0095] Chief complaint:
[0096] Semantic unit 1: 0.90, semantic unit 2: 0.15, semantic unit 3: 0.20, semantic unit 4: 0.35, semantic unit 5: 0.30; the similarity list of other fields is omitted;
[0097] Set the relevance threshold (assuming it is 0.70), extract relevant semantic units and fill them into the corresponding fields:
[0098] Patient basic information: 56-year-old male patient Zhang San;
[0099] Chief complaint: hospitalized due to persistent chest pain for 3 days;
[0100] Past medical history: The patient has a 10-year history of hypertension, which is currently controlled with nifedipine;
[0101] Vital signs: blood pressure 160 / 95 mmHg, heart rate 88 beats / min on admission;
[0102] Auxiliary examination results: Electrocardiogram showed ST segment depression. Laboratory tests showed elevated troponin I.
[0103] The above hypothetical data briefly describes the process of the entire method. In actual applications, there may be more data dimensions, but the basic principles are the same.
[0104] The second purpose of this embodiment is to provide a system for a method for generating a nursing medical record, including a data collection module 100, a data processing module 200, a template determination module 300 and a filling module 400.
[0105] The data collection module 100 collects the nursing medical record template library and patient text data;
[0106] The data processing module 200 uses a bidirectional text vectorization model to convert patient text data into multiple text word vectors, and converts all templates in the nursing medical record template library into multiple template library word vectors;
[0107] The template determination module 300 calculates the average word vector of the text based on multiple text word vectors; and calculates the cosine similarity between the average word vector of the text and the word vectors of multiple template libraries as the template matching similarity score, and selects the template with the largest template matching similarity score as the nursing medical record template to be used;
[0108] The filling module 400 parses the nursing medical record template to be used, and parses out the various fields in the nursing medical record template to be used; calculates the cosine similarity between each field and multiple text word vectors as the field filling similarity score, and generates a semantic correlation list between each field in the nursing medical record template to be used and multiple text word vectors according to the size of the field filling similarity score; fills the nursing medical record template according to the semantic correlation list.
[0109] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for generating a nursing medical record, characterized in that: The method comprises the following steps: S1. Collecting nursing medical record template library and patient text data, wherein the patient text data includes multiple semantic units; S2. Using a bidirectional text vectorization model, by mapping multiple semantic units in the patient text data into a vector space, multiple text word vectors are generated to capture the semantic information of words in the patient text data; and all templates in the nursing medical record template library are converted into multiple template library word vectors to capture the semantic information of the templates; S3. Based on multiple text word vectors, by calculating the arithmetic mean of multiple text word vectors, an average text word vector is obtained to capture the overall semantic information; and the cosine similarity between the text average word vector and multiple template library word vectors is calculated as the template matching similarity score, and by comparing the cosine similarity of the overall semantic information of the text average word vector with the semantic information of all templates, the template with the largest template matching similarity score is selected as the nursing medical record template to be used; S4, parsing the nursing medical record template to be used, parsing out each field in the nursing medical record template to be used, and generating a field word vector; calculating the cosine similarity between the field word vector and multiple text word vectors as the field filling similarity score, which is used to locate the semantic matching information related to the field in the text; and generating a semantic correlation list between each field in the nursing medical record template to be used and multiple text word vectors according to the size of the field filling similarity score; filling the corresponding fields of the nursing medical record template according to the semantic correlation list, so as to improve the filling accuracy of the semantic requirements of the specific fields; The nursing medical record template library is collected through a public database, and includes multiple fields, including basic patient information, symptom description, treatment plan and nursing observation; the patient text data represents the patient's current status, including the latest symptom description, vital signs and treatment response; The process of the bidirectional text vectorization model specifically includes: Clean the patient text data, including removing special characters and punctuation marks, and performing word segmentation; perform the same cleaning and word segmentation on each template in the nursing medical record template library; Obtain pre-trained medical word embedding models from public databases. Word embedding models are a technique that maps words into a high-dimensional vector space and can capture the semantic relationship between words. The preprocessed patient text data is divided into multiple semantic units, where a semantic unit refers to the smallest unit with complete semantics in the text, usually a sentence or a paragraph, which contains relatively independent information. Each word in each semantic unit is mapped to the vector space through a word embedding model to obtain a word vector, and the average value of all word vectors in the semantic unit is calculated to obtain a text word vector, and finally multiple text word vectors are obtained, each vector corresponding to a semantic unit in the patient text data; wherein: a unique identifier is assigned to each semantic unit, and when the semantic unit is converted into a text word vector, the corresponding mapping relationship between the vector and the semantic unit is saved, by creating a data structure, in which the key is the identifier of the text word vector and the value is the corresponding semantic unit. When the text word vector is generated, the position information of the semantic unit corresponding to the vector is also recorded; Map each word in the field corresponding to each template in the nursing medical record template library to the vector space through the word embedding model to obtain the field word vector; calculate the average value of all field word vectors in the field to obtain a field word vector; combine all field word vectors to form a complete template word vector; repeat the above process for all templates in the template library, and finally obtain multiple template library word vectors; The calculation process of the text average word vector is as follows: Using multiple text word vectors, calculating the arithmetic mean of the text word vectors, adding all the text word vectors by dimension, dividing the obtained sum vector by the total number of text word vectors, and obtaining a single text average word vector, which represents the semantic information of the entire patient text data; The calculation process of the template matching similarity score is as follows: For each template library word vector, calculate the cosine similarity between the text average word vector and each template library word vector as the template matching similarity score. The calculation formula of the template matching similarity score cos(a) is as follows: cos(a)=(A·B) / (||A||*||B||), where A is the average word vector of the text, B is the word vector of the template library, · represents the vector dot product, ||A|| and ||B|| represent the Euclidean norm of vectors A and B respectively; Compare all calculated template matching similarity scores, select the template corresponding to the maximum template matching similarity score, and determine the template as the nursing medical record template to be used.
2. The method for generating a nursing medical record according to claim 1, characterized in that: The calculation process of the field filling similarity score is as follows: For each text word vector and field word vector, the cosine similarity between each text word vector and each field word vector is calculated as the field filling similarity score. The calculation formula of the field filling similarity score cos(b) is as follows: cos(b)=(C·D) / (||C||*||D||), where C is the field word vector and D is the text word vector.
3. The method for generating a nursing medical record according to claim 2, characterized in that: The method generates a semantic correlation list between each field in the nursing medical record form template to be used and multiple text word vectors according to the size of the field filling similarity score, and fills the nursing medical record form template according to the semantic correlation list, specifically including: For each field, create a list containing the field name, each text word vector, and the filling similarity score of the two, and sort these lists in descending order of filling similarity score to form a comprehensive semantic relevance list; According to the semantic relevance list, the relevance threshold is set using the percentile statistical method, and the corresponding semantic unit is extracted according to the relevance threshold. By traversing each field in the semantic relevance list, the relevance threshold is compared with the filling similarity score of each field. If the filling similarity score exceeds the relevance threshold, the corresponding semantic unit is extracted through the saved mapping relationship, and the text corresponding to the semantic unit is filled into the corresponding field.
4. The method for generating a nursing medical record according to claim 3, characterized in that: The correlation threshold setting process is as follows: According to the semantic relevance list, obtain the filling similarity scores of all fields and each text word vector, and form a score list in ascending order of filling similarity scores; The 75th percentile of the score list is calculated and set as the correlation threshold, where the 75th percentile represents the third division point when the score list is divided into four equal parts, that is, 75% of the data is less than or equal to this value.
5. A system using the method for generating a nursing medical record according to any one of claims 1 to 4, characterized in that: It comprises a data collection module (100), a data processing module (200), a template determination module (300) and a filling module (400); The data collection module (100) collects a nursing medical record template library and patient text data; The data processing module (200) uses a bidirectional text vectorization model to convert patient text data into multiple text word vectors, and converts all templates in a nursing medical record template library into multiple template library word vectors; The template determination module (300) calculates an average text word vector based on multiple text word vectors; and calculates the cosine similarity between the average text word vector and multiple template library word vectors as a template matching similarity score, and selects the template with the largest template matching similarity score as the nursing medical record template to be used; The filling module (400) parses the nursing medical record template to be used, and parses out each field in the nursing medical record template to be used; calculates the cosine similarity between each field and multiple text word vectors as the field filling similarity score, and generates a semantic correlation list between each field in the nursing medical record template to be used and multiple text word vectors according to the size of the field filling similarity score; and fills the nursing medical record template according to the semantic correlation list.
Citation Information
Patent Citations
Pre-inquiry medical record generation method and device
CN112837772A
RTHD electronic medical record generation method and man-machine interaction system
CN118116532A