A medical data quantitative analysis method and system based on a medical diagnosis coding ontology hierarchical structure
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 赵颖旭
- Filing Date
- 2026-05-16
- Publication Date
- 2026-08-07
AI Technical Summary
尽管此类方法可通过数据学习捕捉编码间的共现关系,但存在以下缺陷:嵌入向量的每个维度均无法追溯至具体的ICD诊断节点,缺乏临床语义可解释性;嵌入空间依赖大规模预训练,在特定医疗数据集上的迁移效果不稳定;此类方法对所有诊断编码平等对待,无法实现主要诊断与其他诊断的非对称加权,无法体现临床上主要诊断主导疾病风险的实际规律
[0060]效果一:实现ICD多层级语义结构化表示并兼顾临床可溯源性。个案特征矩阵在充分利用ICD本体层级结构蕴含的临床语义的同时,保留了完整的节点级可溯源性;通过梯度递增能量注入使特征空间中编码节点间的距离与ICD本体树中的语义距离正相关;通过饱和叠加函数处理多诊断共存个案的路径重合问题,准确表达共病信号而不产生重复计数;所生成的特征矩阵同时作为步骤S3统计预测模型的输入特征,将ICD本体语义结构与住院风险及资源消耗标签估算紧密关联,实现从特征工程到风险量化的方法一致性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical data processing and disease risk quantification technology, specifically involving a method and system for medical data quantification analysis based on a hierarchical structure of medical diagnostic coding ontology. The method takes structured medical data containing major diagnoses and other diagnostic fields as input, and through three steps—S1 (case feature matrix generation), S2 (construction of acute and chronic disease labeling system and chronic disease index), and S3 (construction of node-level risk label system)—it produces a standardized risk label dictionary covering all medical diagnostic coding nodes and stratified by age and gender. This dictionary can be applied to scenarios such as commercial health insurance pricing, commercial health insurance underwriting, chronic disease classification, evaluation of chronic disease management intervention effects, and disease progression modeling and premium calculation. Background Technology
[0002] Limitations of existing ICD encoding feature representation methods.
[0003] The medical diagnostic coding system (represented by ICD-10) is the core foundation of medical data processing. ICD-10 is divided into five levels from top to bottom: chapters, sections, categories, subcategories, and details, with over 40,000 nodes in total. Each level has a strict ontology tree structure and medical semantic relationships. However, current technologies using ICD coding for quantitative analysis have failed to fully utilize the medical semantic information inherent in this ontology hierarchy.
[0004] In terms of feature representation, traditional methods typically treat each ICD encoding as an independent discrete symbol, constructing feature vectors using one-hot encoding or binary labeling. These methods treat all ICD encoding nodes equally, failing to reflect the closeness or distance between nodes in terms of medical semantics. This results in semantically similar diseases (different suborders within the same category) having the same distance in feature space as semantically completely different diseases (such as two diseases across different chapters), thus losing the clinical classification knowledge inherent in the ICD ontology's hierarchical structure.
[0005] Another approach draws on word vector techniques from natural language processing, using embedded representation learning methods such as ICD2Vec and Med2Vec to map ICD codes into dense, low-dimensional vectors. While such methods can capture co-occurrence relationships between codes through data learning, they suffer from the following drawbacks: each dimension of the embedded vector cannot be traced back to a specific ICD diagnostic node, lacking clinical semantic interpretability; the embedding space relies on large-scale pre-training, resulting in unstable transfer effects on specific medical datasets; and these methods treat all diagnostic codes equally, failing to achieve asymmetric weighting of primary diagnoses with other diagnoses, and thus failing to reflect the actual clinical pattern of primary diagnoses dominating disease risk.
[0006] Limitations of existing methods for classifying acute and chronic diseases.
[0007] Acute and chronic diseases differ significantly in their risk characteristics. Chronic diseases are characterized by long-term carriage, while acute diseases are new-onset events with no long-term risk. This difference has different implications for risk quantification: the risk of patients with chronic diseases should be assessed from the perspective of long-term disease carriage, while the risk of patients with acute diseases should be assessed based on the immediate onset of the disease.
[0008] However, existing technologies lack a systematic classification system for acute and chronic diseases that covers all ICD coding nodes. The Chronic Condition Indicator Refined (CCIR) tool published by the Agency for Healthcare Research and Quality (AHRQ) provides a reference for acute and chronic disease classification based on ICD-10-CM, but its original data is published in English and its coverage is limited to the US ICD-10 version (ICD-10-CM), making it unsuitable for medical data processing scenarios using the Chinese National Healthcare Security Administration's ICD-10 version. Existing technologies also lack a method for translating AHRQ English-labeled data and mapping it to the Chinese ICD-10 to construct a continuous chronic disease index covering all hierarchical nodes.
[0009] Limitations of existing risk labeling methods.
[0010] Existing methods for quantitative analysis of medical data share the following common shortcomings in the construction of risk labels.
[0011] First, there is a lack of disease-specific hospitalization rate labels. Because health insurance databases only contain records of hospitalized patients and lack data on people with pre-existing conditions who have not been hospitalized, current technology cannot directly construct disease-specific hospitalization rates for people with pre-existing conditions, resulting in a long-term lack of probabilistic dimensions for risk labels.
[0012] Secondly, the cost labels lack distribution information. Existing technologies typically use the average inpatient cost as the cost risk label, which only reflects the central tendency and cannot describe the dispersion of cost distribution, thus providing insufficient quantitative support for the risk of excess compensation.
[0013] The overall shortcomings of existing technologies.
[0014] In summary, existing technologies share common shortcomings in the following aspects: First, they fail to fully utilize the medical semantic information of the ICD ontology hierarchy to achieve structured feature representation; second, they lack a systematic chronic disease labeling method covering all ICD-10 nodes; third, they lack a modeling framework that uses case feature matrices as input to uniformly predict hospitalization risk probability and hospitalization resource consumption; and fourth, cost risk labels only provide the mean, lacking distribution information. These shortcomings collectively prevent existing technologies from providing a standardized, reliable, multi-dimensional risk label dictionary covering all ICD coding nodes for commercial health insurance underwriting and pricing, pre-existing condition risk assessment, and chronic disease management. Summary of the Invention
[0015] 1. The technical problem to be solved by the present invention.
[0016] Technical Issue 1: Insufficient utilization of clinical semantics in the ICD ontology hierarchy.
[0017] The Chinese medical insurance version of the ICD-10 coding system covers five ontology levels. Existing feature representation methods (one-hot encoding or embedding vectors) have two drawbacks: First, they treat all nodes equally, failing to reflect the semantic proximity between nodes, or although they can capture co-occurrence relationships, each dimension cannot be traced back to a specific ICD node, lacking clinical interpretability; second, they only perform simple feature superposition for cases with multiple co-existing diagnoses, failing to handle the overlapping and aggregation of diseases in the same system along the ontology-level path, leading to distortion of the representation of comorbidity signals. This invention proposes a case feature matrix generation method that uses the five-level ICD ontology hierarchy as the dimensional skeleton, performs gradient decay energy injection along the hierarchical path, and performs saturation superposition function processing on the overlapping coordinates of the path. While preserving clinical traceability, it achieves structured representation and comorbidity signal aggregation for cases with multiple co-existing diagnoses.
[0018] Technical Issue 2: The acute and chronic classification criteria for all nodes in the Chinese ICD-10 dataset are missing.
[0019] Acute and chronic diseases differ significantly in management methods and risk characteristics, making a systematic classification of acute and chronic diseases the foundation for risk quantification. Currently, China lacks an officially published ICD-10 classification standard for acute and chronic diseases. The internationally recognized AHRQ CCIR is published in English and its coverage is limited to the US ICD-10-CM version, making it impossible to directly correspond to the Chinese ICD-10 coding system. This invention proposes a three-step cascaded labeling method: translating AHRQ English-labeled data into Chinese and then performing semantic matching within the same language. This method constructs an acute and chronic disease classification system and a continuous chronic disease index covering all nodes of the Chinese ICD-10 system.
[0020] Technical Issue 3: Lack of methods for calculating hospitalization rates among people with pre-existing conditions based on diagnostic coding.
[0021] In commercial health insurance actuarial and risk underwriting scenarios, accurately estimating the hospitalization risk of specific disease patient groups is a core requirement. Using the entire population as the denominator results in a severely underestimated hospitalization rate; using the actual number of people with pre-existing conditions as the denominator requires independent epidemiological data on prevalence, which has long been lacking in China's medical data system and cannot be directly obtained from hospitalization data. Furthermore, existing technologies rely solely on simple frequency statistics when estimating hospitalization rates, failing to utilize disease comorbidity relationships and ICD hierarchical structure information, and thus failing to capture the differentiated impact of different disease combinations on hospitalization risk. This invention proposes a conditional probability framework using the frequency of the code appearing in the primary or other diagnoses within the full hospitalization data as the denominator, constructing a proxy denominator of the pre-existing condition population from within the hospitalization data; simultaneously, using the case feature matrix produced in step S1 as input to establish a statistical prediction model, introducing the ICD ontology hierarchical structure and comorbidity co-occurrence information into hospitalization risk estimation, thus solving the problems of unavailable denominator data and methodological fragmentation.
[0022] Technical Issue 4: Lack of distribution information for cost risk labels.
[0023] Existing technologies typically use the mean inpatient cost as a cost risk label, which only reflects the central tendency and cannot describe the dispersion of cost distribution. This invention proposes a method to establish a statistical prediction model and output cost quantiles using the case feature matrix produced in step S1 as input, thereby solving the problem of missing cost distribution information; for nodes with fewer than the preset minimum sample size, the estimation results of their superior level nodes are used to achieve complete coverage of all nodes with a simple and effective lower limit sample size mechanism.
[0024] 2. The technical solution of the present invention
[0025] The medical diagnostic coding system addressed in this invention is represented by ICD-10, which employs a strict five-level ontology hierarchy (the World Health Organization's ICD-10 hierarchy up to level 4, with level 5 being differentiated versions for various countries, regions, and institutions). The ICD-10 hierarchy from top to bottom is as follows: Chapter L1: The first level, which divides all disease diagnoses into 22 chapters, for example, E00-E90: endocrine, nutritional and metabolic diseases; L2 Section: The second level, which further subdivides the diseases within the chapter, totaling more than 200 sections. These are combinations of diseases that have certain similarities in clinical practice, for example, E10-E14: diabetes. L3 Category: The third level, which is a further subdivision of the previous level, is a three-digit code (letter + two numbers), for example, E11: type 2 diabetes; L4 Sub-category: The fourth level, the type is three-digit code + decimal point + 1 digit, which is the lowest level code in the World Health Organization version, for example, E11.5: type 2 diabetes with peripheral circulatory complications; L5 Detail: This is a further subdivision of the subcategory and is the final ICD-10 code. In my country, there are currently two main versions: National Medical Insurance Version 2.0 and Clinical Version 2.0. For example, E11.500x049 (National Medical Insurance Version 2.0) and E11.500x063 (Clinical Version) are different versions of the same diagnosis: type 2 diabetic Mannlein gangrene. The data processed in this invention is primarily based on the National Medical Insurance Version, but the method is applicable to any localized L5 version.
[0026] Technical Solution 1: Case Feature Matrix Generation Method (Step S1).
[0027] Using the ontology hierarchy of the medical diagnostic coding system as the dimensional framework, a multidimensional feature space covering all ICD coding nodes is constructed, and the diagnostic coding set of hospitalized cases is processed in the following two orderly steps.
[0028] Step 1: Gradient Decay Energy Injection. For each diagnostic code in a case, energy is injected along its ontology path from sub-category to chapter. The energy weight decreases as the level increases, ensuring that the distance between any two diagnostic codes in the feature space is determined by their branching level in the ontology tree, consistent with the intuitive judgment of disease system relevance in clinical practice. The gradient decay mechanism is designed based on the following: the higher the ICD ontology level (closer to the chapter level), the broader the corresponding disease classification and the lower the distinguishability from diseases of other systems; the lower the level (closer to the sub-category), the stronger the clinical specificity. Through the incremental allocation of increasing weights at higher levels, the distance between two coding nodes in the feature space is positively correlated with their semantic distance in the ICD ontology tree, achieving a quantitative expression of the ICD hierarchical structure.
[0029] Step Two: Coexisting Diagnostic Path Overlay. A saturated overlay function is applied to the overlapping coordinates of multiple diagnostic codes within a case. The merging weight monotonically increases with the number of coexisting diagnoses but does not exceed the upper limit of that coordinate. The mathematical properties of the saturated overlay function guarantee that: when a single diagnosis is activated, the merged weight equals the original weight; when multiple diagnoses are overlaid, the merged weight monotonically increases but does not exceed the upper limit of 1.0; and the marginal gain decreases with the increase of the number of coexisting diagnoses. This accurately simulates the actual clinical phenomenon where the risk of clustering of systemic diseases increases but does not expand indefinitely, avoiding the problem of inflated weights caused by simple linear overlay.
[0030] In the case feature matrix output by the above two-step ordered processing, any non-zero element can be traced back to the corresponding ICD node and its ontology hierarchical path, possessing complete clinical semantic traceability.
[0031] Technical Solution 2: Method for constructing the Chinese ICD-10 acute and chronic marker system (step S2).
[0032] The three-step cascaded labeling method is based on converting external chronic disease classification standards into Chinese before performing semantic matching in the same language, thus solving the problem that Chinese and English versions cannot be directly matched.
[0033] Step 1: Convert the clinical description text of the US ICD-10-CM L5 code in AHRQ CCIR into Chinese description; group the Chinese descriptions of the L5 codes under the L4 subcategory according to the proportion of chronic diseases, with values ranging from [0,1]. This step is a pure statistical aggregation, and the results are completely deterministic and reproducible.
[0034] Step 2: Direct labeling based on L4 consistency judgment (covering most codes). Those with a chronic disease ratio of 1.0 are directly labeled as having a chronic disease, and all their subordinate Chinese L5 codes inherit the chronic disease label; those with a ratio of 0.0 are directly labeled as having an acute disease; those with a ratio between 0 and 1 are labeled as needing further subdivision, and proceed to Step 3.
[0035] Step 3: For each subdivided node, perform semantic similarity matching between the Chinese clinical description text encoded with the Chinese ICD-10 L5 sub-code and the Chinese description text generated in Step 1. Match the Chinese L5 code with the semantically closest AHRQL5 code, inherit its acute / chronic markers, and output the mapping confidence score. Those with a confidence score lower than the preset threshold are manually reviewed and confirmed.
[0036] After completing the L4 and L5 level labeling, the labels are propagated upwards to L3 and L2 using the ICD-10 ontology hierarchy structure to form a fully hierarchical acute and chronic labeling dictionary, and a continuous chronic disease index is constructed for each node with a value range of [0,1].
[0037] Technical Solution 3: Node-level Tag System Construction Method (Step S3).
[0038] Using the case feature matrix produced in step S1 and the acute / chronic markers produced in step S2 as input, a node-level labeling system covering all ICD nodes is constructed, and outputs are layered and independent according to age group and gender category.
[0039] Category 1: Node Prevalence Rate: This category simulates the disease distribution of the entire population using all hospitalized cases. The prevalence rate of the coded node in the entire population is estimated by using the frequency of cases where the node appears in any field of the primary diagnosis or other diagnoses as the numerator and the total number of hospitalized cases as the denominator. This estimate assumes that the disease distribution in the hospitalized population approximates the disease distribution in the entire population, transforming the previously unobservable prevalence rate of the entire population into a statistic that can be directly calculated from the hospitalized data. This covers all coded nodes and lays the foundation for the denominator in subsequent hospitalization rate calculations.
[0040] The rationality of the hypothesis can be supported by external verification: the prevalence rate of the node population calculated by the method of this invention is compared with the prevalence rate data of similar diseases released by authoritative channels such as the China Health Statistics Yearbook and the Chronic Disease Monitoring System of the Center for Disease Control and Prevention. If the difference between the two is within a reasonable range, the statistical feasibility of using the hospitalized population as a proxy sample of the entire population is verified.
[0041] The prevalence rate calculation is performed independently at each level (L5, L4, L3, L2), and consistency quality control is performed using the ICD ontology hierarchy: the prevalence rate of a higher-level node should not be lower than the prevalence rate of any of its lower-level nodes. If the prevalence rate of a node at a certain level deviates abnormally, it indicates a problem in the data cleaning or encoding / collection process, requiring a data quality check.
[0042] Category 2: Node hospitalization risk probability label: Using the case feature matrix produced in step S1 as the input feature and the acute and chronic labels produced in step S2 as auxiliary labels, a statistical prediction model is established only for the coded nodes whose continuous chronic disease index produced in step S2 exceeds the preset threshold, and the following three labels are produced.
[0043] Node-based primary cause hospitalization probability: A dependent variable is constructed with the node appearing in the primary diagnosis field as 1 (otherwise 0). A statistical prediction model is established using the case feature matrix generated in step S1 as the independent variable to predict the probability of hospitalization due to the node itself as the primary diagnosis. The statistical meaning of the dependent variable is: in a patient population with a diagnosis containing this node, the conditional probability of hospitalization due to this node as the primary reason for seeking medical attention directly reflects the ability of the disease itself to drive hospitalization. Using the case feature matrix generated in step S1 as the independent variable allows ICD ontology hierarchical distance and disease co-occurrence information to be incorporated into the model, enabling differentiated estimation of the primary cause hospitalization probability for the same node under different comorbidity combinations, significantly improving accuracy compared to simple frequency statistics.
[0044] Acute disease nodes with a continuous chronic disease index below a preset threshold will not generate this label. Acute disease hospitalization is a new event, and there is no long-term disease state. The concept of a disease-carrying population is not valid—acute disease cases usually do not carry the diagnosis before hospitalization. The denominator constructed from hospitalized cases containing this node cannot represent the true size of the disease-carrying population. Forced estimation will produce statistically ambiguous results.
[0045] Chronic primary cause hospitalization probability of a node: Construct a dependent variable with the primary diagnosis field marked as chronic disease in step S2 as 1 and otherwise as 0, and establish a statistical prediction model with the case feature matrix produced in step S1 as the independent variable to predict the probability of chronic primary cause hospitalization in the disease population containing this node.
[0046] The dependent variable is defined differently from the dependent variable of the node's primary cause hospitalization probability: the dependent variable of the node's primary cause hospitalization probability takes the value 1 only when the primary diagnosis is exactly the node itself, while the dependent variable of the node's chronic primary cause hospitalization probability takes the value 1 when the primary diagnosis is any chronic disease, thus having a broader scope. The difference between the two reflects the additional risk contribution of the affected population to hospitalization due to other chronic diseases when the node exists as a comorbidity—for example, hypertensive patients are not only hospitalized directly for hypertension, but also for chronic complications such as cardiovascular and cerebrovascular diseases and kidney disease caused by hypertension. The latter is not included in the node's primary cause hospitalization probability, but is fully reflected in the node's chronic primary cause hospitalization probability.
[0047] Using the case feature matrix produced in step S1 as the independent variable, the ICD ontology hierarchy and the co-occurrence relationship of diseases are included in the estimation. Disease pairs with close hierarchical distance and high co-occurrence frequency automatically receive higher weights in the model for their associated hospitalization contribution, which truly reflects the clinical association strength between diseases and avoids the method defect of treating all chronic primary care patients equally.
[0048] All-cause hospitalization probability of a node: The hospitalization risk of a carrier during the observation period consists of two types of events: First, hospitalization due to the node and its associated chronic diseases, captured by the node's chronic primary cause hospitalization probability; Second, hospitalization due to acute events not directly related to the node, such as fractures or acute infections. This type of risk is prevalent in all populations and is unrelated to specific chronic disease carrier status. This invention decomposes the all-cause hospitalization probability into the above two statistically independent components, estimates them separately, and then combines them: Component 1, the predicted value of the node's chronic primary cause hospitalization probability, is produced by the above statistical prediction model and reflects the risk of hospitalization for chronic disease-related reasons for the carrier of the node; Component 2, the baseline acute primary cause hospitalization probability of the entire population, is calculated by dividing the frequency of cases in the total hospitalization data where the primary diagnostic field is marked as acute disease in step S2 by the total number of cases. It is unrelated to specific nodes and takes the same value for all nodes within the same age and gender stratification.
[0049] The two components are statistically independent—component one is estimated based on a subset containing the node, and component two is estimated based on the full dataset. They have no overlap and can be directly added to obtain the all-cause hospitalization probability estimate. The method relies solely on structured medical data, requiring no individual tracking data. Each component can be directly calculated within the same hospitalization dataset, exhibiting complete data self-consistency.
[0050] The third category: Node-based inpatient resource consumption labels. The core problem addressed by node-based inpatient resource consumption labels is that the resource consumption generated during hospitalization for the same disease node v varies significantly under different comorbid backgrounds—for example, the hospitalization costs for primary hypertension with diabetic nephropathy differ drastically from those for hypertension alone. Existing technologies typically use the average cost of the primary case at that node as the label, which fails to reflect the dispersion of cost distribution and cannot capture the differentiated impact of comorbid combinations on costs. This invention uses the case feature matrix generated in step S1 as the independent variable, incorporates the ICD ontology hierarchy structure and disease comorbidity co-occurrence information into cost estimation, and establishes a statistical prediction model to output quantile labels.
[0051] The model uses all cases containing node v as training samples, not limited to cases where v is the primary diagnostic factor. The statistical basis for this design is that when v appears in any diagnostic field of a case, the corresponding dimension of v in the case feature matrix produced in step S1 has non-zero activation, while the weight distribution of other diagnostic codes in the feature matrix reflects the differences in comorbidity combinations. Using all cases containing v as samples, the model can learn the difference in cost contribution of v under the roles of primary diagnostic factor and comorbidity factor, while simultaneously capturing the moderating effect of comorbidity combinations on cost through the X matrix, fully utilizing the hierarchical distance and comorbidity co-occurrence information encoded in step S1.
[0052] This invention produces the following four categories of inpatient resource consumption labels, and each label uses the case feature matrix produced in step S1 as the independent variable to establish an independent statistical prediction model.
[0053] Total Medical Expenses Label: Using total medical expenses as the dependent variable, this label outputs seven quantiles: P5, P10, P25, P50, P75, P90, and P95. The expense distribution is typically right-skewed. P50 reflects typical inpatient expense levels, while P90 to P95 reflect the tail risk of high expenses. This provides complete distribution information for sum assured setting and excess payout risk assessment, significantly improving the reliability of actuarial applications compared to the mean label.
[0054] Medical insurance payment label: Using medical insurance payment as the dependent variable, output the seven quantiles mentioned above. Medical insurance payment is constrained by medical insurance policies, and its distribution pattern differs from total medical expenses. Independent modeling can accurately reflect the actual payment burden of medical insurance, providing data support for the coordinated pricing of commercial health insurance and medical insurance.
[0055] Out-of-pocket expense label: Output the seven quantiles mentioned above, with out-of-pocket expenses as the dependent variable. Out-of-pocket expenses are the direct pricing basis for commercial health insurance underwriting and product design, and their quantile distribution determines the selection of actuarial parameters for deductible setting and reimbursement ratio.
[0056] Hospital stay duration label: Output the seven quantiles mentioned above with hospital stay duration as the dependent variable. Hospital stay duration is an important dimension of medical resource consumption, and together with cost labels, it forms a complete picture of hospital resource consumption, which can be used for bed-day cost breakdown and hospitalization cycle risk assessment.
[0057] For nodes whose number of cases is less than the preset minimum sample size, the estimated result of its parent-level node is used as the label output for that node. The minimum sample size is preset by the user according to the data scale and accuracy requirements, and applies to all labels from the first to the third category, serving as a unified guarantee mechanism covering all encoded nodes.
[0058] All the labels are output independently and hierarchically by age group and gender category.
[0059] 3. Beneficial effects of the present invention
[0060] Effect 1: Achieving multi-level semantic structured representation of ICD while ensuring clinical traceability. The case feature matrix fully utilizes the clinical semantics inherent in the hierarchical structure of the ICD ontology while preserving complete node-level traceability; gradient incremental energy injection makes the distance between encoded nodes in the feature space positively correlated with the semantic distance in the ICD ontology tree; a saturated superposition function is used to handle the path overlap problem in cases with multiple coexisting diagnoses, accurately expressing comorbidity signals without generating duplicate counts; the generated feature matrix also serves as the input feature of the statistical prediction model in step S3, closely linking the semantic structure of the ICD ontology with the estimation of hospitalization risk and resource consumption labels, achieving consistency in methodology from feature engineering to risk quantification.
[0061] Effect 2: A Chinese ICD-10 acute and chronic disease classification method is proposed, which involves first converting the data and then performing semantic matching within the same language. By converting AHRQ English-labeled data into Chinese and then performing semantic matching within the same language, the matching accuracy is improved compared to direct cross-language matching, filling the long-standing industry gap of the lack of a Chinese ICD-10 acute and chronic disease classification standard. A continuous chronic disease index is constructed based on the distribution of acute and chronic diseases at each lower-level node, expanding the acute and chronic attributes from binary labels to continuous quantities, providing a refined classification basis for subsequent hospitalization risk estimation.
[0062] Effect 3: Fills the gap in methods for estimating hospitalization rates among people with pre-existing conditions, and introduces the hierarchical structure of the ICD ontology and information on disease comorbidity and co-occurrence into hospitalization risk estimation. The denominator for the pre-existing condition population is constructed using the frequency relationships within hospitalization data, eliminating the need for independent epidemiological data on prevalence. A statistical prediction model is established using the case feature matrix generated in step S1 as input, automatically assigning higher association weights to disease pairs with close hierarchical distances and high comorbidity and co-occurrence frequencies in hospitalization risk estimation. This more accurately reflects the clinical association strength between diseases compared to simple frequency statistics. The all-cause hospitalization probability is decomposed into a chronic primary care component and an acute baseline component for the entire population. The former captures the hospitalization contribution of nodes and their associated diseases through the model, while the latter is directly calculated using the full dataset. The two components are statistically independent and can be directly added, achieving estimation solely based on structured medical data without requiring individual follow-up data.
[0063] Effect 4: Using the case feature matrix produced in step S1 as input, a statistical prediction model is established, integrating the ICD ontology hierarchy and comorbidity information into cost label estimation, capturing the cost distribution differences of the same node under different comorbidity backgrounds; outputting the complete quantiles of the cost distribution, making up for the shortcomings of existing technologies that only provide mean labels; for nodes with fewer than the preset minimum sample size, the estimation results of their superior level nodes are used to achieve full node coverage with a simple and effective sample size lower limit mechanism.
[0064] Effect 5: Full tags are output in layers by age group and gender category, meeting the common needs of medical and insurance companies for refined age and gender analysis, and has a wide range of applications.
[0065] Effect 6: The method is applicable to multiple versions of the ICD encoding system. This invention uses the internationally consistent ICD ontology level L4 and above as the calculation basis, and the differences of the localized L5 version are automatically handled through the sample size lower limit mechanism, making it applicable to all countries and regions using the ICD-10 encoding system. Detailed Implementation
[0066] The specific implementation methods of each step of the present invention are described in detail below. Each step embodiment is based on the same hospitalized case. The case is a hospitalized patient with type 2 diabetic foot disease complicated with multiple system diseases, whose basic information is as follows: gender: male, age: 62 years old (belonging to the 45-64 age stratum), admission date: March 15, 2024.
[0067] Primary diagnosis: E11.503 (type 2 diabetic foot); Other diagnoses: E11.200 (type 2 diabetes with renal complications), I10.x00 (essential hypertension), J20.900 (acute bronchitis), K11.204 (chronic parotitis), M11.100 (familial chondrocalcinosis).
[0068] (I) Step S1: Generation of case feature matrix
[0069] 1. Data foundation.
[0070] This invention uses inpatient medical record front page data as the basic data source, and the data used includes the following three information modules: The basic information module includes fields such as age (calculated from date of birth and date of admission), gender, date of admission, and date of discharge. The diagnostic information module contains 1 to 15 primary diagnoses and other diagnoses. Each case contains a maximum of 16 diagnostic codes, which serve as the raw input for generating the case feature matrix. The cost information module—containing three fields: total medical expenses, medical insurance payment expenses, and personal out-of-pocket expenses—serves as the data foundation for building the inpatient resource consumption label in step S3.
[0071] 2. ICD-10 five-level hierarchical structure benchmark.
[0072] This invention uses the ICD-10 five-level hierarchical structure as the dimensional framework of the feature space, from top to bottom: L1 Chapter (22 nodes), L2 Section (274 nodes), L3 Category (2048 nodes, three-digit encoding format), L4 Subcategory (10171 nodes, the lowest-level standard encoding of the WHO version), and L5 Detail (33304 nodes, localization adaptation layer for various countries), totaling 45841 nodes across the five levels. The technical solution of this invention is applicable to all encoding versions conforming to the ICD-10 five-level hierarchical structure, with levels L1 to L4 applicable to all international versions.
[0073] 3. Step S1-1: Gradient decay energy injection.
[0074] Using the ICD-10 five-level hierarchical structure as a dimensional framework, a sparse vector space covering all diagnostic nodes is established, with each dimension corresponding to a unique diagnostic node. The activation of any diagnostic code injects energy along its belonging path from the sub-category (L5) to the chapter (L1), with the weight coefficient increasing with the level. In this embodiment, the sub-category level (L5) injects 0.2 energy, the sub-category level (L4) injects 0.4 energy, the category level (L3) injects 0.6 energy, the section level (L2) injects 0.8 energy, and the chapter level (L1) injects 1.0 energy.
[0075] The distance between two diagnostic codes in the feature space is determined by their branching level in the ontology tree; the higher the branching level, the greater the distance, reflecting the similarity of the clinical disease systems. Any non-zero element can be traced back to its corresponding ICD node and its ontology level path.
[0076] [Example - Taking the primary diagnostic E11.503 as an example, the energy injected along the path is as follows] Similarly, the remaining five diagnostic codes are injected with energy along their respective paths, and each path is activated independently.
[0077] 4. Step S1-2: Saturation superposition of coexisting diagnostic paths.
[0078] The hierarchical paths of all diagnostic codes within a case are compared to identify overlapping positions of two or more diagnostic codes at the same hierarchical node. The following merging rule is adopted: Let there be n diagnostic codes at this coordinate position, and their activation weight values be w1, w2, ... w n The combined weights are: W = 1 − (1−w1)×(1−w2)×……×(1−w n ) The meaning of this formula is: when any diagnosis is activated alone, the combined weight is equal to the original weight of that diagnosis; when multiple diagnoses are activated at the same time, the combined weight is greater than any single weight but does not exceed 1.0; the contribution of each new diagnosis decreases to avoid infinite accumulation of weights.
[0079] [Example - Effect of Overlaying E11.503 and E11.200 Paths] E11.503 (Endocrine System, L1 Chapter 4), I10.x00 (Circulatory System, L1 Chapter 9), J20.900 (Respiratory System, L1 Chapter 10), K11.204 (Digestive System, L1 Chapter 11), M11.100 (Musculoskeletal System and Connective Tissue Diseases, L1 Chapter 13). At L1 and lower levels, there is no path overlap; each is activated independently, and path energies do not interfere with each other. See [link to relevant documentation]. Figure 2 .
[0080] (II) Step S2: Construction of Acute and Chronic Marker System and Chronic Disease Index
[0081] 1. Technical background and data sources.
[0082] The American Health and Human Development Institute (AHRQ) in the United States released CCIR, a chronic disease marker tool based on ICD-10-CM, through HCUP. CCIR provides acute / chronic binary classification annotations for all codes at the L5 level of the US ICD-10-CM. Its original data is published in English and is currently the main internationally recognized public chronic disease classification reference system. In China, neither the National Healthcare Security Administration nor the National Health Commission has released official acute and chronic classification documents covering the Chinese version of ICD-10, and AHRQ's English data cannot be directly mapped to the Chinese coding system of ICD-10. This invention proposes a method to first convert AHRQ's English-labeled data into Chinese and then perform semantic matching within the same language, solving the problem of direct correspondence between the English and Chinese versions. Compared to direct cross-language matching, this method improves matching accuracy and result stability.
[0083] 2. Step S2-1: Convert the English L5 tags of AHRQ to Chinese and aggregate them into L4.
[0084] The English clinical descriptions of the US ICD-10-CM L5 codes in AHRQ CCIR were converted into corresponding Chinese descriptions. Since the US and Chinese ICD-10 codes are highly consistent at the L4 subcategory level and above (both follow WHO international standards), the converted Chinese descriptions were aggregated and statistically analyzed according to the L4 subcategory: for each L4 node, the proportion of chronic markers in its subordinate codes was calculated, with values ranging from [0,1]. This step was purely statistical aggregation, involving no subjective judgment, and the results are completely deterministic and reproducible.
[0085] 3. Step S2-2: Directly mark based on L4 consistency judgment.
[0086] Perform a consistency check on the L4 chronic disease proportions obtained in step S2-1: those with a proportion of 1.0 are directly marked as chronic diseases, and all their subordinate Chinese L5 nodes inherit the chronic disease label; those with a proportion of 0.0 are directly marked as acute diseases; those with a proportion between 0 and 1 are marked as needing further subdivision and proceed to step S2-3. Most L4 nodes are homogeneous in terms of acute and chronic attributes, and this step can directly complete the labeling of most of the encodings.
[0087] [Example - Node Labeling Results in This Case]
[0088] 4. Step S2-3: Same-language semantic matching tags for nodes to be subdivided.
[0089] Step S2-2 completes the direct labeling of most L4 nodes, allowing step S2-3 to handle only L4 nodes with a mixture of acute and chronic labels. The core task of step S2-3 is to complete the acute / chronic labeling of each Chinese L5 sub-code under each L4 node to be subdivided, under the constraints of the L4 framework. This embodiment uses a large language model to perform semantic similarity calculation. Within the same L4 framework, it finds the highest-scoring AHRQ L5 corresponding code for each Chinese L5 code, inherits its acute / chronic labeling, and outputs a confidence score. Results with a confidence score lower than a preset threshold (0.70 in this embodiment) are marked as requiring manual review.
[0090]
Example – Semantic mapping results of 16 sub-categories under K11.2 (Salivary gland inflammation, L4)
[0091] 5. The hierarchical markers propagate upwards to construct a chronic disease index.
[0092] After completing the acute and chronic disease labeling at levels L4 and L5, the labels are propagated upwards to L3 and L2 using the ICD-10 ontology hierarchy, forming full-level coverage. Simultaneously, a continuous chronic disease index (CDI) is constructed for each ICD-10 node, with a value range of [0,1]. CDI(v) = Number of chronic child node cases / Total number of cases in all child nodes of this node The CDI is calculated using the actual number of hospitalized cases as the weight, rather than the number of codes, so that the CDI can reflect the proportion of chronic disease burden of that node in the actual clinical inpatient population. See [link to relevant documentation]. Figure 3 .
[0093] [Example - CDI Calculation Results for Each Node]
[0094] (III) Step S3: Construction of Node-Level Tag System
[0095] 1. Layered framework.
[0096] All labels generated in step S3 are calculated and stored independently by age group and gender category. Age is divided into 6 intervals: 0 years, 1-17 years, 18-44 years, 45-64 years, 65-74 years, and 75 years and above; gender is divided into male and female, forming a total of 12 independent strata. Each stratum is independent of the others. For nodes with a sample size less than the preset minimum sample size N, the estimated result of its parent-level node is used as the label output for that node. The following examples all use the 45-64 year old male stratum, consistent with the age and gender of the cases in this case. The total number of inpatient cases in this stratum is 462,318. This example sets the minimum sample size N=10, meaning that when the number of cases containing a node is less than 10, the estimated result of the parent-level node is used.
[0097] 2. Step S3-1: Prevalence rate of the node population.
[0098] The prevalence rate of a node population is based on the statistical assumption that the disease distribution in the hospitalized population approximates the disease distribution in the entire population. This transforms the prevalence rate of the entire population, which was originally not directly observable, into a statistic that can be directly calculated from the hospitalized data. For any coded node v: P(v) = n(v) / N Where n(v) is the frequency of cases of this node appearing in any field of the primary diagnosis or other diagnoses in the current stratum, and N is the total number of inpatient cases in this stratum. The prevalence rate is calculated independently at each level (L5, L4, L3, L2) and is used for consistency quality control using the ICD ontology hierarchy: the prevalence rate of a higher-level node should not be lower than the prevalence rate of any of its lower-level nodes.
[0099] [Example – Prevalence Calculation at Each Node (Stratified Males Aged 45-64, N=462,318)]
[0100] 3. Step S3-2: Node hospitalization risk probability label.
[0101] This step only generates labels for encoded nodes with a continuous chronic disease index (CDI) > 0.5 produced in step S2. For nodes with a CDI ≤ 0.5, acute hospitalization is a new event, and there is no long-term disease state; the concept of a disease-carrying population is not valid, and therefore no label is generated for this step.
[0102] This step uses the case feature matrix produced in step S1 as input features and the acute / chronic label produced in step S2 as auxiliary labels to build a statistical prediction model for all cases containing that node. This embodiment uses the LightGBM (LightGradient Boosting Machine) gradient boosting tree model to perform prediction. This model has good processing capabilities for high-dimensional sparse inputs and is suitable for the 45,841-dimensional sparse feature matrix produced in step S1.
[0103] Node-based primary cause hospitalization probability: A dependent variable is constructed with the node's presence in the primary diagnosis field set to 1 (otherwise 0). The case feature matrix generated in step S1 is used as the independent variable. A LightGBM binary classification model is trained on all cases containing the node to predict the probability of hospitalization for that node as the primary diagnosis. Compared to simple frequency proportions, the LightGBM model utilizes the ICD hierarchical distance and disease comorbidity information encoded in the X matrix to differentiate the primary cause hospitalization probability of the same node under different comorbidity combinations.
[0104] The probability of hospitalization due to chronic primary cause of a node is calculated as follows: A dependent variable is constructed with the primary diagnostic field marked as chronic disease in step S2 as 1, and otherwise 0. The case feature matrix generated in step S1 is used as the independent variable. A LightGBM binary classification model is trained on all cases containing the node to predict the probability of hospitalization due to chronic primary cause among individuals with the node. The dependent variable has a broader scope than the probability of hospitalization due to primary cause of a node: the probability of hospitalization due to primary cause of a node is 1 only when the primary diagnosis is exactly the node itself, while the probability of hospitalization due to chronic primary cause of a node is 1 regardless of the primary diagnosis. The difference between the two reflects the contribution of the node as a comorbidity to the risk of hospitalization for other chronic diseases.
[0105] The probability of hospitalization for all causes at a node is constructed by adding the model-predicted probability of hospitalization for chronic primary causes at the node to the baseline probability of hospitalization for acute primary causes in the entire population. H2(v) = P_model(primary diagnosis = chronic | x = v) + P(primary diagnosis = acute) Among them, P(principal diagnosis = acute) is calculated by dividing the frequency of cases with acute principal diagnosis in the full - volume data by the total number of cases in the full - volume data, which has nothing to do with specific nodes and takes the same value for all nodes within the same age - gender stratification. In the 45 - 64 - year - old male stratification of this embodiment: P(principal diagnosis = acute) = 50,855 / 462,318 = 0.110.
[0106]
Example - Hospitalization risk probability labels for each node (45 - 64 - year - old male stratification, LightGBM model)
[0107] 4. Step S3 - 3: Hospitalization resource consumption labels for nodes.
[0108] In this step, the case - feature matrix output by step S1 is used as the input feature, and a LightGBM quantile regression model is established for all cases containing the node. Taking the total medical cost, medical insurance payment cost, personal out - of - pocket cost, and length of hospitalization as the dependent variables respectively, seven quantile labels of P5, P10, P25, P50, P75, P90, and P95 are output.
[0109] The model uses all cases containing node v as the training samples, not limited to cases with v as the principal diagnosis. This design enables the dimension corresponding to v in the X matrix and other comorbidity dimensions to enter the model simultaneously, capturing the difference in the contribution of v to costs in the roles of principal diagnosis and comorbidity, as well as the adjustment effect of different comorbidity combinations on costs through the X matrix. LightGBM quantile regression directly outputs the specified quantile by setting the quantile loss function, without making parametric assumptions about the cost distribution, and is suitable for the right - skewed distribution characteristics of medical costs.
[0110] For nodes with the number of cases containing the node less than the preset minimum sample size N = 10, the estimation results of their superior - level nodes are borrowed as the label output for this node.
[0111]
Example - Total medical cost labels for each node (45 - 64 - year - old male stratification, unit: yuan)
[0112]
Example - P50 of medical insurance payment cost and personal out - of - pocket cost for each node (45 - 64 - year - old male stratification, unit: yuan)
[0113]
Example - Length - of - hospitalization labels for each node (45 - 64 - year - old male stratification, unit: days)
[0114] Figure 1 The flowchart of the overall method of this invention shows the execution order and output relationship of the three steps: step S1 (generating case feature matrix), step S2 (constructing acute and chronic labeling system and chronic disease index), and step S3 (constructing node-level labeling system).
[0115] Figure 2 This is a schematic diagram of the case feature matrix generation method in step S1, showing the five-level hierarchical structure of ICD and the gradient incremental energy injection logic, as well as the calculation process and merging weight results of the saturation superposition of multiple diagnostic coexistence paths.
[0116] Figure 3 The flowchart for the construction of the three-step cascaded acute and chronic disease marker system in step S2 shows the execution logic and branch paths of S2-1 (AHRQ English marker translation and collection), S2-2 (L4 consistency judgment direct marking), and S2-3 (same language semantic similarity matching), as well as the upward propagation and continuous chronic disease index construction process.
[0117] Figure 4 A data flow diagram is constructed for the node-level label system in step S3, showing the input sources, modeling methods, applicable node scope and output labels of the three types of labels: the first type (prevalence rate of node population), the second type (probability of hospitalization risk of node), and the third type (resource consumption of hospitalization of node), as well as the sparse node processing mechanism and the final dictionary output.
Claims
1. A method for quantitative analysis of medical data based on a hierarchical structure of medical diagnostic coding ontology, characterized in that, Using structured medical data containing primary and other diagnostic fields as input, the process includes the following steps: Step S1: Using the ontology hierarchy of the medical diagnostic coding system as the dimensional framework, construct a multidimensional feature space covering all coding nodes, and perform feature processing on the case diagnostic coding to generate a case feature matrix. Step S2: Using the publicly released medical diagnostic coding chronic disease classification system as a reference, construct an acute and chronic labeling system and a continuous chronic disease index covering all coding nodes through semantic matching and hierarchical aggregation; Step S3: Using the case feature matrix produced in Step S1 and the acute / chronic markers produced in Step S2 as input, construct a node-level labeling system covering all encoded nodes, including three types of labels: node population prevalence rate, node hospitalization probability, and node hospitalization resource consumption, and output them in a stratified manner by age and gender.
2. The method according to claim 1, characterized in that, Step S1 includes: Step S1-1: Construct a multidimensional feature space using the ontology hierarchy of the medical diagnostic coding system as the dimensional framework, so that the distance between any two coding nodes in the feature space is determined by their branching level in the ontology tree, and the higher the branching level, the greater the distance. Step S1-2: Path merging is performed on multiple diagnostic codes within a case. A saturated superposition function is applied to the coordinates of the overlapping paths. The merging weight increases monotonically with the number of coexisting diagnoses and does not exceed the upper limit of the coordinate.
3. The method according to claim 1, characterized in that, The construction of the acute and chronic marker system in step S2 includes the following three cascaded processes: Step S2-1: Convert the clinical description text of each code in the publicly released chronic disease classification data into Chinese description, and collect and statistically analyze the proportion of chronic diseases under each code by subcategory level. Step S2-2: Based on the consistency judgment of the suborder level, most nodes are directly marked as chronic or acute diseases, and only suborder level nodes with a mixture of acute and chronic diseases are entered into step S2-3. Step S2-3: Perform semantic similarity matching between the Chinese clinical description text at the level of the localized medical diagnostic coding system and the Chinese description text converted in step S2-1, inherit the corresponding emergency and chronic markers, and output the confidence score; Those with a confidence level below the preset threshold are subject to manual verification. A continuous chronic disease index is constructed based on the acute and chronic distribution of each node's subordinate nodes, with a value range of [0,1].
4. The method according to claim 1, characterized in that, Step S3 includes the following: Step S3-1, Prevalence of node in the population: Construct an estimate of the prevalence of the node in the entire population by using the frequency of cases in any field of the primary diagnosis or other diagnoses as the numerator and the total number of hospitalized cases as the denominator. Step S3-2, Node Hospitalization Probability Labels: Using the case feature matrix generated in Step S1 as input features and the acute / chronic disease markers generated in Step S2 as auxiliary labels, a statistical prediction model is established only for nodes whose continuous chronic disease index generated in Step S2 exceeds a preset threshold, producing the following three labels: Node primary cause hospitalization probability label: Construct a dependent variable with the node appearing in the primary diagnosis field as 1 and otherwise as 0, and use the case feature matrix produced in step S1 as the independent variable to predict the probability of the node itself being hospitalized as the primary diagnosis. Chronic primary cause hospitalization probability label: Construct a dependent variable with the primary diagnosis field marked as chronic disease in step S2 as 1, otherwise as 0, and use the case feature matrix produced in step S1 as the independent variable to predict the probability of chronic primary cause hospitalization. Node all-cause hospitalization probability label: constructed by adding the predicted value of the node chronic primary cause hospitalization probability label to the baseline hospitalization probability of acute primary cause in the entire population; the baseline hospitalization probability of acute primary cause is calculated by dividing the frequency of acute primary cause cases in the full data by the total number of cases in the full data, and is independent of the specific node; Step S3-3, Node Inpatient Resource Consumption Labels: Using the case feature matrix generated in step S1 as input features, establish statistical prediction models to produce the following four labels: Total medical cost label: Using total medical cost as the dependent variable and the case feature matrix generated in step S1 as the independent variable, a statistical prediction model is established, and quantiles are output. Medical insurance payment expense label: Using medical insurance payment expense as the dependent variable and the case feature matrix generated in step S1 as the independent variable, a statistical prediction model is established, and quantiles are output. Personal out-of-pocket expense label: Using personal out-of-pocket expense as the dependent variable and the case feature matrix produced in step S1 as the independent variable, a statistical prediction model is established, and quantiles are output. Hospital stay label: Using hospital stay as the dependent variable and the case feature matrix generated in step S1 as the independent variable, a statistical prediction model is established, and quantiles are output. All tags are output independently, categorized by age and gender. For nodes whose number of cases is less than the preset minimum sample size, the estimated results of their parent-level nodes are used as the label output for that node.
5. The method according to claim 4, characterized in that, Steps S1 to S3 jointly produce a node-level label dictionary, which covers all medical diagnostic coding nodes. Each node contains labels for the node's population prevalence, hospitalization probability, and hospitalization resource consumption quantile, constructed according to the method described in claim 4. Each continuous label is stored independently by age and gender. The dictionary constitutes a standardized data product, which is applicable to scenarios such as commercial health insurance pricing, commercial health insurance underwriting, chronic disease classification, evaluation of chronic disease management intervention effects, and disease progression modeling and premium calculation.
6. The method according to claim 1, characterized in that, The method is applicable to medical diagnostic coding systems that employ a hierarchical ontology structure, including the International Classification of Diseases, 10th Revision (ICD-10) and its localized versions in various countries.
7. A medical data quantitative analysis information system, characterized in that, include: The case feature matrix generation unit is used to execute steps S1-1 and S1-2 according to the method described in claim 2 to generate a case feature matrix. The chronic disease marker unit is used to perform steps S2-1 to S2-3 according to the method described in claim 3 to construct an acute and chronic marker system and a continuous chronic disease index; A tag construction unit is used to execute steps S3-1 to S3-3 according to the method described in claim 4 to construct a full set of node-level tags. A storage unit for storing the node-level tag dictionary according to claim 5.
8. A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the construction of a node-level risk label dictionary covering all medical diagnostic coding nodes; each node in the dictionary contains node population prevalence, node hospitalization probability, and node hospitalization resource consumption quantile labels constructed according to the method of claim 4, and each continuous label is stored independently in layers according to age and gender.