From 539e713372a4a7a35630f9b5e14043755ba8bad6 Mon Sep 17 00:00:00 2001 From: Karnaiah Pesula Date: Tue, 2 Jun 2026 09:51:44 +0200 Subject: [PATCH 1/5] Introduced new disease "shigellosis" to sormas. Changes included in case, epidata, symptoms and sample moduels. --- .../java/de/symeda/sormas/api/Disease.java | 160 ++++++++------ .../clinicalcourse/HealthConditionsDto.java | 63 ++++++ .../api/disease/DiseaseConfigurationDto.java | 31 +++ .../disease/DiseaseConfigurationIndexDto.java | 31 +++ .../symeda/sormas/api/epidata/EpiDataDto.java | 87 ++------ .../sormas/api/exposure/ExposureDto.java | 3 +- .../sormas/api/exposure/InfectionSource.java | 123 +++++++++++ .../api/exposure/ModeOfTransmission.java | 34 ++- .../de/symeda/sormas/api/i18n/Captions.java | 10 + .../de/symeda/sormas/api/i18n/Strings.java | 4 + .../symeda/sormas/api/person/PersonDto.java | 6 +- .../sormas/api/sample/PathogenSpecie.java | 55 ++--- .../sormas/api/sample/PathogenTestDto.java | 6 +- .../sormas/api/sample/PathogenTestType.java | 54 +++-- .../sormas/api/sample/SampleMaterial.java | 95 ++++---- .../sormas/api/sample/SerotypingMethod.java | 74 ++++++- .../sormas/api/symptoms/SymptomsDto.java | 81 ++++++- .../de/symeda/sormas/api/therapy/Drug.java | 69 ++++-- .../api/therapy/DrugSusceptibilityDto.java | 156 +++++++++++++- .../src/main/resources/captions.properties | 10 + sormas-api/src/main/resources/enum.properties | 70 +++++- .../src/main/resources/strings.properties | 9 +- .../clinicalcourse/HealthConditions.java | 41 ++++ .../HealthConditionsMapper.java | 8 + .../backend/disease/DiseaseConfiguration.java | 30 +++ .../DiseaseConfigurationFacadeEjb.java | 30 +++ .../sormas/backend/epidata/EpiData.java | 44 ---- .../backend/epidata/EpiDataFacadeEjb.java | 8 - .../sormas/backend/symptoms/Symptoms.java | 32 ++- .../backend/symptoms/SymptomsFacadeEjb.java | 7 +- .../backend/therapy/DrugSusceptibility.java | 97 +++++++++ .../therapy/DrugSusceptibilityMapper.java | 34 ++- .../src/main/resources/sql/sormas_schema.sql | 54 +++++ .../DiseaseConfigurationFacadeEjbTest.java | 1 + .../clinicalcourse/HealthConditionsForm.java | 17 +- .../disease/DiseaseConfigurationEditForm.java | 15 +- .../disease/DiseaseConfigurationGrid.java | 4 +- .../sormas/ui/contact/ContactDataView.java | 8 +- .../symeda/sormas/ui/epidata/EpiDataForm.java | 181 ++++++++++++---- .../sormas/ui/person/PersonEditForm.java | 3 +- .../ui/samples/PathogenTestController.java | 9 +- .../diseasesection/DiseaseSectionFactory.java | 2 + .../ShigellosisSectionComponent.java | 204 ++++++++++++++++++ .../PathogenTestListEntry.java | 85 +------- .../samples/sampleLink/SampleListEntry.java | 32 +-- .../sormas/ui/symptoms/SymptomsForm.java | 21 +- .../ui/therapy/DrugSusceptibilityForm.java | 65 +++++- .../de/symeda/sormas/ui/utils/CssStyles.java | 2 + .../sidecomponent/SideComponentField.java | 115 +++++++++- .../VAADIN/themes/sormas/views/disease.scss | 9 + 50 files changed, 1874 insertions(+), 515 deletions(-) create mode 100644 sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.java diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java b/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java index 1b1afb44a2a..d34fca24226 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java @@ -29,74 +29,75 @@ public enum Disease implements StatisticsGroupingKey { - AFP(true, true, true, false, true, 60, true, false, false, true, 7, 30), - CHOLERA(true, true, true, false, true, 5, true, false, false, true, 0, 5), - CONGENITAL_RUBELLA(true, true, true, false, true, 21, true, false, false, false, 0, 0), - CSM(true, true, true, false, true, 10, true, false, false, false, 0, 0), - DENGUE(true, true, true, false, false, 14, true, false, false, true, 2, 14), - EVD(true, true, true, false, true, 21, true, false, false, true, 2, 21), - GUINEA_WORM(true, true, true, false, false, 0, true, false, false, false, 0, 0), - LASSA(true, true, true, false, true, 21, true, false, false, true, 3, 21), - MEASLES(true, true, true, false, true, 21, true, true, false, true, 7, 21), - MONKEYPOX(true, true, true, false, true, 21, true, false, false, true, 5, 21), - NEW_INFLUENZA(true, true, true, false, true, 17, true, false, false, false, 0, 0), - PLAGUE(true, true, true, false, true, 7, true, false, false, true, 1, 7), - POLIO(true, true, true, false, true, 60, true, false, false, true, 7, 30), - UNSPECIFIED_VHF(true, true, true, false, true, 21, true, false, false, true, 2, 21), - WEST_NILE_FEVER(true, false, true, false, false, 0, true, false, false, true, 2, 14), - YELLOW_FEVER(true, true, true, false, false, 6, true, false, false, true, 3, 6), - RABIES(true, true, true, false, true, 6, true, false, false, true, 5, 730), - ANTHRAX(true, true, true, false, false, 0, true, false, false, true, 1, 60), - CORONAVIRUS(true, true, true, false, true, 14, true, true, true, true, 1, 14), - PNEUMONIA(true, false, true, true, false, 0, true, false, false, false, 0, 0), - MALARIA(true, true, false, true, false, 0, true, false, false, true, 7, 60), - TYPHOID_FEVER(true, false, false, true, false, 0, true, false, false, false, 0, 0), - ACUTE_VIRAL_HEPATITIS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - NON_NEONATAL_TETANUS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - HIV(true, false, false, true, false, 0, true, false, false, true, 10, 180), - SCHISTOSOMIASIS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - SOIL_TRANSMITTED_HELMINTHS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - TRYPANOSOMIASIS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - DIARRHEA_DEHYDRATION(true, false, false, true, false, 0, true, false, false, false, 0, 0), - DIARRHEA_BLOOD(true, false, false, true, false, 0, true, false, false, false, 0, 0), - SNAKE_BITE(true, false, false, true, false, 0, true, false, false, false, 0, 0), - RUBELLA(true, false, false, true, false, 0, true, false, false, true, 14, 23), - TUBERCULOSIS(false, true, true, true, true, 365, true, false, false, true, 30, 730), - LATENT_TUBERCULOSIS(false, true, true, true, true, 30, true, false, false, false, 0, 0), - LEPROSY(true, false, false, true, false, 0, true, false, false, true, 18, 730), - LYMPHATIC_FILARIASIS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - BURULI_ULCER(true, false, false, true, false, 0, true, false, false, false, 0, 0), - PERTUSSIS(true, false, false, true, true, 0, true, false, false, true, 4, 21), - NEONATAL_TETANUS(true, false, false, true, false, 0, true, false, false, true, 3, 21), - ONCHOCERCIASIS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - DIPHTERIA(true, false, false, true, false, 0, true, false, false, true, 1, 10), - TRACHOMA(true, false, false, true, false, 0, true, false, false, false, 0, 0), - YAWS_ENDEMIC_SYPHILIS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - MATERNAL_DEATHS(true, false, false, true, false, 0, true, false, false, false, 0, 0), - PERINATAL_DEATHS(true, false, false, true, false, 0, true, false, false, true, 1, 4), - INFLUENZA(true, false, false, false, false, 0, true, false, false, true, 1, 4), - INFLUENZA_A(false, true, true, false, false, 0, true, false, false, true, 1, 4), - INFLUENZA_B(false, true, true, false, false, 0, true, false, false, true, 1, 4), - H_METAPNEUMOVIRUS(true, false, true, true, false, 0, true, false, false, false, 0, 0), - RESPIRATORY_SYNCYTIAL_VIRUS(true, false, true, false, false, 0, true, false, false, true, 2, 8), - PARAINFLUENZA_1_4(false, false, true, true, false, 0, true, false, false, false, 0, 0), - ADENOVIRUS(true, false, true, true, false, 0, true, false, false, false, 0, 0), - RHINOVIRUS(true, false, true, true, false, 0, true, false, false, false, 0, 0), - ENTEROVIRUS(true, false, true, true, false, 0, true, false, false, false, 0, 0), - M_PNEUMONIAE(true, false, true, true, false, 0, true, false, false, false, 0, 0), - C_PNEUMONIAE(true, false, true, true, false, 0, true, false, false, false, 0, 0), - ARI(true, false, false, true, false, 0, true, false, false, false, 0, 0), - CHIKUNGUNYA(true, false, false, true, false, 0, true, false, false, true, 2, 14), - POST_IMMUNIZATION_ADVERSE_EVENTS_MILD(true, false, false, true, false, 0, true, false, false, false, 0, 0), - POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE(true, false, false, true, false, 0, true, false, false, false, 0, 0), - FHA(true, false, false, true, false, 0, true, false, false, false, 0, 0), - INVASIVE_PNEUMOCOCCAL_INFECTION(true, true, true, false, false, 0, false, false, false, true, 1, 3), - INVASIVE_MENINGOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false, true, 1, 10), - GIARDIASIS(true, true, true, false, true, 14, false, false, false, true, 7, 21), - CRYPTOSPORIDIOSIS(true, true, true, false, true, 14, false, false, false, true, 2, 12), - SALMONELLOSIS(true, true, true, false, true, 14, false, false, false, true, 1, 3), - OTHER(true, true, true, false, true, 21, false, false, false, false, 0, 0), - UNDEFINED(true, true, true, false, true, 0, false, false, false, false, 0, 0); + AFP(true, true, true, false, true, 60, true, false, false, true, 7, 30, false, 0, 0), + CHOLERA(true, true, true, false, true, 5, true, false, false, true, 0, 5, false, 0, 0), + CONGENITAL_RUBELLA(true, true, true, false, true, 21, true, false, false, false, 0, 0, false, 0, 0), + CSM(true, true, true, false, true, 10, true, false, false, false, 0, 0, false, 0, 0), + DENGUE(true, true, true, false, false, 14, true, false, false, true, 2, 14, false, 0, 0), + EVD(true, true, true, false, true, 21, true, false, false, true, 2, 21, false, 0, 0), + GUINEA_WORM(true, true, true, false, false, 0, true, false, false, false, 0, 0, false, 0, 0), + LASSA(true, true, true, false, true, 21, true, false, false, true, 3, 21, false, 0, 0), + MEASLES(true, true, true, false, true, 21, true, true, false, true, 7, 21, false, 0, 0), + MONKEYPOX(true, true, true, false, true, 21, true, false, false, true, 5, 21, false, 0, 0), + NEW_INFLUENZA(true, true, true, false, true, 17, true, false, false, false, 0, 0, false, 0, 0), + PLAGUE(true, true, true, false, true, 7, true, false, false, true, 1, 7, false, 0, 0), + POLIO(true, true, true, false, true, 60, true, false, false, true, 7, 30, false, 0, 0), + UNSPECIFIED_VHF(true, true, true, false, true, 21, true, false, false, true, 2, 21, false, 0, 0), + WEST_NILE_FEVER(true, false, true, false, false, 0, true, false, false, true, 2, 14, false, 0, 0), + YELLOW_FEVER(true, true, true, false, false, 6, true, false, false, true, 3, 6, false, 0, 0), + RABIES(true, true, true, false, true, 6, true, false, false, true, 5, 730, false, 0, 0), + ANTHRAX(true, true, true, false, false, 0, true, false, false, true, 1, 60, false, 0, 0), + CORONAVIRUS(true, true, true, false, true, 14, true, true, true, true, 1, 14, false, 0, 0), + PNEUMONIA(true, false, true, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + MALARIA(true, true, false, true, false, 0, true, false, false, true, 7, 60, false, 0, 0), + TYPHOID_FEVER(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + ACUTE_VIRAL_HEPATITIS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + NON_NEONATAL_TETANUS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + HIV(true, false, false, true, false, 0, true, false, false, true, 10, 180, false, 0, 0), + SCHISTOSOMIASIS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + SOIL_TRANSMITTED_HELMINTHS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + TRYPANOSOMIASIS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + DIARRHEA_DEHYDRATION(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + DIARRHEA_BLOOD(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + SNAKE_BITE(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + RUBELLA(true, false, false, true, false, 0, true, false, false, true, 14, 23, false, 0, 0), + TUBERCULOSIS(false, true, true, true, true, 365, true, false, false, true, 30, 730, false, 0, 0), + LATENT_TUBERCULOSIS(false, true, true, true, true, 30, true, false, false, false, 0, 0, false, 0, 0), + LEPROSY(true, false, false, true, false, 0, true, false, false, true, 18, 730, false, 0, 0), + LYMPHATIC_FILARIASIS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + BURULI_ULCER(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + PERTUSSIS(true, false, false, true, true, 0, true, false, false, true, 4, 21, false, 0, 0), + NEONATAL_TETANUS(true, false, false, true, false, 0, true, false, false, true, 3, 21, false, 0, 0), + ONCHOCERCIASIS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + DIPHTERIA(true, false, false, true, false, 0, true, false, false, true, 1, 10, false, 0, 0), + TRACHOMA(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + YAWS_ENDEMIC_SYPHILIS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + MATERNAL_DEATHS(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + PERINATAL_DEATHS(true, false, false, true, false, 0, true, false, false, true, 1, 4, false, 0, 0), + INFLUENZA(true, false, false, false, false, 0, true, false, false, true, 1, 4, false, 0, 0), + INFLUENZA_A(false, true, true, false, false, 0, true, false, false, true, 1, 4, false, 0, 0), + INFLUENZA_B(false, true, true, false, false, 0, true, false, false, true, 1, 4, false, 0, 0), + H_METAPNEUMOVIRUS(true, false, true, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + RESPIRATORY_SYNCYTIAL_VIRUS(true, false, true, false, false, 0, true, false, false, true, 2, 8, false, 0, 0), + PARAINFLUENZA_1_4(false, false, true, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + ADENOVIRUS(true, false, true, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + RHINOVIRUS(true, false, true, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + ENTEROVIRUS(true, false, true, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + M_PNEUMONIAE(true, false, true, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + C_PNEUMONIAE(true, false, true, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + ARI(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + CHIKUNGUNYA(true, false, false, true, false, 0, true, false, false, true, 2, 14, false, 0, 0), + POST_IMMUNIZATION_ADVERSE_EVENTS_MILD(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + FHA(true, false, false, true, false, 0, true, false, false, false, 0, 0, false, 0, 0), + INVASIVE_PNEUMOCOCCAL_INFECTION(true, true, true, false, false, 0, false, false, false, true, 1, 3, false, 0, 0), + INVASIVE_MENINGOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false, true, 1, 10, false, 0, 0), + GIARDIASIS(true, true, true, false, true, 14, false, false, false, true, 7, 21, false, 0, 0), + CRYPTOSPORIDIOSIS(true, true, true, false, true, 14, false, false, false, true, 2, 12, false, 0, 0), + SHIGELLOSIS(true, true, true, false, true, 14, false, false, false, true, 0, 7, true, 1, 7), + SALMONELLOSIS(true, true, true, false, true, 14, false, false, false, true, 1, 3, false, 0, 0), + OTHER(true, true, true, false, true, 21, false, false, false, false, 0, 0, false, 0, 0), + UNDEFINED(true, true, true, false, true, 0, false, false, false, false, 0, 0, false, 0, 0); /** * Immutable that eager loads all available diseases. @@ -116,6 +117,9 @@ public enum Disease private final boolean defaultIncubationPeriodEnabled; private final int defaultMinIncubationPeriod; private final int defaultMaxIncubationPeriod; + private final boolean isContagious; + private final int defaultMinContagiousPeriod; + private final int defaultMaxContagiousPeriod; Disease( boolean defaultActive, @@ -129,7 +133,10 @@ public enum Disease boolean defaultExtendedClassificationMulti, boolean defaultIncubationPeriodEnabled, int defaultMinIncubationPeriod, - int defaultMaxIncubationPeriod) { + int defaultMaxIncubationPeriod, + boolean isContagious, + int defaultMinContagiousPeriod, + int defaultMaxContagiousPeriod) { this.defaultActive = defaultActive; this.defaultPrimary = defaultPrimary; @@ -143,6 +150,9 @@ public enum Disease this.defaultIncubationPeriodEnabled = defaultIncubationPeriodEnabled; this.defaultMinIncubationPeriod = defaultMinIncubationPeriod; this.defaultMaxIncubationPeriod = defaultMaxIncubationPeriod; + this.isContagious = isContagious; + this.defaultMinContagiousPeriod = defaultMinContagiousPeriod; + this.defaultMaxContagiousPeriod = defaultMaxContagiousPeriod; } @Override @@ -221,6 +231,18 @@ public int getDefaultMaxIncubationPeriod() { return defaultMaxIncubationPeriod; } + public boolean isContagious() { + return isContagious; + } + + public int getDefaultMinContagiousPeriod() { + return defaultMinContagiousPeriod; + } + + public int getDefaultMaxContagiousPeriod() { + return defaultMaxContagiousPeriod; + } + @Override public int keyCompareTo(StatisticsGroupingKey o) { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/HealthConditionsDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/HealthConditionsDto.java index 10f8e4ae2a0..5fa95cff40a 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/HealthConditionsDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/HealthConditionsDto.java @@ -60,6 +60,10 @@ public class HealthConditionsDto extends PseudonymizableDto { public static final String VACCINATED_AGAINST_MOSQUITO_BORNE_VIRUSES = "vaccinatedAgainstMosquitoBorneViruses"; public static final String MALARIA = "malaria"; public static final String MALARIA_INFECTED_YEAR = "malariaInfectedYear"; + public static final String UNDER_MEDICATION = "underMedication"; + public static final String MEDICATION_DETAILS = "medicationDetails"; + public static final String CHRONIC_DISEASE = "chronicDisease"; + public static final String CHRONIC_DISEASE_DETAILS = "chronicDiseaseDetails"; @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, @@ -68,6 +72,8 @@ public class HealthConditionsDto extends PseudonymizableDto { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) private YesNoUnknown asplenia; @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, @@ -82,6 +88,8 @@ public class HealthConditionsDto extends PseudonymizableDto { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) private YesNoUnknown hivArt; + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) private YesNoUnknown chronicLiverDisease; private YesNoUnknown malignancyChemotherapy; @@ -89,13 +97,23 @@ public class HealthConditionsDto extends PseudonymizableDto { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) private YesNoUnknown chronicHeartFailure; + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) private YesNoUnknown chronicPulmonaryDisease; + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) private YesNoUnknown chronicKidneyDisease; + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) private YesNoUnknown chronicNeurologicCondition; @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) private YesNoUnknown downSyndrome; @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, @@ -181,6 +199,18 @@ public class HealthConditionsDto extends PseudonymizableDto { @Diseases(value = { Disease.MALARIA }) private Integer malariaInfectedYear; + @Diseases(value = { + Disease.SHIGELLOSIS }) + private YesNoUnknown underMedication; + @Diseases(value = { + Disease.SHIGELLOSIS }) + private String medicationDetails; + @Diseases(value = { + Disease.SHIGELLOSIS }) + private YesNoUnknown chronicDisease; + @Diseases(value = { + Disease.SHIGELLOSIS }) + private String chronicDiseaseDetails; public static HealthConditionsDto build() { HealthConditionsDto healthConditions = new HealthConditionsDto(); @@ -475,4 +505,37 @@ public Integer getMalariaInfectedYear() { public void setMalariaInfectedYear(Integer malariaInfectedYear) { this.malariaInfectedYear = malariaInfectedYear; } + + public YesNoUnknown getUnderMedication() { + return underMedication; + } + + public void setUnderMedication(YesNoUnknown underMedication) { + this.underMedication = underMedication; + } + + public String getMedicationDetails() { + return medicationDetails; + } + + public void setMedicationDetails(String medicationDetails) { + this.medicationDetails = medicationDetails; + } + + public YesNoUnknown getChronicDisease() { + return chronicDisease; + } + + public void setChronicDisease(YesNoUnknown chronicDisease) { + this.chronicDisease = chronicDisease; + } + + public String getChronicDiseaseDetails() { + return chronicDiseaseDetails; + } + + public void setChronicDiseaseDetails(String chronicDiseaseDetails) { + this.chronicDiseaseDetails = chronicDiseaseDetails; + } + } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseConfigurationDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseConfigurationDto.java index 42895e4e8e5..f63ae63e3f0 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseConfigurationDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseConfigurationDto.java @@ -26,6 +26,9 @@ public class DiseaseConfigurationDto extends EntityDto { public static final String MAX_INCUBATION_PERIOD = "maxIncubationPeriod"; public static final String MIN_INCUBATION_PERIOD = "minIncubationPeriod"; public static final String CASE_DEFINITION_TEXT = "caseDefinitionText"; + public static final String IS_CONTAGIOUS = "isContagious"; + public static final String MIN_CONTAGIOUS_PERIOD = "minContagiousPeriod"; + public static final String MAX_CONTAGIOUS_PERIOD = "maxContagiousPeriod"; public static final String EXTENDED_CLASSIFICATION = "extendedClassification"; public static final String EXTENDED_CLASSIFICATION_MULTI = "extendedClassificationMulti"; public static final String AGE_GROUPS = "ageGroups"; @@ -45,6 +48,9 @@ public class DiseaseConfigurationDto extends EntityDto { private Integer maxIncubationPeriod; private Integer minIncubationPeriod; private String caseDefinitionText; + private Boolean isContagious; + private Integer minContagiousPeriod; + private Integer maxContagiousPeriod; private Boolean extendedClassification; private Boolean extendedClassificationMulti; private List ageGroups; @@ -195,4 +201,29 @@ public Set getExposureCategories() { public void setExposureCategories(Set exposureCategories) { this.exposureCategories = exposureCategories; } + + public Boolean getIsContagious() { + return isContagious; + } + + public void setIsContagious(Boolean isContagious) { + this.isContagious = isContagious; + } + + public Integer getMinContagiousPeriod() { + return minContagiousPeriod; + } + + public void setMinContagiousPeriod(Integer minContagiousPeriod) { + this.minContagiousPeriod = minContagiousPeriod; + } + + public Integer getMaxContagiousPeriod() { + return maxContagiousPeriod; + } + + public void setMaxContagiousPeriod(Integer maxContagiousPeriod) { + this.maxContagiousPeriod = maxContagiousPeriod; + } + } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseConfigurationIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseConfigurationIndexDto.java index c92562c682e..46e9d3ce1f1 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseConfigurationIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseConfigurationIndexDto.java @@ -44,6 +44,9 @@ public class DiseaseConfigurationIndexDto extends EntityDto { public static final String AGE_GROUPS = "ageGroups"; public static final String AUTOMATIC_SAMPLE_ASSIGNMENT_THRESHOLD = "automaticSampleAssignmentThreshold"; public static final String EXPOSURE_CATEGORY_NAMES = "exposureCategoryNames"; + public static final String IS_CONTAGIOUS = "isContagious"; + public static final String MIN_CONTAGIOUS_PERIOD = "minContagiousPeriod"; + public static final String MAX_CONTAGIOUS_PERIOD = "maxContagiousPeriod"; private Disease disease; private Boolean active; @@ -58,6 +61,9 @@ public class DiseaseConfigurationIndexDto extends EntityDto { private Integer maxIncubationPeriod; private Integer minIncubationPeriod; private String caseDefinitionText; + private Boolean isContagious; + private Integer minContagiousPeriod; + private Integer maxContagiousPeriod; private Boolean extendedClassification; private Boolean extendedClassificationMulti; private List ageGroups; @@ -207,4 +213,29 @@ public String getExposureCategoryNames() { public void setExposureCategoryNames(String exposureCategoryNames) { this.exposureCategoryNames = exposureCategoryNames; } + + public Boolean getIsContagious() { + return isContagious; + } + + public void setIsContagious(Boolean isContagious) { + this.isContagious = isContagious; + } + + public Integer getMinContagiousPeriod() { + return minContagiousPeriod; + } + + public void setMinContagiousPeriod(Integer minContagiousPeriod) { + this.minContagiousPeriod = minContagiousPeriod; + } + + public Integer getMaxContagiousPeriod() { + return maxContagiousPeriod; + } + + public void setMaxContagiousPeriod(Integer maxContagiousPeriod) { + this.maxContagiousPeriod = maxContagiousPeriod; + } + } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java index 5f9671cd347..76c8dd3022d 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java @@ -74,10 +74,6 @@ public class EpiDataDto extends PseudonymizableDto { public static final String HEALTHCARE_PROFESSIONAL = "healthcareProfessional"; public static final String PLACE_OF_INFECTION = "placeOfInfection"; public static final String RESIDENCE_AT_ONSET = "residenceAtOnset"; - public static final String EXPOSURE_INVESTIGATION_FROM_DATE = "exposureInvestigationFromDate"; - public static final String EXPOSURE_INVESTIGATION_TO_DATE = "exposureInvestigationToDate"; - public static final String ACTIVITY_AS_CASE_FROM_DATE = "activityAsCaseFromDate"; - public static final String ACTIVITY_AS_CASE_TO_DATE = "activityAsCaseToDate"; private YesNoUnknown exposureDetailsKnown; private YesNoUnknown activityAsCaseDetailsKnown; @@ -90,7 +86,8 @@ public class EpiDataDto extends PseudonymizableDto { @Diseases({ Disease.GIARDIASIS, - Disease.SALMONELLOSIS }) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }) private YesNoUnknown importedCase; @HideForCountriesExcept(countries = { @@ -124,28 +121,33 @@ public class EpiDataDto extends PseudonymizableDto { @Diseases({ Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, - Disease.MALARIA }) + Disease.MALARIA, + Disease.SHIGELLOSIS }) private ModeOfTransmission modeOfTransmission; @Diseases({ Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, - Disease.MALARIA }) + Disease.MALARIA, + Disease.SHIGELLOSIS }) @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String modeOfTransmissionType; @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) private InfectionSource infectionSource; @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) private String infectionSourceText; @Diseases({ Disease.GIARDIASIS, - Disease.SALMONELLOSIS }) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }) private CountryReferenceDto country; @Valid @@ -179,27 +181,6 @@ public class EpiDataDto extends PseudonymizableDto { @Size(max = 255, message = Validations.textTooLong) private String residenceAtOnset; - @Diseases({ - Disease.SALMONELLOSIS }) - @HideForCountriesExcept(countries = { - CountryHelper.COUNTRY_CODE_LUXEMBOURG }) - private Date exposureInvestigationFromDate; - @Diseases({ - Disease.SALMONELLOSIS }) - @HideForCountriesExcept(countries = { - CountryHelper.COUNTRY_CODE_LUXEMBOURG }) - private Date exposureInvestigationToDate; - @Diseases({ - Disease.SALMONELLOSIS }) - @HideForCountriesExcept(countries = { - CountryHelper.COUNTRY_CODE_LUXEMBOURG }) - private Date activityAsCaseFromDate; - @Diseases({ - Disease.SALMONELLOSIS }) - @HideForCountriesExcept(countries = { - CountryHelper.COUNTRY_CODE_LUXEMBOURG }) - private Date activityAsCaseToDate; - public YesNoUnknown getExposureDetailsKnown() { return exposureDetailsKnown; } @@ -393,50 +374,6 @@ public void setResidenceAtOnset(String residenceAtOnset) { this.residenceAtOnset = residenceAtOnset; } - public Date getExposureInvestigationFromDate() { - return exposureInvestigationFromDate; - } - - public void setExposureInvestigationFromDate(Date exposureInvestigationFromDate) { - validateDateRange( - exposureInvestigationFromDate, - this.exposureInvestigationToDate, - "exposureInvestigationFromDate", - "exposureInvestigationToDate"); - this.exposureInvestigationFromDate = exposureInvestigationFromDate; - } - - public Date getExposureInvestigationToDate() { - return exposureInvestigationToDate; - } - - public void setExposureInvestigationToDate(Date exposureInvestigationToDate) { - validateDateRange( - this.exposureInvestigationFromDate, - exposureInvestigationToDate, - "exposureInvestigationFromDate", - "exposureInvestigationToDate"); - this.exposureInvestigationToDate = exposureInvestigationToDate; - } - - public Date getActivityAsCaseFromDate() { - return activityAsCaseFromDate; - } - - public void setActivityAsCaseFromDate(Date activityAsCaseFromDate) { - validateDateRange(activityAsCaseFromDate, this.activityAsCaseToDate, "activityAsCaseFromDate", "activityAsCaseToDate"); - this.activityAsCaseFromDate = activityAsCaseFromDate; - } - - public Date getActivityAsCaseToDate() { - return activityAsCaseToDate; - } - - public void setActivityAsCaseToDate(Date activityAsCaseToDate) { - validateDateRange(this.activityAsCaseFromDate, activityAsCaseToDate, "activityAsCaseFromDate", "activityAsCaseToDate"); - this.activityAsCaseToDate = activityAsCaseToDate; - } - private static void validateDateRange(Date from, Date to, String fromName, String toName) { if (from != null && to != null && from.after(to)) { throw new IllegalArgumentException(fromName + " must be before or equal to " + toName); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java index 95fee8269b4..6e08b58c79b 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java @@ -20,7 +20,6 @@ import java.util.Set; import javax.validation.Valid; -import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import de.symeda.sormas.api.CountryHelper; @@ -152,7 +151,7 @@ public class ExposureDto extends PseudonymizableDto { @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String description; - @NotNull(message = Validations.requiredField) +// @NotNull(message = Validations.requiredField) private ExposureType exposureType; @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/InfectionSource.java b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/InfectionSource.java index e6799b7547e..f25d997e814 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/InfectionSource.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/InfectionSource.java @@ -14,12 +14,135 @@ */ package de.symeda.sormas.api.exposure; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.utils.Diseases; public enum InfectionSource { + @Diseases({ + Disease.GIARDIASIS, + Disease.CRYPTOSPORIDIOSIS }) FOOD, + @Diseases({ + Disease.GIARDIASIS, + Disease.CRYPTOSPORIDIOSIS }) ANIMAL, + + @Diseases({ + Disease.SHIGELLOSIS }) + BAKERY_PRODUCTS, // Bakery products + @Diseases({ + Disease.SHIGELLOSIS }) + BATS_CONTACT, //Contact with bat(s) + @Diseases({ + Disease.SHIGELLOSIS }) + BOVINE_MEAT_PRODUCTS, // Bovine meat and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + BROILER_MEAT_PRODUCTS, // Broiler meat (Gallus gallus) and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + CANNED_FOOD_PRODUCTS, // Canned food products + @Diseases({ + Disease.SHIGELLOSIS }) + CATS_CONTACT, // Contact with cat(s) + @Diseases({ + Disease.SHIGELLOSIS }) + CEREAL_PRODUCTS, // Cereal products including rice and seeds/pulses (nuts, almonds) + @Diseases({ + Disease.SHIGELLOSIS }) + CHEESE, // Cheese + @Diseases({ + Disease.SHIGELLOSIS }) + NON_CHEESES_DAIRY_PRODUCTS, // Dairy products (other than cheeses) + @Diseases({ + Disease.SHIGELLOSIS }) + DOGS_CONTACT, // Contact with dog(s) + @Diseases({ + Disease.SHIGELLOSIS }) + DRINKS_BOTTLED_WATER, // Drinks, including bottled water + @Diseases({ + Disease.SHIGELLOSIS }) + EGG_PRODUCTS, // Egg_products + @Diseases({ + Disease.SHIGELLOSIS }) + EXOTIC_PET_CONTACT, // Contact with exotic pet(s) + @Diseases({ + Disease.SHIGELLOSIS }) + FARM_ANIMAL_CONTACT, // Contact with farm animal(s) + @Diseases({ + Disease.SHIGELLOSIS }) + FISH_PRODUCTS, // Fish and fish products + @Diseases({ + Disease.SHIGELLOSIS }) + FOX_CONTACT, // Contact with fox(es) + @Diseases({ + Disease.SHIGELLOSIS }) + FRUITS_AND_JUICES, // Fruit, berries and juices and other products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + GAME_MEAT_NOT_WILD_BOAR, // Meat from game and products thereof except wild boar + @Diseases({ + Disease.SHIGELLOSIS }) + HERBS_AND_SPICES, // Herbs and spices + @Diseases({ + Disease.SHIGELLOSIS }) + MILK, // Milk + @Diseases({ + Disease.SHIGELLOSIS }) + BUFFET_MEALS, // Mixed or buffet meals + @Diseases({ + Disease.SHIGELLOSIS }) + MIXED_MEAT_PRODUCTS, // Mixed meat and products thereof + + // Not applicable + @Diseases({ + Disease.SHIGELLOSIS }) + OTHER_FOODS, // Other foods + @Diseases({ + Disease.SHIGELLOSIS }) + OTHER_MEAT_PRODUCTS, // Meat from other animals and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + OTHER_PET_CONTACT, // Contact with other pet(s) + @Diseases({ + Disease.SHIGELLOSIS }) + UNSPECIFIED_POULTRY, // Other or unspecified poultry meat and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + OTHER_WILD_ANIMAL_CONTACT, // Contact with other wild animal(s) + @Diseases({ + Disease.SHIGELLOSIS }) + PORK_PRODUCTS, // Pig meat and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + SHEEP_MEAT_PRODUCTS, // Sheep meat and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + SHELLFISH_PRODUCTS, // Crustaceans, shellfish, molluscs and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + Sprouts, // Sprouts + @Diseases({ + Disease.SHIGELLOSIS }) + confectionery, // Sweets and chocolate + @Diseases({ + Disease.SHIGELLOSIS }) + TAP_AND_WELL_WATER, // Tap water including well-water + @Diseases({ + Disease.SHIGELLOSIS }) + TURKEY_MEAT_PRODUCTS, // Turkey meat and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + JUICE_AND_VEGETABLE_PRODUCTS, // Vegetables and juices and other products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + WILD_BOAR_MEAT_PRODUCTS, // Meat from wild boar and products thereof + @Diseases({ + Disease.SHIGELLOSIS }) + UNKNOWN, + NOT_APPLICABLE, OTHER; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ModeOfTransmission.java b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ModeOfTransmission.java index 5e0245df8c7..7634461bb3c 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ModeOfTransmission.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ModeOfTransmission.java @@ -22,27 +22,34 @@ public enum ModeOfTransmission { @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) ANIMAL_TO_HUMAN, @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) FOOD_OR_WATER, @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) PERSON_TO_PERSON, @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) RECREATIONAL_WATER, @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS, + Disease.SHIGELLOSIS }) HEALTHCARE_ASSOCIATED, @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) INJECTING_DRUG_USERS, @Diseases({ Disease.GIARDIASIS, @@ -54,15 +61,18 @@ public enum ModeOfTransmission { MOTHER_TO_CHILD, @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) SEXUAL, @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) TRANSFUSION_RECIPIENT, @Diseases({ Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }) ORGAN_RECIPIENT, @Diseases(value = { @@ -81,10 +91,12 @@ public enum ModeOfTransmission { Disease.MALARIA }) MOSQUITOES_WITHOUT_EVIDENCE, @Diseases(value = { - Disease.MALARIA }) + Disease.MALARIA, + Disease.SHIGELLOSIS }) FROM_MOTHER_TO_CHILD, @Diseases(value = { - Disease.MALARIA }) + Disease.MALARIA, + Disease.SHIGELLOSIS }) BY_LAB, @Diseases(value = { Disease.MALARIA }) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java index d94fc82526b..be29f9f887f 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java @@ -1477,7 +1477,10 @@ public interface Captions { String DiseaseConfiguration_followUpDuration = "DiseaseConfiguration.followUpDuration"; String DiseaseConfiguration_followUpEnabled = "DiseaseConfiguration.followUpEnabled"; String DiseaseConfiguration_incubationPeriodEnabled = "DiseaseConfiguration.incubationPeriodEnabled"; + String DiseaseConfiguration_isContagious = "DiseaseConfiguration.isContagious"; + String DiseaseConfiguration_maxContagiousPeriod = "DiseaseConfiguration.maxContagiousPeriod"; String DiseaseConfiguration_maxIncubationPeriod = "DiseaseConfiguration.maxIncubationPeriod"; + String DiseaseConfiguration_minContagiousPeriod = "DiseaseConfiguration.minContagiousPeriod"; String DiseaseConfiguration_minIncubationPeriod = "DiseaseConfiguration.minIncubationPeriod"; String DiseaseConfiguration_primaryDisease = "DiseaseConfiguration.primaryDisease"; String diseaseConfigurationReportingTypeFilter = "diseaseConfigurationReportingTypeFilter"; @@ -2089,6 +2092,8 @@ public interface Captions { String HealthConditions_asplenia = "HealthConditions.asplenia"; String HealthConditions_asthma = "HealthConditions.asthma"; String HealthConditions_cardiovascularDiseaseIncludingHypertension = "HealthConditions.cardiovascularDiseaseIncludingHypertension"; + String HealthConditions_chronicDisease = "HealthConditions.chronicDisease"; + String HealthConditions_chronicDiseaseDetails = "HealthConditions.chronicDiseaseDetails"; String HealthConditions_chronicHeartFailure = "HealthConditions.chronicHeartFailure"; String HealthConditions_chronicKidneyDisease = "HealthConditions.chronicKidneyDisease"; String HealthConditions_chronicLiverDisease = "HealthConditions.chronicLiverDisease"; @@ -2112,6 +2117,7 @@ public interface Captions { String HealthConditions_malaria = "HealthConditions.malaria"; String HealthConditions_malariaInfectedYear = "HealthConditions.malariaInfectedYear"; String HealthConditions_malignancyChemotherapy = "HealthConditions.malignancyChemotherapy"; + String HealthConditions_medicationDetails = "HealthConditions.medicationDetails"; String HealthConditions_obesity = "HealthConditions.obesity"; String HealthConditions_otherConditions = "HealthConditions.otherConditions"; String HealthConditions_previousTuberculosisTreatment = "HealthConditions.previousTuberculosisTreatment"; @@ -2119,6 +2125,7 @@ public interface Captions { String HealthConditions_sickleCellDisease = "HealthConditions.sickleCellDisease"; String HealthConditions_tuberculosis = "HealthConditions.tuberculosis"; String HealthConditions_tuberculosisInfectionYear = "HealthConditions.tuberculosisInfectionYear"; + String HealthConditions_underMedication = "HealthConditions.underMedication"; String HealthConditions_vaccinatedAgainstMosquitoBorneViruses = "HealthConditions.vaccinatedAgainstMosquitoBorneViruses"; String humanSampleViewType = "humanSampleViewType"; String Immunization = "Immunization"; @@ -3023,6 +3030,7 @@ public interface Captions { String Symptoms_bloodPressureSystolic = "Symptoms.bloodPressureSystolic"; String Symptoms_bloodUrine = "Symptoms.bloodUrine"; String Symptoms_bloodyBlackStool = "Symptoms.bloodyBlackStool"; + String Symptoms_bloodyDiarrhea = "Symptoms.bloodyDiarrhea"; String Symptoms_blueLips = "Symptoms.blueLips"; String Symptoms_breathlessness = "Symptoms.breathlessness"; String Symptoms_buboesGroinArmpitNeck = "Symptoms.buboesGroinArmpitNeck"; @@ -3093,6 +3101,7 @@ public interface Captions { String Symptoms_glasgowComaScale = "Symptoms.glasgowComaScale"; String Symptoms_guillainBarreSyndrome = "Symptoms.guillainBarreSyndrome"; String Symptoms_gumsBleeding = "Symptoms.gumsBleeding"; + String Symptoms_haemolyticuremicsyndrome = "Symptoms.haemolyticuremicsyndrome"; String Symptoms_headache = "Symptoms.headache"; String Symptoms_hearingloss = "Symptoms.hearingloss"; String Symptoms_heartRate = "Symptoms.heartRate"; @@ -3239,6 +3248,7 @@ public interface Captions { String Symptoms_syndromicFlu = "Symptoms.syndromicFlu"; String Symptoms_temperature = "Symptoms.temperature"; String Symptoms_temperatureSource = "Symptoms.temperatureSource"; + String Symptoms_tenesmus = "Symptoms.tenesmus"; String Symptoms_throbocytopenia = "Symptoms.throbocytopenia"; String Symptoms_timeOffWorkDays = "Symptoms.timeOffWorkDays"; String Symptoms_timeOffWorkDays_giardiasis = "Symptoms.timeOffWorkDays.giardiasis"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java index bb5203a8413..bfa330e5bac 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java @@ -913,6 +913,7 @@ public interface Strings { String headingTemplateNotAvailable = "headingTemplateNotAvailable"; String headingTests = "headingTests"; String headingTransferCase = "headingTransferCase"; + String headingTransmissibilityPeriod = "headingTransmissibilityPeriod"; String headingTravelEntriesDeleted = "headingTravelEntriesDeleted"; String headingTravelEntriesNotDeleted = "headingTravelEntriesNotDeleted"; String headingTravelEntriesNotRestored = "headingTravelEntriesNotRestored"; @@ -1951,6 +1952,7 @@ public interface Strings { String promptUserSearch = "promptUserSearch"; String promptZoneDiameter = "promptZoneDiameter"; String promtSampleDataType = "promtSampleDataType"; + String prophylaxisStatus = "prophylaxisStatus"; String pseudonymizedCasesSelectedWarning = "pseudonymizedCasesSelectedWarning"; String pseudonymizedEntitiesSelectedWarning = "pseudonymizedEntitiesSelectedWarning"; String quarantineEnd = "quarantineEnd"; @@ -1966,6 +1968,8 @@ public interface Strings { String text = "text"; String toCase = "toCase"; String total = "total"; + String transmissionEndDate = "transmissionEndDate"; + String transmissionStartDate = "transmissionStartDate"; String unexpectedErrorSormasToSormasAccept = "unexpectedErrorSormasToSormasAccept"; String unsavedChanges_cancel = "unsavedChanges.cancel"; String unsavedChanges_discard = "unsavedChanges.discard"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java index ab15d4170ef..0b12184404a 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java @@ -424,7 +424,8 @@ public class PersonDto extends PseudonymizableDto implements IsPerson { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }) + Disease.DENGUE, + Disease.SHIGELLOSIS }) private Date entryDate; @HideForCountriesExcept(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) @@ -437,7 +438,8 @@ public class PersonDto extends PseudonymizableDto implements IsPerson { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }) + Disease.DENGUE, + Disease.SHIGELLOSIS }) private LivingStatus livingStatus; @SensitiveData @Diseases(value = { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java index ed6bdced87f..3a03147f9bb 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java @@ -168,34 +168,35 @@ public enum PathogenSpecie { PathogenTestType.OTHER_MOLECULAR_ASSAY, PathogenTestType.OTHER_SEROLOGICAL_TEST }) COINFECTION, - @Diseases({ - Disease.MALARIA }) - @ApplicableToPathogenTests(value = { - PathogenTestType.THIN_BLOOD_SMEAR, - PathogenTestType.RAPID_TEST, - PathogenTestType.OTHER_ANTIGEN_DETECTION_TEST, - PathogenTestType.ENZYME_LINKED_IMMUNOSORBENT_ASSAY, - PathogenTestType.PCR_RT_PCR, - PathogenTestType.Q_PCR, - PathogenTestType.LAMP, - PathogenTestType.OTHER_MOLECULAR_ASSAY, - PathogenTestType.OTHER_SEROLOGICAL_TEST }) + + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + BOYDII, + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + DYSENTERIAE, + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + FLEXNERI, + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + SONNEI, + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + SHIGELLA_SPP, + OTHER, - @Diseases({ - Disease.TUBERCULOSIS, - Disease.LATENT_TUBERCULOSIS, - Disease.MALARIA }) - @ApplicableToPathogenTests(value = { - PathogenTestType.SPOLIGOTYPING, - PathogenTestType.THIN_BLOOD_SMEAR, - PathogenTestType.RAPID_TEST, - PathogenTestType.OTHER_ANTIGEN_DETECTION_TEST, - PathogenTestType.ENZYME_LINKED_IMMUNOSORBENT_ASSAY, - PathogenTestType.PCR_RT_PCR, - PathogenTestType.Q_PCR, - PathogenTestType.LAMP, - PathogenTestType.OTHER_MOLECULAR_ASSAY, - PathogenTestType.OTHER_SEROLOGICAL_TEST }) + UNKNOWN, @Diseases({ Disease.TUBERCULOSIS, diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java index 41866c0b7b4..94703b2136b 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java @@ -239,12 +239,14 @@ public class PathogenTestDto extends PseudonymizableDto { @SensitiveData @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_LUXEMBOURG) @Diseases(value = { - Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) private String seroTypingMethodText; @SensitiveData @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_LUXEMBOURG) @Diseases(value = { - Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) private SerotypingMethod seroTypingMethod; @SensitiveData diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java index 63d2c462b89..26f8c1970c9 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java @@ -37,7 +37,8 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.SEROLOGICAL_TESTS) @NotSelectableForNewTests ANTIBODY_DETECTION, @@ -69,7 +70,8 @@ public enum PathogenTestType { Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, - Disease.MALARIA }, hide = true) + Disease.MALARIA, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.SEROLOGICAL_TESTS) @NotSelectableForNewTests IGM_SERUM_ANTIBODY, @@ -80,7 +82,8 @@ public enum PathogenTestType { Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, - Disease.MALARIA }, hide = true) + Disease.MALARIA, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.SEROLOGICAL_TESTS) @NotSelectableForNewTests IGG_SERUM_ANTIBODY, @@ -94,7 +97,8 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.SEROLOGICAL_TESTS) @NotSelectableForNewTests IGA_SERUM_ANTIBODY, @@ -109,7 +113,8 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @NotSelectableForNewTests INCUBATION_TIME, @@ -119,7 +124,8 @@ public enum PathogenTestType { Disease.MEASLES, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.MICROSCOPY_AND_STAINING) @NotSelectableForNewTests MICROSCOPY, @@ -133,7 +139,8 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.ANTIGEN_DETECTION) @NotSelectableForNewTests LATEX_AGGLUTINATION, @@ -147,7 +154,8 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @NotSelectableForNewTests CQ_VALUE_DETECTION, @@ -219,7 +227,8 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.MOLECULAR_ASSAYS) TMA, @@ -235,7 +244,8 @@ public enum PathogenTestType { @Diseases(value = { Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, - Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) @PathogenTestCategoryRel(PathogenTestCategory.MOLECULAR_ASSAYS) WHOLE_GENOME_SEQUENCING, @@ -248,12 +258,14 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.MOLECULAR_ASSAYS) DNA_MICROARRAY, @Diseases(value = { - Disease.DENGUE }) + Disease.DENGUE, + Disease.SHIGELLOSIS }) @PathogenTestCategoryRel(PathogenTestCategory.MOLECULAR_ASSAYS) NAAT, @@ -290,7 +302,8 @@ public enum PathogenTestType { @Diseases(value = { Disease.INVASIVE_MENINGOCOCCAL_INFECTION, - Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) @PathogenTestCategoryRel(PathogenTestCategory.MOLECULAR_ASSAYS) SEROGROUPING, @@ -338,7 +351,8 @@ public enum PathogenTestType { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.SEROLOGICAL_TESTS) NEUTRALIZING_ANTIBODIES, @@ -384,7 +398,8 @@ public enum PathogenTestType { @Diseases(value = { Disease.INVASIVE_MENINGOCOCCAL_INFECTION, - Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) @PathogenTestCategoryRel(PathogenTestCategory.ANTIGEN_DETECTION) SLIDE_AGGLUTINATION, @@ -425,7 +440,8 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.MICROSCOPY_AND_STAINING) GRAM_STAIN, @@ -447,7 +463,8 @@ public enum PathogenTestType { Disease.CRYPTOSPORIDIOSIS, Disease.DENGUE, Disease.MALARIA, - Disease.SALMONELLOSIS }, hide = true) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }, hide = true) @PathogenTestCategoryRel(PathogenTestCategory.MICROSCOPY_AND_STAINING) HISTOPATHOLOGY, @@ -481,7 +498,8 @@ public enum PathogenTestType { Disease.TUBERCULOSIS, Disease.LATENT_TUBERCULOSIS, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, - Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) @PathogenTestCategoryRel(PathogenTestCategory.ANTIMICROBIAL_SUSCEPTIBILITY_TESTING) ANTIBIOTIC_SUSCEPTIBILITY, diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java index 28c7e59a305..2be6cbf09d6 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java @@ -45,14 +45,16 @@ public enum SampleMaterial { Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }, hide = true) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }, hide = true) DRY_BLOOD, @Diseases(value = { Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }, hide = true) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }, hide = true) SERA, @Diseases(value = { @@ -72,7 +74,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @Deprecated THROAT_ASPIRATE, @@ -84,7 +87,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @Deprecated NASAL_SWAB, @@ -95,7 +99,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @Deprecated THROAT_SWAB, @@ -105,7 +110,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) NP_SWAB, @Diseases(value = { @@ -117,7 +123,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) RECTAL_SWAB, @Diseases(value = { @@ -137,7 +144,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) CRUST, @Diseases(value = { @@ -147,7 +155,8 @@ public enum SampleMaterial { Disease.MEASLES, Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, - Disease.MALARIA }, hide = true) + Disease.MALARIA, + Disease.SHIGELLOSIS }, hide = true) TISSUE, @Diseases(value = { @@ -168,7 +177,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @Deprecated CORNEA_PM, @@ -178,7 +188,8 @@ public enum SampleMaterial { Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, - Disease.MALARIA }, hide = true) + Disease.MALARIA, + Disease.SHIGELLOSIS }, hide = true) SALIVA, @Diseases(value = { @@ -190,7 +201,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @Deprecated URINE_PM, @@ -203,7 +215,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) NUCHAL_SKIN_BIOPSY, @@ -222,7 +235,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) SPUTUM, @Diseases(value = { @@ -233,7 +247,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) ENDOTRACHEAL_ASPIRATE, @@ -245,7 +260,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) BRONCHOALVEOLAR_LAVAGE, @Diseases(value = { @@ -257,7 +273,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) BRAIN_TISSUE, @@ -270,7 +287,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) ANTERIOR_NARES_SWAB, @@ -283,7 +301,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) OP_ASPIRATE, @@ -294,7 +313,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) NP_ASPIRATE, @@ -306,7 +326,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) PLEURAL_FLUID, @Diseases(value = { @@ -321,7 +342,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) OROPHARYNGEAL_SWAB, @Diseases(value = { @@ -330,7 +352,8 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) AMNIOTIC_FLUID, @@ -358,13 +381,15 @@ public enum SampleMaterial { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE }, hide = true) + Disease.DENGUE, + Disease.SHIGELLOSIS }, hide = true) SYNOVIAL_FLUID, @Diseases(value = { Disease.RESPIRATORY_SYNCYTIAL_VIRUS, Disease.GIARDIASIS, - Disease.CRYPTOSPORIDIOSIS }, hide = true) + Disease.CRYPTOSPORIDIOSIS, + Disease.SHIGELLOSIS }, hide = true) EDTA_WHOLE_BLOOD, @Diseases(value = { @@ -409,7 +434,8 @@ public enum SampleMaterial { LOWER_RESPIRATORY_TRACT, @Diseases({ - Disease.SALMONELLOSIS }) + Disease.SALMONELLOSIS, + Disease.SHIGELLOSIS }) PUS, @Diseases({ @@ -433,8 +459,12 @@ public enum SampleMaterial { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) ABSCESS_SWAB, + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) BONE, + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) BONE_MARROW, @HideForCountries(countries = { @@ -461,6 +491,8 @@ public enum SampleMaterial { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) CORD_BLOOD, + @Diseases(value = { + Disease.SHIGELLOSIS }, hide = true) LUNG_TISSUE, @HideForCountries(countries = { @@ -548,16 +580,7 @@ public enum SampleMaterial { * with the {@code @Deprecated} constants above. */ private static final Set DEPRECATED_MATERIALS = Collections.unmodifiableSet( - EnumSet.of( - URINE_PM, - CORNEA_PM, - NASAL_SWAB, - NASOPHARYNGEAL_LAVAGE, - THROAT_SWAB, - THROAT_ASPIRATE, - SOFT_TISSUE, - BONE_AND_JOINT, - OTHER)); + EnumSet.of(URINE_PM, CORNEA_PM, NASAL_SWAB, NASOPHARYNGEAL_LAVAGE, THROAT_SWAB, THROAT_ASPIRATE, SOFT_TISSUE, BONE_AND_JOINT, OTHER)); /** * @return SNOMED-CT code for this sample material, or {@code null} if no canonical code is mapped. diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java index c508c743c26..c5ac14439ff 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java @@ -18,19 +18,71 @@ package de.symeda.sormas.api.sample; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.utils.ApplicableToPathogenTests; +import de.symeda.sormas.api.utils.Diseases; public enum SerotypingMethod { - MULTIPLEX_PCR, - QUELLUNG_REACTION, - COAGGLUTINATION, - GEL_DIFFUSION, - PNEUMOTEST, - SLIDE_AGGLUTINATION, - OTHER; - @Override - public String toString() { - return I18nProperties.getEnumCaption(this); - } + @Diseases(value = { + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + MULTIPLEX_PCR, + @Diseases(value = { + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + QUELLUNG_REACTION, + @Diseases(value = { + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + COAGGLUTINATION, + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + AGGLUTINATION, + @Diseases(value = { + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + GEL_DIFFUSION, + @Diseases(value = { + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + PNEUMOTEST, + @Diseases(value = { + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING }) + SLIDE_AGGLUTINATION, + @Diseases(value = { + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING, + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + DISK_DIFFUSION, + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + MIC_DETERMINATION, + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SEROGROUPING, + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + WGS_PREDICTION, + OTHER; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java index 2155bed91a8..4c966a14c14 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java @@ -76,6 +76,7 @@ import static de.symeda.sormas.api.Disease.RUBELLA; import static de.symeda.sormas.api.Disease.SALMONELLOSIS; import static de.symeda.sormas.api.Disease.SCHISTOSOMIASIS; +import static de.symeda.sormas.api.Disease.SHIGELLOSIS; import static de.symeda.sormas.api.Disease.SNAKE_BITE; import static de.symeda.sormas.api.Disease.SOIL_TRANSMITTED_HELMINTHS; import static de.symeda.sormas.api.Disease.TRACHOMA; @@ -385,6 +386,9 @@ public class SymptomsDto extends PseudonymizableDto { public static final String OTHER_NEUROLOCAL_SYMPTOM = "otherNeurolocalSymptom"; public static final String OTHER_NEUROLOCAL_SYMPTOM_TEXT = "otherNeurolocalSymptomText"; public static final String FATAL_RISK = "fatalRisk"; + public static final String TENESMUS = "tenesmus"; + public static final String BLOODY_DIARRHEA = "bloodyDiarrhea"; + public static final String HAEMOLYTIC_UREMIC_SYNDROME = "haemolyticuremicsyndrome"; // Fields are declared in the order they should appear in the import template @@ -413,6 +417,7 @@ public static SymptomsDto build() { SALMONELLOSIS, UNDEFINED, DENGUE, + SHIGELLOSIS, OTHER }) @HideForCountries @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) @@ -699,10 +704,13 @@ public static SymptomsDto build() { GIARDIASIS, CRYPTOSPORIDIOSIS, SALMONELLOSIS, + SHIGELLOSIS, UNDEFINED, OTHER }) @HideForCountries @SymptomGrouping(SymptomGroup.GENERAL) + @Complication({ + SHIGELLOSIS, }) private SymptomState dehydration; @Diseases({ @@ -723,6 +731,7 @@ public static SymptomsDto build() { CRYPTOSPORIDIOSIS, MALARIA, SALMONELLOSIS, + SHIGELLOSIS, UNDEFINED, OTHER }) @Complication({ @@ -855,6 +864,7 @@ public static SymptomsDto build() { MALARIA, SALMONELLOSIS, DENGUE, + SHIGELLOSIS, OTHER }) @Outbreaks @SymptomGrouping(SymptomGroup.GENERAL) @@ -1462,7 +1472,8 @@ public static SymptomsDto build() { INVASIVE_PNEUMOCOCCAL_INFECTION, PERTUSSIS, GIARDIASIS, - CRYPTOSPORIDIOSIS }) + CRYPTOSPORIDIOSIS, + SHIGELLOSIS }) @HideForCountries @Outbreaks private Date onsetDate; @@ -1527,7 +1538,8 @@ public static SymptomsDto build() { INVASIVE_MENINGOCOCCAL_INFECTION, INVASIVE_PNEUMOCOCCAL_INFECTION, FHA, - PERTUSSIS }) + PERTUSSIS, + SHIGELLOSIS }) @HideForCountries @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String onsetSymptom; @@ -1922,6 +1934,7 @@ public static SymptomsDto build() { GIARDIASIS, CRYPTOSPORIDIOSIS, MALARIA, + SHIGELLOSIS, UNDEFINED, OTHER }) @SensitiveData @@ -2633,11 +2646,14 @@ public static SymptomsDto build() { RABIES, CORONAVIRUS, MALARIA, + SHIGELLOSIS, UNDEFINED, OTHER }) @Outbreaks @HideForCountries @SymptomGrouping(SymptomGroup.NERVOUS_SYSTEM) + @Complication({ + SHIGELLOSIS }) private SymptomState seizures; @Diseases({ @@ -2650,11 +2666,14 @@ public static SymptomsDto build() { CHOLERA, MEASLES, POLIO, + SHIGELLOSIS, UNSPECIFIED_VHF, UNDEFINED, OTHER }) @Outbreaks - + @Complication({ + SHIGELLOSIS }) + @SymptomGrouping(SymptomGroup.GENERAL) @HideForCountries private SymptomState sepsis; @@ -2795,7 +2814,8 @@ public static SymptomsDto build() { CRYPTOSPORIDIOSIS, RESPIRATORY_SYNCYTIAL_VIRUS, MALARIA, - DENGUE }) + DENGUE, + SHIGELLOSIS }) private SymptomState asymptomatic; @Diseases({ INVASIVE_MENINGOCOCCAL_INFECTION }) @@ -2824,7 +2844,8 @@ public static SymptomsDto build() { GIARDIASIS, CRYPTOSPORIDIOSIS, MALARIA, - DENGUE }) + DENGUE, + SHIGELLOSIS }) @SymptomGrouping(SymptomGroup.OTHER) private SymptomState otherClinicalPresentation; @@ -2835,7 +2856,8 @@ public static SymptomsDto build() { GIARDIASIS, CRYPTOSPORIDIOSIS, MALARIA, - DENGUE }) + DENGUE, + SHIGELLOSIS }) @SymptomGrouping(SymptomGroup.OTHER) private String otherClinicalPresentationText; @@ -2906,7 +2928,8 @@ public static SymptomsDto build() { GIARDIASIS, CRYPTOSPORIDIOSIS, MALARIA, - DENGUE }) + DENGUE, + SHIGELLOSIS }) private SymptomState symptomCurrentStatus; @Diseases({ @@ -3106,7 +3129,8 @@ public static SymptomsDto build() { @Diseases({ MALARIA, - DENGUE }) + DENGUE, + SHIGELLOSIS }) @Outbreaks @HideForCountriesExcept(countries = { CountryHelper.COUNTRY_CODE_LUXEMBOURG }) @@ -3158,6 +3182,22 @@ public static SymptomsDto build() { // mCComplicationsPotentiellementMortelles to map the life threatening complications of dengue private SymptomState fatalRisk; + @Diseases({ + SHIGELLOSIS }) + @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + private SymptomState tenesmus; + @Diseases({ + SHIGELLOSIS }) + @SymptomGrouping(SymptomGroup.GENERAL) + @Complication({ + SHIGELLOSIS }) + private SymptomState haemolyticuremicsyndrome; + + @Complication({ + SHIGELLOSIS }) + @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + private SymptomState bloodyDiarrhea; + @Order(0) public Float getTemperature() { return temperature; @@ -5342,4 +5382,29 @@ public SymptomState getAbdominalCramps() { public void setAbdominalCramps(SymptomState abdominalCramps) { this.abdominalCramps = abdominalCramps; } + + public SymptomState getTenesmus() { + return tenesmus; + } + + public void setTenesmus(SymptomState tenesmus) { + this.tenesmus = tenesmus; + } + + public SymptomState getHaemolyticuremicsyndrome() { + return haemolyticuremicsyndrome; + } + + public void setHaemolyticuremicsyndrome(SymptomState haemolyticuremicsyndrome) { + this.haemolyticuremicsyndrome = haemolyticuremicsyndrome; + } + + public SymptomState getBloodyDiarrhea() { + return bloodyDiarrhea; + } + + public void setBloodyDiarrhea(SymptomState bloodyDiarrhea) { + this.bloodyDiarrhea = bloodyDiarrhea; + } + } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/therapy/Drug.java b/sormas-api/src/main/java/de/symeda/sormas/api/therapy/Drug.java index fa93236dae9..04504054ca1 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/therapy/Drug.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/therapy/Drug.java @@ -29,71 +29,110 @@ public enum Drug { @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) AMIKACIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) BEDAQUILINE, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) CAPREOMYCIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) CIPROFLOXACIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) DELAMANID, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) ETHAMBUTOL, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) GATIFLOXACIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) ISONIAZID, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) KANAMYCIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) LEVOFLOXACIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) MOXIFLOXACIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) OFLOXACIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) RIFAMPICIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) STREPTOMYCIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) CEFTRIAXONE, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) PENICILLIN, @DrugTypes(value = { TypeOfDrug.ANTIBIOTIC }) - @Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true) + @Diseases(value = { + Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true) ERYTHROMYCIN, @DrugTypes(value = { - TypeOfDrug.ANTIBIOTIC }) + TypeOfDrug.ANTIBIOTIC }) + @Diseases(value = { + Disease.SHIGELLOSIS }) + AZITHROMYCIN, + @DrugTypes(value = { + TypeOfDrug.ANTIBIOTIC }) + @Diseases(value = { + Disease.SHIGELLOSIS }) + CEFTAZIDIME, + @DrugTypes(value = { + TypeOfDrug.ANTIBIOTIC }) + @Diseases(value = { + Disease.SHIGELLOSIS }) + CEFOTAXIME, + @DrugTypes(value = { + TypeOfDrug.ANTIBIOTIC }) + @Diseases(value = { + Disease.SHIGELLOSIS }) + AMPICILLIN, + @DrugTypes(value = { + TypeOfDrug.ANTIBIOTIC }) + @Diseases(value = { + Disease.SHIGELLOSIS }) + TRIMETHOPRIM_SULFAMETHOXAZOLE, + @DrugTypes(value = { + TypeOfDrug.ANTIBIOTIC }) OTHER; @Override diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/therapy/DrugSusceptibilityDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/therapy/DrugSusceptibilityDto.java index dfbc3fb463f..faa2f64f945 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/therapy/DrugSusceptibilityDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/therapy/DrugSusceptibilityDto.java @@ -120,6 +120,17 @@ public class DrugSusceptibilityDto extends PseudonymizableDto { public static final String ERYTHROMYCIN_ZONE_DIAMETER = "erythromycinZoneDiameter"; public static final String ERYTHROMYCIN_SURVEILLANCE = "erythromycinSurveillance"; + public static final String AZITHROMYCIN_MIC = "azithromycinMic"; + public static final String AZITHROMYCIN_SUSCEPTIBILITY = "azithromycinSusceptibility"; + public static final String CEFTAZIDIME_MIC = "ceftazidimeMic"; + public static final String CEFTAZIDIME_SUSCEPTIBILITY = "ceftazidimeSusceptibility"; + public static final String CEFOTAXIME_MIC = "cefotaximeMic"; + public static final String CEFOTAXIME_SUSCEPTIBILITY = "cefotaximeSusceptibility"; + public static final String AMPICILLIN_MIC = "ampicillinMic"; + public static final String AMPICILLIN_SUSCEPTIBILITY = "ampicillinSusceptibility"; + public static final String TRIMETHOPRIM_SULFAMETHOXAZOLE_MIC = "trimethoprimSulfamethoxazoleMic"; + public static final String TRIMETHOPRIM_SULFAMETHOXAZOLE_SUSCEPTIBILITY = "trimethoprimSulfamethoxazoleSusceptibility"; + @Diseases(value = { Disease.TUBERCULOSIS }) @ApplicableToPathogenTests(value = { @@ -152,13 +163,15 @@ public class DrugSusceptibilityDto extends PseudonymizableDto { private DrugSusceptibilityType capreomycinSusceptibility; @Diseases(value = { Disease.TUBERCULOSIS, - Disease.INVASIVE_MENINGOCOCCAL_INFECTION }) + Disease.INVASIVE_MENINGOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) @ApplicableToPathogenTests(value = { PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) private Float ciprofloxacinMic; @Diseases(value = { Disease.TUBERCULOSIS, - Disease.INVASIVE_MENINGOCOCCAL_INFECTION }) + Disease.INVASIVE_MENINGOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) @ApplicableToPathogenTests(value = { PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) private DrugSusceptibilityType ciprofloxacinSusceptibility; @@ -267,13 +280,15 @@ public class DrugSusceptibilityDto extends PseudonymizableDto { @Diseases(value = { Disease.INVASIVE_MENINGOCOCCAL_INFECTION, - Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) @ApplicableToPathogenTests(value = { PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) private Float ceftriaxoneMic; @Diseases(value = { Disease.INVASIVE_MENINGOCOCCAL_INFECTION, - Disease.INVASIVE_PNEUMOCOCCAL_INFECTION }) + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.SHIGELLOSIS }) @ApplicableToPathogenTests(value = { PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) private DrugSusceptibilityType ceftriaxoneSusceptibility; @@ -570,6 +585,58 @@ public class DrugSusceptibilityDto extends PseudonymizableDto { PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) private SusceptibilitySurveillanceType erythromycinSurveillance; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private Float azithromycinMic; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private DrugSusceptibilityType azithromycinSusceptibility; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private Float ceftazidimeMic; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private DrugSusceptibilityType ceftazidimeSusceptibility; + + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private Float cefotaximeMic; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private DrugSusceptibilityType cefotaximeSusceptibility; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private Float ampicillinMic; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private DrugSusceptibilityType ampicillinSusceptibility; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private Float trimethoprimSulfamethoxazoleMic; + @Diseases(value = { + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) + private DrugSusceptibilityType trimethoprimSulfamethoxazoleSusceptibility; + public static DrugSusceptibilityDto build() { DrugSusceptibilityDto drugSusceptibility = new DrugSusceptibilityDto(); drugSusceptibility.setUuid(DataHelper.createUuid()); @@ -1255,4 +1322,85 @@ public SusceptibilitySurveillanceType getErythromycinSurveillance() { public void setErythromycinSurveillance(SusceptibilitySurveillanceType erythromycinSurveillance) { this.erythromycinSurveillance = erythromycinSurveillance; } + + public Float getAzithromycinMic() { + return azithromycinMic; + } + + public void setAzithromycinMic(Float azithromycinMic) { + this.azithromycinMic = azithromycinMic; + } + + public DrugSusceptibilityType getAzithromycinSusceptibility() { + return azithromycinSusceptibility; + } + + public void setAzithromycinSusceptibility(DrugSusceptibilityType azithromycinSusceptibility) { + this.azithromycinSusceptibility = azithromycinSusceptibility; + } + + public Float getCeftazidimeMic() { + return ceftazidimeMic; + } + + public void setCeftazidimeMic(Float ceftazidimeMic) { + this.ceftazidimeMic = ceftazidimeMic; + } + + public DrugSusceptibilityType getCeftazidimeSusceptibility() { + return ceftazidimeSusceptibility; + } + + public void setCeftazidimeSusceptibility(DrugSusceptibilityType ceftazidimeSusceptibility) { + this.ceftazidimeSusceptibility = ceftazidimeSusceptibility; + } + + public Float getCefotaximeMic() { + return cefotaximeMic; + } + + public void setCefotaximeMic(Float cefotaximeMic) { + this.cefotaximeMic = cefotaximeMic; + } + + public DrugSusceptibilityType getCefotaximeSusceptibility() { + return cefotaximeSusceptibility; + } + + public void setCefotaximeSusceptibility(DrugSusceptibilityType cefotaximeSusceptibility) { + this.cefotaximeSusceptibility = cefotaximeSusceptibility; + } + + public Float getAmpicillinMic() { + return ampicillinMic; + } + + public void setAmpicillinMic(Float ampicillinMic) { + this.ampicillinMic = ampicillinMic; + } + + public DrugSusceptibilityType getAmpicillinSusceptibility() { + return ampicillinSusceptibility; + } + + public void setAmpicillinSusceptibility(DrugSusceptibilityType ampicillinSusceptibility) { + this.ampicillinSusceptibility = ampicillinSusceptibility; + } + + public Float getTrimethoprimSulfamethoxazoleMic() { + return trimethoprimSulfamethoxazoleMic; + } + + public void setTrimethoprimSulfamethoxazoleMic(Float trimethoprimSulfamethoxazoleMic) { + this.trimethoprimSulfamethoxazoleMic = trimethoprimSulfamethoxazoleMic; + } + + public DrugSusceptibilityType getTrimethoprimSulfamethoxazoleSusceptibility() { + return trimethoprimSulfamethoxazoleSusceptibility; + } + + public void setTrimethoprimSulfamethoxazoleSusceptibility(DrugSusceptibilityType trimethoprimSulfamethoxazoleSusceptibility) { + this.trimethoprimSulfamethoxazoleSusceptibility = trimethoprimSulfamethoxazoleSusceptibility; + } + } diff --git a/sormas-api/src/main/resources/captions.properties b/sormas-api/src/main/resources/captions.properties index f5d32a64b88..9371d7b0747 100644 --- a/sormas-api/src/main/resources/captions.properties +++ b/sormas-api/src/main/resources/captions.properties @@ -1702,6 +1702,10 @@ HealthConditions.vaccinatedAgainstMosquitoBorneViruses=Vaccinated against mosqui HealthConditions.immunodeficiencyOtherThanHivText=Specify immunodeficiency other than HIV HealthConditions.malaria=Malaria HealthConditions.malariaInfectedYear=Malaria infected year +HealthConditions.underMedication=Under medication +HealthConditions.medicationDetails=Specify medication details +HealthConditions.chronicDisease=Chronic disease +HealthConditions.chronicDiseaseDetails=Chronic disease details # Import importDetailed=Detailed Import importDownloadCaseImportTemplate=Download Case Import Template @@ -3091,6 +3095,9 @@ Symptoms.fatalRisk=Fatal risk Symptoms.constipation=Constipation Symptoms.dysuria=Dysuria (painful urination) Symptoms.eyeIrritation=Eye irritation +Symptoms.tenesmus=Tenesmus +Symptoms.haemolyticuremicsyndrome=Haemolytic uremic syndrome +Symptoms.bloodyDiarrhea=Bloody diarrhea titleComplications=Complications titleNoComplications=No complications @@ -3726,6 +3733,9 @@ DiseaseConfiguration.minIncubationPeriod=Minimum incubation period DiseaseConfiguration.maxIncubationPeriod=Maximum incubation period DiseaseConfiguration.exposureCategories=Exposure categories DiseaseConfiguration.exposureCategoryNames=Exposure categories +DiseaseConfiguration.isContagious=Contagious enabled +DiseaseConfiguration.minContagiousPeriod=Minimum contagious period +DiseaseConfiguration.maxContagiousPeriod=Maximum contagious period titleDiseaseConfigurationGeneral=General titleDiseaseConfigurationCaseDefinition=Case definition titleDiseaseConfigurationAgeGroup=Age groups diff --git a/sormas-api/src/main/resources/enum.properties b/sormas-api/src/main/resources/enum.properties index cc7937a2f98..95510280cc2 100644 --- a/sormas-api/src/main/resources/enum.properties +++ b/sormas-api/src/main/resources/enum.properties @@ -579,6 +579,8 @@ Disease.FHA = FHA (Functional Hypothalamic Amenorrhea) Disease.GIARDIASIS=Giardiasis Disease.CRYPTOSPORIDIOSIS=Cryptosporidiosis Disease.SALMONELLOSIS=Salmonellosis +Disease.SHIGELLOSIS=Shigellosis + Disease.Short.AFP = AFP Disease.Short.CHOLERA = Cholera Disease.Short.CONGENITAL_RUBELLA = CRS @@ -646,6 +648,7 @@ Disease.Short.INVASIVE_MENINGOCOCCAL_INFECTION = IMI Disease.Short.GIARDIASIS=Giardia Disease.Short.CRYPTOSPORIDIOSIS=Cryptosporidiosis Disease.Short.SALMONELLOSIS=Salmonellosis +Disease.Short.SHIGELLOSIS=Shigellosis DiseaseTransmissionMode.HUMAN_TO_HUMAN = Primarily via human to human DiseaseTransmissionMode.ANIMAL = Primarily via animal @@ -980,6 +983,43 @@ InfectionSource.ANIMAL=Animal InfectionSource.NOT_APPLICABLE=Not applicable InfectionSource.FOOD=Food InfectionSource.OTHER=Other +InfectionSource.BAKERY_PRODUCTS=Bakery products +InfectionSource.BATS_CONTACT=Contact with bat(s) +InfectionSource.BOVINE_MEAT_PRODUCTS=Bovine meat and products thereof +InfectionSource.BROILER_MEAT_PRODUCTS=Broiler meat (Gallus gallus) and products thereof +InfectionSource.CANNED_FOOD_PRODUCTS=Canned food products +InfectionSource.CATS_CONTACT=Contact with cat(s) +InfectionSource.CEREAL_PRODUCTS=Cereal products including rice and seeds/pulses (nuts, almonds) +InfectionSource.CHEESE=Cheese +InfectionSource.NON_CHEESES_DAIRY_PRODUCTS=Dairy products (other than cheeses) +InfectionSource.DOGS_CONTACT=Contact with dog(s) +InfectionSource.DRINKS_BOTTLED_WATER=Drinks, including bottled water +InfectionSource.EGG_PRODUCTS=Eggs and egg products +InfectionSource.EXOTIC_PET_CONTACT=Contact with exotic pet(s) +InfectionSource.FARM_ANIMAL_CONTACT=Contact with farm animal(s) +InfectionSource.FISH_PRODUCTS=Fish and fish products +InfectionSource.FOX_CONTACT=Contact with fox(es) +InfectionSource.FRUITS_AND_JUICES=Fruit, berries and juices and other products thereof +InfectionSource.GAME_MEAT_NOT_WILD_BOAR=Meat from game and products thereof except wild boar +InfectionSource.HERBS_AND_SPICES=Herbs and spices +InfectionSource.MILK=Milk +InfectionSource.BUFFET_MEALS=Mixed or buffet meals +InfectionSource.MIXED_MEAT_PRODUCTS=Mixed meat and products thereof +InfectionSource.OTHER_FOODS=Other foods +InfectionSource.OTHER_MEAT_PRODUCTS=Meat from other animals and products thereof +InfectionSource.OTHER_PET_CONTACT=Contact with other pet(s) +InfectionSource.UNSPECIFIED_POULTRY=Other or unspecified poultry meat and products thereof +InfectionSource.OTHER_WILD_ANIMAL_CONTACT=Contact with other wild animal(s) +InfectionSource.PORK_PRODUCTS=Pig meat and products thereof +InfectionSource.SHEEP_MEAT_PRODUCTS=Sheep meat and products thereof +InfectionSource.SHELLFISH_PRODUCTS=Crustaceans, shellfish, molluscs and products thereof +InfectionSource.Sprouts=Sprouts +InfectionSource.confectionery=Sweets and chocolate +InfectionSource.TAP_AND_WELL_WATER=Tap water including well-water +InfectionSource.TURKEY_MEAT_PRODUCTS=Turkey meat and products thereof +InfectionSource.JUICE_AND_VEGETABLE_PRODUCTS=Vegetables and juices and other products thereof +InfectionSource.WILD_BOAR_MEAT_PRODUCTS=Meat from wild boar and products thereof +InfectionSource.UNKNOWN=Unknown # InvestigationStatus InvestigationStatus.DISCARDED=Investigation discarded @@ -1084,7 +1124,7 @@ ModeOfTransmission.MOSQUITOES_WITHOUT_EVIDENCE = Acquired locally through mosqui ModeOfTransmission.FROM_MOTHER_TO_CHILD = Mother-to-child transmission ModeOfTransmission.BY_LAB = Laboratory transmission due to occupational exposure ModeOfTransmission.TRANSFUSION_TRANSPLANT_RECIPIENT = Transfusion/transplant recipient - +ModeOfTransmission.ANIMAL = Animal to human transmission # Month Month.JANUARY = January @@ -1264,6 +1304,11 @@ PathogenSpecie.MALARIAE = Plasmodium malariae PathogenSpecie.OVALE = Plasmodium ovale PathogenSpecie.KNOWLESI = Plasmodium knowlesi PathogenSpecie.CYNOMOLGI = Plasmodium cynomolgi +PathogenSpecie.BOYDII=Shigella boydii +PathogenSpecie.DYSENTERIAE=Shigella dysenteriae +PathogenSpecie.FLEXNERI=Shigella flexneri +PathogenSpecie.SONNEI=Shigella sonnei +PathogenSpecie.SHIGELLA_SPP=Shigella spp PathogenSpecie.NOT_SPECIFIED = Plasmodium species not specified PathogenSpecie.COINFECTION = Plasmodium coinfection PathogenSpecie.OTHER = Other @@ -1476,13 +1521,17 @@ Serotype.UNKNOWN=Unknown Serotype.OTHER=Other # SerotypingMethod -SerotypingMethod.MULTIPLEX_PCR = Multiplex PCR -SerotypingMethod.QUELLUNG_REACTION = Quellung Reaction -SerotypingMethod.COAGGLUTINATION = Coagglutination -SerotypingMethod.GEL_DIFFUSION = Gel Diffusion -SerotypingMethod.PNEUMOTEST = Pneumotest -SerotypingMethod.SLIDE_AGGLUTINATION = Slide Agglutination -SerotypingMethod.OTHER = Other +SerotypingMethod.MULTIPLEX_PCR=Multiplex PCR/ PCR +SerotypingMethod.QUELLUNG_REACTION=Quellung Reaction +SerotypingMethod.COAGGLUTINATION=Coagglutination +SerotypingMethod.AGGLUTINATION=Agglutination +SerotypingMethod.GEL_DIFFUSION=Gel Diffusion +SerotypingMethod.PNEUMOTEST=Pneumotest +SerotypingMethod.SLIDE_AGGLUTINATION=Slide Agglutination +SerotypingMethod.DISK_DIFFUSION=Disk Diffusion +SerotypingMethod.MIC_DETERMINATION=MIC determination (E-test, broth microdilution) +SerotypingMethod.WGS_PREDICTION=WGS-based prediction +SerotypingMethod.OTHER=Other # ShipmentStatus ShipmentStatus.NOT_SHIPPED=Not shipped @@ -1762,6 +1811,11 @@ Drug.STREPTOMYCIN =Streptomycin Drug.CEFTRIAXONE = Ceftriaxone Drug.PENICILLIN = Penicillin Drug.ERYTHROMYCIN = Erythromycin +Drug.AZITHROMYCIN = Azithromycin +Drug.CEFTAZIDIME = Ceftazidime +Drug.CEFOTAXIME = Cefotaxime +Drug.AMPICILLIN = Ampicillin +Drug.TRIMETHOPRIM_SULFAMETHOXAZOLE = Trimethoprim–sulfamethoxazole Drug.OTHER = Other DrugSusceptibilityType.NOT_APPLICABLE = Not applicable diff --git a/sormas-api/src/main/resources/strings.properties b/sormas-api/src/main/resources/strings.properties index 9163e21d66a..bb56471150c 100644 --- a/sormas-api/src/main/resources/strings.properties +++ b/sormas-api/src/main/resources/strings.properties @@ -840,6 +840,7 @@ headingEpiDataSourceCaseContacts = Contacts with Source Case headingExposures = Exposures headingExposureDetails = Exposure Details headingExposurePeriodConsider = Exposure period to consider +headingTransmissibilityPeriod =Transmissibility period headingEpiDataOtherInformation = Other information headingEpiConclusion = Conclusion headingClusterType = Cluster Type @@ -2068,8 +2069,12 @@ Vaccine.uniiCode.notAvailable=N/A(Not yet assigned) Vaccine.vaccinationType.PCV15=PCV15 Vaccine.vaccinationType.PCV13=PCV13 Vaccine.vaccinationType.PCV20=PCV20 -exposureStartDate = Exposure start date -exposureEndDate = Exposure end date +exposureStartDate = Exposure investigation from +exposureEndDate = Exposure investigation to +transmissionStartDate=Transmission start date +transmissionEndDate=Transmission end date +prophylaxisStatus=Prophylaxis status + headingSurveyResponseDetails=Response Details headingSurveyResponseFailures=Validation Issues diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditions.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditions.java index d9bd60f058b..1a27ebb4084 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditions.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditions.java @@ -54,6 +54,11 @@ public class HealthConditions extends AbstractDomainObject { private YesNoUnknown recurrentBronchiolitis; + private YesNoUnknown underMedication; + private String medicationDetails; + private YesNoUnknown chronicDisease; + private String chronicDiseaseDetails; + @Enumerated(EnumType.STRING) public YesNoUnknown getTuberculosis() { return tuberculosis; @@ -338,6 +343,7 @@ public void setMalariaInfectedYear(Integer malariaInfectedYear) { this.malariaInfectedYear = malariaInfectedYear; } + @Enumerated(EnumType.STRING) public YesNoUnknown getMalaria() { return malaria; } @@ -345,4 +351,39 @@ public YesNoUnknown getMalaria() { public void setMalaria(YesNoUnknown malaria) { this.malaria = malaria; } + + @Enumerated(EnumType.STRING) + public YesNoUnknown getUnderMedication() { + return underMedication; + } + + public void setUnderMedication(YesNoUnknown underMedication) { + this.underMedication = underMedication; + } + + public String getMedicationDetails() { + return medicationDetails; + } + + public void setMedicationDetails(String medicationDetails) { + this.medicationDetails = medicationDetails; + } + + @Enumerated(EnumType.STRING) + public YesNoUnknown getChronicDisease() { + return chronicDisease; + } + + public void setChronicDisease(YesNoUnknown chronicDisease) { + this.chronicDisease = chronicDisease; + } + + public String getChronicDiseaseDetails() { + return chronicDiseaseDetails; + } + + public void setChronicDiseaseDetails(String chronicDiseaseDetails) { + this.chronicDiseaseDetails = chronicDiseaseDetails; + } + } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditionsMapper.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditionsMapper.java index 8546f3f89d5..0a195815860 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditionsMapper.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditionsMapper.java @@ -68,6 +68,10 @@ public static HealthConditionsDto toDto(HealthConditions source) { target.setImmunodeficiencyOtherThanHivText(source.getImmunodeficiencyOtherThanHivText()); target.setMalaria(source.getMalaria()); target.setMalariaInfectedYear(source.getMalariaInfectedYear()); + target.setUnderMedication(source.getUnderMedication()); + target.setMedicationDetails(source.getMedicationDetails()); + target.setChronicDisease(source.getChronicDisease()); + target.setChronicDiseaseDetails(source.getChronicDiseaseDetails()); return target; } @@ -111,6 +115,10 @@ public HealthConditions fillOrBuildEntity(@NotNull HealthConditionsDto source, H target.setImmunodeficiencyOtherThanHivText(source.getImmunodeficiencyOtherThanHivText()); target.setMalaria(source.getMalaria()); target.setMalariaInfectedYear(source.getMalariaInfectedYear()); + target.setUnderMedication(source.getUnderMedication()); + target.setMedicationDetails(source.getMedicationDetails()); + target.setChronicDisease(source.getChronicDisease()); + target.setChronicDiseaseDetails(source.getChronicDiseaseDetails()); return target; } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfiguration.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfiguration.java index 5e006f1fef4..27fb7951786 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfiguration.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfiguration.java @@ -51,6 +51,9 @@ public class DiseaseConfiguration extends AbstractDomainObject { private Integer maxIncubationPeriod; private Integer minIncubationPeriod; private String caseDefinitionText; + private Boolean isContagious; + private Integer minContagiousPeriod; + private Integer maxContagiousPeriod; private Boolean extendedClassification; private Boolean extendedClassificationMulti; private List ageGroups; @@ -183,6 +186,33 @@ public void setCaseDefinitionText(String caseDefinitionText) { this.caseDefinitionText = caseDefinitionText; } + @Column + public Boolean getIsContagious() { + return isContagious; + } + + public void setIsContagious(Boolean isContagious) { + this.isContagious = isContagious; + } + + @Column + public Integer getMinContagiousPeriod() { + return minContagiousPeriod; + } + + public void setMinContagiousPeriod(Integer minContagiousPeriod) { + this.minContagiousPeriod = minContagiousPeriod; + } + + @Column + public Integer getMaxContagiousPeriod() { + return maxContagiousPeriod; + } + + public void setMaxContagiousPeriod(Integer maxContagiousPeriod) { + this.maxContagiousPeriod = maxContagiousPeriod; + } + @Column public Boolean getExtendedClassification() { return extendedClassification; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjb.java index 14f3be74f66..e01cbd9ad13 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjb.java @@ -96,6 +96,7 @@ public class DiseaseConfigurationFacadeEjb implements DiseaseConfigurationFacade private static final List aggregateReportingDiseases = new ArrayList<>(); private static final List followUpEnabledDiseases = new ArrayList<>(); private static final List incubationEnabledDiseases = new ArrayList<>(); + private static final List contagiousEnabledDiseases = new ArrayList<>(); private static final Map extendedClassificationDiseases = new EnumMap<>(Disease.class); private static final Map extendedClassificationMultiDiseases = new EnumMap<>(Disease.class); @@ -105,6 +106,8 @@ public class DiseaseConfigurationFacadeEjb implements DiseaseConfigurationFacade private static final Map eventParticipantFollowUpDurations = new EnumMap<>(Disease.class); private static final Map maxIncubationPeriod = new EnumMap<>(Disease.class); private static final Map minIncubationPeriod = new EnumMap<>(Disease.class); + private static final Map minContagiousPeriod = new EnumMap<>(Disease.class); + private static final Map maxContagiousPeriod = new EnumMap<>(Disease.class); private static final Map automaticSampleAssignmentThresholds = new EnumMap<>(Disease.class); @Override @@ -237,6 +240,9 @@ private DiseaseConfigurationIndexDto toIndexDto(DiseaseConfiguration entity) { dto.setMaxIncubationPeriod(entity.getMaxIncubationPeriod()); dto.setMinIncubationPeriod(entity.getMinIncubationPeriod()); dto.setCaseDefinitionText(entity.getCaseDefinitionText()); + dto.setIsContagious(entity.getIsContagious()); + dto.setMaxContagiousPeriod(entity.getMaxContagiousPeriod()); + dto.setMinContagiousPeriod(entity.getMinContagiousPeriod()); if (entity.getExtendedClassification() != null) { dto.setExtendedClassification(entity.getExtendedClassification()); @@ -420,6 +426,9 @@ public static DiseaseConfigurationDto toDto(DiseaseConfiguration source) { target.setMaxIncubationPeriod(source.getMaxIncubationPeriod()); target.setMinIncubationPeriod(source.getMinIncubationPeriod()); target.setCaseDefinitionText(source.getCaseDefinitionText()); + target.setMaxContagiousPeriod(source.getMaxContagiousPeriod()); + target.setMinContagiousPeriod(source.getMinContagiousPeriod()); + target.setIsContagious(source.getIsContagious()); target.setExtendedClassification(source.getExtendedClassification()); target.setExtendedClassificationMulti(source.getExtendedClassificationMulti()); target.setAgeGroups(source.getAgeGroups()); @@ -516,6 +525,9 @@ public DiseaseConfiguration fillOrBuildEntity(@NotNull DiseaseConfigurationDto s target.setIncubationPeriodEnabled(source.getIncubationPeriodEnabled()); target.setCaseDefinitionText(source.getCaseDefinitionText()); target.setExposureCategories(source.getExposureCategories()); + target.setIsContagious(source.getIsContagious()); + target.setMaxContagiousPeriod(source.getMaxContagiousPeriod()); + target.setMinContagiousPeriod(source.getMinContagiousPeriod()); //update changedate: required for mobile app to be aware of changes target.setChangeDate(new Timestamp((new Date()).getTime())); @@ -540,6 +552,9 @@ public void loadData() { incubationEnabledDiseases.clear(); maxIncubationPeriod.clear(); minIncubationPeriod.clear(); + contagiousEnabledDiseases.clear(); + minContagiousPeriod.clear(); + maxContagiousPeriod.clear(); automaticSampleAssignmentThresholds.clear(); for (DiseaseConfiguration configuration : service.getAll()) { @@ -609,6 +624,21 @@ public void loadData() { minIncubationPeriod.put(disease, disease.getDefaultMinIncubationPeriod()); } + if (enabled(configuration.getIsContagious(), disease.isContagious())) { + contagiousEnabledDiseases.add(disease); + } + + if (configuration.getMaxContagiousPeriod() != null) { + maxContagiousPeriod.put(disease, configuration.getMaxContagiousPeriod()); + } else { + maxContagiousPeriod.put(disease, disease.getDefaultMaxContagiousPeriod()); + } + if (configuration.getMinContagiousPeriod() != null) { + minContagiousPeriod.put(disease, configuration.getMinContagiousPeriod()); + } else { + minContagiousPeriod.put(disease, disease.getDefaultMinContagiousPeriod()); + } + if (configuration.getAutomaticSampleAssignmentThreshold() != null) { automaticSampleAssignmentThresholds.put(disease, configuration.getAutomaticSampleAssignmentThreshold()); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java index 424ac2af71d..f9fedfd317e 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java @@ -29,8 +29,6 @@ import javax.persistence.FetchType; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; import de.symeda.sormas.api.epidata.CaseImportedStatus; import de.symeda.sormas.api.epidata.ClusterType; @@ -88,11 +86,6 @@ public class EpiData extends AbstractDomainObject { private String placeOfInfection; private String residenceAtOnset; - private Date exposureInvestigationFromDate; - private Date exposureInvestigationToDate; - private Date activityAsCaseFromDate; - private Date activityAsCaseToDate; - @Enumerated(EnumType.STRING) public YesNoUnknown getExposureDetailsKnown() { return exposureDetailsKnown; @@ -307,41 +300,4 @@ public String getResidenceAtOnset() { public void setResidenceAtOnset(String residenceAtOnset) { this.residenceAtOnset = residenceAtOnset; } - - @Temporal(TemporalType.TIMESTAMP) - public Date getExposureInvestigationFromDate() { - return exposureInvestigationFromDate; - } - - public void setExposureInvestigationFromDate(Date exposureInvestigationFromDate) { - this.exposureInvestigationFromDate = exposureInvestigationFromDate; - } - - @Temporal(TemporalType.TIMESTAMP) - public Date getExposureInvestigationToDate() { - return exposureInvestigationToDate; - } - - public void setExposureInvestigationToDate(Date exposureInvestigationToDate) { - this.exposureInvestigationToDate = exposureInvestigationToDate; - } - - @Temporal(TemporalType.TIMESTAMP) - public Date getActivityAsCaseFromDate() { - return activityAsCaseFromDate; - } - - public void setActivityAsCaseFromDate(Date activityAsCaseFromDate) { - this.activityAsCaseFromDate = activityAsCaseFromDate; - } - - @Temporal(TemporalType.TIMESTAMP) - public Date getActivityAsCaseToDate() { - return activityAsCaseToDate; - } - - public void setActivityAsCaseToDate(Date activityAsCaseToDate) { - this.activityAsCaseToDate = activityAsCaseToDate; - } - } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java index 8a22fb4fb97..8cf6abed80b 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java @@ -135,10 +135,6 @@ public EpiData fillOrBuildEntity(EpiDataDto source, EpiData target, boolean chec target.setHealthcareProfessional(source.getHealthcareProfessional()); target.setPlaceOfInfection(source.getPlaceOfInfection()); target.setResidenceAtOnset(source.getResidenceAtOnset()); - target.setExposureInvestigationFromDate(source.getExposureInvestigationFromDate()); - target.setExposureInvestigationToDate(source.getExposureInvestigationToDate()); - target.setActivityAsCaseFromDate(source.getActivityAsCaseFromDate()); - target.setActivityAsCaseToDate(source.getActivityAsCaseToDate()); return target; } @@ -331,10 +327,6 @@ public static EpiDataDto toDto(EpiData epiData) { target.setHealthcareProfessional(source.getHealthcareProfessional()); target.setPlaceOfInfection(source.getPlaceOfInfection()); target.setResidenceAtOnset(source.getResidenceAtOnset()); - target.setExposureInvestigationFromDate(source.getExposureInvestigationFromDate()); - target.setExposureInvestigationToDate(source.getExposureInvestigationToDate()); - target.setActivityAsCaseFromDate(source.getActivityAsCaseFromDate()); - target.setActivityAsCaseToDate(source.getActivityAsCaseToDate()); return target; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java index bdc6c982d53..d4ee106398e 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java @@ -319,6 +319,9 @@ public class Symptoms extends AbstractDomainObject { private SymptomState constipation; private SymptomState dysuria; private SymptomState eyeIrritation; + private SymptomState tenesmus; + private SymptomState haemolyticuremicsyndrome; + private SymptomState bloodyDiarrhea; // when adding new fields make sure to extend toHumanString @@ -2494,7 +2497,6 @@ public void setFatalRisk(SymptomState fatalRisk) { this.fatalRisk = fatalRisk; } - @Enumerated(EnumType.STRING) public SymptomState getLossOfAppetite() { return lossOfAppetite; @@ -2548,4 +2550,32 @@ public SymptomState getAbdominalCramps() { public void setAbdominalCramps(SymptomState abdominalCramps) { this.abdominalCramps = abdominalCramps; } + + @Enumerated(EnumType.STRING) + public SymptomState getTenesmus() { + return tenesmus; + } + + public void setTenesmus(SymptomState tenesmus) { + this.tenesmus = tenesmus; + } + + @Enumerated(EnumType.STRING) + public SymptomState getHaemolyticuremicsyndrome() { + return haemolyticuremicsyndrome; + } + + public void setHaemolyticuremicsyndrome(SymptomState haemolyticuremicsyndrome) { + this.haemolyticuremicsyndrome = haemolyticuremicsyndrome; + } + + @Enumerated(EnumType.STRING) + public SymptomState getBloodyDiarrhea() { + return bloodyDiarrhea; + } + + public void setBloodyDiarrhea(SymptomState bloodyDiarrhea) { + this.bloodyDiarrhea = bloodyDiarrhea; + } + } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java index 100f4b8aeb9..52ec921be21 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java @@ -284,6 +284,9 @@ public Symptoms fillOrBuildEntity(SymptomsDto source, Symptoms target, boolean c target.setConstipation(source.getConstipation()); target.setDysuria(source.getDysuria()); target.setEyeIrritation(source.getEyeIrritation()); + target.setTenesmus(source.getTenesmus()); + target.setHaemolyticuremicsyndrome(source.getHaemolyticuremicsyndrome()); + target.setBloodyDiarrhea(source.getBloodyDiarrhea()); return target; } @@ -550,7 +553,9 @@ public static SymptomsDto toSymptomsDto(Symptoms symptoms) { target.setCoughingAttacks(source.getCoughingAttacks()); target.setCoughingAtNight(source.getCoughingAtNight()); target.setAbdominalCramps(source.getAbdominalCramps()); - + target.setTenesmus(source.getTenesmus()); + target.setHaemolyticuremicsyndrome(source.getHaemolyticuremicsyndrome()); + target.setBloodyDiarrhea(source.getBloodyDiarrhea()); return target; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibility.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibility.java index 0d72ec261a8..cd6c8038914 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibility.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibility.java @@ -207,6 +207,17 @@ public class DrugSusceptibility extends AbstractDomainObject { private Float erythromycinZoneDiameter; private SusceptibilitySurveillanceType erythromycinSurveillance; + private Float azithromycinMic; + private DrugSusceptibilityType azithromycinSusceptibility; + private Float ceftazidimeMic; + private DrugSusceptibilityType ceftazidimeSusceptibility; + private Float cefotaximeMic; + private DrugSusceptibilityType cefotaximeSusceptibility; + private Float ampicillinMic; + private DrugSusceptibilityType ampicillinSusceptibility; + private Float trimethoprimSulfamethoxazoleMic; + private DrugSusceptibilityType trimethoprimSulfamethoxazoleSusceptibility; + public Float getAmikacinMic() { return amikacinMic; } @@ -937,4 +948,90 @@ public SusceptibilitySurveillanceType getErythromycinSurveillance() { public void setErythromycinSurveillance(SusceptibilitySurveillanceType erythromycinSurveillance) { this.erythromycinSurveillance = erythromycinSurveillance; } + + public Float getAzithromycinMic() { + return azithromycinMic; + } + + public void setAzithromycinMic(Float azithromycinMic) { + this.azithromycinMic = azithromycinMic; + } + + @Enumerated(EnumType.STRING) + public DrugSusceptibilityType getAzithromycinSusceptibility() { + return azithromycinSusceptibility; + } + + public void setAzithromycinSusceptibility(DrugSusceptibilityType azithromycinSusceptibility) { + this.azithromycinSusceptibility = azithromycinSusceptibility; + } + + public Float getCeftazidimeMic() { + return ceftazidimeMic; + } + + public void setCeftazidimeMic(Float ceftazidimeMic) { + this.ceftazidimeMic = ceftazidimeMic; + } + + @Enumerated(EnumType.STRING) + public DrugSusceptibilityType getCeftazidimeSusceptibility() { + return ceftazidimeSusceptibility; + } + + public void setCeftazidimeSusceptibility(DrugSusceptibilityType ceftazidimeSusceptibility) { + this.ceftazidimeSusceptibility = ceftazidimeSusceptibility; + } + + public Float getCefotaximeMic() { + return cefotaximeMic; + } + + public void setCefotaximeMic(Float cefotaximeMic) { + this.cefotaximeMic = cefotaximeMic; + } + + @Enumerated(EnumType.STRING) + public DrugSusceptibilityType getCefotaximeSusceptibility() { + return cefotaximeSusceptibility; + } + + public void setCefotaximeSusceptibility(DrugSusceptibilityType cefotaximeSusceptibility) { + this.cefotaximeSusceptibility = cefotaximeSusceptibility; + } + + public Float getAmpicillinMic() { + return ampicillinMic; + } + + public void setAmpicillinMic(Float ampicillinMic) { + this.ampicillinMic = ampicillinMic; + } + + @Enumerated(EnumType.STRING) + public DrugSusceptibilityType getAmpicillinSusceptibility() { + return ampicillinSusceptibility; + } + + public void setAmpicillinSusceptibility(DrugSusceptibilityType ampicillinSusceptibility) { + this.ampicillinSusceptibility = ampicillinSusceptibility; + } + + public Float getTrimethoprimSulfamethoxazoleMic() { + return trimethoprimSulfamethoxazoleMic; + } + + public void setTrimethoprimSulfamethoxazoleMic(Float trimethoprimSulfamethoxazoleMic) { + this.trimethoprimSulfamethoxazoleMic = trimethoprimSulfamethoxazoleMic; + } + + @Enumerated(EnumType.STRING) + public DrugSusceptibilityType getTrimethoprimSulfamethoxazoleSusceptibility() { + return trimethoprimSulfamethoxazoleSusceptibility; + } + + public void setTrimethoprimSulfamethoxazoleSusceptibility(DrugSusceptibilityType trimethoprimSulfamethoxazoleSusceptibility) { + this.trimethoprimSulfamethoxazoleSusceptibility = trimethoprimSulfamethoxazoleSusceptibility; + } + } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibilityMapper.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibilityMapper.java index 5081c6a080a..3e26ffabef7 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibilityMapper.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibilityMapper.java @@ -120,6 +120,17 @@ public static DrugSusceptibilityDto toDto(DrugSusceptibility source) { target.setErythromycinMethod(source.getErythromycinMethod()); target.setErythromycinZoneDiameter(source.getErythromycinZoneDiameter()); target.setErythromycinSurveillance(source.getErythromycinSurveillance()); + target.setAzithromycinMic(source.getAzithromycinMic()); + target.setAzithromycinSusceptibility(source.getAzithromycinSusceptibility()); + target.setCeftazidimeMic(source.getCeftazidimeMic()); + target.setCeftazidimeSusceptibility(source.getCeftazidimeSusceptibility()); + target.setCefotaximeMic(source.getCefotaximeMic()); + target.setCefotaximeSusceptibility(source.getCefotaximeSusceptibility()); + target.setAmpicillinMic(source.getAmpicillinMic()); + target.setAmpicillinSusceptibility(source.getAmpicillinSusceptibility()); + target.setTrimethoprimSulfamethoxazoleMic(source.getTrimethoprimSulfamethoxazoleMic()); + target.setTrimethoprimSulfamethoxazoleSusceptibility(source.getTrimethoprimSulfamethoxazoleSusceptibility()); + return target; } @@ -215,6 +226,16 @@ public DrugSusceptibility fillOrBuildEntity(@NotNull DrugSusceptibilityDto sourc target.setErythromycinMethod(source.getErythromycinMethod()); target.setErythromycinZoneDiameter(source.getErythromycinZoneDiameter()); target.setErythromycinSurveillance(source.getErythromycinSurveillance()); + target.setAzithromycinMic(source.getAzithromycinMic()); + target.setAzithromycinSusceptibility(source.getAzithromycinSusceptibility()); + target.setCeftazidimeMic(source.getCeftazidimeMic()); + target.setCeftazidimeSusceptibility(source.getCeftazidimeSusceptibility()); + target.setCefotaximeMic(source.getCefotaximeMic()); + target.setCefotaximeSusceptibility(source.getCefotaximeSusceptibility()); + target.setAmpicillinMic(source.getAmpicillinMic()); + target.setAmpicillinSusceptibility(source.getAmpicillinSusceptibility()); + target.setTrimethoprimSulfamethoxazoleMic(source.getTrimethoprimSulfamethoxazoleMic()); + target.setTrimethoprimSulfamethoxazoleSusceptibility(source.getTrimethoprimSulfamethoxazoleSusceptibility()); return target; } @@ -308,6 +329,17 @@ public static boolean hasData(DrugSusceptibilityDto dto) { || dto.getPenicillinSurveillance() != null || dto.getErythromycinMethod() != null || dto.getErythromycinZoneDiameter() != null - || dto.getErythromycinSurveillance() != null; + || dto.getErythromycinSurveillance() != null + || dto.getErythromycinSusceptibility() != null + || dto.getAzithromycinMic() != null + || dto.getAzithromycinSusceptibility() != null + || dto.getCeftazidimeMic() != null + || dto.getCeftazidimeSusceptibility() != null + || dto.getCefotaximeMic() != null + || dto.getCefotaximeSusceptibility() != null + || dto.getAmpicillinMic() != null + || dto.getAmpicillinSusceptibility() != null + || dto.getTrimethoprimSulfamethoxazoleMic() != null + || dto.getTrimethoprimSulfamethoxazoleSusceptibility() != null; } } diff --git a/sormas-backend/src/main/resources/sql/sormas_schema.sql b/sormas-backend/src/main/resources/sql/sormas_schema.sql index 4fb940a84eb..864064549a4 100644 --- a/sormas-backend/src/main/resources/sql/sormas_schema.sql +++ b/sormas-backend/src/main/resources/sql/sormas_schema.sql @@ -16159,4 +16159,58 @@ alter table drugsusceptibility_history add column IF NOT EXISTS erythromycinsurv INSERT INTO schema_version (version_number, comment) VALUES (634, 'Enhanced AST structure: per-drug method, zone diameter, surveillance interpretation #13948'); + +-- 2026-05-20 Shigellosis disease configuration (Luxembourg) #13915 +ALTER TABLE diseaseconfiguration ADD COLUMN IF NOT EXISTS iscontagious boolean default false; +ALTER TABLE diseaseconfiguration ADD COLUMN IF NOT EXISTS mincontagiousperiod integer; +ALTER TABLE diseaseconfiguration ADD COLUMN IF NOT EXISTS maxcontagiousperiod integer; +ALTER TABLE healthconditions ADD COLUMN IF NOT EXISTS undermedication varchar(255); +ALTER TABLE healthconditions ADD COLUMN IF NOT EXISTS medicationdetails varchar(255); +ALTER TABLE healthconditions ADD COLUMN IF NOT EXISTS medicationdetails varchar(255); +ALTER TABLE symptoms ADD COLUMN IF NOT EXISTS haemolyticuremicsyndrome varchar(255); +ALTER TABLE symptoms ADD COLUMN IF NOT EXISTS tenesmus varchar(255); +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS azithromycinmic numeric; +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS azithromycinsusceptibility varchar(255); +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS ceftazidimemic numeric; +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS ceftazidimesusceptibility varchar(255); +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS cefotaximemic numeric; +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS cefotaximesusceptibility varchar(255); +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS ampicillinmic numeric; +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS ampicillinsusceptibility varchar(255); +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS trimethoprimsulfamethoxazolemic numeric; +ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS trimethoprimsulfamethoxazolesusceptibility varchar(255); +ALTER TABLE epidata DROP COLUMN IF EXISTS activityascasefromdate; +ALTER TABLE epidata DROP COLUMN IF EXISTS activityascasetodate; +ALTER TABLE epidata DROP COLUMN IF EXISTS exposureinvestigationtodate; +ALTER TABLE epidata DROP COLUMN IF EXISTS exposureinvestigationfromdate; +ALTER TABLE symptoms ADD COLUMN IF NOT EXISTS bloodydiarrhea varchar(255); +ALTER TABLE healthconditions ADD COLUMN IF NOT EXISTS chronicdisease varchar(255); +ALTER TABLE healthconditions ADD COLUMN IF NOT EXISTS chronicdiseasedetails varchar(255); + +ALTER TABLE diseaseconfiguration_history ADD COLUMN IF NOT EXISTS iscontagious boolean default false; +ALTER TABLE diseaseconfiguration_history ADD COLUMN IF NOT EXISTS mincontagiousperiod integer; +ALTER TABLE diseaseconfiguration_history ADD COLUMN IF NOT EXISTS maxcontagiousperiod integer; +ALTER TABLE healthconditions_history ADD COLUMN IF NOT EXISTS undermedication varchar(255); +ALTER TABLE healthconditions_history ADD COLUMN IF NOT EXISTS medicationdetails varchar(255); +ALTER TABLE symptoms_history ADD COLUMN IF NOT EXISTS haemolyticuremicsyndrome varchar(255); +ALTER TABLE symptoms_history ADD COLUMN IF NOT EXISTS tenesmus varchar(255); +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS azithromycinmic numeric; +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS azithromycinsusceptibility varchar(255); +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS ceftazidimemic numeric; +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS ceftazidimesusceptibility varchar(255); +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS cefotaximemic numeric; +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS cefotaximesusceptibility varchar(255); +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS ampicillinmic numeric; +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS ampicillinsusceptibility varchar(255); +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS trimethoprimsulfamethoxazolemic numeric; +ALTER TABLE drugsusceptibility_history ADD COLUMN IF NOT EXISTS trimethoprimsulfamethoxazolesusceptibility varchar(255); +ALTER TABLE epidata_history DROP COLUMN IF EXISTS activityascasefromdate; +ALTER TABLE epidata_history DROP COLUMN IF EXISTS activityascasetodate; +ALTER TABLE epidata_history DROP COLUMN IF EXISTS exposureinvestigationtodate; +ALTER TABLE epidata_history DROP COLUMN IF EXISTS exposureinvestigationfromdate; +ALTER TABLE symptoms_history ADD COLUMN IF NOT EXISTS bloodydiarrhea varchar(255); +ALTER TABLE healthconditions_history ADD COLUMN IF NOT EXISTS chronicdisease varchar(255); +ALTER TABLE healthconditions_history ADD COLUMN IF NOT EXISTS chronicdiseasedetails varchar(255); + +INSERT INTO schema_version (version_number, comment) VALUES (635, '#13926 - Shigellosis incorporation into SORMAS'); -- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. *** diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjbTest.java index 0d820a878b9..2a3868b84c8 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjbTest.java @@ -38,6 +38,7 @@ public void testGetAllDiseases() { assertFalse(diseases.contains(Disease.MALARIA)); assertTrue(diseases.contains(Disease.INVASIVE_MENINGOCOCCAL_INFECTION)); assertTrue(diseases.contains(Disease.INVASIVE_PNEUMOCOCCAL_INFECTION)); + assertTrue(diseases.contains(Disease.SHIGELLOSIS)); diseases = getDiseaseConfigurationFacade().getAllDiseases(true, false, true); assertFalse(diseases.contains(Disease.EVD)); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/clinicalcourse/HealthConditionsForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/clinicalcourse/HealthConditionsForm.java index a84ed1347e9..7986ded8fe7 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/clinicalcourse/HealthConditionsForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/clinicalcourse/HealthConditionsForm.java @@ -3,6 +3,8 @@ import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.ASPLENIA; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.ASTHMA; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.CARDIOVASCULAR_DISEASE_INCLUDING_HYPERTENSION; +import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.CHRONIC_DISEASE; +import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.CHRONIC_DISEASE_DETAILS; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.CHRONIC_HEART_FAILURE; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.CHRONIC_KIDNEY_DISEASE; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.CHRONIC_LIVER_DISEASE; @@ -26,6 +28,7 @@ import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.MALARIA; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.MALARIA_INFECTED_YEAR; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.MALIGNANCY_CHEMOTHERAPY; +import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.MEDICATION_DETAILS; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.OBESITY; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.OTHER_CONDITIONS; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.PREVIOUS_TUBERCULOSIS_TREATMENT; @@ -33,6 +36,7 @@ import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.SICKLE_CELL_DISEASE; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.TUBERCULOSIS; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.TUBERCULOSIS_INFECTION_YEAR; +import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.UNDER_MEDICATION; import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.VACCINATED_AGAINST_MOSQUITO_BORNE_VIRUSES; import static de.symeda.sormas.ui.utils.CssStyles.H3; import static de.symeda.sormas.ui.utils.LayoutUtil.fluidColumn; @@ -96,11 +100,11 @@ public class HealthConditionsForm extends AbstractEditForm fluidColumn(6, 0, locs( TUBERCULOSIS, PREVIOUS_TUBERCULOSIS_TREATMENT, ASPLENIA, HEPATITIS, DIABETES, IMMUNODEFICIENCY_OTHER_THAN_HIV,"IMMUNODEFICIENCY_INCLUDING_HIV_LAYOUT", HIV, HIV_ART, CONGENITAL_SYPHILIS, DOWN_SYNDROME, - CHRONIC_LIVER_DISEASE, MALIGNANCY_CHEMOTHERAPY, RECURRENT_BRONCHIOLITIS, MALARIA, "MALARIA_INFECTED_YEAR_LAYOUT")), + CHRONIC_LIVER_DISEASE, MALIGNANCY_CHEMOTHERAPY, RECURRENT_BRONCHIOLITIS, MALARIA, "MALARIA_INFECTED_YEAR_LAYOUT", UNDER_MEDICATION, MEDICATION_DETAILS)), fluidColumn(6, 0, locs( "TUBERCULOSIS_INFECTION_YEAR_LAYOUT","COMPLIANCE_WITH_TREATMENT_LAYOUT",CHRONIC_HEART_FAILURE, CHRONIC_PULMONARY_DISEASE, CHRONIC_KIDNEY_DISEASE, CHRONIC_NEUROLOGIC_CONDITION, CARDIOVASCULAR_DISEASE_INCLUDING_HYPERTENSION, - OBESITY, CURRENT_SMOKER, FORMER_SMOKER, ASTHMA, SICKLE_CELL_DISEASE, VACCINATED_AGAINST_MOSQUITO_BORNE_VIRUSES, EXPOSED_TO_MOSQUITO_BORNE_VIRUSES,"MOSQUITO_BORNE_VIRUSE_LAYOUT")) + OBESITY, CURRENT_SMOKER, FORMER_SMOKER, ASTHMA, SICKLE_CELL_DISEASE, VACCINATED_AGAINST_MOSQUITO_BORNE_VIRUSES, EXPOSED_TO_MOSQUITO_BORNE_VIRUSES,"MOSQUITO_BORNE_VIRUSE_LAYOUT",CHRONIC_DISEASE, CHRONIC_DISEASE_DETAILS)) ) + loc(OTHER_CONDITIONS) + loc(CONFIDENTIAL_LABEL_LOC); //@formatter:on @@ -131,7 +135,11 @@ public class HealthConditionsForm extends AbstractEditForm EXPOSED_TO_MOSQUITO_BORNE_VIRUSES, VACCINATED_AGAINST_MOSQUITO_BORNE_VIRUSES, RECURRENT_BRONCHIOLITIS, - MALARIA); + MALARIA, + UNDER_MEDICATION, + MEDICATION_DETAILS, + CHRONIC_DISEASE, + CHRONIC_DISEASE_DETAILS); private boolean vaccinationListener = false; @@ -301,6 +309,9 @@ protected void addFields() { } } + FieldHelper.setVisibleWhen(getFieldGroup(), MEDICATION_DETAILS, UNDER_MEDICATION, Arrays.asList(YesNoUnknown.YES), true); + FieldHelper.setVisibleWhen(getFieldGroup(), CHRONIC_DISEASE_DETAILS, CHRONIC_DISEASE, Arrays.asList(YesNoUnknown.YES), true); + initializeVisibilitiesAndAllowedVisibilities(); initializeAccessAndAllowedAccesses(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/disease/DiseaseConfigurationEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/disease/DiseaseConfigurationEditForm.java index 6fde92997a7..475f5273b3d 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/disease/DiseaseConfigurationEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/disease/DiseaseConfigurationEditForm.java @@ -54,8 +54,8 @@ public class DiseaseConfigurationEditForm extends AbstractEditForm exposureCategoriesField; @@ -121,6 +124,10 @@ protected void addFields() { cbExtendedClassification = addField(generalLayout, DiseaseConfigurationDto.EXTENDED_CLASSIFICATION, CheckBox.class); cbExtendedClassificationMulti = addField(generalLayout, DiseaseConfigurationDto.EXTENDED_CLASSIFICATION_MULTI, CheckBox.class); + cbIsContagious = addField(generalLayout, DiseaseConfigurationDto.IS_CONTAGIOUS, CheckBox.class); + tfMinContagiousPeriod = addField(generalLayout, DiseaseConfigurationDto.MIN_CONTAGIOUS_PERIOD, TextField.class); + tfMaxContagiousPeriod = addField(generalLayout, DiseaseConfigurationDto.MAX_CONTAGIOUS_PERIOD, TextField.class); + exposureCategoriesField = addField(generalLayout, DiseaseConfigurationDto.EXPOSURE_CATEGORIES, CheckboxSet.class); exposureCategoriesField.setColumnCount(3); exposureCategoriesField.setItems(Arrays.asList(ExposureCategory.values()), null, null); @@ -157,6 +164,7 @@ protected void addFields() { Arrays.asList(tfMaxIncubationPeriod, tfMinIncubationPeriod), Arrays.asList(Boolean.TRUE), true); + FieldHelper.setVisibleWhen(cbIsContagious, Arrays.asList(tfMaxContagiousPeriod, tfMinContagiousPeriod), Arrays.asList(Boolean.TRUE), true); FieldHelper.setVisibleWhen( cbCaseSurveillance, Arrays.asList( @@ -164,7 +172,8 @@ protected void addFields() { cbIncubationPeriodEnabled, cbExtendedClassification, cbExtendedClassificationMulti, - tfAutomaticSampleAssignmentThreshold), + tfAutomaticSampleAssignmentThreshold, + cbIsContagious), Arrays.asList(Boolean.TRUE), true); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/disease/DiseaseConfigurationGrid.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/disease/DiseaseConfigurationGrid.java index 33b26dcf20a..15398978372 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/disease/DiseaseConfigurationGrid.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/disease/DiseaseConfigurationGrid.java @@ -53,8 +53,7 @@ public DiseaseConfigurationGrid(DiseaseConfigurationCriteria criteria) { DiseaseConfigurationIndexDto.AGGREGATE_REPORTING_ENABLED, DiseaseConfigurationIndexDto.CASE_FOLLOW_UP_DURATION, DiseaseConfigurationIndexDto.INCUBATION_PERIOD_ENABLED, - DiseaseConfigurationIndexDto.MAX_INCUBATION_PERIOD, - DiseaseConfigurationIndexDto.MIN_INCUBATION_PERIOD, + DiseaseConfigurationIndexDto.IS_CONTAGIOUS, DiseaseConfigurationIndexDto.AGE_GROUPS, DiseaseConfigurationIndexDto.EVENT_PARTICIPANT_FOLLOW_UP_DURATION, DiseaseConfigurationIndexDto.EXTENDED_CLASSIFICATION, @@ -75,6 +74,7 @@ public DiseaseConfigurationGrid(DiseaseConfigurationCriteria criteria) { getColumn(DiseaseConfigurationIndexDto.PRIMARY_DISEASE).setRenderer(new BooleanRenderer()); getColumn(DiseaseConfigurationIndexDto.FOLLOW_UP_ENABLED).setRenderer(new BooleanRenderer()); getColumn(DiseaseConfigurationIndexDto.INCUBATION_PERIOD_ENABLED).setRenderer(new BooleanRenderer()); + getColumn(DiseaseConfigurationIndexDto.IS_CONTAGIOUS).setRenderer(new BooleanRenderer()); getColumn(DiseaseConfigurationIndexDto.CASE_SURVEILLANCE_ENABLED).setRenderer(new BooleanRenderer()); getColumn(DiseaseConfigurationIndexDto.EXTENDED_CLASSIFICATION).setRenderer(new BooleanRenderer()); getColumn(DiseaseConfigurationIndexDto.EXTENDED_CLASSIFICATION_MULTI).setRenderer(new BooleanRenderer()); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java index 216b790e449..43f6bb3ac2d 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java @@ -14,6 +14,7 @@ */ package de.symeda.sormas.ui.contact; +import java.util.Arrays; import java.util.List; import com.vaadin.server.Page; @@ -97,6 +98,8 @@ public class ContactDataView extends AbstractContactView implements HasName { private CommitDiscardWrapperComponent editComponent; + private final static List IMMUNIZATION_EXCLUDED_DISEASES = Arrays.asList(Disease.SALMONELLOSIS, Disease.SHIGELLOSIS); + public ContactDataView() { super(VIEW_NAME); } @@ -252,8 +255,9 @@ protected void initView(String params) { layout.addSidePanelComponent(eventsLayout, EVENTS_LOC); } - // Immunizations are not shown for Salmonellosis contacts - if (UiUtil.permitted(FeatureType.IMMUNIZATION_MANAGEMENT, UserRight.IMMUNIZATION_VIEW) && resolvedDisease != Disease.SALMONELLOSIS) { + // Immunizations are not shown for Salmonellosis & SHIGELLOSIS contacts + if (UiUtil.permitted(FeatureType.IMMUNIZATION_MANAGEMENT, UserRight.IMMUNIZATION_VIEW) + && !IMMUNIZATION_EXCLUDED_DISEASES.contains(resolvedDisease)) { if (!FacadeProvider.getFeatureConfigurationFacade() .isPropertyValueTrue(FeatureType.IMMUNIZATION_MANAGEMENT, FeatureTypeProperty.REDUCED)) { layout.addSidePanelComponent(new SideComponentLayout(new ImmunizationListComponent(() -> { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java index dbf0c2e3acf..b026693f1d8 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java @@ -18,6 +18,7 @@ package de.symeda.sormas.ui.epidata; import static de.symeda.sormas.ui.utils.CssStyles.H3; +import static de.symeda.sormas.ui.utils.CssStyles.H4; import static de.symeda.sormas.ui.utils.CssStyles.VSPACE_3; import static de.symeda.sormas.ui.utils.CssStyles.VSPACE_TOP_3; import static de.symeda.sormas.ui.utils.LayoutUtil.divsCss; @@ -28,10 +29,13 @@ import java.util.Arrays; import java.util.Collections; +import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.Optional; import java.util.function.Consumer; import java.util.function.Supplier; @@ -39,6 +43,7 @@ import org.apache.commons.lang3.StringUtils; import com.vaadin.shared.ui.ContentMode; +import com.vaadin.ui.Component; import com.vaadin.ui.CustomLayout; import com.vaadin.ui.Label; import com.vaadin.v7.ui.ComboBox; @@ -61,8 +66,10 @@ import de.symeda.sormas.api.disease.DiseaseConfigurationDto; import de.symeda.sormas.api.epidata.ClusterType; import de.symeda.sormas.api.epidata.EpiDataDto; +import de.symeda.sormas.api.exposure.ExposureDto; import de.symeda.sormas.api.exposure.InfectionSource; import de.symeda.sormas.api.exposure.ModeOfTransmission; +import de.symeda.sormas.api.exposure.ProphylaxisAdherence; import de.symeda.sormas.api.i18n.Descriptions; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.i18n.Strings; @@ -98,16 +105,20 @@ public class EpiDataForm extends AbstractEditForm { private static final String LOC_SOURCE_CASE_CONTACTS_HEADING = "locSourceCaseContactsHeading"; private static final String LOC_EPI_DATA_FIELDS_HINT = "locEpiDataFieldsHint"; private static final String LOC_EXP_PERIOD_HEADING = "locExpPeriodHeading"; + private static final String LOC_TRANSMISSIBILITY_PERIOD_HEADING = "locTransmissibilityPeriodHeading"; private static final String LOC_CUSTOMIZABLE_FIELDS_EXPOSURE_INVESTIGATION = CustomizableFieldGroup.EPIDATA_EXPOSURE_INVESTIGATION.getKey(); private static final String LOC_CUSTOMIZABLE_FIELDS_ACTIVITY_AS_CASE = CustomizableFieldGroup.EPIDATA_ACTIVITY_AS_CASE.getKey(); private static final String LOC_CUSTOMIZABLE_FIELDS_CONTACT_WITH_SOURCE_CASE = CustomizableFieldGroup.EPIDATA_CONTACT_WITH_SOURCE_CASE.getKey(); private static final String EXPOSURE_DATES_LAYOUT = fluidRowLocs(3, "EXPOSURE_START_DATE_LABEL", 3, "EXPOSURE_START_DATE_VALUE", 3, "EXPOSURE_END_DATE_LABEL", 3, "EXPOSURE_END_DATE_VALUE"); + private static final String ACTIVITY_AS_CASE_DATES_LAYOUT = + fluidRowLocs(3, "ACTIVITY_START_DATE_LABEL", 3, "ACTIVITY_START_DATE_VALUE", 3, "ACTIVITY_END_DATE_LABEL", 3, "ACTIVITY_END_DATE_VALUE"); + private static final String PROPHYLAXIS_LAYOUT = fluidRowLocs(3, "PROPHYLAXIS_LABEL", 3, "PROPHYLAXIS_VALUE", 6, ""); private static final String LOC_OTHER_INFORMATION_HEADING = "locOtherInformationHeading"; - private static final List CONCLUSION_ALLOWED_DISEASES = - Collections.unmodifiableList(Arrays.asList(Disease.CRYPTOSPORIDIOSIS, Disease.GIARDIASIS, Disease.MALARIA, Disease.DENGUE)); + private static final List CONCLUSION_ALLOWED_DISEASES = Collections + .unmodifiableList(Arrays.asList(Disease.CRYPTOSPORIDIOSIS, Disease.GIARDIASIS, Disease.MALARIA, Disease.DENGUE, Disease.SHIGELLOSIS)); //@formatter:off private static final String MAIN_HTML_LAYOUT = @@ -115,7 +126,6 @@ public class EpiDataForm extends AbstractEditForm { fluidRowLocs("EXP_DATES_LAYOUT") + loc(LOC_EXPOSURE_INVESTIGATION_HEADING) + fluidRowLocs(6,EpiDataDto.CASE_IMPORTED_STATUS,6,"") + - fluidRowLocs(6, EpiDataDto.EXPOSURE_INVESTIGATION_FROM_DATE, 6, EpiDataDto.EXPOSURE_INVESTIGATION_TO_DATE) + loc(LOC_EXP_PERIOD_HEADING) + loc(EpiDataDto.EXPOSURE_DETAILS_KNOWN) + loc(EpiDataDto.EXPOSURES) + @@ -126,8 +136,10 @@ public class EpiDataForm extends AbstractEditForm { fluidRowLocs(EpiDataDto.MODE_OF_TRANSMISSION, EpiDataDto.MODE_OF_TRANSMISSION_TYPE) + fluidRowLocs(EpiDataDto.INFECTION_SOURCE, EpiDataDto.INFECTION_SOURCE_TEXT) + fluidRowLocs(EpiDataDto.PLACE_OF_INFECTION, EpiDataDto.RESIDENCE_AT_ONSET) + + fluidRowLocs("PROPHYLAXIS_LAYOUT")+ loc(LOC_ACTIVITY_AS_CASE_INVESTIGATION_HEADING) + - fluidRowLocs(6, EpiDataDto.ACTIVITY_AS_CASE_FROM_DATE, 6, EpiDataDto.ACTIVITY_AS_CASE_TO_DATE) + + loc(LOC_TRANSMISSIBILITY_PERIOD_HEADING) + + fluidRowLocs("TRANSMISSIBILITY_DATES_LAYOUT") + loc(EpiDataDto.ACTIVITY_AS_CASE_DETAILS_KNOWN)+ loc(EpiDataDto.ACTIVITIES_AS_CASE) + loc(LOC_CUSTOMIZABLE_FIELDS_ACTIVITY_AS_CASE) + @@ -217,11 +229,7 @@ protected void addFields() { exposuresField.setWidthFull(); exposuresField.setPseudonymized(isPseudonymized); - if (parentClass == CaseDataDto.class) { - addActivityAsCaseFields(); - addField(EpiDataDto.ACTIVITY_AS_CASE_FROM_DATE, DateField.class); - addField(EpiDataDto.ACTIVITY_AS_CASE_TO_DATE, DateField.class); - } + addActivityAsCaseFields(); activityAsCasePanel = new CustomizableFieldsGroup(CustomizableFieldGroup.EPIDATA_ACTIVITY_AS_CASE); activityAsCasePanel.setVisibilityContext(new CustomizableFieldVisibilityContext().withDisease(disease)); @@ -255,14 +263,12 @@ protected void addFields() { ComboBox country = addInfrastructureField(EpiDataDto.COUNTRY); country.addItems(countries); - addField(EpiDataDto.EXPOSURE_INVESTIGATION_FROM_DATE, DateField.class); - addField(EpiDataDto.EXPOSURE_INVESTIGATION_TO_DATE, DateField.class); - includeExposureDates(symptomOnsetDate, disease); addField(EpiDataDto.AIRPORT_WORKER, NullableOptionGroup.class); addField(EpiDataDto.HEALTHCARE_PROFESSIONAL, NullableOptionGroup.class); addField(EpiDataDto.PLACE_OF_INFECTION); addField(EpiDataDto.RESIDENCE_AT_ONSET); + includeContagiousDates(symptomOnsetDate, disease); TextField clusterTypeTF = addField(EpiDataDto.CLUSTER_TYPE_TEXT); FieldHelper @@ -278,6 +284,13 @@ protected void addFields() { .setVisibleWhen(getFieldGroup(), EpiDataDto.MODE_OF_TRANSMISSION_TYPE, EpiDataDto.MODE_OF_TRANSMISSION, ModeOfTransmission.OTHER, true); FieldHelper.setVisibleWhen(getFieldGroup(), EpiDataDto.INFECTION_SOURCE_TEXT, EpiDataDto.INFECTION_SOURCE, InfectionSource.OTHER, true); FieldHelper.setVisibleWhen(getFieldGroup(), EpiDataDto.COUNTRY, EpiDataDto.IMPORTED_CASE, YesNoUnknown.YES, true); + // For Cryptosporidiosis and Giardiasis, and Shigellosis, the infection source field should be displayed based on transmission mode selection. + FieldHelper.setVisibleWhen( + getFieldGroup(), + EpiDataDto.INFECTION_SOURCE, + EpiDataDto.MODE_OF_TRANSMISSION, + Arrays.asList(ModeOfTransmission.FOOD_OR_WATER, ModeOfTransmission.ANIMAL_TO_HUMAN), + true); contactWithSourceCasePanel = new CustomizableFieldsGroup(CustomizableFieldGroup.EPIDATA_CONTACT_WITH_SOURCE_CASE); contactWithSourceCasePanel.setVisibilityContext(new CustomizableFieldVisibilityContext().withDisease(disease)); @@ -314,40 +327,110 @@ private void includeExposureDates(Date symptomOnsetDate, Disease disease) { return; } DiseaseConfigurationDto diseaseConfigurationDto = FacadeProvider.getDiseaseConfigurationFacade().getDiseaseConfiguration(disease); - if (diseaseConfigurationDto == null) { + if (diseaseConfigurationDto == null + || diseaseConfigurationDto.getIncubationPeriodEnabled() == null + || !diseaseConfigurationDto.getIncubationPeriodEnabled() + || diseaseConfigurationDto.getMaxIncubationPeriod() == null + || diseaseConfigurationDto.getMaxIncubationPeriod() == 0 + || diseaseConfigurationDto.getMinIncubationPeriod() == null) { return; } - if (diseaseConfigurationDto.getIncubationPeriodEnabled() == null || !diseaseConfigurationDto.getIncubationPeriodEnabled()) { + + CustomLayout exposureDatesLayout = new CustomLayout(); + exposureDatesLayout.setTemplateContents(EXPOSURE_DATES_LAYOUT); + exposureDatesLayout.addComponent(createInfoLabel(I18nProperties.getString(Strings.exposureStartDate)), "EXPOSURE_START_DATE_LABEL"); + + exposureDatesLayout.addComponent(addDateFieldToCustomLayout(diseaseConfigurationDto.getMaxIncubationPeriod()), "EXPOSURE_START_DATE_VALUE"); + + exposureDatesLayout.addComponent(createInfoLabel(I18nProperties.getString(Strings.exposureEndDate)), "EXPOSURE_END_DATE_LABEL"); + exposureDatesLayout.addComponent(addDateFieldToCustomLayout(diseaseConfigurationDto.getMinIncubationPeriod()), "EXPOSURE_END_DATE_VALUE"); + + getContent().addComponent(exposureDatesLayout, "EXP_DATES_LAYOUT"); + getContent().getComponent(LOC_EXPOSURE_PERIOD_CONSIDER_HEADING).setVisible(true); + } + + /** + * Displays prophylaxis adherence information in the form layout. + * + * @param value + * The prophylaxis adherence status to display. + */ + private void prophylaxisLayout(String value) { + if (value == null) { return; } - if (diseaseConfigurationDto.getMaxIncubationPeriod() == null || diseaseConfigurationDto.getMaxIncubationPeriod() == 0) { + CustomLayout prophylaxisLayout = new CustomLayout(); + prophylaxisLayout.setTemplateContents(PROPHYLAXIS_LAYOUT); + prophylaxisLayout.addComponent(createInfoLabel("Prophylaxis status"), "PROPHYLAXIS_LABEL"); + prophylaxisLayout.addComponent(createInfoLabel(value), "PROPHYLAXIS_VALUE"); + + getContent().addComponent(prophylaxisLayout, "PROPHYLAXIS_LAYOUT"); + getContent().getComponent(LOC_EXPOSURE_PERIOD_CONSIDER_HEADING).setVisible(true); + } + + /** + * calculates the Activity as Case from and to dates based on the symptom onset date and disease + * configuration for contagious-period. + * + * @param symptomOnsetDate + * @param disease + */ + private void includeContagiousDates(Date symptomOnsetDate, Disease disease) { + // By default, hiding the transmissibility period to consider heading, + // it will be visible only when all the conditions are met to show the activity as case from and to dates. + getContent().getComponent(LOC_TRANSMISSIBILITY_PERIOD_HEADING).setVisible(false); + // if symptomOnsetDate is null, return; + if (symptomOnsetDate == null) { return; } - if (diseaseConfigurationDto.getMinIncubationPeriod() == null) { + DiseaseConfigurationDto diseaseConfigurationDto = FacadeProvider.getDiseaseConfigurationFacade().getDiseaseConfiguration(disease); + + if (diseaseConfigurationDto == null + || diseaseConfigurationDto.getIsContagious() == null + || !diseaseConfigurationDto.getIsContagious() + || diseaseConfigurationDto.getMaxContagiousPeriod() == null + || diseaseConfigurationDto.getMinContagiousPeriod() == null) { return; } - CustomLayout exposureDatesLayout = new CustomLayout(); - exposureDatesLayout.setTemplateContents(EXPOSURE_DATES_LAYOUT); - Label exposureStartLabel = new Label(I18nProperties.getString(Strings.exposureStartDate)); - exposureStartLabel.addStyleNames(CssStyles.LABEL_BOLD, CssStyles.LABEL_UPPERCASE); - exposureDatesLayout.addComponent(exposureStartLabel, "EXPOSURE_START_DATE_LABEL"); - - DateField exposureStartDateValue = new DateField(); - exposureStartDateValue.setValue(DateHelper.subtractDays(symptomOnsetDate, diseaseConfigurationDto.getMaxIncubationPeriod())); - exposureStartDateValue.setReadOnly(true); - exposureDatesLayout.addComponent(exposureStartDateValue, "EXPOSURE_START_DATE_VALUE"); - - Label exposureEndLabel = new Label(I18nProperties.getString(Strings.exposureEndDate)); - exposureEndLabel.addStyleNames(CssStyles.LABEL_BOLD, CssStyles.LABEL_UPPERCASE); - exposureDatesLayout.addComponent(exposureEndLabel, "EXPOSURE_END_DATE_LABEL"); - DateField exposureEndDateValue = new DateField(); - exposureEndDateValue.setValue(DateHelper.subtractDays(symptomOnsetDate, diseaseConfigurationDto.getMinIncubationPeriod())); - exposureEndDateValue.setReadOnly(true); - exposureDatesLayout.addComponent(exposureEndDateValue, "EXPOSURE_END_DATE_VALUE"); + CustomLayout activityDatesLayout = new CustomLayout(); + activityDatesLayout.setTemplateContents(ACTIVITY_AS_CASE_DATES_LAYOUT); + activityDatesLayout.addComponent(createInfoLabel(I18nProperties.getString(Strings.transmissionStartDate)), "ACTIVITY_START_DATE_LABEL"); - getContent().addComponent(exposureDatesLayout, "EXP_DATES_LAYOUT"); - getContent().getComponent(LOC_EXPOSURE_PERIOD_CONSIDER_HEADING).setVisible(true); + activityDatesLayout.addComponent(addDateFieldToCustomLayout(diseaseConfigurationDto.getMaxContagiousPeriod()), "ACTIVITY_START_DATE_VALUE"); + + activityDatesLayout.addComponent(createInfoLabel(I18nProperties.getString(Strings.transmissionEndDate)), "ACTIVITY_END_DATE_LABEL"); + activityDatesLayout.addComponent(addDateFieldToCustomLayout(diseaseConfigurationDto.getMinContagiousPeriod()), "ACTIVITY_END_DATE_VALUE"); + + getContent().addComponent(activityDatesLayout, "TRANSMISSIBILITY_DATES_LAYOUT"); + getContent().getComponent(LOC_TRANSMISSIBILITY_PERIOD_HEADING).setVisible(true); + + } + + /** + * Calculate the custom dateField value based on the symptom onset date and the given period, and add it to the custom layout. + * + * @param period + * @return customPeriodDate + */ + private DateField addDateFieldToCustomLayout(Integer period) { + DateField customPeriodDate = new DateField(); + customPeriodDate.setValue(DateHelper.subtractDays(symptomOnsetDate, period)); + customPeriodDate.setReadOnly(true); + return customPeriodDate; + } + + /** + * Create a label with HTML content mode. + * + * @param value + * @return label + */ + private Label createInfoLabel(String value) { + Label label = new Label(value); + CssStyles.style(label, CssStyles.LABEL_BOLD, H4); + label.setContentMode(ContentMode.HTML); + return label; } private void addActivityAsCaseFields() { @@ -400,6 +483,9 @@ private void addHeadingsAndInfoTexts() { getContent().addComponent( new MultilineLabel(h3(I18nProperties.getString(Strings.headingExposurePeriodConsider)) + divsCss(VSPACE_3), ContentMode.HTML), LOC_EXPOSURE_PERIOD_CONSIDER_HEADING); + getContent().addComponent( + new MultilineLabel(h3(I18nProperties.getString(Strings.headingTransmissibilityPeriod)) + divsCss(VSPACE_3), ContentMode.HTML), + LOC_TRANSMISSIBILITY_PERIOD_HEADING); // Conclusion heading should be visible for all countries Giardiasis & Cryptosporidiosis specific fields getContent().addComponent( @@ -491,6 +577,29 @@ public Map> return ((ExposuresField) getField(EpiDataDto.EXPOSURES)).collectCustomizableFieldValues(); } + @Override + public void setValue(EpiDataDto newFieldValue) { + super.setValue(newFieldValue); + // In the Conclusion section, for Malaria, prophylaxis details are mandatory to display. so displaying the latest prophylaxis adherence status. + Optional adherence = newFieldValue.getExposures() + .stream() + .sorted(Comparator.comparing(ExposureDto::getStartDate, Comparator.nullsLast(Comparator.reverseOrder()))) + .map(ExposureDto::getProphylaxisAdherence) + .filter(Objects::nonNull) + .findFirst(); + if (adherence != null && adherence.isPresent() && adherence.get() != null) { + prophylaxisLayout(I18nProperties.getEnumCaption(adherence.get())); + } else { + // delete the prophylaxis layout if the latest prophylaxis adherence status is null. + Component prophylaxisComponent = getContent().getComponent("PROPHYLAXIS_LAYOUT"); + if (prophylaxisComponent != null) { + getContent().getComponent("PROPHYLAXIS_LAYOUT").setVisible(false); + getContent().removeComponent("PROPHYLAXIS_LAYOUT"); + } + + } + } + @Override protected String createHtmlLayout() { // Source contacts YESNOUnknown field should be visible only the diseases which are follow-up enabled, diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java index 8720a9fc2a3..d019202bb66 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java @@ -131,7 +131,8 @@ public class PersonEditForm extends AbstractEditForm { Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, Disease.MALARIA, - Disease.DENGUE))); + Disease.DENGUE, + Disease.SHIGELLOSIS))); //@formatter:off private static final String HTML_LAYOUT = loc(PERSON_INFORMATION_HEADING_LOC) + diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestController.java index ad2e3dc0f80..7f52f773dcd 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestController.java @@ -19,6 +19,7 @@ import static com.vaadin.ui.Notification.Type.TRAY_NOTIFICATION; +import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.List; @@ -37,7 +38,6 @@ import de.symeda.sormas.api.CountryHelper; import de.symeda.sormas.api.Disease; -import de.symeda.sormas.api.DiseaseHelper; import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.caze.CaseClassification; import de.symeda.sormas.api.caze.CaseDataDto; @@ -76,6 +76,10 @@ public class PathogenTestController { private final PathogenTestFacade facade = FacadeProvider.getPathogenTestFacade(); + // Antibiotic susceptibility test is applicable for TB(Lux), IMI, IPI and Shigellosis. For others it should be null. + private static final List AST_ALLOWED_DISEASES = + Arrays.asList(Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, Disease.SHIGELLOSIS); + public PathogenTestController() { } @@ -341,9 +345,8 @@ public void savePathogenTests(List pathogenTests, SampleReferen p.setSample(sampleRef); boolean luxTB = FacadeProvider.getConfigFacade().isConfiguredCountry(CountryHelper.COUNTRY_CODE_LUXEMBOURG) && Disease.TUBERCULOSIS == p.getTestedDisease(); - boolean invasiveDisease = DiseaseHelper.checkDiseaseIsInvasiveBacterialDiseases(p.getTestedDisease()); //the susceptibility test is applicable only for LUX TB and all-countries invasive disease - if (PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY == p.getTestType() && !luxTB && !invasiveDisease) { + if (PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY == p.getTestType() && !luxTB && !AST_ALLOWED_DISEASES.contains(p.getTestedDisease())) { p.setDrugSusceptibility(null); } facade.savePathogenTest(p); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/DiseaseSectionFactory.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/DiseaseSectionFactory.java index 493fcfc1d6f..9a46a1029c9 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/DiseaseSectionFactory.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/DiseaseSectionFactory.java @@ -49,6 +49,8 @@ public static AbstractDiseaseSectionComponent forDisease(Disease disease) { return new DengueSectionComponent(); case MALARIA: return new MalariaSectionComponent(); + case SHIGELLOSIS: + return new ShigellosisSectionComponent(); default: return new DefaultSectionComponent(); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.java new file mode 100644 index 00000000000..7c9016f49cc --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.java @@ -0,0 +1,204 @@ +/******************************************************************************* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2026 SORMAS Foundation gGmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + *******************************************************************************/ +package de.symeda.sormas.ui.samples.diseasesection; + +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.TextField; + +import de.symeda.sormas.api.FacadeProvider; +import de.symeda.sormas.api.sample.PathogenSpecie; +import de.symeda.sormas.api.sample.PathogenTestDto; +import de.symeda.sormas.api.sample.PathogenTestResultType; +import de.symeda.sormas.api.sample.PathogenTestType; +import de.symeda.sormas.api.sample.SerotypingMethod; +import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; +import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; +import de.symeda.sormas.ui.samples.events.SetTestResultEvent; +import de.symeda.sormas.ui.samples.events.TestResultChangedEvent; +import de.symeda.sormas.ui.samples.events.TestTypeChangedEvent; +import de.symeda.sormas.ui.therapy.DrugSusceptibilityForm; + +public class ShigellosisSectionComponent extends AbstractDiseaseSectionComponent { + + private static final long serialVersionUID = 1L; + + private DrugSusceptibilityForm drugSusceptibilityField; + private ComboBox specie; + private TextField specieTextField; + private ComboBox serotypingMethodField; + private TextField serotypingMethodTextField; + + private PathogenTestType currentTestType; + private PathogenTestResultType currentResult; + private TextField serotypeField; + + @Override + protected void buildLayout() { + + // Shigellosis species + specie = createComboBox(PathogenTestDto.SPECIE); + specie.setItemCaptionGenerator(PathogenSpecie::toString); + specie.setVisible(false); + updateComboBoxByDiseaseAndTestType(specie, PathogenSpecie.class, disease, currentTestType); + + specieTextField = createTextField(PathogenTestDto.SPECIE_TEXT); + specieTextField.setVisible(false); + + addRow(specie, specieTextField); + + serotypeField = createTextField(PathogenTestDto.SEROTYPE_TEXT); + serotypeField.setVisible(false); + addRow(serotypeField); + + serotypingMethodField = createComboBox(PathogenTestDto.SEROTYPING_METHOD); + serotypingMethodField.setItems(SerotypingMethod.values()); + serotypingMethodField.setItemCaptionGenerator(SerotypingMethod::toString); + serotypingMethodField.setVisible(false); + + serotypingMethodTextField = createTextField(PathogenTestDto.SERO_TYPING_METHOD_TEXT); + serotypingMethodTextField.setVisible(false); + addRow(serotypingMethodField, serotypingMethodTextField); + + binder.forField(specie).bind(PathogenTestDto::getSpecie, PathogenTestDto::setSpecie); + binder.forField(serotypingMethodField).bind(PathogenTestDto::getSeroTypingMethod, PathogenTestDto::setSeroTypingMethod); + binder.forField(serotypingMethodTextField).bind(PathogenTestDto::getSeroTypingMethodText, PathogenTestDto::setSeroTypingMethodText); + binder.forField(specieTextField).bind(PathogenTestDto::getSpecieText, PathogenTestDto::setSpecieText); + + // DrugSusceptibilityForm + drugSusceptibilityField = new DrugSusceptibilityForm( + FieldVisibilityCheckers.getNoop(), + UiFieldAccessCheckers.getDefault(true, FacadeProvider.getConfigFacade().getCountryLocale())); + drugSusceptibilityField.setCaption(null); + + fieldGroup.bind(drugSusceptibilityField, PathogenTestDto.DRUG_SUSCEPTIBILITY); + + addDrugSusceptibilityField(drugSusceptibilityField); + } + + @Override + protected void wireVisibility() { + + // serotypingMethodText visible only when OTHER + track(serotypingMethodField.addValueChangeListener(e -> { + boolean showText = e.getValue() == SerotypingMethod.OTHER; + serotypingMethodTextField.setVisible(showText); + if (!showText) { + serotypingMethodTextField.clear(); + } + })); + + // Species text visible only when OTHER + track(specie.addValueChangeListener(e -> { + boolean showText = e.getValue() == PathogenSpecie.OTHER; + specieTextField.setVisible(showText); + if (!showText) { + specieTextField.clear(); + } + })); + + track(eventBus.on(TestTypeChangedEvent.class, event -> { + currentTestType = event.getTestType(); + updateDrugSusceptibility(currentTestType); + updateComboBoxByDiseaseAndTestType(specie, PathogenSpecie.class, disease, currentTestType); + updateComboBoxByDiseaseAndTestType(serotypingMethodField, SerotypingMethod.class, disease, currentTestType); + if (currentTestType != null && currentTestType == PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY) { + eventBus.fire(new SetTestResultEvent(PathogenTestResultType.NOT_APPLICABLE)); + } else if (currentTestType != null && currentTestType == PathogenTestType.SEROGROUPING) { + eventBus.fire(new SetTestResultEvent(PathogenTestResultType.POSITIVE)); + } else { + eventBus.fire(new SetTestResultEvent(null)); + } + })); + + track(eventBus.on(TestResultChangedEvent.class, event -> { + currentResult = event.getTestResult(); + if (config.isLuxembourg) { + updateFieldVisibility(); + } + })); + } + + private void updateDrugSusceptibility(PathogenTestType testType) { + if (drugSusceptibilityField != null) { + boolean visible = drugSusceptibilityField.updateFieldsVisibility(disease, testType); + setDrugSusceptibilityRowVisible(visible); + } + } + + private void updateFieldVisibility() { + boolean isPositive = currentResult == PathogenTestResultType.POSITIVE; + // Serogrouping test: only show specie, hide drug susceptibility and serotyping method + boolean isSerogroupingTest = isPositive && currentTestType == PathogenTestType.SEROGROUPING; + specie.setVisible(isSerogroupingTest); + serotypeField.setVisible(isSerogroupingTest); + if (!isSerogroupingTest) { + serotypingMethodField.clear(); + serotypingMethodTextField.setVisible(false); + serotypingMethodTextField.clear(); + specie.clear(); + specieTextField.setVisible(false); + specieTextField.clear(); + serotypeField.clear(); + serotypeField.setVisible(false); + } + + boolean showDrugSusceptibilityForm = currentTestType != null && currentTestType == PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY; + if (!showDrugSusceptibilityForm) { + serotypingMethodField.clear(); + serotypingMethodTextField.clear(); + serotypingMethodTextField.setVisible(false); + } + serotypingMethodField.setVisible(isSerogroupingTest || showDrugSusceptibilityForm); + updateRowAndSelfVisibility(); + } + + @Override + public void cleanup() { + PathogenTestDto dto = binder.getBean(); + if (dto == null) { + return; + } + dto.setDrugSusceptibility(null); + dto.setSeroTypingMethod(null); + dto.setSeroTypingMethodText(null); + dto.setSpecie(null); + dto.setSpecieText(null); + } + + @Override + protected void clearOwnedFields() { + PathogenTestDto dto = binder.getBean(); + if (dto == null) { + return; + } + dto.setDrugSusceptibility(null); + dto.setSeroTypingMethod(null); + dto.setSeroTypingMethodText(null); + dto.setSpecie(null); + dto.setSpecieText(null); + + } + + @Override + protected void unbindLegacyFields() { + if (drugSusceptibilityField != null) { + fieldGroup.unbind(drugSusceptibilityField); + drugSusceptibilityField = null; + } + } +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java index 91535c57c60..d6f12937770 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java @@ -17,12 +17,6 @@ *******************************************************************************/ package de.symeda.sormas.ui.samples.pathogentestlink; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import org.apache.commons.lang3.StringUtils; import org.jetbrains.annotations.Nullable; @@ -35,11 +29,9 @@ import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.DiseaseHelper; import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.sample.PathogenSpecie; import de.symeda.sormas.api.sample.PathogenTestDto; import de.symeda.sormas.api.sample.PathogenTestResultType; import de.symeda.sormas.api.sample.PathogenTestType; -import de.symeda.sormas.api.sample.Serotype; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.ui.utils.CssStyles; import de.symeda.sormas.ui.utils.DateFormatHelper; @@ -49,21 +41,7 @@ public class PathogenTestListEntry extends SideComponentField { private final PathogenTestDto pathogenTest; - //@formatter:off - public static final Map> VARIANT_MAP = Collections.unmodifiableMap(new HashMap<>() { - { - put(Disease.MALARIA, Collections.unmodifiableList(Arrays.asList(PathogenTestType.THIN_BLOOD_SMEAR, PathogenTestType.RAPID_TEST, PathogenTestType.PCR_RT_PCR, - PathogenTestType.Q_PCR, PathogenTestType.LAMP, PathogenTestType.INDIRECT_FLUORESCENT_ANTIBODY, PathogenTestType.OTHER_MOLECULAR_ASSAY, - PathogenTestType.OTHER_SEROLOGICAL_TEST, PathogenTestType.OTHER_ANTIGEN_DETECTION_TEST, PathogenTestType.ENZYME_LINKED_IMMUNOSORBENT_ASSAY, PathogenTestType.ANTIGEN_DETECTION))); - put(Disease.DENGUE, Collections.unmodifiableList(Arrays.asList(PathogenTestType.NAAT, PathogenTestType.NEUTRALIZING_ANTIBODIES, PathogenTestType.PCR_RT_PCR))); - put(Disease.MEASLES, Collections.unmodifiableList(Arrays.asList(PathogenTestType.GENOTYPING))); - put(Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, Collections.unmodifiableList(Arrays.asList(PathogenTestType.SEROGROUPING, PathogenTestType.MULTILOCUS_SEQUENCE_TYPING, - PathogenTestType.SLIDE_AGGLUTINATION,PathogenTestType.WHOLE_GENOME_SEQUENCING, PathogenTestType.SEQUENCING))); - put(Disease.TUBERCULOSIS, Collections.unmodifiableList(Arrays.asList(PathogenTestType.MICROSCOPY, PathogenTestType.BEIJINGGENOTYPING, - PathogenTestType.SPOLIGOTYPING, PathogenTestType.MIRU_PATTERN_CODE))); - } - }); - //@formatter:on + public PathogenTestListEntry(PathogenTestDto pathogenTest, boolean showTestResultText) { this.pathogenTest = pathogenTest; @@ -73,8 +51,8 @@ public PathogenTestListEntry(PathogenTestDto pathogenTest, boolean showTestResul topLabelLayout.setMargin(false); topLabelLayout.setWidth(100, Unit.PERCENTAGE); addComponentToField(topLabelLayout); - Label labelTopLeft = new Label( - PathogenTestType.toString(pathogenTest.getTestType(), pathogenTest.getTestTypeText(), pathogenTest.getTestedDisease())); + Label labelTopLeft = + new Label(PathogenTestType.toString(pathogenTest.getTestType(), pathogenTest.getTestTypeText(), pathogenTest.getTestedDisease())); CssStyles.style(labelTopLeft, CssStyles.LABEL_BOLD, CssStyles.LABEL_UPPERCASE); topLabelLayout.addComponent(labelTopLeft); @@ -131,9 +109,9 @@ public PathogenTestListEntry(PathogenTestDto pathogenTest, boolean showTestResul } PathogenTestType testType = pathogenTest.getTestType(); - Object resultText = getResultText(pathogenTest, testType); + Object resultText = determineSideComponentVariant(pathogenTest); - Label labelResult = new Label(DataHelper.toStringNullable(resultText)); + Label labelResult = new Label(DataHelper.toStringNullable(resultText == null ? pathogenTest.getTestResult() : resultText)); CssStyles.style(labelResult, CssStyles.LABEL_BOLD, CssStyles.LABEL_UPPERCASE); if (pathogenTest.getTestResult() == PathogenTestResultType.POSITIVE) { CssStyles.style(labelResult, CssStyles.LABEL_CRITICAL); @@ -161,59 +139,6 @@ public PathogenTestListEntry(PathogenTestDto pathogenTest, boolean showTestResul } } - private Object getResultText(PathogenTestDto pathogenTest, PathogenTestType testType) { - if (testType == null) { - return ""; - } - Object resultText = ""; - if (pathogenTest.getTestedDisease() == Disease.TUBERCULOSIS && VARIANT_MAP.get(pathogenTest.getTestedDisease()).contains(testType)) { - if (testType == PathogenTestType.MICROSCOPY) { - resultText = StringUtils.abbreviate((pathogenTest.getTestScale() != null ? pathogenTest.getTestScale().toString() : ""), 125); - } else if (testType == PathogenTestType.BEIJINGGENOTYPING) { - resultText = - StringUtils.abbreviate((pathogenTest.getStrainCallStatus() != null ? pathogenTest.getStrainCallStatus().toString() : ""), 125); - } else if (testType == PathogenTestType.SPOLIGOTYPING) { - resultText = StringUtils.abbreviate((pathogenTest.getSpecie() != null ? pathogenTest.getSpecie().toString() : ""), 125); - } else if (testType == PathogenTestType.MIRU_PATTERN_CODE) { - resultText = StringUtils.abbreviate(pathogenTest.getPatternProfile(), 125); - } - } else if (testType == PathogenTestType.GENOTYPING) { - resultText = StringUtils.abbreviate((pathogenTest.getGenoType() != null ? pathogenTest.getGenoType().toString() : ""), 125); - } else if (pathogenTest.getTestedDisease() == Disease.MALARIA - && VARIANT_MAP.get(pathogenTest.getTestedDisease()).stream().anyMatch(testType::equals)) { - // handling other specie - if (pathogenTest.getSpecie() == PathogenSpecie.OTHER) { - resultText = StringUtils.abbreviate((pathogenTest.getSpecieText() != null ? pathogenTest.getSpecieText().toString() : ""), 125); - } else { - resultText = StringUtils.abbreviate((pathogenTest.getSpecie() != null ? pathogenTest.getSpecie().toString() : ""), 125); - } - - } else if (pathogenTest.getTestedDisease() == Disease.INVASIVE_PNEUMOCOCCAL_INFECTION - && VARIANT_MAP.get(pathogenTest.getTestedDisease()).stream().anyMatch(testType::equals)) { - // IPI serotyping stores the serogroup/serotype in the free-text field; show it instead of the plain result - if (!DataHelper.isNullOrEmpty(pathogenTest.getSerotypeText())) { - resultText = StringUtils.abbreviate(pathogenTest.getSerotypeText(), 125); - } else if (pathogenTest.getSerotype() != null) { - resultText = StringUtils.abbreviate(pathogenTest.getSerotype().toString(), 125); - } else { - resultText = pathogenTest.getTestResult(); - } - - } else if (pathogenTest.getTestedDisease() == Disease.DENGUE - && VARIANT_MAP.get(pathogenTest.getTestedDisease()).stream().anyMatch(testType::equals)) { - // handling other serotypes - if (pathogenTest.getSerotype() == Serotype.OTHER) { - resultText = StringUtils.abbreviate((pathogenTest.getSerotypeText() != null ? pathogenTest.getSerotypeText().toString() : ""), 125); - } else { - resultText = StringUtils.abbreviate((pathogenTest.getSerotype() != null ? pathogenTest.getSerotype().toString() : ""), 125); - } - - } else { - resultText = pathogenTest.getTestResult(); - } - return resultText; - } - @Nullable private static String getDiseaseOrPathogenCaption(PathogenTestDto pathogenTest) { final String diseaseOrPathogen; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/sampleLink/SampleListEntry.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/sampleLink/SampleListEntry.java index 3d516dc73a6..18625057638 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/sampleLink/SampleListEntry.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/sampleLink/SampleListEntry.java @@ -25,7 +25,6 @@ import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.themes.ValoTheme; -import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.feature.FeatureType; import de.symeda.sormas.api.i18n.Captions; @@ -33,18 +32,15 @@ import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.sample.AdditionalTestingStatus; -import de.symeda.sormas.api.sample.PathogenSpecie; import de.symeda.sormas.api.sample.PathogenTestDto; import de.symeda.sormas.api.sample.PathogenTestResultType; import de.symeda.sormas.api.sample.SampleListEntryDto; import de.symeda.sormas.api.sample.SamplePurpose; import de.symeda.sormas.api.sample.SamplingReason; -import de.symeda.sormas.api.sample.Serotype; import de.symeda.sormas.api.sample.SpecimenCondition; import de.symeda.sormas.api.user.UserRight; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.ui.UiUtil; -import de.symeda.sormas.ui.samples.pathogentestlink.PathogenTestListEntry; import de.symeda.sormas.ui.utils.ButtonHelper; import de.symeda.sormas.ui.utils.CssStyles; import de.symeda.sormas.ui.utils.DateFormatHelper; @@ -161,32 +157,10 @@ public SampleListEntry(SampleListEntryDto sampleListEntryDto) { bottomLayout.addComponent(cqValue); } // Need to include the variants - String variant = null; - if (latestTest.getTestedDisease() == Disease.MALARIA - && PathogenTestListEntry.VARIANT_MAP.get(latestTest.getTestedDisease()).stream().anyMatch(latestTest.getTestType()::equals)) { - if (latestTest.getSpecie() == PathogenSpecie.OTHER) { - variant = StringUtils.abbreviate((latestTest.getSpecieText() != null ? latestTest.getSpecieText().toString() : ""), 125); - } else { - variant = StringUtils.abbreviate((latestTest.getSpecie() != null ? latestTest.getSpecie().toString() : ""), 125); - } - } else if (latestTest.getTestedDisease() == Disease.DENGUE - && PathogenTestListEntry.VARIANT_MAP.get(latestTest.getTestedDisease()).stream().anyMatch(latestTest.getTestType()::equals)) { - if (latestTest.getSerotype() == Serotype.OTHER) { - variant = StringUtils.abbreviate((latestTest.getSerotypeText() != null ? latestTest.getSerotypeText().toString() : ""), 125); - } else { - variant = StringUtils.abbreviate((latestTest.getSerotype() != null ? latestTest.getSerotype().toString() : ""), 125); - } - } else if (latestTest.getTestedDisease() == Disease.MEASLES) { - if (latestTest.getGenoType() != null) { - variant = StringUtils.abbreviate((latestTest.getGenoTypeText() != null ? latestTest.getGenoTypeText().toString() : ""), 125); - } else { - variant = StringUtils.abbreviate((latestTest.getGenoType() != null ? latestTest.getGenoType().toString() : ""), 125); - } - } else { - variant = ""; - } + String variant = determineSideComponentVariant(latestTest); + if (StringUtils.isNotBlank(variant)) { - Label variantLabel = new Label(DataHelper.toStringNullable(variant)); + Label variantLabel = new Label(DataHelper.toStringNullable(variant == null ? latestTest.getTestResult() : variant)); if (latestTest.getTestResult() == PathogenTestResultType.POSITIVE) { CssStyles.style(variantLabel, CssStyles.LABEL_BOLD, CssStyles.LABEL_CRITICAL); } else { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java index 50edbbb7f58..3f0aa88c5fd 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java @@ -140,8 +140,12 @@ public class SymptomsForm extends AbstractEditForm { private static Map> symptomGroupMap = new HashMap<>(); public static final String SKIN_RASH_ONSET_DATE_LAYOUT = fluidRowLocs(6, "LBL_SKIN_RASH_ONSET_DATE", 1, "", 5, SKIN_RASH_ONSET_DATE); - private static final List CLINICAL_SIGNS_AND_SYMPTOMS_HIDE_DISEASES = - Arrays.asList(Disease.MALARIA, Disease.INVASIVE_MENINGOCOCCAL_INFECTION, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, Disease.PERTUSSIS); + private static final List CLINICAL_SIGNS_AND_SYMPTOMS_HIDE_DISEASES = Arrays.asList( + Disease.MALARIA, + Disease.INVASIVE_MENINGOCOCCAL_INFECTION, + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Disease.PERTUSSIS, + Disease.SHIGELLOSIS); final boolean isLuxDengue; final boolean isParasiticInfectiousDiseases; final boolean isFoodborneGastrointestinal; @@ -554,7 +558,10 @@ public String getFormattedHtmlMessage() { SCANT_HEMORRHAGE, OTHER_NEUROLOCAL_SYMPTOM, OTHER_NEUROLOCAL_SYMPTOM_TEXT, - FATAL_RISK); + FATAL_RISK, + TENESMUS, + BLOODY_DIARRHEA, + HAEMOLYTIC_UREMIC_SYNDROME); addField(SYMPTOMS_COMMENTS, TextField.class).setDescription( I18nProperties.getPrefixDescription(I18N_PREFIX, SYMPTOMS_COMMENTS, "") + "\n" + I18nProperties.getDescription(Descriptions.descGdpr)); @@ -673,7 +680,8 @@ public String getFormattedHtmlMessage() { clinicalMeasurementsHeadingLabel.setVisible( (Set.of(TEMPERATURE_SOURCE, BLOOD_PRESSURE_SYSTOLIC, BLOOD_PRESSURE_DIASTOLIC, HEART_RATE, RESPIRATORY_RATE, WEIGHT, GLASGOW_COMA_SCALE) .stream() - .anyMatch(e -> getFieldGroup().getField(e).isVisible())) || !(isParasiticInfectiousDiseases || isLuxDengue || isFoodborneGastrointestinal)); + .anyMatch(e -> getFieldGroup().getField(e).isVisible())) + || !(isParasiticInfectiousDiseases || isLuxDengue || isFoodborneGastrointestinal)); // clinical Measurements HeadingLabel should be hidden for LUX Dengue, Crypto & Giardiasis, and Salmonellosis if ((isParasiticInfectiousDiseases || isLuxDengue || isFoodborneGastrointestinal)) { clinicalMeasurementsHeadingLabel.setVisible(false); @@ -887,7 +895,10 @@ public String getFormattedHtmlMessage() { DISSEMINATED_INTRA_VASCULAR_COAGULATION, CEREBRAL_MALARIA, SCANT_HEMORRHAGE, - FATAL_RISK); + FATAL_RISK, + TENESMUS, + BLOODY_DIARRHEA, + HAEMOLYTIC_UREMIC_SYNDROME); // Set visibilities diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/therapy/DrugSusceptibilityForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/therapy/DrugSusceptibilityForm.java index c7aab0cad85..cee49e156e5 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/therapy/DrugSusceptibilityForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/therapy/DrugSusceptibilityForm.java @@ -68,6 +68,11 @@ public class DrugSusceptibilityForm extends AbstractEditForm> VARIANT_MAP = Collections.unmodifiableMap(new HashMap<>() { + + { + put( + Disease.MALARIA, + Collections.unmodifiableList( + Arrays.asList( + PathogenTestType.THIN_BLOOD_SMEAR, + PathogenTestType.RAPID_TEST, + PathogenTestType.PCR_RT_PCR, + PathogenTestType.Q_PCR, + PathogenTestType.LAMP, + PathogenTestType.INDIRECT_FLUORESCENT_ANTIBODY, + PathogenTestType.OTHER_MOLECULAR_ASSAY, + PathogenTestType.OTHER_SEROLOGICAL_TEST, + PathogenTestType.OTHER_ANTIGEN_DETECTION_TEST, + PathogenTestType.ENZYME_LINKED_IMMUNOSORBENT_ASSAY, + PathogenTestType.ANTIGEN_DETECTION))); + put( + Disease.DENGUE, + Collections.unmodifiableList( + Arrays.asList(PathogenTestType.NAAT, PathogenTestType.NEUTRALIZING_ANTIBODIES, PathogenTestType.PCR_RT_PCR))); + put(Disease.SHIGELLOSIS, Collections.unmodifiableList(Arrays.asList(PathogenTestType.SEROGROUPING))); + put(Disease.MEASLES, Collections.unmodifiableList(Arrays.asList(PathogenTestType.GENOTYPING))); + put( + Disease.INVASIVE_PNEUMOCOCCAL_INFECTION, + Collections.unmodifiableList( + Arrays.asList( + PathogenTestType.SEROGROUPING, + PathogenTestType.MULTILOCUS_SEQUENCE_TYPING, + PathogenTestType.SLIDE_AGGLUTINATION, + PathogenTestType.WHOLE_GENOME_SEQUENCING, + PathogenTestType.SEQUENCING))); + put( + Disease.TUBERCULOSIS, + Collections.unmodifiableList( + Arrays.asList( + PathogenTestType.MICROSCOPY, + PathogenTestType.BEIJINGGENOTYPING, + PathogenTestType.SPOLIGOTYPING, + PathogenTestType.MIRU_PATTERN_CODE))); + } + }); + + String variant = null; + if (pathogenTest.getTestedDisease() == Disease.TUBERCULOSIS + && VARIANT_MAP.get(pathogenTest.getTestedDisease()).contains(pathogenTest.getTestType())) { + if (pathogenTest.getTestType() == PathogenTestType.MICROSCOPY) { + variant = StringUtils.abbreviate((pathogenTest.getTestScale() != null ? pathogenTest.getTestScale().toString() : ""), 125); + } else if (pathogenTest.getTestType() == PathogenTestType.BEIJINGGENOTYPING) { + variant = + StringUtils.abbreviate((pathogenTest.getStrainCallStatus() != null ? pathogenTest.getStrainCallStatus().toString() : ""), 125); + } else if (pathogenTest.getTestType() == PathogenTestType.SPOLIGOTYPING) { + variant = StringUtils.abbreviate((pathogenTest.getSpecie() != null ? pathogenTest.getSpecie().toString() : ""), 125); + } else if (pathogenTest.getTestType() == PathogenTestType.MIRU_PATTERN_CODE) { + variant = StringUtils.abbreviate(pathogenTest.getPatternProfile(), 125); + } + } else if (Arrays.asList(Disease.MALARIA, Disease.SHIGELLOSIS).contains(pathogenTest.getTestedDisease()) + && VARIANT_MAP.get(pathogenTest.getTestedDisease()).stream().anyMatch(pathogenTest.getTestType()::equals)) { // handling other specie + if (pathogenTest.getSpecie() == PathogenSpecie.OTHER) { + variant = StringUtils.abbreviate((pathogenTest.getSpecieText() != null ? pathogenTest.getSpecieText().toString() : ""), 125); + } else { + variant = StringUtils.abbreviate((pathogenTest.getSpecie() != null ? pathogenTest.getSpecie().toString() : ""), 125); + } + + } else if (pathogenTest.getTestedDisease() == Disease.INVASIVE_PNEUMOCOCCAL_INFECTION + && VARIANT_MAP.get(pathogenTest.getTestedDisease()).stream().anyMatch(pathogenTest.getTestType()::equals)) { // IPI serotyping stores the serogroup/serotype in the free-text field; show it instead of the plain result + if (!DataHelper.isNullOrEmpty(pathogenTest.getSerotypeText())) { + variant = StringUtils.abbreviate(pathogenTest.getSerotypeText(), 125); + } else if (pathogenTest.getSerotype() != null) { + variant = StringUtils.abbreviate(pathogenTest.getSerotype().toString(), 125); + } else { + variant = null; + } + + } else if (pathogenTest.getTestedDisease() == Disease.DENGUE + && VARIANT_MAP.get(pathogenTest.getTestedDisease()).stream().anyMatch(pathogenTest.getTestType()::equals)) { + // handling other serotypes + if (pathogenTest.getSerotype() == Serotype.OTHER) { + variant = StringUtils.abbreviate((pathogenTest.getSerotypeText() != null ? pathogenTest.getSerotypeText().toString() : ""), 125); + } else { + variant = StringUtils.abbreviate((pathogenTest.getSerotype() != null ? pathogenTest.getSerotype().toString() : ""), 125); + } + + } else { + variant = null; + } + return variant; + } } diff --git a/sormas-ui/src/main/webapp/VAADIN/themes/sormas/views/disease.scss b/sormas-ui/src/main/webapp/VAADIN/themes/sormas/views/disease.scss index 2236db5ae84..881099f5a6d 100644 --- a/sormas-ui/src/main/webapp/VAADIN/themes/sormas/views/disease.scss +++ b/sormas-ui/src/main/webapp/VAADIN/themes/sormas/views/disease.scss @@ -603,4 +603,13 @@ fill: #a04000; } } + .background-disease-shigellosis { + background-color: #bd1307; + fill: #bd1307; + + &.background-darker { + background-color: #DAAA69; + fill: #DAAA69; + } + } } \ No newline at end of file From 72de8927ad8641cf390285f618903b4d3f03f2ee Mon Sep 17 00:00:00 2001 From: Karnaiah Pesula Date: Tue, 2 Jun 2026 11:31:50 +0200 Subject: [PATCH 2/5] fixed the review comments --- .../de/symeda/sormas/api/exposure/ExposureDto.java | 3 ++- .../sormas/api/exposure/ModeOfTransmission.java | 1 - .../de/symeda/sormas/api/sample/PathogenSpecie.java | 3 +-- .../symeda/sormas/api/sample/SerotypingMethod.java | 1 + .../de/symeda/sormas/api/symptoms/SymptomsDto.java | 12 +++++++----- .../disease/DiseaseConfigurationFacadeEjb.java | 6 +++++- .../de/symeda/sormas/backend/symptoms/Symptoms.java | 10 +++++----- .../sormas/backend/symptoms/SymptomsFacadeEjb.java | 4 ++-- .../src/main/resources/sql/sormas_schema.sql | 5 ++--- .../de/symeda/sormas/ui/epidata/EpiDataForm.java | 2 +- 10 files changed, 26 insertions(+), 21 deletions(-) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java index 6e08b58c79b..95fee8269b4 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java @@ -20,6 +20,7 @@ import java.util.Set; import javax.validation.Valid; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import de.symeda.sormas.api.CountryHelper; @@ -151,7 +152,7 @@ public class ExposureDto extends PseudonymizableDto { @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String description; -// @NotNull(message = Validations.requiredField) + @NotNull(message = Validations.requiredField) private ExposureType exposureType; @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ModeOfTransmission.java b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ModeOfTransmission.java index 7634461bb3c..d659a2c99e5 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ModeOfTransmission.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ModeOfTransmission.java @@ -43,7 +43,6 @@ public enum ModeOfTransmission { @Diseases({ Disease.GIARDIASIS, Disease.CRYPTOSPORIDIOSIS, - Disease.SHIGELLOSIS, Disease.SHIGELLOSIS }) HEALTHCARE_ASSOCIATED, @Diseases({ diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java index 3a03147f9bb..19cd0dddc6a 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java @@ -194,9 +194,8 @@ public enum PathogenSpecie { @ApplicableToPathogenTests(value = { PathogenTestType.SEROGROUPING }) SHIGELLA_SPP, - + // OTHER and UNKNOWN are mostly applicable for all diseases and pathogen tests, so we don't specify them as applicable to specific diseases or tests OTHER, - UNKNOWN, @Diseases({ Disease.TUBERCULOSIS, diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java index c5ac14439ff..23473de1acd 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java @@ -79,6 +79,7 @@ public enum SerotypingMethod { PathogenTestType.SEROGROUPING, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) WGS_PREDICTION, + // OTHER is mostly applicable for all diseases and pathogen tests, so we don't specify them as applicable to specific diseases or tests OTHER; @Override diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java index 4c966a14c14..16efc9ab2a9 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java @@ -3191,8 +3191,10 @@ public static SymptomsDto build() { @SymptomGrouping(SymptomGroup.GENERAL) @Complication({ SHIGELLOSIS }) - private SymptomState haemolyticuremicsyndrome; + private SymptomState haemolyticUremicSyndrome; + @Diseases({ + SHIGELLOSIS }) @Complication({ SHIGELLOSIS }) @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) @@ -5391,12 +5393,12 @@ public void setTenesmus(SymptomState tenesmus) { this.tenesmus = tenesmus; } - public SymptomState getHaemolyticuremicsyndrome() { - return haemolyticuremicsyndrome; + public SymptomState getHaemolyticUremicSyndrome() { + return haemolyticUremicSyndrome; } - public void setHaemolyticuremicsyndrome(SymptomState haemolyticuremicsyndrome) { - this.haemolyticuremicsyndrome = haemolyticuremicsyndrome; + public void setHaemolyticUremicSyndrome(SymptomState haemolyticUremicSyndrome) { + this.haemolyticUremicSyndrome = haemolyticUremicSyndrome; } public SymptomState getBloodyDiarrhea() { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjb.java index e01cbd9ad13..6503a88f069 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/disease/DiseaseConfigurationFacadeEjb.java @@ -240,7 +240,11 @@ private DiseaseConfigurationIndexDto toIndexDto(DiseaseConfiguration entity) { dto.setMaxIncubationPeriod(entity.getMaxIncubationPeriod()); dto.setMinIncubationPeriod(entity.getMinIncubationPeriod()); dto.setCaseDefinitionText(entity.getCaseDefinitionText()); - dto.setIsContagious(entity.getIsContagious()); + if (entity.getIsContagious() != null) { + dto.setIsContagious(entity.getIsContagious()); + } else { + dto.setIsContagious(dto.getDisease().isContagious()); + } dto.setMaxContagiousPeriod(entity.getMaxContagiousPeriod()); dto.setMinContagiousPeriod(entity.getMinContagiousPeriod()); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java index d4ee106398e..191b1eb8ed7 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java @@ -320,7 +320,7 @@ public class Symptoms extends AbstractDomainObject { private SymptomState dysuria; private SymptomState eyeIrritation; private SymptomState tenesmus; - private SymptomState haemolyticuremicsyndrome; + private SymptomState haemolyticUremicSyndrome; private SymptomState bloodyDiarrhea; // when adding new fields make sure to extend toHumanString @@ -2561,12 +2561,12 @@ public void setTenesmus(SymptomState tenesmus) { } @Enumerated(EnumType.STRING) - public SymptomState getHaemolyticuremicsyndrome() { - return haemolyticuremicsyndrome; + public SymptomState getHaemolyticUremicSyndrome() { + return haemolyticUremicSyndrome; } - public void setHaemolyticuremicsyndrome(SymptomState haemolyticuremicsyndrome) { - this.haemolyticuremicsyndrome = haemolyticuremicsyndrome; + public void setHaemolyticUremicSyndrome(SymptomState haemolyticUremicSyndrome) { + this.haemolyticUremicSyndrome = haemolyticUremicSyndrome; } @Enumerated(EnumType.STRING) diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java index 52ec921be21..a02477b9628 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java @@ -285,7 +285,7 @@ public Symptoms fillOrBuildEntity(SymptomsDto source, Symptoms target, boolean c target.setDysuria(source.getDysuria()); target.setEyeIrritation(source.getEyeIrritation()); target.setTenesmus(source.getTenesmus()); - target.setHaemolyticuremicsyndrome(source.getHaemolyticuremicsyndrome()); + target.setHaemolyticUremicSyndrome(source.getHaemolyticUremicSyndrome()); target.setBloodyDiarrhea(source.getBloodyDiarrhea()); return target; } @@ -554,7 +554,7 @@ public static SymptomsDto toSymptomsDto(Symptoms symptoms) { target.setCoughingAtNight(source.getCoughingAtNight()); target.setAbdominalCramps(source.getAbdominalCramps()); target.setTenesmus(source.getTenesmus()); - target.setHaemolyticuremicsyndrome(source.getHaemolyticuremicsyndrome()); + target.setHaemolyticUremicSyndrome(source.getHaemolyticUremicSyndrome()); target.setBloodyDiarrhea(source.getBloodyDiarrhea()); return target; } diff --git a/sormas-backend/src/main/resources/sql/sormas_schema.sql b/sormas-backend/src/main/resources/sql/sormas_schema.sql index 864064549a4..eebfecbf761 100644 --- a/sormas-backend/src/main/resources/sql/sormas_schema.sql +++ b/sormas-backend/src/main/resources/sql/sormas_schema.sql @@ -16160,13 +16160,12 @@ alter table drugsusceptibility_history add column IF NOT EXISTS erythromycinsurv INSERT INTO schema_version (version_number, comment) VALUES (634, 'Enhanced AST structure: per-drug method, zone diameter, surveillance interpretation #13948'); --- 2026-05-20 Shigellosis disease configuration (Luxembourg) #13915 +-- 2026-05-20 Shigellosis disease configuration (Luxembourg) #13926 ALTER TABLE diseaseconfiguration ADD COLUMN IF NOT EXISTS iscontagious boolean default false; ALTER TABLE diseaseconfiguration ADD COLUMN IF NOT EXISTS mincontagiousperiod integer; ALTER TABLE diseaseconfiguration ADD COLUMN IF NOT EXISTS maxcontagiousperiod integer; ALTER TABLE healthconditions ADD COLUMN IF NOT EXISTS undermedication varchar(255); ALTER TABLE healthconditions ADD COLUMN IF NOT EXISTS medicationdetails varchar(255); -ALTER TABLE healthconditions ADD COLUMN IF NOT EXISTS medicationdetails varchar(255); ALTER TABLE symptoms ADD COLUMN IF NOT EXISTS haemolyticuremicsyndrome varchar(255); ALTER TABLE symptoms ADD COLUMN IF NOT EXISTS tenesmus varchar(255); ALTER TABLE drugsusceptibility ADD COLUMN IF NOT EXISTS azithromycinmic numeric; @@ -16212,5 +16211,5 @@ ALTER TABLE symptoms_history ADD COLUMN IF NOT EXISTS bloodydiarr ALTER TABLE healthconditions_history ADD COLUMN IF NOT EXISTS chronicdisease varchar(255); ALTER TABLE healthconditions_history ADD COLUMN IF NOT EXISTS chronicdiseasedetails varchar(255); -INSERT INTO schema_version (version_number, comment) VALUES (635, '#13926 - Shigellosis incorporation into SORMAS'); +INSERT INTO schema_version (version_number, comment) VALUES (635, '#13926 - Shigellosis incorporation to SORMAS'); -- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. *** diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java index b026693f1d8..2f8a301c129 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java @@ -361,7 +361,7 @@ private void prophylaxisLayout(String value) { } CustomLayout prophylaxisLayout = new CustomLayout(); prophylaxisLayout.setTemplateContents(PROPHYLAXIS_LAYOUT); - prophylaxisLayout.addComponent(createInfoLabel("Prophylaxis status"), "PROPHYLAXIS_LABEL"); + prophylaxisLayout.addComponent(createInfoLabel(I18nProperties.getString(Strings.prophylaxisStatus)), "PROPHYLAXIS_LABEL"); prophylaxisLayout.addComponent(createInfoLabel(value), "PROPHYLAXIS_VALUE"); getContent().addComponent(prophylaxisLayout, "PROPHYLAXIS_LAYOUT"); From a5a9cea4f2d09a4b5ec2ca68e96dd5e29b88ca76 Mon Sep 17 00:00:00 2001 From: Karnaiah Pesula Date: Tue, 2 Jun 2026 13:09:17 +0200 Subject: [PATCH 3/5] code refactoring --- .../sormas/api/sample/PathogenSpecie.java | 4 ++ .../sormas/api/sample/SerotypingMethod.java | 2 + .../sormas/api/symptoms/SymptomsDto.java | 6 +-- .../symeda/sormas/ui/epidata/EpiDataForm.java | 47 +++++++++++++------ 4 files changed, 41 insertions(+), 18 deletions(-) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java index 19cd0dddc6a..3cfd988d664 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java @@ -195,7 +195,11 @@ public enum PathogenSpecie { PathogenTestType.SEROGROUPING }) SHIGELLA_SPP, // OTHER and UNKNOWN are mostly applicable for all diseases and pathogen tests, so we don't specify them as applicable to specific diseases or tests + @Diseases + @ApplicableToPathogenTests OTHER, + @Diseases + @ApplicableToPathogenTests UNKNOWN, @Diseases({ Disease.TUBERCULOSIS, diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java index 23473de1acd..023edba4858 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java @@ -80,6 +80,8 @@ public enum SerotypingMethod { PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY }) WGS_PREDICTION, // OTHER is mostly applicable for all diseases and pathogen tests, so we don't specify them as applicable to specific diseases or tests + @Diseases + @ApplicableToPathogenTests OTHER; @Override diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java index 16efc9ab2a9..2276c2083a9 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java @@ -388,7 +388,7 @@ public class SymptomsDto extends PseudonymizableDto { public static final String FATAL_RISK = "fatalRisk"; public static final String TENESMUS = "tenesmus"; public static final String BLOODY_DIARRHEA = "bloodyDiarrhea"; - public static final String HAEMOLYTIC_UREMIC_SYNDROME = "haemolyticuremicsyndrome"; + public static final String HAEMOLYTIC_UREMIC_SYNDROME = "haemolyticUremicSyndrome"; // Fields are declared in the order they should appear in the import template @@ -3193,10 +3193,10 @@ public static SymptomsDto build() { SHIGELLOSIS }) private SymptomState haemolyticUremicSyndrome; - @Diseases({ - SHIGELLOSIS }) @Complication({ SHIGELLOSIS }) + @Diseases({ + SHIGELLOSIS }) @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) private SymptomState bloodyDiarrhea; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java index 2f8a301c129..16b5a460468 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java @@ -18,7 +18,7 @@ package de.symeda.sormas.ui.epidata; import static de.symeda.sormas.ui.utils.CssStyles.H3; -import static de.symeda.sormas.ui.utils.CssStyles.H4; +import static de.symeda.sormas.ui.utils.CssStyles.H5; import static de.symeda.sormas.ui.utils.CssStyles.VSPACE_3; import static de.symeda.sormas.ui.utils.CssStyles.VSPACE_TOP_3; import static de.symeda.sormas.ui.utils.LayoutUtil.divsCss; @@ -106,6 +106,7 @@ public class EpiDataForm extends AbstractEditForm { private static final String LOC_EPI_DATA_FIELDS_HINT = "locEpiDataFieldsHint"; private static final String LOC_EXP_PERIOD_HEADING = "locExpPeriodHeading"; private static final String LOC_TRANSMISSIBILITY_PERIOD_HEADING = "locTransmissibilityPeriodHeading"; + private static final String LOC_PROPHYLAXIS_STATUS = "locProphylaxisStatus"; private static final String LOC_CUSTOMIZABLE_FIELDS_EXPOSURE_INVESTIGATION = CustomizableFieldGroup.EPIDATA_EXPOSURE_INVESTIGATION.getKey(); private static final String LOC_CUSTOMIZABLE_FIELDS_ACTIVITY_AS_CASE = CustomizableFieldGroup.EPIDATA_ACTIVITY_AS_CASE.getKey(); @@ -136,6 +137,7 @@ public class EpiDataForm extends AbstractEditForm { fluidRowLocs(EpiDataDto.MODE_OF_TRANSMISSION, EpiDataDto.MODE_OF_TRANSMISSION_TYPE) + fluidRowLocs(EpiDataDto.INFECTION_SOURCE, EpiDataDto.INFECTION_SOURCE_TEXT) + fluidRowLocs(EpiDataDto.PLACE_OF_INFECTION, EpiDataDto.RESIDENCE_AT_ONSET) + + loc(LOC_PROPHYLAXIS_STATUS)+ fluidRowLocs("PROPHYLAXIS_LAYOUT")+ loc(LOC_ACTIVITY_AS_CASE_INVESTIGATION_HEADING) + loc(LOC_TRANSMISSIBILITY_PERIOD_HEADING) + @@ -353,10 +355,26 @@ private void includeExposureDates(Date symptomOnsetDate, Disease disease) { * Displays prophylaxis adherence information in the form layout. * * @param value - * The prophylaxis adherence status to display. + * @param hideProphylaxisComponent */ - private void prophylaxisLayout(String value) { - if (value == null) { + private void renderProphylaxisInfo(String value, boolean hideProphylaxisComponent) { + // validate the layout presence before adding or removing the prophylaxis information to avoid unnecessary component creation and manipulation. + Component prophylaxisComponent = getContent().getComponent("PROPHYLAXIS_LAYOUT"); + // if the prophylaxis component is not visible, hide the heading along with its component and return without doing anything. + if (hideProphylaxisComponent) { + if (prophylaxisComponent != null) { + getContent().getComponent(LOC_PROPHYLAXIS_STATUS).setVisible(false); + prophylaxisComponent.setVisible(false); + getContent().removeComponent("PROPHYLAXIS_LAYOUT"); + return; + } else { + getContent().getComponent(LOC_PROPHYLAXIS_STATUS).setVisible(false); + return; + } + } + + // if the prophylaxis is visible but the value is null, return without doing anything. + if (!hideProphylaxisComponent && value == null) { return; } CustomLayout prophylaxisLayout = new CustomLayout(); @@ -365,7 +383,7 @@ private void prophylaxisLayout(String value) { prophylaxisLayout.addComponent(createInfoLabel(value), "PROPHYLAXIS_VALUE"); getContent().addComponent(prophylaxisLayout, "PROPHYLAXIS_LAYOUT"); - getContent().getComponent(LOC_EXPOSURE_PERIOD_CONSIDER_HEADING).setVisible(true); + getContent().getComponent(LOC_PROPHYLAXIS_STATUS).setVisible(true); } /** @@ -428,7 +446,7 @@ private DateField addDateFieldToCustomLayout(Integer period) { */ private Label createInfoLabel(String value) { Label label = new Label(value); - CssStyles.style(label, CssStyles.LABEL_BOLD, H4); + CssStyles.style(label, CssStyles.LABEL_BOLD, H5); label.setContentMode(ContentMode.HTML); return label; } @@ -493,6 +511,11 @@ private void addHeadingsAndInfoTexts() { LOC_CONCLUSION_HEADING); getContent().getComponent(LOC_CONCLUSION_HEADING).setVisible(CONCLUSION_ALLOWED_DISEASES.contains(disease)); + // Prophylaxis status heading should be visible for Lux malaria case, as the prophylaxis adherence status is displayed in the conclusion section for malaria. + getContent().addComponent( + new MultilineLabel(h3(I18nProperties.getString(Strings.headingProphylaxisLoc)) + divsCss(VSPACE_3), ContentMode.HTML), + LOC_PROPHYLAXIS_STATUS); + getContent().addComponent( new MultilineLabel( h3(I18nProperties.getString(Strings.headingEpiDataSourceCaseContacts)) @@ -587,16 +610,10 @@ public void setValue(EpiDataDto newFieldValue) { .map(ExposureDto::getProphylaxisAdherence) .filter(Objects::nonNull) .findFirst(); - if (adherence != null && adherence.isPresent() && adherence.get() != null) { - prophylaxisLayout(I18nProperties.getEnumCaption(adherence.get())); + if (adherence.isPresent() && isConfiguredServer(CountryHelper.COUNTRY_CODE_LUXEMBOURG) && Disease.MALARIA == disease) { + renderProphylaxisInfo(I18nProperties.getEnumCaption(adherence.get()), false); } else { - // delete the prophylaxis layout if the latest prophylaxis adherence status is null. - Component prophylaxisComponent = getContent().getComponent("PROPHYLAXIS_LAYOUT"); - if (prophylaxisComponent != null) { - getContent().getComponent("PROPHYLAXIS_LAYOUT").setVisible(false); - getContent().removeComponent("PROPHYLAXIS_LAYOUT"); - } - + renderProphylaxisInfo(null, true); } } From 075c5498a58b2cb964df968b8edf6331c52af221 Mon Sep 17 00:00:00 2001 From: Karnaiah Pesula Date: Thu, 4 Jun 2026 10:05:02 +0200 Subject: [PATCH 4/5] Fixed the caption issue for one of the symptoms of shigellosis. --- .../src/main/java/de/symeda/sormas/api/i18n/Captions.java | 2 +- .../java/de/symeda/sormas/api/sample/PathogenSpecie.java | 3 ++- .../java/de/symeda/sormas/api/symptoms/SymptomsDto.java | 6 +++--- sormas-api/src/main/resources/captions.properties | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java index e31a1a9abc3..8bfe3bc8931 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java @@ -3116,7 +3116,7 @@ public interface Captions { String Symptoms_glasgowComaScale = "Symptoms.glasgowComaScale"; String Symptoms_guillainBarreSyndrome = "Symptoms.guillainBarreSyndrome"; String Symptoms_gumsBleeding = "Symptoms.gumsBleeding"; - String Symptoms_haemolyticuremicsyndrome = "Symptoms.haemolyticuremicsyndrome"; + String Symptoms_haemolyticUremicSyndrome = "Symptoms.haemolyticUremicSyndrome"; String Symptoms_headache = "Symptoms.headache"; String Symptoms_hearingloss = "Symptoms.hearingloss"; String Symptoms_heartRate = "Symptoms.heartRate"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java index 3cfd988d664..a99ceda5035 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java @@ -194,12 +194,13 @@ public enum PathogenSpecie { @ApplicableToPathogenTests(value = { PathogenTestType.SEROGROUPING }) SHIGELLA_SPP, - // OTHER and UNKNOWN are mostly applicable for all diseases and pathogen tests, so we don't specify them as applicable to specific diseases or tests + // OTHER is mostly applicable for all diseases and pathogen tests. @Diseases @ApplicableToPathogenTests OTHER, @Diseases @ApplicableToPathogenTests + // UNKNOWN is used when the pathogen specie is not known, so it can be applicable to all diseases and tests as well UNKNOWN, @Diseases({ Disease.TUBERCULOSIS, diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java index 2276c2083a9..d6d364edd2c 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java @@ -3193,11 +3193,11 @@ public static SymptomsDto build() { SHIGELLOSIS }) private SymptomState haemolyticUremicSyndrome; - @Complication({ + @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @Diseases(value = { SHIGELLOSIS }) - @Diseases({ + @Complication({ SHIGELLOSIS }) - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) private SymptomState bloodyDiarrhea; @Order(0) diff --git a/sormas-api/src/main/resources/captions.properties b/sormas-api/src/main/resources/captions.properties index e356d1fa0e1..6d72acb8b47 100644 --- a/sormas-api/src/main/resources/captions.properties +++ b/sormas-api/src/main/resources/captions.properties @@ -3113,7 +3113,7 @@ Symptoms.constipation=Constipation Symptoms.dysuria=Dysuria (painful urination) Symptoms.eyeIrritation=Eye irritation Symptoms.tenesmus=Tenesmus -Symptoms.haemolyticuremicsyndrome=Haemolytic uremic syndrome +Symptoms.haemolyticUremicSyndrome=Haemolytic uremic syndrome Symptoms.bloodyDiarrhea=Bloody diarrhea titleComplications=Complications titleNoComplications=No complications From f86452d36d754827332394b94bca3eac0e3ec5d5 Mon Sep 17 00:00:00 2001 From: Karnaiah Pesula Date: Thu, 4 Jun 2026 10:26:37 +0200 Subject: [PATCH 5/5] Restoring the OTHER and UNKNOWN species to specific diseases and pathogen tests. --- .../sormas/api/sample/PathogenSpecie.java | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java index a99ceda5035..afcab3c5729 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java @@ -194,13 +194,36 @@ public enum PathogenSpecie { @ApplicableToPathogenTests(value = { PathogenTestType.SEROGROUPING }) SHIGELLA_SPP, - // OTHER is mostly applicable for all diseases and pathogen tests. - @Diseases - @ApplicableToPathogenTests + @Diseases({ + Disease.MALARIA, + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.THIN_BLOOD_SMEAR, + PathogenTestType.RAPID_TEST, + PathogenTestType.OTHER_ANTIGEN_DETECTION_TEST, + PathogenTestType.ENZYME_LINKED_IMMUNOSORBENT_ASSAY, + PathogenTestType.PCR_RT_PCR, + PathogenTestType.Q_PCR, + PathogenTestType.LAMP, + PathogenTestType.OTHER_MOLECULAR_ASSAY, + PathogenTestType.OTHER_SEROLOGICAL_TEST }) OTHER, - @Diseases - @ApplicableToPathogenTests - // UNKNOWN is used when the pathogen specie is not known, so it can be applicable to all diseases and tests as well + @Diseases({ + Disease.TUBERCULOSIS, + Disease.LATENT_TUBERCULOSIS, + Disease.MALARIA, + Disease.SHIGELLOSIS }) + @ApplicableToPathogenTests(value = { + PathogenTestType.SPOLIGOTYPING, + PathogenTestType.THIN_BLOOD_SMEAR, + PathogenTestType.RAPID_TEST, + PathogenTestType.OTHER_ANTIGEN_DETECTION_TEST, + PathogenTestType.ENZYME_LINKED_IMMUNOSORBENT_ASSAY, + PathogenTestType.PCR_RT_PCR, + PathogenTestType.Q_PCR, + PathogenTestType.LAMP, + PathogenTestType.OTHER_MOLECULAR_ASSAY, + PathogenTestType.OTHER_SEROLOGICAL_TEST }) UNKNOWN, @Diseases({ Disease.TUBERCULOSIS,