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;
}
Aggregations