Logical code flow before posting data to DHIS2

Am new to interoperability with DHIS2. So am trying to work out a logical code flow before posting data to DHIS2. Writing the code is not a problem. Its just that i want to make sure i am within acceptable limits.

Lets say i have an OrgUnit that i will call X in a third party application and i want to post its end of November 2021 monthly statistical report to DHIS2. Here is what i think the code would look like: -

  1. Fetch the UID of OrgUnit X.
  2. Check if the November 2021 report of the OrgUnit is already submitted to (exists) DHIS2. If it is, show the user the report (if he/she is interested by getting the data values from DHIS2).
  3. If the user chooses to continue and submit the report (i guess a revised version), fetch all the related data elements, values, UIDs of X etc for the dataset from the third party application.
  4. Post the dataset to DHIS2.
  5. Run DHIS2 validation rules for the report submitted.
  6. Mark report complete if it passes the validation rules.
  7. Inform the user: Successful or not

Are there any crucial steps that i might be missing? Please let me know.

1 Like