I have asked a lot of questions here and I am grateful for the responses. I now have a local instance of DHIS2 running in a docker container. I have my app setup with app platform and the system is all connected. Please I need some guide with my custom app.
Suppose we have a program where we collect some data every month.
- There are say 180 questions which translate to 180 DE (WHAT) with some dimensions.
- We do this exercise monthly which define the WHEN period
- And it is carried out at the facility level (WHERE)
- We are also referencing WHO collect the data (Dimension)
From what I have gathered so far,
I can use orgunitlevel to filter the organisationunit and get the list of all the facilities. To save this WHERE is it the uid or shortname value that should be saved? In the example I saw in the doc, the shortname was saved but in the datavalue table I saw they have sourceid
About the WHAT part of the data value, I am designing the form for 3 different programs with each having about 200 DE. Some DE has different dimension so I can’t capture every case. But as I am building the form I will follow the guides in the doc and academy videos. But if I run into trouble I will need to ask further question.
In our case, for each program the data we are capturing can be an aggregate data such as number or yes or no value, a string or and array of data. Since all the DE are part of a dataset which will be analyzed together, I supposed we should capture them with the same api and store them in the same database.
a. What best dataset type best describe my scenario (Event or Tracker)
b. In my current application, I have a datavalue table similar to DHIS2. However, we have score and value field. The value field is a json field and I store all the values there whether it’s string, number, array or object but the DHIS2 value field is a string value. That way all data type can be stored there and our analytics use the calculated score value. Since the setting is different with DHIS2, I am thinking of storing calculated score as value in datavalue table and the value entered as value in trackedentityattributevalue. What is the api for trackedentityattributevalue? I will also appreciate if there is suggestion for a better approach. PLEASE NOTE THAT WE WILL NEED TO UPLOAD EXISTING VALUES IN THE DATABASE TO THIS PLATFORM.
Where can I store record of a form with a field that accept one or more image. In our current system, we store the images in a folder in the same directory of the api and store the url to the image in the database. Is that how DHIS2 is configured?