Convert your FHIR JSON -> XML and back here. The CDA Book is sometimes listed for Kindle here and it is also SHIPPING from Amazon! See here for Errata.

Wednesday, August 31, 2011

Display Names in CDA

The CDA standard supports recording names in a variety of different ways using the Person Name data type.

The name element is used to contain the name of a person, be they provider, patient, emergency contact et cetera.   There are several difficulties with names when they are exchanged.  The first of these has to do with cultural variations in how names are "displayed".  Related are differences in how a name is parsed into different parts by various cultures.  Finally, there is the fact that the name element itself uses mixed content in the CDA Release 2.0 XML.

One of the "requests" of the Metadata ANPRM is a "display name" representation.  This is already supported in CDA.  If you take the name parts in the order presented, you have them in the correct display order.  In Asian cultures, the family name is often given first, followed by the given name.  CDA doesn't specify the order in which the name parts are provided, but the PN data type does have a virtual property which delivers the name formatted appropriately. The method by which the formatted name is extracted is given in the HL7 Data types specification.  Actually a much easier way to get at is uses the XPath or XSLT string function.  If $name is a variable containing the name element, normalize-space(string($name)) is an XPath or XSLT expression that will return the formatted name according to the HL7 rules for the PN data type.  If you encode the name as shown in the examples this works just fine.

With regard to cultural differences in parsing, in the western world we often think of first, middle and last name. But the common features are that names are either given (first and middle), or are family names (maiden and last).  Crossing between these two is sometimes a challenge.  Women often use their maiden name as a middle name after marriage.  So for them, the first given name is the first name, the first family name would be the maiden name, and the last family name would be the last name.  But men usually don't change their name, so the first given name is the first name, the second given name is the middle name, and the first family name is the last name.  Of course there are plenty of other variations.  In order to be interoperable with systems that still think in this western-centric way, I tell people to simply place the middle name as the second given name.  It makes it much easier, even if it isn't exactly correct.

The mixed model provides another challenge, because white space is significant.  I need to examine the CDA Consolidation guide for how to represent names, because I think we recommended it not be present.  That defeats the simple XPath/XSLT extraction of the formatted name.  There are still ways to get at it by inserting the implicit white space through a very simple transform, but it isn't quite as clean.

Another request of the Metadata ANPRM is to provide a display name for searching purposes.  The Entity Name data type (from which Person Name is derived) has a use attribute that can identify the name used for search purposes.  The way to represent that is to add use='SRCH' to the name element.