converting date to correct iso format

converting date to correct iso format in encounter and registration
handler