Java Code Examples for ims.core.admin.domain.objects.CareContext

The following are top voted examples for showing how to use ims.core.admin.domain.objects.CareContext. 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: MedMskSpinePathImpl.java   Source Code and License 6 votes vote down vote up
/**
 * Saves the given details
 */
public MSKSpinePathologyFindingVo saveMskSpinePath(MSKSpinePathologyFindingVo exam, CareContextShortVo careContext) throws StaleObjectException
{
	if (!exam.isValidated())
		throw new DomainRuntimeException("Examination has not been validated!");
	
	DomainFactory factory = getDomainFactory();		
	CareContext domCareContext = CareContextShortVoAssembler.extractCareContext(factory, careContext);
	
	MskSpinePath domPath = MSKSpinePathologyFindingVoAssembler.extractMskSpinePath(factory, exam);
	if (exam.getIsProblem().booleanValue() == true)
	{
		PatientProblem prob = new PatientProblem();
		prob.setIsActive(Boolean.TRUE);
		prob.setPatientProblem("MSK Spine Pathology - Level:" +  exam.getPathSite().getName() + " of injury");
		prob.setProblemContext("Spine Pathology");
		prob.setCareContext(domCareContext);
		factory.save(prob);
	}
	factory.save(domPath);			
	return MSKSpinePathologyFindingVoAssembler.create(domPath);
}
 
Example 2
Project: AvoinApotti   File: MRSATreatmentImpl.java   Source Code and License 6 votes vote down vote up
public CareContextShortVoCollection listMRSACareContexts(Integer idPatient)
{
	if (idPatient != null)
	{
		DomainFactory factory = getDomainFactory();
		List MRSAaList  = factory.find(" select distinct mrsa.careContext from MRSAAssessment mrsa where mrsa.careContext.episodeOfCare.careSpell.patient.id = :patId",
				new String[]{"patId"},
				new Object[]{idPatient});

		CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
		for (int x = 0; x < MRSAaList.size(); x++)
		{
			CareContext domMrsa = (CareContext) MRSAaList.get(x);
			voCareContextList.add(CareContextShortVoAssembler.create(domMrsa));
		}

		return voCareContextList.sort();
	}
	
	return null;
}
 
Example 3
Project: AvoinApotti   File: PainReviewImpl.java   Source Code and License 6 votes vote down vote up
public CareContextShortVoCollection listPainReviewCareContexts(Integer idPatient)
{
	if (idPatient != null)
	{
		DomainFactory factory = getDomainFactory();
		List PAaList  = factory.find(" select distinct pa.careContext from PainAssessment pa where pa.careContext.episodeOfCare.careSpell.patient.id = :patId",
				new String[]{"patId"},
				new Object[]{idPatient});

		CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
		for (int x = 0; x < PAaList.size(); x++)
		{
			CareContext domPAa = (CareContext) PAaList.get(x);
			voCareContextList.add(CareContextShortVoAssembler.create(domPAa));	
		}

		return voCareContextList.sort();
	}
	
	return null;
}
 
Example 4
Project: AvoinApotti   File: MRSAAssessmentImpl.java   Source Code and License 6 votes vote down vote up
public CareContextShortVoCollection listMRSACareContexts(Integer idPatient)
{
	if (idPatient != null)
	{
		DomainFactory factory = getDomainFactory();
		List MRSAaList  = factory.find(" select distinct mrsa.careContext from MRSAAssessment mrsa where mrsa.careContext.episodeOfCare.careSpell.patient.id = :patId",
				new String[]{"patId"},
				new Object[]{idPatient});

		CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
		for (int x = 0; x < MRSAaList.size(); x++)
		{
			CareContext domMrsa = (CareContext) MRSAaList.get(x);
			voCareContextList.add(CareContextShortVoAssembler.create(domMrsa));
		}

		return voCareContextList.sort();
	}
	
	return null;
}
 
Example 5
Project: AvoinApotti   File: SkinReviewImpl.java   Source Code and License 6 votes vote down vote up
public CareContextShortVoCollection listSkinReviewCareContexts(Integer idPatient)
{
	if (idPatient != null)
	{
		DomainFactory factory = getDomainFactory();
		List SkAsList  = factory.find(" select distinct scas.careContext from SkinAssessment scas where scas.careContext.episodeOfCare.careSpell.patient.id = :patId",
				new String[]{"patId"},
				new Object[]{idPatient});

		CareContextShortVoCollection voCareContextList = new CareContextShortVoCollection();
		for (int x = 0; x < SkAsList.size(); x++)
		{
			CareContext domSkAs = (CareContext) SkAsList.get(x);
			voCareContextList.add(CareContextShortVoAssembler.create(domSkAs));
		}

		return voCareContextList.sort();
	}
	
	return null;
	
}
 
Example 6
Project: AvoinApotti   File: CareSpellDialogImpl.java   Source Code and License 6 votes vote down vote up
private void maintainCareContextStatusHistory(CareSpell doCareSpell)
{
	if (doCareSpell == null)
		throw new CodingRuntimeException("doCareSpell cannot be null in method maintainCareContextStatusHistory");
	
	if(doCareSpell.getEpisodes() != null)
	{
		Iterator itCs = doCareSpell.getEpisodes().iterator();
		while(itCs.hasNext())
		{
			EpisodeOfCare doEpis = (EpisodeOfCare) itCs.next();
			if(doEpis.getCareContexts() != null)
			{
				Iterator itCC = doEpis.getCareContexts().iterator();
				while(itCC.hasNext())
				{
					CareContext doCareContext = (CareContext)itCC.next();
					if(doCareContext.getCurrentStatus() != null && doCareContext.getCurrentStatus().getId() == null)
					{				
						doCareContext.getStatusHistory().add(doCareContext.getCurrentStatus());
					}
				}
			}
		}
	}
}
 
Example 7
Project: AvoinApotti   File: CareSpellDialogImpl.java   Source Code and License 6 votes vote down vote up
public CareContextInterfaceVo getCareContextFromPasEpisodeId(String pasEpisodeId, String visitId)
{
	DomainFactory factory=getDomainFactory();
	
	ArrayList<String> objects=new ArrayList<String>();
	objects.add("pasEvent");
	IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
	imsc.equal("pasEvent.pasEpisodeId", pasEpisodeId);
	imsc.equal("pasEvent.pasEventId", visitId);
	
	List careContexts=imsc.find();
	
	if (careContexts.size()>0)
	{
		CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
		return CareContextInterfaceVoAssembler.create(careContext);
	}
	
	return null;
	
}
 
Example 8
Project: AvoinApotti   File: CareSpellDialogImpl.java   Source Code and License 6 votes vote down vote up
public CareContextVo getCareContextFromPasEvent(PASEventRefVo pasEvent)
{
	DomainFactory factory=getDomainFactory();
	
	ArrayList<String> objects=new ArrayList<String>();
	objects.add("pasEvent");
	IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
	imsc.equal("pasEvent.id", pasEvent.getID_PASEvent());
	
	List careContexts=imsc.find();
	
	if (careContexts.size()>0)
	{
		CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
		return CareContextVoAssembler.create(careContext);
	}
	
	return null;
	
}
 
Example 9
Project: AvoinApotti   File: ADTAdmissionDetailsComponentImpl.java   Source Code and License 6 votes vote down vote up
public CareContextShortVo updateAdmissionDetails(InpatientEpisodeVo episVo, CareContextShortVo careContextVo) throws StaleObjectException
{
	if (episVo == null )
	{
		throw new CodingRuntimeException("episVo is null on Save");
	}
	
	if (careContextVo == null )
	{
		throw new CodingRuntimeException("careContextVo is null on Save");
	}
	
	ADT implLoc = (ADT)getDomainImpl(ADTImpl.class);
	DomainFactory factory = getDomainFactory();
	
	CareContext domCareContext = CareContextShortVoAssembler.extractCareContext(factory, careContextVo);
	factory.save(domCareContext);
	
	implLoc.updateInpatient(episVo, null);
	
	return CareContextShortVoAssembler.create(domCareContext);
	
}
 
Example 10
Project: AvoinApotti   File: ADTImpl.java   Source Code and License 6 votes vote down vote up
private void updateBed(DomainFactory factory, PASEvent peDo) throws StaleObjectException
{	
	BedSpaceState doBedSpaceState = getBedSpaceStateByPasEvent(peDo);
	if(doBedSpaceState != null)
	{
		doBedSpaceState.setPreviousBedStatus(doBedSpaceState.getCurrentBedStatus());
		doBedSpaceState.setCurrentBedStatus(new BedSpaceStateStatus());
		doBedSpaceState.getCurrentBedStatus().setBedStatus(getDomLookup(BedStatus.AVAILABLE));
		doBedSpaceState.getCurrentBedStatus().setStatusDateTime(new DateTime().getJavaDate());
		doBedSpaceState.setInpatientEpisode(null);
		factory.save(doBedSpaceState);	
	}
	
	// WDEV-12588 If CareContext linked to this pasevent, update the bed number there too
	if (ConfigFlag.HL7.INPATIENT_EPISODE_MANAGEMENT_FROM_PAS.getValue())
	{
		CareContext doCareContext = (CareContext) getDomainFactory().findFirst("from CareContext cc where cc.pasEvent.id = " + peDo.getId());
		if (doCareContext != null)
		{
			doCareContext.setBedNumber(null);
			factory.save(doCareContext);
		}
	}

}
 
Example 11
Project: AvoinApotti   File: NotificationsImpl.java   Source Code and License 6 votes vote down vote up
@SuppressWarnings("unchecked")
private CareContextRefVo getInpatientCareContext(Integer patientId) 
{
	if(patientId == null)
		throw new CodingRuntimeException("Invalid patient Id.");
	
	DomainFactory factory = getDomainFactory();
	
	String query = "select inpCareContext from CareSpell as cs left join cs.episodes as ep left join ep.careContexts as inpCareContext left join cs.patient as p where p.id = :patId and inpCareContext.endDateTime is null and inpCareContext.context.id = :inpatient order by inpCareContext.startDateTime desc";
	
	List listInpatientCareContext = factory.find(query, new String[] {"patId", "inpatient"}, new Object[] {patientId, ContextType.INPATIENT.getID()});
	
	if(listInpatientCareContext != null)
	{
		for(int i=0; i<listInpatientCareContext.size(); i++)
		{
			if(listInpatientCareContext.get(i) != null)
			{
				CareContext obj = (CareContext)listInpatientCareContext.get(i);
				return new CareContextRefVo(obj.getId(), obj.getVersion());
			}
		}
	}
		
	return null;
}
 
Example 12
Project: AvoinApotti   File: DischargeDetails_OutcomeImpl.java   Source Code and License 6 votes vote down vote up
/**
 *	Function to check for Diagnoses, Treatments, Interventions or Investigations for the attendance
 */
public Boolean hasDiagnosesTreatmentsInterventionsOrInvestigations(PatientRefVo patient, CareContextRefVo careContext)
{
	String queryDiagnoses = "SELECT COUNT (pDiag.id) FROM PatientDiagnosis AS pDiag WHERE pDiag.careContext.id = :CARE_CONTEXT AND (pDiag.isRIE is null OR pDiag.isRIE = 0)";
	long countDiagnoses = getDomainFactory().countWithHQL(queryDiagnoses, new String[] {"CARE_CONTEXT"}, new Object[] {careContext.getID_CareContext()});
	
	String queryInterventionTreatment = "SELECT COUNT (interventionTreatAttend.id) FROM InterventionsTreatmentsForAttendence AS interventionTreatAttend LEFT JOIN interventionTreatAttend.interventionTreatments AS interventionTreat WHERE interventionTreatAttend.attendance.id = :CARE_CONTEXT AND interventionTreat.id is not null";
	long countInterventionTreatment = getDomainFactory().countWithHQL(queryInterventionTreatment, new String[] {"CARE_CONTEXT"}, new Object[] {careContext.getID_CareContext()});
	
	String queryInvestigationAttendance = "SELECT COUNT (invAttend.id) FROM InvestigationAttendenceDetail AS invAttend WHERE invAttend.attendance.id = :CARE_CONTEXT AND invAttend.active = 1";
	long countInvestigationAttendance = getDomainFactory().countWithHQL(queryInvestigationAttendance, new String[] {"CARE_CONTEXT"}, new Object[] {careContext.getID_CareContext()});
	
	CareContext careContextDO = (CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext());
	Date startDateTime = careContextDO.getStartDateTime();
	Date endDateTime = careContextDO.getEndDateTime();
	if (endDateTime == null) endDateTime = new Date();
	String queryOrderInvestigations = "SELECT COUNT (ordInv.id) FROM OrderInvestigation AS ordInv LEFT JOIN ordInv.orderDetails AS ordDet WHERE ordDet.patient.id = :PATIENT_ID AND ordInv.displayDateTime BETWEEN :START_DATE AND :END_DATE";
	long countOrderInvestigation = getDomainFactory().countWithHQL(queryOrderInvestigations, new String[] {"PATIENT_ID", "START_DATE", "END_DATE"}, new Object[] {patient.getID_Patient(), startDateTime, endDateTime});
	
	//WDEV-17806
	if (countDiagnoses >0 && countInterventionTreatment >0 && ( countInvestigationAttendance + countOrderInvestigation > 0 ))
		return Boolean.TRUE;
	
	return Boolean.FALSE;
}
 
Example 13
Project: AvoinApotti   File: DischargeSummaryConsultatntWardAndPacuImpl.java   Source Code and License 6 votes vote down vote up
public CareContextRefVo getCareContextRef(CatsReferralRefVo referral)
{
	if (referral == null || referral.getID_CatsReferral() == null)
		throw new CodingRuntimeException("Logical error - referral is null or missing ID");
	
	String hql = "from CareContext as care where (care.id in (select cr.careContext.id from CatsReferral as cr where cr.id = :refID))";

	ArrayList<String> paramNames = new ArrayList<String>();
	paramNames.add("refID");
	
	ArrayList<Object> paramValues = new ArrayList<Object>();
	paramValues.add(referral.getID_CatsReferral());
	
	DomainFactory factory = getDomainFactory();
	
	return CareContextLiteVoAssembler.create((CareContext) (factory.find(hql, paramNames, paramValues)).get(0));
}
 
Example 14
Project: AvoinApotti   File: ReferralDetailsComponentImpl.java   Source Code and License 6 votes vote down vote up
private EpisodeofCareShortVo updateEpisodeOfCareSpecialty(CatsReferralWizardVo catsReferralVo, ReferralLetterDetailsVo referralDetailsVo, DomainFactory factory) throws StaleObjectException
{
	CareContextVo voCC = CareContextVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, catsReferralVo.getCareContext().getID_CareContext()));
	ServiceVo voServ = ServiceVoAssembler.create((ims.core.clinical.domain.objects.Service) getDomainFactory().getDomainObject(ims.core.clinical.domain.objects.Service.class, referralDetailsVo.getService().getID_Service()));

	EpisodeOfCare doEOC = (EpisodeOfCare) factory.getDomainObject(EpisodeOfCare.class, voCC.getEpisodeOfCare().getID_EpisodeOfCare());
	if (doEOC != null)
	{
		//WDEV-11535 - if referral service.specialty is null set it back to DAD
		Specialty spec = null;
		if(voServ.getSpecialty() == null)
			spec = Specialty.DAD;
		else
			spec = voServ.getSpecialty();
		
		doEOC.setSpecialty(getDomLookup(spec));			
		factory.save(doEOC);
		
		return EpisodeofCareShortVoAssembler.create(doEOC);
	}
	
	return null;
}
 
Example 15
Project: AvoinApotti   File: DischargeSummaryWardPacuImpl.java   Source Code and License 6 votes vote down vote up
public CareContextRefVo getCareContextRef(CatsReferralRefVo referral)
{
	if (referral == null || referral.getID_CatsReferral() == null)
		throw new CodingRuntimeException("Logical error - referral is null or missing ID");
	
	String hql = "from CareContext as care where (care.id in (select cr.careContext.id from CatsReferral as cr where cr.id = :refID))";

	ArrayList<String> paramNames = new ArrayList<String>();
	paramNames.add("refID");
	
	ArrayList<Object> paramValues = new ArrayList<Object>();
	paramValues.add(referral.getID_CatsReferral());
	
	DomainFactory factory = getDomainFactory();
	
	return CareContextLiteVoAssembler.create((CareContext) (factory.find(hql, paramNames, paramValues)).get(0));
}
 
Example 16
Project: AvoinApotti   File: HL7TTOIFImpl.java   Source Code and License 6 votes vote down vote up
private CareContext getOpenInPatientCareContext(PatientRefVo patientVo)
{
	if(patientVo == null)
		throw new DomainRuntimeException("Invalid Argument: null Patient provided");

	DomainFactory factory = getDomainFactory();
	
	List<?> domCareContexts =	factory.find("select cc from CareContext cc left join cc.episodeOfCare " +
			" as e1_1 left join e1_1.careSpell as c2_1 left join c2_1.patient as p1_1" +
			" where p1_1.id = :PAT and cc.endDateTime is null and cc.context=:ContextType" , 
					new String[] {"PAT","ContextType"}, new Object[] { patientVo.getID_Patient(),getDomLookup(ContextType.INPATIENT)});
	if (domCareContexts!=null&&domCareContexts.size()!=0)
	{
		CareContext domCareContext = (CareContext)domCareContexts.get(0);
		return domCareContext;
	}
	else return null;
}
 
Example 17
Project: AvoinApotti   File: DischargeInpatientImpl.java   Source Code and License 6 votes vote down vote up
public CareContextShortVo updateCareContextWithEndDateTime(CareContextRefVo careContext, DateTime endDateTime) throws StaleObjectException
{
	if(careContext == null || careContext.getID_CareContext() == null)
		throw new CodingRuntimeException("careContext parameter cannot be null in method updateCareContextAndEpisodeOfCareWithEndDateTime");
	
	if(endDateTime == null)
		throw new CodingRuntimeException("endDateTime parameter cannot be null in method updateCareContextAndEpisodeOfCareWithEndDateTime");
	
	
	DomainFactory factory = getDomainFactory();
	
	CareContext doCareContext = (CareContext) factory.getDomainObject(careContext);
	
	if(endDateTime != null)
		doCareContext.setEndDateTime(endDateTime.getJavaDate());
	//if(doCareContext.getEpisodeOfCare() != null && endDateTime != null)
		//doCareContext.getEpisodeOfCare().setEndDate(endDateTime.getJavaDate());
		
	factory.save(doCareContext);
	return CareContextShortVoAssembler.create(doCareContext);
}
 
Example 18
Project: AvoinApotti   File: DischargeInpatientImpl.java   Source Code and License 6 votes vote down vote up
public CareContextShortVo updateCareContextAndEpisodeOfCareWithEndDateTime(CareContextRefVo careContext, DateTime endDateTime) throws StaleObjectException
{
	if(careContext == null || careContext.getID_CareContext() == null)
		throw new CodingRuntimeException("careContext parameter cannot be null in method updateCareContextAndEpisodeOfCareWithEndDateTime");
	
	if(endDateTime == null)
		throw new CodingRuntimeException("endDateTime parameter cannot be null in method updateCareContextAndEpisodeOfCareWithEndDateTime");
	
	
	DomainFactory factory = getDomainFactory();
	
	CareContext doCareContext = (CareContext) factory.getDomainObject(careContext);
	
	if(endDateTime != null)
		doCareContext.setEndDateTime(endDateTime.getJavaDate());
	if(doCareContext.getEpisodeOfCare() != null && endDateTime != null)
		doCareContext.getEpisodeOfCare().setEndDate(endDateTime.getJavaDate());
		
	factory.save(doCareContext);
	return CareContextShortVoAssembler.create(doCareContext);
}
 
Example 19
Project: AvoinApotti   File: RACPCReferralImpl.java   Source Code and License 5 votes vote down vote up
public CareContextForRACPCReferralVo getCareContext(CareContextRefVo careContext) 
{
	if(careContext == null || !careContext.getID_CareContextIsNotNull())
		throw new CodingRuntimeException("Invalid Care Context Context Ref");

	return CareContextForRACPCReferralVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext()));
}
 
Example 20
Project: AvoinApotti   File: CarePlanOverviewImpl.java   Source Code and License 5 votes vote down vote up
private Integer getPatientId(CareContextRefVo voCurrentCareContext) {
	
	DomainFactory factory = getDomainFactory();
	CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, voCurrentCareContext.getID_CareContext());
	CareContextVo voCareContext = CareContextVoAssembler.create(doCareContext);
	CareSpell doCareSpell = (CareSpell)factory.getDomainObject(CareSpell.class, voCareContext.getEpisodeOfCare().getCareSpell().getID_CareSpell());
	CareSpellVo voCareSpell = CareSpellVoAssembler.create(doCareSpell);
	return voCareSpell.getPatient().getID_Patient();
}
 
Example 21
Project: AvoinApotti   File: CopyCarePlansImpl.java   Source Code and License 5 votes vote down vote up
private Integer getPatientId(CareContextRefVo voCurrentCareContext)
{

	DomainFactory factory = getDomainFactory();
	CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, voCurrentCareContext.getID_CareContext());
	CareContextVo voCareContext = CareContextVoAssembler.create(doCareContext);
	CareSpell doCareSpell = (CareSpell) factory.getDomainObject(CareSpell.class, voCareContext.getEpisodeOfCare().getCareSpell().getID_CareSpell());
	CareSpellVo voCareSpell = CareSpellVoAssembler.create(doCareSpell);
	return voCareSpell.getPatient().getID_Patient();
}
 
Example 22
Project: AvoinApotti   File: ClinicalAdmissionImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContextShort(CareContextRefVo careContexxtRefVo)
{
	DomainFactory factory = getDomainFactory();

	CareContext cc = (CareContext) factory.getDomainObject(CareContext.class, careContexxtRefVo.getID_CareContext());
	return CareContextShortVoAssembler.create(cc);
}
 
Example 23
Project: AvoinApotti   File: CarePlanReviewImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVoCollection listCareContexts(LocShortVo wardVo)
{
	DomainFactory factory = getDomainFactory();
	
	CareContextShortVoCollection  voCareContextColl = new CareContextShortVoCollection();
	List contacts = null;
	String hql;
	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Integer> values = new ArrayList<Integer>();

	hql = " from CareContext cc "; 
	StringBuffer condStr = new StringBuffer();
	String andStr = " ";	
	// WDEV-4491
	condStr.append(andStr + " cc.episodeOfCare.careSpell.patient.ward.id = :wardId and cc.endDateTime is null ");
	markers.add("wardId");
	values.add(wardVo.getID_Location());

	hql += " where " + condStr.toString();	
		
	contacts = factory.find(hql, markers, values);	
	
	for (int x = 0; x < contacts.size(); x++)
	{
		CareContext domCareContext = (CareContext) contacts.get(x);	
		CareContextShortVo voCareContext = CareContextShortVoAssembler.create(domCareContext);		
		voCareContextColl.add(voCareContext);
	}

	return voCareContextColl.sort();
}
 
Example 24
Project: AvoinApotti   File: ContextEvalProvider.java   Source Code and License 5 votes vote down vote up
public ValueObjectRef getCareContextForClinicalContact(ValueObjectRef refVo)
{
	ClinicalContact con = (ClinicalContact)this.getDomainFactory().getDomainObject(ClinicalContact.class, refVo.getBoId());
	if (con == null)
		throw new DomainRuntimeException("Invalid ClinicalContact refVo passed into getCareContextForClinicalContact. ");

	CareContext ctx = (CareContext)this.getDomainFactory().getDomainObject(CareContext.class, con.getCareContext().getId());
	if (ctx == null)
		throw new DomainRuntimeException("CareContext not found for ClinicalContact passed into getCareContextForClinicalContact");
	
	return CareContextShortVoAssembler.create(ctx);	
}
 
Example 25
Project: AvoinApotti   File: ContextEvalProvider.java   Source Code and License 5 votes vote down vote up
public ValueObjectRef getEpisodeOfCareForCareContext(ValueObjectRef refVo)
{
	CareContext ctx = (CareContext)this.getDomainFactory().getDomainObject(CareContext.class, refVo.getBoId());
	if (ctx == null)
		throw new DomainRuntimeException("Invalid CareContext refVo passed into getEpisodeOfCareForCareContext. ");
	
	EpisodeOfCare epis = (EpisodeOfCare)this.getDomainFactory().getDomainObject(EpisodeOfCare.class, ctx.getEpisodeOfCare().getId());
	if (epis == null)
		throw new DomainRuntimeException("EpisodeOfCare not found for  CareContext passed into getEpisodeOfCareForCareContext");

	return EpisodeofCareShortVoAssembler.create(epis);	
}
 
Example 26
Project: AvoinApotti   File: ClinicLetterBatchCreateImpl.java   Source Code and License 5 votes vote down vote up
public CareContextMinVo getCareContextByPasEvent(PASEventRefVo pasEvent) 
{
	if(pasEvent == null || !pasEvent.getID_PASEventIsNotNull())
		throw new CodingRuntimeException("Cannot get Care Context on null Pas Event.");
	
	DomainFactory factory = getDomainFactory();
	
	List<?> careContext = factory.find("from CareContext as cc where cc.pasEvent.id = :PasEventId order by cc.systemInformation.creationDateTime desc ", new String[] {"PasEventId"}, new Object[] {pasEvent.getID_PASEvent()});
	
	if(careContext == null || careContext.size() == 0)
		return null;
	
	return CareContextMinVoAssembler.create((CareContext) careContext.get(0));	
}
 
Example 27
Project: AvoinApotti   File: CareSpellDialogImpl.java   Source Code and License 5 votes vote down vote up
public CareContextVo saveCareContext(CareContextVo careContext) throws StaleObjectException
{
	if (careContext == null  || !careContext.isValidated())
		throw new CodingRuntimeException("Care Spell is null or has not been validated");
	DomainFactory factory=getDomainFactory();
	
	CareContext doCareContext = CareContextVoAssembler.extractCareContext(factory, careContext);
	
	//WDEV-10231 - add any new status record to history
	if(doCareContext.getCurrentStatus() != null && doCareContext.getCurrentStatus().getId() == null)	
		doCareContext.getStatusHistory().add(doCareContext.getCurrentStatus());
	
	factory.save(doCareContext);
	return CareContextVoAssembler.create(doCareContext);
}
 
Example 28
Project: AvoinApotti   File: EDischargeSTHKListImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContextShort(CareContextRefVo voRef) 
{
	if(voRef == null ||
			voRef.getID_CareContext() == null)
		throw new CodingRuntimeException("CareContextRefVo is null or id not provided for getCareContext");	
	
	return CareContextShortVoAssembler.create((CareContext)getDomainFactory().getDomainObject(CareContext.class, voRef.getID_CareContext()));
}
 
Example 29
Project: AvoinApotti   File: CareContextSelectDialogImpl.java   Source Code and License 5 votes vote down vote up
public CareContextVo updateCareContextwithOrderingHospital(CareContextRefVo careContext, LocSiteRefVo locSite) throws StaleObjectException
{
	DomainFactory factory = getDomainFactory();
	CareContext domCareContext = (CareContext) factory.getDomainObject(careContext);
	LocSite domOrderingHosp = (LocSite)factory.getDomainObject(locSite);
	domCareContext.setOrderingHospital(domOrderingHosp);
	factory.save(domCareContext);
	return CareContextVoAssembler.create(domCareContext);
}
 
Example 30
Project: AvoinApotti   File: TransportImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContext)
{
	if (careContext == null)
		return null;
	
	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext()));
}
 
Example 31
Project: AvoinApotti   File: ADTAdmissionDetailsComponentImpl.java   Source Code and License 5 votes vote down vote up
public CareContextVo getCareContext(CareContextRefVo careContextRef)
{
	if(careContextRef == null || careContextRef.getID_CareContext()==null)
		throw new CodingRuntimeException("Cannot get CareContext value on null careContextRef.");
	
	DomainFactory factory = getDomainFactory();
	CareContext domCareContext=(CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());
	return CareContextVoAssembler.create(domCareContext);
}
 
Example 32
Project: AvoinApotti   File: ClinicListwithICPActionsImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContextRef)
{
	if (careContextRef == null)
		return null;
	DomainObject domainObject = getDomainFactory().getDomainObject(CareContext.class, careContextRef.getID_CareContext());
	if (domainObject instanceof CareContext)
		return CareContextShortVoAssembler.create((CareContext) domainObject);
	return null;
}
 
Example 33
Project: AvoinApotti   File: ADTImpl.java   Source Code and License 5 votes vote down vote up
public CareContextInterfaceVo getCareContextByPasEvent(PASEventRefVo pasEvent)
{
	if (pasEvent == null || pasEvent.getID_PASEvent() == null)
		throw new CodingRuntimeException("pasEvent is null or id not provided in method getCareContextByPasEvent");
	
	CareContext doCareContext = (CareContext) getDomainFactory().findFirst("from CareContext cc where cc.pasEvent.id = " + pasEvent.getID_PASEvent());
	return CareContextInterfaceVoAssembler.create(doCareContext);
}
 
Example 34
Project: AvoinApotti   File: ADTDischargeDetailsComponentImpl.java   Source Code and License 5 votes vote down vote up
public ims.core.vo.CareContextInterfaceVo getCareContextById(ims.core.admin.vo.CareContextRefVo careContextRef)
{
	if( careContextRef == null)
		throw new CodingRuntimeException("This CareContextRefVo is null");
	
	DomainFactory factory = getDomainFactory();
	CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());
		
	return CareContextInterfaceVoAssembler.create(doCareContext);
}
 
Example 35
Project: AvoinApotti   File: InpatientListwithICPActionsImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContextRef) 
{
	if (careContextRef == null)
		return null;
	DomainObject domainObject = getDomainFactory().getDomainObject(CareContext.class, careContextRef.getID_CareContext());
	if (domainObject instanceof CareContext)
		return CareContextShortVoAssembler.create((CareContext) domainObject);
	return null;
}
 
Example 36
Project: AvoinApotti   File: WardViewImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContextForPasEvent(PASEventRefVo pasEvent)
{
	if (pasEvent == null || pasEvent.getID_PASEvent() == null)
		throw new CodingRuntimeException("pasEvent is null or id not provided in method getCareContextForPasEvent");
	
	List ccList = getDomainFactory().find(" from CareContext cc where cc.pasEvent.id = " + pasEvent.getID_PASEvent());
	if(ccList != null && ccList.size() == 1)
		return  CareContextShortVoAssembler.create((CareContext) ccList.get(0));
	
	return null;
}
 
Example 37
Project: AvoinApotti   File: MDTListImpl.java   Source Code and License 5 votes vote down vote up
/**
* List of Clinical Contacts with no MDT list type
*/
public ims.clinical.vo.MDTListAndDatesVoCollection listCareContextsWithNoMDTList(ims.clinical.vo.MDTListAndDatesVo voMDTList)
{
	DomainFactory factory = getDomainFactory();
	List contextList = factory.find(" from CareContext r where r.endDateTime is null and r.context = :context and r.id not in " + 
			"( select careContext.id from MDTListandDates)",
			new String[]{"context"},
			new Object[]{getDomLookup(ContextType.INPATIENT)});

	MDTListAndDatesVoCollection voMDTNoContactColl = new MDTListAndDatesVoCollection();
	for (int x = 0; x < contextList.size(); x++)
	{
		CareContext domCareContext = (CareContext) contextList.get(x);

		CareContextShortVo voCareContext = CareContextShortVoAssembler.create(domCareContext);
		
		Demographics impl = (Demographics) getDomainImpl(DemographicsImpl.class);
		
		MDTListAndDatesVo mdt = new MDTListAndDatesVo();
		mdt.setPatient(PatientShortAssembler.create(domCareContext.getEpisodeOfCare().getCareSpell().getPatient()));
		mdt.getPatient().setHasAlerts(impl.hasAlerts(mdt.getPatient().getID_Patient()));
		mdt.getPatient().setHasAllergies(impl.hasAllergy(mdt.getPatient().getID_Patient()));
		mdt.setCareContext(voCareContext);
		voMDTNoContactColl.add(mdt);
	}

	return voMDTNoContactColl.sort();
}
 
Example 38
Project: AvoinApotti   File: TrackingImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContext) 
{
	if(careContext == null || careContext.getID_CareContext() == null)
		throw new CodingRuntimeException("Cannot get CC for a null Id.");

	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext()));
}
 
Example 39
Project: AvoinApotti   File: PendingArrivalsImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContextRef)
{
	if (careContextRef == null || careContextRef.getID_CareContext() == null)
	{
		throw new CodingRuntimeException("Cannot get CareContextShort on null Id ");
	}

	DomainFactory factory = getDomainFactory();
	CareContext domainCareContext = (CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());

	return CareContextShortVoAssembler.create(domainCareContext);
}
 
Example 40
Project: AvoinApotti   File: EDAssessmentComponentImpl.java   Source Code and License 5 votes vote down vote up
public ims.core.vo.CareContextShortVo getCareContext(ims.core.admin.vo.CareContextRefVo careContext)
{
	if(careContext == null || careContext.getID_CareContext() == null)
		throw new CodingRuntimeException("Cannot get CC for a null Id.");

	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext()));
}
 
Example 41
Project: AvoinApotti   File: EmergencyAttendanceDetailsCcImpl.java   Source Code and License 5 votes vote down vote up
private EmergencyAttendance getAttendanceDetailsByCareContext(CareContext doCare,DomainFactory factory )
{
	if(doCare == null)
		throw new CodingRuntimeException("Care Context is null");
	
	String hsql = "select e1_1 from EmergencyAttendance as e1_1 left join e1_1.careContext as c1_1	where (c1_1.id =:id)";
	List attendances = factory.find(hsql, new String[] {"id"}, new Object[] {doCare.getId()});
	if(attendances != null && attendances.size() > 0)
	{
		return (EmergencyAttendance) attendances.get(0);
	}
	return null;
}
 
Example 42
Project: AvoinApotti   File: EmergencyAttendanceDetailsCcImpl.java   Source Code and License 5 votes vote down vote up
private CareContext getCareContextDO(EpisodeOfCare doEpisode)
{
	for (Iterator iter = doEpisode.getCareContexts().iterator(); iter.hasNext();)
	{
		CareContext element = (CareContext) iter.next();
			return element;
	}

	return null;
}
 
Example 43
Project: AvoinApotti   File: AttendanceDetailsImpl.java   Source Code and License 5 votes vote down vote up
private EmergencyAttendance getAttendanceDetailsByCareContext(CareContext doCare,DomainFactory factory )
{
	if(doCare == null)
		throw new CodingRuntimeException("Care Context is null");
	
	String hsql = "select e1_1 from EmergencyAttendance as e1_1 left join e1_1.careContext as c1_1	where (c1_1.id =:id)";
	List attendances = factory.find(hsql, new String[] {"id"}, new Object[] {doCare.getId()});
	if(attendances != null && attendances.size() > 0)
	{
		return (EmergencyAttendance) attendances.get(0);
	}
	return null;
}
 
Example 44
Project: AvoinApotti   File: PharmacyApprovalWorklistImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContext)
{
	if (careContext == null || !careContext.getID_CareContextIsNotNull())
		throw new DomainRuntimeException("Can not retrieve null care context or care context that has no ID");
	
	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext()));
}
 
Example 45
Project: AvoinApotti   File: TriageImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContext) 
{
	if(careContext == null || careContext.getID_CareContext() == null)
		throw new CodingRuntimeException("Cannot get CC for a null Id.");

	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext()));
}
 
Example 46
Project: AvoinApotti   File: QuickRegistrationImpl.java   Source Code and License 5 votes vote down vote up
private CareContext getCareContextDO(EpisodeOfCare doEpisode)
{
	for (Iterator<?> iter = doEpisode.getCareContexts().iterator(); iter.hasNext();)
	{
		CareContext element = (CareContext) iter.next();
		return element;
	}

	return null;
}
 
Example 47
Project: AvoinApotti   File: ClinicianAssessmentWorklistImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContext) 
{
	if(careContext == null || careContext.getID_CareContext() == null)
		throw new CodingRuntimeException("Cannot get CC for a null Id.");

	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContext.getID_CareContext()));
}
 
Example 48
Project: AvoinApotti   File: EDDecisionToAdmitDialogImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContextShort(CareContextRefVo careContextRef) 
{
	if( careContextRef == null || careContextRef.getID_CareContext() == null)
		throw new CodingRuntimeException("Cannot get Care Context record for a null CareContextRefVo");
	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContextRef.getID_CareContext()));
		
}
 
Example 49
Project: AvoinApotti   File: TrackingAndAttendanceWorklistsImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContextRef) 
{
	if(careContextRef == null || careContextRef.getID_CareContext() == null)
		return null;
	
	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContextRef.getID_CareContext()));
}
 
Example 50
Project: AvoinApotti   File: EDWhiteBoardDialogImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContextShort(CareContextRefVo careContextRef)
{
	if (careContextRef == null || careContextRef.getID_CareContext() == null)
	{
		throw new CodingRuntimeException("Cannot get CarerContext by null Id ");
	}

	DomainFactory factory = getDomainFactory();

	CareContext domainCareContext = (CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());

	return CareContextShortVoAssembler.create(domainCareContext);
}
 
Example 51
Project: AvoinApotti   File: PatientICPImpl.java   Source Code and License 5 votes vote down vote up
@SuppressWarnings("unchecked")
public CareContextShortVo getCareContextShortFromPatientICP(PatientICPRefVo patientICP) throws DomainInterfaceException
{
	if(patientICP == null || patientICP.getID_PatientICP() == null)
		throw new CodingRuntimeException("PatientICPRefVo is null or has a null ID !");
	
	DomainFactory factory = getDomainFactory(); 
		
	List list = factory.find("select p1_1.careContext from PatientICP as p1_1 where p1_1.id = :ID", new String[] {"ID"}, new Object[] {patientICP.getBoId()});

	if(list == null || list.size() == 0)
		throw new DomainInterfaceException("Can't get careContext from PatientICP: " + patientICP.getID_PatientICP());
	
	return CareContextShortVoAssembler.create((CareContext) list.get(0));
}
 
Example 52
Project: AvoinApotti   File: PatientICPActionLinkedDetailsComponentImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentLiteVoCollection listPatientAssessments(CareContextRefVo careContextRef, UserAssessmentRefVo assessmentRef)
{
	// If no assembler or care context is passes return null
	// Do not throw any exception or crash code - this is the domain of a component
	// Try to handle the execution exception
	if (assessmentRef == null || careContextRef == null)
		return null;
	
	CareContextLiteVo careContext = CareContextLiteVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContextRef.getID_CareContext()));
	
	if (careContext == null)
		return null;
			
	String query = " from PatientAssessment as pa where pa.assessmentData.userAssessment.id = :ASS_ID and ((pa.careContext.id = :CC_ID and pa.careContext.context.id != :CC_TYPE)" +
			" or (pa.careContext.episodeOfCare.id = :EP_ID and pa.careContext.context.id = :CC_TYPE)) order by pa.authoringInformation.authoringDateTime desc";
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	paramNames.add("ASS_ID");
	paramValues.add(assessmentRef.getID_UserAssessment());
	
	paramNames.add("CC_ID");
	paramValues.add(careContextRef.getID_CareContext());
	
	paramNames.add("CC_TYPE");
	paramValues.add(ContextType.INPATIENT.getID());
	
	paramNames.add("EP_ID");
	paramValues.add(careContext.getEpisodeOfCare().getID_EpisodeOfCare());

	
	return PatientAssessmentLiteVoAssembler.createPatientAssessmentLiteVoCollectionFromPatientAssessment(getDomainFactory().find(query, paramNames, paramValues));
}
 
Example 53
Project: AvoinApotti   File: PatientICPActionLinkedDetailsComponentImpl.java   Source Code and License 5 votes vote down vote up
public PatientAssessmentLiteVoCollection listPatientGraphicAssessments(CareContextRefVo careContextRef, GraphicAssessmentRefVo graphicalAssessmentRef)
{
	// If no assembler or care context is passes return null
	// Do not throw any exception or crash code - this is the domain of a component
	// Try to handle the execution exception
	if (graphicalAssessmentRef == null || careContextRef == null)
		return null;
	
	CareContextLiteVo careContext = CareContextLiteVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContextRef.getID_CareContext()));
	
	if (careContext == null)
		return null;
	
	String query = " from PatientAssessment as pa where pa.assessmentData.graphic.id = :GASS_ID and ((pa.careContext.id = :CC_ID and pa.careContext.context.id != :CC_TYPE)" +
			" or (pa.careContext.episodeOfCare.id = :EP_ID and pa.careContext.context.id = :CC_TYPE)) order by pa.authoringInformation.authoringDateTime desc";
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	paramNames.add("GASS_ID");
	paramValues.add(graphicalAssessmentRef.getID_GraphicAssessment());
	
	paramNames.add("CC_ID");
	paramValues.add(careContextRef.getID_CareContext());
	
	paramNames.add("CC_TYPE");
	paramValues.add(ContextType.INPATIENT.getID());
	
	paramNames.add("EP_ID");
	paramValues.add(careContext.getEpisodeOfCare().getID_EpisodeOfCare());

	return PatientAssessmentLiteVoAssembler.createPatientAssessmentLiteVoCollectionFromPatientAssessment(getDomainFactory().find(query, paramNames, paramValues));
}
 
Example 54
Project: AvoinApotti   File: PatientICPActionLinkedDetailsComponentImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(CareContextRefVo careContextRef)
{
	if (careContextRef == null || !careContextRef.getID_CareContextIsNotNull())
		return null;
	
	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().getDomainObject(CareContext.class, careContextRef.getID_CareContext()));
}
 
Example 55
Project: AvoinApotti   File: AppointmentOutcomeDialogImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContext(Booking_AppointmentRefVo bookApptId)
{
	if(bookApptId == null || bookApptId.getID_Booking_Appointment() == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	String query = "select cc from CatsReferral as cats left join cats.appointments as appt left join cats.careContext as cc where appt.id = :ApptId";
	
	List<?> careContextList = factory.find(query, new String[] {"ApptId"}, new Object[] {bookApptId.getID_Booking_Appointment()});
	
	if(careContextList != null && careContextList.size() > 0)
		return CareContextShortVoAssembler.create((CareContext) careContextList.get(0));
	
	return null;
}
 
Example 56
Project: AvoinApotti   File: DataViewImpl.java   Source Code and License 5 votes vote down vote up
public ClinicalContactShortVoCollection listClinicalContacts(CareContextRefVo careContext)
{
	DomainFactory factory = getDomainFactory();
	
	CareContext cc = (CareContext) factory.getDomainObject(CareContext.class, careContext.getID_CareContext());
	
	return ClinicalContactShortVoAssembler.createClinicalContactShortVoCollectionFromClinicalContact(
			cc.getClinicalContacts()).sort();
}
 
Example 57
Project: AvoinApotti   File: MyOrderImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContextByPasEvent(PASEventRefVo pasEvent)
{
	if (pasEvent == null || pasEvent.getID_PASEvent() == null)
		return null;
	
	StringBuilder query = new StringBuilder("SELECT context FROM CareContext AS context LEFT JOIN context.pasEvent AS pas WHERE pas.id = :PAS_EVENT_ID");
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	paramNames.add("PAS_EVENT_ID");
	paramValues.add(pasEvent.getID_PASEvent());
	
	return CareContextShortVoAssembler.create((CareContext) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
 
Example 58
Project: AvoinApotti   File: ReferralCodingImpl.java   Source Code and License 5 votes vote down vote up
public ims.core.vo.CareContextLiteVo getCareContext(ims.RefMan.vo.CatsReferralRefVo catsRefVo)
{
	DomainFactory factory = getDomainFactory();

	if (catsRefVo != null && catsRefVo.getID_CatsReferralIsNotNull())
	{
		java.util.List list = factory.find("select careContext from CatsReferral cats where cats.id = :catsID", new String[]{"catsID"}, new Object[]{catsRefVo.getID_CatsReferral()});
		if (list != null && list.size() >0)
			return CareContextLiteVoAssembler.create((CareContext)list.get(0));
		else
			return null;
	}

	return null;
}
 
Example 59
Project: AvoinApotti   File: ReferralStatusListImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContextShort(CareContextRefVo voCareContextRef) 
{
	if (voCareContextRef == null)
		throw new RuntimeException("Cannot get CareContextShortVo for null CareContextRefVo");

	CareContext doCareContext = (CareContext) getDomainFactory().getDomainObject(CareContext.class, voCareContextRef.getID_CareContext());
	return CareContextShortVoAssembler.create(doCareContext);
}
 
Example 60
Project: AvoinApotti   File: ElectiveListManagementImpl.java   Source Code and License 5 votes vote down vote up
public CareContextShortVo getCareContextShortVo(CareContextRefVo voCareContextRef)
{
	if (voCareContextRef == null)
		throw new RuntimeException("Cannot get CareContextShortVo for null CareContextRefVo");

	CareContext doCareContext = (CareContext) getDomainFactory().getDomainObject(CareContext.class, voCareContextRef.getID_CareContext());
	return CareContextShortVoAssembler.create(doCareContext);
}