Permalink
Browse files

Changes to report for category changes.

  • Loading branch information...
Lengani Kaunda
Lengani Kaunda committed Apr 27, 2012
1 parent 4c6bb12 commit bdddd462e0347b2fbc945a2dc6e9c1c568ec66bc
Showing with 10 additions and 14 deletions.
  1. +6 −8 mwana/apps/nutrition/graphs.py
  2. +4 −6 mwana/apps/nutrition/templates/nutrition/graphs.html
@@ -20,11 +20,11 @@ def __init__(self, assessments=None, district=None):
self.district = district
self.asses = assessments
self.underweight_data = [['Obese'], ['Overweight'], ['Normal'], ['Mild'], ['Moderate'], ['Severe']]
- self.stunting_data = [['Very Tall'], ['Normal'], ['Mild'], ['Moderate'], ['Severe']]
- self.wasting_data = [['Unusual'], ['Normal'], ['Mild'], ['Moderate'], ['Severe']]
+ self.stunting_data = [['Normal'], ['Mild'], ['Moderate'], ['Severe']]
+ self.wasting_data = [['Normal'], ['Mild'], ['Moderate'], ['Severe']]
self.underweight_data_percent = [['Obese'], ['Overweight'], ['Normal'], ['Mild'], ['Moderate'], ['Severe']]
- self.stunting_data_percent = [['Very Tall'], ['Normal'], ['Mild'], ['Moderate'], ['Severe']]
- self.wasting_data_percent = [['Unusual'], ['Normal'], ['Mild'], ['Moderate'], ['Severe']]
+ self.stunting_data_percent = [['Normal'], ['Mild'], ['Moderate'], ['Severe']]
+ self.wasting_data_percent = [['Normal'], ['Mild'], ['Moderate'], ['Severe']]
self.graph_data = {}
self.underweight_table = {}
self.stunting_table = {}
@@ -82,8 +82,7 @@ def update_underweight_data(self, fac_asses, location):
def update_stunting_data(self, fac_asses, location):
""" Updates stunting status counts given a filtered queryset"""
- metric = [fac_asses.filter(stunting='V').count(),
- fac_asses.filter(Q(stunting='T') | Q(stunting='G') | Q(stunting='L')).count(),
+ metric = [fac_asses.filter(Q(stunting='V') | Q(stunting='T') | Q(stunting='G') | Q(stunting='L')).count(),
fac_asses.filter(stunting='M').count(),
fac_asses.filter(stunting='U').count(),
fac_asses.filter(stunting='S').count()]
@@ -101,8 +100,7 @@ def update_stunting_data(self, fac_asses, location):
def update_wasting_data(self, fac_asses, location):
""" Updates wasting status counts given a filtered queryset"""
- metric = [fac_asses.filter(wasting='V').count(),
- fac_asses.filter(Q(wasting='T') | Q(wasting='G') | Q(wasting='L')).count(),
+ metric = [fac_asses.filter(Q(wasting='V') | Q(wasting='T') | Q(wasting='G') | Q(wasting='L')).count(),
fac_asses.filter(wasting='M').count(),
fac_asses.filter(wasting='U').count(),
fac_asses.filter(wasting='S').count()]
@@ -153,7 +153,7 @@
if (chart_id == "underweight_chart") {
var colors_list = ['#9c8aa5', '#0077bb', '#00cd00','#fee01e', '#dd7500', '#cd0000'];
}else {
- var colors_list = ['#0077bb', '#00cd00','#fee01e', '#dd7500', '#cd0000'];
+ var colors_list = ['#00cd00','#fee01e', '#dd7500', '#cd0000'];
}
// Create and draw the visualization.
@@ -335,8 +335,7 @@ <h2>Stunting</h2>
<th>Location</th>
<th>Height Captured</th>
<th>Height Efficiency</th>
- <th>Very Tall</th>
- <th>Normal</th>
+ <th>Normal</th>
<th>Mild</th>
<th>Moderate</th>
<th>Severe</th>
@@ -386,8 +385,7 @@ <h2>Wasting</h2>
<th>MUAC Captured</th>
<th>MUAC Efficiency</th>
<th>Height Captured</th>
- <th>Unusual</th>
- <th>Normal</th>
+ <th>Normal</th>
<th>Mild</th>
<th>Moderate</th>
<th>Severe</th>
@@ -416,6 +414,6 @@ <h2>Wasting</h2>
</div>
<p><a href="/growth/csv/assessments/?location={{selected_location}}&startdate={{startdate}}&enddate={{enddate}}&gender={{selected_gender}}&startage={{startage}}&endage={{endage}}">Export supporting data to Excel.</a></p>
</div>
-
+<p>Categorization is according to <a href="http://www.who.int/childgrowth/en/">WHO Child Growth Standards</a></p>
</div>
{% endblock content %}

0 comments on commit bdddd46

Please sign in to comment.