private EpisodeofCareVoCollection createNewEpisodeOfCare(CareSpellVo voCareSpell) { EpisodeofCareVoCollection voCollEpisodeOfCare = new EpisodeofCareVoCollection(); EpisodeofCareVo voEpisodeOfCare = new EpisodeofCareVo(); if (form.dtimArrival().getValue() != null) { voEpisodeOfCare.setStartDate(form.dtimArrival().getValue().getDate()); } voEpisodeOfCare.setSpecialty(Specialty.EMERGENCY); voEpisodeOfCare.setCareSpell(voCareSpell); voEpisodeOfCare.setCareContexts(createNewCareContext(voEpisodeOfCare)); voCollEpisodeOfCare.add(voEpisodeOfCare); form.getLocalContext().setepisodeToSave(voEpisodeOfCare); return voCollEpisodeOfCare; }
private EpisodeofCareVoCollection createNewEpisodeOfCare(CareSpellVo voCareSpell) { EpisodeofCareVoCollection voCollEpisodeOfCare = new EpisodeofCareVoCollection(); EpisodeofCareVo voEpisodeOfCare = new EpisodeofCareVo(); if (form.dtimRegistration().getValue() != null) // wdev-16070 voEpisodeOfCare.setStartDate(form.dtimRegistration().getValue().getDate()); voEpisodeOfCare.setSpecialty(Specialty.EMERGENCY); voEpisodeOfCare.setCareSpell(voCareSpell); voEpisodeOfCare.setCareContexts(createNewCareContext(voEpisodeOfCare)); voCollEpisodeOfCare.add(voEpisodeOfCare); form.getLocalContext().setCurrentEpisodeOfCare(voEpisodeOfCare); return voCollEpisodeOfCare; }
private void enableDiagnosisGridContextMenu() { boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0; // boolean = // form.getGlobalContext().Core.getCurrentCareContextIsNotNull(); boolean isCareContextSel; // wdev-13296 if (form.dyngrdList().getValue() instanceof EpisodeofCareVo) // wdev-13296 { if (form.ctnSummary().grdDiagnosis().getValue() != null) // wdev-13296 isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo); // wdev-13296 else isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull(); } else isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull(); form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected); form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected); form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected); form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel); form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); // wdev-13296 }
protected boolean checkIfEpisodeOfCareCanBeCancelled(EpisodeofCareVo episodeOfCare) { boolean episode = false; if (episodeOfCare == null) return episode; if (episodeOfCare.getCurrentStatus() == null || EpisodeOfCareStatus.OPEN.equals(episodeOfCare.getCurrentStatus().getStatus()))// WDEV-14910 { episode = true; for (int j = 0; episodeOfCare.getCareContextsIsNotNull() && j < episodeOfCare.getCareContexts().size(); j++) { if (chekIfCareContextsAreNotOpened(episodeOfCare.getCareContexts().get(j)) == false) episode = false; } } return episode; }
protected boolean checkIfEpisodeOfCaresAreNotOpened(EpisodeofCareVo episode) { if (episode == null) return false; if (episode.getCurrentStatus() == null || EpisodeOfCareStatus.OPEN.equals(episode.getCurrentStatus().getStatus()))// WDEV-14910 return false; else { for (int i = 0; episode.getCareContextsIsNotNull() && i < episode.getCareContexts().size(); i++) { if (chekIfCareContextsAreNotOpened(episode.getCareContexts().get(i)) == false) return false; } } return true; }
@Override // wdev-13896 protected void onDyngrdListCellButtonClicked(DynamicGridCell cell) { DynamicGridRow row = cell.getRow(); if (row.getValue() instanceof EpisodeofCareVo) { form.getGlobalContext().Clinical.setEpisodeOfCareWithHistory(domain.getEpisodeOfCareWithHistory((EpisodeofCareVo) row.getValue())); engine.open(form.getForms().Core.EpisodeOfCareHistoryDialog); } else if (row.getValue() instanceof CareContextVo) { form.getGlobalContext().Clinical.setCareContextWithHistory(domain.getCareContextWithHistory((CareContextVo) row.getValue())); engine.open(form.getForms().Core.CareContextHistoryDialog); } }
private void showHistoryButtonForEpisodeOfCareInGrid() { EpisodeOfCareRefVoCollection refEpisodeOfCareColl = form.getLocalContext().getEpisodeOfCareCollection(); if(refEpisodeOfCareColl != null && refEpisodeOfCareColl.size() > 0) { grdListRow[] rowVectColl = form.grdList().getAllRows(); for(int k = 0; k < rowVectColl.length; k++) { if(rowVectColl[k].getValue() instanceof EpisodeofCareVo) { EpisodeofCareVo voEpCare = (EpisodeofCareVo) rowVectColl[k].getValue(); for(int i = 0; i < refEpisodeOfCareColl.size();i++) { if(voEpCare != null && voEpCare.getID_EpisodeOfCareIsNotNull() && voEpCare.getID_EpisodeOfCare().equals(refEpisodeOfCareColl.get(i).getID_EpisodeOfCare())) { rowVectColl[k].setColumnHistoryEmpty(false); rowVectColl[k].setTooltipForColumnHistory("History"); //WDEV-14021 } } } } } }
private void enableDiagnosisGridContextMenu() { boolean isRecordSelected = form.ctnSummary().grdDiagnosis().getSelectedRowIndex() >= 0; //boolean = form.getGlobalContext().Core.getCurrentCareContextIsNotNull(); boolean isCareContextSel; //wdev-13296 if(form.grdList().getValue() instanceof EpisodeofCareVo) //wdev-13296 { if(form.ctnSummary().grdDiagnosis().getValue() != null) //wdev-13296 isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() && (form.ctnSummary().grdDiagnosis().getValue() instanceof PatientDiagnosisShortVo); //wdev-13296 else isCareContextSel = form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull(); } else isCareContextSel = form.getGlobalContext().Core.getCurrentCareContextIsNotNull(); form.getContextMenus().getPatSummaryDiagCompVIEWItem().setVisible(isCareContextSel && isRecordSelected); form.getContextMenus().getPatSummaryDiagCompVIEWLINKSDIALOGItem().setVisible(isRecordSelected); form.getContextMenus().getPatSummaryDiagCompDISPLAYLINKSSUMMARYItem().setVisible(isRecordSelected); form.getContextMenus().getPatSummaryDiagCompNEWDIAGNOSISItem().setVisible(isCareContextSel); form.getContextMenus().getPatSummaryDiagCompNEWPROBLEMItem().setVisible(form.getGlobalContext().Core.getCurrentCareContextIsNotNull()); //wdev-13296 }
protected boolean checkIfEpisodeOfCareCanBeCancelled(EpisodeofCareVo episodeOfCare) { boolean episode = false; if( episodeOfCare == null) return episode; if(episodeOfCare.getCurrentStatus() == null || EpisodeOfCareStatus.OPEN.equals(episodeOfCare.getCurrentStatus().getStatus()))// WDEV-14910 { episode = true; for(int j = 0;episodeOfCare.getCareContextsIsNotNull() && j < episodeOfCare.getCareContexts().size();j++) { if( chekIfCareContextsAreNotOpened(episodeOfCare.getCareContexts().get(j)) == false) episode = false; } } return episode; }
protected boolean checkIfEpisodeOfCaresAreNotOpened(EpisodeofCareVo episode) { if(episode == null) return false; if(episode.getCurrentStatus() == null || EpisodeOfCareStatus.OPEN.equals(episode.getCurrentStatus().getStatus()))// WDEV-14910 return false; else { for(int i = 0;episode.getCareContextsIsNotNull() && i < episode.getCareContexts().size();i++) { if( chekIfCareContextsAreNotOpened(episode.getCareContexts().get(i)) == false) return false; } } return true; }
private EpisodeofCareVo copyFromShortEpisode(EpisodeOfCareWithoutContextsVo episodeVo) { if (episodeVo == null) return null; EpisodeofCareVo tempVo = new EpisodeofCareVo(episodeVo.getID_EpisodeOfCare(), episodeVo.getVersion_EpisodeOfCare()); tempVo.setID_EpisodeOfCare(episodeVo.getID_EpisodeOfCare()); tempVo.setCareSpell(episodeVo.getCareSpell()); tempVo.setEndDate(episodeVo.getEndDate()); tempVo.setStartDate(episodeVo.getStartDate()); tempVo.setIsRIE(episodeVo.getIsRIE()); tempVo.setSpecialty(episodeVo.getSpecialty()); tempVo.setRelationship(episodeVo.getRelationship()); tempVo.setResponsibleHCP(episodeVo.getResponsibleHCP()); tempVo.setCareContexts(new CareContextVoCollection()); tempVo.setCurrentStatus(episodeVo.getCurrentStatus()); tempVo.setCurrentReferral(episodeVo.getCurrentReferral()); tempVo.setEpisodeOfCareHistory(episodeVo.getEpisodeOfCareHistory()); tempVo.setLinkedReferrals(episodeVo.getLinkedReferrals()); tempVo.setRelationship(episodeVo.getRelationship()); tempVo.setStatusHistory(episodeVo.getStatusHistory()); return tempVo; }
private boolean episodeContainsInpatient(EpisodeofCareVo episodeofCareVo) { int count = 0; for (int j = 0; j < episodeofCareVo.getCareContexts().size(); j++) { if(episodeofCareVo.getCareContexts().get(j).getContext().equals(ContextType.INPATIENT)) count++; } if (count > 0) return true; return false; }
private boolean isParentEnded(EpisodeofCareVo epis) { if (epis == null) throw new CodingRuntimeException("epis is null in method isParentEnded"); return epis.getEndDateIsNotNull(); }
public EpisodeofCareVo getEpisodeOfCare(EpisodeOfCareRefVo episodeOfCareRef) { if(episodeOfCareRef == null || episodeOfCareRef.getID_EpisodeOfCare()==null) throw new CodingRuntimeException("Cannot get EpisodeOfCare value on null episodeOfCareRef."); DomainFactory factory = getDomainFactory(); EpisodeOfCare doEpisodeOfcare = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, episodeOfCareRef.getID_EpisodeOfCare()); return EpisodeofCareVoAssembler.create(doEpisodeOfcare); }
private CareContextVoCollection createNewCareContext(EpisodeofCareVo voEpisodeOfCare) { CareContextVoCollection voCollCareContext = new CareContextVoCollection(); CareContextVo voCareContext = new CareContextVo(); voCareContext.setContext(ContextType.EMERGENCY_FIRST_VISIT); voCareContext.setStartDateTime(form.dtimArrival().getValue()); voCareContext.setEpisodeOfCare(voEpisodeOfCare); voCollCareContext.add(voCareContext); form.getLocalContext().setcareContextToSave(voCareContext); return voCollCareContext; }