Saltar al contenido principal
Esta página no tiene versión en español, así que te la mostramos en inglés.

Create TEI (dhis2)

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

Metadata​

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'),
},
],
});