Skip to main content

CHW case to DHIS2

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

Metadata

Key Functions

create, dataValue

Expression

create('trackedEntityInstances', {
trackedEntityType: 'nEenWmSyUEp', // a person
orgUnit: 'DiszpKrYNg8',
attributes: [
{
attribute: 'w75KJ2mc4zz', // attribute id for first name
value: dataValue('case.firstName')(state) // data from submission
},
{
attribute: 'zDhUuAYrxNC', // attribute id for last name
value: dataValue('case.lastName')(state) // data from another submission field
}
]
});