Java Code Examples for ims.assessment.helper.UserAssessmentInstHelper.getAnswersAsText()

The following are Jave code examples for showing how to use getAnswersAsText() of the ims.assessment.helper.UserAssessmentInstHelper class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: O01VoMapper.java   Source Code and License Vote up 4 votes
/**
 * @param msgVo
 * @param newOrder
 * @param order
 * @throws HL7Exception
 * @throws DataTypeException
 */
private void populateNonSpecimenClinicalDetailsSeparateSegments(IfOrderInvestigationVo inv,ProviderSystemVo providerSystem,
		 IfOutOcsOrderVo newOrder, ORM_O01 order,boolean useNTE)
		throws HL7Exception, DataTypeException {
	GeneralQuestionAnswerVoCollection radiologyQuestions = ocsIf.getRadiologyQuestions(inv);
	if ((radiologyQuestions!=null&&radiologyQuestions.size()>0)
			||newOrder.getAdditClinNotesIsNotNull()
			||newOrder.getSummaryClinicalInformationIsNotNull())
	{
		int i=0;
		String FT = svc.getRemoteLookup(ResultValueType.FT.getId(), providerSystem.getCodeSystem().getText());
		String orderDetail= svc.getRemoteLookup(ResultStatus.ORDERDETAIL.getId(), providerSystem.getCodeSystem().getText());
		if(!useNTE)
		{	
			i++;
			renderOBX(getNextOBX(order, i), i, "Relevant clinical information : ", FT, orderDetail); // Only needed for OBXs
		}

		String alertText = getAlertsText(newOrder.getPatient(),providerSystem);
		if (alertText!=null&&!alertText.equals(""))
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i), alertText,i);
			else
				renderOBX(getNextOBX(order, i), i, alertText, FT, orderDetail);
		}
		
		for (GeneralQuestionAnswerVo qAVo : radiologyQuestions)
		{
			String answers = UserAssessmentInstHelper.getAnswersAsText(qAVo);
			if(answers!=null)
			{
				i++;
				if(useNTE)
					renderNTE(getNextNTE(order, i),qAVo.getQuestion().getShortText()+": "+ answers, i);
				else
					renderOBX(getNextOBX(order, i), i, answers, FT, orderDetail,qAVo.getQuestion().getShortText());
			}
		}
		
		if (newOrder.getAdditClinNotesIsNotNull())
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i), newOrder.getAdditClinNotes(),i);
			else
				renderOBX(getNextOBX(order, i), i, newOrder.getAdditClinNotes(), FT, orderDetail);
		}
		if(newOrder.getSummaryClinicalInformationIsNotNull())
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i),newOrder.getSummaryClinicalInformation(),i);
			else
				renderOBX(getNextOBX(order, i),i,newOrder.getSummaryClinicalInformation(),FT,orderDetail);
		}
		if(inv.getReorderReasonIsNotNull()&&!"".equals(inv.getReorderReason()))
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i),"Reason for Re-Order: "+inv.getReorderReason(),i);
			else
				renderOBX(getNextOBX(order, i),i,"Reason for Re-Order: "+inv.getReorderReason(),FT,orderDetail);
		}
	}
}
 
Example 2
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License Vote up 4 votes
/**
 * @param msgVo
 * @param newOrder
 * @param order
 * @throws HL7Exception
 * @throws DataTypeException
 */
private void populateNonSpecimenClinicalDetailsSeparateSegments(IfOrderInvestigationVo inv,ProviderSystemVo providerSystem,
		 IfOutOcsOrderVo newOrder, ORM_O01 order,boolean useNTE)
		throws HL7Exception, DataTypeException {
	GeneralQuestionAnswerVoCollection radiologyQuestions = ocsIf.getRadiologyQuestions(inv);
	if ((radiologyQuestions!=null&&radiologyQuestions.size()>0)
			||newOrder.getAdditClinNotesIsNotNull()
			||newOrder.getSummaryClinicalInformationIsNotNull())
	{
		int i=0;
		String FT = svc.getRemoteLookup(ResultValueType.FT.getId(), providerSystem.getCodeSystem().getText());
		String orderDetail= svc.getRemoteLookup(ResultStatus.ORDERDETAIL.getId(), providerSystem.getCodeSystem().getText());
		if(!useNTE)
		{	
			i++;
			renderOBX(getNextOBX(order, i), i, "Relevant clinical information : ", FT, orderDetail); // Only needed for OBXs
		}

		String alertText = getAlertsText(newOrder.getPatient(),providerSystem);
		if (alertText!=null&&!alertText.equals(""))
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i), alertText,i);
			else
				renderOBX(getNextOBX(order, i), i, alertText, FT, orderDetail);
		}
		
		for (GeneralQuestionAnswerVo qAVo : radiologyQuestions)
		{
			String answers = UserAssessmentInstHelper.getAnswersAsText(qAVo);
			if(answers!=null)
			{
				i++;
				if(useNTE)
					renderNTE(getNextNTE(order, i),qAVo.getQuestion().getShortText()+": "+ answers, i);
				else
					renderOBX(getNextOBX(order, i), i, answers, FT, orderDetail,qAVo.getQuestion().getShortText());
			}
		}
		
		if (newOrder.getAdditClinNotesIsNotNull())
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i), newOrder.getAdditClinNotes(),i);
			else
				renderOBX(getNextOBX(order, i), i, newOrder.getAdditClinNotes(), FT, orderDetail);
		}
		if(newOrder.getSummaryClinicalInformationIsNotNull())
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i),newOrder.getSummaryClinicalInformation(),i);
			else
				renderOBX(getNextOBX(order, i),i,newOrder.getSummaryClinicalInformation(),FT,orderDetail);
		}
		if(inv.getReorderReasonIsNotNull()&&!"".equals(inv.getReorderReason()))
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i),"Reason for Re-Order: "+inv.getReorderReason(),i);
			else
				renderOBX(getNextOBX(order, i),i,"Reason for Re-Order: "+inv.getReorderReason(),FT,orderDetail);
		}
	}
}
 
Example 3
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License Vote up 4 votes
/**
 * @param msgVo
 * @param newOrder
 * @param order
 * @throws HL7Exception
 * @throws DataTypeException
 */
private void populateNonSpecimenClinicalDetailsSeparateSegments(IfOrderInvestigationVo inv,ProviderSystemVo providerSystem,
		 IfOutOcsOrderVo newOrder, ORM_O01 order,boolean useNTE)
		throws HL7Exception, DataTypeException {
	GeneralQuestionAnswerVoCollection radiologyQuestions = ocsIf.getRadiologyQuestions(inv);
	if ((radiologyQuestions!=null&&radiologyQuestions.size()>0)
			||newOrder.getAdditClinNotesIsNotNull()
			||newOrder.getSummaryClinicalInformationIsNotNull())
	{
		int i=0;
		String FT = svc.getRemoteLookup(ResultValueType.FT.getId(), providerSystem.getCodeSystem().getText());
		String orderDetail= svc.getRemoteLookup(ResultStatus.ORDERDETAIL.getId(), providerSystem.getCodeSystem().getText());
		if(!useNTE)
		{	
			i++;
			renderOBX(getNextOBX(order, i), i, "Relevant clinical information : ", FT, orderDetail); // Only needed for OBXs
		}

		String alertText = getAlertsText(newOrder.getPatient(),providerSystem);
		if (alertText!=null&&!alertText.equals(""))
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i), alertText,i);
			else
				renderOBX(getNextOBX(order, i), i, alertText, FT, orderDetail);
		}
		
		for (GeneralQuestionAnswerVo qAVo : radiologyQuestions)
		{
			String answers = UserAssessmentInstHelper.getAnswersAsText(qAVo);
			if(answers!=null)
			{
				i++;
				if(useNTE)
					renderNTE(getNextNTE(order, i),qAVo.getQuestion().getShortText()+": "+ answers, i);
				else
					renderOBX(getNextOBX(order, i), i, answers, FT, orderDetail,qAVo.getQuestion().getShortText());
			}
		}
		
		if (newOrder.getAdditClinNotesIsNotNull())
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i), newOrder.getAdditClinNotes(),i);
			else
				renderOBX(getNextOBX(order, i), i, newOrder.getAdditClinNotes(), FT, orderDetail);
		}
		if(newOrder.getSummaryClinicalInformationIsNotNull())
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i),newOrder.getSummaryClinicalInformation(),i);
			else
				renderOBX(getNextOBX(order, i),i,newOrder.getSummaryClinicalInformation(),FT,orderDetail);
		}
		if(inv.getReorderReasonIsNotNull()&&!"".equals(inv.getReorderReason()))
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i),"Reason for Re-Order: "+inv.getReorderReason(),i);
			else
				renderOBX(getNextOBX(order, i),i,"Reason for Re-Order: "+inv.getReorderReason(),FT,orderDetail);
		}
	}
}
 
Example 4
Project: openmaxims-linux   File: O01VoMapper.java   Source Code and License Vote up 4 votes
/**
 * @param msgVo
 * @param newOrder
 * @param order
 * @throws HL7Exception
 * @throws DataTypeException
 */
private void populateNonSpecimenClinicalDetailsSeparateSegments(IfOrderInvestigationVo inv,ProviderSystemVo providerSystem,
		 IfOutOcsOrderVo newOrder, ORM_O01 order,boolean useNTE)
		throws HL7Exception, DataTypeException {
	GeneralQuestionAnswerVoCollection radiologyQuestions = ocsIf.getRadiologyQuestions(inv);
	if ((radiologyQuestions!=null&&radiologyQuestions.size()>0)
			||newOrder.getAdditClinNotesIsNotNull()
			||newOrder.getSummaryClinicalInformationIsNotNull())
	{
		int i=0;
		String FT = svc.getRemoteLookup(ResultValueType.FT.getId(), providerSystem.getCodeSystem().getText());
		String orderDetail= svc.getRemoteLookup(ResultStatus.ORDERDETAIL.getId(), providerSystem.getCodeSystem().getText());
		if(!useNTE)
		{	
			i++;
			renderOBX(getNextOBX(order, i), i, "Relevant clinical information : ", FT, orderDetail); // Only needed for OBXs
		}

		String alertText = getAlertsText(newOrder.getPatient(),providerSystem);
		if (alertText!=null&&!alertText.equals(""))
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i), alertText,i);
			else
				renderOBX(getNextOBX(order, i), i, alertText, FT, orderDetail);
		}
		
		for (GeneralQuestionAnswerVo qAVo : radiologyQuestions)
		{
			String answers = UserAssessmentInstHelper.getAnswersAsText(qAVo);
			if(answers!=null)
			{
				i++;
				if(useNTE)
					renderNTE(getNextNTE(order, i),qAVo.getQuestion().getShortText()+": "+ answers, i);
				else
					renderOBX(getNextOBX(order, i), i, answers, FT, orderDetail,qAVo.getQuestion().getShortText());
			}
		}
		
		if (newOrder.getAdditClinNotesIsNotNull())
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i), newOrder.getAdditClinNotes(),i);
			else
				renderOBX(getNextOBX(order, i), i, newOrder.getAdditClinNotes(), FT, orderDetail);
		}
		if(newOrder.getSummaryClinicalInformationIsNotNull())
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i),newOrder.getSummaryClinicalInformation(),i);
			else
				renderOBX(getNextOBX(order, i),i,newOrder.getSummaryClinicalInformation(),FT,orderDetail);
		}
		if(inv.getReorderReasonIsNotNull()&&!"".equals(inv.getReorderReason()))
		{
			i++;
			if(useNTE)
				renderNTE(getNextNTE(order, i),"Reason for Re-Order: "+inv.getReorderReason(),i);
			else
				renderOBX(getNextOBX(order, i),i,"Reason for Re-Order: "+inv.getReorderReason(),FT,orderDetail);
		}
	}
}