Java Code Examples for ca.uhn.hl7v2.model.v24.datatype.FT

The following are top voted examples for showing how to use ca.uhn.hl7v2.model.v24.datatype.FT. 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: O01VoMapper.java   Source Code and License 5 votes vote down vote up
private void renderOBX(OBX obx,int ID,String text,String type,String orderDetail,String identifierText) throws HL7Exception
{
	obx.getSetIDOBX().setValue(Integer.toString(ID));
	obx.getValueType().setValue(type);
	if(identifierText==null)
	{
		obx.getObservationIdentifier().getIdentifier().setValue(Hl7Null);
	}
	else
	{
		obx.getObservationIdentifier().getText().setValue(HL7Utils.toHL7Text(identifierText));
	}
	obx.getObservationValue(0).setData(new FT(HL7Utils.toHL7Text(text)));
	obx.getObservationResultStatus().setValue(orderDetail);
}
 
Example 2
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 5 votes vote down vote up
private void renderOBX(OBX obx,int ID,String text,String type,String orderDetail,String identifierText) throws HL7Exception
{
	obx.getSetIDOBX().setValue(Integer.toString(ID));
	obx.getValueType().setValue(type);
	if(identifierText==null)
	{
		obx.getObservationIdentifier().getIdentifier().setValue(Hl7Null);
	}
	else
	{
		obx.getObservationIdentifier().getText().setValue(HL7Utils.toHL7Text(identifierText));
	}
	obx.getObservationValue(0).setData(new FT(HL7Utils.toHL7Text(text)));
	obx.getObservationResultStatus().setValue(orderDetail);
}
 
Example 3
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 5 votes vote down vote up
private void renderOBX(OBX obx,int ID,String text,String type,String orderDetail,String identifierText) throws HL7Exception
{
	obx.getSetIDOBX().setValue(Integer.toString(ID));
	obx.getValueType().setValue(type);
	if(identifierText==null)
	{
		obx.getObservationIdentifier().getIdentifier().setValue(Hl7Null);
	}
	else
	{
		obx.getObservationIdentifier().getText().setValue(HL7Utils.toHL7Text(identifierText));
	}
	obx.getObservationValue(0).setData(new FT(HL7Utils.toHL7Text(text)));
	obx.getObservationResultStatus().setValue(orderDetail);
}
 
Example 4
Project: openmaxims-linux   File: O01VoMapper.java   Source Code and License 5 votes vote down vote up
private void renderOBX(OBX obx,int ID,String text,String type,String orderDetail,String identifierText) throws HL7Exception
{
	obx.getSetIDOBX().setValue(Integer.toString(ID));
	obx.getValueType().setValue(type);
	if(identifierText==null)
	{
		obx.getObservationIdentifier().getIdentifier().setValue(Hl7Null);
	}
	else
	{
		obx.getObservationIdentifier().getText().setValue(HL7Utils.toHL7Text(identifierText));
	}
	obx.getObservationValue(0).setData(new FT(HL7Utils.toHL7Text(text)));
	obx.getObservationResultStatus().setValue(orderDetail);
}
 
Example 5
Project: AvoinApotti   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
/**
 * @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 6
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
/**
 * @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 7
Project: openMAXIMS   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
/**
 * @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 8
Project: openmaxims-linux   File: O01VoMapper.java   Source Code and License 4 votes vote down vote up
/**
 * @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);
		}
	}
}