← Back to team overview

dhis2-devs team mailing list archive

Re: DHIS2 2.14, API, json for event, Information hiding

 

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.

--

OrgUnit matching: By default the orgUnit parameter will match on the ID (of
the orgUnit, but from 2.15 you can also select the orgUnit id matching
scheme by using the parameter orgUnitIdScheme=SCHEME, where the options
are: ID, UID, UUID, CODE, and NAME (ID and UID will both matchUIDs).


regards,

Lars



On Tue, Apr 29, 2014 at 11:37 AM, Adrian S <adrian.2072@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

References