Hi everyone,
May I please have a clarity on the DHIS2 json structure for importing data. I understand some fields but I don’t understand others for an example with the trackerEntity(tackedentityinstance) isn’t it suppose to auto generate when you import the data. Another example of what I don’t understand is the enrollment uid where do I get it from because it is not there in my DHIS2. Please view the attached json object that I am trying to understand.
{
"trackedEntities": [
{
"orgUnit": "O6uvpzGd5pu",
"trackedEntity": "Kj6vYde4LHh",
"trackedEntityType": "Q9GufDoplCL"
}
],
"enrollments": [
{
"orgUnit": "O6uvpzGd5pu",
"program": "f1AyMswryyQ",
"trackedEntity": "Kj6vYde4LHh",
"enrollment": "MNWZ6hnuhSw",
"trackedEntityType": "Q9GufDoplCL",
"enrolledAt": "2019-08-19T00:00:00.000",
"deleted": false,
"occurredAt": "2019-08-19T00:00:00.000",
"status": "ACTIVE",
"notes": [],
"attributes": [],
}
],
"events": [
{
"scheduledAt": "2019-08-19T13:59:13.688",
"program": "f1AyMswryyQ",
"event": "ZwwuwNp6gVd",
"programStage": "nlXNK4b7LVr",
"orgUnit": "O6uvpzGd5pu",
"trackedEntity": "Kj6vYde4LHh",
"enrollment": "MNWZ6hnuhSw",
"enrollmentStatus": "ACTIVE",
"status": "ACTIVE",
"occurredAt": "2019-08-01T00:00:00.000",
"attributeCategoryOptions": "xYerKDKCefk",
"deleted": false,
"attributeOptionCombo": "HllvX50cXC0",
"dataValues": [
{
"updatedAt": "2019-08-19T13:58:37.477",
"storedBy": "admin",
"dataElement": "BuZ5LGNfGEU",
"value": "20",
"providedElsewhere": false
},
{
"updatedAt": "2019-08-19T13:58:40.031",
"storedBy": "admin",
"dataElement": "ZrqtjjveTFc",
"value": "Male",
"providedElsewhere": false
},
{
"updatedAt": "2019-08-19T13:59:13.691",
"storedBy": "admin",
"dataElement": "mB2QHw1tU96",
"value": "[-11.566044,9.477801]",
"providedElsewhere": false
}
],
"notes": []
},
{
"scheduledAt": "2019-08-19T13:59:13.688",
"program": "f1AyMswryyQ",
"event": "XwwuwNp6gVE",
"programStage": "PaOOjwLVW23",
"orgUnit": "O6uvpzGd5pu",
"trackedEntity": "Kj6vYde4LHh",
"enrollment": "MNWZ6hnuhSw",
"enrollmentStatus": "ACTIVE",
"status": "ACTIVE",
"occurredAt": "2019-08-01T00:00:00.000",
"attributeCategoryOptions": "xYerKDKCefk",
"deleted": false,
"attributeOptionCombo": "HllvX50cXC0",
"notes": []
}
],
"relationships": [
{
"relationshipType": "Udhj3bsdHeT",
"from": {
"trackedEntity": { "trackedEntity": "Kj6vYde4LHh" }
},
"to": {
"trackedEntity": { "trackedEntity": "Gjaiu3ea38E" }
}
}
]
}
2 posts - 2 participants