I have something to show in the map app and also want to store it in a database. For storing in the database, I have to make a data element type of coordinates, and for showing in the map app, I have to set my event program feature to point, like you see it in these snapshots, and for that, I enter the same coordinates twice in data entry. please find me a solution. that how to enter it once and then also store it and see it in map app.
best regrads
Aminulhaq sadat , Kabul , Afghanistan
Hi @Aminulhaq_SADAT !
In the maps-app you can use both the event location (your first screenshot) or the location captured in a data element associated with your event (your second screenshot).
You can find an example of this setup in DHIS 2 Demo - Sierra Leone with the “Malaria case registration” program:
Event location and Household location can hold two different values, here the first one would typically record the place of the registration and the second the place where the patient lives.
Hopefully that makes sense.
Best,
Bruno
Hi Dear Bruno, I see th play.dhis2.org; there they also take the coordinates from the program, not from data entry. What I want to add is coordinates in data entry and show it in map apps.
Hi @Aminulhaq_SADAT,
The “Household location” data element is independent. You should be able to set the program’s “Feature type” to “None” and still find and use the “Household location” coordinate field in both the capture and maps apps.
If this is not the answer you expected, do not hesitate to add details to your use case. There might be some aspects I have not understood.
Bruno
api/events?program=K6G0Gf6Cq5J&fields=dataValues[dataElement,value],geometry
using this api i did it. it gives me coordinates of program in report and show it in map app also now i just enter it once in data entry.
thanks.