Java Code Examples for ims.coe.vo.RiskDescription

The following are top voted examples for showing how to use ims.coe.vo.RiskDescription. 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   View source code 5 votes vote down vote up
private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails)
{
	int nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++)
	{
		risk = form.getGlobalContext().COE.getBradenAssessments().get(i);

		if (risk.getName().equalsIgnoreCase(colFall))
		{
			for (int j = 0; j < risk.getRiskFactors().size(); j++)
			{
				descr = risk.getRiskFactors().get(j);

				for (int k = 0; k < assessmentDetails.size(); k++)
				{
					if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE))
					{
						nScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}

			break;
		}
	}

	return nScore;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails)
{
	int nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++)
	{
		risk = form.getGlobalContext().COE.getBradenAssessments().get(i);

		if (risk.getName().equalsIgnoreCase(colFall))
		{
			for (int j = 0; j < risk.getRiskFactors().size(); j++)
			{
				descr = risk.getRiskFactors().get(j);

				for (int k = 0; k < assessmentDetails.size(); k++)
				{
					if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE))
					{
						nScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}

			break;
		}
	}

	return nScore;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore(WaterlowAssessmentDetailsVoCollection coll)
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < coll.size(); i++)
	{
		WaterlowAssessmentDetailsVo child = coll.get(i);

		risk = null;
		partScore = 0;
		
		for(int k = 0; k < form.getGlobalContext().Nursing.getWaterlowAssessments().size(); k++)
		{
			risk = form.getGlobalContext().Nursing.getWaterlowAssessments().get(k);
			
			for(int m = 0; m < risk.getRiskFactors().size(); m++)
			{
				descr = risk.getRiskFactors().get(m);
				
				if(child.getAssessment().toString().equals(descr.getId()) && Boolean.TRUE.equals(child.getSelect()))
				{
					partScore += Integer.valueOf(descr.getScore()).intValue();
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private float getAssessmentScore()
{
	float nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	float partScore;
	for (int i = 0; i < form.grdRiskAssessment().getRows().size(); i++)
	{
		GenForm.grdRiskAssessmentRow row = form.grdRiskAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdRiskAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().COE.getFallRiskAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getFallRiskAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Float.valueOf(descr.getScore()).floatValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private float getScreeningScore()
{
	float nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.grdScreening().getRows().size(); i++)
	{
		GenForm.grdScreeningRow row = form.grdScreening().getRows().get(i);

		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdScreeningRow child = row.getRows().get(j);

			for (int k = 0; k < form.getGlobalContext().COE.getMNAAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getMNAAssessments().get(k);

				for (int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);

					if (child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						nScore += Float.valueOf(descr.getScore()).floatValue();
					}
				}
			}
		}
	}

	return nScore;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdRiskAssessment().getRows().size(); i++)
	{
		GenForm.grdRiskAssessmentRow row = form.grdRiskAssessment().getRows().get(i);

		risk = null;
		partScore = 0;

		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdRiskAssessmentRow child = row.getRows().get(j);

			for (int k = 0; k < form.getGlobalContext().COE.getBradenAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getBradenAssessments().get(k);

				for (int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);

					if (child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}

		nScore += partScore;
	}

	return nScore;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdAssessment().getRows().size(); i++)
	{
		GenForm.grdAssessmentRow row = form.grdAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().Nursing.getNutritionalRiskAssessments().size(); k++)
			{
				risk = form.getGlobalContext().Nursing.getNutritionalRiskAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdAssessment().getRows().size(); i++)
	{
		GenForm.grdAssessmentRow row = form.grdAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().Nursing.getWaterlowAssessments().size(); k++)
			{
				risk = form.getGlobalContext().Nursing.getWaterlowAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 9
Project: AvoinApotti   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws PresentationLogicException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	if(doc == null)
		return risks;
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
		risk.setMandatoryAnswer(new Boolean(attribute.valueOf("@mandatory").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 10
Project: AvoinApotti   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws DocumentException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 11
Project: AvoinApotti   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws PresentationLogicException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	if(doc == null)
		return risks;
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
		risk.setMandatoryAnswer(new Boolean(attribute.valueOf("@mandatory").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails)
{
	int nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++)
	{
		risk = form.getGlobalContext().COE.getBradenAssessments().get(i);

		if (risk.getName().equalsIgnoreCase(colFall))
		{
			for (int j = 0; j < risk.getRiskFactors().size(); j++)
			{
				descr = risk.getRiskFactors().get(j);

				for (int k = 0; k < assessmentDetails.size(); k++)
				{
					if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE))
					{
						nScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}

			break;
		}
	}

	return nScore;
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails)
{
	int nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++)
	{
		risk = form.getGlobalContext().COE.getBradenAssessments().get(i);

		if (risk.getName().equalsIgnoreCase(colFall))
		{
			for (int j = 0; j < risk.getRiskFactors().size(); j++)
			{
				descr = risk.getRiskFactors().get(j);

				for (int k = 0; k < assessmentDetails.size(); k++)
				{
					if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE))
					{
						nScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}

			break;
		}
	}

	return nScore;
}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore(WaterlowAssessmentDetailsVoCollection coll)
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < coll.size(); i++)
	{
		WaterlowAssessmentDetailsVo child = coll.get(i);

		risk = null;
		partScore = 0;
		
		for(int k = 0; k < form.getGlobalContext().Nursing.getWaterlowAssessments().size(); k++)
		{
			risk = form.getGlobalContext().Nursing.getWaterlowAssessments().get(k);
			
			for(int m = 0; m < risk.getRiskFactors().size(); m++)
			{
				descr = risk.getRiskFactors().get(m);
				
				if(child.getAssessment().toString().equals(descr.getId()) && Boolean.TRUE.equals(child.getSelect()))
				{
					partScore += Integer.valueOf(descr.getScore()).intValue();
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private float getAssessmentScore()
{
	float nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	float partScore;
	for (int i = 0; i < form.grdRiskAssessment().getRows().size(); i++)
	{
		GenForm.grdRiskAssessmentRow row = form.grdRiskAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdRiskAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().COE.getFallRiskAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getFallRiskAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Float.valueOf(descr.getScore()).floatValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private float getScreeningScore()
{
	float nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.grdScreening().getRows().size(); i++)
	{
		GenForm.grdScreeningRow row = form.grdScreening().getRows().get(i);

		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdScreeningRow child = row.getRows().get(j);

			for (int k = 0; k < form.getGlobalContext().COE.getMNAAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getMNAAssessments().get(k);

				for (int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);

					if (child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						nScore += Float.valueOf(descr.getScore()).floatValue();
					}
				}
			}
		}
	}

	return nScore;
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdRiskAssessment().getRows().size(); i++)
	{
		GenForm.grdRiskAssessmentRow row = form.grdRiskAssessment().getRows().get(i);

		risk = null;
		partScore = 0;

		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdRiskAssessmentRow child = row.getRows().get(j);

			for (int k = 0; k < form.getGlobalContext().COE.getBradenAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getBradenAssessments().get(k);

				for (int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);

					if (child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}

		nScore += partScore;
	}

	return nScore;
}
 
Example 18
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdAssessment().getRows().size(); i++)
	{
		GenForm.grdAssessmentRow row = form.grdAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().Nursing.getNutritionalRiskAssessments().size(); k++)
			{
				risk = form.getGlobalContext().Nursing.getNutritionalRiskAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 19
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdAssessment().getRows().size(); i++)
	{
		GenForm.grdAssessmentRow row = form.grdAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().Nursing.getWaterlowAssessments().size(); k++)
			{
				risk = form.getGlobalContext().Nursing.getWaterlowAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 20
Project: openMAXIMS   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws PresentationLogicException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	if(doc == null)
		return risks;
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
		risk.setMandatoryAnswer(new Boolean(attribute.valueOf("@mandatory").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 21
Project: openMAXIMS   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws DocumentException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 22
Project: openMAXIMS   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws PresentationLogicException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	if(doc == null)
		return risks;
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
		risk.setMandatoryAnswer(new Boolean(attribute.valueOf("@mandatory").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails)
{
	int nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++)
	{
		risk = form.getGlobalContext().COE.getBradenAssessments().get(i);

		if (risk.getName().equalsIgnoreCase(colFall))
		{
			for (int j = 0; j < risk.getRiskFactors().size(); j++)
			{
				descr = risk.getRiskFactors().get(j);

				for (int k = 0; k < assessmentDetails.size(); k++)
				{
					if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE))
					{
						nScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}

			break;
		}
	}

	return nScore;
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails)
{
	int nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++)
	{
		risk = form.getGlobalContext().COE.getBradenAssessments().get(i);

		if (risk.getName().equalsIgnoreCase(colFall))
		{
			for (int j = 0; j < risk.getRiskFactors().size(); j++)
			{
				descr = risk.getRiskFactors().get(j);

				for (int k = 0; k < assessmentDetails.size(); k++)
				{
					if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE))
					{
						nScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}

			break;
		}
	}

	return nScore;
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore(WaterlowAssessmentDetailsVoCollection coll)
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < coll.size(); i++)
	{
		WaterlowAssessmentDetailsVo child = coll.get(i);

		risk = null;
		partScore = 0;
		
		for(int k = 0; k < form.getGlobalContext().Nursing.getWaterlowAssessments().size(); k++)
		{
			risk = form.getGlobalContext().Nursing.getWaterlowAssessments().get(k);
			
			for(int m = 0; m < risk.getRiskFactors().size(); m++)
			{
				descr = risk.getRiskFactors().get(m);
				
				if(child.getAssessment().toString().equals(descr.getId()) && Boolean.TRUE.equals(child.getSelect()))
				{
					partScore += Integer.valueOf(descr.getScore()).intValue();
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private float getAssessmentScore()
{
	float nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	float partScore;
	for (int i = 0; i < form.grdRiskAssessment().getRows().size(); i++)
	{
		GenForm.grdRiskAssessmentRow row = form.grdRiskAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdRiskAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().COE.getFallRiskAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getFallRiskAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Float.valueOf(descr.getScore()).floatValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private float getScreeningScore()
{
	float nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.grdScreening().getRows().size(); i++)
	{
		GenForm.grdScreeningRow row = form.grdScreening().getRows().get(i);

		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdScreeningRow child = row.getRows().get(j);

			for (int k = 0; k < form.getGlobalContext().COE.getMNAAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getMNAAssessments().get(k);

				for (int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);

					if (child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						nScore += Float.valueOf(descr.getScore()).floatValue();
					}
				}
			}
		}
	}

	return nScore;
}
 
Example 28
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdRiskAssessment().getRows().size(); i++)
	{
		GenForm.grdRiskAssessmentRow row = form.grdRiskAssessment().getRows().get(i);

		risk = null;
		partScore = 0;

		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdRiskAssessmentRow child = row.getRows().get(j);

			for (int k = 0; k < form.getGlobalContext().COE.getBradenAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getBradenAssessments().get(k);

				for (int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);

					if (child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}

		nScore += partScore;
	}

	return nScore;
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdAssessment().getRows().size(); i++)
	{
		GenForm.grdAssessmentRow row = form.grdAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().Nursing.getNutritionalRiskAssessments().size(); k++)
			{
				risk = form.getGlobalContext().Nursing.getNutritionalRiskAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 30
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdAssessment().getRows().size(); i++)
	{
		GenForm.grdAssessmentRow row = form.grdAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().Nursing.getWaterlowAssessments().size(); k++)
			{
				risk = form.getGlobalContext().Nursing.getWaterlowAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 31
Project: openMAXIMS   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws PresentationLogicException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	if(doc == null)
		return risks;
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
		risk.setMandatoryAnswer(new Boolean(attribute.valueOf("@mandatory").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 32
Project: openMAXIMS   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws DocumentException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 33
Project: openMAXIMS   File: RiskAssessmentHelper.java   View source code 5 votes vote down vote up
private static synchronized RiskAssessmentCollection populateRisks(String fileName) throws PresentationLogicException
{	
	Document doc = getXmlDocument(fileName);
	
	RiskAssessmentCollection risks = new RiskAssessmentCollection();
	if(doc == null)
		return risks;
	List list = doc.selectNodes("//risk_factors/risk_factor[@*]");
	for (Iterator iter = list.iterator(); iter.hasNext();)
	{
		DefaultElement attribute = (DefaultElement) iter.next();

		RiskAssessment risk = new RiskAssessment();
		RiskDescriptionCollection coll = new RiskDescriptionCollection();
		risk.setName(attribute.valueOf("@name"));
		risk.setDescription(attribute.valueOf("@description"));
		risk.setMultiple(new Boolean(attribute.valueOf("@multiple").equalsIgnoreCase("Y")));
		risk.setMandatoryAnswer(new Boolean(attribute.valueOf("@mandatory").equalsIgnoreCase("Y")));
			
		List desc = attribute.selectNodes("description[@*]");
			
		for (Iterator it = desc.iterator(); it.hasNext();)
		{
			RiskDescription descr = new RiskDescription();
					
			DefaultElement description = (DefaultElement) it.next();
			descr.setId(description.valueOf("@id"));
			descr.setName(description.valueOf("@name"));
			descr.setScore(description.valueOf("@score"));
			descr.setDescription(description.valueOf("@description"));
			coll.add(descr);
		}
		risk.setRiskFactors(coll);
				
		risks.add(risk);
	}
	
	return risks;
}
 
Example 34
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails)
{
	int nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++)
	{
		risk = form.getGlobalContext().COE.getBradenAssessments().get(i);

		if (risk.getName().equalsIgnoreCase(colFall))
		{
			for (int j = 0; j < risk.getRiskFactors().size(); j++)
			{
				descr = risk.getRiskFactors().get(j);

				for (int k = 0; k < assessmentDetails.size(); k++)
				{
					if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE))
					{
						nScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}

			break;
		}
	}

	return nScore;
}
 
Example 35
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails)
{
	int nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++)
	{
		risk = form.getGlobalContext().COE.getBradenAssessments().get(i);

		if (risk.getName().equalsIgnoreCase(colFall))
		{
			for (int j = 0; j < risk.getRiskFactors().size(); j++)
			{
				descr = risk.getRiskFactors().get(j);

				for (int k = 0; k < assessmentDetails.size(); k++)
				{
					if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE))
					{
						nScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}

			break;
		}
	}

	return nScore;
}
 
Example 36
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore(WaterlowAssessmentDetailsVoCollection coll)
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < coll.size(); i++)
	{
		WaterlowAssessmentDetailsVo child = coll.get(i);

		risk = null;
		partScore = 0;
		
		for(int k = 0; k < form.getGlobalContext().Nursing.getWaterlowAssessments().size(); k++)
		{
			risk = form.getGlobalContext().Nursing.getWaterlowAssessments().get(k);
			
			for(int m = 0; m < risk.getRiskFactors().size(); m++)
			{
				descr = risk.getRiskFactors().get(m);
				
				if(child.getAssessment().toString().equals(descr.getId()) && Boolean.TRUE.equals(child.getSelect()))
				{
					partScore += Integer.valueOf(descr.getScore()).intValue();
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 37
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private float getAssessmentScore()
{
	float nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	float partScore;
	for (int i = 0; i < form.grdRiskAssessment().getRows().size(); i++)
	{
		GenForm.grdRiskAssessmentRow row = form.grdRiskAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdRiskAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().COE.getFallRiskAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getFallRiskAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Float.valueOf(descr.getScore()).floatValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}
 
Example 38
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private float getScreeningScore()
{
	float nScore = 0;

	RiskAssessment risk;
	RiskDescription descr;

	for (int i = 0; i < form.grdScreening().getRows().size(); i++)
	{
		GenForm.grdScreeningRow row = form.grdScreening().getRows().get(i);

		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdScreeningRow child = row.getRows().get(j);

			for (int k = 0; k < form.getGlobalContext().COE.getMNAAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getMNAAssessments().get(k);

				for (int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);

					if (child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						nScore += Float.valueOf(descr.getScore()).floatValue();
					}
				}
			}
		}
	}

	return nScore;
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdRiskAssessment().getRows().size(); i++)
	{
		GenForm.grdRiskAssessmentRow row = form.grdRiskAssessment().getRows().get(i);

		risk = null;
		partScore = 0;

		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdRiskAssessmentRow child = row.getRows().get(j);

			for (int k = 0; k < form.getGlobalContext().COE.getBradenAssessments().size(); k++)
			{
				risk = form.getGlobalContext().COE.getBradenAssessments().get(k);

				for (int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);

					if (child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}

		nScore += partScore;
	}

	return nScore;
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private int getAssessmentScore()
{
	int nScore = 0;

	RiskAssessment risk = null;
	RiskDescription descr = null;

	int partScore;
	for (int i = 0; i < form.grdAssessment().getRows().size(); i++)
	{
		GenForm.grdAssessmentRow row = form.grdAssessment().getRows().get(i);

		risk = null;
		partScore = 0;
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			GenForm.grdAssessmentRow child = row.getRows().get(j);
			
			for(int k = 0; k < form.getGlobalContext().Nursing.getNutritionalRiskAssessments().size(); k++)
			{
				risk = form.getGlobalContext().Nursing.getNutritionalRiskAssessments().get(k);
				
				for(int m = 0; m < risk.getRiskFactors().size(); m++)
				{
					descr = risk.getRiskFactors().get(m);
					
					if(child.getValue().toString().equals(descr.getId()) && child.getSelect() == true)
					{
						partScore += Integer.valueOf(descr.getScore()).intValue();
					}
				}
			}
		}
		
		nScore += partScore;
	}
	
	return nScore;
}