Java Code Examples for ims.nursing.vo.NutritionalRiskAssessmentVo

The following are top voted examples for showing how to use ims.nursing.vo.NutritionalRiskAssessmentVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected NutritionalRiskAssessmentVo populateDataFromScreen()
{
	NutritionalRiskAssessmentVo record = super.populateDataFromScreen();
	
	if(form.getLocalContext().getHcp() != null)
		record.setHcpInitiated(form.getLocalContext().getHcp());
	
	record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

	return record;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected NutritionalRiskAssessmentVo populateDataFromScreen(NutritionalRiskAssessmentVo value)
{
	NutritionalRiskAssessmentVo record = super.populateDataFromScreen(value);

	//we keep the original HCP
	//if(form.getLocalContext().getHcp() != null)
		//record.setHcpInitiated(form.getLocalContext().getHcp());
	
	record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));
	
	return record;
}
 
Example 3
Project: AvoinApotti   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public NutritionalRiskAssessmentVo getRecord(Integer recordId) throws DomainInterfaceException
{
	DomainFactory factory = getDomainFactory();
	
	NutritionalRiskAssessment domAssess = (NutritionalRiskAssessment)factory.getDomainObject(NutritionalRiskAssessment.class, recordId);
	return(NutritionalRiskAssessmentVoAssembler.create(domAssess));
}
 
Example 4
Project: AvoinApotti   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
	// Ensure the Value Object was validated
	if (!nutritionalRiskRecord.isValidated())
		throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");
		
	DomainFactory factory = getDomainFactory();			
	NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	
	factory.save(domAssessment);
	
	if(vitalSign != null)
		saveVitalSign(vitalSign);
	
	if (assessment != null)
	{
		if(component != null && component instanceof NurAssessmentEatingVo)
		{
			NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
			nutritionalRisk.validate();
			
			((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
			component.validate();
		}

		assessment.validate();

		return saveEatingComponent(assessment, component, null);
	}
	return null;  // It otherwise expects assessment header
}
 
Example 5
Project: AvoinApotti   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public Boolean isPartOfEatingAssessment(NutritionalRiskAssessmentVo nutritionalRiskRecord) throws DomainInterfaceException
{
	DomainFactory factory = getDomainFactory();
	
	NutritionalRiskAssessment domNutritionalRisk = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	java.util.List water = factory.find("from NurEatingComponent n where n.nutritionalRiskAssessment = :nr", "nr", domNutritionalRisk);
	
	if(water == null || water.size() == 0)
		return Boolean.FALSE;
	
	return Boolean.TRUE;
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected NutritionalRiskAssessmentVo populateDataFromScreen()
{
	NutritionalRiskAssessmentVo record = super.populateDataFromScreen();
	
	if(form.getLocalContext().getHcp() != null)
		record.setHcpInitiated(form.getLocalContext().getHcp());
	
	record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

	return record;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected NutritionalRiskAssessmentVo populateDataFromScreen(NutritionalRiskAssessmentVo value)
{
	NutritionalRiskAssessmentVo record = super.populateDataFromScreen(value);

	//we keep the original HCP
	//if(form.getLocalContext().getHcp() != null)
		//record.setHcpInitiated(form.getLocalContext().getHcp());
	
	record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));
	
	return record;
}
 
Example 8
Project: openMAXIMS   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public NutritionalRiskAssessmentVo getRecord(Integer recordId) throws DomainInterfaceException
{
	DomainFactory factory = getDomainFactory();
	
	NutritionalRiskAssessment domAssess = (NutritionalRiskAssessment)factory.getDomainObject(NutritionalRiskAssessment.class, recordId);
	return(NutritionalRiskAssessmentVoAssembler.create(domAssess));
}
 
Example 9
Project: openMAXIMS   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
	// Ensure the Value Object was validated
	if (!nutritionalRiskRecord.isValidated())
		throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");
		
	DomainFactory factory = getDomainFactory();			
	NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	
	factory.save(domAssessment);
	
	if(vitalSign != null)
		saveVitalSign(vitalSign);
	
	if (assessment != null)
	{
		if(component != null && component instanceof NurAssessmentEatingVo)
		{
			NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
			nutritionalRisk.validate();
			
			((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
			component.validate();
		}

		assessment.validate();

		return saveEatingComponent(assessment, component, null);
	}
	return null;  // It otherwise expects assessment header
}
 
Example 10
Project: openMAXIMS   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public Boolean isPartOfEatingAssessment(NutritionalRiskAssessmentVo nutritionalRiskRecord) throws DomainInterfaceException
{
	DomainFactory factory = getDomainFactory();
	
	NutritionalRiskAssessment domNutritionalRisk = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	java.util.List water = factory.find("from NurEatingComponent n where n.nutritionalRiskAssessment = :nr", "nr", domNutritionalRisk);
	
	if(water == null || water.size() == 0)
		return Boolean.FALSE;
	
	return Boolean.TRUE;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected NutritionalRiskAssessmentVo populateDataFromScreen()
{
	NutritionalRiskAssessmentVo record = super.populateDataFromScreen();
	
	if(form.getLocalContext().getHcp() != null)
		record.setHcpInitiated(form.getLocalContext().getHcp());
	
	record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

	return record;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected NutritionalRiskAssessmentVo populateDataFromScreen(NutritionalRiskAssessmentVo value)
{
	NutritionalRiskAssessmentVo record = super.populateDataFromScreen(value);

	//we keep the original HCP
	//if(form.getLocalContext().getHcp() != null)
		//record.setHcpInitiated(form.getLocalContext().getHcp());
	
	record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));
	
	return record;
}
 
Example 13
Project: openMAXIMS   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public NutritionalRiskAssessmentVo getRecord(Integer recordId) throws DomainInterfaceException
{
	DomainFactory factory = getDomainFactory();
	
	NutritionalRiskAssessment domAssess = (NutritionalRiskAssessment)factory.getDomainObject(NutritionalRiskAssessment.class, recordId);
	return(NutritionalRiskAssessmentVoAssembler.create(domAssess));
}
 
Example 14
Project: openMAXIMS   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
	// Ensure the Value Object was validated
	if (!nutritionalRiskRecord.isValidated())
		throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");
		
	DomainFactory factory = getDomainFactory();			
	NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	
	factory.save(domAssessment);
	
	if(vitalSign != null)
		saveVitalSign(vitalSign);
	
	if (assessment != null)
	{
		if(component != null && component instanceof NurAssessmentEatingVo)
		{
			NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
			nutritionalRisk.validate();
			
			((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
			component.validate();
		}

		assessment.validate();

		return saveEatingComponent(assessment, component, null);
	}
	return null;  // It otherwise expects assessment header
}
 
Example 15
Project: openMAXIMS   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public Boolean isPartOfEatingAssessment(NutritionalRiskAssessmentVo nutritionalRiskRecord) throws DomainInterfaceException
{
	DomainFactory factory = getDomainFactory();
	
	NutritionalRiskAssessment domNutritionalRisk = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	java.util.List water = factory.find("from NurEatingComponent n where n.nutritionalRiskAssessment = :nr", "nr", domNutritionalRisk);
	
	if(water == null || water.size() == 0)
		return Boolean.FALSE;
	
	return Boolean.TRUE;
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
protected NutritionalRiskAssessmentVo populateDataFromScreen()
{
	NutritionalRiskAssessmentVo record = super.populateDataFromScreen();
	
	if(form.getLocalContext().getHcp() != null)
		record.setHcpInitiated(form.getLocalContext().getHcp());
	
	record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));

	return record;
}
 
Example 17
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
protected NutritionalRiskAssessmentVo populateDataFromScreen(NutritionalRiskAssessmentVo value)
{
	NutritionalRiskAssessmentVo record = super.populateDataFromScreen(value);

	//we keep the original HCP
	//if(form.getLocalContext().getHcp() != null)
		//record.setHcpInitiated(form.getLocalContext().getHcp());
	
	record.setDateTimeInitiated(new DateTime(form.dteDate().getValue(), form.timTime().getValue()));
	
	return record;
}
 
Example 18
Project: openmaxims-linux   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public NutritionalRiskAssessmentVo getRecord(Integer recordId) throws DomainInterfaceException
{
	DomainFactory factory = getDomainFactory();
	
	NutritionalRiskAssessment domAssess = (NutritionalRiskAssessment)factory.getDomainObject(NutritionalRiskAssessment.class, recordId);
	return(NutritionalRiskAssessmentVoAssembler.create(domAssess));
}
 
Example 19
Project: openmaxims-linux   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public AssessmentHeaderInfo saveRecord(NutritionalRiskAssessmentVo nutritionalRiskRecord, AssessmentHeaderInfo assessment, AssessmentComponent component, VitalSignsVo vitalSign) throws StaleObjectException
{
	// Ensure the Value Object was validated
	if (!nutritionalRiskRecord.isValidated())
		throw new DomainRuntimeException("This Nutritional Risk Assessment has not been validated");
		
	DomainFactory factory = getDomainFactory();			
	NutritionalRiskAssessment domAssessment = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	
	factory.save(domAssessment);
	
	if(vitalSign != null)
		saveVitalSign(vitalSign);
	
	if (assessment != null)
	{
		if(component != null && component instanceof NurAssessmentEatingVo)
		{
			NutritionalRiskAssessmentVo nutritionalRisk = NutritionalRiskAssessmentVoAssembler.create(domAssessment);
			nutritionalRisk.validate();
			
			((NurAssessmentEatingVo)component).setNutritionalRiskAssessment(nutritionalRisk);
			component.validate();
		}

		assessment.validate();

		return saveEatingComponent(assessment, component, null);
	}
	return null;  // It otherwise expects assessment header
}
 
Example 20
Project: openmaxims-linux   File: NutritionalRiskAssessmentDialogImpl.java   Source Code and License 5 votes vote down vote up
public Boolean isPartOfEatingAssessment(NutritionalRiskAssessmentVo nutritionalRiskRecord) throws DomainInterfaceException
{
	DomainFactory factory = getDomainFactory();
	
	NutritionalRiskAssessment domNutritionalRisk = NutritionalRiskAssessmentVoAssembler.extractNutritionalRiskAssessment(factory, nutritionalRiskRecord);
	java.util.List water = factory.find("from NurEatingComponent n where n.nutritionalRiskAssessment = :nr", "nr", domNutritionalRisk);
	
	if(water == null || water.size() == 0)
		return Boolean.FALSE;
	
	return Boolean.TRUE;
}
 
Example 21
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
protected void populateScreenFromData(NutritionalRiskAssessmentVo value)
{
	super.populateScreenFromData(value);
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
protected void populateScreenFromData(NutritionalRiskAssessmentVo value)
{
	super.populateScreenFromData(value);
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
protected void populateScreenFromData(NutritionalRiskAssessmentVo value)
{
	super.populateScreenFromData(value);
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
protected void populateScreenFromData(NutritionalRiskAssessmentVo value)
{
	super.populateScreenFromData(value);
}