DHIS2 Events
Metadata
- Name: DHIS2 Events
- Adaptor:
@openfn/language-dhis2
- Adaptor Version:
v3.0.4
- Created almost 9 years ago
- Updated 4 months ago
- Score: 0 (an indicator of how useful this job may be)
Key Functions
create
, dataValue
, Math
Expression
create('trackedEntityInstances', {
orgUnit: 'DiszpKrYNg8',
trackedEntityType: 'Zy2SEgA61ys',
attributes: [
{
attribute: 'flGbXLXCrEo', // system case ID
value: Math.random(),
},
],
});
// create('trackedEntityInstances', {
// trackedEntityType: 'nEenWmSyUEp', // a person
// orgUnit: 'g8upMTyEZGZ', // Njandama MCHP
// 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
// },
// ],
// enrollments: [
// {
// orgUnit: 'g8upMTyEZGZ', // Njandama MCHP
// program: 'IpHINAT79UW', // enroll in Child Program
// enrollmentDate: new Date().toISOString().slice(0, 10), // some custom javascript
// incidentDate: state.data.metadata.timeStart.slice(0, 10), // more custom javascript
// },
// ],
// });