Issue #1036: Add automated integration tests

Added more tests for the patient record