← Back to team overview

dhis2-users team mailing list archive

Re: 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


Follow ups

References