Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Releases: OpenFn/language-dhis2

v2.0.10

15 Sep 15:52
Compare
Choose a tag to compare

c6ce718 patch version bump
634e1aa update docs for valByName

v2.0.8

04 Aug 12:33
Compare
Choose a tag to compare

e7ae0b6 patch version bump
c783d62 update package-lock for new common

v2.0.7

04 Aug 12:30
Compare
Choose a tag to compare

298efdc patch version bump
e5c754b update common, use 'fn'

v2.0.6

18 Jun 10:12
Compare
Choose a tag to compare

e54474e patch version bump
bdde425 package.json fixes'
3ac0c1d Cleaned up logging
04eabaa slight log changes
0d3be9b update package.json for npm'
983f507 Merge pull request #37 from OpenFn/dependabot/npm_and_yarn/lodash-4.17.21
7f4f24e Bump lodash from 4.17.19 to 4.17.21
7ee8a86 abstract demo server versions

Color-free logs

22 Mar 13:44
Compare
Choose a tag to compare

Standard, though less colorful, log output for a better UI in AceEditor.

Using expandReferences from new common

19 Mar 11:07
Compare
Choose a tag to compare
v2.0.3

update name and version for npm

Better inline docs for new functions

09 Mar 10:44
Compare
Choose a tag to compare
v2.0.1

new version for helper docs

Broader API coverage

14 Jan 16:09
Compare
Choose a tag to compare

Version 2 sunsets the limited and specific operations from v1.4.0 and introduces a much broader selection of operations, prividing both specificity with high-use API endpoints and more generic functions to describe and understand the dhis2 api. Full docs at https://openfn.github.io/language-dhis2/

Upsert tracked entity instances

08 Dec 13:54
Compare
Choose a tag to compare

Currently, DHIS2 doesn't support upserts on tracked entity instances but many organizations need to either add or update TEIs based on an external ID. With this new upserTEI function, @chaiwa-berian wrapped up several different DHIS2 apis to build an upsert: first checking if the entity exists with a unique attribute and a get request, and then either creating or updating the TEI.

N.B., DHIS2 also doesn't support patch for updates on tracked entity instances, but we don't want to destroy existing attributes if information from an external system is incomplete, so we've defaulted the behaviour to merge the new data with existing data, unless { replace: true } is set in the optional options argument in upsertTEI(uuid, data, options);

upsertTEI using strategy=CREATE_AND_UPDATE

30 Oct 06:57
Compare
Choose a tag to compare

New helper function:

/**
 * Create or update one or many new Tracked Entity Instances
 * @public
 * @example
 * upsertTEI(data)
 * @constructor
 * @param {object} data - Payload data for new/updated tracked entity instance(s)
 * @returns {Operation}
 */