DHIS2 Data Element Value Type Coordinate

Dear Experts,
I hope this email finds you well, Please let us know how will coordinate be entered in data element value.

With Best Regards
Mohammad Ayub Yousafzai
Kabul, Afghanistan

Dear @mohammadayub864

you can find the coordinate type format in the following link of DHIS2 document

Hope it works

1 Like

Dear @Haliz.t ,

Thank you, I first studied the document but not accepting the value. I create two data elements with aggregate and select value type coordinate type the below values give error not accepting.

Mohammad Ayub Yousafzai
Kabul , Afghanistan

Dear Mohammad,
The different value types is not always easy to understand.
Generally coordinates are entered under Organisational Units and not under Data Elements. I am not sure if I know a use case where coordinates are captured against a data element type, as that does not make sense to me. I am not sure if it can be used as support to mapping if captured against a data element. Can you explain why you need to show it as a data element?

Dear @Norah_Stoops,
Thank you, I have a form which has lat and long. when created column chart easily convert to map and view it as map to pick lat and long from form.
I saw the dhis2 document related to coordinate value type. it is supporting data element with dataset but the lat and long values are accepted.

With best Regards
Mohammad Ayub Yousafzai
Kabul , Afghanistan

Hi @mohammadayub864 ,

Sorry for this. Coordinates can be saved to the database in the form [longitude, latitude] (for example: [108.40338,12.17403]) (note the brackets). Unfortunately, the check is incorrect in the data entry app, so if you do enter the coordinates with the brackets, the app will flag this as invalid and will not allow you to post the value. We have opened a ticket to fix this. Thank you for letting us know about the issues here.

As a workaround, if you feel comfortable entering data via the api, you could use the api/dataValues endpoint to post the data (with brackets) without using the data entry app.