RACES = {
    # ASIAN race
    "2028-9": "Asian",
    # Expansion of ASIAN race
    "2029-7": "Asian Indian",
    "2030-5": "Bangladeshi",
    "2031-3": "Bhutanese",
    "2032-1": "Burmese",
    "2033-9": "Cambodian",
    "2034-7": "Chinese",
    "2035-4": "Taiwanese",
    "2036-2": "Filipino",
    "2037-0": "Hmong",
    "2038-8": "Indonesian",
    "2039-6": "Japanese",
    "2040-4": "Korean",
    "2041-2": "Laotian",
    "2042-0": "Malaysian",
    "2043-8": "Okinawan",
    "2044-6": "Pakistani",
    "2045-3": "Sri Lankan",
    "2046-1": "Thai",
    "2047-9": "Vietnamese",
    "2048-7": "Iwo Jiman",
    "2049-5": "Maldivian",
    "2050-3": "Nepalese",
    "2051-1": "Singaporean",
    "2052-9": "Madagascar",
    # BALCK OR AFRICAN AMERICAN race
    "2054-5": "Black or African American",
    # Expansion of BALCK OR AFRICAN AMERICAN race
    "2060-2": "African",
    "2056-0": "Black",
    "2058-6": "African American",
    "2067-7": "Bahamian",
    "2068-5": "Barbadian",
    "2069-3": "Dominican",
    "2070-1": "Dominica Islander",
    "2071-9": "Haitian",
    "2072-7": "Jamaican",
    "2073-5": "Tobagoan",
    "2074-3": "Trinidadian",
    "2075-0": "West Indian",
    # NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER race
    "2076-8": "Native Hawaiian or Other Pacific Islander",
    # Expansion of NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER race
    "2100-6": "Melanesian",
    "2085-9": "Micronesian",
    "2078-4": "Polynesian",
    "2500-7": "Other Pacific Islander",
    # AMERICAN INDIAN OR ALASKA NATIVE race
    "1002-5": "American Indian or Alaska Native",
    # Expansion of AMERICAN INDIAN OR ALASKA NATIVE race
    "1735-0": "Alaska Native",
    "1004-1": "American Indian",
    # WHITE race
    "2106-3": "White",
    # Expansion of WHITE race
    "2129-5": "Arab",
    "2108-9": "European",
    "2118-8": "Middle Eastern or North African",
    # Other race
    "2131-1": "Other Race",
}

LEADS = {
    "MDC_ECG_LEAD_CONFIG": "Unspecified lead",  # Unspecified lead
    "MDC_ECG_LEAD_I": "Lead I",
    "MDC_ECG_LEAD_II": "Lead II",
    "MDC_ECG_LEAD_V1": "Lead V1",
    "MDC_ECG_LEAD_V2": "Lead V2",
    "MDC_ECG_LEAD_V3": "Lead V3",
    "MDC_ECG_LEAD_V4": "Lead V4",
    "MDC_ECG_LEAD_V5": "Lead V5",
    "MDC_ECG_LEAD_V6": "Lead V6",
    "MDC_ECG_LEAD_V7": "Lead V7",
    "MDC_ECG_LEAD_V2R": "Lead V2R",
    "MDC_ECG_LEAD_V3R": "Lead V3R",
    "MDC_ECG_LEAD_V4R": "Lead V4R",
    "MDC_ECG_LEAD_V5R": "Lead V5R",
    "MDC_ECG_LEAD_V6R": "Lead V6R",
    "MDC_ECG_LEAD_V7R": "Lead V7R",
    "MDC_ECG_LEAD_X": "Lead X",
    "MDC_ECG_LEAD_Y": "Lead Y",
    "MDC_ECG_LEAD_Z": "Lead Z",
    "MDC_ECG_LEAD_CC5": "Lead CC5",  # CC5, per V5 and V5R placement
    "MDC_ECG_LEAD_CM5": "Lead CM5",  # CM5, per V5 placement
    "MDC_ECG_LEAD_LA": "Lead LA",  # Left Arm
    "MDC_ECG_LEAD_RA": "Lead RA",  # Right Arm
    "MDC_ECG_LEAD_LL": "Lead LL",  # Left Leg
    "MDC_ECG_LEAD_fI": "Lead I",
    "MDC_ECG_LEAD_fE": "Lead E",
    "MDC_ECG_LEAD_fC": "Lead C",
    "MDC_ECG_LEAD_fA": "Lead A",
    "MDC_ECG_LEAD_fM": "Lead M",
    "MDC_ECG_LEAD_fF": "Lead F",
    "MDC_ECG_LEAD_fH": "Lead H",
    "MDC_ECG_LEAD_III": "Lead III",
    "MDC_ECG_LEAD_AVR": "Lead aVR",  # augmented voltage, right
    "MDC_ECG_LEAD_AVL": "Lead aVL",  # augmented voltage, left
    "MDC_ECG_LEAD_AVF": "Lead aVF",  # augmented voltage, foot
    "MDC_ECG_LEAD_AVRneg": "Lead –aVR",
    "MDC_ECG_LEAD_V8": "Lead V8",
    "MDC_ECG_LEAD_V9": "Lead V9",
    "MDC_ECG_LEAD_V8R": "Lead V8R",
    "MDC_ECG_LEAD_V9R": "Lead V9R",
    "MDC_ECG_LEAD_D": "Lead D",  # D (Nehb – Dorsal)
    "MDC_ECG_LEAD_A": "Lead A",  # A (Nehb – Anterior)
    "MDC_ECG_LEAD_J": "Lead J",  # J (Nehb – Inferior)
    "MDC_ECG_LEAD_DEFIB": "Lead Defib",  # Defibrillator lead: anterior-lateral
    "MDC_ECG_LEAD_EXTERN": "Lead Extern",  # External pacing lead: anterior-posterior
    "MDC_ECG_LEAD_A1": "Lead A1",  # A1 (Auxiliary unipolar lead #1)
    "MDC_ECG_LEAD_A2": "Lead A2",  # A2 (Auxiliary unipolar lead #2)
    "MDC_ECG_LEAD_A3": "Lead A3",  # A3 (Auxiliary unipolar lead #3)
    "MDC_ECG_LEAD_A4": "Lead A4",  # A4 (Auxiliary unipolar lead #4)
    "MDC_ECG_LEAD_C": "Lead Chest",
    "MDC_ECG_LEAD_V": "Lead V",  # Precordial lead
    "MDC_ECG_LEAD_VR": "Lead VR",  # VR, nonaugmented voltage, vector of RA
    "MDC_ECG_LEAD_VL": "Lead VL",  # VL, nonaugmented voltage, vector of LA
    "MDC_ECG_LEAD_VF": "Lead VF",  # VF, nonaugmented voltage, vector of LL
    "MDC_ECG_LEAD_MCL": "Lead MCL",  # Modified chest lead (left arm indifferent)
    "MDC_ECG_LEAD_MCL1": "Lead MCL1",  # MCL, per V1 placement
    "MDC_ECG_LEAD_MCL2": "Lead MCL2",  # MCL, per V2 placement
    "MDC_ECG_LEAD_MCL3": "Lead MCL3",  # MCL, per V3 placement
    "MDC_ECG_LEAD_MCL4": "Lead MCL4",  # MCL, per V4 placement
    "MDC_ECG_LEAD_MCL5": "Lead MCL5",  # MCL, per V5 placement
    "MDC_ECG_LEAD_MCL6": "Lead MCL6",  # MCL, per V6 placement
    "MDC_ECG_LEAD_CC": "Lead CC",  # Chest lead (symmetric placement)
    "MDC_ECG_LEAD_CC1": "Lead CC1",  # CC1, per V1 and V1R placement
    "MDC_ECG_LEAD_CC2": "Lead CC2",  # CC2, per V2 and V2R placement
    "MDC_ECG_LEAD_CC3": "Lead CC3",  # CC3, per V3 and V3R placement
    "MDC_ECG_LEAD_CC4": "Lead CC4",  # CC4, per V4 and V4R placement
    "MDC_ECG_LEAD_CC6": "Lead CC6",  # CC6, per V6 and V6R placement
    "MDC_ECG_LEAD_CC7": "Lead CC7",  # CC7, per V7 and V8R placement
    "MDC_ECG_LEAD_CM": "Lead CM",  # Chest-manubrium
    "MDC_ECG_LEAD_CM1": "Lead CM1",  # CM1, per V1 placement
    "MDC_ECG_LEAD_CM2": "Lead CM2",  # CM2, per V2 placement
    "MDC_ECG_LEAD_CM3": "Lead CM3",  # CM3, per V3 placement
    "MDC_ECG_LEAD_CM4": "Lead CM4",  # CM4, per V4 placement
    "MDC_ECG_LEAD_CM6": "Lead CM6",  # CM6, per V6 placement
    "MDC_ECG_LEAD_CM7": "Lead CM7",  # CM7, per V7 placement
    "MDC_ECG_LEAD_CH5": "Lead CH5",
    "MDC_ECG_LEAD_CS5": "Lead CS5",  # negative: right infraclavicular fossa
    "MDC_ECG_LEAD_CB5": "Lead CB5",  # negative: low right scapula
    "MDC_ECG_LEAD_CR5": "Lead CR5",
    "MDC_ECG_LEAD_ML": "Lead ML",  # ML, modified limb lead, ~ Lead II
    "MDC_ECG_LEAD_AB1": "Lead AB1",  # AB1 (auxiliary bipolar lead #1)
    "MDC_ECG_LEAD_AB2": "Lead AB2",  # AB2 (auxiliary bipolar lead #2)
    "MDC_ECG_LEAD_AB3": "Lead AB3",  # AB3 (auxiliary bipolar lead #3)
    "MDC_ECG_LEAD_AB4": "Lead AB4",  # AB4 (auxiliary bipolar lead #4)
    "MDC_ECG_LEAD_ES": "Lead ES",  # EASI™ ES
    "MDC_ECG_LEAD_AS": "Lead AS",  # EASI AS
    "MDC_ECG_LEAD_AI": "Lead AI",  # EASI AI
    "MDC_ECG_LEAD_S": "Lead S",  # EASI upper sternum lead
    "MDC_ECG_LEAD_dI": "Lead dI",  # derived lead I
    "MDC_ECG_LEAD_dII": "Lead dII",  # derived lead II
    "MDC_ECG_LEAD_dIII": "Lead dIII",  # derived lead III
    "MDC_ECG_LEAD_daVR": "Lead daVR",  # derived lead aVR
    "MDC_ECG_LEAD_daVL": "Lead daVL",  # derived lead aVL
    "MDC_ECG_LEAD_daVF": "Lead daVF",  # derived lead aVF
    "MDC_ECG_LEAD_dV1": "Lead dV1",  # derived lead V1
    "MDC_ECG_LEAD_dV2": "Lead dV2",  # derived lead V2
    "MDC_ECG_LEAD_dV3": "Lead dV3",  # derived lead V3
    "MDC_ECG_LEAD_dV4": "Lead dV4",  # derived lead V4
    "MDC_ECG_LEAD_dV5": "Lead dV5",  # derived lead V5
    "MDC_ECG_LEAD_dV6": "Lead dV6",  # derived lead V6
    "MDC_ECG_LEAD_RL": "Lead RL",  # right leg
    "MDC_ECG_LEAD_CV5RL": "Lead CV5RL",  # Canine, fifth right intercostals space near the edge of the sternum at the most curved part of the costal cartilage
    "MDC_ECG_LEAD_CV6LL": "Lead CV6LL",  # Canine, sixth left intercostals space near the edge of the sternum at the most curved part of the costal cartilage
    "MDC_ECG_LEAD_CV6LU": "Lead CV6LU",  # Canine, sixth left intercostals space at the costochondral junction
    "MDC_ECG_LEAD_V10": "Lead V10",  # Canine, over dorsal spinous process of the seventh thoracic vertebra
}

CONTROL_VARS = {
    "MDC_ECG_CTL_VBL": "Generic control variable",
    "MDC_ECG_CTL_VBL_SAMPLE_RATE": "Sample rate",
    "MDC_ECG_CTL_VBL_SENSITIVITY": "Sensitivity",
    "MDC_ECG_CTL_VBL_ZERO_OFFSET": "Zero offset",
    "MDC_ECG_CTL_VBL_VALID_RANGE": "Valid range",
    "MDC_ECG_CTL_VBL_PAD_VALUE": "Pad value",
    "MDC_ECG_CTL_VBL_TIME_SKEW": "Time skew",
    "MDC_ECG_CTL_VBL_SAMPLE_SKEW": "Sample skew",
    "MDC_ECG_CTL_VBL_TIME_OFFSET": "Time offset",
    "MDC_ECG_CTL_VBL_QTC_METHOD": "QTc correction method",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_LOW_PASS": "Low pass filter",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_CUTOFF_FREQ": "Low pass filter cutoff freq",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_HIGH_PASS": "High pass filter",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_ORDER": "High pass filter order",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_DESCRIPTION": "High pass filter description",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_NOTCH": "Notch filter",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_NOTCH_FREQ": "Notch filter frequency",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_NOTCH_BANDWIDTH": "Notch filter bandwidth",
    "MDC_ECG_CTL_VBL_ATTR_FILTER_NOTCH_DESCRIPTION": "Notch filter description",
    "MDC_ECG_CTL_VBL_BASELINE": "Baseline",
    "MDC_ECG_CTL_VBL_BASELINE_DESC": "Baseline description",
    "MDC_ECG_CTL_VBL_BASELINE_ORDER": "Baseline order",
    "MDC_ECG_CTL_VBL_INTERPOLATOR": "Interpolator",
    "MDC_ECG_CTL_VBL_INTERPOLATOR_SRC_SAMP_RATE": "Interpolator source sample rate",
    "MDC_ECG_CTL_VBL_INTERPOLATOR_DESC": "Interpolator description",
    "MDC_ECG_CTL_VBL_INTERPOLATOR_ORDER": "Interpolator order",
    "MDC_ECG_CTL_VBL_INTERPOLATOR_SNR": "Interpolator snr",
    "MDC_ECG_CTL_VBL_DISPLAYED_SIZE": "Displayed size",
    "MDC_ECG_CTL_VBL_DISPLAYED_COLOR": "Displayed color",
    "MDC_ECG_CTL_VBL_DISPLAYED_SWEEP_RATE": "Displayed sweep rate",
    "MDC_ECG_CTL_VBL_ATTR_RHYTHM": "Rhythm attribute",
    "MDC_ECG_CTL_VBL_ATTR_AV_COND": "Rhythm attribute AV_Cond",
    "MDC_ECG_CTL_VBL_ATTR_SA_COND": "Rhythm attribute SA_Cond",
    "MDC_ECG_CTL_VBL_ATTR_RHYTHM_CRITERIA": "Rhythm criteria attribute",
    "MDC_ECG_CTL_VBL_ATTR_RHYTHM_CODE": "Rhythm criteria attribute code",
    "MDC_ECG_CTL_VBL_ATTR_RATE_LIMIT_HIGH_GT": "Rhythm criteria attribute rate hi GT limit",
    "MDC_ECG_CTL_VBL_ATTR_RATE_LIMIT_HIGH_GE": "Rhythm criteria attribute rate hi GE limit",
    "MDC_ECG_CTL_VBL_ATTR_RATE_LIMIT_LOW_LT": "Rhythm criteria attribute rate lo LT limit",
    "MDC_ECG_CTL_VBL_ATTR_RATE_LIMIT_LOW_LE": "Rhythm criteria attribute rate lo LE limit",
    "MDC_ECG_CTL_VBL_ATTR_RATE_LIMIT_LOW_GT": "Rhythm criteria attribute rate lo GT limit",
    "MDC_ECG_CTL_VBL_ATTR_RATE_LIMIT_LOW_GE": "Rhythm criteria attribute rate lo GE limit",
    "MDC_ECG_CTL_VBL_ATTR_RATE_LIMIT_HGH_LT": "Rhythm criteria attribute rate hi LT limit",
    "MDC_ECG_CTL_VBL_ATTR_RATE_LIMIT_HIGH_LE": "Rhythm criteria attribute rate hi LE limit",
}
