← Back to team overview

dhis2-users team mailing list archive

Re: Days per period

 

Hi Roger,

This functionality is on the roadmap for the next release:
https://blueprints.launchpad.net/dhis2/+spec/extended-indicator-engine

<https://blueprints.launchpad.net/dhis2/+spec/extended-indicator-engine>We
definitely need to support this as part of the indicator functionality and
cannot require external or custom calculations for this.

If you know that you will only be using monthly reports a workaround is to
use a static value of 30.3 in the indicator formula.

The danger is that the indicator will be made available for other period
types in the various report tools, and a quarter will have more days than
30.3 of course....

You could perhaps, while waiting for the next release, create a set of
indicators for bed occupancy, one for each period type (e.g. "Bed Occupancy
Rate Monthly", "Bed Occupancy Rate Quarterly", and "Bed Occupancy Rate
Yearly" and adjust the static number in the formula accordingly, and then
make sure to use these with the correct period type in report outputs.

Ola
-----------

----------------------------------
Ola Hodne Titlestad (Mr)
HISP
Department of Informatics
University of Oslo

Mobile: +47 48069736
Home address: Vetlandsvn. 95B, 0685 Oslo, Norway. Googlemaps
link<http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Vetlandsvn.+95B,+0685+Oslo,+Norway>


On 11 May 2011 11:01, Jason Pickering <jason.p.pickering@xxxxxxxxx> wrote:

> 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