Search in sources :

Example 1 with VisitStatus

use of de.symeda.sormas.api.visit.VisitStatus in project SORMAS-Project by hzi-braunschweig.

the class ContactsDashboardStatisticsComponent method updateFourthComponent.

@Override
protected void updateFourthComponent(int visibleDiseasesCount) {
    List<DashboardContactDto> contacts = dashboardDataProvider.getContacts();
    List<DashboardContactDto> previousContacts = dashboardDataProvider.getPreviousContacts();
    Map<VisitStatus, Integer> visitStatusMap = new EnumMap<>(VisitStatus.class);
    Map<VisitStatus, Integer> previousVisitStatusMap = new EnumMap<>(VisitStatus.class);
    // only visits that needed to be done, i.e. at most the amount of follow-up days
    int doneEssentialVisitsCount = 0;
    int previousDoneEssentialVisitsCount = 0;
    Date now = new Date();
    int totalFollowUpDays = 0;
    int previousTotalFollowUpDays = 0;
    for (DashboardContactDto contact : contacts) {
        for (VisitStatus visitStatus : contact.getVisitStatusMap().keySet()) {
            int value = 0;
            if (visitStatusMap.containsKey(visitStatus)) {
                value = visitStatusMap.get(visitStatus);
            }
            visitStatusMap.put(visitStatus, value + contact.getVisitStatusMap().get(visitStatus));
        }
        if (contact.getFollowUpUntil() != null) {
            int contactFollowUpDays = Math.min(DateHelper.getDaysBetween(contact.getReportDate(), now), DateHelper.getDaysBetween(contact.getReportDate(), contact.getFollowUpUntil()));
            totalFollowUpDays += contactFollowUpDays;
            int visitCount = contact.getVisitStatusMap().values().stream().reduce(0, Integer::sum);
            doneEssentialVisitsCount += (Math.min(visitCount, contactFollowUpDays));
        }
    }
    for (DashboardContactDto contact : previousContacts) {
        for (VisitStatus visitStatus : contact.getVisitStatusMap().keySet()) {
            int value = 0;
            if (previousVisitStatusMap.containsKey(visitStatus)) {
                value = previousVisitStatusMap.get(visitStatus);
            }
            previousVisitStatusMap.put(visitStatus, value + contact.getVisitStatusMap().get(visitStatus));
        }
        if (contact.getFollowUpUntil() != null) {
            int contactFollowUpDays = Math.min(DateHelper.getDaysBetween(contact.getReportDate(), now), DateHelper.getDaysBetween(contact.getReportDate(), contact.getFollowUpUntil()));
            previousTotalFollowUpDays += contactFollowUpDays;
            int visitCount = contact.getVisitStatusMap().values().stream().reduce(0, Integer::sum);
            previousDoneEssentialVisitsCount += (Math.min(visitCount, contactFollowUpDays));
        }
    }
    int visitsCount = visitStatusMap.values().stream().reduce(0, Integer::sum);
    fourthComponent.updateCountLabel(visitsCount);
    int missedVisitsCount = totalFollowUpDays - doneEssentialVisitsCount;
    int unavailableVisitsCount = Optional.ofNullable(visitStatusMap.get(VisitStatus.UNAVAILABLE)).orElse(0).intValue();
    int uncooperativeVisitsCount = Optional.ofNullable(visitStatusMap.get(VisitStatus.UNCOOPERATIVE)).orElse(0).intValue();
    int cooperativeVisitsCount = Optional.ofNullable(visitStatusMap.get(VisitStatus.COOPERATIVE)).orElse(0).intValue();
    int previousMissedVisitsCount = previousTotalFollowUpDays - previousDoneEssentialVisitsCount;
    int previousUnavailableVisitsCount = Optional.ofNullable(previousVisitStatusMap.get(VisitStatus.UNAVAILABLE)).orElse(0).intValue();
    int previousUncooperativeVisitsCount = Optional.ofNullable(previousVisitStatusMap.get(VisitStatus.UNCOOPERATIVE)).orElse(0).intValue();
    int previousCooperativeVisitsCount = Optional.ofNullable(previousVisitStatusMap.get(VisitStatus.COOPERATIVE)).orElse(0).intValue();
    int missedVisitsPercentage = totalFollowUpDays == 0 ? 0 : (int) ((missedVisitsCount * 100.0f) / totalFollowUpDays);
    int unavailableVisitsPercentage = visitsCount == 0 ? 0 : (int) ((unavailableVisitsCount * 100.0f) / visitsCount);
    int uncooperativeVisitsPercentage = visitsCount == 0 ? 0 : (int) ((uncooperativeVisitsCount * 100.0f) / visitsCount);
    int cooperativeVisitsPercentage = visitsCount == 0 ? 0 : (int) ((cooperativeVisitsCount * 100.0f) / visitsCount);
    int missedVisitsGrowth = calculateGrowth(missedVisitsCount, previousMissedVisitsCount);
    int unavailableVisitsGrowth = calculateGrowth(unavailableVisitsCount, previousUnavailableVisitsCount);
    int uncooperativeVisitsGrowth = calculateGrowth(uncooperativeVisitsCount, previousUncooperativeVisitsCount);
    int cooperativeVisitsGrowth = calculateGrowth(cooperativeVisitsCount, previousCooperativeVisitsCount);
    missedVisits.update(missedVisitsCount, missedVisitsPercentage, missedVisitsGrowth, false, false);
    unavailableVisits.update(unavailableVisitsCount, unavailableVisitsPercentage, unavailableVisitsGrowth, false, false);
    uncooperativeVisits.update(uncooperativeVisitsCount, uncooperativeVisitsPercentage, uncooperativeVisitsGrowth, false, false);
    cooperativeVisits.update(cooperativeVisitsCount, cooperativeVisitsPercentage, cooperativeVisitsGrowth, true, false);
}
Also used : DashboardContactDto(de.symeda.sormas.api.dashboard.DashboardContactDto) EnumMap(java.util.EnumMap) Date(java.util.Date) VisitStatus(de.symeda.sormas.api.visit.VisitStatus)

Example 2 with VisitStatus

use of de.symeda.sormas.api.visit.VisitStatus in project SORMAS-Project by hzi-braunschweig.

the class ContactService method getContactsForDashboard.

public List<DashboardContactDto> getContactsForDashboard(Region region, District district, Disease disease, Date from, Date to, User user) {
    CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<DashboardContactDto> cq = cb.createQuery(DashboardContactDto.class);
    Root<Contact> contact = cq.from(getElementClass());
    Join<Contact, Case> caze = contact.join(Contact.CAZE, JoinType.LEFT);
    Predicate filter = createDefaultFilter(cb, contact);
    filter = CriteriaBuilderHelper.and(cb, filter, createUserFilter(cb, cq, contact));
    Predicate dateFilter = buildDateFilter(cb, contact, from, to);
    if (filter != null) {
        filter = cb.and(filter, dateFilter);
    } else {
        filter = dateFilter;
    }
    filter = CriteriaBuilderHelper.and(cb, filter, getRegionDistrictDiseasePredicate(region, district, disease, cb, contact, caze));
    if (filter != null) {
        cq.where(filter);
        cq.multiselect(contact.get(AbstractDomainObject.ID), contact.get(Contact.REPORT_DATE_TIME), contact.get(Contact.CONTACT_STATUS), contact.get(Contact.CONTACT_CLASSIFICATION), contact.get(Contact.FOLLOW_UP_STATUS), contact.get(Contact.FOLLOW_UP_UNTIL), contact.get(Contact.DISEASE), contact.get(Contact.QUARANTINE_FROM), contact.get(Contact.QUARANTINE_TO));
        List<DashboardContactDto> dashboardContacts = em.createQuery(cq).getResultList();
        if (!dashboardContacts.isEmpty()) {
            List<Long> dashboardContactIds = dashboardContacts.stream().map(DashboardContactDto::getId).collect(Collectors.toList());
            CriteriaQuery<DashboardVisit> visitsCq = cb.createQuery(DashboardVisit.class);
            Root<Contact> visitsCqRoot = visitsCq.from(getElementClass());
            Join<Contact, Visit> visitsJoin = visitsCqRoot.join(Contact.VISITS, JoinType.LEFT);
            Join<Visit, Symptoms> visitSymptomsJoin = visitsJoin.join(Visit.SYMPTOMS, JoinType.LEFT);
            visitsCq.where(CriteriaBuilderHelper.and(cb, contact.get(AbstractDomainObject.ID).in(dashboardContactIds), cb.isNotEmpty(visitsCqRoot.get(Contact.VISITS))));
            visitsCq.multiselect(visitsCqRoot.get(AbstractDomainObject.ID), visitSymptomsJoin.get(Symptoms.SYMPTOMATIC), visitsJoin.get(Visit.VISIT_STATUS), visitsJoin.get(Visit.VISIT_DATE_TIME));
            List<DashboardVisit> contactVisits = em.createQuery(visitsCq).getResultList();
            // Add visit information to the DashboardContactDtos
            for (DashboardContactDto dashboardContact : dashboardContacts) {
                List<DashboardVisit> visits = contactVisits.stream().filter(v -> v.getContactId() == dashboardContact.getId()).collect(Collectors.toList());
                DashboardVisit lastVisit = visits.stream().max((v1, v2) -> v1.getVisitDateTime().compareTo(v2.getVisitDateTime())).orElse(null);
                if (lastVisit != null) {
                    dashboardContact.setLastVisitDateTime(lastVisit.getVisitDateTime());
                    dashboardContact.setLastVisitStatus(lastVisit.getVisitStatus());
                    dashboardContact.setSymptomatic(lastVisit.isSymptomatic());
                    List<VisitStatus> visitStatuses = visits.stream().map(DashboardVisit::getVisitStatus).collect(Collectors.toList());
                    Map<VisitStatus, Integer> frequency = new EnumMap<>(VisitStatus.class);
                    for (VisitStatus status : VisitStatus.values()) {
                        int freq = Collections.frequency(visitStatuses, status);
                        frequency.put(status, freq);
                    }
                    dashboardContact.setVisitStatusMap(frequency);
                }
            }
            return dashboardContacts;
        }
    }
    return Collections.emptyList();
}
Also used : FollowUpStatus(de.symeda.sormas.api.contact.FollowUpStatus) Arrays(java.util.Arrays) VisitStatus(de.symeda.sormas.api.visit.VisitStatus) ExternalDataUpdateException(de.symeda.sormas.api.externaldata.ExternalDataUpdateException) StringUtils(org.apache.commons.lang3.StringUtils) Predicate(javax.persistence.criteria.Predicate) Map(java.util.Map) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) JoinType(javax.persistence.criteria.JoinType) FeatureConfigurationFacadeEjb(de.symeda.sormas.backend.feature.FeatureConfigurationFacadeEjb) Visit(de.symeda.sormas.backend.visit.Visit) EpiData(de.symeda.sormas.backend.epidata.EpiData) From(javax.persistence.criteria.From) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) EnumMap(java.util.EnumMap) Transactional(javax.transaction.Transactional) Set(java.util.Set) NotNull(javax.validation.constraints.NotNull) DashboardContactDto(de.symeda.sormas.api.dashboard.DashboardContactDto) UserService(de.symeda.sormas.backend.user.UserService) User(de.symeda.sormas.backend.user.User) PathogenTestResultType(de.symeda.sormas.api.sample.PathogenTestResultType) ExternalDataDto(de.symeda.sormas.api.externaldata.ExternalDataDto) JurisdictionHelper(de.symeda.sormas.backend.util.JurisdictionHelper) DeletableAdo(de.symeda.sormas.backend.common.DeletableAdo) SampleService(de.symeda.sormas.backend.sample.SampleService) Sample(de.symeda.sormas.backend.sample.Sample) EventParticipant(de.symeda.sormas.backend.event.EventParticipant) Community(de.symeda.sormas.backend.infrastructure.community.Community) CaseUserFilterCriteria(de.symeda.sormas.backend.caze.CaseUserFilterCriteria) MapContactDto(de.symeda.sormas.api.contact.MapContactDto) Selection(javax.persistence.criteria.Selection) Case(de.symeda.sormas.backend.caze.Case) LocalBean(javax.ejb.LocalBean) ContactListEntryDtoResultTransformer(de.symeda.sormas.backend.contact.transformers.ContactListEntryDtoResultTransformer) EJB(javax.ejb.EJB) Root(javax.persistence.criteria.Root) ChangeDateFilterBuilder(de.symeda.sormas.backend.common.ChangeDateFilterBuilder) TaskCriteria(de.symeda.sormas.api.task.TaskCriteria) DataHelper(de.symeda.sormas.api.utils.DataHelper) Task(de.symeda.sormas.backend.task.Task) ContactLogic(de.symeda.sormas.api.contact.ContactLogic) Disease(de.symeda.sormas.api.Disease) FollowUpLogic(de.symeda.sormas.api.followup.FollowUpLogic) HealthConditions(de.symeda.sormas.backend.clinicalcourse.HealthConditions) Subquery(javax.persistence.criteria.Subquery) FeatureTypeProperty(de.symeda.sormas.api.feature.FeatureTypeProperty) FeatureType(de.symeda.sormas.api.feature.FeatureType) VisitFacadeEjb(de.symeda.sormas.backend.visit.VisitFacadeEjb) ContactCriteria(de.symeda.sormas.api.contact.ContactCriteria) Join(javax.persistence.criteria.Join) AbstractDomainObject(de.symeda.sormas.backend.common.AbstractDomainObject) Date(java.util.Date) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) ChangeDateBuilder(de.symeda.sormas.backend.common.ChangeDateBuilder) AbstractCoreAdoService(de.symeda.sormas.backend.common.AbstractCoreAdoService) ContactProximity(de.symeda.sormas.api.contact.ContactProximity) ExposureService(de.symeda.sormas.backend.exposure.ExposureService) UserRole(de.symeda.sormas.api.user.UserRole) VaccinationStatus(de.symeda.sormas.api.caze.VaccinationStatus) Stateless(javax.ejb.Stateless) CaseService(de.symeda.sormas.backend.caze.CaseService) DiseaseConfigurationFacadeEjbLocal(de.symeda.sormas.backend.disease.DiseaseConfigurationFacadeEjb.DiseaseConfigurationFacadeEjbLocal) Person(de.symeda.sormas.backend.person.Person) Timestamp(java.sql.Timestamp) Region(de.symeda.sormas.backend.infrastructure.region.Region) District(de.symeda.sormas.backend.infrastructure.district.District) Collectors(java.util.stream.Collectors) ContactClassification(de.symeda.sormas.api.contact.ContactClassification) List(java.util.List) CoreAdo(de.symeda.sormas.backend.common.CoreAdo) ContactDto(de.symeda.sormas.api.contact.ContactDto) JurisdictionLevel(de.symeda.sormas.api.user.JurisdictionLevel) Location(de.symeda.sormas.backend.location.Location) SormasToSormasShareInfoService(de.symeda.sormas.backend.sormastosormas.share.shareinfo.SormasToSormasShareInfoService) TaskService(de.symeda.sormas.backend.task.TaskService) DateHelper(de.symeda.sormas.api.utils.DateHelper) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) ExternalDataUtil(de.symeda.sormas.backend.util.ExternalDataUtil) HashSet(java.util.HashSet) CriteriaUpdate(javax.persistence.criteria.CriteriaUpdate) CollectionUtils(org.apache.commons.collections.CollectionUtils) IterableHelper(de.symeda.sormas.backend.util.IterableHelper) CaseQueryContext(de.symeda.sormas.backend.caze.CaseQueryContext) Symptoms(de.symeda.sormas.backend.symptoms.Symptoms) SampleJoins(de.symeda.sormas.backend.sample.SampleJoins) LinkedList(java.util.LinkedList) NoSuchElementException(java.util.NoSuchElementException) Expression(javax.persistence.criteria.Expression) CriteriaBuilderHelper(de.symeda.sormas.backend.common.CriteriaBuilderHelper) ModelConstants(de.symeda.sormas.backend.util.ModelConstants) EpiDataService(de.symeda.sormas.backend.epidata.EpiDataService) ContactListEntryDto(de.symeda.sormas.api.contact.ContactListEntryDto) ContactStatus(de.symeda.sormas.api.contact.ContactStatus) Event(de.symeda.sormas.backend.event.Event) SormasToSormasShareInfo(de.symeda.sormas.backend.sormastosormas.share.shareinfo.SormasToSormasShareInfo) ExternalJournalService(de.symeda.sormas.backend.externaljournal.ExternalJournalService) ContactReferenceDto(de.symeda.sormas.api.contact.ContactReferenceDto) Comparator(java.util.Comparator) Strings(de.symeda.sormas.api.i18n.Strings) Collections(java.util.Collections) Visit(de.symeda.sormas.backend.visit.Visit) Case(de.symeda.sormas.backend.caze.Case) Predicate(javax.persistence.criteria.Predicate) EnumMap(java.util.EnumMap) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) VisitStatus(de.symeda.sormas.api.visit.VisitStatus) DashboardContactDto(de.symeda.sormas.api.dashboard.DashboardContactDto) Symptoms(de.symeda.sormas.backend.symptoms.Symptoms)

Example 3 with VisitStatus

use of de.symeda.sormas.api.visit.VisitStatus in project SORMAS-Project by hzi-braunschweig.

the class ContactFacadeEjb method getContactFollowUpList.

@Override
public List<ContactFollowUpDto> getContactFollowUpList(ContactCriteria contactCriteria, Date referenceDate, int interval, Integer first, Integer max, List<SortProperty> sortProperties) {
    Date end = DateHelper.getEndOfDay(referenceDate);
    Date start = DateHelper.getStartOfDay(DateHelper.subtractDays(end, interval));
    CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<ContactFollowUpDto> cq = cb.createQuery(ContactFollowUpDto.class);
    Root<Contact> contact = cq.from(Contact.class);
    final ContactQueryContext contactQueryContext = new ContactQueryContext(cb, cq, contact);
    final ContactJoins<Contact> joins = (ContactJoins<Contact>) contactQueryContext.getJoins();
    cq.multiselect(contact.get(Contact.UUID), contact.get(Contact.CHANGE_DATE), joins.getPerson().get(Person.FIRST_NAME), joins.getPerson().get(Person.LAST_NAME), joins.getContactOfficer().get(User.UUID), joins.getContactOfficer().get(User.FIRST_NAME), joins.getContactOfficer().get(User.LAST_NAME), contact.get(Contact.LAST_CONTACT_DATE), contact.get(Contact.REPORT_DATE_TIME), contact.get(Contact.FOLLOW_UP_UNTIL), joins.getPerson().get(Person.SYMPTOM_JOURNAL_STATUS), contact.get(Contact.DISEASE), jurisdictionSelector(contactQueryContext));
    // Only use user filter if no restricting case is specified
    Predicate filter = listCriteriaBuilder.buildContactFilter(contactCriteria, contactQueryContext);
    if (filter != null) {
        cq.where(filter);
    }
    cq.distinct(true);
    if (sortProperties != null && sortProperties.size() > 0) {
        List<Order> order = new ArrayList<Order>(sortProperties.size());
        for (SortProperty sortProperty : sortProperties) {
            Expression<?> expression;
            switch(sortProperty.propertyName) {
                case FollowUpDto.UUID:
                case ContactFollowUpDto.LAST_CONTACT_DATE:
                case FollowUpDto.FOLLOW_UP_UNTIL:
                    expression = contact.get(sortProperty.propertyName);
                    break;
                case FollowUpDto.REPORT_DATE:
                    expression = contact.get(Contact.REPORT_DATE_TIME);
                    break;
                case FollowUpDto.SYMPTOM_JOURNAL_STATUS:
                    expression = joins.getPerson().get(Person.SYMPTOM_JOURNAL_STATUS);
                    break;
                case FollowUpDto.FIRST_NAME:
                    expression = joins.getPerson().get(Person.FIRST_NAME);
                    break;
                case FollowUpDto.LAST_NAME:
                    expression = joins.getPerson().get(Person.LAST_NAME);
                    break;
                case ContactFollowUpDto.CONTACT_OFFICER:
                    expression = joins.getContactOfficer().get(User.FIRST_NAME);
                    order.add(sortProperty.ascending ? cb.asc(expression) : cb.desc(expression));
                    expression = joins.getContactOfficer().get(User.LAST_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.desc(contact.get(Contact.CHANGE_DATE)));
    }
    List<ContactFollowUpDto> resultList = QueryHelper.getResultList(em, cq, first, max);
    if (!resultList.isEmpty()) {
        List<String> contactUuids = resultList.stream().map(d -> d.getUuid()).collect(Collectors.toList());
        CriteriaQuery<Object[]> visitsCq = cb.createQuery(Object[].class);
        Root<Contact> visitsCqRoot = visitsCq.from(Contact.class);
        Join<Contact, Visit> visitsJoin = visitsCqRoot.join(Contact.VISITS, JoinType.LEFT);
        Join<Visit, Symptoms> visitSymptomsJoin = visitsJoin.join(Visit.SYMPTOMS, JoinType.LEFT);
        visitsCq.where(CriteriaBuilderHelper.and(cb, contact.get(AbstractDomainObject.UUID).in(contactUuids), cb.isNotEmpty(visitsCqRoot.get(Contact.VISITS)), cb.between(visitsJoin.get(Visit.VISIT_DATE_TIME), start, end)));
        visitsCq.multiselect(visitsCqRoot.get(Contact.UUID), visitsJoin.get(Visit.VISIT_DATE_TIME), visitsJoin.get(Visit.VISIT_STATUS), visitsJoin.get(Visit.ORIGIN), visitSymptomsJoin.get(Symptoms.SYMPTOMATIC));
        visitsCq.orderBy(cb.asc(visitsJoin.get(Visit.VISIT_DATE_TIME)), cb.asc(visitsJoin.get(Visit.CREATION_DATE)));
        List<Object[]> visits = em.createQuery(visitsCq).getResultList();
        Map<String, ContactFollowUpDto> resultMap = resultList.stream().collect(Collectors.toMap(ContactFollowUpDto::getUuid, Function.identity()));
        Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
        for (ContactFollowUpDto contactFollowUpDto : resultMap.values()) {
            contactFollowUpDto.initVisitSize(interval + 1);
            boolean isInJurisdiction = contactFollowUpDto.getInJurisdiction();
            pseudonymizer.pseudonymizeDto(ContactFollowUpDto.class, contactFollowUpDto, isInJurisdiction, null);
        }
        for (Object[] v : visits) {
            int day = DateHelper.getDaysBetween(start, (Date) v[1]);
            VisitResultDto result = getVisitResult((VisitStatus) v[2], (VisitOrigin) v[3], (Boolean) v[4]);
            resultMap.get(v[0]).getVisitResults()[day - 1] = result;
        }
    }
    return resultList;
}
Also used : FollowUpStatus(de.symeda.sormas.api.contact.FollowUpStatus) VisitService(de.symeda.sormas.backend.visit.VisitService) Arrays(java.util.Arrays) DtoHelper(de.symeda.sormas.backend.util.DtoHelper) RolesAllowed(javax.annotation.security.RolesAllowed) VisitStatus(de.symeda.sormas.api.visit.VisitStatus) Immunization(de.symeda.sormas.backend.immunization.entity.Immunization) CommunityFacadeEjb(de.symeda.sormas.backend.infrastructure.community.CommunityFacadeEjb) ExternalDataUpdateException(de.symeda.sormas.api.externaldata.ExternalDataUpdateException) MeansOfImmunization(de.symeda.sormas.api.immunization.MeansOfImmunization) DistrictService(de.symeda.sormas.backend.infrastructure.district.DistrictService) PersonDto(de.symeda.sormas.api.person.PersonDto) ContactEventSummaryDetails(de.symeda.sormas.backend.event.ContactEventSummaryDetails) Valid(javax.validation.Valid) AbstractCoreFacadeEjb(de.symeda.sormas.backend.common.AbstractCoreFacadeEjb) YesNoUnknown(de.symeda.sormas.api.utils.YesNoUnknown) Page(de.symeda.sormas.api.common.Page) FollowUpDto(de.symeda.sormas.api.followup.FollowUpDto) TransactionAttributeType(javax.ejb.TransactionAttributeType) Predicate(javax.persistence.criteria.Predicate) UserFacadeEjb(de.symeda.sormas.backend.user.UserFacadeEjb) Map(java.util.Map) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) JoinType(javax.persistence.criteria.JoinType) BigInteger(java.math.BigInteger) DocumentRelatedEntityType(de.symeda.sormas.api.document.DocumentRelatedEntityType) Visit(de.symeda.sormas.backend.visit.Visit) EpiData(de.symeda.sormas.backend.epidata.EpiData) SormasToSormasOriginInfoFacadeEjb(de.symeda.sormas.backend.sormastosormas.origin.SormasToSormasOriginInfoFacadeEjb) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) ContactExportDto(de.symeda.sormas.api.contact.ContactExportDto) CommunityService(de.symeda.sormas.backend.infrastructure.community.CommunityService) Resource(javax.annotation.Resource) Set(java.util.Set) SampleFacadeEjbLocal(de.symeda.sormas.backend.sample.SampleFacadeEjb.SampleFacadeEjbLocal) TaskPriority(de.symeda.sormas.api.task.TaskPriority) NotNull(javax.validation.constraints.NotNull) DashboardContactDto(de.symeda.sormas.api.dashboard.DashboardContactDto) UserService(de.symeda.sormas.backend.user.UserService) User(de.symeda.sormas.backend.user.User) EpiDataDto(de.symeda.sormas.api.epidata.EpiDataDto) ExternalDataDto(de.symeda.sormas.api.externaldata.ExternalDataDto) CaseFacadeEjbLocal(de.symeda.sormas.backend.caze.CaseFacadeEjb.CaseFacadeEjbLocal) JurisdictionHelper(de.symeda.sormas.backend.util.JurisdictionHelper) SimilarContactDto(de.symeda.sormas.api.contact.SimilarContactDto) SampleService(de.symeda.sormas.backend.sample.SampleService) RegionReferenceDto(de.symeda.sormas.api.infrastructure.region.RegionReferenceDto) Sample(de.symeda.sormas.backend.sample.Sample) ContactFacade(de.symeda.sormas.api.contact.ContactFacade) SampleCriteria(de.symeda.sormas.api.sample.SampleCriteria) Community(de.symeda.sormas.backend.infrastructure.community.Community) FollowUpPeriodDto(de.symeda.sormas.api.followup.FollowUpPeriodDto) QueryHelper(de.symeda.sormas.backend.util.QueryHelper) MapContactDto(de.symeda.sormas.api.contact.MapContactDto) LocalDateTime(java.time.LocalDateTime) PersonReferenceDto(de.symeda.sormas.api.person.PersonReferenceDto) Selection(javax.persistence.criteria.Selection) VisitFacadeEjbLocal(de.symeda.sormas.backend.visit.VisitFacadeEjb.VisitFacadeEjbLocal) ArrayList(java.util.ArrayList) CaseReferenceDto(de.symeda.sormas.api.caze.CaseReferenceDto) MergeContactIndexDto(de.symeda.sormas.api.contact.MergeContactIndexDto) Case(de.symeda.sormas.backend.caze.Case) EpiDataFacadeEjb(de.symeda.sormas.backend.epidata.EpiDataFacadeEjb) LocalBean(javax.ejb.LocalBean) ConfigFacadeEjbLocal(de.symeda.sormas.backend.common.ConfigFacadeEjb.ConfigFacadeEjbLocal) ExportHelper(de.symeda.sormas.backend.importexport.ExportHelper) EJB(javax.ejb.EJB) Root(javax.persistence.criteria.Root) ContactSimilarityCriteria(de.symeda.sormas.api.contact.ContactSimilarityCriteria) TaskCriteria(de.symeda.sormas.api.task.TaskCriteria) DataHelper(de.symeda.sormas.api.utils.DataHelper) Task(de.symeda.sormas.backend.task.Task) PersonFacadeEjb(de.symeda.sormas.backend.person.PersonFacadeEjb) DistrictReferenceDto(de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto) ContactLogic(de.symeda.sormas.api.contact.ContactLogic) PersonService(de.symeda.sormas.backend.person.PersonService) SymptomsHelper(de.symeda.sormas.api.symptoms.SymptomsHelper) SortProperty(de.symeda.sormas.api.utils.SortProperty) Captions(de.symeda.sormas.api.i18n.Captions) TaskCreationException(de.symeda.sormas.backend.common.TaskCreationException) Exposure(de.symeda.sormas.backend.exposure.Exposure) DAYS(java.time.temporal.ChronoUnit.DAYS) ExposureDto(de.symeda.sormas.api.exposure.ExposureDto) Disease(de.symeda.sormas.api.Disease) VisitDto(de.symeda.sormas.api.visit.VisitDto) DateHelper8(de.symeda.sormas.backend.util.DateHelper8) FeatureTypeProperty(de.symeda.sormas.api.feature.FeatureTypeProperty) SymptomsFacadeEjb(de.symeda.sormas.backend.symptoms.SymptomsFacadeEjb) FeatureType(de.symeda.sormas.api.feature.FeatureType) VisitFacadeEjb(de.symeda.sormas.backend.visit.VisitFacadeEjb) ContactCriteria(de.symeda.sormas.api.contact.ContactCriteria) EventService(de.symeda.sormas.backend.event.EventService) ImmunizationEntityHelper(de.symeda.sormas.backend.immunization.ImmunizationEntityHelper) Join(javax.persistence.criteria.Join) AbstractDomainObject(de.symeda.sormas.backend.common.AbstractDomainObject) Date(java.util.Date) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) LoggerFactory(org.slf4j.LoggerFactory) ExposureType(de.symeda.sormas.api.exposure.ExposureType) AbstractCoreAdoService(de.symeda.sormas.backend.common.AbstractCoreAdoService) HealthConditionsMapper(de.symeda.sormas.backend.clinicalcourse.HealthConditionsMapper) ContactIndexDetailedDto(de.symeda.sormas.api.contact.ContactIndexDetailedDto) AccessDeniedException(de.symeda.sormas.api.utils.AccessDeniedException) SormasToSormasContactFacadeEjbLocal(de.symeda.sormas.backend.sormastosormas.entities.contact.SormasToSormasContactFacadeEjb.SormasToSormasContactFacadeEjbLocal) Facility(de.symeda.sormas.backend.infrastructure.facility.Facility) ContactIndexDto(de.symeda.sormas.api.contact.ContactIndexDto) Vaccination(de.symeda.sormas.backend.vaccination.Vaccination) UserRole(de.symeda.sormas.api.user.UserRole) ManagedScheduledExecutorService(javax.enterprise.concurrent.ManagedScheduledExecutorService) ContactFollowUpDto(de.symeda.sormas.api.contact.ContactFollowUpDto) Stateless(javax.ejb.Stateless) DocumentService(de.symeda.sormas.backend.document.DocumentService) CaseService(de.symeda.sormas.backend.caze.CaseService) DiseaseConfigurationFacadeEjbLocal(de.symeda.sormas.backend.disease.DiseaseConfigurationFacadeEjb.DiseaseConfigurationFacadeEjbLocal) Person(de.symeda.sormas.backend.person.Person) Collection(java.util.Collection) Region(de.symeda.sormas.backend.infrastructure.region.Region) District(de.symeda.sormas.backend.infrastructure.district.District) Pseudonymizer(de.symeda.sormas.backend.util.Pseudonymizer) Collectors(java.util.stream.Collectors) Language(de.symeda.sormas.api.Language) ContactClassification(de.symeda.sormas.api.contact.ContactClassification) SormasToSormasFacadeEjbLocal(de.symeda.sormas.backend.sormastosormas.SormasToSormasFacadeEjb.SormasToSormasFacadeEjbLocal) TaskType(de.symeda.sormas.api.task.TaskType) Objects(java.util.Objects) ExportConfigurationDto(de.symeda.sormas.api.importexport.ExportConfigurationDto) ShareTreeCriteria(de.symeda.sormas.api.sormastosormas.ShareTreeCriteria) List(java.util.List) Query(javax.persistence.Query) DistrictFacadeEjb(de.symeda.sormas.backend.infrastructure.district.DistrictFacadeEjb) ContactDto(de.symeda.sormas.api.contact.ContactDto) LocalDate(java.time.LocalDate) Order(javax.persistence.criteria.Order) Optional(java.util.Optional) EpiDataHelper(de.symeda.sormas.api.epidata.EpiDataHelper) Location(de.symeda.sormas.backend.location.Location) VisitSummaryExportDto(de.symeda.sormas.api.visit.VisitSummaryExportDto) FeatureConfigurationFacadeEjbLocal(de.symeda.sormas.backend.feature.FeatureConfigurationFacadeEjb.FeatureConfigurationFacadeEjbLocal) ValidationRuntimeException(de.symeda.sormas.api.utils.ValidationRuntimeException) ClinicalCourseFacadeEjb(de.symeda.sormas.backend.clinicalcourse.ClinicalCourseFacadeEjb) VaccinationFacadeEjb(de.symeda.sormas.backend.vaccination.VaccinationFacadeEjb) TaskService(de.symeda.sormas.backend.task.TaskService) DateHelper(de.symeda.sormas.api.utils.DateHelper) CaseFacadeEjb(de.symeda.sormas.backend.caze.CaseFacadeEjb) CoreEntityType(de.symeda.sormas.backend.deletionconfiguration.CoreEntityType) Function(java.util.function.Function) VisitOrigin(de.symeda.sormas.api.VisitOrigin) Inject(javax.inject.Inject) CollectionUtils(org.apache.commons.collections.CollectionUtils) TransactionAttribute(javax.ejb.TransactionAttribute) TaskStatus(de.symeda.sormas.api.task.TaskStatus) IterableHelper(de.symeda.sormas.backend.util.IterableHelper) Symptoms(de.symeda.sormas.backend.symptoms.Symptoms) LinkedList(java.util.LinkedList) Expression(javax.persistence.criteria.Expression) SymptomsDto(de.symeda.sormas.api.symptoms.SymptomsDto) CriteriaBuilderHelper(de.symeda.sormas.backend.common.CriteriaBuilderHelper) SormasToSormasOriginInfoFacadeEjbLocal(de.symeda.sormas.backend.sormastosormas.origin.SormasToSormasOriginInfoFacadeEjb.SormasToSormasOriginInfoFacadeEjbLocal) ModelConstants(de.symeda.sormas.backend.util.ModelConstants) LocationDto(de.symeda.sormas.api.location.LocationDto) TaskContext(de.symeda.sormas.api.task.TaskContext) ContactListEntryDto(de.symeda.sormas.api.contact.ContactListEntryDto) EpiDataFacadeEjbLocal(de.symeda.sormas.backend.epidata.EpiDataFacadeEjb.EpiDataFacadeEjbLocal) Logger(org.slf4j.Logger) Validations(de.symeda.sormas.api.i18n.Validations) ContactStatus(de.symeda.sormas.api.contact.ContactStatus) Document(de.symeda.sormas.backend.document.Document) VisitLogic.getVisitResult(de.symeda.sormas.backend.visit.VisitLogic.getVisitResult) UserReference(de.symeda.sormas.backend.user.UserReference) RegionFacadeEjb(de.symeda.sormas.backend.infrastructure.region.RegionFacadeEjb) RegionService(de.symeda.sormas.backend.infrastructure.region.RegionService) TimeUnit(java.util.concurrent.TimeUnit) UserRight(de.symeda.sormas.api.user.UserRight) VisitSummaryExportDetailsDto(de.symeda.sormas.api.visit.VisitSummaryExportDetailsDto) VisitResultDto(de.symeda.sormas.api.visit.VisitResultDto) Country(de.symeda.sormas.backend.infrastructure.country.Country) ExternalJournalService(de.symeda.sormas.backend.externaljournal.ExternalJournalService) ContactReferenceDto(de.symeda.sormas.api.contact.ContactReferenceDto) 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) Visit(de.symeda.sormas.backend.visit.Visit) ArrayList(java.util.ArrayList) VisitResultDto(de.symeda.sormas.api.visit.VisitResultDto) Predicate(javax.persistence.criteria.Predicate) SortProperty(de.symeda.sormas.api.utils.SortProperty) ContactFollowUpDto(de.symeda.sormas.api.contact.ContactFollowUpDto) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) Order(javax.persistence.criteria.Order) Date(java.util.Date) LocalDate(java.time.LocalDate) AbstractDomainObject(de.symeda.sormas.backend.common.AbstractDomainObject) Symptoms(de.symeda.sormas.backend.symptoms.Symptoms)

Aggregations

DashboardContactDto (de.symeda.sormas.api.dashboard.DashboardContactDto)3 Disease (de.symeda.sormas.api.Disease)2 ContactClassification (de.symeda.sormas.api.contact.ContactClassification)2 ContactCriteria (de.symeda.sormas.api.contact.ContactCriteria)2 ContactDto (de.symeda.sormas.api.contact.ContactDto)2 ContactListEntryDto (de.symeda.sormas.api.contact.ContactListEntryDto)2 ContactLogic (de.symeda.sormas.api.contact.ContactLogic)2 ContactReferenceDto (de.symeda.sormas.api.contact.ContactReferenceDto)2 ContactStatus (de.symeda.sormas.api.contact.ContactStatus)2 FollowUpStatus (de.symeda.sormas.api.contact.FollowUpStatus)2 MapContactDto (de.symeda.sormas.api.contact.MapContactDto)2 ExternalDataDto (de.symeda.sormas.api.externaldata.ExternalDataDto)2 ExternalDataUpdateException (de.symeda.sormas.api.externaldata.ExternalDataUpdateException)2 FeatureType (de.symeda.sormas.api.feature.FeatureType)2 FeatureTypeProperty (de.symeda.sormas.api.feature.FeatureTypeProperty)2 I18nProperties (de.symeda.sormas.api.i18n.I18nProperties)2 Strings (de.symeda.sormas.api.i18n.Strings)2 VisitStatus (de.symeda.sormas.api.visit.VisitStatus)2 Date (java.util.Date)2 EnumMap (java.util.EnumMap)2