Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 22c5c43

Browse files
lgallgal
authored andcommitted
SORMAS-Foundation#2916 split general signs of disease symptom
1 parent 987f783 commit 22c5c43

12 files changed

Lines changed: 151 additions & 81 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,13 +1388,13 @@ public interface Captions {
13881388
String Symptoms_fastHeartRate = "Symptoms.fastHeartRate";
13891389
String Symptoms_fatigue = "Symptoms.fatigue";
13901390
String Symptoms_fatigueWeakness = "Symptoms.fatigueWeakness";
1391+
String Symptoms_feelingIll = "Symptoms.feelingIll";
13911392
String Symptoms_fever = "Symptoms.fever";
13921393
String Symptoms_feverishFeeling = "Symptoms.feverishFeeling";
13931394
String Symptoms_firstSymptom = "Symptoms.firstSymptom";
13941395
String Symptoms_fluidInLungCavity = "Symptoms.fluidInLungCavity";
13951396
String Symptoms_fluidInLungCavityAuscultation = "Symptoms.fluidInLungCavityAuscultation";
13961397
String Symptoms_fluidInLungCavityXray = "Symptoms.fluidInLungCavityXray";
1397-
String Symptoms_generalSignsOfDisease = "Symptoms.generalSignsOfDisease";
13981398
String Symptoms_glasgowComaScale = "Symptoms.glasgowComaScale";
13991399
String Symptoms_gumsBleeding = "Symptoms.gumsBleeding";
14001400
String Symptoms_headache = "Symptoms.headache";
@@ -1487,6 +1487,7 @@ public interface Captions {
14871487
String Symptoms_runnyNose = "Symptoms.runnyNose";
14881488
String Symptoms_seizures = "Symptoms.seizures";
14891489
String Symptoms_sepsis = "Symptoms.sepsis";
1490+
String Symptoms_shivering = "Symptoms.shivering";
14901491
String Symptoms_shock = "Symptoms.shock";
14911492
String Symptoms_sidePain = "Symptoms.sidePain";
14921493
String Symptoms_skinBruising = "Symptoms.skinBruising";

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

Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,8 @@
1717
*******************************************************************************/
1818
package de.symeda.sormas.api.symptoms;
1919

20-
import de.symeda.sormas.api.ImportIgnore;
21-
import de.symeda.sormas.api.PseudonymizableDto;
22-
import de.symeda.sormas.api.utils.Complication;
23-
import de.symeda.sormas.api.utils.DataHelper;
24-
import de.symeda.sormas.api.utils.DependantOn;
25-
import de.symeda.sormas.api.utils.Diseases;
26-
import de.symeda.sormas.api.utils.HideForCountries;
27-
import de.symeda.sormas.api.utils.HideForCountriesExcept;
28-
import de.symeda.sormas.api.utils.Order;
29-
import de.symeda.sormas.api.utils.Outbreaks;
30-
import de.symeda.sormas.api.utils.SensitiveData;
31-
import de.symeda.sormas.api.utils.YesNoUnknown;
32-
33-
import java.util.Date;
34-
20+
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_GERMANY;
21+
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_SWITZERLAND;
3522
import static de.symeda.sormas.api.Disease.AFP;
3623
import static de.symeda.sormas.api.Disease.ANTHRAX;
3724
import static de.symeda.sormas.api.Disease.CHOLERA;
@@ -53,6 +40,21 @@
5340
import static de.symeda.sormas.api.Disease.UNSPECIFIED_VHF;
5441
import static de.symeda.sormas.api.Disease.YELLOW_FEVER;
5542

43+
import java.util.Date;
44+
45+
import de.symeda.sormas.api.ImportIgnore;
46+
import de.symeda.sormas.api.PseudonymizableDto;
47+
import de.symeda.sormas.api.utils.Complication;
48+
import de.symeda.sormas.api.utils.DataHelper;
49+
import de.symeda.sormas.api.utils.DependantOn;
50+
import de.symeda.sormas.api.utils.Diseases;
51+
import de.symeda.sormas.api.utils.HideForCountries;
52+
import de.symeda.sormas.api.utils.HideForCountriesExcept;
53+
import de.symeda.sormas.api.utils.Order;
54+
import de.symeda.sormas.api.utils.Outbreaks;
55+
import de.symeda.sormas.api.utils.SensitiveData;
56+
import de.symeda.sormas.api.utils.YesNoUnknown;
57+
5658
public class SymptomsDto extends PseudonymizableDto {
5759

5860
private static final long serialVersionUID = 4146526547904182448L;
@@ -212,7 +214,8 @@ public class SymptomsDto extends PseudonymizableDto {
212214
public static final String VOMITING = "vomiting";
213215
public static final String WHEEZING = "wheezing";
214216
public static final String RESPIRATORY_DISEASE_VENTILATION = "respiratoryDiseaseVentilation";
215-
public static final String GENERAL_SIGNS_OF_DISEASE = "generalSignsOfDisease";
217+
public static final String FEELING_ILL = "feelingIll";
218+
public static final String SHIVERING = "shivering";
216219
public static final String FAST_HEART_RATE = "fastHeartRate";
217220
public static final String OXYGEN_SATURATION_LOWER_94 = "oxygenSaturationLower94";
218221

@@ -1833,9 +1836,9 @@ public static SymptomsDto build() {
18331836
UNDEFINED,
18341837
OTHER })
18351838
@HideForCountriesExcept(countries = {
1836-
"de",
1837-
"ch" })
1838-
private SymptomState generalSignsOfDisease;
1839+
COUNTRY_CODE_GERMANY,
1840+
COUNTRY_CODE_SWITZERLAND })
1841+
private SymptomState feelingIll;
18391842

18401843
@Diseases({
18411844
CORONAVIRUS,
@@ -2138,6 +2141,15 @@ public static SymptomsDto build() {
21382141
@HideForCountriesExcept(countries = "ch")
21392142
private SymptomState urinaryRetention;
21402143

2144+
@Diseases({
2145+
CORONAVIRUS,
2146+
UNDEFINED,
2147+
OTHER })
2148+
@HideForCountriesExcept(countries = {
2149+
COUNTRY_CODE_GERMANY,
2150+
COUNTRY_CODE_SWITZERLAND })
2151+
private SymptomState shivering;
2152+
21412153
@Order(0)
21422154
public Float getTemperature() {
21432155
return temperature;
@@ -2850,16 +2862,21 @@ public SymptomState getRespiratoryDiseaseVentilation() {
28502862
}
28512863

28522864
@Order(301)
2853-
public SymptomState getGeneralSignsOfDisease() {
2854-
return generalSignsOfDisease;
2865+
public SymptomState getFeelingIll() {
2866+
return feelingIll;
28552867
}
28562868

28572869
@Order(302)
2870+
public SymptomState getShivering() {
2871+
return shivering;
2872+
}
2873+
2874+
@Order(304)
28582875
public SymptomState getFastHeartRate() {
28592876
return fastHeartRate;
28602877
}
28612878

2862-
@Order(303)
2879+
@Order(305)
28632880
public SymptomState getOxygenSaturationLower94() {
28642881
return oxygenSaturationLower94;
28652882
}
@@ -3656,8 +3673,12 @@ public void setRespiratoryDiseaseVentilation(SymptomState respiratoryDiseaseVent
36563673
this.respiratoryDiseaseVentilation = respiratoryDiseaseVentilation;
36573674
}
36583675

3659-
public void setGeneralSignsOfDisease(SymptomState generalSignsOfDisease) {
3660-
this.generalSignsOfDisease = generalSignsOfDisease;
3676+
public void setFeelingIll(SymptomState feelingIll) {
3677+
this.feelingIll = feelingIll;
3678+
}
3679+
3680+
public void setShivering(SymptomState shivering) {
3681+
this.shivering = shivering;
36613682
}
36623683

36633684
public void setFastHeartRate(SymptomState fastHeartRate) {

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ public static String buildSymptomsHumanString(SymptomsDto symptomsDto, boolean i
478478
appendYesSymptom(string, symptomsDto.getInabilityToWalk(), SymptomsDto.INABILITY_TO_WALK);
479479
appendYesSymptom(string, symptomsDto.getInDrawingOfChestWall(), SymptomsDto.IN_DRAWING_OF_CHEST_WALL);
480480
appendYesSymptom(string, symptomsDto.getRespiratoryDiseaseVentilation(), SymptomsDto.RESPIRATORY_DISEASE_VENTILATION);
481-
appendYesSymptom(string, symptomsDto.getGeneralSignsOfDisease(), SymptomsDto.GENERAL_SIGNS_OF_DISEASE);
481+
appendYesSymptom(string, symptomsDto.getFeelingIll(), SymptomsDto.FEELING_ILL);
482+
appendYesSymptom(string, symptomsDto.getShivering(), SymptomsDto.SHIVERING);
482483
appendYesSymptom(string, symptomsDto.getFastHeartRate(), SymptomsDto.FAST_HEART_RATE);
483484
appendYesSymptom(string, symptomsDto.getOxygenSaturationLower94(), SymptomsDto.OXYGEN_SATURATION_LOWER_94);
484485

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,8 @@ Symptoms.conjunctivalInjection=Conjunctivitis
16411641
Symptoms.acuteRespiratoryDistressSyndrome=Acute respiratory distress syndrome
16421642
Symptoms.pneumoniaClinicalOrRadiologic=Pneumonia (clinical or radiologic)
16431643
Symptoms.respiratoryDiseaseVentilation=Respiratory disease requiring ventilation
1644-
Symptoms.generalSignsOfDisease=General signs of disease
1644+
Symptoms.feelingIll=Feeling ill
1645+
Symptoms.shivering=Shivering
16451646
Symptoms.fastHeartRate=Fast heart rate (Tachycardia)
16461647
Symptoms.oxygenSaturationLower94=Oxygen saturation < 94 %
16471648
Symptoms.feverishFeeling=Feverish feeling

sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,10 @@ public void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource, int
16111611
getDao(Case.class).executeRaw("ALTER TABLE cases ADD COLUMN endOfIsolationReason varchar(255);");
16121612
getDao(Case.class).executeRaw("ALTER TABLE cases ADD COLUMN endOfIsolationReasonDetails varchar(512);");
16131613

1614+
case 230:
1615+
currentVersion = 230;
1616+
getDao(Symptoms.class).executeRaw("ALTER TABLE symptoms ADD COLUMN shivering varchar(255);");
1617+
16141618
// ATTENTION: break should only be done after last version
16151619
break;
16161620
default:

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ public class Symptoms extends PseudonymizableAdo {
307307
private SymptomState coma;
308308
@Enumerated(EnumType.STRING)
309309
private SymptomState respiratoryDiseaseVentilation;
310-
@Enumerated(EnumType.STRING)
311-
private SymptomState generalSignsOfDisease;
310+
@DatabaseField(dataType = DataType.ENUM_STRING, columnName = "generalSignsOfDisease")
311+
private SymptomState feelingIll;
312312
@Enumerated(EnumType.STRING)
313313
private SymptomState fastHeartRate;
314314
@Enumerated(EnumType.STRING)
@@ -423,6 +423,8 @@ public class Symptoms extends PseudonymizableAdo {
423423
private SymptomState highOrLowBloodPressure;
424424
@Enumerated(EnumType.STRING)
425425
private SymptomState urinaryRetention;
426+
@Enumerated(EnumType.STRING)
427+
private SymptomState shivering;
426428

427429
@Override
428430
public String getI18nPrefix() {
@@ -1741,12 +1743,12 @@ public void setRespiratoryDiseaseVentilation(SymptomState respiratoryDiseaseVent
17411743
this.respiratoryDiseaseVentilation = respiratoryDiseaseVentilation;
17421744
}
17431745

1744-
public SymptomState getGeneralSignsOfDisease() {
1745-
return generalSignsOfDisease;
1746+
public SymptomState getFeelingIll() {
1747+
return feelingIll;
17461748
}
17471749

1748-
public void setGeneralSignsOfDisease(SymptomState generalSignsOfDisease) {
1749-
this.generalSignsOfDisease = generalSignsOfDisease;
1750+
public void setFeelingIll(SymptomState feelingIll) {
1751+
this.feelingIll = feelingIll;
17501752
}
17511753

17521754
public SymptomState getFastHeartRate() {
@@ -1860,4 +1862,12 @@ public SymptomState getUrinaryRetention() {
18601862
public void setUrinaryRetention(SymptomState urinaryRetention) {
18611863
this.urinaryRetention = urinaryRetention;
18621864
}
1865+
1866+
public SymptomState getShivering() {
1867+
return shivering;
1868+
}
1869+
1870+
public void setShivering(SymptomState shivering) {
1871+
this.shivering = shivering;
1872+
}
18631873
}

sormas-app/app/src/main/java/de/symeda/sormas/app/backend/symptoms/SymptomsDtoHelper.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public void fillInnerFromDto(Symptoms target, SymptomsDto source) {
219219
target.setOtherComplications(source.getOtherComplications());
220220
target.setOtherComplicationsText(source.getOtherComplicationsText());
221221
target.setRespiratoryDiseaseVentilation(source.getRespiratoryDiseaseVentilation());
222-
target.setGeneralSignsOfDisease(source.getGeneralSignsOfDisease());
222+
target.setFeelingIll(source.getFeelingIll());
223223
target.setFastHeartRate(source.getFastHeartRate());
224224
target.setOxygenSaturationLower94(source.getOxygenSaturationLower94());
225225
target.setFeverishFeeling(source.getFeverishFeeling());
@@ -234,6 +234,7 @@ public void fillInnerFromDto(Symptoms target, SymptomsDto source) {
234234
target.setDizzinessStandingUp(source.getDizzinessStandingUp());
235235
target.setHighOrLowBloodPressure(source.getHighOrLowBloodPressure());
236236
target.setUrinaryRetention(source.getUrinaryRetention());
237+
target.setShivering(source.getShivering());
237238

238239
target.setPseudonymized(source.isPseudonymized());
239240
}
@@ -404,7 +405,7 @@ public void fillInnerFromAdo(SymptomsDto target, Symptoms source) {
404405
target.setOtherComplications(source.getOtherComplications());
405406
target.setOtherComplicationsText(source.getOtherComplicationsText());
406407
target.setRespiratoryDiseaseVentilation(source.getRespiratoryDiseaseVentilation());
407-
target.setGeneralSignsOfDisease(source.getGeneralSignsOfDisease());
408+
target.setFeelingIll(source.getFeelingIll());
408409
target.setFastHeartRate(source.getFastHeartRate());
409410
target.setOxygenSaturationLower94(source.getOxygenSaturationLower94());
410411
target.setFeverishFeeling(source.getFeverishFeeling());
@@ -419,6 +420,7 @@ public void fillInnerFromAdo(SymptomsDto target, Symptoms source) {
419420
target.setDizzinessStandingUp(source.getDizzinessStandingUp());
420421
target.setHighOrLowBloodPressure(source.getHighOrLowBloodPressure());
421422
target.setUrinaryRetention(source.getUrinaryRetention());
423+
target.setShivering(source.getShivering());
422424

423425
target.setPseudonymized(source.isPseudonymized());
424426
}

sormas-app/app/src/main/res/layout/fragment_symptoms_edit_layout.xml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,31 @@
113113
</LinearLayout>
114114

115115
<de.symeda.sormas.app.component.controls.ControlSwitchField
116-
android:id="@+id/symptoms_generalSignsOfDisease"
116+
android:id="@+id/symptoms_feelingIll"
117117
app:enumClass="@{symptomStateClass}"
118118
app:slim="true"
119-
app:value="@={data.generalSignsOfDisease}"
119+
app:value="@={data.feelingIll}"
120+
style="@style/ControlSingleColumnStyle" />
121+
122+
<de.symeda.sormas.app.component.controls.ControlSwitchField
123+
android:id="@+id/symptoms_shivering"
124+
app:enumClass="@{symptomStateClass}"
125+
app:slim="true"
126+
app:value="@={data.shivering}"
127+
style="@style/ControlSingleColumnStyle" />
128+
129+
<de.symeda.sormas.app.component.controls.ControlSwitchField
130+
android:id="@+id/symptoms_headache"
131+
app:enumClass="@{symptomStateClass}"
132+
app:slim="true"
133+
app:value="@={data.headache}"
134+
style="@style/ControlSingleColumnStyle" />
135+
136+
<de.symeda.sormas.app.component.controls.ControlSwitchField
137+
android:id="@+id/symptoms_musclePain"
138+
app:enumClass="@{symptomStateClass}"
139+
app:slim="true"
140+
app:value="@={data.musclePain}"
120141
style="@style/ControlSingleColumnStyle" />
121142

122143
<de.symeda.sormas.app.component.controls.ControlSwitchField
@@ -392,13 +413,6 @@
392413
app:value="@={data.fluidInLungCavityXray}"
393414
style="@style/ControlSingleColumnStyle" />
394415

395-
<de.symeda.sormas.app.component.controls.ControlSwitchField
396-
android:id="@+id/symptoms_headache"
397-
app:enumClass="@{symptomStateClass}"
398-
app:slim="true"
399-
app:value="@={data.headache}"
400-
style="@style/ControlSingleColumnStyle" />
401-
402416
<de.symeda.sormas.app.component.controls.ControlSwitchField
403417
android:id="@+id/symptoms_hiccups"
404418
app:enumClass="@{symptomStateClass}"
@@ -491,13 +505,6 @@
491505
app:value="@={data.microcephaly}"
492506
style="@style/ControlSingleColumnStyle" />
493507

494-
<de.symeda.sormas.app.component.controls.ControlSwitchField
495-
android:id="@+id/symptoms_musclePain"
496-
app:enumClass="@{symptomStateClass}"
497-
app:slim="true"
498-
app:value="@={data.musclePain}"
499-
style="@style/ControlSingleColumnStyle" />
500-
501508
<de.symeda.sormas.app.component.controls.ControlSwitchField
502509
android:id="@+id/symptoms_nausea"
503510
app:enumClass="@{symptomStateClass}"

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ public class Symptoms extends AbstractDomainObject {
200200
private SymptomState inabilityToWalk;
201201
private SymptomState inDrawingOfChestWall;
202202
private SymptomState respiratoryDiseaseVentilation;
203-
private SymptomState generalSignsOfDisease;
203+
private SymptomState feelingIll;
204+
private SymptomState shivering;
204205
private SymptomState fastHeartRate;
205206
private SymptomState oxygenSaturationLower94;
206207

@@ -1680,12 +1681,21 @@ public void setRespiratoryDiseaseVentilation(SymptomState respiratoryDiseaseVent
16801681
}
16811682

16821683
@Enumerated(EnumType.STRING)
1683-
public SymptomState getGeneralSignsOfDisease() {
1684-
return generalSignsOfDisease;
1684+
public SymptomState getFeelingIll() {
1685+
return feelingIll;
16851686
}
16861687

1687-
public void setGeneralSignsOfDisease(SymptomState generalSignsOfDisease) {
1688-
this.generalSignsOfDisease = generalSignsOfDisease;
1688+
public void setFeelingIll(SymptomState feelingIll) {
1689+
this.feelingIll = feelingIll;
1690+
}
1691+
1692+
@Enumerated(EnumType.STRING)
1693+
public SymptomState getShivering() {
1694+
return shivering;
1695+
}
1696+
1697+
public void setShivering(SymptomState shivering) {
1698+
this.shivering = shivering;
16891699
}
16901700

16911701
@Enumerated(EnumType.STRING)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ public Symptoms fromDto(SymptomsDto dto) {
217217
target.setOtherComplications(source.getOtherComplications());
218218
target.setOtherComplicationsText(source.getOtherComplicationsText());
219219
target.setRespiratoryDiseaseVentilation(source.getRespiratoryDiseaseVentilation());
220-
target.setGeneralSignsOfDisease(source.getGeneralSignsOfDisease());
220+
target.setFeelingIll(source.getFeelingIll());
221+
target.setShivering(source.getShivering());
221222
target.setFastHeartRate(source.getFastHeartRate());
222223
target.setOxygenSaturationLower94(source.getOxygenSaturationLower94());
223224
target.setFeverishFeeling(source.getFeverishFeeling());
@@ -413,7 +414,8 @@ public static SymptomsDto toDto(Symptoms symptoms) {
413414
target.setOtherComplications(source.getOtherComplications());
414415
target.setOtherComplicationsText(source.getOtherComplicationsText());
415416
target.setRespiratoryDiseaseVentilation(source.getRespiratoryDiseaseVentilation());
416-
target.setGeneralSignsOfDisease(source.getGeneralSignsOfDisease());
417+
target.setFeelingIll(source.getFeelingIll());
418+
target.setShivering(source.getShivering());
417419
target.setFastHeartRate(source.getFastHeartRate());
418420
target.setOxygenSaturationLower94(source.getOxygenSaturationLower94());
419421
target.setFeverishFeeling(source.getFeverishFeeling());

0 commit comments

Comments
 (0)