# Path: onefl/partner_name.py
# class PartnerName(Enum):
#     """
#     3-letter partner names
#     """
#     HCN = 'HCN'     # Health Choice Network
#     BND = 'BND'     # Bond Community Hospital
#     UMI = 'UMI'     # University of Miami
# 
#     FLM = 'FLM'     # Florida Medicaid Claims (aka ICHP)
#     CHP = 'CHP'     # Capital Health Plan Claims
# 
#     UFH = 'UFH'     # University of Florida Health
#     TMC = 'TMC'     # Tallahassee Memorial Hospital - Cerner
#     TMA = 'TMA'     # Tallahassee Memorial Hospital - Allscripts
#     ORH = 'ORH'     # Orlando Health
# 
#     FLH = 'FLH'     # Florida Hospital
#     MCH = 'MCH'     # Miami Children's Hospital
# 
# Path: onefl/partner_name.py
# VALID_PARTNERS = [p.value for p in list(PartnerName)]


from invoke import task
from onefl.partner_name import PartnerName  # noqa
from onefl.partner_name import VALID_PARTNERS


@task
def extract_linked(ctx):
    ctx.run("python scripts/extract_existing_linkage_data.py -lnk")


@task(aliases=['hash'])
def hasher(ctx, ask=True):
    """ Generate hashes from PHI """
    inputfolder = 'data'
    outputfolder = 'data'
    opt_ask = '--ask' if ask else ''

    ctx.run('PYTHONPATH=. python run/hasher.py -i {} -o {} {}'
            .format(inputfolder, outputfolder, opt_ask))


@task
def demo(ctx, ask=True):
    """ Generate hashes from PHI """
    inputfolder = '.'
    outputfolder = '.'
    opt_ask = '--ask' if ask else ''

    ctx.run('PYTHONPATH=. python run/hasher.py -i {} -o {} {}'
            .format(inputfolder, outputfolder, opt_ask))


@task(aliases=['link'],

# Path: onefl/partner_name.py
# class PartnerName(Enum):
#     """
#     3-letter partner names
#     """
#     HCN = 'HCN'     # Health Choice Network
#     BND = 'BND'     # Bond Community Hospital
#     UMI = 'UMI'     # University of Miami
# 
#     FLM = 'FLM'     # Florida Medicaid Claims (aka ICHP)
#     CHP = 'CHP'     # Capital Health Plan Claims
# 
#     UFH = 'UFH'     # University of Florida Health
#     TMC = 'TMC'     # Tallahassee Memorial Hospital - Cerner
#     TMA = 'TMA'     # Tallahassee Memorial Hospital - Allscripts
#     ORH = 'ORH'     # Orlando Health
# 
#     FLH = 'FLH'     # Florida Hospital
#     MCH = 'MCH'     # Miami Children's Hospital
# 
# Path: onefl/partner_name.py
# VALID_PARTNERS = [p.value for p in list(PartnerName)]


# Path: tasks.py
from invoke import task
from onefl.partner_name import PartnerName  # noqa
from onefl.partner_name import VALID_PARTNERS



@task
def extract_linked(ctx):
    ctx.run("python scripts/extract_existing_linkage_data.py -lnk")


@task(aliases=['hash'])
def hasher(ctx, ask=True):
    """ Generate hashes from PHI """
    inputfolder = 'data'
    outputfolder = 'data'
    opt_ask = '--ask' if ask else ''

    ctx.run('PYTHONPATH=. python run/hasher.py -i {} -o {} {}'
            .format(inputfolder, outputfolder, opt_ask))


@task
def demo(ctx, ask=True):
    """ Generate hashes from PHI """
    inputfolder = '.'
    outputfolder = '.'
    opt_ask = '--ask' if ask else ''

    ctx.run('PYTHONPATH=. python run/hasher.py -i {} -o {} {}'
            .format(inputfolder, outputfolder, opt_ask))


@task(aliases=['link'],

      help={'partner': 'The partner name: {}'.format(VALID_PARTNERS)})