Skip to content

Commit

Permalink
[GITFLOW]merging 'release-0.7.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Wahnschaffe committed Nov 2, 2017
2 parents 69cd399 + 99c9dae commit 1de598a
Show file tree
Hide file tree
Showing 161 changed files with 13,248 additions and 1,628 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ For information on what libs are used see pom.xml in sormas-base project: https:
* ``sudo -u postgres pg_dump -Fc -b sormas_db > "sormas_db_"`date +"%Y-%m-%d_%H-%M-%S"`".dump"``
* ``cd /root/deploy/sormas/$(date +%F)``
* Update the database schema
* make the schema update script executable: ``chmod +x sql/database-update.sh``
* execute the update script: ``sql/database-update.sh``
* ``cd /root/deploy/sormas/$(date +%F)/sql``
* make the schema update script executable: ``chmod +x ./database-update.sh``
* execute the update script: ``./database-update.sh``
* confirm schema update by pressing enter when asked
* Alternative: Manual database update
* Find out current schema version of database:
Expand Down
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>0.6.0</version>
<version>0.7.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
14 changes: 6 additions & 8 deletions sormas-api/src/main/java/de/symeda/sormas/api/Disease.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package de.symeda.sormas.api;

public enum Disease {
EVD,
LASSA,
AVIAN_INFLUENCA,
CSM,
CHOLERA,
MEASLES,
YELLOW_FEVER,
CSM,
DENGUE,
EVD,
LASSA,
MEASLES,
MONKEYPOX,
PLAGUE,
YELLOW_FEVER,
OTHER
;

Expand All @@ -25,7 +26,4 @@ public String getName() {
return this.name();
}

public boolean hasContactFollowUp() {
return this == EVD || this == LASSA || this == AVIAN_INFLUENCA || this == MONKEYPOX || this == OTHER;
}
}
40 changes: 40 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/DiseaseHelper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package de.symeda.sormas.api;

import de.symeda.sormas.api.caze.CaseDataDto;
import de.symeda.sormas.api.symptoms.SymptomState;
import de.symeda.sormas.api.symptoms.SymptomsDto;

public class DiseaseHelper {

public static boolean hasContactFollowUp(CaseDataDto caze) {
Disease disease = caze.getDisease();

return disease == Disease.EVD || disease == Disease.LASSA || disease == Disease.AVIAN_INFLUENCA
|| disease == Disease.MONKEYPOX || (disease == Disease.PLAGUE && caze.getPlagueType() == PlagueType.PNEUMONIC)
|| disease == Disease.OTHER;
}

/**
* Checks whether the given symptoms match the clinical criteria of one of the three Plague types.
*
* @param symptoms The symptoms of a case with the Plague disease
* @return One of the three Plague types if the clinical criteria are met, null otherwise
*/
public static PlagueType getPlagueTypeForSymptoms(SymptomsDto symptoms) {
if (symptoms.getFever() == SymptomState.YES) {
if (symptoms.getPainfulLymphadenitis() == SymptomState.YES) {
return PlagueType.BUBONIC;
} else if (symptoms.getCough() == SymptomState.YES || symptoms.getChestPain() == SymptomState.YES ||
symptoms.getCoughingBlood() == SymptomState.YES) {
return PlagueType.PNEUMONIC;
} else if (symptoms.getChillsSweats() == SymptomState.YES) {
return PlagueType.SEPTICAEMIC;
} else {
return null;
}
} else {
return null;
}
}

}
13 changes: 13 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/PlagueType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package de.symeda.sormas.api;

public enum PlagueType {

BUBONIC,
PNEUMONIC,
SEPTICAEMIC;

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.PlagueType;
import de.symeda.sormas.api.epidata.EpiDataDto;
import de.symeda.sormas.api.facility.FacilityReferenceDto;
import de.symeda.sormas.api.hospitalization.HospitalizationDto;
Expand All @@ -21,13 +22,12 @@ public class CaseDataDto extends CaseReferenceDto {

public static final String I18N_PREFIX = "CaseData";

public static final String COUNTRY_EPID_CODE = "NIE";

public static final String CASE_CLASSIFICATION = "caseClassification";
public static final String INVESTIGATION_STATUS = "investigationStatus";
public static final String PERSON = "person";
public static final String DISEASE = "disease";
public static final String DISEASE_DETAILS = "diseaseDetails";
public static final String PLAGUE_TYPE = "plagueType";
public static final String REGION = "region";
public static final String DISTRICT = "district";
public static final String COMMUNITY = "community";
Expand All @@ -49,6 +49,8 @@ public class CaseDataDto extends CaseReferenceDto {
public static final String YELLOW_FEVER_VACCINATION = "yellowFeverVaccination";
public static final String YELLOW_FEVER_VACCINATION_INFO_SOURCE = "yellowFeverVaccinationInfoSource";
public static final String SMALLPOX_VACCINATION_SCAR = "smallpoxVaccinationScar";
public static final String SMALLPOX_VACCINATION_RECEIVED = "smallpoxVaccinationReceived";
public static final String SMALLPOX_VACCINATION_DATE = "smallpoxVaccinationDate";
public static final String EPID_NUMBER = "epidNumber";
public static final String REPORT_LAT = "reportLat";
public static final String REPORT_LON = "reportLon";
Expand All @@ -58,6 +60,7 @@ public class CaseDataDto extends CaseReferenceDto {
private InvestigationStatus investigationStatus;
private Disease disease;
private String diseaseDetails;
private PlagueType plagueType;
private UserReferenceDto reportingUser;
private Date reportDate;
private Date investigatedDate;
Expand Down Expand Up @@ -86,6 +89,10 @@ public class CaseDataDto extends CaseReferenceDto {
private VaccinationInfoSource yellowFeverVaccinationInfoSource;
@Diseases({Disease.MONKEYPOX})
private YesNoUnknown smallpoxVaccinationScar;
@Diseases({Disease.MONKEYPOX})
private YesNoUnknown smallpoxVaccinationReceived;
@Diseases({Disease.MONKEYPOX})
private Date smallpoxVaccinationDate;

private String epidNumber;

Expand Down Expand Up @@ -129,6 +136,14 @@ public void setDiseaseDetails(String diseaseDetails) {
this.diseaseDetails = diseaseDetails;
}

public PlagueType getPlagueType() {
return plagueType;
}

public void setPlagueType(PlagueType plagueType) {
this.plagueType = plagueType;
}

public UserReferenceDto getReportingUser() {
return reportingUser;
}
Expand Down Expand Up @@ -297,6 +312,22 @@ public void setSmallpoxVaccinationScar(YesNoUnknown smallpoxVaccinationScar) {
this.smallpoxVaccinationScar = smallpoxVaccinationScar;
}

public YesNoUnknown getSmallpoxVaccinationReceived() {
return smallpoxVaccinationReceived;
}

public void setSmallpoxVaccinationReceived(YesNoUnknown smallpoxVaccinationReceived) {
this.smallpoxVaccinationReceived = smallpoxVaccinationReceived;
}

public Date getSmallpoxVaccinationDate() {
return smallpoxVaccinationDate;
}

public void setSmallpoxVaccinationDate(Date smallpoxVaccinationDate) {
this.smallpoxVaccinationDate = smallpoxVaccinationDate;
}

public String getEpidNumber() {
return epidNumber;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import de.symeda.sormas.api.region.DistrictReferenceDto;
import de.symeda.sormas.api.region.RegionReferenceDto;
import de.symeda.sormas.api.user.UserReferenceDto;
import de.symeda.sormas.api.utils.EpiWeek;

@Remote
public interface CaseFacade {
Expand Down Expand Up @@ -47,4 +46,5 @@ public interface CaseFacade {
* @param disease optional
*/
Map<RegionReferenceDto, Long> getCaseCountPerRegion(Date onsetFromDate, Date onsetToDate, Disease disease);

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ public class ContactDto extends ContactReferenceDto {
private Date lastContactDate;
private ContactProximity contactProximity;
private ContactClassification contactClassification;
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.OTHER})
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.PLAGUE,Disease.OTHER})
private FollowUpStatus followUpStatus;
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.OTHER})
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.PLAGUE,Disease.OTHER})
private String followUpComment;
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.OTHER})
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.PLAGUE,Disease.OTHER})
private Date followUpUntil;
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.OTHER})
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.PLAGUE,Disease.OTHER})
private UserReferenceDto contactOfficer;
private String description;
private ContactRelation relationToCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class EpiDataDto extends DataTransferObject {
public static final String WATER_BODY = "waterBody";
public static final String WATER_BODY_DETAILS = "waterBodyDetails";
public static final String TICKBITE = "tickBite";
public static final String FLEABITE = "fleaBite";
public static final String DATE_OF_LAST_EXPOSURE = "dateOfLastExposure";
public static final String PLACE_OF_LAST_EXPOSURE = "placeOfLastExposure";
public static final String ANIMAL_CONDITION = "animalCondition";
Expand All @@ -53,9 +54,9 @@ public class EpiDataDto extends DataTransferObject {
private YesNoUnknown burialAttended;
@Diseases({Disease.EVD,Disease.LASSA,Disease.AVIAN_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.OTHER})
private YesNoUnknown gatheringAttended;
@Diseases({Disease.EVD,Disease.LASSA,Disease.AVIAN_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.OTHER})
@Diseases({Disease.EVD,Disease.LASSA,Disease.AVIAN_INFLUENCA,Disease.CSM,Disease.CHOLERA,Disease.MEASLES,Disease.YELLOW_FEVER,Disease.DENGUE,Disease.MONKEYPOX,Disease.PLAGUE,Disease.OTHER})
private YesNoUnknown traveled;
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX,Disease.OTHER})
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX,Disease.PLAGUE,Disease.OTHER})
private YesNoUnknown rodents;
@Diseases({Disease.EVD,Disease.LASSA,Disease.OTHER})
private YesNoUnknown bats;
Expand Down Expand Up @@ -103,6 +104,8 @@ public class EpiDataDto extends DataTransferObject {
private String waterBodyDetails;
@Diseases({Disease.EVD,Disease.LASSA,Disease.OTHER})
private YesNoUnknown tickBite;
@Diseases({Disease.PLAGUE,Disease.OTHER})
private YesNoUnknown fleaBite;
@Diseases({Disease.MONKEYPOX,Disease.OTHER})
private Date dateOfLastExposure;
@Diseases({Disease.MONKEYPOX,Disease.OTHER})
Expand Down Expand Up @@ -324,6 +327,13 @@ public void setAnimalCondition(AnimalCondition animalCondition) {
this.animalCondition = animalCondition;
}

public YesNoUnknown getFleaBite() {
return fleaBite;
}
public void setFleaBite(YesNoUnknown fleaBite) {
this.fleaBite = fleaBite;
}

public List<EpiDataBurialDto> getBurials() {
return burials;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ public String toString() {

StringBuilder caption = new StringBuilder();
caption.append(name);
if (community != null) {
caption.append(" (").append(community.getCaption()).append(")");
}

return caption.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ public interface GeoShapeProvider {

RegionReferenceDto getRegionByCoord(GeoLatLon latLon);

GeoLatLon getCenterOfAllRegions();

GeoLatLon getCenterOfRegion(RegionReferenceDto region);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class SampleTestDto extends SampleTestReferenceDto {
public static final String TEST_RESULT = "testResult";
public static final String TEST_RESULT_TEXT = "testResultText";
public static final String TEST_RESULT_VERIFIED = "testResultVerified";
public static final String FOUR_FOLD_INCREASE_ANTIBODY_TITER = "fourFoldIncreaseAntibodyTiter";

private SampleReferenceDto sample;
private SampleTestType testType;
Expand All @@ -30,6 +31,7 @@ public class SampleTestDto extends SampleTestReferenceDto {
private SampleTestResultType testResult;
private String testResultText;
private boolean testResultVerified;
private boolean fourFoldIncreaseAntibodyTiter;

public SampleReferenceDto getSample() {
return sample;
Expand Down Expand Up @@ -85,5 +87,11 @@ public boolean isTestResultVerified() {
public void setTestResultVerified(boolean testResultVerified) {
this.testResultVerified = testResultVerified;
}
public boolean isFourFoldIncreaseAntibodyTiter() {
return fourFoldIncreaseAntibodyTiter;
}
public void setFourFoldIncreaseAntibodyTiter(boolean fourFoldIncreaseAntibodyTiter) {
this.fourFoldIncreaseAntibodyTiter = fourFoldIncreaseAntibodyTiter;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public enum SampleTestType {
VIRUS_ISOLATION,
RAPID_TEST,
ANTIGEN_DETECTION,
SERUM_ANTIBODY_TITER,
OTHER,
;

Expand Down
Loading

0 comments on commit 1de598a

Please sign in to comment.