Search in sources :

Example 1 with EventParticipantCriteria

use of de.symeda.sormas.api.event.EventParticipantCriteria in project SORMAS-Project by hzi-braunschweig.

the class PersonFacadeEjb method onPersonChanged.

public void onPersonChanged(PersonDto existingPerson, Person newPerson, boolean syncShares) {
    List<Case> personCases = null;
    // Do not bother to update existing cases/contacts/eventparticipants on new Persons, as none should exist yet
    if (existingPerson != null) {
        personCases = caseService.findBy(new CaseCriteria().person(new PersonReferenceDto(newPerson.getUuid())), true);
        // Attention: this may lead to infinite recursion when not properly implemented
        for (Case personCase : personCases) {
            CaseDataDto existingCase = caseFacade.toDto(personCase);
            caseFacade.onCaseChanged(existingCase, personCase, syncShares);
        }
        List<Contact> personContacts = contactService.findBy(new ContactCriteria().setPerson(new PersonReferenceDto(newPerson.getUuid())), null);
        // Attention: this may lead to infinite recursion when not properly implemented
        for (Contact personContact : personContacts) {
            contactFacade.onContactChanged(contactFacade.toDto(personContact), syncShares);
        }
        List<EventParticipant> personEventParticipants = eventParticipantService.findBy(new EventParticipantCriteria().withPerson(new PersonReferenceDto(newPerson.getUuid())), null);
        // Attention: this may lead to infinite recursion when not properly implemented
        for (EventParticipant personEventParticipant : personEventParticipants) {
            eventParticipantFacade.onEventParticipantChanged(eventFacade.toDto(personEventParticipant.getEvent()), eventParticipantFacade.toDto(personEventParticipant), personEventParticipant, syncShares);
        }
        // get the updated personCases
        personCases = caseService.findBy(new CaseCriteria().person(new PersonReferenceDto(newPerson.getUuid())), true);
        // sort cases based on recency
        Collections.sort(personCases, (c1, c2) -> CaseLogic.getStartDate(c1.getSymptoms().getOnsetDate(), c1.getReportDate()).before(CaseLogic.getStartDate(c2.getSymptoms().getOnsetDate(), c2.getReportDate())) ? 1 : -1);
        if (newPerson.getPresentCondition() != null && existingPerson.getPresentCondition() != newPerson.getPresentCondition()) {
            // get the latest case with disease==causeofdeathdisease
            Case personCase = personCases.stream().filter(caze -> caze.getDisease() == newPerson.getCauseOfDeathDisease()).findFirst().orElse(null);
            if (newPerson.getPresentCondition().isDeceased() && newPerson.getDeathDate() != null && newPerson.getCauseOfDeath() == CauseOfDeath.EPIDEMIC_DISEASE && newPerson.getCauseOfDeathDisease() != null) {
                // update the latest associated case
                if (personCase != null && personCase.getOutcome() != CaseOutcome.DECEASED && (personCase.getReportDate().before(DateHelper.addDays(newPerson.getDeathDate(), 30)) && personCase.getReportDate().after(DateHelper.subtractDays(newPerson.getDeathDate(), 30)))) {
                    CaseDataDto existingCase = caseFacade.toDto(personCase);
                    personCase.setOutcome(CaseOutcome.DECEASED);
                    personCase.setOutcomeDate(newPerson.getDeathDate());
                    caseFacade.onCaseChanged(existingCase, personCase, syncShares);
                }
            } else if (!newPerson.getPresentCondition().isDeceased() && (existingPerson.getPresentCondition() == PresentCondition.DEAD || existingPerson.getPresentCondition() == PresentCondition.BURIED)) {
                // Person was put "back alive"
                // make sure other values are set to null
                newPerson.setCauseOfDeath(null);
                newPerson.setCauseOfDeathDisease(null);
                newPerson.setDeathPlaceDescription(null);
                newPerson.setDeathPlaceType(null);
                newPerson.setBurialDate(null);
                newPerson.setCauseOfDeathDisease(null);
                // update the latest associated case, if it was set to deceased && and if the case-disease was also the causeofdeath-disease
                if (personCase != null && personCase.getOutcome() == CaseOutcome.DECEASED) {
                    CaseDataDto existingCase = caseFacade.toDto(personCase);
                    personCase.setOutcome(CaseOutcome.NO_OUTCOME);
                    personCase.setOutcomeDate(null);
                    caseFacade.onCaseChanged(existingCase, personCase, syncShares);
                }
            }
        } else if (newPerson.getPresentCondition() != null && newPerson.getPresentCondition().isDeceased() && !Objects.equals(newPerson.getDeathDate(), existingPerson.getDeathDate()) && newPerson.getDeathDate() != null) {
            // only Deathdate has changed
            // update the latest associated case to the new deathdate, if causeOfDeath matches
            Case personCase = personCases.isEmpty() ? null : personCases.get(0);
            if (personCase != null && personCase.getOutcome() == CaseOutcome.DECEASED && newPerson.getCauseOfDeath() == CauseOfDeath.EPIDEMIC_DISEASE) {
                CaseDataDto existingCase = caseFacade.toDto(personCase);
                personCase.setOutcomeDate(newPerson.getDeathDate());
                caseFacade.onCaseChanged(existingCase, personCase, syncShares);
            }
        }
    }
    // Set approximate age if it hasn't been set before
    if (newPerson.getApproximateAge() == null && newPerson.getBirthdateYYYY() != null) {
        Pair<Integer, ApproximateAgeType> pair = ApproximateAgeHelper.getApproximateAge(newPerson.getBirthdateYYYY(), newPerson.getBirthdateMM(), newPerson.getBirthdateDD(), newPerson.getDeathDate());
        newPerson.setApproximateAge(pair.getElement0());
        newPerson.setApproximateAgeType(pair.getElement1());
        newPerson.setApproximateAgeReferenceDate(newPerson.getDeathDate() != null ? newPerson.getDeathDate() : new Date());
    }
    // Update caseAge of all associated cases when approximateAge has changed
    if (existingPerson != null && existingPerson.getApproximateAge() != newPerson.getApproximateAge()) {
        // Update case list after previous onCaseChanged
        personCases = caseService.findBy(new CaseCriteria().person(new PersonReferenceDto(newPerson.getUuid())), true);
        for (Case personCase : personCases) {
            CaseDataDto existingCase = caseFacade.toDto(personCase);
            if (newPerson.getApproximateAge() == null) {
                personCase.setCaseAge(null);
            } else if (newPerson.getApproximateAgeType() == ApproximateAgeType.MONTHS) {
                personCase.setCaseAge(0);
            } else {
                Date now = new Date();
                personCase.setCaseAge(newPerson.getApproximateAge() - DateHelper.getYearsBetween(personCase.getReportDate(), now));
                if (personCase.getCaseAge() < 0) {
                    personCase.setCaseAge(0);
                }
            }
            caseFacade.onCaseChanged(existingCase, personCase, syncShares);
        }
    }
    // For newly created persons, assume no registration in external journals
    if (existingPerson == null && newPerson.getSymptomJournalStatus() == null) {
        newPerson.setSymptomJournalStatus(SymptomJournalStatus.UNREGISTERED);
    }
    cleanUp(newPerson);
}
Also used : CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) PersonReferenceDto(de.symeda.sormas.api.person.PersonReferenceDto) Date(java.util.Date) Case(de.symeda.sormas.backend.caze.Case) Contact(de.symeda.sormas.backend.contact.Contact) ApproximateAgeType(de.symeda.sormas.api.person.ApproximateAgeType) CaseCriteria(de.symeda.sormas.api.caze.CaseCriteria) ContactCriteria(de.symeda.sormas.api.contact.ContactCriteria) EventParticipantCriteria(de.symeda.sormas.api.event.EventParticipantCriteria) EventParticipant(de.symeda.sormas.backend.event.EventParticipant)

Example 2 with EventParticipantCriteria

use of de.symeda.sormas.api.event.EventParticipantCriteria in project SORMAS-Project by hzi-braunschweig.

the class CaseController method convertSamePersonContactsAndEventparticipants.

private void convertSamePersonContactsAndEventparticipants(CaseDataDto caze, Date relevantDate) {
    ContactSimilarityCriteria contactCriteria = new ContactSimilarityCriteria().withPerson(caze.getPerson()).withDisease(caze.getDisease()).withContactClassification(ContactClassification.CONFIRMED).withExcludePseudonymized(true).withNoResultingCase(true);
    List<SimilarContactDto> matchingContacts = FacadeProvider.getContactFacade().getMatchingContacts(contactCriteria);
    EventParticipantCriteria eventParticipantCriteria = new EventParticipantCriteria().withPerson(caze.getPerson()).withDisease(caze.getDisease()).withExcludePseudonymized(true).withNoResultingCase(true);
    List<SimilarEventParticipantDto> matchingEventParticipants = FacadeProvider.getEventParticipantFacade().getMatchingEventParticipants(eventParticipantCriteria);
    if (matchingContacts.size() > 0 || matchingEventParticipants.size() > 0) {
        String infoText = matchingEventParticipants.isEmpty() ? String.format(I18nProperties.getString(Strings.infoConvertToCaseContacts), matchingContacts.size(), caze.getDisease()) : (matchingContacts.isEmpty() ? String.format(I18nProperties.getString(Strings.infoConvertToCaseEventParticipants), matchingEventParticipants.size(), caze.getDisease()) : String.format(I18nProperties.getString(Strings.infoConvertToCaseContactsAndEventParticipants), matchingContacts.size(), caze.getDisease(), matchingEventParticipants.size(), caze.getDisease()));
        HorizontalLayout infoComponent = VaadinUiUtil.createInfoComponent(infoText);
        infoComponent.setWidth(600, Sizeable.Unit.PIXELS);
        CommitDiscardWrapperComponent<HorizontalLayout> convertToCaseConfirmComponent = new CommitDiscardWrapperComponent<>(infoComponent);
        convertToCaseConfirmComponent.getCommitButton().setCaption(I18nProperties.getCaption(Captions.actionYesForAll));
        convertToCaseConfirmComponent.getDiscardButton().setCaption(I18nProperties.getCaption(Captions.actionNo));
        convertToCaseConfirmComponent.addCommitListener(() -> {
            CaseDataDto refreshedCaze = FacadeProvider.getCaseFacade().getCaseDataByUuid(caze.getUuid());
            refreshedCaze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES);
            saveCase(refreshedCaze);
            setResultingCase(refreshedCaze, matchingContacts, matchingEventParticipants);
            SormasUI.refreshView();
        });
        Button convertSomeButton = ButtonHelper.createButton("convertSome", I18nProperties.getCaption(Captions.actionYesForSome), (Button.ClickListener) event -> {
            convertToCaseConfirmComponent.discard();
            showConvertToCaseSelection(caze, matchingContacts, matchingEventParticipants);
        }, ValoTheme.BUTTON_PRIMARY);
        HorizontalLayout buttonsPanel = convertToCaseConfirmComponent.getButtonsPanel();
        buttonsPanel.addComponent(convertSomeButton, convertToCaseConfirmComponent.getComponentCount() - 1);
        buttonsPanel.setComponentAlignment(convertSomeButton, Alignment.BOTTOM_RIGHT);
        buttonsPanel.setExpandRatio(convertSomeButton, 0);
        VaadinUiUtil.showModalPopupWindow(convertToCaseConfirmComponent, I18nProperties.getString(Strings.headingCaseConversion));
    }
}
Also used : Alignment(com.vaadin.ui.Alignment) CaseSimilarityCriteria(de.symeda.sormas.api.caze.CaseSimilarityCriteria) StringUtils(org.apache.commons.lang3.StringUtils) PersonDto(de.symeda.sormas.api.person.PersonDto) ClinicalCourseForm(de.symeda.sormas.ui.clinicalcourse.ClinicalCourseForm) YesNoUnknown(de.symeda.sormas.api.utils.YesNoUnknown) MaternalHistoryView(de.symeda.sormas.ui.caze.maternalhistory.MaternalHistoryView) CssStyles(de.symeda.sormas.ui.utils.CssStyles) Page(com.vaadin.server.Page) PortHealthInfoView(de.symeda.sormas.ui.caze.porthealthinfo.PortHealthInfoView) TextArea(com.vaadin.ui.TextArea) ValoTheme(com.vaadin.ui.themes.ValoTheme) DiseaseHelper(de.symeda.sormas.api.DiseaseHelper) Link(com.vaadin.ui.Link) HtmlHelper(de.symeda.sormas.api.utils.HtmlHelper) EpiDataForm(de.symeda.sormas.ui.epidata.EpiDataForm) Type(com.vaadin.ui.Notification.Type) CaseLogic(de.symeda.sormas.api.caze.CaseLogic) DateHelper8(de.symeda.sormas.ui.utils.DateHelper8) SimilarContactDto(de.symeda.sormas.api.contact.SimilarContactDto) MaternalHistoryForm(de.symeda.sormas.ui.caze.maternalhistory.MaternalHistoryForm) CloseEvent(com.vaadin.ui.Window.CloseEvent) ExternalSurveillanceToolException(de.symeda.sormas.api.externalsurveillancetool.ExternalSurveillanceToolException) RegionReferenceDto(de.symeda.sormas.api.infrastructure.region.RegionReferenceDto) VerticalLayout(com.vaadin.ui.VerticalLayout) EventParticipantCriteria(de.symeda.sormas.api.event.EventParticipantCriteria) PersonReferenceDto(de.symeda.sormas.api.person.PersonReferenceDto) SymptomsContext(de.symeda.sormas.api.symptoms.SymptomsContext) ArrayList(java.util.ArrayList) ClassificationHtmlRenderer(de.symeda.sormas.api.caze.classification.ClassificationHtmlRenderer) ExternalSurveillanceServiceGateway(de.symeda.sormas.ui.externalsurveillanceservice.ExternalSurveillanceServiceGateway) CommitDiscardWrapperComponent(de.symeda.sormas.ui.utils.CommitDiscardWrapperComponent) CountryHelper(de.symeda.sormas.api.CountryHelper) SimilarEventParticipantDto(de.symeda.sormas.api.event.SimilarEventParticipantDto) TitleLayout(de.symeda.sormas.ui.utils.components.page.title.TitleLayout) ContactSimilarityCriteria(de.symeda.sormas.api.contact.ContactSimilarityCriteria) ContentMode(com.vaadin.shared.ui.ContentMode) MessageType(de.symeda.sormas.api.messaging.MessageType) DataHelper(de.symeda.sormas.api.utils.DataHelper) DistrictReferenceDto(de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto) CaseFacade(de.symeda.sormas.api.caze.CaseFacade) ContactLogic(de.symeda.sormas.api.contact.ContactLogic) CaseOrigin(de.symeda.sormas.api.caze.CaseOrigin) SymptomsHelper(de.symeda.sormas.api.symptoms.SymptomsHelper) Captions(de.symeda.sormas.api.i18n.Captions) LineListingLayout(de.symeda.sormas.ui.caze.components.linelisting.LineListingLayout) AutomaticDeletionInfoDto(de.symeda.sormas.api.deletionconfiguration.AutomaticDeletionInfoDto) Button(com.vaadin.ui.Button) CaseBulkEditData(de.symeda.sormas.api.caze.CaseBulkEditData) Disease(de.symeda.sormas.api.Disease) VisitDto(de.symeda.sormas.api.visit.VisitDto) HorizontalLayout(com.vaadin.ui.HorizontalLayout) DiseaseClassificationCriteriaDto(de.symeda.sormas.api.caze.classification.DiseaseClassificationCriteriaDto) FeatureType(de.symeda.sormas.api.feature.FeatureType) CaseSelectionDto(de.symeda.sormas.api.caze.CaseSelectionDto) AutomaticDeletionLabel(de.symeda.sormas.ui.utils.components.automaticdeletion.AutomaticDeletionLabel) Date(java.util.Date) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) UI(com.vaadin.ui.UI) EventParticipantDto(de.symeda.sormas.api.event.EventParticipantDto) Window(com.vaadin.ui.Window) SymptomsForm(de.symeda.sormas.ui.symptoms.SymptomsForm) DetailSubComponentWrapper(de.symeda.sormas.ui.utils.DetailSubComponentWrapper) ControllerProvider(de.symeda.sormas.ui.ControllerProvider) SmsComponent(de.symeda.sormas.ui.caze.messaging.SmsComponent) ViewModelProviders(de.symeda.sormas.ui.ViewModelProviders) CaseEpiDataView(de.symeda.sormas.ui.epidata.CaseEpiDataView) UserRole(de.symeda.sormas.api.user.UserRole) UserProvider(de.symeda.sormas.ui.UserProvider) PointOfEntryDto(de.symeda.sormas.api.infrastructure.pointofentry.PointOfEntryDto) CloseListener(com.vaadin.ui.Window.CloseListener) ViewMode(de.symeda.sormas.ui.utils.ViewMode) CaseCriteria(de.symeda.sormas.api.caze.CaseCriteria) FacilityType(de.symeda.sormas.api.infrastructure.facility.FacilityType) Collection(java.util.Collection) CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) EventDto(de.symeda.sormas.api.event.EventDto) Collectors(java.util.stream.Collectors) ContactClassification(de.symeda.sormas.api.contact.ContactClassification) CommunityReferenceDto(de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto) Objects(java.util.Objects) CaseIndexDto(de.symeda.sormas.api.caze.CaseIndexDto) List(java.util.List) ExternalResource(com.vaadin.server.ExternalResource) TherapyView(de.symeda.sormas.ui.therapy.TherapyView) ContactDto(de.symeda.sormas.api.contact.ContactDto) Optional(java.util.Optional) UiFieldAccessCheckers(de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers) ValidationRuntimeException(de.symeda.sormas.api.utils.ValidationRuntimeException) FacilityDto(de.symeda.sormas.api.infrastructure.facility.FacilityDto) VaadinUiUtil(de.symeda.sormas.ui.utils.VaadinUiUtil) FacadeProvider(de.symeda.sormas.api.FacadeProvider) DateHelper(de.symeda.sormas.api.utils.DateHelper) CollectionUtils(org.apache.commons.collections.CollectionUtils) Notification(com.vaadin.ui.Notification) SormasUI(de.symeda.sormas.ui.SormasUI) Label(com.vaadin.ui.Label) TitleLayoutHelper(de.symeda.sormas.ui.utils.components.page.title.TitleLayoutHelper) HospitalizationForm(de.symeda.sormas.ui.hospitalization.HospitalizationForm) SymptomsDto(de.symeda.sormas.api.symptoms.SymptomsDto) NullableOptionGroup(de.symeda.sormas.ui.utils.NullableOptionGroup) AbstractView(de.symeda.sormas.ui.utils.AbstractView) ButtonHelper(de.symeda.sormas.ui.utils.ButtonHelper) PortHealthInfoForm(de.symeda.sormas.ui.caze.porthealthinfo.PortHealthInfoForm) ContactStatus(de.symeda.sormas.api.contact.ContactStatus) UserDto(de.symeda.sormas.api.user.UserDto) HospitalizationView(de.symeda.sormas.ui.hospitalization.HospitalizationView) Sizeable(com.vaadin.server.Sizeable) FacilityReferenceDto(de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto) Consumer(java.util.function.Consumer) Navigator(com.vaadin.navigator.Navigator) UserReferenceDto(de.symeda.sormas.api.user.UserReferenceDto) UserRight(de.symeda.sormas.api.user.UserRight) TravelEntryDto(de.symeda.sormas.api.travelentry.TravelEntryDto) PointOfEntryReferenceDto(de.symeda.sormas.api.infrastructure.pointofentry.PointOfEntryReferenceDto) ClinicalCourseView(de.symeda.sormas.ui.clinicalcourse.ClinicalCourseView) HospitalizationDto(de.symeda.sormas.api.hospitalization.HospitalizationDto) Unit(com.vaadin.server.Sizeable.Unit) Strings(de.symeda.sormas.api.i18n.Strings) Component(com.vaadin.ui.Component) CaseDataDto(de.symeda.sormas.api.caze.CaseDataDto) SimilarContactDto(de.symeda.sormas.api.contact.SimilarContactDto) CommitDiscardWrapperComponent(de.symeda.sormas.ui.utils.CommitDiscardWrapperComponent) HorizontalLayout(com.vaadin.ui.HorizontalLayout) Button(com.vaadin.ui.Button) EventParticipantCriteria(de.symeda.sormas.api.event.EventParticipantCriteria) ContactSimilarityCriteria(de.symeda.sormas.api.contact.ContactSimilarityCriteria) SimilarEventParticipantDto(de.symeda.sormas.api.event.SimilarEventParticipantDto)

Example 3 with EventParticipantCriteria

use of de.symeda.sormas.api.event.EventParticipantCriteria 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)

Example 4 with EventParticipantCriteria

use of de.symeda.sormas.api.event.EventParticipantCriteria in project SORMAS-Project by hzi-braunschweig.

the class EventParticipantFacadeEjbTest method testGetExportList.

@Test
public void testGetExportList() {
    TestDataCreator.RDCF rdcf = creator.createRDCF("Region", "District", "Community", "Facility");
    UserDto user = creator.createUser(rdcf.region.getUuid(), rdcf.district.getUuid(), rdcf.facility.getUuid(), "Surv", "Sup", UserRole.SURVEILLANCE_SUPERVISOR);
    EventDto event = creator.createEvent(EventStatus.SIGNAL, EventInvestigationStatus.PENDING, "Title", "Description", "First", "Name", "12345", TypeOfPlace.PUBLIC_PLACE, DateHelper.subtractDays(new Date(), 1), new Date(), user.toReference(), user.toReference(), Disease.EVD, rdcf.district);
    PersonDto eventPerson = creator.createPerson("Event", "Organizer");
    creator.createEventParticipant(event.toReference(), eventPerson, "event Director", user.toReference());
    PersonDto eventPerson1 = creator.createPerson("Event", "Participant");
    creator.createEventParticipant(event.toReference(), eventPerson1, "event fan", user.toReference());
    ImmunizationDto immunization = creator.createImmunization(event.getDisease(), eventPerson.toReference(), event.getReportingUser(), ImmunizationStatus.ACQUIRED, MeansOfImmunization.VACCINATION, ImmunizationManagementStatus.COMPLETED, rdcf, DateHelper.subtractDays(new Date(), 10), DateHelper.subtractDays(new Date(), 5), DateHelper.subtractDays(new Date(), 1), null);
    creator.createImmunization(event.getDisease(), eventPerson.toReference(), event.getReportingUser(), ImmunizationStatus.ACQUIRED, MeansOfImmunization.VACCINATION, ImmunizationManagementStatus.COMPLETED, rdcf, DateHelper.subtractDays(new Date(), 8), DateHelper.subtractDays(new Date(), 7), null, null);
    VaccinationDto firstVaccination = creator.createVaccination(event.getReportingUser(), immunization.toReference(), HealthConditionsDto.build(), DateHelper.subtractDays(new Date(), 7), Vaccine.OXFORD_ASTRA_ZENECA, VaccineManufacturer.ASTRA_ZENECA);
    creator.createVaccination(event.getReportingUser(), immunization.toReference(), HealthConditionsDto.build(), DateHelper.subtractDays(new Date(), 4), Vaccine.MRNA_1273, VaccineManufacturer.MODERNA);
    VaccinationDto thirdVaccination = creator.createVaccination(event.getReportingUser(), immunization.toReference(), HealthConditionsDto.build(), new Date(), Vaccine.COMIRNATY, VaccineManufacturer.BIONTECH_PFIZER);
    EventParticipantCriteria eventParticipantCriteria = new EventParticipantCriteria();
    eventParticipantCriteria.withEvent(event.toReference());
    List<EventParticipantExportDto> results = getEventParticipantFacade().getExportList(eventParticipantCriteria, Collections.emptySet(), 0, 100, Language.EN, null);
    // List should have two entries
    assertThat(results, Matchers.hasSize(2));
    assertEquals(VaccinationStatus.VACCINATED, results.get(0).getVaccinationStatus());
    assertEquals(thirdVaccination.getVaccineName(), results.get(0).getVaccineName());
    assertEquals(firstVaccination.getVaccinationDate(), results.get(0).getFirstVaccinationDate());
    assertEquals(thirdVaccination.getVaccinationDate(), results.get(0).getLastVaccinationDate());
}
Also used : ImmunizationDto(de.symeda.sormas.api.immunization.ImmunizationDto) PersonDto(de.symeda.sormas.api.person.PersonDto) UserDto(de.symeda.sormas.api.user.UserDto) EventDto(de.symeda.sormas.api.event.EventDto) TestDataCreator(de.symeda.sormas.backend.TestDataCreator) VaccinationDto(de.symeda.sormas.api.vaccination.VaccinationDto) EventParticipantCriteria(de.symeda.sormas.api.event.EventParticipantCriteria) EventParticipantExportDto(de.symeda.sormas.api.event.EventParticipantExportDto) Date(java.util.Date) AbstractBeanTest(de.symeda.sormas.backend.AbstractBeanTest) Test(org.junit.Test)

Example 5 with EventParticipantCriteria

use of de.symeda.sormas.api.event.EventParticipantCriteria in project SORMAS-Project by hzi-braunschweig.

the class EventParticipantImporterTest method testImportEventParticipantSimilarityCreate.

@Test
public void testImportEventParticipantSimilarityCreate() throws IOException, InvalidColumnException, InterruptedException, CsvValidationException, URISyntaxException {
    EventParticipantFacadeEjbLocal eventParticipantFacade = getBean(EventParticipantFacadeEjbLocal.class);
    RDCF rdcf = creator.createRDCF("Region", "District", "Community", "Facility");
    UserDto user = creator.createUser(rdcf.region.getUuid(), rdcf.district.getUuid(), rdcf.facility.getUuid(), "Surv", "Sup", UserRole.SURVEILLANCE_SUPERVISOR);
    EventDto event = creator.createEvent(EventStatus.SIGNAL, "Title", "Description", "First", "Name", "12345", TypeOfPlace.PUBLIC_PLACE, DateHelper.subtractDays(new Date(), 2), new Date(), user.toReference(), user.toReference(), Disease.EVD);
    EventReferenceDto eventRef = event.toReference();
    PersonDto person = creator.createPerson("Günther", "Heinze");
    creator.createCase(user.toReference(), person.toReference(), Disease.EVD, CaseClassification.PROBABLE, InvestigationStatus.PENDING, new Date(), rdcf);
    // Person Similarity: create
    File csvFile = new File(getClass().getClassLoader().getResource("sormas_eventparticipant_import_test_similarities.csv").toURI());
    EventParticipantImporterExtension eventParticipantImporter = new EventParticipantImporterExtension(csvFile, user, event);
    ImportResultStatus importResult = eventParticipantImporter.runImport();
    EventParticipantIndexDto importedEventParticipant = eventParticipantFacade.getIndexList(new EventParticipantCriteria().withEvent(eventRef), null, null, null).get(0);
    assertEquals(ImportResultStatus.COMPLETED, importResult);
    assertEquals(1, eventParticipantFacade.count(new EventParticipantCriteria().withEvent(eventRef)));
    assertNotEquals(person.getUuid(), importedEventParticipant.getPersonUuid());
    assertEquals(2, getPersonFacade().getAllUuids().size());
}
Also used : RDCF(de.symeda.sormas.ui.TestDataCreator.RDCF) EventReferenceDto(de.symeda.sormas.api.event.EventReferenceDto) PersonDto(de.symeda.sormas.api.person.PersonDto) SimilarPersonDto(de.symeda.sormas.api.person.SimilarPersonDto) UserDto(de.symeda.sormas.api.user.UserDto) EventParticipantFacadeEjbLocal(de.symeda.sormas.backend.event.EventParticipantFacadeEjb.EventParticipantFacadeEjbLocal) EventDto(de.symeda.sormas.api.event.EventDto) ImportResultStatus(de.symeda.sormas.ui.importer.ImportResultStatus) EventParticipantIndexDto(de.symeda.sormas.api.event.EventParticipantIndexDto) EventParticipantCriteria(de.symeda.sormas.api.event.EventParticipantCriteria) File(java.io.File) Date(java.util.Date) AbstractBeanTest(de.symeda.sormas.ui.AbstractBeanTest) Test(org.junit.Test)

Aggregations

EventParticipantCriteria (de.symeda.sormas.api.event.EventParticipantCriteria)13 Date (java.util.Date)12 EventDto (de.symeda.sormas.api.event.EventDto)10 PersonDto (de.symeda.sormas.api.person.PersonDto)9 UserDto (de.symeda.sormas.api.user.UserDto)8 Test (org.junit.Test)8 EventReferenceDto (de.symeda.sormas.api.event.EventReferenceDto)7 EventParticipantFacadeEjbLocal (de.symeda.sormas.backend.event.EventParticipantFacadeEjb.EventParticipantFacadeEjbLocal)6 AbstractBeanTest (de.symeda.sormas.ui.AbstractBeanTest)6 RDCF (de.symeda.sormas.ui.TestDataCreator.RDCF)6 ImportResultStatus (de.symeda.sormas.ui.importer.ImportResultStatus)6 File (java.io.File)6 EventParticipantDto (de.symeda.sormas.api.event.EventParticipantDto)5 ArrayList (java.util.ArrayList)5 UI (com.vaadin.ui.UI)4 EventParticipantIndexDto (de.symeda.sormas.api.event.EventParticipantIndexDto)4 SimilarPersonDto (de.symeda.sormas.api.person.SimilarPersonDto)4 PersonImportSimilarityResult (de.symeda.sormas.ui.importer.PersonImportSimilarityResult)4 Consumer (java.util.function.Consumer)4 SimilarEventParticipantDto (de.symeda.sormas.api.event.SimilarEventParticipantDto)3