use of com.adobe.target.delivery.v1.model.Address in project openmrs-module-fhir2 by openmrs.
the class LocationFhirResourceProviderTest method initLocation.
@Before
public void initLocation() {
Address address = new Address();
address.setCity(CITY);
address.setCountry(COUNTRY);
address.setState(STATE);
address.setPostalCode(POSTAL_CODE);
location = new org.hl7.fhir.r4.model.Location();
location.setId(LOCATION_UUID);
location.setName(LOCATION_NAME);
location.setAddress(address);
location.getMeta().addTag(new Coding(FhirConstants.OPENMRS_FHIR_EXT_LOCATION_TAG, LOGIN_LOCATION_TAG_NAME, LOGIN_LOCATION_TAG_DESCRIPTION));
setProvenanceResources(location);
}
use of com.adobe.target.delivery.v1.model.Address in project openmrs-module-fhir2 by openmrs.
the class PersonAddressTranslatorImplTest method shouldConvertFhirPostalCodeToPostalCode.
@Test
public void shouldConvertFhirPostalCodeToPostalCode() {
Address address = new Address();
address.setPostalCode(POSTAL_CODE);
assertThat(addressTranslator.toOpenmrsType(address).getPostalCode(), equalTo(POSTAL_CODE));
}
use of com.adobe.target.delivery.v1.model.Address in project openmrs-module-fhir2 by openmrs.
the class PersonAddressTranslatorImplTest method shouldConvertPersonAddressToAddress.
@Test
public void shouldConvertPersonAddressToAddress() {
PersonAddress address = new PersonAddress();
address.setUuid(PERSON_ADDRESS_UUID);
Address result = addressTranslator.toFhirResource(address);
assertThat(result, notNullValue());
assertThat(result.getId(), equalTo(PERSON_ADDRESS_UUID));
}
use of com.adobe.target.delivery.v1.model.Address in project openmrs-module-fhir2 by openmrs.
the class PersonAddressTranslatorImplTest method shouldConvertOldAddressToNotPreferred.
@Test
public void shouldConvertOldAddressToNotPreferred() {
Address address = new Address();
address.setUse(Address.AddressUse.OLD);
assertThat(addressTranslator.toOpenmrsType(address).getPreferred(), is(false));
}
use of com.adobe.target.delivery.v1.model.Address in project openmrs-module-fhir2 by openmrs.
the class PersonAddressTranslatorImplTest method shouldConvertCityToCityVillage.
@Test
public void shouldConvertCityToCityVillage() {
Address address = new Address();
address.setCity(CITY);
assertThat(addressTranslator.toOpenmrsType(address).getCityVillage(), equalTo(CITY));
}
Aggregations