Get Date Values

Hello,

We recently implemented DHIS2 for our data collection needs and are currently looking at the first data submitted. Am just getting used to the table structure and need help on where the Data Set data entry dates/periods are saved. In the datavalue table I have a field periodid but cant seem to find what table to link it to to get the actual dates. the period and periodtype tables dont seem to have the actual dates when the data was being reported. Please help.

Thank you.

···

Walusiku J. Muyunda

“We have heaven to win and hell to shun, our lives testify better!”

Walusiku,

Periodtype table contains the list of period types (weekly, daily, monthly, quarterly, etc).

Period table has the actual period definitions: period type, start date, and end date (e.g. quarterly type, start date january 1, 2018, end date March 31, 2018).

period id in the data value table refers to the entry in the period table.

periodid is for the period that the data is reported for.

If you need to get when the data value was actually entered/last updated, in datavalue table you have created (when data point was created) and lastupdated (when the data point value was last update).

Best,

Vlad

···

On Thu, Aug 16, 2018 at 2:54 AM Walusiku Muyunda jomuwalu@gmail.com wrote:

Hello,

We recently implemented DHIS2 for our data collection needs and are currently looking at the first data submitted. Am just getting used to the table structure and need help on where the Data Set data entry dates/periods are saved. In the datavalue table I have a field periodid but cant seem to find what table to link it to to get the actual dates. the period and periodtype tables dont seem to have the actual dates when the data was being reported. Please help.

Thank you.

Walusiku J. Muyunda

“We have heaven to win and hell to shun, our lives testify better!”


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Ohh I see it now. Thank you.

···

Walusiku J. Muyunda

Cell: +260953063387

“We have heaven to win and hell to shun, our lives testify better!”

Dear Walu, see the SQL below, you can see the number of tables related with data value table.

SELECT de.uid, de.name, ps.iso, dv.sourceid, org.name AS OrgUnit,
dv.categoryoptioncomboid AS categoryoptioncombo, cat.uid AS categoryoptioncomboUID, dv.value

FROM datavalue dv

inner join dataelement de ON de.dataelementid=dv.dataelementid
inner join period pe ON pe.periodid=dv.periodid
inner join _periodstructure ps ON dv.periodid=ps.periodid
inner join organisationunit org ON org.organisationunitid=dv.sourceid
inner join categoryoptioncombo cat ON cat.categoryoptioncomboid = dv.categoryoptioncomboid

WHERE ps.iso=‘201801’ AND org.uid=‘oBI1EjCjKgq’ AND de.name=‘IPD_Death’

Regards

Sele

···

On Thursday, August 16, 2018, 9:54:17 AM GMT+3, Walusiku Muyunda jomuwalu@gmail.com wrote:

Hello,

We recently implemented DHIS2 for our data collection needs and are currently looking at the first data submitted. Am just getting used to the table structure and need help on where the Data Set data entry dates/periods are saved. In the datavalue table I have a field periodid but cant seem to find what table to link it to to get the actual dates. the period and periodtype tables dont seem to have the actual dates when the data was being reported. Please help.

Thank you.

Walusiku J. Muyunda

“We have heaven to win and hell to shun, our lives testify better!”


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Thank you Sele, the _periodstructure table has added more insight.

Regards.

···

Walu

“We have heaven to win and hell to shun, our lives testify better!”