Search in sources :

Example 1 with PathogenTestType

use of de.symeda.sormas.api.sample.PathogenTestType in project SORMAS-Project by hzi-braunschweig.

the class TestEntityCreator method createSampleTest.

public static PathogenTest createSampleTest(Sample sample) {
    PathogenTestType pathogenTestType = PathogenTestType.RAPID_TEST;
    PathogenTestResultType pathogenTestResultType = PathogenTestResultType.NEGATIVE;
    Date sampleTestDateTime = new Date();
    PathogenTest pathogenTest = DatabaseHelper.getSampleTestDao().build(sample);
    pathogenTest.setTestType(pathogenTestType);
    pathogenTest.setTestResult(pathogenTestResultType);
    pathogenTest.setTestDateTime(sampleTestDateTime);
    try {
        DatabaseHelper.getSampleTestDao().saveAndSnapshot(pathogenTest);
        DatabaseHelper.getSampleTestDao().accept(pathogenTest);
    } catch (DaoException e) {
        throw new RuntimeException(e);
    }
    return DatabaseHelper.getSampleTestDao().queryForIdWithEmbedded(pathogenTest.getId());
}
Also used : PathogenTestResultType(de.symeda.sormas.api.sample.PathogenTestResultType) PathogenTest(de.symeda.sormas.app.backend.sample.PathogenTest) PathogenTestType(de.symeda.sormas.api.sample.PathogenTestType) DaoException(de.symeda.sormas.app.backend.common.DaoException) Date(java.util.Date)

Example 2 with PathogenTestType

use of de.symeda.sormas.api.sample.PathogenTestType in project SORMAS-Project by hzi-braunschweig.

the class SampleEditFragment method prepareFragmentData.

@Override
protected void prepareFragmentData() {
    record = getActivityRootData();
    if (record.getId() != null) {
        mostRecentTest = DatabaseHelper.getSampleTestDao().queryMostRecentBySample(record);
        if (ConfigProvider.hasUserRight(UserRight.ADDITIONAL_TEST_VIEW) && !DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.ADDITIONAL_TESTS)) {
            mostRecentAdditionalTests = DatabaseHelper.getAdditionalTestDao().queryMostRecentBySample(record);
        }
    }
    if (!StringUtils.isEmpty(record.getReferredToUuid())) {
        referredSample = DatabaseHelper.getSampleDao().queryUuid(record.getReferredToUuid());
    } else {
        referredSample = null;
    }
    sampleMaterialList = DataUtils.getEnumItems(SampleMaterial.class, true, getFieldVisibilityCheckers());
    sampleSourceList = DataUtils.getEnumItems(SampleSource.class, true);
    labList = DatabaseHelper.getFacilityDao().getActiveLaboratories(true);
    samplePurposeList = DataUtils.getEnumItems(SamplePurpose.class, true);
    samplingReasonList = DataUtils.getEnumItems(SamplingReason.class, true, getFieldVisibilityCheckers());
    for (PathogenTestType pathogenTest : record.getRequestedPathogenTests()) {
        requestedPathogenTests.clear();
        if (pathogenTest != PathogenTestType.OTHER) {
            requestedPathogenTests.add(pathogenTest.toString());
        }
    }
    if (ConfigProvider.hasUserRight(UserRight.ADDITIONAL_TEST_VIEW) && !DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.ADDITIONAL_TESTS)) {
        requestedAdditionalTests.clear();
        for (AdditionalTestType additionalTest : record.getRequestedAdditionalTests()) {
            requestedAdditionalTests.add(additionalTest.toString());
        }
    }
    if (record.getId() != null) {
        if (DatabaseHelper.getSampleTestDao().queryBySample(record).stream().allMatch(pathogenTest -> pathogenTest.getTestResult() == PathogenTestResultType.PENDING)) {
            finalTestResults = DataUtils.toItems(Arrays.asList(PathogenTestResultType.values()));
        } else {
            finalTestResults = DataUtils.toItems(Arrays.stream(PathogenTestResultType.values()).filter(type -> type != PathogenTestResultType.NOT_DONE).collect(Collectors.toList()));
        }
    }
}
Also used : FeatureType(de.symeda.sormas.api.feature.FeatureType) SamplePurpose(de.symeda.sormas.api.sample.SamplePurpose) Arrays(java.util.Arrays) FacilityDto(de.symeda.sormas.api.infrastructure.facility.FacilityDto) DataUtils(de.symeda.sormas.app.util.DataUtils) SampleSource(de.symeda.sormas.api.sample.SampleSource) SpecimenCondition(de.symeda.sormas.api.sample.SpecimenCondition) PathogenTest(de.symeda.sormas.app.backend.sample.PathogenTest) Intent(android.content.Intent) Facility(de.symeda.sormas.app.backend.facility.Facility) StringUtils(org.apache.commons.lang3.StringUtils) ArrayList(java.util.ArrayList) PathogenTestType(de.symeda.sormas.api.sample.PathogenTestType) BarcodeActivity(de.symeda.sormas.app.barcode.BarcodeActivity) ConfigProvider(de.symeda.sormas.app.backend.config.ConfigProvider) VISIBLE(android.view.View.VISIBLE) View(android.view.View) Item(de.symeda.sormas.app.component.Item) SampleReadActivity(de.symeda.sormas.app.sample.read.SampleReadActivity) AdditionalTest(de.symeda.sormas.app.backend.sample.AdditionalTest) Collectors(java.util.stream.Collectors) CommonStatusCodes(com.google.android.gms.common.api.CommonStatusCodes) R(de.symeda.sormas.app.R) Sample(de.symeda.sormas.app.backend.sample.Sample) SampleMaterial(de.symeda.sormas.api.sample.SampleMaterial) UserRight(de.symeda.sormas.api.user.UserRight) List(java.util.List) Nullable(androidx.annotation.Nullable) Disease(de.symeda.sormas.api.Disease) GONE(android.view.View.GONE) PathogenTestResultType(de.symeda.sormas.api.sample.PathogenTestResultType) SampleDto(de.symeda.sormas.api.sample.SampleDto) DatabaseHelper(de.symeda.sormas.app.backend.common.DatabaseHelper) FragmentSampleEditLayoutBinding(de.symeda.sormas.app.databinding.FragmentSampleEditLayoutBinding) BaseEditFragment(de.symeda.sormas.app.BaseEditFragment) FieldVisibilityCheckers(de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers) AdditionalTestType(de.symeda.sormas.api.sample.AdditionalTestType) UiFieldAccessCheckers(de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers) SamplingReason(de.symeda.sormas.api.sample.SamplingReason) SamplingReason(de.symeda.sormas.api.sample.SamplingReason) SamplePurpose(de.symeda.sormas.api.sample.SamplePurpose) SampleMaterial(de.symeda.sormas.api.sample.SampleMaterial) SampleSource(de.symeda.sormas.api.sample.SampleSource) AdditionalTestType(de.symeda.sormas.api.sample.AdditionalTestType) PathogenTestType(de.symeda.sormas.api.sample.PathogenTestType)

Example 3 with PathogenTestType

use of de.symeda.sormas.api.sample.PathogenTestType in project SORMAS-Project by hzi-braunschweig.

the class SampleReadFragment method prepareFragmentData.

// Overrides
@Override
protected void prepareFragmentData(Bundle savedInstanceState) {
    record = getActivityRootData();
    mostRecentTest = DatabaseHelper.getSampleTestDao().queryMostRecentBySample(record);
    if (ConfigProvider.hasUserRight(UserRight.ADDITIONAL_TEST_VIEW) && !DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.ADDITIONAL_TESTS)) {
        mostRecentAdditionalTests = DatabaseHelper.getAdditionalTestDao().queryMostRecentBySample(record);
    }
    if (!StringUtils.isEmpty(record.getReferredToUuid())) {
        referredSample = DatabaseHelper.getSampleDao().queryUuid(record.getReferredToUuid());
    } else {
        referredSample = null;
    }
    for (PathogenTestType pathogenTest : record.getRequestedPathogenTests()) {
        if (pathogenTest != PathogenTestType.OTHER) {
            requestedPathogenTests.add(pathogenTest.toString());
        }
    }
    if (ConfigProvider.hasUserRight(UserRight.ADDITIONAL_TEST_VIEW) && !DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.ADDITIONAL_TESTS)) {
        for (AdditionalTestType additionalTest : record.getRequestedAdditionalTests()) {
            requestedAdditionalTests.add(additionalTest.toString());
        }
    }
}
Also used : AdditionalTestType(de.symeda.sormas.api.sample.AdditionalTestType) PathogenTestType(de.symeda.sormas.api.sample.PathogenTestType)

Example 4 with PathogenTestType

use of de.symeda.sormas.api.sample.PathogenTestType in project SORMAS-Project by hzi-braunschweig.

the class PathogenTestEditFragment method onAfterLayoutBinding.

@Override
public void onAfterLayoutBinding(FragmentPathogenTestEditLayoutBinding contentBinding) {
    setFieldVisibilitiesAndAccesses(PathogenTestDto.class, contentBinding.mainContent);
    // Initialize ControlSpinnerFields
    contentBinding.pathogenTestTestType.initializeSpinner(testTypeList, new ValueChangeListener() {

        @Override
        public void onChange(ControlPropertyField field) {
            PathogenTestType currentTestType = (PathogenTestType) field.getValue();
            if ((PathogenTestType.PCR_RT_PCR == currentTestType && PathogenTestResultType.POSITIVE == contentBinding.pathogenTestTestResult.getValue()) || PathogenTestType.CQ_VALUE_DETECTION == currentTestType) {
                contentBinding.pathogenTestCqValue.setVisibility(View.VISIBLE);
            } else {
                contentBinding.pathogenTestCqValue.hideField(true);
            }
            if (PathogenTestType.PCR_RT_PCR == currentTestType && Disease.CORONAVIRUS == record.getTestedDisease()) {
                getContentBinding().pathogenTestPcrTestSpecification.setVisibility(View.VISIBLE);
            } else {
                getContentBinding().pathogenTestPcrTestSpecification.hideField(false);
            }
        }
    });
    contentBinding.pathogenTestPcrTestSpecification.initializeSpinner(pcrTestSpecificationList);
    contentBinding.pathogenTestTestedDiseaseVariant.initializeSpinner(diseaseVariantList);
    contentBinding.pathogenTestTestedDisease.initializeSpinner(diseaseList, new ValueChangeListener() {

        final Disease currentDisease = record.getTestedDisease();

        @Override
        public void onChange(ControlPropertyField field) {
            if (PathogenTestType.PCR_RT_PCR == record.getTestType() && Disease.CORONAVIRUS == field.getValue()) {
                getContentBinding().pathogenTestPcrTestSpecification.setVisibility(View.VISIBLE);
            } else {
                getContentBinding().pathogenTestPcrTestSpecification.hideField(false);
            }
            if (this.currentDisease == null || contentBinding.pathogenTestTestedDisease.getValue() != currentDisease) {
                updateDiseaseVariantsField(contentBinding);
            }
            testTypeList = DataUtils.toItems(Arrays.asList(PathogenTestType.values()), true, FieldVisibilityCheckers.withDisease((Disease) field.getValue()), PathogenTestType.class);
            contentBinding.pathogenTestTestType.setSpinnerData(testTypeList);
        }
    });
    contentBinding.pathogenTestTestResult.initializeSpinner(testResultList, new ValueChangeListener() {

        @Override
        public void onChange(ControlPropertyField field) {
            PathogenTestResultType currentPathogenTestResult = (PathogenTestResultType) field.getValue();
            if ((PathogenTestType.PCR_RT_PCR == contentBinding.pathogenTestTestType.getValue() && PathogenTestResultType.POSITIVE == currentPathogenTestResult) || PathogenTestType.CQ_VALUE_DETECTION == contentBinding.pathogenTestTestType.getValue()) {
                contentBinding.pathogenTestCqValue.setVisibility(View.VISIBLE);
            } else {
                contentBinding.pathogenTestCqValue.hideField(true);
            }
        }
    });
    contentBinding.pathogenTestLab.initializeSpinner(DataUtils.toItems(labList), new ValueChangeListener() {

        @Override
        public void onChange(ControlPropertyField field) {
            Facility laboratory = (Facility) field.getValue();
            if (laboratory != null && laboratory.getUuid().equals(FacilityDto.OTHER_FACILITY_UUID)) {
                contentBinding.pathogenTestLabDetails.setVisibility(View.VISIBLE);
            } else {
                contentBinding.pathogenTestLabDetails.hideField(true);
            }
        }
    });
    // // Initialize ControlDateFields
    contentBinding.pathogenTestReportDate.initializeDateField(getFragmentManager());
    contentBinding.pathogenTestTestDateTime.initializeDateTimeField(getFragmentManager());
    if (sample.getSamplePurpose() == SamplePurpose.INTERNAL) {
        contentBinding.pathogenTestLab.setRequired(false);
    }
}
Also used : ValueChangeListener(de.symeda.sormas.app.component.controls.ValueChangeListener) PathogenTestResultType(de.symeda.sormas.api.sample.PathogenTestResultType) Disease(de.symeda.sormas.api.Disease) ControlPropertyField(de.symeda.sormas.app.component.controls.ControlPropertyField) Facility(de.symeda.sormas.app.backend.facility.Facility) PathogenTestType(de.symeda.sormas.api.sample.PathogenTestType)

Example 5 with PathogenTestType

use of de.symeda.sormas.api.sample.PathogenTestType in project SORMAS-Project by hzi-braunschweig.

the class SampleService method getIndexList.

public List<SampleIndexDto> getIndexList(SampleCriteria sampleCriteria, Integer first, Integer max, List<SortProperty> sortProperties) {
    final CriteriaBuilder cb = em.getCriteriaBuilder();
    final CriteriaQuery<SampleIndexDto> cq = cb.createQuery(SampleIndexDto.class);
    final Root<Sample> sample = cq.from(Sample.class);
    SampleQueryContext sampleQueryContext = new SampleQueryContext(cb, cq, sample);
    SampleJoins<Sample> joins = (SampleJoins<Sample>) sampleQueryContext.getJoins();
    final Join<Sample, Case> caze = joins.getCaze();
    final Join<Case, District> caseDistrict = joins.getCaseDistrict();
    final Join<Sample, Contact> contact = joins.getContact();
    final Join<Contact, District> contactDistrict = joins.getContactDistrict();
    final Join<Case, District> contactCaseDistrict = joins.getContactCaseDistrict();
    final Join<EventParticipant, Event> event = joins.getEvent();
    final Join<Location, District> eventDistrict = joins.getEventDistrict();
    Expression<Object> diseaseSelect = cb.selectCase().when(cb.isNotNull(caze), caze.get(Case.DISEASE)).otherwise(cb.selectCase().when(cb.isNotNull(contact), contact.get(Contact.DISEASE)).otherwise(event.get(Event.DISEASE)));
    Expression<Object> diseaseDetailsSelect = cb.selectCase().when(cb.isNotNull(caze), caze.get(Case.DISEASE_DETAILS)).otherwise(cb.selectCase().when(cb.isNotNull(contact), contact.get(Contact.DISEASE_DETAILS)).otherwise(event.get(Event.DISEASE_DETAILS)));
    Expression<Object> districtSelect = cb.selectCase().when(cb.isNotNull(caseDistrict), caseDistrict.get(District.NAME)).otherwise(cb.selectCase().when(cb.isNotNull(contactDistrict), contactDistrict.get(District.NAME)).otherwise(cb.selectCase().when(cb.isNotNull(contactCaseDistrict), contactCaseDistrict.get(District.NAME)).otherwise(eventDistrict.get(District.NAME))));
    cq.distinct(true);
    List<Selection<?>> selections = new ArrayList<>(Arrays.asList(sample.get(Sample.UUID), caze.get(Case.EPID_NUMBER), sample.get(Sample.LAB_SAMPLE_ID), sample.get(Sample.SAMPLE_DATE_TIME), sample.get(Sample.SHIPPED), sample.get(Sample.SHIPMENT_DATE), sample.get(Sample.RECEIVED), sample.get(Sample.RECEIVED_DATE), sample.get(Sample.SAMPLE_MATERIAL), sample.get(Sample.SAMPLE_PURPOSE), sample.get(Sample.SPECIMEN_CONDITION), joins.getLab().get(Facility.NAME), joins.getReferredSample().get(Sample.UUID), sample.get(Sample.SAMPLING_REASON), sample.get(Sample.SAMPLING_REASON_DETAILS), caze.get(Case.UUID), joins.getCasePerson().get(Person.FIRST_NAME), joins.getCasePerson().get(Person.LAST_NAME), joins.getContact().get(Contact.UUID), joins.getContactPerson().get(Person.FIRST_NAME), joins.getContactPerson().get(Person.LAST_NAME), joins.getEventParticipant().get(EventParticipant.UUID), joins.getEventParticipantPerson().get(Person.FIRST_NAME), joins.getEventParticipantPerson().get(Person.LAST_NAME), diseaseSelect, diseaseDetailsSelect, sample.get(Sample.PATHOGEN_TEST_RESULT), sample.get(Sample.ADDITIONAL_TESTING_REQUESTED), cb.isNotEmpty(sample.get(Sample.ADDITIONAL_TESTS)), districtSelect, joins.getLab().get(Facility.UUID)));
    // Tests count subquery
    Subquery<Long> testCountSq = cq.subquery(Long.class);
    Root<PathogenTest> testCountRoot = testCountSq.from(PathogenTest.class);
    testCountSq.where(cb.equal(testCountRoot.get(PathogenTest.SAMPLE), sample), cb.isFalse(testCountRoot.get(PathogenTest.DELETED)));
    testCountSq.select(cb.countDistinct(testCountRoot.get(PathogenTest.ID)));
    selections.add(testCountSq.getSelection());
    selections.addAll(getJurisdictionSelections(sampleQueryContext));
    cq.multiselect(selections);
    Predicate filter = createUserFilter(cq, cb, joins, sampleCriteria);
    if (sampleCriteria != null) {
        Predicate criteriaFilter = buildCriteriaFilter(sampleCriteria, cb, joins);
        filter = CriteriaBuilderHelper.and(cb, filter, criteriaFilter);
    }
    if (filter != null) {
        cq.where(filter);
    }
    if (sortProperties != null && sortProperties.size() > 0) {
        List<Order> order = new ArrayList<>(sortProperties.size());
        for (SortProperty sortProperty : sortProperties) {
            Expression<?> expression;
            switch(sortProperty.propertyName) {
                case SampleIndexDto.UUID:
                case SampleIndexDto.LAB_SAMPLE_ID:
                case SampleIndexDto.SHIPPED:
                case SampleIndexDto.RECEIVED:
                case SampleIndexDto.REFERRED:
                case SampleIndexDto.SAMPLE_DATE_TIME:
                case SampleIndexDto.SHIPMENT_DATE:
                case SampleIndexDto.RECEIVED_DATE:
                case SampleIndexDto.SAMPLE_MATERIAL:
                case SampleIndexDto.SAMPLE_PURPOSE:
                case SampleIndexDto.PATHOGEN_TEST_RESULT:
                case SampleIndexDto.ADDITIONAL_TESTING_STATUS:
                    expression = sample.get(sortProperty.propertyName);
                    break;
                case SampleIndexDto.DISEASE:
                    expression = diseaseSelect;
                    break;
                case SampleIndexDto.EPID_NUMBER:
                    expression = caze.get(Case.EPID_NUMBER);
                    break;
                case SampleIndexDto.ASSOCIATED_CASE:
                    expression = joins.getCasePerson().get(Person.LAST_NAME);
                    order.add(sortProperty.ascending ? cb.asc(expression) : cb.desc(expression));
                    expression = joins.getCasePerson().get(Person.FIRST_NAME);
                    break;
                case SampleIndexDto.ASSOCIATED_CONTACT:
                    expression = joins.getContactPerson().get(Person.LAST_NAME);
                    order.add(sortProperty.ascending ? cb.asc(expression) : cb.desc(expression));
                    expression = joins.getContactPerson().get(Person.FIRST_NAME);
                    break;
                case SampleIndexDto.ASSOCIATED_EVENT_PARTICIPANT:
                    expression = joins.getEventParticipantPerson().get(Person.LAST_NAME);
                    order.add(sortProperty.ascending ? cb.asc(expression) : cb.desc(expression));
                    expression = joins.getEventParticipantPerson().get(Person.FIRST_NAME);
                    break;
                case SampleIndexDto.DISTRICT:
                    expression = districtSelect;
                    break;
                case SampleIndexDto.LAB:
                    expression = joins.getLab().get(Facility.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(sample.get(Sample.SAMPLE_DATE_TIME)));
    }
    List<SampleIndexDto> samples = QueryHelper.getResultList(em, cq, first, max);
    if (!samples.isEmpty()) {
        CriteriaQuery<Object[]> testCq = cb.createQuery(Object[].class);
        Root<PathogenTest> testRoot = testCq.from(PathogenTest.class);
        Expression<String> sampleIdExpr = testRoot.get(PathogenTest.SAMPLE).get(Sample.UUID);
        Path<Long> testType = testRoot.get(PathogenTest.TEST_TYPE);
        Path<Date> cqValue = testRoot.get(PathogenTest.CQ_VALUE);
        testCq.select(cb.array(testType, cqValue, sampleIdExpr));
        testCq.where(cb.isFalse(testRoot.get(PathogenTest.DELETED)), sampleIdExpr.in(samples.stream().map(SampleIndexDto::getUuid).collect(Collectors.toList())));
        testCq.orderBy(cb.desc(testRoot.get(PathogenTest.CHANGE_DATE)));
        List<Object[]> testList = em.createQuery(testCq).setHint(ModelConstants.HINT_HIBERNATE_READ_ONLY, true).getResultList();
        Map<String, Object[]> tests = testList.stream().filter(distinctByKey(pathogenTest -> pathogenTest[2])).collect(Collectors.toMap(pathogenTest -> pathogenTest[2].toString(), Function.identity()));
        for (SampleIndexDto indexDto : samples) {
            Optional.ofNullable(tests.get(indexDto.getUuid())).ifPresent(test -> {
                indexDto.setTypeOfLastTest((PathogenTestType) test[0]);
                indexDto.setLastTestCqValue((Float) test[1]);
            });
        }
    }
    Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
    Pseudonymizer emptyValuePseudonymizer = Pseudonymizer.getDefault(userService::hasRight);
    pseudonymizer.pseudonymizeDtoCollection(SampleIndexDto.class, samples, s -> s.getSampleJurisdictionFlagsDto().getInJurisdiction(), (s, ignored) -> {
        final SampleJurisdictionFlagsDto sampleJurisdictionFlagsDto = s.getSampleJurisdictionFlagsDto();
        if (s.getAssociatedCase() != null) {
            emptyValuePseudonymizer.pseudonymizeDto(CaseReferenceDto.class, s.getAssociatedCase(), sampleJurisdictionFlagsDto.getCaseInJurisdiction(), null);
        }
        ContactReferenceDto associatedContact = s.getAssociatedContact();
        if (associatedContact != null) {
            emptyValuePseudonymizer.pseudonymizeDto(ContactReferenceDto.PersonName.class, associatedContact.getContactName(), sampleJurisdictionFlagsDto.getContactInJurisdiction(), null);
            if (associatedContact.getCaseName() != null) {
                pseudonymizer.pseudonymizeDto(ContactReferenceDto.PersonName.class, associatedContact.getCaseName(), sampleJurisdictionFlagsDto.getContactCaseInJurisdiction(), null);
            }
        }
        if (s.getAssociatedEventParticipant() != null) {
            emptyValuePseudonymizer.pseudonymizeDto(EventParticipantReferenceDto.class, s.getAssociatedEventParticipant(), sampleJurisdictionFlagsDto.getEvenParticipantInJurisdiction(), null);
        }
    }, true);
    return samples;
}
Also used : Arrays(java.util.Arrays) Join(javax.persistence.criteria.Join) AbstractDomainObject(de.symeda.sormas.backend.common.AbstractDomainObject) Date(java.util.Date) I18nProperties(de.symeda.sormas.api.i18n.I18nProperties) SpecimenCondition(de.symeda.sormas.api.sample.SpecimenCondition) TransactionAttributeType(javax.ejb.TransactionAttributeType) Facility(de.symeda.sormas.backend.infrastructure.facility.Facility) Predicate(javax.persistence.criteria.Predicate) Map(java.util.Map) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) JoinType(javax.persistence.criteria.JoinType) BigInteger(java.math.BigInteger) ContactJoins(de.symeda.sormas.backend.contact.ContactJoins) From(javax.persistence.criteria.From) Path(javax.persistence.criteria.Path) EventParticipantReferenceDto(de.symeda.sormas.api.event.EventParticipantReferenceDto) Contact(de.symeda.sormas.backend.contact.Contact) Stateless(javax.ejb.Stateless) CriteriaQuery(javax.persistence.criteria.CriteriaQuery) CaseService(de.symeda.sormas.backend.caze.CaseService) Person(de.symeda.sormas.backend.person.Person) Timestamp(java.sql.Timestamp) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) District(de.symeda.sormas.backend.infrastructure.district.District) Instant(java.time.Instant) Pseudonymizer(de.symeda.sormas.backend.util.Pseudonymizer) Collectors(java.util.stream.Collectors) ContactQueryContext(de.symeda.sormas.backend.contact.ContactQueryContext) EventParticipantQueryContext(de.symeda.sormas.backend.event.EventParticipantQueryContext) List(java.util.List) Query(javax.persistence.Query) UserService(de.symeda.sormas.backend.user.UserService) User(de.symeda.sormas.backend.user.User) PathogenTestResultType(de.symeda.sormas.api.sample.PathogenTestResultType) JurisdictionHelper(de.symeda.sormas.backend.util.JurisdictionHelper) Order(javax.persistence.criteria.Order) DeletableAdo(de.symeda.sormas.backend.common.DeletableAdo) Optional(java.util.Optional) JurisdictionLevel(de.symeda.sormas.api.user.JurisdictionLevel) Location(de.symeda.sormas.backend.location.Location) SampleAssociationType(de.symeda.sormas.api.sample.SampleAssociationType) SampleCriteria(de.symeda.sormas.api.sample.SampleCriteria) EventParticipant(de.symeda.sormas.backend.event.EventParticipant) QueryHelper(de.symeda.sormas.backend.util.QueryHelper) SormasToSormasShareInfoService(de.symeda.sormas.backend.sormastosormas.share.shareinfo.SormasToSormasShareInfoService) DateHelper(de.symeda.sormas.api.utils.DateHelper) SampleListEntryDtoResultTransformer(de.symeda.sormas.backend.sample.transformers.SampleListEntryDtoResultTransformer) Selection(javax.persistence.criteria.Selection) HashMap(java.util.HashMap) EntityRelevanceStatus(de.symeda.sormas.api.EntityRelevanceStatus) CaseFacadeEjb(de.symeda.sormas.backend.caze.CaseFacadeEjb) Function(java.util.function.Function) EventParticipantService(de.symeda.sormas.backend.event.EventParticipantService) ArrayList(java.util.ArrayList) CaseReferenceDto(de.symeda.sormas.api.caze.CaseReferenceDto) PathogenTestType(de.symeda.sormas.api.sample.PathogenTestType) Case(de.symeda.sormas.backend.caze.Case) CriteriaUpdate(javax.persistence.criteria.CriteriaUpdate) CollectionUtils(org.apache.commons.collections.CollectionUtils) TransactionAttribute(javax.ejb.TransactionAttribute) IterableHelper(de.symeda.sormas.backend.util.IterableHelper) SampleListEntryDto(de.symeda.sormas.api.sample.SampleListEntryDto) LocalBean(javax.ejb.LocalBean) CaseQueryContext(de.symeda.sormas.backend.caze.CaseQueryContext) SampleIndexDto(de.symeda.sormas.api.sample.SampleIndexDto) LinkedList(java.util.LinkedList) Expression(javax.persistence.criteria.Expression) CriteriaBuilderHelper(de.symeda.sormas.backend.common.CriteriaBuilderHelper) SampleJurisdictionFlagsDto(de.symeda.sormas.api.sample.SampleJurisdictionFlagsDto) AbstractDeletableAdoService(de.symeda.sormas.backend.common.AbstractDeletableAdoService) EJB(javax.ejb.EJB) Root(javax.persistence.criteria.Root) ModelConstants(de.symeda.sormas.backend.util.ModelConstants) DataHelper(de.symeda.sormas.api.utils.DataHelper) SortProperty(de.symeda.sormas.api.utils.SortProperty) Captions(de.symeda.sormas.api.i18n.Captions) Event(de.symeda.sormas.backend.event.Event) ContactService(de.symeda.sormas.backend.contact.ContactService) Subquery(javax.persistence.criteria.Subquery) ContactReferenceDto(de.symeda.sormas.api.contact.ContactReferenceDto) Collections(java.util.Collections) Pseudonymizer(de.symeda.sormas.backend.util.Pseudonymizer) ArrayList(java.util.ArrayList) Predicate(javax.persistence.criteria.Predicate) SortProperty(de.symeda.sormas.api.utils.SortProperty) CriteriaBuilder(javax.persistence.criteria.CriteriaBuilder) Order(javax.persistence.criteria.Order) ContactReferenceDto(de.symeda.sormas.api.contact.ContactReferenceDto) AbstractDomainObject(de.symeda.sormas.backend.common.AbstractDomainObject) District(de.symeda.sormas.backend.infrastructure.district.District) EventParticipant(de.symeda.sormas.backend.event.EventParticipant) Selection(javax.persistence.criteria.Selection) Case(de.symeda.sormas.backend.caze.Case) SampleJurisdictionFlagsDto(de.symeda.sormas.api.sample.SampleJurisdictionFlagsDto) SampleIndexDto(de.symeda.sormas.api.sample.SampleIndexDto) Date(java.util.Date) Contact(de.symeda.sormas.backend.contact.Contact) Event(de.symeda.sormas.backend.event.Event) Location(de.symeda.sormas.backend.location.Location)

Aggregations

PathogenTestType (de.symeda.sormas.api.sample.PathogenTestType)8 PathogenTestResultType (de.symeda.sormas.api.sample.PathogenTestResultType)5 Disease (de.symeda.sormas.api.Disease)3 AdditionalTestType (de.symeda.sormas.api.sample.AdditionalTestType)3 Arrays (java.util.Arrays)3 List (java.util.List)3 Label (com.vaadin.ui.Label)2 I18nProperties (de.symeda.sormas.api.i18n.I18nProperties)2 FacilityDto (de.symeda.sormas.api.infrastructure.facility.FacilityDto)2 SampleDto (de.symeda.sormas.api.sample.SampleDto)2 SamplePurpose (de.symeda.sormas.api.sample.SamplePurpose)2 SpecimenCondition (de.symeda.sormas.api.sample.SpecimenCondition)2 PathogenTest (de.symeda.sormas.app.backend.sample.PathogenTest)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 CollectionUtils (org.apache.commons.collections.CollectionUtils)2 Intent (android.content.Intent)1 View (android.view.View)1 GONE (android.view.View.GONE)1 VISIBLE (android.view.View.VISIBLE)1