use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.
the class DiscrepancyNoteDAO method findEventCRFDNotesToolTips.
public ArrayList<DiscrepancyNoteBean> findEventCRFDNotesToolTips(EventCRFBean eventCRFBean) {
this.setTypesExpected();
this.setTypeExpected(12, TypeNames.STRING);
ArrayList dNotelist = new ArrayList();
HashMap variables = new HashMap();
variables.put(Integer.valueOf(1), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(2), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(3), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(4), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(5), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(6), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(7), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(8), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(9), Integer.valueOf(eventCRFBean.getId()));
variables.put(Integer.valueOf(10), Integer.valueOf(eventCRFBean.getId()));
dNotelist = this.select(digester.getQuery("findEventCRFDNotesForToolTips"), variables);
ArrayList<DiscrepancyNoteBean> returnedNotelist = new ArrayList<DiscrepancyNoteBean>();
Iterator it = dNotelist.iterator();
while (it.hasNext()) {
HashMap hm = (HashMap) it.next();
DiscrepancyNoteBean eb = (DiscrepancyNoteBean) this.getEntityFromHashMap(hm);
eb.setColumn((String) hm.get("column_name"));
eb.setEventCRFId(eventCRFBean.getId());
returnedNotelist.add(eb);
}
return returnedNotelist;
}
use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.
the class DiscrepancyNoteDAO method getSubjectDNCountWithFilter.
public Integer getSubjectDNCountWithFilter(ListNotesFilter filter, Integer currentStudyId) {
DiscrepancyNoteBean discrepancyNoteBean = new DiscrepancyNoteBean();
setTypesExpected();
HashMap variables = new HashMap();
variables.put(Integer.valueOf(1), currentStudyId);
variables.put(Integer.valueOf(2), currentStudyId);
String sql = digester.getQuery("getSubjectDNCountWithFilter");
sql += filter.execute("");
ArrayList rows = this.select(sql, variables);
Iterator it = rows.iterator();
if (it.hasNext()) {
Integer count = (Integer) ((HashMap) it.next()).get("count");
return count;
} else {
return null;
}
}
use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.
the class DiscrepancyNoteDAO method findExistingNotesForToolTip.
public ArrayList findExistingNotesForToolTip(int itemDataId) {
this.setTypesExpected();
ArrayList alist = new ArrayList();
HashMap variables = new HashMap();
variables.put(Integer.valueOf(1), Integer.valueOf(itemDataId));
variables.put(Integer.valueOf(2), Integer.valueOf(itemDataId));
variables.put(Integer.valueOf(3), Integer.valueOf(itemDataId));
variables.put(Integer.valueOf(4), Integer.valueOf(itemDataId));
alist = this.select(digester.getQuery("findExistingNotesForToolTip"), variables);
ArrayList<DiscrepancyNoteBean> al = new ArrayList<DiscrepancyNoteBean>();
Iterator it = alist.iterator();
while (it.hasNext()) {
HashMap hm = (HashMap) it.next();
DiscrepancyNoteBean eb = (DiscrepancyNoteBean) this.getEntityFromHashMap(hm);
al.add(eb);
}
// }
return al;
}
use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.
the class DiscrepancyNoteDAO method findAllItemDataByStudy.
public ArrayList findAllItemDataByStudy(StudyBean study) {
this.setTypesExpected();
ArrayList alist = new ArrayList();
// ss.label
this.setTypeExpected(12, TypeNames.STRING);
// date_start
this.setTypeExpected(13, TypeNames.DATE);
// sed_name
this.setTypeExpected(14, TypeNames.STRING);
// crf_name
this.setTypeExpected(15, TypeNames.STRING);
// item_name
this.setTypeExpected(16, TypeNames.STRING);
// value
this.setTypeExpected(17, TypeNames.STRING);
// item_data_id
this.setTypeExpected(18, TypeNames.INT);
// item_id
this.setTypeExpected(19, TypeNames.INT);
HashMap variables = new HashMap();
variables.put(Integer.valueOf(1), Integer.valueOf(study.getId()));
variables.put(Integer.valueOf(2), Integer.valueOf(study.getId()));
alist = this.select(digester.getQuery("findAllItemDataByStudy"), variables);
ArrayList al = new ArrayList();
Iterator it = alist.iterator();
while (it.hasNext()) {
HashMap hm = (HashMap) it.next();
DiscrepancyNoteBean eb = (DiscrepancyNoteBean) this.getEntityFromHashMap(hm);
eb.setEventName((String) hm.get("sed_name"));
eb.setEventStart((Date) hm.get("date_start"));
eb.setCrfName((String) hm.get("crf_name"));
eb.setSubjectName((String) hm.get("label"));
eb.setEntityName((String) hm.get("item_name"));
eb.setEntityValue((String) hm.get("value"));
// YW << change EntityId from item_id to item_data_id.
eb.setEntityId(((Integer) hm.get("item_data_id")).intValue());
eb.setItemId(((Integer) hm.get("item_id")).intValue());
// YW >>
al.add(eb);
}
return al;
}
use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.
the class DiscrepancyNoteDAO method findOnlyParentEventCRFDNotesFromEventCRF.
public ArrayList<DiscrepancyNoteBean> findOnlyParentEventCRFDNotesFromEventCRF(EventCRFBean eventCRFBean) {
this.setTypesExpected();
this.setTypeExpected(12, TypeNames.STRING);
ArrayList dNotelist = new ArrayList();
HashMap variables = new HashMap();
variables.put(Integer.valueOf(1), Integer.valueOf(eventCRFBean.getId()));
dNotelist = this.select(digester.getQuery("findOnlyParentEventCRFDNotesFromEventCRF"), variables);
ArrayList<DiscrepancyNoteBean> returnedNotelist = new ArrayList<DiscrepancyNoteBean>();
Iterator it = dNotelist.iterator();
while (it.hasNext()) {
HashMap hm = (HashMap) it.next();
DiscrepancyNoteBean eb = (DiscrepancyNoteBean) this.getEntityFromHashMap(hm);
eb.setColumn((String) hm.get("column_name"));
eb.setEventCRFId(eventCRFBean.getId());
returnedNotelist.add(eb);
}
return returnedNotelist;
}
Aggregations