Automatic ICD coding method and system based on hierarchical feature optimization and prediction correction
The automatic ICD coding method based on hierarchical feature optimization and predictive correction solves the problems of low efficiency and low accuracy in the existing ICD coding system, realizes efficient and accurate ICD coding, and improves the quality of medical services and data management capabilities.
Patent Information
- Application Number
- CN202411694167.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The existing ICD coding system has low coding efficiency and accuracy due to the large number of codes, insufficient coder training, and noise and complex relationships in the coding process, making it difficult to meet the needs of efficient management of medical data.
An automatic ICD encoding method based on hierarchical feature optimization and prediction correction is adopted. The electronic medical record text is processed through a cascaded convolutional network. Synonym fusion attention and masked autoencoder prediction correction modules are introduced to optimize the encoding process, capture key information and correct the encoding relationship.
It improves the accuracy and efficiency of ICD coding, reduces manual intervention, improves the quality of medical services, provides efficient candidates for medical coding, and supports the secondary application of medical data.
Smart Images

Figure CN119598976B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing technology, and in particular to an automatic ICD encoding method and system based on hierarchical feature optimization and prediction correction. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] As people place increasing emphasis on their health and the aging population becomes increasingly prevalent, the existing healthcare system is under increasing pressure. With the advancement of informatization from the last century to the present, electronic medical records have emerged. At the same time, to facilitate analysis, the World Health Organization developed the International Classification of Diseases (ICD). It comprehensively converts tens of thousands of diseases and disease combinations into codes consisting of numbers and letters. ICD coding can connect different regions and hospitals, enabling the sharing of medical data and promoting the mining and refined management of medical information. The quality of ICD coding directly impacts the quality of Diagnosis Related Groups (DRGs), which in turn influences medical payments, medical insurance reimbursement, and the scheduling of treatment processes.
[0004] Currently, ICD coding is typically performed by professional coders within hospitals. However, the currently used ICD-10 (International Classification of Diseases, 10th Revision) coding system contains approximately 71,000 different codes. This large number makes the coding process time-consuming, error-prone, and costly. Furthermore, insufficient coder training and a shortage of specialized talent further exacerbate coding quality issues. Studies have shown that the accuracy rate of manual coding is only 71%, and many small and medium-sized hospitals do not even have qualified coders. In short, the current ICD coding workload and difficulty are seriously mismatched with the number and quality of coders. Therefore, developing an automated and highly accurate medical coding system would not only help improve the efficiency and quality of medical services, but also effectively reduce medical and labor costs, possessing broad application value.
[0005] With the advancement of artificial intelligence and natural language processing technologies, automated medical coding has garnered widespread attention from researchers. Numerous studies have been proposed for automated coding, primarily leveraging deep learning methods to improve coding accuracy by capturing deep semantic representations of text data. However, the field of automated ICD coding currently faces several challenges. First, electronic medical record text is often lengthy and contains a significant amount of noise. Furthermore, ICD code definitions are often abstract, often described in a generalized manner to accommodate diverse case scenarios. This results in a fragmented and sparse representation of key coding information. Second, due to individual physician writing habits and non-standard expressions, electronic medical records often contain numerous abbreviations, synonyms, and even typos, all of which add to the noise level of the text. Third, the ICD coding system has a complex hierarchical structure and inherent relationships, such as parent-child, sibling, and co-occurrence relationships. These relationships contain a wealth of medical knowledge but also increase the difficulty of the coding task. For example, some diseases often occur together, and their corresponding ICD codes often appear together, such as the causal relationship between E78.200 (mixed hyperlipidemia) and I10.x00 (hypertension). Some diseases tend not to occur at the same time, such as two codes belonging to the same parent category are not usually assigned to the same patient. Despite the complex relationships between ICD codes, the currently used automatic coding models only make independent binary predictions for different codes when predicting codes. In summary, existing methods do not effectively target lengthy medical records. At the same time, existing methods ignore the complex relationships between codes during the prediction process, making it difficult to achieve satisfactory coding results. Summary of the Invention
[0006] In order to overcome the shortcomings of the above-mentioned existing technologies, the present invention provides an automatic ICD coding method and system based on hierarchical feature optimization and predictive correction. By using natural language processing technology to solve the automatic ICD coding problem, the present invention aims to assign corresponding ICD codes to given electronic medical record texts to improve coding efficiency, and enhance coding accuracy and medical service quality.
[0007] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0008] In a first aspect, the present invention provides an automatic ICD encoding method based on hierarchical feature optimization and prediction correction, comprising:
[0009] Obtain the current electronic medical record text, input the electronic medical record text into a pre-trained automatic ICD encoding model for encoding, and obtain the corresponding ICD code;
[0010] The automatic ICD coding model includes a text representation module, a coding representation module, a synonym fusion attention module, an initial prediction module and a prediction correction module connected in sequence;
[0011] The text representation module receives the electronic medical record text, embeds, represents, optimizes and encodes it, obtains a deep semantic representation of the electronic medical record text and inputs it into the synonym fusion attention module; the coded representation module searches for synonyms based on all ICD codes and extracts their semantic representations to obtain coded synonym semantic representations and inputs them into the synonym fusion attention module;
[0012] The synonym fusion attention module performs semantic interaction and fusion on the deep semantic representation of the electronic medical record text and the encoded synonym semantic representation to obtain the encoded fusion text representation and input it into the initial prediction module, and also obtains the encoded fusion representation based on the encoded synonym semantic representation and inputs it into the initial prediction module;
[0013] The initial prediction module obtains an initial prediction result based on the encoded fusion text representation and the similarity score of the encoded fusion representation, and inputs the similarity score and the initial prediction result into the prediction correction module;
[0014] The prediction correction module obtains a candidate code set and its corresponding original prediction score based on the similarity score and the initial prediction result, inputs the candidate code set into a pre-trained masked autoencoder, and outputs the reordering score of the candidate code set; obtains a comprehensive score based on the reordering score and the original prediction score, and then obtains the final predicted ICD code.
[0015] A further technical solution is that the text representation module includes Word2Vec, a hierarchical feature optimization submodule and BiLSTM connected in sequence. The pre-trained Word2Vec is used to obtain the embedded representation of the electronic medical record text, and then the hierarchical feature optimization submodule is used to optimize the embedded representation, and then the optimized embedded representation is encoded using BiLSTM to obtain a deep semantic representation of the electronic medical record text.
[0016] A further technical solution is that the hierarchical feature optimization submodule includes a downsampling module, a smoothing sampling module and an upsampling module. For the embedded representation of the electronic medical record text, high-level abstract features are first extracted through two layers of downsampling, then the consistency of the features is further enhanced through a single layer of smoothing sampling, and finally the original feature dimension is restored through two layers of upsampling. The embedded representation of the electronic medical record text is combined with the features after two upsamplings by an element-by-element addition method to obtain an optimized embedded representation.
[0017] A further technical solution is that the synonym fusion attention module performs semantic interaction and fusion on the deep semantic representation of the electronic medical record text and the encoded synonym semantic representation as follows: the encoded synonym semantic representation is used as the query vector of multi-head attention, the deep semantic representation of the electronic medical record text is divided into segments with the same number of attention heads, and the segments are used as key vectors to perform multi-head attention to obtain the encoded fusion text representation.
[0018] A further technical solution is that the initial prediction module obtains the initial predicted ICD code based on the similarity score of the encoded fusion text representation and the encoded fusion representation: the similarity score of the encoded fusion text representation and the encoded fusion representation is calculated using a double affine transformation, and the initial predicted ICD code is obtained based on the similarity score using a dynamic threshold calculation method.
[0019] A further technical solution is to obtain a candidate coding set based on the similarity score as follows: using the similarity score to generate multiple most likely label combinations, identifying the most uncertain prediction position, keeping the prediction of other certain positions unchanged, and then "flipping" the initial prediction results of these uncertain positions, and finally selecting multiple label combinations with the highest probability as the candidate coding set.
[0020] As a further technical solution, the masked autoencoder adopts a multi-layer perception mechanism to estimate the joint probability of the coding combination in the candidate coding set in an autoregressive decomposition manner.
[0021] In a second aspect, the present invention provides an automatic ICD coding system based on hierarchical feature optimization and prediction correction, comprising:
[0022] A data acquisition module is configured to: acquire the current electronic medical record text;
[0023] A coding prediction module is configured to: input the electronic medical record text into a pre-trained automatic ICD coding model for coding to obtain a corresponding ICD code;
[0024] The automatic ICD coding model includes a text representation module, a coding representation module, a synonym fusion attention module, an initial prediction module and a prediction correction module connected in sequence;
[0025] The text representation module receives the electronic medical record text, embeds, represents, optimizes and encodes it, obtains a deep semantic representation of the electronic medical record text and inputs it into the synonym fusion attention module; the coded representation module searches for synonyms based on all ICD codes and extracts their semantic representations to obtain coded synonym semantic representations and inputs them into the synonym fusion attention module;
[0026] The synonym fusion attention module performs semantic interaction and fusion on the deep semantic representation of the electronic medical record text and the encoded synonym semantic representation to obtain the encoded fusion text representation and input it into the initial prediction module, and also obtains the encoded fusion representation based on the encoded synonym semantic representation and inputs it into the initial prediction module;
[0027] The initial prediction module obtains an initial prediction result based on the encoded fusion text representation and the similarity score of the encoded fusion representation, and inputs the similarity score and the initial prediction result into the prediction correction module;
[0028] The prediction correction module obtains a candidate code set and its corresponding original prediction score based on the similarity score and the initial prediction result, inputs the candidate code set into a pre-trained masked autoencoder, and outputs the reordering score of the candidate code set; obtains a comprehensive score based on the reordering score and the original prediction score, and then obtains the final predicted ICD code.
[0029] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the automatic ICD encoding method based on hierarchical feature optimization and prediction correction as described in the first aspect.
[0030] In a fourth aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the automatic ICD encoding method based on hierarchical feature optimization and prediction correction as described in the first aspect are implemented.
[0031] One or more of the above technical solutions have the following beneficial effects:
[0032] On the one hand, the present invention uses a cascaded convolutional network to process the input medical record text features. The text features are compressed through downsampling convolution, followed by feature smoothing convolution to reduce noise and enhance feature consistency. Finally, the original dimension of the features is restored through an upsampling deconvolution module. This module ensures that key information is retained and minimizes the impact of noise, generating a more robust text feature representation. At the same time, to address the problem of inconsistent expression of ICD codes, synonym fusion attention is introduced to enable the ICD code synonym description to interact with the deep semantic representation of the electronic medical record text, which enables the model to better understand the semantic relationship between the code and the text. On the other hand, a prediction correction module based on masked autoencoders is introduced. It estimates the joint probability of label combinations through autoregressive decomposition, uses a multi-layer perceptron architecture and realizes the dependency relationship between labels by masking certain connections. During the correction process, the module can learn the complex relationship between labels without expert knowledge. By capturing the co-occurrence, mutual exclusion and other relationships between codes, the model can optimize the initial prediction results, reorder and select the code combination that best conforms to the semantics and dependency relationship, thereby improving the accuracy of the prediction.
[0033] The present invention can process electronic medical record texts quickly and efficiently, and at the same time introduces synonym knowledge of ICD codes to alleviate the problem of inconsistent disease descriptions.
[0034] This paper uses a new cascade convolutional structure to address the noise problem in lengthy electronic medical record texts, helping the automatic ICD coding model capture text information that is more conducive to coding.
[0035] The present invention uses a prediction correction module based on a masked autoencoder, which estimates the joint probability of label combinations through autoregressive decomposition and then corrects the initial prediction results.
[0036] The present invention uses a synonym fusion attention module, which can effectively fuse and interact the coded synonyms with the electronic medical record text, and fully capture the detailed information related to the coding in the electronic medical record text.
[0037] The present invention improves the coding accuracy by optimizing and correcting the initial prediction results, and fully considers the complex relationship between ICD codes during the correction process, providing new ideas for subsequent research.
[0038] The present invention effectively provides ICD coding candidates for medical coding personnel, reduces the number of manual interventions, improves the efficiency of medical coding, and at the same time enables electronic medical records to be well used for secondary applications, which is more conducive to the statistics and analysis of medical data.
[0039] The present invention uses fewer model parameters to enable the model to achieve higher automatic ICD coding performance, providing a realistic possibility for the automatic ICD coding system to be deployed in medical equipment.
[0040] The present invention solves the problem of lengthy electronic medical records encountered in the automatic ICD coding process by using natural language processing technology, thereby improving coding efficiency, coding accuracy and medical service quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0042] Figure 1 is a flowchart of an automatic ICD encoding method based on hierarchical feature optimization and prediction correction according to an embodiment of the present invention;
[0043] Figure 2 This is a flow chart of the hierarchical feature optimization submodule in the automatic ICD coding model according to an embodiment of the present invention;
[0044] Figure 3 This is the sampling process in the hierarchical feature optimization submodule of an embodiment of the present invention. DETAILED DESCRIPTION
[0045] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0046] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0047] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0048] Example 1
[0049] like Figure 1 As shown, this embodiment discloses an automatic ICD encoding method based on hierarchical feature optimization and prediction correction, which includes the following steps:
[0050] S1: Get the current electronic medical record text.
[0051] In this embodiment, an automatic ICD coding model training data set is constructed: first, the electronic medical records are processed, and the discharge summary part of each patient's electronic medical record is used as the electronic medical record text, and is associated with the ICD code diagnosed by the doctor to form a training data set, and finally all the training data are summarized to form an automatic ICD coding model training data set; usually, each patient suffers from multiple diseases at the same time, that is, there are often multiple ICD codes corresponding to the electronic medical record text, and finally all the training data are summarized to form an automatic ICD coding model training data set; all the ICD codes that appear in the automatic ICD coding model training data set are counted; and at the same time, the ICD codes of each training sample in the automatic ICD coding model training data set are summarized as training set labels.
[0052] S101: Constructing electronic medical record text: First, for a patient's electronic medical record, select the condition description under the discharge summary attribute as the electronic medical record text.
[0053] For example, the following example constructs electronic medical record text in the MIMIC III-50 dataset:
[0054] A patient's electronic medical record usually contains a large amount of information, which is classified according to the patient's diagnosis and treatment process, such as admission records and current medical history. These categories are called attributes. However, the information under some attributes is not helpful for ICD coding. Therefore, the discharge summary "Discharge Summary" in the patient's electronic medical record, which is most helpful for ICD coding, is selected as the electronic medical record text.
[0055] S102: Assign ICD codes: Build an automatic ICD coding model training dataset. Each electronic medical record text constructed in S101 needs to be assigned its corresponding ICD code.
[0056] For example, in the MIMIC III-50 dataset, each electronic medical record text is assigned its corresponding ICD code, as shown below:
[0057] Generally speaking, in an electronic medical record, the ICD code of the patient's diagnosis comes from two main sources: Diagnoses_icd, which represents the patient's diagnosis, and Procedures_icd, which represents the surgical record. When assigning ICD codes to electronic medical record texts, the ICD codes from the two different sources are aggregated based on the patient's admission HADM_ID. Finally, a training data set contains the following four items: patient ID (SUBJECT_ID), hospitalization ID (HADM_ID), electronic medical record text, and ICD code.
[0058] S103: Count all ICD codes: Count all ICD codes that appear in the automatic ICD coding model training data set.
[0059] For example, in the MIMIC III-50 dataset, the ICD code corresponding to each electronic medical record text is stored in a list. The unique key feature of the Python dictionary is used to filter out all the ICD codes that appear in it, covering the top 50 ICD codes that appear most frequently in the MIMIC III dataset.
[0060] S104: Summarize training set labels: Summarize the ICD codes corresponding to each piece of data in the automatic ICD coding model training data set to form training set labels.
[0061] For example, in the MIMIC III-50 dataset, the ICD code corresponding to each electronic medical record text can be represented by a binary vector of length 50, where 50 represents the size of all ICD codes. That is, each position represents an ICD code, "1" represents that the electronic medical record text is associated with the ICD code, and "0" represents no association.
[0062] S2: Build and train a masked autoencoder: The masked autoencoder uses a multilayer perceptron architecture and masks certain connections to represent the complex relationships between different ICD codes. It is trained using the training set labels from S104. Once trained, the masked autoencoder can estimate the joint probability of code combinations using an autoregressive decomposition.
[0063] S201: Construction of multi-layer perceptron architecture: First, construct the multi-layer perceptron architecture of the masked autoencoder. According to the size of all ICD codes counted in S103, the basic parameters of the network are determined, including input dimension, hidden layer dimension and output dimension. For the autoencoder structure, the input dimension is usually the same as the output dimension.
[0064] For example, on the automatic ICD coding model training dataset constructed based on the MIMIC III-50 dataset, the present invention sets the input dimension and output dimension size to 50, and the hidden layer dimension to 500; the network is constructed in a modular manner, using PyTorch's neural network module (nn.Module) as the basis. During the construction process, linear layers and activation functions are added in sequence to form a basic feedforward neural network structure.
[0065] S202: Design of masking mechanism: The masking mechanism ensures that the model has autoregressive characteristics through a special connection mode. In this design, each neuron in the network will be assigned a serial number, which determines which inputs the neuron can receive; for the input layer, you can choose to use a natural order (0, 1, 2, ...) or a random order. In the present invention, in order to avoid the model's dependence on the order of the coding combination and increase the flexibility of the model, a random order is used. After completing the serial number assignment of the input layer, serial numbers are further assigned to the neurons of the hidden layer. This process follows the following rules: the serial number of each hidden layer neuron must not be less than the minimum serial number of the neuron that receives its input, and must be strictly less than the input dimension. This constraint ensures the unidirectional flow of information in the network and prevents circular dependencies.
[0066] S203: Generation and application of mask matrix: First, the actual mask matrix is generated based on the serial number assigned in S202. The mask matrix is essentially a binary matrix, with 1 indicating that the connection is allowed and 0 indicating that the connection is prohibited. The generation rule is based on the serial number of the neuron: if the serial number of the source neuron is greater than or equal to the serial number of the target neuron, the corresponding connection will be blocked by the mask (set to 0); this ensures that each output dimension y i Depends only on the input dimensions x1 to x i To implement this mechanism, a Masked Linear layer class was created. It adds the use of a mask to the standard Linear layer. During the forward propagation, the weight matrix is element-wise multiplied by the mask matrix, thereby achieving selective control of the connection. Specifically, if the mask value is 1, the original connection remains unchanged; if the mask value is 0, the corresponding connection is disconnected.
[0067] S204: Masked Autoencoder Training: This training uses the training set labels compiled from the training dataset for the automatic ICD encoding model in S104. These labels are binary vectors representing whether a patient has a certain disease. Stochastic gradient descent is used to optimize the parameters, with the goal of minimizing the binary cross-entropy loss. Once training is complete, the masked autoencoder can estimate the joint probability of label combinations using an autoregressive decomposition.
[0068] S20401: Calculation of joint probability: For the data in the training set labels from S104, the masked autoencoder estimates its joint probability by autoregressive decomposition. Specifically, it calculates the joint probability P ma (y′) is decomposed into a multiplication form of conditional probabilities. The masked autoencoder implements this dependency by masking specific connections in the multilayer perceptron to ensure that each label y′ i The output of depends only on the labels that come before it. The specific formula is as follows:
[0069]
[0070] Among them, y′ represents a piece of data in the training set label, o represents an order, which determines the dependency between labels; o(i) represents the original position number corresponding to the i-th position in the order; y′ o(<i) represents the set of all labels before the i-th label in order o; θ is the model parameter of the masked self-encoder; P ma (y o(i) =y′ o(i) |y′ o(<i) ,θ) means that in order o, under the condition that the set of all labels before the i-th label is known, the value of the label is y′ o(i) probability.
[0071] S20402: Calculate the cross entropy loss function: The cross entropy loss is calculated by dividing the loss between the label probability distribution predicted by the masked autoencoder and the label distribution in the training set labels. The formula is as follows:
[0072]
[0073] Among them, N represents the size of the binary vector, o represents an order, which determines the dependency between labels; o(i) represents the original position number corresponding to the i-th position in the order; y′ o(<i) represents the set of all labels before the i-th label in order o; θ is the model parameter of the masked self-encoder; P ma (y o(i) =1|y′ o(<i) ,θ) represents the probability that the value of the label is 1 under the condition that the set of all labels before the i-th label in sequence o is known.
[0074] S20403: Build the optimizer: Use the Adam optimizer with a learning rate of 0.00005 to optimize the masked autoencoder parameters on the training set labels according to the set hyperparameters. The batch size hyperparameter is set to 64, and the number of training rounds hyperparameter is set to 50.
[0075] S20405: Evaluation and Saving: To continuously evaluate the performance of the model, the average loss is calculated and recorded after each epoch. At the same time, to ensure that the best-performing model parameters are obtained, a model saving mechanism is set up: when a new minimum loss appears, the current model parameters are saved.
[0076] S3: Input the electronic medical record text into a pre-trained automatic ICD coding model for coding to obtain the corresponding ICD code (ie, the final prediction result).
[0077] S301: Construct an automatic ICD coding model, including a text representation module, a coding representation module, a synonym fusion attention module, an initial prediction module and a prediction correction module connected in sequence.
[0078] S30101: Building a Text Representation Module: The document representation module consists of three main components: Word2Vec (Word to Vector), a hierarchical feature optimization submodule, and a bidirectional long short-term memory (BiLSTM) network. First, the pre-trained Word2Vec embedding representation of the electronic medical record text is obtained. This is then optimized using the hierarchical feature optimization submodule, and then further encoded using the BiLSTM to obtain a deep semantic representation of the electronic medical record text.
[0079] (1) Obtaining the embedded representation of electronic medical record text: Using pre-trained Word2Vec to obtain the embedded representation of electronic medical record text;
[0080] The specific steps are as follows:
[0081] Assume that the electronic medical record text C is composed of N C words, expressed as C = w1, w2, ..., w NC , for the i-th word, find its word embedding x from the pre-trained Word2Vec i , perform this operation in sequence until the embedded representation of the entire electronic medical record text is obtained Where d is the word embedding dimension, The threshold for the length of the electronic medical record text is a manually set hyperparameter. For data with a length greater than , and truncate the data.
[0082] (2) Constructing a hierarchical feature optimization submodule: The hierarchical feature optimization submodule aims to optimize the embedded representation of the electronic medical record text and output the optimized embedded representation;
[0083] 1) Constructing the Sampling Module: The hierarchical feature optimization submodule includes three sampling modules: downsampling, smoothing, and upsampling. These three modules are structurally similar, consisting of a one-dimensional convolutional layer, a batch normalization layer, and an activation function layer. For downsampling, for example, a one-dimensional convolutional layer is used to process the input features and convert the feature dimensions. A batch normalization layer is then used to normalize the features to improve training stability. An activation function layer then introduces nonlinear transformations to enhance the model's expressiveness. A second one-dimensional convolutional layer is then used for further feature extraction, and finally, another activation function layer is used to complete the downsampling process.
[0084] Downsampling halves the embedding dimension of the input features by specifying the input and output channel parameters of nn.Conv1d. Similar to the downsampling structure, smoothing smoothes features by setting the input channel parameters equal to the output channel parameters in both one-dimensional convolutional layers. The upsampling module replaces the first convolutional layer with a deconvolution layer to restore the feature dimension and avoid information loss.
[0085] 2) Obtaining the optimized embedding representation: For the obtained electronic medical record text embedding representation X, first, two layers of downsampling are performed to extract high-level abstract features. Then, a single layer of smoothing is performed to further enhance the consistency of the features. Finally, two layers of upsampling are performed to restore the original feature dimension. At the same time, to further avoid information loss, the electronic medical record text embedding representation is combined with the features after the two upsampling steps using the element-by-element addition method. After this operation, the optimized embedding representation B is obtained. The specific formula is as follows:
[0086] D1=down_sample(X) (3)
[0087] D2=down_sample(D1) (4)
[0088] Among them, dowm_sample represents downsampling, represents the feature representation after a downsampling operation on X. It represents the feature representation after two downsampling operations on X. After downsampling, smooth sampling is used to further reduce the influence of noise. The specific formula is as follows
[0089] L = smooth_sample(D2) (5)
[0090] Among them, smooth_sample represents smooth sampling, represents the feature representation obtained by smooth sampling of D2; then, two layers of upsampling are performed in sequence to restore the original feature dimension. The specific formula is as follows:
[0091] U1=up_sample(L)+D1 (6)
[0092] B=up_sample(U1)+X (7)
[0093] Among them, up_sample represents up sampling, It represents the feature representation obtained after upsampling L once and adding element-by-element to D1. Represents the optimized embedding representation.
[0094] (3) Obtaining the deep semantic representation of the electronic medical record text: The optimized embedding representation B is fed into the BiLSTM to capture bidirectional semantic information, and finally the deep semantic representation H of the electronic medical record is obtained. The process formula is as follows:
[0095] H = BiLSTM(B) (8).
[0096] S30102: Construct a coding representation module: Take all ICD codes Y obtained in S103 as input, use the ICD code's concept unique identifier CUI to search for its corresponding synonym concept in the Unified Medical Language System UMLS, and after obtaining the ICD code synonym description, use BiLSTM to extract its semantic representation, and use MaxPool to compress its dimension. This process obtains the semantic representation of the coding synonym.
[0097] For example, in the MIMIC III-50 dataset:
[0098] For ICD code c i ∈Y(i=1,2,...,N), search for its corresponding M synonyms {c i,1 ,c i,2 ,...,c i,M}, where N represents the size of all ICD codes Y, and M is an artificially set hyperparameter used to represent the number of selected synonyms; the above synonyms c i,j (i=1,2,...,N;j=1,2,...,M) are fed into BiLSTM to capture bidirectional semantic information, and MaxPool is used to compress its dimension to obtain the encoded synonym semantic representation c′ i,j (i=1,2,...,N;j=1,2,...,M), the specific formula is as follows:
[0099] c′ i,j =MaxPool(BiLSTM(c i,j )) (9)
[0100] MaxPool is a maximum pooling operation that extracts the most significant features by selecting the maximum value of a vector in a certain dimension. It is often used to improve the computational efficiency of the model and prevent overfitting. d e Represents the output dimension of BiLSTM.
[0101] S30103: Construct a synonym fusion attention module: First, use the deep semantic representation H of the electronic medical record and the semantic representation of the encoded synonym to perform multi-head attention calculations, so that the two can interact and fuse semantically to obtain the encoded fusion text representation; at the same time, further operations are performed on the semantic representation of the encoded synonym to obtain the encoded fusion representation.
[0102] (1) Obtaining the encoded fusion text representation: The encoded synonym semantic representation is used as the query vector of the multi-head attention, the deep semantic representation of the electronic medical record is divided into segments with the same number of attention heads, and these segments are used as key vectors. Then, the multi-head attention calculation is performed to obtain the encoded fusion text representation p i .
[0103] For example, in the MIMIC III-50 dataset:
[0104] First, according to the manually set synonym number hyperparameter M, the deep semantic representation H of the electronic medical record is divided into M segments, denoted as H1, H2, ..., H M ; For each ICD code c i , c′ i,j and H1,H2,...,H M Perform multi-head attention calculations between them, first calculate the attention score α i,j , the formula is as follows:
[0105] α i,j =softmax(W c c′ i,j TanhW H H j ) (10)
[0106] Among them, softmax is an activation function that can normalize the numerical vector into a probability distribution vector, and the sum of the probabilities is 1; Tanh is also an activation function that is used to improve the convergence speed of the model; the text representation Hα corresponding to each synonym is obtained by weighted summation i,j , and combined with the information of all synonyms, we get the code c i The encoding fusion text representation p i , expressed as:
[0107] p i =MaxPool([Hα i,1 ,...,Hα i,j ]). (11)
[0108] (2) Obtaining the coded fusion representation: Performing the MaxPool operation on the S30102 coded synonym semantic representation to obtain the coded fusion representation in order to facilitate the integration with the coded fusion text representation p iThe next step is to calculate the similarity. The formula is as follows:
[0109] c′ i =MaxPool([c′ i,1 ,c′ i,2 ,...,c′ i,M ]) (12)
[0110] Among them, c′ i Represents code c i The encoding fusion representation is that MaxPool is a maximum pooling operation that extracts the most significant features by selecting the maximum value of the vector in a certain dimension.
[0111] S30104: Construct an initial prediction module: take the encoded fusion text representation and the encoded fusion representation as input, use double affine transformation to calculate the similarity score between the two, and obtain the initial prediction result based on the similarity score using a dynamic threshold calculation method.
[0112] (1) Calculate the similarity score: For each ICD code c i , use the encoded fusion text representation of the encoding and the encoded fusion representation of the encoding to calculate the similarity score between the two through double affine transformation; the formula is as follows:
[0113]
[0114] Where T represents the transpose operation and W is a learnable matrix.
[0115] (2) Obtaining the initial prediction results: Based on the similarity scores of each label, the initial prediction results are obtained using a dynamic threshold calculation method.
[0116] For example, in the MIMIC III-50 dataset:
[0117] First, receive the similarity scores of each tag {score1, score2, ..., score i}, select score from the set in turn i As the binary conversion parameter t, and perform binary conversion on the remaining similarity scores, follow the following conversion rules: i When t is greater than or equal to t, Equal to 1; when score i When it is less than t, Equal to 0, the process formula is as follows:
[0118]
[0119] After conversion, the conversion result under the binary conversion parameter t can be obtained Simultaneous calculation The F1 score between the real label y and the real label y is obtained by repeating the above operation and selecting the binary conversion parameter t that can maximize the F1 score as the threshold τ. The formula of this process is as follows:
[0120]
[0121] Based on the threshold τ, the similarity scores {score1, score2, ..., score i} Perform binary conversion to obtain the initial prediction result The process formula is as follows:
[0122]
[0123] S30105: Construct a prediction and correction module: First, generate a set of candidate codes based on the similarity score and the initial prediction result. For a certain code combination in the candidate code set, input it into the masked autoencoder; generate a random order set by masking certain connections to reduce the model's dependence on the order of label combinations, calculate the joint probability under different orders, and then calculate the reordering score of the candidate code; combine the reordering score and the similarity score to calculate the comprehensive score, and select the candidate code with the highest comprehensive score as the final prediction result.
[0124] (1) Generate candidate encoding set: The goal is to use the similarity score and the initial prediction result to generate n s The most likely label combination is obtained by identifying the most uncertain predicted position (i.e. the position where the similarity score value is closest to the threshold τ), keeping the predictions of other certain positions unchanged, and then "flipping" the initial prediction results corresponding to these uncertain positions, and finally selecting the n positions with the highest logarithmic probability. s The label combination is used as the candidate encoding set, n s It is a manually set hyperparameter.
[0125] For example, in the MIMIC III-50 dataset:
[0126] First, perform sigmoid transformation on the similarity score and the obtained threshold τ, and then calculate the most uncertain n difference between the two in turn. s The closer the value is to the threshold, the more uncertain the prediction is. s The other positions in the predicted positions are directly determined as 0 or 1 according to whether their probability values exceed the threshold, and their logarithmic probabilities are accumulated; then the n ... s Try combinations of prediction positions: Each time a position is taken, try to set the position to 0 and 1 for all currently retained combinations, calculate the new logarithmic probability, and retain the n positions with the highest probability. snew combinations; iterate this process until all uncertain positions are processed, and finally get n s The most likely label combination And take the corresponding logarithmic probability as the original prediction score. The process formula is as follows:
[0127]
[0128] Where k = 1, 2, ..., n s , Representative based on initial forecast results A coding combination in the generated candidate coding set, represents the original prediction score and σ represents the sigmoid transformation.
[0129] (2) Generate random order: Randomly generate n for a coding combination in the candidate coding set t Different orders, sum up n t Different sequences constitute a random sequence.
[0130] For example, in the MIMIC III-50 dataset:
[0131] First, a coding combination in the candidate coding set is received, and the mask mechanism designed by S202 is used to generate n t Different mask matrices. Specifically, the random order refers to the position order of different codes in the coding combination. The random order is used to avoid the model's dependence on the order of the coding combination and increase the flexibility of the model. Finally, the n t different sequences constitute the random sequence O.
[0132] (3) Calculate the reordering score: First, receive the generated random order O, use the joint probability calculation method defined in S20401 to calculate the joint probability under different orders, and then take the mathematical expectation to obtain the reordering score. The specific formula is as follows:
[0133]
[0134] Where k = 1, 2, ..., n s , Representative based on initial forecast results A coding combination in the generated candidate coding set, represents the reordering score, Ε represents the mathematical expectation, and O represents the random order set, where o represents an order that determines the dependency between labels; o(i) represents the original position number corresponding to the i-th position in the order; represents the set of all labels before the i-th label in order o; θ is the model parameter of the masked autoencoder; Indicates that in order o, under the condition that the set of all labels before the i-th label is known, the value of the label is probability.
[0135] (4) Calculate the comprehensive score: Receive the original prediction score and the re-ranking score, combine the two to calculate the comprehensive score, and select the coding combination with the highest comprehensive score as the final prediction result. The specific calculation formula is as follows:
[0136]
[0137] in, is a penalty factor to ensure that the model does not favor a smaller set of labels, and α and β are manually set hyperparameters. Representative based on initial forecast results The number of ICD codes in a code combination in the generated candidate code set.
[0138] S302: Train the automatic ICD coding model: Use the cross-entropy loss function to optimize the model; calculate the cross-entropy loss by comparing the similarity score with the ICD code corresponding to the electronic medical record text; when the model is not fully trained, it needs to be trained in the training data set to optimize the model parameters; when the model training is completed, the model can predict the corresponding ICD code for the input electronic medical record text.
[0139] S30201: Calculate the cross entropy loss function: Calculate the cross entropy loss between the similarity score and the ICD code corresponding to the electronic medical record text. The formula is as follows:
[0140]
[0141] Among them, σ represents sigmoid conversion, score i Represents the similarity score of the i-th ICD code, y i Represents the true label of the i-th ICD code corresponding to the electronic medical record text.
[0142] S30202: Construct an optimization function: Use the Adamw algorithm as the optimization function of the model; optimize and train the automatic ICD coding model according to the set hyperparameters on the automatic ICD coding model training dataset constructed in S1; hyperparameters refer to parameters that need to be manually set before starting the training process; these parameters cannot be automatically optimized through training; depending on the actual dataset, these parameters need to be manually set by the user.
[0143] The model proposed in this paper achieves better results than other models on the MIMIC III-50 dataset. The comparison of experimental results is shown in the table below.
[0144] Model Macro-AUC Micro-AUC Macro-F1 Micro-F1 Precision-P@5 MultiResCNN 89.3 92.0 59.2 66.2 61.6 CAML 87.5 90.9 53.2 61.4 60.9 PLM-ICD 90.2 92.7 64.8 69.6 65.0 LAAT 92.5 94.6 66.6 71.5 67.5 MARN 92.7 94.7 68.2 71.8 67.3 ChatICD 92.0 94.1 68.1 72.1 66.7 The present invention 93.1 94.9 69.1 72.9 68.4
[0145] The technical problem to be solved by this invention is how to use natural language processing technology to assign corresponding ICD codes to electronic medical record texts, thereby alleviating the current problem of serious mismatch between the workload of ICD coding and the number of coders. To address this technical problem, an overall model framework (automatic ICD coding model) is designed, such as Figure 1 As shown in the figure, it includes a text representation module, an encoding representation module, a synonym fusion attention module, an initial prediction module, and a prediction correction module. Each training sample consists of an electronic medical record text and its corresponding ICD code. All training samples are collected to form the automatic ICD encoding model training dataset, and the electronic medical record text in the automatic ICD encoding model training dataset is input into the text representation module. All ICD codes appearing in the automatic ICD encoding model training dataset are counted as input to the encoding representation module. At the same time, the ICD codes of each training sample in the automatic ICD encoding model training dataset are summarized as training set labels and passed to the prediction correction module for training the masked autoencoder. The text representation module receives the electronic medical record text as input, first uses the pre-trained Word2Vec to convert the words in the electronic medical record text into word embeddings, summarizes the word embeddings in the electronic medical record text to form the electronic medical record text embedding representation, and inputs it into the hierarchical feature optimization submodule; in the hierarchical feature optimization submodule, the electronic medical record text embedding first undergoes two layers of downsampling to extract high-level abstract features, then undergoes single-layer smoothing sampling to further enhance the consistency of the features, and finally undergoes two layers of upsampling to restore the original feature dimension. At the same time, in order to further avoid information loss, the electronic medical record text embedding representation is combined with the features after two upsampling by element-by-element addition. After this operation, the optimized embedding representation is obtained and passed into the subsequent BiLSTM. The specific process is as follows Figure 2 As shown in , downsampling, smoothing sampling and upsampling are cascade convolution structures composed of one-dimensional convolution or one-dimensional deconvolution as the main components and combined with batch normalization and activation function. The specific structure is as follows Figure 3As shown in the figure, after BiLSTM encodes the optimized embedding representation, a deep semantic representation of the EMR text is obtained, which is then fed into the synonym fusion attention module. The encoding representation module takes all ICD codes as input and uses the ICD code's concept unique identifier (CUI) to search for corresponding synonyms in the Unified Medical Language System (UMLS). After obtaining the ICD code synonym description, BiLSTM is used to extract its semantic representation. MaxPool is used to compress its dimension for subsequent use. This process results in an encoded synonym semantic representation, which is then fed into the synonym fusion attention module. The synonym fusion attention module takes the EMR text deep semantic representation and the encoded synonym semantic representation as input and uses multi-head attention to semantically interact and fuse the two, resulting in an encoded fusion text representation. A MaxPool operation is also performed on the encoded synonym semantic representation to obtain an encoded fusion representation. This fusion text representation and the encoded representation are then fed into the initial prediction module. The initial prediction module takes the encoding-fused text representation and the encoding representation as input, calculates the similarity score between the two using a double affine transformation, and then uses a dynamic threshold calculation method to obtain the initial prediction result based on the similarity score. The similarity score and the initial prediction result are then passed to the prediction correction module. The prediction correction module takes the similarity score, the initial prediction result, and the training set labels as input. First, based on the similarity score, it selects the encoding most likely to be mispredicted. It then "flips" the initial prediction result corresponding to this encoding, and repeats this operation to obtain a set of candidate encodings. The masked autoencoder receives the training set labels as input and is pre-trained. It uses a multi-layer perceptron as its basic architecture and simulates the dependencies between different encodings in the training set labels by masking certain connections. This generates a random order set to reduce the model's dependence on the order of label combinations. It also uses autoregressive decomposition to estimate the joint probability of the training set label combinations. For a candidate encoding in the candidate encoding set, a random order set is first generated and the joint probability of different orders is calculated. This is then used to calculate the re-ranking score of the candidate encoding. A comprehensive score is calculated by combining the re-ranking score with the similarity score, and the candidate with the highest comprehensive score is selected as the final prediction result.
[0146] Example 2
[0147] This embodiment discloses an automatic ICD coding system based on hierarchical feature optimization and prediction correction, including:
[0148] A data acquisition module is configured to: acquire the current electronic medical record text;
[0149] A coding prediction module is configured to: input the electronic medical record text into a pre-trained automatic ICD coding model for coding to obtain a corresponding ICD code;
[0150] The automatic ICD coding model includes a text representation module, a coding representation module, a synonym fusion attention module, an initial prediction module and a prediction correction module connected in sequence;
[0151] The text representation module receives the electronic medical record text, embeds, represents, optimizes and encodes it, obtains a deep semantic representation of the electronic medical record text and inputs it into the synonym fusion attention module; the coded representation module searches for synonyms based on all ICD codes and extracts their semantic representations to obtain coded synonym semantic representations and inputs them into the synonym fusion attention module;
[0152] The synonym fusion attention module performs semantic interaction and fusion on the deep semantic representation of the electronic medical record text and the encoded synonym semantic representation to obtain the encoded fusion text representation and input it into the initial prediction module, and also obtains the encoded fusion representation based on the encoded synonym semantic representation and inputs it into the initial prediction module;
[0153] The initial prediction module obtains an initial prediction result based on the encoded fusion text representation and the similarity score of the encoded fusion representation, and inputs the similarity score and the initial prediction result into the prediction correction module;
[0154] The prediction correction module obtains a candidate code set and its corresponding original prediction score based on the similarity score, inputs the candidate code set into a pre-trained masked autoencoder, and outputs the reordering score of the candidate code set; obtains a comprehensive score based on the reordering score and the original prediction score, and then obtains the final predicted ICD code.
[0155] Example 3
[0156] The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of embodiment 1 when executing the program.
[0157] Example 4
[0158] The purpose of this embodiment is to provide a computer-readable storage medium, a computer-readable storage medium having a computer program stored thereon, which performs the steps of the method of embodiment 1 when executed by a processor.
[0159] The steps involved in the apparatuses of Examples 3 and 4 above correspond to those of Method Example 1. For detailed implementation, please refer to the relevant description of Example 1. The term "computer-readable storage medium" should be understood to mean a single medium or multiple media containing one or more instruction sets; it should also be understood to include any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and causing the processor to perform any of the methods of the present invention.
[0160] 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 above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0161] In this case, the program code read from the storage medium itself can realize the function of any one of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0162] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer via a communication network.
[0163] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.
[0164] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion unit connected to the computer, and then based on the instructions of the program code, the CPU installed on the expansion board or expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.
[0165] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An automatic ICD coding method based on hierarchical feature optimization and prediction correction, characterized in that: include: Obtain the current electronic medical record text, input the electronic medical record text into a pre-trained automatic ICD encoding model for encoding, and obtain the corresponding ICD code; The automatic ICD coding model includes a text representation module, a coding representation module, a synonym fusion attention module, an initial prediction module and a prediction correction module connected in sequence; The text representation module receives the electronic medical record text, performs embedding representation, optimization and encoding on it, obtains a deep semantic representation of the electronic medical record text and inputs it into the synonym fusion attention module; The encoding representation module searches for synonyms based on all ICD codes and extracts their semantic representations, obtains the encoded synonym semantic representations and inputs them into the synonym fusion attention module; The synonym fusion attention module performs semantic interaction and fusion on the deep semantic representation of the electronic medical record text and the encoded synonym semantic representation to obtain the encoded fusion text representation and input it into the initial prediction module, and also obtains the encoded fusion representation based on the encoded synonym semantic representation and inputs it into the initial prediction module; The initial prediction module obtains an initial prediction result based on the encoded fusion text representation and the similarity score of the encoded fusion representation, and inputs the similarity score and the initial prediction result into the prediction correction module; The prediction correction module obtains a candidate code set and its corresponding original prediction score based on the similarity score and the initial prediction result, inputs the candidate code set into a pre-trained masked autoencoder, and outputs the reordering score of the candidate code set; obtains a comprehensive score based on the reordering score and the original prediction score, and then obtains the final predicted ICD code.
2. The automatic ICD coding method based on hierarchical feature optimization and prediction correction according to claim 1, characterized in that: The text representation module includes Word2Vec, a hierarchical feature optimization submodule and BiLSTM connected in sequence. The pre-trained Word2Vec is used to obtain the embedded representation of the electronic medical record text, and then the hierarchical feature optimization submodule is used to optimize the embedded representation. The optimized embedded representation is then encoded using BiLSTM to obtain a deep semantic representation of the electronic medical record text.
3. The automatic ICD coding method based on hierarchical feature optimization and prediction correction according to claim 2, characterized in that: The hierarchical feature optimization submodule includes a downsampling module, a smoothing sampling module and an upsampling module. For the embedded representation of electronic medical record text, high-level abstract features are first extracted through two layers of downsampling, then the consistency of the features is further enhanced through a single layer of smoothing sampling, and finally the original feature dimension is restored through two layers of upsampling. The embedded representation of the electronic medical record text is combined with the features after two upsampling by the element-by-element addition method to obtain the optimized embedded representation.
4. The automatic ICD coding method based on hierarchical feature optimization and prediction correction according to claim 1, characterized in that: The synonym fusion attention module performs semantic interaction and fusion on the deep semantic representation of the electronic medical record text and the encoded synonym semantic representation as follows: the encoded synonym semantic representation is used as the query vector of multi-head attention, the deep semantic representation of the electronic medical record text is divided into segments with the same number of attention heads, and the segments are used as key vectors to perform multi-head attention to obtain the encoded fusion text representation.
5. The automatic ICD coding method based on hierarchical feature optimization and prediction correction according to claim 1, characterized in that: The initial prediction module obtains the initial predicted ICD code based on the similarity score between the encoded fusion text representation and the encoded fusion representation. Specifically, the similarity score between the encoded fusion text representation and the encoded fusion representation is calculated using a double affine transformation, and the initial predicted ICD code is obtained based on the similarity score using a dynamic threshold calculation method.
6. The automatic ICD coding method based on hierarchical feature optimization and prediction correction according to claim 1, characterized in that: The method of obtaining a candidate coding set based on similarity scores is as follows: using similarity scores to generate multiple most likely label combinations, identifying the most uncertain prediction position, keeping the predictions of other certain positions unchanged, and then "flipping" the initial prediction results of these uncertain positions, and finally selecting multiple label combinations with the highest probability as the candidate coding set.
7. The automatic ICD coding method based on hierarchical feature optimization and prediction correction according to claim 1, characterized in that: The masked autoencoder adopts a multi-layer perception mechanism to estimate the joint probability of the coding combination in the candidate coding set in an autoregressive decomposition manner.
8. An automatic ICD coding system based on hierarchical feature optimization and prediction correction, characterized by: include: A data acquisition module is configured to: acquire the current electronic medical record text; A coding prediction module is configured to: input the electronic medical record text into a pre-trained automatic ICD coding model for coding to obtain a corresponding ICD code; The automatic ICD coding model includes a text representation module, a coding representation module, a synonym fusion attention module, an initial prediction module and a prediction correction module connected in sequence; The text representation module receives the electronic medical record text, performs embedding representation, optimization and encoding on it, obtains a deep semantic representation of the electronic medical record text and inputs it into the synonym fusion attention module; The encoding representation module searches for synonyms based on all ICD codes and extracts their semantic representations, obtains the encoded synonym semantic representations and inputs them into the synonym fusion attention module; The synonym fusion attention module performs semantic interaction and fusion on the deep semantic representation of the electronic medical record text and the encoded synonym semantic representation to obtain the encoded fusion text representation and input it into the initial prediction module, and also obtains the encoded fusion representation based on the encoded synonym semantic representation and inputs it into the initial prediction module; The initial prediction module obtains an initial prediction result based on the encoded fusion text representation and the similarity score of the encoded fusion representation, and inputs the similarity score and the initial prediction result into the prediction correction module; The prediction correction module obtains a candidate code set and its corresponding original prediction score based on the similarity score and the initial prediction result, inputs the candidate code set into a pre-trained masked autoencoder, and outputs the reordering score of the candidate code set; obtains a comprehensive score based on the reordering score and the original prediction score, and then obtains the final predicted ICD code.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the automatic ICD encoding method based on hierarchical feature optimization and prediction correction as described in any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps in the automatic ICD encoding method based on hierarchical feature optimization and prediction correction are implemented as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Synonym-based information coding method and device, equipment and storage medium
CN114580354A
ICD automatic coding method and device based on synonym network and reverse reference contrast learning
CN118446182A