Create data values
📜 This job is an official example from OpenFn.
Metadata​
- Name: Create data values
- Adaptor:
@openfn/language-dhis2
- Adaptor Version:
latest
- Created date unknown
- Updated date unknown
- Score: 100 (an indicator of how useful this job may be)
Key Functions​
create
Expression​
// ----
// Add data to data value sets in DHIS2 using a generic JSON message, submitted
// by Taylor Downs @ OpenFn. Co-authored by @mtuchi
// ---
create('dataValueSets', {
dataSet: 'pBOMPrpg1QX',
completeDate: $.form.date,
period: '201401',
orgUnit: 'DiszpKrYNg8',
dataValues: [
{
dataElement: 'f7n9E0hX8qk',
value: $.form.prop_a,
},
{
dataElement: 'Ix2HsbDMLea',
value: $.form.prop_b,
},
{
dataElement: 'eY5ehpbEsB7',
value: $.form.prop_c,
},
],
});