Java Code Examples for ims.core.vo.domain.DischargedEpisodeADTVoAssembler

The following are top voted examples for showing how to use ims.core.vo.domain.DischargedEpisodeADTVoAssembler. 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: BedInfoDialogImpl.java   Source Code and License 6 votes vote down vote up
public DischargedEpisodeADTVo getDischargedEpisodeADT(PASEventRefVo pasEventRef)
{
	if (pasEventRef == null)
		throw new CodingRuntimeException("Cannot get DischargeEpisode on null PASEventRef");

	DomainFactory factory = getDomainFactory();
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	String query = "SELECT dis FROM DischargedEpisode AS dis LEFT JOIN dis.pasEvent AS pasev WHERE pasev.id = :ID_PASEV";
	
	paramNames.add("ID_PASEV");
	paramValues.add(pasEventRef.getID_PASEvent());
	
	DischargedEpisodeADTVoCollection dischargeEpisode = DischargedEpisodeADTVoAssembler.createDischargedEpisodeADTVoCollectionFromDischargedEpisode(factory.find(query.toString(), paramNames, paramValues));
	
	if (dischargeEpisode != null && dischargeEpisode.size() > 0)
	{
		return dischargeEpisode.get(0);
	}
	
	return null;
}
 
Example 2
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 6 votes vote down vote up
public DischargedEpisodeADTVo getDischargedEpisodeADT(PASEventRefVo pasEventRef)
{
	if (pasEventRef == null)
		throw new CodingRuntimeException("Cannot get DischargeEpisode on null PASEventRef");

	DomainFactory factory = getDomainFactory();
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	String query = "SELECT dis FROM DischargedEpisode AS dis LEFT JOIN dis.pasEvent AS pasev WHERE pasev.id = :ID_PASEV";
	
	paramNames.add("ID_PASEV");
	paramValues.add(pasEventRef.getID_PASEvent());
	
	DischargedEpisodeADTVoCollection dischargeEpisode = DischargedEpisodeADTVoAssembler.createDischargedEpisodeADTVoCollectionFromDischargedEpisode(factory.find(query.toString(), paramNames, paramValues));
	
	if (dischargeEpisode != null && dischargeEpisode.size() > 0)
	{
		return dischargeEpisode.get(0);
	}
	
	return null;
}
 
Example 3
Project: openmaxims-linux   File: BedInfoDialogImpl.java   Source Code and License 6 votes vote down vote up
public DischargedEpisodeADTVo getDischargedEpisodeADT(PASEventRefVo pasEventRef)
{
	if (pasEventRef == null)
		throw new CodingRuntimeException("Cannot get DischargeEpisode on null PASEventRef");

	DomainFactory factory = getDomainFactory();
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	String query = "SELECT dis FROM DischargedEpisode AS dis LEFT JOIN dis.pasEvent AS pasev WHERE pasev.id = :ID_PASEV";
	
	paramNames.add("ID_PASEV");
	paramValues.add(pasEventRef.getID_PASEvent());
	
	DischargedEpisodeADTVoCollection dischargeEpisode = DischargedEpisodeADTVoAssembler.createDischargedEpisodeADTVoCollectionFromDischargedEpisode(factory.find(query.toString(), paramNames, paramValues));
	
	if (dischargeEpisode != null && dischargeEpisode.size() > 0)
	{
		return dischargeEpisode.get(0);
	}
	
	return null;
}
 
Example 4
Project: openMAXIMS   File: BedInfoDialogImpl.java   Source Code and License 5 votes vote down vote up
public DischargedEpisodeADTVo getDischargedEpisodeADT(PASEventRefVo pasEventRef)
{
	if (pasEventRef == null)
		throw new CodingRuntimeException("Cannot get DischargeEpisode on null PASEventRef");

	DomainFactory factory = getDomainFactory();
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	String query = "SELECT dis FROM DischargedEpisode AS dis LEFT JOIN dis.pasEvent AS pasev WHERE pasev.id = :ID_PASEV";
	
	paramNames.add("ID_PASEV");
	paramValues.add(pasEventRef.getID_PASEvent());
	
	DischargedEpisodeADTVoCollection dischargeEpisode = DischargedEpisodeADTVoAssembler.createDischargedEpisodeADTVoCollectionFromDischargedEpisode(factory.find(query.toString(), paramNames, paramValues));
	
	if (dischargeEpisode != null && dischargeEpisode.size() > 0)
	{
		if (dischargeEpisode.get(0) != null && dischargeEpisode.get(0).getDeferredReasonIsNotNull())
		{	
			dischargeEpisode.get(0).setDeferredReasonConfig(getDeferredReason(dischargeEpisode.get(0).getDeferredReason()));
		}
		return dischargeEpisode.get(0);
	}
	
	return null;
}