Search in sources :

Example 1 with Country

use of de.symeda.sormas.backend.infrastructure.country.Country in project SORMAS-Project by hzi-braunschweig.

the class StartupShutdownService method upgrade.

private void upgrade() {
    @SuppressWarnings("unchecked") List<Integer> versionsNeedingUpgrade = em.createNativeQuery("SELECT version_number FROM schema_version WHERE upgradeNeeded").getResultList();
    for (Integer versionNeedingUpgrade : versionsNeedingUpgrade) {
        switch(versionNeedingUpgrade) {
            case 95:
                // update follow up and status for all contacts
                for (Contact contact : contactService.getAll()) {
                    contactService.updateFollowUpDetails(contact, false);
                    contactService.udpateContactStatus(contact);
                }
                break;
            case 354:
                CountryReferenceDto serverCountry = countryFacade.getServerCountry();
                if (serverCountry != null) {
                    Country country = countryService.getByUuid(serverCountry.getUuid());
                    em.createQuery("UPDATE Region set country = :server_country, changeDate = :change_date WHERE country is null").setParameter("server_country", country).setParameter("change_date", new Timestamp(new Date().getTime())).executeUpdate();
                }
                break;
            default:
                throw new NoSuchElementException(DataHelper.toStringNullable(versionNeedingUpgrade));
        }
        int updatedRows = em.createNativeQuery("UPDATE schema_version SET upgradeNeeded=false WHERE version_number=?1").setParameter(1, versionNeedingUpgrade).executeUpdate();
        if (updatedRows != 1) {
            logger.error("Could not UPDATE schema_version table. Missing user rights?");
        }
    }
}
Also used : CountryReferenceDto(de.symeda.sormas.api.infrastructure.country.CountryReferenceDto) Country(de.symeda.sormas.backend.infrastructure.country.Country) Timestamp(java.sql.Timestamp) Date(java.util.Date) NoSuchElementException(java.util.NoSuchElementException) Contact(de.symeda.sormas.backend.contact.Contact)

Example 2 with Country

use of de.symeda.sormas.backend.infrastructure.country.Country in project SORMAS-Project by hzi-braunschweig.

the class InfraValidationSoundnessTest method setUpInfra.

protected void setUpInfra(boolean randomUuid) {
    DefaultEntitiesCreator defaultEntitiesCreator = getDefaultEntitiesCreator();
    Continent continent = defaultEntitiesCreator.createDefaultContinent(randomUuid);
    getContinentService().ensurePersisted(continent);
    Subcontinent subcontinent = defaultEntitiesCreator.createDefaultSubcontinent(continent, randomUuid);
    getSubcontinentService().ensurePersisted(subcontinent);
    Country country = defaultEntitiesCreator.createDefaultCountry(subcontinent, randomUuid);
    getCountryService().ensurePersisted(country);
    Region region = defaultEntitiesCreator.createDefaultRegion(randomUuid);
    getRegionService().ensurePersisted(region);
    District district = defaultEntitiesCreator.createDefaultDistrict(region, randomUuid);
    getDistrictService().ensurePersisted(district);
    Community community = defaultEntitiesCreator.createDefaultCommunity(district, randomUuid);
    getCommunityService().ensurePersisted(community);
    assert !getRegionService().getAll().isEmpty();
}
Also used : Continent(de.symeda.sormas.backend.infrastructure.continent.Continent) Country(de.symeda.sormas.backend.infrastructure.country.Country) Region(de.symeda.sormas.backend.infrastructure.region.Region) DefaultEntitiesCreator(de.symeda.sormas.backend.common.DefaultEntitiesCreator) Subcontinent(de.symeda.sormas.backend.infrastructure.subcontinent.Subcontinent) District(de.symeda.sormas.backend.infrastructure.district.District) Community(de.symeda.sormas.backend.infrastructure.community.Community)

Example 3 with Country

use of de.symeda.sormas.backend.infrastructure.country.Country in project SORMAS-Project by hzi-braunschweig.

the class RegionFacadeEjb method getIndexList.

@Override
public List<RegionIndexDto> getIndexList(RegionCriteria criteria, Integer first, Integer max, List<SortProperty> sortProperties) {
    CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<Region> cq = cb.createQuery(Region.class);
    Root<Region> region = cq.from(Region.class);
    Join<Region, Area> area = region.join(Region.AREA, JoinType.LEFT);
    Join<Region, Country> country = region.join(Region.COUNTRY, JoinType.LEFT);
    Predicate filter = null;
    if (criteria != null) {
        filter = service.buildCriteriaFilter(criteria, cb, region);
    }
    if (filter != null) {
        cq.where(filter);
    }
    if (CollectionUtils.isNotEmpty(sortProperties)) {
        List<Order> order = new ArrayList<>(sortProperties.size());
        for (SortProperty sortProperty : sortProperties) {
            Expression<?> expression;
            switch(sortProperty.propertyName) {
                case Region.NAME:
                case Region.EPID_CODE:
                case Region.GROWTH_RATE:
                case Region.EXTERNAL_ID:
                    expression = region.get(sortProperty.propertyName);
                    break;
                case Region.AREA:
                    expression = area.get(Area.NAME);
                    break;
                case RegionIndexDto.COUNTRY:
                    expression = country.get(Country.DEFAULT_NAME);
                    break;
                default:
                    throw new IllegalArgumentException(sortProperty.propertyName);
            }
            order.add(sortProperty.ascending ? cb.asc(expression) : cb.desc(expression));
        }
        cq.orderBy(order);
    } else {
        cq.orderBy(cb.asc(region.get(Region.NAME)));
    }
    cq.select(region);
    return QueryHelper.getResultList(em, cq, first, max, this::toIndexDto);
}
Also used : CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) Order(javax.persistence.criteria.Order) ArrayList(java.util.ArrayList) Predicate(javax.persistence.criteria.Predicate) Area(de.symeda.sormas.backend.infrastructure.area.Area) SortProperty(de.symeda.sormas.api.utils.SortProperty) Country(de.symeda.sormas.backend.infrastructure.country.Country)

Example 4 with Country

use of de.symeda.sormas.backend.infrastructure.country.Country in project SORMAS-Project by hzi-braunschweig.

the class ContinentFacadeEjb method getByCountry.

@Override
public ContinentReferenceDto getByCountry(CountryReferenceDto countryReferenceDto) {
    final Country country = countryService.getByUuid(countryReferenceDto.getUuid());
    final Subcontinent subcontinent = country.getSubcontinent();
    return subcontinent != null ? toReferenceDto(subcontinent.getContinent()) : null;
}
Also used : Country(de.symeda.sormas.backend.infrastructure.country.Country) Subcontinent(de.symeda.sormas.backend.infrastructure.subcontinent.Subcontinent)

Example 5 with Country

use of de.symeda.sormas.backend.infrastructure.country.Country in project SORMAS-Project by hzi-braunschweig.

the class EventParticipantFacadeEjb method getExportList.

@Override
public List<EventParticipantExportDto> getExportList(EventParticipantCriteria eventParticipantCriteria, Collection<String> selectedRows, int first, int max, Language userLanguage, ExportConfigurationDto exportConfiguration) {
    CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<EventParticipantExportDto> cq = cb.createQuery(EventParticipantExportDto.class);
    Root<EventParticipant> eventParticipant = cq.from(EventParticipant.class);
    EventParticipantQueryContext eventParticipantQueryContext = new EventParticipantQueryContext(cb, cq, eventParticipant);
    EventParticipantJoins<EventParticipant> joins = (EventParticipantJoins<EventParticipant>) eventParticipantQueryContext.getJoins();
    Join<EventParticipant, Person> person = joins.getPerson();
    PersonQueryContext personQueryContext = new PersonQueryContext(cb, cq, person);
    Join<Person, Location> address = joins.getAddress();
    Join<Person, Country> birthCountry = person.join(Person.BIRTH_COUNTRY, JoinType.LEFT);
    Join<Person, Country> citizenship = person.join(Person.CITIZENSHIP, JoinType.LEFT);
    Join<EventParticipant, Event> event = joins.getEvent();
    Join<Event, Location> eventLocation = joins.getEventAddress();
    Join<EventParticipant, Case> resultingCase = joins.getResultingCase();
    cq.multiselect(eventParticipant.get(EventParticipant.ID), person.get(Person.ID), person.get(Person.UUID), eventParticipant.get(EventParticipant.UUID), person.get(Person.NATIONAL_HEALTH_ID), person.get(Location.ID), JurisdictionHelper.booleanSelector(cb, service.inJurisdictionOrOwned(eventParticipantQueryContext)), event.get(Event.UUID), event.get(Event.EVENT_STATUS), event.get(Event.EVENT_INVESTIGATION_STATUS), event.get(Event.DISEASE), event.get(Event.TYPE_OF_PLACE), event.get(Event.START_DATE), event.get(Event.END_DATE), event.get(Event.EVENT_TITLE), event.get(Event.EVENT_DESC), eventLocation.join(Location.REGION, JoinType.LEFT).get(Region.NAME), eventLocation.join(Location.DISTRICT, JoinType.LEFT).get(District.NAME), eventLocation.join(Location.COMMUNITY, JoinType.LEFT).get(Community.NAME), eventLocation.get(Location.CITY), eventLocation.get(Location.STREET), eventLocation.get(Location.HOUSE_NUMBER), person.get(Person.FIRST_NAME), person.get(Person.LAST_NAME), person.get(Person.SALUTATION), person.get(Person.OTHER_SALUTATION), person.get(Person.SEX), eventParticipant.get(EventParticipant.INVOLVEMENT_DESCRIPTION), person.get(Person.APPROXIMATE_AGE), person.get(Person.APPROXIMATE_AGE_TYPE), person.get(Person.BIRTHDATE_DD), person.get(Person.BIRTHDATE_MM), person.get(Person.BIRTHDATE_YYYY), person.get(Person.PRESENT_CONDITION), person.get(Person.DEATH_DATE), person.get(Person.BURIAL_DATE), person.get(Person.BURIAL_CONDUCTOR), person.get(Person.BURIAL_PLACE_DESCRIPTION), joins.getAddressRegion().get(Region.NAME), joins.getAddressDistrict().get(District.NAME), joins.getAddressCommunity().get(Community.NAME), address.get(Location.CITY), address.get(Location.STREET), address.get(Location.HOUSE_NUMBER), address.get(Location.ADDITIONAL_INFORMATION), address.get(Location.POSTAL_CODE), personQueryContext.getSubqueryExpression(PersonQueryContext.PERSON_PHONE_SUBQUERY), personQueryContext.getSubqueryExpression(PersonQueryContext.PERSON_EMAIL_SUBQUERY), resultingCase.get(Case.UUID), person.get(Person.BIRTH_NAME), birthCountry.get(Country.ISO_CODE), birthCountry.get(Country.DEFAULT_NAME), citizenship.get(Country.ISO_CODE), citizenship.get(Country.DEFAULT_NAME), eventParticipant.get(EventParticipant.VACCINATION_STATUS));
    Predicate filter = service.buildCriteriaFilter(eventParticipantCriteria, eventParticipantQueryContext);
    filter = CriteriaBuilderHelper.andInValues(selectedRows, filter, cb, eventParticipant.get(EventParticipant.UUID));
    cq.where(filter);
    List<EventParticipantExportDto> eventParticipantResultList = QueryHelper.getResultList(em, cq, first, max);
    if (!eventParticipantResultList.isEmpty()) {
        Map<String, Long> eventParticipantContactCount = getContactCountPerEventParticipant(eventParticipantResultList.stream().map(EventParticipantExportDto::getEventParticipantUuid).collect(Collectors.toList()), eventParticipantCriteria);
        Map<Long, Location> personAddresses = null;
        if (ExportHelper.shouldExportFields(exportConfiguration, PersonDto.ADDRESS, CaseExportDto.ADDRESS_GPS_COORDINATES)) {
            CriteriaQuery<Location> personAddressesCq = cb.createQuery(Location.class);
            Root<Location> personAddressesRoot = personAddressesCq.from(Location.class);
            Expression<String> personAddressesIdsExpr = personAddressesRoot.get(Location.ID);
            personAddressesCq.where(personAddressesIdsExpr.in(eventParticipantResultList.stream().map(EventParticipantExportDto::getPersonAddressId).collect(Collectors.toList())));
            List<Location> personAddressesList = em.createQuery(personAddressesCq).setHint(ModelConstants.HINT_HIBERNATE_READ_ONLY, true).getResultList();
            personAddresses = personAddressesList.stream().collect(Collectors.toMap(Location::getId, Function.identity()));
        }
        Map<Long, List<Sample>> samples = null;
        if (ExportHelper.shouldExportFields(exportConfiguration, EventParticipantExportDto.SAMPLE_INFORMATION)) {
            List<Sample> samplesList = null;
            CriteriaQuery<Sample> samplesCq = cb.createQuery(Sample.class);
            Root<Sample> samplesRoot = samplesCq.from(Sample.class);
            Join<Sample, EventParticipant> samplesEventParticipantJoin = samplesRoot.join(Sample.ASSOCIATED_EVENT_PARTICIPANT, JoinType.LEFT);
            Expression<String> eventParticipantIdsExpr = samplesEventParticipantJoin.get(EventParticipant.ID);
            samplesCq.where(eventParticipantIdsExpr.in(eventParticipantResultList.stream().map(EventParticipantExportDto::getId).collect(Collectors.toList())));
            samplesList = em.createQuery(samplesCq).setHint(ModelConstants.HINT_HIBERNATE_READ_ONLY, true).getResultList();
            samples = samplesList.stream().collect(Collectors.groupingBy(s -> s.getAssociatedEventParticipant().getId()));
        }
        Map<Long, List<Immunization>> immunizations = null;
        if (exportConfiguration == null || exportConfiguration.getProperties().stream().anyMatch(p -> StringUtils.equalsAny(p, ExportHelper.getVaccinationExportProperties()))) {
            List<Immunization> immunizationList;
            CriteriaQuery<Immunization> immunizationsCq = cb.createQuery(Immunization.class);
            Root<Immunization> immunizationsCqRoot = immunizationsCq.from(Immunization.class);
            Join<Immunization, Person> personJoin = immunizationsCqRoot.join(Immunization.PERSON, JoinType.LEFT);
            Expression<String> personIdsExpr = personJoin.get(Person.ID);
            immunizationsCq.where(CriteriaBuilderHelper.and(cb, cb.or(cb.equal(immunizationsCqRoot.get(Immunization.MEANS_OF_IMMUNIZATION), MeansOfImmunization.VACCINATION), cb.equal(immunizationsCqRoot.get(Immunization.MEANS_OF_IMMUNIZATION), MeansOfImmunization.VACCINATION_RECOVERY)), personIdsExpr.in(eventParticipantResultList.stream().map(EventParticipantExportDto::getPersonId).collect(Collectors.toList()))));
            immunizationList = em.createQuery(immunizationsCq).setHint(ModelConstants.HINT_HIBERNATE_READ_ONLY, true).getResultList();
            immunizations = immunizationList.stream().collect(Collectors.groupingBy(i -> i.getPerson().getId()));
        }
        Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
        for (EventParticipantExportDto exportDto : eventParticipantResultList) {
            final boolean inJurisdiction = exportDto.getInJurisdiction();
            if (personAddresses != null) {
                Optional.ofNullable(personAddresses.get(exportDto.getPersonAddressId())).ifPresent(personAddress -> exportDto.setAddressGpsCoordinates(personAddress.buildGpsCoordinatesCaption()));
            }
            if (samples != null) {
                Optional.ofNullable(samples.get(exportDto.getId())).ifPresent(eventParticipantSamples -> {
                    int count = 0;
                    for (Sample sample : eventParticipantSamples) {
                        EmbeddedSampleExportDto sampleDto = new EmbeddedSampleExportDto(sample.getUuid(), sample.getSampleDateTime(), sample.getLab() != null ? FacilityHelper.buildFacilityString(sample.getLab().getUuid(), sample.getLab().getName(), sample.getLabDetails()) : null, sample.getPathogenTestResult());
                        exportDto.addEventParticipantSample(sampleDto);
                    }
                });
            }
            if (immunizations != null) {
                Optional.ofNullable(immunizations.get(exportDto.getPersonId())).ifPresent(epImmunizations -> {
                    List<Immunization> filteredImmunizations = epImmunizations.stream().filter(i -> i.getDisease() == exportDto.getEventDisease()).collect(Collectors.toList());
                    filteredImmunizations.sort(Comparator.comparing(i -> ImmunizationEntityHelper.getDateForComparison(i, false)));
                    Immunization mostRecentImmunization = filteredImmunizations.get(filteredImmunizations.size() - 1);
                    exportDto.setVaccinationDoses(String.valueOf(mostRecentImmunization.getNumberOfDoses()));
                    if (CollectionUtils.isNotEmpty(mostRecentImmunization.getVaccinations())) {
                        List<Vaccination> sortedVaccinations = mostRecentImmunization.getVaccinations().stream().sorted(Comparator.comparing(ImmunizationEntityHelper::getVaccinationDateForComparison)).collect(Collectors.toList());
                        Vaccination firstVaccination = sortedVaccinations.get(0);
                        Vaccination lastVaccination = sortedVaccinations.get(sortedVaccinations.size() - 1);
                        exportDto.setFirstVaccinationDate(firstVaccination.getVaccinationDate());
                        exportDto.setLastVaccinationDate(lastVaccination.getVaccinationDate());
                        exportDto.setVaccineName(lastVaccination.getVaccineName());
                        exportDto.setOtherVaccineName(lastVaccination.getOtherVaccineName());
                        exportDto.setVaccineManufacturer(lastVaccination.getVaccineManufacturer());
                        exportDto.setOtherVaccineManufacturer(lastVaccination.getOtherVaccineManufacturer());
                        exportDto.setVaccinationInfoSource(lastVaccination.getVaccinationInfoSource());
                        exportDto.setVaccineAtcCode(lastVaccination.getVaccineAtcCode());
                        exportDto.setVaccineBatchNumber(lastVaccination.getVaccineBatchNumber());
                        exportDto.setVaccineUniiCode(lastVaccination.getVaccineUniiCode());
                        exportDto.setVaccineInn(lastVaccination.getVaccineInn());
                    }
                });
            }
            Optional.ofNullable(eventParticipantContactCount.get(exportDto.getEventParticipantUuid())).ifPresent(exportDto::setContactCount);
            pseudonymizer.pseudonymizeDto(EventParticipantExportDto.class, exportDto, inJurisdiction, (c) -> {
                pseudonymizer.pseudonymizeDto(BirthDateDto.class, c.getBirthdate(), inJurisdiction, null);
                pseudonymizer.pseudonymizeDtoCollection(EmbeddedSampleExportDto.class, c.getEventParticipantSamples(), s -> inJurisdiction, null);
                pseudonymizer.pseudonymizeDto(BurialInfoDto.class, c.getBurialInfo(), inJurisdiction, null);
            });
        }
    }
    return eventParticipantResultList;
}
Also used : EventParticipantFacade(de.symeda.sormas.api.event.EventParticipantFacade) DtoHelper(de.symeda.sormas.backend.util.DtoHelper) EmbeddedSampleExportDto(de.symeda.sormas.api.caze.EmbeddedSampleExportDto) Immunization(de.symeda.sormas.backend.immunization.entity.Immunization) MeansOfImmunization(de.symeda.sormas.api.immunization.MeansOfImmunization) DistrictService(de.symeda.sormas.backend.infrastructure.district.DistrictService) StringUtils(org.apache.commons.lang3.StringUtils) PersonDto(de.symeda.sormas.api.person.PersonDto) Valid(javax.validation.Valid) AbstractCoreFacadeEjb(de.symeda.sormas.backend.common.AbstractCoreFacadeEjb) EventParticipantJoins(de.symeda.sormas.utils.EventParticipantJoins) Page(de.symeda.sormas.api.common.Page) Predicate(javax.persistence.criteria.Predicate) CaseExportDto(de.symeda.sormas.api.caze.CaseExportDto) Duration(java.time.Duration) Map(java.util.Map) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) JoinType(javax.persistence.criteria.JoinType) SormasToSormasOriginInfoFacadeEjb(de.symeda.sormas.backend.sormastosormas.origin.SormasToSormasOriginInfoFacadeEjb) EventParticipantReferenceDto(de.symeda.sormas.api.event.EventParticipantReferenceDto) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) EventParticipantExportDto(de.symeda.sormas.api.event.EventParticipantExportDto) FacilityHelper(de.symeda.sormas.api.infrastructure.facility.FacilityHelper) NotNull(javax.validation.constraints.NotNull) UserService(de.symeda.sormas.backend.user.UserService) User(de.symeda.sormas.backend.user.User) JurisdictionHelper(de.symeda.sormas.backend.util.JurisdictionHelper) DeletableAdo(de.symeda.sormas.backend.common.DeletableAdo) RegionReferenceDto(de.symeda.sormas.api.infrastructure.region.RegionReferenceDto) Sample(de.symeda.sormas.backend.sample.Sample) Community(de.symeda.sormas.backend.infrastructure.community.Community) QueryHelper(de.symeda.sormas.backend.util.QueryHelper) EventParticipantCriteria(de.symeda.sormas.api.event.EventParticipantCriteria) PersonReferenceDto(de.symeda.sormas.api.person.PersonReferenceDto) ArrayList(java.util.ArrayList) Case(de.symeda.sormas.backend.caze.Case) LocalBean(javax.ejb.LocalBean) SimilarEventParticipantDto(de.symeda.sormas.api.event.SimilarEventParticipantDto) ExportHelper(de.symeda.sormas.backend.importexport.ExportHelper) EJB(javax.ejb.EJB) Root(javax.persistence.criteria.Root) DataHelper(de.symeda.sormas.api.utils.DataHelper) PersonFacadeEjb(de.symeda.sormas.backend.person.PersonFacadeEjb) DistrictReferenceDto(de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto) PersonService(de.symeda.sormas.backend.person.PersonService) SortProperty(de.symeda.sormas.api.utils.SortProperty) Captions(de.symeda.sormas.api.i18n.Captions) Disease(de.symeda.sormas.api.Disease) ContactService(de.symeda.sormas.backend.contact.ContactService) EventReferenceDto(de.symeda.sormas.api.event.EventReferenceDto) Subquery(javax.persistence.criteria.Subquery) ImmunizationEntityHelper(de.symeda.sormas.backend.immunization.ImmunizationEntityHelper) Join(javax.persistence.criteria.Join) AbstractDomainObject(de.symeda.sormas.backend.common.AbstractDomainObject) Date(java.util.Date) EventParticipantListEntryDto(de.symeda.sormas.api.event.EventParticipantListEntryDto) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) LoggerFactory(org.slf4j.LoggerFactory) EventParticipantDto(de.symeda.sormas.api.event.EventParticipantDto) AbstractCoreAdoService(de.symeda.sormas.backend.common.AbstractCoreAdoService) AccessDeniedException(de.symeda.sormas.api.utils.AccessDeniedException) Vaccination(de.symeda.sormas.backend.vaccination.Vaccination) NotificationService(de.symeda.sormas.backend.common.NotificationService) EventFacadeEjbLocal(de.symeda.sormas.backend.event.EventFacadeEjb.EventFacadeEjbLocal) Contact(de.symeda.sormas.backend.contact.Contact) Stateless(javax.ejb.Stateless) CaseService(de.symeda.sormas.backend.caze.CaseService) NotificationDeliveryFailedException(de.symeda.sormas.backend.common.messaging.NotificationDeliveryFailedException) Person(de.symeda.sormas.backend.person.Person) Collection(java.util.Collection) Region(de.symeda.sormas.backend.infrastructure.region.Region) EventDto(de.symeda.sormas.api.event.EventDto) District(de.symeda.sormas.backend.infrastructure.district.District) Instant(java.time.Instant) Pseudonymizer(de.symeda.sormas.backend.util.Pseudonymizer) Collectors(java.util.stream.Collectors) Language(de.symeda.sormas.api.Language) ExportConfigurationDto(de.symeda.sormas.api.importexport.ExportConfigurationDto) List(java.util.List) MessageContents(de.symeda.sormas.backend.common.messaging.MessageContents) BirthDateDto(de.symeda.sormas.api.caze.BirthDateDto) DistrictFacadeEjb(de.symeda.sormas.backend.infrastructure.district.DistrictFacadeEjb) PersonQueryContext(de.symeda.sormas.backend.person.PersonQueryContext) Order(javax.persistence.criteria.Order) Optional(java.util.Optional) Location(de.symeda.sormas.backend.location.Location) ValidationRuntimeException(de.symeda.sormas.api.utils.ValidationRuntimeException) VaccinationFacadeEjb(de.symeda.sormas.backend.vaccination.VaccinationFacadeEjb) HashMap(java.util.HashMap) CaseFacadeEjb(de.symeda.sormas.backend.caze.CaseFacadeEjb) CoreEntityType(de.symeda.sormas.backend.deletionconfiguration.CoreEntityType) Function(java.util.function.Function) Inject(javax.inject.Inject) CollectionUtils(org.apache.commons.collections.CollectionUtils) IterableHelper(de.symeda.sormas.backend.util.IterableHelper) Expression(javax.persistence.criteria.Expression) CriteriaBuilderHelper(de.symeda.sormas.backend.common.CriteriaBuilderHelper) BurialInfoDto(de.symeda.sormas.api.caze.BurialInfoDto) ModelConstants(de.symeda.sormas.backend.util.ModelConstants) EventParticipantIndexDto(de.symeda.sormas.api.event.EventParticipantIndexDto) LocationDto(de.symeda.sormas.api.location.LocationDto) Logger(org.slf4j.Logger) Validations(de.symeda.sormas.api.i18n.Validations) MessageSubject(de.symeda.sormas.backend.common.messaging.MessageSubject) RegionFacadeEjb(de.symeda.sormas.backend.infrastructure.region.RegionFacadeEjb) RegionService(de.symeda.sormas.backend.infrastructure.region.RegionService) UserRight(de.symeda.sormas.api.user.UserRight) NotificationType(de.symeda.sormas.api.user.NotificationType) Country(de.symeda.sormas.backend.infrastructure.country.Country) ShareInfoHelper(de.symeda.sormas.backend.sormastosormas.share.shareinfo.ShareInfoHelper) Comparator(java.util.Comparator) Strings(de.symeda.sormas.api.i18n.Strings) Collections(java.util.Collections) Pseudonymizer(de.symeda.sormas.backend.util.Pseudonymizer) ImmunizationEntityHelper(de.symeda.sormas.backend.immunization.ImmunizationEntityHelper) Predicate(javax.persistence.criteria.Predicate) ArrayList(java.util.ArrayList) List(java.util.List) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) Immunization(de.symeda.sormas.backend.immunization.entity.Immunization) MeansOfImmunization(de.symeda.sormas.api.immunization.MeansOfImmunization) EventParticipantExportDto(de.symeda.sormas.api.event.EventParticipantExportDto) Country(de.symeda.sormas.backend.infrastructure.country.Country) Person(de.symeda.sormas.backend.person.Person) Vaccination(de.symeda.sormas.backend.vaccination.Vaccination) Case(de.symeda.sormas.backend.caze.Case) EventParticipantJoins(de.symeda.sormas.utils.EventParticipantJoins) Sample(de.symeda.sormas.backend.sample.Sample) EmbeddedSampleExportDto(de.symeda.sormas.api.caze.EmbeddedSampleExportDto) PersonQueryContext(de.symeda.sormas.backend.person.PersonQueryContext) Location(de.symeda.sormas.backend.location.Location)

Aggregations

Country (de.symeda.sormas.backend.infrastructure.country.Country)17 AbstractBeanTest (de.symeda.sormas.backend.AbstractBeanTest)10 Test (org.junit.Test)10 CountryDto (de.symeda.sormas.api.infrastructure.country.CountryDto)5 Date (java.util.Date)3 CountryReferenceDto (de.symeda.sormas.api.infrastructure.country.CountryReferenceDto)2 PersonDto (de.symeda.sormas.api.person.PersonDto)2 SortProperty (de.symeda.sormas.api.utils.SortProperty)2 Contact (de.symeda.sormas.backend.contact.Contact)2 Community (de.symeda.sormas.backend.infrastructure.community.Community)2 District (de.symeda.sormas.backend.infrastructure.district.District)2 Region (de.symeda.sormas.backend.infrastructure.region.Region)2 Subcontinent (de.symeda.sormas.backend.infrastructure.subcontinent.Subcontinent)2 ArrayList (java.util.ArrayList)2 CriteriaBuilder (javax.persistence.criteria.CriteriaBuilder)2 Order (javax.persistence.criteria.Order)2 Predicate (javax.persistence.criteria.Predicate)2 Disease (de.symeda.sormas.api.Disease)1 Language (de.symeda.sormas.api.Language)1 BirthDateDto (de.symeda.sormas.api.caze.BirthDateDto)1