I am working on prompting the admin to configure the Atlas module when they first start OpenMRS per what I wrote here.
I’m confused because I can’t figure out from AtlasService or AtlasData whether the user has ever configured their atlas pin. I see the method AtlasData.getModuleEnabled() but this only returns true when they have turned on automatic updates. Instead I would like to find a method that returns true after they place their pin, regardless of whether they are sending updates. Does this exist?
(The “workaround” for this is to just change my desired behavior, and keep bugging them to configure the atlas until they turn on automatic updates, or say they want to us to stop asking.)
If it helps, the marker placement is all done on the server side, not locally. A user can go to atlas.openmrs.org and use the same server-side code to create their marker. The local “automatic updates” feature just keeps the any stats (patient, encounter, obs counts & module info) updated once the OpenMRS instance has been linked to a marker.
I don’t think you can turn on automatic updates without having created or linked to a marker…at least, you shouldn’t be able to, since updates can’t happen unless the OpenMRS instance has first been associated with a marker.
Maybe implementing a new function in the Atlas Module sending a request to the Atlas Server to know if the module has already been registered on the Atlas Server can help you ?
It can be a GET to the Altas Server passing the Atlas Module UUID as parameters (we use it to authenticate the Module on the server side).