[tryton-debian-vcs] tryton-modules-health-reporting branch debian updated. debian/3.0.3-1-2-gbaa15bc
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Mon Dec 12 15:30:09 UTC 2016
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-health-reporting.git;a=commitdiff;h=debian/3.0.3-1-2-gbaa15bc
commit baa15bc742f3792fd50ac43efeb0beec5b442f21
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Dec 12 15:45:21 2016 +0100
Releasing debian version 3.0.5-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index d152095..51d39d9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-modules-health-reporting (3.0.5-1) unstable; urgency=medium
+
+ * Merging upstream version 3.0.5.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Mon, 12 Dec 2016 15:45:21 +0100
+
tryton-modules-health-reporting (3.0.3-1) unstable; urgency=medium
* Merging upstream version 3.0.3.
commit 15c7ba4485a357f9bff51f5a814de1f93616d359
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Dec 12 15:45:21 2016 +0100
Merging upstream version 3.0.5.
diff --git a/PKG-INFO b/PKG-INFO
index da219e5..471884e 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_health_reporting
-Version: 3.0.3
+Version: 3.0.5
Summary: GNU Health Reporting Module
Home-page: http://health.gnu.org/
Author: GNU Solidario
diff --git a/report/summary_report.odt b/report/summary_report.odt
index 907f620..5f34e0f 100644
Binary files a/report/summary_report.odt and b/report/summary_report.odt differ
diff --git a/report/summary_report.py b/report/summary_report.py
index 144123d..53e49b1 100644
--- a/report/summary_report.py
+++ b/report/summary_report.py
@@ -32,20 +32,38 @@ class InstitutionSummaryReport(Report):
@classmethod
+ def get_population_with_no_dob(cls):
+ """ Return Total Number of living people in the system
+ without a date of birth"""
+ cursor = Transaction().cursor
+
+ # Check for entries without date of birth
+ cursor.execute("SELECT COUNT(id) \
+ FROM party_party WHERE is_person is TRUE and \
+ deceased is not TRUE and dob is null")
+
+ res = cursor.fetchone()[0]
+
+ return(res)
+
+ @classmethod
def get_population(cls,date1,date2,gender,total):
""" Return Total Number of living people in the system
segmented by age group and gender"""
cursor = Transaction().cursor
if (total):
- cursor.execute("SELECT COUNT(dob) \
- FROM party_party WHERE gender = %s and deceased is not TRUE",(gender))
+ cursor.execute("SELECT COUNT(id) \
+ FROM party_party WHERE \
+ gender = %s and deceased is not TRUE",(gender))
else:
- cursor.execute("SELECT COUNT(dob) \
+ cursor.execute("SELECT COUNT(id) \
FROM party_party \
WHERE dob BETWEEN %s and %s AND \
- gender = %s and deceased is not TRUE" ,(date2, date1, gender))
+ gender = %s \
+ and deceased is not TRUE" ,(date2, date1, gender))
+
res = cursor.fetchone()[0]
@@ -169,6 +187,10 @@ class InstitutionSummaryReport(Report):
context[''.join(['p','total_','m'])] = \
cls.get_population (None,None,'m', total=True)
+ # Living people with NO date of birth
+ context['no_dob'] = \
+ cls.get_population_with_no_dob()
+
# Build the Population Pyramid for registered people
for age_group in range (0,21):
@@ -205,7 +227,6 @@ class InstitutionSummaryReport(Report):
context['new_deaths'] = \
cls.get_new_deaths(start_date, end_date)
-
# Get evaluations within the specified date range
context['evaluations'] = \
@@ -215,6 +236,7 @@ class InstitutionSummaryReport(Report):
eval_dx =[]
non_dx_eval = 0
+ non_age_eval = 0
eval_f = 0
eval_m = 0
@@ -229,11 +251,15 @@ class InstitutionSummaryReport(Report):
eval_f +=1
else:
eval_m +=1
+
+ if not evaluation.computed_age:
+ non_age_eval +=1
context['non_dx_eval'] = non_dx_eval
context['eval_num'] = len(evaluations)
context['eval_f'] = eval_f
context['eval_m'] = eval_m
+ context['non_age_eval'] = non_age_eval
# Create a set to work with single diagnoses
# removing duplicate entries from eval_dx
@@ -255,31 +281,34 @@ class InstitutionSummaryReport(Report):
new_conditions = 0
for unique_eval in unique_evaluations:
- #Strip to get the raw year
- age = int(unique_eval.computed_age.split(' ')[0][:-1])
-
- # Age groups in this diagnostic
- if (age < 5):
- group_1 += 1
- if (unique_eval.gender == 'f'):
- group_1f += 1
- if (age in range(5,14)):
- group_2 += 1
- if (unique_eval.gender == 'f'):
- group_2f += 1
- if (age in range(15,45)):
- group_3 += 1
- if (unique_eval.gender == 'f'):
- group_3f += 1
- if (age in range(46,60)):
- group_4 += 1
- if (unique_eval.gender == 'f'):
- group_4f += 1
- if (age > 60):
- group_5 += 1
- if (unique_eval.gender == 'f'):
- group_5f += 1
+ if (unique_eval.computed_age):
+
+ #Strip to get the raw year
+ age = int(unique_eval.computed_age.split(' ')[0][:-1])
+
+
+ # Age groups in this diagnostic
+ if (age < 5):
+ group_1 += 1
+ if (unique_eval.gender == 'f'):
+ group_1f += 1
+ if (age in range(5,14)):
+ group_2 += 1
+ if (unique_eval.gender == 'f'):
+ group_2f += 1
+ if (age in range(15,45)):
+ group_3 += 1
+ if (unique_eval.gender == 'f'):
+ group_3f += 1
+ if (age in range(46,60)):
+ group_4 += 1
+ if (unique_eval.gender == 'f'):
+ group_4f += 1
+ if (age > 60):
+ group_5 += 1
+ if (unique_eval.gender == 'f'):
+ group_5f += 1
# Check for new conditions vs followup / chronic checkups
# in the evaluation with a particular diagnosis
diff --git a/tryton.cfg b/tryton.cfg
index 237b47f..22172c6 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.3
+version=3.0.5
depends:
health
xml:
diff --git a/trytond_health_reporting.egg-info/PKG-INFO b/trytond_health_reporting.egg-info/PKG-INFO
index 8615b43..acbb7b3 100644
--- a/trytond_health_reporting.egg-info/PKG-INFO
+++ b/trytond_health_reporting.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-health-reporting
-Version: 3.0.3
+Version: 3.0.5
Summary: GNU Health Reporting Module
Home-page: http://health.gnu.org/
Author: GNU Solidario
diff --git a/trytond_health_reporting.egg-info/requires.txt b/trytond_health_reporting.egg-info/requires.txt
index f1e6220..a990043 100644
--- a/trytond_health_reporting.egg-info/requires.txt
+++ b/trytond_health_reporting.egg-info/requires.txt
@@ -1,2 +1,2 @@
-trytond_health == 3.0.3
+trytond_health == 3.0.5
trytond >= 3.8, < 3.9
--
tryton-modules-health-reporting
More information about the tryton-debian-vcs
mailing list