Tracked Entity Instance Creation And Enrollment Payload Example

Hi Guys

I’m working on capturing some tracker data through the Web-API and I’m using the documentation here https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s37.html

The payload example provided in the documentation for creating a TrackedEntityInstance (in Json) is as follows:

···

Farai Mutero

I think you left something out? Also include any errors

···

On Wednesday, February 25, 2015, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m working on capturing some tracker data through the Web-API and I’m using the documentation here https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s37.html

The payload example provided in the documentation for creating a TrackedEntityInstance (in Json) is as follows:


Farai Mutero

Morten

Hi Guys (Thanks Morten for the quick reply, sent out the mail too early)

I’m working on capturing some tracker data (multiple events with registration) into DHIS2 via the Web API and I’m using the documentation here : https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s37.html.

The payload example provided in the documentation (In Json) is as follows:

{

"trackedEntity": "tracked-entity-id",

"orgUnit": "org-unit-id",

"attributes": [ {

    "attribute": "attribute-id",

    "value": "attribute-value"

} ]

}

I’m looking for an xml example of the same? Could you kindly assist?

I’m also looking for an xml example payload for enrolling the newly Tracked Entity Instance. The Json example provided in the documentation is as follows:

{

"trackedEntityInstance": "ZRyCnJ1qUXS",

"program": "S8uo8AlvYMz",

"dateOfEnrollment": "2013-09-17",

"dateOfIncident": "2013-09-17"

}

I’m looking for the xml example of the same. Could you kindly assist?

Regards

Farai Mutero

Software Development Team

**Health Information Systems Program (HISP) - SA

------------------------------------------------------------------------------** Email: farai@hisp.org

Cell: +27 84 554 8849

Skype: fmutero

Website: http://hispsa.org

···

On Wed, Feb 25, 2015 at 2:07 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

I think you left something out? Also include any errors

On Wednesday, February 25, 2015, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m working on capturing some tracker data through the Web-API and I’m using the documentation here https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s37.html

The payload example provided in the documentation for creating a TrackedEntityInstance (in Json) is as follows:


Farai Mutero


Morten

Farai Mutero

Hi Farai

Are you coming to our VN workshop? level 2-3, we will do a big workshop on integration, apps, web-api etc…

I think it might be good for you? I’m sorry, but the docs are not so good in several places… maybe fixing docs should be part of the integration workshop… i can show people how it works, its ok for single even no registration, but after that… its lacking in several places

Just write me directly with what you want, and I can guide you

···

On Thu, Feb 26, 2015 at 1:04 AM, Farai Mutero fmutero@gmail.com wrote:

Hi Guys (Thanks Morten for the quick reply, sent out the mail too early)

I’m working on capturing some tracker data (multiple events with registration) into DHIS2 via the Web API and I’m using the documentation here : https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s37.html.

The payload example provided in the documentation (In Json) is as follows:

{

"trackedEntity": "tracked-entity-id",
"orgUnit": "org-unit-id",
"attributes": [ {
    "attribute": "attribute-id",
    "value": "attribute-value"
} ]

}

I’m looking for an xml example of the same? Could you kindly assist?

I’m also looking for an xml example payload for enrolling the newly Tracked Entity Instance. The Json example provided in the documentation is as follows:

{

"trackedEntityInstance": "ZRyCnJ1qUXS",
"program": "S8uo8AlvYMz",
"dateOfEnrollment": "2013-09-17",
"dateOfIncident": "2013-09-17"

}

I’m looking for the xml example of the same. Could you kindly assist?

Regards

Farai Mutero

Software Development Team

**Health Information Systems Program (HISP) - SA

------------------------------------------------------------------------------** Email: farai@hisp.org

Cell: +27 84 554 8849

Skype: fmutero

Website: http://hispsa.org


Morten

On Wed, Feb 25, 2015 at 2:07 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

I think you left something out? Also include any errors

On Wednesday, February 25, 2015, Farai Mutero fmutero@gmail.com wrote:

Hi Guys

I’m working on capturing some tracker data through the Web-API and I’m using the documentation here https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s37.html

The payload example provided in the documentation for creating a TrackedEntityInstance (in Json) is as follows:


Farai Mutero


Morten

Farai Mutero

the Doc is not correct, I lost days on it
here a paaload that work on 2.35

{“trackedEntityInstances”: [{“trackedEntityInstance”: “KwB8Q6IMgbe”, “trackedEntityType”: “EoBGArVCQ69”, “orgUnit”: “BI8X3rJHbUa”, “enrollments”: [{“enrollment”: “KwB8Q6IMgbe”, “orgUnit”: “BI8X3rJHbUa”, “status”: “COMPLETED”, “incidentDate”: “2012-09-17”, “enrollmentDate”: “2012-09-17”, “attributes”: [{“attribute”: “BRGgPOilUtC”, “value”: “TATA”},], “program”: “IR5BiEXrBD7”}], “attributes”: [{“attribute”: “g54R38QNwEi”, “value”: “51E92E21-6A1A-485B-AB96-A158CA3FE159”}]}]}
br