dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #00352
Re: Days per period
PEPELA WANJALAMINISTRY OF HEALTH HEADQUARTERSHEALTH INFORMATION SYSTEMAFYA HOUSE, HIS LG 37P.O BOX 30016, NAIROBI, KENYATEL: +254 (020) 2717077 EXT 45097CELL: +254 (0) 722375633 or 0202033363EMAIL: wanjala2p@xxxxxxxxx hmis@xxxxxxxxxxxx
--- On Wed, 5/11/11, Friedman, Roger (CDC/CGH/DGHA) (CTR) <rdf4@xxxxxxx> wrote:
From: Friedman, Roger (CDC/CGH/DGHA) (CTR) <rdf4@xxxxxxx>
Subject: Re: [Dhis2-users] Days per period
To: "Jason Pickering" <jason.p.pickering@xxxxxxxxx>
Cc: dhis2-users@xxxxxxxxxxxxxxxxxxx
Date: Wednesday, May 11, 2011, 2:19 AM
What I hear you saying is that we can get this in a report table but not in an indicator calculation or validation expression.
Also, my recollection is that custom SQL view only allows select statements, so we can't use it to update a hidden data element, right? And we could muck with the Hibernate definition to get a virtual column in the period table but we'd have no way to use it.
-----Original Message-----
From: Jason Pickering [mailto:jason.p.pickering@xxxxxxxxx]
Sent: Wednesday, May 11, 2011 5:01 AM
To: Friedman, Roger (CDC/CGH/DGHA) (CTR)
Cc: dhis2-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Dhis2-users] Days per period
It would be available through a pretty trivial SQL statement if you
are calculating this on an external report.
SELECT periodid, enddate-startdate as nbr_days FROM period in
Postgresql will give you the number of days in a given period along
with the periodid. you could then join this to the aggregated data
elements you mention with periodid and the aggregateddatavalue table.
I think the easiest way would be through a custom SQL view (which is
now supported) or through a report rather than direct calculation
through the system.
Regards,
Jason
On Wed, May 11, 2011 at 10:56 AM, Friedman, Roger (CDC/CGH/DGHA) (CTR)
<rdf4@xxxxxxx> wrote:
> Listers --
> We need to calculate bed occupancy rates. We have the number of
> beds per ward and the number of person-days of bed use per month, but we
> need the number of days per month. Is that available in some way from
> the system or are we going to have to key it?
> Thanks, Roger
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help : https://help.launchpad.net/ListHelp
>
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+260974901293
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp
References