Skip to content

Commit

Permalink
[GITFLOW]merging 'release-0.6.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Wahnschaffe committed Oct 27, 2017
2 parents f78e5fb + ab5ef85 commit 69cd399
Show file tree
Hide file tree
Showing 330 changed files with 20,945 additions and 22,874 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>0.5.1</version>
<version>0.6.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
5 changes: 5 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 @@ -9,6 +9,7 @@ public enum Disease {
MEASLES,
YELLOW_FEVER,
DENGUE,
MONKEYPOX,
OTHER
;

Expand All @@ -23,4 +24,8 @@ public String toShortString() {
public String getName() {
return this.name();
}

public boolean hasContactFollowUp() {
return this == EVD || this == LASSA || this == AVIAN_INFLUENCA || this == MONKEYPOX || this == OTHER;
}
}
30 changes: 24 additions & 6 deletions sormas-api/src/main/java/de/symeda/sormas/api/I18nProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class I18nProperties {

private final Properties fieldCaptionProperties;
private final Properties fieldDescriptionProperties;
private final Properties buttonCaptionProperties;
private final Properties fragmentProperties;
private final Properties enumProperties;

private static I18nProperties getInstance() {
Expand Down Expand Up @@ -44,14 +44,32 @@ public static String getEnumCaption(Enum value, String addition) {
/**
* Uses <param>key</param> as default value
*/
public static String getButtonCaption(String key) {
return getButtonCaption(key, key);
public static String getFragment(String key) {
return getFragment(key, key);
}

public static String getButtonCaption(String key, String defaultValue) {
return getInstance().buttonCaptionProperties.getProperty(key, defaultValue);
public static String getFragment(String key, String defaultValue) {
return getInstance().fragmentProperties.getProperty(key, defaultValue);
}

/**
* Uses <param>key</param> as default value
*/
public static String getPrefixFragment(String prefix, String key) {
return getPrefixFragment(prefix, key, key);
}

public static String getPrefixFragment(String prefix, String key, String defaultValue) {
String result = null;
if (prefix != null) {
result = getInstance().fragmentProperties.getProperty(prefix+"."+key);
}
if (result == null) {
result = getFragment(key, defaultValue);
}
return result;
}

/**
* Uses <param>key</param> as default value
*/
Expand Down Expand Up @@ -110,7 +128,7 @@ public static String getPrefixFieldDescription(String prefix, String key, String
private I18nProperties() {
fieldCaptionProperties = loadProperties("/fieldCaptions.properties");
fieldDescriptionProperties = loadProperties("/fieldDescriptions.properties");
buttonCaptionProperties = loadProperties("/buttonCaptions.properties");
fragmentProperties = loadProperties("/fragments.properties");
enumProperties = loadProperties("/enum.properties");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class CaseDataDto extends CaseReferenceDto {
public static final String MEASLES_VACCINATION_INFO_SOURCE = "measlesVaccinationInfoSource";
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 EPID_NUMBER = "epidNumber";
public static final String REPORT_LAT = "reportLat";
public static final String REPORT_LON = "reportLon";
Expand Down Expand Up @@ -83,14 +84,18 @@ public class CaseDataDto extends CaseReferenceDto {
private Vaccination yellowFeverVaccination;
@Diseases({Disease.YELLOW_FEVER})
private VaccinationInfoSource yellowFeverVaccinationInfoSource;
@Diseases({Disease.MONKEYPOX})
private YesNoUnknown smallpoxVaccinationScar;

private String epidNumber;

private UserReferenceDto surveillanceOfficer;
private UserReferenceDto caseOfficer;

private Float reportLat;
private Float reportLon;
private Double reportLat;
private Double reportLon;
private Float reportLatLonAccuracy;


public CaseClassification getCaseClassification() {
return caseClassification;
Expand Down Expand Up @@ -284,6 +289,14 @@ public void setYellowFeverVaccinationInfoSource(VaccinationInfoSource yellowFeve
this.yellowFeverVaccinationInfoSource = yellowFeverVaccinationInfoSource;
}

public YesNoUnknown getSmallpoxVaccinationScar() {
return smallpoxVaccinationScar;
}

public void setSmallpoxVaccinationScar(YesNoUnknown smallpoxVaccinationScar) {
this.smallpoxVaccinationScar = smallpoxVaccinationScar;
}

public String getEpidNumber() {
return epidNumber;
}
Expand All @@ -292,20 +305,28 @@ public void setEpidNumber(String epidNumber) {
this.epidNumber = epidNumber;
}

public Float getReportLat() {
public Double getReportLat() {
return reportLat;
}

public void setReportLat(Float reportLat) {
public void setReportLat(Double reportLat) {
this.reportLat = reportLat;
}

public Float getReportLon() {
public Double getReportLon() {
return reportLon;
}

public void setReportLon(Float reportLon) {
public void setReportLon(Double reportLon) {
this.reportLon = reportLon;
}

public Float getReportLatLonAccuracy() {
return reportLatLonAccuracy;
}

public void setReportLatLonAccuracy(Float reportLatLonAccuracy) {
this.reportLatLonAccuracy = reportLatLonAccuracy;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.facility.FacilityReferenceDto;
import de.symeda.sormas.api.region.CommunityReferenceDto;
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 All @@ -19,8 +21,8 @@ public interface CaseFacade {

List<CaseDataDto> getAllCasesByDisease(Disease disease, String userUuid);

List<CaseDataDto> getAllCasesBetween(Date fromDate, Date toDate, Disease disease, String userUuid);

List<CaseDataDto> getAllCasesBetween(Date fromDate, Date toDate, DistrictReferenceDto districtRef, Disease disease, String userUuid);
CaseDataDto getCaseDataByUuid(String uuid);

CaseDataDto saveCase(CaseDataDto dto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,20 @@ public class ContactDto extends ContactReferenceDto {
private Date lastContactDate;
private ContactProximity contactProximity;
private ContactClassification contactClassification;
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA})
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.OTHER})
private FollowUpStatus followUpStatus;
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA})
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.OTHER})
private String followUpComment;
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA})
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.OTHER})
private Date followUpUntil;
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA})
@Diseases({Disease.EVD,Disease.LASSA,Disease.CHOLERA,Disease.MONKEYPOX,Disease.OTHER})
private UserReferenceDto contactOfficer;
private String description;
private ContactRelation relationToCase;
private Float reportLat;
private Float reportLon;

private Double reportLat;
private Double reportLon;
private Float reportLatLonAccuracy;

public PersonReferenceDto getPerson() {
return person;
}
Expand Down Expand Up @@ -123,16 +124,16 @@ public ContactRelation getRelationToCase() {
public void setRelationToCase(ContactRelation relationToCase) {
this.relationToCase = relationToCase;
}
public Float getReportLat() {
public Double getReportLat() {
return reportLat;
}
public void setReportLat(Float reportLat) {
public void setReportLat(Double reportLat) {
this.reportLat = reportLat;
}
public Float getReportLon() {
public Double getReportLon() {
return reportLon;
}
public void setReportLon(Float reportLon) {
public void setReportLon(Double reportLon) {
this.reportLon = reportLon;
}
public String getFollowUpComment() {
Expand All @@ -141,5 +142,11 @@ public String getFollowUpComment() {
public void setFollowUpComment(String followUpComment) {
this.followUpComment = followUpComment;
}
public Float getReportLatLonAccuracy() {
return reportLatLonAccuracy;
}
public void setReportLatLonAccuracy(Float reportLatLonAccuracy) {
this.reportLatLonAccuracy = reportLatLonAccuracy;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.caze.CaseReferenceDto;
import de.symeda.sormas.api.region.DistrictReferenceDto;
import de.symeda.sormas.api.user.UserReferenceDto;
import de.symeda.sormas.api.utils.EpiWeek;

@Remote
public interface ContactFacade {

List<ContactDto> getAllContactsAfter(Date date, String userUuid);

List<ContactDto> getFollowUpBetween(Date fromDate, Date toDate, Disease disease, String userUuid);
List<ContactDto> getFollowUpBetween(Date fromDate, Date toDate, DistrictReferenceDto districtRef, Disease disease, String userUuid);

List<ContactDto> getAllByCase(CaseReferenceDto caseRef);

Expand All @@ -38,5 +40,5 @@ public interface ContactFacade {

List<ContactDto> getByUuids(List<String> uuids);

List<ContactMapDto> getMapContacts(Date fromDate, Date toDate, Disease disease, String userUuid);
List<ContactMapDto> getMapContacts(Date fromDate, Date toDate, DistrictReferenceDto districtRef, Disease disease, String userUuid);
}
Original file line number Diff line number Diff line change
@@ -1,40 +1,57 @@
package de.symeda.sormas.api.contact;

import java.util.Date;
import de.symeda.sormas.api.visit.VisitReferenceDto;

public class ContactMapDto extends ContactReferenceDto {

private static final long serialVersionUID = -7764607075875188799L;

public static final String I18N_PREFIX = "Contact";

public static final String LAST_VISIT_DATE_TIME = "lastVisitDateTime";
public static final String LAST_VISIT = "lastVisit";
public static final String CONTACT_CLASSIFICATION = "contactClassification";
public static final String REPORT_LAT = "reportLat";
public static final String REPORT_LON = "reportLon";

private Date lastVisitDateTime;
private Float reportLat;
private Float reportLon;
private VisitReferenceDto lastVisit;
private ContactClassification contactClassification;
private Double reportLat;
private Double reportLon;
private Float reportLatLonAccuracy;

public Date getLastVisitDateTime() {
return lastVisitDateTime;
public VisitReferenceDto getLastVisit() {
return lastVisit;
}
public void setLastVisitDateTime(Date lastVisitDateTime) {
this.lastVisitDateTime = lastVisitDateTime;
public void setLastVisit(VisitReferenceDto lastVisit) {
this.lastVisit = lastVisit;
}

public ContactClassification getContactClassification() {
return contactClassification;
}
public void setContactClassification(ContactClassification contactClassification) {
this.contactClassification = contactClassification;
}

public Float getReportLat() {
public Double getReportLat() {
return reportLat;
}
public void setReportLat(Float reportLat) {
public void setReportLat(Double reportLat) {
this.reportLat = reportLat;
}

public Float getReportLon() {
public Double getReportLon() {
return reportLon;
}
public void setReportLon(Float reportLon) {
public void setReportLon(Double reportLon) {
this.reportLon = reportLon;
}

public Float getReportLatLonAccuracy() {
return reportLatLonAccuracy;
}
public void setReportLatLonAccuracy(Float reportLatLonAccuracy) {
this.reportLatLonAccuracy = reportLatLonAccuracy;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package de.symeda.sormas.api.epidata;

import de.symeda.sormas.api.I18nProperties;

public enum AnimalCondition {

ALIVE,
DEAD,
PROCESSED,
UNKNOWN;

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

}
Loading

0 comments on commit 69cd399

Please sign in to comment.