← Back to team overview

dhis2-devs team mailing list archive

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

Follow ups