private void open() { //WDEV-14080 PatientClericalTaskVoCollection patClericalTaskCollection =null; if (form.getGlobalContext().Core.getPatientClericalTaskIsNotNull()) { patClericalTaskCollection = domain.getPatientClericalTasksByResultSelected(form.getGlobalContext().Core.getPatientClericalTask().getInvestigation()); }else if (form.getGlobalContext().OCRR.getCurrentPathRadResultIsNotNull()) { patClericalTaskCollection = domain.getPatientClericalTasksByResultSelected(form.getGlobalContext().OCRR.getCurrentPathRadResult().getOrderInvestigation()); } populateGrid(patClericalTaskCollection); if (form.getLocalContext().getlocalContextClericalTaskIsNotNull()) { form.getLocalContext().setlocalContextClericalTask(domain.getPatientClericalTask(form.getLocalContext().getlocalContextClericalTask())); } populateInstanceControls(form.getLocalContext().getlocalContextClericalTask()); form.setMode(FormMode.VIEW); }
private void populateScreenFromData(PatientClericalTaskVoCollection listClericalTasks) { form.grdClericalTask().getRows().clear(); if(listClericalTasks == null || listClericalTasks.size() == 0) return; for(int i=0;i<listClericalTasks.size();i++) { PatientClericalTaskVo record=listClericalTasks.get(i); if(record == null) continue; addPatientClericalTaskDetailsRow(record); } }
public PatientClericalTaskVoCollection getPatientClericalTasksByResultSelected(OrderInvestigationRefVo resultSelectedId) //WDEV-14080 { if(resultSelectedId == null || resultSelectedId.getID_OrderInvestigation() == null) throw new CodingRuntimeException("Can not get ResultSelected value on null Id."); StringBuffer hql = new StringBuffer(); hql.append("select patClericalTask from PatientClericalTask as patClericalTask left join patClericalTask.investigation as orderInvestigation "); hql.append("where orderInvestigation.id = :orderId "); hql.append("order by patClericalTask.requestedDateTime desc"); DomainFactory factory = getDomainFactory(); List<?> list = factory.find(hql.toString(), new String[] {"orderId"}, new Object[] {resultSelectedId.getID_OrderInvestigation()}); return PatientClericalTaskVoAssembler.createPatientClericalTaskVoCollectionFromPatientClericalTask(list); //WDEV-14080 }
private void populateGrid(PatientClericalTaskVoCollection patClericalTaskCollection) { form.grdPatClericalTask().getRows().clear(); if (patClericalTaskCollection==null) { return; } for (int i=0;i<patClericalTaskCollection.size();i++) { PatientClericalTaskVo patClericalTask = patClericalTaskCollection.get(i); if (patClericalTask==null) { continue; } grdPatClericalTaskRow row = form.grdPatClericalTask().getRows().newRow(); row.setcolRequestor(patClericalTask.getRequestor().toString()); row.setcolRequestedDateTime(patClericalTask.getRequestedDateTime().toString()); row.setcolAllocatedTo(patClericalTask.getAllocatedTo().toString()); row.setcolComment(patClericalTask.getComment()); row.setTooltipForcolComment(patClericalTask.getComment()); if (patClericalTask.getCompletedDateTimeIsNotNull()) { row.setcolCompletedOn(patClericalTask.getCompletedDateTime().toString()); } row.setValue(patClericalTask); } if (form.getLocalContext().getlocalContextClericalTaskIsNotNull()) { form.getLocalContext().setlocalContextClericalTask(domain.getPatientClericalTask(form.getLocalContext().getlocalContextClericalTask())); form.grdPatClericalTask().setValue(form.getLocalContext().getlocalContextClericalTask()); } }