private void populateScreenFromData(BedSpaceVo bedSpace) { form.txtDesc().setValue(bedSpace.getDescription()); form.cmbBedSpaceType().setValue(bedSpace.getBedSpaceType()); form.txtBedNumber().setValue(bedSpace.getBedNumber()); if(bedSpace.getWardTypeIsNotNull()) { if(bedSpace.getWardType().equals(WardType.MAIN)) form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoMain); else if(bedSpace.getWardType().equals(WardType.SIDE)) form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoSide); } else form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoMain); }
private void populateBedSpaceGrid(BedSpaceVoCollection bedSpaces) { form.grdBedSpace().getRows().clear(); if(bedSpaces == null) return; for(BedSpaceVo bed : bedSpaces) { grdBedSpaceRow row = form.grdBedSpace().getRows().newRow(); row.setColBedSpaceType(bed.getBedSpaceType() != null ? bed.getBedSpaceType().getText() : null); row.setColWardType(bed.getWardType() != null ? bed.getWardType().getText() : null); row.setColBedNumber(bed.getBedNumber()); row.setColTextPosition(bed.getTextPosition()); row.setColImagePosition(bed.getImagePosition()); row.setValue(bed); } }
private void populateScreenFromData(BedSpaceVo bedSpace) { form.txtDesc().setValue(bedSpace.getDescription()); form.cmbBedSpaceType().setValue(bedSpace.getBedSpaceType()); form.txtBedNumber().setValue(bedSpace.getBedNumber()); form.cmbDependencyLvl().setValue(bedSpace.getDependency()); form.chkIsPrivate().setValue(bedSpace.getPrivateBed()); if(bedSpace.getWardTypeIsNotNull()) { if(bedSpace.getWardType().equals(WardType.MAIN)) form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoMain); else if(bedSpace.getWardType().equals(WardType.SIDE)) form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoSide); } else form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoMain); }
private int getNumberOfOccupiedBedsInBay(LocationRefVo bay) { int occupiedBeds = 0; FloorBedSpaceLayoutVo layout = listLayoutForCurrentBay((ILocation) bay); if (layout != null && layout.getFloorLayout() != null && layout.getBedSpaces() != null) { for (int x = 0; x < layout.getBedSpaces().size(); x++) { BedSpaceVo bedVo = layout.getBedSpaces().get(x); BedSpaceStateLiteVo state = getBedSpaceState(bedVo); if (state != null && state.getCurrentBedStatus() != null && BedStatus.OCCUPIED.equals(state.getCurrentBedStatus().getBedStatus())) { occupiedBeds += 1; } } } return occupiedBeds; }
@Override protected void onBedPlannerBedAdded(Bed bed) { BedSpaceStateLiteVo bedSpaceStatus = new BedSpaceStateLiteVo(); BedSpaceVo bedSpace = new BedSpaceVo(); bedSpaceStatus.setBedSpace(bedSpace); bed.setIdentifier(bedSpaceStatus); form.getGlobalContext().Core.setBedSpaceProperty(bed); engine.open(form.getForms().Core.BedSpacePropertyDialog); }
@Override protected void onBedPlannerBedClicked(Bed bed) { form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null); form.getGlobalContext().Core.setBedInfoAction(null); form.dyngrdDisplay().setValue(null); form.getGlobalContext().Core.setPatientShort(null); if (bed != null && bed.getIdentifier() != null) { BedSpaceStateLiteVo bedSpaceState = domain.getBedSpaceState((BedSpaceVo) bed.getIdentifier()); form.getGlobalContext().Core.setSelectedBedSpaceState(bedSpaceState); if (bedSpaceState != null && bedSpaceState.getInpatientEpisodeIsNotNull() && bedSpaceState.getInpatientEpisode().getPasEventIsNotNull() && bedSpaceState.getInpatientEpisode().getPasEvent().getPatientIsNotNull()) { form.getGlobalContext().Core.setSelectingPatientForm(engine.getFormName()); form.getGlobalContext().Core.setPatientShort(bedSpaceState.getInpatientEpisode().getPasEvent().getPatient()); } if(bedSpaceState.getInpatientEpisode() != null) form.getGlobalContext().Core.setCurrentCareContext( domain.getCareContextForPasEvent(bedSpaceState.getInpatientEpisode().getPasEvent())); } resetPIDBarText();//WDEV-14476 //WDEV-9790 engine.open(form.getForms().Core.BedInfoDialog, new Object[]{new Boolean(form.isReadOnly())}); }
private String getBedTooltip(BedSpaceVo bedSpace, BedSpaceStateShortVo bedState) { if (bedSpace == null) return null; StringBuilder tooltip = new StringBuilder(); if (!ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS")) { if (bedSpace.getDescription() != null) tooltip.append("<b>Description : </b> ").append(bedSpace.getDescription()).append("<br>"); if (bedState != null && bedState.getCurrentBedStatus() != null && (BedStatus.FOR_CLEANING.equals(bedState.getCurrentBedStatus().getBedStatus()) || BedStatus.CLOSED.equals(bedState.getCurrentBedStatus().getBedStatus()))) { if (bedState.getCurrentBedStatus().getStatusDateTime() != null) tooltip.append("<b>Closure Date/Time: </b>").append(bedState.getCurrentBedStatus().getStatusDateTime().toString()).append("<br/>"); if (bedState.getCurrentBedStatus().getReasonForClosure() != null) tooltip.append("<b>Reason for Closure: </b>").append(bedState.getCurrentBedStatus().getReasonForClosure()).append("<br/>"); if (bedState.getCurrentBedStatus().getEstReopeningDateTime() != null) tooltip.append("<b>Estimated Re-Opening Date/Time: </b>").append(bedState.getCurrentBedStatus().getEstReopeningDateTime()); } } else if (bedState != null && ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS")) { tooltip.append(buildBedTooltip(bedState)); } else { tooltip.append(bedSpace.getDescription()); } return tooltip.toString(); }
private boolean isChair(BedSpaceVo voBed) { return voBed != null && BedSpaceType.CHAIR.equals(voBed.getBedSpaceType()); }
@Override protected void onBedPlannerBedClicked(Bed bed) { form.getGlobalContext().Core.setSelectedWaitingAreaPatient(null); form.getGlobalContext().Core.setBedInfoAction(null); form.dyngrdDisplay().setValue(null); if (bed != null && bed.getIdentifier() != null) { BedSpaceStateLiteVo bedSpaceState = domain.getBedSpaceState((BedSpaceVo) bed.getIdentifier()); WardBayConfigForWardViewVo wardConfig = form.getLocalContext().getWardBayConfig(); if (ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS") && wardConfig != null) { if (bedSpaceState != null && (WardBayStatus.CLOSED.equals(wardConfig.getWardAvailabilityStatus()) || WardBayStatus.CLOSED.equals(wardConfig.getBayConfig(form.cmbBay().getValue()).getBayAvailabilityStatus()))) return; if (bedSpaceState != null && bedSpaceState.getCurrentBedStatusIsNotNull() && BedStatus.AVAILABLE.equals(bedSpaceState.getCurrentBedStatus().getBedStatus()) && (WardBayStatus.BLOCKED.equals(wardConfig.getWardAvailabilityStatus()) || WardBayStatus.BLOCKED.equals(wardConfig.getBayConfig(form.cmbBay().getValue()).getBayAvailabilityStatus()))) return; } form.getGlobalContext().Core.setPatientShort(null); form.getGlobalContext().Core.setSelectedBedSpaceState(bedSpaceState); if(bedSpaceState != null && bedSpaceState.getInpatientEpisode() != null && bedSpaceState.getInpatientEpisode().getPasEventIsNotNull()) { //WDEV-22236 CareContextShortVo careContextForPasEvent = domain.getCareContextForPasEvent(bedSpaceState.getInpatientEpisode().getPasEvent()); form.getGlobalContext().Core.setCurrentCareContext(careContextForPasEvent); if (careContextForPasEvent == null && bedSpaceState.getInpatientEpisode().getPasEvent().getPatientIsNotNull()) { form.getGlobalContext().Core.setPatientShort(domain.getPatientShort(bedSpaceState.getInpatientEpisode().getPasEvent().getPatient())); } if (bedSpaceState.getInpatientEpisode().getPasEvent().getPatientIsNotNull()) { form.getGlobalContext().Core.setSelectingPatientForm(engine.getFormName()); } } } resetPIDBarText();//WDEV-14476 //WDEV-9790 engine.open(form.getForms().Core.BedInfoDialog, new Object[]{new Boolean(form.isReadOnly())}); }