Skip to main content

Create TEI (dhis2)

This job was provided by an OpenFn.org user via the job library API.

Metadata

  • Name: Create TEI (dhis2)
  • Adaptor: @openfn/language-dhis2
  • Adaptor Version: v3.2.11
  • Created about 5 years ago
  • Updated almost 3 years 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'),
},
],
});