Add burden mapping files and landmark computation
This commit is contained in:
137
build_icd10_organ_label_mapping.py
Normal file
137
build_icd10_organ_label_mapping.py
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import csv
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
LABELS = Path("labels.csv")
|
||||||
|
OUT = Path("icd10_organ_label_mapping.csv")
|
||||||
|
|
||||||
|
|
||||||
|
ICD10_CHAPTERS = [
|
||||||
|
("A00", "B99", "I", "Certain infectious and parasitic diseases", "infection_immune"),
|
||||||
|
("C00", "D48", "II", "Neoplasms", "neoplasm"),
|
||||||
|
("D50", "D89", "III", "Diseases of the blood and immune mechanism", "hematologic_immune"),
|
||||||
|
("E00", "E90", "IV", "Endocrine, nutritional and metabolic diseases", "metabolic_endocrine"),
|
||||||
|
("F00", "F99", "V", "Mental and behavioural disorders", "mental_behavioral"),
|
||||||
|
("G00", "G99", "VI", "Diseases of the nervous system", "neurologic"),
|
||||||
|
("H00", "H59", "VII", "Diseases of the eye and adnexa", "sensory_eye"),
|
||||||
|
("H60", "H95", "VIII", "Diseases of the ear and mastoid process", "sensory_ear"),
|
||||||
|
("I00", "I99", "IX", "Diseases of the circulatory system", "cardiovascular"),
|
||||||
|
("J00", "J99", "X", "Diseases of the respiratory system", "respiratory"),
|
||||||
|
("K00", "K93", "XI", "Diseases of the digestive system", "digestive_liver"),
|
||||||
|
("L00", "L99", "XII", "Diseases of the skin and subcutaneous tissue", "skin_soft_tissue"),
|
||||||
|
("M00", "M99", "XIII", "Diseases of the musculoskeletal system", "musculoskeletal"),
|
||||||
|
("N00", "N99", "XIV", "Diseases of the genitourinary system", "genitourinary_renal"),
|
||||||
|
("O00", "O99", "XV", "Pregnancy, childbirth and puerperium", "pregnancy_reproductive"),
|
||||||
|
("P00", "P96", "XVI", "Certain conditions originating in the perinatal period", "perinatal"),
|
||||||
|
("Q00", "Q99", "XVII", "Congenital malformations", "congenital"),
|
||||||
|
("R00", "R99", "XVIII", "Symptoms, signs and abnormal findings", "symptoms_findings"),
|
||||||
|
("S00", "T98", "XIX", "Injury, poisoning and external causes", "injury_poisoning"),
|
||||||
|
("V01", "Y98", "XX", "External causes of morbidity and mortality", "external_causes"),
|
||||||
|
("Z00", "Z99", "XXI", "Factors influencing health status", "health_status_factors"),
|
||||||
|
("U00", "U99", "XXII", "Codes for special purposes", "special_purpose"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
ORGAN_OVERRIDES = [
|
||||||
|
("I60", "I69", "brain_vascular"),
|
||||||
|
("N17", "N19", "kidney"),
|
||||||
|
("K70", "K77", "liver"),
|
||||||
|
("E10", "E14", "diabetes_metabolic"),
|
||||||
|
("F00", "F09", "cognition_neuropsychiatric"),
|
||||||
|
("G30", "G32", "cognition_neurodegenerative"),
|
||||||
|
("H53", "H54", "sensory_vision"),
|
||||||
|
("H90", "H91", "sensory_hearing"),
|
||||||
|
("J40", "J47", "chronic_respiratory"),
|
||||||
|
("C00", "D48", "neoplasm"),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def _code_key(code: str) -> tuple[str, int, str]:
|
||||||
|
code = code.strip().upper()
|
||||||
|
match = re.match(r"^([A-Z])(\d{2})(?:\.?([A-Z0-9]+))?", code)
|
||||||
|
if not match:
|
||||||
|
raise ValueError(f"Invalid ICD-10 code: {code!r}")
|
||||||
|
letter, number, suffix = match.groups()
|
||||||
|
return letter, int(number), suffix or ""
|
||||||
|
|
||||||
|
|
||||||
|
def _code_in_range(code: str, start: str, end: str) -> bool:
|
||||||
|
c_letter, c_num, _ = _code_key(code)
|
||||||
|
s_letter, s_num, _ = _code_key(start)
|
||||||
|
e_letter, e_num, _ = _code_key(end)
|
||||||
|
if s_letter == e_letter:
|
||||||
|
return c_letter == s_letter and s_num <= c_num <= e_num
|
||||||
|
return (s_letter < c_letter < e_letter) or (
|
||||||
|
c_letter == s_letter and c_num >= s_num
|
||||||
|
) or (c_letter == e_letter and c_num <= e_num)
|
||||||
|
|
||||||
|
|
||||||
|
def _chapter_for_code(code: str) -> tuple[str, str, str]:
|
||||||
|
if not re.match(r"^[A-Z]\d{2}", code.strip().upper()):
|
||||||
|
return "", "", "unmapped"
|
||||||
|
for start, end, chapter_id, chapter_name, default_system in ICD10_CHAPTERS:
|
||||||
|
if _code_in_range(code, start, end):
|
||||||
|
return chapter_id, chapter_name, default_system
|
||||||
|
return "", "", "unmapped"
|
||||||
|
|
||||||
|
|
||||||
|
def _organ_system_for_code(code: str, default_system: str) -> str:
|
||||||
|
if default_system == "unmapped":
|
||||||
|
return "unmapped"
|
||||||
|
for start, end, organ_system in ORGAN_OVERRIDES:
|
||||||
|
if _code_in_range(code, start, end):
|
||||||
|
return organ_system
|
||||||
|
return default_system
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
rows = []
|
||||||
|
with LABELS.open(encoding="utf-8") as f:
|
||||||
|
for i, line in enumerate(f):
|
||||||
|
line = line.strip()
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
|
parts = line.split(maxsplit=1)
|
||||||
|
code = parts[0].strip().upper()
|
||||||
|
name = parts[1].strip() if len(parts) > 1 else ""
|
||||||
|
chapter_id, chapter_name, default_system = _chapter_for_code(code)
|
||||||
|
organ_system = _organ_system_for_code(code, default_system)
|
||||||
|
rows.append(
|
||||||
|
{
|
||||||
|
"token_id": i + 3,
|
||||||
|
"label_code": code,
|
||||||
|
"label_name": name,
|
||||||
|
"icd10_chapter_id": chapter_id,
|
||||||
|
"icd10_chapter_name": chapter_name,
|
||||||
|
"organ_system": organ_system,
|
||||||
|
"organ_weight": 1.0 if organ_system != "unmapped" else 0.0,
|
||||||
|
"match_source": "icd10_chapter_range",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
fieldnames = [
|
||||||
|
"token_id",
|
||||||
|
"label_code",
|
||||||
|
"label_name",
|
||||||
|
"icd10_chapter_id",
|
||||||
|
"icd10_chapter_name",
|
||||||
|
"organ_system",
|
||||||
|
"organ_weight",
|
||||||
|
"match_source",
|
||||||
|
]
|
||||||
|
with OUT.open("w", newline="", encoding="utf-8-sig") as f:
|
||||||
|
writer = csv.DictWriter(f, fieldnames=fieldnames)
|
||||||
|
writer.writeheader()
|
||||||
|
writer.writerows(rows)
|
||||||
|
|
||||||
|
print(f"labels: {len(rows)}")
|
||||||
|
print(f"output: {OUT}")
|
||||||
|
systems = sorted({row["organ_system"] for row in rows})
|
||||||
|
print("organ_systems:", ", ".join(systems))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
306
cihi_hfrm_label_mapping.csv
Normal file
306
cihi_hfrm_label_mapping.csv
Normal file
@@ -0,0 +1,306 @@
|
|||||||
|
token_id,label_code,label_name,hfrm_category_id,hfrm_category,hfrm_key_area,hfrm_category_weight,hfrm_normalized_weight,n_matched_hfrm_codes,matched_hfrm_codes,matched_hfrm_code_descriptions,match_types,source_pdf
|
||||||
|
7,A04,(other bacterial intestinal infections),20,Infections,Other,1.0,0.027777777777777776,1,A04,A04: Other bacterial intestinal infections,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
11,A08,(viral and other specified intestinal infections),20,Infections,Other,1.0,0.027777777777777776,1,A08,A08: Viral and other specified intestinal infections,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
12,A09,(diarrhoea and gastro-enteritis of presumed infectious origin),16,Gastrointestinal,Morbidity,1.0,0.027777777777777776,1,A09,A09: Other gastroenteritis and colitis of infectious and,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
35,A40,(streptococcal septicaemia),20,Infections,Other,1.0,0.027777777777777776,1,A40,A40: Streptococcal sepsis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
36,A41,(other septicaemia),20,Infections,Other,1.0,0.027777777777777776,1,A41,A41: Other sepsis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
41,A48,"(other bacterial diseases, not elsewhere classified)",20,Infections,Other,1.0,0.027777777777777776,1,A48.8,A48.8: Other specified bacterial diseases,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
42,A49,(bacterial infection of unspecified site),20,Infections,Other,1.0,0.027777777777777776,5,A49.0;A49.1;A49.2;A49.8;A49.9,"A49.0: Staphylococcal infection, unspecified site | A49.1: Streptococcal and enterococcal infection, unspecified site | A49.2: Haemophilus influenzae infection, unspecified site | A49.8: Other bacterial infections of unspecified site | A49.9: Bacterial infection, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
158,B95,(streptococcus and staphylococcus as the cause of diseases classified to other chapters),20,Infections,Other,1.0,0.027777777777777776,1,B95,B95: Streptococcus and staphylococcus as the cause of disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
159,B96,(other bacterial agents as the cause of diseases classified to other chapters),20,Infections,Other,1.0,0.027777777777777776,1,B96,B96: Other specified bacterial agents as the cause of diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
160,B97,(viral agents as the cause of diseases classified to other chapters),20,Infections,Other,1.0,0.027777777777777776,1,B97,B97: Viral agents as the cause of diseases classified to,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
176,D64,(other anaemias),1,Anemia,Morbidity,1.0,0.027777777777777776,1,D64,D64: Other anaemias,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
198,E02,(subclinical iodine-deficiency hypothyroidism),11,Endocrine,Other,1.0,0.027777777777777776,1,E02,E02: Subclinical iodine-deficiency hypothyroidism,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
199,E03,(other hypothyroidism),11,Endocrine,Other,1.0,0.027777777777777776,1,E03,E03: Other hypothyroidism,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
200,E04,(other non-toxic goitre),11,Endocrine,Other,1.0,0.027777777777777776,1,E04,E04: Other nontoxic goitre,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
201,E05,(thyrotoxicosis [hyperthyroidism]),11,Endocrine,Other,1.0,0.027777777777777776,1,E05,E05: Thyrotoxicosis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
202,E06,(thyroiditis),11,Endocrine,Other,1.0,0.027777777777777776,1,E06,E06: Thyroiditis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
203,E07,(other disorders of thyroid),11,Endocrine,Other,1.0,0.027777777777777776,1,E07,E07: Other disorders of thyroid,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
204,E10,(insulin-dependent diabetes mellitus),9,Diabetes,Morbidity,1.0,0.027777777777777776,1,E10,E10: Type 1 diabetes mellitus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
205,E11,(non-insulin-dependent diabetes mellitus),9,Diabetes,Morbidity,1.0,0.027777777777777776,1,E11,E11: Type 2 diabetes mellitus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
207,E13,(other specified diabetes mellitus),9,Diabetes,Morbidity,1.0,0.027777777777777776,1,E13,E13: Other specified diabetes mellitus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
208,E14,(unspecified diabetes mellitus),9,Diabetes,Morbidity,1.0,0.027777777777777776,1,E14,E14: Unspecified diabetes mellitus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
210,E16,(other disorders of pancreatic internal secretion),11,Endocrine,Other,1.0,0.027777777777777776,1,E16,E16: Other disorders of pancreatic internal secretion,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
211,E20,(hypoparathyroidism),11,Endocrine,Other,1.0,0.027777777777777776,1,E20.9,"E20.9: Hypoparathyroidism, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
212,E21,(hyperparathyroidism and other disorders of parathyroid gland),11,Endocrine,Other,1.0,0.027777777777777776,5,E21.0;E21.1;E21.2;E21.3;E21.4,"E21.0: Primary hyperparathyroidism | E21.1: Secondary hyperparathyroidism, not elsewhere classified | E21.2: Other hyperparathyroidism | E21.3: Hyperparathyroidism, unspecified | E21.4: Other specified disorders of parathyroid gland",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
213,E22,(hyperfunction of pituitary gland),11,Endocrine,Other,1.0,0.027777777777777776,1,E22.2,E22.2: Syndrome of inappropriate secretions of antidiuretic hormone,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
214,E23,(hypofunction and other disorders of pituitary gland),11,Endocrine,Other,1.0,0.027777777777777776,2,E23.0;E23.2,E23.0: Hypopituitarism | E23.2: Diabetes insipidus,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
218,E27,(other disorders of adrenal gland),11,Endocrine,Other,1.0,0.027777777777777776,7,E27.1;E27.2;E27.3;E27.4;E27.5;E27.8;E27.9,"E27.1: Primary adrenocortical insufficiency | E27.2: Addisonian crisis | E27.3: Drug-induced adrenocortical insufficiency | E27.4: Other and unspecified adrenocortical insufficiency | E27.5: Adrenomedullary hyperfunction | E27.8: Other specified disorders of adrenal gland | E27.9: Disorder of adrenal gland, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
223,E32,(diseases of thymus),11,Endocrine,Other,1.0,0.027777777777777776,1,E32.8,E32.8: Other diseases of thymus,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
224,E34,(other endocrine disorders),11,Endocrine,Other,1.0,0.027777777777777776,2,E34.0;E34.9,"E34.0: Carcinoid syndrome | E34.9: Endocrine disorder, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
226,E41,(nutritional marasmus),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E41,E41: Nutritional marasmus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
227,E43,(unspecified severe protein-energy malnutrition),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E43,E43: Unspecified severe protein-energy malnutrition,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
228,E44,(protein-energy malnutrition of moderate and mild degree),25,Nutrition and wasting,Other,1.0,0.027777777777777776,2,E44.0;E44.1,E44.0: Moderate protein-energy malnutrition | E44.1: Mild protein-energy malnutrition,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
230,E46,(unspecified protein-energy malnutrition),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E46,E46: Unspecified protein-energy malnutrition,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
234,E53,(deficiency of other b group vitamins),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E53,E53: Deficiency of other B group vitamins,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
236,E55,(vitamin d deficiency),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E55,E55: Vitamin D deficiency,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
242,E63,(other nutritional deficiencies),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E63.9,"E63.9: Nutritional deficiency, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
259,E83,(disorders of mineral metabolism),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E83,E83: Disorders of mineral metabolism,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
261,E85,(amyloidosis),28,Other frailty conditions and diseases,Other,1.0,0.027777777777777776,3,E85.3;E85.4;E85.9,"E85.3: Secondary systemic amyloidosis | E85.4: Organ-limited amyloidosis | E85.9: Amyloidosis, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
262,E86,(volume depletion),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E86,E86: Volume depletion,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
263,E87,"(other disorders of fluid, electrolyte and acid-base balance)",25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,E87,"E87: Other disorders of fluid, electrolyte, and acid-base balance",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
266,F00,(dementia in alzheimer's disease),8,Dementia and Alzheimer's,Cognition and mood,1.0,0.027777777777777776,1,F00,F00: Dementia in Alzheimer’s disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
267,F01,(vascular dementia),8,Dementia and Alzheimer's,Cognition and mood,1.0,0.027777777777777776,1,F01,F01: Vascular dementia,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
268,F02,(dementia in other diseases classified elsewhere),8,Dementia and Alzheimer's,Cognition and mood,1.0,0.027777777777777776,1,F02,F02: Dementia in other diseases classified elsewhere,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
269,F03,(unspecified dementia),8,Dementia and Alzheimer's,Cognition and mood,1.0,0.027777777777777776,1,F03,F03: Unspecified dementia,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
271,F05,"(delirium, not induced by alcohol and other psychoactive substances)",6,Delirium,Cognition and mood,1.0,0.027777777777777776,1,F05,"F05: Delirium, not induced by alcohol and other",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
272,F06,(other mental disorders due to brain damage and dysfunction and to physical disease),12,Epilepsy,Other,1.0,0.027777777777777776,1,F06.8,F06.8: Other specified mental disorders due to brain damage,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
272,F06,(other mental disorders due to brain damage and dysfunction and to physical disease),27,Other cognitive disorders,Cognition and mood,1.0,0.027777777777777776,1,F06.7,F06.7: Mild cognitive disorder,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
278,F13,(mental and behavioural disorders due to use of sedatives or hypnotics),6,Delirium,Cognition and mood,1.0,0.027777777777777776,1,F13.4,F13.4: Mental and behavioral disorders due to use of sedatives,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
287,F22,(persistent delusional disorders),7,Delusions and hallucinations,Cognition and mood,1.0,0.027777777777777776,1,F22,F22: Persistent delusional disorders,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
295,F32,(depressive episode),22,Mood disorders,Cognition and mood,1.0,0.027777777777777776,1,F32,F32: Depressive episode,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
301,F41,(other anxiety disorders),22,Mood disorders,Cognition and mood,1.0,0.027777777777777776,1,F41,F41: Other anxiety disorders,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
305,F45,(somatoform disorders),30,Pain,Other,1.0,0.027777777777777776,1,F45.4,F45.4: Persistent somatoform pain disorder,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
328,F80,(specific developmental disorders of speech and language),27,Other cognitive disorders,Cognition and mood,1.0,0.027777777777777776,3,F80.1;F80.2;F80.3,F80.1: Expressive language disorder | F80.2: Receptive language disorder | F80.3: Acquired aphasia with epilepsy [Landau-Kleffner],hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
355,G12,(spinal muscular atrophy and related syndromes),28,Other frailty conditions and diseases,Other,1.0,0.027777777777777776,1,G12.20,G12.20: Amyotrophic lateral sclerosis,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
358,G20,(parkinson's disease),28,Other frailty conditions and diseases,Other,1.0,0.027777777777777776,1,G20,G20: Parkinson’s disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
359,G21,(secondary parkinsonism),28,Other frailty conditions and diseases,Other,1.0,0.027777777777777776,1,G21,G21: Secondary parkinsonism,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
360,G22,(parkinsonism in diseases classified elsewhere),28,Other frailty conditions and diseases,Other,1.0,0.027777777777777776,1,G22,G22: Parkinsonism in diseases classified elsewhere,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
364,G30,(alzheimer's disease),8,Dementia and Alzheimer's,Cognition and mood,1.0,0.027777777777777776,1,G30,G30: Alzheimer’s disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
365,G31,"(other degenerative diseases of nervous system, not elsewhere classified)",8,Dementia and Alzheimer's,Cognition and mood,1.0,0.027777777777777776,3,G31.00;G31.02;G31.1,"G31.00: Pick’s disease | G31.02: Frontal lobe dementia | G31.1: Senile degeneration of brain, not elsewhere specified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
365,G31,"(other degenerative diseases of nervous system, not elsewhere classified)",27,Other cognitive disorders,Cognition and mood,1.0,0.027777777777777776,1,G31.01,G31.01: Progressive isolated aphasia [Mesulam],hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
367,G35,(multiple sclerosis),28,Other frailty conditions and diseases,Other,1.0,0.027777777777777776,1,G35,G35: Multiple sclerosis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
370,G40,(epilepsy),12,Epilepsy,Other,1.0,0.027777777777777776,1,G40,G40: Epilepsy,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
374,G45,(transient cerebral ischaemic attacks and related syndromes),5,Cerebrovascular,Morbidity,1.0,0.027777777777777776,1,G45,G45: Transient cerebral ischaemic attacks and related syndromes,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
376,G47,(sleep disorders),27,Other cognitive disorders,Cognition and mood,1.0,0.027777777777777776,5,G47.0;G47.1;G47.2;G47.8;G47.9,"G47.0: Disorders of initiating and maintaining sleep | G47.1: Disorders of excessive somnolence [hypersomnias] | G47.2: Disorders of the sleep-wake schedule | G47.8: Other sleep disorders | G47.9: Sleep disorder, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
377,G50,(disorders of trigeminal nerve),30,Pain,Other,1.0,0.027777777777777776,1,G50.0,G50.0: Trigeminal neuralgia,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
397,G81,(hemiplegia),23,Movement and immobility,Function,1.0,0.027777777777777776,1,G81,G81: Hemiplegia,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
398,G82,(paraplegia and tetraplegia),23,Movement and immobility,Function,1.0,0.027777777777777776,1,G82,G82: Paraplegia and tetraplegia,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
439,H40,(glaucoma),33,Sensory impairment,Sensory loss,1.0,0.027777777777777776,1,H40,H40: Glaucoma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
440,H42,(glaucoma in diseases classified elsewhere),33,Sensory impairment,Sensory loss,1.0,0.027777777777777776,1,H42,H42: Glaucoma in diseases classified elsewhere,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
451,H53,(visual disturbances),33,Sensory impairment,Sensory loss,1.0,0.027777777777777776,1,H53,H53: Visual disturbances,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
452,H54,(blindness and low vision),33,Sensory impairment,Sensory loss,1.0,0.027777777777777776,1,H54,H54: Visual impairment including blindness,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
454,H57,(other disorders of eye and adnexa),30,Pain,Other,1.0,0.027777777777777776,1,H57.1,H57.1: Ocular pain,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
472,H81,(disorders of vestibular function),23,Movement and immobility,Function,1.0,0.027777777777777776,1,H81,H81: Disorders of vestibular function,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
474,H83,(other diseases of inner ear),33,Sensory impairment,Sensory loss,1.0,0.027777777777777776,1,H83.3,H83.3: Noise effects on inner ear,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
476,H91,(other hearing loss),33,Sensory impairment,Sensory loss,1.0,0.027777777777777776,1,H91,H91: Other hearing loss,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
477,H92,(otalgia and effusion of ear),30,Pain,Other,1.0,0.027777777777777776,1,H92.0,H92.0: Otalgia,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
484,I05,(rheumatic mitral valve diseases),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I05,I05: Rheumatic mitral valve diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
485,I06,(rheumatic aortic valve diseases),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I06,I06: Rheumatic aortic valve diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
486,I07,(rheumatic tricuspid valve diseases),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I07,I07: Rheumatic tricuspid valve diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
487,I08,(multiple valve diseases),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I08,I08: Multiple valve diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
488,I09,(other rheumatic heart diseases),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I09.0,I09.0: Rheumatic myocarditis,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
489,I10,(essential (primary) hypertension),18,Hypo- and hypertension,Morbidity,1.0,0.027777777777777776,1,I10,I10: Essential (primary) hypertension,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
490,I11,(hypertensive heart disease),18,Hypo- and hypertension,Morbidity,1.0,0.027777777777777776,1,I11,I11: Hypertensive heart disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
491,I12,(hypertensive renal disease),18,Hypo- and hypertension,Morbidity,1.0,0.027777777777777776,1,I12,I12: Hypertensive renal disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
492,I13,(hypertensive heart and renal disease),18,Hypo- and hypertension,Morbidity,1.0,0.027777777777777776,1,I13,I13: Hypertensive heart and renal disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
493,I15,(secondary hypertension),18,Hypo- and hypertension,Morbidity,1.0,0.027777777777777776,1,I15,I15: Secondary hypertension,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
499,I25,(chronic ischaemic heart disease),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I25.1,I25.1: Atherosclerotic heart disease,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
500,I26,(pulmonary embolism),34,Thrombosis and embolism,Morbidity,1.0,0.027777777777777776,1,I26,I26: Pulmonary embolism,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
507,I34,(nonrheumatic mitral valve disorders),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I34,I34: Nonrheumatic mitral valve disorders,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
508,I35,(nonrheumatic aortic valve disorders),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I35,I35: Nonrheumatic aortic valve disorders,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
509,I36,(nonrheumatic tricuspid valve disorders),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I36,I36: Nonrheumatic tricuspid valve disorders,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
510,I37,(pulmonary valve disorders),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I37,I37: Pulmonary valve disorders,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
511,I38,"(endocarditis, valve unspecified)",4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I38,"I38: Endocarditis, valve unspecified",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
512,I39,(endocarditis and heart valve disorders in diseases classified elsewhere),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I39,I39: Endocarditis and heart valve disorders in diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
515,I42,(cardiomyopathy),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I42,I42: Cardiomyopathy,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
516,I43,(cardiomyopathy in diseases classified elsewhere),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I43,I43: Cardiomyopathy in diseases classified elsewhere,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
520,I47,(paroxysmal tachycardia),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I47,I47: Paroxysmal tachycardia,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
521,I48,(atrial fibrillation and flutter),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I48,I48: Atrial fibrillation and flutter,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
522,I49,(other cardiac arrhythmias),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I49,I49: Other cardiac arrhythmias,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
523,I50,(heart failure),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,3,I50.0;I50.1;I50.9,"I50.0: Congestive heart failure | I50.1: Left ventricular failure | I50.9: Heart failure, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
526,I60,(subarachnoid haemorrhage),5,Cerebrovascular,Morbidity,1.0,0.027777777777777776,1,I60,I60: Subarachnoid haemorrhage,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
527,I61,(intracerebral haemorrhage),5,Cerebrovascular,Morbidity,1.0,0.027777777777777776,1,I61,I61: Intracerebral haemorrhage,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
529,I63,(cerebral infarction),5,Cerebrovascular,Morbidity,1.0,0.027777777777777776,8,I63.0;I63.1;I63.2;I63.3;I63.4;I63.5;I63.8;I63.9,"I63.0: Cerebral infarction due to thrombosis of precerebral arteries | I63.1: Cerebral infarction due to embolism of precerebral arteries | I63.2: Cerebral infarction due to unspecified occlusion or stenosis | I63.3: Cerebral infarction due to thrombosis of cerebral arteries | I63.4: Cerebral infarction due to embolism of cerebral arteries | I63.5: Cerebral infarction due to unspecified occlusion or stenosis | I63.8: Other cerebral infarction | I63.9: Cerebral infarction, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
530,I64,"(stroke, not specified as haemorrhage or infarction)",5,Cerebrovascular,Morbidity,1.0,0.027777777777777776,1,I64,"I64: Stroke, not specified as haemorrhage or infarction",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
535,I69,(sequelae of cerebrovascular disease),5,Cerebrovascular,Morbidity,1.0,0.027777777777777776,1,I69,I69: Sequelae of cerebrovascular disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
536,I70,(atherosclerosis),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I70,I70: Atherosclerosis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
537,I71,(aortic aneurysm and dissection),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,4,I71.3;I71.4;I71.5;I71.6,"I71.3: Abdominal aortic aneurysm, ruptured | I71.4: Abdominal aortic aneurysm, without mention of rupture | I71.5: Thoracoabdominal aortic aneurysm, ruptured | I71.6: Thoracoabdominal aortic aneurysm, without mention",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
538,I72,(other aneurysm),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,4,I72.1;I72.2;I72.3;I72.4,I72.1: Aneurysm and dissection of artery of upper extremity | I72.2: Aneurysm and dissection of renal artery | I72.3: Aneurysm and dissection of iliac artery | I72.4: Aneurysm and dissection of artery of lower extremity,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
539,I73,(other peripheral vascular diseases),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,I73,I73: Other peripheral vascular diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
544,I80,(phlebitis and thrombophlebitis),34,Thrombosis and embolism,Morbidity,1.0,0.027777777777777776,1,I80,I80: Phlebitis and thrombophlebitis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
545,I81,(portal vein thrombosis),34,Thrombosis and embolism,Morbidity,1.0,0.027777777777777776,1,I81,I81: Portal vein thrombosis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
546,I82,(other venous embolism and thrombosis),34,Thrombosis and embolism,Morbidity,1.0,0.027777777777777776,4,I82.2;I82.3;I82.8;I82.9,I82.2: Embolism and thrombosis of vena cava | I82.3: Embolism and thrombosis of renal vein | I82.8: Embolism and thrombosis of other specified veins | I82.9: Embolism and thrombosis of unspecified vein,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
554,I95,(hypotension),18,Hypo- and hypertension,Morbidity,1.0,0.027777777777777776,1,I95,I95: Hypotension,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
587,J39,(other diseases of upper respiratory tract),30,Pain,Other,1.0,0.027777777777777776,1,J39.2,J39.2: Other diseases of pharynx,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
588,J40,"(bronchitis, not specified as acute or chronic)",32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J40,"J40: Bronchitis, not specified as acute or chronic",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
589,J41,(simple and mucopurulent chronic bronchitis),32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J41,J41: Simple and mucopurulent chronic bronchitis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
590,J42,(unspecified chronic bronchitis),32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J42,J42: Unspecified chronic bronchitis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
591,J43,(emphysema),32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J43,J43: Emphysema,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
592,J44,(other chronic obstructive pulmonary disease),32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J44,J44: Other chronic obstructive pulmonary disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
593,J45,(asthma),32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J45,J45: Asthma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
595,J47,(bronchiectasis),32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J47,J47: Bronchiectasis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
604,J69,(pneumonitis due to solids and liquids),32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J69,J69: Pneumonitis due to solids and liquids,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
618,J96,"(respiratory failure, not elsewhere classified)",32,Respiratory,Morbidity,1.0,0.027777777777777776,1,J96,"J96: Respiratory failure, not elsewhere classified",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
631,K10,(other diseases of jaws),30,Pain,Other,1.0,0.027777777777777776,1,K10.8,K10.8: Other specified diseases of jaws,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
634,K13,(other diseases of lip and oral mucosa),30,Pain,Other,1.0,0.027777777777777776,1,K13.7,K13.7: Other and unspecified lesions of oral mucosa,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
635,K14,(diseases of tongue),30,Pain,Other,1.0,0.027777777777777776,1,K14.6,K14.6: Glossodynia,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
641,K26,(duodenal ulcer),16,Gastrointestinal,Morbidity,1.0,0.027777777777777776,1,K26,K26: Duodenal ulcer,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
644,K29,(gastritis and duodenitis),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,K29.0,K29.0: Acute haemorrhagic gastritis,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
660,K52,(other non-infective gastro-enteritis and colitis),16,Gastrointestinal,Morbidity,1.0,0.027777777777777776,1,K52,K52: Other noninfective gastroenteritis and colitis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
661,K55,(vascular disorders of intestine),4,Cardiac and vascular,Morbidity,1.0,0.027777777777777776,1,K55.1,K55.1: Chronic vascular disorders of intestine,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
665,K59,(other functional intestinal disorders),16,Gastrointestinal,Morbidity,1.0,0.027777777777777776,1,K59,K59: Other functional intestinal disorders,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
668,K62,(other diseases of anus and rectum),30,Pain,Other,1.0,0.027777777777777776,1,K62.8,K62.8: Other specified diseases of anus and rectum,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
696,L03,(cellulitis),20,Infections,Other,1.0,0.027777777777777776,1,L03,L03: Cellulitis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
699,L08,(other local infections of skin and subcutaneous tissue),20,Infections,Other,1.0,0.027777777777777776,1,L08,L08: Other local infections of skin and subcutaneous tissue,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
754,L89,(decubitus ulcer),35,Ulcers and soft tissue disorders,Other,1.0,0.027777777777777776,1,L89,L89: Decubitus [pressure] ulcer and pressure area,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
761,L97,"(ulcer of lower limb, not elsewhere classified)",35,Ulcers and soft tissue disorders,Other,1.0,0.027777777777777776,1,L97,"L97: Ulcer of the lower limb, not elsewhere classified",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
762,L98,"(other disorders of skin and subcutaneous tissue, not elsewhere classified)",35,Ulcers and soft tissue disorders,Other,1.0,0.027777777777777776,3,L98.4;L98.8;L98.9,"L98.4: Chronic ulcer of skin, not elsewhere classified | L98.8: Other specified disorders of skin and subcutaneous tissue | L98.9: Disorder of skin and subcutaneous tissue, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
766,M02,(reactive arthropathies),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M02,M02: Reactive arthropathies,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
767,M03,(postinfective and reactive arthropathies in diseases classified elsewhere),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M03,M03: Postinfective and reactive arthropathies in diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
768,M05,(seropositive rheumatoid arthritis),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M05,M05: Seropositive rheumatoid arthritis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
769,M06,(other rheumatoid arthritis),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M06,M06: Other rheumatoid arthritis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
770,M07,(psoriatic and enteropathic arthropathies),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M07,M07: Psoriatic and enteropathic arthropathies,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
773,M10,(gout),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M10,M10: Gout,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
774,M11,(other crystal arthropathies),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M11,M11: Other crystal arthropathies,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
775,M12,(other specific arthropathies),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,4,M12.0;M12.3;M12.5;M12.8,"M12.0: Chronic postrheumatic arthropathy [Jaccoud] | M12.3: Palindromic rheumatism | M12.5: Traumatic arthropathy | M12.8: Other specific arthropathies, not elsewhere classified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
776,M13,(other arthritis),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,4,M13.0;M13.1;M13.8;M13.9,"M13.0: Polyarthritis, unspecified | M13.1: Monoarthritis, not elsewhere classified | M13.8: Other specified arthritis | M13.9: Arthritis, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
777,M14,(arthropathies in other diseases classified elsewhere),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M14,M14: Arthropathies in other diseases classified elsewhere,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
778,M15,(polyarthrosis),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M15,M15: Polyarthrosis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
779,M16,(coxarthrosis [arthrosis of hip]),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M16,M16: Coxarthrosis [arthrosis of hip],exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
780,M17,(gonarthrosis [arthrosis of knee]),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M17,M17: Gonarthrosis [arthrosis of knee],exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
781,M18,(arthrosis of first carpometacarpal joint),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M18,M18: Arthrosis of first carpometacarpal joint,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
782,M19,(other arthrosis),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M19,M19: Other arthrosis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
788,M25,"(other joint disorders, not elsewhere classified)",24,Musculoskeletal,Function,1.0,0.027777777777777776,1,M25,"M25: Other joint disorders, not elsewhere classified",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
788,M25,"(other joint disorders, not elsewhere classified)",30,Pain,Other,1.0,0.027777777777777776,1,M25.5,M25.5: Pain in joint,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
790,M31,(other necrotising vasculopathies),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M31.5,M31.5: Giant cell arteritis with polymyalgia rheumatica,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
791,M32,(systemic lupus erythematosus),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M32,M32: Systematic lupus erythematosus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
792,M33,(dermatopolymyositis),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M33,M33: Dermatopolymyositis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
793,M34,(systemic sclerosis),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M34,M34: Systemic sclerosis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
794,M35,(other systemic involvement of connective tissue),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,3,M35.1;M35.2;M35.3,M35.1: Other overlap syndromes | M35.2: Behçet’s disease | M35.3: Polymyalgia rheumatica,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
795,M36,(systemic disorders of connective tissue in diseases classified elsewhere),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,4,M36.0;M36.1;M36.2;M36.3,M36.0: Dermato(poly)myositis in neoplastic disease | M36.1: Arthropathy in neoplastic disease | M36.2: Haemophilic arthropathy | M36.3: Arthropathy in other blood disorders,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
797,M41,(scoliosis),24,Musculoskeletal,Function,1.0,0.027777777777777776,1,M41,M41: Scoliosis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
800,M45,(ankylosing spondylitis),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M45,M45: Ankylosing spondylitis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
801,M46,(other inflammatory spondylopathies),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,2,M46.5;M46.9,"M46.5: Other infective spondylopathies | M46.9: Inflammatory spondylopathy, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
803,M48,(other spondylopathies),24,Musculoskeletal,Function,1.0,0.027777777777777776,1,M48,M48: Other spondylopathies,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
808,M54,(dorsalgia),30,Pain,Other,1.0,0.027777777777777776,7,M54.2;M54.3;M54.4;M54.5;M54.6;M54.8;M54.9,"M54.2: Cervicalgia | M54.3: Sciatica | M54.4: Lumbago with sciatica | M54.5: Low back pain | M54.6: Pain in thoracic spine | M54.8: Other dorsalgia | M54.9: Dorsalgia, unspecified site",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
811,M62,(other disorders of muscle),23,Movement and immobility,Function,1.0,0.027777777777777776,1,M62.3,M62.3: Immobility syndrome (paraplegic),hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
811,M62,(other disorders of muscle),25,Nutrition and wasting,Other,1.0,0.027777777777777776,1,M62.5,"M62.5: Muscle wasting and atrophy, not elsewhere classified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
821,M75,(shoulder lesions),2,Arthritis and inflammation,Function,1.0,0.027777777777777776,1,M75.0,M75.0: Adhesive capsulitis of shoulder,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
824,M79,"(other soft tissue disorders, not elsewhere classified)",30,Pain,Other,1.0,0.027777777777777776,3,M79.1;M79.2;M79.6,"M79.1: Myalgia | M79.2: Neuralgia and neuritis, unspecified | M79.6: Pain in limb",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
824,M79,"(other soft tissue disorders, not elsewhere classified)",35,Ulcers and soft tissue disorders,Other,1.0,0.027777777777777776,1,M79,"M79: Other soft tissue disorders, not elsewhere classified",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
825,M80,(osteoporosis with pathological fracture),14,Fractures and osteoporosis,Function,1.0,0.027777777777777776,1,M80,M80: Osteoporosis with pathological fracture,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
826,M81,(osteoporosis without pathological fracture),14,Fractures and osteoporosis,Function,1.0,0.027777777777777776,1,M81,M81: Osteoporosis without pathological fracture,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
827,M82,(osteoporosis in diseases classified elsewhere),14,Fractures and osteoporosis,Function,1.0,0.027777777777777776,1,M82,M82: Osteoporosis in diseases classified elsewhere,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
834,M89,(other disorders of bone),30,Pain,Other,1.0,0.027777777777777776,1,M89.8,M89.8: Other specified disorders of bone,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
835,M90,(osteopathies in diseases classified elsewhere),14,Fractures and osteoporosis,Function,1.0,0.027777777777777776,1,M90.7,M90.7: Fracture of bone in neoplastic disease,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
843,N00,(acute nephritic syndrome),31,Renal,Morbidity,1.0,0.027777777777777776,1,N00,N00: Acute nephritic syndrome,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
844,N01,(rapidly progressive nephritic syndrome),31,Renal,Morbidity,1.0,0.027777777777777776,1,N01,N01: Rapidly progressive nephritic syndrome,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
845,N02,(recurrent and persistent haematuria),31,Renal,Morbidity,1.0,0.027777777777777776,1,N02,N02: Recurrent and persistent haematuria,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
846,N03,(chronic nephritic syndrome),31,Renal,Morbidity,1.0,0.027777777777777776,1,N03,N03: Chronic nephritic syndrome,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
847,N04,(nephrotic syndrome),31,Renal,Morbidity,1.0,0.027777777777777776,1,N04,N04: Nephrotic syndrome,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
848,N05,(unspecified nephritic syndrome),31,Renal,Morbidity,1.0,0.027777777777777776,1,N05,N05: Unspecified nephritic syndrome,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
849,N06,(isolated proteinuria with specified morphological lesion),31,Renal,Morbidity,1.0,0.027777777777777776,1,N06,N06: Isolated proteinuria with specified morphological lesion,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
850,N07,"(hereditary nephropathy, not elsewhere classified)",31,Renal,Morbidity,1.0,0.027777777777777776,1,N07,"N07: Hereditary nephropathy, not elsewhere classified",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
851,N08,(glomerular disorders in diseases classified elsewhere),31,Renal,Morbidity,1.0,0.027777777777777776,1,N08,N08: Glomerular disorders in diseases classified elsewhere,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
852,N10,(acute tubulo-interstitial nephritis),31,Renal,Morbidity,1.0,0.027777777777777776,1,N10,N10: Acute tubulo-interstitial nephritis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
853,N11,(chronic tubulo-interstitial nephritis),31,Renal,Morbidity,1.0,0.027777777777777776,1,N11,N11: Chronic tubulo-interstitial nephritis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
854,N12,"(tubulo-interstitial nephritis, not specified as acute or chronic)",31,Renal,Morbidity,1.0,0.027777777777777776,1,N12,"N12: Tubulo-interstitial nephritis, not specified as acute or chronic",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
855,N13,(obstructive and reflux uropathy),31,Renal,Morbidity,1.0,0.027777777777777776,1,N13,N13: Obstructive and reflux uropathy,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
856,N14,(drug- and heavy-metal-induced tubulo-interstitial and tubular conditions),31,Renal,Morbidity,1.0,0.027777777777777776,1,N14,N14: Drug and heavy-metal-induced tubulo-interstitial,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
857,N15,(other renal tubulo-interstitial diseases),31,Renal,Morbidity,1.0,0.027777777777777776,1,N15,N15: Other renal tubulo-interstitial diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
858,N16,(renal tubulo-interstitial disorders in diseases classified elsewhere),31,Renal,Morbidity,1.0,0.027777777777777776,1,N16,N16: Renal tubulo-interstitial disorders in diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
859,N17,(acute renal failure),31,Renal,Morbidity,1.0,0.027777777777777776,1,N17,N17: Acute renal failure,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
860,N18,(chronic renal failure),31,Renal,Morbidity,1.0,0.027777777777777776,1,N18,N18: Chronic kidney disease,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
861,N19,(unspecified renal failure),31,Renal,Morbidity,1.0,0.027777777777777776,1,N19,N19: Unspecified kidney failure,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
862,N20,(calculus of kidney and ureter),31,Renal,Morbidity,1.0,0.027777777777777776,4,N20.0;N20.1;N20.2;N20.9,"N20.0: Calculus of kidney | N20.1: Calculus of ureter | N20.2: Calculus of kidney with calculus of ureter | N20.9: Urinary calculus, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
866,N25,(disorders resulting from impaired renal tubular function),31,Renal,Morbidity,1.0,0.027777777777777776,1,N25,N25: Disorders resulting from impaired renal tubular function,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
867,N26,(unspecified contracted kidney),31,Renal,Morbidity,1.0,0.027777777777777776,1,N26,N26: Unspecified contracted kidney,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
869,N28,"(other disorders of kidney and ureter, not elsewhere classified)",31,Renal,Morbidity,1.0,0.027777777777777776,4,N28.0;N28.80;N28.88;N28.9,"N28.0: Ischaemia and infarction of kidney | N28.80: Hypertrophy of kidney | N28.88: Other specified disorders of kidney and ureter | N28.9: Disorder of kidney and ureter, unspecified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
870,N29,(other disorders of kidney and ureter in diseases classified elsewhere),31,Renal,Morbidity,1.0,0.027777777777777776,1,N29,N29: Other disorders of kidney and ureter in diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
879,N39,(other disorders of urinary system),19,Incontinence,Morbidity,1.0,0.027777777777777776,2,N39.30;N39.4,N39.30: Mixed incontinence | N39.4: Other specified urinary incontinence,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
879,N39,(other disorders of urinary system),20,Infections,Other,1.0,0.027777777777777776,1,N39.0,"N39.0: Urinary tract infection, site not specified",hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
888,N48,(other disorders of penis),30,Pain,Other,1.0,0.027777777777777776,1,N48.8,N48.8: Other specified disorders of penis,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
890,N50,(other disorders of male genital organs),30,Pain,Other,1.0,0.027777777777777776,1,N50.8,N50.8: Other specified disorders of male genital organs,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
896,N64,(other disorders of breast),30,Pain,Other,1.0,0.027777777777777776,1,N64.4,N64.4: Mastodynia,hfrm_child_of_label,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1133,C00,Malignant neoplasm of lip,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C00,C00: Malignant neoplasm of lip,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1134,C01,Malignant neoplasm of base of tongue,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C01,C01: Malignant neoplasm of base of tongue,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1135,C02,Malignant neoplasm of other and unspecified parts of tongue,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C02,C02: Malignant neoplasm of other and unspecified parts of tongue,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1136,C03,Malignant neoplasm of gum,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C03,C03: Malignant neoplasm of gum,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1137,C04,Malignant neoplasm of floor of mouth,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C04,C04: Malignant neoplasm of floor of mouth,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1138,C05,Malignant neoplasm of palate,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C05,C05: Malignant neoplasm of palate,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1139,C06,Malignant neoplasm of other and unspecified parts of mouth,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C06,C06: Malignant neoplasm of other and unspecified parts of mouth,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1140,C07,Malignant neoplasm of parotid gland,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C07,C07: Malignant neoplasm of parotid gland,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1141,C08,Malignant neoplasm of other and unspecified major salivary glands,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C08,C08: Malignant neoplasm of other and unspecified major,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1142,C09,Malignant neoplasm of tonsil,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C09,C09: Malignant neoplasm of tonsil,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1143,C10,Malignant neoplasm of oropharynx,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C10,C10: Malignant neoplasm of oropharynx,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1144,C11,Malignant neoplasm of nasopharynx,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C11,C11: Malignant neoplasm of nasopharynx,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1145,C12,Malignant neoplasm of pyriform sinus,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C12,C12: Malignant neoplasm of pyriform sinus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1146,C13,Malignant neoplasm of hypopharynx,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C13,C13: Malignant neoplasm of hypopharynx,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1147,C14,"Malignant neoplasm of other and ill-defined sites in the lip, oral cavity and pharynx",3,Cancer,Morbidity,1.0,0.027777777777777776,1,C14,"C14: Malignant neoplasm of other and ill-defined sites in the lip,",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1148,C15,Malignant neoplasm of oesophagus,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C15,C15: Malignant neoplasm of oesophagus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1149,C16,Malignant neoplasm of stomach,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C16,C16: Malignant neoplasm of stomach,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1150,C17,Malignant neoplasm of small intestine,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C17,C17: Malignant neoplasm of small intestine,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1151,C18,Malignant neoplasm of colon,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C18,C18: Malignant neoplasm of colon,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1152,C19,Malignant neoplasm of rectosigmoid junction,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C19,C19: Malignant neoplasm of rectosigmoid junction,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1153,C20,Malignant neoplasm of rectum,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C20,C20: Malignant neoplasm of rectum,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1154,C21,Malignant neoplasm of anus and anal canal,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C21,C21: Malignant neoplasm of anus and anal canal,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1155,C22,Malignant neoplasm of liver and intrahepatic bile ducts,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C22,C22: Malignant neoplasm of liver and intrahepatic bile ducts,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1156,C23,Malignant neoplasm of gallbladder,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C23,C23: Malignant neoplasm of gallbladder,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1157,C24,Malignant neoplasm of other and unspecified parts of biliary tract,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C24,C24: Malignant neoplasm of other and unspecified parts,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1158,C25,Malignant neoplasm of pancreas,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C25,C25: Malignant neoplasm of pancreas,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1159,C26,Malignant neoplasm of other and ill-defined digestive organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C26,C26: Malignant neoplasm of other and ill-defined digestive organs,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1160,C30,Malignant neoplasm of nasal cavity and middle ear,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C30,C30: Malignant neoplasm of nasal cavity and middle ear,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1161,C31,Malignant neoplasm of accessory sinuses,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C31,C31: Malignant neoplasm of accessory sinuses,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1162,C32,Malignant neoplasm of larynx,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C32,C32: Malignant neoplasm of larynx,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1163,C33,Malignant neoplasm of trachea,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C33,C33: Malignant neoplasm of trachea,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1164,C34,Malignant neoplasm of bronchus and lung,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C34,C34: Malignant neoplasm of bronchus and lung,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1165,C37,Malignant neoplasm of thymus,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C37,C37: Malignant neoplasm of thymus,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1166,C38,"Malignant neoplasm of heart, mediastinum and pleura",3,Cancer,Morbidity,1.0,0.027777777777777776,1,C38,"C38: Malignant neoplasm of heart, mediastinum and pleura",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1167,C39,Malignant neoplasm of other and ill-defined sites in the respiratory system and intrathoracic organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C39,C39: Malignant neoplasm of other and ill-defined sites in the,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1168,C40,Malignant neoplasm of bone and articular cartilage of limbs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C40,C40: Malignant neoplasm of bone and articular cartilage of limbs,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1169,C41,Malignant neoplasm of bone and articular cartilage of other and unspecified sites,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C41,C41: Malignant neoplasm of bone and articular cartilage of other,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1171,C43,Malignant melanoma of skin,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C43,C43: Malignant melanoma of skin,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1172,C44,Other malignant neoplasms of skin,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C44,C44: Other malignant neoplasms of skin,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1173,C45,Mesothelioma,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C45,C45: Mesothelioma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1174,C46,Kaposi's sarcoma,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C46,C46: Kaposi’s sarcoma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1175,C47,Malignant neoplasm of peripheral nerves and autonomic nervous system,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C47,C47: Malignant neoplasm of peripheral nerves and autonomic,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1176,C48,Malignant neoplasm of retroperitoneum and peritoneum,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C48,C48: Malignant neoplasm of retroperitoneum and peritoneum,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1177,C49,Malignant neoplasm of other connective and soft tissue,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C49,C49: Malignant neoplasm of other connective and soft tissue,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1178,C50,Malignant neoplasm of breast,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C50,C50: Malignant neoplasm of breast,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1179,C51,Malignant neoplasm of vulva,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C51,C51: Malignant neoplasm of vulva,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1180,C52,Malignant neoplasm of vagina,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C52,C52: Malignant neoplasm of vagina,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1181,C53,Malignant neoplasm of cervix uteri,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C53,C53: Malignant neoplasm of cervix uteri,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1182,C54,Malignant neoplasm of corpus uteri,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C54,C54: Malignant neoplasm of corpus uteri,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1183,C55,"Malignant neoplasm of uterus, part unspecified",3,Cancer,Morbidity,1.0,0.027777777777777776,1,C55,"C55: Malignant neoplasm of uterus, part unspecified",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1184,C56,Malignant neoplasm of ovary,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C56,C56: Malignant neoplasm of ovary,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1185,C57,Malignant neoplasm of other and unspecified female genital organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C57,C57: Malignant neoplasm of other and unspecified female,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1186,C58,Malignant neoplasm of placenta,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C58,C58: Malignant neoplasm of placenta,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1187,C60,Malignant neoplasm of penis,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C60,C60: Malignant neoplasm of penis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1188,C61,Malignant neoplasm of prostate,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C61,C61: Malignant neoplasm of prostate,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1189,C62,Malignant neoplasm of testis,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C62,C62: Malignant neoplasm of testis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1190,C63,Malignant neoplasm of other and unspecified male genital organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C63,C63: Malignant neoplasm of other and unspecified male,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1191,C64,"Malignant neoplasm of kidney, except renal pelvis",3,Cancer,Morbidity,1.0,0.027777777777777776,1,C64,"C64: Malignant neoplasm of kidney, except renal pelvis",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1192,C65,Malignant neoplasm of renal pelvis,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C65,C65: Malignant neoplasm of renal pelvis,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1193,C66,Malignant neoplasm of ureter,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C66,C66: Malignant neoplasm of ureter,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1194,C67,Malignant neoplasm of bladder,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C67,C67: Malignant neoplasm of bladder,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1195,C68,Malignant neoplasm of other and unspecified urinary organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C68,C68: Malignant neoplasm of other and unspecified urinary organs,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1196,C69,Malignant neoplasm of eye and adnexa,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C69,C69: Malignant neoplasm of eye and adnexa,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1197,C70,Malignant neoplasm of meninges,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C70,C70: Malignant neoplasm of meninges,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1198,C71,Malignant neoplasm of brain,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C71,C71: Malignant neoplasm of brain,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1199,C72,"Malignant neoplasm of spinal cord, cranial nerves and other parts of central nervous system",3,Cancer,Morbidity,1.0,0.027777777777777776,1,C72,"C72: Malignant neoplasm of spinal cord, cranial nerves and other",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1200,C73,Malignant neoplasm of thyroid gland,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C73,C73: Malignant neoplasm of thyroid gland,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1201,C74,Malignant neoplasm of adrenal gland,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C74,C74: Malignant neoplasm of adrenal gland,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1202,C75,Malignant neoplasm of other endocrine glands and related structures,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C75,C75: Malignant neoplasm of other endocrine glands,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1203,C76,Malignant neoplasm of other and ill-defined sites,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C76,C76: Malignant neoplasm of other and ill-defined sites,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1204,C77,Secondary and unspecified malignant neoplasm of lymph nodes,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C77,C77: Secondary and unspecified malignant neoplasm,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1205,C78,Secondary malignant neoplasm of respiratory and digestive organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C78,C78: Secondary malignant neoplasm of respiratory,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1206,C79,Secondary malignant neoplasm of other sites,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C79,C79: Secondary malignant neoplasm of other and,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1207,C80,Malignant neoplasm without specification of site,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C80,C80: Malignant neoplasm without specification of site,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1208,C81,Hodgkin's disease,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C81,C81: Hodgkin lymphoma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1209,C82,Follicular [nodular] non-Hodgkin's lymphoma,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C82,C82: Follicular lymphoma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1210,C83,Diffuse non-Hodgkin's lymphoma,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C83,C83: Non-follicular lymphoma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1211,C84,Peripheral and cutaneous T-cell lymphomas,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C84,C84: Mature T/NK-cell lymphomas,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1212,C85,Other and unspecified types of non-Hodgkin's lymphoma,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C85,C85: Other and unspecified types of non-Hodgkin lymphoma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1213,C86,Other specified types of T/NK-cell lymphoma,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C86,C86: Other specified types of T/NK-cell lymphoma,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1214,C88,Malignant immunoproliferative diseases,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C88,C88: Malignant immunoproliferative diseases,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1215,C90,Multiple myeloma and malignant plasma cell neoplasms,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C90,C90: Multiple myeloma and malignant plasma cell neoplasms,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1216,C91,Lymphoid leukaemia,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C91,C91: Lymphoid leukaemia,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1217,C92,Myeloid leukaemia,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C92,C92: Myeloid leukaemia,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1218,C93,Monocytic leukaemia,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C93,C93: Monocytic leukaemia,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1219,C94,Other leukaemias of specified cell type,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C94,C94: Other leukaemias of specified cell type,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1220,C95,Leukaemia of unspecified cell type,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C95,C95: Leukaemia of unspecified cell type,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1221,C96,"Other and unspecified malignant neoplasms of lymphoid, haematopoietic and related tissue",3,Cancer,Morbidity,1.0,0.027777777777777776,1,C96,"C96: Other and unspecified malignant neoplasms of lymphoid,",exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1222,C97,Malignant neoplasms of independent (primary) multiple sites,3,Cancer,Morbidity,1.0,0.027777777777777776,1,C97,C97: Malignant neoplasms of independent (primary) multiple sites,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1246,D37,Neoplasm of uncertain or unknown behaviour of oral cavity and digestive organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D37,D37: Neoplasm of uncertain or unknown behaviour of oral cavity,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1247,D38,Neoplasm of uncertain or unknown behaviour of middle ear and respiratory and intrathoracic organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D38,D38: Neoplasm of uncertain or unknown behaviour of middle ear,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1248,D39,Neoplasm of uncertain or unknown behaviour of female genital organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D39,D39: Neoplasm of uncertain or unknown behaviour of female,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1249,D40,Neoplasm of uncertain or unknown behaviour of male genital organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D40,D40: Neoplasm of uncertain or unknown behaviour of male,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1250,D41,Neoplasm of uncertain or unknown behaviour of urinary organs,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D41,D41: Neoplasm of uncertain or unknown behaviour,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1251,D42,Neoplasm of uncertain or unknown behaviour of meninges,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D42,D42: Neoplasm of uncertain or unknown behaviour of meninges,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1252,D43,Neoplasm of uncertain or unknown behaviour of brain and central nervous system,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D43,D43: Neoplasm of uncertain or unknown behaviour of brain and,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1253,D44,Neoplasm of uncertain or unknown behaviour of endocrine glands,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D44,D44: Neoplasm of uncertain or unknown behaviour,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1254,D45,Polycythaemia vera,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D45,D45: Polycythaemia vera,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1255,D46,Myelodysplastic syndromes,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D46,D46: Myelodysplastic syndromes,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1256,D47,"Other neoplasms of uncertain or unknown behaviour of lymphoid, haematopoietic and related tissue",3,Cancer,Morbidity,1.0,0.027777777777777776,1,D47,D47: Other neoplasms of uncertain or unknown behaviour,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
1257,D48,Neoplasm of uncertain or unknown behaviour of other and unspecified sites,3,Cancer,Morbidity,1.0,0.027777777777777776,1,D48,D48: Neoplasm of uncertain or unknown behaviour of other,exact,cihi-hospital-frailty-risk-measure-meth-notes-en.pdf
|
||||||
|
396
compute_burden_index_landmarks.py
Normal file
396
compute_burden_index_landmarks.py
Normal file
@@ -0,0 +1,396 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import math
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any, Iterable
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
import pandas as pd
|
||||||
|
from tqdm.auto import tqdm
|
||||||
|
|
||||||
|
from burden_index import compute_burden_index, load_burden_context
|
||||||
|
from evaluate_auc_v2 import (
|
||||||
|
make_eval_indices,
|
||||||
|
parse_float_list,
|
||||||
|
split_indices,
|
||||||
|
)
|
||||||
|
from targets import CHECKUP_IDX, NO_EVENT_IDX, PAD_IDX
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_landmark_ages(args: argparse.Namespace) -> np.ndarray:
|
||||||
|
explicit = parse_float_list(args.landmark_ages)
|
||||||
|
if explicit:
|
||||||
|
ages = np.asarray(explicit, dtype=np.float32)
|
||||||
|
else:
|
||||||
|
ages = np.arange(
|
||||||
|
float(args.landmark_start),
|
||||||
|
float(args.landmark_stop) + 1e-6,
|
||||||
|
float(args.landmark_step),
|
||||||
|
dtype=np.float32,
|
||||||
|
)
|
||||||
|
if ages.size == 0:
|
||||||
|
raise ValueError("No landmark ages were provided.")
|
||||||
|
return ages
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_horizons(value: Any) -> np.ndarray:
|
||||||
|
horizons = np.asarray(parse_float_list(value) or [5.0], dtype=np.float32)
|
||||||
|
if horizons.size == 0:
|
||||||
|
raise ValueError("horizons must contain at least one value.")
|
||||||
|
if np.any(horizons < 0):
|
||||||
|
raise ValueError(f"horizons must be non-negative, got {horizons}")
|
||||||
|
return horizons
|
||||||
|
|
||||||
|
|
||||||
|
def _build_burden_matrix_from_mapping(
|
||||||
|
mapping_csv: Path,
|
||||||
|
*,
|
||||||
|
token_col: str,
|
||||||
|
category_id_col: str,
|
||||||
|
category_col: str,
|
||||||
|
key_area_col: str,
|
||||||
|
weight_col: str,
|
||||||
|
) -> tuple[np.ndarray, np.ndarray, pd.DataFrame]:
|
||||||
|
df = pd.read_csv(mapping_csv)
|
||||||
|
required = {token_col, category_id_col, category_col, weight_col}
|
||||||
|
missing = sorted(required - set(df.columns))
|
||||||
|
if missing:
|
||||||
|
raise ValueError(f"{mapping_csv} is missing required columns: {missing}")
|
||||||
|
|
||||||
|
df = df.copy()
|
||||||
|
df[token_col] = pd.to_numeric(df[token_col], errors="raise").astype(int)
|
||||||
|
raw_category = df[category_id_col]
|
||||||
|
numeric_category = pd.to_numeric(raw_category, errors="coerce")
|
||||||
|
if numeric_category.notna().all():
|
||||||
|
df["_burden_category_key"] = numeric_category.astype(int)
|
||||||
|
else:
|
||||||
|
df["_burden_category_key"] = raw_category.astype(str)
|
||||||
|
df[weight_col] = pd.to_numeric(df[weight_col], errors="raise").astype(float)
|
||||||
|
df = df[df[weight_col] != 0].copy()
|
||||||
|
if df.empty:
|
||||||
|
raise ValueError(f"{mapping_csv} has no non-zero burden weights.")
|
||||||
|
|
||||||
|
disease_ids = np.asarray(sorted(df[token_col].unique().tolist()), dtype=np.int64)
|
||||||
|
category_keys = sorted(df["_burden_category_key"].unique().tolist())
|
||||||
|
|
||||||
|
disease_pos = {int(token): j for j, token in enumerate(disease_ids.tolist())}
|
||||||
|
category_pos = {cat: i for i, cat in enumerate(category_keys)}
|
||||||
|
A = np.zeros((len(category_keys), disease_ids.size), dtype=np.float64)
|
||||||
|
for _, row in df.iterrows():
|
||||||
|
token = int(row[token_col])
|
||||||
|
cat = row["_burden_category_key"]
|
||||||
|
weight = float(row[weight_col])
|
||||||
|
A[category_pos[cat], disease_pos[token]] += weight
|
||||||
|
|
||||||
|
meta_cols = list(dict.fromkeys(["_burden_category_key", category_id_col, category_col]))
|
||||||
|
if key_area_col in df.columns:
|
||||||
|
meta_cols.append(key_area_col)
|
||||||
|
category_meta = (
|
||||||
|
df[meta_cols]
|
||||||
|
.drop_duplicates(subset=["_burden_category_key"])
|
||||||
|
.sort_values("_burden_category_key")
|
||||||
|
.reset_index(drop=True)
|
||||||
|
)
|
||||||
|
category_meta = category_meta.rename(
|
||||||
|
columns={
|
||||||
|
"_burden_category_key": "burden_dimension_id",
|
||||||
|
category_col: "burden_dimension",
|
||||||
|
key_area_col: "burden_key_area",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if category_id_col in category_meta.columns:
|
||||||
|
category_meta = category_meta.drop(columns=[category_id_col])
|
||||||
|
if "burden_key_area" not in category_meta.columns:
|
||||||
|
category_meta["burden_key_area"] = ""
|
||||||
|
|
||||||
|
return A, disease_ids, category_meta
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_burden_types(value: str) -> list[str]:
|
||||||
|
out = [x.strip().lower() for x in str(value).split(",") if x.strip()]
|
||||||
|
if not out:
|
||||||
|
raise ValueError("burden_types must contain at least one value.")
|
||||||
|
valid = {"functional", "organ"}
|
||||||
|
unknown = sorted(set(out) - valid)
|
||||||
|
if unknown:
|
||||||
|
raise ValueError(f"Unknown burden_types {unknown}; valid values are {sorted(valid)}")
|
||||||
|
return list(dict.fromkeys(out))
|
||||||
|
|
||||||
|
|
||||||
|
def _load_mapping_specs(args: argparse.Namespace) -> list[dict[str, Any]]:
|
||||||
|
specs: list[dict[str, Any]] = []
|
||||||
|
for burden_type in _parse_burden_types(args.burden_types):
|
||||||
|
if burden_type == "functional":
|
||||||
|
path = Path(args.functional_mapping_csv)
|
||||||
|
specs.append(
|
||||||
|
{
|
||||||
|
"burden_type": "functional",
|
||||||
|
"mapping_csv": path,
|
||||||
|
"token_col": "token_id",
|
||||||
|
"category_id_col": "hfrm_category_id",
|
||||||
|
"category_col": "hfrm_category",
|
||||||
|
"key_area_col": "hfrm_key_area",
|
||||||
|
"weight_col": args.functional_weight_col,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
elif burden_type == "organ":
|
||||||
|
path = Path(args.organ_mapping_csv)
|
||||||
|
specs.append(
|
||||||
|
{
|
||||||
|
"burden_type": "organ",
|
||||||
|
"mapping_csv": path,
|
||||||
|
"token_col": "token_id",
|
||||||
|
"category_id_col": "organ_system",
|
||||||
|
"category_col": "organ_system",
|
||||||
|
"key_area_col": "icd10_chapter_name",
|
||||||
|
"weight_col": "organ_weight",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
for spec in specs:
|
||||||
|
if not spec["mapping_csv"].exists():
|
||||||
|
raise FileNotFoundError(
|
||||||
|
f"{spec['burden_type']} mapping_csv not found: {spec['mapping_csv']}"
|
||||||
|
)
|
||||||
|
return specs
|
||||||
|
|
||||||
|
|
||||||
|
def _eligible_landmark_rows(
|
||||||
|
dataset: Any,
|
||||||
|
subset_indices: np.ndarray,
|
||||||
|
landmark_ages: np.ndarray,
|
||||||
|
*,
|
||||||
|
min_history_events: int,
|
||||||
|
) -> list[dict[str, Any]]:
|
||||||
|
rows: list[dict[str, Any]] = []
|
||||||
|
special = np.asarray([PAD_IDX, CHECKUP_IDX, NO_EVENT_IDX], dtype=np.int64)
|
||||||
|
for patient_id, dataset_index in enumerate(subset_indices.tolist()):
|
||||||
|
sample = dataset.samples[int(dataset_index)]
|
||||||
|
seq_event = np.asarray(sample["event_seq"], dtype=np.int64)
|
||||||
|
seq_time = np.asarray(sample["time_seq"], dtype=np.float32)
|
||||||
|
tgt_event = np.asarray(sample["target_event_seq"], dtype=np.int64)
|
||||||
|
tgt_time = np.asarray(sample["target_time_seq"], dtype=np.float32)
|
||||||
|
if seq_event.size == 0 or tgt_event.size == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
|
full_event = np.concatenate([seq_event, tgt_event[-1:]])
|
||||||
|
full_time = np.concatenate([seq_time, tgt_time[-1:]])
|
||||||
|
followup_end = float(np.max(full_time))
|
||||||
|
|
||||||
|
for landmark_age in landmark_ages.tolist():
|
||||||
|
landmark_age = float(landmark_age)
|
||||||
|
if not (followup_end > landmark_age):
|
||||||
|
continue
|
||||||
|
prefix_mask = full_time <= np.float32(landmark_age)
|
||||||
|
if not np.any(prefix_mask):
|
||||||
|
continue
|
||||||
|
prefix_events = full_event[prefix_mask].astype(np.int64, copy=False)
|
||||||
|
prefix_times = full_time[prefix_mask].astype(np.float32, copy=False)
|
||||||
|
valid_history = ~np.isin(prefix_events, special)
|
||||||
|
if int(valid_history.sum()) < int(min_history_events):
|
||||||
|
continue
|
||||||
|
|
||||||
|
rows.append(
|
||||||
|
{
|
||||||
|
"patient_id": int(patient_id),
|
||||||
|
"dataset_index": int(dataset_index),
|
||||||
|
"sex": int(sample["sex"]),
|
||||||
|
"landmark_age": np.float32(landmark_age),
|
||||||
|
"t_query": np.float32(landmark_age),
|
||||||
|
"followup_end_time": np.float32(followup_end),
|
||||||
|
"event_seq": prefix_events,
|
||||||
|
"time_seq": prefix_times,
|
||||||
|
"other_type": np.asarray(sample["other_type"], dtype=np.int64),
|
||||||
|
"other_value": np.asarray(sample["other_value"], dtype=np.float32),
|
||||||
|
"other_value_kind": np.asarray(
|
||||||
|
sample["other_value_kind"], dtype=np.int64),
|
||||||
|
"other_time": np.asarray(sample["other_time"], dtype=np.float32),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def _config_split_indices(
|
||||||
|
n: int,
|
||||||
|
cfg: dict[str, Any],
|
||||||
|
eval_split: str,
|
||||||
|
subset_size: int,
|
||||||
|
) -> np.ndarray:
|
||||||
|
args = argparse.Namespace(
|
||||||
|
train_ratio=None,
|
||||||
|
val_ratio=None,
|
||||||
|
test_ratio=None,
|
||||||
|
seed=None,
|
||||||
|
eval_split=eval_split,
|
||||||
|
dataset_subset_size=subset_size if subset_size > 0 else None,
|
||||||
|
)
|
||||||
|
# make_eval_indices reads len(dataset), so a small shim is enough.
|
||||||
|
class _Sized:
|
||||||
|
def __len__(self) -> int:
|
||||||
|
return n
|
||||||
|
|
||||||
|
return make_eval_indices(_Sized(), args, cfg)
|
||||||
|
|
||||||
|
|
||||||
|
def _result_rows_for_sample(
|
||||||
|
*,
|
||||||
|
sample_row: dict[str, Any],
|
||||||
|
horizons: Iterable[float],
|
||||||
|
A: np.ndarray,
|
||||||
|
disease_ids: np.ndarray,
|
||||||
|
category_meta: pd.DataFrame,
|
||||||
|
burden_type: str,
|
||||||
|
formed_mode: str,
|
||||||
|
ctx: Any,
|
||||||
|
run_path: Path,
|
||||||
|
) -> list[dict[str, Any]]:
|
||||||
|
out: list[dict[str, Any]] = []
|
||||||
|
for horizon in horizons:
|
||||||
|
result = compute_burden_index(
|
||||||
|
run_path=run_path,
|
||||||
|
burden_matrix=A,
|
||||||
|
disease_ids=disease_ids,
|
||||||
|
event_seq=sample_row["event_seq"],
|
||||||
|
time_seq=sample_row["time_seq"],
|
||||||
|
sex=int(sample_row["sex"]),
|
||||||
|
other_type=sample_row["other_type"],
|
||||||
|
other_value=sample_row["other_value"],
|
||||||
|
other_value_kind=sample_row["other_value_kind"],
|
||||||
|
other_time=sample_row["other_time"],
|
||||||
|
t_query=float(sample_row["t_query"]),
|
||||||
|
horizon=float(horizon),
|
||||||
|
formed_mode=formed_mode,
|
||||||
|
context=ctx,
|
||||||
|
)
|
||||||
|
for dim_idx, meta in category_meta.iterrows():
|
||||||
|
out.append(
|
||||||
|
{
|
||||||
|
"patient_id": sample_row["patient_id"],
|
||||||
|
"dataset_index": sample_row["dataset_index"],
|
||||||
|
"sex": sample_row["sex"],
|
||||||
|
"landmark_age": float(sample_row["landmark_age"]),
|
||||||
|
"t_query": float(sample_row["t_query"]),
|
||||||
|
"followup_end_time": float(sample_row["followup_end_time"]),
|
||||||
|
"horizon": float(horizon),
|
||||||
|
"formed_mode": formed_mode,
|
||||||
|
"burden_type": burden_type,
|
||||||
|
"burden_dimension_id": meta["burden_dimension_id"],
|
||||||
|
"burden_dimension": str(meta["burden_dimension"]),
|
||||||
|
"burden_key_area": str(meta.get("burden_key_area", "")),
|
||||||
|
"bi_historical": float(result.historical[int(dim_idx)]),
|
||||||
|
"bi_future": float(result.future[int(dim_idx)]),
|
||||||
|
"bi_total": float(result.total[int(dim_idx)]),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Compute DeepHealth Burden Indices at landmark ages."
|
||||||
|
)
|
||||||
|
parser.add_argument("--run_path", type=str, required=True)
|
||||||
|
parser.add_argument("--burden_types", type=str, default="functional,organ",
|
||||||
|
help="Comma-separated burden types to compute: functional,organ.")
|
||||||
|
parser.add_argument("--functional_mapping_csv", type=str,
|
||||||
|
default="cihi_hfrm_label_mapping.csv")
|
||||||
|
parser.add_argument("--organ_mapping_csv", type=str,
|
||||||
|
default="icd10_organ_label_mapping.csv")
|
||||||
|
parser.add_argument("--output_path", type=str, default=None)
|
||||||
|
parser.add_argument("--eval_split", type=str, default="test",
|
||||||
|
choices=["train", "val", "valid", "validation", "test", "all"])
|
||||||
|
parser.add_argument("--formed_mode", type=str, default="model_weighted",
|
||||||
|
choices=["observed", "model_weighted"])
|
||||||
|
parser.add_argument("--horizons", type=str, default="5")
|
||||||
|
parser.add_argument("--landmark_ages", type=str, default=None)
|
||||||
|
parser.add_argument("--landmark_start", type=float, default=40.0)
|
||||||
|
parser.add_argument("--landmark_stop", type=float, default=80.0)
|
||||||
|
parser.add_argument("--landmark_step", type=float, default=5.0)
|
||||||
|
parser.add_argument("--min_history_events", type=int, default=1)
|
||||||
|
parser.add_argument("--dataset_subset_size", type=int, default=0)
|
||||||
|
parser.add_argument("--device", type=str, default=None)
|
||||||
|
parser.add_argument("--functional_weight_col", type=str,
|
||||||
|
default="hfrm_normalized_weight")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
run_path = Path(args.run_path)
|
||||||
|
mapping_specs = _load_mapping_specs(args)
|
||||||
|
|
||||||
|
ctx = load_burden_context(run_path, device=args.device)
|
||||||
|
matrices = []
|
||||||
|
for spec in mapping_specs:
|
||||||
|
A, disease_ids, category_meta = _build_burden_matrix_from_mapping(
|
||||||
|
spec["mapping_csv"],
|
||||||
|
token_col=spec["token_col"],
|
||||||
|
category_id_col=spec["category_id_col"],
|
||||||
|
category_col=spec["category_col"],
|
||||||
|
key_area_col=spec["key_area_col"],
|
||||||
|
weight_col=spec["weight_col"],
|
||||||
|
)
|
||||||
|
matrices.append(
|
||||||
|
{
|
||||||
|
"burden_type": spec["burden_type"],
|
||||||
|
"A": A,
|
||||||
|
"disease_ids": disease_ids,
|
||||||
|
"category_meta": category_meta,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
landmark_ages = _parse_landmark_ages(args)
|
||||||
|
horizons = _parse_horizons(args.horizons)
|
||||||
|
eval_split = str(args.eval_split).lower()
|
||||||
|
if eval_split in {"valid", "validation"}:
|
||||||
|
eval_split = "val"
|
||||||
|
subset_indices = _config_split_indices(
|
||||||
|
len(ctx.dataset),
|
||||||
|
ctx.cfg,
|
||||||
|
eval_split,
|
||||||
|
int(args.dataset_subset_size),
|
||||||
|
)
|
||||||
|
rows = _eligible_landmark_rows(
|
||||||
|
ctx.dataset,
|
||||||
|
subset_indices,
|
||||||
|
landmark_ages,
|
||||||
|
min_history_events=int(args.min_history_events),
|
||||||
|
)
|
||||||
|
if not rows:
|
||||||
|
raise RuntimeError(
|
||||||
|
"No eligible landmark rows. Check eval split, landmark ages, and min_history_events."
|
||||||
|
)
|
||||||
|
|
||||||
|
output_path = Path(args.output_path) if args.output_path else (
|
||||||
|
run_path / f"burden_index_{eval_split}_{args.formed_mode}.csv"
|
||||||
|
)
|
||||||
|
output_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
all_rows: list[dict[str, Any]] = []
|
||||||
|
for row in tqdm(rows, desc="Computing BI", dynamic_ncols=True):
|
||||||
|
for matrix in matrices:
|
||||||
|
all_rows.extend(
|
||||||
|
_result_rows_for_sample(
|
||||||
|
sample_row=row,
|
||||||
|
horizons=horizons.tolist(),
|
||||||
|
A=matrix["A"],
|
||||||
|
disease_ids=matrix["disease_ids"],
|
||||||
|
category_meta=matrix["category_meta"],
|
||||||
|
burden_type=matrix["burden_type"],
|
||||||
|
formed_mode=args.formed_mode,
|
||||||
|
ctx=ctx,
|
||||||
|
run_path=run_path,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
out_df = pd.DataFrame(all_rows)
|
||||||
|
out_df.to_csv(output_path, index=False)
|
||||||
|
print(f"Run path: {run_path}")
|
||||||
|
print(f"Eval split: {eval_split}")
|
||||||
|
print(f"Landmark rows: {len(rows)}")
|
||||||
|
for matrix in matrices:
|
||||||
|
print(
|
||||||
|
f"{matrix['burden_type']} dimensions: {matrix['A'].shape[0]}, "
|
||||||
|
f"mapped disease tokens: {matrix['A'].shape[1]}"
|
||||||
|
)
|
||||||
|
print(f"Output: {output_path}")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
1257
icd10_organ_label_mapping.csv
Normal file
1257
icd10_organ_label_mapping.csv
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user