def load_carrier(the_file, the_database=None):
    new_line_item_col_names = ("PRF_PHYSN_NPI", "TAX_NUM", "HCPCS_CD",
                               "LINE_NCH_PMT_AMT", "LINE_BENE_PTB_DDCTBL_AMT",
                               "LINE_BENE_PRMRY_PYR_PD_AMT",
                               "LINE_COINSRNC_AMT", "LINE_ALOWD_CHRG_AMT",
                               "LINE_PRCSG_IND_CD", "LINE_ICD9_DGNS_CD")
    new_line_item_matchers = tuple("^" + i for i in new_line_item_col_names)
    second_criteria = {
        "explode-criteria": ("^ICD9_DGNS_CD", ),
        "table-name": "carrier_diagnosis",
        "column-names": ("icd9", )
    }
    first_criteria = {
        "explode-criteria": new_line_item_matchers,
        "table-name": "line_item",
        "column-names": new_line_item_col_names
    }
    daniel = strat.Exploding([first_criteria, second_criteria])
    dbf.quick_load(the_file,
                   the_database,
                   "carrier_claim",
                   delim=",",
                   strategy=daniel)
def load_outpatient(the_file, the_database=None):
    print("running load_outpatient() with ", the_file)
    first_criteria = {
        "explode-criteria": ("^HCPCS_CD", ),
        "table-name": "hcpc_outpatient_procedure",
        "column-names": ('HCPCS_CD', )
    }
    second_criteria = {
        "explode-criteria": ("^ICD9_PRCDR_CD", ),
        "table-name": "icd9_outpatient_procedure",
        "column-names": ("ICD9_PRCDR_CD", )
    }
    third_criteria = {
        "explode-criteria": ("^ICD9_DGNS_CD", ),
        "table-name": "outpatient_diagnosis",
        "column-names": ("ICD9_DGNS_CD", )
    }
    tuple_p = strat.Exploding(
        [first_criteria, second_criteria, third_criteria])
    dbf.quick_load(the_file,
                   the_database,
                   "outpatient_claim",
                   delim=",",
                   strategy=tuple_p)
def load_beneficiary(the_file, the_database=None):
    print("running load_beneficiary() with ", the_file)
    dbf.quick_load(the_file, the_database, "beneficiary")
def load_drug_events(the_file, the_database=None):
    print("running load_drug_events() with ", the_file)
    dbf.quick_load(the_file, the_database, "drug_events")