Ignore:
Timestamp:
Jan 29, 2010, 12:51:25 PM (11 years ago)
Author:
ademcan
Message:

reorganization of the study views : template and protocol views in the accordion menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r146 r148  
    140140                        }
    141141
    142                         new Study(title:"example",code:"Excode",researchQuestion:"ExRquestion",description:"Exdescription",ecCode:"ExecCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
    143                         new Study(title:"testAgain",code:"testcode",researchQuestion:"testRquestion",description:"testdescription",ecCode:"testCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
    144                         new Study(title:"Exampletest",code:"Examplecode",researchQuestion:"ExampleRquestion",description:"Exampledescription",ecCode:"ExampleecCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
     142
     143                        def secondStudy = new Study(
     144                                title:"NuGO PPS1 mouse study leptin module",
     145                                code:"PPS1",
     146                                researchQuestion:"etc.",
     147                                description:"C57Bl/6 mice were fed a high fat (45 en%) or low fat (10 en%) diet after a four week run-in on low fat diet. After 1 week 10 mice that received a low fat diet were given an IP leptin challenge and 10 mice of the low-fat group received placebo injections. The same procedure was performed with mice that were fed the high-fat diet. After 4 weeks the procedure was repeated. In total 80 mice were culled.",
     148                                ecCode:"2007.c",
     149                                startDate: Date.parse('yyyy-MM-dd','2007-12-11'),
     150                                template: mouseTemplate
     151                        ).with { if (!validate()) { errors.each { println it} } else save()}
     152
     153                        def y=1
     154                        5.times {
     155                                def currentSubject = new Subject(
     156                                        name: "A" + y++,
     157                                        species: mouseTerm,
     158                                        template: mouseTemplate,
     159                                        templateStringFields: ["Genotype" : "C57/Bl6j", "Gender" : "Male"],
     160                                        templateIntegerFields: ["Age" : 17, "Cage" : (int)(y/2)]
     161                                ).with { if (!validate()) { errors.each { println it} } else save()}
     162
     163                                secondStudy.addToSubjects(currentSubject)
     164                                .addToEvents(new Event(
     165                                        subject: currentSubject,
     166                                        startTime: Date.parse('yyyy-MM-dd','2008-01-07'),
     167                                        endTime: Date.parse('yyyy-MM-dd','2008-01-14'),
     168                                        eventDescription: eventTreatment,
     169                                        parameterStringValues: ['Diet':'10% fat (palm oil)','Compound':'Vehicle','Administration':'intraperitoneal injection'])
     170                                ).with { if (!validate()) { errors.each { println it} } else save()}
     171                        }
     172
     173//                        new Study(title:"example",code:"Excode",researchQuestion:"ExRquestion",description:"Exdescription",ecCode:"ExecCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
     174//                        new Study(title:"testAgain",code:"testcode",researchQuestion:"testRquestion",description:"testdescription",ecCode:"testCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
     175//                        new Study(title:"Exampletest",code:"Examplecode",researchQuestion:"ExampleRquestion",description:"Exampledescription",ecCode:"ExampleecCode",dateCreated:new Date(),lastUpdated:new Date(),startDate:new Date()).save()
    145176                }
    146177        }
Note: See TracChangeset for help on using the changeset viewer.