Question:
Hi, we are trying to implement the DHIS Reporting Module. We are coming up against an immediate issues that we can’t figure out from the documentation.
When we we try to map the Location codes from DHIS2 as Location attributes in OpenMRS, we get the error:
could not insert: [org.openmrs.LocationAttribute]
We don’t get the error if we create a new location in OpenMRS, suggesting that this is conflict issue with prior existing Location Attributes.
we have done that before without any issues. how are u persisting or managing the location attributes (codes) for each location? in our case we used metadatadeploy module
Currently we are not using a module to manage or persist location attributes (codes) for each location. We are only using the core that OpenMRS provides.
We created a location attribute, name “CODE”. That worked fine.
Then, we created a new location, name “chuti estancia” without a Code. This also worked fine. However, when we added a Code, name “Solola” after saving everything except the Code was saved. We tried again with a different Code name (“Comalapa”) and Description (“location test”). When saving this, everything except the Code was saved again.
Please let us know if this has been a common issue. Thank you.
We tried again and did not work. This is what we did:
We created a location attribute, name “CODE”. That worked fine.
Then, we created a new location, name “tecpan” without a Code. This also worked fine. However, when we added a Code, name “chimaltenango” after saving everything except the Code was saved.
After adding the Code “Chimaltenango” to this location, we saved and returned to view this location. However, the Code “Chimaltenango” was no longer visible.