Hello,
I have this data element visible on the reports section of CHT as per the screenshot below:
Using both the csv reports export and the API in exporting data the above column is missing from the data export. This is not by coincidence, there are a number of data elements that are visible on reports tab or json on couchdb but missing on excel export.
Is this a bug or am I missing something.
R,
Job
Hi @diana ,
No the data element was present in the initial form, but we have published various versions of the same form which I think might have resulted to this issue.
Thanks, I think its related to the known bug.
Hi @diana,
Apart from the API exports in csv, do we have a script that exports all reports in json. I am sure these data columns will be visible on json file.
If you want all reports, no advanced, then you can just use a standard CouchDB API to query a view directly and extract the json from the response.
You can choose from the pool of views that already exists: cht-core/ddocs/medic-db/medic-client/views at master · medic/cht-core · GitHub , particularly the ones that are named report_<something> that also include some level of filtering. You can check the source code of the view maps to see what kind of results you will get and choose the desired view.