/** * Updates the study bean with inputs from second section * * @param request * @return true if study type is Interventional, otherwise false */ private boolean updateStudy2() { FormProcessor fp = new FormProcessor(request); StudyBean newStudy = (StudyBean) session.getAttribute("newStudy"); // this is not fully supported yet, because the system will not handle // studies which are pending // or private... newStudy.setStatus(Status.get(fp.getInt("statusId"))); newStudy.setProtocolDateVerification(fp.getDate(INPUT_VER_DATE)); newStudy.setDatePlannedStart(fp.getDate(INPUT_START_DATE)); if (StringUtil.isBlank(fp.getString(INPUT_END_DATE))) { newStudy.setDatePlannedEnd(null); } else { newStudy.setDatePlannedEnd(fp.getDate(INPUT_END_DATE)); } newStudy.setPhase(fp.getString("phase")); if (fp.getInt("genetic") == 1) { newStudy.setGenetic(true); } else { newStudy.setGenetic(false); } session.setAttribute("newStudy", newStudy); String interventional = resadmin.getString("interventional"); return interventional.equalsIgnoreCase(newStudy.getProtocolType()); }
private boolean updateStudy2(FormProcessor fp) { study.setOldStatus(study.getStatus()); study.setStatus(Status.get(fp.getInt("statusId"))); if (StringUtil.isBlank(fp.getString(INPUT_VER_DATE))) { study.setProtocolDateVerification(null); } else { study.setProtocolDateVerification(fp.getDate(INPUT_VER_DATE)); } study.setDatePlannedStart(fp.getDate(INPUT_START_DATE)); if (StringUtil.isBlank(fp.getString(INPUT_END_DATE))) { study.setDatePlannedEnd(null); } else { study.setDatePlannedEnd(fp.getDate(INPUT_END_DATE)); } study.setPhase(fp.getString("phase")); if (fp.getInt("genetic") == 1) { study.setGenetic(true); } else { study.setGenetic(false); } String interventional = resadmin.getString("interventional"); return interventional.equalsIgnoreCase(study.getProtocolType()); }