Skip to content

Commit 440a117

Browse files
Merge pull request #14133 from SORMAS-Foundation/bugfix-14125-dengue-missing-symptoms
Implemented the warning signs and corrected the warning symptoms of D…
2 parents 7d0872b + 816fb80 commit 440a117

8 files changed

Lines changed: 111 additions & 43 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3226,8 +3226,8 @@ public interface Captions {
32263226
String Symptoms_otherHemorrhagicSymptomsText = "Symptoms.otherHemorrhagicSymptomsText";
32273227
String Symptoms_otherMajorSiteDetails = "Symptoms.otherMajorSiteDetails";
32283228
String Symptoms_otherMinorSiteDetails = "Symptoms.otherMinorSiteDetails";
3229-
String Symptoms_otherNeurolocalSymptom = "Symptoms.otherNeurolocalSymptom";
3230-
String Symptoms_otherNeurolocalSymptomText = "Symptoms.otherNeurolocalSymptomText";
3229+
String Symptoms_otherNeurologicalSymptoms = "Symptoms.otherNeurologicalSymptoms";
3230+
String Symptoms_otherNeurologicalSymptomsText = "Symptoms.otherNeurologicalSymptomsText";
32313231
String Symptoms_otherNonHemorrhagicSymptoms = "Symptoms.otherNonHemorrhagicSymptoms";
32323232
String Symptoms_otherNonHemorrhagicSymptomsText = "Symptoms.otherNonHemorrhagicSymptomsText";
32333233
String Symptoms_otitisMedia = "Symptoms.otitisMedia";
@@ -3432,6 +3432,7 @@ public interface Captions {
34323432
String titleAefiInvestigationRelevantPatientInformation = "titleAefiInvestigationRelevantPatientInformation";
34333433
String titleAefiInvestigationVaccinesDetails = "titleAefiInvestigationVaccinesDetails";
34343434
String titleComplications = "titleComplications";
3435+
String titleComplications_DENG = "titleComplications.DENG";
34353436
String titleDiseaseConfigurationAgeGroup = "titleDiseaseConfigurationAgeGroup";
34363437
String titleDiseaseConfigurationCaseDefinition = "titleDiseaseConfigurationCaseDefinition";
34373438
String titleDiseaseConfigurationGeneral = "titleDiseaseConfigurationGeneral";
@@ -3440,6 +3441,7 @@ public interface Captions {
34403441
String titleExposuresGeneralSection = "titleExposuresGeneralSection";
34413442
String titleExposuresSection = "titleExposuresSection";
34423443
String titleNoComplications = "titleNoComplications";
3444+
String titleNoComplications_DENG = "titleNoComplications.DENG";
34433445
String to = "to";
34443446
String total = "total";
34453447
String travelEntriesNoTravelEntriesForPerson = "travelEntriesNoTravelEntriesForPerson";

sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ public class SymptomsDto extends PseudonymizableDto {
384384
public static final String CLINICAL_MANIFESTATION_TEXT = "clinicalManifestationText";
385385
public static final String CEREBRAL_MALARIA = "cerebralMalaria";
386386
public static final String SCANT_HEMORRHAGE = "scantHemorrhage";
387-
public static final String OTHER_NEUROLOCAL_SYMPTOM = "otherNeurolocalSymptom";
388-
public static final String OTHER_NEUROLOCAL_SYMPTOM_TEXT = "otherNeurolocalSymptomText";
387+
public static final String OTHER_NEUROLOGICAL_SYMPTOMS = "otherNeurologicalSymptoms";
388+
public static final String OTHER_NEUROLOGICAL_SYMPTOMS_TEXT = "otherNeurologicalSymptomsText";
389389
public static final String FATAL_RISK = "fatalRisk";
390390
public static final String TENESMUS = "tenesmus";
391391
public static final String BLOODY_DIARRHEA = "bloodyDiarrhea";
@@ -1350,8 +1350,6 @@ public static SymptomsDto build() {
13501350
OTHER })
13511351
@Outbreaks
13521352
@SymptomGrouping(SymptomGroup.GASTROINTESTINAL)
1353-
@Complication({
1354-
DENGUE })
13551353
private SymptomState nausea;
13561354

13571355
@Diseases({
@@ -3167,23 +3165,26 @@ public static SymptomsDto build() {
31673165
@HideForCountriesExcept(countries = {
31683166
COUNTRY_CODE_LUXEMBOURG })
31693167
@SymptomGrouping(SymptomGroup.NERVOUS_SYSTEM)
3170-
private YesNoUnknown otherNeurolocalSymptom;
3168+
@Complication({
3169+
DENGUE })
3170+
private YesNoUnknown otherNeurologicalSymptoms;
31713171

31723172
@Diseases({
31733173
DENGUE })
31743174
@Outbreaks
31753175
@HideForCountriesExcept(countries = {
31763176
COUNTRY_CODE_LUXEMBOURG })
3177-
@DependantOn(OTHER_NEUROLOCAL_SYMPTOM)
3177+
@DependantOn(OTHER_NEUROLOGICAL_SYMPTOMS)
31783178
@SymptomGrouping(SymptomGroup.NERVOUS_SYSTEM)
3179-
private String otherNeurolocalSymptomText;
3179+
@Complication({
3180+
DENGUE })
3181+
private String otherNeurologicalSymptomsText;
31803182

31813183
@Diseases({
31823184
DENGUE })
31833185
@SymptomGrouping(SymptomGroup.GENERAL)
3184-
@Complication({
3185-
DENGUE })
31863186
// mCComplicationsPotentiellementMortelles to map the life threatening complications of dengue
3187+
// but not required to show in the warning signs/complications
31873188
private SymptomState fatalRisk;
31883189

31893190
@Diseases({
@@ -5303,20 +5304,20 @@ public void setScantHemorrhage(SymptomState scantHemorrhage) {
53035304
this.scantHemorrhage = scantHemorrhage;
53045305
}
53055306

5306-
public YesNoUnknown getOtherNeurolocalSymptom() {
5307-
return otherNeurolocalSymptom;
5307+
public YesNoUnknown getOtherNeurologicalSymptoms() {
5308+
return otherNeurologicalSymptoms;
53085309
}
53095310

5310-
public void setOtherNeurolocalSymptom(YesNoUnknown otherNeurolocalSymptom) {
5311-
this.otherNeurolocalSymptom = otherNeurolocalSymptom;
5311+
public void setOtherNeurologicalSymptoms(YesNoUnknown otherNeurologicalSymptoms) {
5312+
this.otherNeurologicalSymptoms = otherNeurologicalSymptoms;
53125313
}
53135314

5314-
public String getOtherNeurolocalSymptomText() {
5315-
return otherNeurolocalSymptomText;
5315+
public String getOtherNeurologicalSymptomsText() {
5316+
return otherNeurologicalSymptomsText;
53165317
}
53175318

5318-
public void setOtherNeurolocalSymptomText(String otherNeurolocalSymptomText) {
5319-
this.otherNeurolocalSymptomText = otherNeurolocalSymptomText;
5319+
public void setOtherNeurologicalSymptomsText(String otherNeurologicalSymptomsText) {
5320+
this.otherNeurologicalSymptomsText = otherNeurologicalSymptomsText;
53205321
}
53215322

53225323
public SymptomState getFatalRisk() {

sormas-api/src/main/resources/captions.properties

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3134,8 +3134,8 @@ Symptoms.clinicalManifestation= Clinical manifestation of the disease according
31343134
Symptoms.clinicalManifestationText=Specify clinical manifestation
31353135
Symptoms.disseminatedIntraVascularCoagulation=Disseminated intra-vascular coagulation
31363136
Symptoms.scantHemorrhage=Other minor bleeding
3137-
Symptoms.otherNeurolocalSymptom=Other neurological symptoms
3138-
Symptoms.otherNeurolocalSymptomText= Specify neurological symptom
3137+
Symptoms.otherNeurologicalSymptoms=Other neurological symptoms
3138+
Symptoms.otherNeurologicalSymptomsText= Specify neurological symptoms
31393139
Symptoms.fatalRisk=Fatal risk
31403140
Symptoms.constipation=Constipation
31413141
Symptoms.dysuria=Dysuria (painful urination)
@@ -3145,7 +3145,9 @@ Symptoms.haemolyticUremicSyndrome=Haemolytic uremic syndrome
31453145
Symptoms.bloodyDiarrhea=Bloody diarrhea
31463146
Symptoms.wateryDiarrhea=Watery diarrhoea
31473147
titleComplications=Complications
3148+
titleComplications.DENG=Warning signs
31483149
titleNoComplications=No complications
3150+
titleNoComplications.DENG=No warning signs
31493151

31503152
# Task
31513153
taskMyTasks=My tasks

sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ public class Symptoms extends AbstractDomainObject {
312312
private String clinicalManifestationText;
313313
private SymptomState cerebralMalaria;
314314
private SymptomState scantHemorrhage;
315-
private YesNoUnknown otherNeurolocalSymptom;
316-
private String otherNeurolocalSymptomText;
315+
private YesNoUnknown otherNeurologicalSymptoms;
316+
private String otherNeurologicalSymptomsText;
317317
private SymptomState disseminatedIntraVascularCoagulation;
318318
private SymptomState fatalRisk;
319319
private SymptomState constipation;
@@ -2437,20 +2437,20 @@ public void setScantHemorrhage(SymptomState scantHemorrhage) {
24372437
}
24382438

24392439
@Enumerated(EnumType.STRING)
2440-
public YesNoUnknown getOtherNeurolocalSymptom() {
2441-
return otherNeurolocalSymptom;
2440+
public YesNoUnknown getOtherNeurologicalSymptoms() {
2441+
return otherNeurologicalSymptoms;
24422442
}
24432443

2444-
public void setOtherNeurolocalSymptom(YesNoUnknown otherNeurolocalSymptom) {
2445-
this.otherNeurolocalSymptom = otherNeurolocalSymptom;
2444+
public void setOtherNeurologicalSymptoms(YesNoUnknown otherNeurologicalSymptoms) {
2445+
this.otherNeurologicalSymptoms = otherNeurologicalSymptoms;
24462446
}
24472447

2448-
public String getOtherNeurolocalSymptomText() {
2449-
return otherNeurolocalSymptomText;
2448+
public String getOtherNeurologicalSymptomsText() {
2449+
return otherNeurologicalSymptomsText;
24502450
}
24512451

2452-
public void setOtherNeurolocalSymptomText(String otherNeurolocalSymptomText) {
2453-
this.otherNeurolocalSymptomText = otherNeurolocalSymptomText;
2452+
public void setOtherNeurologicalSymptomsText(String otherNeurologicalSymptomsText) {
2453+
this.otherNeurologicalSymptomsText = otherNeurologicalSymptomsText;
24542454
}
24552455

24562456
@Enumerated(EnumType.STRING)

sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ public Symptoms fillOrBuildEntity(SymptomsDto source, Symptoms target, boolean c
277277
target.setClinicalManifestationText(source.getClinicalManifestationText());
278278
target.setCerebralMalaria(source.getCerebralMalaria());
279279
target.setScantHemorrhage(source.getScantHemorrhage());
280-
target.setOtherNeurolocalSymptom(source.getOtherNeurolocalSymptom());
281-
target.setOtherNeurolocalSymptomText(source.getOtherNeurolocalSymptomText());
280+
target.setOtherNeurologicalSymptoms(source.getOtherNeurologicalSymptoms());
281+
target.setOtherNeurologicalSymptomsText(source.getOtherNeurologicalSymptomsText());
282282
target.setDisseminatedIntraVascularCoagulation(source.getDisseminatedIntraVascularCoagulation());
283283
target.setFatalRisk(source.getFatalRisk());
284284
target.setConstipation(source.getConstipation());
@@ -541,8 +541,8 @@ public static SymptomsDto toSymptomsDto(Symptoms symptoms) {
541541
target.setClinicalManifestationText(source.getClinicalManifestationText());
542542
target.setCerebralMalaria(source.getCerebralMalaria());
543543
target.setScantHemorrhage(source.getScantHemorrhage());
544-
target.setOtherNeurolocalSymptom(source.getOtherNeurolocalSymptom());
545-
target.setOtherNeurolocalSymptomText(source.getOtherNeurolocalSymptomText());
544+
target.setOtherNeurologicalSymptoms(source.getOtherNeurologicalSymptoms());
545+
target.setOtherNeurologicalSymptomsText(source.getOtherNeurologicalSymptomsText());
546546
target.setDisseminatedIntraVascularCoagulation(source.getDisseminatedIntraVascularCoagulation());
547547
target.setFatalRisk(source.getFatalRisk());
548548
target.setConstipation(source.getConstipation());

sormas-backend/src/main/resources/sql/sormas_schema.sql

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16686,4 +16686,41 @@ UPDATE drugsusceptibility_history SET trimethoprimsulfamethoxazolemethod = 'OTHE
1668616686

1668716687
INSERT INTO schema_version (version_number, comment) VALUES (645, '#14036 - AST 3-column form: MIC free-text, drop zone/surveillance');
1668816688

16689+
-- 02-07-2026 fixing the typos
16690+
16691+
DO $$
16692+
BEGIN
16693+
16694+
-- Rename the otherneurologicalsymptoms symptom column
16695+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms' AND column_name = 'otherneurolocalsymptom')
16696+
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms' AND column_name = 'otherneurologicalsymptoms') THEN
16697+
16698+
ALTER TABLE symptoms RENAME COLUMN otherneurolocalsymptom TO otherneurologicalsymptoms;
16699+
END IF;
16700+
16701+
-- Rename the otherneurologicalsymptoms text column
16702+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms' AND column_name = 'otherneurolocalsymptomtext')
16703+
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms' AND column_name = 'otherneurologicalsymptomstext') THEN
16704+
16705+
ALTER TABLE symptoms RENAME COLUMN otherneurolocalsymptomtext TO otherneurologicalsymptomstext;
16706+
END IF;
16707+
16708+
16709+
-- Rename the otherneurologicalsymptoms symptom column in history
16710+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms_history' AND column_name = 'otherneurolocalsymptom')
16711+
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms_history' AND column_name = 'otherneurologicalsymptoms') THEN
16712+
16713+
ALTER TABLE symptoms_history RENAME COLUMN otherneurolocalsymptom TO otherneurologicalsymptoms;
16714+
END IF;
16715+
16716+
-- Rename the otherneurologicalsymptoms text column in history
16717+
IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms_history' AND column_name = 'otherneurolocalsymptomtext')
16718+
AND NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema = current_schema() AND table_name = 'symptoms_history' AND column_name = 'otherneurologicalsymptomstext') THEN
16719+
16720+
ALTER TABLE symptoms_history RENAME COLUMN otherneurolocalsymptomtext TO otherneurologicalsymptomstext;
16721+
END IF;
16722+
16723+
END $$;
16724+
INSERT INTO schema_version (version_number, comment) VALUES (646, 'Correcting the typos of column names');
16725+
1668916726
-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseSymptomSideViewComponent.java

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515

1616
package de.symeda.sormas.ui.caze;
1717

18+
import java.util.LinkedHashMap;
1819
import java.util.List;
1920
import java.util.Map;
20-
import java.util.TreeMap;
21+
import java.util.stream.Collectors;
2122

2223
import org.apache.commons.lang3.StringUtils;
2324

@@ -47,16 +48,17 @@ public class CaseSymptomSideViewComponent extends SideComponent {
4748
private HorizontalLayout topLayout = new HorizontalLayout();
4849
private final Label noComplicationsLabel;
4950
private VerticalLayout layout = new VerticalLayout();
50-
private Map<String, Component> componentMap = new TreeMap<>();
51+
private Map<String, Component> componentMap = new LinkedHashMap<>();
5152
private final List<String> complicatedSymptoms;
5253

5354
public CaseSymptomSideViewComponent(Disease disease) {
54-
super(I18nProperties.getCaption(String.format(Captions.titleComplications)));
55+
super(I18nProperties.getCaption(String.format(Disease.DENGUE == disease ? Captions.titleComplications_DENG : Captions.titleComplications)));
5556
topLayout.setWidth(100, Unit.PERCENTAGE);
5657
topLayout.setMargin(false);
5758
topLayout.setSpacing(false);
5859
addComponent(topLayout);
59-
noComplicationsLabel = new Label(I18nProperties.getCaption(Captions.titleNoComplications));
60+
noComplicationsLabel =
61+
new Label(I18nProperties.getCaption(Disease.DENGUE == disease ? Captions.titleNoComplications_DENG : Captions.titleNoComplications));
6062
topLayout.addComponents(noComplicationsLabel, layout);
6163
complicatedSymptoms = AnnotationFieldHelper.getComplicatedSymptomsWithDiseases(SymptomsDto.class, disease);
6264
}
@@ -117,12 +119,34 @@ public void toggleComplicationSymptom(Field sourceField) {
117119
// This is to set the entered value as a caption.
118120
}
119121

122+
/**
123+
* sort the map values, not the keys. With TreeMap, keys were sorted alphabetically, but we want to sort by value.
124+
*
125+
* @return
126+
*/
127+
private Map<String, Component> sortMapValues() {
128+
return componentMap.entrySet().stream().sorted((entry1, entry2) -> {
129+
// Cast Component to Label to get the text string
130+
String val1 = ((Label) entry1.getValue()).getValue().toString();
131+
String val2 = ((Label) entry2.getValue()).getValue().toString();
132+
133+
int compareValues = String.CASE_INSENSITIVE_ORDER.compare(val1, val2);
134+
135+
// duplicates don't overwrite each other
136+
if (compareValues == 0) {
137+
return entry1.getKey().compareTo(entry2.getKey());
138+
}
139+
return compareValues;
140+
}).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new));
141+
}
142+
120143
/**
121144
* Refresh the layout based on the list of symptoms
122145
*/
123146
public void refreshLayout() {
124147
layout.setMargin(false);
125148
layout.setSpacing(false);
149+
componentMap = sortMapValues();
126150
componentMap.keySet().forEach(symptom -> {
127151
Component comp = componentMap.get(symptom);
128152
comp.addStyleNames(CssStyles.LABEL_PRIMARY, CssStyles.LABEL_BOLD);

sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public class SymptomsForm extends AbstractEditForm<SymptomsDto> {
135135
private static final String TUBERCULOSIS_CLINICAL_PRESENTATION_DETAILS_LOC = "tuberculosisClinicalPresentationDetailsLoc";
136136

137137
private static final List<String> YES_NO_UNKNOWN_SYMPTOM_FIELD_IDS = Collections
138-
.unmodifiableList(Arrays.asList(PARENT_TIME_OFF_WORK, JAUNDICE_WITHIN_24_HOURS_OF_BIRTH, DATE_OF_ONSET_KNOWN, OTHER_NEUROLOCAL_SYMPTOM));
138+
.unmodifiableList(Arrays.asList(PARENT_TIME_OFF_WORK, JAUNDICE_WITHIN_24_HOURS_OF_BIRTH, DATE_OF_ONSET_KNOWN, OTHER_NEUROLOGICAL_SYMPTOMS));
139139
private static final List<String> COMBO_BOX_FIELDS = Collections.unmodifiableList(Arrays.asList(CLINICAL_MANIFESTATION));
140140

141141
private static Map<String, List<String>> symptomGroupMap = new HashMap<>();
@@ -557,8 +557,8 @@ public String getFormattedHtmlMessage() {
557557
CLINICAL_MANIFESTATION_TEXT,
558558
CEREBRAL_MALARIA,
559559
SCANT_HEMORRHAGE,
560-
OTHER_NEUROLOCAL_SYMPTOM,
561-
OTHER_NEUROLOCAL_SYMPTOM_TEXT,
560+
OTHER_NEUROLOGICAL_SYMPTOMS,
561+
OTHER_NEUROLOGICAL_SYMPTOMS_TEXT,
562562
FATAL_RISK,
563563
TENESMUS,
564564
BLOODY_DIARRHEA,
@@ -1178,7 +1178,8 @@ public String getFormattedHtmlMessage() {
11781178

11791179
FieldHelper.setVisibleWhen(getFieldGroup(), WEIGHT_LOSS_AMOUNT, WEIGHT_LOSS, Arrays.asList(SymptomState.YES), true);
11801180
FieldHelper.setVisibleWhen(getFieldGroup(), DURATION_OF_SYMPTOMS, SYMPTOM_CURRENT_STATUS, Arrays.asList(SymptomState.YES), true);
1181-
FieldHelper.setVisibleWhen(getFieldGroup(), OTHER_NEUROLOCAL_SYMPTOM_TEXT, OTHER_NEUROLOCAL_SYMPTOM, Arrays.asList(YesNoUnknown.YES), true);
1181+
FieldHelper
1182+
.setVisibleWhen(getFieldGroup(), OTHER_NEUROLOGICAL_SYMPTOMS_TEXT, OTHER_NEUROLOGICAL_SYMPTOMS, Arrays.asList(YesNoUnknown.YES), true);
11821183
FieldHelper
11831184
.setVisibleWhen(getFieldGroup(), CLINICAL_MANIFESTATION_TEXT, CLINICAL_MANIFESTATION, Arrays.asList(ClinicalManifestation.OTHER), true);
11841185
}
@@ -1367,6 +1368,7 @@ private void addListenerForOnsetFields(ComboBox onsetSymptom, DateField onsetDat
13671368
Stream.concat(unconditionalSymptomFieldIds.stream(), conditionalBleedingSymptomFieldIds.stream()).collect(Collectors.toList());
13681369
allPropertyIds.add(LESIONS_THAT_ITCH);
13691370
allPropertyIds.add(OTHER_COMPLICATIONS_TEXT);
1371+
allPropertyIds.add(OTHER_NEUROLOGICAL_SYMPTOMS_TEXT);
13701372
for (Object sourcePropertyId : allPropertyIds) {
13711373
Field sourceField = getFieldGroup().getField(sourcePropertyId);
13721374
sourceField.addValueChangeListener(event -> {

0 commit comments

Comments
 (0)