Add validation to encounter model
Refactor code to eliminate unneeded comments and whitespace