convert Encounter.releaseDate from a Date object to a Long