Updates retrieveData signature.

Includes Sets, excludes Study.
Adds getPatients to QueriesResource.