November 14, 2013

Example QRDA Category 3 XML for Meaningful Use Stage 2 Clinical Quality Measure Reporting

I have been preparing to lead a summit in D.C. tomorrow to discuss versioning of the various Meaningful Use Clinical Quality Measure (CQM) standards.  During final preparation for the summit, I have been digging into the QRDA Category 3 XML specification.  As I detailed a few months ago, the QRDA Category 3 XML is used for reporting aggregate data for reporting CQMs.  The more that I go spelunking into the QRDA Category 3 standard, the more I understand the complexities associated with it.  I am hoping that providing an example QRDA Category 3 XML will be helpful to the broader community.

Detailed below is a (verbose) example QRDA Category 3 XML file for expressing the Meaningful Use Stage 2 Clinical Quality Measure for expressing the results for "NQF 0018 Controlling High Blood Pressure".  Assume that this CQM is being considered against a population of patients that would generate aggregate section results that would look like this:
  • Initial Patient Population (IPP): 3
  • Denominator: 3
  • Numerator: 1
  • Exceptions: 1
  • Exclusions: 0
Additionally, Electronic Health Record (EHR) systems are required to report on the supplemental data for sex, ethnicity, race and payer.  So for this data set, assume that there are two males that meet the IPP and only one female.  Then, assume only one of the males meets the numerator requirement.  For simplicity, assume that we do not have any information on race, ethnicity, or payers… so assume "unknown" for all the patients on those dimensions.

Scrolling below, I enumerate a valid example QRDA Category 3 XML file and the sections used to report the aggregate results via CQM QRDA Category 3.  I highlighting the aggregate section results with a yellow background, and the supplemental data with a violet background.

Similar to the QRDA Category 1, it is really difficult to understand why there is so much XML bloat here.  For expressing the CQM results I enumerated after the third paragraph of this blog entry, it takes 679 lines of XML to express these results in the QRDA Category 3!  It is a real struggle to attempt to explain why so much verbose XML is needed to convey such little aggregate information.

With a more detailed understanding of the QRDA Category 3 specification, I think it is finally time to seriously question the ongoing use of the HL7 Clinical Document Architecture (CDA) and the HL7 Reference Implementation Model (RIM) for expressing any type of healthcare data in XML.  While I appreciate what the leaders at HL7 are attempting to do, the QRDA Category 3 XML bloat is probably the best (worst?) example I have seen to support use of a simpler and less complex standard that deviates from the CDA and RIM.

Steve Jobs quote that needs to be considered here “Simple can be harder than complex.  You have to work hard to get your thinking clean to make it simple. But it’s worth it in the end because once you get there, you can move mountains.”  See the evidence of the need for this type of change below:

<?xml version="1.0" encoding="utf-8"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns="urn:hl7-org:v3" xmlns:cda="urn:hl7-org:v3">
<realmCode code="US"/>
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="2.16.840.1.113883.10.20.27.1.1"/>
<id root="9c9762c0-2ac3-0131-4e2f-0050560100a9"/>
<code code="55184-6" codeSystem="2.16.840.1.113883.6.1"
 codeSystemName="LOINC"
 displayName="QRDA Category 3 Summary Report"/>
<title>QRDA Category 3 Calculated Summary Report</title>
<effectiveTime value="20131108164909"/>
<confidentialityCode codeSystem="2.16.840.1.113883.5.25" code="N"/>
<languageCode code="en-US"/>
<versionNumber value="1"/>
<recordTarget>
  <patientRole>
    <id nullFlavor="NA"/>
  </patientRole>
</recordTarget>
<author>
  <time value="20131108164909"/>
  <assignedAuthor>
    <id extension="Foo" root="Bar"/>
    <assignedAuthoringDevice>
      <softwareName/>
    </assignedAuthoringDevice>
    <representedOrganization>
      <id root="root" extension="ext"/>
      <name/>
    </representedOrganization>
  </assignedAuthor>
</author>
<custodian>
  <assignedCustodian>
    <representedCustodianOrganization>
      <id root="root"/>
      <name>Some Custodian Name</name>
    </representedCustodianOrganization>
  </assignedCustodian>
</custodian>
<legalAuthenticator>
  <time value="20131108164909"/>
  <signatureCode code="S"/>
  <assignedEntity>
    <id root="root"/>
    <representedOrganization>
      <id root="root"/>
    </representedOrganization>
  </assignedEntity>
</legalAuthenticator>
<component>
  <structuredBody>
    <component>
      <section>
        <templateId root="2.16.840.1.113883.10.20.17.2.1"/>
        <templateId root="2.16.840.1.113883.10.20.27.2.2"/>
        <code code="55187-9" codeSystem="2.16.840.1.113883.6.1"/>
        <title>Reporting Parameters</title>
        <text>
          <list>
            <item>Reporting period Dec 31 2011 - 
                  Dec 31 2012</item>
          </list>
        </text>
        <entry typeCode="DRIV">
          <act classCode="ACT" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.17.3.8"/>
            <code code="252116004"
             codeSystem="2.16.840.1.113883.6.96"
             displayName="Observation Parameters"/>
            <effectiveTime>
              <low value="20111231120000"/>
              <high value="20121231120000"/>
            </effectiveTime>
          </act>
        </entry>
      </section>
    </component>
    <component>
      <section>
        <templateId root="2.16.840.1.113883.10.20.24.2.2"/>
        <templateId root="2.16.840.1.113883.10.20.27.2.1"/>
        <code code="55186-1" codeSystem="2.16.840.1.113883.6.1"/>
        <title>Measure Section</title>
        <text></text>
        <entry>
          <organizer classCode="CLUSTER" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.24.3.98"/>
            <templateId root="2.16.840.1.113883.10.20.27.3.1"/>
            <statusCode code="completed"/>
            <reference typeCode="REFR">
              <externalDocument classCode="DOC" moodCode="EVN">
                <id root="40280381-3D61-56A7-013E-66BC02DA4DEE"/>
                <text>Controlling High Blood Pressure</text>
                <setId
                 root="ABDC37CC-BAC6-4156-9B91-D1BE2C8B7268"/>
                <versionNumber value="1"/>
              </externalDocument>
            </reference>
            <component>
              <observation classCode="OBS" moodCode="EVN">
                <templateId
                 root="2.16.840.1.113883.10.20.27.3.14"/>
                <code code="72510-1"
                 codeSystem="2.16.840.1.113883.6.1"
                 displayName="Performance Rate"
                 codeSystemName="2.16.840.1.113883.6.1"/>
                <statusCode code="completed"/>
                <value xsi:type="REAL" value="0.5"/>
                <reference typeCode="REFR">
                  <externalObservation classCode="OBS" 
                   moodCode="EVN">
                    <id 
                     root="5EE417A9-32DB-452F-BAA0-74C5831A4457"/>
                    <code code="NUMER" displayName="Numerator"
                     codeSystem="2.16.840.1.113883.5.1063"
                     codeSystemName="ObservationValue"/>
                  </externalObservation>
                </reference>
              </observation>
            </component>
            <component>
              <!-- DATA FOR IPP B936D6B5-151F-47FB-97D8-A5AB9AB00656 -->
              <observation classCode="OBS" moodCode="EVN">
                <templateId root="2.16.840.1.113883.10.20.27.3.5"/>
                <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"
                 displayName="Assertion" codeSystemName="ActCode"/>
                <statusCode code="completed"/>
                <value xsi:type="CD" code="IPP"
                 codeSystem="2.16.840.1.113883.5.1063"
                 codeSystemName="ObservationValue"/>
                <entryRelationship typeCode="SUBJ" inversionInd="true">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                      <code code="MSRAGG" displayName="rate aggregation"
                       codeSystem="2.16.840.1.113883.5.4"
                       codeSystemName="ActCode"/>
                      <value xsi:type="INT" value="3"/>
                      <methodCode code="COUNT" displayName="Count"
                       codeSystem="2.16.840.1.113883.5.84"
                       codeSystemName="ObservationMethod"/>
                  </observation>
                </entryRelationship>
                <!-- SEX Supplemental Data for IPP
                     B936D6B5-151F-47FB-97D8-A5AB9AB00656 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId
                root="2.16.840.1.113883.10.20.27.3.6"/>
                    <id nullFlavor="NA"/>
                    <code code="184100006"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="F"
                     codeSystem="2.16.840.1.113883.5.1"/>
                    <entryRelationship typeCode="SUBJ"
                     inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- SEX Supplemental Data Reporting for IPP
                     B936D6B5-151F-47FB-97D8-A5AB9AB00656 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.6"/>
                    <id nullFlavor="NA"/>
                    <code code="184100006"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="M"
                     codeSystem="2.16.840.1.113883.5.1"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="2"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- ETHNICITY Supplemental Data Reporting for IPP
                     B936D6B5-151F-47FB-97D8-A5AB9AB00656 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.7"/>
                    <id nullFlavor="NA"/>
                    <code code="364699009"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="3"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- RACE Supplemental Data Reporting for IPP
                     B936D6B5-151F-47FB-97D8-A5AB9AB00656 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.8"/>
                    <id nullFlavor="NA"/>
                    <code code="103579009"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="3"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- PAYER Supplemental Data Reporting for IPP
                     B936D6B5-151F-47FB-97D8-A5AB9AB00656 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.9"/>
                    <id nullFlavor="NA"/>
                    <code code="48768-6" codeSystem="2.16.840.1.113883.6.1"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="3"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <reference typeCode="REFR">
                  <externalObservation classCode="OBS" moodCode="EVN">
                    <id root="B936D6B5-151F-47FB-97D8-A5AB9AB00656"/>
                  </externalObservation>
                </reference>
              </observation>
            </component>
            <component>
              <!-- MEASURE DATA REPORTING FOR DENOM
                   2A53CBF0-510A-429D-814D-CBCA4DC0E2A8 -->
              <observation classCode="OBS" moodCode="EVN">
                <templateId root="2.16.840.1.113883.10.20.27.3.5"/>
                <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"
                 displayName="Assertion" codeSystemName="ActCode"/>
                <statusCode code="completed"/>
                <value xsi:type="CD" code="DENOM"
                 codeSystem="2.16.840.1.113883.5.1063"
                 codeSystemName="ObservationValue"/>
                <entryRelationship typeCode="SUBJ" inversionInd="true">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                    <code code="MSRAGG" displayName="rate aggregation"
                     codeSystem="2.16.840.1.113883.5.4"
                     codeSystemName="ActCode"/>
                    <value xsi:type="INT" value="3"/>
                    <methodCode code="COUNT" displayName="Count"
                     codeSystem="2.16.840.1.113883.5.84"
                     codeSystemName="ObservationMethod"/>
                  </observation>
                </entryRelationship>
                <!-- SEX Supplemental Data Reporting for DENOM
                     2A53CBF0-510A-429D-814D-CBCA4DC0E2A8 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.6"/>
                    <id nullFlavor="NA"/>
                    <code code="184100006"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="F"
                     codeSystem="2.16.840.1.113883.5.1"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- SEX Supplemental Data Reporting for DENOM
                     2A53CBF0-510A-429D-814D-CBCA4DC0E2A8 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.6"/>
                    <id nullFlavor="NA"/>
                    <code code="184100006"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="M"
                     codeSystem="2.16.840.1.113883.5.1"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="2"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- ETHNICITY Supplemental Data Reporting for DENOM
                     2A53CBF0-510A-429D-814D-CBCA4DC0E2A8 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.7"/>
                    <id nullFlavor="NA"/>
                    <code code="364699009"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="3"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- RACE Supplemental Data Reporting for DENOM
                     2A53CBF0-510A-429D-814D-CBCA4DC0E2A8 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.8"/>
                    <id nullFlavor="NA"/>
                    <code code="103579009"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="3"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- PAYER Supplemental Data for DENOM
                     2A53CBF0-510A-429D-814D-CBCA4DC0E2A8 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.9"/>
                    <id nullFlavor="NA"/>
                    <code code="48768-6" codeSystem="2.16.840.1.113883.6.1"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="3"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <reference typeCode="REFR">
                  <externalObservation classCode="OBS" moodCode="EVN">
                    <id root="2A53CBF0-510A-429D-814D-CBCA4DC0E2A8"/>
                  </externalObservation>
                </reference>
              </observation>
            </component>
            <component>
              <!-- MEASURE DATA FOR NUMER
                   5EE417A9-32DB-452F-BAA0-74C5831A4457 -->
              <observation classCode="OBS" moodCode="EVN">
                <templateId root="2.16.840.1.113883.10.20.27.3.5"/>
                <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"
                 displayName="Assertion" codeSystemName="ActCode"/>
                <statusCode code="completed"/>
                <value xsi:type="CD" code="NUMER"
                 codeSystem="2.16.840.1.113883.5.1063"
                 codeSystemName="ObservationValue"/>
                <entryRelationship typeCode="SUBJ" inversionInd="true">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                    <code code="MSRAGG" displayName="rate aggregation"
                     codeSystem="2.16.840.1.113883.5.4"
                     codeSystemName="ActCode"/>
                    <value xsi:type="INT" value="1"/>
                    <methodCode code="COUNT" displayName="Count"
                     codeSystem="2.16.840.1.113883.5.84"
                     codeSystemName="ObservationMethod"/>
                  </observation>
                </entryRelationship>
                <!-- SEX Supplemental Data for NUMER
                     5EE417A9-32DB-452F-BAA0-74C5831A4457 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.6"/>
                    <id nullFlavor="NA"/>
                    <code code="184100006"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="M"
                     codeSystem="2.16.840.1.113883.5.1"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- ETHNICITY Supplemental Data for NUMER
                     5EE417A9-32DB-452F-BAA0-74C5831A4457 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.7"/>
                    <id nullFlavor="NA"/>
                    <code code="364699009"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- RACE Supplemental Data for NUMER
                     5EE417A9-32DB-452F-BAA0-74C5831A4457 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.8"/>
                    <id nullFlavor="NA"/>
                    <code code="103579009"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- PAYER Supplemental Data for NUMER
                     5EE417A9-32DB-452F-BAA0-74C5831A4457 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.9"/>
                    <id nullFlavor="NA"/>
                    <code code="48768-6" codeSystem="2.16.840.1.113883.6.1"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <reference typeCode="REFR">
                    <externalObservation classCode="OBS" moodCode="EVN">
                        <id root="5EE417A9-32DB-452F-BAA0-74C5831A4457"/>
                    </externalObservation>
                </reference>
              </observation>
            </component>
            <component>
              <!-- MEASURE DATA REPORTING FOR DENEX
                   57F3D1D7-F9FA-437F-A2B9-406A1498E8C0 -->
              <observation classCode="OBS" moodCode="EVN">
                <templateId root="2.16.840.1.113883.10.20.27.3.5"/>
                <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"
                 displayName="Assertion" codeSystemName="ActCode"/>
                <statusCode code="completed"/>
                <value xsi:type="CD" code="DENEX"
                 codeSystem="2.16.840.1.113883.5.1063"
                 codeSystemName="ObservationValue"/>
                <entryRelationship typeCode="SUBJ" inversionInd="true">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                    <code code="MSRAGG" displayName="rate aggregation"
                     codeSystem="2.16.840.1.113883.5.4"
                     codeSystemName="ActCode"/>
                    <value xsi:type="INT" value="1"/>
                    <methodCode code="COUNT" displayName="Count"
                     codeSystem="2.16.840.1.113883.5.84"
                     codeSystemName="ObservationMethod"/>
                  </observation>
                </entryRelationship>
                <!-- SEX Supplemental Data Reporting for DENEX
                     57F3D1D7-F9FA-437F-A2B9-406A1498E8C0 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.6"/>
                    <id nullFlavor="NA"/>
                    <code code="184100006"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="F"
                     codeSystem="2.16.840.1.113883.5.1"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- ETHNICITY Supplemental Data Reporting for
                     DENEX 57F3D1D7-F9FA-437F-A2B9-406A1498E8C0 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.7"/>
                    <id nullFlavor="NA"/>
                    <code code="364699009"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- RACE Supplemental Data for DENEX
                     57F3D1D7-F9FA-437F-A2B9-406A1498E8C0 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">=
                    <templateId root="2.16.840.1.113883.10.20.27.3.8"/>
                    <id nullFlavor="NA"/>
                    <code code="103579009"
                     codeSystem="2.16.840.1.113883.6.96"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <!-- PAYER Supplemental Data for DENEX
                     57F3D1D7-F9FA-437F-A2B9-406A1498E8C0 -->
                <entryRelationship typeCode="COMP">
                  <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.27.3.9"/>
                    <id nullFlavor="NA"/>
                    <code code="48768-6" codeSystem="2.16.840.1.113883.6.1"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" nullFlavor="UNK"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                      <observation classCode="OBS" moodCode="EVN">
                        <templateId root="2.16.840.1.113883.10.20.27.3.3"/>
                        <code code="MSRAGG" displayName="rate aggregation"
                         codeSystem="2.16.840.1.113883.5.4"
                         codeSystemName="ActCode"/>
                        <value xsi:type="INT" value="1"/>
                        <methodCode code="COUNT" displayName="Count"
                         codeSystem="2.16.840.1.113883.5.84"
                         codeSystemName="ObservationMethod"/>
                      </observation>
                    </entryRelationship>
                  </observation>
                </entryRelationship>
                <reference typeCode="REFR">
                  <externalObservation classCode="OBS" moodCode="EVN">
                    <id root="57F3D1D7-F9FA-437F-A2B9-406A1498E8C0"/>
                  </externalObservation>
                </reference>
              </observation>
            </component>
          </organizer>
        </entry>
      </section>
    </component>
  </structuredBody>
</component>
</ClinicalDocument> 

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. © Rob McCready, 2013.
Creative Commons License

November 2, 2013

Visualization of ICD-10 Code Counts

This past week I have been working in the bowels of the QRDA Category 1 XML for the popHealth project that we are deploying for the Veterans Health Administration (VHA).  In the process of working with the QRDA Category 1, I had to resuscitate some of my Ruby and REXML skills that had atrophied in the past year.

This weekend, I wanted to shakeout some of my technical skills in a cleaner environment and downloaded the XML for the full set of ICD-10 codes from the CMS site.

Why ICD-10?  It is the 10th revision of the International Statistical Classification of Diseases and Related Health Problems (ICD) by the World Health Organization (WHO).  ICD-10 provides a hierarchy of structured codes for diseases, symptoms, findings, complaints, social circumstances, and external causes of injury/diseases.  The big national issue related to ICD-10 is that it will be required for expressing claims data to the Center for Medicare and Medicaid Services (CMS) starting on October 2014.

The current state-of-the-practice for capturing this coded data in Electronic Health Record systems is (IMHO) still ICD-9, the predecessor to ICD-10.  One of the biggest differences between ICD-9 and ICD-10 is the fidelity of data that can be captured in ICD-10.  In particular, there are over 68,000 distinct codes in ICD-10 as opposed to the roughly 13,000 in ICD-9.

Working with the XML file provided on the CMS site that details the ICD-10 code hierarchy, I wanted to see if I could convert the data into a format that would allow me to visualize the code counts into a D3.js example.  I figured it was good to exercise some XML knowledge outside of the complexity of the QRDA Category 1 XML.  Further,I wanted to learn a little more about the structure of the ICD-10 codes.

It is worth noting that the CMS ICD-10 XML is surprisingly easy to understand for the purposes of enumerating the full set of codes and the hierarchy.  The QRDA Category 1 XML… not so easy to understand.

What I did was to load the ICD-10 XML hierarchy into a simple Ruby program via REXML.  I created a aggregate count in a hash table of the second-level codes in the ICD-10 hierarchy by traversing the XML file.  I had to do this only at the second-level of the ICD-10 hierarchy because the sheer number of third-level ICD-10 codes broke the D3.js visualization examples.  To explain this a little more, the hierarchy of an example diabetes code down that the fourth level in ICD-10 follows:

E00-E89: Endocrine, nutritional and metabolic diseases
  |-> E08 Diabetes mellitus due to underlying condition
    |->E08.2 Diabetes mellitus due to underlying condition with kidney complications
      |->E08.22 Diabetes mellitus due to underlying condition with diabetic chronic kidney disease

So for the illustration of ICD-10 code counts, I stopped aggregating at just the second level of the hierarchy and count/aggregate codes from the third and forth levels.  Each tiny square in the illustration below represents the counts of just the second level of the ICD-10 space of roughly 68,000 total codes.

Once I had the counts of individual ICD-10 codes aggregated at second-level of the ICD-10 hierarchy, I exported a JSON file that could work with the D3.js example that I picked.  Below is a thumbnail (admittedly... illegible) of the ICD-10 code counts transformed with the D3.js treemap example.

Visualization of second level ICD-10 code counts
If you want to try and download a higher resolution image of the ICD-10 codes and actually read more of the details, click here.  HEADS UP… it is gianormous.

With the illustration, starting from left-to-right and then top-to-bottom, the sections in the ICD-10 data set that coincide with the colors in the illustration as follows.  The only confusing item is the last "chapter" from ICD-10 is the gray box in the bottom left "Factors influencing health status and contact with health services".  I think the D3.js code had to try and fit that section into the illustration.
  • A00-B99: Certain infectious and parasitic diseases
  • C00-D49: Neoplasms
  • D50-D89: Diseases of the blood and blood-forming organs and certain disorders involving the immune mechanism
  • E00-E89: Endocrine, nutritional and metabolic diseases
  • F01-F99: Mental, Behavioral and Neurodevelopmental disorders
  • G00-G99: Diseases of the nervous system
  • H00-H59: Diseases of the eye and adnexa
  • H60-H95: Diseases of the ear and mastoid process
  • I00-I99: Diseases of the circulatory system
  • J00-J99: Diseases of the respiratory system
  • K00-K95: Diseases of the digestive system
  • L00-L99: Diseases of the skin and subcutaneous tissue
  • M00-M99: Diseases of the musculoskeletal system and connective tissue
  • N00-N99: Diseases of the genitourinary system
  • O00-O9A: Pregnancy, childbirth and the puerperium
  • P00-P96: Certain conditions originating in the perinatal period
  • Q00-Q99: Congenital malformations, deformations and chromosomal abnormalities
  • R00-R99: Symptoms, signs and abnormal clinical/laboratory findings, not elsewhere classified
  • S00-T88: Injury, poisoning and certain other consequences of external causes
  • V00-Y99: External causes of morbidity
  • Z00-Z99: Factors influencing health status and contact with health services
If you are interested, you can access the JSON file with the second level code counts from my GitHub repository that I setup.

Further, you could use this JSON with several other data hierarchy examples off the D3.js site if you are interested.  They use the same JSON format for representing the data, and you should be able to just drop the JSON that I created into that HTML if you tweak the name of the file in the examples and set your width and height of the demo to about one thousand times greater than what is provided since the about of data is so large.

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. © Rob McCready, 2013.
Creative Commons License

October 31, 2013

Meaningful Use Stage 2 Clinical Quality Measure Analysis Against Live Patient Data

The Meaningful Use Stage 2 Clinical Quality Measures (CQMs) reference a wide variety of clinical data elements.  As part of the Kamira research project that I am wrapping up, we jointly developed a paper that describes the results of a study with the Massachusetts eHealth Collaborative (MAeHC).  The purpose of the paper was to determine data elements which are present in a large operational patient population and to describe the impact of missing data elements as components to the CQMs.

The full paper is publicly available on the Kamira site here.

To highlight, some of the results of the study determine the presence or absence of each of the clinical codes used in MU2 CQM data elements using a large set of patient data (500k patient records covering 5M care events) collected by MAeHC.  The results were used to determine the impact on the MU2 CQMs at two levels:
  • Clinical data elements were ranked according to the intersection of their component clinical codes and the codes present in the patient data 
  • CQM populations were classified according to the ranks of their component clinical data elements. 
The results of this analysis were then used to determine which CQMs are likely to work well with the patient data and which require data that is not present.

Some key findings of the paper include:
  • The majority of the clinical codes used in value sets referred to by the MU2 CQMs are not found in patient data. Very few of the SNOMED (0.03%) and LOINC (2%) codes used in MU2 CQMs are found in the patient data.
  • Many value sets do not contain any codes that are present in the patient data: across all measures over half of the MU2 CQM value sets contain no codes. Such value sets are referred to as non-intersecting.
  • There are many measure populations containing only non-intersecting value sets. Across all measures, nearly 60% of distinct denominators and 27% of numerators reference only data that is not present in the patient records. Such measures will, by definition, report 0/0 or 0/n results.
Below is an illustration taken from the paper that details code occurrence of what is available in Meaningful Use Stage 2 for ICD-9, LOINC, SNOMED, CPT, CVX and RxNorm. Each bar represents all of the codes from the respective code system defined in Meaningful Use Stage 2 for the Eligible Professional CQMs.  The blue segments of each bar show the percentage of codes that are present in the system.


Another compelling illustration is the value set intersection results.  A value set contains one or more codes from one or more clinical vocabularies for a clinical concept, like "Diabetes". Given the code occurrence results above it is possible to compute the intersection of each Meaningful Use Stage 2 CQM value set with the patient data as follows: I=P/T where I is the intersection, P represents the number of codes in the value set that are present in the data and T represents the total number of codes in the value set.

Below, each bar represents the total number of value sets for either both Eligible Hospital and Eligible Professional CQMs (All), just the Eligible Hospital (EH) CQMs, or Eligible Professional (EP) CQMs.  Each bar is subdivided to show the proportion of value sets with different levels of intersection.


A key takeaway from this paper is that the majority of the codes used in the value sets referred to by the Meaningful Use Stage 2 Eligible Professional CQMs are not found in the operational patient data.

Only finding a minority of the codes would not necessarily be a problem... value sets may contain many codes and provided one of those codes is present in the patient data, the corresponding data element will be also be satisfied.  Unfortunately, the value set intersection results show that many value sets contain no codes actually present in the patient data. Across all measures over half of the MU2 CQM value sets contain no codes.  The primary reason for non-intersecting value sets is choice of code sets: 73% of the non-intersecting value sets include only some combination of SNOMED-CT, LOINC and ICD-10 codes.  All of these are scarce in the live/operational patient data.

Additionally, the non-intersecting value sets are not distributed evenly across all measure populations where their impact would be lessened.  Instead, there are many CQM populations containing only non-intersecting value sets.  Across all measures, nearly 60% of distinct denominators and 27% of numerators reference only data that is not present.  Such CQMs will, by definition, report 0/0 or 0/n results… every time.  Yikes!!!

Admittedly, this is only one sample point of data using a single practice.  However, it is data from coded clinical source used by a national leader in healthcare information technology.  If this issue is present in other operational EHR systems (as I strongly suspect) the only way to address this problem moving forward in MU Stage 3 will be to re-consider the required clinical codes that need to be capture in the EHR systems used operationally... or refine the translations from clinical concepts to clinical codes.

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. © Rob McCready, 2013.
Creative Commons License

October 16, 2013

popHealth v2.4 Design for Meaningful Use Stage 2

As some of you know, I have been leading the open source popHealth project at MITRE for the past 4 years.  The MITRE popHealth team is currently working for the Veterans Health Administration (VHA).  Our work is focused on using popHealth as the software service allow the VHA to meet Meaningful Use Stage 2 certification for Clinical Quality Measures (CQMs).

Since we hadn't been working on popHealth in any substantial level in most of 2013, so we identified some problems for ongoing operations and maintenance (O&M) of the popHealth software when we started to put more and more engineers back on the project.  The concerns that the popHealth team had was the software that manages the User Interface (UI) presentation layer in the browser was becoming too complex and convoluted.  This had the potential for introducing difficulty when a non-MITRE contractor will eventually manage the popHealth software in an "O&M" mode for the VHA.  This will happen when our team completes the development task and moves off of this project.

What the popHealth team opted to do was to clean up the JavaScript and HTML so that there was an Application Programming Interface (API) that could provide JavaScript Object Notation (JSON) for the popHealth data needed for the UI directly to the browser.  This is a cleaner software design that also allows user to forgo the existing popHealth UI if they need to provide just the raw CQM data.

In the process of refactoring the popHealth web application infrastructure, the team opted to introduce some tweaks to the popHealth presentation layer but still maintain the existing interaction model.  What we decided to do was only slightly evolve the existing popHealth branding and look and feel, so that is is more maintainable from an engineers perspective, but does not introduce a radically different interaction model require re-training for all our existing users.

The popHealth v1.4 user interface that was aligned with the Meaningful Use Stage 2 program is below:

popHealth v1.4 Dashboard Design for Meaningful Use Stage 1

In the process of refactoring the popHealth web application infrastructure, the popHealth design team opted to introduce some tweaks to the presentation layer but still maintains the established L&F and interaction model.  The latest updated designs for popHealth v2.4 follow:

popHealth v2.4 Dashboard Design for Meaningful Use Stage 2

Changes in the evolved popHealth v2.4 design include:
  • Eliminated confusing links for the "parameters" of each CQM on the right; now, there is just a link to access the patients.
  • Reduced the number of colors and focused on a more muted and simplified color pallet 
  • Eliminated the single horizontal bar visualization and replaced it with two stacked bars for the fractions
  • Identified the exception and exclusion population with muted gray bars on the stacked bar charts
  • Enhanced the performance rate fraction with a visual radial circle around the fraction value
If anyone has opinions on the latest designs, the team welcomes any and all constructive feedback.

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. © Rob McCready, 2013.
Creative Commons License