Search in sources :

Example 1 with DiscrepancyNotesBean

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

the class GenerateClinicalDataServiceImpl method fetchDiscrepancyNotes.

private DiscrepancyNotesBean fetchDiscrepancyNotes(StudySubject studySubj) {
    List<DnStudySubjectMap> dnMaps = studySubj.getDnStudySubjectMaps();
    DiscrepancyNotesBean dnNotesBean = new DiscrepancyNotesBean();
    dnNotesBean.setEntityID(studySubj.getOcOid());
    DiscrepancyNoteBean dnNoteBean = new DiscrepancyNoteBean();
    DiscrepancyNoteBean dnSubjBean = new DiscrepancyNoteBean();
    ArrayList<DiscrepancyNoteBean> dnNotes = new ArrayList<DiscrepancyNoteBean>();
    boolean addDN = true;
    for (DnStudySubjectMap dnMap : dnMaps) {
        DiscrepancyNote dn = dnMap.getDiscrepancyNote();
        addDN = true;
        fillDNObject(dnNoteBean, dnNotes, addDN, dn, dnMap.getDnStudySubjectMapId().getColumnName());
    }
    dnNotesBean.setDiscrepancyNotes(dnNotes);
    List<DnSubjectMap> dnSubjMaps = studySubj.getSubject().getDnSubjectMaps();
    ArrayList<DiscrepancyNoteBean> dnSubjs = new ArrayList<DiscrepancyNoteBean>();
    for (DnSubjectMap dnMap : dnSubjMaps) {
        DiscrepancyNote dn = dnMap.getDiscrepancyNote();
        addDN = true;
        fillDNObject(dnSubjBean, dnSubjs, addDN, dn, dnMap.getDnSubjectMapId().getColumnName());
    }
    for (DiscrepancyNoteBean dnSubjMap : dnSubjs) dnNotesBean.getDiscrepancyNotes().add(dnSubjMap);
    return dnNotesBean;
}
Also used : DnStudySubjectMap(org.akaza.openclinica.domain.datamap.DnStudySubjectMap) DiscrepancyNotesBean(org.akaza.openclinica.bean.odmbeans.DiscrepancyNotesBean) DiscrepancyNote(org.akaza.openclinica.domain.datamap.DiscrepancyNote) DiscrepancyNoteBean(org.akaza.openclinica.bean.odmbeans.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) DnSubjectMap(org.akaza.openclinica.domain.datamap.DnSubjectMap)

Example 2 with DiscrepancyNotesBean

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

the class GenerateClinicalDataServiceImpl method fetchDiscrepancyNotes.

private DiscrepancyNotesBean fetchDiscrepancyNotes(EventCrf eventCrf) {
    LOGGER.info("Fetching the discrepancy notes..");
    List<DnEventCrfMap> dnEventCrfMaps = eventCrf.getDnEventCrfMaps();
    DiscrepancyNotesBean dnNotesBean = new DiscrepancyNotesBean();
    dnNotesBean.setEntityID(eventCrf.getCrfVersion().getCrf().getOcOid());
    DiscrepancyNoteBean dnNoteBean = new DiscrepancyNoteBean();
    ArrayList<DiscrepancyNoteBean> dnNotes = new ArrayList<DiscrepancyNoteBean>();
    boolean addDN = true;
    for (DnEventCrfMap dnItemDataMap : dnEventCrfMaps) {
        DiscrepancyNote dn = dnItemDataMap.getDiscrepancyNote();
        addDN = true;
        fillDNObject(dnNoteBean, dnNotes, addDN, dn, dnItemDataMap.getDnEventCrfMapId().getColumnName());
    }
    dnNotesBean.setDiscrepancyNotes(dnNotes);
    return dnNotesBean;
}
Also used : DiscrepancyNotesBean(org.akaza.openclinica.bean.odmbeans.DiscrepancyNotesBean) DiscrepancyNote(org.akaza.openclinica.domain.datamap.DiscrepancyNote) DiscrepancyNoteBean(org.akaza.openclinica.bean.odmbeans.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) DnEventCrfMap(org.akaza.openclinica.domain.datamap.DnEventCrfMap)

Example 3 with DiscrepancyNotesBean

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

the class GenerateClinicalDataServiceImpl method fetchDiscrepancyNotes.

private DiscrepancyNotesBean fetchDiscrepancyNotes(StudyEvent studyEvent) {
    List<DnStudyEventMap> dnMaps = studyEvent.getDnStudyEventMaps();
    DiscrepancyNotesBean dnNotesBean = new DiscrepancyNotesBean();
    dnNotesBean.setEntityID(studyEvent.getStudyEventDefinition().getOc_oid());
    DiscrepancyNoteBean dnNoteBean = new DiscrepancyNoteBean();
    ArrayList<DiscrepancyNoteBean> dnNotes = new ArrayList<DiscrepancyNoteBean>();
    boolean addDN = true;
    for (DnStudyEventMap dnMap : dnMaps) {
        DiscrepancyNote dn = dnMap.getDiscrepancyNote();
        addDN = true;
        fillDNObject(dnNoteBean, dnNotes, addDN, dn, dnMap.getDnStudyEventMapId().getColumnName());
    }
    dnNotesBean.setDiscrepancyNotes(dnNotes);
    return dnNotesBean;
}
Also used : DiscrepancyNotesBean(org.akaza.openclinica.bean.odmbeans.DiscrepancyNotesBean) DiscrepancyNote(org.akaza.openclinica.domain.datamap.DiscrepancyNote) DiscrepancyNoteBean(org.akaza.openclinica.bean.odmbeans.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) DnStudyEventMap(org.akaza.openclinica.domain.datamap.DnStudyEventMap)

Example 4 with DiscrepancyNotesBean

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

the class GenerateClinicalDataServiceImpl method fetchDiscrepancyNotes.

private DiscrepancyNotesBean fetchDiscrepancyNotes(ItemData itemData) {
    List<DnItemDataMap> dnItemDataMaps = itemData.getDnItemDataMaps();
    DiscrepancyNotesBean dnNotesBean = new DiscrepancyNotesBean();
    dnNotesBean.setEntityID(itemData.getItem().getOcOid());
    if (isCollectDns()) {
        DiscrepancyNoteBean dnNoteBean = new DiscrepancyNoteBean();
        ArrayList<DiscrepancyNoteBean> dnNotes = new ArrayList<DiscrepancyNoteBean>();
        boolean addDN = true;
        for (DnItemDataMap dnItemDataMap : dnItemDataMaps) {
            DiscrepancyNote dn = dnItemDataMap.getDiscrepancyNote();
            addDN = true;
            fillDNObject(dnNoteBean, dnNotes, addDN, dn, null);
        }
        dnNotesBean.setDiscrepancyNotes(dnNotes);
    }
    return dnNotesBean;
}
Also used : DiscrepancyNotesBean(org.akaza.openclinica.bean.odmbeans.DiscrepancyNotesBean) DiscrepancyNote(org.akaza.openclinica.domain.datamap.DiscrepancyNote) DiscrepancyNoteBean(org.akaza.openclinica.bean.odmbeans.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) DnItemDataMap(org.akaza.openclinica.domain.datamap.DnItemDataMap)

Aggregations

ArrayList (java.util.ArrayList)4 DiscrepancyNoteBean (org.akaza.openclinica.bean.odmbeans.DiscrepancyNoteBean)4 DiscrepancyNotesBean (org.akaza.openclinica.bean.odmbeans.DiscrepancyNotesBean)4 DiscrepancyNote (org.akaza.openclinica.domain.datamap.DiscrepancyNote)4 DnEventCrfMap (org.akaza.openclinica.domain.datamap.DnEventCrfMap)1 DnItemDataMap (org.akaza.openclinica.domain.datamap.DnItemDataMap)1 DnStudyEventMap (org.akaza.openclinica.domain.datamap.DnStudyEventMap)1 DnStudySubjectMap (org.akaza.openclinica.domain.datamap.DnStudySubjectMap)1 DnSubjectMap (org.akaza.openclinica.domain.datamap.DnSubjectMap)1