Skip to content

Commit 16f23b1

Browse files
Merge pull request #13393 from SORMAS-Foundation/pertussis-symptoms
Pertussis symptoms
2 parents b250a5f + 70da02f commit 16f23b1

File tree

11 files changed

+106
-21
lines changed

11 files changed

+106
-21
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/caze/classification/ClassificationCaseCriteriaDto.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class ClassificationCaseCriteriaDto extends ClassificationCriteriaDto {
4545
private static final long serialVersionUID = 2640725590302569043L;
4646

4747
protected String propertyId;
48+
protected String addition;
4849
protected List<Object> propertyValues;
4950

5051
public ClassificationCaseCriteriaDto() {
@@ -55,6 +56,12 @@ public ClassificationCaseCriteriaDto(String propertyId, Object... propertyValues
5556
this.propertyId = propertyId;
5657
this.propertyValues = Arrays.asList(propertyValues);
5758
}
59+
// to add the property values disease specific
60+
public ClassificationCaseCriteriaDto(String propertyId, String addition, Object... propertyValues) {
61+
this.propertyId = propertyId;
62+
this.propertyValues = Arrays.asList(propertyValues);
63+
this.addition = addition;
64+
}
5865

5966
protected Class<? extends EntityDto> getInvokeClass() {
6067
return CaseDataDto.class;
@@ -98,7 +105,7 @@ protected StringBuilder appendDescValues(StringBuilder stringBuilder) {
98105
public String buildDescription() {
99106

100107
StringBuilder stringBuilder = new StringBuilder();
101-
stringBuilder.append(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, propertyId));
108+
stringBuilder.append(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, propertyId,null, addition));
102109
appendDescValues(stringBuilder);
103110
return stringBuilder.toString();
104111
}

sormas-api/src/main/java/de/symeda/sormas/api/caze/classification/ClassificationSymptomsCriteriaDto.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public ClassificationSymptomsCriteriaDto() {
3434
public ClassificationSymptomsCriteriaDto(String propertyId) {
3535
super(propertyId, SymptomState.YES);
3636
}
37+
// to add the property values disease specific
38+
public ClassificationSymptomsCriteriaDto(String propertyId, String addition) {
39+
super(propertyId, addition, SymptomState.YES);
40+
}
3741

3842
public ClassificationSymptomsCriteriaDto(String propertyId, Object... propertyValues) {
3943
super(propertyId, propertyValues);
@@ -53,7 +57,7 @@ protected Object getInvokeObject(CaseDataDto caze) {
5357
public String buildDescription() {
5458

5559
StringBuilder stringBuilder = new StringBuilder();
56-
stringBuilder.append(I18nProperties.getPrefixCaption(SymptomsDto.I18N_PREFIX, propertyId));
60+
stringBuilder.append(I18nProperties.getPrefixCaption(SymptomsDto.I18N_PREFIX, propertyId,null, addition));
5761
if (!(propertyValues.get(0) instanceof SymptomState)) {
5862
appendDescValues(stringBuilder);
5963
}

sormas-api/src/main/java/de/symeda/sormas/api/event/TypeOfPlace.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ public enum TypeOfPlace {
3737
MEANS_OF_TRANSPORT,
3838
PUBLIC_PLACE,
3939
SCATTERED,
40+
SCHOOL,
41+
EDUCATION_AND_CHILDCARE,
42+
NURSING_HOME,
43+
ASYLUM_SEEKERS_SHELTER,
4044
UNKNOWN,
4145
OTHER;
4246

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

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ public class SymptomsDto extends PseudonymizableDto {
273273
public static final String VOMITING = "vomiting";
274274
public static final String WHEEZING = "wheezing";
275275
public static final String WHOOP_SOUND = "whoopSound";
276+
public static final String NOCTURNAL_COUGH = "nocturnalCough";
276277
public static final String RESPIRATORY_DISEASE_VENTILATION = "respiratoryDiseaseVentilation";
277278
public static final String FEELING_ILL = "feelingIll";
278279
public static final String SHIVERING = "shivering";
@@ -307,7 +308,7 @@ public class SymptomsDto extends PseudonymizableDto {
307308
public static final String SEPSIS = "sepsis";
308309
public static final String SHOCK = "shock";
309310
// clinical
310-
public static final String ASYMPTOMATIC = "asymptomatic";
311+
public static final String ASYMPTOMATIC = "asymptomatic";
311312
public static final String HEMORRHAGIC_RASH = "hemorrhagicRash";
312313
public static final String ARTHRITIS = "arthritis";
313314
public static final String MENINGITIS = "meningitis";
@@ -739,6 +740,7 @@ public static SymptomsDto build() {
739740
ANTHRAX,
740741
CORONAVIRUS,
741742
UNDEFINED,
743+
PERTUSSIS,
742744
OTHER })
743745
@Outbreaks
744746
@SymptomGrouping(SymptomGroup.GENERAL)
@@ -1315,8 +1317,9 @@ public static SymptomsDto build() {
13151317
POST_IMMUNIZATION_ADVERSE_EVENTS_MILD,
13161318
POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE,
13171319
FHA,
1318-
INVASIVE_MENINGOCOCCAL_INFECTION,
1319-
INVASIVE_PNEUMOCOCCAL_INFECTION })
1320+
INVASIVE_MENINGOCOCCAL_INFECTION,
1321+
INVASIVE_PNEUMOCOCCAL_INFECTION,
1322+
PERTUSSIS})
13201323
@HideForCountries
13211324
@Outbreaks
13221325
private Date onsetDate;
@@ -1383,7 +1386,8 @@ public static SymptomsDto build() {
13831386
POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE,
13841387
INVASIVE_MENINGOCOCCAL_INFECTION,
13851388
INVASIVE_PNEUMOCOCCAL_INFECTION,
1386-
FHA })
1389+
FHA,
1390+
PERTUSSIS})
13871391
@HideForCountries
13881392
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
13891393
private String onsetSymptom;
@@ -2137,6 +2141,12 @@ public static SymptomsDto build() {
21372141
@SymptomGrouping(SymptomGroup.RESPIRATORY)
21382142
private SymptomState whoopSound;
21392143

2144+
@Diseases({
2145+
PERTUSSIS })
2146+
@HideForCountries
2147+
@SymptomGrouping(SymptomGroup.RESPIRATORY)
2148+
private SymptomState nocturnalCough;
2149+
21402150
@Diseases({
21412151
CORONAVIRUS,
21422152
UNDEFINED,
@@ -2538,9 +2548,9 @@ public static SymptomsDto build() {
25382548
@SymptomGrouping(SymptomGroup.GENERAL)
25392549
private SymptomState shivering;
25402550

2541-
@Diseases({
2542-
INVASIVE_MENINGOCOCCAL_INFECTION,
2543-
INVASIVE_PNEUMOCOCCAL_INFECTION })
2551+
@Diseases({INVASIVE_MENINGOCOCCAL_INFECTION,
2552+
INVASIVE_PNEUMOCOCCAL_INFECTION,
2553+
PERTUSSIS})
25442554
private SymptomState asymptomatic;
25452555
@Diseases({
25462556
INVASIVE_MENINGOCOCCAL_INFECTION })
@@ -4334,4 +4344,12 @@ public ClinicalPresentationStatus getClinicalPresentationStatus() {
43344344
public void setClinicalPresentationStatus(ClinicalPresentationStatus clinicalPresentationStatus) {
43354345
this.clinicalPresentationStatus = clinicalPresentationStatus;
43364346
}
4347+
4348+
public SymptomState getNocturnalCough() {
4349+
return nocturnalCough;
4350+
}
4351+
4352+
public void setNocturnalCough(SymptomState nocturnalCough) {
4353+
this.nocturnalCough = nocturnalCough;
4354+
}
43374355
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ CaseData.creationDate=Creation date
577577
CaseData.radiographyCompatibility=Radiography
578578
CaseData.otherDiagnosticCriteria=Other diagnostic details
579579

580-
CaseData.clinicalConfirmation.PERTUSSIS= OR any person diagnosed as pertussis by a physician
580+
CaseData.clinicalConfirmation.PERTUSSIS= Any person diagnosed as pertussis by a physician
581581
# CaseExport
582582
CaseExport.address=Address
583583
CaseExport.addressRegion=Address Region
@@ -2729,8 +2729,8 @@ Symptoms.congenitalHeartDiseaseDetails=Specify
27292729
Symptoms.conjunctivitis=Conjunctivitis (red eyes)
27302730
Symptoms.cough=Cough
27312731
Symptoms.coughingBouts=Coughing bouts
2732-
Symptoms.coughingBouts.PERTUSSIS=Any person with a cough lasting at least two weeks AND \n At least one of : Paroxysms of coughing/ Inspiratory ?whooping?/ Post-tussive vomiting.
2733-
Symptoms.apnoea.PERTUSSIS=OR Apnoeic episodes in infants
2732+
Symptoms.coughingBouts.PERTUSSIS=Any person with a cough lasting at least two weeks <b>AND</b>
2733+
Symptoms.apnoea.PERTUSSIS=Apnoeic episodes in infants
27342734
Symptoms.coughsProvokeVomiting=Coughs provoke vomiting
27352735
Symptoms.coughWithSputum=Cough with sputum
27362736
Symptoms.coughWithHeamoptysis=Cough with heamoptysis

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,10 @@ TypeOfPlace.OTHER = Other
15021502
TypeOfPlace.PUBLIC_PLACE = Public place
15031503
TypeOfPlace.UNKNOWN = Unknown
15041504
TypeOfPlace.SCATTERED = Scattered
1505+
TypeOfPlace.SCHOOL = School
1506+
TypeOfPlace.EDUCATION_AND_CHILDCARE = Education and childcare
1507+
TypeOfPlace.NURSING_HOME = Nursing home
1508+
TypeOfPlace.ASYLUM_SEEKERS_SHELTER = Asylum seekers' shelter
15051509

15061510
# UserRight
15071511
UserRight.CASE_ARCHIVE = Archive cases

sormas-backend/src/main/java/de/symeda/sormas/backend/caze/classification/CaseClassificationFacadeEjb.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,29 @@ private void buildCriteria() {
500500
confirmed,
501501
null);
502502

503+
// Pertusis
504+
suspect = xOf(1,allOfTogether(symptom(SymptomsDto.COUGHING_BOUTS, Disease.PERTUSSIS.name()),xOfSub(1, false,
505+
symptom(SymptomsDto.WHOOP_SOUND), symptom(SymptomsDto.COUGHS_PROVOKE_VOMITING), symptom(SymptomsDto.NOCTURNAL_COUGH))),
506+
symptom(SymptomsDto.APNOEA, Disease.PERTUSSIS.name()),
507+
caseData(CaseDataDto.CLINICAL_CONFIRMATION, Disease.PERTUSSIS.name(), YesNoUnknown.YES));
508+
509+
probable = allOf(suspect, caseData(CaseDataDto.EPIDEMIOLOGICAL_CONFIRMATION, YesNoUnknown.YES));
510+
511+
confirmed = allOf(
512+
suspect,
513+
xOf(1,(positiveTestResult(
514+
Disease.PERTUSSIS,
515+
PathogenTestType.MICROSCOPY,
516+
PathogenTestType.PCR_RT_PCR,
517+
PathogenTestType.CULTURE))));
518+
addCriteria(
519+
Disease.PERTUSSIS,
520+
DateHelper.getDateZero(2020, 11, 6),
521+
suspect,
522+
probable,
523+
confirmed,
524+
null);
525+
503526

504527
// CORONAVIRUS
505528
suspect = xOf(
@@ -638,10 +661,16 @@ private ClassificationNoneOfCriteriaDto noneOf(ClassificationCriteriaDto... crit
638661
private ClassificationCaseCriteriaDto caseData(String propertyId, Object... propertyValues) {
639662
return new ClassificationCaseCriteriaDto(propertyId, propertyValues);
640663
}
664+
private ClassificationCaseCriteriaDto caseData(String propertyId, String addition, Object... propertyValues) {
665+
return new ClassificationCaseCriteriaDto(propertyId,addition, propertyValues);
666+
}
641667

642668
private ClassificationSymptomsCriteriaDto symptom(String propertyId) {
643669
return new ClassificationSymptomsCriteriaDto(propertyId);
644670
}
671+
private ClassificationSymptomsCriteriaDto symptom(String propertyId, String addition) {
672+
return new ClassificationSymptomsCriteriaDto(propertyId, addition);
673+
}
645674

646675
private ClassificationEpiDataCriteriaDto epiData(String propertyId) {
647676
return new ClassificationEpiDataCriteriaDto(propertyId);

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ public class Symptoms extends AbstractDomainObject {
209209
private SymptomState shivering;
210210
private SymptomState fastHeartRate;
211211
private SymptomState oxygenSaturationLower94;
212+
private SymptomState nocturnalCough;
212213

213214
private SymptomState feverishFeeling;
214215
private SymptomState weakness;
@@ -2016,4 +2017,13 @@ public ClinicalPresentationStatus getClinicalPresentationStatus() {
20162017
public void setClinicalPresentationStatus(ClinicalPresentationStatus clinicalPresentationStatus) {
20172018
this.clinicalPresentationStatus = clinicalPresentationStatus;
20182019
}
2020+
2021+
@Enumerated(EnumType.STRING)
2022+
public SymptomState getNocturnalCough() {
2023+
return nocturnalCough;
2024+
}
2025+
2026+
public void setNocturnalCough(SymptomState nocturnalCough) {
2027+
this.nocturnalCough = nocturnalCough;
2028+
}
20192029
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ public Symptoms fillOrBuildEntity(SymptomsDto source, Symptoms target, boolean c
231231
target.setDateOfOnsetKnown(source.getDateOfOnsetKnown());
232232
target.setClinicalPresentationStatus(source.getClinicalPresentationStatus());
233233

234+
target.setNocturnalCough(source.getNocturnalCough());
234235
return target;
235236
}
236237

@@ -444,6 +445,7 @@ public static SymptomsDto toSymptomsDto(Symptoms symptoms) {
444445
target.setDateOfOnsetKnown(source.getDateOfOnsetKnown());
445446
target.setClinicalPresentationStatus(source.getClinicalPresentationStatus());
446447

448+
target.setNocturnalCough(source.getNocturnalCough());
447449
return target;
448450
}
449451

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14403,4 +14403,9 @@ alter table symptoms_history add clinicalpresentationstatus varchar(255);
1440314403

1440414404
INSERT INTO schema_version (version_number, comment) VALUES (576, 'Tuberculosis specific updates - symptoms changes #13324');
1440514405

14406+
-- 2025-06-16 Pertussis missed symptom, #13373
14407+
alter table symptoms add column IF NOT EXISTS nocturnalcough varchar(255);
14408+
14409+
INSERT INTO schema_version (version_number, comment) VALUES (577, 'Pertussis missed symptom, #13373');
14410+
1440614411
-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***

0 commit comments

Comments
 (0)