Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-892

Add an endpoint to expose the AddressTemplate via REST

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • 2.37.0
    • 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

       

       

      Gliffy Diagrams

        Attachments

          Activity

            People

              dkayiwa Daniel Kayiwa
              ibacher Ian Bacher
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: