Ignore:
Timestamp:
Feb 10, 2010, 4:09:52 PM (10 years ago)
Author:
keesvb
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/SandboxController.groovy

    r186 r187  
    11import dbnp.studycapturing.*
     2import dbnp.clinicaldata.ClinicalFloatData
     3import dbnp.clinicaldata.ClinicalMeasurement
    24
    35// The sandbox is meant for internal communication over code examples etc.
    46
    57class SandboxController {
     8
     9        def clinicalDataLayerService
    610
    711        def index = {
     
    2226
    2327                //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) {
    2531                println st.template.getSubjectFieldType('Age')
    2632                println subject.getFieldValue('Genotype')
     
    2834                println subject.getFieldValue('Genotype')
    2935                subject.setFieldValue('name','hallo')
    30                 println subject.name
     36                println subject.name }*/
    3137
    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[])
    3442
    3543                // Specify which variables we want to be available in the controller (implicit return statement)
    3644                [fields: f, subjects: st.subjects]
     45        }
    3746}
    38 }
Note: See TracChangeset for help on using the changeset viewer.