Java Code Examples for ims.clinical.vo.InpatientEpisodeForVTERiskAsessmentVo

The following are top voted examples for showing how to use ims.clinical.vo.InpatientEpisodeForVTERiskAsessmentVo. 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 populateDementiaAndVteLabels()
{
	boolean areVteLabelsVisible = (Boolean.TRUE.equals(ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue()) && form.getGlobalContext().Core.getCurrentCareContext() != null && form.getGlobalContext().Core.getCurrentCareContext().getPasEvent() != null);
	form.lblDementiaLabel().setVisible(false);
	form.lblDementiaStatus().setVisible(false);
	
	//WDEV-16745
	form.lblVteLabel().setVisible(areVteLabelsVisible);
	form.lblVteStatus().setVisible(areVteLabelsVisible);
	
	if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()
		&& form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull())
	{
		form.getLocalContext().setDementiaStatus(domain.getDementiaStatus(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent()));
		form.lblDementiaLabel().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());
		form.lblDementiaStatus().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());
		form.lblDementiaStatus().setValue(form.getLocalContext().getDementiaStatusIsNotNull() && form.getLocalContext().getDementiaStatus().getCurrentWorklistStatusIsNotNull() ? form.getLocalContext().getDementiaStatus().getCurrentWorklistStatus().getStatus().getText() : "");
		
		InpatientEpisodeForVTERiskAsessmentVo inpatientEpisode = domain.getVteStatus(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent().getID_PASEvent());
		form.lblVteStatus().setValue((inpatientEpisode != null && inpatientEpisode.getVTEAssessmentStatus() != null) ? inpatientEpisode.getVTEAssessmentStatus().getIItemText(): "Not Required");
	}
}
 
Example 2
Project: AvoinApotti   File: VTERiskAssessmentImpl.java   Source Code and License 6 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatientEpisodes( PASEventRefVo pasRefVo) 
{
	if(pasRefVo == null )
		throw new CodingRuntimeException("Pas Event not provided");
	
	DomainFactory factory = getDomainFactory();
	List inpat = factory.find("select i1_1 from InpatientEpisode as i1_1 left join i1_1.pasEvent as p1_1 where p1_1.id =:idPasEvent", new String[] {"idPasEvent"}, new Object[] {pasRefVo.getID_PASEvent()});
	 
	
	if( inpat != null && inpat.size() > 0)
	{
		InpatientEpisodeForVTERiskAsessmentVoCollection tempColl = InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(inpat).sort(SortOrder.DESCENDING);
		if(tempColl != null && tempColl.size() > 0)
			return tempColl.get(0);
		
	}
	return null;
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDementiaAndVteLabels()
{
	boolean areVteLabelsVisible = (Boolean.TRUE.equals(ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue()) && form.getGlobalContext().Core.getCurrentCareContext() != null && form.getGlobalContext().Core.getCurrentCareContext().getPasEvent() != null);
	form.lblDementiaLabel().setVisible(false);
	form.lblDementiaStatus().setVisible(false);
	form.imbDementia().setVisible(false);		//wdev-18785
	
	//WDEV-16745
	form.lblVteLabel().setVisible(areVteLabelsVisible);
	form.lblVteStatus().setVisible(areVteLabelsVisible);
	
	if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()
		&& form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull())
	{
		form.getLocalContext().setDementiaStatus(domain.getDementiaStatus(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent()));
		form.lblDementiaLabel().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());
		form.lblDementiaStatus().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());
		form.lblDementiaStatus().setValue(form.getLocalContext().getDementiaStatusIsNotNull() && form.getLocalContext().getDementiaStatus().getCurrentWorklistStatusIsNotNull() ? form.getLocalContext().getDementiaStatus().getCurrentWorklistStatus().getStatus().getText() : "");
		form.imbDementia().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());		//wdev-18785
		
		InpatientEpisodeForVTERiskAsessmentVo inpatientEpisode = domain.getVteStatus(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent().getID_PASEvent());
		form.lblVteStatus().setValue((inpatientEpisode != null && inpatientEpisode.getVTEAssessmentStatus() != null) ? inpatientEpisode.getVTEAssessmentStatus().getIItemText(): "Not Required");
	}
}
 
Example 4
Project: openMAXIMS   File: VTERiskAssessmentImpl.java   Source Code and License 6 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatientEpisodes( PASEventRefVo pasRefVo) 
{
	if(pasRefVo == null )
		throw new CodingRuntimeException("Pas Event not provided");
	
	DomainFactory factory = getDomainFactory();
	List inpat = factory.find("select i1_1 from InpatientEpisode as i1_1 left join i1_1.pasEvent as p1_1 where p1_1.id =:idPasEvent", new String[] {"idPasEvent"}, new Object[] {pasRefVo.getID_PASEvent()});
	 
	
	if( inpat != null && inpat.size() > 0)
	{
		InpatientEpisodeForVTERiskAsessmentVoCollection tempColl = InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(inpat).sort(SortOrder.DESCENDING);
		if(tempColl != null && tempColl.size() > 0)
			return tempColl.get(0);
		
	}
	return null;
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDementiaAndVteLabels()
{
	boolean areVteLabelsVisible = (Boolean.TRUE.equals(ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue()) && form.getGlobalContext().Core.getCurrentCareContext() != null && form.getGlobalContext().Core.getCurrentCareContext().getPasEvent() != null);
	form.lblDementiaLabel().setVisible(false);
	form.lblDementiaStatus().setVisible(false);
	
	//WDEV-16745
	form.lblVteLabel().setVisible(areVteLabelsVisible);
	form.lblVteStatus().setVisible(areVteLabelsVisible);
	
	if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()
		&& form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull())
	{
		form.getLocalContext().setDementiaStatus(domain.getDementiaStatus(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent()));
		form.lblDementiaLabel().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());
		form.lblDementiaStatus().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());
		form.lblDementiaStatus().setValue(form.getLocalContext().getDementiaStatusIsNotNull() && form.getLocalContext().getDementiaStatus().getCurrentWorklistStatusIsNotNull() ? form.getLocalContext().getDementiaStatus().getCurrentWorklistStatus().getStatus().getText() : "");
		
		InpatientEpisodeForVTERiskAsessmentVo inpatientEpisode = domain.getVteStatus(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent().getID_PASEvent());
		form.lblVteStatus().setValue((inpatientEpisode != null && inpatientEpisode.getVTEAssessmentStatus() != null) ? inpatientEpisode.getVTEAssessmentStatus().getIItemText(): "Not Required");
	}
}
 
Example 6
Project: openMAXIMS   File: VTERiskAssessmentImpl.java   Source Code and License 6 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatientEpisodes( PASEventRefVo pasRefVo) 
{
	if(pasRefVo == null )
		throw new CodingRuntimeException("Pas Event not provided");
	
	DomainFactory factory = getDomainFactory();
	List inpat = factory.find("select i1_1 from InpatientEpisode as i1_1 left join i1_1.pasEvent as p1_1 where p1_1.id =:idPasEvent", new String[] {"idPasEvent"}, new Object[] {pasRefVo.getID_PASEvent()});
	 
	
	if( inpat != null && inpat.size() > 0)
	{
		InpatientEpisodeForVTERiskAsessmentVoCollection tempColl = InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(inpat).sort(SortOrder.DESCENDING);
		if(tempColl != null && tempColl.size() > 0)
			return tempColl.get(0);
		
	}
	return null;
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDementiaAndVteLabels()
{
	boolean areVteLabelsVisible = (Boolean.TRUE.equals(ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue()) && form.getGlobalContext().Core.getCurrentCareContext() != null && form.getGlobalContext().Core.getCurrentCareContext().getPasEvent() != null);
	form.lblDementiaLabel().setVisible(false);
	form.lblDementiaStatus().setVisible(false);
	
	//WDEV-16745
	form.lblVteLabel().setVisible(areVteLabelsVisible);
	form.lblVteStatus().setVisible(areVteLabelsVisible);
	
	if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()
		&& form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull())
	{
		form.getLocalContext().setDementiaStatus(domain.getDementiaStatus(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent()));
		form.lblDementiaLabel().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());
		form.lblDementiaStatus().setVisible(form.getLocalContext().getDementiaStatusIsNotNull());
		form.lblDementiaStatus().setValue(form.getLocalContext().getDementiaStatusIsNotNull() && form.getLocalContext().getDementiaStatus().getCurrentWorklistStatusIsNotNull() ? form.getLocalContext().getDementiaStatus().getCurrentWorklistStatus().getStatus().getText() : "");
		
		InpatientEpisodeForVTERiskAsessmentVo inpatientEpisode = domain.getVteStatus(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent().getID_PASEvent());
		form.lblVteStatus().setValue((inpatientEpisode != null && inpatientEpisode.getVTEAssessmentStatus() != null) ? inpatientEpisode.getVTEAssessmentStatus().getIItemText(): "Not Required");
	}
}
 
Example 8
Project: openmaxims-linux   File: VTERiskAssessmentImpl.java   Source Code and License 6 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatientEpisodes( PASEventRefVo pasRefVo) 
{
	if(pasRefVo == null )
		throw new CodingRuntimeException("Pas Event not provided");
	
	DomainFactory factory = getDomainFactory();
	List inpat = factory.find("select i1_1 from InpatientEpisode as i1_1 left join i1_1.pasEvent as p1_1 where p1_1.id =:idPasEvent", new String[] {"idPasEvent"}, new Object[] {pasRefVo.getID_PASEvent()});
	 
	
	if( inpat != null && inpat.size() > 0)
	{
		InpatientEpisodeForVTERiskAsessmentVoCollection tempColl = InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(inpat).sort(SortOrder.DESCENDING);
		if(tempColl != null && tempColl.size() > 0)
			return tempColl.get(0);
		
	}
	return null;
}
 
Example 9
Project: AvoinApotti   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatEpisodeForVTERiskAssessment( InpatientEpisodeRefVo inpatEpRef) 
{
	if(	inpatEpRef == null )
		return null;
	
	DomainFactory factory = getDomainFactory();
	InpatientEpisode doInpatientEpisode  =(InpatientEpisode) factory.getDomainObject(InpatientEpisode.class, inpatEpRef.getID_InpatientEpisode());
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.create(doInpatientEpisode);
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void getEpisode()//WDEV-15414 
{
	if( form.getGlobalContext().Core.getCurrentCareContext() == null)
		form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
	else
	{
		if(form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull())
		{
			InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatientEpisodes(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent());
			if(tempVo != null)
			{
				form.getLocalContext().setInpatientEpisode(tempVo);
				form.getLocalContext().setDischargeEpisode(null);//WDEV-15414 
			}
			else//WDEV-15414 
			{
				DischargedEpisodeForVTERiskAssessmentWorklistVo dis = domain.getDischargeEpisode(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent());
				
				if(dis != null)
				{
					form.getLocalContext().setInpatientEpisode(null);
					form.getLocalContext().setDischargeEpisode(dis);
				}
				else
				{
					form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
				}
			}
				
		}
		else
		{
			form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
		}		
	}
}
 
Example 11
Project: AvoinApotti   File: VTERiskAssessmentImpl.java   Source Code and License 5 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo saveInpatientEpisode(InpatientEpisodeForVTERiskAsessmentVo inpatientEpisode) throws StaleObjectException, UniqueKeyViolationException 
{
	if (inpatientEpisode == null)
	{
		throw new DomainRuntimeException("Inpatient Episode cannot be null");
	}

	DomainFactory factory = getDomainFactory();
	InpatientEpisode doInpatientEpisode = InpatientEpisodeForVTERiskAsessmentVoAssembler.extractInpatientEpisode(factory, inpatientEpisode);
	factory.save(doInpatientEpisode);
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.create(doInpatientEpisode);
}
 
Example 12
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatEpisodeForVTERiskAssessment( InpatientEpisodeRefVo inpatEpRef) 
{
	if(	inpatEpRef == null )
		return null;
	
	DomainFactory factory = getDomainFactory();
	InpatientEpisode doInpatientEpisode  =(InpatientEpisode) factory.getDomainObject(InpatientEpisode.class, inpatEpRef.getID_InpatientEpisode());
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.create(doInpatientEpisode);
}
 
Example 13
Project: openMAXIMS   File: VTERiskAssessmentImpl.java   Source Code and License 5 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo saveInpatientEpisode(InpatientEpisodeForVTERiskAsessmentVo inpatientEpisode) throws StaleObjectException, UniqueKeyViolationException 
{
	if (inpatientEpisode == null)
	{
		throw new DomainRuntimeException("Inpatient Episode cannot be null");
	}

	DomainFactory factory = getDomainFactory();
	InpatientEpisode doInpatientEpisode = InpatientEpisodeForVTERiskAsessmentVoAssembler.extractInpatientEpisode(factory, inpatientEpisode);
	factory.save(doInpatientEpisode);
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.create(doInpatientEpisode);
}
 
Example 14
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatEpisodeForVTERiskAssessment( InpatientEpisodeRefVo inpatEpRef) 
{
	if(	inpatEpRef == null )
		return null;
	
	DomainFactory factory = getDomainFactory();
	InpatientEpisode doInpatientEpisode  =(InpatientEpisode) factory.getDomainObject(InpatientEpisode.class, inpatEpRef.getID_InpatientEpisode());
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.create(doInpatientEpisode);
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void getEpisode()//WDEV-15414 
{
	if( form.getGlobalContext().Core.getCurrentCareContext() == null)
		form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
	else
	{
		if(form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull())
		{
			InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatientEpisodes(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent());
			if(tempVo != null)
			{
				form.getLocalContext().setInpatientEpisode(tempVo);
				form.getLocalContext().setDischargeEpisode(null);//WDEV-15414 
			}
			else//WDEV-15414 
			{
				DischargedEpisodeForVTERiskAssessmentWorklistVo dis = domain.getDischargeEpisode(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent());
				
				if(dis != null)
				{
					form.getLocalContext().setInpatientEpisode(null);
					form.getLocalContext().setDischargeEpisode(dis);
				}
				else
				{
					form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
				}
			}
				
		}
		else
		{
			form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
		}		
	}
}
 
Example 16
Project: openMAXIMS   File: VTERiskAssessmentImpl.java   Source Code and License 5 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo saveInpatientEpisode(InpatientEpisodeForVTERiskAsessmentVo inpatientEpisode) throws StaleObjectException, UniqueKeyViolationException 
{
	if (inpatientEpisode == null)
	{
		throw new DomainRuntimeException("Inpatient Episode cannot be null");
	}

	DomainFactory factory = getDomainFactory();
	InpatientEpisode doInpatientEpisode = InpatientEpisodeForVTERiskAsessmentVoAssembler.extractInpatientEpisode(factory, inpatientEpisode);
	factory.save(doInpatientEpisode);
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.create(doInpatientEpisode);
}
 
Example 17
Project: openmaxims-linux   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatEpisodeForVTERiskAssessment( InpatientEpisodeRefVo inpatEpRef) 
{
	if(	inpatEpRef == null )
		return null;
	
	DomainFactory factory = getDomainFactory();
	InpatientEpisode doInpatientEpisode  =(InpatientEpisode) factory.getDomainObject(InpatientEpisode.class, inpatEpRef.getID_InpatientEpisode());
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.create(doInpatientEpisode);
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void getEpisode()//WDEV-15414 
{
	if( form.getGlobalContext().Core.getCurrentCareContext() == null)
		form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
	else
	{
		if(form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull())
		{
			InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatientEpisodes(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent());
			if(tempVo != null)
			{
				form.getLocalContext().setInpatientEpisode(tempVo);
				form.getLocalContext().setDischargeEpisode(null);//WDEV-15414 
			}
			else//WDEV-15414 
			{
				DischargedEpisodeForVTERiskAssessmentWorklistVo dis = domain.getDischargeEpisode(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent());
				
				if(dis != null)
				{
					form.getLocalContext().setInpatientEpisode(null);
					form.getLocalContext().setDischargeEpisode(dis);
				}
				else
				{
					form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
				}
			}
				
		}
		else
		{
			form.getLocalContext().setReadOnlyForm(Boolean.TRUE);				//the form is redonly
		}		
	}
}
 
Example 19
Project: openmaxims-linux   File: VTERiskAssessmentImpl.java   Source Code and License 5 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo saveInpatientEpisode(InpatientEpisodeForVTERiskAsessmentVo inpatientEpisode) throws StaleObjectException, UniqueKeyViolationException 
{
	if (inpatientEpisode == null)
	{
		throw new DomainRuntimeException("Inpatient Episode cannot be null");
	}

	DomainFactory factory = getDomainFactory();
	InpatientEpisode doInpatientEpisode = InpatientEpisodeForVTERiskAsessmentVoAssembler.extractInpatientEpisode(factory, inpatientEpisode);
	factory.save(doInpatientEpisode);
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.create(doInpatientEpisode);
}
 
Example 20
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
protected void onBtnVTERiskAssesssmentClick() throws PresentationLogicException 
{
	form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo(domain.getVTERiskAssessmentWorklistById(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()));
	InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatEpisodeForVTERiskAssessment(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()); //wdev-14858
			
	form.getGlobalContext().Core.setCreateVTERiskAssessmentOnDischarge(Boolean.TRUE);
	if(	tempVo == null )	
	{
								
		if(	form.getGlobalContext().Core.getVTERiskAssessmentShortVoIsNotNull() && form.getGlobalContext().Core.getInpatientEpisodeForVTERiskAssessmentWorklistVoIsNotNull()) //WDEV-16200
		{
			
			form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
			engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
			
		}
		else
		{
			
			form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(null);
			form.getGlobalContext().Core.setVTERiskAssessmentShortVo(new VTERiskAssessmentShortVo());
			
			if (form.getGlobalContext().Core.getDischargeEpisodeBedInfoIsNotNull()) //WDEV-16200
			{
				if (form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEventIsNotNull())
				{
					form.getGlobalContext().Core.setDischargeEpisodeBedInfo(domain.getDischargedEpisodeADT(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEvent()));
				}
				
				if (VTEAsessmentStatus.REQUIRED.equals(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getVTEAssessmentStatus()))
				{
					engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.EDIT });
				}
				else
				{
					engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
				}
			}
			else
			{
				engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
			}
		}
	}
	else if(tempVo.getVTERiskAssessment() == null)
	{
		form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
		form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
		engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
	}
	else if( tempVo != null && tempVo.getVTERiskAssessmentIsNotNull())
	{
		form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
		form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
		engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
		
	}
		
	
	
}
 
Example 21
Project: AvoinApotti   File: EDischargePreViewComponentImpl.java   Source Code and License 4 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getVteStatus(Integer pasId)
{
	if (pasId == null)
		throw new CodingRuntimeException("Cannot get VTE Status on null pasEvent ID");

	DomainFactory factory = getDomainFactory();

	String hql = "select inp from InpatientEpisode as inp left join inp.pasEvent as pasEv where pasEv.id = :pasID"; 

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();

	markers.add("pasID");
	values.add(pasId);

	List<?> list = factory.find(hql.toString(), markers, values);

	if (list == null || list.size() == 0)
		return null;
	
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(list).get(0);
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
protected void onBtnVTERiskAssesssmentClick() throws PresentationLogicException 
{
	form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo(domain.getVTEForInpatient(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()));
	InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatEpisodeForVTERiskAssessment(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()); //wdev-14858
			
	form.getGlobalContext().Core.setCreateVTERiskAssessmentOnDischarge(Boolean.TRUE);
	if(	tempVo == null )	
	{
								
		if(	form.getGlobalContext().Core.getVTERiskAssessmentShortVoIsNotNull() && form.getGlobalContext().Core.getInpatientEpisodeForVTERiskAssessmentWorklistVoIsNotNull()) //WDEV-16200
		{
			
			form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
			engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
			
		}
		else
		{
			
			form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(null);
			form.getGlobalContext().Core.setVTERiskAssessmentShortVo(new VTERiskAssessmentShortVo());
			
			if (form.getGlobalContext().Core.getDischargeEpisodeBedInfoIsNotNull()) //WDEV-16200
			{
				if (form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEventIsNotNull())
				{
					form.getGlobalContext().Core.setDischargeEpisodeBedInfo(domain.getDischargedEpisodeADT(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEvent()));
				}
				
				if (VTEAsessmentStatus.REQUIRED.equals(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getVTEAssessmentStatus()))
				{
					engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.EDIT });
				}
				else
				{
					engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
				}
			}
			else
			{
				engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
			}
		}
	}
	else if(tempVo.getVTERiskAssessment() == null && VTEAsessmentStatus.REQUIRED.equals(tempVo.getVTEAssessmentStatus())) //WDEV-22218
	{
		form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
		form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
		engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.EDIT});
	}
	else if( tempVo != null && tempVo.getVTERiskAssessmentIsNotNull())
	{
		form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
		form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
		engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
		
	}
		
	
	
}
 
Example 23
Project: openMAXIMS   File: VTERiskAssessmentImpl.java   Source Code and License 4 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatientEpisode(PatientRefVo patient)
{
	if (patient == null)
		throw new DomainRuntimeException("Cannot get Patient on null Id.");

	DomainFactory factory = getDomainFactory();

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();

	String hql = " select ip from InpatientEpisode as ip left join ip.pasEvent as pasEvent left join pasEvent.patient as patient where patient.id = :patientId";

	markers.add("patientId");
	values.add(patient.getID_Patient());

	List<?> list = factory.find(hql, markers, values);

	if (list != null && list.size() > 0)
		return 	InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(list).get(0);
	
	return null;
}
 
Example 24
Project: openMAXIMS   File: VTERiskAssessmentImpl.java   Source Code and License 4 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getInpatientEpisodeForRecord(VTERiskAssessmentRefVo vteAssessmentRef, PatientRefVo patientRef)
{
	if (patientRef == null || vteAssessmentRef == null)
		return null;

	DomainFactory factory = getDomainFactory();

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();

	String hql = " select inpatEp from InpatientEpisode as inpatEp left join inpatEp.pasEvent as pasEv left join pasEv.patient as pat left join inpatEp.vTERiskAssessment as vte where pat.id = :patientID and vte.id = :vteID";

	markers.add("patientID");
	values.add(patientRef.getID_Patient());

	markers.add("vteID");
	values.add(vteAssessmentRef.getID_VTERiskAssessment());
	
	List<?> list = factory.find(hql, markers, values);

	if (list != null && list.size() > 0)
		return 	InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(list).get(0);
	
	return null;
}
 
Example 25
Project: openMAXIMS   File: EDischargePreViewComponentImpl.java   Source Code and License 4 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getVteStatus(Integer pasId)
{
	if (pasId == null)
		throw new CodingRuntimeException("Cannot get VTE Status on null pasEvent ID");

	DomainFactory factory = getDomainFactory();

	String hql = "select inp from InpatientEpisode as inp left join inp.pasEvent as pasEv where pasEv.id = :pasID"; 

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();

	markers.add("pasID");
	values.add(pasId);

	List<?> list = factory.find(hql.toString(), markers, values);

	if (list == null || list.size() == 0)
		return null;
	
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(list).get(0);
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
protected void onBtnVTERiskAssesssmentClick() throws PresentationLogicException 
{
	form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo(domain.getVTERiskAssessmentWorklistById(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()));
	InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatEpisodeForVTERiskAssessment(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()); //wdev-14858
			
	form.getGlobalContext().Core.setCreateVTERiskAssessmentOnDischarge(Boolean.TRUE);
	if(	tempVo == null )	
	{
								
		if(	form.getGlobalContext().Core.getVTERiskAssessmentShortVoIsNotNull() && form.getGlobalContext().Core.getInpatientEpisodeForVTERiskAssessmentWorklistVoIsNotNull()) //WDEV-16200
		{
			
			form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
			engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
			
		}
		else
		{
			
			form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(null);
			form.getGlobalContext().Core.setVTERiskAssessmentShortVo(new VTERiskAssessmentShortVo());
			
			if (form.getGlobalContext().Core.getDischargeEpisodeBedInfoIsNotNull()) //WDEV-16200
			{
				if (form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEventIsNotNull())
				{
					form.getGlobalContext().Core.setDischargeEpisodeBedInfo(domain.getDischargedEpisodeADT(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEvent()));
				}
				
				if (VTEAsessmentStatus.REQUIRED.equals(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getVTEAssessmentStatus()))
				{
					engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.EDIT });
				}
				else
				{
					engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
				}
			}
			else
			{
				engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
			}
		}
	}
	else if(tempVo.getVTERiskAssessment() == null)
	{
		form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
		form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
		engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
	}
	else if( tempVo != null && tempVo.getVTERiskAssessmentIsNotNull())
	{
		form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
		form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
		engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
		
	}
		
	
	
}
 
Example 27
Project: openMAXIMS   File: EDischargePreViewComponentImpl.java   Source Code and License 4 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getVteStatus(Integer pasId)
{
	if (pasId == null)
		throw new CodingRuntimeException("Cannot get VTE Status on null pasEvent ID");

	DomainFactory factory = getDomainFactory();

	String hql = "select inp from InpatientEpisode as inp left join inp.pasEvent as pasEv where pasEv.id = :pasID"; 

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();

	markers.add("pasID");
	values.add(pasId);

	List<?> list = factory.find(hql.toString(), markers, values);

	if (list == null || list.size() == 0)
		return null;
	
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(list).get(0);
}
 
Example 28
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
protected void onBtnVTERiskAssesssmentClick() throws PresentationLogicException 
{
	form.getGlobalContext().Core.setInpatientEpisodeForVTERiskAssessmentWorklistVo(domain.getVTERiskAssessmentWorklistById(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()));
	InpatientEpisodeForVTERiskAsessmentVo tempVo = domain.getInpatEpisodeForVTERiskAssessment(form.getLocalContext().getInpatientEpForVTERiskAssessmentVo()); //wdev-14858
			
	form.getGlobalContext().Core.setCreateVTERiskAssessmentOnDischarge(Boolean.TRUE);
	if(	tempVo == null )	
	{
								
		if(	form.getGlobalContext().Core.getVTERiskAssessmentShortVoIsNotNull() && form.getGlobalContext().Core.getInpatientEpisodeForVTERiskAssessmentWorklistVoIsNotNull()) //WDEV-16200
		{
			
			form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
			engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
			
		}
		else
		{
			
			form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(null);
			form.getGlobalContext().Core.setVTERiskAssessmentShortVo(new VTERiskAssessmentShortVo());
			
			if (form.getGlobalContext().Core.getDischargeEpisodeBedInfoIsNotNull()) //WDEV-16200
			{
				if (form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEventIsNotNull())
				{
					form.getGlobalContext().Core.setDischargeEpisodeBedInfo(domain.getDischargedEpisodeADT(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getPasEvent()));
				}
				
				if (VTEAsessmentStatus.REQUIRED.equals(form.getGlobalContext().Core.getDischargeEpisodeBedInfo().getVTEAssessmentStatus()))
				{
					engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.EDIT });
				}
				else
				{
					engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
				}
			}
			else
			{
				engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] { FormMode.VIEW });
			}
		}
	}
	else if(tempVo.getVTERiskAssessment() == null)
	{
		form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
		form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
		engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
	}
	else if( tempVo != null && tempVo.getVTERiskAssessmentIsNotNull())
	{
		form.getGlobalContext().Core.setVTERiskAssessmentShortVo(null);
		form.getGlobalContext().Core.setEditVTERiskAssessmentFromInpatientEpisode(true);
		engine.open(form.getForms().Clinical.VTERiskAssessmentDialog, new Object[] {FormMode.VIEW});
		
	}
		
	
	
}
 
Example 29
Project: openmaxims-linux   File: EDischargePreViewComponentImpl.java   Source Code and License 4 votes vote down vote up
public InpatientEpisodeForVTERiskAsessmentVo getVteStatus(Integer pasId)
{
	if (pasId == null)
		throw new CodingRuntimeException("Cannot get VTE Status on null pasEvent ID");

	DomainFactory factory = getDomainFactory();

	String hql = "select inp from InpatientEpisode as inp left join inp.pasEvent as pasEv where pasEv.id = :pasID"; 

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Object> values = new ArrayList<Object>();

	markers.add("pasID");
	values.add(pasId);

	List<?> list = factory.find(hql.toString(), markers, values);

	if (list == null || list.size() == 0)
		return null;
	
	return InpatientEpisodeForVTERiskAsessmentVoAssembler.createInpatientEpisodeForVTERiskAsessmentVoCollectionFromInpatientEpisode(list).get(0);
}