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

The following are top voted examples for showing how to use ims.core.vo.domain.ConsultantStayVoAssembler. 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: openMAXIMS   File: InpatientEpisodeMaintenanceImpl.java   Source Code and License 5 votes vote down vote up
@Override
public void rIEConsultantStay(ConsultantStayVo stay, DischargedEpisodeMaintenanceVo dischargedEpisode) throws StaleObjectException{
	DomainFactory factory = getDomainFactory();
	ConsultantStay stayDom = ConsultantStayVoAssembler.extractConsultantStay(factory, stay);
	stayDom.setIsRIE(true);
	factory.save(stayDom);
	
	if(dischargedEpisode != null)
	{
		DischargedEpisode episodeDom = (DischargedEpisode) factory.getDomainObject(DischargedEpisode.class, dischargedEpisode.getID_DischargedEpisode());
		episodeDom.getAdmissionDetail().setCodingStatus(getDomLookup(CodingStatus.FORREVIEW));
		factory.save(episodeDom);
	}
}
 
Example 2
Project: AvoinApotti   File: BedAdmissionComponentImpl.java   Source Code and License 4 votes vote down vote up
public AdmissionDetailVo saveEmergencyAdmissionInElectiveCase(AdmissionDetailVo admission, CareSpellVo careSpell, CatsReferralEmergencyAdmissionVo catsReferral, BedSpaceStateLiteVo bedSpaceState, WardStayVo wardStay, ConsultantStayVo consultant) throws DomainInterfaceException, StaleObjectException
{
	if (admission == null)
		throw new CodingRuntimeException("Admission Details parameter is mandatory.");
	
	if (careSpell == null)
		throw new CodingRuntimeException("Care Spell parameter is mandatory.");
	
	if (catsReferral == null)
		throw new CodingRuntimeException("Cats Referral parameter is mandatory.");
	
	
	PatientPathwayJourneyRefVo journey = createPatientJourney(catsReferral, admission);
	catsReferral.setJourney(journey);
	
	@SuppressWarnings("rawtypes")
	HashMap domMap = new HashMap();
	AdmissionDetail domAdmissionDetail = AdmissionDetailVoAssembler.extractAdmissionDetail(getDomainFactory(), admission, domMap);
	CareSpell domCareSpell = CareSpellVoAssembler.extractCareSpell(getDomainFactory(), careSpell, domMap);
	CatsReferral domCatsReferral = CatsReferralEmergencyAdmissionVoAssembler.extractCatsReferral(getDomainFactory(), catsReferral, domMap);
	domCatsReferral.getCareContext().setPasEvent(domAdmissionDetail.getPasEvent());
	
	getDomainFactory().save(domAdmissionDetail);
	getDomainFactory().save(domCareSpell);
	getDomainFactory().save(domCatsReferral);

	InpatientEpisode inpatEpisode = new InpatientEpisode();
	inpatEpisode.setPasEvent(domAdmissionDetail.getPasEvent());
	inpatEpisode.getPasEvent().setConsultant(domAdmissionDetail.getConsultant());
	inpatEpisode.setAdmissionDateTime(domAdmissionDetail.getAdmissionDateTime());
	inpatEpisode.setEstDischargeDate(null);
	inpatEpisode.setWardType(domAdmissionDetail.getWardType());
	
	if (wardStay != null)
		inpatEpisode.getWardStays().add(WardStayVoAssembler.extractWardStay(getDomainFactory(), wardStay, domMap));
	if (consultant != null)
		inpatEpisode.getConsultantStays().add(ConsultantStayVoAssembler.extractConsultantStay(getDomainFactory(), consultant, domMap));
	
	BedSpaceState doBedSpaceState = BedSpaceStateLiteVoAssembler.extractBedSpaceState(getDomainFactory(), bedSpaceState, domMap);	
	if(doBedSpaceState != null)
	{
		doBedSpaceState.setInpatientEpisode(inpatEpisode);	
		inpatEpisode.setBed(doBedSpaceState);
		inpatEpisode.setBedNo(doBedSpaceState.getBedSpace().getBedNumber());
	}

	if (wardStay != null && wardStay.getWardIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true)
	{
		Location doloc = getLocation(wardStay.getWard().getID_Location(), getDomainFactory());
		if (doloc != null && !Boolean.TRUE.equals(doloc.isVTEAsessmentNotRequired()))
		{
			inpatEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
		}
	}
	
	getDomainFactory().save(inpatEpisode);

	return null;
}
 
Example 3
Project: openMAXIMS   File: BedAdmissionComponentImpl.java   Source Code and License 4 votes vote down vote up
public AdmissionDetailVo saveEmergencyAdmissionInElectiveCase(AdmissionDetailVo admission, CareSpellVo careSpell, CatsReferralEmergencyAdmissionVo catsReferral, BedSpaceStateLiteVo bedSpaceState, WardStayVo wardStay, ConsultantStayVo consultant) throws DomainInterfaceException, StaleObjectException
{
	if (admission == null)
		throw new CodingRuntimeException("Admission Details parameter is mandatory.");
	
	if (careSpell == null)
		throw new CodingRuntimeException("Care Spell parameter is mandatory.");
	
	if (catsReferral == null)
		throw new CodingRuntimeException("Cats Referral parameter is mandatory.");
	
	
	PatientPathwayJourneyRefVo journey = createPatientJourney(catsReferral, admission);
	catsReferral.setJourney(journey);
	
	@SuppressWarnings("rawtypes")
	HashMap domMap = new HashMap();
	AdmissionDetail domAdmissionDetail = AdmissionDetailVoAssembler.extractAdmissionDetail(getDomainFactory(), admission, domMap);
	CareSpell domCareSpell = CareSpellVoAssembler.extractCareSpell(getDomainFactory(), careSpell, domMap);
	CatsReferral domCatsReferral = CatsReferralEmergencyAdmissionVoAssembler.extractCatsReferral(getDomainFactory(), catsReferral, domMap);
	domCatsReferral.getCareContext().setPasEvent(domAdmissionDetail.getPasEvent());
	
	getDomainFactory().save(domAdmissionDetail);
	getDomainFactory().save(domCareSpell);
	getDomainFactory().save(domCatsReferral);

	InpatientEpisode inpatEpisode = new InpatientEpisode();
	inpatEpisode.setPasEvent(domAdmissionDetail.getPasEvent());
	inpatEpisode.getPasEvent().setConsultant(domAdmissionDetail.getConsultant());
	inpatEpisode.setAdmissionDateTime(domAdmissionDetail.getAdmissionDateTime());
	inpatEpisode.setEstDischargeDate(null);
	inpatEpisode.setWardType(domAdmissionDetail.getWardType());
	
	if (wardStay != null)
		inpatEpisode.getWardStays().add(WardStayVoAssembler.extractWardStay(getDomainFactory(), wardStay, domMap));
	if (consultant != null)
		inpatEpisode.getConsultantStays().add(ConsultantStayVoAssembler.extractConsultantStay(getDomainFactory(), consultant, domMap));
	
	BedSpaceState doBedSpaceState = BedSpaceStateLiteVoAssembler.extractBedSpaceState(getDomainFactory(), bedSpaceState, domMap);	
	if(doBedSpaceState != null)
	{
		doBedSpaceState.setInpatientEpisode(inpatEpisode);	
		inpatEpisode.setBed(doBedSpaceState);
		inpatEpisode.setBedNo(doBedSpaceState.getBedSpace().getBedNumber());
	}

	if (wardStay != null && wardStay.getWardIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true)
	{
		Location doloc = getLocation(wardStay.getWard().getID_Location(), getDomainFactory());
		if (doloc != null && !Boolean.TRUE.equals(doloc.isVTEAsessmentNotRequired()))
		{
			inpatEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
		}
	}
	
	getDomainFactory().save(inpatEpisode);

	return null;
}
 
Example 4
Project: openmaxims-linux   File: BedAdmissionComponentImpl.java   Source Code and License 4 votes vote down vote up
public AdmissionDetailVo saveEmergencyAdmissionInElectiveCase(AdmissionDetailVo admission, CareSpellVo careSpell, CatsReferralEmergencyAdmissionVo catsReferral, BedSpaceStateLiteVo bedSpaceState, WardStayVo wardStay, ConsultantStayVo consultant) throws DomainInterfaceException, StaleObjectException
{
	if (admission == null)
		throw new CodingRuntimeException("Admission Details parameter is mandatory.");
	
	if (careSpell == null)
		throw new CodingRuntimeException("Care Spell parameter is mandatory.");
	
	if (catsReferral == null)
		throw new CodingRuntimeException("Cats Referral parameter is mandatory.");
	
	
	PatientPathwayJourneyRefVo journey = createPatientJourney(catsReferral, admission);
	catsReferral.setJourney(journey);
	
	@SuppressWarnings("rawtypes")
	HashMap domMap = new HashMap();
	AdmissionDetail domAdmissionDetail = AdmissionDetailVoAssembler.extractAdmissionDetail(getDomainFactory(), admission, domMap);
	CareSpell domCareSpell = CareSpellVoAssembler.extractCareSpell(getDomainFactory(), careSpell, domMap);
	CatsReferral domCatsReferral = CatsReferralEmergencyAdmissionVoAssembler.extractCatsReferral(getDomainFactory(), catsReferral, domMap);
	domCatsReferral.getCareContext().setPasEvent(domAdmissionDetail.getPasEvent());
	
	getDomainFactory().save(domAdmissionDetail);
	getDomainFactory().save(domCareSpell);
	getDomainFactory().save(domCatsReferral);

	InpatientEpisode inpatEpisode = new InpatientEpisode();
	inpatEpisode.setPasEvent(domAdmissionDetail.getPasEvent());
	inpatEpisode.getPasEvent().setConsultant(domAdmissionDetail.getConsultant());
	inpatEpisode.setAdmissionDateTime(domAdmissionDetail.getAdmissionDateTime());
	inpatEpisode.setEstDischargeDate(null);
	inpatEpisode.setWardType(domAdmissionDetail.getWardType());
	
	if (wardStay != null)
		inpatEpisode.getWardStays().add(WardStayVoAssembler.extractWardStay(getDomainFactory(), wardStay, domMap));
	if (consultant != null)
		inpatEpisode.getConsultantStays().add(ConsultantStayVoAssembler.extractConsultantStay(getDomainFactory(), consultant, domMap));
	
	BedSpaceState doBedSpaceState = BedSpaceStateLiteVoAssembler.extractBedSpaceState(getDomainFactory(), bedSpaceState, domMap);	
	if(doBedSpaceState != null)
	{
		doBedSpaceState.setInpatientEpisode(inpatEpisode);	
		inpatEpisode.setBed(doBedSpaceState);
		inpatEpisode.setBedNo(doBedSpaceState.getBedSpace().getBedNumber());
	}

	if (wardStay != null && wardStay.getWardIsNotNull() && ConfigFlag.UI.VTE_RISK_ASSESSMENT_FUNCTIONALITY.getValue() == true)
	{
		Location doloc = getLocation(wardStay.getWard().getID_Location(), getDomainFactory());
		if (doloc != null && !Boolean.TRUE.equals(doloc.isVTEAsessmentNotRequired()))
		{
			inpatEpisode.setVTEAssessmentStatus(getDomLookup(VTEAsessmentStatus.REQUIRED));
		}
	}
	
	getDomainFactory().save(inpatEpisode);

	return null;
}