private void populateGrid(CareSpellVoCollection voCollCareSpells) { form.grdList().getRows().clear(); if (voCollCareSpells != null) { // int size = voCollCareSpells.size(); CareSpellVoCollection careSpells = voCollCareSpells.sort(); CareSpellVoCollection nuCareSpells = new CareSpellVoCollection(); nuCareSpells = dischargedRemoved(careSpells); if (nuCareSpells != null) { populateCareSpellRows(nuCareSpells); } } }
private void populateCareSpellRows(CareSpellVoCollection voCollCareSpells, PersonName name) { grdPatientsRow careSpellRow; for (int i = 0; i < voCollCareSpells.size(); i++) { careSpellRow = form.grdPatients().getRows().newRow(); CareSpellVo careSpellVo = voCollCareSpells.get(i); careSpellRow.setcolStartDateEndDate(name.toString()); //setStartDateEndDateAndTooltip(careSpellRow, careSpellVo); careSpellRow.setCollapsedImage(form.getImages().Core.CareSpell); careSpellRow.setExpandedImage(form.getImages().Core.CareSpell); careSpellRow.setBackColor(Color.Bisque); careSpellRow.setBold(true); careSpellRow.setValue(careSpellVo); if (careSpellVo.getEndDateIsNotNull()) form.getLocalContext().setParentEnded(Boolean.TRUE); boolean bCollapseAll = populateEpisodeOfCareRows(careSpellVo.getEpisodes().sort(), careSpellRow); careSpellRow.setExpanded(!bCollapseAll); } }
private void populateGrid(CareSpellVoCollection voCollCareSpells) { form.dyngrdList().getRows().clear(); form.getLocalContext().setCareContextCollection(new CareContextRefVoCollection()); // wdev-13896 form.getLocalContext().setEpisodeOfCareCollection(new EpisodeOfCareRefVoCollection()); // wdev13896 if (voCollCareSpells != null) { populateCareSpellRows(voCollCareSpells); } // wdev-13896 form.getLocalContext().setEpisodeOfCareCollection(domain.getEpisodeOfCareIdThatHasHistory(form.getLocalContext().getEpisodeOfCareCollection())); form.getLocalContext().setCareContextCollection(domain.getCareContextThatHasHistoryId(form.getLocalContext().getCareContextCollection())); if (form.getLocalContext().getEpisodeOfCareCollectionIsNotNull()) { showHistoryButtonForEpisodeOfCareInGrid(); } if (form.getLocalContext().getCareContextCollectionIsNotNull()) { showHistoryButtonForCareContextInGrid(); } // ---------- }
private void populateCareSpellRows(CareSpellVoCollection voCollCareSpells) { DynamicGridRow careSpellRow; for (int i = 0; i < voCollCareSpells.size(); i++) { careSpellRow = form.dyngrdList().getRows().newRow(); CareSpellVo careSpellVo = voCollCareSpells.get(i); setStartDateEndDateAndTooltip(careSpellRow, careSpellVo); careSpellRow.setCollapsedImage(form.getImages().Core.CareSpell); careSpellRow.setExpandedImage(form.getImages().Core.CareSpell); careSpellRow.setBackColor(Color.Bisque); careSpellRow.setBold(true); careSpellRow.setValue(careSpellVo); //cellCareSpell.setColumnHistoryEmpty(true); // wdev-13896 // wdev-13977 if (voCollCareSpells.get(i).getCurrentStatusIsNotNull() && voCollCareSpells.get(i).getCurrentStatus().getStatusIsNotNull() && voCollCareSpells.get(i).getCurrentStatus().getStatus().equals(ProblemGroupStatus.CANCELLED)) careSpellRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_PROBLEM_GROUPS.getValue()); // ------- if (careSpellVo.getEndDateIsNotNull()) form.getLocalContext().setParentEnded(Boolean.TRUE); boolean bCollapseAll = populateEpisodeOfCareRows(careSpellVo.getEpisodes().sort(), careSpellRow); careSpellRow.setExpanded(!bCollapseAll); } }
private void populateGrid(CareSpellVoCollection voCollCareSpells) { form.grdList().getRows().clear(); form.getLocalContext().setCareContextCollection(new CareContextRefVoCollection()); //wdev-13896 form.getLocalContext().setEpisodeOfCareCollection(new EpisodeOfCareRefVoCollection()); //wdev13896 if (voCollCareSpells != null) { populateCareSpellRows(voCollCareSpells); } //wdev-13896 form.getLocalContext().setEpisodeOfCareCollection(domain.getEpisodeOfCareIdThatHasHistory(form.getLocalContext().getEpisodeOfCareCollection())); form.getLocalContext().setCareContextCollection(domain.getCareContextThatHasHistoryId(form.getLocalContext().getCareContextCollection())); if(form.getLocalContext().getEpisodeOfCareCollectionIsNotNull()) { showHistoryButtonForEpisodeOfCareInGrid(); } if(form.getLocalContext().getCareContextCollectionIsNotNull()) { showHistoryButtonForCareContextInGrid(); } //---------- }
private CareSpellVoCollection populateEpisodeOfCareCollection(CareSpellVoCollection careSpelColl, EpisodeofCareVoCollection episodeColl) { if (careSpelColl == null || episodeColl == null) return null; for (int k = 0; k < careSpelColl.size(); k++) { for (int l = 0; l < episodeColl.size(); l++) { if (careSpelColl.get(k).getID_CareSpellIsNotNull() && careSpelColl.get(k).getID_CareSpell().equals(episodeColl.get(l).getCareSpell().getID_CareSpell())) { if (!careSpelColl.get(k).getEpisodesIsNotNull()) careSpelColl.get(k).setEpisodes(new EpisodeofCareVoCollection()); careSpelColl.get(k).getEpisodes().add(episodeColl.get(l)); } } } return careSpelColl; }
private CareSpellVoCollection populateEpisodeOfCareCollection(CareSpellVoCollection careSpelColl ,EpisodeofCareVoCollection episodeColl) { if(careSpelColl == null || episodeColl == null) return null; for(int k = 0; k < careSpelColl.size();k++ ) { for(int l = 0; l < episodeColl.size();l++) { if(careSpelColl.get(k).getID_CareSpellIsNotNull() && careSpelColl.get(k).getID_CareSpell().equals(episodeColl.get(l).getCareSpell().getID_CareSpell())) { if(!careSpelColl.get(k).getEpisodesIsNotNull()) careSpelColl.get(k).setEpisodes(new EpisodeofCareVoCollection()); careSpelColl.get(k).getEpisodes().add(episodeColl.get(l)); } } } return careSpelColl; }
private CareSpellVoCollection patientIsCurrentInpatient() { CareSpellVoCollection inpatientCare = new CareSpellVoCollection(); CareSpellVoCollection inpatientCareList = new CareSpellVoCollection(); // CareSpellVo inpatCare = new CareSpellVo(); CareSpellVoCollection careList = domain.listCareSpellsByPatient(form.getGlobalContext().Core.getPatientShort(), null); if (careList != null) { for (int index = 0; index < careList.size(); index++) { EpisodeofCareVoCollection episodeList = careList.get(index).getEpisodes(); for (int i = 0; i < episodeList.size(); i++) { CareContextVoCollection careContextList = episodeList.get(i).getCareContexts(); for (int j = 0; j < careContextList.size(); j++) { if (careContextList.get(j).getContext().equals(ContextType.INPATIENT) == true /*&& careContextList.get(j).getEndDateTime() == null*/) { inpatientCareList.add(careList.get(index)); } } } } } if (inpatientCareList.size() > 0) { inpatientCare.add(inpatientCareList.get(0)); return inpatientCare; } return inpatientCareList; }
private void populateCareSpellRows(CareSpellVoCollection voCollCareSpells) { grdListRow careSpellRow; for (int i = 0; i < voCollCareSpells.size(); i++) { if (isOutsideRange(voCollCareSpells.get(i).getStartDate()) && !(careSpellContainsInpatient(voCollCareSpells.get(i)))) continue; careSpellRow = form.grdList().getRows().newRow(); CareSpellVo careSpellVo = voCollCareSpells.get(i); careSpellRow.setcolStartDateEndDate(careSpellVo.createDisplayString()); careSpellRow.setTooltip(careSpellVo.createDisplayString()); careSpellRow.setCollapsedImage(form.getImages().Core.CareSpell); careSpellRow.setExpandedImage(form.getImages().Core.CareSpell); careSpellRow.setBackColor(Color.Bisque); careSpellRow.setBold(true); careSpellRow.setValue(careSpellVo); if (careSpellVo.getEndDateIsNotNull()) form.getLocalContext().setParentEnded(Boolean.TRUE); if (careSpellVo.getEpisodesIsNotNull()) { boolean bCollapseAll = populateEpisodeOfCareRows(careSpellVo.getEpisodes().sort(), careSpellRow); careSpellRow.setExpanded(!bCollapseAll); careSpellRow.setSelectable(false); } } }
private void populateGrid(CareSpellVoCollection voCollCareSpells, PersonName name) { if (voCollCareSpells != null) { populateCareSpellRows(voCollCareSpells, name); } }
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo) { if(patientRefVo == null || patientRefVo.getID_Patient() == null) throw new CodingRuntimeException("Patient not provided"); DomainFactory factory = getDomainFactory(); List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] {"idPatient"}, new Object[] {patientRefVo.getID_Patient()}); if (careSpells != null && careSpells.size() > 0) return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING); return null; }
private void listCareSpells() { int nContext = getIndexItem(form.cmbContext().getValue()); // wdev-13335 CareSpellVoCollection voCollCareSpells = domain.listCareSpellsByPatientAndCriteria(form.getGlobalContext().Core.getPatientShort(), form.dteDateFrom().getValue(), form.dteDateTo().getValue(), nContext, form.getLocalContext().getShowCancelledContexts()); // wdev-13335 // , // //wdev-13977 // CareSpellVoCollection voCollCareSpells = // domain.listCareSpellsByPatient(form.getGlobalContext().Core.getPatientShort()); populateGrid(voCollCareSpells); }
private void listCareSpells() { int nContext = getIndexItem(form.cmbContext().getValue()); //wdev-13335 CareSpellVoCollection voCollCareSpells = domain.listCareSpellsByPatientAndCriteria(form.getGlobalContext().Core.getPatientShort(), form.dteDateFrom().getValue(), form.dteDateTo().getValue(),nContext,form.getLocalContext().getShowCancelledContexts()); //wdev-13335 , //wdev-13977 //CareSpellVoCollection voCollCareSpells = domain.listCareSpellsByPatient(form.getGlobalContext().Core.getPatientShort()); populateGrid(voCollCareSpells); }
private void populateCareSpellRows(CareSpellVoCollection voCollCareSpells) { grdListRow careSpellRow; for (int i = 0; i < voCollCareSpells.size(); i++) { careSpellRow = form.grdList().getRows().newRow(); CareSpellVo careSpellVo = voCollCareSpells.get(i); setStartDateEndDateAndTooltip(careSpellRow, careSpellVo); careSpellRow.setCollapsedImage(form.getImages().Core.CareSpell); careSpellRow.setExpandedImage(form.getImages().Core.CareSpell); careSpellRow.setBackColor(Color.Bisque); careSpellRow.setBold(true); careSpellRow.setValue(careSpellVo); careSpellRow.setColumnHistoryEmpty(true); //wdev-13896 //wdev-13977 if(voCollCareSpells.get(i).getCurrentStatusIsNotNull() && voCollCareSpells.get(i).getCurrentStatus().getStatusIsNotNull() && voCollCareSpells.get(i).getCurrentStatus().getStatus().equals(ProblemGroupStatus.CANCELLED)) careSpellRow.setBackColor(ConfigFlag.UI.DISPLAY_COLOUR_FOR_CANCELLED_PROBLEM_GROUPS.getValue()); //------- if (careSpellVo.getEndDateIsNotNull()) form.getLocalContext().setParentEnded(Boolean.TRUE); boolean bCollapseAll = populateEpisodeOfCareRows(careSpellVo.getEpisodes().sort(), careSpellRow); careSpellRow.setExpanded(!bCollapseAll); } }
public CareSpellVoCollection listCareSpellsByPatient(PatientRefVo patientRefVo) { if (patientRefVo == null || patientRefVo.getID_Patient() == null) throw new CodingRuntimeException("Patient not provided"); DomainFactory factory = getDomainFactory(); List careSpells = factory.find("from CareSpell careSpell where careSpell.patient.id = :idPatient", new String[] { "idPatient" }, new Object[] { patientRefVo.getID_Patient() }); if (careSpells != null && careSpells.size() > 0) return CareSpellVoAssembler.createCareSpellVoCollectionFromCareSpell(careSpells).sort(SortOrder.DESCENDING); return null; }