Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public enum ActivityAsCaseType {
@HideForCountriesExcept
CARED_FOR,
OTHER,
BLOOD_DONATION,
BONE_MARROW_DONATION,
UNKNOWN;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package de.symeda.sormas.api.epidata;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.validation.Valid;
Expand Down Expand Up @@ -70,6 +69,10 @@ public class EpiDataDto extends PseudonymizableDto {
public static final String IMPORTED_CASE = "importedCase";
public static final String COUNTRY = "country";
public static final String OTHER_DETAILS = "otherDetails";
public static final String AIRPORT_WORKER = "airportWorker";
public static final String HEALTHCARE_PROFESSIONAL = "healthcareProfessional";
public static final String PLACE_OF_INFECTION = "placeOfInfection";
public static final String RESIDENCE_AT_ONSET = "residenceAtOnset";

private YesNoUnknown exposureDetailsKnown;
private YesNoUnknown activityAsCaseDetailsKnown;
Expand Down Expand Up @@ -114,12 +117,14 @@ public class EpiDataDto extends PseudonymizableDto {

@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
Disease.CRYPTOSPORIDIOSIS,
Disease.MALARIA })
private ModeOfTransmission modeOfTransmission;

@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
Disease.CRYPTOSPORIDIOSIS,
Disease.MALARIA })
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String modeOfTransmissionType;

Expand All @@ -143,6 +148,29 @@ public class EpiDataDto extends PseudonymizableDto {
private List<ActivityAsCaseDto> activitiesAsCase = new ArrayList<>();

private String otherDetails;
// airport worker should be applicable for all countries and diseases.
@Diseases
@HideForCountriesExcept
private YesNoUnknown airportWorker;
@Diseases({
Disease.MALARIA })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
private YesNoUnknown healthcareProfessional;
Comment thread
KarnaiahPesula marked this conversation as resolved.

@Diseases({
Disease.DENGUE })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
@Size(max = 255, message = Validations.textTooLong)
private String placeOfInfection;

@Diseases({
Disease.DENGUE })
@HideForCountriesExcept(countries = {
CountryHelper.COUNTRY_CODE_LUXEMBOURG })
@Size(max = 255, message = Validations.textTooLong)
private String residenceAtOnset;
Comment thread
KarnaiahPesula marked this conversation as resolved.

public YesNoUnknown getExposureDetailsKnown() {
return exposureDetailsKnown;
Expand Down Expand Up @@ -305,6 +333,38 @@ public void setOtherDetails(String otherDetails) {
this.otherDetails = otherDetails;
}

public YesNoUnknown getAirportWorker() {
return airportWorker;
}

public void setAirportWorker(YesNoUnknown airportWorker) {
this.airportWorker = airportWorker;
}

public YesNoUnknown getHealthcareProfessional() {
return healthcareProfessional;
}

public void setHealthcareProfessional(YesNoUnknown healthcareProfessional) {
this.healthcareProfessional = healthcareProfessional;
}

public String getPlaceOfInfection() {
return placeOfInfection;
}

public void setPlaceOfInfection(String placeOfInfection) {
this.placeOfInfection = placeOfInfection;
}

public String getResidenceAtOnset() {
return residenceAtOnset;
}

public void setResidenceAtOnset(String residenceAtOnset) {
this.residenceAtOnset = residenceAtOnset;
}

@Override
public EpiDataDto clone() throws CloneNotSupportedException {
EpiDataDto clone = (EpiDataDto) super.clone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ public enum ExposureCategory {
FOOD_BORNE,
VECTOR_BORNE,
VERTICAL_TRANSMISSION,
WATER_BORNE;
WATER_BORNE,
MEDICAL_CARE,
LAB,
OTHER;

public boolean hasNoSetting() {
return EnumSet.of(ANIMAL_CONTACT, FOMITE_TRANSMISSION, FOOD_BORNE).contains(this);
return EnumSet.of(ANIMAL_CONTACT, FOMITE_TRANSMISSION, FOOD_BORNE, MEDICAL_CARE, LAB, OTHER).contains(this);
}

public boolean hasNoSubSetting() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ public class ExposureDto extends PseudonymizableDto {
public static final String SUB_SETTINGS = "subSettings";
public static final String CONTACT_FACTORS = "contactFactors";
public static final String PROTECTIVE_MEASURES = "protectiveMeasures";
public static final String PROPHYLAXIS_ADHERENCE = "prophylaxisAdherence";
public static final String PROPHYLAXIS_ADHERENCE_DETAILS = "prophylaxisAdherenceDetails";
public static final String TRAVEL_PURPOSE = "travelPurpose";
public static final String TRAVEL_PURPOSE_DETAILS = "travelPurposeDetails";

@SensitiveData
private UserReferenceDto reportingUser;
Expand Down Expand Up @@ -432,6 +436,24 @@ public class ExposureDto extends PseudonymizableDto {
private Set<ExposureSubSetting> subSettings;
private Set<ExposureContactFactor> contactFactors;
private Set<ExposureProtectiveMeasure> protectiveMeasures;
@Diseases({
Disease.MALARIA,
Disease.DENGUE })
private ProphylaxisAdherence prophylaxisAdherence;
@Diseases({
Disease.MALARIA,
Disease.DENGUE })
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
private String prophylaxisAdherenceDetails;
@Diseases({
Disease.MALARIA,
Disease.DENGUE })
private TravelPurpose travelPurpose;
@Diseases({
Disease.MALARIA,
Disease.DENGUE })
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
private String travelPurposeDetails;

public static ExposureDto build(ExposureType exposureType) {

Expand Down Expand Up @@ -1096,6 +1118,38 @@ public void setProtectiveMeasures(Set<ExposureProtectiveMeasure> protectiveMeasu
this.protectiveMeasures = protectiveMeasures;
}

public TravelPurpose getTravelPurpose() {
return travelPurpose;
}

public void setTravelPurpose(TravelPurpose travelPurpose) {
this.travelPurpose = travelPurpose;
}

public String getTravelPurposeDetails() {
return travelPurposeDetails;
}

public void setTravelPurposeDetails(String travelPurposeDetails) {
this.travelPurposeDetails = travelPurposeDetails;
}

public ProphylaxisAdherence getProphylaxisAdherence() {
return prophylaxisAdherence;
}

public void setProphylaxisAdherence(ProphylaxisAdherence prophylaxisAdherence) {
this.prophylaxisAdherence = prophylaxisAdherence;
}

public String getProphylaxisAdherenceDetails() {
return prophylaxisAdherenceDetails;
}

public void setProphylaxisAdherenceDetails(String prophylaxisAdherenceDetails) {
this.prophylaxisAdherenceDetails = prophylaxisAdherenceDetails;
}

@Override
public ExposureDto clone() throws CloneNotSupportedException {
ExposureDto clone = (ExposureDto) super.clone();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public enum ExposureSetting {
OUTDOOR(ExposureCategory.AIR_BORNE, ExposureCategory.VECTOR_BORNE),

PERSON_TO_PERSON(ExposureCategory.DIRECT_CONTACT),
OTHER_DIRECT_CONTACT(ExposureCategory.DIRECT_CONTACT),

MOSQUITO_BORNE(ExposureCategory.VECTOR_BORNE),
TICK_BORNE(ExposureCategory.VECTOR_BORNE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ public enum ExposureSubSetting {
HIGH_TOUCH_ENVIRONMENTS(ExposureCategory.DIRECT_CONTACT, ExposureSetting.PERSON_TO_PERSON),
SEXUAL_ACTIVITY(ExposureCategory.DIRECT_CONTACT, ExposureSetting.PERSON_TO_PERSON),

BLOOD_TRANSFUSION_RECIPIENT(ExposureCategory.DIRECT_CONTACT, ExposureSetting.OTHER_DIRECT_CONTACT),
BONE_MARROW_TRANSPLANT_RECIPIENT(ExposureCategory.DIRECT_CONTACT, ExposureSetting.OTHER_DIRECT_CONTACT),

STANDING_WATER_AREAS(ExposureCategory.VECTOR_BORNE, ExposureSetting.MOSQUITO_BORNE),
HIGH_MOSQUITO_ACTIVITY_REGIONS(ExposureCategory.VECTOR_BORNE, ExposureSetting.MOSQUITO_BORNE),
TRAVELED_ABROAD(ExposureCategory.VECTOR_BORNE, ExposureSetting.MOSQUITO_BORNE),

FORESTED_GRASSY_RURAL(ExposureCategory.VECTOR_BORNE, ExposureSetting.TICK_BORNE),
WILDLIFE_RESERVOIR_AREAS(ExposureCategory.VECTOR_BORNE, ExposureSetting.TICK_BORNE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,84 @@
*/
package de.symeda.sormas.api.exposure;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.i18n.I18nProperties;
import de.symeda.sormas.api.utils.Diseases;

public enum ModeOfTransmission {

@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
ANIMAL_TO_HUMAN,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
FOOD_OR_WATER,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
PERSON_TO_PERSON,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
RECREATIONAL_WATER,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
HEALTHCARE_ASSOCIATED,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
INJECTING_DRUG_USERS,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
LAB_OCCUPATIONAL_EXPOSURE,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
MOTHER_TO_CHILD,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
SEXUAL,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
TRANSFUSION_RECIPIENT,
@Diseases({
Disease.GIARDIASIS,
Disease.CRYPTOSPORIDIOSIS })
ORGAN_RECIPIENT,
UNKNOWN,
OTHER;

@Diseases(value = {
Disease.MALARIA })
MOSQUITOES_FROM_ENDEMIC_COUNTRY,
@Diseases(value = {
Disease.MALARIA })
MOSQUITOES_BY_AIR,
@Diseases(value = {
Disease.MALARIA })
MEDICAL_CARE,
@Diseases(value = {
Disease.MALARIA })
MOSQUITOES_WITH_STRONG_EPI_EVIDENCE,
@Diseases(value = {
Disease.MALARIA })
MOSQUITOES_WITHOUT_EVIDENCE,
@Diseases(value = {
Disease.MALARIA })
FROM_MOTHER_TO_CHILD,
@Diseases(value = {
Disease.MALARIA })
BY_LAB,
@Diseases(value = {
Disease.MALARIA })
TRANSFUSION_TRANSPLANT_RECIPIENT,

OTHER,
UNKNOWN;

@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,26 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.symeda.sormas.api.epidata;
package de.symeda.sormas.api.exposure;

import de.symeda.sormas.api.i18n.I18nProperties;

public enum DiseaseTransmission {
/**
* Enumeration of Prophylaxis Adherence.
* To be used for prophylaxis drug and its adherence to treatment.
*/
public enum ProphylaxisAdherence {

PROPHYLAXIS_COMPLETED,
PROPHYLAXIS_PARTIAL,
PROPHYLAXIS_NOT_STARTED,
PROPHYLAXIS_NOT_PRESCRIBED,
OTHER,
UNKNOWN;

TRANSMITTED_WITH_MOSQUITOES_FROM_ENDEMIC_COUNTRY,
TRANSMITTED_WITH_MOSQUITOES_BY_AIR,
TRANSMITTED_THROUGH_MEDICAL_CARE,
TRANSMITTED_WITH_STRONG_EPI_EVIDENCE,
TRANSMITTED_WITHOUT_EVIDENCE,
TRANSMITTED_FROM_MOTHER_TO_CHILD,
TRANSMITTED_BY_LAB,
TRANSFUSION_TRANSPLANT_RECIPIENT,
OTHER,
UNKNOWN;
@Override
public String toString() {
return I18nProperties.getEnumCaption(this);
}

@Override
public String toString() {
return I18nProperties.getEnumCaption(this);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2026 SORMAS Foundation gGmbH
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.symeda.sormas.api.exposure;

import de.symeda.sormas.api.i18n.I18nProperties;

/**
* Enumeration of travel purpose.
* To be used for specific travel and its purpose.
*/
public enum TravelPurpose {

BUSINESS,
VISITING_FAMILY_FRIENDS,
MIGRATION,
MILITARY,
HUMANITARIAN_MISSION,
TRAVELER_FROM_ENDEMIC_COUNTRY,
STUDENT,
TOURISM,
OTHER,
UNKNOWN;

@Override
public String toString() {
return I18nProperties.getEnumCaption(this);
}
}
Loading
Loading