disease_to_keywords = {
    "obesity": [
        "obes", "overweight", "BMI", "body mass index", "adipos", "central obesity", "waist",
        "hip", "waist to hip", "waist-to-hip", "WHR", "body weight", "body fat", "fat mass",
        "percent body fat", "waist circumference", "hip circumference",
    ],
    "type_2_diabetes": [
        "type 2", "type-2", "T2D", "diabet", "noninsulin", "NIDDM", "hypergly", 
        "glucose", "fasting glucose", "fasting plasma glucose", "HbA1c",
        "A1c", "glycated haemoglobin", "OGTT", "oral glucose tolerance",
        "2-hour glucose", "2 hour glucose", "insulin", "HOMA", "insulin resistance",
    ],
    "diabetic_kidney_disease": [
        "diabet", "DKD", "diabetic nephrop", "diabetic kidney",
        "diabetic CKD", "chronic kidney", "CKD", "nephrop", "nephrit",
        "renal", "eGFR", "glomerular", "creatinine", "serum creatinine",
        "albuminuria", "microalbumin", "macroalbumin", "uACR",
        "albumin-to-creatinine", "albumin to creatinine", "proteinuria", "albumin",
        "dialysis", "urine albumin", "urine protein",
    ],
    "dyslipidemia": [
        "dyslipid", "hyperlipid", "hypercholesterol", "cholesterol", "ldl", "ldl-c",
        "ldl c", "hdl", "hdl-c", "hdl c", "triglycer", "apolipoprotein", "apob",
        "apoa1", "apoa-1", "lipoprotein", "lpa", "lipoprotein(a)", "non-hdl",
        "non hdl", "vldl", "remnant",
    ],
}

arrowhead_disease_to_keywords = {
    # Cardiometabolic
    "familial_chylomicronemia_syndrome": [
        "familial chylomicronemia", "chylomicronemia",
        "fcs", "chylomicron", "lipoprotein lipase", "lpl",
        # labs/measurements (captures most relevant traits in your exports)
        "triglycer", "hypertriglycer", "tg",
        # clinical consequence that often appears alongside TG phenos
        "pancreatitis",
    ],
    "severe_hypertriglyceridemia": [
        "severe hypertriglycer", "hypertriglycer", "triglycer",
        "triglyceride", "tg", "pancreatitis",
    ],
    "dyslipidemia": [
        "dyslipid", "hyperlipid", "hypercholesterol", "cholesterol",
        "ldl", "ldl-c", "ldl c", "hdl", "hdl-c", "hdl c",
        "triglycer", "apolipoprotein", "apob", "apoa1", "apoa-1",
        "lipoprotein", "lpa", "lipoprotein(a)", "non-hdl", "non hdl",
        "vldl", "remnant",
    ],
    "homozygous_familial_hypercholesterolemia": [
        "homozygous familial hypercholesterol",
        "homozygous familial hypercholesterolemia",
        "homozygous familial hypercholesterolaemia",
        "hofh",
        "familial hypercholesterol",
        "familial hypercholesterolemia",
        "familial hypercholesterolaemia",
        "fh",
        "ldl receptor",
        "ldlr",
        # include lipid measurements because they dominate in your exports
        "cholesterol",
        "ldl",
        "ldl-c",
        "ldl c",
        "hypercholesterol",
        "hypercholesterolaemia",
    ],
    "cardiovascular_disease": [
        # disease/clinical terms (broad to hit the cardio phenos present in your exports)
        "cardiovascular",
        "cardio",
        "heart",
        "cardiac",
        "vascular",
        "artery",
        "arterial",
        "coronary",
        "coronary artery",
        "coronary heart",
        "ischemic heart",
        "myocard",
        "myocardial infarction",
        "heart attack",
        "stroke",
        "ischemic stroke",
        "angina",
        "atheroscleros",
        "arterioscleros",
        "peripheral artery",
        "revascular",
        "stent",
        "bypass",
        # major related phenotypes in these exports
        "hypertens",
        "blood pressure",
        "systolic",
        "diastolic",
        "heart failure",
        "congestive heart",
        "cardiomyopathy",
        "atrial fibrillation",
        "arrhythm",
        "tachycard",
        "bradycard",
        # clotting / thrombotic events frequently appear in phenotype catalogs
        "thromb",
        "embol",
        "venous thromboembol",
        "pulmonary embol",
        "dvt",
    ],
    "obesity": [
        "obes",
        "overweight",
        "body mass index",
        "bmi",
        "adipos",
        "central obesity",
        "waist",
        "hip",
        "waist to hip",
        "waist-to-hip",
        "whr",
        # measurements/body comp that show up in continuous trait catalogs
        "body weight",
        "#weight",
        "weight gain",
        "body fat",
        "fat mass",
        "percent body fat",
        "lean mass",
        "body composition",
        "waist circumference",
        "hip circumference",
    ],
    "mash": [
        "mash",
        "metabolic dysfunction-associated steatohepatitis",
        "metabolic associated steatohepatitis",
        "nash",
        "nonalcoholic steatohepatitis",
        "non-alcoholic steatohepatitis",
        "steatohepatitis",
        "fatty liver",
        "fatty liver disease",
        "hepatic steatosis",
        "steatosis",
        "nafld",
        "nonalcoholic fatty liver",
        "non-alcoholic fatty liver",
        "liver fibrosis",
        "fibrosis",
        "cirrhosis",
        # common liver measurements in these exports
        "alt",
        "ast",
        "ggt",
        "alp",
        "bilirubin",
        "inr",
        "platelet",
        "liver fat",
        "hepatic fat",
        "fibroscan",
        "elastography",
        "transaminase",
        "liver enzyme",
    ],

    # CNS
    "spinocerebellar_ataxia_2": [
        "spinocerebellar ataxia",
        "sca2",
        "sca 2",
        "ataxia 2",
        "ataxia",
        "cerebellar",
        "spinocerebellar",
        "atxn2",
    ],

    # Pulmonary
    "inflammatory_pulmonary_diseases": [
        "inflammatory pulmonary",
        "pulmonary inflammation",
        "lung inflammation",
        "inflammatory lung",
        "pneumonitis",
        "pulmonary",
        "lung",
        "respirat",
        "interstitial lung disease",
        "ild",
        "copd",
        "asthma",
        "bronchitis",
        "emphysema",
        "pneumonia",
        "pneumon",
        "dyspnea",
        "dyspnoea",
        "shortness of breath",
        "wheeze",
        # pulmonary function measurements that appear as continuous traits
        "fev1",
        "fvc",
        "dlco",
        "spirom",
        # gene/program hints that can appear in some catalogs
        "rage",
        "ager",
        # optional but common pulmonary phenotype bucket
        "sleep apnea",
        "sleep apnoea",
    ],
    "idiopathic_pulmonary_fibrosis": [
        "idiopathic pulmonary fibrosis",
        "ipf",
        "pulmonary fibrosis",
        "lung fibrosis",
        "fibrosis of lung",
        "fibrosing",
        "fibrosis",
        "fibrotic",
        "usual interstitial",
        "interstitial pneumon",
        "ild",
        "pulmonary",
        "lung",
        # program hint
        "mmp7",
    ],

    # Liver
    "alpha_1_liver_disease": [
        "alpha-1",
        "alpha 1",
        "alpha1",
        "alpha-1 antitrypsin",
        "alpha 1 antitrypsin",
        "antitrypsin",
        "a1at",
        "a1atd",
        "aat deficiency",
        "antitrypsin deficiency",
        # liver involvement + common liver labs
        "liver",
        "hepatic",
        "liver fibrosis",
        "cirrhosis",
        "alt",
        "ast",
        "ggt",
        "alp",
        "bilirubin",
        "inr",
        "platelet",
    ],
    "hepatitis_b": [
        "hepatitis b",
        "hbv",
        "chronic hepatitis b",
        "hep b",
        "hepatitis b virus",
        # virology measurements (often present as trait strings)
        "hbsag",
        "hbeag",
        "hbv dna",
        "viral load",
        # common liver injury labs
        "alt",
        "ast",
        "bilirubin",
        # broad safety net
        "hepatitis",
        "viral hepatitis",
    ],

    # Muscular
    "fshd": [
        "fshd",
        "facioscapulohumeral",
        "facioscapulohumeral muscular dystrophy",
        "muscular dystrophy",
        "dux4",
    ],
    "myotonic_dystrophy_type_1": [
        "myotonic dystrophy",
        "dm1",
        "dm 1",
        "dystrophia myotonica",
        "steinert",
        "steinert disease",
        "myotonia",
        "dmpk",
    ],

    # Complement Mediated Disease (ARO-C3 / ARO-CFB on pipeline page)
    "complement_mediated_disease": [
        "complement mediated",
        "complement-mediated",
        "complement",
        "alternative complement",
        "complement pathway",
        "c3",
        "complement component 3",
        "cfb",
        "factor b",
        "complement factor b",
        # common complement-mediated clinical phenos seen in catalogs
        "iga nephrop",
        "iga nephropathy",
        "c3 glomerulopathy",
        "glomerulonephritis",
        "gn",
        "ahus",
        "atypical hemolytic uremic",
        "pnh",
        "paroxysmal nocturnal hemoglobinuria",
        # kidney measurements (these dominate in your exports for this bucket)
        "egfr",
        "glomerular filtration",
        "creatinine",
        "cystatin",
        "albuminuria",
        "microalbumin",
        "proteinuria",
        "uacr",
        "albumin-to-creatinine",
        "urine albumin",
        "urine protein",
    ],
}
