Technical Error in CDA Implementation Guides for ETP, PCEHR

Aug 14, 2013

There’s a technical error that runs through most of the CDA implementation guides that we have, including ETP, and other pcEHR related ones. Background

The problem relates to the codes used for HealthcareFacility.code:

 

Here, ServiceDeliveryLocationRoleType is a value set which contains codes taken from the RoleCode code system. The difference between a value set and a code system seems to be easily confuse people.

A code system defines a set of codes and gives them an assigned meaning. Sometimes, it creates relationships between them that provide additional information about how to use the codes and/or understand their meaning.

A value set is a list of codes defined by other code systems. A value set doesn’t define it’s own codes, doesn’t create it’s own meaning. Value sets are used to define a set of codes that can be used in some context. (Aside: “Value set” is a terrible name for this idea - so utterly misleading. I very much wish we could change it).

Part of the confusion is that very often people leave the value set out of the picture - they say, “use this code system for this element” (i.e. LOINC for test result name). But what this actually means is “use the (set of all codes) defined by [the code system]” (i.e. use (all) the [LOINC codes] for test result name)) - where the value set is “(Set of all codes)”. Where this is useful is because most of the time what actually happens is that you need to say “use (this subset) of the codes defined [by the code system]. Sticking with LOINC, that’s because LOINC defines all sorts of codes, not just codes for test result names. So there’s always a value set in the picture, but sometimes it’s implicit.

So the diagram above is saying:

“Use the (set of codes that represent service delivery location types) from the [RoleCode code system]”

When this is represented in the CDA document, we do this:

<code code=”HOSP” codeSystem=”2.16.840.1.113883.5.111”
  codeSystemName=”RoleCode” displayName=”Hospital”/>

Here, the code “HOSP” comes from the code system “2.16.840.1.113883.5.111”, which is RoleCode. There’s no need to represent the value set “ServiceDeliveryLocationRoleType” because that has nothing to do with the meaning of the code - the meaning of “HOSP” is defined by the RoleCode system, and so that’s what we represent.

Advanced note for people who like hard stuff: it’s not quite 100% true to say that the value set has nothing to do with the meaning. See here and note that a later version of the data types (not usable in CDA) caters for also representing the value set in order to support advanced edge case processing.

The error

Unfortunately the CDA Implementation guides commonly have an error, which manifests in ETP (the released Australian standards), and in several PCEHR specifications, notably the NPDR Prescribe and Dispense documents, and the discharge summary specification. The error is that the OID assigned to the value set HL7ServiceDeliveryLocationRoleType  has been used instead of the OID assigned to the RoleCode code system, so that the code looks like this in the CDA document:

<code code=”HOSP” codeSystem=”2.16.840.1.113883.1.11.17660” 
  codeSystemName=” HL7ServiceDeliveryLocationRoleType” displayName=”Hospital”/>

In effect, this code claims to be something different to what it is: “HOSP” as defined by the RoleCode code system.

This has the potential to cause a great deal of confusion: there’s no real difference in meaning, but computationally it’s easy to think that these are different by mistake. Particularly given that the OIDs are so opaque and share such a lot of common root. Testimony to how easy they are to confuse is the fact that this error has survived multiple repeated reviews at many stages, including by me, and has already been implemented by many implementers.

Worse, some CDA IGs are using the correct code system “2.16.840.1.113883.5.111” for the same codes.

The solution

Given that we now have CDA documents in production that use both the wrong and right codes, the only solution available to us is to not note that for the purposes of CDA usage in Australia, codes with the OID 2.16.840.1.113883.1.11.17660 are the same as codes with the OID 2.16.840.1.113883.5.111 when those codes are in the ServiceDeliveryLocationRoleType value set. Formal advice will be issued through NEHTA channels for the PCEHR documents in due course. This blog is just a heads up in the hope that it helps implementers not get caught out later.