dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #00275
Re: [Dhis-dev] DataElement -> PeriodType association
Hi all
I am still grappling a bit to make complete sense of the data model.
I would be grateful if someone with greater domain knowledge might
enlighten me on my query below.
2009/3/18 Lars Helge Øverland <larshelge@xxxxxxxxx>:
>
>>
>> OK, after much poking around the schema, I realize that I have
>> misinterpreted something. You have to impose one of two constraints.
>> Either:
>> 1. A DataElement can only (must) be a member of one DataSet; or
>> 2. A DataElement can only (must) have one PeriodType.
>
>
> True.
>
>>
>> If we cannot impose (1), or we shouldn't or we don't want to, then is
>> it instead possible to think of a "fully qualified" DataElement as
>> DataSet::DataElement? Practically this means having DataSet,
>> DataElement and Period association with the DataValue. The advantage
>> would be that we still only need to associate the PeriodType with the
>> DataSet.
>
>
>
> Enforcing 1) cannot be done, as data elements frequently appear in multiple
> datasets, which is a part of the HISP "appproach".
OK. I've taken a really long look at the schema and here's my first
pass at understanding the HISP approach. It seems to me that if data
elements appear in different datasets, there is therefore no way to be
able to link any particular datavalue with a dataset.
For example if there is DataSet DS_a with DataElements DE_a, DE_b and DE_c.
And there is DataSet DS_b with DataElements DE_a and DE_d.
If we were to try and export DataValues from dataset DS_a, the best we
can do is identify all DataValues with DateElement types DE_a, DE_b
and DE_c. There will be overlap with the elements of DS_b. Put
differently, if there are 100 values in total and we export DS_a and
DS_b we might end up with 110 values.
The DataValue only knows its source, dataelement and period, not the
dataset it belongs to.
In fact the idea of a DataSet becomes quite a "weak" one for grouping
datavalues.
In which case the only sensible way of identifying sets of datavalues
is by organisation unit and/or by period. Is this correct?
Regards
Bob
>
>>
>> PS. I am still looking for sample datasets. I tried the link at
>> http://208.76.222.114/confluence/display/DHIS2/Downloads but it is
>> broken. Can anyone please point me to some.
>
> You can find a postgres backup of the sample database here:
> http://folk.uio.no/larshelg/files/dhis2sample.backup.
>
> I will create a mysql dump later today and let you know:)
>
>
> Lars
>
>
Follow ups
References