ICD coding method and device

Through the combination of graph neural network and knowledge graph, the correlation of ICD encoding is automatically determined, which solves the problem of inefficient relying on manual coding in the prior art, and realizes an efficient and accurate ICD encoding process.

CN119782955AActive Publication Date: 2025-04-08TSINGHUA UNIVERSITY
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411675318.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-04-08
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

In the prior art, the ICD encoding process requires a lot of time and depends on the medical background knowledge and proficiency of the coder, resulting in inefficiency.

Method used

Through a method based on graph neural network and knowledge graph, the similarity between the medical records to be encoded and the candidate ICD encoding code is determined, the coding knowledge of the coarse screen ICD encoding is obtained, and the coding correlation is judged using the pre-trained ICD encoding model to reduce the professional requirements for coding personnel.

Benefits of technology

It improves the efficiency and accuracy of ICD encoding, reduces the professional requirements for coders, can quickly adapt to the update of international disease classification, and reduces the cost of model retraining.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782955A_ABST
    Figure CN119782955A_ABST
Patent Text Reader

Abstract

The invention provides an ICD coding method and device, and relates to the technical field of artificial intelligence. The ICD coding method comprises the following steps: determining a medical record to be coded and candidate ICD codes of the medical record to be coded; obtaining the similarity between the to-be-coded medical record and each candidate ICD code based on the to-be-coded medical record and the candidate ICD codes, so as to obtain k coarse screening ICD codes of which the similarity ranks top k; obtaining coding knowledge corresponding to the coarse screening ICD code from a knowledge graph based on the coarse screening ICD code; inputting the to-be-coded medical record, the coarse screening ICD codes and the corresponding coding knowledge into an ICD coding model, and outputting an identification result of the coarse screening ICD codes; the ICD coding model is obtained by training based on a sample to-be-coded medical record, a sample coarse screening ICD code carrying a category label and corresponding sample coding knowledge; the identification result is used for identifying whether the coarse screening ICD code is related to or not related to the medical record to be coded, so that automatic ICD coding is realized, and the difficulty of ICD coding according to the medical record is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an ICD coding method and device. Background Art

[0002] The International Classification of Diseases (ICD) is an internationally accepted unified classification of various diseases developed by the World Health Organization (WHO). The International Classification of Diseases classifies diseases according to their characteristics and certain rules and represents them with codes. In clinical applications, the ICD coding task is a multi-label classification task. Coders need to analyze clinical medical information such as etiology, location, disease name, surgical operation, etc. based on the medical record text, obtain the relationship between different clinical medical information and the distribution of disease-related elements in the medical record, and determine multiple ICD codes related to the medical record. This process takes a long time and requires coders to have medical background knowledge and be proficient in coding rules. Summary of the invention

[0003] In view of the problems existing in the prior art, the present invention provides an ICD encoding method and device.

[0004] The present invention provides an ICD coding method, which determines a medical record to be coded and a candidate ICD code of the medical record to be coded; Based on the medical record to be coded and the candidate ICD codes, the similarity between the medical record to be coded and each of the candidate ICD codes is obtained to obtain k rough-screened ICD codes ranked top k in similarity; Based on the coarse-screened ICD code, obtaining coding knowledge corresponding to the coarse-screened ICD code from the knowledge graph; Input the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge into the ICD coding model, and output the recognition result of the rough screening ICD code; The ICD coding model is trained based on sample medical records to be coded, sample rough-screened ICD codes carrying category labels and their corresponding sample coding knowledge; the recognition result is used to identify whether the rough-screened ICD code is relevant or unrelated to the medical record to be coded.

[0005] According to an ICD coding method provided by the present invention, based on the rough screening ICD coding, the coding knowledge corresponding to the rough screening ICD coding is obtained from the knowledge graph, specifically including: The knowledge graph is input into the graph neural network model to obtain the semantic vector representation of each candidate ICD code in the knowledge graph 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 circulate and aggregate information on the sample knowledge graph; The semantic vector representation of the candidate ICD code corresponding to the coarse-screened ICD code is used as the coding knowledge of the coarse-screened ICD code.

[0006] According to an ICD encoding method provided by the present invention, masks are provided on some nodes and / or edges of the sample knowledge graph; 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, specifically including: Inputting the sample knowledge graph into an initial graph neural network model to obtain a predicted semantic vector representation of the mask in the sample knowledge graph output by the graph neural network model; The predicted semantic vector representation is compared with the corresponding nodes and / or edges in the sample knowledge graph to obtain a first contrast loss of the graph neural network model, and the parameters of the graph neural network model are adjusted based on the first contrast loss to obtain a trained graph neural network model.

[0007] According to an ICD coding method provided by the present invention, the ICD coding model is obtained by training based on sample medical records to be coded, sample rough screening ICD codes carrying category labels and their corresponding sample coding knowledge, specifically including: The sample medical record to be coded, the sample rough-screened ICD code with the category label and its corresponding sample coding knowledge are input into the ICD coding model to obtain the recognition result of the sample rough-screened ICD code; wherein the semantic vector representation of the candidate ICD code corresponding to the sample rough-screened ICD code is used as the coding knowledge of the sample rough-screened ICD code; The recognition result of the coarse-screened ICD code of the sample is compared with the category label of the coarse-screened ICD code of the sample to obtain a second contrast loss, and the parameters of the ICD coding model and the graph neural network model are adjusted based on the second contrast loss to obtain a trained ICD coding model.

[0008] According to an ICD coding method provided by the present invention, based on the medical record to be coded and the candidate ICD code, the similarity between the medical record to be coded and each of the candidate ICD codes is obtained to obtain k rough screening ICD codes ranked top k in similarity, specifically comprising: Inputting the medical record to be coded and the candidate ICD code into a coarse screening model, and obtaining the similarity between the medical record to be coded 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, k rough-screened ICD codes ranked top k in similarity are obtained.

[0009] According to an ICD coding method provided by the present invention, the step of acquiring coding knowledge corresponding to the rough screening ICD coding from a knowledge graph based on the rough screening 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.

[0010] According to an ICD coding method provided by the present invention, before dividing the coarse screening ICD codes into multiple batches, the method further includes: Randomly arrange the top k ICD codes ranked by similarity; The step of dividing the coarse screening ICD codes into multiple batches specifically includes: The k coarse-screened ICD codes with the top k similarity rankings after random arrangement are divided into multiple batches.

[0011] According to an ICD coding method provided by the present invention, the coarse screening ICD codes are divided into multiple batches, specifically comprising: The k coarse-screened ICD codes ranked top k in similarity are divided into multiple batches based on semantic similarity.

[0012] According to an ICD coding method provided by the present invention, the medical record to be coded, the rough screening ICD code and the corresponding coding knowledge are input into the ICD coding model, and the recognition result of the rough screening ICD code is output, which specifically includes: Inserting prediction markers corresponding to the coarse screening ICD codes; Generate an input template based on the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge, and the prediction marker; The input template is input into the ICD coding model, the output at the prediction mark is extracted, and a recognition result is generated; the output at the prediction mark is used to identify whether the rough screening ICD code is related or unrelated to the medical record to be coded.

[0013] The present invention also provides an ICD encoding device, comprising: A module for determining information to be coded, used to determine the medical record to be coded and the candidate ICD code of the medical record to be coded; A rough screening ICD coding module, used for obtaining the similarity between the medical record to be coded and each of the candidate ICD codes based on the medical record to be coded and the candidate ICD codes, so as to obtain k rough screening ICD codes ranked top k in similarity; A coding knowledge acquisition module, used for acquiring coding knowledge corresponding to the rough screening ICD code from a knowledge graph based on the rough screening ICD code; An identification module, used for inputting the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge into the ICD coding model, and outputting the identification result of the rough screening ICD code; The ICD coding model is trained based on sample medical records to be coded, sample rough-screened ICD codes carrying category labels and their corresponding sample coding knowledge; the recognition result is used to identify whether the rough-screened ICD code is relevant or unrelated to the medical record to be coded.

[0014] The ICD coding method and device provided by the present invention can obtain the similarity between the medical record to be coded and each ICD code in the candidate ICD codes based on the medical record to be coded and the candidate ICD codes after determining the medical record to be coded and the candidate ICD codes. After obtaining the top k ICD codes in similarity ranking as coarse-screened ICD codes based on the similarity between the medical record to be coded and each ICD code, it can be obtained whether the coarse-screened ICD code is related to the medical record to be coded through a pre-trained ICD coding model. There are no special requirements for coders, and the difficulty of ICD coding based on medical records can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 It is a flow chart of the ICD encoding method provided by the present invention.

[0017] Figure 2 It is one of the framework 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 framework schematic diagram of the ICD encoding method provided by the present invention.

[0020] Figure 5 This is the fourth framework schematic diagram of the ICD encoding method provided by the present invention.

[0021] Figure 6 It is a structural schematic diagram of the ICD encoding device provided by the present invention.

[0022] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Combine the following Figure 1-Figure 7 The ICD encoding method and device of the present invention are described.

[0025] Figure 1 It is a schematic diagram of the flow chart of the ICD encoding method provided by the present invention, such as Figure 1 As shown, the method includes: Step 101: determine the medical records to be coded and the candidate ICD codes of the medical records to be coded.

[0026] Medical records to be coded refer to medical records that need to be coded according to the International Classification of Diseases. ICD codes are codes corresponding to disease names in the International Classification of Diseases. For example, the ICD code for open-chest coronary angioplasty in ICD-9-CM is 36.0300.

[0027] The candidate ICD codes for the medical record to be coded are multiple ICD codes, and the ICD code corresponding to the medical record to be coded can be selected from the multiple ICD codes. The ICD-9-CM code includes disease codes and surgical codes, about 8922. Exemplarily, the candidate ICD code can be a complete ICD-9-CM code or a disease code in the ICD-9-CM code.

[0028] Exemplarily, medical records in which doctors have not entered clinical diagnoses according to coding principles can be determined as medical records to be coded, and diagnostic keywords in the medical records to be coded can be extracted, and candidate ICD codes for the medical records to be coded can be determined from preset ICD codes based on the diagnostic keywords. For example, if the preset ICD code is a complete ICD-9-CM code, and the diagnostic keywords extracted from the medical records to be coded include diagnostic keywords for the disease and diagnostic keywords for the surgery, then it can be determined that the candidate ICD code for the medical records to be coded is a complete ICD-9-CM code.

[0029] It is understandable 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 make further limitations on this.

[0030] Step 102: Based on the medical record to be coded and the candidate ICD codes, the similarity between the medical record to be coded and each of the candidate ICD codes is obtained to obtain k rough-screened ICD codes ranked top k in similarity.

[0031] Exemplarily, the similarity of each ICD code in the medical record to be coded and the candidate ICD code can be obtained based on the medical record to be coded and the candidate ICD code, and the Top-K codes with the highest similarity are selected to obtain the top k coarse-screened ICD codes with the top k similarities.

[0032] Step 103: Obtain coding knowledge corresponding to the coarse screening ICD code from the knowledge graph based on the coarse screening ICD code.

[0033] The knowledge graph includes a medical relationship graph 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. Exemplarily, the knowledge graph in this embodiment can be a knowledge graph with ICD codes as nodes and relationships between ICD codes as edges, which can also be called an ICD code knowledge graph, which can facilitate the acquisition of coding knowledge corresponding to coarse-screened ICD codes through the knowledge graph.

[0034] The knowledge graph can be an existing knowledge graph in the medical field or a pre-made knowledge graph. For example, a basic graph network framework can be built based on the hierarchical structure of the International Classification of Diseases itself, and relevant medical information graphs are inserted on the basis of the basic graph network framework. Furthermore, the Unified Medical Language System (UMLS) can be used to obtain synonyms of disease names, and the knowledge graph can be supplemented according to the synonyms of disease names.

[0035] Coding knowledge refers to the medical knowledge and medical information related to the rough ICD code extracted from the knowledge graph. Coding knowledge can be the medical knowledge and medical information of the node corresponding to the rough ICD code in the knowledge graph, or it can be the medical knowledge and medical information related to the node corresponding to the rough ICD code in the knowledge graph and the parent node and child node of the node.

[0036] Step 104: input the medical record to be coded, the rough-screened ICD code and its corresponding coding knowledge into the ICD coding model, and output the recognition result of the rough-screened ICD code.

[0037] The ICD coding model is trained based on sample medical records to be coded, sample rough-screened ICD codes carrying category labels and their corresponding sample coding knowledge; the recognition result is used to identify whether the rough-screened ICD code is relevant or unrelated to the medical record to be coded.

[0038] The category label of the sample rough screening ICD code can be used to identify whether the sample rough screening ICD code can be used for the sample medical record to be coded. Exemplarily, the category label of the sample rough screening ICD code may include three categories, wherein the first category label is used to indicate that the sample rough screening ICD code is positively correlated with the sample medical record to be coded, the second category label is used to indicate that the sample rough screening ICD code is not correlated with the sample medical record to be coded, and the third category label is used to indicate that the sample rough screening ICD code is negatively correlated with the sample medical record to be coded.

[0039] The ICD coding method provided by the embodiment of the present invention can obtain the similarity between the medical record to be coded and each ICD code in the candidate ICD codes based on the medical record to be coded and the candidate ICD codes after determining the medical record to be coded and the candidate ICD codes. After obtaining the top k ICD codes ranked in similarity as coarse-screened ICD codes based on the similarity between the medical record to be coded and each ICD code, it can obtain whether the coarse-screened ICD code is related to the medical record to be coded through a pre-trained ICD coding model. There are no special requirements for coders, and the difficulty of ICD coding based on medical records can be reduced.

[0040] Moreover, the ICD coding method provided by the embodiment of the present invention can enhance the understanding of the rough screening ICD coding and improve the accuracy of judging whether the medical record to be coded is positively correlated with the rough screening ICD coding by acquiring the coding knowledge corresponding to the rough screening ICD coding from the knowledge graph.

[0041] Based on the above embodiment, obtaining the coding knowledge corresponding to the rough screening ICD code from the knowledge graph based on the rough screening ICD code specifically includes: The knowledge graph is input into the graph neural network model to obtain the semantic vector representation of each candidate ICD code in the knowledge graph 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 circulate and aggregate information on the sample knowledge graph; The semantic vector representation of the candidate ICD code corresponding to the coarse-screened ICD code is used as the coding knowledge of the coarse-screened ICD code.

[0042] The semantic vector representation of each candidate ICD code can also be called the semantic identifier of each candidate ICD code, which is the 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 about the ancestor, sibling, and child codes of the code, code descriptions, synonyms of the code, or related medical terms and other information in the knowledge graph.

[0043] As mentioned above, 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 role of the sample knowledge graph is mainly to train the graph neural network model to generate a semantic vector representation of a node based on the parent and child nodes, synonym information, etc. of a node in a given structure. In this way, when the structure of the ICD coding knowledge graph changes, the graph neural network or the graph neural network adjusted based on a small number of samples can still circulate and aggregate information on the ICD coding knowledge graph after the structure changes, and more accurately obtain the semantic vector representation of each node in the ICD coding knowledge graph after the structure changes.

[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 newly added disease classifications and revised medical terms, to expand and update the knowledge graph, so that the knowledge graph is always kept up to date, so as to adapt to the rapid development and continuous changes in the medical field and reflect the latest medical research results and changes in clinical practice.

[0046] In this embodiment, the graph neural network model can be trained through different sample knowledge graphs, so that the graph neural network model can deeply understand the structure of the knowledge graph, enhance the generalization ability of the graph neural network model, so that when the ICD coding knowledge graph changes, it still has high accuracy and efficiency, and there is no need to retrain the graph neural network model, which can reduce the cost of retraining the ICD coding model due to version migration of the International Classification of Diseases.

[0047] The relationship between nodes and edges in the sample coding structure knowledge may be relatively complex, and there may be omissions in the coding knowledge corresponding to the ICD codes selected by the coders from the sample coding structure knowledge. In this embodiment, the hierarchical relationship and semantic association between codes are automatically captured and learned through the graph neural network model, which can provide more complete coding knowledge corresponding to the rough screening 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 rough screening ICD codes.

[0048] Information flow refers to the graph neural network model that enables the target node to collect information from adjacent nodes through iterative operations, so that the node's features are widely spread in the basic graph network framework. Information aggregation refers to the graph neural network model that enables the target node to collect information from adjacent nodes through iterative operations, and then integrates the information to integrate the features of each related node to obtain the updated features of the target node.

[0049] When performing information circulation and information aggregation and capturing the hierarchical relationship and association relationship between nodes, the iterative formula for each layer of each node is as follows: in, It is i Node features of nodes; l It is l layer; is a learnable parameter; is the parent node; It is i Based on any of the above embodiments, some nodes and / or edges of the sample knowledge graph are provided with masks; 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, specifically including: Inputting the sample knowledge graph into an initial graph neural network model to obtain a predicted semantic vector representation of the mask in the sample knowledge graph output by the graph neural network model; The predicted semantic vector representation is compared with the corresponding nodes and / or edges in the sample knowledge graph to obtain a first contrast loss of the graph neural network model, and the parameters of the graph neural network model are adjusted based on the first contrast loss to obtain a trained graph neural network model.

[0050] Among them, the initial graph neural network model is a randomly initialized model.

[0051] Exemplarily, a mask can be added to the sample knowledge graph through the mask technology to hide some nodes and / or edges in the sample knowledge graph. The first contrast 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] Exemplarily, the first comparative loss of the predicted knowledge graph and the sample knowledge graph can be determined by calculating the cross entropy loss, and the parameters of the initial neural network model of the graph can be adjusted by the back propagation algorithm until the initial neural network model converges or reaches a predetermined number of training rounds to obtain a trained graph neural network model.

[0053] In this embodiment, by hiding certain nodes and edges in the sample encoding structure knowledge and allowing the pre-trained graph neural network model to infer the missing information by itself, the pre-trained graph neural network model can better understand the structure of the knowledge graph and 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 obtained by training based on sample medical records to be coded, sample rough screening ICD codes with category labels and their corresponding sample coding knowledge, specifically including: The sample medical record to be coded, the sample rough-screened ICD code with the category label and its corresponding sample coding knowledge are input into the ICD coding model to obtain the recognition result of the sample rough-screened ICD code; wherein the semantic vector representation of the candidate ICD code corresponding to the sample rough-screened ICD code is used as the coding knowledge of the sample rough-screened ICD code; The recognition result of the coarse-screened ICD code of the sample is compared with the category label of the coarse-screened ICD code of the sample to obtain a second contrast loss, and the parameters of the ICD coding model and the graph neural network model are adjusted based on the second contrast loss to obtain a trained ICD coding model.

[0055] Among them, the second contrast loss is the difference between the recognition result of the coarse ICD code and the category label of the sample coarse ICD code.

[0056] Exemplarily, 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 is determined based on the sample rough screening ICD code to obtain the semantic vector representation of the corresponding candidate ICD code as the coding knowledge of the sample rough screening ICD code.

[0057] Then, the sample medical records to be coded, the sample rough-screened ICD codes with category labels and their corresponding sample coding knowledge are input into the ICD coding model to obtain the recognition results of the predicted rough-screened ICD codes output by the ICD coding model, so as to adjust the parameters of the ICD coding model and fine-tune 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, obtaining the similarity between the medical record to be coded and each of the candidate ICD codes based on the medical record to be coded and the candidate ICD codes to obtain the top k rough screening ICD codes ranked by the similarity specifically includes: Inputting the medical record to be coded and the candidate ICD code into a coarse screening model, and obtaining the similarity between the medical record to be coded 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, k rough-screened ICD codes ranked top k in similarity 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. Exemplarily, the category label of the sample ICD code can be positively correlated or negatively correlated.

[0060] The initial model of the rough screening model can be a pre-trained model in the medical field, or it can be said that the existing pre-trained model in the medical field is used as the basis. The pre-trained model in the medical field is a model that has been pre-trained with a large amount of medical text and has the ability to understand medical language. In this way, the trained rough screening module can understand complex medical texts, consider the relationship between diseases, the relationship between diseases and symptoms, and the relationship between diseases and surgical treatments, and other background knowledge in the medical field, rather than focusing only on the surface features of the medical record text to be coded. When the information in the medical record to be coded is expressed very differently from the corresponding information in the standard ICD code, the accuracy of the rough screening model's understanding of the medical record information to be coded is improved, and the accuracy of the rough screening model's reasoning on the medical record information to be coded is enhanced.

[0061] Among them, the positive sample is the correct ICD code or the positively correlated ICD code corresponding to the sample medical record, and the negative sample is the incorrect ICD code or the negatively correlated or irrelevant ICD code corresponding to the sample medical record.

[0062] like Figure 2As shown, the coarse screening model includes a sample encoder and a medical record encoder. In the process of training the initial model, the sample medical record and a set of positive and negative samples can be input into the coarse screening model. After the dual encoders of the sample and the medical record, the implicit representation of the positive and negative samples and the medical record is obtained. Furthermore, by calculating the contrast loss contrast optimization, the coarse screening model can shorten the distance between the sample medical record and the positive sample or the correct ICD code in the feature space, and at the same time push the distance between the sample medical record and the negative sample or the wrong ICD code, thereby enhancing the ability of the coarse screening model to distinguish between the correct ICD code and the wrong ICD code.

[0063] For example, after obtaining the similarity between the medical record to be coded output by the rough screening model and each candidate ICD code, they can be sorted in descending order based on the similarity to obtain the top k rough screening ICD codes with the highest similarity ranking. The specific value of k can be determined based on the actual needs such as the available computing resources and the accuracy of the ICD code, and this application does not make any further restrictions on this.

[0064] In this embodiment, the similarity between the medical record to be encoded and each of the candidate ICD codes is obtained through a coarse screening model, and k coarse screening ICD codes are selected from the candidate ICD codes based on the similarity ranking, which can significantly reduce the amount of calculation and complexity of the subsequent processing stage.

[0065] In some embodiments, the sample ICD codes also include synonyms or related medical terms of the ICD codes, so as to enhance the trained coarse screening model's recognition of the semantic connection between medical records and codes, and optimize the coarse screening model's understanding of the relationship between different medical concepts.

[0066] Based on any of the above embodiments, the acquiring coding knowledge corresponding to the rough screening ICD code from the knowledge graph based on the rough screening ICD code 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] In order to eliminate potential sequence deviations, based on any of the above embodiments, before dividing the rough screening ICD codes into multiple batches, the method further includes: randomly arranging the top k rough screening ICD codes ranked in similarity.

[0068] Exemplarily, a random arrangement function may be pre-defined, and after obtaining the top k coarse-screened ICD codes ranked by similarity, the random arrangement function may be called to randomly arrange the k coarse-screened ICD codes.

[0069] The input of the ICD coding model can be multiple ICD codes. In order 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 including: k coarse-screened ICD codes ranked in the top k positions of the similarity after random arrangement are divided into multiple batches. In this way, the number of coarse-screened ICD codes to be processed by the ICD coding model at one time can be reduced, and the confusion rate of the ICD coding model during reasoning can be reduced, thereby improving the accuracy of the coarse-screened ICD code recognition results of the ICD coding model.

[0070] For example, k rough screening ICD codes can be divided into N batches, each batch containing K / N codes. The specific number of batches can be determined according to actual needs such as available computing resources, and this application does not make further restrictions on this.

[0071] In order to improve the effectiveness of the ICD coding model's recognition results for ICD codes with subtle differences, based on any of the above embodiments, the coarse-screened ICD codes are divided into multiple batches, specifically including: dividing the k coarse-screened ICD codes ranked in the top k positions of similarity into multiple batches based on semantic similarity. In this way, the ICD coding model can compare and contrast the coarse-screened ICD codes in each batch, thereby improving the effectiveness of the ICD coding model's recognition results for ICD codes with subtle differences.

[0072] Based on any of the above embodiments, the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge are input into the ICD coding model, and the recognition result of the rough screening ICD code is output, which specifically includes: Inserting prediction markers corresponding to the coarse screening ICD codes; Generate an input template based on the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge, and the prediction marker; The input template is input into the ICD coding model, and the output at the prediction mark is extracted to generate a recognition result; the output at the prediction mark is used to identify whether the rough screening ICD code is related or unrelated to the medical record to be coded.

[0073] For example, Figure 3 As shown in , the coding knowledge output by the graph neural network model and its corresponding coarse ICD coding can be concatenated first, which helps the ICD coding model understand the contextual meaning of the ICD coding. Then, the [mask] tag is inserted after each group of coarse ICD coding and its coding knowledge, as shown in Figure 4 These markers are used to indicate the ICD coding model in which areas to generate category labels to fill in the missing information. Finally, the original medical record is added to generate the input template.

[0074] In some embodiments, the category label is Yes or No, "Yes" indicates that the rough-screened ICD code is related to the medical record to be coded, and "No" indicates that the rough-screened ICD code is not related to the medical record to be coded. Specifically, a mapper may be provided at the output end of the ICD coding model, and the original output probability distribution of the model is mapped to a discrete category label by the mapper to convert the output of the ICD coding model into a specific "Yes" or "No".

[0075] In one embodiment, the output at the prediction tag may include a correlation and its confidence or an irrelevance and its confidence.

[0076] In some embodiments, the encoded knowledge output by the graph neural network model can be converted and mapped into the input space of the medical records to be encoded and the predicted identification representation through a mapper composed of a multi-layer perceptron to ensure the compatibility of the encoded knowledge features.

[0077] In some embodiments, the ICD coding model may include a batch processing module and a centralized reasoning module.

[0078] After receiving the medical records to be coded, the coarse-screened ICD codes and their corresponding coding knowledge input in batches by the coarse-screened model and the graph neural network model, the ICD coding model can generate preliminary analysis results through the batch processing module, and input the independent analysis results into the centralized reasoning module. The analysis results may include the basic features of each extracted coarse-screened ICD code and the degree of match between each coarse-screened ICD code and the medical record content.

[0079] The centralized reasoning module can integrate the analysis results of all batches of rough-screened ICD codes, perform further reasoning to identify the most representative and relevant ICD codes, and obtain a comprehensive and verified identification result.

[0080] In this embodiment, by generating an input template, while providing an actual clinical scenario, the ICD coding model's understanding and association of the specific content of the medical record to be coded can be enhanced, thereby improving the accuracy of judging whether the medical record to be coded is positively correlated with the rough-screened ICD code.

[0081] like Figure 5 As shown, in order to specifically illustrate the function of the ICD encoding method provided by this embodiment, a specific example is provided below.

[0082] Determining a medical record to be coded and a candidate ICD code for the medical record to be coded; The medical record to be coded and the candidate ICD code are input into a rough screening model to obtain the similarity between the medical record to be coded and each of the candidate ICD codes output by the rough screening model; the rough 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, k rough screening ICD codes ranked top k in similarity are obtained; The k rough-screened ICD codes ranked in the top k similarities are randomly arranged; the k rough-screened ICD codes ranked in the top k similarities are divided into multiple batches based on semantic similarity; based on the rough-screened ICD codes in each batch, the coding knowledge corresponding to the rough-screened ICD codes is obtained from the knowledge graph; the rough-screened ICD codes are input into the graph neural network model in batches; After the coarse-screened ICD code 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 code to output corresponding coding knowledge; wherein, during the training process of the graph neural network model, some nodes and / or edges are hidden in the knowledge graph; the contrast loss of the graph neural network model can be obtained by comparing the predicted coding knowledge and the sample coding knowledge, and the parameters of the graph neural network model can be adjusted based on the contrast loss; Insert a prediction tag corresponding to the rough screening ICD code and its corresponding coding knowledge; generate an input template based on the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge and the prediction tag; input the input template into the ICD coding model, output the category label, fill the category label into the prediction tag, and generate a recognition result; the category label is used to identify whether the rough screening ICD code is related or unrelated to the medical record to be coded.

[0083] The ICD encoding method provided in the embodiment of the present invention performs well in terms of macro-average, micro-average F1, AUC and other indicators on the MIMIC-III-Full and MIMIC-III-50 data sets, and can effectively generate ICD codes for medical records to be encoded; the encoding knowledge corresponding to the coarse-screened ICD codes is obtained through the knowledge graph, and it performs well in scenarios with few samples and difficult samples, and has good processing capabilities for low-frequency ICD codes, and has good differentiation capabilities and detail resolution capabilities for more difficult brother codes; the knowledge graph supports the insertion of new ICD codes and new medical-related knowledge, etc. For codes that have never been seen, it can quickly adapt to the update of ICD codes, reduce the cost of retraining the model, and perform version migration of the International Classification of Diseases at the lowest 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 referenced to each other.

[0085] Figure 6 : is a schematic diagram of the structure of the ICD encoding device provided by the present invention, such as Figure 6 As shown, the device comprises: A module for determining information to be coded, used to determine the medical record to be coded and the candidate ICD code of the medical record to be coded; A rough screening ICD coding module, used for obtaining the similarity between the medical record to be coded and each of the candidate ICD codes based on the medical record to be coded and the candidate ICD codes, so as to obtain k rough screening ICD codes ranked top k in similarity; A coding knowledge acquisition module, used for acquiring coding knowledge corresponding to the rough screening ICD code from a knowledge graph based on the rough screening ICD code; An identification module, used for inputting the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge into the ICD coding model, and outputting the identification result of the rough screening ICD code; The ICD coding model is trained based on sample medical records to be coded, sample rough-screened ICD codes carrying category labels and their corresponding sample coding knowledge; the recognition result is used to identify whether the rough-screened ICD code is relevant or unrelated to the medical record to be coded.

[0086] Based on any of the above embodiments, the coding knowledge acquisition module is specifically used to: Inputting the coarse-screened ICD code into a graph neural network model to obtain coding knowledge corresponding to the coarse-screened ICD code output by the graph neural network model; The graph neural network model is trained based on sample ICD codes and sample coding knowledge corresponding to the sample ICD codes; the graph neural network model is used to perform information circulation and information aggregation on the knowledge graph based on the coarse screening ICD codes.

[0087] Based on any of the above embodiments, the coding knowledge acquisition module is further used to: Input the sample ICD code into the graph neural network model, so that the graph neural network model performs information circulation and information aggregation in the knowledge graph based on the sample ICD code, and outputs the prediction coding knowledge corresponding to the sample ICD code; wherein some nodes and / or edges are hidden in the knowledge graph; The predictive coding knowledge and the sample coding knowledge are compared to obtain a contrast loss of the graph neural network model, and the parameters of the graph neural network model are adjusted based on the contrast loss.

[0088] Based on any of the above embodiments, the rough screening ICD coding module is specifically used for: Inputting the medical record to be coded and the candidate ICD code into a coarse screening model, and obtaining the similarity between the medical record to be coded 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, k rough-screened ICD codes ranked top k in similarity are obtained.

[0089] Based on any of the above embodiments, the coding knowledge acquisition module is further used to: 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 rough-screened ICD codes with the top k similarity rankings; The coding knowledge acquisition module is specifically used to divide the k coarse-screened ICD codes ranked in the top k positions in similarity after random arrangement into multiple batches.

[0091] Based on any of the above embodiments, the coding knowledge acquisition module is further used to divide the k coarse-screened ICD codes ranked top k in similarity into multiple batches based on semantic similarity.

[0092] Based on any of the above embodiments, the identification module is specifically used for: Insert prediction markers corresponding to the rough screening ICD codes and their corresponding coding knowledge; Generate an input template based on the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge, and the prediction marker; The input template is input into the ICD coding model, a category label is output, and the category label is filled into the prediction mark to generate a recognition result; the category label is used to identify whether the coarse-screened ICD code is related or unrelated to the medical record to be coded.

[0093] Figure 7 An example of a structural diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor (processor) 710 , a communication interface (Communications Interface) 720 , a memory (memory) 730 and a communication bus 740 , wherein the processor 710 , the communication interface 720 , and the memory 730 communicate with each other through the communication bus 740 . The processor 710 can call the logic instructions in the memory 730 to execute the ICD coding method, which includes: determining the medical record to be coded and the candidate ICD codes of the medical record to be coded; based on the medical record to be coded and the candidate ICD codes, obtaining the similarity between the medical record to be coded and each of the candidate ICD codes to obtain the top k coarse-screened ICD codes ranked in the similarity; based on the coarse-screened ICD codes, obtaining the coding knowledge corresponding to the coarse-screened ICD codes from the knowledge graph; inputting the medical record to be coded, the coarse-screened ICD codes and their corresponding coding knowledge into the ICD coding model, and outputting the recognition result of the coarse-screened ICD codes; the ICD coding model is trained based on sample medical records to be coded, sample coarse-screened ICD codes carrying category labels and their corresponding sample coding knowledge; the recognition result is used to identify whether the coarse-screened ICD code is related or unrelated to the medical record to be coded.

[0094] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0095] On the other hand, the present invention also provides a computer program product, which includes a computer program, which 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 coding method provided by the above methods, which method includes: determining the medical record to be coded and the candidate ICD codes of the medical record to be coded; based on the medical record to be coded and the candidate ICD codes, obtaining the similarity between the medical record to be coded and each of the candidate ICD codes to obtain the top k coarse-screened ICD codes ranked in the similarity; based on the coarse-screened ICD codes, obtaining the coding knowledge corresponding to the coarse-screened ICD codes from the knowledge graph; inputting the medical record to be coded, the coarse-screened ICD codes and their corresponding coding knowledge into an ICD coding model, and outputting the recognition result of the coarse-screened ICD codes; the ICD coding model is trained based on sample medical records to be coded, sample coarse-screened ICD codes carrying category labels and their corresponding sample coding knowledge; the recognition result is used to identify whether the coarse-screened ICD code is related or unrelated to the medical record to be coded.

[0096] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the ICD encoding method provided by the above-mentioned methods, the method comprising: determining the medical record to be encoded and the candidate ICD codes of the medical record to be encoded; obtaining the similarity between the medical record to be encoded and each of the candidate ICD codes based on the medical record to be encoded and the candidate ICD codes, so as to obtain the top k coarse-screened ICD codes ranked in the similarity; obtaining the encoding knowledge corresponding to the coarse-screened ICD code from a knowledge graph based on the coarse-screened ICD code; inputting the medical record to be encoded, the coarse-screened ICD code and the corresponding encoding knowledge into an ICD encoding model, and outputting the recognition result of the coarse-screened ICD code; the ICD encoding model is trained based on sample medical records to be encoded, sample coarse-screened ICD codes carrying category labels and the corresponding sample encoding knowledge; the recognition result is used to identify whether the coarse-screened ICD code is relevant or irrelevant to the medical record to be encoded.

[0097] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment 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, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An ICD coding method, characterized in that: include: Determining a medical record to be coded and a candidate ICD code for the medical record to be coded; Based on the medical record to be coded and the candidate ICD codes, the similarity between the medical record to be coded and each of the candidate ICD codes is obtained to obtain k rough-screened ICD codes ranked top k in similarity; Based on the coarse-screened ICD code, obtaining coding knowledge corresponding to the coarse-screened ICD code from the knowledge graph; Input the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge into the ICD coding model, and output the recognition result of the rough screening ICD code; The ICD coding model is trained based on sample medical records to be coded, sample rough-screened ICD codes carrying category labels and their corresponding sample coding knowledge; the recognition result is used to identify whether the rough-screened ICD code is relevant or unrelated to the medical record to be coded.

2. The ICD coding method according to claim 1, characterized in that: Based on the coarse-screened ICD code, the coding knowledge corresponding to the coarse-screened ICD code is obtained from the knowledge graph, specifically including: The knowledge graph is input into the graph neural network model to obtain the semantic vector representation of each candidate ICD code in the knowledge graph 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 circulate and aggregate information on the sample knowledge graph; The semantic vector representation of the candidate ICD code corresponding to the coarse-screened ICD code is used as the coding knowledge of the coarse-screened ICD code.

3. The ICD coding method according to claim 2, characterized in that: Masks are set on some nodes and / or edges of the sample knowledge graph; 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, specifically including: Inputting the sample knowledge graph into an initial graph neural network model to obtain a predicted semantic vector representation of the mask in the sample knowledge graph output by the graph neural network model; The predicted semantic vector representation is compared with the corresponding nodes and / or edges in the sample knowledge graph to obtain a first contrast loss of the graph neural network model, and the parameters of the graph neural network model are adjusted based on the first contrast 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 obtained by training based on the sample medical records to be coded, the sample rough screening ICD codes with category labels and their corresponding sample coding knowledge, specifically including: The sample medical record to be coded, the sample rough-screened ICD code with the category label and its corresponding sample coding knowledge are input into the ICD coding model to obtain the recognition result of the sample rough-screened ICD code; wherein the semantic vector representation of the candidate ICD code corresponding to the sample rough-screened ICD code is used as the coding knowledge of the sample rough-screened ICD code; The recognition result of the coarse-screened ICD code of the sample is compared with the category label of the coarse-screened ICD code of the sample to obtain a second contrast loss, and the parameters of the ICD coding model and the graph neural network model are adjusted based on the second contrast loss to obtain a trained ICD coding 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 of the candidate ICD codes is obtained to obtain k rough-screened ICD codes ranked top k in similarity, specifically including: Inputting the medical record to be coded and the candidate ICD code into a coarse screening model, and obtaining the similarity between the medical record to be coded 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, k rough-screened ICD codes ranked top k in similarity are obtained.

6. The ICD encoding method according to claim 1, characterized in that: The acquiring coding knowledge corresponding to the rough screening ICD code from the knowledge graph based on the rough screening ICD code 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 coding method according to claim 6, characterized in that: Before dividing the coarse screening ICD codes into multiple batches, the method further includes: Randomly arrange the top k ICD codes ranked by similarity; The step of dividing the coarse screening ICD codes into multiple batches specifically includes: The k coarse-screened ICD codes with the top k similarity rankings after random arrangement are divided into multiple batches.

8. The ICD coding method according to claim 6 or 7, characterized in that: The step of dividing the coarse screening ICD codes into multiple batches specifically includes: The k rough-screened ICD codes ranked top k in similarity are divided into multiple batches based on semantic similarity.

9. The ICD encoding method according to claim 1, characterized in that: Inputting the medical record to be coded, the rough screening ICD code and the corresponding coding knowledge into the ICD coding model, and outputting the recognition result of the rough screening ICD code, specifically includes: Inserting prediction markers corresponding to the coarse screening ICD codes; Generate an input template based on the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge, and the prediction marker; The input template is input into the ICD coding model, the output at the prediction mark is extracted, and a recognition result is generated; the output at the prediction mark is used to identify whether the rough screening ICD code is related or unrelated to the medical record to be coded.

10. An ICD encoding device, characterized in that: include: A module for determining information to be coded, used to determine the medical record to be coded and the candidate ICD code of the medical record to be coded; A rough screening ICD coding module, used for obtaining the similarity between the medical record to be coded and each of the candidate ICD codes based on the medical record to be coded and the candidate ICD codes, so as to obtain k rough screening ICD codes ranked top k in similarity; A coding knowledge acquisition module, used for acquiring coding knowledge corresponding to the rough screening ICD code from a knowledge graph based on the rough screening ICD code; An identification module, used for inputting the medical record to be coded, the rough screening ICD code and its corresponding coding knowledge into the ICD coding model, and outputting the identification result of the rough screening ICD code; The ICD coding model is trained based on sample medical records to be coded, sample rough-screened ICD codes carrying category labels and their corresponding sample coding knowledge; the recognition result is used to identify whether the rough-screened ICD code is relevant or unrelated to the medical record to be coded.

Citation Information

Patent Citations

  • Disease sorting coding method and system based on deep learning, equipment and medium

    CN110491465A

  • Automatic coding method and device based on retrieval and deep learning

    CN111026841A

  • Disease diagnosis automatic coding method and device

    CN111180060A

  • Electronic medical record ICD automatic coding method based on knowledge graph

    CN111382272A

  • ICD encoding method and device, electronic equipment and storage medium

    CN112183026A