Electronic medical record disease classification coding method and device

By combining transfer learning and federated learning, electronic medical record data is preprocessed and multi-model voting is performed, which solves the problems of low disease coding accuracy and incomplete disease coverage in existing technologies. It achieves high accuracy and broad coverage of ICD-11 coding, adapts to the complex coding rules of ICD-11 and clinical context, and reduces labor costs.

CN121456060APending Publication Date: 2026-02-03THE CENTRAL HOSPITAL OF WUHAN (WUHAN NO 2 HOSPITAL WUHAN CANCER RESEARCH INSTITUTE)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511379241.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

In existing technologies, disease coding based on large models has low accuracy and incomplete coverage of diseases, making it difficult to adapt to the complex coding rules and clinical context of ICD-11, resulting in insufficient coding accuracy and potentially causing medical insurance disputes or statistical biases.

Method used

A combination of transfer learning and federated learning was adopted. Electronic medical record data was preprocessed, and a first-large model and multiple second-large models were used to match and adjust diagnostic information. Finally, the accurate ICD-11 code was determined by multi-model voting.

Benefits of technology

It significantly improves coding accuracy and coverage, reduces labor costs, ensures data consistency and integrity, supports the transition from ICD-10 to ICD-11, and features a parallel dual coding system to meet the needs of clinical research and medical insurance payment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456060A_ABST
    Figure CN121456060A_ABST
Patent Text Reader

Abstract

The invention provides an electronic medical record disease classification coding method and device, and the method comprises the steps: carrying out the preprocessing of electronic medical record data, and obtaining diagnosis and treatment information; inputting the diagnosis and treatment information and an external standard data set into the trained first large model, and outputting at least one piece of first diagnosis information; inputting the at least one piece of first diagnosis information and an external standard data set into a plurality of trained second large models, and respectively obtaining at least one piece of second diagnosis information output by each second large model; and judging whether the proportion of the same second diagnosis name in the first sequence and the second ICD-11 code combination in the plurality of second large models is greater than or equal to a specified threshold value or not, and if so, combining the same second diagnosis name in the first sequence and the second ICD-11 code combination as the main diagnosis. The invention provides an electronic medical record disease classification coding method and device, which are used for solving the problems of low coding accuracy and incomplete disease coverage in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of disease category coding, and more particularly to a method and apparatus for electronic medical record disease classification coding. Background Technology

[0002] The International Classification of Diseases (ICD-11), 11th edition, officially released by the World Health Organization (WHO) in 2019, is a globally unified standard for classifying diseases, injuries, and causes of death, and is currently the most authoritative diagnostic coding system in the global healthcare field. This classification standard employs a more flexible coding structure and hierarchical logic, supports multi-dimensional disease classification (such as symptoms, etiology, and anatomical location), and provides an open API interface. Through technological innovation and deep integration with clinical needs, ICD-11 has solved the problems of insufficient flexibility and incomplete coverage of ICD-10 in the digital age, significantly improving the quality and efficiency of medical data utilization.

[0003] Large-scale models are deep neural networks trained on massive amounts of data. They can receive input information (such as dialogue content), analyze context, and generate feedback, making them one of the core technologies in the current field of artificial intelligence. Most current mainstream large-scale models are general-purpose. Although these models have a certain common-sense understanding of ICD-11, their underlying training lacks specialized data in the field of disease coding (e.g., summarizing accurate clinical diagnoses from electronic medical records and establishing a mapping relationship between clinical diagnoses and codes). Their understanding of ICD-11 coding rules, the principles for selecting the primary diagnosis on the medical record cover page, and medical insurance diagnosis payment rules is relatively one-sided. Their semantic parsing of electronic medical record text and structured data is not yet precise, making it difficult to grasp the complex classification logic, coding rules, and clinical contextual relationships of ICD-11. This results in the model's inability to automatically deduce subsequent combination logic and its inability to adapt to application scenarios with complex coding rules. Ultimately, this leads to low coding accuracy and incomplete disease coverage, and may even cause medical insurance disputes or statistical biases. Summary of the Invention

[0004] This invention provides an electronic medical record disease classification coding method and apparatus to solve the problems of low coding accuracy and incomplete disease coverage in the prior art.

[0005] In a first aspect, the present invention provides an electronic medical record disease classification coding method, comprising:

[0006] Electronic medical record data is preprocessed to obtain diagnostic and treatment information, which includes disease description, disease diagnosis, examination results, and diagnostic and treatment process.

[0007] The diagnostic information and the external standard dataset are input into the trained first large model, and at least one first diagnostic information is output. The external standard dataset includes the ICD-11 rule base obtained through the public API interface of ICD-11. The first large model is trained based on transfer learning. The first diagnostic information includes a diagnostic information segment and its first diagnostic name combined with a first ICD-11 code.

[0008] The at least one first diagnostic information and the external standard dataset are input into multiple trained second large models to obtain at least one second diagnostic information output by each second large model. The multiple second large models are trained based on federated learning. The second diagnostic information includes the second diagnostic name and the second ICD-11 encoding combination and all diagnostic information segments.

[0009] Determine whether the proportion of the second diagnostic name and the second ICD-11 code combination that are the same in the first-ranked of the multiple second-large models are greater than or equal to a specified threshold. If not, adjust the multiple second-large models according to the second diagnostic information to which the first-ranked second diagnostic name and the second ICD-11 code combination belong. If yes, take the first-ranked identical second diagnostic name and the second ICD-11 code combination as the primary diagnosis. Then, determine whether the proportion of the second diagnostic name and the second ICD-11 code combination that are the same in other ranks of the multiple second-large models are greater than or equal to the specified threshold. If yes, take the other identical second diagnostic name and the second ICD-11 code combination as other diagnoses.

[0010] Optionally, the preprocessing of the electronic medical record data includes:

[0011] Determine whether the electronic medical record data is structured or unstructured;

[0012] If it is the structured data, the electronic medical record data is subjected to first data cleaning, data desensitization and data extraction. The first data cleaning includes NLP, data identification, missing value handling, outlier handling, duplicate value handling, data consistency handling, noise removal, text standardization, error and ambiguity handling, synonym replacement, terminology standardization and data normalization.

[0013] If it is unstructured data, the electronic medical record data undergoes a second data cleaning process, data desensitization, and data extraction. The second data cleaning process includes OCR and the first data cleaning process.

[0014] Optionally, the first large model is trained based on transfer learning, including:

[0015] The first large model was pre-trained using publicly available medical texts and the external standard dataset;

[0016] Obtain an electronic medical record dataset, which includes multiple sets of electronic medical record data;

[0017] The aforementioned preprocessing is performed on each set of electronic medical record data to obtain its diagnosis and treatment information;

[0018] All diagnosis and treatment information in the electronic medical record dataset is labeled with ICD-11 encoding.

[0019] The first large model was fine-tuned using all the diagnostic and treatment information annotated with the ICD-11 coded tags.

[0020] Optionally, the training of the multiple second-largest models based on federated learning includes:

[0021] The configuration parameters of the multiple second-largest models after independent training are uploaded to the global model. The independent training adds data augmentation strategies on the basis of the transfer learning. The global model is a combination of the multiple second-largest models.

[0022] The global model synchronizes the latest configuration parameters to the multiple second-large models.

[0023] Optionally, adjusting the plurality of second major models based on the second diagnostic information belonging to the second diagnostic name and the second ICD-11 code combination ranked first includes:

[0024] Add the second diagnostic information, which is the combination of the first ranked second diagnostic name and the second ICD-11 code, to the training data;

[0025] The multiple second-largest models were then trained using the new training data.

[0026] Optional, also includes:

[0027] Map the second ICD-11 code in the main diagnosis and the other diagnoses to the ICD-10 code;

[0028] Based on the Baseline dataset, determine whether the ICD-10 encoding is accurate. If not, adjust the multiple second-large models according to the primary diagnosis and the second diagnosis information to which the other diagnoses belong. The Baseline dataset includes different diagnosis names and their ICD-10 encodings.

[0029] Optionally, mapping the second ICD-11 code in the primary diagnosis and the other diagnoses to ICD-10 code includes:

[0030] Determine whether the second ICD-11 code in the main diagnosis and the other diagnoses has a corresponding ICD-10 code in the official mapping table;

[0031] If it exists, use the corresponding ICD-10 code as its ICD-10 code;

[0032] If it does not exist, determine whether the second ICD-11 code in the main diagnosis and the other diagnoses can be matched with an approximate chapter of ICD-10 from the ICD-10 rule base, which is obtained through the public API interface of ICD-10;

[0033] If possible, use the approximate section of the ICD-10 as its ICD-10 code;

[0034] If not, its ICD-10 code is empty.

[0035] In a second aspect, the present invention provides an electronic medical record disease classification coding device, comprising:

[0036] The preprocessing module is used to preprocess electronic medical record data to obtain diagnostic and treatment information, which includes disease description, disease diagnosis, examination results, and diagnostic and treatment process.

[0037] The first encoding module is used to input the diagnosis and treatment information and the external standard dataset into the trained first large model and output at least one first diagnostic information. The external standard dataset includes the ICD-11 rule base obtained through the public API interface of ICD-11. The first large model is trained based on transfer learning. The first diagnostic information includes a diagnostic information segment and its first diagnostic name combined with the first ICD-11 encoding.

[0038] The second encoding module is used to input the at least one first diagnostic information and the external standard dataset into multiple trained second large models, and obtain at least one second diagnostic information output by each second large model. The multiple second large models are trained based on federated learning. The second diagnostic information includes a second diagnostic name and a second ICD-11 encoding combination and all diagnostic information segments.

[0039] The multi-model voting module determines whether the proportion of the second diagnosis name and the second ICD-11 code combination that are the same in the first-ranked second major model is greater than or equal to a specified threshold. If not, the multiple second major models are adjusted according to the second diagnosis information to which the first-ranked second diagnosis name and the second ICD-11 code combination belong. If yes, the first-ranked identical second diagnosis name and the second ICD-11 code combination are taken as the primary diagnosis. Then, the module sequentially determines whether the proportion of the second diagnosis name and the second ICD-11 code combination that are the same in other rankings of the multiple second major models is greater than or equal to the specified threshold. If yes, the other rankings of the identical second diagnosis name and the second ICD-11 code combination are taken as other diagnoses.

[0040] Thirdly, the present invention provides a computing device, comprising:

[0041] Memory, used to store program instructions;

[0042] The processor is configured to invoke program instructions stored in the memory and execute any of the methods described above according to the obtained program.

[0043] Fourthly, the present invention provides a computer-readable non-volatile storage medium including computer-readable instructions that, when read and executed by a computer, cause the computer to perform any of the methods described above.

[0044] The above-mentioned solution achieves significant improvements in key indicators such as accuracy, maintenance cost, and data dependency, providing a more comprehensive and scientific solution for intelligent coding; it reduces the ambiguity rate of complex disease coding, enabling refined descriptions from single diseases to disease association networks, and can describe complex diseases and health conditions in more detail, meeting the needs of clinical research, medical quality management, and medical insurance payment; it reduces the input of professional personnel (human costs are reduced by more than 40%); it provides real-time coding verification based on multi-model voting and baseline datasets, continuously optimizing the coding model, which can further improve dynamic accuracy and ensure data consistency and integrity; and it fully considers the necessity of parallel dual coding systems during the transition from ICD-10 to ICD-11. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 A flowchart illustrating an electronic medical record disease classification coding method provided in an embodiment of the present invention;

[0047] Figure 2 This is a schematic diagram of the structure of an electronic medical record disease classification and coding device provided in an embodiment of the present invention;

[0048] Figure 3 This is a schematic diagram of the mapping relationship table from ICD-10 National Clinical Version 2.0 to ICD-11 provided in an embodiment of the present invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0050] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0051] Figure 1 The flowchart of an electronic medical record disease classification coding method provided by an embodiment of the present invention is shown in detail, including:

[0052] S101. Preprocess the electronic medical record data to obtain diagnosis and treatment information.

[0053] Electronic medical record data refers to digital information such as text, symbols, charts, graphics, numbers, and images generated by medical staff using information systems during medical activities, and records that can be stored, managed, transmitted, and reproduced.

[0054] In one example, preprocessing electronic medical record data includes:

[0055] To determine whether electronic medical record data is structured or unstructured, structured data refers to data stored in traditional relational databases, which mainly stores various data in fields, such as the medical record cover sheet and laboratory test indicators. Unstructured data, on the other hand, is information stored in non-relational databases, which mainly consists of large blocks of text or images, such as imaging examination reports, pathology examination reports, admission records, discharge records, and progress notes.

[0056] If it is structured data, the electronic medical record data will undergo the first data cleaning, data desensitization and data extraction. The first data cleaning includes NLP, data identification, missing value handling, outlier handling, duplicate value handling, data consistency handling, noise removal, text standardization, error and ambiguity handling, synonym replacement, terminology standardization and data normalization.

[0057] If the data is unstructured, the electronic medical record data undergoes a second data cleaning process, including data desensitization and data extraction. The second data cleaning process includes OCR and the first data cleaning process.

[0058] NLP (such as Alibaba Cloud's NLP service) is used to perform semantic analysis on data, enabling batch data analysis and shortening the coding cycle (supporting processing of thousands of documents per day).

[0059] In one example, data identification includes identifying the meaning, data type, and range of values ​​of the data.

[0060] Structured data is typically stored in tabular form, with clearly defined column names and data types, such as database tables and Excel spreadsheets. By reviewing a data dictionary or data preview tool, you can understand the meaning of each column, its data type (e.g., integer, string, date), and value range. For example, in a medical electronic medical record database, the "Patient Age" column should be an integer, typically ranging from 0 to 120; the "Admission Date" column should be a date, conforming to date format specifications.

[0061] In one example, missing value handling is achieved through deletion, imputation, and model prediction.

[0062] Deletion method: When the percentage of missing values ​​in a row or column is small (e.g., less than 5%), and the missing values ​​have little impact on the overall data analysis, records or columns containing missing values ​​can be directly deleted. For example, when analyzing a patient's examination indicator, if individual patients have missing data for that indicator, the records corresponding to those patients can be deleted.

[0063] Imputation methods: For numerical data, the mean, median, or mode can be used for imputation. For example, if the "Patient Age" column has missing values, the mean or median of the ages of other patients can be calculated and used to imput the data. For categorical data, the mode is often used for imputation. For example, if the "Patient Gender" column has missing values, the most frequent gender can be used to imput the data.

[0064] Model-based prediction: This method uses machine learning models, such as regression models and decision trees, to predict missing values ​​based on data from other relevant columns. For example, by combining data such as a patient's symptoms and medical history, a regression model can be used to predict the missing "blood pressure value".

[0065] In one example, outlier handling is achieved through statistical analysis and business rule-based judgment.

[0066] Statistical analysis: By calculating statistical measures such as the mean, standard deviation, and quartiles of the data, the normal range of the data is determined. For example, box plots are used to detect outliers in numerical data; if a data point exceeds 1.5 times the interquartile range, it may be an outlier.

[0067] Business rule judgment: Determine whether the data is abnormal based on business logic. In medical data, if the "Patient Body Temperature" column contains data exceeding 45℃, which is clearly inconsistent with human physiological characteristics, it can be judged as an outlier. For outliers, you can choose to correct (e.g., correct incorrectly entered body temperature data), delete, or treat it as a special case and handle it separately.

[0068] In one example, duplicate value handling is achieved through database queries or data analysis tools.

[0069] Use database query statements (such as the SQL SELECT DISTINCT statement) or data analysis tools (such as Excel's "Remove Duplicates" function) to find and delete completely duplicate records. When processing patient medical records, if multiple identical records are found, keep only one and delete the rest to avoid data redundancy affecting the analysis results.

[0070] In one example, data consistency processing includes format conversion of data with inconsistent formats.

[0071] Check the consistency of data formats, such as ensuring dates are formatted as "YYYY-MM-DD" and phone numbers as "XXX-XXXX-XXXX". Convert any inconsistent data formats. Also, ensure consistent data encoding to avoid data corruption or incomprehensibility due to encoding issues.

[0072] In one example, noise removal is achieved through special character and punctuation processing and stop word filtering.

[0073] Special Character and Punctuation Handling: Remove special characters (such as HTML tags, XML tags, @ symbols, # symbols, etc.), garbled characters, and unnecessary punctuation marks from the text. For example, use the regular expression re.sub(r'[^\w\s]', '', text) to remove non-alphanumeric and non-whitespace characters from the text.

[0074] Stop Word Filtering: Stop words are words that appear frequently in the text but have little impact on semantic expression, such as "的", "了", "是", etc. According to the specific task and language characteristics, use a stop word list (such as the English stop word list provided by the NLTK library, the Harbin Institute of Technology stop word list, etc.) to filter out stop words and reduce the amount of data and noise interference.

[0075] In one example, text normalization is achieved through case conversion and word form reduction and root extraction.

[0076] Case Conversion: Convert all text to uppercase or lowercase to avoid the same word being regarded as different due to case differences. For example, convert "Medical" and "medical" to lowercase "medical".

[0077] Word Form Reduction and Root Extraction: For English text, use a word form reduction tool (such as the WordNetLemmatizer in the NLTK library) to reduce words to their original forms, such as reducing "running" to "run"; use a root extraction tool (such as the Porter Stemmer in the NLTK library) to extract the roots of words, such as extracting "fishing" to "fish", to reduce the redundancy caused by lexical variants.

[0078] In one example, error and ambiguity handling is achieved through spelling checking and correction and ambiguity elimination.

[0079] Spelling Checking and Correction: Use a spelling checking tool (such as the PyEnchant library) to check for spelling errors in the text and correct them. In medical texts, accurate term spelling is crucial, such as correcting the spelling error of "pneumonia" (pneumonia).

[0080] Ambiguity Elimination: For ambiguous words or sentences, understand and process them in combination with the context. In medical record texts, some abbreviations may have multiple meanings, and their accurate meanings need to be determined according to the context. If necessary, a medical knowledge base can be used to assist in judgment.

[0081] Synonym replacement means replacing multiple words with the same meaning with a unified word, such as replacing "心肌梗死" with "心梗".

[0082] Term Standardization means describing the same disease with standard terms, such as the standard term for "T2DM" is "2型糖尿病".

[0083] Data normalization involves selecting appropriate normalization techniques to process data based on its distribution characteristics. Normalization techniques include linear scaling, Z-score scaling, and log scaling.

[0084] After the first data cleaning, the data will be stored in a unified format such as XML or JSON.

[0085] OCR is used to recognize handwritten, image, or photographic data and extract text information.

[0086] The purpose of data cleaning is to achieve data standardization, which includes unified data element standards, laboratory data standardization, and adherence to shared document specifications.

[0087] Unified data element standards: Adopt national or international standards, such as WS 363-2011 "Catalogue of Health Information Data Elements", WS 445-2014 "Basic Dataset of Electronic Medical Records", WS 364-2011 "Value Domain Codes for Health Information Data Elements", etc.

[0088] Laboratory data standardization: For laboratory data, a dedicated Laboratory Information Management System (LIMS), such as WhiteCode LIMS, can be used to unify data from different sources into a standard format through automated data collection, cleaning, transformation and normalization.

[0089] Follow the standards for shared documents, such as WS / T 482-2016 "Standard for the Compilation of Health Information Sharing Documents" and WS / T 500-2016 "Standard for Electronic Medical Record Sharing Documents".

[0090] Patients' personal identification information (such as ID number, name, phone number, email address, etc.) in electronic medical record data needs to be protected and data anonymization is required to remove sensitive information.

[0091] In one example, data desensitization is achieved through replacement desensitization, encryption desensitization, obfuscation desensitization, hash desensitization, and simulation desensitization.

[0092] Replacement desensitization: Replace sensitive information with fictitious or randomly generated data, such as replacing ID card numbers with random number strings that meet the format requirements;

[0093] Encryption and desensitization: Sensitive data is encrypted, and only users with the key can decrypt it;

[0094] Obfuscation and desensitization: partially hiding or transforming sensitive data, such as replacing the middle digits of a phone number with asterisks (****);

[0095] Hash-based data masking: Data is converted into a fixed-length string using a hash algorithm, making it impossible to reverse-engineer the original data.

[0096] Simulation data masking: Generates new data that conforms to the original data encoding and verification rules, while retaining the data's business attributes.

[0097] In one example, data extraction is achieved using a BiLSTM-CRF model.

[0098] The BiLSTM-CRF model is widely used in named entity recognition of Chinese electronic medical records. It can identify medical entities such as diseases, symptoms, examinations, and treatments, and efficiently extract key information from multimodal medical data.

[0099] Specifically, medical information includes disease description, disease diagnosis, examination results, and treatment process.

[0100] S102. Input the diagnosis and treatment information and the external standard dataset into the trained first model, and output at least one first diagnosis information.

[0101] Specifically, the external standard dataset includes the ICD-11 rule base obtained through the public API interface of ICD-11.

[0102] The ICD-11 rule base contains over 55,000 unique entities and over 120,000 clinical terms, enabling the encoding of millions of clinical terms, covering not only disease diagnosis but also symptoms, injuries, external causes, signs, drugs, devices, histopathology, and more. Since the WHO regularly updates the ICD-11 rule base, it should also be updated regularly when deploying external standard datasets locally.

[0103] In one example, the primary model is either BERT or GPT-3.

[0104] Specifically, the first major model is trained based on transfer learning.

[0105] In one example, the first major model trained based on transfer learning includes:

[0106] The first model was pre-trained using publicly available medical texts and external standard datasets to learn basic medical semantics. The publicly available medical texts could be PubMed literature or MIMIC-III.

[0107] Obtain the electronic medical record dataset, which includes multiple sets of electronic medical record data;

[0108] Each set of electronic medical record data is preprocessed to obtain its diagnosis and treatment information;

[0109] All diagnosis and treatment information in the electronic medical record dataset is labeled with ICD-11 encoding.

[0110] The first major model was fine-tuned using all diagnostic and treatment information annotated with ICD-11 coded tags.

[0111] In one possible implementation, it is recommended to accumulate at least 500 pieces of diagnostic and treatment information labeled with ICD-11 codes to fine-tune the first major model.

[0112] In one possible implementation, the loss function of the first large model is cross-entropy loss, and the optimizer is AdamW (learning rate = 2e-5).

[0113] By pre-training the first model using publicly available medical texts and external standard datasets, the initial accuracy target for the first model can be set between 65% and 70%.

[0114] Furthermore, multiple sets of electronic medical record data include virtual medical record data generated based on ICD-11 rules. For example, inputting the code "5A11" generates text containing typical symptoms.

[0115] Specifically, the first diagnostic information includes a diagnostic information segment and its first diagnostic name combined with a first ICD-11 code.

[0116] The diagnostic information segment is the information segment obtained by the first major model after classifying and decomposing the diagnostic and treatment information. The first major model outputs at least one diagnostic information segment based on the diagnostic and treatment information, and combines this with an external standard dataset to summarize a first diagnostic name and a first ICD-11 code combination for each diagnostic information segment. It is important to note that there is a one-to-one correspondence between the diagnostic name and the ICD-11 code.

[0117] The output layer of the first major model is a multi-label classification structure. When predicting samples, it sorts the output results from high to low probability.

[0118] In one possible implementation, the structure of the first diagnostic information is “{diagnostic information segment, name-code}”, where name-code is a combination of the first diagnostic name and the first ICD-11 code.

[0119] It should be noted that the ICD-11 encoding consists of a main code and several extension codes, which is the composite structure of the ICD-11 encoding. The main code is such as BA80.0, and the extension codes are such as the specific anatomical part code XA9FX9.

[0120] After each training session, the top-1 results (i.e., the most frequently occurring results) and top-3 results (i.e., the three most frequently occurring results) obtained from all training sessions are statistically analyzed. The accuracy of the top-1 results and top-3 results is used as a validation metric to determine whether to optimize the first-largest model. Optimization strategies include dynamically adjusting class weights and introducing the FocalLoss step to increase the learning difficulty of difficult samples.

[0121] Dynamically adjust class weights: Count the number of all classes obtained in this training and calculate the weight of each class. Label all samples for the next training session according to the weight of each class.

[0122] FocalLoss is introduced to alleviate the learning difficulty of hard samples: During the model initialization and testing phase, after adjusting the model structure and setting other training parameters, the original loss function (such as the cross-entropy loss mentioned above) is replaced with FocalLoss. Each time the loss is calculated, the FocalLoss function is used to calculate the model output and the true label. By adjusting the focusing parameter γ, the learning weights for hard and easy-to-classify samples are controlled, thus alleviating the learning difficulty of hard samples.

[0123] S103. Input at least one first diagnostic information and an external standard dataset into multiple trained second-large models, and obtain at least one second diagnostic information output by each second-large model.

[0124] Multiple second-largest models can be either homogeneous or heterogeneous.

[0125] In one example, the second largest heterogeneous models are BERT (excels at short text semantic understanding), RoBERTa (enhances robustness through dynamic masking), T5 (supports generative tasks such as extended code derivation), BiLSTM-CRF (specializes in entity recognition and term matching), and knowledge-enhanced models (such as DeepSeek-v3).

[0126] In one example, the loss functions of multiple second-largest models include weighted cross-entropy loss and contrastive loss. Weighted cross-entropy loss is used to adjust the weights based on encoding frequency, while contrastive loss is used to force the model to distinguish similar encodings.

[0127] Specifically, several of the second-largest models are trained based on federated learning.

[0128] In one example, multiple second-largest models trained based on federated learning include:

[0129] The configuration parameters of multiple second-largest models are uploaded to the global model after independent training. Independent training incorporates data augmentation strategies on top of transfer learning, and the global model is a combination of multiple second-largest models.

[0130] The global model synchronizes the latest configuration parameters to multiple second-large models.

[0131] Data augmentation strategies enhance the capabilities of several second-largest models. These strategies include adversarial attacks, word order shuffling, cropping, adding external knowledge to external standard datasets, and adding localized encoding rules to external standard datasets.

[0132] Adversarial attacks: Adversarial perturbations are generated through gradient backpropagation and added to the original embedding matrix to generate adversarial examples, thereby enhancing the robustness of the model.

[0133] Word order shuffling: By shuffling the word order, the model's understanding of semantics is ensured to be unaffected by word order. For example, by taking advantage of the feature in BERT that explicitly specifies the position through position embedding, the positionid can be directly shuffled to change the order of words in the text, allowing the model to learn the semantic expression under different word orders.

[0134] Pruning: This is divided into token pruning and feature pruning. When pruning a token, the corresponding embedding is set to 0. When pruning certain features, the corresponding column in the embedding matrix is ​​set to 0 to change the input features.

[0135] Add external knowledge to the external standard dataset: External knowledge includes encoding rule data obtained by filtering the publicly crawled web page dataset Common Crawl and encoding-related literature (such as SNOMED CT terminology relationships).

[0136] Add localized coding rules to external standard datasets: Localized coding rules refer to rules such as avoiding special codes and prioritizing certain diagnoses. These rules are adjustments made according to the requirements of medical administration and medical insurance at different times. They are time-sensitive and specific. Localized coding rules include the principle of selecting the main diagnosis on the medical record homepage and the medical insurance diagnosis payment rules.

[0137] It should be noted that multiple secondary models reside on local servers, while the global model resides on a central server. The global model only records the configuration parameters of the multiple secondary models and synchronizes the latest configuration parameters to the multiple secondary models each time to ensure knowledge sharing.

[0138] Specifically, the second diagnostic information includes the second diagnostic name and the second ICD-11 code combination, as well as all diagnostic information segments.

[0139] In one possible implementation, the structure of the second diagnostic information is “{name-code, all diagnostic information segments}”, where name-code is a combination of the second diagnostic name and the second ICD-11 code.

[0140] Each second-large model combines disease connotation descriptions, included and excluded information, and post-combination information from the external standard dataset to match, correct, merge, and calculate probabilities for all first-diagnostic information, thereby obtaining all second-diagnostic information, and sorting all second-diagnostic information from high to low probability.

[0141] For example, the output of the first large model is:

[0142] Diagnostic information segment 1, name1-code1

[0143] Diagnostic information segment 2, name1-code1

[0144] Diagnostic information segment 3, name2-code2

[0145] Diagnostic information segment 4, name3-code3;

[0146] The output of the first major model is used as the input of the second major model. The second major model matches the input, that is, it determines whether each segment of diagnostic information in the input belongs to the diagnostic description contained in its name-code.

[0147] 1) If each input diagnostic information segment belongs to the diagnostic description contained in its name-code, it means that the output of the first major model is accurate, that is:

[0148] name1-code1, Diagnostic Information Segment 1, true

[0149] name1-code1, Diagnostic information segment 2, true

[0150] name2-code2, diagnostic information segment 3, true

[0151] name3-code3, diagnostic information segment 4, true.

[0152] The second model does not require error correction; it only needs to perform merging and probability calculation. The probability of name-codes is initially evenly distributed according to their quantity. When diagnostic information segments belonging to the same name-code are merged, the probabilities are correspondingly added together, that is:

[0153] name1-code1, Diagnostic Information Segment 1, Diagnostic Information Segment 2, 50%

[0154] name2-code2, diagnostic information segment 3, 25%

[0155] name3-code3, diagnostic information segment 4, 25%.

[0156] The second model sorts names from highest to lowest probability, and then randomly sorts them when two name-codes have the same probability. The final output is:

[0157] name1-code1, Diagnostic Information Segment 1, Diagnostic Information Segment 2

[0158] name2-code2, Diagnostic Information Segment 3

[0159] name3-code3, diagnostic information segment 4;

[0160] 2) If an input diagnostic information segment does not belong to the diagnostic description contained in its name-code, but belongs to the diagnostic description contained in another name-code of the first main model output, it indicates that the output of the first main model has a slight error, that is:

[0161] name1-code1, Diagnostic Information Segment 1, true

[0162] name1-code1, Diagnostic information segment 2, true

[0163] name2-code2, diagnostic information segment 3, false

[0164] name3-code3, diagnostic information segment 4, true.

[0165] The second major model needs to correct the name-code of diagnostic information segment 3, determining whether diagnostic information segment 3 belongs to the diagnostic description contained in other name-codes output by the first major model. After the determination, it is found that diagnostic information segment 3 belongs to the diagnostic description contained in name1-code1. Then, merging and probability calculation are performed, that is:

[0166] name1-code1, Diagnostic Information Segment 1, Diagnostic Information Segment 2, Diagnostic Information Segment 3, 75%; name3-code3, Diagnostic Information Segment 4, 25%

[0167] The final output after sorting the second largest model is:

[0168] name1-code1, Diagnostic information segment 1, Diagnostic information segment 2, Diagnostic information segment 3, name3-code3, Diagnostic information segment 4;

[0169] 3) If an input diagnostic information segment does not belong to the diagnostic description contained in its name-code, nor to the diagnostic description contained in other name-codes of the first large model output, it indicates that the first large model output has a serious error, i.e.:

[0170] name1-code1, Diagnostic Information Segment 1, false

[0171] name1-code1, diagnostic information segment 2, false

[0172] name2-code2, diagnostic information segment 3, true

[0173] name3-code3, diagnostic information segment 4, true.

[0174] The second major model needs to correct the name-codes of diagnostic information segments 1 and 2. First, it determines whether diagnostic information segments 1 and 2 belong to the diagnostic descriptions contained in other name-codes output by the first major model. After this determination, it is found that diagnostic information segment 1 does not belong to the diagnostic descriptions contained in other name-codes output by the first major model, while diagnostic information segment 2 belongs to the diagnostic descriptions contained in name2-code2. Then, it searches the external standard dataset to find which name-code contains the diagnostic description for diagnostic information segment 1. The search yields its name-code as name4-code4. Finally, it performs merging and probability calculation: name2-code2, diagnostic information segment 3, diagnostic information segment 2, 50%.

[0175] name3-code3, diagnostic information segment 4, 25%

[0176] name4-code4, diagnostic information segment 1, 25%

[0177] The final output after sorting the second largest model is:

[0178] name2-code2, diagnostic information segment 3, diagnostic information segment 2name3-code3, diagnostic information segment 4

[0179] name4-code4, diagnostic information segment 1.

[0180] It should be noted that since the first diagnostic name and the first ICD-11 code combination output by the first large model may not be accurate, the second diagnostic name and the second ICD-11 code combination output by the second large model may not be the same as the first diagnostic name and the first ICD-11 code combination output by the first large model. However, all diagnostic information segments output by the second large model must be the same as all diagnostic information segments output by the first large model.

[0181] S104. Determine whether the proportion of the second diagnosis name and the second ICD-11 code combination that are the same in the first-ranked second major model is greater than or equal to a specified threshold. If not, adjust the multiple second major models according to the second diagnosis information to which the second diagnosis name and the second ICD-11 code combination belong. If yes, take the same second diagnosis name and the second ICD-11 code combination that are the first-ranked as the primary diagnosis. Then, determine whether the proportion of the second diagnosis name and the second ICD-11 code combination that are the same in other rankings of the multiple second major models is greater than or equal to a specified threshold. If yes, take the same second diagnosis name and the second ICD-11 code combination that are the same in other rankings as other diagnoses.

[0182] By setting a specified threshold, multi-model voting was implemented, which effectively ensured the accuracy of ICD-11 coding in the main diagnosis and other diagnoses.

[0183] In one example, the threshold is specified as 60%.

[0184] In one example, adjusting multiple second-large models based on the second diagnostic information corresponding to the first-ranked second diagnostic name and the second ICD-11 code combination includes:

[0185] Add the second diagnostic information belonging to the second diagnostic name ranked first and the second ICD-11 code combination to the training data to trigger incremental learning (e.g., updated weekly);

[0186] Multiple second-largest models were trained using new training data to achieve focused optimization for high-frequency error scenarios (such as coding confusion in gestational diabetes).

[0187] It should be noted that when the proportion of second diagnostic names and second ICD-11 code combinations that are the same in other sorts is less than a specified threshold, all second diagnostic names and second ICD-11 code combinations in other sorts will be directly ignored.

[0188] The above solution can improve the accuracy of automated coding (i.e. the accuracy of the Top-3 results in the second ICD-11 coding) to over 92% within 6-8 iteration cycles, while reducing the workload of manual review by 30%.

[0189] Although ICD-11 significantly improves the granularity of clinical diagnosis, the exploitability of research data, and the accuracy of health policy formulation through its multi-axis coding architecture (fusion of etiology / pathology / environment), structured terminology expansion (addition of SNOMED-CT related fields), and dynamic update mechanism, the current healthcare system's institutional inertia (such as DRG / DIP payment for medical insurance, hospital accreditation, and disease spectrum statistics) heavily relies on the historical data framework of ICD-10. Therefore, by evaluating the accuracy of ICD-10 coding, the accuracy of ICD-11 coding can be assessed to some extent, thereby validating the effectiveness of multiple secondary models. This also fully considers the necessity of parallel dual coding systems during the transition from ICD-10 to ICD-11.

[0190] In one example, an electronic medical record disease classification coding method provided by an embodiment of the present invention further includes:

[0191] Map the second ICD-11 code in the primary diagnosis and other diagnoses to ICD-10 codes;

[0192] Based on the baseline dataset, determine whether the ICD-10 encoding is accurate. If not, adjust multiple secondary models according to the primary diagnosis and the secondary diagnosis information to which other diagnoses belong. The baseline dataset includes different diagnosis names and their ICD-10 encodings.

[0193] Different hospitals and regions can use local historical anonymized data to build a baseline dataset to avoid differences in effectiveness caused by regional differences and differences in clinical terminology.

[0194] Furthermore, mapping the second ICD-11 code in the primary diagnosis and other diagnoses to the ICD-10 code includes:

[0195] Determine whether the second ICD-11 code in the primary diagnosis and other diagnoses has a corresponding ICD-10 code in the official mapping table;

[0196] If it exists, use the corresponding ICD-10 code as its ICD-10 code;

[0197] If it does not exist, determine whether the second ICD-11 code in the main diagnosis and other diagnoses can be matched with an approximate chapter of ICD-10 from the ICD-10 rule base. The ICD-10 rule base is obtained through the public API interface of ICD-10.

[0198] If possible, use an approximate section of ICD-10 as its ICD-10 code;

[0199] If not, its ICD-10 code is empty.

[0200] In one example, the official mapping table includes the WHO-published ICD-11→ICD-10 cross-mapping document and the mapping relationship table from the ICD-10 National Clinical Version 2.0 to ICD-11 completed by institutions such as Peking Union Medical College Hospital (e.g., Figure 3 (As shown).

[0201] It is important to note that it is recommended to maintain at least three historical versions of the primary model and multiple secondary models to ensure a quick rollback when the latest version of the metric declines.

[0202] The above-mentioned solution achieves significant improvements in key indicators such as accuracy, maintenance cost, and data dependency, providing a more comprehensive and scientific solution for intelligent coding; it reduces the ambiguity rate of complex disease coding, enabling refined descriptions from single diseases to disease association networks, and can describe complex diseases and health conditions in more detail, meeting the needs of clinical research, medical quality management, and medical insurance payment; it reduces the input of professional personnel (human costs are reduced by more than 40%); it provides real-time coding verification based on multi-model voting and baseline datasets, continuously optimizing the coding model, which can further improve dynamic accuracy and ensure data consistency and integrity; and it fully considers the necessity of parallel dual coding systems during the transition from ICD-10 to ICD-11.

[0203] Based on the same inventive concept Figure 2 The present invention illustrates the structure of an electronic medical record disease classification coding device according to an embodiment of the present invention, comprising:

[0204] The preprocessing module is used to preprocess electronic medical record data to obtain diagnostic and treatment information, which includes disease description, disease diagnosis, examination results, and diagnosis and treatment process.

[0205] The first encoding module is used to input the diagnosis and treatment information and the external standard dataset into the trained first large model and output at least one first diagnostic information. The external standard dataset includes the ICD-11 rule base obtained through the public API interface of ICD-11. The first large model is trained based on transfer learning. The first diagnostic information includes a diagnostic information segment and its first diagnostic name combined with the first ICD-11 encoding.

[0206] The second encoding module is used to input at least one first diagnostic information and an external standard dataset into multiple trained second large models, and obtain at least one second diagnostic information output by each second large model. The multiple second large models are trained based on federated learning. The second diagnostic information includes the second diagnostic name and the second ICD-11 encoding combination and all diagnostic information segments.

[0207] The multi-model voting module determines whether the proportion of the second diagnosis name and the second ICD-11 code combination that are the same in the first-ranked second-largest model is greater than or equal to a specified threshold. If not, the multiple second-largest models are adjusted according to the second diagnosis information to which the first-ranked second diagnosis name and the second ICD-11 code combination belong. If yes, the first-ranked identical second diagnosis name and the second ICD-11 code combination are taken as the primary diagnosis. Then, the module sequentially determines whether the proportion of the second diagnosis name and the second ICD-11 code combination that are the same in other rankings of the multiple second-largest models is greater than or equal to a specified threshold. If yes, the other identical second diagnosis names and the second ICD-11 code combinations are taken as other diagnoses.

[0208] Based on the same inventive concept, embodiments of the present invention provide a computing device, including:

[0209] Memory, used to store program instructions;

[0210] The processor is used to call program instructions stored in memory and execute the above methods according to the obtained program.

[0211] Based on the same inventive concept, embodiments of the present invention provide a computer-readable non-volatile storage medium, including computer-readable instructions, which, when read and executed by a computer, cause the computer to perform the above-described method.

[0212] Those skilled in the art will understand that embodiments of the present invention can be provided as methods or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0213] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0214] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0215] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0216] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention.

[0217] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A disease classification and coding method for electronic medical records, characterized in that, include: Electronic medical record data is preprocessed to obtain diagnostic and treatment information, which includes disease description, disease diagnosis, examination results, and diagnostic and treatment process. The diagnostic information and the external standard dataset are input into the trained first large model, and at least one first diagnostic information is output. The external standard dataset includes the ICD-11 rule base obtained through the public API interface of ICD-11. The first large model is trained based on transfer learning. The first diagnostic information includes a diagnostic information segment and its first diagnostic name combined with a first ICD-11 code. The at least one first diagnostic information and the external standard dataset are input into multiple trained second large models to obtain at least one second diagnostic information output by each second large model. The multiple second large models are trained based on federated learning. The second diagnostic information includes the second diagnostic name and the second ICD-11 encoding combination and all diagnostic information segments. Determine whether the proportion of the second diagnostic name and the second ICD-11 code combination that are the same in the first-ranked of the multiple second-large models are greater than or equal to a specified threshold. If not, adjust the multiple second-large models according to the second diagnostic information to which the first-ranked second diagnostic name and the second ICD-11 code combination belong. If yes, take the first-ranked identical second diagnostic name and the second ICD-11 code combination as the primary diagnosis. Then, determine whether the proportion of the second diagnostic name and the second ICD-11 code combination that are the same in other ranks of the multiple second-large models are greater than or equal to the specified threshold. If yes, take the other identical second diagnostic name and the second ICD-11 code combination as other diagnoses.

2. The method according to claim 1, characterized in that, The preprocessing of electronic medical record data includes: Determine whether the electronic medical record data is structured or unstructured; If it is the structured data, the electronic medical record data is subjected to first data cleaning, data desensitization and data extraction. The first data cleaning includes NLP, data identification, missing value handling, outlier handling, duplicate value handling, data consistency handling, noise removal, text standardization, error and ambiguity handling, synonym replacement, terminology standardization and data normalization. If it is unstructured data, the electronic medical record data undergoes a second data cleaning process, data desensitization, and data extraction. The second data cleaning process includes OCR and the first data cleaning process.

3. The method according to claim 1, characterized in that, The first major model, trained based on transfer learning, includes: The first large model was pre-trained using publicly available medical texts and the external standard dataset; Obtain an electronic medical record dataset, which includes multiple sets of electronic medical record data; The aforementioned preprocessing is performed on each set of electronic medical record data to obtain its diagnosis and treatment information; All diagnosis and treatment information in the electronic medical record dataset is labeled with ICD-11 encoding. The first large model was fine-tuned using all the diagnostic and treatment information annotated with the ICD-11 coded tags.

4. The method according to claim 1, characterized in that, The multiple second-largest models trained based on federated learning include: The configuration parameters of the multiple second-largest models after independent training are uploaded to the global model. The independent training adds data augmentation strategies on the basis of the transfer learning. The global model is a combination of the multiple second-largest models. The global model synchronizes the latest configuration parameters to the multiple second-large models.

5. The method according to claim 1, characterized in that, The adjustment of the multiple second major models based on the second diagnostic information belonging to the second diagnostic name and the second ICD-11 code combination ranked first includes: Add the second diagnostic information, which is the combination of the first ranked second diagnostic name and the second ICD-11 code, to the training data; The multiple second-largest models were then trained using the new training data.

6. The method according to claim 1, characterized in that, Also includes: Map the second ICD-11 code in the main diagnosis and the other diagnoses to the ICD-10 code; Based on the Baseline dataset, determine whether the ICD-10 encoding is accurate. If not, adjust the multiple second-large models according to the primary diagnosis and the second diagnosis information to which the other diagnoses belong. The Baseline dataset includes different diagnosis names and their ICD-10 encodings.

7. The method according to claim 6, characterized in that, The step of mapping the second ICD-11 code in the primary diagnosis and the other diagnoses to the ICD-10 code includes: Determine whether the second ICD-11 code in the main diagnosis and the other diagnoses has a corresponding ICD-10 code in the official mapping table; If it exists, use the corresponding ICD-10 code as its ICD-10 code; If it does not exist, determine whether the second ICD-11 code in the main diagnosis and the other diagnoses can be matched with an approximate chapter of ICD-10 from the ICD-10 rule base, which is obtained through the public API interface of ICD-10; If possible, use the approximate section of the ICD-10 as its ICD-10 code; If not, its ICD-10 code is empty.

8. An electronic medical record disease classification and coding device, characterized in that, include: The preprocessing module is used to preprocess electronic medical record data to obtain diagnostic and treatment information, which includes disease description, disease diagnosis, examination results, and diagnostic and treatment process. The first encoding module is used to input the diagnosis and treatment information and the external standard dataset into the trained first large model and output at least one first diagnostic information. The external standard dataset includes the ICD-11 rule base obtained through the public API interface of ICD-11. The first large model is trained based on transfer learning. The first diagnostic information includes a diagnostic information segment and its first diagnostic name combined with the first ICD-11 encoding. The second encoding module is used to input the at least one first diagnostic information and the external standard dataset into multiple trained second large models, and obtain at least one second diagnostic information output by each second large model. The multiple second large models are trained based on federated learning. The second diagnostic information includes a second diagnostic name and a second ICD-11 encoding combination and all diagnostic information segments. The multi-model voting module determines whether the proportion of the second diagnosis name and the second ICD-11 code combination that are the same in the first-ranked second major model is greater than or equal to a specified threshold. If not, the multiple second major models are adjusted according to the second diagnosis information to which the first-ranked second diagnosis name and the second ICD-11 code combination belong. If yes, the first-ranked identical second diagnosis name and the second ICD-11 code combination are taken as the primary diagnosis. Then, the module sequentially determines whether the proportion of the second diagnosis name and the second ICD-11 code combination that are the same in other rankings of the multiple second major models is greater than or equal to the specified threshold. If yes, the other rankings of the identical second diagnosis name and the second ICD-11 code combination are taken as other diagnoses.

9. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1-7 according to the obtained program.

10. A computer-readable non-volatile storage medium, characterized in that, It includes computer-readable instructions that, when read and executed by a computer, cause the computer to perform the method as described in any one of claims 1-7.