use of de.symeda.sormas.api.person.PersonIndexDto in project SORMAS-Project by hzi-braunschweig.
the class ImportExportTest method testImportExportedCase.
@Test
public void testImportExportedCase() throws IOException, CsvException, InvalidColumnException, InterruptedException {
TestDataCreator.RDCF rdcf = creator.createRDCF("Region", "District", "Community", "Health facility");
UserDto user = creator.createUser(null, null, null, "james", "Smith", UserRole.NATIONAL_USER);
PersonDto person = creator.createPerson("John", "Doe");
Date dateNow = new Date();
CaseDataDto caze = creator.createCase(user.toReference(), person.toReference(), Disease.CORONAVIRUS, CaseClassification.PROBABLE, InvestigationStatus.PENDING, dateNow, rdcf);
caze.setExternalID("text-ext-id");
caze.setExternalToken("text-ext-token");
caze.setDiseaseDetails("Corona");
caze.setHealthFacilityDetails("test HF details");
caze.setQuarantine(QuarantineType.INSTITUTIONELL);
caze.setQuarantineFrom(dateNow);
caze.setQuarantineTo(dateNow);
caze.getHospitalization().setAdmittedToHealthFacility(YesNoUnknown.YES);
caze.getHospitalization().setAdmissionDate(dateNow);
caze.getHospitalization().setDischargeDate(dateNow);
caze.getHospitalization().setLeftAgainstAdvice(YesNoUnknown.YES);
caze.getSymptoms().setAbdominalPain(SymptomState.YES);
caze.getSymptoms().setAgitation(SymptomState.YES);
caze.getSymptoms().setBedridden(SymptomState.YES);
caze.getSymptoms().setEyesBleeding(SymptomState.YES);
caze.getSymptoms().setKopliksSpots(SymptomState.YES);
caze.getSymptoms().setPigmentaryRetinopathy(SymptomState.YES);
caze.getSymptoms().setTremor(SymptomState.YES);
caze.getSymptoms().setVomiting(SymptomState.YES);
getCaseFacade().save(caze);
person.setSex(Sex.MALE);
person.setBirthdateDD(11);
person.setBirthdateMM(12);
person.setBirthdateYYYY(1962);
person.setPresentCondition(PresentCondition.ALIVE);
person.getAddress().setRegion(rdcf.region.toReference());
person.getAddress().setDistrict(rdcf.district.toReference());
person.getAddress().setCommunity(rdcf.community.toReference());
person.getAddress().setCity("test city");
person.getAddress().setStreet("test street");
person.getAddress().setHouseNumber("test house number");
person.getAddress().setAdditionalInformation("test additional information");
person.getAddress().setPostalCode("test postal code");
person.getAddress().setPostalCode("test postal code");
getPersonFacade().savePerson(person);
StreamResource exportStreamResource = CaseDownloadUtil.createCaseExportResource(new CaseCriteria(), Collections::emptySet, CaseExportType.CASE_SURVEILLANCE, null);
List<String[]> rows = getCsvReader(exportStreamResource.getStreamSource().getStream()).readAll();
assertThat(rows, hasSize(4));
String[] columns = rows.get(1);
String[] values = rows.get(3);
String importUuid = DataHelper.createUuid();
for (int i = 0, getLength = columns.length; i < getLength; i++) {
String column = columns[i];
if (CaseDataDto.UUID.equals(column)) {
values[i] = importUuid;
} else // update name avoid duplicate checking
if (String.join(".", CaseDataDto.PERSON, PersonDto.FIRST_NAME).equals(column)) {
values[i] = "Import John";
} else if (String.join(".", CaseDataDto.PERSON, PersonDto.LAST_NAME).equals(column)) {
values[i] = "Import Doe";
} else if (String.join(".", CaseDataDto.PERSON, PersonDto.UUID).equals(column)) {
// Workaround: Reset the change date to avoid OutdatedEntityExceptions
// Applying a setChangeDate(new Date()) to the person before saving it will result in creating 2 cases and will fail the test
// So let's just ignore this column for now...
values[i] = "";
}
}
File tempFile = File.createTempFile("export", "csv");
tempFile.deleteOnExit();
FileOutputStream out = new FileOutputStream(tempFile);
IOUtils.copy(new ByteArrayInputStream(rows.stream().map(r -> String.join(",", Arrays.asList(r))).collect(Collectors.joining("\n")).getBytes(StandardCharsets.UTF_8)), out);
CaseImporterExtension caseImporter = new CaseImporterExtension(tempFile, true, user);
caseImporter.runImport();
InputStream errorStream = new ByteArrayInputStream(caseImporter.stringBuilder.toString().getBytes(StandardCharsets.UTF_8));
List<String[]> errorRows = getCsvReader(errorStream).readAll();
if (errorRows.size() > 1) {
assertThat("Error during import: " + StringUtils.join(errorRows.get(1), ", "), errorRows, hasSize(0));
}
PersonCriteria importPersonCriteria = new PersonCriteria();
importPersonCriteria.setNameAddressPhoneEmailLike("Import John");
List<PersonIndexDto> importedPersons = getPersonFacade().getIndexList(importPersonCriteria, null, null, null);
assertThat(importedPersons.size(), is(1));
List<CaseDataDto> importedCases = getCaseFacade().getByPersonUuids(Collections.singletonList(importedPersons.get(0).getUuid()));
assertThat(importedCases.size(), is(1));
CaseDataDto importedCase = importedCases.get(0);
assertThat(importedCase.getExternalID(), is("text-ext-id"));
assertThat(importedCase.getExternalToken(), is("text-ext-token"));
assertThat(importedCase.getDisease(), is(Disease.CORONAVIRUS));
assertThat(importedCase.getDiseaseDetails(), is("Corona"));
assertNull(importedCase.getPregnant());
assertNull(importedCase.getTrimester());
assertNull(importedCase.getPostpartum());
assertThat(importedCase.getResponsibleRegion(), is(rdcf.region));
assertThat(importedCase.getResponsibleDistrict(), is(rdcf.district));
assertThat(importedCase.getResponsibleCommunity(), is(rdcf.community));
assertThat(importedCase.getHealthFacility(), is(rdcf.facility));
assertThat(importedCase.getHealthFacilityDetails(), is("test HF details"));
assertThat(importedCase.getQuarantine(), is(QuarantineType.INSTITUTIONELL));
assertThat(importedCase.getQuarantineFrom().getTime(), is(DateHelper.getStartOfDay(dateNow).getTime()));
assertThat(importedCase.getQuarantineTo().getTime(), is(DateHelper.getStartOfDay(dateNow).getTime()));
assertThat(importedCase.getHospitalization().getAdmittedToHealthFacility(), is(YesNoUnknown.YES));
assertThat(importedCase.getHospitalization().getAdmissionDate().getTime(), is(DateHelper.getStartOfDay(dateNow).getTime()));
assertThat(importedCase.getHospitalization().getDischargeDate().getTime(), is(DateHelper.getStartOfDay(dateNow).getTime()));
assertThat(importedCase.getHospitalization().getLeftAgainstAdvice(), is(YesNoUnknown.YES));
assertThat(importedCase.getSymptoms().getAbdominalPain(), is(SymptomState.YES));
assertThat(importedCase.getSymptoms().getBedridden(), is(SymptomState.YES));
assertThat(importedCase.getSymptoms().getEyesBleeding(), is(SymptomState.YES));
assertThat(importedCase.getSymptoms().getKopliksSpots(), is(SymptomState.YES));
assertThat(importedCase.getSymptoms().getPigmentaryRetinopathy(), is(SymptomState.YES));
assertThat(importedCase.getSymptoms().getTremor(), is(SymptomState.YES));
assertThat(importedCase.getSymptoms().getVomiting(), is(SymptomState.YES));
PersonDto importedPerson = getPersonFacade().getPersonByUuid(importedCase.getPerson().getUuid());
assertThat(importedPerson.getFirstName(), is("Import John"));
assertThat(importedPerson.getLastName(), is("Import Doe"));
assertThat(importedPerson.getSex(), is(Sex.MALE));
assertThat(importedPerson.getBirthdateDD(), is(11));
assertThat(importedPerson.getBirthdateMM(), is(12));
assertThat(importedPerson.getBirthdateYYYY(), is(1962));
assertThat(importedPerson.getPresentCondition(), is(PresentCondition.ALIVE));
assertThat(importedPerson.getAddress().getRegion(), is(rdcf.region));
assertThat(importedPerson.getAddress().getDistrict(), is(rdcf.district));
assertThat(importedPerson.getAddress().getCommunity(), is(rdcf.community));
assertThat(importedPerson.getAddress().getCity(), is("test city"));
assertThat(importedPerson.getAddress().getStreet(), is("test street"));
assertThat(importedPerson.getAddress().getHouseNumber(), is("test house number"));
assertThat(importedPerson.getAddress().getAdditionalInformation(), is("test additional information"));
}
use of de.symeda.sormas.api.person.PersonIndexDto in project SORMAS-Project by hzi-braunschweig.
the class DirectoryImmunizationService method buildCriteriaFilter.
private Predicate buildCriteriaFilter(ImmunizationCriteria criteria, DirectoryImmunizationQueryContext directoryImmunizationQueryContext) {
final DirectoryImmunizationJoins joins = directoryImmunizationQueryContext.getJoins();
final CriteriaBuilder cb = directoryImmunizationQueryContext.getCriteriaBuilder();
final From<?, ?> from = directoryImmunizationQueryContext.getRoot();
final Join<DirectoryImmunization, Person> person = joins.getPerson();
final Join<DirectoryImmunization, LastVaccineType> lastVaccineType = joins.getLastVaccineType();
final Join<Person, Location> location = joins.getPersonJoins().getAddress();
Predicate filter = null;
if (criteria.getDisease() != null) {
filter = CriteriaBuilderHelper.and(cb, null, cb.equal(from.get(Immunization.DISEASE), criteria.getDisease()));
}
if (!DataHelper.isNullOrEmpty(criteria.getNameAddressPhoneEmailLike())) {
final CriteriaQuery<PersonIndexDto> cq = cb.createQuery(PersonIndexDto.class);
final PersonQueryContext personQueryContext = new PersonQueryContext(cb, cq, joins.getPersonJoins());
String[] textFilters = criteria.getNameAddressPhoneEmailLike().split("\\s+");
for (String textFilter : textFilters) {
if (DataHelper.isNullOrEmpty(textFilter)) {
continue;
}
Predicate likeFilters = cb.or(CriteriaBuilderHelper.unaccentedIlike(cb, person.get(Person.FIRST_NAME), textFilter), CriteriaBuilderHelper.unaccentedIlike(cb, person.get(Person.LAST_NAME), textFilter), CriteriaBuilderHelper.ilike(cb, person.get(Person.UUID), textFilter), CriteriaBuilderHelper.ilike(cb, personQueryContext.getSubqueryExpression(PersonQueryContext.PERSON_EMAIL_SUBQUERY), textFilter), phoneNumberPredicate(cb, personQueryContext.getSubqueryExpression(PersonQueryContext.PERSON_PHONE_SUBQUERY), textFilter), CriteriaBuilderHelper.unaccentedIlike(cb, location.get(Location.STREET), textFilter), CriteriaBuilderHelper.unaccentedIlike(cb, location.get(Location.CITY), textFilter), CriteriaBuilderHelper.ilike(cb, location.get(Location.POSTAL_CODE), textFilter), CriteriaBuilderHelper.ilike(cb, person.get(Person.INTERNAL_TOKEN), textFilter), CriteriaBuilderHelper.ilike(cb, person.get(Person.EXTERNAL_ID), textFilter), CriteriaBuilderHelper.ilike(cb, person.get(Person.EXTERNAL_TOKEN), textFilter), CriteriaBuilderHelper.unaccentedIlike(cb, lastVaccineType.get(LastVaccineType.VACCINE_TYPE), textFilter));
filter = CriteriaBuilderHelper.and(cb, filter, likeFilters);
}
}
filter = andEquals(cb, person, filter, criteria.getBirthdateYYYY(), Person.BIRTHDATE_YYYY);
filter = andEquals(cb, person, filter, criteria.getBirthdateMM(), Person.BIRTHDATE_MM);
filter = andEquals(cb, person, filter, criteria.getBirthdateDD(), Person.BIRTHDATE_DD);
if (criteria.getMeansOfImmunization() != null) {
filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Immunization.MEANS_OF_IMMUNIZATION), criteria.getMeansOfImmunization()));
}
if (criteria.getImmunizationManagementStatus() != null) {
filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Immunization.IMMUNIZATION_MANAGEMENT_STATUS), criteria.getImmunizationManagementStatus()));
}
if (criteria.getImmunizationStatus() != null) {
filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Immunization.IMMUNIZATION_STATUS), criteria.getImmunizationStatus()));
}
filter = andEqualsReferenceDto(cb, joins.getResponsibleRegion(), filter, criteria.getRegion());
filter = andEqualsReferenceDto(cb, joins.getResponsibleDistrict(), filter, criteria.getDistrict());
filter = andEqualsReferenceDto(cb, joins.getResponsibleCommunity(), filter, criteria.getCommunity());
if (criteria.getFacilityType() != null) {
filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Immunization.FACILITY_TYPE), criteria.getFacilityType()));
}
filter = andEqualsReferenceDto(cb, joins.getHealthFacility(), filter, criteria.getHealthFacility());
if (Boolean.TRUE.equals(criteria.getOnlyPersonsWithOverdueImmunization())) {
filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Immunization.IMMUNIZATION_MANAGEMENT_STATUS), ImmunizationManagementStatus.ONGOING));
filter = CriteriaBuilderHelper.and(cb, filter, cb.lessThan(from.get(Immunization.END_DATE), DateHelper.getStartOfDay(new Date())));
}
if (criteria.getImmunizationDateType() != null) {
Path<Object> path = buildPathForDateFilter(criteria.getImmunizationDateType(), directoryImmunizationQueryContext);
if (path != null) {
filter = CriteriaBuilderHelper.applyDateFilter(cb, filter, path, criteria.getFromDate(), criteria.getToDate());
}
}
filter = CriteriaBuilderHelper.and(cb, filter, cb.isFalse(from.get(Immunization.DELETED)));
return filter;
}
use of de.symeda.sormas.api.person.PersonIndexDto in project SORMAS-Project by hzi-braunschweig.
the class PersonFacadeEjbTest method testUserWithLimitedDiseaseSeeOnlyLimitedTravelEntry.
@Test
public void testUserWithLimitedDiseaseSeeOnlyLimitedTravelEntry() {
PersonCriteria criteria = new PersonCriteria();
criteria.setPersonAssociation(PersonAssociation.TRAVEL_ENTRY);
// CORONAVIRUS Travel Entry
PersonDto personWithCorona = creator.createPerson("Person Coronavirus", "Test");
creator.createTravelEntry(personWithCorona.toReference(), nationalUser.toReference(), Disease.CORONAVIRUS, rdcf.region, rdcf.district, rdcf.pointOfEntry);
// DENGUE Travel Entry
PersonDto personWithDengue = creator.createPerson("Person Dengue", "Test");
creator.createTravelEntry(personWithDengue.toReference(), nationalUser.toReference(), Disease.DENGUE, rdcf.region, rdcf.district, rdcf.pointOfEntry);
// National User with no restrictions can see all the travel entries
List<PersonIndexDto> personIndexDtos = getPersonFacade().getIndexList(criteria, 0, 100, null);
assertEquals(2, personIndexDtos.size());
List<String> firstNames = personIndexDtos.stream().map(p -> p.getFirstName()).collect(Collectors.toList());
assertTrue(firstNames.contains(personWithCorona.getFirstName()));
assertTrue(firstNames.contains(personWithDengue.getFirstName()));
// login with a user wiht limieted disease restrictions
final UserDto user = creator.createUser(rdcf, "Limieted Disease", "National User", Disease.DENGUE, UserRole.NATIONAL_USER);
loginWith(user);
personIndexDtos = getPersonFacade().getIndexList(criteria, 0, 100, null);
assertEquals(1, personIndexDtos.size());
assertEquals(personWithDengue.getFirstName(), personIndexDtos.get(0).getFirstName());
}
use of de.symeda.sormas.api.person.PersonIndexDto in project SORMAS-Project by hzi-braunschweig.
the class PersonFacadeEjbUserFilterTest method testGetPersonIndexListWhenSeveralAssociations.
@Test
public void testGetPersonIndexListWhenSeveralAssociations() {
loginWith(nationalUser);
PersonDto person1 = creator.createPerson("John", "Doe");
PersonDto person2 = creator.createPerson("John2", "Doe2");
CaseDataDto case1 = creator.createCase(nationalUser.toReference(), person1.toReference(), Disease.CORONAVIRUS, CaseClassification.PROBABLE, InvestigationStatus.PENDING, new Date(), rdcf1, null);
ContactDto contactForPerson1AndCase1 = creator.createContact(nationalUser.toReference(), person1.toReference(), case1);
CaseDataDto case2 = creator.createCase(nationalUser.toReference(), person2.toReference(), Disease.CORONAVIRUS, CaseClassification.PROBABLE, InvestigationStatus.PENDING, new Date(), rdcf2, null);
ContactDto contactForPerson1AndCase2 = creator.createContact(nationalUser.toReference(), person1.toReference(), case2);
TravelEntryDto travelEntryForPerson1 = creator.createTravelEntry(person1.toReference(), nationalUser.toReference(), Disease.CORONAVIRUS, rdcf1.region, rdcf1.district, rdcf1.pointOfEntry);
PersonCriteria criteria = new PersonCriteria();
criteria.setPersonAssociation(PersonAssociation.TRAVEL_ENTRY);
List<PersonIndexDto> travelEntryPersonsFornationalUser = getPersonFacade().getIndexList(criteria, null, null, null);
assertEquals(1, travelEntryPersonsFornationalUser.size());
assertEquals(person1.getUuid(), travelEntryPersonsFornationalUser.get(0).getUuid());
loginWith(districtUser1);
List<PersonIndexDto> indexListForDistrictUser1 = getPersonFacade().getIndexList(null, null, null, null);
assertEquals(1, indexListForDistrictUser1.size());
assertEquals(person1.getUuid(), indexListForDistrictUser1.get(0).getUuid());
loginWith(districtUser2);
List<PersonIndexDto> indexListForDistrictUser2 = getPersonFacade().getIndexList(null, null, null, null);
assertEquals(2, indexListForDistrictUser2.size());
}
use of de.symeda.sormas.api.person.PersonIndexDto in project SORMAS-Project by hzi-braunschweig.
the class ImportExportTest method testImportExportedContact.
@Test
public void testImportExportedContact() throws IOException, CsvException, InvalidColumnException, InterruptedException {
TestDataCreator.RDCF rdcf = creator.createRDCF("Region", "District", "Community", "Health facility");
UserDto user = creator.createUser(null, null, null, "james", "Smith", UserRole.NATIONAL_USER);
PersonDto person = creator.createPerson("John", "Doe");
Date dateNow = new Date();
ContactDto contact = creator.createContact(user.toReference(), user.toReference(), person.toReference(), creator.createCase(user.toReference(), person.toReference(), Disease.CORONAVIRUS, CaseClassification.PROBABLE, InvestigationStatus.PENDING, dateNow, rdcf), dateNow, dateNow);
contact.setExternalID("text-ext-id");
contact.setExternalToken("text-ext-token");
contact.setDiseaseDetails("Corona");
contact.setRegion(rdcf.region.toReference());
contact.setDistrict(rdcf.district.toReference());
contact.setCommunity(rdcf.community.toReference());
contact.setQuarantine(QuarantineType.INSTITUTIONELL);
contact.setQuarantineFrom(dateNow);
contact.setQuarantineTo(dateNow);
contact.setQuarantineExtended(true);
contact.setFollowUpStatus(FollowUpStatus.FOLLOW_UP);
contact.setFollowUpUntil(dateNow);
getContactFacade().save(contact);
person.setSex(Sex.MALE);
person.setBirthdateDD(11);
person.setBirthdateMM(12);
person.setBirthdateYYYY(1962);
person.setPresentCondition(PresentCondition.ALIVE);
person.getAddress().setRegion(rdcf.region.toReference());
person.getAddress().setDistrict(rdcf.district.toReference());
person.getAddress().setCommunity(rdcf.community.toReference());
person.getAddress().setCity("test city");
person.getAddress().setStreet("test street");
person.getAddress().setHouseNumber("test house number");
person.getAddress().setAdditionalInformation("test additional information");
person.getAddress().setPostalCode("test postal code");
person.getAddress().setPostalCode("test postal code");
getPersonFacade().savePerson(person);
StreamResource exportStreamResource = ContactDownloadUtil.createContactExportResource(new ContactCriteria(), Collections::emptySet, null);
List<String[]> rows = getCsvReader(exportStreamResource.getStreamSource().getStream()).readAll();
assertThat(rows, hasSize(4));
String[] columns = rows.get(1);
String[] values = rows.get(3);
String importUuid = DataHelper.createUuid();
for (int i = 0, getLength = columns.length; i < getLength; i++) {
String column = columns[i];
if (ContactDto.UUID.equals(column)) {
values[i] = importUuid;
} else // update name avoid duplicate checking
if (String.join(".", ContactDto.PERSON, PersonDto.FIRST_NAME).equals(column)) {
values[i] = "Import John";
} else if (String.join(".", ContactDto.PERSON, PersonDto.LAST_NAME).equals(column)) {
values[i] = "Import Doe";
} else if (String.join(".", ContactDto.PERSON, PersonDto.UUID).equals(column)) {
// Workaround: Reset the change date to avoid OutdatedEntityExceptions
// Applying a setChangeDate(new Date()) to the person before saving it will result in creating 2 cases and will fail the test
// So let's just ignore this column for now...
values[i] = "";
}
}
File tempFile = File.createTempFile("export", "csv");
tempFile.deleteOnExit();
FileOutputStream out = new FileOutputStream(tempFile);
IOUtils.copy(new ByteArrayInputStream(rows.stream().map(r -> String.join(",", Arrays.asList(r))).collect(Collectors.joining("\n")).getBytes(StandardCharsets.UTF_8)), out);
ContactImporterExtension contactImporter = new ContactImporterExtension(tempFile, user);
contactImporter.runImport();
InputStream errorStream = new ByteArrayInputStream(contactImporter.stringBuilder.toString().getBytes(StandardCharsets.UTF_8));
List<String[]> errorRows = getCsvReader(errorStream).readAll();
if (errorRows.size() > 1) {
assertThat("Error during import: " + StringUtils.join(errorRows.get(1), ", "), errorRows, hasSize(0));
}
PersonCriteria importPersonCriteria = new PersonCriteria();
importPersonCriteria.setNameAddressPhoneEmailLike("Import John");
List<PersonIndexDto> importedPersons = getPersonFacade().getIndexList(importPersonCriteria, null, null, null);
assertThat(importedPersons.size(), is(1));
List<ContactDto> importedContacts = getContactFacade().getByPersonUuids(Collections.singletonList(importedPersons.get(0).getUuid()));
assertThat(importedContacts.size(), is(1));
ContactDto importedContact = importedContacts.get(0);
assertThat(importedContact.getUuid(), not(importUuid));
assertThat(importedContact.getExternalID(), is("text-ext-id"));
assertThat(importedContact.getExternalToken(), is("text-ext-token"));
assertThat(importedContact.getDisease(), is(Disease.CORONAVIRUS));
assertThat(importedContact.getDiseaseDetails(), is("Corona"));
assertThat(importedContact.getRegion(), is(rdcf.region));
assertThat(importedContact.getDistrict(), is(rdcf.district));
assertThat(importedContact.getCommunity(), is(rdcf.community));
assertThat(importedContact.getQuarantine(), is(QuarantineType.INSTITUTIONELL));
assertThat(importedContact.getQuarantineFrom().getTime(), is(DateHelper.getStartOfDay(dateNow).getTime()));
assertThat(importedContact.getQuarantineTo().getTime(), is(DateHelper.getStartOfDay(dateNow).getTime()));
assertThat(importedContact.isQuarantineExtended(), is(true));
assertThat(importedContact.getFollowUpStatus(), is(FollowUpStatus.FOLLOW_UP));
PersonDto importedPerson = getPersonFacade().getPersonByUuid(importedContact.getPerson().getUuid());
assertThat(importedPerson.getFirstName(), is("Import John"));
assertThat(importedPerson.getLastName(), is("Import Doe"));
assertThat(importedPerson.getSex(), is(Sex.MALE));
assertThat(importedPerson.getBirthdateDD(), is(11));
assertThat(importedPerson.getBirthdateMM(), is(12));
assertThat(importedPerson.getBirthdateYYYY(), is(1962));
assertThat(importedPerson.getPresentCondition(), is(PresentCondition.ALIVE));
assertThat(importedPerson.getAddress().getRegion(), is(rdcf.region));
assertThat(importedPerson.getAddress().getDistrict(), is(rdcf.district));
assertThat(importedPerson.getAddress().getCommunity(), is(rdcf.community));
assertThat(importedPerson.getAddress().getCity(), is("test city"));
assertThat(importedPerson.getAddress().getStreet(), is("test street"));
assertThat(importedPerson.getAddress().getHouseNumber(), is("test house number"));
assertThat(importedPerson.getAddress().getAdditionalInformation(), is("test additional information"));
}
Aggregations