Search in sources :

Example 1 with DnStudySubjectMap

use of org.akaza.openclinica.domain.datamap.DnStudySubjectMap 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)

Aggregations

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