Search in sources :

Example 11 with DiscrepancyNoteBean

use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.

the class DiscrepancyNoteDAO method findAllItemNotesByEventCRF.

public ArrayList<DiscrepancyNoteBean> findAllItemNotesByEventCRF(int eventCRFId) {
    this.setTypesExpected();
    ArrayList alist = new ArrayList();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(eventCRFId));
    alist = this.select(digester.getQuery("findAllItemNotesByEventCRF"), 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;
}
Also used : HashMap(java.util.HashMap) DiscrepancyNoteBean(org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator)

Example 12 with DiscrepancyNoteBean

use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.

the class DiscrepancyNoteDAO method findParentItemDataDNotesFromEventCRF.

public ArrayList<DiscrepancyNoteBean> findParentItemDataDNotesFromEventCRF(EventCRFBean eventCRFBean) {
    this.setTypesExpected();
    ArrayList dNotelist = new ArrayList();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(eventCRFBean.getId()));
    dNotelist = this.select(digester.getQuery("findParentItemDataDNotesFromEventCRF"), 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.setEventCRFId(eventCRFBean.getId());
        returnedNotelist.add(eb);
    }
    return returnedNotelist;
}
Also used : HashMap(java.util.HashMap) DiscrepancyNoteBean(org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator)

Example 13 with DiscrepancyNoteBean

use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.

the class DiscrepancyNoteDAO method findAllSubjectByStudyAndId.

public ArrayList<DiscrepancyNoteBean> findAllSubjectByStudyAndId(StudyBean study, int subjectId) {
    this.setTypesExpected();
    ArrayList alist = new ArrayList();
    // ss.label
    this.setTypeExpected(12, TypeNames.STRING);
    // column_name
    this.setTypeExpected(13, TypeNames.STRING);
    // subject_id
    this.setTypeExpected(14, TypeNames.INT);
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(study.getId()));
    variables.put(Integer.valueOf(2), Integer.valueOf(study.getId()));
    variables.put(Integer.valueOf(3), Integer.valueOf(study.getId()));
    variables.put(Integer.valueOf(4), Integer.valueOf(subjectId));
    alist = this.select(digester.getQuery("findAllSubjectByStudyAndId"), variables);
    ArrayList al = new ArrayList();
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        HashMap hm = (HashMap) it.next();
        DiscrepancyNoteBean eb = (DiscrepancyNoteBean) this.getEntityFromHashMap(hm);
        eb.setSubjectName((String) hm.get("label"));
        eb.setColumn((String) hm.get("column_name"));
        eb.setEntityId(((Integer) hm.get("subject_id")).intValue());
        al.add(eb);
    }
    return al;
}
Also used : HashMap(java.util.HashMap) DiscrepancyNoteBean(org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator)

Example 14 with DiscrepancyNoteBean

use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.

the class DiscrepancyNoteDAO method findParentNotesOnlyByItemData.

public ArrayList<DiscrepancyNoteBean> findParentNotesOnlyByItemData(int itemDataId) {
    this.setTypesExpected();
    ArrayList alist = new ArrayList();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(itemDataId));
    alist = this.select(digester.getQuery("findParentNotesOnlyByItemData"), 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;
}
Also used : HashMap(java.util.HashMap) DiscrepancyNoteBean(org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator)

Example 15 with DiscrepancyNoteBean

use of org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean in project OpenClinica by OpenClinica.

the class DiscrepancyNoteDAO method findLatestChildByParent.

public EntityBean findLatestChildByParent(int parentId) {
    DiscrepancyNoteBean eb = new DiscrepancyNoteBean();
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(parentId));
    variables.put(Integer.valueOf(2), Integer.valueOf(parentId));
    String sql = digester.getQuery("findLatestChildByParent");
    ArrayList alist = this.select(sql, variables);
    Iterator it = alist.iterator();
    if (it.hasNext()) {
        eb = (DiscrepancyNoteBean) this.getEntityFromHashMap((HashMap) it.next());
    }
    return eb;
}
Also used : HashMap(java.util.HashMap) DiscrepancyNoteBean(org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator)

Aggregations

DiscrepancyNoteBean (org.akaza.openclinica.bean.managestudy.DiscrepancyNoteBean)122 ArrayList (java.util.ArrayList)81 HashMap (java.util.HashMap)62 Iterator (java.util.Iterator)44 DiscrepancyNoteDAO (org.akaza.openclinica.dao.managestudy.DiscrepancyNoteDAO)34 Date (java.util.Date)20 StudySubjectBean (org.akaza.openclinica.bean.managestudy.StudySubjectBean)20 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)20 StudySubjectDAO (org.akaza.openclinica.dao.managestudy.StudySubjectDAO)20 StudyEventBean (org.akaza.openclinica.bean.managestudy.StudyEventBean)18 EventCRFDAO (org.akaza.openclinica.dao.submit.EventCRFDAO)18 FormProcessor (org.akaza.openclinica.control.form.FormProcessor)15 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)14 StudyDAO (org.akaza.openclinica.dao.managestudy.StudyDAO)14 StudyEventDAO (org.akaza.openclinica.dao.managestudy.StudyEventDAO)13 ItemDataBean (org.akaza.openclinica.bean.submit.ItemDataBean)11 StudyEventDefinitionDAO (org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO)11 ItemDataDAO (org.akaza.openclinica.dao.submit.ItemDataDAO)11 UserAccountBean (org.akaza.openclinica.bean.login.UserAccountBean)10 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)10