Some tests for debugging sub view queries

Need to find the right syntax to query the list of studies
per patient.