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.

Tuesday, December 31, 2013

On Codes

Recently, a request came in to change some of the codes for an HL7 Vocabulary (specifically the < and > codes in ObservationInterpretation). The complaint was that these characters must be escaped in XML.  

This spawned the usual deluge of e-mails about proper ways to generate identifiers for codes.  The best practice according to the erudite vocabularists is to use meaningless (semantically void) code values.  This, everyone agrees, is the best practice for managing code systems.  Well sure it is, when you have thousands of codes and nobody is ever expected to have to interface with the code system directly through code values.  But when you have a small code set, or one like ICD where people are expected to interface with these identifiers directly, mnemonic, or at least easy to remember code identifiers make sense, at least for the people who have to use them.

The only absolute I ever learned that hasn't failed me yet is that there are no absolutes.

   Keith

P.S.  I've never had to escape those codes when creating XML, or any other special character for that matter.  If you have to worry about XML syntax in your code, you are doing it wrong.  Use a tool, don't write it manually.