Search in sources :

Example 1 with ODMcomplexTypeDefinitionStudyEventData

use of org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionStudyEventData in project OpenClinica by OpenClinica.

the class OdmController method generateStudyEventData.

private ODMcomplexTypeDefinitionStudyEventData generateStudyEventData(StudyEventBean studyEvent) {
    ODMcomplexTypeDefinitionStudyEventData studyEventData = new ODMcomplexTypeDefinitionStudyEventData();
    studyEventData.setStartDate(studyEvent.getDateStarted().toString());
    StudyEventDefinitionBean studyEventDefBean = getStudyEventDefinitionBean(studyEvent.getStudyEventDefinitionId());
    studyEventData.setEventName(studyEventDefBean.getName());
    studyEventData.setStudyEventOID(studyEventDefBean.getOid());
    studyEventData.setStudyEventRepeatKey(String.valueOf(studyEvent.getSampleOrdinal()));
    return studyEventData;
}
Also used : StudyEventDefinitionBean(org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean) ODMcomplexTypeDefinitionStudyEventData(org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionStudyEventData)

Example 2 with ODMcomplexTypeDefinitionStudyEventData

use of org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionStudyEventData in project OpenClinica by OpenClinica.

the class OdmController method createOdm.

private ODM createOdm(StudyBean study, StudySubjectBean studySubjectBean, StudyEventBean nextEvent, List<ODMcomplexTypeDefinitionFormData> formDatas) {
    ODM odm = new ODM();
    ODMcomplexTypeDefinitionClinicalData clinicalData = generateClinicalData(study);
    ODMcomplexTypeDefinitionSubjectData subjectData = generateSubjectData(studySubjectBean);
    ODMcomplexTypeDefinitionStudyEventData studyEventData = generateStudyEventData(nextEvent);
    // Create the object graph
    studyEventData.getFormData().addAll(formDatas);
    subjectData.getStudyEventData().add(studyEventData);
    clinicalData.getSubjectData().add(subjectData);
    odm.getClinicalData().add(clinicalData);
    return odm;
}
Also used : ODMcomplexTypeDefinitionClinicalData(org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionClinicalData) ODM(org.cdisc.ns.odm.v130_api.ODM) ODMcomplexTypeDefinitionSubjectData(org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionSubjectData) ODMcomplexTypeDefinitionStudyEventData(org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionStudyEventData)

Aggregations

ODMcomplexTypeDefinitionStudyEventData (org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionStudyEventData)2 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)1 ODM (org.cdisc.ns.odm.v130_api.ODM)1 ODMcomplexTypeDefinitionClinicalData (org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionClinicalData)1 ODMcomplexTypeDefinitionSubjectData (org.cdisc.ns.odm.v130_api.ODMcomplexTypeDefinitionSubjectData)1