Skip to content

13346 modify disease enum for invasive meningococcal infection #13379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/Disease.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public enum Disease
POST_IMMUNIZATION_ADVERSE_EVENTS_MILD(true, false, false, true, false, 0, true, false, false),
POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE(true, false, false, true, false, 0, true, false, false),
FHA(true, false, false, true, false, 0, true, false, false),
INVASIVE_PNEUMOCOCCAL_INFECTION(true, true, true, false, false, 0, false, false, false),
INVASIVE_MENINGOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false),
OTHER(true, true, true, false, true, 21, false, false, false),
UNDEFINED(true, true, true, false, true, 0, false, false, false);

Expand Down
28 changes: 12 additions & 16 deletions sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,10 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
@EmbeddedPersonalData
@EmbeddedSensitiveData
@SensitiveData
@Diseases(value = {
Disease.INVASIVE_MENINGOCOCCAL_INFECTION,
Disease.INVASIVE_PNEUMOCOCCAL_INFECTION}, hide = true)
private HealthConditionsDto healthConditions;
@HideForCountries(countries = {
COUNTRY_CODE_LUXEMBOURG })
private YesNoUnknown pregnant;
@Diseases({
Disease.AFP,
Expand All @@ -378,8 +379,6 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
Disease.RESPIRATORY_SYNCYTIAL_VIRUS,
Disease.OTHER })
@Outbreaks
@HideForCountries(countries = {
COUNTRY_CODE_LUXEMBOURG })
private VaccinationStatus vaccinationStatus;
@Diseases({
Disease.MONKEYPOX })
Expand All @@ -392,26 +391,18 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
private Date smallpoxLastVaccinationDate;
@Outbreaks
@SensitiveData
@HideForCountries(countries = {
COUNTRY_CODE_LUXEMBOURG })
private UserReferenceDto surveillanceOfficer;
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
@HideForCountries(countries = {
COUNTRY_CODE_LUXEMBOURG })
private String clinicianName;
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
@HideForCountries(countries = {
COUNTRY_CODE_LUXEMBOURG })
private String clinicianPhone;
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
@DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW)
@HideForCountries(countries = {
COUNTRY_CODE_LUXEMBOURG })
private String clinicianEmail;
@Diseases({
Disease.CONGENITAL_RUBELLA })
Expand Down Expand Up @@ -467,8 +458,6 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
@S2SIgnoreProperty(configProperty = SormasToSormasConfig.SORMAS2SORMAS_IGNORE_ADDITIONAL_DETAILS)
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
@HideForCountries(countries = {
COUNTRY_CODE_LUXEMBOURG })
private String additionalDetails;
@HideForCountriesExcept(countries = {
COUNTRY_CODE_GERMANY,
Expand Down Expand Up @@ -537,8 +526,6 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
COUNTRY_CODE_GERMANY,
COUNTRY_CODE_SWITZERLAND })
private Date quarantineOfficialOrderSentDate;
@HideForCountries(countries = {
COUNTRY_CODE_LUXEMBOURG })
@SensitiveData
private YesNoUnknown postpartum;
@SensitiveData
Expand Down Expand Up @@ -1833,6 +1820,15 @@ public void setDepartment(String department) {
this.department = department;
}

/**
* Checks if the case is an invasive bacterial disease (meningococcal or pneumococcal)
* @return boolean
*/
public boolean checkDiseaseIsInvasiveBacterialDiseases(){
return disease != null && (disease == Disease.INVASIVE_MENINGOCOCCAL_INFECTION ||
disease == Disease.INVASIVE_PNEUMOCOCCAL_INFECTION);
}

@JsonIgnore
public String i18nPrefix() {
return I18N_PREFIX;
Expand Down
28 changes: 28 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/caze/Vaccine.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ public enum Vaccine {
@Diseases(value = {
Disease.MONKEYPOX })
LC_16(VaccineManufacturer.KM_BIOLOGICS),
@Diseases(value = {Disease.INVASIVE_PNEUMOCOCCAL_INFECTION})
PREVENAR_13_PFIZER(VaccineManufacturer.PFIZER, "PCV13"),
@Diseases(value = {Disease.INVASIVE_PNEUMOCOCCAL_INFECTION})
VAXNEUVANCE_MERCK(VaccineManufacturer.MERCK,"PCV15"),
@Diseases(value = {Disease.INVASIVE_PNEUMOCOCCAL_INFECTION})
PREVNAR_20_PFIZER(VaccineManufacturer.PFIZER, "PCV20"),
@Diseases(value = {Disease.INVASIVE_PNEUMOCOCCAL_INFECTION})
PNEUMOVAX_23_MERCK(VaccineManufacturer.MERCK,"PPV23"),
@Diseases(value = {
Disease.MONKEYPOX })
MVA_BN(VaccineManufacturer.BAVARIAN_NORDIC),
Expand All @@ -76,6 +84,8 @@ public enum Vaccine {

@Nullable
private VaccineManufacturer manufacturer;
@Nullable
private String vaccineType;

Vaccine() {
}
Expand All @@ -84,10 +94,28 @@ public enum Vaccine {
this.manufacturer = manufacturer;
}

/**
* This constructor is used for vaccines that have a specific type (e.g. "PCV13") and its manufacturers.
*
* @param manufacturer
* the manufacturer of the vaccine
* @param vaccineType
* the type of the vaccine (e.g. "PCV13")
*/
Vaccine(@Nullable VaccineManufacturer manufacturer, @Nullable String vaccineType) {
this.manufacturer = manufacturer;
this.vaccineType = vaccineType;
}

public VaccineManufacturer getManufacturer() {
return manufacturer;
}

@Nullable
public String getVaccineType() {
return vaccineType;
}

@Override
public String toString() {
return I18nProperties.getEnumCaption(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public enum VaccineManufacturer {
Disease.CORONAVIRUS })
BIONTECH_PFIZER,
@Diseases(value = {
Disease.CSM })
Disease.CSM, Disease.INVASIVE_PNEUMOCOCCAL_INFECTION })
PFIZER,
@Diseases(value = {
Disease.MONKEYPOX })
Expand All @@ -52,6 +52,9 @@ public enum VaccineManufacturer {
Disease.MONKEYPOX })
SANOFI_PASTEUR_BIOLOGICS,
VALNEVA,
@Diseases(value = {
Disease.INVASIVE_PNEUMOCOCCAL_INFECTION })
MERCK,
UNKNOWN,
OTHER;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ public class ContactCriteria extends BaseCriteria implements Serializable {

private String caseReferenceNumber;
private Boolean withCase;
private Boolean prophylaxisPrescribed;
private PrescribedDrug prescribedDrug;
private String prescribedDrugText;

public UserRoleReferenceDto getReportingUserRole() {
return reportingUserRole;
Expand Down Expand Up @@ -802,4 +805,28 @@ public ContactCriteria withCase(Boolean withNoCase) {
this.withCase = withNoCase;
return this;
}

public Boolean getProphylaxisPrescribed() {
return prophylaxisPrescribed;
}

public void setProphylaxisPrescribed(Boolean prophylaxisPrescribed) {
this.prophylaxisPrescribed = prophylaxisPrescribed;
}

public PrescribedDrug getPrescribedDrug() {
return prescribedDrug;
}

public void setPrescribedDrug(PrescribedDrug prescribedDrug) {
this.prescribedDrug = prescribedDrug;
}

public String getPrescribedDrugText() {
return prescribedDrugText;
}

public void setPrescribedDrugText(String prescribedDrugText) {
this.prescribedDrugText = prescribedDrugText;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package de.symeda.sormas.api.contact;

import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_GERMANY;
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_LUXEMBOURG;
import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_SWITZERLAND;
import static de.symeda.sormas.api.utils.FieldConstraints.CHARACTER_LIMIT_BIG;

Expand Down Expand Up @@ -149,6 +150,9 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
public static final String QUARANTINE_CHANGE_COMMENT = "quarantineChangeComment";
public static final String DELETION_REASON = "deletionReason";
public static final String OTHER_DELETION_REASON = "otherDeletionReason";
public static final String PROPHYLAXIS_PRESCRIBED = "prophylaxisPrescribed";
public static final String PRESCRIBED_DRUG = "prescribedDrug";
public static final String PRESCRIBED_DRUG_TEXT = "prescribedDrugText";

@EmbeddedPersonalData
private CaseReferenceDto caze;
Expand Down Expand Up @@ -209,11 +213,15 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
private ContactCategory contactCategory;
private ContactClassification contactClassification;
private ContactStatus contactStatus;
@Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
private FollowUpStatus followUpStatus;
@SensitiveData
@Size(max = CHARACTER_LIMIT_BIG, message = Validations.textTooLong)
@Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
private String followUpComment;
@Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
private Date followUpUntil;
@Diseases(value = {Disease.INVASIVE_MENINGOCOCCAL_INFECTION}, hide = true)
private boolean overwriteFollowUpUntil;
@SensitiveData
@Size(max = CHARACTER_LIMIT_BIG, message = Validations.textTooLong)
Expand Down Expand Up @@ -244,7 +252,8 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String immunosuppressiveTherapyBasicDiseaseDetails;
private YesNoUnknown careForPeopleOver60;

@Diseases(value = {
Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true)
private QuarantineType quarantine;
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
Expand All @@ -257,6 +266,8 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
private PersonReferenceDto person;

@SensitiveData
@Diseases(value = {
Disease.INVASIVE_MENINGOCOCCAL_INFECTION }, hide = true)
private UserReferenceDto contactOfficer;

@EmbeddedPersonalData
Expand Down Expand Up @@ -361,6 +372,18 @@ public class ContactDto extends SormasToSormasShareableDto implements IsContact
private DeletionReason deletionReason;
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
private String otherDeletionReason;
@HideForCountriesExcept(countries = {COUNTRY_CODE_LUXEMBOURG})
@SensitiveData
@Diseases(Disease.INVASIVE_MENINGOCOCCAL_INFECTION)
private Boolean prophylaxisPrescribed;
@HideForCountriesExcept(countries = {COUNTRY_CODE_LUXEMBOURG})
@SensitiveData
@Diseases(Disease.INVASIVE_MENINGOCOCCAL_INFECTION)
private PrescribedDrug prescribedDrug;
@HideForCountriesExcept(countries = {COUNTRY_CODE_LUXEMBOURG})
@SensitiveData
@Diseases(Disease.INVASIVE_MENINGOCOCCAL_INFECTION)
private String prescribedDrugText;

public static ContactDto build() {
final ContactDto contact = new ContactDto();
Expand Down Expand Up @@ -1060,4 +1083,29 @@ public String getOtherDeletionReason() {
public void setOtherDeletionReason(String otherDeletionReason) {
this.otherDeletionReason = otherDeletionReason;
}

public Boolean getProphylaxisPrescribed() {
return prophylaxisPrescribed;
}

public void setProphylaxisPrescribed(Boolean prophylaxisPrescribed) {
this.prophylaxisPrescribed = prophylaxisPrescribed;
}

public PrescribedDrug getPrescribedDrug() {
return prescribedDrug;
}

public void setPrescribedDrug(PrescribedDrug prescribedDrug) {
this.prescribedDrug = prescribedDrug;
}

public String getPrescribedDrugText() {
return prescribedDrugText;
}

public void setPrescribedDrugText(String prescribedDrugText) {
this.prescribedDrugText = prescribedDrugText;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,17 @@ public ContactIndexDetailedDto(String uuid, String personUuid, String personFirs
String externalID, String externalToken, String internalToken, String caseReferenceNumber, DeletionReason deletionReason, String otherDeleteReason, boolean isInJurisdiction, boolean isCaseInJurisdiction,
Sex sex, Integer approximateAge, ApproximateAgeType approximateAgeType,
String city, String street, String houseNumber, String additionalInformation, String postalCode, String phone,
String reportingUserFirstName, String reportingUserLastName, ContactRelation relationToCase, int visitCount
String reportingUserFirstName, String reportingUserLastName, ContactRelation relationToCase, int visitCount,
Boolean prophylaxisPrescribed, PrescribedDrug prescribedDrug, String prescribedDrugText
) {
//@formatter:on

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

//@formatter:on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ public class ContactIndexDto extends PseudonymizableIndexDto implements IsContac
public static final String REGION_UUID = "regionUuid";
public static final String DISTRICT_UUID = "districtUuid";
public static final String COMMUNITY_UUID = "communityUuid";
public static final String PROPHYLAXIS_PRESCRIBED = "prophylaxisPrescribed";
public static final String PRESCRIBED_DRUG = "prescribedDrug";
public static final String PRESCRIBED_DRUG_TEXT = "prescribedDrugText";

private String personUuid;
@PersonalData
Expand Down Expand Up @@ -98,6 +101,9 @@ public class ContactIndexDto extends PseudonymizableIndexDto implements IsContac

private DeletionReason deletionReason;
private String otherDeletionReason;
private Boolean prophylaxisPrescribed;
private PrescribedDrug prescribedDrug;
private String prescribedDrugText;

private ContactJurisdictionFlagsDto contactJurisdictionFlagsDto;

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

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

this.contactJurisdictionFlagsDto = new ContactJurisdictionFlagsDto(isInJurisdiction, isCaseInJurisdiction);
this.prophylaxisPrescribed = prophylaxisPrescribed;
this.prescribedDrug = prescribedDrug;
this.prescribedDrugText = prescribedDrugText;
}

public String getPersonUuid() {
Expand Down Expand Up @@ -419,6 +428,30 @@ public void setOtherDeletionReason(String otherDeletionReason) {
this.otherDeletionReason = otherDeletionReason;
}

public Boolean getProphylaxisPrescribed() {
return prophylaxisPrescribed;
}

public void setProphylaxisPrescribed(Boolean prophylaxisPrescribed) {
this.prophylaxisPrescribed = prophylaxisPrescribed;
}

public PrescribedDrug getPrescribedDrug() {
return prescribedDrug;
}

public void setPrescribedDrug(PrescribedDrug prescribedDrug) {
this.prescribedDrug = prescribedDrug;
}

public String getPrescribedDrugText() {
return prescribedDrugText;
}

public void setPrescribedDrugText(String prescribedDrugText) {
this.prescribedDrugText = prescribedDrugText;
}

@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
Expand Down
Loading
Loading