added unit test for restricting by encounterType and unit test for restricting by form