Question: #CDA - how to handle Observation Component code
Jan 27, 2016Question: I’m unpacking a Summarizations of Episode Note” CDA document. The section “Relevant diagnostic test and/or laboratory data” has an organizer classCode=”BATTERY”, and followed by many component.observation elements. All of these have valid values (eg, type=PQ value=86 unit=mg/dl), but all have the observation.code element containing nullFlavor=”UNK”.
The
Here’s an example snip:
<component>
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.
22.4.2" />
<code nullFlavor="UNK" />
<text>
<reference value="#ID0EFTDIABA" />
</text>
<statusCode code="completed" />
<effectiveTime value="20151208091900" />
<value xsi:type="PQ" value="86" unit="mg/dL" />
Are these component.observation segments constructed correctly? If so, can you direct me to some literature to make sense of this apparent list of values with no codes?
Answer:
Well, technically, I think are conformant. What the template identified by 2.16.840.1.113883.10.20.22.4.2 says is:
SHALLcontain exactly one [1..1]code code(CONF:13908), where the @codeSHOULDbe selected from (CodeSystem: 2.16.840.1.113883.6.1 LOINC 2.16.840.1.113883.6.1 LOINC)
Well, it contains a code, not taken from LOINC. So ‘correct’ in that it meets that rule.
But it’s not really correct. As you’ve found, it’s not possible to interpret an observation without a code, unless the context is crystal clear - which it isn’t, because it could only be clear in the template - about the inferred code (that’d be bad practice anyway). I certainly think that the committee that wrote that rule above never intended for an implementer to use a nullFlavor on the code, though there’s always edge cases where maybe it’s valid
So, no, not correct. But my experience is that you’ll have to live with it, and ignore the data or infer meaning manually or something. See Rick’s ongoing series on “CDA in the Wild” - you’re lucky!