def _get_patients_from_encounters(encounters):
    """Input list of encounters, return a list of all 
    the patients within those encounters"""
    patients = set()
    for enc in encounters:
        patients.add(enc.visit.patient.uuid)
    return patients