def minimize_treatment(treatment):
    """
    Takes a treatment obtained directly from its json from the portal and strips
    it down to a subset of desired fields.
    """
    minimized_treatment = {}
    
    for key in ['treatment_type','dbxrefs','treatment_term_name','treatment_term_id','concentration',
                'concentration_units','duration','duration_units','temperature','temperature_units']:
        if key in treatment.keys():
            minimized_treatment[key]=treatment[key] 
    
    return minimized_treatment