Step 13: Internationalization of Addresses and Phone Numbers for Practitioner, Provider and Business entities
Practitioner, Provider and Business entities have been enhanced to support country and format selection for addresses along with country specific phone number formats. The Universal Postal Union is be used as source of truth for address formats. Out of the box support is provided for USA, France and Brazil address formats.
Examples from Business entity locations:
- Example 1:
Country: United States of America
Address type: Delivery to PO Box
Country: United States of America
Address type: Rural route
Address type: Community mail box
As shown in the above examples, labels and fields of the address change based on the selected Country and Address type. Below are some important rules used in implementation:
- AddressMain section in Embed-PegaHC-Address class is the container for the full address.
- Country dropdown is populated with instances of PegaHC-Data-Country class.
- Address type dropdown is populated from PegaHC-Data-AddressType filtered by country selected.
- SelectAddressFormat decision table returns the section to be
displayed based on the Country and Address type as shown below:
- This section name is stored in SelectedAddressFormat property and the section is embedded in the AddressMain by property reference.
If you are looking to add support for address formats of a new country that is separate from the out-of-the-box supported list of countries, please follow below steps.
Mandatory steps to add address support for new country in Practitioner, Provider and Business entities:
- Add country information to PegaHC-Data-Country class records.
- Add country specific address types to PegaHC-Data-AddressType class records.
- Add section rules to support each address type of the new country and create any new properties that are not present in the data model.
- Make sure to use AddressLine1/POBoxNumber and Zipcode properties and make
them mandatory in newly created sections as these attributes are used in
populating display name of the address.
(or)Extend DisplayName declare expression to change default address display name behavior in case of business entity creation. Extend SetDisplayName_Ext data transform to change default address display name behavior in case of solo practitioner/provider as contract entity creation.
- Extend decision table SelectAddressFormat to include section to be used for each combination of country code and address type.
Additional customizations (Optional):
- Add logic to format phone number for new country in data transform FormatPhoneNmbrByCountry_Ext.
- Add logic to format fax number for new country in data transform FormatFaxNmbrBycountry_Ext.
- Default country is United States of America. This can be changed by changing the country code in DefaultAddressCountry application setting.
- To disable country selection dropdown, set EditAddressCountry DSS value to false.
- To hide country selection dropdown on UI, set DisplayAddressCountry DSS value to false.
- To disable validation and formatting of phone numbers, set ValidateAndFormatPhone value to false. To disable validation and formatting of fax numbers, set ValidateAndFormatFax value to false.
Previous topic Step 12: Managing member PII data masking Next topic Step 14: Member keyring