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.

Friday, August 3, 2012

Moving on from HITSP C32: Medications

I’m going to continue rolling with this while I can.  I had hoped to stage a few posts to go out while I'm on vacation, but I messed up my calendar, so I'll probable be writing some of this from my mother's house next week (after everyone else is asleep).  I'm thinking about putting this together with some other stuff and building a CCDA Quick-start guide, so while it's cutting into "personal" time, it's also become a personal pet project.  And that material would also be useful for Edition 2 of the CDA Book (which is still quite a ways off, I have two other book ideas to execute on first).   Before I get started on medications, I have a couple of notes for you:

Use the Change History!

Starting at page 522 of Version 1.1 of the CDA Consolidation guide (which was put up on the HL7 DSTU site in July), and going on for about 35 pages is the updated change log.  That  log covers changes to the templates in the problems, medications, results, vital signs and procedures sections and their templates IN DETAIL.  I missed this in my review of the drafts (and in producing these posts).  It's been in the published DSTU that was put out in December of last year as well.  You should definitely make use of it.  I’m covering the essentials to get you up and running faster, but you’ll need look into the details.

Version 2.0? 

If you looked at the HL7 Ballot site (which opened last week), you were probably surprised to see CCDA 2.0 being balloted now.  So were the co-chairs, and the lead of the project who's ballot was supposed to be published under a different title.  It will eventually fold into the CCDA Brand/Product Line, but not yet.  We still have to figure how often to roll that up.


Enough rambling, time to get on with it:

Following up after problems and allergies is medications.  The impact of CCDA on your medications section is going to be quite similar to the impact of CCDA on problems and allergies sections.

Medications Section


The key change in your code for the section will be to change the template identifiers, and any contained entries.
<section>
       <templateId root="2.16.840.1.113883.10.20.1.8"/>
       <templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.19"/>
       <templateId root="2.16.840.1.113883.3.88.11.83.112"/>
       <templateId root="2.16.840.1.113883.10.20.22.2.1"/>
       <templateId root="2.16.840.1.113883.10.20.22.2.1.1"/>
       <id root="41399049"/>
       <code code="10160-0" codeSystem="2.16.840.1.113883.6.1"
              codeSystemName="LOINC" displayName="History of medication use"/>
       <title>…</title>
       <text>…</text>
    <entry>…</entry>
</section>


Medications Entry

The medications entry has numerous possible subcomponents, each of which has its own set of changes which I’ll detail separately.   The example below comes from the NIST Robust CCD example.  In it, they’ve included optional content (in both CCD and CCDA), which I’ve marked in italics.  If you have it, it’s a good idea to send it, but neither specification requires it.
<substanceAdministration classCode="SBADM" moodCode="INT">
       <templateId root="2.16.840.1.113883.3.88.11.83.8"/>
       <templateId root="2.16.840.1.113883.10.20.1.24"/>
       <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7"/>
       <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1"/>
       <templateId root="2.16.840.1.113883.10.20.22.4.16"/>
       <id root="cdbd33f0-6cde-11db-9fe1-0800200c9a66"/>
       <text>
              <reference value="#SIGTEXT_1"/>
       </text>
       <statusCode code="completed"/>
       <effectiveTime xsi:type="IVL_TS">
              <low value="200507"/>
              <high nullFlavor="UNK"/>
       </effectiveTime>
       <effectiveTime xsi:type="PIVL_TS" institutionSpecified="false" operator="A">
              <period value="6" unit="h"/>
       </effectiveTime>
       <routeCode code="C38216" displayName="Respiratory (Inhalation)"
              codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI - FDA RouteOfAdministration">
              <originalText>
                     <reference value="#MEDROUTE_1"/>
              </originalText>
              <translation code="IPINHL" codeSystem="2.16.840.1.113883.5.112"
                     codeSystemName="HL7 RouteOfAdministration" displayName="Inhalation, oral"/>
       </routeCode>
       <doseQuantity value="2" unit="puffs"/>
       <administrationUnitCode code="C42944" displayName="Inhalant"
              codeSystem="2.16.840.1.113883.3.26.1.1" codeSystemName="NCI - FDA Dosage Forms">
              <originalText>
                     <reference value="#MEDFORM_1"/>
              </originalText>
       </administrationUnitCode>
       <consumable>
              … see Consumable below …
       </consumable>
       <entryRelationship>
              … see the various subcompnents which follow Consumable …
       </entryRelationship>
</substanceAdministration>


Consumable

This is where you put the drug information.  What you do here hasn’t changed much except for the templates.
       <consumable> … see consumable below …
              <manufacturedProduct>
                     <templateId root="2.16.840.1.113883.3.88.11.83.8.2"/>
                     <templateId root="2.16.840.1.113883.10.20.1.53"/>
                     <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2"/>
                     <templateId root="2.16.840.1.113883.10.20.22.4.23"/>
                     <!-- Product template -->
                     <manufacturedMaterial>
                           <code code="307782"
                                  displayName="Albuterol 0.09 MG/ACTUAT inhalant solution"
                                  codeSystemName="RxNorm" codeSystem="2.16.840.1.113883.6.88">
                                  <originalText>
                                         <reference value="#MEDNAME_1"/>
                                  </originalText>
                           </code>
                           <name>Albuterol Inhalent</name>
                     </manufacturedMaterial>
              </manufacturedProduct>
       </consumable>

Over-The-Counter vs. Prescription

In the HITSP C32, we had created a template that allowed one to show whether a medication on the medication list was a prescription, or over the counter.  If you used this template in your CCD, you can continue to use it, but it is not included in CCDA (so many systems will just ignore it).
       <entryRelationship typeCode="SUBJ">
              <observation classCode="OBS" moodCode="EVN">
                     <templateId root="2.16.840.1.113883.3.88.11.83.8.1" />
                     <code code="73639000" codeSystem="2.16.840.1.113883.6.96"
                           displayName="Prescription Drug"/>
              </observation>
       </entryRelationship>

Reason for Medication

The “Reason for Medication” component of the medications entry simply referenced the “Problem” template in the HITSP C32.  In CCDA, there is a new template that duplicates the common content of Problem, now called indications.  Use of this template is optional in both HITSP C32 and CCDA.  If you are a fan of analytics, understanding why a patient is taking a medication (e.g., what problem this is for) is a really good idea.
       <entryRelationship typeCode="RSON">
              <!--Reason for Med-->
              <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.19”/>
                     <id root="cdbd5b08-6cde-11db-9fe1-0800200c9a66"/>
                     <code displayName="Condition" code="64572001"
                           codeSystemName="SNOMED-CT" codeSystem="2.16.840.1.113883.6.96"/>
                     <text>
                           <reference value="#SIGTEXT_1"/>
                     </text>
                     <statusCode code="completed"/>
                     <effectiveTime>
                           <low value="20000328"/>
                     </effectiveTime>
                     <value xsi:type="CD" code="56018004" displayName="Wheezing"
                           codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>
              </observation>
       </entryRelationship>

Medication Status

The medication status observation tells you about whether this medication is active or not.  It exists in HITSP C32 (from CCD), but no longer appears in CCDA.  There were three interesting states in this template:  Active, No Longer Active, and On Hold.  Prior History is the last code allowed for, and in this context, more than likely means “No Longer Active”.   You can still use it if you want inside a medication, but because it is no longer in CCDA, it isn’t clear that you need it.  The first effectiveTime associated with the medication gives the start and stop date for the medication.  You don’t need to know Active/No Longer Active if those are used correctly (although On Hold is still an interesting case).  If you do continue to use this template, I’d stick with the first three SNOMED CT codes on output, but accept the fourth on input.
       <entryRelationship typeCode="REFR">
              <!--To Identify Status-->
              <observation classCode="OBS" moodCode="EVN">
                     <templateId root="2.16.840.1.113883.10.20.1.47"/>
                     <code code="33999-4" displayName="Status"
                           codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
                     <value xsi:type="CE" code="55561003" displayName="Active"
                           codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT">
                     </value>
              </observation>
       </entryRelationship>

patientInstructions and fulfillmentInstructions

Patient instructions, such as Take with food, consume all this medication, and similar phrases often appear on prescriptions, and are additional directions to the patient.  Fulfillment instructions refers to directions to the pharmacist with regard to formulation or delivery of the medication.   
Both of these properly go with the order information, rather than the substance administration intent/event.  In CCDA, these two different templates were replaces with the singular Instructions template, and so this is just a templateId swap.  That same template is also used with other instructions given to the patient, e.g., education, and the value set of codes recommended (but not required, so you can keep your existing codes) reflects that.
<entryRelationship typeCode='SUBJ' inversionInd='true'>
       <act classCode='ACT' moodCode='INT'>
              <templateId root='2.16.840.1.113883.10.20.1.49'/>
              <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.3'/>
              <templateId root="2.16.840.1.113883.10.20.22.4.20"/>
              <code code='PINSTRUCT' codeSystem='1.3.6.1.4.1.19376.1.5.3.2'
                     codeSystemName='IHEActCode' />
              <text><reference value='#patient-instruction'/></text>
       </act>
</entryRelationship>

Order (Rx) Information

The order information template doesn’t appear in the NIST example, so I’ve modified the HITSP C32 example to show what’d you’d do with that.  This template can appear inside the medication entry, and reflects information about the order for the medication.
The id element is where you’d put the providers medication order number that they transmitted to the pharmacy.  CCDA recommends that the effectiveTime be included and that it be placed in the <high> element, which is a change from HITSP C32.  The author of the supply order is the prescriber.
<entryRelationship typeCode='REFR'>
<supply classCode='SPLY' moodCode='INT'>
              <templateId root='2.16.840.1.113883.3.88.11.83.8.3'/>
              <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.7.3’/>
              <templateId root="2.16.840.1.113883.10.20.22.4.17"/>
              <id root='14ED7742-2428-4e2c-9446-A9B0D0075272' extension='SCRIP#'/>
              <effectiveTime xsi:type="IVL_TS">
                     <high value="20121012" />
              </effectiveTime>
              <statusCode code="completed"/>
              <repeatNumber value="1"/>
              <quantity value="75"/>
              <product>
                     <manufacturedProduct>
                           <templateId root="2.16.840.1.113883.10.20.22.4.23"/>
                           … See consumable above …
                     </manufacturedProduct>
              </product>
              <author>
                     <time value='20070210'/>
                     <assignedAuthor>
                           <id …/>
                           <assignedPerson>
                                  <name>…</name>
                           </assignedPerson>
                     </assignedAuthor>
              </author>
       </supply>
</entryRelationship>

Medication Dispense

The HITSP C32 used the same template, but set moodCode to EVN to indicate that the <supply> is for a dispense (or fill).  In CCDA, you use pretty much the same content (XML-wise) as the Order Information, but a different templateId: 2.16.840.1.113883.10.20.22.4.18
The dispense should always appear inside the order (because if it was dispensed, you should have the order information).  And order information should appear inside the medication entry (because that’s the way to link the SIG (dose, route, frequency) to the bottle of pills (or other package) that should be provided to the patient, and if you have the order, you should know what to put on its label.

Subcomponents I haven’t Covered

Medication orders are complicated and can have a lot of information.  Here are some of the items I didn’t review.

Medication series number

Little (if ever) found in a HITSP C32, this was the series indicator in a medication that was given in multiple does.  It isn’t used in CCDA.

vehicle

This template in the HITSP C32 was used to document an inactive ingredient used to aid transmission of the medication to the patient (e.g., saline).  I’m not aware of a single system that ever used it.

reaction

If there was an adverse reaction to the medication, it is recorded in this subcomponent.  This uses the same adverse reaction template as I described yesterday in allergies.  So, really, I did cover it, just not in this post.

-- Keith

P.S.  Thanks to all of you who voted for me for the HL7 Board, especially on Monday.  I'll let you know how the election results come out in September (when we all get them).

8 comments:

  1. Keith

    RE "Starting at page 522 of Version 1.1 of the CDA Consolidation guide (which was put up on the HL7 DSTU site in July)"

    Do you realize that you waste many reader's time by including links in your blog posts to HL7 documents that are only accessible if you've paid HL7 a membership fee?

    Unless you expect that your blog is only read by paid HL7 members, you could at least warn folks that:

    "You must be a paid member of HL7.org to access this resource."

    TJL

    ReplyDelete
    Replies
    1. Thomas,
      I'm sorry the material isn't freely available to HL7 members, and I'll try to note what material may require HL7 membership to access. But you can readily figure that out when you hover over the link.

      This series is about implementing HL7 standards. Why would you or your company waste developer time trying to implement HL7 standards without being a member? Is it really worth the savings?

      Keith

      Delete
    2. And now, of course, its free to non-members.

      Delete
  2. Keith

    RE: "Why would you or your company waste developer time trying to implement HL7 standards without being a member?"

    The best response that I can give you is that there are 1000's upon 1000's of bright, eager independent developers out there that - whether for philosophical, ethical or economic reasons - are NOT going to pay HL7 a tribute just to help with the work.

    This is especially true given the fact that the results of that work is going to be kept proprietary by HL7.

    HL7 needs to come up with a business model that fits 21st Century attitudes and thinking.

    If HL7 continues to fail at doing this, then maybe you ought to suggest to Todd Park or Farzad Mostashari that the government take the money that was spent on Bon Jovi and hors d' oeuvres at their latest pep rally and give it to HL7 to subsidize access by all of the innovators out there who can't or won't pay a ransom.

    And BTW: I was a paid member of HL7 for years.

    TJL

    ReplyDelete
  3. What is that business model, Thomas? Give away the IP for free doesn't strike me as being an effective business model by itself. In my computer sales days, we used to joke about selling below cost but making it up on volume. What business model allow HL7 to continue to exist, and yet give away its work products.

    ReplyDelete
    Replies
    1. @Keith

      RE: "What business model allow HL7 to continue to exist, and yet give away its work products."

      I almost can't believe that you would ask such a question in the midst of the thriving open source world that we live in today - and despite the fact that HL7's *work products* are the product of work done by folks who pay HL7 rather than the other way around.

      I'll have to take your question as an illustration of the problem inside of HL7, and an explanation of HL7's inability to "figure it out" and adapt at an organizational level.

      TJL

      Delete
  4. Keith, you say: "The dispense should always appear inside the order". I'm pretty new to this so I'm sure I'm missing something, but the CCDA documentation I'm looking at shows Medication Dispense containing Medication Supply Order, but not the other way around.

    Thanks,
    Dan

    ReplyDelete
  5. Hi Keith,

    1. Can you answer Dan's question above?

    2. Under "Order (Rx) Information" in your post, you said, "CCDA recommends that the effectiveTime be included and that it be placed in the element" which coincides with the "SHOULD" indicated on the last row in the table on Page 554. However, both Page 405 and 406 indicate "SHALL" for this element. Whatever it should be, can you clarify exactly what this date is? Is it the prescription ordering date or expired date?

    Thanks!

    ReplyDelete