DHIS2 2.14, API, json for event, Information hiding

Hello

I am currently working on sending persons, enrolling them and creating events with DHIS2 2.14 api.

I have a question regarding information hiding.

Below you can see an example of a json im using for creating events. My question is why I have to use codes for the dataelements such as: “X1jze6oL3CJ”,

This seems to be internal DHIS2 codes and using them would be against the principle of information hiding. Is this a shortcoming of DHIS2 or am I using the API wrongly?

Thanks.

Adrian Soria

Json example (note: some modification done to orgunit and person due to privacy conserns)

{
“status”:“COMPLETED”,

"program":"jsCJni0q8tm",
"programStage":"xeUmyZUjKsS",
"orgUnit":"---------",
"person":"----------",
"eventDate":"2012-04-29 00:00:00",

"dataValues":[
    {
        "value":"A000 - COLERA DEBIDO A VIBRIO CHOLERAE O1, BIOTIPO CHOLERAE ",
        "dataElement":"X1jze6oL3CJ",
        "providedElsewhere":false,

    },
    {
        "value":"-  -",
        "dataElement":"mbyoEI1e0bs",
        "providedElsewhere":false,
    },

… etc

Hi Adrian,

you can define an identifier scheme for organisation units. Unfortunately we haven’t enabled that for other stuff such as program. Docs here:

http://www.dhis2.org/doc/snapshot/en/user/html/ch30s10.html#d5e8065

Mind you that these are not internal dhis 2 codes (e.g. like database identifiers), rather publicly exposed identifiers which you can browse and look up through the web api, e.g by going to api/programs.

···

On Tue, Apr 29, 2014 at 11:37 AM, Adrian S adrian.2072@gmail.com wrote:

Hello

I am currently working on sending persons, enrolling them and creating events with DHIS2 2.14 api.

I have a question regarding information hiding.

Below you can see an example of a json im using for creating events. My question is why I have to use codes for the dataelements such as: “X1jze6oL3CJ”,

This seems to be internal DHIS2 codes and using them would be against the principle of information hiding. Is this a shortcoming of DHIS2 or am I using the API wrongly?

Thanks.

Adrian Soria

Json example (note: some modification done to orgunit and person due to privacy conserns)

{
“status”:“COMPLETED”,

"program":"jsCJni0q8tm",
"programStage":"xeUmyZUjKsS",
"orgUnit":"---------",
"person":"----------",
"eventDate":"2012-04-29 00:00:00",


"dataValues":[
    {
        "value":"A000 - COLERA DEBIDO A VIBRIO CHOLERAE O1, BIOTIPO CHOLERAE ",
        "dataElement":"X1jze6oL3CJ",
        "providedElsewhere":false,


    },
    {
        "value":"-  -",
        "dataElement":"mbyoEI1e0bs",
        "providedElsewhere":false,
    },

… etc


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

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

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

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