Java Code Examples for ims.core.vo.BedSpaceVo

The following are top voted examples for showing how to use ims.core.vo.BedSpaceVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
}
 
Example 2
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
	}
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
}
 
Example 4
Project: openMAXIMS   File: WardViewImpl.java   Source Code and License 6 votes vote down vote up
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;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
}
 
Example 6
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
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);
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@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);
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@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())});
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@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);
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
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();
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@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);
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@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())});
}
 
Example 13
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
@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);
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
@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())});
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private boolean isChair(BedSpaceVo voBed)
{
	return voBed != null && BedSpaceType.CHAIR.equals(voBed.getBedSpaceType());
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
@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())});
}