use of org.akaza.openclinica.domain.datamap.DnSubjectMap 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;
}
Aggregations