@chibujax2, the layout formats for names and addresses are configured as part of the implementation process. Specifically the address one is stored as a Global Property (aka Advanced Setting) named layout.address.format, and you can fetch this (in an awkward way) by doing
GET .../systemsetting/layout.address.format
I think you should introduce a new (read-only) REST endpoint that returns the layout in an easily consumable json format. Maybe something like:
GET .../configuration/addresslayout
(@burke, I’m proposing a new convention here. thoughts welcome!)
Thank you @dkayiwa I am happy I read the wiki, I now understand much about the address template. The little confusion is on how to fetch GET .../systemsetting/layout.address.format
mentioned by @darius I will really appreciate if I could get more explanation on how to fetch the configured template in order to render the address properly.
Yes @dkayiwa For some reasons, it refused to run on localhost, but when I ran it online( with module-refs), it worked and returned result. I will pick it up from there, thank you, solved
@chibujax2 very good question and it is the reason why we decided to go for the online swagger docs that are generated on the fly. That way, we do not need a wiki page to keep maintaining and hence run the risk of missing the latest additions, like the one you have just pointed out. https://demo.openmrs.org/openmrs/module/webservices/rest/apiDocs.htm