Details
-
Enhancement
-
Status: Closed
-
Should
-
Resolution: Fixed
-
None
-
None
-
Medium
Description
In the backend, we have a class called AddressTemplate that reads a configuration file and produces a an array of address lines. In the past, we've used the results of AddressTemplate#getLines() to populate at least the labels on the registration form and would like to enable this for 3.x. However, there is currently no REST endpoint that will allow retrieving the AddressTemplate.
So the task for this ticket is to create such an endpoint. The endpoint should support the following properties:
- getLines()
- getDisplayName()
- getCodeName()
- getCountry()
- getElementDefaults()
- getElementRegex()
- getElementRegexFormats()
- getRequiredElements()
- getNameMappings()
- getSizeMappings()
The output should be some kind of reasonable JSON document, e.g.:
{ "lines": [[{/* content goes here */}]], "displayName": "Some Name", /* ... */ "elementDefaults": { "element": "default" } }
Follow up talk discussion https://talk.openmrs.org/t/o3-address-hierarchy-widget-plan/36572/6