Hi all,
I’m trying to register an event in the Dhis2 program from Angular. This is the form I send it but I always get a “message”: “Import was successful.”, but nothing is created in Dhis2. Any idea what is missing?
Thanks in advance.
const eventoData1 = {
"program": "RWGqus8n2x3",
"trackedEntityInstance": id,
"trackedEntityType": "Jch8VTnxDSU",
"orgUnit": "C7UVYRGE2d1",
"programStage": "MxxHo6ujEZB",
"eventDate": "2023-11-18",
“storedBy”: “admin”,
"events": [
{
"orgUnit": "C7UVYRGE2d1",
"status": "COMPLETED",
"dataValues": [
{ "dataElement": "UvMje2XrsYw", "value": new Date(this.registroForm.get('fechaToma')?.value) },
{ "dataElement": "ygC1kbHF8zW", "value": Number(this.registroForm.get('sistolica')?.value) },
{ "dataElement": "lR5x7vkSpwN", "value": Number(this.registroForm.get('diastolica')?.value) }
]
}
]
};
PD: the id of the trackedEntityInstance corresponds to the patient I want to create the event for.