Medical record automatic coding method, device, electronic equipment and storage medium
Automatic coding of medical data through the medical classification model and the medical attention model solves the problems of low efficiency and poor reliability of medical record coding in the existing technology, and achieves more efficient and accurate coding results.
Patent Information
- Application Number
- CN201911310848.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-18
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2039-12-18
AI Technical Summary
In the existing technology, the International Classification of Diseases coding of hospital medical records relies on manual operations, which is inefficient and unreliable, and can easily lead to coding errors and inconsistencies.
The medical classification model and the medical attention model are used to extract features and weight the medical data, and the machine learning model is used to automatically complete the coding of medical records to avoid manual dependence and misidentification.
It improves coding efficiency and reliability, ensures the consistency and accuracy of coding results, and reduces errors in manual operations.
Smart Images

Figure CN113012774B
Abstract
Description
Background Art
[0002] The hospital medical record management department can organize and archive each patient's medical record, and assigning International Classification of Disease codes to patients is an important process.
[0003] In the related technology, coding is generally done manually according to the discharge diagnosis information and other information in the electronic medical record, based on professional knowledge and referring to the code table. In this way, the work efficiency is low and the knowledge range of manual work is required to be more extensive, which has certain dependencies and limitations. In addition, when processing the same data, the results obtained may be different, so the consistency and reliability are poor. It may also lead to misidentification, resulting in coding errors and low accuracy.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the embodiments of the present disclosure is to provide a medical record automatic coding method, a medical record automatic coding device, an electronic device and a computer-readable storage medium, thereby overcoming the problems of low efficiency and poor reliability at least to a certain extent.
[0006] Other features and advantages of the embodiments of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present invention.
[0007] According to one aspect of an embodiment of the present disclosure, a method for automatic coding of medical records is provided, comprising: acquiring medical data to be processed; classifying and identifying medical record codes of the medical data to be processed in combination with a medical classification model and a medical attention model to obtain a classification result of the medical data to be processed; and determining coding information corresponding to the medical data to be processed through the classification result.
[0008] In an exemplary embodiment of the present disclosure, the medical data to be processed is classified and identified by combining a medical classification model and a medical attention model to obtain a classification result of the medical data to be processed, including: extracting features of the medical data to be processed through the medical classification model to determine a feature representation of the medical data to be processed; weighting the feature representation based on the medical attention model to obtain a text representation of the medical data to be processed; and determining the classification result based on the text representation of the medical data to be processed.
[0009] In an exemplary embodiment of the present disclosure, the method further includes: training a machine learning model using historical medical data and real encoding information of the historical medical data, and using the trained machine learning model as the medical classification model.
[0010] In an exemplary embodiment of the present disclosure, training a machine learning model using historical medical data and the encoding information of the historical medical data includes: obtaining a word embedding vector representation corresponding to the historical medical data; training the machine learning model based on the word embedding vector representation and the true encoding information of the historical medical data to obtain the trained machine learning model.
[0011] In an exemplary embodiment of the present disclosure, obtaining the word embedding vector representation corresponding to the historical medical data includes: obtaining first type data and second type data as the historical medical data, and performing word segmentation processing on the historical medical data to obtain segmented historical medical data; and training the word embedding vector representation based on the segmented historical medical data.
[0012] In an exemplary embodiment of the present disclosure, the machine learning model is trained according to the word embedding vector representation and the real coding information of the historical medical data to obtain the trained machine learning model, including: determining the predicted coding information of the historical medical data according to the word embedding vector representation; and training the machine learning model based on the predicted coding information and the real coding information to obtain the trained machine learning model.
[0013] In an exemplary embodiment of the present disclosure, determining the predicted coding information of the historical medical data based on the word embedding vector representation includes: inputting the word embedding vector representation into the machine learning model to obtain a historical feature representation; configuring a coding vector for multiple coding information, and matching the historical feature representation corresponding to the historical medical data with the coding vector to determine a degree of matching; weighting the historical feature representation according to the degree of matching to obtain a text representation; and determining the predicted coding information of the historical medical data based on the text representation.
[0014] In an exemplary embodiment of the present disclosure, matching the historical feature representation corresponding to the historical medical data with the encoding vector to determine the degree of matching includes: performing a first logical operation on the historical feature representation and the encoding vector to obtain the degree of matching between the historical feature representation and the encoding information.
[0015] In an exemplary embodiment of the present disclosure, weighting the historical feature representations according to the matching degree to obtain the text representation includes: performing a second logical operation on the matching degree and each historical feature representation to determine the text representation.
[0016] According to one aspect of the present disclosure, there is provided a medical record automatic coding device, comprising: a data acquisition module, used to acquire medical data to be processed; a coding classification module, used to perform medical record coding classification and identification on the medical data to be processed in combination with a medical classification model and a medical attention model to obtain a classification result of the medical data to be processed; and a coding determination module, used to determine the coding information corresponding to the medical data to be processed through the classification result.
[0017] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for automatic coding of medical records as described in any one of the above is implemented.
[0018] According to one aspect of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned medical record automatic coding methods by executing the executable instructions.
[0019] In the medical record automatic coding method, device, electronic device and computer-readable storage medium provided by the embodiments of the present disclosure, the feature representation of the medical data to be processed is determined by the medical classification model, and the classification result of the medical data to be processed is further determined by the medical attention model based on the feature representation, and then the coding information of the medical data to be processed is determined according to the classification result. On the one hand, since the medical record prediction and classification of the medical data to be processed can be performed by the model to automatically complete the medical record coding process of the medical data to be processed, the dependence on the knowledge scope and the resulting limitations during manual operation are avoided, and the coding efficiency is improved. On the other hand, since the coding information of the medical data to be processed is determined by the same coding rule, the problem of different results for the same data in the manual method is avoided, and the consistency and reliability are improved. On the other hand, since the medical classification model and the medical attention model are obtained through historical medical data training, and the characteristics of the data are accurately determined by the model and automatically classified and identified, it is possible to avoid misidentification and improve the accuracy of determining the coding information.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings herein are incorporated into and constitute a part of the specification, showing embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0022] Figure 1 The flowchart of the automatic medical record coding method according to the embodiment of the present disclosure is schematically shown;
[0023] Figure 2 A schematic diagram of a process for determining a trained machine learning model in an embodiment of the present disclosure is shown;
[0024] Figure 3 The following is a schematic diagram showing the process flow of model training in an embodiment of the present disclosure;
[0025] Figure 4 The following schematically shows a flow chart of determining prediction coding information according to an embodiment of the present disclosure;
[0026] Figure 5 A block diagram of a medical record automatic coding device according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 6 The block diagram of an electronic device used to implement the above-mentioned medical record automatic coding method is schematically shown. DETAILED DESCRIPTION
[0028] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present invention will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0029] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0030] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0031] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0032] In order to solve the above problems, the present disclosure first proposes a medical record automatic coding method, which can be applied to the application scenario of processing medical data. The execution subject of the medical record automatic coding method can be a server, refer to Figure 1 As shown, the medical record automatic coding method may include step S110, step S120 and step S130. Among them:
[0033] In step S110, obtaining medical data to be processed;
[0034] In step S120, the medical data to be processed is classified and identified by medical record code in combination with the medical classification model and the medical attention model to obtain a classification result of the medical data to be processed;
[0035] In step S130, the coding information corresponding to the medical data to be processed is determined according to the classification result.
[0036] In the technical solution provided by the example embodiments of the present disclosure, on the one hand, since the medical data to be processed can be coded and classified and identified through the model to automatically complete the automatic coding process of the medical data to be processed, the dependence on the knowledge scope and the resulting limitations during manual operation are avoided, and the coding efficiency is improved. On the other hand, since the coding information of the medical data to be processed is determined by the same coding rules, the problem of different results for the same data in the manual method is avoided, and the consistency and reliability are improved. On another hand, since the medical classification model and the medical attention model are obtained through historical medical data training, it is possible to avoid misidentification and improve the accuracy of determining the coding information.
[0037] Next, the automatic medical record coding method in the embodiment of the present disclosure is further explained in conjunction with the accompanying drawings.
[0038] In step S110 , medical data to be processed is obtained.
[0039] In the disclosed embodiments, the medical data to be processed may be data corresponding to the target object. The target object may be a patient in a preset place, and the preset place may be, for example, a hospital or a medical center or other institution that is convenient for patients to visit. The medical data to be processed may be all medical data associated with the patient, such as all medical records of each patient. The medical record data is used to record all records of the target object in the preset place. The medical record data may include multiple types of text data, and the multiple types may include, but are not limited to, any one or more of the target object's one complaint and five histories, the diagnosis and treatment process, the basis for diagnosis, the postoperative course of disease records, the consultation records, and the examination conclusions.
[0040] Medical record data refers to the data in the medical record generated during the target subject's medical treatment, and may specifically include clinical medical record data stored in an electronic medical record database. The electronic medical record database may be a data warehouse for storing medical data set in a terminal device, or may be set in a server for storing medical data. The server may obtain the medical record data from the data warehouse of the terminal device, or may obtain the medical record data from a server storing the data. The medical data to be processed may be in the form of text data, such as text entered by a doctor in a medical record or written manually, which is not limited here.
[0041] In step S120, the medical classification model and the medical attention model are combined to perform medical record code classification and identification on the medical data to be processed to obtain a classification result of the medical data to be processed.
[0042] In the disclosed embodiment, the medical classification model refers to a model used to analyze the medical data to be processed, so as to identify and predict which type of coded information the medical data to be processed of the target object is. The medical classification model can be any suitable machine learning model that can perform classification. For example, it can be any one of a decision tree, a neural network model, a linear regression analysis model, a support vector machine, and a random forest model. Here, the machine learning model is a convolutional neural network model as an example for explanation. Specifically, the medical classification model is used to extract features from the medical data to be processed, so as to obtain feature data for representing the main features of the medical data to be processed. The feature data can be specifically described by feature representation, and the feature representation refers to the form used to represent the feature data. Therefore, the feature representation is the output obtained by the convolutional neural network.
[0043] The medical attention model refers to a network based on the attention mechanism. The attention mechanism allows a neural network to focus only on a part of its input information, and it can select specific inputs. The attention mechanism can be applied to any type of input, regardless of its shape, for matrix inputs, such as images or vectors. After obtaining the feature representation based on the medical classification model, the feature representation obtained from the medical classification model can be further processed based on the medical attention model to obtain the text representation of the medical data to be processed. The text representation refers to the feature data directly used to determine the coding classification of the medical data to be processed, and the text representation can be associated with the feature representation. In text classification, the text needs to be converted into a form that can be processed by the computer algorithm, so the accuracy of the text representation directly affects the accuracy of the results of natural language processing. By determining an accurate text representation, the characteristics of the medical data to be processed can be accurately determined, thereby improving the accuracy of the classification results.
[0044] In the disclosed embodiment, the medical attention model is used to make weighted changes to the medical data to be processed, such as calculating the attention weights for all the data in the medical data to be processed, or filtering out a portion of attention that does not meet the conditions after generating the attention weights, making its attention weight 0, etc. The medical attention model is mainly used to focus attention on important data. The principle of the medical attention model is to calculate the degree of match between the current input sequence and the output vector. The higher the match, the higher the relative score of the focus point. The input of the medical attention model can be a text representation corresponding to the feature representation. By filtering the medical data to be processed through the medical attention model, important data can be filtered out therefrom, thereby focusing attention on important data to improve the accuracy of data processing. And it is possible to obtain words or sentences related to the encoded information from the medical record data, provide the basis for encoding, and increase interpretability.
[0045] Before using the medical classification model, in order to improve its accuracy, the machine learning model can be trained first. Here, historical medical data with determined coding information can be used for training. Specifically, the machine learning model can be trained using historical medical data and the real coding information of the historical medical data until a trained machine learning model is obtained and used as a medical classification model. The historical medical data refers to the data of multiple objects in the preset place. The data of multiple objects can be the historical medical record data of other objects except the target object, or the historical medical record data of the target object.
[0046] Figure 2 A flowchart for determining a trained machine learning model is schematically shown in FIG. Figure 2 As shown in , it mainly includes the following steps:
[0047] In step S210, the word embedding vector representation corresponding to the historical medical data is obtained.
[0048] In this step, the word embedding vector refers to a real vector in which a word in a vocabulary is mapped to a low-dimensional space relative to the size of the vocabulary, and can be a word vector represented in the form of a word embedding. In other words, the historical medical data is described in the form of a word embedding vector representation. The word embedding vector representation can be directly used to input a machine learning model. Specifically, step S210 for obtaining the word embedding vector representation may include steps S211 and S212, wherein:
[0049] In step S211, first type data and second type data are obtained as the historical medical data, and word segmentation processing is performed on the historical medical data to obtain the historical medical data after word segmentation;
[0050] In step S212, the word embedding vector representation is trained based on the historical medical data after word segmentation.
[0051] In the disclosed embodiment, the sources of the first type of data and the second type of data are different. The first type of data may be data contained in medical record data, such as natural text data such as the first complaint and five histories, the diagnosis and treatment process, the basis for diagnosis, the postoperative course of disease record, the consultation record, and the examination conclusion; the second type of data refers to data contained in the discharge record, such as the diagnosis field data in the discharge record. Based on this, the historical medical data of multiple objects can be obtained according to the first type of data and the second type of data.
[0052] Furthermore, the historical medical data can be segmented to obtain the historical medical data after segmentation. Specifically, the historical medical data can be segmented using a segmentation algorithm, which can include any one of a minimum matching algorithm, a forward (reverse) maximum matching method, a word-by-word matching algorithm, and a neural network algorithm, which are not limited here. By segmenting the historical medical data, it can better assist in automatically identifying the meaning of sentences and improve the accuracy of classification.
[0053] When the historical medical data after word segmentation is obtained, the historical medical data after word segmentation can be trained to obtain a word embedding vector representation. Specifically, the historical medical data after word segmentation can be trained by a word2vec model or a glove model, etc., and the word2vec model is used as an example for explanation. Word2vec is a natural language processing tool that can vectorize all words to quantitatively measure the relationship between words. The specific process may include: using the Skip-Gram model or the CBOW model (continuous bag of words model) to obtain (input word, output word) pairs. Using one-hot (unique hot encoding) to encode the input word and the output word to obtain a training sample for the model. Finally, the encoded input word and output word are brought into the neural network for training, and the result of multiplying the input matrix by the input-hidden layer weight matrix is the word vector result of the input word, thereby obtaining the word embedding vector representation of each historical medical data after word segmentation. For example, text data in historical electronic medical records can be extracted as historical medical data, such as natural text data and diagnosis field information in discharge records; further Chinese word segmentation is completed for the text data, and the text data after word segmentation is represented as X. Further, the ICD code field information of the first page of the medical record in the corresponding medical record can be extracted and represented as Y. By representing the historical medical data as a word embedding vector representation, the data can be described by a distributed vector, thereby reducing the amount of calculation and storage.
[0054] In step S220, the machine learning model is trained according to the word embedding vector representation and the actual encoding information of the historical medical data to obtain the trained machine learning model.
[0055] In the disclosed embodiment, the real coding information refers to the manually marked and determined coding information, and the coding information refers to the ICD (International Classification of Diseases) code. Specifically, according to certain characteristics of the disease, the disease is classified according to the rules and represented by a coding method. The coding information of different disease information is different, and each coding information corresponds to a type of disease information. The coding information here refers to the coding information that has been classified according to historical medical data, such as code 1, code 2, and so on.
[0056] The machine learning model can be obtained by training with historical medical data, and the real coding information can be regarded as the label of the historical medical data, for example, "1" represents coding 1, "2" represents coding 2, and so on. On this basis, the word embedding vector representation corresponding to the historical medical data after word segmentation can be used as the input of the machine learning model, and the predicted coding information obtained by the machine learning model and the medical attention model can be used as the output to train the model. When training the machine learning model, the gradient descent algorithm can be used for model training. The gradient descent algorithm can include batch gradient descent or stochastic gradient descent, etc., which are not specifically limited here. Of course, other algorithms can also be used for model training, which are not specifically limited here.
[0057] Figure 3 A flowchart for training a machine learning model is schematically shown in FIG. Figure 3 The steps in are the specific implementation methods of step S220, refer to Figure 3 As shown in , it mainly includes the following steps:
[0058] In step S310, predictive coding information of the historical medical data is determined based on the word embedding vector representation.
[0059] In the disclosed embodiment, the predicted coding information refers to the coding information of the historical medical data automatically output by the machine learning model and the medical attention model. The predicted coding information may be the same as the real coding information or different, which is not limited here.
[0060] Figure 4 A flowchart for determining prediction coding information is schematically shown in FIG. Figure 4 The steps in are the specific implementation methods of step S310, refer to Figure 4 As shown in , it mainly includes steps S410 to S440, wherein:
[0061] In step S410, the word embedding vector representation is input into a machine learning model to obtain a historical feature representation;
[0062] In step S420, a coding vector is configured for the plurality of coding information, and the historical feature representation corresponding to the historical medical data is matched with the coding vector to determine a matching degree;
[0063] In step S430, the historical feature representation is weighted according to the matching degree to obtain the text representation;
[0064] In step S440, the predictive coding information of the historical medical data is determined according to the text representation.
[0065] In the disclosed embodiment, since the machine learning model is trained in combination with the medical attention model, and the output of the machine learning model is the feature representation, and its input is the word embedding vector representation. When determining the predicted coding information, it is obtained based on the output of the machine learning model. Therefore, the word embedding vector representation of the historical medical data can first be input into the machine learning model to obtain the historical feature representation corresponding to the historical medical data, so as to accurately predict the coding information of the historical medical data based on the historical feature representation.
[0066] For example, embedding a word into a vector representation and actually encoding information<X,Y> The data is input into the convolutional neural network, which represents the data and obtains feature representation. The medical attention model completes the text representation, and the gradient descent method is used to complete model training.
[0067] In the disclosed embodiment, the classification result is a label or probability representing the coded information, and the output vector refers to the coded vector corresponding to the coded information. Based on this, a coded vector can be configured for each coded information to be output through the medical attention model to represent the main features of the coded information. The coded vector corresponds to each coded information one by one, and the coded vector corresponding to each coded information can be different.
[0068] Further, the historical feature representation corresponding to the historical medical data can be matched with the encoding vector corresponding to the encoding information to determine the matching degree between the two, and the historical feature representation is weighted according to the matching degree to obtain the text representation of the historical medical data. The matching degree refers to the calculated attention weight of the historical medical data. According to the historical feature representation and the attention weight, the text representation of the historical medical data can be obtained. Specifically, each encoding information will have an encoding vector representation, and each mark or word in the historical medical data will also have a vector representation, such as the historical feature representation. The two vectors have the same length, so the two can be matched to obtain the matching degree between the two vectors. Specifically, the historical feature representation and the encoding vector can be subjected to a first logical operation to obtain the matching degree between the historical feature representation and the encoding information. The first logical operation can be a dot multiplication operation to convert the two vectors into a scalar representation of the matching degree. The matching degree can be used to measure the matching degree between the encoding information and the historical medical data (words). The matching degree can be specifically a score or a numerical value. A high matching degree indicates a strong correlation; a low matching degree indicates a weak correlation. By matching words or phrases with high matching scores, the interpretability or basis of the encoding information can be increased.
[0069] Further, after obtaining the matching degree, the historical feature representation of the historical medical data can be weighted based on the matching degree to obtain a text representation for describing the entire historical medical data. The specific process may include: performing a second logical operation on the matching degree and each historical feature representation to determine the text representation corresponding to the historical medical data. The second logical operation refers to a multiplication operation and an addition operation. Specifically, after obtaining the matching degree, each word in the historical medical data has a matching score. First, all the scores can be normalized, that is, the scores are scaled according to a certain proportion or mapped according to a certain function, so that the sum of the scaled scores is equal to 1. Further, the normalized matching degree can be multiplied by the historical feature representation of each word in the historical medical data to obtain multiple multiplication results; and then the multiple multiplication results are added to obtain a weighted representation of the words contained in the entire historical medical data. This representation is used as the text representation of the entire historical medical data to predict the coding classification of the historical medical data. It should be noted that since the encoding vector of each encoding information is different, the text representation corresponding to each encoding information finally calculated by the medical attention model is also different.
[0070] Furthermore, the text representation can be input into the medical classification model again, and the predicted coding information of the historical medical data can be obtained. Specifically, first, feature extraction can be performed through a convolution operation to determine the feature representation and text representation of the historical medical data, and then subsequent convolution and normalization processes, etc., can be performed to determine the category label of the historical medical data. Based on this, the medical classification model and the medical attention model can be used to determine the predicted probability or predicted label of the input historical medical data belonging to a certain type of coding information, that is, which type of coding information the historical medical data belongs to. For example, when the predicted probability that historical medical data 1 belongs to coding information 1 is greater than a certain threshold, such as 0.8, it can be considered that the predicted label corresponding to historical medical data 1 is 1. Further, the predicted coding information of the historical medical data can be determined based on the predicted label or the predicted probability. By calculating the matching degree to perform weighted processing on the historical feature representation and then determine the predicted coding information, it is possible to determine the coding information with greater correlation for the historical medical data, thereby improving the accuracy of the determination of the predicted coding information.
[0071] In step S320, the machine learning model is trained based on the predicted coding information and the actual coding information to obtain the trained machine learning model.
[0072] On this basis, the predicted coding information is compared with the real coding information corresponding to the historical medical data after word segmentation. When the two are different, the parameters of the machine learning model are continuously adjusted until the two are the same. Through multiple iterations, a trained machine learning model with high accuracy is obtained, and the trained machine learning model is used as a medical classification model. By comparing the predicted coding information determined by the matching degree with the real coding information, a more accurate model can be obtained, and the efficiency and accuracy of model training can be improved.
[0073] After obtaining the trained machine learning model and using it as a medical classification model, the medical data to be processed of the target object can be input into the medical classification model, so that the medical classification model can extract features from the medical data to be processed, and perform convolution operations on the extracted feature data, thereby obtaining feature representations corresponding to the medical data to be processed, i.e., feature vectors. Further, the feature representation can be input into the medical attention model, so that the feature representation can be converted into a more accurate text representation through the medical attention model. Subsequently, the text representation can be input into the machine learning model again, and the medical data to be processed can be coded and classified according to the text representation to obtain the classification results corresponding to each medical data to be processed. The classification results can be accurately determined by the medical classification model obtained by matching degree training. By screening the medical data to be processed through the medical attention model and the matching degree, important data can be screened out from it, thereby focusing on the important data to improve the accuracy of data processing. And words or sentences related to the coded information can be obtained from the medical data to be processed, and the coding basis can be given to increase the interpretability.
[0074] In step S130, the coding information corresponding to the medical data to be processed is determined according to the classification result.
[0075] In the disclosed embodiment, the category of the classification result can be a prediction label or a prediction probability, which varies according to the category of the model. Based on this, the recognition result of the medical data to be processed can be determined based on the category of the classification result, and then the coding information to which the medical data to be processed belongs can be determined.
[0076] The technical solution provided in the disclosed embodiment can automatically encode the medical data to be processed through the medical classification model and the medical attention model to obtain the ICD coding information of the medical data to be processed. The natural language processing method is introduced to automatically complete the medical record coding recommendation for the medical record data, which solves the time-consuming and labor-intensive manual coding, improves the coding efficiency, and solves the problem of inconsistent coding information. At the same time, the coding basis is given through relevant phrases or sentences, specifically, the medical record data and the coding provide a coding basis for each coding information, providing interpretability based on the medical attention model. Directly traverse the recommended coding results and the corresponding basis to complete the automatic coding process, which increases convenience.
[0077] In the embodiment of the present disclosure, a medical record automatic coding device is also provided. Figure 5 As shown in , the device 500 mainly includes: a data acquisition module 501, a coding classification module 502 and a coding determination module 503, wherein:
[0078] The data acquisition module 501 can be used to acquire the medical data to be processed;
[0079] The coding classification module 502 may be used to classify and identify the medical record coding of the medical data to be processed by combining the medical classification model and the medical attention model to obtain the classification result of the medical data to be processed;
[0080] The coding determination module 503 may be used to determine the coding information corresponding to the medical data to be processed according to the classification result.
[0081] In an exemplary embodiment of the present disclosure, the encoding classification module includes: a feature representation acquisition module, used to extract features of the medical data to be processed through the medical classification model to determine the feature representation of the medical data to be processed; a text representation acquisition module, used to perform weighted processing on the feature representation based on the medical attention model to obtain the text representation of the medical data to be processed; and a classification result determination module, used to determine the classification result according to the text representation of the medical data to be processed.
[0082] In an exemplary embodiment of the present disclosure, the device also includes: a model training module, which is used to train the machine learning model through historical medical data and real encoding information of the historical medical data, and use the trained machine learning model as the medical classification model.
[0083] In an exemplary embodiment of the present disclosure, the model training module includes: a word vector determination module, used to obtain the word embedding vector representation corresponding to the historical medical data; a training control module, used to train the machine learning model according to the word embedding vector representation and the real encoding information of the historical medical data to obtain the trained machine learning model.
[0084] In an exemplary embodiment of the present disclosure, a word vector determination module includes: a data segmentation module, used to obtain first type data and second type data as the historical medical data, and perform word segmentation processing on the historical medical data to obtain segmented historical medical data; a word vector training module, used to train the word embedding vector representation according to the segmented historical medical data.
[0085] In an exemplary embodiment of the present disclosure, the machine learning model is trained according to the word embedding vector representation and the real coding information of the historical medical data to obtain the trained machine learning model, including: determining the predicted coding information of the historical medical data according to the word embedding vector representation; and training the machine learning model based on the predicted coding information and the real coding information to obtain the trained machine learning model.
[0086] In an exemplary embodiment of the present disclosure, determining the predicted coding information of the historical medical data based on the word embedding vector representation includes: inputting the word embedding vector representation into the machine learning model to obtain a historical feature representation; configuring a coding vector for multiple coding information, and matching the historical feature representation corresponding to the historical medical data with the coding vector to determine a degree of matching; weighting the historical feature representation according to the degree of matching to obtain a text representation; and determining the predicted coding information of the historical medical data based on the text representation.
[0087] In an exemplary embodiment of the present disclosure, matching the historical feature representation corresponding to the historical medical data with the encoding vector to determine the degree of matching includes: performing a first logical operation on the historical feature representation and the encoding vector to obtain the degree of matching between the historical feature representation and the encoding information.
[0088] In an exemplary embodiment of the present disclosure, weighting the historical feature representations according to the matching degree to obtain the text representation includes: performing a second logical operation on the matching degree and each historical feature representation to determine the text representation.
[0089] It should be noted that the various functional modules of the medical record automatic encoding device of the embodiment of the present disclosure are the same as the steps of the example embodiment of the above-mentioned medical record automatic encoding method, so they will not be repeated here.
[0090] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0091] In addition, although the steps of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0092] In an exemplary embodiment of the present invention, an electronic device capable of implementing the above method is also provided.
[0093] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0094] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present invention is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0095] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), and a display unit 640.
[0096] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .
[0097] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0098] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0099] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0100] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0101] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the medical record automatic coding method according to the implementation method of the present invention.
[0102] In an exemplary embodiment of the present invention, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of this specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification.
[0103] The program product for implementing the above method according to an embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0104] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0105] Computer readable signal media may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0106] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0107] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0108] Other embodiments of the invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.
Claims
1. A method for automatic coding of medical records, characterized in that: include: Obtain medical data for processing; Combining the medical classification model and the medical attention model to classify and identify the medical record codes of the medical data to be processed, so as to obtain the classification result of the medical data to be processed; Determine the coding information corresponding to the medical data to be processed according to the classification result; The method further comprises: Training a machine learning model using historical medical data and real encoding information of the historical medical data, and using the trained machine learning model as the medical classification model; The training of the machine learning model using the historical medical data and the encoding information of the historical medical data includes: Obtaining a word embedding vector representation corresponding to the historical medical data; The method further comprises: training the machine learning model according to the word embedding vector representation and the real coding information of the historical medical data to obtain the trained machine learning model, comprising: determining the predicted coding information of the historical medical data according to the word embedding vector representation; training the machine learning model based on the predicted coding information and the real coding information to obtain the trained machine learning model; wherein the historical medical data comprises a first type of data and a second type of data, and the first type of data and the second type of data have different sources; The determining the predictive coding information of the historical medical data according to the word embedding vector representation includes: inputting the word embedding vector representation into the machine learning model to obtain a historical feature representation; configuring a coding vector for the plurality of coding information, and matching the historical feature representation corresponding to the historical medical data with the coding vector to determine a matching degree; The historical feature representation is weighted according to the matching degree to obtain a text representation, wherein after the matching degree is obtained, all scores are normalized; the normalized matching degree is multiplied by the historical feature representation of each word in the historical medical data to obtain a plurality of multiplication results; and the plurality of multiplication results are added to obtain a weighted representation of the words contained in the entire historical medical data as the text representation of the entire historical medical data; The predictive coding information of the historical medical data is determined based on the textual representation.
2. The medical record automatic coding method according to claim 1, characterized in that: Combining the medical classification model and the medical attention model to classify and identify the medical record codes of the medical data to be processed, so as to obtain the classification results of the medical data to be processed includes: Performing feature extraction on the medical data to be processed by using the medical classification model to determine feature representation of the medical data to be processed; Performing weighted processing on the feature representation based on the medical attention model to obtain a text representation of the medical data to be processed; The classification result is determined according to the text representation of the medical data to be processed.
3. The medical record automatic coding method according to claim 1, characterized in that: Obtaining the word embedding vector representation corresponding to the historical medical data includes: Acquire the first type of data and the second type of data as the historical medical data, and perform word segmentation processing on the historical medical data to obtain the historical medical data after word segmentation; The word embedding vector representation is trained based on the historical medical data after word segmentation.
4. The automatic medical record coding method according to claim 1, characterized in that: Matching the historical feature representation corresponding to the historical medical data with the encoding vector to determine the degree of matching includes: A first logical operation is performed on the historical feature representation and the encoding vector to obtain a matching degree between the historical feature representation and the encoding information.
5. The medical record automatic coding method according to claim 1, characterized in that: The historical feature representation is weighted according to the matching degree to obtain a text representation including: The matching degree and each of the historical feature representations are subjected to a second logical operation to determine the text representation.
6. A medical record automatic coding device, characterized in that: include: A data acquisition module, used to acquire medical data to be processed; A coding classification module, used to classify and identify the medical record codes of the medical data to be processed by combining the medical classification model and the medical attention model, so as to obtain the classification result of the medical data to be processed; A coding determination module, used to determine the coding information corresponding to the medical data to be processed according to the classification result; The device further comprises: A model training module, used to train a machine learning model using historical medical data and real encoding information of the historical medical data, and use the trained machine learning model as the medical classification model; The model training module includes: a word vector determination module, which is used to obtain the word embedding vector representation corresponding to the historical medical data; a training control module, which is used to train the machine learning model according to the word embedding vector representation and the real coding information of the historical medical data to obtain the trained machine learning model, including: determining the predicted coding information of the historical medical data according to the word embedding vector representation; training the machine learning model based on the predicted coding information and the real coding information to obtain the trained machine learning model, wherein the historical medical data includes a first type of data and a second type of data, and the first type of data and the second type of data have different sources; The method of determining the predicted coding information of the historical medical data based on the word embedding vector representation includes: inputting the word embedding vector representation into the machine learning model to obtain a historical feature representation; configuring a coding vector for multiple coding information, and matching the historical feature representation corresponding to the historical medical data with the coding vector to determine the degree of matching; weighting the historical feature representation according to the degree of matching to obtain a text representation, wherein after the degree of matching is obtained, all scores are normalized; multiplying the normalized degree of matching by the historical feature representation of each word in the historical medical data to obtain multiple multiplication results; and then adding the multiple multiplication results to obtain a weighted representation of the words contained in the entire historical medical data as a text representation of the entire historical medical data; determining the predicted coding information of the historical medical data based on the text representation.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for automatic coding of medical records as described in any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the medical record automatic coding method described in any one of claims 1-5 by executing the executable instructions.
