def process_outcome(data, label):
    """
    Organise the outcome field to binary by dropping missing vals and
    mapping the free text into 0 or 1
    :param data: pd.DataFrame the input data with the label column
    :param label: str, the name of the outcome field
    :return:
    """

    # drop rows with missing outcome
    data.dropna(subset=[label], axis=0, inplace=True)

    # Map the categories to binary (0/1) outcome
    outcome_mapping = { 'Live Birth':1,
                        'Live birth':1,
                        'Termination':0,
                        'IUD':0,
                        'Stillbirth':0,
                        'NND >1 Week postpartal':0,
                        'NND <1 Week postpartal': 0,
                        'Neonatal death':0,
                        'Miscarriage':0,
                        'Lost to follow-up':1,
                        'Stillbirth or LB?':1,
                        'Live Birth??':1,
                        'No followup':1,
                        'Ongoing':1}
    data[label] = data[label].apply(lambda x: outcome_mapping[x])

    return data