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

Handle custom Tracked Entity Instance with no Attributes (1.1)

Volker edited this page Apr 24, 2019 · 4 revisions

Overview

The following description contains the setup of a DHIS 2 Tracked Entity Type that contains only the National Identifier as Tracked Entity Attribute.

Defining the National Identifier Tracked Entity Attribute

The following example sets the reference to the Tracked Entity Attribute with the name National Identifier. This Tracked Entity Attribute must have been assigned to the Tracked Entity Type Person.

curl -XPATCH -i -u admin:district -H 'Content-Type: application/merge-patch+json' http://localhost:8081/api/trackedEntities/4203754d-2177-4a44-86aa-2de31ee4c8ee -d '{
  "trackedEntityIdentifierReference": {
    "value": "National identifier",
    "type": "NAME"
  }
}'

Update of Import and Export Transformations

The pre-configured Tracked Entity Rule must use transformation scripts that do nothing. This can simply be achieved by resetting the references to these scripts in the corresponding rules.

curl -XDELETE -i -u admin:district -H 'Content-Type: text/uri-list' http://localhost:8081/api/rules/5f9ebdc9-852e-4c83-87ca-795946aabc35/transformImpScript
curl -XDELETE -i -u admin:district -H 'Content-Type: text/uri-list' http://localhost:8081/api/rules/5f9ebdc9-852e-4c83-87ca-795946aabc35/transformExpScript
Clone this wiki locally