Skip to content

Commit f877274

Browse files
Merge pull request #13379 from SORMAS-Foundation/13346-modify-disease-enum-for-invasive-meningococcal-infection
13346 modify disease enum for invasive meningococcal infection
2 parents ade61d0 + 1da5141 commit f877274

File tree

56 files changed

+1348
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1348
-173
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/Disease.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public enum Disease
8585
POST_IMMUNIZATION_ADVERSE_EVENTS_MILD(true, false, false, true, false, 0, true, false, false),
8686
POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE(true, false, false, true, false, 0, true, false, false),
8787
FHA(true, false, false, true, false, 0, true, false, false),
88+
INVASIVE_PNEUMOCOCCAL_INFECTION(true, true, true, false, false, 0, false, false, false),
89+
INVASIVE_MENINGOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false),
8890
OTHER(true, true, true, false, true, 21, false, false, false),
8991
UNDEFINED(true, true, true, false, true, 0, false, false, false);
9092

sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,10 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
360360
@EmbeddedPersonalData
361361
@EmbeddedSensitiveData
362362
@SensitiveData
363+
@Diseases(value = {
364+
Disease.INVASIVE_MENINGOCOCCAL_INFECTION,
365+
Disease.INVASIVE_PNEUMOCOCCAL_INFECTION}, hide = true)
363366
private HealthConditionsDto healthConditions;
364-
@HideForCountries(countries = {
365-
COUNTRY_CODE_LUXEMBOURG })
366367
private YesNoUnknown pregnant;
367368
@Diseases({
368369
Disease.AFP,
@@ -378,8 +379,6 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
378379
Disease.RESPIRATORY_SYNCYTIAL_VIRUS,
379380
Disease.OTHER })
380381
@Outbreaks
381-
@HideForCountries(countries = {
382-
COUNTRY_CODE_LUXEMBOURG })
383382
private VaccinationStatus vaccinationStatus;
384383
@Diseases({
385384
Disease.MONKEYPOX })
@@ -392,26 +391,18 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
392391
private Date smallpoxLastVaccinationDate;
393392
@Outbreaks
394393
@SensitiveData
395-
@HideForCountries(countries = {
396-
COUNTRY_CODE_LUXEMBOURG })
397394
private UserReferenceDto surveillanceOfficer;
398395
@SensitiveData
399396
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
400397
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
401-
@HideForCountries(countries = {
402-
COUNTRY_CODE_LUXEMBOURG })
403398
private String clinicianName;
404399
@SensitiveData
405400
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
406401
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
407-
@HideForCountries(countries = {
408-
COUNTRY_CODE_LUXEMBOURG })
409402
private String clinicianPhone;
410403
@SensitiveData
411404
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
412405
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
413-
@HideForCountries(countries = {
414-
COUNTRY_CODE_LUXEMBOURG })
415406
private String clinicianEmail;
416407
@Diseases({
417408
Disease.CONGENITAL_RUBELLA })
@@ -467,8 +458,6 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
467458
@S2SIgnoreProperty(configProperty = SormasToSormasConfig.SORMAS2SORMAS_IGNORE_ADDITIONAL_DETAILS)
468459
@SensitiveData
469460
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
470-
@HideForCountries(countries = {
471-
COUNTRY_CODE_LUXEMBOURG })
472461
private String additionalDetails;
473462
@HideForCountriesExcept(countries = {
474463
COUNTRY_CODE_GERMANY,
@@ -537,8 +526,6 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
537526
COUNTRY_CODE_GERMANY,
538527
COUNTRY_CODE_SWITZERLAND })
539528
private Date quarantineOfficialOrderSentDate;
540-
@HideForCountries(countries = {
541-
COUNTRY_CODE_LUXEMBOURG })
542529
@SensitiveData
543530
private YesNoUnknown postpartum;
544531
@SensitiveData
@@ -1833,6 +1820,15 @@ public void setDepartment(String department) {
18331820
this.department = department;
18341821
}
18351822

1823+
/**
1824+
* Checks if the case is an invasive bacterial disease (meningococcal or pneumococcal)
1825+
* @return boolean
1826+
*/
1827+
public boolean checkDiseaseIsInvasiveBacterialDiseases(){
1828+
return disease != null && (disease == Disease.INVASIVE_MENINGOCOCCAL_INFECTION ||
1829+
disease == Disease.INVASIVE_PNEUMOCOCCAL_INFECTION);
1830+
}
1831+
18361832
@JsonIgnore
18371833
public String i18nPrefix() {
18381834
return I18N_PREFIX;

sormas-api/src/main/java/de/symeda/sormas/api/caze/Vaccine.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ public enum Vaccine {
6868
@Diseases(value = {
6969
Disease.MONKEYPOX })
7070
LC_16(VaccineManufacturer.KM_BIOLOGICS),
71+
@Diseases(value = {Disease.INVASIVE_PNEUMOCOCCAL_INFECTION})
72+
PREVENAR_13_PFIZER(VaccineManufacturer.PFIZER, "PCV13"),
73+
@Diseases(value = {Disease.INVASIVE_PNEUMOCOCCAL_INFECTION})
74+
VAXNEUVANCE_MERCK(VaccineManufacturer.MERCK,"PCV15"),
75+
@Diseases(value = {Disease.INVASIVE_PNEUMOCOCCAL_INFECTION})
76+
PREVNAR_20_PFIZER(VaccineManufacturer.PFIZER, "PCV20"),
77+
@Diseases(value = {Disease.INVASIVE_PNEUMOCOCCAL_INFECTION})
78+
PNEUMOVAX_23_MERCK(VaccineManufacturer.MERCK,"PPV23"),
7179
@Diseases(value = {
7280
Disease.MONKEYPOX })
7381
MVA_BN(VaccineManufacturer.BAVARIAN_NORDIC),
@@ -76,6 +84,8 @@ public enum Vaccine {
7684

7785
@Nullable
7886
private VaccineManufacturer manufacturer;
87+
@Nullable
88+
private String vaccineType;
7989

8090
Vaccine() {
8191
}
@@ -84,10 +94,28 @@ public enum Vaccine {
8494
this.manufacturer = manufacturer;
8595
}
8696

97+
/**
98+
* This constructor is used for vaccines that have a specific type (e.g. "PCV13") and its manufacturers.
99+
*
100+
* @param manufacturer
101+
* the manufacturer of the vaccine
102+
* @param vaccineType
103+
* the type of the vaccine (e.g. "PCV13")
104+
*/
105+
Vaccine(@Nullable VaccineManufacturer manufacturer, @Nullable String vaccineType) {
106+
this.manufacturer = manufacturer;
107+
this.vaccineType = vaccineType;
108+
}
109+
87110
public VaccineManufacturer getManufacturer() {
88111
return manufacturer;
89112
}
90113

114+
@Nullable
115+
public String getVaccineType() {
116+
return vaccineType;
117+
}
118+
91119
@Override
92120
public String toString() {
93121
return I18nProperties.getEnumCaption(this);

sormas-api/src/main/java/de/symeda/sormas/api/caze/VaccineManufacturer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public enum VaccineManufacturer {
2525
Disease.CORONAVIRUS })
2626
BIONTECH_PFIZER,
2727
@Diseases(value = {
28-
Disease.CSM })
28+
Disease.CSM, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION })
2929
PFIZER,
3030
@Diseases(value = {
3131
Disease.MONKEYPOX })
@@ -52,6 +52,9 @@ public enum VaccineManufacturer {
5252
Disease.MONKEYPOX })
5353
SANOFI_PASTEUR_BIOLOGICS,
5454
VALNEVA,
55+
@Diseases(value = {
56+
Disease.INVASIVE_PNEUMOCOCCAL_INFECTION })
57+
MERCK,
5558
UNKNOWN,
5659
OTHER;
5760

sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactCriteria.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ public class ContactCriteria extends BaseCriteria implements Serializable {
152152

153153
private String caseReferenceNumber;
154154
private Boolean withCase;
155+
private Boolean prophylaxisPrescribed;
156+
private PrescribedDrug prescribedDrug;
157+
private String prescribedDrugText;
155158

156159
public UserRoleReferenceDto getReportingUserRole() {
157160
return reportingUserRole;
@@ -802,4 +805,28 @@ public ContactCriteria withCase(Boolean withNoCase) {
802805
this.withCase = withNoCase;
803806
return this;
804807
}
808+
809+
public Boolean getProphylaxisPrescribed() {
810+
return prophylaxisPrescribed;
811+
}
812+
813+
public void setProphylaxisPrescribed(Boolean prophylaxisPrescribed) {
814+
this.prophylaxisPrescribed = prophylaxisPrescribed;
815+
}
816+
817+
public PrescribedDrug getPrescribedDrug() {
818+
return prescribedDrug;
819+
}
820+
821+
public void setPrescribedDrug(PrescribedDrug prescribedDrug) {
822+
this.prescribedDrug = prescribedDrug;
823+
}
824+
825+
public String getPrescribedDrugText() {
826+
return prescribedDrugText;
827+
}
828+
829+
public void setPrescribedDrugText(String prescribedDrugText) {
830+
this.prescribedDrugText = prescribedDrugText;
831+
}
805832
}

sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package de.symeda.sormas.api.contact;
1616

1717
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_GERMANY;
18+
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_LUXEMBOURG;
1819
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_SWITZERLAND;
1920
import static de.symeda.sormas.api.utils.FieldConstraints.CHARACTER_LIMIT_BIG;
2021

@@ -149,6 +150,9 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
149150
public static final String QUARANTINE_CHANGE_COMMENT = "quarantineChangeComment";
150151
public static final String DELETION_REASON = "deletionReason";
151152
public static final String OTHER_DELETION_REASON = "otherDeletionReason";
153+
public static final String PROPHYLAXIS_PRESCRIBED = "prophylaxisPrescribed";
154+
public static final String PRESCRIBED_DRUG = "prescribedDrug";
155+
public static final String PRESCRIBED_DRUG_TEXT = "prescribedDrugText";
152156

153157
@EmbeddedPersonalData
154158
private CaseReferenceDto caze;
@@ -209,11 +213,15 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
209213
private ContactCategory contactCategory;
210214
private ContactClassification contactClassification;
211215
private ContactStatus contactStatus;
216+
@Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
212217
private FollowUpStatus followUpStatus;
213218
@SensitiveData
214219
@Size(max = CHARACTER_LIMIT_BIG, message = Validations.textTooLong)
220+
@Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
215221
private String followUpComment;
222+
@Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
216223
private Date followUpUntil;
224+
@Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
217225
private boolean overwriteFollowUpUntil;
218226
@SensitiveData
219227
@Size(max = CHARACTER_LIMIT_BIG, message = Validations.textTooLong)
@@ -244,7 +252,8 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
244252
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
245253
private String immunosuppressiveTherapyBasicDiseaseDetails;
246254
private YesNoUnknown careForPeopleOver60;
247-
255+
@Diseases(value = {
256+
Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true)
248257
private QuarantineType quarantine;
249258
@SensitiveData
250259
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
@@ -257,6 +266,8 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
257266
private PersonReferenceDto person;
258267

259268
@SensitiveData
269+
@Diseases(value = {
270+
Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true)
260271
private UserReferenceDto contactOfficer;
261272

262273
@EmbeddedPersonalData
@@ -361,6 +372,18 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
361372
private DeletionReason deletionReason;
362373
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
363374
private String otherDeletionReason;
375+
@HideForCountriesExcept(countries = {COUNTRY_CODE_LUXEMBOURG})
376+
@SensitiveData
377+
@Diseases(Disease.INVASIVE_MENINGOCOCCAL_INFECTION)
378+
private Boolean prophylaxisPrescribed;
379+
@HideForCountriesExcept(countries = {COUNTRY_CODE_LUXEMBOURG})
380+
@SensitiveData
381+
@Diseases(Disease.INVASIVE_MENINGOCOCCAL_INFECTION)
382+
private PrescribedDrug prescribedDrug;
383+
@HideForCountriesExcept(countries = {COUNTRY_CODE_LUXEMBOURG})
384+
@SensitiveData
385+
@Diseases(Disease.INVASIVE_MENINGOCOCCAL_INFECTION)
386+
private String prescribedDrugText;
364387

365388
public static ContactDto build() {
366389
final ContactDto contact = new ContactDto();
@@ -1060,4 +1083,29 @@ public String getOtherDeletionReason() {
10601083
public void setOtherDeletionReason(String otherDeletionReason) {
10611084
this.otherDeletionReason = otherDeletionReason;
10621085
}
1086+
1087+
public Boolean getProphylaxisPrescribed() {
1088+
return prophylaxisPrescribed;
1089+
}
1090+
1091+
public void setProphylaxisPrescribed(Boolean prophylaxisPrescribed) {
1092+
this.prophylaxisPrescribed = prophylaxisPrescribed;
1093+
}
1094+
1095+
public PrescribedDrug getPrescribedDrug() {
1096+
return prescribedDrug;
1097+
}
1098+
1099+
public void setPrescribedDrug(PrescribedDrug prescribedDrug) {
1100+
this.prescribedDrug = prescribedDrug;
1101+
}
1102+
1103+
public String getPrescribedDrugText() {
1104+
return prescribedDrugText;
1105+
}
1106+
1107+
public void setPrescribedDrugText(String prescribedDrugText) {
1108+
this.prescribedDrugText = prescribedDrugText;
1109+
}
1110+
10631111
}

sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDetailedDto.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,17 @@ public ContactIndexDetailedDto(String uuid, String personUuid, String personFirs
7373
String externalID, String externalToken, String internalToken, String caseReferenceNumber, DeletionReason deletionReason, String otherDeleteReason, boolean isInJurisdiction, boolean isCaseInJurisdiction,
7474
Sex sex, Integer approximateAge, ApproximateAgeType approximateAgeType,
7575
String city, String street, String houseNumber, String additionalInformation, String postalCode, String phone,
76-
String reportingUserFirstName, String reportingUserLastName, ContactRelation relationToCase, int visitCount
76+
String reportingUserFirstName, String reportingUserLastName, ContactRelation relationToCase, int visitCount,
77+
Boolean prophylaxisPrescribed, PrescribedDrug prescribedDrug, String prescribedDrugText
7778
) {
7879
//@formatter:on
7980

8081
//@formatter:off
8182
super(uuid, personUuid, personFirstName, personLastName, cazeUuid, disease, diseaseDetails, caseFirstName, caseLastName,
8283
regionName, districtName, lastContactDate, contactCategory, contactProximity, contactClassification, contactStatus,
8384
completeness, followUpStatus, followUpUntil, symptomJournalStatus, vaccinationStatus, contactOfficerUuid, reportingUserUuid, reportDateTime, caseClassification,
84-
caseRegionName, caseDistrictName, changeDate, externalID, externalToken, internalToken, caseReferenceNumber, deletionReason, otherDeleteReason,isInJurisdiction, isCaseInJurisdiction , visitCount);
85+
caseRegionName, caseDistrictName, changeDate, externalID, externalToken, internalToken, caseReferenceNumber, deletionReason, otherDeleteReason,isInJurisdiction, isCaseInJurisdiction , visitCount,
86+
prophylaxisPrescribed, prescribedDrug, prescribedDrugText);
8587

8688
//@formatter:on
8789

sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDto.java

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public class ContactIndexDto extends PseudonymizableIndexDto implements IsContac
6262
public static final String REGION_UUID = "regionUuid";
6363
public static final String DISTRICT_UUID = "districtUuid";
6464
public static final String COMMUNITY_UUID = "communityUuid";
65+
public static final String PROPHYLAXIS_PRESCRIBED = "prophylaxisPrescribed";
66+
public static final String PRESCRIBED_DRUG = "prescribedDrug";
67+
public static final String PRESCRIBED_DRUG_TEXT = "prescribedDrugText";
6568

6669
private String personUuid;
6770
@PersonalData
@@ -98,6 +101,9 @@ public class ContactIndexDto extends PseudonymizableIndexDto implements IsContac
98101

99102
private DeletionReason deletionReason;
100103
private String otherDeletionReason;
104+
private Boolean prophylaxisPrescribed;
105+
private PrescribedDrug prescribedDrug;
106+
private String prescribedDrugText;
101107

102108
private ContactJurisdictionFlagsDto contactJurisdictionFlagsDto;
103109

@@ -111,7 +117,7 @@ public ContactIndexDto(String uuid, String personUuid, String personFirstName, S
111117
CaseClassification caseClassification, String caseRegionName, String caseDistrictName,
112118
Date changeDate, // XXX: unused, only here for TypedQuery mapping
113119
String externalID, String externalToken, String internalToken,String caseReferenceNumber, DeletionReason deletionReason, String otherDeletionReason, boolean isInJurisdiction, boolean isCaseInJurisdiction,
114-
int visitCount
120+
int visitCount, Boolean prophylaxisPrescribed, PrescribedDrug prescribedDrug, String prescribedDrugText
115121
) {
116122
//@formatter:on
117123

@@ -153,6 +159,9 @@ public ContactIndexDto(String uuid, String personUuid, String personFirstName, S
153159
this.otherDeletionReason = otherDeletionReason;
154160

155161
this.contactJurisdictionFlagsDto = new ContactJurisdictionFlagsDto(isInJurisdiction, isCaseInJurisdiction);
162+
this.prophylaxisPrescribed = prophylaxisPrescribed;
163+
this.prescribedDrug = prescribedDrug;
164+
this.prescribedDrugText = prescribedDrugText;
156165
}
157166

158167
public String getPersonUuid() {
@@ -419,6 +428,30 @@ public void setOtherDeletionReason(String otherDeletionReason) {
419428
this.otherDeletionReason = otherDeletionReason;
420429
}
421430

431+
public Boolean getProphylaxisPrescribed() {
432+
return prophylaxisPrescribed;
433+
}
434+
435+
public void setProphylaxisPrescribed(Boolean prophylaxisPrescribed) {
436+
this.prophylaxisPrescribed = prophylaxisPrescribed;
437+
}
438+
439+
public PrescribedDrug getPrescribedDrug() {
440+
return prescribedDrug;
441+
}
442+
443+
public void setPrescribedDrug(PrescribedDrug prescribedDrug) {
444+
this.prescribedDrug = prescribedDrug;
445+
}
446+
447+
public String getPrescribedDrugText() {
448+
return prescribedDrugText;
449+
}
450+
451+
public void setPrescribedDrugText(String prescribedDrugText) {
452+
this.prescribedDrugText = prescribedDrugText;
453+
}
454+
422455
@Override
423456
public Object clone() throws CloneNotSupportedException {
424457
return super.clone();

0 commit comments

Comments
 (0)