You might want to check if this is not a new encounter type other the id will be null