# Data Entry & Capture (+ Custom App)

**URL:** <https://community.dhis2.org/t/data-entry-capture-custom-app/49163>\
**Category:** Implementation - Implémentation\
**Created:** [20 August 2022 04:05 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163 "2022-08-20T04:05:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetisco4u](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jetisco4u/32/39125_2.png) [@jetisco4u](https://community.dhis2.org/u/jetisco4u)\
**Post date:** [20 August 2022 04:05 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/1 "2022-08-20T04:05:10Z")

</div>

Good day everyone,

I need some help configuring DHIS2 for our use case. There are two use cases I am trying to fit into the existing solution but also looking at creating a custom solution for.

1. It seems there are multiple data capturing apps on the platform,  
a. what are they and what are they used for?  
b. How can I get the metadata samples for them that I can install in an empty database.

2. I am trying to capture aggregate data in a form with sections that is not currently available in the data entry form.  
a. If I create a custom form and want to save the data what API should I call to save the form and which database table is the form being saved.  
b. If this form has a data element like one of the existing one in the data entry form but are meant to be used in different context, can I use the same DE in my new form if it has already been used in the data entry form or I need to create a variation?

3. In the second scenario, We are trying to capture data during some activities. The data we are capturing is a combination of aggregate data, multiple choice entry, option questions. The answers are stored as a jsonb value either as an integer, string or an object.  
a. Is there existing method of capturing this type of data?  
b. If I build a custom form, is there existing API and database table that can hold this type of data? If there is, what is the API.  
c. On this form, we are also capturing multiple images but saving them along with some other data in another table. Is there an api and database table for storing this type of data?

4. For this type of data capturing, can I get the analytics and charts from the existing dashboard app or I do need to make additional configuration to capture the data in the dashboard app?

5. For data element, for the domainType field, is the options only TRACKER & AGGREGATION?

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [23 August 2022 10:15 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/2 "2022-08-23T10:15:46Z")

</div>

> [@jetisco4u](#):
>
> There are two use cases I am trying to fit into the existing solution but also looking at creating a custom solution for.
> 
> 1. It seems there are multiple data capturing apps on the platform,  
> a. what are they and what are they used for?  
> b. How can I get the metadata samples for them that I can install in an empty database.
> 2. I am trying to capture aggregate data in a form with sections that is not currently available in the data entry form.  
> a. If I create a custom form and want to save the data what API should I call to save the form and which database table is the form being saved.  
> b. If this form has a data element like one of the existing one in the data entry form but are meant to be used in different context, can I use the same DE in my new form if it has already been used in the data entry form or I need to create a variation?

> [@jetisco4u](#):
>
> - For this type of data capturing, can I get the analytics and charts from the existing dashboard app or I do need to make additional configuration to capture the data in the dashboard app?
> - For data element, for the domainType field, is the options only TRACKER & AGGREGATION?

@jetisco4u, it’s great to see all these questions and ideas which I believe you have read quite a lot about DHIS2. Most of these concepts and skills are covered in the DHIS2 Fundamentals courses — including data capture, analysis and customization, which will help you further in understanding the Tracker and Analytics academies as well as the developer workshops.

Please check here to get started: [Introduction to DHIS2 | DHIS2 Online Academy](https://academy.dhis2.org/courses/course-v1:hisp+GEN-D001-en+2022Q1/about)

> [@jetisco4u](#):
>
> In the second scenario, We are trying to capture data during some activities. The data we are capturing is a combination of aggregate data, multiple choice entry, option questions. The answers are stored as a jsonb value either as an integer, string or an object.  
> a. Is there existing method of capturing this type of data?  
> b. If I build a custom form, is there existing API and database table that can hold this type of data? If there is, what is the API.  
> c. On this form, we are also capturing multiple images but saving them along with some other data in another table. Is there an api and database table for storing this type of data?

After completing the fundamentals courses, please check the developer workshops which covers the API topics:

- [DHIS2 Web App Development Academy 2022](https://www.youtube.com/watch?v=PHx7hYWgMDw&list=PLo6Seh-066RzKN1UE_53LLEnhtPmy6zRc)
- [DHIS2 Android App Development Academy 2022](https://www.youtube.com/watch?v=9-3B8VJ7iD8&list=PLo6Seh-066RylaoOVDFYM_I5AZVUFFhoc)

Thanks!

---

<div class="post-metadata">

**Author:** ![jetisco4u](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jetisco4u/32/39125_2.png) [@jetisco4u](https://community.dhis2.org/u/jetisco4u)\
**Post date:** [23 August 2022 13:12 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/3 "2022-08-23T13:12:09Z")

</div>

Thanks @Gassim I have read through a lot of the documentation and the videos before but I am reviewing them. But there is a use case I am curious about. I read/watch that there are two data type aggregate and tracker. I am capturing data that falls between the two. In the existing tool I built before looking into dhis2, there are 5 layers of capturing the data. First we capture data about the users carrying out the exercise (personal info and signature), those they are supervising (personal info and signature), the reports they are capturing (numbers, string, and object values), and an a record of the activity with images of the team.

I looked at the example implementation of the data entry form, capture app and the web tracker app, it doesn’t seems to address this case.

---

<div class="post-metadata">

**Author:** ![rithvik](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/rithvik/32/36330_2.png) [@rithvik](https://community.dhis2.org/u/rithvik)\
**Post date:** [23 August 2022 14:16 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/4 "2022-08-23T14:16:03Z")

</div>

@jetisco4u ,

I can answer a few of your questions.

- We can have aggregate data as a form with sections. Right click on the “dataset” in maintenance and select “manage sections”
- You can also add DEs with option sets in datasets.
- If you want to store any custom info, you can use datastore management. But this wouldn’t be part of analytics.
- You can also use attributes to add additional properties to existing metadata objects.

Thanks,  
Rithvik

---

<div class="post-metadata">

**Author:** ![jetisco4u](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jetisco4u/32/39125_2.png) [@jetisco4u](https://community.dhis2.org/u/jetisco4u)\
**Post date:** [24 August 2022 03:51 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/5 "2022-08-24T03:51:51Z")

</div>

Thanks @Gassim and @rithvik I have gone through all the academy videos and it has helped resolve most of the challenges I am facing. I want to try and use the existing features to bootstrap my solution. But still I will need to develop an app for the program we are currently doing and get it to work on DHIS2. My biggest challenge now is how to use the app platform. Most of the underlying tools use React v16 and other old or deprecated versions of dependencies. If I have to downgrade my existing application to support this lower versions and deprecated dependencies, it will introduce a lot of bugs. I want to try and stick with features of the app platform that support React 18 and won’t break my code. I will also be using the UI as a local library to make them compatible with React 18. Can I use webpack config and say React script to build my app and upload to a dhis2 instance instead of using d2 script?

I am also struggling to locate where I can get the list of type of data values. I want to find out whether its possible to store a json type of data with aggregate or tracker dataset.

---

<div class="post-metadata">

**Author:** ![rithvik](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/rithvik/32/36330_2.png) [@rithvik](https://community.dhis2.org/u/rithvik)\
**Post date:** [24 August 2022 04:41 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/6 "2022-08-24T04:41:16Z")

</div>

Hi @jetisco4u ,

If you want to selectively upgrade the sub dependencies that come with app platform then you can use resolutions.

> **[Yarn](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/)**
>
> Fast, reliable, and secure dependency management.

I have found a resource that can help you if you choose to package the application on your own.  
[https://docs.dhis2.org/archive/en/2.31/developer/html/apps\_creating\_apps.html](https://docs.dhis2.org/archive/en/2.31/developer/html/apps_creating_apps.html)  
This was the documentation of how to deploy custom apps prior to app platform. Give it a try.

Data types supported by data elements: [Metadata - DHIS2 Documentation](https://docs.dhis2.org/en/use/user-guides/dhis-core-version-master/configuring-the-system/metadata.html#create_data_element)

Thanks,  
Rithvik

---

<div class="post-metadata">

**Author:** ![jetisco4u](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jetisco4u/32/39125_2.png) [@jetisco4u](https://community.dhis2.org/u/jetisco4u)\
**Post date:** [24 August 2022 04:59 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/7 "2022-08-24T04:59:05Z")

</div>

@rithvik thanks for pointing to this resources. I saw from the data types that json is not supported. In one of our existing app we are trying to merge into dhis2, we capture signature of user during an event and store it as a json value in the database with other data values. Since this field/form data is not expected to be used for analytics, is there other solution that we can use to store the data with json type along with other record?

---

<div class="post-metadata">

**Author:** ![rithvik](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/rithvik/32/36330_2.png) [@rithvik](https://community.dhis2.org/u/rithvik)\
**Post date:** [24 August 2022 05:33 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/8 "2022-08-24T05:33:51Z")

</div>

Hi @jetisco4u ,

Yes, you can explore [Data Store - DHIS2 Documentation](https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-238/data-store.html) . You can store app specific data as json here. This wouldn’t be part of analytics.

Thanks,  
Rithvik

---

<div class="post-metadata">

**Author:** ![jetisco4u](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jetisco4u/32/39125_2.png) [@jetisco4u](https://community.dhis2.org/u/jetisco4u)\
**Post date:** [29 August 2022 13:16 UTC](https://community.dhis2.org/t/data-entry-capture-custom-app/49163/9 "2022-08-29T13:16:22Z")

</div>

Thanks @rithvik after careful review of the features I have realized that the platform alone cannot address my use case. I will run a parallel node rest api to address this issues.
