Post Openmrs Patient, Visit, Encounters & Obs data to DHIS2 Tracker program

Hi,

I am new to DHIS2 community. At Intelehealth, we are exploring to see how well we can make use of DHIS2 to implement our data dashboards. However, we want to track patient & visit level data & hence was looking into Tracker feature of DHIS2.
We would like to post our patient, visit, encounter & Obs data from openmrs to dhis2 Tracker. We have developed SQL scripts to extract data from openmrs. Is there any way to perform a bulk upload of this data to dhis2 Tracker?

Regards
Priya Joshi
Intelehealth

1 Like

Hi @priyajoshi,

Welcome to the community! :tada: Good luck with your project (:

Yes, there are several ways depending on the application. The main dhis2 app dedicate for this purpose is the Import / Export app (Home - DHIS2 Documentation)

Have you checked out Metadata Import using CSV in the docs https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/metadata.html#webapi_csv_metadata_import? And another option is using the API https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/new-tracker.html#webapi_nti_import.

Hope this helps you get started! Please feel free to post back to the community if you have more questions.

Thanks!

1 Like

Thanks @Gassim for your inputs.

However, do we have any examples where such mapping between the Openmrs patient/visit data to Dhis2 Tracker program has been already done?

Regards
Priya

Hi @priyajoshi,

Interesting that you ask there will be presentations about this topic in the DHIS2 Annual Conference, please check out this CoP search result.

Feel free to ask related topic questions in the posts as well.

Thank you!

@Gassim - Attached is my payload. However, it does not create Event in the DHIS2.
Any idea what could be the issue?

{
“trackedEntityInstances”: [
{
“created”: “2022-06-20T10:47:02.705”,
“orgUnit”: “zClbTEuWajN”,
“createdAtClient”: “2022-06-20T10:47:02.705”,
“trackedEntityInstance”: “yA11UM56jkG”,
“lastUpdated”: “2022-06-20T10:47:02.705”,
“trackedEntityType”: “pgdGhp51w3F”,
“lastUpdatedAtClient”: “2022-06-20T10:47:02.705”,
“potentialDuplicate”: false,
“inactive”: false,
“deleted”: false,
“featureType”: “NONE”,
“programOwners”: [],
“enrollments”: [
{
“orgUnit”: “zClbTEuWajN”,
“program”: “tc3832fP4hh”,
“trackedEntity”: “yA11UM56jkG”,
“enrollment”: “xB22VN78lmH”,
“trackedEntityType”: “pgdGhp51w3F”,
“enrolledAt”: “2022-06-20T10:47:02.705”,
“deleted”: false,
“occurredAt”: “2022-06-20T10:47:02.705”,
“status”: “ACTIVE”,
“notes”: [],
“relationships”: [],
“attributes”: [],
“events”: [
{
“scheduledAt”: “2022-06-20T10:47:02.705”,
“program”: “tc3832fP4hh”,
“event”: “wC33TO90nqI”,
“programStage”: “XaEor1HnWlS”,
“orgUnit”: “zClbTEuWajN”,
“trackedEntity”: “yA11UM56jkG”,
“enrollment”: “xB22VN78lmH”,
“enrollmentStatus”: “ACTIVE”,
“status”: “ACTIVE”,
“occurredAt”: “2022-06-20T10:47:02.705”,
“dataValues”: [
{
“updatedAt”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“dataElement”: “HZx5t6MA4Zn”,
“value”: “Abdominal Pain”,
“providedElsewhere”: false
},
{
“updatedAt”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“dataElement”: “gxMMUqztVWW”,
“value”: “2”,
“providedElsewhere”: false
},
{
“updatedAt”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“dataElement”: “C1i0b7x0LA9”,
“value”: “150”,
“providedElsewhere”: false
}
]
}
]
}
],
“relationships”: [],
“attributes”: [
{
“lastUpdated”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“displayName”: “Patient Name”,
“created”: “2022-06-20T10:47:02.705”,
“valueType”: “TEXT”,
“attribute”: “gyfVzSa5709”,
“value”: “Priya3 Testing”
},
{
“lastUpdated”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“displayName”: “Patient Age”,
“created”: “2022-06-20T10:47:02.705”,
“valueType”: “INTEGER”,
“attribute”: “P5NC3pK8izm”,
“value”: “52”
},
{
“lastUpdated”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“displayName”: “Gender”,
“created”: “2022-06-20T10:47:02.705”,
“valueType”: “TEXT”,
“attribute”: “aCXV9PdM08n”,
“value”: “F”
},
{
“lastUpdated”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“displayName”: “Telephone”,
“created”: “2022-06-20T10:47:02.705”,
“valueType”: “TEXT”,
“attribute”: “QAN6eIlMJc3”,
“value”: “112221110”
},
{
“lastUpdated”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“displayName”: “OpenMRS-ID”,
“created”: “2022-06-20T10:47:02.705”,
“valueType”: “TEXT”,
“attribute”: “JxXKIYjqaBJ”,
“value”: “11UM64”
},
{
“lastUpdated”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“displayName”: “State”,
“created”: “2022-06-20T10:47:02.705”,
“valueType”: “TEXT”,
“attribute”: “pxdRM04oIxl”,
“value”: “Maharashtra”
},
{
“lastUpdated”: “2022-06-20T10:47:02.705”,
“storedBy”: “admin”,
“displayName”: “District”,
“created”: “2022-06-20T10:47:02.705”,
“valueType”: “TEXT”,
“attribute”: “mwmiAm8vzFz”,
“value”: “Palghar”
}
]
}
]
}