Search in sources :

Example 1 with ODMcomplexTypeDefinitionGlobalVariables

use of org.cdisc.ns.odm.v130.ODMcomplexTypeDefinitionGlobalVariables in project OpenClinica by OpenClinica.

the class OdmImportServiceImpl method saveOrUpdateStudy.

private Study saveOrUpdateStudy(ODM odm, UserAccount userAccount, ODMcomplexTypeDefinitionStudy odmStudy) {
    ODMcomplexTypeDefinitionGlobalVariables odmGlobalVariables = odmStudy.getGlobalVariables();
    String studyOid = odm.getStudy().get(0).getOID();
    Study study = getStudyDao().findByOcOID(studyOid);
    if (study == null || study.getStudyId() == 0) {
        study = new Study();
        study.setOc_oid(studyOid);
        study = getStudyDao().saveOrUpdate(populateStudy(odmGlobalVariables, userAccount, study));
    } else {
        study = getStudyDao().saveOrUpdate(updateStudy(odmGlobalVariables, userAccount, study));
    }
    return study;
}
Also used : Study(org.akaza.openclinica.domain.datamap.Study) ODMcomplexTypeDefinitionStudy(org.cdisc.ns.odm.v130.ODMcomplexTypeDefinitionStudy) ODMcomplexTypeDefinitionGlobalVariables(org.cdisc.ns.odm.v130.ODMcomplexTypeDefinitionGlobalVariables)

Aggregations

Study (org.akaza.openclinica.domain.datamap.Study)1 ODMcomplexTypeDefinitionGlobalVariables (org.cdisc.ns.odm.v130.ODMcomplexTypeDefinitionGlobalVariables)1 ODMcomplexTypeDefinitionStudy (org.cdisc.ns.odm.v130.ODMcomplexTypeDefinitionStudy)1