Java Code Examples for ims.core.vo.BedSpaceStateLiteVo.getInpatientEpisode()

The following are Jave code examples for showing how to use getInpatientEpisode() of the ims.core.vo.BedSpaceStateLiteVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 6 votes
private void refreshContextsOnUpdateAdmission()
{
	form.getLocalContext().setAdmissionDetails(getAdmissionDetail());					
	if (form.getGlobalContext().Core.getSelectedBedSpaceStateIsNotNull())
	{
		BedSpaceStateLiteVo bedSpaceStateByInpatientEpisode = domain.getBedSpaceStateByInpatientEpisode(form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode());
		String bedStr = getBedSpaceTypeDescriptor(bedSpaceStateByInpatientEpisode);
		form.getGlobalContext().Core.setSelectedBedSpaceState(bedSpaceStateByInpatientEpisode);
		if (bedSpaceStateByInpatientEpisode.getInpatientEpisode() == null)
		{
			engine.showMessage("This patient has been discharged/moved from this " + bedStr.toLowerCase() + " by another user.The screen will be refreshed.");
			engine.close(DialogResult.OK);
		}
	} 
	else if (form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull())
	{
		InpatientEpisodeLiteVo inpatientEpisodeLiteVoById = domain.getInpatientEpisodeLiteVoById(form.getGlobalContext().Core.getSelectedWaitingAreaPatient());
		if (inpatientEpisodeLiteVoById == null)
		{
			engine.showMessage("This patient has been discharged/moved by another user.The screen will refresh");
			engine.close(DialogResult.OK);
		}
		form.getGlobalContext().Core.setSelectedWaitingAreaPatient(inpatientEpisodeLiteVoById);
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateEventControlsFromData(BedSpaceStateLiteVo voBedSpaceState)
{
	if (voBedSpaceState.getInpatientEpisode() == null)
		return;

	InpatientEpisodeLiteVo voInpatientEpisode = voBedSpaceState.getInpatientEpisode();
	populateEventControlsFromData(voInpatientEpisode);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private void populateEstimatedDischargeTabFromData()
{
	InpatientEpisodeLiteVo voInpatEpis = null;
	BedSpaceStateLiteVo voBedSpaceStateLite = form.getGlobalContext().Core.getSelectedBedSpaceState();
	if (voBedSpaceStateLite != null)
		voInpatEpis = voBedSpaceStateLite.getInpatientEpisode();
	else if(form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull())
		voInpatEpis = form.getGlobalContext().Core.getSelectedWaitingAreaPatient();
	
	if (voInpatEpis == null)
		throw new CodingRuntimeException("voInpatEpis is null in method populateEstimatedDischargeTabFromData");

	form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().setValue(voInpatEpis.getEstDischargeDate());

	//WDEV-13324
	form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(false);
	if ((voInpatEpis.getEstDischargeDate() != null && voInpatEpis.isDischargeDueWithin24Hrs()) || (voInpatEpis.getIsConfirmedDischargeIsNotNull() && voInpatEpis.getIsConfirmedDischarge()))
		form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(true);
	
	form.lyrDetail().tabEstimatedDischarge().chkConfirm().setValue(voInpatEpis.getIsConfirmedDischarge());
	
	//WDEV-12957
	if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO"))
	{
		form.lyrDetail().tabEstimatedDischarge().dteDischargeReady().setValue(voInpatEpis.getDischargeReadyDate());
		form.lyrDetail().tabEstimatedDischarge().btnClearEstimate().setVisible(false); //WDEV-13130
	}
	
	//WDEV-14608
	if (form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().getValue() != null)
	{
		Date newRevisedDate = new Date();
		newRevisedDate.addDay(1);

		if (!form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().getValue().isLessOrEqualThan(newRevisedDate))
		{
			form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(false);
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
@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 5
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void populateEventControlsFromData(BedSpaceStateLiteVo voBedSpaceState)
{
	if (voBedSpaceState.getInpatientEpisode() == null)
		return;

	InpatientEpisodeLiteVo voInpatientEpisode = voBedSpaceState.getInpatientEpisode();
	form.getLocalContext().setAdmissionDetails(getAdmissionDetail());
	populateEventControlsFromData(voInpatientEpisode);
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void cancelHomeLeaveReturn()
{
	BedSpaceStateLiteVo voBedSpaceState = form.getGlobalContext().Core.getSelectedBedSpaceState();
	
	InpatientEpisodeLiteVo voInp = voBedSpaceState != null ? voBedSpaceState.getInpatientEpisode() : form.getGlobalContext().Core.getSelectedWaitingAreaPatient();
	
	HomeLeaveVo voHl = populateHomeLeaveToReOpenDataFromScreen(form.getLocalContext().getHomeLeaveToReOpen(), voBedSpaceState != null);
	
	if (voHl == null)
	{	
		engine.showMessage("The home leave record has been changed by another user. The screen will be refreshed.");
		engine.close(DialogResult.OK);
		return;
	}
	
	String[] validationErrors = voHl.validate();
	if (validationErrors != null)
	{
		engine.showErrors(validationErrors);			
		return;
	}		
	try
	{
		domain.cancelHomeLeaveReturn(voInp, voBedSpaceState,voHl);
	}
	catch (DomainInterfaceException e)
	{
		engine.showMessage(e.getMessage());
		engine.close(DialogResult.OK);
		return;
	}
	catch (StaleObjectException ex)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		engine.close(DialogResult.OK);
		return;
	}
	engine.close(DialogResult.OK);	
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void populateEventControlsFromData(BedSpaceStateLiteVo voBedSpaceState)
{
	if (voBedSpaceState.getInpatientEpisode() == null)
		return;

	InpatientEpisodeLiteVo voInpatientEpisode = voBedSpaceState.getInpatientEpisode();
	populateEventControlsFromData(voInpatientEpisode);
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
private void populateEstimatedDischargeTabFromData()
{
	InpatientEpisodeLiteVo voInpatEpis = null;
	BedSpaceStateLiteVo voBedSpaceStateLite = form.getGlobalContext().Core.getSelectedBedSpaceState();
	if (voBedSpaceStateLite != null)
		voInpatEpis = voBedSpaceStateLite.getInpatientEpisode();
	else if(form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull())
		voInpatEpis = form.getGlobalContext().Core.getSelectedWaitingAreaPatient();
	
	if (voInpatEpis == null)
		throw new CodingRuntimeException("voInpatEpis is null in method populateEstimatedDischargeTabFromData");

	form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().setValue(voInpatEpis.getEstDischargeDate());

	//WDEV-13324
	form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(false);
	if ((voInpatEpis.getEstDischargeDate() != null && voInpatEpis.isDischargeDueWithin24Hrs()) || (voInpatEpis.getIsConfirmedDischargeIsNotNull() && voInpatEpis.getIsConfirmedDischarge()))
		form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(true);
	
	form.lyrDetail().tabEstimatedDischarge().chkConfirm().setValue(voInpatEpis.getIsConfirmedDischarge());
	
	//WDEV-12957
	if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO"))
	{
		form.lyrDetail().tabEstimatedDischarge().dteDischargeReady().setValue(voInpatEpis.getDischargeReadyDate());
		form.lyrDetail().tabEstimatedDischarge().btnClearEstimate().setVisible(false); //WDEV-13130
	}
	
	//WDEV-14608
	if (form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().getValue() != null)
	{
		Date newRevisedDate = new Date();
		newRevisedDate.addDay(1);

		if (!form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().getValue().isLessOrEqualThan(newRevisedDate))
		{
			form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(false);
		}
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 5 votes
@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 10
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private void populateEventControlsFromData(BedSpaceStateLiteVo voBedSpaceState)
{
	if (voBedSpaceState.getInpatientEpisode() == null)
		return;

	InpatientEpisodeLiteVo voInpatientEpisode = voBedSpaceState.getInpatientEpisode();
	populateEventControlsFromData(voInpatientEpisode);
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
private void populateEstimatedDischargeTabFromData()
{
	InpatientEpisodeLiteVo voInpatEpis = null;
	BedSpaceStateLiteVo voBedSpaceStateLite = form.getGlobalContext().Core.getSelectedBedSpaceState();
	if (voBedSpaceStateLite != null)
		voInpatEpis = voBedSpaceStateLite.getInpatientEpisode();
	else if(form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull())
		voInpatEpis = form.getGlobalContext().Core.getSelectedWaitingAreaPatient();
	
	if (voInpatEpis == null)
		throw new CodingRuntimeException("voInpatEpis is null in method populateEstimatedDischargeTabFromData");

	form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().setValue(voInpatEpis.getEstDischargeDate());

	//WDEV-13324
	form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(false);
	if ((voInpatEpis.getEstDischargeDate() != null && voInpatEpis.isDischargeDueWithin24Hrs()) || (voInpatEpis.getIsConfirmedDischargeIsNotNull() && voInpatEpis.getIsConfirmedDischarge()))
		form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(true);
	
	form.lyrDetail().tabEstimatedDischarge().chkConfirm().setValue(voInpatEpis.getIsConfirmedDischarge());
	
	//WDEV-12957
	if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO"))
	{
		form.lyrDetail().tabEstimatedDischarge().dteDischargeReady().setValue(voInpatEpis.getDischargeReadyDate());
		form.lyrDetail().tabEstimatedDischarge().btnClearEstimate().setVisible(false); //WDEV-13130
	}
	
	//WDEV-14608
	if (form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().getValue() != null)
	{
		Date newRevisedDate = new Date();
		newRevisedDate.addDay(1);

		if (!form.lyrDetail().tabEstimatedDischarge().dteEstDischarge().getValue().isLessOrEqualThan(newRevisedDate))
		{
			form.lyrDetail().tabEstimatedDischarge().chkConfirm().setVisible(false);
		}
	}
}
 
Example 12
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 5 votes
@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   File: Logic.java   Source Code and License Vote up 4 votes
private void initiateDischarge()
{
	InpatientEpisodeLiteVo voInpat = null;
	AdmissionDetailVo currentAdmissionDetail = form.getLocalContext().getAdmissionDetails();
	
	if (form.getGlobalContext().Core.getSelectedBedSpaceStateIsNotNull())
	{
		BedSpaceStateLiteVo voBedSpaceState = (BedSpaceStateLiteVo) form.getGlobalContext().Core.getSelectedBedSpaceState().clone();
		voInpat = voBedSpaceState.getInpatientEpisode();
	}
	else if (form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull())
		voInpat = form.getGlobalContext().Core.getSelectedWaitingAreaPatient();
	else throw new CodingRuntimeException("Check GC population");

	boolean uiValidationForDischarge = getUIValidationForDischarge();
	if (!uiValidationForDischarge)
		return;

	PatientElectiveListBedAdmissionVo patientElectiveList = null;
	if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()))
	{
		patientElectiveList = domain.getPatientElectiveListForDischarge(voInpat.getPasEvent());

		if (patientElectiveList != null)
		{
			patientElectiveList = populatePatientElectiveListForDischarge(voInpat, patientElectiveList);

			form.getLocalContext().setPatientElectiveListDischarge(patientElectiveList);
		}
		
		//WDEV-18454
		if (voInpat.getPasEvent() != null && (patientElectiveList != null || (currentAdmissionDetail != null && currentAdmissionDetail.getMethodOfAdmission() != null && MethodOfAdmission.EMERGENCY.getID() == currentAdmissionDetail.getMethodOfAdmission().getID())) && Boolean.TRUE.equals(domain.hasElectiveListsToRemove(form.getGlobalContext().Core.getPatientShort(), patientElectiveList, voInpat.getPasEvent().getSpecialty())))
		{
			//form.getLocalContext().setInpatientEpisodeSpecialty(voInpat.getPasEvent().getSpecialty());
			form.getLocalContext().setMessageBoxPELCheck(engine.showMessage("The patient has other Elective List/TCI records for this service. Please review these records.", "Info", MessageButtons.OK, MessageIcon.INFORMATION));
			return;
		}

	}//WDEV-22448
	if (dischargePatient(patientElectiveList, null, form.getLocalContext().getbCancelPatientAppointments(), currentAdmissionDetail))
	{			
		engine.close(DialogResult.OK);
	}
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
private void populateEstimatedDischargeTabFromData()
{
	InpatientEpisodeLiteVo voInpatEpis = null;
	BedSpaceStateLiteVo voBedSpaceStateLite = form.getGlobalContext().Core.getSelectedBedSpaceState() != null && form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode() != null ? domain.getBedSpaceStateByInpatientEpisode(form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode()) : null; // WDEV-17662
	if (voBedSpaceStateLite != null)
		voInpatEpis = voBedSpaceStateLite.getInpatientEpisode();
	else if(form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull())
		voInpatEpis = form.getGlobalContext().Core.getSelectedWaitingAreaPatient();

	if (voInpatEpis == null)
		throw new CodingRuntimeException("voInpatEpis is null in method populateEstimatedDischargeTabFromData");

	if (ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"))
	{
		populateExtendedDetailsControlsFromData(voInpatEpis, form.getLocalContext().getAdmissionDetails());
	}
	else
	{	
		form.lyrDetail().tabReadyForDischarge().dteEstDischarge().setValue(voInpatEpis.getEstDischargeDateIsNotNull() ? voInpatEpis.getEstDischargeDate().getDate() : null);

		//WDEV-13324
		form.lyrDetail().tabReadyForDischarge().chkConfirm().setVisible(false);
		if ((voInpatEpis.getEstDischargeDate() != null && voInpatEpis.isDischargeDueWithin24Hrs()) || (voInpatEpis.getIsConfirmedDischargeIsNotNull() && voInpatEpis.getIsConfirmedDischarge()))
			form.lyrDetail().tabReadyForDischarge().chkConfirm().setVisible(true);

		form.lyrDetail().tabReadyForDischarge().chkConfirm().setValue(voInpatEpis.getIsConfirmedDischarge());

		//WDEV-12957
		if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO"))
		{
			form.lyrDetail().tabReadyForDischarge().dteDischargeReady().setValue(voInpatEpis.getDischargeReadyDate());

		}
		if (ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO"))
		{
			form.lyrDetail().tabReadyForDischarge().btnClearEstimate().setVisible(false); //WDEV-13130
		}

		//WDEV-14608
		if (form.lyrDetail().tabReadyForDischarge().dteEstDischarge().getValue() != null)
		{
			Date newRevisedDate = new Date();
			newRevisedDate.addDay(1);

			if (!form.lyrDetail().tabReadyForDischarge().dteEstDischarge().getValue().isLessOrEqualThan(newRevisedDate))
			{
				form.lyrDetail().tabReadyForDischarge().chkConfirm().setVisible(false);
			}
		}
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
@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())});
}