A method and system for evaluating the quality of electronic medical records based on text classification algorithm
By using a natural language processing model based on text classification algorithms to segment and classify electronic medical record texts, the problem of contingency and lack of applicability in the quality assessment of structured results of electronic medical records in the existing technology is solved, and automated assessment and accuracy improvement are achieved.
Patent Information
- Application Number
- CN202210449648.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-04-24
AI Technical Summary
In the existing technology, in the quality assessment of structured results of electronic medical records, manual review and rule analysis methods have contingency and insufficient applicability. It is especially difficult to effectively assess the quality of natural text with unlimited length and variable value range.
Use a method based on text classification algorithms to understand the text semantics in electronic medical records through natural language processing models. After segmentation, classify and compare the parsing results with labels, calculate the parsing accuracy, and explore the causes of errors. Use the fasttext model to reduce resource consumption. Improve accuracy.
It realizes automated item-by-item quality assessment of electronic medical record parsing results and generates assessment reports, which improves assessment accuracy, reduces workload, and avoids the problem of erroneous incorporation of parsed content into other tags.
Smart Images

Figure CN114880471B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to an electronic medical record quality assessment method and system based on a text classification algorithm. Background Art
[0002] Since electronic medical record structured data is an important research object and data analysis basis for clinical research, the quality of electronic medical record structuring directly determines the accuracy of subsequent clinical research results. Electronic medical record quality assessment technology is a technology that conducts quality inspections on electronic medical record structured results, screens out electronic medical record content with parsing errors, and calculates the accuracy of parsing.
[0003] Currently, the industry's quality assessment of electronic medical record structured results mostly uses two methods: manual review and rule analysis.
[0004] Among them, the manual review method refers to randomly sampling N data from the massive structured results, and then manually reviewing the sampled N data to calculate the parsing accuracy and summarize the reasons for the parsing errors. The disadvantage of this method is that random sampling has a certain degree of randomness and cannot fully represent the overall level.
[0005] The rule analysis method refers to limiting the length, value range, etc. of the parsed content, so as to evaluate the quality of the parsing results and filter out parsing errors. For example, for the content of the parsed "gender" field, the value range restriction method can be used for quality assessment. When the gender field contains content other than "male", "female", "male", "female", "other", and "unknown", the corresponding record is considered to have a parsing error. For the content of the parsed "name" field, the field length restriction method can be used for quality assessment. When the name field content exceeds a certain length, the task record is parsed incorrectly. However, this method and rule method is no longer applicable to the quality assessment of natural text with unlimited length and uncertain value range.
[0006] Aiming at the problem of quality assessment of natural text with unlimited length and uncertain value range in structured results of electronic medical records, the present invention proposes an electronic medical record quality assessment method and system based on text classification algorithm. Summary of the invention
[0007] In order to overcome the defects of the prior art, the present invention provides a simple and efficient electronic medical record quality assessment method and system based on text classification algorithm.
[0008] The present invention is achieved through the following technical solutions:
[0009] A method and system for evaluating the quality of electronic medical records based on a text classification algorithm, characterized in that: based on a natural language processing model, the text semantics in the structured electronic medical record is understood, and then the parsed text is classified and compared with the current parsed label to determine the correctness of the parsing;
[0010] The following steps are involved:
[0011] Step S1, obtain the current electronic medical record analysis result, the analysis result format is as follows.
[0012] [{k1:t1},{k2:t2},…{k i :t i}] k i ∈K
[0013] Among them, K is the parsed label k i The collection of i Structured results for electronic medical records;
[0014] Step S2: Structuring the electronic medical records i The sentence division results are as follows:
[0015] [{k1:[t 11 ,t 12 ,t 13 …]},{k2:[t 21 ,t 22 ,t 23 …]},…{k i :[t i1 ,t i2 ,t i3 …]}] k i ∈K
[0016] Step S3: ij Input each item into the natural language processing model to conduct a quality assessment on the structured results of the electronic medical record. The evaluation results are as follows:
[0017] [{k i :{t i1 :k p ,t i2 :k p ,…t ij :k p}}…]
[0018] Among them, k p For the natural language processing model, the sentence t ij The classification result, i.e., the semantic classification label;
[0019] If the semantic classification label k p and parsed label ki The same, then the clause t ij Correct classification;
[0020] Step S4: Calculate the accuracy of the evaluation results one by one, and the calculation formula is as follows:
[0021]
[0022] Among them, p true (i) is the accuracy of the analysis result, N ki=kp is the semantic classification label k in the sentence list of the parsing result p and parsed label k i The same number of clauses, N is the number of clauses in the clause list of the parsing result;
[0023] p true (i) is larger, the more correct the analysis result is; when p true When (i) = 1, it means that each clause after the parsing result is semantically consistent with the semantic content of the parsing tag;
[0024] Step S5, calculating the overall parsing accuracy and exploring the causes of erroneous parsing;
[0025] Parsing tags for electronic medical records i The quality of M data in the field is evaluated, and the accuracy of the M data parsing is as follows:
[0026]
[0027] Other tags are parsed in tag k i The probability of being misinterpreted during analysis is as follows:
[0028]
[0029] Among them, M kp It means that the structured sentences of M structured texts contain semantic classification labels k p The number of texts with similar sentences, P kp Represents M labels k to be analyzed for quality assessment i The field content is mixed with semantic classification labels k p The amount of content;
[0030] When P kp When it is larger, it means that the parsing label k i The reason for the incorrect parsing is that the parsed content is mixed with a large number of semantic classification labels k p content, thereby narrowing the scope of the cause of the error analysis; in order to improve the quality of the parsed text, the parser explores the parsing tag k based on the analysis i and semantic classification label k pThe difference in content.
[0031] In step S2, sentence segmentation is performed based on the punctuation marks in the electronic medical record text paragraph and the maximum length of the natural language processing model input, wherein the punctuation marks include but are not limited to commas, periods, and semicolons;
[0032] When processing the long sentence T, the maximum allowed length of the sentence is MAX_LEN. First, take out the short sentence t with a length of MAX_LEN from the front to the back. i ; Then search for commas, periods, and semicolons from back to front, and put the content after the first punctuation mark found back into the original long sentence, and the rest of the content is the first clause that was split. i1 ; If no punctuation marks including commas, periods and semicolons are found in the search from back to front, the short sentence t is directly used as the first sentence t i1 ; Repeat the above steps to divide the long sentence T into several sentences and complete the sentence division task.
[0033] In order to reduce resource consumption and improve accuracy, in step S3, the fasttext model is used as the natural language processing model.
[0034] The electronic medical record quality assessment system based on text classification algorithm understands the text semantics in structured electronic medical records based on natural language processing model, and then classifies the parsed text and compares it with the current parsing label to judge the correctness of the parsing. It includes sentence segmentation module, document quality assessment module, overall quality assessment module and report generation module;
[0035] The sentence splitting module is responsible for splitting the longer result sentences parsed from the structured medical record database. In order to ensure the semantics of the small sentences after splitting, the length of the short sentences must be less than the maximum length accepted by the model in the semantic evaluation module during splitting, and the sentence processing is performed with commas, periods and semicolons;
[0036] The single sentence quality assessment module is used to input the sentence segmentation results into the fasttext model, complete the assessment of each long sentence, and calculate the accuracy of a single parsing result; while the assessment results are input into the report generation module for synthesizing the quality assessment report, the assessment results of each long sentence are stored in the database for tracing the report content;
[0037] The overall quality assessment module is used to summarize the assessment results of each long sentence obtained by the single sentence quality assessment module, and calculate the accuracy of the overall parsing result to be evaluated and the probability that other tags are mistakenly incorporated during parsing;
[0038] The report generation module generates an evaluation report based on the evaluation result of the overall quality evaluation module.
[0039] When the sentence segmentation module performs sentence segmentation processing on a long sentence T to be segmented, the maximum length allowed for the sentence segmentation is MAX_LEN. First, a short sentence t with a length of MAX_LEN is taken from the front to the back. i ; Then search for commas, periods, and semicolons from back to front, and put the content after the first punctuation mark found back into the original long sentence, and the rest of the content is the first clause that was split. i1 ; If no punctuation marks including commas, periods and semicolons are found in the search from back to front, the short sentence t is directly used as the first sentence t i1 ; Repeat the above steps to divide the long sentence T into several sentences, and complete the sentence division task;
[0040] The parsing result of the long sentence T to be divided in the electronic medical record is as follows:
[0041] [{k1:t1},{k2:t2},…{k i :t i}] k i ∈K
[0042] Among them, K is the parsed label k i The collection of i Structured results for electronic medical records;
[0043] For short sentences i The sentence division results are as follows:
[0044] [{k1:[t 11 ,t 12 ,t 13 …]},{k2:[t 21 ,t 22 ,t 23 …]},…{k i :[t i1 ,t i2 ,t i3 …]}] k i ∈K
[0045] The single sentence quality assessment module will sentence the result t ij Input each item into the natural language processing model to conduct a quality assessment on the structured results of the electronic medical record. The evaluation results are as follows:
[0046] [{k i :{t i1 :k p ,t i2 :k p ,…t ij :k p}}…]
[0047] Among them, kp For the natural language processing model, the sentence t ij The classification result, i.e., the semantic classification label;
[0048] If the semantic classification label k p and parsed label k i The same, then the clause t ij The classification is correct.
[0049] The single sentence quality assessment module calculates the accuracy of the assessment parsing results one by one, and the calculation formula is as follows:
[0050]
[0051] Among them, p true (i) is the accuracy of the analysis result, N ki=kp is the semantic classification label k in the sentence list of the parsing result p and parsed label k i The same number of clauses, N is the number of clauses in the clause list of the parsing result;
[0052] p true (i) is larger, the more correct the analysis result is; when p true When (i) = 1, it means that each sentence after the parsing result is semantically consistent with the semantic content of the parsing tag.
[0053] The overall quality assessment module analyzes the labels k of the electronic medical records. i The quality of M data in the field is evaluated, and the accuracy of the M data parsing is as follows:
[0054]
[0055] Other tags are parsed in tag k i The probability of being misinterpreted during analysis is as follows:
[0056]
[0057] Among them, M kp It means that the structured sentences of M structured texts contain semantic classification labels k p The number of texts with similar sentences, P kp Represents M labels k to be analyzed for quality assessment i The field content is mixed with semantic classification labels k p The amount of content;
[0058] When P kp When it is larger, it means that the parsing label k i The reason for the incorrect parsing is that the parsed content is mixed with a large number of semantic classification labels k pcontent, thereby narrowing the scope of the cause of the error analysis; in order to improve the quality of the parsed text, the parser explores the parsing tag k based on the analysis i and semantic classification label k p The difference in content.
[0059] The beneficial effects of the present invention are as follows: the electronic medical record quality assessment method and system based on text classification algorithm understands and classifies semantic content through the text classification model in natural language processing, avoiding the problem of erroneous inclusion of other tags in the parsed content in the quality assessment task of large text content, and at the same time, realizing automatic quality assessment of each parsing result and automatic generation of assessment reports, thereby improving the accuracy of quality assessment work and reducing the workload of quality assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0061] Attached Figure 1 Schematic diagram of the electronic medical record quality assessment method based on text classification algorithm of the present invention. DETAILED DESCRIPTION
[0062] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a 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 should fall within the scope of protection of the present invention.
[0063] This electronic medical record quality assessment method based on text classification algorithm, based on natural language processing model, understands the text semantics in structured electronic medical records (such as chief complaint, history of present illness), and then classifies the parsed text and compares it with the current parsed label to determine the correctness of the parsing;
[0064] The following steps are involved:
[0065] Step S1, obtain the current electronic medical record analysis result, the analysis result format is as follows.
[0066] [{k1:t1},{k2:t2},…{k i :t i}] k i ∈K
[0067] Among them, K is the parsed label k i The collection of i Structured results for electronic medical records;
[0068] Step S2: Structuring the electronic medical records i The sentence division results are as follows:
[0069] [{k1:[t 11 ,t 12 ,t 13 …]},{k2:[t 21 ,t 22 ,t 23 …]},…{k i :[t i1 ,t i2 ,t i3 …]}] k i ∈K
[0070] Step S3: ij Input each item into the natural language processing model to conduct a quality assessment on the structured results of the electronic medical record. The evaluation results are as follows:
[0071] [{k i :{t i1 :k p ,t i2 :k p ,…t ij :k p}}…]
[0072] Among them, k p For the natural language processing model, the sentence t ij The classification result, i.e., the semantic classification label;
[0073] If the semantic classification label k p and parsed label k i The same, then the clause t ij Correct classification;
[0074] Step S4: Calculate the accuracy of the evaluation results one by one, and the calculation formula is as follows:
[0075]
[0076] Among them, p true (i) is the accuracy of the analysis result, N ki=kp is the semantic classification label k in the sentence list of the parsing result p and parsed label k i The same number of clauses, N is the number of clauses in the clause list of the parsing result;
[0077] p true (i) is larger, the more correct the analysis result is; when p true When (i) = 1, it means that each clause after the parsing result is semantically consistent with the semantic content of the parsing tag;
[0078] Step S5, calculating the overall parsing accuracy and exploring the causes of erroneous parsing;
[0079] Parsing tags for electronic medical records i The quality of M data in the field is evaluated, and the accuracy of the M data parsing is as follows:
[0080]
[0081] Other tags are parsed in tag k i The probability of being misinterpreted during analysis is as follows:
[0082]
[0083] Among them, M kp It means that the structured sentences of M structured texts contain semantic classification labels k p The number of texts with similar sentences, P kp Represents M labels k to be analyzed for quality assessment i The field content is mixed with semantic classification labels k p The amount of content;
[0084] When P kp When it is larger, it means that the parsing label k i The reason for the incorrect parsing is that the parsed content is mixed with a large number of semantic classification labels k p content, thereby narrowing the scope of the cause of the error analysis; in order to improve the quality of the parsed text, the parser explores the parsing tag k based on the analysis i and semantic classification label k p The difference in content.
[0085] In actual analysis, we found that, firstly, the sentences in the structured results of electronic medical records, such as the history of current illness and case characteristics, are relatively long, which is not conducive to the understanding of semantics by the natural language processing model. Secondly, the structured results often contain parsing labels k i Parse the content into label k j In the case of , if the entire parsing result is directly input into the natural language model, it will disrupt the understanding of the natural language processing model.
[0086] In step S2, sentence segmentation is performed based on the punctuation marks in the electronic medical record text paragraph and the maximum length of the natural language processing model input, wherein the punctuation marks include but are not limited to commas, periods, and semicolons;
[0087] When processing the long sentence T, the maximum allowed length of the sentence is MAX_LEN. First, take out the short sentence t with a length of MAX_LEN from the front to the back. i ; Then search for commas, periods, and semicolons from back to front, and put the content after the first punctuation mark found back into the original long sentence, and the rest of the content is the first clause that was split. i1 ; If no punctuation marks including commas, periods and semicolons are found in the search from back to front, the short sentence t is directly used as the first sentence t i1 ; Repeat the above steps to divide the long sentence T into several sentences and complete the sentence division task.
[0088] In order to reduce resource consumption and improve accuracy, in step S3, the fasttext model is used as the natural language processing model.
[0089] The electronic medical record quality assessment system based on text classification algorithm understands the text semantics in structured electronic medical records (such as chief complaint, current medical history) based on natural language processing model, and then classifies the parsed text and compares it with the current parsed label to judge the correctness of the parsing. It includes sentence segmentation module, document quality assessment module, overall quality assessment module and report generation module;
[0090] The sentence splitting module is responsible for splitting the longer result sentences parsed from the structured medical record database, such as current medical history, case characteristics, personal history, etc. In order to ensure the semantics of the small sentences after splitting, the length of the short sentences must be less than the maximum length accepted by the model in the semantic evaluation module during splitting, and the sentence processing must be carried out with commas, periods and semicolons;
[0091] The single sentence quality assessment module is used to input the sentence segmentation results into the fasttext model, complete the assessment of each long sentence, and calculate the accuracy of a single parsing result, that is, to complete steps S3-S4 in the electronic medical record quality assessment method; while the assessment results are input into the report generation module for synthesizing the quality assessment report, the assessment results of each long sentence are stored in the database for tracing the report content;
[0092] The overall quality assessment module is used to summarize the assessment results of each long sentence obtained by the single sentence quality assessment module, and calculate the accuracy of the overall parsing result to be evaluated and the probability of other labels being misincorporated during parsing according to step S5 of the quality assessment method;
[0093] The report generation module generates an evaluation report based on the evaluation result of the overall quality evaluation module.
[0094] When the sentence segmentation module performs sentence segmentation processing on a long sentence T to be segmented, the maximum length allowed for the sentence segmentation is MAX_LEN. First, a short sentence t with a length of MAX_LEN is taken from the front to the back. i ; Then search for commas, periods, and semicolons from back to front, and put the content after the first punctuation mark found back into the original long sentence, and the rest of the content is the first clause that was split. i1 ; If no punctuation marks including commas, periods and semicolons are found in the search from back to front, the short sentence t is directly used as the first sentence t i1 ; Repeat the above steps to divide the long sentence T into several sentences, and complete the sentence division task;
[0095] The parsing result of the long sentence T to be divided in the electronic medical record is as follows:
[0096] [{k1:t1},{k2:t2},…{k i :t i}] k i ∈K
[0097] Among them, K is the parsed label k i The collection of i Structured results for electronic medical records;
[0098] For short sentences i The sentence division results are as follows:
[0099] [{k1:[t 11 ,t 12 ,t 13 …]},{k2:[t 21 ,t 22 ,t 23 …]},…{k i :[t i1 ,t i2 ,t i3 …]}] k i ∈K
[0100] The single sentence quality assessment module will sentence the result t ij Input each item into the natural language processing model to conduct a quality assessment on the structured results of the electronic medical record. The evaluation results are as follows:
[0101] [{k i :{t i1 :k p ,t i2 :k p ,…t ij :k p}}…]
[0102] Among them, k pFor the natural language processing model, the sentence t ij The classification result, i.e., the semantic classification label;
[0103] If the semantic classification label k p and parsed label k i The same, then the clause t ij The classification is correct.
[0104] The single sentence quality assessment module calculates the accuracy of the assessment parsing results one by one, and the calculation formula is as follows:
[0105]
[0106] Among them, p true (i) is the accuracy of the analysis result, N ki=kp is the semantic classification label k in the sentence list of the parsing result p and parsed label k i The same number of clauses, N is the number of clauses in the clause list of the parsing result;
[0107] p true (i) is larger, the more correct the analysis result is; when p true When (i) = 1, it means that each sentence after the parsing result is semantically consistent with the semantic content of the parsing tag.
[0108] The overall quality assessment module analyzes the labels k of the electronic medical records. i The quality of M data in the field is evaluated, and the accuracy of the M data parsing is as follows:
[0109]
[0110] Other tags are parsed in tag k i The probability of being misinterpreted during analysis is as follows:
[0111]
[0112] Among them, M kp It means that the structured sentences of M structured texts contain semantic classification labels k p The number of texts with similar sentences, P kp Represents M labels k to be analyzed for quality assessment i The field content is mixed with semantic classification labels k p The amount of content;
[0113] When P kp When it is larger, it means that the parsing label k i The reason for the incorrect parsing is that the parsed content is mixed with a large number of semantic classification labels k pcontent, thereby narrowing the scope of the cause of the error analysis; in order to improve the quality of the parsed text, the parser explores the parsing tag k based on the analysis i and semantic classification label k p The difference in content.
[0114] Example 1
[0115] (1) Data Acquisition
[0116] Obtain the parsed data of the electronic medical record from the database, convert the table structure, and send it to the sentence segmentation module for sentence segmentation. The table structure of the data finally obtained in this part is as follows:
[0117]
[0118] It should be noted that in implementation, it is necessary to distinguish between data acquisition for model training tasks and data acquisition for quality assessment tasks.
[0119] In the model training task, data acquisition is to randomly sample 100 data for each label content in the structured electronic medical record database to ensure that the samples are sufficient and balanced during the data training process.
[0120] In the quality assessment task, data acquisition is to extract data under a certain label in the structured electronic medical record database. The extraction quantity can be defined according to the quality assessment task requirements, but it must be ensured that each quality assessment task only extracts data under the same label.
[0121] (2) Sentences
[0122] According to the description of the electronic medical record parsing result quality assessment system in the invention content, the acquired data is divided into sentences. The sentence results will be distributed to the semantic assessment module or the sample annotation module according to the task requirements. Among them, the initial value of the maximum sentence length MAX_LEN is set to 300, and the segmentation punctuation includes period, comma, and semicolon. The sentence results are stored in the following table structure:
[0123]
[0124] (3) Sample annotation
[0125] The implementation of the sample labeling module is divided into four parts: determining the set of labels to be classified, sample screening, negative sampling, and division.
[0126] 1) Determine the set of labels to be classified
[0127] Before labeling samples, users need to determine the types of classifications to be performed in the task based on business needs. For example, to evaluate the quality of parsing the content of each label parsed from the admission record, the label set should be ["chief complaint", "history of current illness", "family history", "personal history", "marital history", "menstrual history", "physical examination", ...] the set of labels that may be parsed from the admission record.
[0128] 2) Sample screening
[0129] According to the classification label content, 100 sentences are randomly selected from the sentences after the sentence segmentation for each label, and then manually screened to ensure that each sentence belongs to the corresponding label. If it does not belong, it is randomly screened and replaced from the data input by the sentence segmentation module to form the initial sample set.
[0130] 3) Negative Sampling
[0131] First, all sentences whose labels do not belong to the classification label set are filtered out from the data input by the sentence segmentation module. Then, 100 sentences are randomly sampled from these sentences to form negative samples. These 100 labels are labeled "none", encoded as "-1", and mixed with the initial sample set.
[0132] 4) Division
[0133] After mixing the negative sampling results with the initial sample set, the order of samples in the sample set is disrupted, and 80% of them are randomly selected as training sets and 20% are randomly selected as test sets to form the final sample set. The final sample set table structure is as follows:
[0134]
[0135] (4) Generate text classification model
[0136] Based on the samples annotated by the sample annotation module, the fasttext framework is used to train the model and generate the model. The initial values of the main parameters in the model training are as follows:
[0137] Sample iteration number epoch = (150-500);
[0138] Learning law lr = (0.1-1);
[0139] The maximum length of word grams is wordNgrams = 2;
[0140] Loss function loss = "hs".
[0141] Among them, epoch and lr can further select the optimal values through grid tuning, and the tuning is based on the principle of minimum loss for search and selection.
[0142] The model trained with the above parameters will be used for system semantic evaluation.
[0143] (5) Single Sentence Quality Assessment
[0144] Single sentence quality assessment is the process of using the generated text classification model to evaluate the text to be evaluated one by one. The sentence results are classified by the text classification model and stored in the following table structure for report generation. At the same time, the generated results need to be stored in the database for traceability.
[0145]
[0146] (6) Overall quality assessment
[0147] Based on the contents of the semantic evaluation result table, according to the electronic medical record quality assessment method based on text classification algorithm, the parsing accuracy and the probability of other labels being incorporated are calculated, and a quality assessment report is generated.
[0148] The embodiment described above is only one specific implementation of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for evaluating the quality of electronic medical records based on a text classification algorithm, characterized in that: Based on the natural language processing model, the text semantics in the structured electronic medical record is understood, and then the parsed text is classified and compared with the current parsed label to determine the correctness of the parsing; The following steps are involved: Step S1: Obtain the current electronic medical record analysis result, the analysis result format is as follows: [{k1:t1},{k2:t2},…{k i :t i }]k i ∈K Among them, K is the parsed label k i The collection of i Structured results for electronic medical records; Step S2: Structuring the electronic medical records i The sentence division results are as follows: [{k1:[t 11 ,t 12 ,t 13 …]},{k2:[t 21 ,t 22 ,t 23 …]},…{k i :[t i1 ,t i2 ,t i3 …]}]k i ∈K Step S3: ij Input each item into the natural language processing model to conduct a quality assessment on the structured results of the electronic medical record. The evaluation results are as follows: [{k i :{t i1 :k p ,t i2 :k p ,…t ij :k p }}…] Among them, k p For the natural language processing model, the sentence t ij The classification result, i.e., the semantic classification label; If the semantic classification label k p and parsed label k i The same, then the clause t ij Correct classification; Step S4: Calculate the accuracy of the evaluation results one by one, and the calculation formula is as follows: Among them, p true (i) is the accuracy of the analysis result, N ki=kp is the semantic classification label k in the sentence list of the parsing result p and parsed label k i The same number of clauses, N is the number of clauses in the clause list of the parsing result; p true (i) is larger, the more correct the analysis result is; when p true When (i) = 1, it means that each clause after the parsing result is semantically consistent with the semantic content of the parsing tag; Step S5: Calculate the overall parsing accuracy and find out the reasons for the erroneous parsing: Parsing tags for electronic medical records i The quality of M data in the field is evaluated, and the accuracy of the M data parsing is as follows: Other tags are parsed in tag k i The probability of being misinterpreted during analysis is as follows: Among them, M kp It means that the structured sentences of M structured texts contain semantic classification labels k p The number of texts of the same sentence, P kp Represents M labels k to be analyzed for quality assessment i The field content is mixed with semantic classification labels k p The amount of content; When P kp When it is larger, it means that the parsing label k i The reason for the incorrect parsing is that the parsed content is mixed with a large number of semantic classification labels k p content, thereby narrowing the scope of the cause of the error analysis; in order to improve the quality of the parsed text, the parser explores the parsing tag k based on the analysis i and semantic classification label k p The difference in content.
2. The electronic medical record quality assessment method based on text classification algorithm according to claim 1 is characterized by: In step S2, sentence segmentation is performed based on the punctuation marks in the electronic medical record text paragraph and the maximum length of the natural language processing model input, wherein the punctuation marks include but are not limited to commas, periods, and semicolons; When processing the long sentence T, the maximum allowed length of the sentence is MAX_LEN. First, take out the short sentence t with a length of MAX_LEN from the front to the back. i ; Then search for commas, periods, and semicolons from back to front, and put the content after the first punctuation mark found back into the original long sentence, and the rest of the content is the first clause that was split. i1 ; If no punctuation marks including commas, periods and semicolons are found in the search from back to front, the short sentence t is directly used as the first sentence t i1 ; Repeat the above steps to divide the long sentence T into several sentences and complete the sentence division task.
3. The electronic medical record quality assessment method based on text classification algorithm according to claim 1, characterized in that: In step S3, the fasttext model is used as the natural language processing model.
4. A system for implementing the electronic medical record quality assessment method based on text classification algorithm according to any one of claims 1 to 3, characterized in that: Based on the natural language processing model, the text semantics in the structured electronic medical record is understood, and then the parsed text is classified and compared with the current parsing label to determine the correctness of the parsing, including the sentence segmentation module, the single sentence quality assessment module, the overall quality assessment module and the report generation module; The sentence splitting module is responsible for splitting the longer result sentences parsed from the structured medical record database. In order to ensure the semantics of the small sentences after splitting, the length of the short sentences must be less than the maximum length accepted by the model in the semantic evaluation module during splitting, and the sentence processing is performed with commas, periods and semicolons; The single sentence quality assessment module is used to input the sentence segmentation results into the fasttext model, complete the assessment of each long sentence, and calculate the accuracy of a single parsing result; while the assessment results are input into the report generation module for synthesizing the quality assessment report, the assessment results of each long sentence are stored in the database for tracing the report content; The overall quality assessment module is used to summarize the assessment results of each long sentence obtained by the single sentence quality assessment module, and calculate the accuracy of the overall parsing result to be evaluated and the probability that other tags are mistakenly incorporated during parsing; The report generation module generates an evaluation report based on the evaluation result of the overall quality evaluation module.
Citation Information
Patent Citations
Availability evaluation method for medical text structuring algorithm
CN111539194A
Text classification method and device based on deep learning, server and storage medium
CN112329836A
Text content quality evaluation method, apparatus and device, and storage medium
WO2021139424A1
