Error when trying to trigger new program rules via API

Hi @Gassim -
Here is an example in the play site. This is following the instructions @rithvik provided here:

  1. Import this metadata. This imports a new data element and two program rules:
    dataElements (19).json (9.6 KB)
  2. Open the Child Program and the Birth Program Stage, and add “test data element” to the Birth program stage. Save the program.
  3. Open tracker capture and an existing event to confirm the program rule is working (example here: DHIS 2 Demo - Sierra Leone)
  4. Now, I’m trying to trigger this rule for previous events, as described in the two links in my first post. Here are those instructions again:
  5. Download this payload. DHIS 2 Demo - Sierra Leone Note this person has no value for the data element we added (GjVkPStfzJB) but the program rule should trigger and change the value to true.
  6. in your downloaded file, change instances to events and save
  7. make the following POST request to import the events.
    https://play.dhis2.org/2.39.3.1/api/tracker?reportMode=FULL&async=false
    with the exported events as payload.
  8. You would expect the program rule to trigger and update the value for the data element we added (GjVkPStfzJB), but it doesn’t/.
1 Like