[OpenVPMS Developers] [JIRA] (OVPMS-1248) Add support to customise address formatting

Message from Tim Anderson (Created) (JIRA) jira@openvpms.org

Add support to customise address formatting -------------------------------------------

Key: OVPMS-1248 URL: https://openvpms.atlassian.net/browse/OVPMS-1248 Project: VPMS Web Application Issue Type: Improvement Components: Archetypes, Reporting Affects Versions: 1.5.1 Reporter: Tim Anderson Assignee: Tony De Keizer

Address formatting is currently performed using the "party:getBillingAddress()" and "party:getCorrespondenceAddress()" and "party:getPracticeAddress()" xpath functions. The billing and correspondence addresses are formatted as multi-line addresses, whereas the practice address is a single line.

These format addresses using the PartyRules.formatAddress() method which is implemented in terms of Australian addressing conventions.

Support is required for: * different country formatting conventions * the ability to specify a format for single and multi-line addresses * the ability to handle missing data. Currently 'null' appears in addresses if postcode or state data is not available * the ability to format billing, practice and correspondence addresses as single or multiple lines

To do this, a new lookup will be created, "lookup.addressFormat". This will have two nodes: * singleLineFormat - the format for single-line addresses * multiLineFormat - the format for multi-line addresses

Each node will be an xpath expression. This will have the following pre-defined variables supplied: * address - e.g "36 Nonesuch St". For single-line addresses, any '\n' will be removed * suburb - e.g. "Sawtell" * postcode - e.g. "3095" * state - e.g. "Victoria"

Any missing data would be supplied as an empty string ("")

These could be used as follows: * singleLineFormat = concat($address, ' ', $suburb, ' ', $postcode, ' ', $state) * multipleLineFormat = concat($address, '\n', $suburb, ' ', $state, ' ', $postcode)

The party.organisationPractice archetype would be amended to have a new node, "addressFormat", defined as: {noformat} /details/addressFormat" type="java.lang.String" minCardinality="0">

{noformat}

The contact.location archetype would be changed to use the billing address for the 'description' node.

The existing xpath functions will also be extended to have single and multiple line versions. E.g. * party:getBillingAddress(., true) - single line address format * party:getBillingAddress(., false) - multi-line address format * party:getBillingAddress(.) - calls party:getBillingAddress(., false)

If the practice has no address format defined, the current format will be used.

-- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://openvpms.atlassian.net/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira

_______________________________________________ OpenVPMS Developers Mailing List developers@lists.openvpms.org To unsubscribe or change your subscription visit: http://lists.openvpms.org/listinfo/developers Posts from this mailing list can be viewed online and replied to in the OpenVPMS Developer's forum- http://tinyurl.com/openvdf

Syndicate content