RegistrationApp with AddressHierarchy Module

1 view
Skip to first unread message

Craig A.

unread,
Mar 10, 2015, 1:04:45 PM3/10/15
to d...@openmrs.org
Hi Everyone,

I'd like to document and test the functionality of using the RegistrationApp with the Address Hierarchy module. The current Reference App has a ContactInfo section that points to a personAddress as so:

"sections":[
           {
                    "id": "contactInfo",
                    "label": "registrationapp.patient.contactInfo.label",
                    "questions": [
                        {
                            "legend": "Person.address",
                            "fields": [
                                {
                                    "type": "personAddress",
                                    "label": "registrationapp.patient.address.question",
                                    "widget": {
                                        "providerName": "uicommons",
                                        "fragmentId": "field/personAddress"
                                    }
                                }
                            ]
                        },
...

How should the fields be structured to activate the personAddressWithHierarchy question type? Does the widget need to change as well?

Thank you,
Craig

Mark Goodrich

unread,
Mar 10, 2015, 1:56:03 PM3/10/15
to d...@openmrs.org
Thanks for offering to test and document!  We use (or, more correctly, are planning to us) the address hierarchy widget within the registration app.  There's no json configuration I can point you to, as we've got a custom app loader that programmatically configures apps.  But you should be able to take a look that that and see what is going on:

(the relevant lines are 810-885)

https://github.com/PIH/openmrs-module-mirebalais/blob/master/api/src/main/java/org/openmrs/module/mirebalais/apploader/CustomAppLoaderFactory.java

Take care,
Mark
--
OpenMRS Developers: http://om.rs/dev
Post: d...@openmrs.org | Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions: http://om.rs/id
 
Visit OpenMRS Talk at http://om.rs/talk for chat and discussions!
To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@openmrs.org.

Craig A.

unread,
Mar 11, 2015, 12:33:41 AM3/11/15
to d...@openmrs.org, mgoo...@pih.org
Thanks Mark,

I went through the commit history and @Darius did a bunch of work on this in December and January in the registrationapp v1.1. The widget is available in the registrationapp and I used the following code to get it to work in the registration app Register Patient page on my dev server:

"questions": [
                        {
                            "legend": "Person.address",
                            "fields": [
                                {
                                    "type": "personAddress",
                                    "label": "registrationapp.patient.address.question",
                                    "widget": {
                                        "providerName": "registrationapp",
                                        "fragmentId": "field/personAddressWithHierarchy"
                                    }
                                }
                            ]
                        }, (etc)

I haven't yet got it to work on the edit contact info page.

Sincerely,
Craig

Mark Goodrich

unread,
Mar 11, 2015, 9:54:02 AM3/11/15
to Craig A., d...@openmrs.org
Cool.

For what it's worth, as far as I know the widget is working for us within the edit contact info page.  Also, if you are running off the bleeding edge registration app, I'm making some changes as to the way the edit demographics and contact info pages are implemented--but I don't think this should change anything about person address.

Take care,
Mark
Reply all
Reply to author
Forward
0 new messages