← Back to team overview

dhis2-devs team mailing list archive

Re: adding categoryoption

 

On 6 June 2011 19:00, Jason Pickering <jason.p.pickering@xxxxxxxxx> wrote:

> Yeah, well, there is no easy way out here. One only need to review
> this
> http://www.mail-archive.com/dhis2-devs@xxxxxxxxxxxxxxxxxxx/msg02059.html
>
> I had a situation recently when implementing a logistics dataset,
> which would have worked great with categories. The problem was that
> categories are hard-wired like this..
>
> A+B+C+D=E
>
> My use case looked like this..
>
> A+B-C+D=E
>
> So, do we force the users to enter negative numbers for C in order to
> enforce the sign? Seems no way to do it really, since data elements
> are validated at the data element level (number, positive integer,
> negative integer...) and not at the level of the category option.
> Categories did not work here, and since indicators are not
> multidimensional (yet) I would need to implement about 300+ indicators
> in order to derive the "total", E. Painful, but no easy way around it
> with McDonalds, so I did not use it.
>

Yes well ... neither the time or the place to reopen this one now.  Just
trying to recommend a reasonable workaround.

>
> Why not have a category "Gender" (not sex, but this is another
> discussion Bob) with Male/Female/Unknown for all your data elements.
> If "Unknown" does not apply, it is going to be null in all cases
> anyway and not matter.
>

Yup you will see I suggested that possibility already (maybe you need a
longer HTC :-).  Probably what they should do.  I'm aware of the Sex/Gender
discussion as well but, sh*t, this is complicated enough already .. Mind you
gender in the context of HR is indeed probably more appropriate than Sex.
So could be a logical case (a tenuous one I think) can be made to have both.


Bob


> Regards,
> Jason
>
>
> On Mon, Jun 6, 2011 at 7:29 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>
> wrote:
> > On 6 June 2011 17:44, jason.p.pickering@xxxxxxxxx
> > <jason.p.pickering@xxxxxxxxx> wrote:
> >>
> >> KISS. Don't use categories as the model does not fit the use case. Three
> >> plain old data elements will  work.
> >>
> >> Just a thought.
> >
> > Tempting thought ... with a few downsides. Its not just 3.  60 job titles
> x
> > 3 would be 180 dataelements.  Also the existing sdmx-hd transforms I have
> > developed map sdmx-hd dimensions onto our dhis categories.  Much though I
> > might have reason to regret some of this, that is the way it is at the
> > moment.  And it works ok as long as you don't want to add options to
> > categories :-(
> >
> >>
> >> Sent from my HTC
> >>
> >> ----- Reply message -----
> >> From: "Bob Jolliffe" <bobjolliffe@xxxxxxxxx>
> >> Date: Mon, Jun 6, 2011 18:11
> >> Subject: [Dhis2-devs] adding categoryoption
> >> To: "dhis2-devs" <dhis2-devs@xxxxxxxxxxxxxxxxxxx>
> >>
> >> The folk in Zanzibar have an interesting problem with linking with
> iHRIS.
> >> iHRIS has data on staffing usually disaggregated by Male/Female but
> >> occasionally not.  So they need an extra code Male, Female and Unknown.
> >>
> >> Now the Zanzibar database has a Sex category with Male and Female
> defined.
> >> But *adding* a new categoryoption seems difficult.  After all there are
> >> many
> >> categorycombos using Sex as an axis.  And catoptcombos would need to be
> >> regenerated etc.  Is there any sensible way to do this?
> >>
> >> The alternative is to make a brand new category, say Gender, and fill
> this
> >> with the three options though that is far from ideal.  For one thing we
> >> could not reuse the Male/Female codes so would have to use MALE/FEMALE
> or
> >> what have you.
> >>
> >> Any thoughts?
> >>
> >> Regards
> >> Bob
> >>
> >>
> >
> >
>

References