source: trunk/grails-app/services/dbnp/clinicaldata/ClinicalDataLayerService.groovy @ 187

Last change on this file since 187 was 187, checked in by keesvb, 10 years ago

changed definition of clean data layer, implemented it for the clinical data module, added demonstration to the sandbox

File size: 521 bytes
Line 
1package dbnp.clinicaldata
2
3class ClinicalDataLayerService implements dbnp.data.CleanDataLayer {
4
5        boolean transactional = false
6
7        Map getDataQuantitative(String feature, long assayID, String[] sampleIDs) {
8                def measurement = ClinicalMeasurement.findByName(feature)
9                if (!measurement) throw new NoSuchFieldException("Feature ${feature} not found")
10                measurement.getValues(assayID,sampleIDs)
11        }
12
13        String[] getFeaturesQuantitative(long assayID) {
14                return ClinicalAssayInstance.get(assayID).assay.measurements*.name;
15        }
16}
Note: See TracBrowser for help on using the repository browser.