text: /**
   * An object containing keys for every available lab test. Each key contains an
   * object fully describing that lab test, including it's units, precision,
   * category, order of appearance with the category, low- and high-cutoff
   * values, names, and information on how to generate the result.
   */
  const Tests = {
    hgb: {
      long: "Hemoglobin",
      short: "Hgb",
      category: "Hematology",
      categoryOrder: 30,
      low: (patientInfo) => 130,
      high: (patientInfo) => 170,
      precision: 0,
      units: "g/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 150,
        sd: (patientInfo) => 10.2040816326531
      }
    },
    hct: {
      long: "Hematocrit",
      short: "Hct",
      category: "Hematology",
      categoryOrder: 40,
      low: (patientInfo) => 0.38,
      high: (patientInfo) => 0.5,
      precision: 2,
      units: "",
      generate: {
        type: "calc",
        requires: ["hgb"],
        defaults: {},
        calculate: (testResults, patient) => 0.003 * testResults["hgb"]
      }
    },
    rbc: {
      long: "Red Blood Cell Count",
      short: "RBC",
      category: "Hematology",
      categoryOrder: 20,
      low: (patientInfo) => 4.4,
      high: (patientInfo) => 5.7,
      precision: 2,
      units: "&times; 10<sup>12</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 5.05,
        sd: (patientInfo) => 0.331632653061224
      }
    },
    mcv: {
      long: "Mean Corpuscular Volume",
      short: "MCV",
      category: "Hematology",
      categoryOrder: 50,
      low: (patientInfo) => 80,
      high: (patientInfo) => 100,
      precision: 0,
      units: "fL",
      generate: {
        type: "normal",
        mean: (patientInfo) => 90,
        sd: (patientInfo) => 5.10204081632653
      }
    },
    mch: {
      long: "Mean Corpuscular Hemoglobin",
      short: "MCH",
      category: "Hematology",
      categoryOrder: 55,
      low: (patientInfo) => 17,
      high: (patientInfo) => 34,
      precision: 0,
      units: "pg",
      generate: {
        type: "normal",
        mean: (patientInfo) => 25.5,
        sd: (patientInfo) => 4.33673469387755
      }
    },
    plts: {
      long: "Platelets",
      short: "Plts",
      category: "Hematology",
      categoryOrder: 70,
      low: (patientInfo) => 130,
      high: (patientInfo) => 400,
      precision: 0,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 265,
        sd: (patientInfo) => 68.8775510204082
      }
    },
    rdw: {
      long: "Red Blood Cell Distribution Width",
      short: "RDW",
      category: "Hematology",
      categoryOrder: 60,
      low: (patientInfo) => 11.5,
      high: (patientInfo) => 14.5,
      precision: 1,
      units: "%",
      generate: {
        type: "normal",
        mean: (patientInfo) => 13,
        sd: (patientInfo) => 0.76530612244898
      }
    },
    retics: {
      long: "Reticulocyte Count",
      short: "Retics",
      category: "Hematology",
      categoryOrder: 65,
      low: (patientInfo) => 20,
      high: (patientInfo) => 84,
      precision: 0,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 52,
        sd: (patientInfo) => 16.3265306122449
      }
    },
    esr: {
      long: "Erythrocyte Sedimentation Rate",
      short: "ESR",
      category: "Hematology",
      categoryOrder: 140,
      low: (patientInfo) => 1,
      high: (patientInfo) => 6,
      precision: 0,
      units: "mm/hr",
      generate: {
        type: "normal",
        mean: (patientInfo) => 3.5,
        sd: (patientInfo) => 1.27551020408163
      }
    },
    crp: {
      long: "C Reactive Protein",
      short: "CRP",
      category: "Hematology",
      categoryOrder: 150,
      low: (patientInfo) => 0,
      high: (patientInfo) => 8,
      precision: 1,
      units: "mg/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 4,
        sd: (patientInfo) => 2.04081632653061
      }
    },
    wbc: {
      long: "White Blood Cell Count",
      short: "WBC",
      category: "Hematology",
      categoryOrder: 10,
      low: (patientInfo) => 4,
      high: (patientInfo) => 10,
      precision: 1,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "calc",
        requires: ["neut", "lymph"],
        defaults: {
          band: 0.0,
          baso: 0.0,
          eosin: 0.0,
          mono: 0.0
        },
        calculate: (testResults, patient) =>
          testResults["neut"] +
          testResults["band"] +
          testResults["baso"] +
          testResults["eosin"] +
          testResults["lymph"] +
          testResults["mono"]
      }
    },
    neut: {
      long: "Neutrophils",
      short: "Neut",
      category: "Hematology",
      categoryOrder: 80,
      low: (patientInfo) => 2,
      high: (patientInfo) => 7,
      precision: 2,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 4.5,
        sd: (patientInfo) => 1.27551020408163
      }
    },
    band: {
      long: "Bands",
      short: "Band",
      category: "Hematology",
      categoryOrder: 130,
      low: (patientInfo) => 0,
      high: (patientInfo) => 0.7,
      precision: 2,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 0.35,
        sd: (patientInfo) => 0.178571428571429
      }
    },
    baso: {
      long: "Basophils",
      short: "Baso",
      category: "Hematology",
      categoryOrder: 120,
      low: (patientInfo) => 0,
      high: (patientInfo) => 0.1,
      precision: 2,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 0.05,
        sd: (patientInfo) => 0.0255102040816327
      }
    },
    eosin: {
      long: "Eosinophils",
      short: "Eosin",
      category: "Hematology",
      categoryOrder: 110,
      low: (patientInfo) => 0,
      high: (patientInfo) => 0.45,
      precision: 2,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 0.225,
        sd: (patientInfo) => 0.114795918367347
      }
    },
    lymph: {
      long: "Lymphocytes",
      short: "Lymph",
      category: "Hematology",
      categoryOrder: 90,
      low: (patientInfo) => 1,
      high: (patientInfo) => 4,
      precision: 2,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 2.5,
        sd: (patientInfo) => 0.76530612244898
      }
    },
    mono: {
      long: "Monocytes",
      short: "Mono",
      category: "Hematology",
      categoryOrder: 100,
      low: (patientInfo) => 0.1,
      high: (patientInfo) => 1,
      precision: 2,
      units: "&times; 10<sup>9</sup>/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 0.55,
        sd: (patientInfo) => 0.229591836734694
      }
    },
    inr: {
      long: "International Normalized Ratio",
      short: "INR",
      category: "Coagulation",
      categoryOrder: 30,
      low: (patientInfo) => 0.9,
      high: (patientInfo) => 1.2,
      precision: 1,
      units: "",
      generate: {
        type: "normal",
        mean: (patientInfo) => 1.05,
        sd: (patientInfo) => 0.0765306122448979
      }
    },
    pt: {
      long: "Prothrombin Time",
      short: "PT",
      category: "Coagulation",
      categoryOrder: 20,
      low: (patientInfo) => 10,
      high: (patientInfo) => 13,
      precision: 0,
      units: "sec",
      generate: {
        type: "normal",
        mean: (patientInfo) => 11.5,
        sd: (patientInfo) => 0.76530612244898
      }
    },
    ptt: {
      long: "Partial Thromboplastin Time",
      short: "PTT",
      category: "Coagulation",
      categoryOrder: 10,
      low: (patientInfo) => 28,
      high: (patientInfo) => 38,
      precision: 0,
      units: "sec",
      generate: {
        type: "normal",
        mean: (patientInfo) => 33,
        sd: (patientInfo) => 2.55102040816327
      }
    },
    gluc: {
      long: "Glucose",
      short: "Gluc",
      category: "Chemistry",
      categoryOrder: 10,
      low: (patientInfo) => 3.8,
      high: (patientInfo) => 11.1,
      precision: 1,
      units: "mmol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 7.45,
        sd: (patientInfo) => 1.86224489795918
      }
    },
    na: {
      long: "Sodium",
      short: "Na",
      category: "Chemistry",
      categoryOrder: 20,
      low: (patientInfo) => 135,
      high: (patientInfo) => 145,
      precision: 0,
      units: "mmol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 140,
        sd: (patientInfo) => 2.55102040816327
      }
    },
    k: {
      long: "Potassium",
      short: "K",
      category: "Chemistry",
      categoryOrder: 30,
      low: (patientInfo) => 3.5,
      high: (patientInfo) => 5,
      precision: 1,
      units: "mmol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 4.25,
        sd: (patientInfo) => 0.38265306122449
      }
    },
    cl: {
      long: "Chloride",
      short: "Cl",
      category: "Chemistry",
      categoryOrder: 40,
      low: (patientInfo) => 98,
      high: (patientInfo) => 106,
      precision: 0,
      units: "mmol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 102,
        sd: (patientInfo) => 2.04081632653061
      }
    },
    hco3: {
      long: "Bicarbonate",
      short: "HCO3",
      category: "Chemistry",
      categoryOrder: 50,
      low: (patientInfo) => 24,
      high: (patientInfo) => 30,
      precision: 0,
      units: "mmol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 27,
        sd: (patientInfo) => 1.53061224489796
      }
    },
    ag: {
      long: "Anion Gap",
      short: "AG",
      category: "Chemistry",
      categoryOrder: 60,
      low: (patientInfo) => 0,
      high: (patientInfo) => 12,
      precision: 0,
      units: "mEq/L",
      generate: {
        type: "calc",
        requires: ["na", "cl", "hco3"],
        calculate: (testResults, patient) =>
          testResults["na"] - testResults["cl"] - testResults["hco3"]
      }
    },
    bun: {
      long: "Urea",
      short: "BUN",
      category: "Renal Function",
      categoryOrder: 10,
      low: (patientInfo) => 2.5,
      high: (patientInfo) => 8,
      precision: 1,
      units: "mmol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 5.25,
        sd: (patientInfo) => 1.4030612244898
      }
    },
    cr: {
      long: "Creatinine",
      short: "Cr",
      category: "Renal Function",
      categoryOrder: 30,
      low: (patientInfo) => 70,
      high: (patientInfo) => 120,
      precision: 0,
      units: "&micro;mol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 95,
        sd: (patientInfo) => 12.7551020408163
      }
    },
    gfr: {
      long: "Gromerular Filtration Rate",
      short: "GFR",
      category: "Renal Function",
      categoryOrder: 20,
      low: (patientInfo) => 60,
      high: (patientInfo) => 130,
      precision: 0,
      units: "mL/min/1.73 m<sup>2</sup>",
      generate: {
        type: "calc",
        requires: ["cr"],
        calculate: (testResults, patient) => {
          const sexAdjust =
            patient.gender && patient.gender.toLowerCase() === "f" ? 0.742 : 1.0;
          const raceAdjust =
            patient.race && patient.race.toLowerCase() === "black" ? 1.21 : 1.0;
          const ageAdjust = patient.age
            ? Math.pow(patient.age, -0.203)
            : Math.pow(40, -0.204);
          return (
            186 *
            Math.pow(testResults["cr"] / 88.4, -1.154) *
            ageAdjust *
            sexAdjust *
            raceAdjust
          );
        }
      }
    },
    ast: {
      long: "Aspartate Aminotransferase",
      short: "AST",
      category: "Hepatic",
      categoryOrder: 40,
      low: (patientInfo) => 18,
      high: (patientInfo) => 40,
      precision: 0,
      units: "U/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 29,
        sd: (patientInfo) => 5.61224489795918
      }
    },
    alt: {
      long: "Alanine Aminotransferase",
      short: "ALT",
      category: "Hepatic",
      categoryOrder: 50,
      low: (patientInfo) => 17,
      high: (patientInfo) => 63,
      precision: 0,
      units: "U/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 40,
        sd: (patientInfo) => 11.734693877551
      }
    },
    ggt: {
      long: "Gamma-glutamyl Transferase",
      short: "GGT",
      category: "Hepatic",
      categoryOrder: 60,
      low: (patientInfo) => 10,
      high: (patientInfo) => 48,
      precision: 0,
      units: "U/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 29,
        sd: (patientInfo) => 9.69387755102041
      }
    },
    alp: {
      long: "Alkaline Phosphatase",
      short: "ALP",
      category: "Hepatic",
      categoryOrder: 70,
      low: (patientInfo) => 38,
      high: (patientInfo) => 126,
      precision: 0,
      units: "U/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 82,
        sd: (patientInfo) => 22.4489795918367
      }
    },
    dbili: {
      long: "Bilirubin Direct",
      short: "Dbili",
      category: "Hepatic",
      categoryOrder: 20,
      low: (patientInfo) => 0,
      high: (patientInfo) => 4,
      precision: 0,
      units: "&micro;mol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 2,
        sd: (patientInfo) => 1.02040816326531
      }
    },
    ibili: {
      long: "Bilirubin Indirect",
      short: "Ibili",
      category: "Hepatic",
      categoryOrder: 30,
      low: (patientInfo) => 0,
      high: (patientInfo) => 19,
      precision: 0,
      units: "&micro;mol/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 9.5,
        sd: (patientInfo) => 4.8469387755102
      }
    },
    tbili: {
      long: "Bilirubin Total",
      short: "Tbili",
      category: "Hepatic",
      categoryOrder: 10,
      low: (patientInfo) => 8,
      high: (patientInfo) => 22,
      precision: 0,
      units: "&micro;mol/L",
      generate: {
        type: "calc",
        requires: ["dbili"],
        defaults: {
          ibili: 5
        },
        calculate: (testResults, patient) =>
          testResults["dbili"] + testResults["ibili"]
      }
    },
    lip: {
      long: "Lipase",
      short: "Lip",
      category: "Hepatic",
      categoryOrder: 80,
      low: (patientInfo) => 0,
      high: (patientInfo) => 160,
      precision: 0,
      units: "U/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 80,
        sd: (patientInfo) => 40.8163265306122
      }
    },
    hstnt: {
      long: "High Sensitivity Troponin T",
      short: "hs-TnT",
      category: "Cardiac",
      categoryOrder: 10,
      low: (patientInfo) => 0,
      high: (patientInfo) => 14,
      precision: 0,
      units: "ng/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 7,
        sd: (patientInfo) => 3.57142857142857
      }
    },
    ck: {
      long: "Creatinine Kinase",
      short: "CK",
      category: "Renal Function",
      categoryOrder: 40,
      low: (patientInfo) => 20,
      high: (patientInfo) => 215,
      precision: 0,
      units: "U/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 117.5,
        sd: (patientInfo) => 49.7448979591837
      }
    },
    bnp: {
      long: "NT-ProBNP",
      short: "BNP",
      category: "Cardiac",
      categoryOrder: 20,
      low: (patientInfo) => 0,
      high: (patientInfo) => 125,
      precision: 0,
      units: "pg/mL",
      generate: {
        type: "normal",
        mean: (patientInfo) => 62.5,
        sd: (patientInfo) => 31.8877551020408
      }
    },
    dimer: {
      long: "D-Dimer",
      short: "D-Dimer",
      category: "Cardiac",
      categoryOrder: 30,
      low: (patientInfo) => 0,
      high: (patientInfo) => 0.5,
      precision: 2,
      units: "mg/L",
      generate: {
        type: "normal",
        mean: (patientInfo) => 0.2,
        sd: (patientInfo) => 0.2
      }
    }
  };
  
  export default Tests;
  