if I understand your question, you want to know if you can perform the following actions using DHIS2:
- Download the definition of a form (For example a data set)
- Use the definition to render the form on a client (For example Android)
- Perform data entry offline using this form
- Upload data from the offline data entry when the client reconnects to the internet
If these are the things you are asking about, the answer is yes, it is possible. This is a very common use-case for DHIS2 clients, since they are often using in areas with poor or no internet connection.
In DHIS2 there will be 3 main types of form definitions you may work with:
1. Metadata (Any metadata, used to define the other forms)
2. Aggregate data (Data entry using data elements and data sets)
3. Tracker data (Data entry using the tracker models: Tracked entities, enrolments and events)
Depending on which types of forms you want to work with, their definition is found in different places.
Information about metadata can be found here:
../api/schemas
Information about data sets, data elements, etc. (Check docs for other relevant endpoints):
../api/dataSets
../api/dataSets/<uid>
../api/dataElements/<uid>
Using these endpoints should be sufficient to gather all definitions you need to recreate any data entry form for a given data set.
When you have collected data offline and want to end it back to DHIS2, you can use the following endpoint to POST your data:
../api/dataValueSets
This should give you the main steps to solve your problem, but for more in-depth descriptions of the api or data models, you should have a look at the docs:
Developer documentation