Electronic health record structured processing method and system, medium and equipment
Through deep learning models and information extraction algorithms, identify and map clinical entities in electronic health records, combined with abnormal detection algorithm verification, the problem of low efficiency and accuracy in structured EHR processing is solved, and efficient and accurate structured data acquisition is achieved , supports in-depth analysis and utilization of electronic health record data.
Patent Information
- Application Number
- CN202411184002.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-01-10
AI Technical Summary
Electronic health records (EHR) have problems with low information extraction and identification efficiency and accuracy during structured processing, mainly due to different recording standards of different institutions and the large number of texts and professional terms with different structures.
The deep learning model is used to identify clinical entities, and map them to the preset data model through the information extraction algorithm, and verify the results with the abnormal detection algorithm to ensure the accuracy and consistency of structured data.
It improves the efficiency and accuracy of clinical entity recognition, obtains structured data with high consistency and accuracy, and supports the in-depth analysis and utilization of electronic health record data.
Smart Images

Figure CN119296705A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, system, medium and device for structured processing of electronic health records. Background Art
[0002] Electronic Health Record (EHR) is the full name of Electronic Health Record, which contains a variety of patient data and information, such as personal information such as age, height, weight, as well as medical history, medication and allergy history, immunization status, laboratory test results, radiological images (such as X-rays, etc.), vital signs, medical process records, payment information, etc. Its purpose is to record the data generated by patients in all medical institutions. The information stored in digital form needs to be able to be shared among different medical institutions so that patients can get good medical services when they are in different doctors, hospitals, clinics, and even in different countries. It also allows doctors and other medical service personnel, insurance companies, etc. to share the patient's medical records between different devices.
[0003] However, EHR is diverse. For example, different institutions adopt different recording standards. At the same time, EHR contains a large amount of text with different structures and professional terms, which leads to problems with the efficiency and accuracy of information extraction and recognition when it is structured.
[0004] In order to better utilize the data in EHR to promote the development of digital medicine, solving the problem of structured processing of complex electronic health record data is an important challenge currently faced. Summary of the invention
[0005] In view of the defects in the prior art, the purpose of the present invention is to provide a method, system, medium and device for structured processing of electronic health records.
[0006] According to a method for structuring electronic health records provided by the present invention, the method includes: obtaining electronic health record data; using a deep learning model to identify clinical entities in the electronic health record data to obtain clinical entities; wherein the deep learning model is trained by an entity data set corresponding to a medical professional dictionary. The clinical entity is mapped to a preset data model through an information extraction algorithm to obtain a mapping result, and structured data is obtained according to the clinical entity and the mapping result, wherein the mapping result includes the category of the data model to which the clinical entity belongs; the clinical entity and the mapping result are verified through an anomaly detection algorithm to obtain verified structured data.
[0007] It is not difficult to understand that the deep learning model of the present application is trained through the entity data set corresponding to the medical professional dictionary. Therefore, compared with other deep learning models, the deep learning model of the present application identifies clinical entities in electronic health record data more accurately. Thereby effectively improving the efficiency and accuracy of clinical entity recognition. Furthermore, the present application maps the identified clinical entities to a preset data model through an information extraction algorithm to obtain a mapping result to adapt to electronic health record data in different formats or different medical fields, thereby obtaining structured data with higher consistency; further, the present application also verifies the structured data through an anomaly detection algorithm, and eliminates structured data with poor consistency in the structured data, thereby further improving the accuracy and consistency of the structured data of the present application.
[0008] Furthermore, the deep learning model identifies clinical entities in the following manner: converting each character of the electronic health record data into a word vector and a word vector to which each character belongs, and concatenating the word vector and the word vector to obtain a concatenated vector; performing feature extraction on the concatenated vector to determine a concatenated feature vector, and obtaining a probability that each character corresponds to a different label based on the concatenated feature vector; determining a label sequence of the electronic health record data based on the probability that each character corresponds to a different label; and determining the clinical entities in the electronic health record data based on the label sequence of the electronic health record data.
[0009] Furthermore, the deep learning model identifies clinical entities in the following manner: converting each character of the electronic health record data into a word vector and a word vector to which each character belongs, and concatenating the word vector and the word vector to obtain a concatenated vector; performing feature extraction on the concatenated vector to determine a concatenated feature vector, and obtaining a probability that each character corresponds to a different label based on the concatenated feature vector; processing the probability of different labels corresponding to each character by setting constraints to obtain an optimized probability that each character corresponds to a different label; determining a label sequence of the electronic health record data based on the optimized probability that each character corresponds to a different label; and determining the clinical entities in the electronic health record data based on the label sequence of the electronic health record data.
[0010] It is not difficult to understand that the constraint conditions of the present application are to characterize the constraint relationship between each label through learned features. By setting the constraint conditions, the probability of different labels corresponding to each character is processed, and the label sequence is evaluated using the state feature function and the transfer feature function to obtain the probability of each character corresponding to different labels after optimization, so that the probability of the label of each character output can fully consider the transfer dependency of the electronic health record data (that is, the dependency of the previous and next characters in the electronic health record data, the dependency of the sentences in the electronic health record data, etc.), and determine the label sequence of the electronic health record data according to the probability of each character corresponding to different labels after optimization, so that the label sequence or clinical entity of the output electronic health record data is more accurate. In addition, the accuracy of the neural network model in identifying clinical entities in the electronic health record data is improved, thereby ensuring the accuracy of the structured data finally obtained.
[0011] Furthermore, the clinical entity is mapped to a preset data model by an information extraction algorithm to obtain a mapping result, including: extracting entity attributes of the clinical entity using the information extraction algorithm to obtain entity attributes of the clinical entity; and mapping the clinical entity to a data model of a corresponding category according to the category of the preset data model and the entity attributes of the clinical entity, thereby obtaining a mapping result, wherein the mapping result includes the category of the data model to which the clinical entity belongs.
[0012] Furthermore, the information extraction algorithm is used to extract entity attributes of the clinical entity, and the entity attributes of the clinical entity are obtained, including: performing dependency analysis on the input clinical entity based on transfer dependency analysis to find the core words of the electronic health record data; recursively searching for all words that are parallel to the core words to form a predicate list; for each predicate, finding its subject and object according to the dependency relationship to form an information tuple; for an information tuple without a subject, finding a parent tuple that is parallel to its predicate and has a subject, if the parent tuple exists, then the subject of the information tuple is set to the subject of the parent tuple, if not found, then it is not processed; returning the extraction result to obtain the entity attributes of the clinical entity.
[0013] It is not difficult to understand that the present application determines the entity attributes of clinical entities by fully considering the dependencies of the input clinical entities, wherein the entity attributes of clinical entities can be western medicine diagnosis and treatment, drug research, and traditional Chinese medicine diagnosis and treatment. It is not difficult to see that the entity attributes of clinical entities determined by the present application are not based on a single character or semantics of the clinical entity, but are based on the entity attributes of clinical entities determined by the sentence or paragraph where the clinical entity is located. Therefore, the entity attributes of clinical entities determined by the present application are more accurate. Thereby making the accuracy of the structured data obtained by the present application according to the mapping relationship (i.e., matching relationship) between the category of the preset data model and the entity attributes of the clinical entity also higher.
[0014] Furthermore, the preset data model includes at least one of the following: a disease-drug data model, a traditional Chinese medicine diagnosis and treatment data model, and a Western medicine diagnosis and treatment data model; correspondingly, the category of the preset data model includes at least one of the following: the category of the disease-drug data model is drug research, the category of the traditional Chinese medicine diagnosis and treatment data model is traditional Chinese medicine diagnosis and treatment, and the category of the Western medicine diagnosis and treatment data model is Western medicine diagnosis and treatment.
[0015] Furthermore, the method for verification through anomaly detection algorithm includes: performing cluster calculation on the clinical entities and their mapping results, and according to the cluster calculation results corresponding to the clinical entities and their mapping results, eliminating clinical entities and their mapping results whose cluster calculation results are greater than a preset value, to obtain verified structured data.
[0016] It is not difficult to understand that the present application verifies the structured data by performing clustering calculation on the clinical entities and their mapping results to obtain the verified structured data, that is, the verified structured data eliminates the clinical entities and their mapping results whose clustering calculation results are greater than the preset values, and retains the clinical entities and their mapping results whose clustering calculation results are not greater than the preset values, that is, the verified structured data has better clustering, thereby making the consistency and accuracy of the verified structured data higher.
[0017] A system for structuring electronic health records provided by the present invention includes:
[0018] The acquisition module is used to obtain electronic health record data.
[0019] The natural language processing module is used to identify clinical entities in the electronic health record data by using a deep learning model to obtain clinical entities.
[0020] An information extraction and mapping module is used to map the clinical entity to a preset data model through an information extraction algorithm to obtain a mapping result, and obtain structured data according to the clinical entity and the mapping result, wherein the mapping result includes the category of the data model to which the clinical entity belongs.
[0021] The quality control module is used to verify the clinical entity and the mapping result through an anomaly detection algorithm to obtain verified structured data.
[0022] According to a computer-readable storage medium storing a computer program provided by the present invention, when the computer program is executed by a processor, the steps of the method for structuring electronic health records are implemented.
[0023] An electronic device provided according to the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the method for structuring electronic health records are implemented.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] The present invention can accurately and efficiently identify and extract clinical entities in electronic health records and convert them into structured data. At the same time, this application verifies the structured data, and the verified structured data can further ensure the consistency and accuracy of the obtained structured data, laying the foundation for subsequent in-depth analysis and utilization of electronic health record data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0027] Figure 1 is a flow chart of the method for structuring electronic health records of the present invention;
[0028] Figure 2 Flowchart for entity attribute extraction;
[0029] Figure 3 Flowchart for validation by anomaly detection algorithm;
[0030] Figure 4 It is a structural diagram of a deep learning model;
[0031] Figure 5 A schematic diagram of a recurrent unit of LSTM in an embodiment;
[0032] Figure 6 This is a schematic diagram of the structure of another deep learning model;
[0033] Figure 7 It is a system block diagram of the electronic health record structured processing system of the present invention. DETAILED DESCRIPTION
[0034] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0035] The present application provides a method for structuring electronic health records, which specifically includes obtaining electronic health record data, using a deep learning model to identify clinical entities in the electronic health record data to obtain clinical entities, mapping the clinical entities to a preset data model through an information extraction algorithm to obtain a mapping result, obtaining structured data based on the clinical entities and their mapping results, and verifying the clinical entities and the mapping results through an anomaly detection algorithm to obtain verified structured data, wherein the structured data includes the clinical entities and the categories of the data models corresponding to the clinical entities.
[0036] It is not difficult to understand that the present application uses a deep learning model to identify clinical entities in electronic health record data, thereby effectively improving the efficiency and accuracy of clinical entity identification; the identified clinical entities are mapped to a preset data model through an information extraction algorithm to obtain a mapping result to adapt to electronic health record data in different formats or different medical fields, thereby obtaining structured data with higher consistency; the structured data is verified through an anomaly detection algorithm, thereby further improving the accuracy and consistency of the structured data of the present application.
[0037] like Figure 1 As shown, a method for structuring electronic health records includes:
[0038] Step 1: Obtain electronic health record data.
[0039] The electronic health record data may be manually entered, imported into a database, or obtained from the Internet, and the present invention is not limited to this.
[0040] Step 2: Use deep learning models to identify clinical entities in electronic health record data and obtain clinical entities.
[0041] The deep learning model of the present application is trained by the entity data set corresponding to the medical professional dictionary, so that the deep learning model can more accurately identify clinical entities in health record data. Clinical entities can be symptoms, diagnosis results, treatments, drugs, measurements, etc.
[0042] In an embodiment of the present application, a deep learning model is used to determine the probability of different labels corresponding to each character of the electronic health record data, and the label of each character of the electronic health record data is determined according to the probability of different labels corresponding to each character of the electronic health record data, thereby determining the label sequence of the electronic health record data. A clinical entity in the electronic health record data is determined based on the label sequence of the electronic health record data.
[0043] Specifically, in some embodiments, a deep learning model is used to identify clinical entities in the electronic health record data, and obtaining the clinical entities may include: converting each character of the electronic health record data into a word vector and a word vector to which each character belongs, and concatenating the word vector and the word vector to obtain a concatenated vector. A concatenated feature vector is determined by performing feature extraction on the concatenated vector, and the probability that each character corresponds to a different label is obtained based on the concatenated feature vector. Based on the probability that each character corresponds to a different label, a label sequence of the electronic health record data is determined. The clinical entity in the electronic health record data is determined based on the label sequence of the electronic health record data.
[0044] Specifically, the deep learning model may include: an embedding layer, a feature extraction layer and a fully connected layer; the embedding layer is used to convert each character of the electronic health record data into a word vector and a word vector to which each character belongs. The feature extraction layer is used to concatenate the word vector and the word vector to obtain a concatenated vector. The fully connected layer is used to process the concatenated vector through an activation function to obtain the probability of different labels in the sequence annotation corresponding to each character, thereby obtaining a label sequence of the electronic health record data, and determining the clinical entity in the electronic health record data based on the label sequence of the electronic health record data.
[0045] In some other embodiments, a deep learning model is used to identify clinical entities in the electronic health record data, and obtaining the clinical entities may include: converting each character of the electronic health record data into a word vector and a word vector to which each character belongs, and concatenating the word vector and the word vector to obtain a concatenated vector. By performing feature extraction on the concatenated vector, a concatenated feature vector is determined, and the probability of each character corresponding to a different label is obtained according to the concatenated feature vector. The probability of different labels corresponding to each character is processed by setting constraints to obtain the optimized probability of each character corresponding to a different label. According to the optimized probability of each character corresponding to a different label, a label sequence of the electronic health record data is determined. The clinical entities in the electronic health record data are determined based on the label sequence of the electronic health record data.
[0046] Specifically, the deep learning model includes: an embedding layer, a feature extraction layer, a fully connected layer and a constraint layer. The embedding layer is used to convert each character of the electronic health record data into a word vector and a word vector to which each character belongs. The feature extraction layer is used to concatenate the word vector and the word vector to obtain a concatenated vector. The fully connected layer is used to process the concatenated vector through an activation function to obtain the probability of different labels in the sequence annotation corresponding to each character, thereby obtaining a label sequence of the electronic health record data, and determining the clinical entities in the electronic health record data based on the label sequence of the electronic health record data. The constraint layer is used to learn the constraints between the labels, and process the probabilities of different labels corresponding to each character through the constraints to obtain an optimized label sequence.
[0047] Step 3: Map the clinical entity to a preset data model through an information extraction algorithm to obtain a mapping result, and obtain structured data according to the clinical entity and the mapping result, wherein the mapping result includes the category of the preset data model to which the clinical entity belongs.
[0048] Specifically, entity attributes of clinical entities in electronic health record data are extracted through information extraction algorithms, and clinical entities are mapped to data models of corresponding types according to preset data models and extracted entity attributes. Among them, the preset data models include: disease-drug data model, traditional Chinese medicine diagnosis and treatment data model, western medicine diagnosis and treatment data model, etc. Correspondingly, the category of the disease-drug data model can be drug research, the category of the traditional Chinese medicine diagnosis and treatment data model can be traditional Chinese medicine diagnosis and treatment, the category of the western medicine diagnosis and treatment data model can be western medicine diagnosis and treatment, and the entity attributes include western medicine diagnosis and treatment, drug research, and traditional Chinese medicine diagnosis and treatment.
[0049] like Figure 2 As shown in FIG. 1 , the process of extracting entity attributes from clinical entities in electronic health record data through an information extraction algorithm includes:
[0050] S301: Perform dependency analysis on the input clinical entities based on transfer dependency analysis to find the core words of the electronic health record data.
[0051] S302: recursively search for all words that are parallel to the core word to form a predicate list.
[0052] S303: For each predicate, find its subject and object according to the dependency relationship to form an information tuple.
[0053] S304: For an information tuple without a subject, find a parent tuple that is parallel to its predicate and has a subject. If the parent tuple exists, set the subject of the information tuple as the subject of the parent tuple. If not found, do not process it.
[0054] S305: Return the extraction result and obtain the entity attributes of the clinical entity.
[0055] It is not difficult to understand from the above content that dependency analysis is performed on clinical entities through transferred dependency analysis to determine the entity attributes of the clinical entities. According to the entity attributes of the clinical entities and the category of the preset data model, the clinical entities are mapped to the corresponding preset data models to obtain the mapping relationship between the clinical entities and the preset data models, that is, to determine the category of the data model to which the clinical entities belong.
[0056] It is further not difficult to understand that the present application determines the entity attributes of clinical entities by fully considering the dependencies of the clinical entities input. It is not difficult to see that the entity attributes of clinical entities determined by the present application are not based on the single characters or semantics of clinical entities, but are based on the entity attributes of clinical entities determined by the sentences or paragraphs where the clinical entities are located. Therefore, the entity attributes of clinical entities determined by the present application are more accurate. And then the accuracy of the structured data obtained by the present application according to the mapping relationship (i.e. matching relationship) between the categories of the preset data model and the entity attributes of the clinical entities is also higher.
[0057] Step 4: Verify the clinical entities and mapping results through anomaly detection algorithms to obtain verified structured data.
[0058] like Figure 3 As shown, the clinical entities and mapping results are verified by anomaly detection algorithms, and the structured data obtained may specifically include:
[0059] Step S401: randomly select k clinical entities from n clinical entities and their mapping results as initial cluster centers, and determine the k categories as the initial cluster centers.
[0060] Step S402: Determine the categories to which the nk clinical entities and their mapping results belong according to the nk clinical entities and their mapping results, the k initial cluster centers and the k categories serving as the initial cluster centers.
[0061] In some embodiments, taking the category to which the i-th clinical entity and its mapping result belong as an example, according to the i-th clinical entity and its mapping result, k initial clustering centers and k categories as the initial clustering centers, determining the category to which the i-th clinical entity and its mapping result belong comprises: traversing the k initial clustering centers, calculating the distance between the i-th clinical entity and its mapping result and each initial clustering center, and taking the distance between the i-th clinical entity and its mapping result x in the k initial clustering centers and the i-th clinical entity and its mapping result x in the k initial clustering centers. i The category corresponding to the initial cluster center with the smallest distance is taken as the category of the i-th clinical entity.
[0062] Specifically, traverse the k initial cluster centers and determine the jth initial cluster center and the i-th clinical entity and their mapping result x among the k initial cluster centers. i The minimum distance c i It can be calculated by formula (1):
[0063]
[0064] Among them, x i is the i-th clinical entity and its mapping result; u j is the jth initial cluster center; ||x i -u j || 2 is the bi-norm of the difference between the ith clinical entity and its mapping result and the jth initial cluster center, that is, the Euclid distance between the ith clinical entity and its mapping result and the jth initial cluster center; arg min is the traversal calculation of the ith clinical entity and its mapping result x i Euclid distance from each initial cluster center to determine the jth initial cluster center among the k initial cluster centers and the i-th clinical entity and its mapping result x i The Euclid distance is the smallest.
[0065] It is not difficult to understand from formula (1) that the category corresponding to the jth initial cluster center is the category of the ith clinical entity and its mapping result.
[0066] It is not difficult to see from the above that by using nk clinical entities and their mapping results, k initial clustering centers and k categories as initial clustering centers, the categories to which the nk clinical entities and their mapping results belong are determined, that is, the nk clinical entities and their mapping results are divided into the categories of the k initial clustering centers, that is, the n clinical entities and their mapping results are divided into K categories.
[0067] Step S403: Taking the average value of the clinical entities in each category and their mapping results as the second cluster center, determining the category of the second cluster center.
[0068] Step S404: Determine the category to which the n clinical entities and their mapping results belong according to the n clinical entities and their mapping results, the k second cluster centers and the categories of the k second cluster centers.
[0069] Step S405: Taking the average value of the clinical entities in each category and their mapping results as the third cluster center, determining the category of the third cluster center.
[0070] S406: Repeat steps S403 to S405, and when the distance between each third cluster center and the corresponding second cluster center is not greater than a first preset value, determine the clinical entities in the category of each third cluster center and the mapping results thereof.
[0071] S407: Determine the distance between each clinical entity and its mapping result in the category of each third cluster center and the corresponding third cluster center, and when the distance between the clinical entity and its mapping result and the corresponding third cluster center is greater than a second preset value, eliminate the clinical entity and its mapping result.
[0072] S408: Obtain structured data based on the eliminated clinical entities and their mapping results.
[0073] From the above content, it is not difficult to understand that by performing cluster calculation on each clinical entity and its mapping results, clinical entities and their mapping results whose cluster calculation results are greater than a second preset value are eliminated according to the cluster calculation results corresponding to each clinical entity and its mapping results, thereby obtaining structured data, wherein the structured data may include clinical entities and categories of data models corresponding to the clinical entities.
[0074] It is not difficult to understand that the present application verifies the structured data by performing clustering calculation on the clinical entities and their mapping results to obtain the verified structured data, that is, the verified structured data eliminates the clinical entities and their mapping results whose clustering calculation results are greater than the preset values, and retains the clinical entities and their mapping results whose clustering calculation results are not greater than the preset values, that is, the verified structured data has better clustering, thereby making the consistency and accuracy of the verified structured data higher.
[0075] In summary, this application uses a deep learning model to identify clinical entities in electronic health record data, effectively improving the efficiency and accuracy of clinical entity identification. The identified clinical entities are mapped to a preset data model through an information extraction algorithm to obtain a mapping result to adapt to electronic health record data in different formats or different medical fields, thereby obtaining structured data with high consistency.
[0076] In an embodiment of the present application, a deep learning model is used to identify clinical entities in electronic health record data to obtain clinical entities. The deep learning model is used to determine the probability of different labels corresponding to each character of the electronic health record data, and the label of each character of the electronic health record data is determined according to the probability of different labels corresponding to each character of the electronic health record data, thereby determining the label sequence of the electronic health record data. The clinical entity in the electronic health record data is determined based on the label sequence of the electronic health record data.
[0077] The deep learning model of this application is described in detail below.
[0078] In an embodiment of the present application, a deep learning model is used to determine the probability of different labels corresponding to each character of the electronic health record data, and the label of each character of the electronic health record data is determined according to the probability of different labels corresponding to each character of the electronic health record data, thereby determining the label sequence of the electronic health record data. Taking BIO annotation as an example, the different labels corresponding to each character include B, I, and O, where B and I jointly represent entities, B represents the starting position of a named entity, I represents the position inside the named entity, and O represents a non-entity or non-target category entity. For example, "occasional cramps in the right lower abdomen" is marked as:
[0079] right Down belly even you twist pain Annotation B I I O O B I
[0080] Table 1 BIO annotation examples
[0081] like Figure 4 As shown, in one embodiment of the present application, the deep learning model may include: an embedding layer 101, a neural network layer 102, wherein the neural network layer 102 includes a feature extraction layer 1021 and a fully connected layer 1022.
[0082] The embedding layer 101 is used to convert each character of the electronic health record data into a word vector and a word vector to which each character belongs, and concatenate the word vector and the word vector to obtain a concatenated vector.
[0083] Specifically, the embedding layer 101 is used to obtain the input electronic health record data, and convert each character of the electronic health record data into a word vector and a word vector to which each character belongs. The method used can be word embeddings, such as word2vec, glovec, fasttext, etc., which maps each word to a real number vector, and these vectors are semantically related.
[0084] The feature extraction layer 1021 is used to determine a splicing feature vector by performing feature extraction on the splicing vector.
[0085] In some embodiments, since medical texts contain a large number of special entities such as professional terms and proper nouns, contextual information is needed to accurately extract these entities. Therefore, the neural network layer 102 of the present application can adopt a bidirectional long short-term memory (BiLSTM) network. The BiLSTM network can fully consider the contextual semantic information of the electronic health record data and avoid the long-distance dependency problem of the medical text, thereby obtaining a concatenated feature vector with richer information, thereby improving the accuracy of the fully connected layer 1022 in determining the probability that each character of the electronic health record data corresponds to a different label.
[0086] The fully connected layer 1022 is used to obtain the probability of different labels corresponding to each character of the electronic health record data according to the concatenated feature vector.
[0087] Specifically, the fully connected layer 1022 maps the concatenated feature vector to a probability distribution corresponding to each label through an activation function, and then normalizes the probability distribution of different labels corresponding to each character to generate the probability of different labels corresponding to each character. According to the combination of the labels with the highest probability for each character, the label sequence corresponding to the electronic health record data can be obtained, and the clinical entity identified from the electronic health record data can be obtained according to the label sequence.
[0088] It is not difficult to understand that the probability of each character of the electronic health record data corresponding to different labels determined by the deep learning model is used as the label of the character, thereby determining the label sequence of the electronic health record data. The label sequence of the electronic health record data is the label of each character of each electronic health record data. According to the label sequence, the clinical entities identified from the electronic health record data can be obtained. For example, as shown in Table 1, the probabilities of different labels "B", "I", and "O" corresponding to the character "right" are 0.8, 0.12, and 0.08, respectively. Therefore, the label with the highest probability corresponding to the character "right" is "B". Similarly, the label sequence with the highest probability of obtaining the electronic health record data "occasional colic in the right lower abdomen" is "BIIOOBI". Therefore, the label sequence contains two clinical entities, namely the right lower abdomen corresponding to BII, and the colic corresponding to BI.
[0089] In an embodiment of the present application, the BiLSTM network is a variant of the Long Short-Term Memory (LSTM) network, which runs two LSTMs simultaneously on the time series, one processing from front to back and the other processing from back to front.
[0090] A recurrent unit of LSTM is Figure 5 As shown in Figure 1, the information in the cell state c is updated through the gating mechanism to achieve the purpose of controlling information transmission and avoiding long-distance dependency problems. Among them, the forget gate uses the gating function to determine the cell state c of the previous node. t-1 For the current cell state c t The importance of t-1 The information in c is partially forgotten and integrated into c t In the state vector, the input gate responds to the current input information x t Selective memory is performed and selectively added to c t The output gate determines the cell state c of the current node. t How much to output to the current hidden state ht LSTM uses the current input x t and the hidden state h at the previous moment t-1 As the input to train the control signals of each gate, update the hidden state h t And get the current output y t , and its calculation formula is as shown in formula (2)-formula (4), where W and b are the parameters that need to be learned.
[0091]
[0092] y t =o t ⊙tanh(c t ) (4)
[0093] From the above content, it can be seen that although the neural network layer 102 can find the label with the maximum probability corresponding to each character, in fact, directly determining the label of each character based on the probability of different labels corresponding to each character of the electronic health record data determined by the neural network layer 102 is not ideal. The reason is that although the feature extraction layer 1021 can learn the dependencies between the observation sequences through a bidirectional setting, the probability outputs obtained by the normalization processing of the fully connected layer 1022 are independent of each other, and the outputs have no effect on each other. Such a model cannot learn the transfer dependencies between the output annotations (the probability transfer matrix of the label) and the constraints of the sequence annotation, such as the beginning of the sentence should be "B" or "O", not "I".
[0094] like Figure 6 As shown, in another embodiment of the present application, the deep learning model may include: an embedding layer 201, a neural network layer 202, and a constraint layer 203, wherein the neural network layer 202 includes a feature extraction layer 2021 and a fully connected layer 2022. The contents of the embedding layer 201 and the neural network layer 202 refer to the contents of the embedding layer 101 and the neural network layer 102 mentioned above, and are not described in detail here.
[0095] The constraint layer 203 is used to process the probability of different labels corresponding to each character by setting constraint conditions, and obtain the optimized probability of each character corresponding to different labels. The constraint conditions are to characterize the constraint relationship between each label through the learned features. As can be seen from the previous text, the optimized clinical entity identified from the electronic health record data can be obtained.
[0096] Specifically, the constraint condition is the constraint condition for learning sequence labeling. The probability of different labels corresponding to each character output by the neural network layer 202 is used as the input of the constraint layer 103, and the constraint condition is set to output the maximum possible probability of the predicted sequence label that meets the sequence label transfer constraint condition.
[0097] The constraint layer 203 can further improve the accuracy of the output results based on the learned constraints. For example: (1) B is used to represent the starting boundary of an entity name. The label of "right" in "right lower abdomen" should be "B" instead of "I". (2) The attributes of the labels corresponding to the same entity are the same. The label of "right lower abdomen" is "B-body I-body I-body", and the attributes are all "body", not "B-body I-disease I-body" or others. The constraint layer 203 uses the learned features to characterize the constraint relationship between each label, and uses the state feature function and the transition feature function to evaluate the label sequence. Assume that the input sequence is given:
[0098] X=(x 1 , x 2 , …, x n )
[0099] The corresponding output sequence is:
[0100] Y=(y 1 ,y 2 , …, y 3 )
[0101] The score function is defined as:
[0102]
[0103] Among them, F(X, Y) represents the probability score that the entity label sequence corresponding to the input text sequence X is Y. Indicates that the i-th character is labeled with label y i The probability of. N is the transfer matrix, Represents the label y i The next label is y i+1 The probability of the current entity label is the influence of the context, external dictionary, rules and other features on the current entity label. By finding the maximum probability score, we can get the current optimal output label sequence.
[0104] It is not difficult to understand from the above content that a constraint layer 203 is added to the neural network model. The constraint layer 203 processes the probability of different labels corresponding to each character by setting the constraint condition, and uses the state feature function and the transfer feature function to evaluate the label sequence to obtain the probability of each character corresponding to different labels after optimization, so that the probability of the label of each character output can fully consider the transfer dependency of the electronic health record data (i.e., the dependency of the previous and next characters in the electronic health record data, the dependency of the sentences in the electronic health record data, etc.), and determine the label sequence of the electronic health record data according to the probability of each character corresponding to different labels after optimization, so that the label sequence or clinical entity of the output electronic health record data is more accurate. In this way, the accuracy of the neural network model in identifying clinical entities in the electronic health record data is improved, thereby ensuring the accuracy of the structured data finally obtained.
[0105] like Figure 7 As shown, an electronic health record structured processing system is used to execute the above-mentioned electronic health record structured processing method. The system includes: an acquisition module, a natural language processing module 1, an information extraction and mapping module 2, and a quality control module 3.
[0106] The acquisition module is used to obtain electronic health record data.
[0107] The natural language processing module 1 is used to identify clinical entities in electronic health record data using a deep learning model to obtain clinical entities, wherein the deep learning model is trained using an entity data set corresponding to a medical professional dictionary.
[0108] The information extraction and mapping module 2 is used to map the clinical entity to a preset data model through an information extraction algorithm to obtain a mapping result, obtain structured data according to the clinical entity and the mapping result, and transmit the obtained structured data to the quality control module 3. The mapping result includes the category of the data model to which the clinical entity belongs.
[0109] The quality control module 3 is used to verify the clinical entity and the mapping result through an abnormality detection algorithm to obtain verified structured data.
[0110] In other embodiments, the electronic health record structured processing system may further include: a data integration and storage module 4 , an API and data access module 5 , a user interface and interaction module 6 , and a system maintenance and optimization module 7 .
[0111] The data integration and storage module 4 is used to integrate the structured data verified by the quality control module 3 into the central database to achieve unified management and efficient access to the data. The database can adopt a hybrid storage solution of relational database and NoSQL database to optimize the data storage structure and improve query efficiency. In the hybrid storage solution of relational database and NoSQL database, it includes a storage layer, a communication layer and an application layer. The storage layer includes SQL storage and NoSQL storage. SQL storage is mainly responsible for structured data storage and processing, and NoSQL storage is responsible for unstructured data storage and processing. The communication layer is responsible for real-time synchronization and asynchronous transmission of data to ensure the ultimate consistency of data at different database layers. The application layer implements business logic and external interfaces, and interacts with the storage layer through a unified data access layer.
[0112] API and data access module 5: used to authenticate and authorize external requests, and provide data services for authenticated and authorized requests. For example, when medical staff need to obtain patient data, they need to verify whether the doctor is the patient's attending physician, and when ordinary users need to obtain their own data, they need to verify whether they are the patient themselves, otherwise data access will be prohibited or restricted, ensuring the security of data access, while providing data caching and load balancing to optimize performance.
[0113] The user interface and interaction module 6 is used to display structured data according to external requests and to review and analyze the requested structured data, for example, by displaying analysis results through charts and reports, supporting custom queries and visual displays, and improving user experience.
[0114] The system maintenance and optimization module 7 is used to collect the operation data and user feedback of the electronic health record structured processing system through log management and performance monitoring tools, and to adjust the configuration and optimize the algorithm of the electronic health record structured processing system.
[0115] It should be understood that the embodiments of the present invention can be implemented in hardware, software or a combination thereof. Software can be stored in a volatile or non-volatile storage device (regardless of whether the data is deletable or rewritable) like a ROM, in a memory like a RAM, a memory chip, a device or an integrated circuit, or in a storage medium on which data can be optically or magnetically recorded and from which data can be read by a machine (e.g., a computer), such as a compact disc (CD), a digital versatile disc (DVD), a disk, or a tape. Moreover, the embodiments of the present invention can be implemented in a computer or portable terminal having a controller and a memory, and the memory is an example of a non-temporary computer-readable storage medium suitable for storing one or more programs including commands for implementing the embodiments of the present invention. Therefore, the present invention includes a program having a code for implementing the device or method defined by the claims, and a machine-readable non-temporary storage medium storing the program. The program can be transferred electrically by a medium such as a communication signal transmitted via a wired or wireless connection, and the program and its equivalent are included in the present invention.
[0116] The device may receive a program from a program providing device connected via a cable or wirelessly and store the program. The program providing device may include a program containing commands for implementing the embodiments of the present invention, a memory for storing information required by the embodiments of the present invention, a communication module for communicating with the mobile device via a cable or wirelessly, and a controller for transmitting the program to the device automatically or upon request of the device.
[0117] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for structuring electronic health records, characterized in that: The method comprises: access to electronic health record data; Using a deep learning model to identify clinical entities in the electronic health record data to obtain clinical entities, wherein the deep learning model is trained by an entity data set corresponding to a medical professional dictionary; Mapping the clinical entity to a preset data model through an information extraction algorithm to obtain a mapping result, and obtaining structured data according to the clinical entity and the mapping result, wherein the mapping result includes the category of the data model to which the clinical entity belongs; The clinical entity and the mapping result are verified by an anomaly detection algorithm to obtain verified structured data.
2. The method for structuring electronic health records according to claim 1, characterized in that: The identifying clinical entities in the electronic health record data using a deep learning model comprises: Convert each character of the electronic health record data into a word vector and a word vector to which each character belongs, and concatenate the word vector and the word vector to obtain a concatenated vector; Determine a splicing feature vector by performing feature extraction on the splicing vector, and obtain the probability that each character corresponds to a different label according to the splicing feature vector; Determining a label sequence of the electronic health record data according to the probability that each character corresponds to different labels; A clinical entity in the electronic health record data is determined based on a tag sequence of the electronic health record data.
3. The method for structuring electronic health records according to claim 1, characterized in that: The identifying clinical entities in the electronic health record data using a deep learning model comprises: Convert each character of the electronic health record data into a word vector and a word vector to which each character belongs, and concatenate the word vector and the word vector to obtain a concatenated vector; Determine a splicing feature vector by performing feature extraction on the splicing vector, and obtain the probability that each character corresponds to a different label according to the splicing feature vector; By setting constraints, the probability of different labels corresponding to each character is processed to obtain the optimized probability of different labels corresponding to each character; Determine the label sequence of the electronic health record data according to the optimized probability that each character corresponds to different labels; A clinical entity in the electronic health record data is determined based on a tag sequence of the electronic health record data.
4. The method for structuring electronic health records according to claim 1, characterized in that: Mapping the clinical entity to a preset data model by an information extraction algorithm to obtain a mapping result includes: Using the information extraction algorithm to extract entity attributes of the clinical entity to obtain entity attributes of the clinical entity; According to the category of the preset data model and the entity attribute of the clinical entity, the clinical entity is mapped to the data model of the corresponding category.
5. The method for structuring electronic health records according to claim 4, characterized in that: The information extraction algorithm is used to extract entity attributes of the clinical entity, and the entity attributes of the clinical entity obtained include: Transfer-based dependency analysis performs dependency analysis on the input clinical entities to find the core words of the electronic health record data; Recursively search for all words that are parallel to the core word to form a predicate list; For each predicate, find its subject and object according to the dependency relationship to form an information tuple; For an information tuple without a subject, find a parent tuple that is parallel to its predicate and has a subject. If the parent tuple exists, set the subject of the information tuple as the subject of the parent tuple. If not found, do not process it. Return the extraction results and obtain the entity attributes of the clinical entity.
6. The method for structuring electronic health records according to claim 4, characterized in that: The preset data model includes at least one of the following: a disease-drug data model, a traditional Chinese medicine diagnosis and treatment data model, and a western medicine diagnosis and treatment data model; Correspondingly, the category of the preset data model includes at least one of the following: the category of the disease-drug data model is drug research, the category of the traditional Chinese medicine diagnosis and treatment data model is traditional Chinese medicine diagnosis and treatment, and the category of the western medicine diagnosis and treatment data model is western medicine diagnosis and treatment.
7. The method for structuring electronic health records according to claim 1, characterized in that: The clinical entity and the mapping result are verified by an abnormality detection algorithm to obtain the verified structured data including: Cluster calculation is performed on the clinical entities and their mapping results, and clinical entities and their mapping results whose cluster calculation results are greater than a preset value are eliminated according to the cluster calculation results corresponding to the clinical entities and their mapping results, so as to obtain verified structured data.
8. An electronic health record structured processing system, characterized in that: include: an acquisition module for acquiring electronic health record data; A natural language processing module, configured to use a deep learning model to identify clinical entities in the electronic health record data to obtain clinical entities, wherein the deep learning model is trained by an entity data set corresponding to a medical professional dictionary; An information extraction and mapping module, used to map the clinical entity to a preset data model through an information extraction algorithm to obtain a mapping result, and obtain structured data according to the clinical entity and the mapping result, wherein the mapping result includes the category of the data model to which the clinical entity belongs; The quality control module is used to verify the clinical entity and the mapping result through an anomaly detection algorithm to obtain verified structured data.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the electronic health record structuring processing method according to any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by a processor, the steps of the electronic health record structuring processing method according to any one of claims 1 to 7 are implemented.