added encounter_datetime to the flat_tables