Hi Support,
So, I have a form like the attached image:
In my events object I have something like:
`“events”: [
{
“program”:program,
“orgUnit”:organisation_unit,
“eventDate”:“2024-03-31”,
“status”:status,
“storedBy”:“Sakhile”,
“programStage”:program_stage,
“dataValues”: [
{
{"dataElement": "UAM5t0BxTss", "value": completed_social_assets_10_14, }, { "dataElement": "e5fbIqTOPas", "value": social_assets_10_14_started, }, { "dataElement": "SRbhxVprbtD", "value": social_asset_10_14_completion_date, }, { "dataElement": "SFKVWLrUZhg", "value": completed_social_assets_15_19, }, { "dataElement": "wWDHoDYaGRR", "value": social_assets_15_19_started, }, { "dataElement": "IQVewpHNyYS", "value": social_assets_15_19_completion_date, }, { "dataElement": "nxVLtHPAlwt", "value": completed_hiv_violence_prevention_10_14, }, { "dataElement": "CiCcBB9LP4N", "value": hiv_violence_prevention_10_14_started, }, { "dataElement": "dUrapxKeEoG", "value": hiv_violence_prevention_10_14_completion_date, }, { "dataElement": "OGFW9TkjI6b", "value": completed_hiv_violence_prevention_15_19, }, { "dataElement": "PMJdXlVHiop", "value": hiv_violence_prevention_15_19_started, }, { "dataElement": "nia2vPpqSZR", "value": hiv_violence_prevention_15_19_completion_date, }, { "dataElement": "rJNIWkWfw2f", "value": completed_hiv_violence_prevention_20_29, }, { "dataElement": "uvyfVmncrFk", "value": hiv_violence_prevention_20_29_started, }, { "dataElement": "XVjRLRFxJbg", "value": hiv_violence_prevention_20_29_completion_date, }, } ] }, ] } ]`
In this code a programstage will not be created until I remove any data element that has to do with HIV Violence Prevention such that Social Asset Building is left alone. As in attached image these fields are divided into different sections, but I can’t find code in the DHIS2 documentation related to how to insert these values in form sections using the tracker api. Iam using DHIS2 version 2.39.3.1