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 1, 2012

Moving on from HITSP C32: The CCDA Problems and Allergies Section

Continuing from yesterday’s post, I’ll look at what you need to do with the problems section.  And because Allergies are a specialization of problems, and the changes are related, I’ll do that section as well.
This one is the most challenging, because the new problem concern isn’t backwards compatible with the HITSP C32 version.  It means that you cannot create something that is both a CCD 1.0 and a CCD 1.1 at the same time.

The Problem Section

Adjusting the section is just a matter of swapping out template identifiers.  It is actually the entries within the section that need further alteration.
In the problem section, remove the templateId elements that have been struck out, and add the ones in bold and underline.
<component>
   <section>
      <templateId root="2.16.840.1.113883.10.20.1.11"/>
      <templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.6"/>
      <templateId root="2.16.840.1.113883.3.88.11.83.103"/>
      <templateId root="2.16.840.1.113883.10.20.22.2.5"/>
      <templateId root="2.16.840.1.113883.10.20.22.2.5.1"/>
      <code code="11450-4" codeSystem="2.16.840.1.113883.6.1"
         codeSystemName="LOINC" displayName="PROBLEM LIST"/>
      <title>PROBLEMS</title>
      <text> … </text>
      <entry> … </entry>
   </section>
</component>

The Allergy Section

Just as in the problems section, the allergies section will also require swapping out identifiers, and the real focus is on the entries.
<component>
   <section>
      <templateId root="2.16.840.1.113883.10.20.1.2"/>
      <templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.13"/>
      <templateId root="2.16.840.1.113883.3.88.11.83.102"/>
      <templateId root="2.16.840.1.113883.10.20.22.2.6"/>
      <templateId root="2.16.840.1.113883.10.20.22.2.6.1"/>
      <code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"
         displayName="Allergies, adverse reactions, alerts"/>
      <title>PROBLEMS</title>
      <text> … </text>
      <entry> … </entry>
   </section>
</component>


The Problem Concern

In the CCD 1.0 and HITSP C32 (and the IHE templates in between), the “Problem Concern” did double duty, representing the “Concern” act for both problems and allergies.  In the CDA Consolidation Guide, this act was split into two different templates, one to address problems, and the other to address allergies.  Structurally, they are very similar.  We’ll take on the changes for problem first:
<act classCode="ACT" moodCode="EVN">
   <templateId root="2.16.840.1.113883.3.88.11.83.7"/>
   <templateId root="2.16.840.1.113883.10.20.1.27"/>
   <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
   <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.2"/>
   <templateId root="2.16.840.1.113883.10.20.22.2.5"/>
   <id root="6a2fa88d-4174-4909-aece-db44b60a3abb"/>
   <code nullFlavor="NA"/>
   <code code="CONC" codeSystem="2.16.840.1.113883.5.6"/>
   <statusCode code="completed"/>
   <effectiveTime>
      <low value="1950"/>
      <high nullFlavor="UNK"/>
   </effectiveTime>
   <entryRelationship
      typeCode="SUBJ" inversionInd="false">
   <observation classCode="OBS" moodCode="EVN">
      <templateId root="2.16.840.1.113883.10.20.1.28"/>
      <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5">
      <templateId root="2.16.840.1.113883.10.20.22.4.4"/>
         …
   </observation>
</act>

As you can see, the “breaking change” was for the <code> element, and a different template for the problem observation. 

The Allergy Concern

Moving on now to allergies, again, what changed was <code> and the use of a different template for the allergy observation. 
<act classCode="ACT" moodCode="EVN">
   <templateId root="2.16.840.1.113883.3.88.11.83.6"/>
   <templateId root="2.16.840.1.113883.10.20.1.27"/>
   <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.1"/>
   <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5.3"/>
   <templateId root="2.16.840.1.113883.10.20.22.4.30"/>
   <id root="36e3e930-7b14-11db-9fe1-0800200c9a66"/>
   <code nullFlavor="NA"/>
   <code code="48765-2"
      codeSystem="2.16.840.1.113883.6.1"
      codeSystemName="LOINC"
      displayName="Allergies, adverse reactions, alerts"/>
   <statusCode code="completed"/>
   <effectiveTime>
     <low nullFlavor="UNK"/>
     <high nullFlavor="UNK"/>
   </effectiveTime>
   <entryRelationship typeCode="SUBJ" inversionInd="false">
     <observation classCode="OBS" moodCode="EVN">
         <templateId root="2.16.840.1.113883.10.20.1.18"/>
         <templateId root="2.16.840.1.113883.10.20.1.28"/>
         <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
         <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.6"/>
         <templateId root="2.16.840.1.113883.10.20.1.18"/>
         <templateId root="2.16.840.1.113883.10.20.22.4.7"/>
        …
     </observation>
   </entryRelationship>
</act>


Problem Observations

Now we move into the problem and allergy observation templates.  Again, I’ll start with the problem observation.  Note that here you need only add the CCD 1.1 template identifier, and don’t have to remove the prior template identifiers because the two templates are compatible (but see my notes below on backwards compatibility).
The same is true for the problem status observation contained inside the problem observation.  Note that HITSP C32 suggested pointing to the problem text in the value element, while CCD 1.1 does not.  It’s still allowed, and gives you a way to textually describe problems which are not coded.
<observation classCode="OBS" moodCode="EVN">
   <templateId root="2.16.840.1.113883.10.20.1.28"/>
   <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
   <templateId root="2.16.840.1.113883.10.20.22.4.4"/>
   <id root="d11275e7-67ae-11db-bd13-0800200c9a66"/>
   <code code="64572001" displayName="Condition"
     codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT"/>
   <text>
     <reference value="#PROBSUMMARY_1"/>
   </text>
   <statusCode code="completed"/>
   <effectiveTime>
     <low value="1950"/>
   </effectiveTime>
   <value xsi:type="CD" displayName="Asthma" code="195967001"
     codeSystemName="SNOMED" codeSystem="2.16.840.1.113883.6.96">
     <originalText>
      <reference value="#PROBSTATUS_1"/>
     </originalText>
   </value>
   <!-- Problem Status Template -->
   <entryRelationship typeCode="REFR">
     <observation classCode="OBS" moodCode="EVN">
      <templateId root="2.16.840.1.113883.10.20.1.50"/>
      <templateId root="2.16.840.1.113883.10.20.22.4.6"/>
      <code code="33999-4" codeSystem="2.16.840.1.113883.6.1"
         displayName="Status"/>
      <statusCode code="completed"/>
      <value xsi:type="CE" code="55561003"
        codeSystem="2.16.840.1.113883.6.96" displayName="Active">
      </value>
     </observation>
   </entryRelationship>
</observation>



Allergy Observation

The allergy observation and its subordinate observations are going to require a few more adjustments because of the contained <participant> describing the allergen, and the shifting of the type of allergy from <code> to <value>, among other things.
<observation classCode="OBS" moodCode="EVN">
   <templateId root="2.16.840.1.113883.10.20.1.18"/>
   <templateId root="2.16.840.1.113883.10.20.1.28"/>
   <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.5"/>
   <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.6"/>
   <templateId root="2.16.840.1.113883.10.20.1.18"/>
   <templateId root="2.16.840.1.113883.10.20.22.4.7"/>
   <id root="4adc1020-7b14-11db-9fe1-0800200c9a66"/>
   <code code="416098002" codeSystem="2.16.840.1.113883.6.96"
      displayName="drug allergy" codeSystemName="SNOMED CT"/>
   <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
   <!-- No longer required or recommended in CCDA, but do it anyway -->
   <text>
     <reference value="#ALGSUMMARY_1"/>
   </text>
   <statusCode code="completed"/>
   <effectiveTime>
     <low nullFlavor="UNK"/>
   </effectiveTime>
   <value xsi:type="CD" code="70618" codeSystem="2.16.840.1.113883.6.88"
      displayName="Penicillin" codeSystemName="RxNorm">
      <originalText>
         <reference value="#ALGSUB_1"/>
      </originalText>
   </value>
   <!-- Put what used to go into <code> here -->
   <value xsi:type="CD" code="282100009" 
      displayName="Adverse reaction to substance"
      codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT">
   </value>
   <!-- This is pretty much unchanged (and ought to be a template) -->
   <participant typeCode="CSM">
     <participantRole classCode="MANU">
      <playingEntity classCode="MMAT">
        <code code="70618" codeSystem="2.16.840.1.113883.6.88"
          displayName="Penicillin" codeSystemName="RxNorm">
          <originalText>
           <reference value="#ALGSUB_1"/>
          </originalText>
        </code>
        <name>Penicillin</name>
      </playingEntity>
     </participantRole>
   </participant>
   <entryRelationship typeCode="MFST" inversionInd="true">
     <observation classCode="OBS" moodCode="EVN">
      <templateId root="2.16.840.1.113883.10.20.1.54"/>
      <templateId root="2.16.840.1.113883.10.20.22.4.9"/>
      <!-- Reaction observation template -->
      <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
      <text><reference value="#REACTION-1"/></text>
      <statusCode code="completed"/>
      <value xsi:type="CD" code="247472004"
        codeSystem="2.16.840.1.113883.6.96" displayName="Hives">
        <originalText>
          <reference value="#ALGREACT_1"/>
        </originalText>
      </value>
      <entryRelationship typeCode="SUBJ">
         <observation classCode="OBS" moodCode="EVN">
           <templateId root="2.16.840.1.113883.10.20.1.55"/>
           <templateId root=" 2.16.840.1.113883.10.20.22.4.8"/>
           <!-- Severity observation template -->
           <code code="SEV" displayName="Severity"
           codeSystemName="HL7 ActCode" codeSystem="2.16.840.1.113883.5.4"/>
           <text><reference value="#SEVERITY-1"/></text>
           <statusCode code="completed"/>
           <value xsi:type="CE" displayName="moderate" code="6736007"
           codeSystemName="SNOMED" codeSystem="2.16.840.1.113883.6.96"/>
         </observation>
        </entryRelationship>
     </observation>
   </entryRelationship>
   <entryRelationship typeCode="REFR">
     <observation classCode="OBS" moodCode="EVN">
      <templateId root="2.16.840.1.113883.10.20.1.39"/>
      <templateId root="2.16.840.1.113883.10.20.22.4.28"/>
      <!-- Alert status observation template -->
      <code code="33999-4" codeSystem="2.16.840.1.113883.6.1"
        displayName="Status"/>
      <statusCode code="completed"/>
      <value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96"
        displayName="Active">
        <originalText>
          <reference value="#ALGSTATUS_1"/>
        </originalText>
      </value>
     </observation>
   </entryRelationship>
</observation>


On Severity

While I showed the severity template above  in the context of a reaction, the CCDA allows that it can also be used for allergies themselves.  And I note that it doesn’t forbid it from being used in problems, it just didn’t suggest it.  I’m suggesting it.  Severity is simply a special kind of annotation on an problem, allergy, or reaction.  Don’t expect it to be present, or supported by all systems, but if you have it, be kind and share it with others.

On Backwards Compatibility

The new templates for problems and allergies are functionally compatible with the HITSP C32 specifications.  In other words, you can say the same things.  In a few cases, they are even wire compatible.  That is to say that you can create XML that would be valid in both the HITSP C32, and the CCD 1.1.  The question to ask yourself though, is whether you want to take that on.  My advice would be to NOT try to retain compatibility in the same package even if it is technically feasible. 

CCDA takes a different enough approach that you’ll run into challenges.  While this series focuses on production, consumption is a completely different story.  You aren’t in control of what you are going to receive, so you have to be able to accept anything that’s valid. 

That means you cannot take a path of least change to adapt your consumer the way that you can for your producer.  So, create a new package for your CCDA Consumer.  You can start with the same code base you used for the HITSP C32, but you’ll be making enough changes that the end result will be quite a bit different. 

And remember, there will be some time when you still have to deal with both, or at least your customers will.  Not everyone will be able to transition on the same day.  You need to allow for asynchronous bilateral cutover.  It is after all, one of the new ABC’s of interoperability.

Caveats

If it says SHOULD, DO IT.  You will thank me later, or at least, your customer or downstream trading partner will.  SHOULD doesn’t mean “avoid this if you can”, it means that this practice is recommended for maximum interoperability.

If you used additional HITSP C32 templates in these observations, LOOK at them!  I cannot cover everything here, and this post is already TL;DR length.  Furthermore, I offer this information for your education.  Please take responsibility for ensuring the accuracy for your own implementations.

6 comments:

  1. Keith,
    I was just asked, on behalf of a development team, to send you a "BIG THANKS!" for this and your many other blogs. They are very helpful to us and I'm sure to many others. I share a desire to help patients and clinicians in care coordination, and implementing CDA right is one way to help. Thanks again.
    David

    ReplyDelete
  2. Replies
    1. CCDA is an acronym for the IHE Health Story CDA Consolidation implementation guide specified by HL7. It is the new standard specified for Meaningful Use stage 2. You can find it here

      Delete
  3. i want to know how can i find section template id from c32 docuemens in .net

    ReplyDelete
  4. Hi Keith,
    I need to know the examples of C32- CDA stage 1 and C32- CDA stage 2. Please let me know about this

    ReplyDelete
  5. In CCDA should the PROBLEMS section have the two templateID roots(2.16.840.1.113883.10.20.22.2.5, and 2.16.840.1.113883.10.20.22.2.5.1 ) or one would suffice?

    ReplyDelete