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

The following are top voted examples for showing how to use ca.uhn.hl7v2.model.v24.datatype.XAD. 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: openMAXIMS   File: M02VoMapper.java   View source code 6 votes vote down vote up
private String getPracticeNameFromAddress(XAD xad)
{
	if(xad!=null)
	{
		String line = xad.getStreetAddress().getStreetOrMailingAddress().getValue();
		if (line != null && !line.equals(Hl7Null))
			return line;
		line = xad.getOtherDesignation().getValue();
		if (line != null && !line.equals(Hl7Null))
			return line;
		line = xad.getCity().getValue();
		if (line != null && !line.equals(Hl7Null))
			return line;
		line = xad.getStateOrProvince().getValue();
		if (line != null && !line.equals(Hl7Null))
			return line;
		line = xad.getOtherGeographicDesignation().getValue();
		if (line != null && !line.equals(Hl7Null))
			return line;
	}
	return null;
}
 
Example 2
Project: AvoinApotti   File: VoMapper.java   View source code 5 votes vote down vote up
protected final void renderAddressVoToXAD(PersonAddress pa, XAD xad,ProviderSystemVo providerSystem) throws Exception
{
	LOG.debug("VoMapper renderAddressVoToXAD: entry");
	if (pa == null)
		return;

	xad.getStreetAddress().getStreetOrMailingAddress().setValue(pa.getLine1());
	xad.getOtherDesignation().setValue(pa.getLine2());
	xad.getCity().setValue(pa.getLine3());
	xad.getStateOrProvince().setValue(pa.getLine4());
	xad.getOtherGeographicDesignation().setValue(pa.getLine5());
	xad.getZipOrPostalCode().setValue(pa.getPostCode());

	if (pa.getCountyIsNotNull())
		xad.getCountyParishCode().setValue(svc.getRemoteLookup(pa.getCounty().getID(), providerSystem.getCodeSystem().getText()));
	
	if(pa.getAddressTypeIsNotNull())
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(pa.getAddressType().getID(), providerSystem.getCodeSystem().getText()));
	}
	else
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(AddressType.PERMANENT.getID(), providerSystem.getCodeSystem().getText()));
	}

	LOG.debug("VoMapper renderAddressVoToXAD: exit (" + xad.toString() + ")");
}
 
Example 3
Project: AvoinApotti   File: RefManHL7Helper.java   View source code 5 votes vote down vote up
private final void renderAddressVoToXAD(PersonAddress pa, XAD xad) throws HL7Exception
{
	LOG.debug("RefManHL7Helper renderAddressVoToXAD: entry");
	if (pa == null)
		return;

	xad.getStreetAddress().getStreetOrMailingAddress().setValue(pa.getLine1());
	xad.getOtherDesignation().setValue(pa.getLine2());
	xad.getCity().setValue(pa.getLine3());
	xad.getStateOrProvince().setValue(pa.getLine4());
	xad.getOtherGeographicDesignation().setValue(pa.getLine5());
	xad.getZipOrPostalCode().setValue(pa.getPostCode());

	LOG.debug("RefManHL7Helper renderAddressVoToXAD: exit (" + xad.toString() + ")");
}
 
Example 4
Project: openMAXIMS   File: VoMapper.java   View source code 5 votes vote down vote up
protected final void renderAddressVoToXAD(PersonAddress pa, XAD xad,ProviderSystemVo providerSystem) throws Exception
{
	LOG.debug("VoMapper renderAddressVoToXAD: entry");
	if (pa == null)
		return;

	xad.getStreetAddress().getStreetOrMailingAddress().setValue(pa.getLine1());
	xad.getOtherDesignation().setValue(pa.getLine2());
	xad.getCity().setValue(pa.getLine3());
	xad.getStateOrProvince().setValue(pa.getLine4());
	xad.getOtherGeographicDesignation().setValue(pa.getLine5());
	xad.getZipOrPostalCode().setValue(pa.getPostCode());

	if (pa.getCountyIsNotNull())
		xad.getCountyParishCode().setValue(svc.getRemoteLookup(pa.getCounty().getID(), providerSystem.getCodeSystem().getText()));
	
	if(pa.getAddressTypeIsNotNull())
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(pa.getAddressType().getID(), providerSystem.getCodeSystem().getText()));
	}
	else
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(AddressType.PERMANENT.getID(), providerSystem.getCodeSystem().getText()));
	}
	if(pa.getAreaOfResidenceIsNotNull()) //http://jira/browse/WDEV-19177
	{
		xad.getCensusTract().setValue(svc.getRemoteLookup(pa.getAreaOfResidence().getID(), providerSystem.getCodeSystem().getText()));
	}

	LOG.debug("VoMapper renderAddressVoToXAD: exit (" + xad.toString() + ")");
}
 
Example 5
Project: openMAXIMS   File: RefManHL7Helper.java   View source code 5 votes vote down vote up
private final void renderAddressVoToXAD(PersonAddress pa, XAD xad) throws HL7Exception
{
	LOG.debug("RefManHL7Helper renderAddressVoToXAD: entry");
	if (pa == null)
		return;

	xad.getStreetAddress().getStreetOrMailingAddress().setValue(pa.getLine1());
	xad.getOtherDesignation().setValue(pa.getLine2());
	xad.getCity().setValue(pa.getLine3());
	xad.getStateOrProvince().setValue(pa.getLine4());
	xad.getOtherGeographicDesignation().setValue(pa.getLine5());
	xad.getZipOrPostalCode().setValue(pa.getPostCode());

	LOG.debug("RefManHL7Helper renderAddressVoToXAD: exit (" + xad.toString() + ")");
}
 
Example 6
Project: openMAXIMS   File: VoMapper.java   View source code 5 votes vote down vote up
protected final void renderAddressVoToXAD(PersonAddress pa, XAD xad,ProviderSystemVo providerSystem) throws Exception
{
	LOG.debug("VoMapper renderAddressVoToXAD: entry");
	if (pa == null)
		return;

	xad.getStreetAddress().getStreetOrMailingAddress().setValue(pa.getLine1());
	xad.getOtherDesignation().setValue(pa.getLine2());
	xad.getCity().setValue(pa.getLine3());
	xad.getStateOrProvince().setValue(pa.getLine4());
	xad.getOtherGeographicDesignation().setValue(pa.getLine5());
	xad.getZipOrPostalCode().setValue(pa.getPostCode());

	if (pa.getCountyIsNotNull())
		xad.getCountyParishCode().setValue(svc.getRemoteLookup(pa.getCounty().getID(), providerSystem.getCodeSystem().getText()));
	
	if(pa.getAddressTypeIsNotNull())
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(pa.getAddressType().getID(), providerSystem.getCodeSystem().getText()));
	}
	else
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(AddressType.PERMANENT.getID(), providerSystem.getCodeSystem().getText()));
	}

	LOG.debug("VoMapper renderAddressVoToXAD: exit (" + xad.toString() + ")");
}
 
Example 7
Project: openMAXIMS   File: RefManHL7Helper.java   View source code 5 votes vote down vote up
private final void renderAddressVoToXAD(PersonAddress pa, XAD xad) throws HL7Exception
{
	LOG.debug("RefManHL7Helper renderAddressVoToXAD: entry");
	if (pa == null)
		return;

	xad.getStreetAddress().getStreetOrMailingAddress().setValue(pa.getLine1());
	xad.getOtherDesignation().setValue(pa.getLine2());
	xad.getCity().setValue(pa.getLine3());
	xad.getStateOrProvince().setValue(pa.getLine4());
	xad.getOtherGeographicDesignation().setValue(pa.getLine5());
	xad.getZipOrPostalCode().setValue(pa.getPostCode());

	LOG.debug("RefManHL7Helper renderAddressVoToXAD: exit (" + xad.toString() + ")");
}
 
Example 8
Project: openmaxims-linux   File: VoMapper.java   View source code 5 votes vote down vote up
protected final void renderAddressVoToXAD(PersonAddress pa, XAD xad,ProviderSystemVo providerSystem) throws Exception
{
	LOG.debug("VoMapper renderAddressVoToXAD: entry");
	if (pa == null)
		return;

	xad.getStreetAddress().getStreetOrMailingAddress().setValue(pa.getLine1());
	xad.getOtherDesignation().setValue(pa.getLine2());
	xad.getCity().setValue(pa.getLine3());
	xad.getStateOrProvince().setValue(pa.getLine4());
	xad.getOtherGeographicDesignation().setValue(pa.getLine5());
	xad.getZipOrPostalCode().setValue(pa.getPostCode());

	if (pa.getCountyIsNotNull())
		xad.getCountyParishCode().setValue(svc.getRemoteLookup(pa.getCounty().getID(), providerSystem.getCodeSystem().getText()));
	
	if(pa.getAddressTypeIsNotNull())
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(pa.getAddressType().getID(), providerSystem.getCodeSystem().getText()));
	}
	else
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(AddressType.PERMANENT.getID(), providerSystem.getCodeSystem().getText()));
	}

	LOG.debug("VoMapper renderAddressVoToXAD: exit (" + xad.toString() + ")");
}
 
Example 9
Project: openMAXIMS   File: VoMapper.java   View source code 4 votes vote down vote up
protected final void renderOrgAddressVoToXAD(AddressVo addressVo, XAD xad, ProviderSystemVo providerSystem) throws Exception
{
	LOG.debug("VoMapper renderOrgAddressVoToXAD: entry");
	
	if (addressVo == null)
		return;

	//XAD.1.1 Street or mailing address (ST)
	if(addressVo.getLine1() != null && addressVo.getLine1().length() > 0)
	{
		xad.getStreetAddress().getStreetOrMailingAddress().setValue(addressVo.getLine1());
	}
	//XAD.2 Other designation (ST)
	if(addressVo.getLine2() != null && addressVo.getLine2().length() > 0)
	{
		xad.getOtherDesignation().setValue(addressVo.getLine2());
	}
	//XAD.3 City (ST)
	if(addressVo.getLine3() != null && addressVo.getLine3().length() > 0)
	{
		xad.getCity().setValue(addressVo.getLine3());
	}
	//XAD.4 Stae or province *ST)
	if(addressVo.getLine4() != null && addressVo.getLine4().length() > 0)
	{
		xad.getStateOrProvince().setValue(addressVo.getLine4());
	}
	//XAD.5 Zip or postal code (ST)
	if(addressVo.getPostCode() != null && addressVo.getPostCode().length() > 0)
	{
		xad.getZipOrPostalCode().setValue(addressVo.getPostCode());
	}
	//WDEV-22597
	//XAD.8 Address type (ID)
	if (addressVo.getAddressType() != null)
	{
		xad.getAddressType().setValue(svc.getRemoteLookup(addressVo.getAddressType().getID(), providerSystem.getCodeSystem().getText()));			
	} //WDEV-22597
	//XAD.8 Other geographic designation (ST)
	if(addressVo.getLine5() != null && addressVo.getLine5().length() > 0)
	{
		xad.getOtherGeographicDesignation().setValue(addressVo.getLine5());
	}

	LOG.debug("VoMapper renderOrgAddressVoToXAD: exit (" + xad.toString() + ")");
}