module JosieHealth::LUT
  module DrugLUT
    # Drug lookup table converted from Ruby
    DRUG_MAPPINGS = {
      "1,4-butanediol"                => ["1,4-bdo", "bdo"],
      "10-hydroxyhexahydrocannabinol" => ["10-oh-hhc", "10hohhc", "10ohhhc"],
      "1cp-lsd"                       => ["1cp"],
      "1d-lsd"                        => ["1d-lsd"],
      "1p-lsd"                        => ["1p-lsd"],
      "1v-lsd"                        => ["1v-lsd"],
      "2f-dck"                        => ["2-fdck", "2f-dck", "2f-ketamine", "2fdck", "65_2f-dck/k_35 insufflated"],
      "2-fma"                         => ["2-fma", "2fma"],
      "2-methyl-a-pihp"               => ["2-me-pihp"],
      "2-mmc"                         => ["2-mmc", "2mmc"],
      "25b-nboh"                      => ["25b-nboh"],
      "25c-nbome"                     => ["2c-c-nbome"],
      "2c-b-fly"                      => ["2cb-fly", "2c-b-fly"],
      "2c-b"                          => ["2-cb", "2,5-dimethoxy-4-bromophenethylamine", "2c-b", "2cb", "blueheart2c-b"],
      "2c-e"                          => ["2ce"],
      "2c-i"                          => ["2c-i"],
      "3-cmc"                         => ["3-cmc", "3cmc", "3cmc+ketsprinkles"],
      "3-cpm"                         => ["3-cpm"],
      "3-fma"                         => ["3-fma", "3fma"],
      "3-fmc"                         => ["3-fluromethcathinone", "3-fmc", "3fmc"],
      "3-fpm"                         => ["3fpm"],
      "3-ho-pce"                      => ["3hopc?", "3hopce"],
      "3-ho-pcp"                      => ["3-ho-pcp", "3hopcp"],
      "3-me-pcp"                      => ["3-me-pcp"],
      "3-me-pcpy"                     => ["3mepcpy"],
      "3-mec"                         => ["3-mec", "3-methylethcathinone", "3mec"],
      "3-mmc"                         => ["3-methylmethcathinone", "3-methymethcathinone", "3-mmc", "3mmc", "metaphedrone", "of 3mmc"],
      "3f-pvp"                        => ["3f-a-pvp"],
      "4-aco-dmt"                     => ["4-aco-dmt"],
      "4-aco-ept"                     => ["4-aco-ept"],
      "4-bmc"                         => ["4-bmc", "4bmc"],
      "4-emc"                         => ["4emc"],
      "4-fma"                         => ["4-fma", "4fma"],
      "4-fmc"                         => ["4-fmc", "4fmc"],
      "4f-mph"                        => ["4-fmph", "4fmph_scraps", "4fmph"],
      "4f-ritalin"                    => ["4F-Ritalin"],
      "4-ho-mipt"                     => ["4-ho-mipt", "4homipt"],
      "4-me-tmp"                      => ["4-me-tmp"],
      "4-mec"                         => ["4-mec", "4mec"],
      "4-memabp"                      => ["4-methylbuphedrone", "4memabp"],
      "4-mmc"                         => ["'4mmc'", "4-methylmethcathinone", "4-mmc", "4mmc 0047", "4mmc insufflated", "4mmc katyusha", "4mmc-citrate", "4mmc-dregs", "4mmc?", "4mmc", "4mmc+ket", "4mmc+speed-in", "drone", "fake4mmc", "last-4mmc-for-a-while", "lastdrone", "line 4-mmc", "maybe-4mmc-citrate", "mephedrone", "4 mmc"],
      "4-mpd"                         => ["4-methylpentedrone", "4-mpd", "4mpd"],
      "4b-mar"                        => ["4b-mar"],
      "4c-pvp"                        => ["4cl-a-pvp", "4cl-pvp"],
      "4f-3me-a-php"                  => ["4f-3me-a-php"],
      "5-dbfpv"                       => ["5dbfpv"],
      "5-htp"                         => ["5-htp", "5htp"],
      "5-mapb"                        => ["5-mapb"],
      "5-meo-mipt"                    => ["5-meo-mipt"],
      "6-apb"                         => ["6-apb", "6apb"],
      "7-oh-mit"                      => ["7oh"],
      "a-d2pv"                        => ["a-d2pv"],
      "a-pcyp"                        => ["a-pcyp"],
      "a-phip"                        => ["a-phip", "aphip", "alpha-phip", "α-phip"],
      "a-pvp"                         => ["a-pvp", "apvp", "alpha-pvp", "α-pvp", "flakka"],
      "ald-52"                        => ["ald-52"],
      "alimemazine"                   => ["alimemazine"],
      "aptiganel"                     => ["aptiganel", "cns-1102", "cerestat"],
      "alprazolam"                    => ["alpraz", "alprazolam bar?", "alprazolam bar", "alprazolam", "maybexanax", "xanax", "xans", "xan"],
      "amisulpride"                   => ["amisulpride"],
      "amitriptyline"                 => ["amitriptyline"],
      "amlodipine"                    => ["amlodipine"],
      "amoxicillin"                   => ["amoxicillin", "amoxycillin"],
      "amphetamine"                   => ["--ago 0030 sped", "adderal", "adderall", "adderallir", "adderall-ir", "adderall ir", "amp", "amph", "amphetamine", "amphetamines", "amphetaminesalts", "amphetaminesulfate", "amphetaminesulphate", "amphsulfate", "ampsulfate", "bumps of speed", "cleanspeed", "defamph", "floorspeed", "kartoffelpü-speed", "kartoffelpü", "kartoffelpü+cleanspeed", "last-speed", "lastspeed", "pep", "realsped", "semiwet_sped", "shitty-speed", "shpeed", "sneed", "sp33d", "sped", "spedwaterbottle", "speed and", "speed-addr", "speed-in", "speed", "speed/mmc", "speed+ket+4mmc", "speed+pregabalin", "speedwatte", "speeed"],
      "arginine"                      => ["l-arginin", "l-arginine", "l-arginingne"],
      "armodafinil"                   => ["armodafinil", "arnodafinil"],
      "aspirin"                       => ["acetylsalicylic_acid", "acetylsalicylic-acid", "acetylsalicylicacid", "aspirin"],
      "atomoxetine"                   => ["atomoxetine", "straterra", "strattera"],
      "baclofen"                      => ["baclofen"],
      "bicalutamide"                  => ["bica", "bicalutamide", "bicalutamideoral"],
      "biperiden"                     => ["biperiden"],
      "bretazenil"                    => ["bretazenil"],
      "bromazepam"                    => ["bromazepam"],
      "bromazolam"                    => ["bromazolam"],
      "brotizolam"                    => ["brotizolam"],
      "buprenorphine"                 => ["bupe", "buprenoprhine oral", "buprenoprhine", "buprenorphin", "buprenorphine", "subutex"],
      "bupropion"                     => ["3cbp", "bupropion", "wellbutrin"],
      "buspirone"                     => ["buspirone"],
      "caffeine"                      => ["caffeie", "caffeinepill", "caffeine'", "caffeine", "coffee", "coffees", "cofve", "insantcoffee", "mate", "clubmate", "club-mate", "monster", "mosnter", "chineseredbull", "nocco", "greentea", "green tea", "miomio", "mio mio"],
      "carbamazepine"                 => ["carbamazepine"],
      "carbidopa"                     => ["carbidopa"],
      "carfentanil"                   => ["carfentanil"],
      "carisoprodol"                  => ["carisopodol", "carisoprodol", "carisoprol", "carisprodol", "karisoprodol99,99"],
      "cefalexin"                     => ["cephalexin"],
      "celecoxib"                     => ["celecoxib"],
      "comirnaty"                     => ["comirnaty"],
      "cetirizine"                    => ["cetirizin", "cetirizine"],
      "chloramphenicol"               => ["chloramphenicol"],
      "citalopram"                    => ["citalopram"],
      "citrulline"                    => ["l-citrulline"],
      "clavulanic-acid"               => ["clavulanic_acid"],
      "clobazam"                      => ["clobazam"],
      "clonazepam"                    => ["ck=lonazepam", "clknazepam", "clnazepam", "cloazepam", "clomazepam", "clona", "clonaepam", "clonaz", "clonazapam", "clonazeepaam", "clonazeoam", "clonazepam?", "clonazepam", "clonažepam", "clonažepám", "clonazepam&ketamine", "clonazepam0.5er", "clonazepsm", "clonazpam", "clonzepam", "rivotril", "rivtrol", "kpins", "klonopin"],
      "clonazolam"                    => ["clonazolam"],
      "clonidine"                     => ["clonidine"],
      "clozapine"                     => ["clopine"],
      "cocaine"                       => ["23mg coke", "bump coke", "cocain", "cocaine", "cok", "coke", "crack-cocaine", "crack", "of blow", "blow", "gear"],
      "codeine"                       => ["codeine-cwe", "codeine-ic", "codeine", "codine"],
      "creatine"                      => ["creatine_nitrate", "creatine", "creatinenitrate"],
      "cyclazodone"                   => ["cyclazodone"],
      "cyclobenzaprine"               => ["cyclobenzaprine"],
      "cyproterone-acetate"           => ["cpa", "cypro", "cyproteroneacetate"],
      "dck"                           => ["dck", "deschloraketamine", "dxe"],
      "dexamethasone"                 => ["dexamethasone"],
      "dexibuprofen"                  => ["dexibuprofen"],
      "dextroamphetamine-phosphate"   => ["dexamfetamine phosphate", "dexamph-phosphate", "dextro-amphetamine phosphate"],
      "dextroamphetamine"             => ["dex-amphetamine", "dexamfetamine", "dexamp", "dexamph", "dexamphetamine", "dexedrine-er", "dexedrine", "dexedrineer", "dexedrinexr", "dextro-amphetamine", "dextroampetamine", "dextroamphetamine"],
      "dextromethorphan-hydrobromide" => ["dxm-hbr", "dxmhbr"],
      "dextromethorphan-polistirex"   => ["dxmpolistirex"],
      "dextromethorphan"              => ["dextromethorphan", "dxm-freebase", "dxm"],
      "diazepam"                      => ["diaz", "diazepam", "valium"],
      "diclazepam"                    => ["diclazepal", "diclazepam"],
      "dihydrocodeine"                => ["dihydrocodeine"],
      "dimenhydrinate"                => ["dimenhydrinate"],
      "dimethocaine"                  => ["dimethocaine"],
      "diphenhydramine"               => ["benadryl", "dipenhydramine", "dipenydramine", "diphenhydramin", "diphenhydramine", "dph"],
      "dmt"                           => ["dmt", "n,n-dmt"],
      "dmxe"                          => ["dmxe_vapor", "dmxe"],
      "docusate"                      => ["docusate"],
      "domperidone"                   => ["domperidone", "domperidon"],
      "donepezil"                     => ["alzepil"],
      "dosulepin"                     => ["dosulepin"],
      "doxycycline"                   => ["doxycycline"],
      "dutasteride"                   => ["duta", "dutasteride"],
      "egcg"                          => ["egcg", "epigallocatechin-gallate"],
      "emtricitabine"                 => ["emcitritabine", "emtricitabine"],
      "enoxaparin-sodium"             => ["enoxaparin"],
      "escitalopram"                  => ["escitalopram"],
      "esketamine"                    => ["80/20 mix different batches esket", "s-ket", "s-ketamine", "sk nasal", "sk", "sket"],
      "estradiol-enanthate"           => ["e2-en", "een", "estradiol_enantate", "estradiolenanthate"],
      "estradiol-hemihydrate"         => ["estradiol_hemihydrat", "estradiolhemihydrate", "estrofem", "estrogel"],
      "estradiol-undecylate"          => ["estradiol_undecylate"],
      "estradiol-valerate"            => ["estradiol_valerate", "estradiolvalerate"],
      "estradiol"                     => ["estradiol", "estro"],
      "ethanol"                       => ["ethanol", "alcohol", "tschunk", "beer", "rose", "rosé", "gintonic", "gin-tonic", "gin", "wine", "vodka", "whiskey", "rum", "tequila", "champagne", "prosecco", "cocktail", "cider", "sake", "bourbon", "tatratea", "aperol", "aperolspritz", "rumncoke", "rumnfizz", "vodkaorange", "slush", "lack"],
      "estradiol-enanthate"           => ["een", "estradiol enanthate", "estradiol-enanthate"],
      "ethylphenidate"                => ["ethylphenidate"],
      "etizolam"                      => ["etizolam"],
      "f-phenibut"                    => ["baflofen", "f-phenibut", "fphen", "fphenibut"],
      "fabomotizole"                  => ["fabomotizole"],
      "fenethylline"                  => ["captagon"],
      "fentanyl"                      => ["fentanyl", "fent"],
      "fexofenadine-hydrochloride"    => ["fexofenadinehcl"],
      "fexofenadine"                  => ["fexofenadine"],
      "finasteride"                   => ["finasteride"],
      "flmodafinil"                   => ["flmodafinil"],
      "flualprazolam"                 => ["flualprazolam", "flualprazolam99,99"],
      "flubromazepam"                 => ["flubromazepam"],
      "flubromazolam"                 => ["flubromazolam"],
      "flurbiprofen"                  => ["flurbiprofen"],
      "fxe"                           => ["fxe"],
      "gabapentin"                    => ["gaba", "gabapentin", "gabepentin", "gabi-pentium-pro", "gabipentium_pro", "gabipentium-gold", "gabipentium-pro", "gabbies"],
      "ghb"                           => ["ghb"],
      "gidazepam"                     => ["gidazepam"],
      "n-ethylheptedrone"             => ["n-ethylheptedrone"],
      "heroin"                        => ["diamorph", "diamorphine", "diacetylmorphine", "hero", "heroin --ago 0110", "heroin", "of heroin skunge", "probablyheroin", "smack", "h"],
      "hhc-o"                         => ["hhc-o", "hhco"],
      "hhc-p"                         => ["hhcp"],
      "hhc"                           => ["hexahydrocannabinol", "hhc", "hhc/cbn", "hhc/cbn/cbd", "hhc/d8/cbt/d10", "hhc/delta10"],
      "hydrocodone"                   => ["hydrocodon", "hydrocodone"],
      "hydromorphone"                 => ["hydromorphone"],
      "hydroxetamine"                 => ["hxe", "hydroxetamine"],
      "hydroxyzine"                   => ["hydroxyzine"],
      "hyoscine-butylbromide"         => ["buscopan"],
      "ibuprofen"                     => ["ibouprofen", "ibu", "ibuprofen_(motrin)", "ibuprofen", "ibuprofen/codeine", "ibuprofen+1", "ibuprofen+paracetamol", "ibuprofene", "ibuprofenum", "ibuprofren", "ibuprophen", "iburprofen"],
      "indometacin"                   => ["indomethacin", "indomethecin"],
      "insulin"                       => ["insulin"],
      "ipomea-tricolor"               => ["ipomea_seeds"],
      "isobutyl-nitrite"              => ["isobutyl-nitrite"],
      "isopropylphenidate"            => ["isopropylphenidate"],
      "itraconazole"                  => ["itraconazole"],
      "ivermectin"                    => ["ivermectin"],
      "kanna"                         => ["kanna-tea", "kanna", "kanna100x", "kannacaffeine", "kannaciggie"],
      "kava"                          => ["kava", "kavakava", "kavalactones", "kavatea"],
      "kw-6356"                       => ["kw6356", "sipagladenant"],
      "ketamine"                      => ["(probably s-)ket", "$k", "103mg ketamine", "50/50 ket", "50/50 mix ket", "50/50 mixed ket", "50/50mixket", "60/40 ket", "60/50 or so racemic/s ket", "70/30 mix ket", "75/25 ket", "arket", "bedtimeket", "bump ket", "ektamine", "esk", "esket.", "esket", "esketamin", "esketamine", "esketnine", "eskez", "esklet", "goodket", "groundscore-ket?", "groundscore-ketamine?", "hopefully-k..", "hopefully-k", "k 50 50", "k ektkt", "k left", "k nasal", "k question mark line", "k right", "k supplement", "k-rock", "k!", "k.", "k", "k2d3", "k374m1n3", "ka", "kalamari", "kali", "keamine", "keetyme", "ket --ago 0002", "ket + little mdma", "ket + mdma", "ket 50 mix", "ket mostly s mix", "ket new batch", "ket other batch", "ket pure batch", "ket racemic + s rests", "ket s-filtered", "ket schnozz", "ket spray", "ket-notmepersonnear", "ket!!smmam<i", "ket?", "ket", "ket/molly/unknown/thought only ket but tasted molly also", "ket&mdma", "ket+4mmc", "ket+mdma", "ket+methadone", "ket+molly", "keta", "ketal", "ketalar", "ketaline", "ketam", "ketam9ne", "ketaman", "ketamanjaro", "ketamean", "ketami e", "ketami", "ketamie", "ketamië", "ketamien", "ketamiine", "ketamime", "ketamin", "ketamina", "ketamine idk", "ketamine insufflated", "ketamine oral", "ketamine pile", "ketamine-mixed", "ketamine-rests", "ketamine!", "ketamine?", "ketamine.exe", "ketamine", "ketaminë", "ketamïne", "ķêťãmïñĕ", "ketamine('more s' batch)", "ketamine(a)", "ketamine(b)", "ketamine(gn8-line)", "ketamine&salt", "ketamine&speed", "ketamine+", "ketaminea", "ketamineinthechillah", "ketaminenewsbatch", "ketamineq", "ketaminə", "ketaminoo", "ketamins", "ketaminw", "ketamoné", "ketfast", "ketline", "ketmaine", "ketmainewea", "ketman", "ketmin", "ketmine", "kets", "ketspray", "kett", "ketttimeme", "kettymean", "ketwoman", "kety", "keyamin", "kez", "kittey", "kitty", "kt", "letamine", "line ket", "line ketamine", "lines k", "mixed batches esket", "mixed k", "mixed ket", "mixed rests k", "mixed-ket", "mixrests-ket", "new batch esket", "new batch ket", "new batch s-ketamine", "night line of ketamine", "of ket", "of ketamine", "ofket", "orange-ket", "other batch ket", "pure ket & off sleep", "pure ket batch", "r-ketamine", "racemic ket", "racemic/arket-mix", "racemicket", "rbatch ket", "specialk", "substance k", "timelock-k", "unknown ket from box", "unknown ket"],
      "kratom"                        => ["greenkratom.md", "greenkratom", "greenmd", "greenmdkratom", "krarom", "kratom borneo", "kratom maeng da", "kratom_white_thai", "kratom_xanax_adderall", "kratom-8%-fse", "kratom", "kratom+kava", "kratom+matcha", "kratomblend", "kratome", "kratomshake", "lightpouryellowsumatra_redmd", "red_maeng_da_kratom", "red+green+yellowkratom", "redk+s&vblend", "redkasung", "redkasung/stem&vein", "redkasung+gmd+s&v", "redkasung+s/v", "redkasung+s&v", "redkasung+yellowsumatra", "redkasyng", "redkratom", "redmaengda", "redmd", "redmd+s&v", "redmd+yellowsumatra", "redmdshake", "redmdyellowsumatra", "redmdyellowsumatragreenthai", "stim-kratom", "white-indo-kratom", "y.sumatra/r.maengda", "yellokratom", "yellowkratom oral", "yellowkratom", "yellowkratomnotmydose", "yellowkraton", "yellowsumatra.redmd", "yellowsumatra", "yellowsumatra+redmd", "yellowsumatraredmd"],
      "lactase"                       => ["lactrase", "laktase"],
      "lamotrigine"                   => ["lamotrigine"],
      "levobupivacaine"               => ["levobupivacaine"],
      "levocetirizine"                => ["levocetirizine", "levocetrizine-hcl"],
      "levodopa"                      => ["l-dopa"],
      "levomethamphetamine"           => ["l-meth"],
      "lisdexamfetamine"              => ["lisdex", "lisdexamfetamine", "lisdexamfetaminedimesylate", "lisdexamph", "lisdexamphetamine", "lisdez", "vyvanse"],
      "lithium"                       => ["lithium"],
      "loperamide"                    => ["imodium", "loperamid", "loperamide", "loperamidhydrochlorid"],
      "loratadine"                    => ["loratadime", "loratadin", "loratadine", "claritin"],
      "lorazepam"                     => ["lorazepam"],
      "lsa"                           => ["lsa"],
      "lsd"                           => ["lsd-25", "lsd", "lsdagain"],
      "magnesium"                     => ["mg", "mgdg", "magnesiumdiglycinate", "magnesium-diglycinate", "magnesium diglycinate", "magnesium diglyscinate", "magnesiumglycinate", "magnesium-glycinate", "magnesium glycinate", "magnesiumcitrate", "magnesium-citrate", "magnesium citrate", "magnesiumoxide", "magnesium-oxide", "magnesium oxide"],
      "magnesium-l-threonate"         => ["magnesium l-threonate", "magnesium-l-threonate", "magnesiumlthreonate", "magtein"],
      "maca"                          => ["maca", "maca extract", "maca root", "maca-root"],
      "b12"                           => ["b12", "vitamin b12", "vitaminb12", "cobalamin", "methylcobalamin"],
      "alpha-lipoic-acid"             => ["alpha lipoic acid", "alpha-lipoic-acid", "r-lipoic acid"],
      "mda"                           => ["mda"],
      "mdma"                          => ["eccie", "eccies", "emdema", "mandy", "mdma !", "mdma + ket rests", "mdma insufflated", "mdma-xr", "mdma", "mdmatab", "molly", "xtasy", "xtc"],
      "melatonin"                     => ["melatonin"],
      "metoprolol"                    => ["metoprolol"],
      "mysterypill"                   => ["mysterypill"],
      "na-r-ala"                      => ["na-r-ala", "na-rala", "narala", "sodium-r-alpha-lipoic-acid", "sodium-r-lipoate"],
      "mdphp"                         => ["mdphp"],
      "mdpihp"                        => ["mdpihp"],
      "mebicar"                       => ["temgicoluril"],
      "mescaline"                     => ["mescaline"],
      "metamizole"                    => ["novalgin", "tempalgin"],
      "methadone"                     => ["methadome", "methadone"],
      "methamphetamine"               => ["bathroomcrystal", "crank", "dodgymeth", "fakemeth", "meth", "methampetamine", "methamphetamine", "methanmphetamine", "not=me-methampetamine", "shitmeth", "tina"],
      "methoxetamine"                 => ["mxe"],
      "methylphenidate"               => ["concerta-xl", "concerta", "conerta", "medikinet", "methylphenidate", "methylphnidate", "methyphenidate", "metylphenidate", "mph-sr", "mph", "mphxr", "mpxr", "ritalianir", "ritalin", "ritalinsr", "xrmph"],
      "mf-pvp"                        => ["mfpvp"],
      "midazolam"                     => ["midazolam"],
      "mirtazapine"                   => ["mirtazapien", "mirtazapine"],
      "mitragynine"                   => ["mitragynine"],
      "modafinil"                     => ["moda", "modafinil", "modvigil"],
      "morphine"                      => ["morphin", "morphine", "morphium"],
      "mxipr"                         => ["mxipr"],
      "mxpr"                          => ["mxpr new one for me", "mxpr"],
      "n-n-dimethylphenethylamine"    => ["n,n-dimethylphenethyalmine", "n,n-dimethylphenethylamine"],
      "nac"                           => ["n-acetylcysteine", "nac"],
      "naloxone"                      => ["naloxone"],
      "nep"                           => ["n-ethyl-nor-pentedrone", "nep"],
      "nicotine"                      => ["handrolled_cigarette", "handrolled-cigarette", "nicotine-xr", "nicotine", "tobacco", "snuff", "snus"],
      "nitrazepam"                    => ["mogad0n", "mogadon", "nirazepam", "nitazepam", "nitrazepam"],
      "nitrous-oxide"                 => ["nitrous_oxide", "nitrous-oxide", "nitrous", "nos"],
      "o-dsmt"                        => ["odsmt"],
      "o-pce"                         => ["eticyclidone", "o-pce", "opce"],
      "olanzapine"                    => ["olanz", "olanzapine", "olanzapin", "olanzzzapean", "olanzzzapine"],
      "omeprazole"                    => ["omeprazole"],
      "ondansetron"                   => ["ondansetron", "zofran"],
      "oxazepam"                      => ["oxazepam"],
      "oxcarbazepine"                 => ["oxcarbazepine"],
      "oxycodone"                     => ["ocycodone", "oxy", "oxycodon", "oxycodone", "oxycontin", "oxyodone", "oxysped"],
      "pantoprazole"                  => ["pantoprazol", "pantoprazole"],
      "paracetamol"                   => ["acetaminophen", "paracetamol", "tapandol", "tylenol"],
      "phenibut"                      => ["phenibut", "phenibuthcl"],
      "prednisone"                    => ["prednisone"],
      "pregabalin"                    => ["pregab", "pregab+zopiclonedust", "pregabalin oral", "pregabalin_tea", "pregabalin", "pregabalin&ketamine", "pregabalin+clonazepam", "pregabalin+xanax", "pregabaline"],
      "prochlorperazine"              => ["prochlorperazine"],
      "progesterone"                  => ["p4", "prog", "progesterone"],
      "promethazine"                  => ["atoksil", "prometh", "promethazine"],
      "propofol"                      => ["propofol"],
      "propranolol"                   => ["propranolol"],
      "propylhexedrine"               => ["ppx", "propylhexedrine"],
      "pseudoephedrine"               => ["pse", "pseudo", "pseudoepedrine", "pseudoephedrine", "psuedoephedrine", "psueodephedrine", "sudafed"],
      "psilocybe-tampelandia"         => ["psilocybetampelandia"],
      "psilocybin"                    => ["psilocybin"],
      "quercetin"                     => ["quercetin-pepper-turmeric", "quercetin"],
      "quetiapine"                    => ["quetiapine", "quietialan", "qutetiapine", "seroquel"],
      "raltegravir"                   => ["raltegravir"],
      "risperidone"                   => ["risperidone"],
      "salvia-divinorum"              => ["salvia"],
      "sildenafil"                    => ["sildenafil", "viagra"],
      "simeticone"                    => ["sinethicone"],
      "sodium-bicarbonate"            => ["bicarb", "sodiumbicarb", "sodiumbicarbonate"],
      "spironolactone"                => ["spiro", "spironolactone"],
      "suboxone"                      => ["suboxone", "subuxone"],
      "sulbutiamine"                  => ["sulbutiamine"],
      "sumatriptan"                   => ["sumatriptan", "sumatriptanum"],
      "tadalafil"                     => ["cialis", "tadalafil"],
      "tapentadol"                    => ["tapentadol"],
      "temazepam"                     => ["temazepam"],
      "tenofovir"                     => ["tenofovir"],
      "thc-o"                         => ["thc-o", "thco"],
      "thc-p"                         => ["thcp"],
      "theanine"                      => ["l-thanine", "l-theanine", "ltheanine"],
      "tianeptine"                    => ["tianeptine", "tianeptinum"],
      "tiletamine"                    => ["tiletamine"],
      "tramadol"                      => ["tramadol", "trmadol"],
      "trihexyphenidyl"               => ["trihexyphenidyl"],
      "triptorelin"                   => ["triptorelin", "triptotelin"],
      "tryptophan"                    => ["l-tryptophan", "l-tyrptophan", "ltryptophan", "tryptofan", "tryptophan"],
      "tyrosine"                      => ["l-tyrosine", "ltyrosine", "tyrosine"],
      "valproate"                     => ["epilim"],
      "venlafaxine"                   => ["velaxine", "venlafaxine"],
      "vitamin-c"                     => ["vitaminc", "vitamin-c", "vitamin c", "ascorbic-acid", "ascorbicacid", "ascorbinacid", "ascorbine-acid", "ascorbineacid", "emergenc", "emergen-c"],
      "vitamin-d3"                    => ["d3", "vitamin d3", "vitamind3", "vitamin-d3", "vitamin-d", "vitamind", "cholecalciferol"],
      "acetyl-l-carnitine"            => ["acetyl l-carnitine", "acetyl-l-carnitine", "acetyl l carnitine", "acetylcarnitine", "acetyl-carnitine", "alcar"],
      "pygeum"                        => ["pygeum", "pygeum africanum"],
      "acetylhexapeptide-38"          => ["acetylhexapeptide38", "acetylhexapeptide-38", "2%acetylhexapeptide38"],
      "cannabis"                      => ["zoot", "weed", "hash", "joint", "spliff", "blunt", "bunt", "cart", "edible", "weedvape", "cannabisvape", "thcvape"],
      "xylometazoline"                => ["xylometazoline"],
      "zolpidem"                      => ["ambien", "zolpidem"],
      "zopiclone"                     => ["zop", "zopi", "zopiclone"],
    }

    # Short names for common substances
    DRUG_SHORT_NAMES = {
      "2f-dck"            => "2FDCK",
      "2-fma"             => "2FMA",
      "2c-b"              => "2CB",
      "3-cmc"             => "3CMC",
      "3-fma"             => "3FMA",
      "3-mmc"             => "3MMC",
      "4-fma"             => "4FMA",
      "4-mmc"             => "4MMC",
      "4f-mph"            => "4FMPH",
      "5-htp"             => "5HTP",
      "6-apb"             => "6APB",
      "a-phip"            => "PHIP",
      "a-pvp"             => "PVP",
      "alprazolam"        => "ALPZ",
      "amphetamine"       => "AMP",
      "armodafinil"       => "ARMOD",
      "buprenorphine"     => "BUP",
      "bupropion"         => "BUP",
      "caffeine"          => "CAFF",
      "cannabis"          => "THC",
      "clonazepam"        => "CLNZ",
      "cocaine"           => "COC",
      "codeine"           => "COD",
      "dck"               => "DCK",
      "dextroamphetamine" => "DEX",
      "dextromethorphan"  => "DXM",
      "diazepam"          => "DIAZ",
      "diphenhydramine"   => "DPH",
      "dmt"               => "DMT",
      "escitalopram"      => "ESCIT",
      "esketamine"        => "ESKET",
      "estradiol"         => "E2",
      "ethanol"           => "ETOH",
      "etizolam"          => "ETIZ",
      "f-phenibut"        => "FPHEN",
      "fentanyl"          => "FENT",
      "fxe"               => "FXE",
      "gabapentin"        => "GABA",
      "ghb"               => "GHB",
      "heroin"            => "H",
      "hhc"               => "HHC",
      "hydrocodone"       => "HYCD",
      "hydromorphone"     => "HM",
      "ibuprofen"         => "IBU",
      "ketamine"          => "KET",
      "kratom"            => "KRAT",
      "lisdexamfetamine"  => "LDX",
      "lorazepam"         => "LRZ",
      "lsd"               => "LSD",
      "magnesium"         => "Mg",
      "mda"               => "MDA",
      "mdma"              => "MDMA",
      "melatonin"         => "MEL",
      "methadone"         => "METH",
      "methamphetamine"   => "MAMP",
      "methylphenidate"   => "MPH",
      "modafinil"         => "MOD",
      "morphine"          => "MORPH",
      "mxipr"             => "MXIPR",
      "nac"               => "NAC",
      "nicotine"          => "NIC",
      "nitrous-oxide"     => "N2O",
      "o-dsmt"            => "ODSMT",
      "o-pce"             => "OPCE",
      "olanzapine"        => "OLNZ",
      "oxycodone"         => "OXY",
      "paracetamol"       => "APAP",
      "phenibut"          => "PHEN",
      "pregabalin"        => "PGB",
      "progesterone"      => "P4",
      "promethazine"      => "PMZ",
      "psilocybin"        => "PSILO",
      "quetiapine"        => "QUET",
      "sildenafil"        => "SILD",
      "tadalafil"         => "TAD",
      "tramadol"          => "TRAM",
      "venlafaxine"       => "VEN",
      "zolpidem"          => "ZOLP",
      "zopiclone"         => "ZOP",
    }

    # Create reverse lookup for fast normalization
    def self.build_lookup
      lookup = {} of String => String
      DRUG_MAPPINGS.each do |canonical, aliases|
        lookup[canonical] = canonical
        aliases.each do |alias_name|
          lookup[alias_name] = canonical
        end
      end
      lookup
    end

    private ALIAS_TO_CANONICAL = build_lookup

    def self.normalize(input : String) : String?
      ALIAS_TO_CANONICAL[input]?
    end

    def self.short_name(input : String) : String?
      normalized = normalize(input)
      return nil unless normalized
      DRUG_SHORT_NAMES[normalized]?
    end

    def self.get_aliases(canonical_name : String) : Array(String)
      DRUG_MAPPINGS[canonical_name]? || [] of String
    end

    def self.all_canonical_names : Array(String)
      DRUG_MAPPINGS.keys
    end

    # Export alias -> canonical map for diffing
    def self.export_alias_map : Hash(String, String)
      ALIAS_TO_CANONICAL.dup
    end
  end

  module RouteLUT
    # Route normalization mappings
    ROUTE_MAPPINGS = {
      "aerosolized"   => ["aerosolized", "puff", "puffs", "puffed", "inhaled", "inhalation"],
      "oral"          => ["oral", "po", "p.o.", "os", "mouth", "swallowed", "eaten", "buccal", "orla"],
      "insufflated"   => ["insufflated", "insuff", "nasal", "intranasal", "snorted", "sniffed", "snort", "sniff", "in", "insuflated"],
      "intramuscular" => ["im", "i.m.", "intramuscular", "intra muscular", "muscle injection"],
      "intravenous"   => ["iv", "i.v.", "intravenous", "intra venous", "injection", "injected"],
      "smoked"        => ["smoked", "smoke", "smoking", "smoled"],
      "vaped"         => ["vaped", "vaping", "vaporized", "vaporised", "vapd"],
      "sublingual"    => ["sublingual", "under tongue", "sl", "s.l.", "subligual"],
      "rectal"        => ["rectal", "anal", "rectally", "boofed", "boof", "plugged", "pr", "p.r."],
      "topical"       => ["topical", "skin", "dermal", "applied", "transdermal", "td", "patch"],
      "subcutaneous"  => ["subcutaneous", "subq", "sq", "sc", "s.c.", "s.q.", "subcut"],
    }

    # Short names for routes (medical abbreviations)
    ROUTE_SHORT_NAMES = {
      "aerosolized"   => "INH",
      "oral"          => "PO",
      "insufflated"   => "IN",
      "intramuscular" => "IM",
      "intravenous"   => "IV",
      "smoked"        => "SMK",
      "vaped"         => "VAP",
      "sublingual"    => "SL",
      "rectal"        => "PR",
      "topical"       => "TD",
      "subcutaneous"  => "SC",
    }

    # Create reverse lookup for fast normalization
    def self.build_lookup
      lookup = {} of String => String
      ROUTE_MAPPINGS.each do |canonical, aliases|
        lookup[canonical] = canonical
        aliases.each do |alias_name|
          lookup[alias_name.downcase] = canonical
        end
      end
      lookup
    end

    private ALIAS_TO_CANONICAL = build_lookup

    def self.normalize(input : String) : String?
      ALIAS_TO_CANONICAL[input.downcase]?
    end

    def self.short_name(input : String) : String?
      canonical = normalize(input)
      return nil unless canonical
      ROUTE_SHORT_NAMES[canonical]?
    end

    def self.all_canonical_names : Array(String)
      ROUTE_MAPPINGS.keys
    end

    # Export alias -> canonical map for diffing
    def self.export_alias_map : Hash(String, String)
      ALIAS_TO_CANONICAL.dup
    end
  end
end
