Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Managing Address Templates

Some recommended OpenMRS address templates are provided here;
Please copy past your preferred Address Template to the "Address Template xml" textbox in the /admin/locations/addressTemplate.form

...

controlstrue
languagexml
titleGeneral Address Template

...

This is a feature in OpenMRS 1.9+

It is possible to configure the fields that appear in the UI and their names, the text box sizes as well as the order they appear in. The configuration instructions on this page tell how to do it.

Managing Address Templates

To get to the address configuration page in OpenMRS you can go to Administration (or System Administration --> Advanced Administration in the Reference Application) --> Manage Address Template.

...

Templates/Examples

Some example OpenMRS address templates are provided here. You can copy a preferred Address Template from this page and paste into the "Manage Address Template" text box. Feel free to customize to your liking as seen in the screenshot above.

Customizing Templates

You can also build your own templates.

First according to your need, select some address attribute from the table below,

Attribute type

XML Snippet

address1

<property name="address1" value="Location.address1"/>

address2

<property name="address2" value="Location.address2"/>

address3

<property name="address3" value="Location.neighborhood"/>

address4

<property name="address4" value="Location.division"/>

address5

<property name="address5" value="Location.sublocation"/>

address6

<property name="address6" value="Location.location"/>

cityVillage

<property name="cityVillage" value="Location.cityVillage"/>

countyDistrict

<property name="countyDistrict" value="Location.district"/>

stateProvince

<property name="stateProvince" value="Location.stateProvince"/>

country

<property name="country" value="Location.country"/>

latitude

<property name="latitude" value="Location.latitude"/>

longitude

<property name="longitude" value="Location.longitude"/>

postalCode

<property name="postalCode" value="Location.postalCode"/>

startDate

<property name="startDate" value="PersonAddress.startDate"/>

endDate

<property name="endDate" value="personAddress.endDate"/>

Add these attributes XML in the following format,

Code Block
languagexml
<nameMappings class="properties">
            <property name="postalCode" value="Location.postalCode"/>
            <property name="longitude" value="Location.longitude"/>
	    ... others
   	</nameMappings>

Now define the character size for each of the attribute you selected. This is the visible width, in characters, of the input element.
name = Attribute name
value = Number of characters
E.g.

Code Block
languagexml
<sizeMappings class="properties">
            <property name="postalCode" value="10"/>
            <property name="longitude" value="10"/>
	    ... others
	</sizeMappings>

Next, design the layout for your Address Template.
This defines the relative positions of the address attributes to one another

E.g.

Code Block
languagexml
<lineByLineFormat>
            <string>address1</string>
            <string>address2</string>
            <string>cityVillage stateProvince country postalCode</string>
            <string>latitude longitude</string>
            <string>startDate endDate</string>
	</lineByLineFormat>

(Optional) You can add default values to the attributes as below,
E.g.

Code Block
languagexml
<elementDefaults class="properties">
            <property name="country" value="Kenya"/>
            ...
        </elementDefaults>

(Optional) You can define which fields are required (since Platform 2.0)

Code Block
languagexml
<requiredElements>
            <string>address1</string>
            ...
        </requiredElements>

(Optional) You can define regular expressions to validate input, and also help the user by giving input suggestions

E.g.
  Regular expressions for validation;

Code Block
languagexml
<elementRegex class="properties">
            <property name="longitude" value="^(\d{1,3}\s)\d\d\.(\d{2,3})\s*$"/>
            <property name="latitude" value="^(\d{1,3}\\s)\d\d\.(\d{2,3})\s*$"/>
            ...
        </elementRegex>

Input suggestions;  These can be used to display an example format that an element should look like.

Code Block
languagexml
<elementRegexFormats class="properties">
            <property name="longitude" value="123 45.000"/>
            <property name="latitude" value="123 45.000"/>
            ...
        </elementRegexFormats>

Finally bundle all the above XMLs as shown below,

Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
            <nameMappings class="properties">
                <property name="postalCode" value="Location.postalCode"/>
	        ...
            </nameMappings>
            <sizeMappings class="properties">
                <property name="postalCode" value="10"/>
                ...
            </sizeMappings>
            <lineByLineFormat>
                <string>address1</string>
                <string>address2</string>
                ...
            </lineByLineFormat>
            ...
            ...
        </org.openmrs.layout.web.address.AddressTemplate>

For further clarification please go through the samples below,

Anchor
General
General

General Address Template
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
        <nameMappings class="properties">
            <property name="postalCode" value="Location.postalCode"/>
            <property name="longitude" value="Location.longitude"/>
            <property name="address2" value="Location.address2"/>
            <property name="address1" value="Location.address1"/>
            <property name="startDate" value="PersonAddress.startDate"/>
            <property name="country" value="Location.country"/>
            <property name="endDate" value="personAddress.endDate"/>
            <property name="stateProvince" value="Location.stateProvince"/>
            <property name="latitude" value="Location.latitude"/>
            <property name="cityVillage" value="Location.cityVillage"/>
        </nameMappings>
        <sizeMappings class="properties">
            <property name="postalCode" value="10"/>
            <property name="longitude" value="10"/>
            <property name="address2" value="40"/>
            <property name="address1" value="40"/>
            <property name="startDate" value="10"/>
            <property name="country" value="10"/>
            <property name="endDate" value="10"/>
            <property name="stateProvince" value="10"/>
            <property name="latitude" value="10"/>
            <property name="cityVillage" value="10"/>
        </sizeMappings>
        <lineByLineFormat>
            <string>address1</string>
            <string>address2</string>
            <string>cityVillage stateProvince country postalCode</string>
            <string>latitude longitude</string>
            <string>startDate endDate</string>
        </lineByLineFormat>
    </org.openmrs.layout.web.address.AddressTemplate>

Anchor
Kenya
Kenya

Address Template for Kenya
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
        <nameMappings class="properties">
            <property name="postalCode" value="Location.postalCode"/>
            <property name="longitude" value="Location.longitude"/>
            <property name="address3" value="Location.estateNearestCentre"/>
            <property name="address2" value="Location.sectionHomestead"/>
            <property name="address1" value="Location.address1"/>
            <property name="country" value="Location.country"/>
            <property name="stateProvince" value="Location.province"/>
            <property name="latitude" value="Location.latitude"/>
            <property name="address6" value="Location.location"/>
            <property name="address5" value="Location.sublocation"/>
            <property name="cityVillage" value="Location.townVillage"/>
            <displayName>General Address Format</displayName><property name="countyDistrict" value="Location.district"/>
             <codeName>general</codeName><property name="address4" value="Location.division"/>
        <country></country></nameMappings>
        <sizeMappings class="properties">
            <property   <nameMappings classname="postalCode" value="properties6"/>
            <property name="postalCodelongitude" value="Location.postalCode10"/>
            <property name="longitudeaddress3" value="Location.longitude24"/>
            <property name="address2" value="Location.address255"/>
            <property name="address1" value="Location.address155"/>
            <property name="startDatecountry" value="PersonAddress.startDate10"/>
            <property name="countrytownshipDivision" value="Location.country24"/>
            <property name="endDatestateProvince" value="personAddress.endDate24"/>
            <property name="stateProvincesubregion" value="Location.stateProvince24"/>
            <property name="latitude" value="Location.latitude10"/>
            <property name="cityVillageregion" value="Location.cityVillage24"/>
        </nameMappings>    <property     <sizeMappings classname="cityVillage" value="properties24"/>
            <property name="postalCodecountyDistrict" value="1024"/>
        </sizeMappings>
   <property name="longitude" value="10"/     <elementDefaults class="properties">
            <property name="address2country" value="40Kenya"/>
        </elementDefaults>
   <property name="address1" value="40"/     <elementRegex class="properties">
            <property name="startDate" value="10"longitude" value="^(\\d{1,3}\\s)\\d\\d.(\\d{2,3})\\s*$"/>
            <property name="countrylatitude" value="10^(\\d{1,3}\\s)\\d\\d.(\\d{2,3})\\s*$"/>
            <property name="endDate" value="10"/></elementRegex>
            <property name="stateProvince" value<elementRegexFormats class="10properties"/>
            <property name="latitudelongitude" value="10123 45.000"/>
            <property name="cityVillagelatitude" value="10123 45.000"/>
        </sizeMappings>elementRegexFormats>
        <lineByLineFormat>
            <string>address1</string>
            <string>address2</string>
            <string>cityVillage stateProvince country postalCode<<string>address3 cityVillage</string>
            <string>latitude<string>address5 longitude<address6</string>
            <string>startDate<string>address4 endDate<countyDistrict</string>
        </lineByLineFormat>    <string>stateProvince postalCode</string>
           </addressTemplate>

...

Code Block
controlstrue
languagexml
titleAddress Template for Kenya
    <addressTemplate> <string>latitude longitude</string>
          <displayName>Kenyan Address Format</displayName><string>country</string>
        </lineByLineFormat>
    <codeName>ka</codeName></org.openmrs.layout.web.address.AddressTemplate>

Anchor
Lesotho
Lesotho

Address Template for Lesotho
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
        <nameMappings class="properties">
    <country>Kenya</country>        <property <nameMappings classname="countyDistrict" value="propertiesLocation.district"/>
            <property name="postalCodecityVillage" value="Location.postalCodevillage"/>
        </nameMappings>
      <property name="longitude" value="Location.longitude"/  <sizeMappings class="properties">
            <property name="address3countyDistrict" value="Location.estateNearestCentre40"/>
            <property name="address2cityVillage" value="Location.sectionHomestead40"/>
        </sizeMappings>
   <property name="address1" value="Location.address1"/     <elementDefaults class="properties">
            <property name="country" value="Location.country"/>="Lesotho"/>
        </elementDefaults>
        <lineByLineFormat>
       <property  name="stateProvince" value="Location.province"/>  <string>countyDistrict</string>
          <property name="latitude" value="Location.latitude"/> <string>cityVillage</string>
        </lineByLineFormat>
   <property name="address6" value="Location.location"/> </org.openmrs.layout.web.address.AddressTemplate>

Anchor
Malawi
Malawi

Address Template for Malawi
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
            <property name="address5" value="Location.sublocation"/<nameMappings class="properties">
            <property name="cityVillageaddress3" value="Location.townVillageneighborhood"/>
            <property name="countyDistrictstateProvince" value="Location.district"/>
            <property name="address4" value="Location.division"/>
        </nameMappings>
        <sizeMappings class="properties"address1" value="Location.address1"/>
            <property name="postalCodecountyDistrict" value="6Location.traditionalAuthority"/>
            <property name="longitudecityVillage" value="10Location.village"/>
        </nameMappings>
      <property name="address3" value  <sizeMappings class="24properties"/>
            <property name="address2address3" value="5520"/>
            <property name="address1stateProvince" value="5520"/>
            <property name="countryaddress1" value="1040"/>
            <property name="townshipDivisioncountyDistrict" value="2420"/>
            <property name="stateProvincecityVillage" value="2420"/>
        </sizeMappings>
   <property name="subregion" value="24"/     <elementDefaults class="properties">
            <property name="latitudecountry" value="10Malawi"/>
        </elementDefaults>
    <property name="region" value="24"/>  <lineByLineFormat>
          <property name="cityVillage" value="24"/> <string>address1</string>
            <string>address3</string>
 <property name="countyDistrict" value="24"/>         </sizeMappings><string>cityVillage</string>
            <string>countyDistrict</string>
<elementDefaults class="properties">           <string>stateProvince</string>
 <property name="country" value="Kenya"/>      </lineByLineFormat>
    </elementDefaults>org.openmrs.layout.web.address.AddressTemplate>

Anchor
Rwanda
Rwanda

Address Template for Rwanda
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
        <elementRegex<nameMappings class="properties">
            <property name="longitude" value="^(\\d{1,3}\\s)\\d\\d.(\\d{2,3})\\s*$address3" value="Location.cell"/>
            <property name="latitudestateProvince" value="^(\\d{1,3}\\s)\\d\\d.(\\d{2,3})\\s*$Location.province"/>
        </elementRegex>    <property     <elementRegexFormats class="properties"name="address1" value="Location.rwandanNeighborhood"/>
            <property name="longitudecountyDistrict" value="123 45Location.000district"/>
            <property name="latitudecityVillage" value="123 45Location.000sector"/>
        </elementRegexFormats>nameMappings>
        <lineByLineFormat><sizeMappings class="properties">
             <string>address1</string><property name="address3" value="40"/>
            <string>address2</string>
 <property name="stateProvince" value="40"/>
          <string>address3 cityVillage</string> <property name="address1" value="40"/>
         <string>address5 address6</string>  <property name="countyDistrict" value="40"/>
        <string>address4 countyDistrict</string>   <property name="cityVillage" value="40"/>
       <string>stateProvince postalCode<</string>sizeMappings>
        <elementDefaults class="properties">
  <string>latitude longitude</string>         <property    <string>country</string>name="country" value="Rwanda"/>
        </lineByLineFormat>elementDefaults>
        </addressTemplate>

...

Code Block
controlstrue
languagexml
titleAddress Template for Lesotho
<lineByLineFormat>
     <addressTemplate>       <string>stateProvince</string>
 <displayName>Lesotho Address Format</displayName>         <codeName>ls</codeName><string>countyDistrict</string>
            <country>Lesotho<<string>cityVillage</country>string>
        <nameMappings class="properties">   <string>address3</string>
         <property  name="countyDistrict" value="Location.district"/> <string>address1</string>
        </lineByLineFormat>
   <property name="cityVillage" value="Location.village"/> </org.openmrs.layout.web.address.AddressTemplate>

Anchor
Spain
Spain

Address Template for Spain
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
        </nameMappings>
        <sizeMappings <nameMappings class="properties">
            <property name="countyDistrictaddress2" value="40Location.address2"/>
            <property name="cityVillagestateProvince" value="40"/>
        </sizeMappings>
        <elementDefaults class="properties"Location.stateProvince"/>
            <property name="countryaddress1" value="LesothoLocation.address1"/>
        </elementDefaults>    <property name="longitude" value="Location.longitude"/>
  <lineByLineFormat>          <property   <string>countyDistrict</string>name="postalCode" value="Location.postalCode"/>
            <string>cityVillage</string>
        </lineByLineFormat>
    </addressTemplate>

...

Code Block
controlstrue
languagexml
titleAddress Template for Malawi
<property name="cityVillage" value="Location.cityVillage"/>
   <addressTemplate>         <displayName>Malawi Address Format</displayName><property name="country" value="Location.country"/>
             <codeName>mw</codeName><property name="latitude" value="Location.latitude"/>
        <country>Malawi<</country>nameMappings>
        <nameMappings<sizeMappings class="properties">
            <property name="address3address2" value="Location.neighborhood40"/>
            <property name="stateProvince" value="Location.district10"/>
            <property name="address1" value="Location.address140"/>
            <property name="countyDistrictlongitude" value="Location.traditionalAuthority10"/>
            <property name="cityVillagepostalCode" value="Location.village10"/>
        </nameMappings>    <property     <sizeMappings classname="cityVillage" value="properties10"/>
            <property name="address3country" value="2010"/>
            <property name="stateProvincelatitude" value="2010"/>
        </sizeMappings>
   <property  name="address1" value="40"/>  <lineByLineFormat>
          <property name="countyDistrict" value="20"/> <string>address1</string>
            <property name="cityVillage" value="20"/><string>address2</string>
          </sizeMappings>  <string>cityVillage stateProvince country postalCode</string>
   <elementDefaults class="properties">         <string>latitude longitude</string>
      <property name="country" value="Malawi"/> </lineByLineFormat>
     </org.openmrs.layout.web.address.AddressTemplate>

Anchor
Tanzania
Tanzania

Address Template for Tanzania
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
  </elementDefaults>      <nameMappings class="properties">
 <lineByLineFormat>           <property  <string>address1</string>name="address6" value="Location.region"/>
            <string>address3</string>
 <property name="address5" value="Location.ward"/>
          <string>cityVillage</string>  <property name="countyDistrict" value="Location.district"/>
        <string>countyDistrict</string>    <property         <string>stateProvince</string>name="cityVillage" value="Location.villageStreet"/>
        </lineByLineFormat>nameMappings>
    </addressTemplate>

...

Code Block
controlstrue
languagexml
titleAddress Template for Rwanda
    <addressTemplate>
<sizeMappings class="properties">
       <displayName>Rwandan Address Format</displayName>   <property      <codeName>rw</codeName>name="address6" value="14"/>
        <country>Rwanda</country>    <property     <nameMappings classname="address5" value="properties22"/>
            <property name="address3countyDistrict" value="Location.cell17"/>
            <property name="stateProvincecityVillage" value="Location.province50"/>
        </sizeMappings>
        <lineByLineFormat>
   <property name="address1" value="Location.rwandanNeighborhood"/>         <string>cityVillage</string>
            <string>address5</string>
        <property name="countyDistrict" value="Location.district"/>    <string>countyDistrict</string>
            <string>address6</string>
  <property name="cityVillage" value="Location.sector"/>    </lineByLineFormat>
    </nameMappings>org.openmrs.layout.web.address.AddressTemplate>

Anchor
USA
USA

Address Template for USA
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
        <sizeMappings<nameMappings class="properties">
            <property name="address3address2" value="40Location.address2"/>
            <property name="stateProvince" value="40Location.state"/>
            <property name="address1" value="40Location.address1"/>
            <property name="countyDistrictpostalCode" value="40"Location.zipCode"/>
            <property name="cityVillage" value="40Location.city"/>
        </sizeMappings>nameMappings>
        <elementDefaults<sizeMappings class="properties">
            <property name="countryaddress2" value="Rwanda50"/>
        </elementDefaults>    <property name="stateProvince" value="2"/>
  <lineByLineFormat>          <property   <string>stateProvince</string>name="address1" value="50"/>
            <string>countyDistrict</string>
 <property name="postalCode" value="10"/>
          <string>cityVillage</string>  <property name="cityVillage" value="20"/>
        <string>address3</string>  </sizeMappings>
        <elementDefaults  <string>address1</string>class="properties">
         </lineByLineFormat>   <property  </addressTemplate>

...

Code Block
controlstrue
languagexml
titleAddress Template for Spain
name="country" value="USA"/>
   <addressTemplate>     </elementDefaults>
   <displayName>Formato de Direcciones en Espana</displayName> <lineByLineFormat>
       <codeName>spain</codeName>     <string>address1</string>
   <country>Spain</country>         <nameMappings class="properties"><string>address2</string>
            <property name="address2" value="Location.address2"/><string>cityVillage stateProvince postalCode</string>
        </lineByLineFormat>
   <property name="stateProvince" value="Location.stateProvince"/>
   </org.openmrs.layout.web.address.AddressTemplate>

Anchor
Chile
Chile

Address Template for Chile
Code Block
languagehtml/xml
<org.openmrs.layout.web.address.AddressTemplate>
        <nameMappings <property nameclass="address1" value="Location.address1"/properties">
            <property name="longitudeaddress3" value="Location.longitudeaddress3"/>
            <property name="postalCodeaddress2" value="Location.postalCodeaddress2"/>
            <property name="cityVillagestateProvince" value="Location.cityVillagestate"/>
            <property name="countryaddress1" value="Location.countryaddress1"/>
            <property name="latitudepostalCode" value="Location.latitudezipCode"/>
        </nameMappings>         <sizeMappings class="properties">
            <property name="address2cityVillage" value="40"/>
            Location.city"/>
			<property name="stateProvincecountyDistrict" value="10Location.district"/>
	 	</nameMappings>
        <sizeMappings   <property nameclass="address1" value="40"/properties">
            <property name="longitudeaddress3" value="10"/>
            <property name="postalCodeaddress2" value="10"/>
            <property name="cityVillagestateProvince" value="102"/>
            <property name="countryaddress1" value="1050"/>
            <property name="latitudepostalCode" value="10"/>
        </sizeMappings>
        <lineByLineFormat>
            <string>address1</string>      <property name="cityVillage" value="20"/>
    <string>address2</string>        <property name="countyDistrict" value="20"/>
  <string>cityVillage stateProvince country postalCode</string>   </sizeMappings>
         <string>latitude longitude</string><elementDefaults class="properties">
         </lineByLineFormat>   <property  </addressTemplate>

...

Code Block
controlstrue
languagexml
titleAddress Template for Tanzania
    <addressTemplate>name="country" value="Chile"/>
        </elementDefaults>
        <lineByLineFormat>
<displayName>Tanzanian Address Format</displayName>
   			<string>address1 address2 address3</string>
			<string>cityVillage countyDistrict stateProvince country postalCode</string>
    <codeName>tz</codeName>    </lineByLineFormat>
    <country>Tanzania</country></org.openmrs.layout.web.address.AddressTemplate>

Anchor
Nepal
Nepal

Address Template for Nepal
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
        <nameMappings class="properties">
    
       <property name="address6address3" value="Location.regionWard Number"/>
  ><!--Ward Number-->
         <property name="address5address4" value="Location.wardTole"/><!--Tole-->
    	        <property name="countyDistrictaddress5" value="Location.districtLandmark"/>
     ><!--Landmarks-->
      <property name="cityVillagestartDate" value="LocationPersonAddress.villageStreetstartDate"/>
        </nameMappings>
        <sizeMappings class="properties">
 
          <property name="address6country" value="14Location.country"/>
            <property name="address5endDate" value="22personAddress.endDate"/>
            <property name="countyDistrict" value="17"/>
    Location.district"/><!--District-->
       <property name="cityVillage" value="50VDC/Municipality"/><!--VDC/Municipality-->
      <property  </sizeMappings>name="stateProvince" value="Zone"/>
    </nameMappings>
   <lineByLineFormat> <sizeMappings class="properties">
      <property name="address3" value="40"/>
 <string>cityVillage</string>     <property name="address4" value="40"/>
	  <property   <string>address5</string>name="address5" value="40"/>
      <property      <string>countyDistrict</string>name="startDate" value="10"/>
      <property      <string>address6</string>name="country" value="10"/>
      <property  </lineByLineFormat>name="endDate" value="10"/>
    </addressTemplate>

...

Code Block
controlstrue
languagexml
titleAddress Template for USA
    <addressTemplate>
   <property name="countyDistrict" value="40"/>
      <displayName>US Address Format</displayName><property name="cityVillage" value="40"/>
      <property  <codeName>us</codeName>name="stateProvince" value="40"/>
    </sizeMappings>
	<elementDefaults class="properties">
 <country>USA</country>     <property    <nameMappings classname="country" value="propertiesNepal"/>
	</elementDefaults>
    <lineByLineFormat>
      <string>stateProvince countyDistrict</string>
	 <property name="address2" value="Location.address2"/>
  <string>cityVillage address3</string>
	  <string>address4 address5</string>
      <string>country</string>
  <property name="stateProvince" value="Location.state"/>
    </lineByLineFormat>
  </org.openmrs.layout.web.address.AddressTemplate>

Anchor
Haiti
Haiti

Address Template for Haiti
Code Block
languagexml
<org.openmrs.layout.web.address.AddressTemplate>
     <nameMappings   <property nameclass="address1" value="Location.address1"/>
   properties">
        <property name="postalCodeaddress2" value="Location.zipCodeRi / Nimewo Kay"/>
            <property name="cityVillageaddress1" value="Location.city"/>
        </nameMappings>
        <sizeMappings class="properties">
   Lokalite"/>
        <property name="address2country" value="50Peyi"/>
            <property name="stateProvince" value="2Depatman"/>
       <property name="cityVillage" value="Komin"/>
       <property name="address1countyDistrict" value="50Seksyon Riral"/>
     </nameMappings>
     <sizeMappings class="properties">
       <property name="postalCodeaddress2" value="1040"/>
            <property name="cityVillageaddress1" value="2040"/>
       <property  </sizeMappings>name="country" value="40"/>
       <property <elementDefaults classname="stateProvince" value="properties40"/>
       <property name="cityVillage" value="40"/>
       <property name="countrycountyDistrict" value="USA40"/>
  
     </elementDefaults>sizeMappings>
     <lineByLineFormat>
  <lineByLineFormat>     <string>country</string>
       <string>address1<<string>stateProvince</string>
       <string>cityVillage</string>
    <string>address2<   <string>countyDistrict</string>
       <string>address1</string>
     <string>cityVillage stateProvince postalCode<<string>address2</string>
        </lineByLineFormat>
   
</addressTemplate>org.openmrs.layout.web.address.AddressTemplate>

Snippet