This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

MDHT Template Sub Project

From HL7Wiki
Jump to navigation Jump to search

Back to Structured Document Template Design Pilot

Overview

The goal of this pilot is to demonstrate how the Model-Driven Health Tools (MDHT) CDA Tools project can be used to design and implement CDA templates. This includes the generation of a published implementation guide and an EMF-based Java runtime API that supports programmatic production, consumption, and validation of CDA XML instances.

An example application developer scenario would be to use the generated Java library to create an EHR system adapter that exports CDA TB Progress Note instances for exchange with external entities, or receive TB Progress Note instances and load them into domain-specific Java objects that may be processed to display or import data into the EHR system, and to validate instance (imported or exported) for conformance to the implementation guide template rules.

Project Status

  • Milestone 1 -- February 26, 2010
    • Completed UML model of all pilot conformance rules
    • Generated implementation guide to PDF and Eclipse Help format (html)
    • Generated Java runtime classes for creating, consuming, and validating CDA instances based on the pilot templates. Wrote small test Java program to demonstrate use.
    • Total time to review requirements and complete these three steps: 2 hours
  • Milestone 2 -- March 26, 2010
    • Updated value set representation
    • Updated implementation guide publishing to include CDA base type hyperlinks
    • See example published guide below
  • Next steps:
    • Expand example Java program to illustrate embedding TB Progress Note in a small application
    • Test validation with sample documents
    • Collaborate with architectural integration analysis

Project Execution Phase

Use CDA Tools to design CDA templates for example use case

We will create all of the templates required by the template tool pilot use case. This includes creating classes for each template and specifying all conformance rules using property redefinitions, directed associations, and directly using OCL expressions (if necessary).


Project Delivery Phase

Generate published implementation guide in DITA format

The UML model created with template definitions is automatically transformed to DITA XML, which is then published to PDF and Eclipse Help HTML format using the open source DITA-OT toolkit.

Generate Java-based Runtime API

The UML template model is transformed and imported into EMF, which is used to produce Java source code that supports:

  • Programmatic creation of CDA documents based on this implementation guide
  • Parsing CDA XML documents into the domain-specific Java classes for this guide, which can then be used to process the contents, e.g. to import the data into other EHR applications
  • Validate CDA documents for conformance with this guide's templates

A simple Java program was written that creates a partial CDA document for this guide. We will expand the example during the next project milestone.

This program produces the following CDA document:

<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
  <templateId root="2.16.840.1.113883.10.20.15.2.6.1.1.1.1.1.2.3"/>
  <title>Tuberculosis Follow Up Progress Note</title>
  <recordTarget>
    <patientRole>
      <patient>
        <name><family>Doe</family><given>John</given><prefix>Dr.</prefix></name>
        <name><family>Doe</family><suffix>M.D.</suffix></name>
      </patient>
    </patientRole>
  </recordTarget>
  <component>
    <structuredBody>
      <component>
        <section>
          <templateId root="2.16.840.1.113883.10.20.1.14"/>
          <templateId root="2.16.840.1.113883.10.20.15.2.6"/>
          <code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Relevant diagnostic tests and/or laboratory data"/>
          <title>Relevant diagnostic tests and/or laboratory data</title>
          <entry>
            <organizer classCode="BATTERY" moodCode="EVN">
              <templateId root="2.16.840.1.113883.10.20.1.32"/>
              <templateId root="2.16.840.1.113883.10.20.15.3.21"/>
              <code codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
              <component>
                <observation classCode="OBS" moodCode="EVN">
                  <templateId root="2.16.840.1.113883.10.20.1.31"/>
                  <templateId root="2.16.840.1.113883.10.20.15.3.13"/>
                  <code code="645-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
                  <statusCode code="completed" codeSystem="2.16.840.1.113883.5.14" codeSystemName="ActStatus"/>
                </observation>
              </component>
            </organizer>
          </entry>
        </section>
      </component>
    </structuredBody>
  </component>
</ClinicalDocument>

Using the generated Java classes to validate this sample yields the following validation errors:

ERROR: Diagnosis of org.openhealthtools.mdht.uml.cda.pilot.impl.TuberculosisFollowUpProgressNoteImpl@1412e75{urn:hl7-org:v3#//@clinicalDocument}
ERROR: The required feature 'id' of 'org.openhealthtools.mdht.uml.cda.pilot.impl.TuberculosisFollowUpProgressNoteImpl@1412e75{urn:hl7-org:v3#//@clinicalDocument}' must be set
ERROR: The required feature 'code' of 'org.openhealthtools.mdht.uml.cda.pilot.impl.TuberculosisFollowUpProgressNoteImpl@1412e75{urn:hl7-org:v3#//@clinicalDocument}' must be set
ERROR: The required feature 'effectiveTime' of 'org.openhealthtools.mdht.uml.cda.pilot.impl.TuberculosisFollowUpProgressNoteImpl@1412e75{urn:hl7-org:v3#//@clinicalDocument}' must be set
ERROR: The required feature 'confidentialityCode' of 'org.openhealthtools.mdht.uml.cda.pilot.impl.TuberculosisFollowUpProgressNoteImpl@1412e75{urn:hl7-org:v3#//@clinicalDocument}' must be set
ERROR: The feature 'author' of 'org.openhealthtools.mdht.uml.cda.pilot.impl.TuberculosisFollowUpProgressNoteImpl@1412e75{urn:hl7-org:v3#//@clinicalDocument}' with 0 values must have at least 1 values
ERROR: The required feature 'custodian' of 'org.openhealthtools.mdht.uml.cda.pilot.impl.TuberculosisFollowUpProgressNoteImpl@1412e75{urn:hl7-org:v3#//@clinicalDocument}' must be set
ERROR: CCD Results Section SHALL contain [1..1] text
ERROR: TBPN TB Results Section SHALL contain [1..1] text
INFO: TBPN TB Results Section MAY contain [0..*] entry such that it, SHALL contain [1..1] @typeCode="DRIV" DRIV (is derived from), SHALL contain [1..1] TB Result Organizer (templateId: 2.16.840.1.113883.10.20.15.3.21)
INFO: TBPN TB Results Section MAY contain [0..*] entry such that it, SHALL contain [1..1] @typeCode="DRIV" DRIV (is derived from), SHALL contain [1..1] TB Result Observation (templateId: 2.16.840.1.113883.10.20.15.3.13)
ERROR: The required feature 'statusCode' of 'org.openhealthtools.mdht.uml.cda.pilot.impl.TBResultOrganizerImpl@1dfc8a0{urn:hl7-org:v3#//@clinicalDocument/@component/@structuredBody/@component.0/@section/@entry.0/@organizer}' must be set
ERROR: CCD Result Organizer SHALL satisfy: Contains one or more sources of information.
ERROR: CCD Result Organizer SHALL contain [1..*] id
ERROR: CCD Result Organizer SHALL contain [1..1] statusCode
ERROR: TBPN TB Result Organizer SHALL contain [1..1] code, which SHALL be selected from ValueSet 2.16.840.1.114222.4.11.3205 Lab Test Result Name (TB) DYNAMIC
WARNING: CCD Result Observation SHOULD satisfy: Contain one or more referenceRange to show the normal range of values for the observation result
ERROR: CCD Result Observation SHALL satisfy: Contains one or more sources of information.
ERROR: CCD Result Observation SHALL contain [1..*] id
WARNING: CCD Result Observation SHOULD contain [1..1] effectiveTime
INFO: CCD Result Observation MAY contain [0..1] methodCode
WARNING: CCD Result Observation SHOULD contain [0..*] interpretationCode
ERROR: CCD Result Observation SHALL contain [1..1] value