Java Code Examples for ims.nursing.vo.lookups.AssessmentComponentType

The following are top voted examples for showing how to use ims.nursing.vo.lookups.AssessmentComponentType. 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: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
/**
 * Method to check whether a component of a particular type already exists for the assessment
 * @param factory
 * @param assmnt
 * @param componentType
 * @return
 */
private java.util.List checkExisting(DomainFactory factory, AdmissionAssessment assmnt, AssessmentComponentType componentType)
{
	StringBuffer hql = new StringBuffer("from ims.nursing.assessment.domain.objects.AssessmentComponent this ");
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	hql.append(" where this.assessment.id = :assessment");
	markers.add("assessment");
	values.add(assmnt.getId());
	hql.append(" and this.componentType = :compType");
	markers.add("compType");
	values.add(getDomLookup(componentType));
	hql.append(" and this.isRIE is null");
	return(factory.find(hql.toString(), markers, values));		
}
 
Example 2
Project: AvoinApotti   File: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getLastAssessmentComponentByCareContext(CareContextShortVo voCareContext, AssessmentComponentType assessmentComponentType)
{
	DomainFactory factory = getDomainFactory();
	
	String hql = "select asmntComp " +
			" from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
			" where asmntComp.assessment.careContext.episodeOfCare.id = :episodeID" +
			" and asmntComp.componentType = :compType"+ 
			" and asmntComp.isRIE is null"+
			" order by asmntComp.id desc";

	java.util.List components = factory.find(hql, new String[]{"episodeID", "compType"}, new Object[]{voCareContext.getEpisodeOfCare().getID_EpisodeOfCare(), getDomLookup(assessmentComponentType)});
	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		copyComp.setAssessmentInfo(null);
		copyComp.setID_AssessmentComponent(null);
		return (copyComp);				
	}
	
	return null;	
}
 
Example 3
Project: AvoinApotti   File: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getAssessComponent(Integer admissionAssessId, AssessmentComponentType comptype) 
{
	if(admissionAssessId == null || comptype == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	
	String hql = "select a1_1 from AssessmentComponent as a1_1 left join a1_1.assessment as a2_1 where (a2_1.id = :admassesID and a1_1.componentType = :compType) and a1_1.isRIE is null";

	java.util.List components = factory.find(hql, new String[]{"admassesID", "compType"}, new Object[]{admissionAssessId,getDomLookup(comptype)});

	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		return (copyComp);				
	}
			
	return null;	

}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlanGrd()
{
	CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.BREATHING);
	if (tempColl != null)
	{
		 form.gridCarePlans().getRows().clear();
		 GenForm.gridCarePlansRow tempRow;
		 for (int i=0; i<tempColl.size(); i++)
		 {
			 CarePlanTemplateTitle template = tempColl.get(i);
			 tempRow = form.gridCarePlans().getRows().newRow();
			 tempRow.setValue(template);
			 tempRow.setcolCarePlans(template.getTitle());
		 }
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlanGrd() 
{
	CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.COMMUNICATION);
	if (tempColl != null)
	{
		form.container1().gridCarePlan().getRows().clear();
		GenForm.container1Container.gridCarePlanRow tempRow;
		for (int i=0; i<tempColl.size(); i++)
		{
			CarePlanTemplateTitle template = tempColl.get(i);
			tempRow = form.container1().gridCarePlan().getRows().newRow();
			tempRow.setValue(template);
			tempRow.setcolCarePlans(template.getTitle());
		}
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void prePopulateCarePlanGrd() 
{
	//Populate the Grid CarePlan Templates
	CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.SPIRITUALITY);
	if (votempColl != null)
	{
		form.gridCarePlan().getRows().clear();
		GenForm.gridCarePlanRow tempRow;
		for (int i=0; i<votempColl.size(); i++)
		{
			CarePlanTemplateTitle votemplate = votempColl.get(i);
			tempRow = form.gridCarePlan().getRows().newRow();
			tempRow.setValue(votemplate);
			tempRow.setcolCarePlans(votemplate.getTitle());
		}
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlanGrd() 
{
	// Populate the Grid CarePlan Templates
	CarePlanTemplateTitleCollection voTempColl = domain.listCarePlanTemplates(AssessmentComponentType.SLEEPING);
	if (voTempColl != null)
	{
		form.gCarePlans().getRows().clear();
		GenForm.gCarePlansRow tempRow;
		for (int i=0; i<voTempColl.size(); i++)
		{
			CarePlanTemplateTitle voTemplate = voTempColl.get(i);
			tempRow = form.gCarePlans().getRows().newRow();
			tempRow.setValue(voTemplate);
			tempRow.setcolCarePlans(voTemplate.getTitle());
		}
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void open()
{
	prepareControls();
	
	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo voAssmntHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setAssmnt(voAssmntHeader);
	if (voAssmntHeader != null && voAssmntHeader.getID_AssessmentIsNotNull())
	{		
		AssessmentBladder voAssessBladder = (AssessmentBladder)domain.getComponent(voAssmntHeader,AssessmentComponentType.BLADDER);
		form.getLocalContext().setAssessBladder(voAssessBladder);
		populateInstanceControl(voAssessBladder);			
	}
	else
	{
		//check if there is a relevant component
		getLastAssessmentComponent();	
	}
	
	checkRequireAssistance();
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void prePopulateCarePlanGrd() 
{
	CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.BLADDER);
	if (tempColl != null)
	{
		form.container1().gridCarePlan().getRows().clear();
		GenForm.container1Container.gridCarePlanRow tempRow;
		for (int i=0; i<tempColl.size(); i++)
		{
			CarePlanTemplateTitle template = tempColl.get(i);
			tempRow = form.container1().gridCarePlan().getRows().newRow();
			tempRow.setValue(template);
			tempRow.setcolCarePlans(template.getTitle());
		}
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	prepareControls();

	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo voAssessHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setAssmnt(voAssessHeader);
	if (voAssessHeader != null && voAssessHeader.getID_AssessmentIsNotNull())
	{		
		
		AssessmentBowels voAssessBowel = (AssessmentBowels)domain.getComponent(voAssessHeader,AssessmentComponentType.BOWELS);
		form.getLocalContext().setAssessBowels(voAssessBowel);
		populateInstanceControl(voAssessBowel);
		
	}
	else
	{
		//check if there is a relevant component
		getLastAssessmentComponent();	
	}

}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlanGrd() 
{
	//Populate the Grid CarePlan Templates
	CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.BOWELS);
	if (votempColl != null)
	{
		form.container1().gridCarePlans().getRows().clear();
		GenForm.container1Container.gridCarePlansRow tempRow;
		for (int i=0; i<votempColl.size(); i++)
		{
			CarePlanTemplateTitle votemplate = votempColl.get(i);
			tempRow = form.container1().gridCarePlans().getRows().newRow();
			tempRow.setValue(votemplate);
			tempRow.setcolCarePlans(votemplate.getTitle());
		}
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	form.gridGrooming().setFocus();
	form.setMode(FormMode.EDIT);
	form.getLocalContext().setyesNoColl(ims.core.vo.lookups.LookupHelper.getYesNoUnknown(domain.getLookupService()));
	form.bSave().setEnabled(true);	
	form.gridCarePlan().setReadOnly(false);
	form.checkBoxCopy().setEnabled(false);
		
	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo voAssHeaderInfo = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setassmnt(voAssHeaderInfo);
	if (voAssHeaderInfo != null && voAssHeaderInfo.getID_AssessmentIsNotNull())
	{		
		//AssessmentDressingAndGrooming assessDG = (AssessmentDressingAndGrooming)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.DRESSING);
		AssessmentDressingAndGrooming voAssessDressAndGroom = (AssessmentDressingAndGrooming)domain.getComponent(voAssHeaderInfo,AssessmentComponentType.DRESSING);
		form.getLocalContext().setassmntDG(voAssessDressAndGroom);
		populateInstanceControl(voAssessDressAndGroom);			
	}
	else
	{
		// check if there is a relevant component
		getLastAssessmentComponent();
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlanGrd() 
{
	// Populate the Grid CarePlan Templates
	CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.DRESSING);
	if (votempColl != null)
	{
		 form.gridCarePlan().getRows().clear();
		 GenForm.gridCarePlanRow tempRow;
		 for (int i=0; i<votempColl.size(); i++)
		 {
			  CarePlanTemplateTitle votemplate = votempColl.get(i);
			  tempRow = form.gridCarePlan().getRows().newRow();
			  tempRow.setValue(votemplate);
			  tempRow.setcolCarePlans(votemplate.getTitle());
		 }
	}
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	form.setMode(FormMode.EDIT);
	form.container1().gridCarePlan().setReadOnly(false);
	form.container1().bSave().setEnabled(true);
	form.checkBoxCopy().setEnabled(false);

	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo assmnt = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setassmnt(assmnt);
	if (assmnt != null && assmnt.getID_AssessmentIsNotNull())
	{		
		//AssessmentPersonalHygiene assessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.PERSONAL_HYGIENE);
		AssessmentPersonalHygiene voAssessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt, AssessmentComponentType.PERSONAL_HYGIENE);
		form.getLocalContext().setassessPH(voAssessPH);
		populateInstanceControl(voAssessPH);			
	}
	else
	{
		// check if there is a relevant component
		getLastAssessmentComponent();
	}
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void prePopulateCarePlanGrd() 
{
	// Populate the Grid CarePlan Templates
	form.container1().gridCarePlan().getRows().clear();
	CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.PERSONAL_HYGIENE);
	if (votempColl != null)
	{
		 form.container1().gridCarePlan().getRows().clear();
		 GenForm.container1Container.gridCarePlanRow tempRow;
		 for (int i=0; i<votempColl.size(); i++)
		 {
			 CarePlanTemplateTitle votemplate = votempColl.get(i);
			 tempRow = form.container1().gridCarePlan().getRows().newRow();
			 tempRow.setValue(votemplate);
			 tempRow.setcolCarePlans(votemplate.getTitle());
		 }
	}
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void prePopulateCarePlanGrd()
{
	// Populate the Grid CarePlan Templates
	    CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.EATING);
	if (votempColl != null)
	{
		  form.container1().gridCarePlan().getRows().clear();
		  GenForm.container1Container.gridCarePlanRow tempRow;
		  for (int i=0; i<votempColl.size(); i++)
		  {
			   CarePlanTemplateTitle votemplate = votempColl.get(i);
			   tempRow = form.container1().gridCarePlan().getRows().newRow();
			   tempRow.setValue(votemplate);
			   tempRow.setcolCarePlans(votemplate.getTitle());
		  }
	}
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	form.container1().gridEmotional().setFocus();
	form.setMode(FormMode.EDIT);
	form.container1().bSave().setEnabled(true);
	form.container1().gridCarePlan().setReadOnly(false);
	form.checkBoxCopy().setEnabled(false);
	
	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo voAssmntHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setAssmnt(voAssmntHeader);
	if (voAssmntHeader != null && voAssmntHeader.getID_AssessmentIsNotNull())
	{		
		//AssessmentEmotionalState assessEM = (AssessmentEmotionalState)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.EMOTIONAL_STATE);
		AssessmentEmotionalState voAssessEM = (AssessmentEmotionalState)domain.getComponent(voAssmntHeader,AssessmentComponentType.EMOTIONAL_STATE);
		form.getLocalContext().setAssessEmotionalState(voAssessEM);
		populateInstanceControl(voAssessEM);			
	}
	else
	{
		// check if there is a relevant component
		getLastAssessmentComponent();
	}
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void prePopulateCarePlanGrd() 
{
	CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.EMOTIONAL_STATE);
	if (tempColl != null)
	{
		form.container1().gridCarePlan().getRows().clear();
		GenForm.container1Container.gridCarePlanRow tempRow;
		
		for (int i=0; i<tempColl.size(); i++)
		{
			CarePlanTemplateTitle template = tempColl.get(i);
			tempRow = form.container1().gridCarePlan().getRows().newRow();
			tempRow.setValue(template);
			tempRow.setcolCarePlans(template.getTitle());
		}
	}
}
 
Example 19
Project: AvoinApotti   File: AssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getLastAssessmentComponent(PatientShort patientVo, AssessmentComponentType componentTypeVo) 
{
	DomainFactory factory = getDomainFactory();
	
	String hql1 =  "select asmntComp " +
	" from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
	" where asmntComp.assessment.careContext.episodeOfCare.careSpell.patient.id = :idPatient" +
	" and asmntComp.componentType = :compType" +
	" order by asmntComp.id desc";
	
	java.util.List<?> components = factory.find(hql1, new String[]{"idPatient", "compType"}, new Object[]{patientVo.getID_Patient(), getDomLookup(componentTypeVo)});

	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		copyComp.setAssessmentInfo(null);
		copyComp.setID_AssessmentComponent(null);
		return (copyComp);				
	}
	return null;
}
 
Example 20
Project: AvoinApotti   File: AssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getLastAssessmentComponent(PatientShort patientVo, CareContextRefVo careContextRefVo, AssessmentComponentType componentTypeVo) 
{

	DomainFactory factory = getDomainFactory();
	
	String hql1 =  "select asmntComp " +
	" from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
	" where asmntComp.assessment.careContext.episodeOfCare.careSpell.patient.id = :idPatient" +
	" and asmntComp.componentType = :compType" +
	" order by asmntComp.id desc";
	
	java.util.List<?> components = factory.find(hql1, new String[]{"idPatient", "compType"}, new Object[]{patientVo.getID_Patient(), getDomLookup(componentTypeVo)});

	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		copyComp.setAssessmentInfo(null);
		copyComp.setID_AssessmentComponent(null);
		return (copyComp);				
	} 
	return null;			
}
 
Example 21
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void prePopulateCarePlanGrd() 
{
	CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.BLADDER);
	if (tempColl != null)
	{
		form.container1().gridCarePlan().getRows().clear();
		GenForm.container1Container.gridCarePlanRow tempRow;
		for (int i=0; i<tempColl.size(); i++)
		{
			CarePlanTemplateTitle template = tempColl.get(i);
			tempRow = form.container1().gridCarePlan().getRows().newRow();
			tempRow.setValue(template);
			tempRow.setcolCarePlans(template.getTitle());
		}
	}
}
 
Example 22
Project: openMAXIMS   File: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
/**
 * Method to check whether a component of a particular type already exists for the assessment
 * @param factory
 * @param assmnt
 * @param componentType
 * @return
 */
private java.util.List checkExisting(DomainFactory factory, AdmissionAssessment assmnt, AssessmentComponentType componentType)
{
	StringBuffer hql = new StringBuffer("from ims.nursing.assessment.domain.objects.AssessmentComponent this ");
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	hql.append(" where this.assessment.id = :assessment");
	markers.add("assessment");
	values.add(assmnt.getId());
	hql.append(" and this.componentType = :compType");
	markers.add("compType");
	values.add(getDomLookup(componentType));
	hql.append(" and this.isRIE is null");
	return(factory.find(hql.toString(), markers, values));		
}
 
Example 23
Project: openMAXIMS   File: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getLastAssessmentComponentByCareContext(CareContextShortVo voCareContext, AssessmentComponentType assessmentComponentType)
{
	DomainFactory factory = getDomainFactory();
	
	String hql = "select asmntComp " +
			" from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
			" where asmntComp.assessment.careContext.episodeOfCare.id = :episodeID" +
			" and asmntComp.componentType = :compType"+ 
			" and asmntComp.isRIE is null"+
			" order by asmntComp.id desc";

	java.util.List components = factory.find(hql, new String[]{"episodeID", "compType"}, new Object[]{voCareContext.getEpisodeOfCare().getID_EpisodeOfCare(), getDomLookup(assessmentComponentType)});
	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		copyComp.setAssessmentInfo(null);
		copyComp.setID_AssessmentComponent(null);
		return (copyComp);				
	}
	
	return null;	
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlanGrd() 
{
	CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.COMMUNICATION);
	if (tempColl != null)
	{
		form.container1().gridCarePlan().getRows().clear();
		GenForm.container1Container.gridCarePlanRow tempRow;
		for (int i=0; i<tempColl.size(); i++)
		{
			CarePlanTemplateTitle template = tempColl.get(i);
			tempRow = form.container1().gridCarePlan().getRows().newRow();
			tempRow.setValue(template);
			tempRow.setcolCarePlans(template.getTitle());
		}
	}
}
 
Example 25
Project: openmaxims-linux   File: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
/**
 * Method to check whether a component of a particular type already exists for the assessment
 * @param factory
 * @param assmnt
 * @param componentType
 * @return
 */
private java.util.List checkExisting(DomainFactory factory, AdmissionAssessment assmnt, AssessmentComponentType componentType)
{
	StringBuffer hql = new StringBuffer("from ims.nursing.assessment.domain.objects.AssessmentComponent this ");
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	hql.append(" where this.assessment.id = :assessment");
	markers.add("assessment");
	values.add(assmnt.getId());
	hql.append(" and this.componentType = :compType");
	markers.add("compType");
	values.add(getDomLookup(componentType));
	hql.append(" and this.isRIE is null");
	return(factory.find(hql.toString(), markers, values));		
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void prePopulateCarePlanGrd() 
{
	CarePlanTemplateTitleCollection tempColl = domain.listCarePlanTemplates(AssessmentComponentType.BLADDER);
	if (tempColl != null)
	{
		form.container1().gridCarePlan().getRows().clear();
		GenForm.container1Container.gridCarePlanRow tempRow;
		for (int i=0; i<tempColl.size(); i++)
		{
			CarePlanTemplateTitle template = tempColl.get(i);
			tempRow = form.container1().gridCarePlan().getRows().newRow();
			tempRow.setValue(template);
			tempRow.setcolCarePlans(template.getTitle());
		}
	}
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	prepareControls();

	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo voAssessHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setAssmnt(voAssessHeader);
	if (voAssessHeader != null && voAssessHeader.getID_AssessmentIsNotNull())
	{		
		
		AssessmentBowels voAssessBowel = (AssessmentBowels)domain.getComponent(voAssessHeader,AssessmentComponentType.BOWELS);
		form.getLocalContext().setAssessBowels(voAssessBowel);
		populateInstanceControl(voAssessBowel);
		
	}
	else
	{
		//check if there is a relevant component
		getLastAssessmentComponent();	
	}

}
 
Example 28
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlanGrd() 
{
	//Populate the Grid CarePlan Templates
	CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.BOWELS);
	if (votempColl != null)
	{
		form.container1().gridCarePlans().getRows().clear();
		GenForm.container1Container.gridCarePlansRow tempRow;
		for (int i=0; i<votempColl.size(); i++)
		{
			CarePlanTemplateTitle votemplate = votempColl.get(i);
			tempRow = form.container1().gridCarePlans().getRows().newRow();
			tempRow.setValue(votemplate);
			tempRow.setcolCarePlans(votemplate.getTitle());
		}
	}
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void loadCarePlanGrd() 
{
	// Populate the Grid CarePlan Templates
	CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.DRESSING);
	if (votempColl != null)
	{
		 form.gridCarePlan().getRows().clear();
		 GenForm.gridCarePlanRow tempRow;
		 for (int i=0; i<votempColl.size(); i++)
		 {
			  CarePlanTemplateTitle votemplate = votempColl.get(i);
			  tempRow = form.gridCarePlan().getRows().newRow();
			  tempRow.setValue(votemplate);
			  tempRow.setcolCarePlans(votemplate.getTitle());
		 }
	}
}
 
Example 30
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	form.setMode(FormMode.EDIT);
	form.container1().gridCarePlan().setReadOnly(false);
	form.container1().bSave().setEnabled(true);
	form.checkBoxCopy().setEnabled(false);

	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo assmnt = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setassmnt(assmnt);
	if (assmnt != null && assmnt.getID_AssessmentIsNotNull())
	{		
		//AssessmentPersonalHygiene assessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.PERSONAL_HYGIENE);
		AssessmentPersonalHygiene voAssessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt, AssessmentComponentType.PERSONAL_HYGIENE);
		form.getLocalContext().setassessPH(voAssessPH);
		populateInstanceControl(voAssessPH);			
	}
	else
	{
		// check if there is a relevant component
		getLastAssessmentComponent();
	}
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	form.gridGrooming().setFocus();
	form.setMode(FormMode.EDIT);
	form.getLocalContext().setyesNoColl(ims.core.vo.lookups.LookupHelper.getYesNoUnknown(domain.getLookupService()));
	form.bSave().setEnabled(true);	
	form.gridCarePlan().setReadOnly(false);
	form.checkBoxCopy().setEnabled(false);
		
	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo voAssHeaderInfo = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setassmnt(voAssHeaderInfo);
	if (voAssHeaderInfo != null && voAssHeaderInfo.getID_AssessmentIsNotNull())
	{		
		//AssessmentDressingAndGrooming assessDG = (AssessmentDressingAndGrooming)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.DRESSING);
		AssessmentDressingAndGrooming voAssessDressAndGroom = (AssessmentDressingAndGrooming)domain.getComponent(voAssHeaderInfo,AssessmentComponentType.DRESSING);
		form.getLocalContext().setassmntDG(voAssessDressAndGroom);
		populateInstanceControl(voAssessDressAndGroom);			
	}
	else
	{
		// check if there is a relevant component
		getLastAssessmentComponent();
	}
}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void prePopulateCarePlanGrd()
{
	// Populate the Grid CarePlan Templates
	    CarePlanTemplateTitleCollection votempColl = domain.listCarePlanTemplates(AssessmentComponentType.EATING);
	if (votempColl != null)
	{
		  form.container1().gridCarePlan().getRows().clear();
		  GenForm.container1Container.gridCarePlanRow tempRow;
		  for (int i=0; i<votempColl.size(); i++)
		  {
			   CarePlanTemplateTitle votemplate = votempColl.get(i);
			   tempRow = form.container1().gridCarePlan().getRows().newRow();
			   tempRow.setValue(votemplate);
			   tempRow.setcolCarePlans(votemplate.getTitle());
		  }
	}
}
 
Example 33
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void open()
{
	prepareControls();
	
	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo voAssmntHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setAssmnt(voAssmntHeader);
	if (voAssmntHeader != null && voAssmntHeader.getID_AssessmentIsNotNull())
	{		
		AssessmentBladder voAssessBladder = (AssessmentBladder)domain.getComponent(voAssmntHeader,AssessmentComponentType.BLADDER);
		form.getLocalContext().setAssessBladder(voAssessBladder);
		populateInstanceControl(voAssessBladder);			
	}
	else
	{
		//check if there is a relevant component
		getLastAssessmentComponent();	
	}
	
	checkRequireAssistance();
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	form.container1().gridEmotional().setFocus();
	form.setMode(FormMode.EDIT);
	form.container1().bSave().setEnabled(true);
	form.container1().gridCarePlan().setReadOnly(false);
	form.checkBoxCopy().setEnabled(false);
	
	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo voAssmntHeader = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setAssmnt(voAssmntHeader);
	if (voAssmntHeader != null && voAssmntHeader.getID_AssessmentIsNotNull())
	{		
		//AssessmentEmotionalState assessEM = (AssessmentEmotionalState)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.EMOTIONAL_STATE);
		AssessmentEmotionalState voAssessEM = (AssessmentEmotionalState)domain.getComponent(voAssmntHeader,AssessmentComponentType.EMOTIONAL_STATE);
		form.getLocalContext().setAssessEmotionalState(voAssessEM);
		populateInstanceControl(voAssessEM);			
	}
	else
	{
		// check if there is a relevant component
		getLastAssessmentComponent();
	}
}
 
Example 35
Project: openMAXIMS   File: AssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getLastAssessmentComponent(PatientShort patientVo, AssessmentComponentType componentTypeVo) 
{
	DomainFactory factory = getDomainFactory();
	
	String hql1 =  "select asmntComp " +
	" from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
	" where asmntComp.assessment.careContext.episodeOfCare.careSpell.patient.id = :idPatient" +
	" and asmntComp.componentType = :compType" +
	" order by asmntComp.id desc";
	
	java.util.List<?> components = factory.find(hql1, new String[]{"idPatient", "compType"}, new Object[]{patientVo.getID_Patient(), getDomLookup(componentTypeVo)});

	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		copyComp.setAssessmentInfo(null);
		copyComp.setID_AssessmentComponent(null);
		return (copyComp);				
	}
	return null;
}
 
Example 36
Project: openmaxims-linux   File: AssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getLastAssessmentComponent(PatientShort patientVo, AssessmentComponentType componentTypeVo) 
{
	DomainFactory factory = getDomainFactory();
	
	String hql1 =  "select asmntComp " +
	" from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
	" where asmntComp.assessment.careContext.episodeOfCare.careSpell.patient.id = :idPatient" +
	" and asmntComp.componentType = :compType" +
	" order by asmntComp.id desc";
	
	java.util.List<?> components = factory.find(hql1, new String[]{"idPatient", "compType"}, new Object[]{patientVo.getID_Patient(), getDomLookup(componentTypeVo)});

	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		copyComp.setAssessmentInfo(null);
		copyComp.setID_AssessmentComponent(null);
		return (copyComp);				
	}
	return null;
}
 
Example 37
Project: openMAXIMS   File: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
/**
 * Method to check whether a component of a particular type already exists for the assessment
 * @param factory
 * @param assmnt
 * @param componentType
 * @return
 */
private java.util.List checkExisting(DomainFactory factory, AdmissionAssessment assmnt, AssessmentComponentType componentType)
{
	StringBuffer hql = new StringBuffer("from ims.nursing.assessment.domain.objects.AssessmentComponent this ");
	ArrayList markers = new ArrayList();
	ArrayList values = new ArrayList();

	hql.append(" where this.assessment.id = :assessment");
	markers.add("assessment");
	values.add(assmnt.getId());
	hql.append(" and this.componentType = :compType");
	markers.add("compType");
	values.add(getDomLookup(componentType));
	hql.append(" and this.isRIE is null");
	return(factory.find(hql.toString(), markers, values));		
}
 
Example 38
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void open() 
{
	form.setMode(FormMode.EDIT);
	form.container1().gridCarePlan().setReadOnly(false);
	form.container1().bSave().setEnabled(true);
	form.checkBoxCopy().setEnabled(false);

	// If there is an assessment in the global context, we want to call the get component domain method
	// Otherwise, it is a new assessment component
	AssessmentHeaderInfo assmnt = form.getGlobalContext().Nursing.getAssessmentHeaderInfo();
	form.getLocalContext().setassmnt(assmnt);
	if (assmnt != null && assmnt.getID_AssessmentIsNotNull())
	{		
		//AssessmentPersonalHygiene assessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt.getCurrentComponent(), AssessmentComponentType.PERSONAL_HYGIENE);
		AssessmentPersonalHygiene voAssessPH = (AssessmentPersonalHygiene)domain.getComponent(assmnt, AssessmentComponentType.PERSONAL_HYGIENE);
		form.getLocalContext().setassessPH(voAssessPH);
		populateInstanceControl(voAssessPH);			
	}
	else
	{
		// check if there is a relevant component
		getLastAssessmentComponent();
	}
}
 
Example 39
Project: openMAXIMS   File: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getLastAssessmentComponentByCareContext(CareContextShortVo voCareContext, AssessmentComponentType assessmentComponentType)
{
	DomainFactory factory = getDomainFactory();
	
	String hql = "select asmntComp " +
			" from ims.nursing.assessment.domain.objects.AssessmentComponent asmntComp " +
			" where asmntComp.assessment.careContext.episodeOfCare.id = :episodeID" +
			" and asmntComp.componentType = :compType"+ 
			" and asmntComp.isRIE is null"+
			" order by asmntComp.id desc";

	java.util.List components = factory.find(hql, new String[]{"episodeID", "compType"}, new Object[]{voCareContext.getEpisodeOfCare().getID_EpisodeOfCare(), getDomLookup(assessmentComponentType)});
	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		copyComp.setAssessmentInfo(null);
		copyComp.setID_AssessmentComponent(null);
		return (copyComp);				
	}
	
	return null;	
}
 
Example 40
Project: openMAXIMS   File: NurAssessmentComponentImpl.java   View source code 6 votes vote down vote up
public AssessmentComponent getAssessComponent(Integer admissionAssessId, AssessmentComponentType comptype) 
{
	if(admissionAssessId == null || comptype == null)
		return null;
	
	DomainFactory factory = getDomainFactory();
	
	String hql = "select a1_1 from AssessmentComponent as a1_1 left join a1_1.assessment as a2_1 where (a2_1.id = :admassesID and a1_1.componentType = :compType) and a1_1.isRIE is null";

	java.util.List components = factory.find(hql, new String[]{"admassesID", "compType"}, new Object[]{admissionAssessId,getDomLookup(comptype)});

	if ( components != null && ! components.isEmpty()) 
	{
		ims.nursing.assessment.domain.objects.AssessmentComponent comp = (ims.nursing.assessment.domain.objects.AssessmentComponent) components.get(0);
		AssessmentComponent copyComp = getComponent(AssessmentComponentAssembler.create(comp));
		return (copyComp);				
	}
			
	return null;	

}