This doesn't look right to me. It should just be:
    select encounter_id, date_created
    from encounter
    where encounter_id in (:encounterIds)

Unless this is intended to be "date that most recent Admission, Discharge, or Transfer was created", in which case this is badly named.