public PlanOfCareNotingVoCollection listSearchNoting(DateTime startDate, DateTime endDate, CareContextRefVo voCareContextRef ) { if(startDate != null && endDate != null) return PlanOfCareNotingVoAssembler.createPlanOfCareNotingVoCollectionFromPlanOfCareNoting( getDomainFactory().find("from PlanOfCareNoting as pocn where pocn.authoringInformation.authoringDateTime between :startDate and :endDate and pocn.careContext.id = :careContext order by pocn.authoringInformation.authoringDateTime desc", new String[] {"startDate", "endDate", "careContext"}, new Object[] {startDate.getJavaDate(), endDate.getJavaDate(), voCareContextRef.getID_CareContext()})); else if(startDate != null) return PlanOfCareNotingVoAssembler.createPlanOfCareNotingVoCollectionFromPlanOfCareNoting( getDomainFactory().find("from PlanOfCareNoting as pocn where pocn.authoringInformation.authoringDateTime >= :startDate and pocn.careContext.id = :careContext order by pocn.authoringInformation.authoringDateTime desc", new String[] {"startDate", "careContext"}, new Object[] {startDate.getJavaDate(), voCareContextRef.getID_CareContext()})); else if(endDate != null) return PlanOfCareNotingVoAssembler.createPlanOfCareNotingVoCollectionFromPlanOfCareNoting( getDomainFactory().find("from PlanOfCareNoting as pocn where pocn.authoringInformation.authoringDateTime <= :endDate and pocn.careContext.id = :careContext order by pocn.authoringInformation.authoringDateTime desc", new String[] {"endDate", "careContext"}, new Object[] {endDate.getJavaDate(), voCareContextRef.getID_CareContext()})); return null; }
private void populateChronologicalGrig(PlanOfCareNotingVoCollection voPocNoting) { if (voPocNoting != null && voPocNoting.size() > 0) { for(int x = 0; x < voPocNoting.size(); x++) { GenForm.lyr1Layer.tabChronologicalContainer.grdChronologicalRow row = null; row = form.lyr1().tabChronological().grdChronological().getRows().newRow(); row.setBold(true); if (voPocNoting.get(x).getReviewingDateTimeIsNotNull() && voPocNoting.get(x).getReviewingHCPIsNotNull()) { row.setColDateTime(voPocNoting.get(x).getAuthoringInformation().getAuthoringDateTime()+ " "+"hrs"+" "+voPocNoting.get(x).getAuthoringInformation().getAuthoringHcp()+ (voPocNoting.get(x).getActionStatusIsNotNull() ? " - "+voPocNoting.get(x).getActionStatus().getText() : "")+ " Reviewing by: "+voPocNoting.get(x).getReviewingHCP()+" on "+voPocNoting.get(x).getReviewingDateTime()); } else { row.setColDateTime(voPocNoting.get(x).getAuthoringInformation().getAuthoringDateTime()+ " "+"hrs"+" "+voPocNoting.get(x).getAuthoringInformation().getAuthoringHcp()+ (voPocNoting.get(x).getActionStatusIsNotNull() ? " - "+voPocNoting.get(x).getActionStatus().getText() : "")); } for(int i=0; i<voPocNoting.get(x).getActions().size(); i++) { PlanOfCareActionsVo voPocItem = voPocNoting.get(x).getActions().get(i); GenForm.lyr1Layer.tabChronologicalContainer.grdChronologicalRow rowAction = row.getRows().newRow(); rowAction.setColDateTime(voPocItem.getPlanOfCare().getTitle().toUpperCase()+" - "+ voPocItem.getAction()); rowAction.setTooltip(voPocItem.getPlanOfCare().getTitle().toUpperCase()+" - "+ voPocItem.getAction());//WDEV-15085 if (voPocItem.getPlanOfCare().getLevelOfIntervention().equals(Color.Red)) { rowAction.setCollapsedImage(form.getImages().Core.RedSqaure); rowAction.setExpandedImage(form.getImages().Core.RedSqaure); } if (voPocItem.getPlanOfCare().getLevelOfIntervention().equals(Color.Yellow)) { rowAction.setCollapsedImage(form.getImages().Core.YellowSquare); rowAction.setExpandedImage(form.getImages().Core.YellowSquare); } if (voPocItem.getPlanOfCare().getLevelOfIntervention().equals(Color.Green)) { rowAction.setCollapsedImage(form.getImages().Core.GreenSquare); rowAction.setExpandedImage(form.getImages().Core.GreenSquare); } rowAction.setColComments(voPocItem.getReview()); rowAction.setValue(voPocNoting.get(x)); } row.setValue(voPocNoting.get(x)); row.setExpanded(true); } } }