Icd encoding method and apparatus
Patent Information
- Application Number
- CN202411675318.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2044-11-21
AI Technical Summary
这一过程花费的时间比较长,且需要编码人员具备医学背景知识且熟练掌握编码规则
[0014] The ICD coding method and apparatus provided by this invention, after determining the medical record to be coded and the candidate ICD codes, can obtain the similarity between the medical record to be coded and each candidate ICD code based on the medical record to be coded and the candidate ICD codes. After obtaining the top k ICD codes with the highest similarity between the medical record to be coded and each ICD code as coarse-screen ICD codes, it can determine whether the coarse-screen ICD codes are related to the medical record to be coded through a pre-trained ICD coding model. It does not require special skills from the coders and can reduce the difficulty of ICD coding based on medical records.
Smart Images

Figure CN119782955B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an ICD encoding method and apparatus. Background Technology
[0002] The International Classification of Diseases (ICD) is an internationally recognized classification system developed by the World Health Organization (WHO) for various diseases. Based on disease characteristics, the ICD categorizes diseases according to specific rules and represents them using codes. In clinical applications, ICD coding is a multi-label classification task. Coders need to analyze various aspects of clinical medical information, such as etiology, location, disease name, and surgical procedures, based on medical record texts to obtain the correlations between different clinical medical information and the distribution of disease-related elements in the medical record, in order to determine multiple ICD codes related to the medical record. This process is time-consuming and requires coders to have a medical background and be proficient in the coding rules. Summary of the Invention
[0003] To address the problems existing in the prior art, the present invention provides an ICD encoding method and apparatus.
[0004] This invention provides an ICD encoding method for determining the medical record to be encoded and candidate ICD codes for the medical record to be encoded; Based on the medical record to be coded and the candidate ICD codes, the similarity between the medical record to be coded and each candidate ICD code is obtained, so as to obtain the k coarse-screened ICD codes with the top k similarity rankings; Based on the coarse-screened ICD encoding, the encoding knowledge corresponding to the coarse-screened ICD encoding is obtained from the knowledge graph; The medical record to be encoded, the coarse-screened ICD code and its corresponding encoding knowledge are input into the ICD encoding model, and the recognition result of the coarse-screened ICD code is output. The ICD coding model is trained based on the sample medical records to be coded, the coarse-screened ICD codes of the samples carrying category labels, and the corresponding sample coding knowledge; the recognition result is used to identify whether the coarse-screened ICD codes are related or unrelated to the medical records to be coded.
[0005] According to an ICD encoding method provided by the present invention, encoding knowledge corresponding to the coarse-screened ICD encoding is obtained from a knowledge graph based on the coarse-screened ICD encoding, specifically including: The knowledge graph is input into a graph neural network model to obtain the semantic vector representation of each candidate ICD encoding in the knowledge graph, which is output by the graph neural network model. The graph neural network model is trained based on the sample knowledge graph and the semantic vector representation of the nodes in the sample knowledge graph. The graph neural network model is used to perform information flow and information aggregation on the sample knowledge graph. The semantic vector representation of the candidate ICD code corresponding to the coarse-screen ICD code is used as the encoding knowledge of the coarse-screen ICD code.
[0006] According to an ICD encoding method provided by the present invention, some nodes and / or edges of the sample knowledge graph are provided with masks; The graph neural network model is trained based on a sample knowledge graph and the semantic vector representations of nodes in the sample knowledge graph, specifically including: The sample knowledge graph is input into an initial graph neural network model to obtain the predicted semantic vector representation of the mask in the sample knowledge graph output by the graph neural network model. The first contrastive loss of the graph neural network model is obtained by comparing the predicted semantic vector representation with the corresponding nodes and / or edges in the sample knowledge graph. The parameters of the graph neural network model are adjusted based on the first contrastive loss to obtain a trained graph neural network model.
[0007] According to the present invention, an ICD encoding method is provided, wherein the ICD encoding model is trained based on the sample medical records to be encoded, the coarse-screened ICD codes of the samples carrying category labels, and the corresponding sample encoding knowledge, specifically including: The sample medical records to be encoded, the sample coarse screening ICD codes carrying category labels, and their corresponding sample encoding knowledge are input into the ICD encoding model to obtain the recognition result of the sample coarse screening ICD codes; wherein, the semantic vector representation of the candidate ICD codes corresponding to the sample coarse screening ICD codes is used as the encoding knowledge of the sample coarse screening ICD codes; A second contrast loss is obtained by comparing the recognition result of the coarse screening ICD code with the category label of the coarse screening ICD code. The parameters of the ICD encoding model and the graph neural network model are adjusted based on the second contrast loss to obtain the trained ICD encoding model.
[0008] According to an ICD encoding method provided by the present invention, the similarity between the medical record to be encoded and each candidate ICD code is obtained based on the medical record to be encoded and the candidate ICD codes, so as to obtain the k coarsely screened ICD codes with the top k similarity rankings, specifically including: The medical record to be encoded and the candidate ICD codes are input into the coarse screening model to obtain the similarity between the medical record to be encoded and each candidate ICD code output by the coarse screening model; the coarse screening model is trained based on sample medical records and sample ICD codes carrying category labels. Based on the similarity between the medical record to be coded and each of the candidate ICD codes, the top k coarse-screened ICD codes with the highest similarity ranking are obtained.
[0009] According to an ICD encoding method provided by the present invention, the step of obtaining the encoding knowledge corresponding to the coarse-screened ICD encoding from a knowledge graph based on the coarse-screened ICD encoding specifically includes: The coarse-screened ICD codes are divided into multiple batches; based on the coarse-screened ICD codes in each batch, the coding knowledge corresponding to the coarse-screened ICD codes is obtained from the knowledge graph.
[0010] According to an ICD encoding method provided by the present invention, before dividing the coarse-screened ICD encoding into multiple batches, the method further includes: The k coarsely screened ICD codes with the highest similarity ranking are randomly arranged; The process of dividing the coarse-screened ICD codes into multiple batches specifically includes: The k coarsely screened ICD codes with the highest similarity after random arrangement are divided into multiple batches.
[0011] According to an ICD encoding method provided by the present invention, dividing the coarse-screened ICD encoding into multiple batches specifically includes: Based on semantic similarity, the top k coarse-screened ICD codes with the highest similarity are divided into multiple batches.
[0012] According to an ICD encoding method provided by the present invention, the medical record to be encoded, the coarse-screened ICD code, and the corresponding encoding knowledge are input into an ICD encoding model, and the recognition result of the coarse-screened ICD code is output, specifically including: Corresponding to the coarse ICD encoding, insert a prediction marker; An input template is generated based on the medical record to be encoded, the coarse-screened ICD code and its corresponding coding knowledge, and the prediction tag. The input template is input into the ICD coding model, the output at the prediction marker is extracted, and the recognition result is generated; the output at the prediction marker is used to identify whether the coarse-screened ICD code is related to or not related to the medical record to be coded.
[0013] The present invention also provides an ICD encoding device, comprising: The module for determining information to be encoded is used to determine the medical record to be encoded and the candidate ICD codes of the medical record to be encoded; The coarse screening ICD coding module is used to obtain the similarity between the medical record to be coded and each candidate ICD code based on the medical record to be coded and the candidate ICD codes, so as to obtain the k coarse screening ICD codes with the top k similarity rankings; The coding knowledge acquisition module is used to acquire the coding knowledge corresponding to the coarse-screened ICD coding from the knowledge graph based on the coarse-screened ICD coding; The recognition module is used to input the medical record to be encoded, the coarse-screened ICD code and its corresponding encoding knowledge into the ICD encoding model, and output the recognition result of the coarse-screened ICD code; The ICD coding model is trained based on the sample medical records to be coded, the coarse-screened ICD codes of the samples carrying category labels, and the corresponding sample coding knowledge; the recognition result is used to identify whether the coarse-screened ICD codes are related or unrelated to the medical records to be coded.
[0014] The ICD coding method and apparatus provided by this invention, after determining the medical record to be coded and the candidate ICD codes, can obtain the similarity between the medical record to be coded and each candidate ICD code based on the medical record to be coded and the candidate ICD codes. After obtaining the top k ICD codes with the highest similarity between the medical record to be coded and each ICD code as coarse-screen ICD codes, it can determine whether the coarse-screen ICD codes are related to the medical record to be coded through a pre-trained ICD coding model. It does not require special skills from the coders and can reduce the difficulty of ICD coding based on medical records. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the ICD encoding method provided by the present invention.
[0017] Figure 2 This is one of the schematic diagrams of the ICD encoding method provided by the present invention.
[0018] Figure 3 This is the second schematic diagram of the framework of the ICD encoding method provided by the present invention.
[0019] Figure 4This is the third schematic diagram of the framework of the ICD encoding method provided by the present invention.
[0020] Figure 5 This is the fourth schematic diagram of the framework of the ICD encoding method provided by the present invention.
[0021] Figure 6 This is a schematic diagram of the structure of the ICD encoding device provided by the present invention.
[0022] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0024] The following is combined with Figures 1-7 The ICD encoding method and apparatus of the present invention are described.
[0025] Figure 1 This is a flowchart illustrating the ICD encoding method provided by the present invention, as shown below. Figure 1 As shown, the method includes: Step 101: Determine the medical record to be coded and its candidate ICD codes.
[0026] Medical records awaiting coding refer to those that require ICD coding according to the International Classification of Diseases (ICD). An ICD code is the code corresponding to the disease name in the ICD; for example, the ICD code for open-chest coronary angioplasty in ICD-9-CM is 36.0300.
[0027] The candidate ICD code for the medical record to be coded consists of multiple ICD codes, from which the ICD code corresponding to the medical record to be coded can be selected. The ICD-9-CM code includes disease codes and surgical codes, totaling approximately 8922. For example, the candidate ICD code can be a complete ICD-9-CM code or a disease code within an ICD-9-CM code.
[0028] For example, medical records where doctors have not entered clinical diagnoses according to coding principles can be identified as medical records to be coded. Diagnostic keywords can be extracted from these medical records, and candidate ICD codes can be determined from a preset ICD code set based on these keywords. For instance, if the preset ICD code is a complete ICD-9-CM code, and the diagnostic keywords extracted from the medical record to be coded include disease diagnostic keywords and surgical diagnostic keywords, then the candidate ICD code for the medical record to be coded can be determined to be a complete ICD-9-CM code.
[0029] It is understood that both the preset ICD code and the candidate ICD code of the medical record to be coded can be other ICD codes, such as ICD-10, ICD-11, etc., and this application does not impose any further restrictions on this.
[0030] Step 102: Based on the medical record to be coded and the candidate ICD codes, obtain the similarity between the medical record to be coded and each candidate ICD code, so as to obtain the k coarse-screened ICD codes with the top k similarity rankings.
[0031] For example, the similarity of each ICD code in the medical record to be coded and the candidate ICD codes can be obtained based on the medical record to be coded and the candidate ICD codes. The top-K codes with the highest similarity can be selected to obtain the k coarsely screened ICD codes with the highest similarity ranking.
[0032] Step 103: Obtain the coding knowledge corresponding to the coarse-screen ICD coding from the knowledge graph based on the coarse-screen ICD coding.
[0033] A knowledge graph is a medical relationship graph consisting of nodes and edges. Adjacent nodes can be connected by edges, for example, edges can be established based on co-occurrence relationships between diseases or clinical pathways. For example, the knowledge graph in this embodiment can be a knowledge graph with ICD codes as nodes and relationships between ICD codes as edges; it can also be called an ICD code knowledge graph. This facilitates the acquisition of coding knowledge corresponding to coarsely screened ICD codes through the knowledge graph.
[0034] The knowledge graph can be an existing knowledge graph in the medical field or a pre-created knowledge graph. For example, a basic graph network framework can be built based on the hierarchical structure of the International Classification of Diseases (ICD), and relevant medical information graphs can be inserted onto this framework. Furthermore, the Unified Medical Language System (UMLS) can be used to obtain synonyms for disease names, and these synonyms can be used to supplement the knowledge graph.
[0035] Encoded knowledge refers to medical knowledge and information related to the coarse-screened ICD codes extracted from the knowledge graph. Encoded knowledge can be the medical knowledge and information of the node corresponding to the coarse-screened ICD code in the knowledge graph, or it can be the medical knowledge and information related to the node corresponding to the coarse-screened ICD code and its parent and child nodes.
[0036] Step 104: Input the medical record to be encoded, the coarse-screened ICD code and its corresponding encoding knowledge into the ICD encoding model, and output the recognition result of the coarse-screened ICD code.
[0037] The ICD coding model is trained based on the sample medical records to be coded, the coarse-screened ICD codes of the samples carrying category labels, and the corresponding sample coding knowledge; the recognition result is used to identify whether the coarse-screened ICD codes are related or unrelated to the medical records to be coded.
[0038] The category label of the preliminary screening ICD code can be used to identify whether the preliminary screening ICD code can be used for the medical record to be coded. For example, the category label of the preliminary screening ICD code can include three categories, where one category indicates that the preliminary screening ICD code and the medical record to be coded are positively correlated, a second category indicates that the preliminary screening ICD code and the medical record to be coded are not correlated, and a third category indicates that the preliminary screening ICD code and the medical record to be coded are negatively correlated.
[0039] The ICD encoding method provided in this invention, after determining the medical record to be encoded and the candidate ICD codes, can obtain the similarity between the medical record to be encoded and each candidate ICD code based on the medical record to be encoded and the candidate ICD codes. After obtaining the top k ICD codes with the highest similarity between the medical record to be encoded and each ICD code as coarse-screen ICD codes, it can determine whether the coarse-screen ICD codes are related to the medical record to be encoded through a pre-trained ICD encoding model. It does not require special skills from the coders and can reduce the difficulty of ICD encoding based on medical records.
[0040] Furthermore, the ICD encoding method provided in this embodiment of the invention can enhance the understanding of the coarse-screened ICD encoding by obtaining the encoding knowledge corresponding to the coarse-screened ICD encoding from the knowledge graph, thereby improving the accuracy of judging whether the medical record to be encoded is positively correlated with the coarse-screened ICD encoding.
[0041] Based on the above embodiments, obtaining the encoding knowledge corresponding to the coarse-screened ICD encoding from the knowledge graph based on the coarse-screened ICD encoding specifically includes: The knowledge graph is input into a graph neural network model to obtain the semantic vector representation of each candidate ICD encoding in the knowledge graph, which is output by the graph neural network model. The graph neural network model is trained based on the sample knowledge graph and the semantic vector representation of the nodes in the sample knowledge graph. The graph neural network model is used to perform information flow and information aggregation on the sample knowledge graph. The semantic vector representation of the candidate ICD code corresponding to the coarse-screen ICD code is used as the encoding knowledge of the coarse-screen ICD code.
[0042] The semantic vector representation of each candidate ICD code, also known as the semantic identifier of each candidate ICD code, is an implicit knowledge representation of each candidate ICD code extracted from the knowledge graph. The semantic vector representation of each candidate ICD code may include information such as the ancestor, sibling, and child codes of the code, the code description, and information from the knowledge graph such as synonyms or related medical terms.
[0043] As mentioned earlier, the knowledge graph in this embodiment is an ICD-encoded knowledge graph, but the sample knowledge graph used to train the graph neural network model is a knowledge graph unrelated to the ICD-encoded knowledge graph.
[0044] The primary function of a sample knowledge graph is to train a graph neural network model to generate a semantic vector representation of a node based on its parent-child nodes, synonym information, and other relevant information within a given structure. This allows the graph neural network, or a graph neural network adjusted based on a small number of samples, to still perform information flow and aggregation on the restructured ICD-encoded knowledge graph, obtaining a relatively accurate semantic vector representation of each node.
[0045] In one embodiment, the knowledge graph can be updated through a systematic update mechanism. For example, new nodes can be dynamically inserted into the knowledge graph, such as adding new disease classifications and revising medical terms, to expand and update the knowledge graph, ensuring it remains up-to-date and adapts to the rapid development and continuous changes in the medical field, reflecting the latest medical research findings and clinical practice changes.
[0046] In this embodiment, the graph neural network model can be trained using different sample knowledge graphs, enabling the graph neural network model to deeply understand the structure of the knowledge graph and enhancing its generalization ability. As a result, it still has high accuracy and efficiency when the ICD-encoded knowledge graph changes, without the need to retrain the graph neural network model. This reduces the cost of retraining the ICD encoding model due to version migration of the International Classification of Diseases.
[0047] The relationships between nodes and edges in the sample coding structure knowledge may be complex. When coders select the corresponding coding knowledge for ICD codes from the sample coding structure knowledge, there may be omissions. In this embodiment, the hierarchical relationships and semantic associations between codes are automatically captured and learned through a graph neural network model, which can provide more complete coding knowledge corresponding to coarse-screened ICD codes, and adapt to the updates of the International Classification of Diseases more quickly, thereby increasing the accuracy of the coding knowledge corresponding to the coarse-screened ICD codes provided.
[0048] Information flow refers to the process by which a graph neural network model iteratively collects information from neighboring nodes, enabling the node's features to be widely disseminated within the basic graph network framework. Information aggregation refers to the process by which a graph neural network model integrates the information collected from neighboring nodes after iterative operations, combining the features of various related nodes to obtain the updated features of the target node.
[0049] When conducting information flow and aggregation, and capturing the hierarchical and relational relationships between nodes, the iterative formula for each layer of each node is as follows: in, It is the first i Node characteristics of each node; l It is the first l layer; These are learnable parameters; It is the parent node; It is the first i A set of child nodes of a node. Based on any of the above embodiments, some nodes and / or edges of the sample knowledge graph are masked; The graph neural network model is trained based on a sample knowledge graph and the semantic vector representations of nodes in the sample knowledge graph, specifically including: The sample knowledge graph is input into an initial graph neural network model to obtain the predicted semantic vector representation of the mask in the sample knowledge graph output by the graph neural network model. The first contrastive loss of the graph neural network model is obtained by comparing the predicted semantic vector representation with the corresponding nodes and / or edges in the sample knowledge graph. The parameters of the graph neural network model are adjusted based on the first contrastive loss to obtain a trained graph neural network model.
[0050] The initial graph neural network model is a randomly initialized model.
[0051] For example, a mask technique can be used to add a mask to the sample knowledge graph to hide some nodes and / or edges in the sample knowledge graph. The first contrastive loss is the difference between the predicted semantic vector representation of the mask and the content hidden by the mask. The content hidden by the mask is a node or an edge.
[0052] For example, the first contrastive loss between the predicted knowledge graph and the sample knowledge graph can be determined by calculating the cross-entropy loss. The parameters of the initial neural network model can be adjusted by the backpropagation algorithm until the initial neural network model converges or reaches a predetermined number of training rounds, thus obtaining a trained graph neural network model.
[0053] In this embodiment, by hiding certain nodes and edges in the knowledge structure encoded by the sample, the pre-trained graph neural network model can infer these missing information on its own. This enables the pre-trained graph neural network model to better understand the structure of the knowledge graph and to have a preliminary understanding of the graph structure and relationships in the knowledge graph.
[0054] Based on any of the above embodiments, the ICD coding model is trained based on the sample medical records to be coded, the coarse-screened ICD codes of the samples carrying category labels, and the corresponding sample coding knowledge, specifically including: The sample medical records to be encoded, the sample coarse screening ICD codes carrying category labels, and their corresponding sample encoding knowledge are input into the ICD encoding model to obtain the recognition result of the sample coarse screening ICD codes; wherein, the semantic vector representation of the candidate ICD codes corresponding to the sample coarse screening ICD codes is used as the encoding knowledge of the sample coarse screening ICD codes; A second contrast loss is obtained by comparing the recognition result of the coarse screening ICD code with the category label of the coarse screening ICD code. The parameters of the ICD encoding model and the graph neural network model are adjusted based on the second contrast loss to obtain the trained ICD encoding model.
[0055] The second contrast loss is the difference between the recognition result of the coarse-screened ICD code and the category label of the sample coarse-screened ICD code.
[0056] For example, in this embodiment, the knowledge graph can be input into the aforementioned trained graph neural network to obtain the semantic vector of each candidate ICD code in the knowledge graph, and then the corresponding candidate ICD code can be determined according to the sample coarse screening ICD code, so as to obtain the semantic vector representation of the corresponding candidate ICD code as the encoding knowledge of the sample coarse screening ICD code.
[0057] Then, the sample medical records to be coded, the coarse ICD codes of the samples with category labels, and the corresponding sample coding knowledge are input into the ICD coding model to obtain the recognition results of the predicted coarse ICD codes output by the ICD coding model. This allows for the adjustment of the parameters of the ICD coding model, and at the same time, the fine-tuning of the parameters of the graph neural network model to increase the generalization ability of the graph neural network model.
[0058] Based on any of the above embodiments, the similarity between the medical record to be coded and each candidate ICD code is obtained based on the medical record to be coded and the candidate ICD codes, so as to obtain the k coarsely screened ICD codes with the top k similarity rankings, specifically including: The medical record to be encoded and the candidate ICD codes are input into the coarse screening model to obtain the similarity between the medical record to be encoded and each candidate ICD code output by the coarse screening model; the coarse screening model is trained based on sample medical records and sample ICD codes carrying category labels. Based on the similarity between the medical record to be coded and each of the candidate ICD codes, the top k coarse-screened ICD codes with the highest similarity ranking are obtained.
[0059] The category label of the sample ICD code is used to identify whether the sample ICD code is positively correlated with the sample medical record. For example, the category label of the sample ICD code can be positively correlated or negatively correlated.
[0060] The initial model for the coarse screening model can be a pre-trained model in the medical field, or an existing pre-trained model in the medical field can be used as a foundation. A pre-trained model in the medical field is a model pre-trained on a large amount of medical text and possesses medical language understanding capabilities. This allows the coarse screening module to understand complex medical texts, considering background knowledge in the medical field such as relationships between diseases, between diseases and symptoms, and between diseases and surgical treatments, rather than focusing solely on the surface features of the medical record text to be encoded. This improves the accuracy of the coarse screening model's understanding of the information in the medical record to be encoded, and enhances the accuracy of its reasoning based on the information in the medical record to be encoded, especially when there are significant discrepancies between the information in the medical record to be encoded and the corresponding information in the standard ICD encoding.
[0061] Among them, positive samples are the correct ICD codes or positively correlated ICD codes corresponding to the sample medical records, while negative samples are the incorrect ICD codes or negatively correlated or uncorrelated ICD codes corresponding to the sample medical records.
[0062] like Figure 2As shown, the coarse screening model includes a sample encoder and a medical record encoder. During the initial model training process, sample medical records and a set of positive and negative samples can be input into the coarse screening model. After passing through the dual encoders of samples and medical records, implicit representations of positive and negative samples and medical records are obtained. Furthermore, by calculating contrastive loss and performing contrastive optimization, the coarse screening model can narrow the distance between sample medical records and positive samples (or correct ICD codes) in the feature space, while widening the distance between sample medical records and negative samples (or incorrect ICD codes), thus enhancing the coarse screening model's ability to distinguish between correct and incorrect ICD codes.
[0063] For example, after obtaining the similarity between the medical records to be coded output by the coarse screening model and each candidate ICD code, they can be sorted in descending order based on the similarity to obtain the top k coarse screening ICD codes in terms of similarity. The specific value of k can be determined according to the actual needs such as available computing resources and ICD coding accuracy, and this application does not further limit it.
[0064] In this embodiment, the similarity between the medical record to be coded and each candidate ICD code is obtained through a coarse screening model. Based on the similarity ranking, k coarse screening ICD codes are selected from the candidate ICD codes, which can significantly reduce the amount of computation and complexity in the subsequent processing stages.
[0065] In some embodiments, the sample ICD encoding may also include synonyms or related medical terms of the ICD encoding, in order to enhance the recognition of semantic connections between medical records and encodings by the trained coarse screening model and optimize the coarse screening model's understanding of the relationships between different medical concepts.
[0066] Based on any of the above embodiments, the step of obtaining the encoding knowledge corresponding to the coarse-screened ICD encoding from the knowledge graph based on the coarse-screened ICD encoding specifically includes: The coarse-screened ICD codes are divided into multiple batches; based on the coarse-screened ICD codes in each batch, the coding knowledge corresponding to the coarse-screened ICD codes is obtained from the knowledge graph.
[0067] To eliminate potential order bias, based on any of the above embodiments, before dividing the coarse screening ICD codes into multiple batches, the method further includes: randomly arranging the k coarse screening ICD codes with the highest similarity ranking.
[0068] For example, a predefined random arrangement function can be used to obtain the k coarse ICD codes with the highest similarity ranking, and then call the random arrangement function to randomly arrange the k coarse ICD codes.
[0069] The input to an ICD encoding model can be multiple ICD codes. To improve the accuracy of the coarse-screened ICD code recognition results, in some embodiments, the coarse-screened ICD codes are divided into multiple batches. Specifically, this includes dividing the top k coarse-screened ICD codes by similarity after random arrangement into multiple batches. This reduces the number of coarse-screened ICD codes that the ICD encoding model needs to process at one time, reduces the confusion rate during inference, and thus improves the accuracy of the coarse-screened ICD code recognition results.
[0070] For example, k coarse-screened ICD codes can be divided into N batches, with each batch containing K / N codes. The specific number of batches can be determined based on actual needs such as available computing resources, and this application does not impose further limitations on this.
[0071] To improve the effectiveness of the ICD encoding model in recognizing ICD codes with subtle differences, based on any of the above embodiments, dividing the coarse-screened ICD codes into multiple batches specifically includes: dividing the top k coarse-screened ICD codes based on semantic similarity into multiple batches. In this way, the ICD encoding model can compare and contrast the coarse-screened ICD codes within each batch, thereby improving the effectiveness of the ICD encoding model in recognizing ICD codes with subtle differences.
[0072] Based on any of the above embodiments, the medical record to be encoded, the coarse-screened ICD code, and its corresponding encoding knowledge are input into the ICD encoding model, and the recognition result of the coarse-screened ICD code is output, specifically including: Corresponding to the coarse ICD encoding, insert a prediction marker; An input template is generated based on the medical record to be encoded, the coarse-screened ICD code and its corresponding coding knowledge, and the prediction tag. The input template is input into the ICD coding model, and the output at the prediction marker is extracted to generate the recognition result; the output at the prediction marker is used to identify whether the coarse-screened ICD code is related to or unrelated to the medical record to be coded.
[0073] For example, such as Figure 3 As shown, the encoded knowledge output by the graph neural network model and its corresponding coarse-screened ICD codes can be concatenated first. This helps the ICD coding model understand the contextual meaning of the ICD codes. Then, a [mask] marker is inserted after each set of coarse-screened ICD codes and their encoded knowledge, such as... Figure 4 These markers indicate which regions the ICD coding model generates category labels to fill in missing information. Finally, the original medical record text is added to generate the input template.
[0074] In some embodiments, the category labels are Yes or No, where "Yes" indicates that the coarse-screened ICD code is relevant to the medical record to be coded, while "No" indicates that the coarse-screened ICD code is not relevant to the medical record to be coded. Specifically, a mapper can be set at the output of the ICD coding model to map the original output probability distribution of the model to discrete category labels, so as to transform the output of the ICD coding model into specific "Yes" or "No".
[0075] In one embodiment, the output at the prediction marker may include correlation and its confidence level, or irrelevance and its confidence level.
[0076] In some embodiments, the encoded knowledge output by the graph neural network model can be transformed and mapped to the input space of the medical records to be encoded and the predicted identifier representations through a mapper composed of a multilayer perceptron, ensuring the compatibility of the encoded knowledge features.
[0077] In some embodiments, the ICD encoding model may include a batch processing module and a centralized inference module.
[0078] After receiving the medical records to be coded, the coarse-screened ICD codes, and their corresponding coding knowledge from the coarse-screening model and the graph neural network model in batches, the ICD coding model can generate preliminary analysis results through the batch processing module, and input the independent analysis results into the centralized inference module. The analysis results may include the basic features of each extracted coarse-screened ICD code and the assessed matching degree between each coarse-screened ICD code and the medical record content.
[0079] The centralized reasoning module integrates the analysis results of all batches of coarsely screened ICD codes and performs further reasoning to identify the most representative and relevant ICD codes, resulting in a comprehensive and verified identification result.
[0080] In this embodiment, by generating an input template, the actual clinical context is provided, which enhances the ICD coding model's understanding and association of the specific content of the medical record to be coded, thereby improving the accuracy of the judgment on whether the medical record to be coded is positively correlated with the coarse screening ICD code.
[0081] like Figure 5 As shown, to illustrate the functionality of the ICD encoding method provided in this implementation, a specific example is provided below.
[0082] Determine the medical record to be coded and its candidate ICD codes; The medical record to be encoded and the candidate ICD codes are input into a coarse screening model to obtain the similarity between the medical record to be encoded and each candidate ICD code output by the coarse screening model; the coarse screening model is trained based on sample medical records and sample ICD codes carrying category labels; based on the similarity between the medical record to be encoded and each candidate ICD code, the top k coarse screening ICD codes with the highest similarity are obtained; The k coarse-screened ICD codes with the top k similarity rankings are randomly arranged; the k coarse-screened ICD codes with the top k similarity rankings are divided into multiple batches based on semantic similarity; the coding knowledge corresponding to the coarse-screened ICD codes in each batch is obtained from the knowledge graph; the coarse-screened ICD codes are input into the graph neural network model in batches. After the coarse-screened ICD encoding is input into the graph neural network model, the graph neural network model can perform information flow and information aggregation on the knowledge graph based on the coarse-screened ICD encoding to output the corresponding encoded knowledge; wherein, during the training process of the graph neural network model, some nodes and / or edges are hidden in the knowledge graph; the contrastive loss of the graph neural network model can be obtained by comparing the predicted encoded knowledge and the sample encoded knowledge, and the parameters of the graph neural network model can be adjusted based on the contrastive loss; A prediction tag is inserted corresponding to the coarse-screened ICD code and its corresponding coding knowledge; an input template is generated based on the medical record to be coded, the coarse-screened ICD code and its corresponding coding knowledge, and the prediction tag; the input template is input into the ICD coding model, a category label is output, the category label is filled into the prediction tag, and a recognition result is generated; the category label is used to identify whether the coarse-screened ICD code is related or unrelated to the medical record to be coded.
[0083] The ICD encoding method provided in this invention performs well on the MIMIC-III-Full and MIMIC-III-50 datasets in terms of macro-average, micro-average F1, and AUC, effectively generating ICD codes for medical records to be encoded. It acquires encoding knowledge corresponding to the coarsely screened ICD codes through a knowledge graph, performing well in scenarios with few and difficult samples. It has good processing capabilities for low-frequency ICD codes and good discrimination and detail-oriented ability for more difficult sibling codes. The knowledge graph supports the insertion of new ICD codes and new medical-related knowledge, and can quickly adapt to ICD code updates for unseen codes, reducing the cost of retraining the model and enabling version migration of the International Classification of Diseases (ICD) with minimal cost.
[0084] The ICD encoding device provided by the present invention is described below. The ICD encoding device described below and the ICD encoding method described above can be referred to in correspondence.
[0085] Figure 6 This is a schematic diagram of the structure of the ICD encoding device provided by the present invention, as shown below. Figure 6 As shown, the device includes: The module for determining information to be encoded is used to determine the medical record to be encoded and the candidate ICD codes of the medical record to be encoded; The coarse screening ICD coding module is used to obtain the similarity between the medical record to be coded and each candidate ICD code based on the medical record to be coded and the candidate ICD codes, so as to obtain the k coarse screening ICD codes with the top k similarity rankings; The coding knowledge acquisition module is used to acquire the coding knowledge corresponding to the coarse-screened ICD coding from the knowledge graph based on the coarse-screened ICD coding; The recognition module is used to input the medical record to be encoded, the coarse-screened ICD code and its corresponding encoding knowledge into the ICD encoding model, and output the recognition result of the coarse-screened ICD code; The ICD coding model is trained based on the sample medical records to be coded, the coarse-screened ICD codes of the samples carrying category labels, and the corresponding sample coding knowledge; the recognition result is used to identify whether the coarse-screened ICD codes are related or unrelated to the medical records to be coded.
[0086] Based on any of the above embodiments, the encoding knowledge acquisition module is specifically used for: The coarse-screen ICD code is input into a graph neural network model to obtain the coding knowledge corresponding to the coarse-screen ICD code output by the graph neural network model. The graph neural network model is trained based on the sample ICD encoding and the sample encoding knowledge corresponding to the sample ICD encoding; the graph neural network model is used to perform information flow and information aggregation on the knowledge graph based on the coarse-screened ICD encoding.
[0087] Based on any of the above embodiments, the encoding knowledge acquisition module is further specifically used for: The sample ICD encoding is input into the graph neural network model, so that the graph neural network model performs information flow and information aggregation in the knowledge graph based on the sample ICD encoding, and outputs the predicted encoded knowledge corresponding to the sample ICD encoding; wherein, some nodes and / or edges are hidden in the knowledge graph; The contrastive loss of the graph neural network model is obtained by comparing the predicted encoding knowledge and the sample encoding knowledge, and the parameters of the graph neural network model are adjusted based on the contrastive loss.
[0088] Based on any of the above embodiments, the coarse screening ICD encoding module is specifically used for: The medical record to be encoded and the candidate ICD codes are input into the coarse screening model to obtain the similarity between the medical record to be encoded and each candidate ICD code output by the coarse screening model; the coarse screening model is trained based on sample medical records and sample ICD codes carrying category labels. Based on the similarity between the medical record to be coded and each of the candidate ICD codes, the top k coarse-screened ICD codes with the highest similarity ranking are obtained.
[0089] Based on any of the above embodiments, the encoding knowledge acquisition module is further specifically used for: The coarse-screened ICD codes are divided into multiple batches; based on the coarse-screened ICD codes in each batch, the coding knowledge corresponding to the coarse-screened ICD codes is obtained from the knowledge graph.
[0090] Based on any of the above embodiments, the ICD encoding device further includes a random arrangement module, which is used to randomly arrange the k coarse-screened ICD codes with the top k similarity rankings. The knowledge acquisition module is further used to divide the k coarsely screened ICD codes with the highest similarity after random arrangement into multiple batches.
[0091] Based on any of the above embodiments, the encoding knowledge acquisition module is further used to divide the k coarse-screened ICD codes with the top k similarity rankings into multiple batches based on semantic similarity.
[0092] Based on any of the above embodiments, the identification module is specifically used for: Prediction markers are inserted corresponding to the coarse-screened ICD codes and their corresponding coding knowledge; An input template is generated based on the medical record to be encoded, the coarse-screened ICD code and its corresponding coding knowledge, and the prediction tag. The input template is input into the ICD coding model, and the category label is output. The category label is filled into the prediction marker to generate the recognition result. The category label is used to identify whether the coarse ICD code is related or not to the medical record to be coded.
[0093] Figure 7 An example is a schematic diagram of the structure of an electronic device, such as... Figure 7As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communications bus 740, wherein the processor 710, the communications interface 720, and the memory 730 communicate with each other through the communications bus 740. The processor 710 can call logic instructions in the memory 730 to execute an ICD encoding method, which includes: determining a medical record to be encoded and candidate ICD codes for the medical record to be encoded; obtaining the similarity between the medical record to be encoded and each candidate ICD code based on the medical record to be encoded and the candidate ICD codes, so as to obtain the top k coarse-screened ICD codes based on the similarity ranking; obtaining the encoding knowledge corresponding to the coarse-screened ICD codes from a knowledge graph based on the coarse-screened ICD codes; inputting the medical record to be encoded, the coarse-screened ICD codes and their corresponding encoding knowledge into an ICD encoding model, and outputting the recognition result of the coarse-screened ICD codes; the ICD encoding model is trained based on sample medical records to be encoded, sample coarse-screened ICD codes carrying category labels and their corresponding sample encoding knowledge; the recognition result is used to identify whether the coarse-screened ICD codes are related or unrelated to the medical record to be encoded.
[0094] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0095] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the ICD encoding method provided by the above methods. The method includes: determining a medical record to be encoded and candidate ICD codes for the medical record to be encoded; obtaining the similarity between the medical record to be encoded and each candidate ICD code based on the medical record to be encoded and the candidate ICD codes, so as to obtain the k coarse-screened ICD codes with the top k similarity rankings; obtaining the encoding knowledge corresponding to the coarse-screened ICD codes from a knowledge graph based on the coarse-screened ICD codes; inputting the medical record to be encoded, the coarse-screened ICD codes and their corresponding encoding knowledge into an ICD encoding model, and outputting the recognition result of the coarse-screened ICD codes; the ICD encoding model is trained based on sample medical records to be encoded, sample coarse-screened ICD codes carrying category labels and their corresponding sample encoding knowledge; the recognition result is used to identify whether the coarse-screened ICD codes are related or unrelated to the medical record to be encoded.
[0096] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the ICD encoding method provided by the above methods. The method includes: determining a medical record to be encoded and candidate ICD codes for the medical record to be encoded; obtaining a similarity between the medical record to be encoded and each candidate ICD code based on the medical record to be encoded and the candidate ICD codes, to obtain k coarse-screened ICD codes with the top k similarity rankings; obtaining encoding knowledge corresponding to the coarse-screened ICD codes from a knowledge graph based on the coarse-screened ICD codes; inputting the medical record to be encoded, the coarse-screened ICD codes, and their corresponding encoding knowledge into an ICD encoding model, and outputting the recognition result of the coarse-screened ICD codes; wherein the ICD encoding model is trained based on sample medical records to be encoded, sample coarse-screened ICD codes carrying category labels, and their corresponding sample encoding knowledge; and the recognition result is used to identify whether the coarse-screened ICD codes are related or unrelated to the medical record to be encoded.
[0097] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An ICD encoding method, characterized in that, include: Determine the medical record to be coded and its candidate ICD codes; Based on the medical record to be coded and the candidate ICD codes, the similarity between the medical record to be coded and each candidate ICD code is obtained, so as to obtain the k coarse-screened ICD codes with the top k similarity rankings; Based on the coarse-screened ICD encoding, the encoding knowledge corresponding to the coarse-screened ICD encoding is obtained from the knowledge graph; The medical record to be encoded, the coarse-screened ICD code and its corresponding encoding knowledge are input into the ICD encoding model, and the recognition result of the coarse-screened ICD code is output. The ICD coding model is trained based on the sample medical record to be coded, the coarse-screened ICD codes of the sample carrying category labels, and the corresponding sample coding knowledge; the recognition result is used to identify whether the coarse-screened ICD code is related to or unrelated to the medical record to be coded. Based on the coarse-screened ICD encoding, the encoding knowledge corresponding to the coarse-screened ICD encoding is obtained from the knowledge graph, specifically including: The knowledge graph is input into a graph neural network model to obtain the semantic vector representation of each candidate ICD encoding in the knowledge graph output by the graph neural network model; wherein, the graph neural network model can generate the semantic vector representation of a node based on the parent and child nodes and synonym information of a node in a given structure; The semantic vector representation of the candidate ICD code corresponding to the coarse-screen ICD code is used as the encoding knowledge of the coarse-screen ICD code.
2. The ICD encoding method according to claim 1, characterized in that, The graph neural network model is trained based on the sample knowledge graph and the semantic vector representation of the nodes in the sample knowledge graph; the graph neural network model is used to perform information flow and information aggregation on the sample knowledge graph.
3. The ICD encoding method according to claim 2, characterized in that, Some nodes and / or edges of the sample knowledge graph are masked; The graph neural network model is trained based on a sample knowledge graph and the semantic vector representations of nodes in the sample knowledge graph, specifically including: The sample knowledge graph is input into an initial graph neural network model to obtain the predicted semantic vector representation of the mask in the sample knowledge graph output by the graph neural network model. The first contrastive loss of the graph neural network model is obtained by comparing the predicted semantic vector representation with the corresponding nodes and / or edges in the sample knowledge graph. The parameters of the graph neural network model are adjusted based on the first contrastive loss to obtain a trained graph neural network model.
4. The ICD encoding method according to claim 2, characterized in that, The ICD coding model is trained based on the sample medical records to be coded, the coarse-screened ICD codes of the samples carrying category labels, and the corresponding sample coding knowledge, specifically including: The sample medical records to be encoded, the sample coarse screening ICD codes carrying category labels, and their corresponding sample encoding knowledge are input into the ICD encoding model to obtain the recognition result of the sample coarse screening ICD codes; wherein, the semantic vector representation of the candidate ICD codes corresponding to the sample coarse screening ICD codes is used as the encoding knowledge of the sample coarse screening ICD codes; A second contrast loss is obtained by comparing the recognition result of the coarse screening ICD code with the category label of the coarse screening ICD code. The parameters of the ICD encoding model and the graph neural network model are adjusted based on the second contrast loss to obtain the trained ICD encoding model.
5. The ICD encoding method according to claim 1, characterized in that, Based on the medical record to be coded and the candidate ICD codes, the similarity between the medical record to be coded and each candidate ICD code is obtained to obtain the k coarsely screened ICD codes with the top k similarity rankings, specifically including: The medical record to be encoded and the candidate ICD codes are input into the coarse screening model to obtain the similarity between the medical record to be encoded and each candidate ICD code output by the coarse screening model; the coarse screening model is trained based on sample medical records and sample ICD codes carrying category labels. Based on the similarity between the medical record to be coded and each of the candidate ICD codes, the top k coarse-screened ICD codes with the highest similarity ranking are obtained.
6. The ICD encoding method according to claim 1, characterized in that, The step of obtaining the coding knowledge corresponding to the coarse-screened ICD coding from the knowledge graph based on the coarse-screened ICD coding specifically includes: The coarse-screened ICD codes are divided into multiple batches; based on the coarse-screened ICD codes in each batch, the coding knowledge corresponding to the coarse-screened ICD codes is obtained from the knowledge graph.
7. The ICD encoding method according to claim 6, characterized in that, Before dividing the coarse-screened ICD code into multiple batches, the method further includes: The k coarsely screened ICD codes with the highest similarity ranking are randomly arranged; The process of dividing the coarse-screened ICD codes into multiple batches specifically includes: The k coarsely screened ICD codes with the highest similarity after random arrangement are divided into multiple batches.
8. The ICD encoding method according to claim 6 or 7, characterized in that, The process of dividing the coarse-screened ICD codes into multiple batches specifically includes: Based on semantic similarity, the top k coarse-screened ICD codes with the highest similarity are divided into multiple batches.
9. The ICD encoding method according to claim 1, characterized in that, The medical record to be encoded, the coarse-screened ICD code, and its corresponding encoding knowledge are input into the ICD encoding model, and the recognition result of the coarse-screened ICD code is output, specifically including: Corresponding to the coarse ICD encoding, insert a prediction marker; An input template is generated based on the medical record to be encoded, the coarse-screened ICD code and its corresponding coding knowledge, and the prediction tag. The input template is input into the ICD coding model, the output at the prediction marker is extracted, and the recognition result is generated; the output at the prediction marker is used to identify whether the coarse-screened ICD code is related to or not related to the medical record to be coded.
10. An ICD encoding device, characterized in that, include: The module for determining information to be encoded is used to determine the medical record to be encoded and the candidate ICD codes of the medical record to be encoded; The coarse screening ICD coding module is used to obtain the similarity between the medical record to be coded and each candidate ICD code based on the medical record to be coded and the candidate ICD codes, so as to obtain the k coarse screening ICD codes with the top k similarity rankings; The coding knowledge acquisition module is used to acquire the coding knowledge corresponding to the coarse-screened ICD coding from the knowledge graph based on the coarse-screened ICD coding; The recognition module is used to input the medical record to be encoded, the coarse-screened ICD code and its corresponding encoding knowledge into the ICD encoding model, and output the recognition result of the coarse-screened ICD code; The ICD coding model is trained based on the sample medical record to be coded, the coarse-screened ICD codes of the sample carrying category labels, and the corresponding sample coding knowledge; the recognition result is used to identify whether the coarse-screened ICD code is related to or unrelated to the medical record to be coded. Based on the coarse-screened ICD encoding, the encoding knowledge corresponding to the coarse-screened ICD encoding is obtained from the knowledge graph, specifically including: The knowledge graph is input into a graph neural network model to obtain the semantic vector representation of each candidate ICD encoding in the knowledge graph output by the graph neural network model; wherein, the graph neural network model can generate the semantic vector representation of a node based on the parent and child nodes and synonym information of a node in a given structure; The semantic vector representation of the candidate ICD code corresponding to the coarse-screen ICD code is used as the encoding knowledge of the coarse-screen ICD code.
Citation Information
Patent Citations
Disease diagnosis automatic coding method and device
CN111180060A
Electronic medical record ICD automatic coding method based on knowledge graph
CN111382272A