Refactoring code to delete duplicated code, step 6.
Refactoring code to delete duplicated code, step 6.1. Oops.
Updating Inpatients test to deal with filtering.