Create TEI (dhis2)
Metadata
- Name: Create TEI (dhis2)
- Adaptor:
@openfn/language-dhis2
- Adaptor Version:
v3.2.11
- Created almost 4 years ago
- Updated over 1 year ago
- Score: 3 (an indicator of how useful this job may be)
Key Functions
create
, dataValue
Expression
create('trackedEntityInstances', {
orgUnit: 'g8upMTyEZGZ',
trackedEntityType: 'nEenWmSyUEp',
program: 'IpHINAT79UW',
attributes: [
{ attribute: 'zDhUuAYrxNC', value: dataValue('body.Patient_name') },
{ attribute: 'w75KJ2mc4zz', value: dataValue('body.Last_Name_of_Patient') },
],
enrollments: [
{
orgUnit: 'g8upMTyEZGZ',
program: 'IpHINAT79UW',
programState: 'oRySG82BKE6', // active
enrollmentDate: dataValue('body.Date'),
incidentDate: dataValue('body.Date'),
},
],
});