Background
The auxiliary diagnosis system based on the electronic medical information analysis is widely applied along with the improvement of the level of the electronic and information of the hospital. Besides the diagnosis and treatment experience of the new patient can be obtained from the past medical record, the doctor can also inspire the treatment means of other similar patients stored in the auxiliary diagnosis system. The information stored in the electronic medical record is analyzed and utilized, so that the doctor can make accurate diagnosis and help. The invention aims to analyze the past medical records, and if experts judge the similarity of partial medical records, the invention analyzes the new medical records according to the similarity relation and searches the medical records or medical record clusters which are similar to the current medical records in the existing medical records.
In the current stage, the analysis of the Chinese medical record mainly uses a machine learning method to predict the patient described by the medical record or combines medical image information to classify the illness state of the patient, and the like. The main means of similarity evaluation is to analyze numerical features in medical records with higher degrees of structure through metric learning.
The defects and shortcomings of the prior art are as follows:
although the prior art applies the traditional distance measurement learning method to the Chinese medical record text analysis system, the prior art still has the following disadvantages due to the limitation of the data or research method:
(1) the data structuring degree is required to be high. The research objects of the existing method are medical records with higher structuralization degree. The contents of the medical record are organized in a certain form. The medical records in the form of a large amount of free medical texts are analyzed less, and the invention provides that the numerical variables, the time information, the medical entities and the like are extracted from the free texts of the medical records.
(2) From the practical application point of view, the prior art tries to find a suitable algorithm from the medical record content to calculate the similarity between the medical records, and does not dig the potential rules or characteristics behind the given label to further find similar medical records.
Disclosure of Invention
In order to solve the above problems, the invention provides a text analysis method for a Chinese electronic medical record, which comprises the following steps:
step S10, the real medical record text is used as original data, and a medical record data set to be processed is obtained through input, format conversion and storage;
step S30, separating the numerical variables and the text information using a regularization process, wherein,
step S301, a regular expression corresponding to the numerical variable is constructed, the meaning category of the numerical information is determined according to the context expression, and different categories of time information are searched and structurally stored;
step S302, performing word segmentation on the text by adopting a natural language processing method, performing part-of-speech tagging on the segmentation result, performing further screening by combining medical entity identification, and determining the position and the type of the medical key vocabulary information in the text information;
step S303, analyzing and obtaining the screened medical key words and information according to the word segmentation, part of speech tagging and entity recognition results;
step S50, converting the text information into a numerical vector which can be identified and processed by a computer;
step S60, adding similarity relation labels among the medical record texts;
step S70, learning the label of the medical record text by combining a similarity learning method and a distance measurement learning method;
and step S80, screening medical records with similarity in the medical record data set according to the labeling and training results.
Preferably, the method further includes step S20, classifying and storing according to the medical record type to which the real medical record text belongs, forming a medical record data set, and dividing each medical record text into a plurality of paragraphs according to the medical activity process recorded in the medical record.
Preferably, in step S60, the doctor' S conclusion in the diagnosis part of the medical record is subjected to feature extraction, and the similarity degree between the medical records is judged by referring to the features, so that the similarity label is added to each medical record text.
Preferably, a machine learning method is adopted to classify and cluster the medical record texts, and whether the extracted features are suitable for judging the medical record similarity is verified.
Preferably, the doctor' S conclusion extracted in step S60 and the medical key vocabulary and information filtered in step S30 are also applied to generate a simulated medical record text.
Preferably, in step S60, the digitized high-dimensional vector is also subjected to dimensionality compression, and the high-dimensional vector is subjected to dimensionality compression by using a dimensionality reduction algorithm to reduce sparsity.
Preferably, in step S70, the medical record text data labeled in step S60 is used as training data, and for different similarity criteria, a semi-supervised or weakly-supervised metric learning algorithm is used for training according to the labeled similarity relationship between medical record texts;
in step S80, similar medical records corresponding to the similarity criteria are screened out according to the different similarity criteria.
Preferably, the meaning category of the numerical information includes time information, medication dosage information, assay test result recording information.
Preferably, in step S303, the filtered medical key words and information are stored according to the time sequence of occurrence thereof.
A Chinese electronic medical record text analysis system comprises:
the medical record text input module is used for acquiring a real medical record text and obtaining a medical record data set to be processed through input, storage and format conversion operations;
the key information screening module is used for performing medical language processing on the medical record data set, screening medical key words and information and converting the medical key words and information into a digital quantity form which can be processed by a computer;
the characteristic extraction module is used for extracting the characteristics of the doctor conclusion in the diagnosis part of the medical record;
the medical history text simulation module is used for applying the extracted doctor conclusion and the screened medical key vocabulary information to training to generate a simulation medical history text and paragraphs thereof;
the similarity marking module is used for marking the similarity of the medical record data sets according to the similarity standard;
the similarity training module is used for training by adopting a semi-supervised or weakly-supervised algorithm according to the similarity marking result of the similarity marking module;
and the similar result output module is used for sequencing and outputting the similar medical record clusters of the new medical record in the original medical record database according to the similarity degree according to the similarity standard and the training result.
Compared with the prior art, the invention has the following beneficial effects:
(1) the invention provides a new analysis method, which provides a set of complete flow from input to output corresponding to the data of medical record texts. The method can be applied to the design of a clinical electronic medical record text system.
(2) The common electronic medical record system only judges the similarity of medical record texts according to default parameters and rules. However, experts with different medical knowledge specialties and different field backgrounds can make different judgments about whether the two medical record texts are similar or not. The reason for this is that the expert has different knowledge and different angles of analyzing the opinion, so that different evaluation criteria are presented when facing the same material. In the invention, the implicit different evaluation criteria can be explicitly expressed on the label of whether the medical record text is similar or not.
The invention aims to find different similar medical record text clusters from the existing medical record texts for each new medical record text through the training of the system when different medical record similar labels are given under different evaluation standards. In clinical application, the invention can provide help for doctors with different medical backgrounds to consult and discuss the disease condition.
(3) Another advantage of the present invention is that the input to the system is free text with a high degree of unstructured medical records, which will cover more comprehensive patient information and help explore more comprehensive description of the patient's condition.
Detailed Description
The embodiment of the method and the system for analyzing the text of the Chinese electronic medical record will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will recognize that the described embodiments can be modified in various different ways, or combinations thereof, without departing from the spirit and scope of the present invention. Accordingly, the drawings and description are illustrative in nature and not intended to limit the scope of the claims. Furthermore, in the present description, the drawings are not to scale and like reference numerals refer to like parts.
The method for analyzing the Chinese electronic medical record text comprises the following steps of:
step S10, using the medical record text from the clinic (i.e. the real medical record text) as the original data to obtain the medical record data set to be processed. Preferably, the medical records are respectively input and stored according to the medical record types (such as admission medical records, in-patient medical records, out-patient medical records and the like) to which the medical record texts belong.
And step S30, separating numerical variables and text information for each paragraph of the medical record by utilizing regular processing. Wherein the method also comprises the following steps of,
step S301, the meaning category of the numerical information is determined according to the context expression, so that a corresponding regular expression is constructed, and different categories of time information are searched and structurally stored. Specifically, in the case history text, the meaning expressed by the number may be classified into, for example, time record, assay result record, medication dose, and the like. And further determining the specific meaning of the extracted numerical information representation according to the context expression.
In case history texts, there are usually richer time expression modes. For example, in the medical record text, "2 years ago", 2017.5.25 represents a time point, and "3 months" represents a duration time period, by using the rule of the expression mode, a regular expression can be constructed, and the time information in the medical record text can be searched and structurally stored in a matching mode.
In the case of medical records, the number of the other part is used for indicating the medicine dosage or the test result. For example, 120mmHg represents the blood pressure value, and 38.5 ℃ represents the temperature. After searching the time information in the whole medical record, the remaining numerical information can also be saved by utilizing the regular processing. That is, different regular expressions may be set according to different meanings expressed by the time information, so that the time information, the medication dosage information, the record of the test result, and the like may be structurally stored.
And step S302, performing word segmentation on the medical history text by adopting a natural language processing method, performing part-of-speech tagging on the segmentation result by using part-of-speech information, performing further secondary screening by combining medical entity identification, and determining the position and the type of the medical key vocabulary information in the text. Specifically, after the segmentation result is primarily screened by using the part-of-speech information through a natural language processing (including segmentation, part-of-speech tagging and the like), the obtained words do not all play a role in the process of distinguishing the similarity of medical history texts, and further secondary screening needs to be performed in combination with medical entity identification. For example, in a piece of text information, some nouns are first screened out by using part-of-speech information, and contents with certain medical significance can be further screened out by further performing secondary screening by using medical entity recognition. Such as some drug names, some body parts, etc., the primary screening and the secondary screening help to improve the analysis effect.
Preferably, the conditional random field algorithm is used for performing entity recognition on the medical record text after word segmentation, namely, word sequences appearing in the medical record in sequence are labeled, and mapping relations between self-defined labels with certain medical information such as 'symptom', 'inspection', 'medication' or 'other' and words appearing in the text are labeled. The word segmentation and the part-of-speech result obtained as described above are used for setting the template in the conditional random field algorithm. Therefore, the position and the type of the medical key word information in the text are determined, and subsequent analysis is facilitated.
Step S303, according to the segmentation, part-of-speech tagging and entity recognition results, the screened medical key vocabulary and the information are obtained through analysis, namely, the segmentation, part-of-speech tagging and the information of entity recognition form a corresponding vocabulary, and a new vocabulary is obtained through means of obtaining intersection or union of vocabularies and the like. For example, in a method for extracting word list intersection, the word list obtained by dividing words has "eyes", the part-of-speech tagged nouns have "eyes", and the word list recognized by the medical entity also has "eyes", then the word "eyes" is screened out. If the information corresponding to the time record exists, the information can be stored according to the time sequence of occurrence, so that the information can be conveniently searched and read, for example,
fingers 2017.5.25;
onychomycosis 2017.5.28;
appendicitis 2017.11.28.
Step S50, converting the text information into a computer-processed numerical vector. In natural language processing, there are various methods such as one-hot coding or word embedding, and a text is represented by numerical vectorization by representing words appearing in the text as high-dimensional vectors. Therefore, text information can be converted into a numerical vector which can be processed by a computer, and key information in the text is retained while noise is reduced through measures such as part of speech tagging, entity recognition and the like.
And step S60, adding similarity labels to the medical record texts according to different similarity standards.
As previously mentioned, medical professionals with different knowledge backgrounds and clinical experience may give non-identical judgments for the same medical history. For the input requirement of the subsequent measurement learning algorithm, the step gives a label to the relation of similarity or not between partial medical record texts, for example, the medical record No. 1 is similar to the medical record No. 2, and the medical record No. 1 is not similar to the medical record No. 3. The task of assigning similar labels to medical record texts can be implemented in two ways, the first way is to ask medical experts to read existing medical records and to give labels. Compared with the method which consumes higher manpower cost, in the analysis process, another method can be adopted, namely, through manual similar standards, a program is written and distinguished by a computer, similar labels are given, finally, experts who set the standards review similar results, and if necessary, the labels marked by the machine can be modified. The method is not only manually participated, but also utilizes a computer for marking, and the semi-automatic method is favorable for saving manpower. Whether fully via manual labeling or semi-automated labeling, when similarity criteria differ, there will be different similarity labels for relationships between the same medical records, and such differences in labeling will result in different output results. For example, two medical records may have a high similarity to one similarity criterion and a low similarity to another similarity criterion.
And step S70, learning the label of the data by combining a similarity learning method and a distance measurement learning method. The step is that the medical record text data labeled in the step S60 is used as training data, and according to the labeled similarity relation between the medical record texts, a weak supervision or semi-supervision metric learning algorithm is used for training. The model seeks to map high-dimensional vectors representing medical record text into a low-dimensional space and preserve similarity relationships therein. After a small amount of sufficient similarity relation labeling is carried out on the existing data set, the purpose of training the metric learning model based on weak supervision is to complete the mapping from a high-dimensional space to a low-dimensional space by iteratively calculating a metric matrix. Meanwhile, the model utilizes the measurement matrix to simultaneously carry out mapping transformation on the unmarked high-dimensional vector representation, and accordingly obtains the relation between the unmarked data and the marked data. Finally, a measurement matrix which can potentially represent the current labeling strategy is obtained by utilizing the similarity learning algorithm and the measurement learning algorithm, and the matrix can be utilized to calculate the similarity relation between the new medical record and the current medical record in the subsequent steps.
And step S80, calculating and screening out results of similar medical records in the original data set according to the labeling and training results.
In an alternative embodiment, step S20 is further included between step S10 and step S30, for each medical record, paragraphs are divided according to different medical activity processes recorded in the medical record, for example, parts of different record format types such as chief complaints, examination conditions, diagnoses, treatments, and the like are divided, and the subsequent steps are processed in segments according to information recorded in the parts.
In an alternative embodiment, in step S60, it is necessary to perform feature extraction on the doctor' S conclusion in the diagnosis part (determination diagnosis or auxiliary diagnosis) of the medical record, that is, extract key information of the conclusion as features, such as the type of disease and its complications, the stage of cancer, etc., and judge the similarity degree between the medical records by referring to these features, thereby adding similarity labels to the texts of the medical records.
The feature extraction method can also adopt a machine learning method to classify and cluster the medical record texts besides the means such as entity identification and the like, and verify the effect of the extracted features on judging the medical record attributes.
In an alternative embodiment, the physician' S conclusion of feature extraction and the medical key vocabulary and information filtered in step S30 may also be applied to generate a simulated medical history text.
In an alternative embodiment, in step S60, the digitized high-dimensional vector is also subjected to dimensionality compression, and the result of the high-dimensional vector is directly used for metric learning, which may increase hardware resources and time consumed by program operation. Therefore, if the numerical vectors representing the medical record texts need to be subjected to feature extraction, the part mainly refers to the step of compressing the dimensionality of the high-dimensional vectors by using a dimensionality reduction algorithm to reduce sparsity.
In an alternative embodiment, in step S70, the model may be trained according to different similarity criteria, and correspondingly, in step S80, similar medical records corresponding to the similarity criteria may be screened out.
The invention also provides a Chinese electronic medical record text analysis system which comprises a medical record text input module 11, a medical record text structuring module 12, a key information screening module 13, a medical record text simulation module 14, a feature extraction module 15, a similarity marking module 16, a similarity training module 17, a similar result output module 18 and the like. The medical record text input module obtains a medical record text from a data source, and obtains a medical record data set to be processed through input, storage and format conversion. The medical record structuring module converts a medical record data set formed by input medical records into a format with a higher structuring degree, and particularly, for each medical record, segments are divided according to different medical activity processes recorded in the medical record, for example, segments with different record format types such as chief complaints, examination conditions, diagnoses, treatments and the like are divided. However, this module can be omitted if the input medical record is already structured data. The key information screening module performs medical language processing on the structured medical record text, extracts medical entities and time information, and converts the medical entities and the time information into a digital quantity form which can be processed by a computer. The feature extraction module classifies and cluster-analyzes the data set by adopting a machine learning method, and generates a simulation medical record text by utilizing the screened key information, the extracted medical entity features and other information, and the feature extraction module mainly aims at transforming the original medical record, and plays the roles of removing privacy and protecting the right of a patient. And the generated simulation medical record text is used for the training module to perform data training.
The similarity labeling module is used for labeling similarity labels of medical records, and can label different similarities of different parts of the medical record data set according to different similarity standards set by a user. For example, one similarity criterion can be employed for two medical records in the medical record dataset, and another similarity criterion can be employed for other medical records. The similarity marking module is used for the training module and giving similarity standards to the output module. The training module adopts a semi-supervised method or a weakly supervised similarity learning method to train data according to the similarity labeling result of the similarity labeling module. And the output module is used for visually outputting the similar medical record clusters of the new medical record in the original medical record database according to the similarity standard and the training result. The output results may be affected by different similarity criteria and different results may be output. And for each output result, sorting the output results according to the similarity obtained by algorithm calculation.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.