-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
589 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,4 +167,5 @@ public String getTeamId() { | |
public void setTeamId(String teamId) { | ||
this.teamId = teamId; | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...toring/src/main/java/org/smartregister/growthmonitoring/domain/WeightForHeightZScore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.smartregister.growthmonitoring.domain; | ||
|
||
import org.smartregister.growthmonitoring.GrowthMonitoringLibrary; | ||
|
||
import java.util.List; | ||
|
||
public class WeightForHeightZScore extends WeightZScore { | ||
|
||
public static Float MAX_REPRESENTED_HEIGHT = 120f; | ||
public static Float MIN_REPRESENTED_HEIGHT = 65f; | ||
|
||
public static double getZScore(String gender, double weight, double height) { | ||
double zScore = 0.0; | ||
List<ZScore> zScoreValues = GrowthMonitoringLibrary.getInstance().weightForHeightRepository().findZScoreVariables(gender, height); | ||
if (zScoreValues.size() > 0) { | ||
zScore = zScoreValues.get(0).getZ(weight); | ||
} | ||
return zScore; | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
...toring/src/main/java/org/smartregister/growthmonitoring/domain/WeightForHeightZscore.java
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...owth-monitoring/src/main/java/org/smartregister/growthmonitoring/domain/WeightHeight.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.smartregister.growthmonitoring.domain; | ||
|
||
public class WeightHeight implements Comparable<WeightHeight> { | ||
|
||
private Weight weight; | ||
private Height height; | ||
|
||
public WeightHeight(Weight weight, Height height) { | ||
this.weight = weight; | ||
this.height = height; | ||
} | ||
|
||
public Weight getWeight() { | ||
return weight; | ||
} | ||
|
||
public void setWeight(Weight weight) { | ||
this.weight = weight; | ||
} | ||
|
||
public Height getHeight() { | ||
return height; | ||
} | ||
|
||
public void setHeight(Height height) { | ||
this.height = height; | ||
} | ||
|
||
@Override | ||
public int compareTo(WeightHeight weightHeight) { | ||
return this.weight.getDate().compareTo(weightHeight.weight.getDate()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.