Replaces use of fetchPatients() by patient mapping in QueryResult.
Replaces Lists with Sets, removes Study from signature.
Moves getting of patients to QueriesResourceService.