Skip to content

Commit

Permalink
[GITFLOW]merging 'release-0.22.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ciSymeda committed May 15, 2018
2 parents 2c8e145 + 831eff0 commit 204416b
Show file tree
Hide file tree
Showing 27 changed files with 548 additions and 158 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.21.0</version>
<version>0.22.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
14 changes: 11 additions & 3 deletions sormas-api/src/main/java/de/symeda/sormas/api/IntegerRange.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,22 @@ public Integer getTo() {
@Override
public String toString() {
if (from != null && to != null) {
return from + "-" + to;
return formatNumber(from) + "-" + formatNumber(to);
} else if (from == null && to != null) {
return "< " + to;
return "< " + formatNumber(to);
} else if (from != null && to == null) {
return from + "+";
return formatNumber(from) + "+";
} else {
return "Unknown";
}
}

private String formatNumber(Integer number) {
if (number < 10) {
return "0" + number;
} else {
return String.valueOf(number);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ public enum CaseOutcome {
RECOVERED,
UNKNOWN;

public String getName() {
return this.name();
}

public String toString() {
return I18nProperties.getEnumCaption(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ public interface DistrictFacade {

List<String> getAllUuids(String userUuid);

List<String> getAllUuids();

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ public interface RegionFacade {

List<String> getAllUuids(String userUuid);

List<String> getAllUuids();

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public enum StatisticsCaseAttribute {
AGE_INTERVAL_CHILDREN_COARSE(false),
AGE_INTERVAL_CHILDREN_FINE(false),
AGE_INTERVAL_CHILDREN_MEDIUM(false),
AGE_INTERVAL_BASIC(false),
DISEASE(true),
CLASSIFICATION(true),
OUTCOME(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public enum StatisticsCaseAttributeGroup {
PLACE(StatisticsCaseAttribute.REGION_DISTRICT),
PERSON(StatisticsCaseAttribute.SEX,StatisticsCaseAttribute.AGE_INTERVAL_1_YEAR,StatisticsCaseAttribute.AGE_INTERVAL_5_YEARS,
StatisticsCaseAttribute.AGE_INTERVAL_CHILDREN_COARSE,StatisticsCaseAttribute.AGE_INTERVAL_CHILDREN_FINE,
StatisticsCaseAttribute.AGE_INTERVAL_CHILDREN_MEDIUM),
StatisticsCaseAttribute.AGE_INTERVAL_CHILDREN_MEDIUM, StatisticsCaseAttribute.AGE_INTERVAL_BASIC),
CASE(StatisticsCaseAttribute.DISEASE,StatisticsCaseAttribute.CLASSIFICATION,StatisticsCaseAttribute.OUTCOME);

private final StatisticsCaseAttribute[] attributes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class StatisticsCaseCriteria implements Serializable {
private Date reportDateFrom;
private Date reportDateTo;
private List<Sex> sexes;
private Boolean sexUnknown;
private Set<IntegerRange> ageIntervals = new HashSet<>();
private List<Disease> diseases;
private List<CaseClassification> classifications;
Expand Down Expand Up @@ -168,6 +169,10 @@ public Date getReportDateTo() {
public List<Sex> getSexes() {
return sexes;
}

public Boolean isSexUnknown() {
return sexUnknown;
}

public Set<IntegerRange> getAgeIntervals() {
return ageIntervals;
Expand Down Expand Up @@ -344,6 +349,11 @@ public StatisticsCaseCriteria sexes(List<Sex> sexes) {
this.sexes = sexes;
return this;
}

public StatisticsCaseCriteria sexUnknown(Boolean sexUnknown) {
this.sexUnknown = sexUnknown;
return this;
}

public StatisticsCaseCriteria addAgeIntervals(List<IntegerRange> ageIntervals) {
this.ageIntervals.addAll(ageIntervals);
Expand Down
1 change: 1 addition & 0 deletions sormas-api/src/main/resources/enum.properties
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ StatisticsCaseAttribute.AGE_INTERVAL_5_YEARS: Age stratification: 5 year interva
StatisticsCaseAttribute.AGE_INTERVAL_CHILDREN_COARSE: Age stratification: children coarse
StatisticsCaseAttribute.AGE_INTERVAL_CHILDREN_FINE: Age stratification: children fine
StatisticsCaseAttribute.AGE_INTERVAL_CHILDREN_MEDIUM: Age stratification: children medium
StatisticsCaseAttribute.AGE_INTERVAL_BASIC: Age stratification: basic
StatisticsCaseAttribute.DISEASE = Disease
StatisticsCaseAttribute.CLASSIFICATION = Classification
StatisticsCaseAttribute.OUTCOME = Outcome
Expand Down
2 changes: 1 addition & 1 deletion sormas-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>0.21.0</version>
<version>0.22.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sormas-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>0.21.0</version>
<version>0.22.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Loading

0 comments on commit 204416b

Please sign in to comment.