Skip to content

Commit

Permalink
Merge pull request SORMAS-Foundation#2 from meajt/feature/gandki_changes
Browse files Browse the repository at this point in the history
Feature/gandki changes
  • Loading branch information
meajt committed Jul 7, 2023
2 parents e8136ca + 13a1953 commit 3c9809f
Show file tree
Hide file tree
Showing 45 changed files with 5,876 additions and 5,407 deletions.
2 changes: 1 addition & 1 deletion sormas-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.79.0</version>
<version>1.80.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
4 changes: 4 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 @@ -34,6 +34,8 @@ public enum Disease
GUINEA_WORM(true, false, true, false, false, 0, true, false, false),
LASSA(true, false, true, false, true, 21, true, false, false),
MEASLES(true, true, true, false, false, 21, true, true, false),
CHICKENPOX(true, true, true, false, false, 21, true, true, false),
FEVER_WITH_RASH(true, true, true, false, false, 21, true, true, false),
MONKEYPOX(true, true, true, false, true, 21, true, false, false),
NEW_INFLUENZA(true, true, true, false, true, 17, true, false, false),
PLAGUE(true, true, true, false, true, 7, true, false, false),
Expand All @@ -47,6 +49,7 @@ public enum Disease
PNEUMONIA(true, true, true, false, false, 0, true, false, false),
MALARIA(true, true, true, true, false, 0, true, false, false),
KALAZAR(true, true, true, false, false, 14, true, false, false),
SCRUB_TYPHUS(true, true, true, false, false, 14, true, false, false),
NCD(true, true, true, false, false, 14, false, false, false),
TYPHOID_FEVER(true, true, true, true, false, 0, true, false, false),
ACUTE_VIRAL_HEPATITIS(true, true, true, true, false, 0, true, false, false),
Expand Down Expand Up @@ -86,6 +89,7 @@ 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),
MUMPS(true, true, true, false, true, 14, true, true, true),
OTHER(true, true, true, false, true, 21, false, false, false),
UNDEFINED(true, true, true, false, true, 0, false, false, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,11 @@ public class CaseDataDto extends SormasToSormasShareableDto {
@Valid
private HealthConditionsDto healthConditions;

@HideForCountries(countries = {CountryHelper.COUNTRY_CODE_NEPAL})
private YesNoUnknown pregnant;
@Diseases({
Disease.AFP,
Disease.GUINEA_WORM,
Disease.MEASLES,
Disease.MEASLES,Disease.CHICKENPOX,Disease.FEVER_WITH_RASH,
Disease.POLIO,
Disease.YELLOW_FEVER,
Disease.CSM,
Expand Down Expand Up @@ -529,7 +528,6 @@ public class CaseDataDto extends SormasToSormasShareableDto {
COUNTRY_CODE_GERMANY,
COUNTRY_CODE_SWITZERLAND })
private Date quarantineOfficialOrderSentDate;
@HideForCountries(countries = {CountryHelper.COUNTRY_CODE_NEPAL})
private YesNoUnknown postpartum;
private Trimester trimester;
private FollowUpStatus followUpStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public class ContactDto extends SormasToSormasShareableDto {
@Diseases({
Disease.AFP,
Disease.GUINEA_WORM,
Disease.MEASLES,
Disease.MEASLES,Disease.CHICKENPOX,Disease.FEVER_WITH_RASH,
Disease.POLIO,
Disease.YELLOW_FEVER,
Disease.CSM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class EventParticipantDto extends SormasToSormasShareableDto {
@Diseases({
Disease.AFP,
Disease.GUINEA_WORM,
Disease.MEASLES,
Disease.MEASLES,Disease.CHICKENPOX,Disease.FEVER_WITH_RASH,
Disease.POLIO,
Disease.YELLOW_FEVER,
Disease.CSM,
Expand Down
34 changes: 34 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ public interface Captions {
String caseCasesList = "caseCasesList";
String caseClassificationCalculationButton = "caseClassificationCalculationButton";
String caseCloneCaseWithNewDisease = "caseCloneCaseWithNewDisease";
String CaseConclusion_caseClassification = "CaseConclusion.caseClassification";
String CaseConclusion_communityReferenceD = "CaseConclusion.communityReferenceD";
String CaseConclusion_districtReference = "CaseConclusion.districtReference";
String CaseConclusion_regionReference = "CaseConclusion.regionReference";
String CaseConclusion_species = "CaseConclusion.species";
String CaseConclusion_wardNo = "CaseConclusion.wardNo";
String caseConfirmCase = "caseConfirmCase";
String caseContacts = "caseContacts";
String caseCreateCase = "caseCreateCase";
Expand Down Expand Up @@ -1581,6 +1587,7 @@ public interface Captions {
String Location_latLon = "Location.latLon";
String Location_latLonAccuracy = "Location.latLonAccuracy";
String Location_longitude = "Location.longitude";
String Location_otherFacilityType = "Location.otherFacilityType";
String Location_postalCode = "Location.postalCode";
String Location_region = "Location.region";
String Location_street = "Location.street";
Expand Down Expand Up @@ -1612,6 +1619,33 @@ public interface Captions {
String mainMenuStatistics = "mainMenuStatistics";
String mainMenuTasks = "mainMenuTasks";
String mainMenuUsers = "mainMenuUsers";
String MalariaEpiData_bloodTransfusion = "MalariaEpiData.bloodTransfusion";
String MalariaEpiData_contactWithMalariaCasesDetail = "MalariaEpiData.contactWithMalariaCasesDetail";
String MalariaEpiData_doseEndDate = "MalariaEpiData.doseEndDate";
String MalariaEpiData_doseName = "MalariaEpiData.doseName";
String MalariaEpiData_doseStartDate = "MalariaEpiData.doseStartDate";
String MalariaEpiData_drugName = "MalariaEpiData.drugName";
String MalariaEpiData_facility = "MalariaEpiData.facility";
String MalariaEpiData_hasPreviousMalaria = "MalariaEpiData.hasPreviousMalaria";
String MalariaEpiData_hasTreatedNMTP = "MalariaEpiData.hasTreatedNMTP";
String MalariaEpiData_historyOfConfirmed = "MalariaEpiData.historyOfConfirmed";
String MalariaEpiData_lengthOfResidenceMM = "MalariaEpiData.lengthOfResidenceMM";
String MalariaEpiData_lengthOfResidenceYY = "MalariaEpiData.lengthOfResidenceYY";
String MalariaEpiData_pastCommunity = "MalariaEpiData.pastCommunity";
String MalariaEpiData_pastDate = "MalariaEpiData.pastDate";
String MalariaEpiData_pastDistrict = "MalariaEpiData.pastDistrict";
String MalariaEpiData_pastRegion = "MalariaEpiData.pastRegion";
String MalariaEpiData_pastWardNo = "MalariaEpiData.pastWardNo";
String MalariaEpiData_plasmodiumSpecies = "MalariaEpiData.plasmodiumSpecies";
String MalariaEpiData_residentCommunity = "MalariaEpiData.residentCommunity";
String MalariaEpiData_residentDistrict = "MalariaEpiData.residentDistrict";
String MalariaEpiData_residentRegion = "MalariaEpiData.residentRegion";
String MalariaEpiData_residentWardNo = "MalariaEpiData.residentWardNo";
String MalariaEpiData_travelAddressOutsideCounty = "MalariaEpiData.travelAddressOutsideCounty";
String MalariaEpiData_travelAddressWithInCounty = "MalariaEpiData.travelAddressWithInCounty";
String MalariaEpiData_travelDateOutsideCounty = "MalariaEpiData.travelDateOutsideCounty";
String MalariaEpiData_travelDateWithInCounty = "MalariaEpiData.travelDateWithInCounty";
String MalariaEpiData_typeOfPreventingMeasures = "MalariaEpiData.typeOfPreventingMeasures";
String MaternalHistory_ageAtBirth = "MaternalHistory.ageAtBirth";
String MaternalHistory_arthralgiaArthritis = "MaternalHistory.arthralgiaArthritis";
String MaternalHistory_arthralgiaArthritisMonth = "MaternalHistory.arthralgiaArthritisMonth";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
import java.util.List;
import java.util.Map;

import de.symeda.sormas.api.CountryHelper;
import de.symeda.sormas.api.i18n.I18nProperties;
import de.symeda.sormas.api.utils.HideForCountries;

public enum FacilityType {

Expand All @@ -44,7 +46,7 @@ public enum FacilityType {
HOSPITAL(FacilityTypeGroup.MEDICAL_FACILITY, true, true),
HOSTEL(FacilityTypeGroup.ACCOMMODATION, true, false),
HOTEL(FacilityTypeGroup.ACCOMMODATION, true, false),
KINDERGARTEN(FacilityTypeGroup.EDUCATIONAL_FACILITY, false, false),
KINDERGARTEN(FacilityTypeGroup.OTHERS, false, false),
LABORATORY(FacilityTypeGroup.MEDICAL_FACILITY, false, false),
MASS_ACCOMMODATION(FacilityTypeGroup.ACCOMMODATION, true, false),
MILITARY_BARRACKS(FacilityTypeGroup.RESIDENCE, true, false),
Expand All @@ -57,6 +59,7 @@ public enum FacilityType {
OTHER_LEISURE_FACILITY(FacilityTypeGroup.LEISURE_FACILITY, false, false),
OTHER_MEDICAL_FACILITY(FacilityTypeGroup.MEDICAL_FACILITY, true, true),
OTHER_RESIDENCE(FacilityTypeGroup.RESIDENCE, true, false),
OWN_RESIDENCE(FacilityTypeGroup.RESIDENCE, true, false),
OTHER_WORKING_PLACE(FacilityTypeGroup.WORKING_PLACE, false, false),
OTHER_COMMERCE(FacilityTypeGroup.COMMERCE, false, false),
OUTPATIENT_TREATMENT_FACILITY(FacilityTypeGroup.MEDICAL_FACILITY, false, true),
Expand Down Expand Up @@ -86,7 +89,7 @@ public enum FacilityType {
DISABLED_PERSON_HABITATION(FacilityTypeGroup.CARE_FACILITY, true, false),
CARE_RECIPIENT_HABITATION(FacilityTypeGroup.CARE_FACILITY, true, false),
VISITING_AMBULATORY_AID(FacilityTypeGroup.CARE_FACILITY, false, false),
AFTER_SCHOOL(FacilityTypeGroup.EDUCATIONAL_FACILITY, false, false);
AFTER_SCHOOL(FacilityTypeGroup.OTHERS, false, false);

private static final Map<FacilityTypeGroup, List<FacilityType>> typesByGroup = new HashMap<FacilityTypeGroup, List<FacilityType>>();
private static final Map<FacilityTypeGroup, List<FacilityType>> accomodationTypesByGroup = new HashMap<FacilityTypeGroup, List<FacilityType>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public enum FacilityTypeGroup {
MEDICAL_FACILITY,
WORKING_PLACE,
RESIDENCE,
COMMERCE;
COMMERCE,
OTHERS;

private static List<FacilityTypeGroup> accomodationGroups = null;

Expand All @@ -46,6 +47,11 @@ public static List<FacilityTypeGroup> getAccomodationGroups() {
return accomodationGroups;
}

public static FacilityTypeGroup[] getValuesForNepal() {

return new FacilityTypeGroup[]{EDUCATIONAL_FACILITY, MEDICAL_FACILITY, WORKING_PLACE, RESIDENCE, OTHERS};
}

@Override
public String toString() {
return I18nProperties.getEnumCaption(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public class LocationDto extends PseudonymizableDto {
public static final String CONTACT_PERSON_LAST_NAME = "contactPersonLastName";
public static final String CONTACT_PERSON_PHONE = "contactPersonPhone";
public static final String CONTACT_PERSON_EMAIL = "contactPersonEmail";
public static final String OTHER_FACILITY_TYPE = "otherFacilityType";

private ContinentReferenceDto continent;
private SubcontinentReferenceDto subcontinent;
Expand Down Expand Up @@ -176,6 +177,10 @@ public class LocationDto extends PseudonymizableDto {
@SensitiveData
private String contactPersonEmail;

@PersonalData
@SensitiveData
private String otherFacilityType;

public String getDetails() {
return details;
}
Expand Down Expand Up @@ -384,6 +389,14 @@ public void setContactPersonEmail(String contactPersonEmail) {
this.contactPersonEmail = contactPersonEmail;
}

public String getOtherFacilityType() {
return otherFacilityType;
}

public void setOtherFacilityType(String otherFacilityType) {
this.otherFacilityType = otherFacilityType;
}

@Override
public String buildCaption() {
return LocationReferenceDto.buildCaption(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package de.symeda.sormas.api.person;

public enum Ethnicity {
CHHETRI,
BAHUN,
MAGAR,
THARU,
PAHARI,
DALIT,
JANAJATI,
MADHESI,
MUSLIM,
BRAHMIN,
OTHER
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ public class PersonDto extends PseudonymizableDto {
@PersonalData
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
@HideForCountries
@HideForCountries(countries = {
CountryHelper.COUNTRY_CODE_NEPAL,
CountryHelper.COUNTRY_CODE_GERMANY})
private String nickname;
@PersonalData
@SensitiveData
Expand All @@ -177,7 +179,8 @@ public class PersonDto extends PseudonymizableDto {
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
@HideForCountries(countries = {
CountryHelper.COUNTRY_CODE_GERMANY,
CountryHelper.COUNTRY_CODE_FRANCE })
CountryHelper.COUNTRY_CODE_FRANCE,
CountryHelper.COUNTRY_CODE_NEPAL})
private String mothersMaidenName;
@PersonalData
@SensitiveData
Expand Down Expand Up @@ -367,6 +370,7 @@ public class PersonDto extends PseudonymizableDto {
private String externalToken;
@S2SIgnoreProperty(configProperty = SormasToSormasConfig.SORMAS2SORMAS_IGNORE_INTERNAL_TOKEN)
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
@HideForCountries(countries = {CountryHelper.COUNTRY_CODE_NEPAL})
private String internalToken;

@HideForCountriesExcept(countries = {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public enum PresentCondition {
@Diseases(value = {
Disease.CORONAVIRUS }, hide = true)
BURIED,
CREMATED,
UNKNOWN;

public boolean isDeceased() {
Expand Down
Loading

0 comments on commit 3c9809f

Please sign in to comment.