Changing the UI

I’ve successfully loaded the SDK version of OpenMRS, and are now currently trying to configure it to best fit our organisation. I’ve started working my way through the administration panel however it doesn’t seem to be working or having any effect on the reference application 2.6.

For example I access the Manage Address Template area ( Admin>Manage Address Template ) and tried to delete the “country” field from the template. So that it now looks like this

<org..layout.address.AddressTemplate>
    <nameMappings class="properties">
      <property name="postalCode" value="Location.postalCode"/>
      <property name="address2" value="Location.address2"/>
      <property name="address1" value="Location.address1"/>
      <property name="stateProvince" value="Location.stateProvince"/>
      <property name="cityVillage" value="Location.cityVillage"/>
    </nameMappings>
    <sizeMappings class="properties">
      <property name="postalCode" value="10"/>
      <property name="address2" value="40"/>
      <property name="address1" value="40"/>
      <property name="stateProvince" value="10"/>
      <property name="cityVillage" value="10"/>
    </sizeMappings>
    <lineByLineFormat>
      <string>address1</string>
      <string>address2</string>
      <string>cityVillage stateProvince postalCode</string>
    </lineByLineFormat>
  </org.openmrs.layout.address.AddressTemplate>
<

However when I try and register a patient the country field is still showing.

Any help would be great

regards

Oliver

Sorry mate - I’m quite sure what you are trying to achieve but maybe the following documentation with regards to a custom Registration app might help https://wiki.openmrs.org/display/docs/Registration+App+Configuration

I believe that address template global property is used by the legacy UI and not the registration app in the reference application.

Ok thanks I will keek looking

Are you sure this is correct @wyclif? I thought that address template was part of the openmrs-core API, and I would expect that the registrationapp module respects it.

@oliverv one thing to check is that in Platform 2.0 we moved some of the underlying java code (from web to api I think) and it’s possible that the package name you need differs from what’s in the documentation. Can you give the full package name you’re currently using here? <org..layout.address.AddressTemplate>

Hi Everyone,

We ran into a similar problem in iSantePlus. The address template is loaded everytime OpenMRS is started through the ReferenceDemoData module activator. I suggest removing the referencedemodata module from your modules director. However, this module also loads in two important things that you may want loaded:

  1. Creates the Scheduler user and saves the global properties
  2. Makes the default admin account a provider so you can create encounters as a super user

We just adjusted our module activator in the iSantePlus module to perform these tasks so we could remove the dependency on reference demo data.

Craig

Yes the address template is part of core and what am saying is that I don’t think we respect it in the RA but the legacy UI does.

This line of code makes me think that AddressTemplates are supported in the reference application (and the registrationapp module): https://github.com/openmrs/openmrs-module-registrationapp/blob/d2f3bc2f11a55542a8a5a0b5e0a612955199aa2a/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/RegisterPatientPageController.java#L53

@craigappl, it’s actually bad practice to have a scheduler user, especially if you are going to publish the password in github!

I thought that modern OpenMRS modules no longer require this user. Do you know what functionality is depending on it for you?

@darius is correct–registration app does support Address Templates.

Nice to know that, I guess I missed the change when that got added.