Automatic ICD coding method and system based on hierarchical feature optimization and prediction correction

By introducing hierarchical feature optimization and prediction correction technology into the ICD encoding automation method, the problems of lengthy electronic medical record text and complex ICD encoding hierarchical structure are solved, and more efficient and accurate ICD encoding is achieved, reducing medical costs.

CN119598976AActive Publication Date: 2025-03-11QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)

Patent Information

Application Number
CN202411694167.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-11
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

Existing ICD encoding automation methods are difficult to effectively deal with lengthy electronic medical record texts and complex ICD encoding hierarchy structures, resulting in low encoding accuracy and high cost.

Method used

The automatic ICD encoding method based on hierarchical feature optimization and prediction correction is adopted. The electronic medical record text is processed through the hierarchical feature optimization submodule, the deep semantic representation is extracted, and the synonym knowledge of ICD encoding is combined for prediction correction, and the joint probability of encoding combination is optimized using the mask autoencoder.

Benefits of technology

It improves the accuracy and efficiency of ICD encoding, reduces manual intervention, reduces medical costs, and promotes secondary application of electronic medical records and statistical analysis of medical data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598976A_ABST
    Figure CN119598976A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic ICD coding method and system based on hierarchical feature optimization and prediction correction, and relates to the technical field of natural language processing, and the method comprises the steps: inputting a current electronic medical record text into a pre-trained automatic ICD coding model for coding, and obtaining a corresponding ICD code; the automatic ICD coding model comprises a text representation module, a coding representation module, a synonym fusion attention module, an initial prediction module and a prediction correction module which are connected in sequence; the text representation module processes input medical record text features by using a cascade convolutional network, the synonym fusion attention module introduces synonym fusion attention to enable ICD coding synonym description and electronic medical record text deep semantic representation to interact, and the prediction correction module based on a mask auto-encoder is further introduced. According to the method, the initial prediction result can be optimized and reordered, and the coding combination which most accords with the semantic and dependency relationship is selected, so that the prediction accuracy is improved, the coding efficiency is improved, and the automatic ICD coding problem is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, 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 pay more and more attention to their health and the aging population becomes more serious, the pressure on the existing medical system is increasing. With the advancement of informatization from the last century to the present, electronic medical records have come into being. At the same time, in order to make it easier to analyze it, the World Health Organization has formulated the International Classification of Diseases (ICD). It comprehensively converts tens of thousands of diseases and combinations of diseases into codes composed of numbers and English letters. Through ICD coding, different regions and hospitals can be connected to share medical data, thereby promoting the mining and refined management of medical information. The quality of ICD coding will directly affect the quality of Diagnosis Related Groups (DRGs), thereby affecting medical payment, medical insurance reimbursement and the arrangement of treatment processes.

[0004] At present, ICD coding is usually done by professional coders in hospitals. However, the ICD-10 (International Classification of Diseases, 10th Edition) coding system currently in use has a total of about 71,000 different codes. The huge number makes the coding process time-consuming, labor-intensive, error-prone, and costly. In addition, insufficient training of coders and scarcity of professional talents further exacerbate the problem of coding quality. 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, the development of an automated and high-precision medical coding system will not only help improve the efficiency and quality of medical services, but also effectively reduce medical costs and labor costs, and has a wide range of application value.

[0005] With the development of artificial intelligence and natural language processing technology, automated medical coding has attracted widespread attention from researchers. At present, many studies on automatic coding have been proposed. These studies mainly focus on deep learning methods, which improve the coding accuracy by capturing the deep semantic representation information of text data. However, at present, there are still the following problems in the field of ICD automatic coding that need to be solved. First, the text of electronic medical records is usually lengthy and contains a lot of noise information. At the same time, the definition of ICD coding is often abstract. In order to adapt to a variety of case scenarios, the description is usually more general, which leads to the fact that the key information related to coding is mostly scattered and sparse. Secondly, due to the personal writing habits of doctors and the existence of non-standard expressions, a large number of abbreviations, synonyms and even typos often appear in electronic medical records, which increase the noise of the text. Thirdly, the ICD coding system has a complex hierarchical structure and internal associations, such as parent-child relationships, peer relationships, and co-occurrence relationships. These relationships contain rich medical knowledge, but also increase the difficulty of the coding task. For example, some diseases often occur at the same time, and their corresponding ICD codes usually appear together, such as the causal relationship between E78.200 (mixed hyperlipidemia) and I10.x00 (hypertension); some diseases often do not occur at the same time, such as two codes belonging to the same parent category are usually not assigned to the same patient at the same time; although there are complex relationships between ICD codes, the current automatic coding model only makes independent binary predictions for different codes when predicting codes. In summary, the existing methods do not effectively target lengthy medical records, and the existing methods ignore the complex relationships between codes during the prediction process, so it is difficult to achieve satisfactory coding results. Summary of the invention

[0006] In order to overcome the shortcomings of the above-mentioned prior art, 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, so as 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] Obtaining the current electronic medical record text, inputting the electronic medical record text into a pre-trained automatic ICD encoding model for encoding, and obtaining a 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, obtains coded synonym semantic representations and inputs them into the synonym fusion attention module;

[0012] The synonym fusion attention module semantically interacts and fuses the deep semantic representation of the electronic medical record text and the coded synonym semantic representation to obtain the coded fusion text representation and inputs it into the initial prediction module, and also obtains the coded fusion representation based on the coded 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, and 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, first, two layers of downsampling are performed to extract high-level abstract features, then a single layer of smoothing sampling is performed to further enhance the consistency of the features, and finally two layers of upsampling are performed to restore the original feature dimension. 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 by using double affine transformation to calculate the similarity score of the encoded fusion text representation and the encoded fusion representation, and obtains the initial predicted ICD code based on the similarity score using a dynamic threshold calculation method.

[0019] A further technical solution, the method of obtaining a candidate coding set based on a similarity score is as follows: using the similarity score 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.

[0020] According to 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, obtains coded synonym semantic representations and inputs them into the synonym fusion attention module;

[0026] The synonym fusion attention module semantically interacts and fuses the deep semantic representation of the electronic medical record text and the coded synonym semantic representation to obtain the coded fusion text representation and inputs it into the initial prediction module, and also obtains the coded fusion representation based on the coded 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 in 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 in 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 cascade convolutional network to process the input medical record text features. The text features are compressed by downsampling convolution, and then feature smoothing convolution is used to reduce noise and enhance feature consistency. Finally, the original dimension of the features is restored by an upsampling deconvolution module. This module ensures that key information is retained, minimizes the impact of noise, and generates a more robust text feature representation. At the same time, in view of the inconsistent expression of ICD codes, synonym fusion attention is introduced to make the ICD code synonym description 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 a masked autoencoder is introduced, which estimates the joint probability of the label combination by autoregressive decomposition, uses a multi-layer perceptron architecture and realizes the dependency between labels by masking certain connections. In 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 meets the semantics and dependency, thereby improving the accuracy of the prediction.

[0033] The present invention can process electronic medical record texts quickly and efficiently, and introduces synonym knowledge of ICD codes to alleviate the problem of inconsistent disease descriptions.

[0034] The present invention uses a new cascade convolution structure to deal with the noise problem in lengthy electronic medical record texts, helping the automatic ICD coding model to 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 by means of 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 utilize 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 obtain higher automatic ICD coding performance, thereby 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 in the specification, 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 flow chart 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 is a flow chart of a hierarchical feature optimization submodule in an 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 are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those 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 exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates 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 of the embodiments may be combined with each other.

[0048] Embodiment 1

[0049] like Figure 1 As shown, this embodiment discloses an automatic ICD encoding method based on hierarchical feature optimization and prediction correction, the method comprising 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, and finally all the training data are aggregated 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 aggregated to form an automatic ICD coding model training data set; all ICD codes appearing 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 aggregated 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 example of constructing electronic medical record text in the MIMIC III-50 dataset is as follows:

[0054] The electronic medical records of patients usually contain a large amount of information, which is classified according to the patient's diagnosis and treatment process, such as admission records, current medical history, etc. 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 code: Build an automatic ICD coding model training data set, and assign the corresponding ICD code to each electronic medical record text constructed in S101.

[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, there are two main sources of ICD codes for patients’ diagnosis: Diagnoses_icd representing the patient’s diagnosis and Procedures_icd representing the surgical record. When assigning ICD codes to electronic medical record texts, the ICD codes from two different sources are aggregated based on the patient’s admission HADM_ID. Finally, one training data item 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 appearing 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, and 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 with the highest frequency in the MIMIC III dataset.

[0060] S104: Summarize training set labels: Summarize the ICD codes corresponding to each data in the automatic ICD coding model training data set to form a training set label.

[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 multi-layer perceptron architecture and masks certain connections to achieve complex relationships between different ICD codes. It is trained using the training set labels summarized in S104. When training is complete, the masked autoencoder can estimate the joint probability of code combinations in an autoregressive decomposition manner.

[0063] S201: Construction of multi-layer perceptron architecture: First, construct the multi-layer perceptron architecture of the masked autoencoder, and determine the basic parameters of the network according to the size of all ICD codes counted in S103, 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 an automatic ICD coding model training data set constructed based on the MIMIC III-50 data set, 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 the PyTorch 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 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 in the present invention. 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 the 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 by 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 is created, which adds the application of mask on the basis of the standard linear layer; This class adds the application function of mask on the basis of the standard linear layer. During the forward propagation process, the weight matrix will be multiplied element by element with the mask matrix to achieve 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 will be cut off.

[0067] S204: Training of the masked autoencoder: The training uses the training set labels summarized in the process of constructing the automatic ICD coding model training data set in S104. The training set labels are in the form of binary vectors to indicate whether a patient has a certain disease. Stochastic gradient descent is used to optimize its parameters during the training process, and the training goal is to minimize the binary cross entropy loss. When the training is completed, the masked autoencoder can estimate the joint probability of the label combination in an autoregressive decomposition manner.

[0068] S20401: Calculation of joint probability: For the data in the training set labels in S104, the masked autoencoder estimates its joint probability by autoregressive decomposition. Specifically, it converts 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 depends only on the labels that are sorted 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 loss between the label probability distribution predicted by the masked autoencoder and the label distribution in the training set labels is used to calculate the cross entropy loss. The formula is as follows:

[0072]

[0073] Where 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 optimizer: Use Adam optimizer, set the learning rate to 0.00005, and optimize the masked autoencoder parameters on the training set labels according to the set hyperparameters; among them, the batch hyperparameter is set to 64, and the training round hyperparameter is set to 50.

[0075] S20405: Evaluation and preservation: To continuously evaluate the performance of the model, the average loss is calculated and recorded after each epoch. To ensure that the best performing model parameters are obtained, a model preservation mechanism is set up: when a new minimum loss appears, the parameters of the current model are saved.

[0076] S3: Input the electronic medical record text into a pre-trained automatic ICD coding model for coding to obtain a corresponding ICD code (ie, a 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 which are connected in sequence.

[0078] S30101: Constructing the text representation module: The document representation module mainly consists of three parts, namely Word2Vec (Word to vector), hierarchical feature optimization submodule, and bidirectional long short-term memory network BiLSTM. First, 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 it, and then BiLSTM is used to further encode the deep semantic representation of the electronic medical record text.

[0079] (1) Obtaining the embedded representation of the electronic medical record text: Using the pre-trained Word2Vec, the embedded representation of the electronic medical record text is obtained from the electronic medical record text;

[0080] The specific steps are as follows:

[0081] Assume that the electronic medical record text C consists 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, is the threshold of the length of the electronic medical record text, which is a hyperparameter set manually. For electronic medical record text larger than 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 to output the optimized embedded representation;

[0083] 1) Construct sampling module: The hierarchical feature optimization submodule contains three sampling modules: downsampling, smoothing sampling and upsampling; the three modules are similar in structure, and are composed of one-dimensional convolution layer, batch normalization layer and activation function layer in sequence. Take downsampling as an example: first use the one-dimensional convolution layer to process the input features to complete the conversion of feature dimensions, then use the batch normalization layer to achieve feature normalization to improve training stability, then use the activation function layer to introduce nonlinear transformation to enhance the model's expression ability, then go through the second one-dimensional convolution layer for further feature extraction, and finally go through the activation function layer again to form a complete downsampling process.

[0084] Downsampling halves the embedding dimension of the input feature by specifying the input channel parameters and output channel parameters of nn.Conv1d. Similar to the structure of downsampling, smooth sampling sets the input channel parameters equal to the output channel parameters on both one-dimensional convolutional layers to achieve feature smoothing; the upsampling module replaces the first convolutional layer with a deconvolution layer to restore the feature dimension and avoid information loss.

[0085] 2) Obtaining optimized embedding representation: For the obtained electronic medical record text embedding representation X, firstly, two layers of downsampling are performed to extract high-level abstract features, then single-layer smoothing sampling is performed to further enhance the consistency of features, and finally two layers of upsampling are performed 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 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 sent to the BiLSTM to capture the 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 conceptual unique identifier CUI of the ICD code to find 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, and obtain the coded synonym semantic representation through this process.

[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) is sent to 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] Among them, MaxPool is a maximum pooling operation, which 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 the model from overfitting. d e Represents the output dimension of BiLSTM.

[0101] S30103: Construct a synonym fusion attention module: First, use the electronic medical record deep semantic representation H and the encoded synonym semantic representation 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 encoded synonym semantic representation 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 is calculated 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 of the electronic medical record H 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 Multi-head attention calculation is performed between the two. First, the attention score α is calculated. 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 a 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 scores 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 by double affine transformation; the formula is as follows:

[0113]

[0114] Among them, T represents the transpose operation and W is a learnable matrix.

[0115] (2) Obtaining initial prediction results: Based on the similarity scores of each label, the initial prediction results are obtained by 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, the remaining similarity scores are converted to binary values ​​according to 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 process formula 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 correction module: First, generate a candidate encoding set based on the similarity score and the initial prediction result. For a certain encoding combination in the candidate encoding 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 encoding; combine the reordering score and the similarity score to calculate the comprehensive score, and select the candidate encoding with the highest comprehensive score as the final prediction result.

[0124] (1) Generate a set of candidate codes: The goal is to use the similarity score and the initial prediction results to generate n s The most likely label combination is obtained by identifying the most uncertain prediction 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 most likely label combinations. s The label combinations are used as candidate encoding sets, n s is a manually set hyperparameter.

[0125] For example, in the MIMIC III-50 dataset:

[0126] First, the similarity score and the obtained threshold τ are sigmoid transformed, and then the n values ​​with the most uncertain difference between the two are calculated in turn. s The closer the value is to the threshold, the more uncertain the prediction is. s The other positions among 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 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 , Represents the 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 a random sequence: Randomly generate n for a coding combination in the candidate coding set t different orders, summing 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 corresponding 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 sum of n t different sequences constitute the random sequence O.

[0132] (3) Calculate the reordering score: First, receive the generated random order O, use the calculation method of the joint probability defined in S20401 to calculate the joint probabilities under different orders respectively, 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 , Represents the 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 this 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. Represents the initial forecast results The number of ICD codes in a certain code combination in the generated candidate code set.

[0138] S302: Training 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 coding corresponding to the electronic medical record text; when the model has not been 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 coding for the input electronic medical record text.

[0139] S30201: Calculate the cross entropy loss function: Calculate the cross entropy loss by combining the similarity score with the ICD code corresponding to the electronic medical record text. The formula is as follows:

[0140]

[0141] Among them, σ represents the sigmoid transformation, 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 the automatic ICD coding model according to the set hyperparameters on the automatic ICD coding model training data set constructed in S1; wherein, the hyperparameter refers to the parameter whose value needs to be manually set before starting the training process; the parameter cannot be automatically optimized through training; depending on the actual data set, the parameter needs to be manually set by the user.

[0143] The model proposed in the present invention 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 the present 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. In view of this technical problem, an overall model framework (automatic ICD coding model) is designed, such as Figure 1 As shown, it includes a text representation module, a coding 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 an automatic ICD coding model training data set, and the electronic medical record text in the automatic ICD coding model training data set is input into the text representation module; all ICD codes appearing in the automatic ICD coding model training data set are counted as input to the coding representation module; 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 and passed into 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 a single layer of smooth 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 upsamplings 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 the figure, downsampling, smoothing sampling and upsampling are cascaded 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 above optimized embedding representation, the deep semantic representation of the electronic medical record text is obtained, and the deep semantic representation of the electronic medical record text is sent to the synonym fusion attention module. The encoding representation module takes all ICD codes as input, uses the concept unique identifier CUI of the ICD code, and searches for its corresponding synonym concept in the unified medical language system UMLS. After obtaining the ICD code synonym description, BiLSTM is used to extract its semantic representation, and MaxPool is used to compress its dimension for subsequent use. After this process, the encoding synonym semantic representation is obtained and sent to the synonym fusion attention module. The synonym fusion attention module takes the deep semantic representation of the electronic medical record text and the encoding synonym semantic representation as input, and uses multi-head attention to make the two interact and fuse semantically to obtain the encoding fusion text representation; at the same time, the MaxPool operation is performed on the encoding synonym semantic representation to obtain the encoding fusion representation, and the encoding fusion text representation and the encoding representation are passed to the initial prediction module. The initial prediction module takes the encoding fusion text representation and encoding representation as input, calculates the similarity score of the two using double affine transformation, obtains the initial prediction result based on the similarity score using the dynamic threshold calculation method, and then passes the similarity score and the initial prediction result into the prediction correction module. The prediction correction module takes the similarity score, the initial prediction result and the training set label as input, first selects the encoding that is most likely to have a prediction error based on the similarity score, and "flips" the initial prediction result corresponding to the encoding, and repeats this operation to obtain a candidate encoding set; the masked autoencoder receives the training set label as input and performs pre-training. It uses a multi-layer perceptron as the basic architecture, simulates the dependency of different encodings in the training set labels by masking certain connections, and generates a random order set to reduce the model's dependence on the order of label combinations, and uses autoregressive decomposition to estimate the joint probability of the training set label combination; for a candidate encoding in the candidate encoding set, first generate a random order set, and calculate the joint probability under different orders, and then calculate the reordering score of the candidate encoding; combine the reordering score with the similarity score to calculate the comprehensive score, and select the candidate encoding with the highest comprehensive score as the final prediction result.

[0146] Embodiment 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, obtains coded synonym semantic representations and inputs them into the synonym fusion attention module;

[0152] The synonym fusion attention module semantically interacts and fuses the deep semantic representation of the electronic medical record text and the coded synonym semantic representation to obtain the coded fusion text representation and inputs it into the initial prediction module, and also obtains the coded fusion representation based on the coded 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 a 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] Embodiment 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] Embodiment 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, and when the program is executed by a processor, the steps of the method of embodiment 1 are performed.

[0159] The steps involved in the apparatus of the above embodiments 3 and 4 correspond to the method embodiment 1, and the specific implementation method can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in 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 may still be modified, or some or all of the technical features therein may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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 thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0162] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can 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 implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0164] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned 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: Obtaining the current electronic medical record text, inputting the electronic medical record text into a pre-trained automatic ICD encoding model for encoding, and obtaining 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, 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 encoding representation module searches for synonyms based on all ICD codes and extracts their semantic representations, obtains the semantic representations of the encoded synonyms and inputs them into the synonym fusion attention module; The synonym fusion attention module semantically interacts and fuses the deep semantic representation of the electronic medical record text and the coded synonym semantic representation to obtain the coded fusion text representation and inputs it into the initial prediction module, and also obtains the coded fusion representation based on the coded 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 as claimed in 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, and then the optimized embedded representation is 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 as claimed in 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 the electronic medical record text, firstly, two layers of downsampling are performed to extract high-level abstract features, then a single layer of smoothing sampling is performed to further enhance the consistency of the features, and finally two layers of upsampling are performed to restore the original feature dimension. 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.

4. The automatic ICD coding method based on hierarchical feature optimization and prediction correction as claimed in 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 by taking the encoded synonym semantic representation as the query vector of multi-head attention, dividing the deep semantic representation of the electronic medical record text into segments with the same number of attention heads, and taking the segments 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 as claimed in 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 by using double affine transformation to calculate the similarity score between the encoded fusion text representation and the encoded fusion representation, and obtains the initial predicted ICD code 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 as claimed in claim 1, characterized in that: The method of obtaining a candidate coding set based on similarity scores is specifically 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 as claimed in claim 1, characterized in that: The masked autoencoder adopts a multi-layer perception mechanism to estimate the joint probability of coding combinations in a candidate coding set in an autoregressive decomposition manner.

8. An automatic ICD coding system based on hierarchical feature optimization and prediction correction, characterized in that: 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, 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 encoding representation module searches for synonyms based on all ICD codes and extracts their semantic representations, obtains the semantic representations of the encoded synonyms and inputs them into the synonym fusion attention module; The synonym fusion attention module semantically interacts and fuses the deep semantic representation of the electronic medical record text and the coded synonym semantic representation to obtain the coded fusion text representation and inputs it into the initial prediction module, and also obtains the coded fusion representation based on the coded 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 in 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, characterized in that: When the processor executes the program, the steps in the automatic ICD encoding method based on hierarchical feature optimization and prediction correction as described in any one of claims 1-7 are implemented.

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

  • Speech signal processing using artificial intelligence

    US20240028838A1

Cited By

  • Dead cause chain automatic generation and root cause judgment support method and device fused with multi-model intelligent reasoning

    CN122158094A

  • Method and device for automatic generation of cause-of-death chain and determination of underlying cause of death based on intelligent inference of fusion multi-model

    CN122158094B