(requests, identifier_type_uuid, value)
Return the patient that matches the given identifier. If the
    number of matches is zero or more than one, return None.
Return the patient that matches the given identifier. If the
    number of matches is zero or more than one, return None.
Return the patient that matches the given identifier . If the number of matches is zero or more than one return None .
def get_patient_by_identifier(requests, identifier_type_uuid, value):
    """
    Return the patient that matches the given identifier. If the
    number of matches is zero or more than one, return None.
    """
    response_json = search_patients(requests, value)
    patients = []
    for patient in response_json['results']:
        for identifier in patient['identifiers']:
            if (
                identifier['identifierType']['uuid'] == identifier_type_uuid
                and identifier['identifier'] == value
            ):
                patients.append(patient)
    try:
        patient, = patients
    except ValueError:
        return None
    else:
        return patient
def get_patient_by_identifier ( requests , identifier_type_uuid , value ) : response_json = search_patients ( requests , value ) patients = [ ] for patient in response_json [ 'results' ] : for identifier in patient [ 'identifiers' ] : if ( identifier [ 'identifierType' ] [ 'uuid' ] == identifier_type_uuid and identifier [ 'identifier' ] == value ) : patients . append ( patient ) try : patient , = patients except ValueError : return None else : return patient