Changeset 187 for trunk/grails-app/controllers/SandboxController.groovy
- Timestamp:
- Feb 10, 2010, 4:09:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/SandboxController.groovy
r186 r187 1 1 import dbnp.studycapturing.* 2 import dbnp.clinicaldata.ClinicalFloatData 3 import dbnp.clinicaldata.ClinicalMeasurement 2 4 3 5 // The sandbox is meant for internal communication over code examples etc. 4 6 5 7 class SandboxController { 8 9 def clinicalDataLayerService 6 10 7 11 def index = { … … 22 26 23 27 //Let's get a certain field for a certain subject 24 def subject = Subject.findByName('A1') 28 /*def subject = st.subjects.get(1) 29 30 if (subject) { 25 31 println st.template.getSubjectFieldType('Age') 26 32 println subject.getFieldValue('Genotype') … … 28 34 println subject.getFieldValue('Genotype') 29 35 subject.setFieldValue('name','hallo') 30 println subject.name 36 println subject.name }*/ 31 37 32 println Study.get(2).giveSamples()*.name 33 38 39 // Demonstration of querying mechanism 40 println clinicalDataLayerService.getFeaturesQuantitative(1) 41 clinicalDataLayerService.getDataQuantitative('LDL',1,['A1_B','A3_B'] as String[]) 34 42 35 43 // Specify which variables we want to be available in the controller (implicit return statement) 36 44 [fields: f, subjects: st.subjects] 45 } 37 46 } 38 }
Note: See TracChangeset
for help on using the changeset viewer.