private void initialise(Object[] args) { form.btnSave().setEnabled(false); if(args == null) return; if(args.length == 1) { if(args[0] instanceof CarePlanTitleCollection) { CarePlanTitleCollection voCPs = (CarePlanTitleCollection) args[0]; form.getLocalContext().setCarePlansTitleCollection(voCPs); populateGrid(voCPs); } } }
private void loadCarePlans() { CarePlanTitleCollection coll = form.getLocalContext().getCarePlans(); if (coll != null) { form.gridCarePlan().getRows().clear(); GenForm.gridCarePlanRow row; for (int i = 0; i < coll.size(); i++) { CarePlanTitle title = coll.get(i); row = form.gridCarePlan().getRows().newRow(); row.setcolCarePlan(title.getTitle()); if(isClinicalNotesCarePlanDetailsAlias() && form.getGlobalContext().COE.getCarePlanIsNotNull()) { if(title.equals(form.getGlobalContext().COE.getCarePlan())) { row.setcolSelect(true); } } row.setValue(title); } } }
private void populateCarePlans() { // Populate the careplan selected column with data from database if (form.getLocalContext().getClinicalNote().getCarePlans() != null) { CarePlanTitleCollection dataColl = form.getLocalContext().getClinicalNote().getCarePlans(); if (dataColl != null) { GenForm.gridCarePlanRow row; for (int i = 0; i < dataColl.size(); i++) { CarePlanTitle title = dataColl.get(i); row = form.gridCarePlan().getRowByValue(title); if (row != null) row.setcolSelect(true); } } } }
private void loadCarePlans(boolean bActiveOnly) { CarePlanTitleCollection coll = form.getLocalContext().getCarePlans(); if (coll != null) { form.gridCarePlan().getRows().clear(); GenForm.gridCarePlanRow row; for (int i = 0; i < coll.size(); i++) { CarePlanTitle title = coll.get(i); if ( bActiveOnly && (title.getCurrentCarePlanStatusIsNotNull() && title.getCurrentCarePlanStatus().getStatusIsNotNull() && ! title.getCurrentCarePlanStatus().getStatus().equals(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE)) ) continue; row = form.gridCarePlan().getRows().newRow(); row.setcolCarePlan(title.getTitle()); row.setcolStatus(title.getCurrentCarePlanStatusIsNotNull() && title.getCurrentCarePlanStatus().getStatusIsNotNull() ? title.getCurrentCarePlanStatus().getStatus().getText() : ""); row.setValue(title); } } }
private void populateCarePlans() { if (form.getLocalContext().getSelectedClinicalNoteIsNotNull() && form.getLocalContext().getSelectedClinicalNote().getCarePlans() != null) { CarePlanTitleCollection dataColl = form.getLocalContext().getSelectedClinicalNote().getCarePlans(); if (dataColl != null) { GenForm.gridCarePlanRow row; for (int i = 0; i < dataColl.size(); i++) { CarePlanTitle title = dataColl.get(i); row = form.gridCarePlan().getRowByValue(title); if (row != null) row.setcolSelect(true); } } } }
private CarePlanTitleCollection listCarePlans() { CarePlanTitleCollection voColl = new CarePlanTitleCollection(); for (int i = 0 ; i < form.gridCarePlan().getRows().size() ; i++) { if (form.gridCarePlan().getRows().get(i).getcolSelect()) voColl.add(form.gridCarePlan().getRows().get(i).getValue()); } return voColl; }
/** * list care plans, by clinical contact id */ public CarePlanTitleCollection listCarePlans(CareContextShortVo careContextShortVo) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" "); String query = "from CarePlan careplan "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); String andStr = " "; if (careContextShortVo != null) { hql.append(andStr + " careplan.careContext.id = :rcc"); markers.add("rcc"); values.add(careContextShortVo.getID_CareContext()); andStr = " and "; hql.append(andStr + " careplan.currentCarePlanStatus.status = :status"); markers.add("status"); values.add(getDomLookup(ims.nursing.vo.lookups.CarePlanStatus.ACTIVE)); } if (markers.size() > 0) query += " where "; query += hql.toString(); List<?> cpTitle = factory.find(query, markers, values); return(CarePlanTitleAssembler.createCarePlanTitleCollectionFromCarePlan(cpTitle).sort()); //this is the problem }
private void populateGrid(CarePlanTitleCollection voCPs) { form.dyngrdInterventions().getRows().clear(); CarePlanCollection voCarePlans = null; if (voCPs != null && voCPs.size() > 0) voCarePlans = domain.listCarePlans(voCPs); for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++) { voCarePlans.get(i).getInterventions().sort(); for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++) { CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j); DynamicGridRow row = form.dyngrdInterventions().getRows().newRow(); //WDEV-16795 String removalInfo = ""; if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved())) { row.setReadOnly(true); row.setBackColor(Color.Gray); removalInfo = "<b>Care Plan Action Removed since: </b>" + voInt.getRemovedDate().toString(DateFormat.STANDARD); } DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING); cellOrdNum.setValue(voInt.getOrder().toString()); //WDEV-16795 cellOrdNum.setTooltip(voInt.getOrder().toString()+ (removalInfo.length() > 0 ? "<br/>" + removalInfo : "")); cellOrdNum.setReadOnly(Boolean.TRUE); DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING); cellDesc.setValue(voInt.getDescription().toString()); //WDEV-16795 cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + (removalInfo.length() > 0 ? "<br/>" + removalInfo : ""): "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : "")); cellDesc.setReadOnly(Boolean.TRUE); DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING); cellInfo.setValue(voInt.getAdditionalInfo()); //WDEV-16795 cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() : "" + (removalInfo.length() > 0 ? "<br/>" + removalInfo : "")); cellInfo.setReadOnly(Boolean.TRUE); DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL); cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE); cellComp.setReadOnly(voInt.getStopDateIsNotNull() && !voInt.getIsRemoved());//WDEV-16795 cellComp.setAutoPostBack(Boolean.TRUE); DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING); cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? (voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() : "" ) : ""); //WDEV-16795 cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? (voInt.getStopDateIsNotNull() ? voInt.getStopDate().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getName().toString() + (removalInfo.length() > 0 ? "\n" + removalInfo : "") : "") : "" + (removalInfo.length() > 0 ? "\n" + removalInfo : "")); cellCompInfo.setReadOnly(Boolean.TRUE); row.setValue(voCarePlans.get(i)); row.setIdentifier(voInt); } } }
private void populateGrid(CarePlanTitleCollection voCPs) { form.dyngrdInterventions().getRows().clear(); CarePlanCollection voCarePlans = null; if (voCPs != null && voCPs.size() > 0) voCarePlans = domain.listCarePlans(voCPs); for (int i = 0 ; voCarePlans != null && i < voCarePlans.size() ; i++) { voCarePlans.get(i).getInterventions().sort(); for (int j = 0 ; voCarePlans.get(i).getInterventionsIsNotNull() && j < voCarePlans.get(i).getInterventions().size() ; j++) { CarePlanInterventions voInt = voCarePlans.get(i).getInterventions().get(j); DynamicGridRow row = form.dyngrdInterventions().getRows().newRow(); //WDEV-16795 String removalInfo = ""; String lineDelimiter = "<br/>"; boolean isCcoSpecific = ConfigFlag.GEN.CARE_PLAN_FUNCTIONALITY_TYPE.getValue().equals("CCO"); boolean isRemovedOrReinstatedAction = voInt != null && isCcoSpecific && (Boolean.TRUE.equals(voInt.getIsRemoved()) || Boolean.FALSE.equals(voInt.getIsRemoved())); //WDEV-16795 if (voInt != null && Boolean.TRUE.equals(voInt.getIsRemoved())) { row.setReadOnly(true); row.setBackColor(Color.LightGray); } if (isRemovedOrReinstatedAction) { removalInfo = buildRemovedReinstatedActionTooltip(voInt); } //---- end WDEV-16795 DynamicGridCell cellOrdNum = row.getCells().newCell(getColumn(COLORDERNUMBER), DynamicCellType.STRING); cellOrdNum.setValue(voInt.getOrder().toString()); //WDEV-16795 cellOrdNum.setTooltip(voInt.getOrderIsNotNull() ? voInt.getOrder().toString() + lineDelimiter + removalInfo : removalInfo); cellOrdNum.setReadOnly(Boolean.TRUE); DynamicGridCell cellDesc = row.getCells().newCell(getColumn(COLDESC), DynamicCellType.STRING); cellDesc.setValue(voInt.getDescription().toString()); //WDEV-16795 cellDesc.setTooltip(voInt.getDescriptionIsNotNull() ? voInt.getDescription().toString() + lineDelimiter + removalInfo: removalInfo); cellDesc.setReadOnly(Boolean.TRUE); DynamicGridCell cellInfo = row.getCells().newCell(getColumn(COLADDINFO), DynamicCellType.STRING); cellInfo.setValue(voInt.getAdditionalInfo()); //WDEV-16795 cellInfo.setTooltip(voInt.getAdditionalInfoIsNotNull() ? voInt.getAdditionalInfo() + lineDelimiter + removalInfo: removalInfo); cellInfo.setReadOnly(Boolean.TRUE); DynamicGridCell cellComp = row.getCells().newCell(getColumn(COLCOMPLETED), DynamicCellType.BOOL, DynamicGridCellOptions.EDITABLE_DATA_CELL); cellComp.setValue(voInt.getStopDateIsNotNull() ? Boolean.TRUE : Boolean.FALSE); cellComp.setReadOnly(voInt.getStopDateIsNotNull()); cellComp.setTooltip(Boolean.TRUE.equals(row.isReadOnly()) || voInt.getStopDateIsNotNull() ? removalInfo : ""); //WDEV-16795 cellComp.setAutoPostBack(Boolean.TRUE); DynamicGridCell cellCompInfo = row.getCells().newCell(getColumn(COLWHENWHO), DynamicCellType.STRING); cellCompInfo.setValue(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? (voInt.getStopDateIsNotNull() ? voInt.getStopDate() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getIMosName() : "" ) : ""); //WDEV-16795 cellCompInfo.setTooltip(voInt.getStopDateIsNotNull() || voInt.getStopByIsNotNull() ? (voInt.getStopDateIsNotNull() ? voInt.getStopDate() : "" ) + " " + (voInt.getStopByIsNotNull() ? voInt.getStopBy().getIMosName() : "" ) + lineDelimiter + removalInfo: removalInfo); cellCompInfo.setReadOnly(Boolean.TRUE); if (isRemovedOrReinstatedAction) cellCompInfo.setIdentifier(isRemovedOrReinstatedAction); //WDEV-16795 row.setValue(voCarePlans.get(i)); row.setIdentifier(voInt); } } }