Search in sources :

Example 1 with OdmStudyBean

use of org.akaza.openclinica.bean.odmbeans.OdmStudyBean in project OpenClinica by OpenClinica.

the class FullReportBean method createStudyMetaOdmXml.

/**
     * Currently, it incudes <MetadataVersion> and <AdminData>
     * 
     * @param isDataset
     */
public void createStudyMetaOdmXml(boolean isDataset) {
    this.addHeading();
    this.addRootStartLine();
    // add the contents here in order
    // 1) the information about Study
    Iterator<OdmStudyBean> itm = this.odmStudyMap.values().iterator();
    while (itm.hasNext()) {
        OdmStudyBean s = itm.next();
        addNodeStudy(s, isDataset);
    }
    // 2) the information about administrative data
    Iterator<OdmAdminDataBean> ita = this.adminDataMap.values().iterator();
    while (ita.hasNext()) {
        OdmAdminDataBean a = ita.next();
        addNodeAdminData(a);
    }
    this.addRootEndLine();
}
Also used : OdmStudyBean(org.akaza.openclinica.bean.odmbeans.OdmStudyBean) OdmAdminDataBean(org.akaza.openclinica.bean.odmbeans.OdmAdminDataBean)

Example 2 with OdmStudyBean

use of org.akaza.openclinica.bean.odmbeans.OdmStudyBean in project OpenClinica by OpenClinica.

the class MetaDataCollector method collectMetadataUnitMap.

public void collectMetadataUnitMap(String formVersionOID) {
    Iterator<OdmStudyBase> it = this.getStudyBaseMap().values().iterator();
    MetaDataVersionProtocolBean protocol = new MetaDataVersionProtocolBean();
    while (it.hasNext()) {
        JobTerminationMonitor.check();
        OdmStudyBase u = it.next();
        StudyBean study = u.getStudy();
        MetadataUnit meta = new MetadataUnit(this.ds);
        meta.setStudyBase(u);
        meta.setOdmStudy(new OdmStudyBean());
        meta.setParentStudy(new StudyBean());
        meta.collectOdmStudy(formVersionOID);
        if (this.getCategory() == 1) {
            if (study.isSite(study.getParentStudyId())) {
                meta.getOdmStudy().setParentStudyOID(meta.getParentOdmStudyOid());
                MetaDataVersionProtocolBean p = meta.getOdmStudy().getMetaDataVersion().getProtocol();
                if (p != null && p.getStudyEventRefs().size() > 0) {
                } else {
                    logger.error("site " + study.getName() + " will be assigned protocol with StudyEventRefs size=" + protocol.getStudyEventRefs().size());
                    meta.getOdmStudy().getMetaDataVersion().setProtocol(protocol);
                }
            } else {
                protocol = meta.getOdmStudy().getMetaDataVersion().getProtocol();
            }
        }
        odmStudyMap.put(u.getStudy().getOid(), meta.getOdmStudy());
    }
}
Also used : OdmStudyBean(org.akaza.openclinica.bean.odmbeans.OdmStudyBean) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) OdmStudyBean(org.akaza.openclinica.bean.odmbeans.OdmStudyBean) MetaDataVersionProtocolBean(org.akaza.openclinica.bean.odmbeans.MetaDataVersionProtocolBean)

Example 3 with OdmStudyBean

use of org.akaza.openclinica.bean.odmbeans.OdmStudyBean in project OpenClinica by OpenClinica.

the class MetaDataReportBean method createChunkedOdmXml.

public void createChunkedOdmXml(boolean isDataset) {
    this.addHeading();
    this.addRootStartLine();
    Iterator<OdmStudyBean> itm = this.odmStudyMap.values().iterator();
    while (itm.hasNext()) {
        OdmStudyBean s = itm.next();
        odmstudy = s;
        this.addNodeStudy(isDataset);
    }
}
Also used : OdmStudyBean(org.akaza.openclinica.bean.odmbeans.OdmStudyBean)

Example 4 with OdmStudyBean

use of org.akaza.openclinica.bean.odmbeans.OdmStudyBean in project OpenClinica by OpenClinica.

the class FullReportBean method createOdmXml.

/**
     * Create one ODM XML This method is still under construction. Right now it is for Snapshot filetype only.
     */
@Override
public void createOdmXml(boolean isDataset) {
    this.addHeading();
    this.addRootStartLine();
    // add the contents here in order
    // 1) the information about Study
    Iterator<OdmStudyBean> itm = this.odmStudyMap.values().iterator();
    while (itm.hasNext()) {
        OdmStudyBean s = itm.next();
        addNodeStudy(s, isDataset);
    }
    // 2) the information about administrative data
    String ODMVersion = this.getODMVersion();
    if ("oc1.2".equalsIgnoreCase(ODMVersion) || "oc1.3".equalsIgnoreCase(ODMVersion)) {
        Iterator<OdmAdminDataBean> ita = this.adminDataMap.values().iterator();
        while (ita.hasNext()) {
            OdmAdminDataBean a = ita.next();
            addNodeAdminData(a);
        }
    }
    // 3) the information about reference data
    // addNodeReferenceData();
    // 4) the information about clinical Data
    Iterator<OdmClinicalDataBean> itc = this.clinicalDataMap.values().iterator();
    while (itc.hasNext()) {
        OdmClinicalDataBean c = itc.next();
        if (c.getExportSubjectData().size() > 0) {
            addNodeClinicalData(c);
        }
    }
    this.addRootEndLine();
}
Also used : OdmClinicalDataBean(org.akaza.openclinica.bean.odmbeans.OdmClinicalDataBean) OdmStudyBean(org.akaza.openclinica.bean.odmbeans.OdmStudyBean) OdmAdminDataBean(org.akaza.openclinica.bean.odmbeans.OdmAdminDataBean)

Aggregations

OdmStudyBean (org.akaza.openclinica.bean.odmbeans.OdmStudyBean)4 OdmAdminDataBean (org.akaza.openclinica.bean.odmbeans.OdmAdminDataBean)2 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)1 MetaDataVersionProtocolBean (org.akaza.openclinica.bean.odmbeans.MetaDataVersionProtocolBean)1 OdmClinicalDataBean (org.akaza.openclinica.bean.odmbeans.OdmClinicalDataBean)1