private TrackingAttendanceStatusVo createTrackingStatus(TrackingStatus status) { TrackingAttendanceStatusVo dischargeStatus = new TrackingAttendanceStatusVo(); dischargeStatus.setPatient(form.getGlobalContext().Core.getPatientShort()); dischargeStatus.setEpisode(form.getGlobalContext().Core.getEpisodeofCareShort()); dischargeStatus.setAttendance(form.getGlobalContext().Core.getCurrentCareContext()); dischargeStatus.setTrackingArea(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo ? (TrackingAreaForTrackingVo) form.grdTrackingCount().getValue() : null); dischargeStatus.setStatusDatetime(new DateTime()); dischargeStatus.setCreatedBy(form.getLocalContext().getLoggedMosRef()); dischargeStatus.setStatus(status); //WDEV-16777 dischargeStatus.setPrevStatus((form.getLocalContext().getSelectedTrackingPatient()!=null && form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus()!=null ) ? form.getLocalContext().getSelectedTrackingPatient().getCurrentStatus().getStatus() : null); dischargeStatus.setPrevTrackingArea(form.getLocalContext().getSelectedTrackingPatient().getCurrentArea());//WDEV-17119 return dischargeStatus; }
public TrackingAreaForTrackingVo getTrackingAreaForTracking(TrackingRefVo trackingRef) { if( trackingRef == null ) return null; DomainFactory factory = getDomainFactory(); String query = "select t2_1 from Tracking as t1_1 left join t1_1.currentArea as t2_1 where( t1_1.id = :trackingId )"; List<?> list = factory.find(query, new String[] {"trackingId"}, new Object[] {trackingRef.getID_Tracking()}); if(list == null || list.size() == 0) return null; TrackingAreaForTrackingVoCollection temp =TrackingAreaForTrackingVoAssembler.createTrackingAreaForTrackingVoCollectionFromTrackingArea(list); if( temp != null && temp.size() > 0) return temp.get(0); return null; }
private TrackingSearchCriteriaVo getSearchCriteria() { TrackingSearchCriteriaVo searchCriteria = new TrackingSearchCriteriaVo(); if (form.chkAllSites().isVisible()) searchCriteria.setViewAllED(Boolean.TRUE.equals(form.chkAllSites().getValue()) ? true : false); if (form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo) searchCriteria.setTrackingArea((TrackingAreaForTrackingVo) form.grdTrackingCount().getValue()); if (form.GroupView().isVisible(GroupViewEnumeration.rdoViewAll)) searchCriteria.setViewType(getViewType()); if (form.GroupDisplay().isVisible(GroupDisplayEnumeration.rdoCurrentlyInDept)) searchCriteria.setDisplayType(getDisplayType()); return searchCriteria; }
private void trackingAreaSelectionChanged() { if(!(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo)) return; if(form.chkAllSites().getValue()) { if(form.grdTrackingCount().getSelectedRow() != null && form.grdTrackingCount().getSelectedRow().getParentRow() != null) { if(form.grdTrackingCount().getSelectedRow().getParentRow().getValue() instanceof LocationLiteVo) { form.getLocalContext().setAttendanceKPIConfig(domain.getAttendanceKPIConfig((LocationLiteVo) form.grdTrackingCount().getSelectedRow().getParentRow().getValue())); } } } form.getLocalContext().setSelectedTrackingArea((TrackingAreaForTrackingVo) form.grdTrackingCount().getValue()); form.getLocalContext().setSelectedTrackingPatient(null); form.GroupView().setValue(GroupViewEnumeration.rdoViewAll); form.GroupDisplay().setValue(GroupDisplayEnumeration.rdoCurrentlyInDept);//WDEV-16987 form.pnlTrackPatients().setValue("Patients currently in Area: " + ((TrackingAreaForTrackingVo) form.grdTrackingCount().getValue()).getAreaDisplayName()); populateTrackingGrid(); //initializePatientRefreshTimer(); //wdev-17613 }
private void initializeTrackingGrid() { form.dyngrdTrack().clear(); form.dyngrdTrack().setSelectable(true); if(!(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo) || ((TrackingAreaForTrackingVo) form.grdTrackingCount().getValue()).getColumns() == null) return; for(ColumnDetailVo column : ((TrackingAreaForTrackingVo)form.grdTrackingCount().getValue()).getColumns()) { addTrackingColumn(column); } }
private DNWStatusForTrackingSaveVo createDNWStatus(int calledAmount) { DNWStatusForTrackingSaveVo dnwStatus = new DNWStatusForTrackingSaveVo(); dnwStatus.setCalledAmount(calledAmount); dnwStatus.setStatusDateTime(new DateTime()); dnwStatus.setArea(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo ? (TrackingAreaForTrackingVo) form.grdTrackingCount().getValue() : null); dnwStatus.setAuthoringUser(form.getLocalContext().getLoggedMosRef()); return dnwStatus; }
private void trackingAreaSelectionChanged() { if(!(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo)) return; if(form.chkAllSites().getValue()) { if(form.grdTrackingCount().getSelectedRow() != null && form.grdTrackingCount().getSelectedRow().getParentRow() != null) { if(form.grdTrackingCount().getSelectedRow().getParentRow().getValue() instanceof LocationLiteVo) { form.getLocalContext().setAttendanceKPIConfig(domain.getAttendanceKPIConfig((LocationLiteVo) form.grdTrackingCount().getSelectedRow().getParentRow().getValue())); } } } form.getLocalContext().setSelectedTrackingArea((TrackingAreaForTrackingVo) form.grdTrackingCount().getValue()); form.getLocalContext().setSelectedTrackingPatient(null); form.GroupView().setValue(GroupViewEnumeration.rdoViewAll); form.GroupDisplay().setValue(GroupDisplayEnumeration.rdoCurrentlyInDept);//WDEV-16987 form.pnlTrackPatients().setValue("Patients currently in Area: " + ((TrackingAreaForTrackingVo) form.grdTrackingCount().getValue()).getAreaDisplayName()); populateTrackingGrid(); //initializePatientRefreshTimer(); //wdev-17613 form.getGlobalContext().Emergency.setTrackingSearchCriteria(getSearchCriteria()); //WDEV-19389 }
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { if (args!=null && args.length>0 && args[0]!=null && args[0] instanceof TrackingAreaForTrackingVo ) { form.getLocalContext().setSelectedArea(domain.getTrackingArea((TrackingAreaForTrackingVo)args[0])); } initialize(); doSearch(); updateControlsState(); }
private void populateTrackingGrid() { initializeTrackingGrid(); clearContext(); //WDEV-15971 clearPriorityLocalContexts(); if(!(form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo)) return; boolean isViewMyAllocated = false; if(GroupViewEnumeration.rdoViewMyAllocated.equals(form.GroupView().getValue()))//WDEV-16987 { isViewMyAllocated = true; if(form.getLocalContext().getLoggedHcpRef() == null) return; } TrackingAreaForTrackingVo trackingArea = (TrackingAreaForTrackingVo) form.grdTrackingCount().getValue(); //WDEV-17259 Boolean wasPatientStatusColumnAdded = Boolean.FALSE; for (int x = 0; x < trackingArea.getColumns().size(); x++) { if (TrackingAreaColumn.PATIENT_CURRENT_STATUS.equals(trackingArea.getColumns().get(x).getColumn())) wasPatientStatusColumnAdded = Boolean.TRUE; } //create a dummy column so the the domain will return values for the CurrentStatus.Status field if (Boolean.FALSE.equals(wasPatientStatusColumnAdded)) { ColumnDetailVo dummyColumn = new ColumnDetailVo(); dummyColumn.setColumn(TrackingAreaColumn.PATIENT_CURRENT_STATUS); trackingArea.getColumns().add(dummyColumn); } TrackingVoCollection trackingPatients = domain.listTrackingPatients(trackingArea, Boolean.TRUE.equals(isViewMyAllocated) ? form.getLocalContext().getLoggedHcpRef() : null, null, GroupViewEnumeration.rdoViewUnallocated.equals(form.GroupView().getValue()), GroupDisplayEnumeration.rdoCurrentlyInDept.equals(form.GroupDisplay().getValue()),GroupDisplayEnumeration.rdoDeparted.equals(form.GroupDisplay().getValue()),GroupDisplayEnumeration.rdoCurrentAndDeparted.equals(form.GroupDisplay().getValue()));//WDEV-16987 form.getLocalContext().setTrackingPatients(trackingPatients); if(trackingPatients == null) return; //WDEV-16534 if (form.getLocalContext().getSortOrder() != null) { trackingPatients.sort(new TrackingPatientsComparator((TrackingAreaColumn) form.getLocalContext().getSortOrder().getColumnType(), form.getLocalContext().getSortOrder().getSortOrder())); } else trackingPatients.sort(new TrackingComparator()); for(TrackingVo trackingPatient : trackingPatients) { addTrackingPatientRow(trackingPatient); } form.dyngrdTrack().setValue(form.getLocalContext().getSelectedTrackingPatient()); trackingSelectionChanged(); populatePriorityLabels();//WDEV-15971 }
@Override protected void onBtnBedManagementDashboardClick() throws PresentationLogicException { LocationRefVo selectedLocation = null; if (form.grdTrackingCount().getValue() instanceof TrackingAreaForTrackingVo) { TrackingAreaForTrackingVo trackingArea = (TrackingAreaForTrackingVo) form.grdTrackingCount().getValue(); selectedLocation = trackingArea.getEDLocation(); } LocationRefVo selectedHospital = domain.getHospitalForSelectedLocation(selectedLocation); if (selectedHospital == null) { engine.showMessage("Could not find hospital for selected location."); return; } if (form.getLocalContext().getBED_MANAGEMENT_DASHBOARD_URL() == null || form.getLocalContext().getBED_MANAGEMENT_DASHBOARD_URL().length() == 0) { engine.showMessage("BED_MANAGEMENT_DASHBOARD_URL config flag was not set."); return; } //WDEV-22837 List<UrlParam> params = new ArrayList<UrlParam>(); params.add(new UrlParam("HID", selectedHospital.getID_Location().toString())); engine.openDashboardCloseableOnContextChange(form.getLocalContext().getBED_MANAGEMENT_DASHBOARD_URL(), params); /* String url = form.getLocalContext().getBED_MANAGEMENT_DASHBOARD_URL() + "?HID=" + selectedHospital.getID_Location(); List<WindowParam> params = new ArrayList<WindowParam>(); params.add(new WindowParam("FullScreen", "false")); params.add(new WindowParam("ToolBar", "false")); params.add(new WindowParam("StatusBar", "false")); params.add(new WindowParam("StatusBar", "false")); params.add(new WindowParam("MenuBar", "false")); params.add(new WindowParam("AddressBar", "false")); params.add(new WindowParam("Resizable", "true")); params.add(new WindowParam("Visible", "true")); params.add(new WindowParam("Width", "1440")); params.add(new WindowParam("Height", "1000")); engine.openCustomUrlCloseableOnContextChange(url, params, true); */ }