IXML
  • 26 Sep 2023
  • 44 Minutes to read
  • Dark
    Light

IXML

  • Dark
    Light

Article summary

Table of Classes

Main POJOsSecondary POJOs
AllergyPlan
AddressHeader
POJO
    AllergyObservationBase64
Author   AuthenticatorCommonPojo
EncounterEncompassingEncounter
EffectiveTime   CustodianInfo
AdminPojo
FunctionalStatus
    High   HParticipant

    AssessmentScaleCare Plan POJOs
    Low   HieInfo

        ScaleSupportingGoal
Ethnicity   NextOfKin

    SelfCareHealthConcern
Gender   Patient

    StatusObservationIntervention
HtmlTableFormat   Id
Immunization
    Column   Recipient

Medication
Language  DocumentationOf

Payer
MaritalStatus

Problem
Organization

Procedure
Participant

ResultPanel
Performer

    Result
Person

SocialHistories
Race

    Caregiver
Religion

    CultureAndReligion
Sex

    HomeEnvironment
Status

    Pregnancy
Telecom

    SmokingStatus
Translation

    SocialHistory



    TobaccoUse



VitalSignGroup



    VitalSign



Intermediate XML is used in the process of creating CCDs. It's what mdht-restlet needs to generate on-demand CCDs, QRDA I, QRDA III, and FHIR records.

For further information, see the documentation for QRDA I and QRDA III.

Documents (Implementation Guide)

These were used primarily in creating the POJOs and populating the CCD using MDHT APIs.

TitleHL7 Implementation Guide for CDA® Release 2: Consolidated CDA Templates for Clinical Notes (US Realm) Draft Standard for Trial Use Release 2.1 Draft Standard for Trial Use August 2015 Volume 2—Templates and Supporting Material  
FilenameCDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_Templates_and_Supporting_Material.pdf, 906 pages

Implementation

See implementation details for sections, data types, etc. on each (major) POJO which indicates its relevant sections in the Implementation Guide.

Examples

The example tends to include the use of Base-level, Common, and Admin POJO fields as relevant. That these are "spared" from being explicitly included in the definition on the left (because they're inherited) is probably the most confusing aspect of the Java definitions. This is why the examples have been put there.

Document Types

Generate the following document types with mdht-restlet, as specified in the Header <doctype> field:

  1. CCDA
  2. QRDA I
  3. QRDA III
  4. Care Plan
  5. Unstructured

Base-level POJOs

Note:
Nothing in this group, neither POJO nor instance variable name, is ever seen in the IXML. These are for internal use only and appear here for informational purposes only. Similarly for CommonPojo and AdminPojo.
abstract class Pojo
{                             // internal-use only
  String       ____;          // name of the XML element causing this POJO to be created
  String       name;          // may or may not be identical to '____'; sometimes this is name in a significant way
  int          lineNumber;    // used to report errors in catalina.out
  DocumentType doctype;       // one of "CCDA", "QRDA I", "QRDA III", "Care Plan" or "Unstructured"
  String       vendor;        // name soliciting this generated document
  Integer      conformance;   // conformance year of the document
  boolean      validate;      // can turn off validation using <validate flag="false" /> (deprecated)
  String[]     required;      // validation: list of fields/children (by name) that must be present
  String[]     optional;      // validation: list of fields/children (by name) that are optional
  String[]     notes;         // validation: list of notes or suggestions
}

class Unknown extends Pojo    // applied to any IXML element that is not understood, at least temporarily
{                             // internal-use only
  String                elementname;
  Map< String, String > attributes;
  String                content;
}

Conformance

See field, conformance, above. For instance, conformance to chronologically advancing implementation guides from
CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_ 2019JUN with_errata.pdf to
CDAR2_IG_CCDA_CLINNOTES_R1_DSTU2.1_2015AUG_Vol2_ 2022SEP with_errata.pdf is done by injecting (e.g.) <conformance>2022</conformance> into the IXML header (after <doctype> is a good place). For CCDAs, this went into effect in mdht-restlet##3.5.0.

List of base-level POJOs

The POJOs below are used mostly as subordinates to other POJOs. Base64 is used to create instances of Unstructured Document (V2). This POJO results in the creation of a text element inside a nonXMLBody and optionally involves compression.

Source CodeIXML Sample
Address
class Address extends Pojo
{
  String         use;
  List< String > line;
  String         city;
  String         state;
  String         zipcode;
  String         country;
}
<address use="WP">
  <line>5242 Broadway Avenue</line>
  <line>#538</line>
  <city>New York</city>
  <state>NY</state>
  <zipcode>10001</zipcode>
  <country>US</country>
</address>
Authenticator
class Authenticator extends Pojo
{
  String         time;
  String         signaturecode;
  String         signaturetext;
}
<authenticator time="20220506093201"
               signaturecode="blah"
               signaturetext="blahblah" />
Base64
class Base64 extends Pojo
{
  String         mediatype;
  String         compression; // e.g.: "DF"
}
<base64 mediatype="application/pdf">
  TWFueSBoYW5kcyBtYWtlIGxpZ2h0IHdvcmsu==
</base64>
Patient
class Patient extends Pojo
{
  String         facilityoid;
  String         mrn;
  List< Id >     id;
  String         firstname;
  String         lastname;
  List< String > middlename;
  String         birthdate;
  Sex            gender;
  Race           race;
  Ethnicity      ethnicity;
  Language       language;
  MaritalStatus  maritalstatus;
  Religion       religion;
  Telecom        telecom;
  Address        address;
}
<header>
  <patient>
  <facilityoid>2.16.840.1.113883.3.6452</facilityoid>
  <mrn>665892</mrn>
  <id root="801.295.9626" extension="1955-01-18" />
  <id root="2.81.55.1034.16.22" extension="1996-09-11" />
  <firstname>Herman</firstname>
  <lastname>Munster</lastname>
  <birthdate>18561031000000+0000</birthdate>
  <gender code="M"
            codesystem="2.16.840.1.113883.5.1"
            codesystemname="AdministrativeGender"
            displayname="Male" />
  <race code="2106-4"
          codesystem="2.16.840.1.113883.6.238"
          codesystemname="Race & Ethnicity - CDC"
          displayname="Green" />
  <ethnicity code="2186-5"
               codesystem="2.16.840.1.113883.6.238"
               codesystemname="Race & Ethnicity - CDC"
               displayname="Not Hispanic or Latino" />
  <language code="eng"
              codesystem="2.16.840.1.113883.5.60"
              codesystemname="LanguageAbilityMode"
              displayname="Expressed spoken"
              proficiency="Good"
              preference="true" />
  <maritalstatus code="M"
                   codesystem="2.16.840.1.113883.5.2"
                   codesystemname="MaritalStatusCode"
                   displayname="Married" />
  <religion code="1013"
              codesystem="2.16.840.1.113883.5.1076"
              codesystemname="HL7 Religious Affiliation"
              displayname="Christian (non-Catholic, non-specific)" />
  <address use="HP">
      <line>1313 Mockingbird Lane</line>
      <city>Mockingbird Heights</city>
      <state>CA</state>
      <zipcode>90210</zipcode>
      <country>US</country>
    </address>
  </patient>

</header>

CustodianInfo
class CustodianInfo extends Pojo
{
  String  oid;
  String  name;
  Telecom telecom;
  Address address;
}
<header>
<custodianinfo>
    <oid>2.16.840.1.113883.3.6452</oid>
    <name>IMAT Solutions</name>
    <telecom use="WP">+1.844-772-6258</telecom>
    <address use="WP">
      <line>565 East Technology Avenue</line>
      <line>3300</line>
      <city>Orem</city>
      <state>UT</state>
      <zipcode>84097</zipcode>
      <country>US</country>
    </address>
  </custodianinfo>
</header>

It is often the case that the IMAT Solutions search engine knows about authors loosely associated with a patient's care without knowing which authors are associated with which concept (problem, procedure, vital sign, etc.). Such authors as are known may be placed in this POJO and will be generated in the CCD's <documentationOf ... /> section at the bottom of the header.

Source CodeIXML Sample
DocumentationOf
class DocumentationOf extends Pojo
{
  List< Author > authors;
}
      
<documentationOf>

  <authors>
    <author ... />
    <author ... />
    .
    .
    .
    <author ... />
  </authors>

</documentationOf>
EffectiveTime
class EffectiveTime extends Pojo
{
  Low  low;
  High high;
}

Header
class Header extends Pojo  
{
  DocumentType        doctype;
  String              vendor;
  String              codename;
  String              title;
  String              informationrecipientid;
  Patient             patient;
  HieInfo             hieinfo;
  CustodianInfo       custodianinfo;
  HParticipant        participant;
  List< NextOfKin >   nextofkin;
}
<header>
  <doctype>CCDA</doctype>
  <vendor>Dogpatch Mule 'n' Maternity</vendor>    <!-- optional -->
  <conformance>2023</conformance>                 <!-- optional -->
  <codename>Continuity of Care Document</codename>
  <title>Continuity of Care Document</title>
  <patient ... />
  <hieinfo ... />
  <custodianinfo ... />
  <hparticipant ... />                       <!-- immature as yet -->
  <kin>
    <nextofken 1 ... />
    <nextofken 2 ... />
    <nextofken n ... />
  </kin>
</header>
enum DocumentType
{
  UNKNOWN,
  CCDA,
  QRDA_I,
  QRDA_III
}

HieInfo
class HieInfo extends Pojo
{
  String  oid;
  String  name;
  String  telecom;
  Address address;
}
<header>

  <hieinfo>
    <name>Bronx RHIO</name>
    <telecom use="WP">tel:+1(718)708-6630</telecom>
    <oid>2.16.840.1.113883.3.371</oid>
    <address>
      <line>1776 Eastchester Road</line>
      <city>Bronx</city>
      <state>NY</state>
      <zipcode>10461</zipcode>
      <country>US</country>
    </address>
  </hieinfo>

</header>
High
class High extends Pojo
{
  String root;
  String extension;
}

Id
class Id extends Pojo  
{
  String  root;
  String  extension;
}
<header>
  <patient>  <!-- see this in example for Patient -->
    ...
    <id root="801.295.9626" extension="1955-01-18" />
    ...
  </patient>
</header>
Low
class Low extends Pojo
{
  String value;
}

NextOfKin
class NextOfKin extends Pojo  
{
  String         firstname;
  String         lastname;
  List< String > middlename;
  String         birthdate;
  Sex            gender;
  Race           race;
  Ethnicity      ethnicity;
  Address        address;
}
<header>
  <kin>

    <nextofkin>
      <firstname>Jack</firstname>
      <middlename>the</middlename>
      <middlename>infamous</middlename>
      <lastname>Ripper</lastname>
      <birthdate>18600131</birthdate>
      <gender code="M"
              codesystem="2.16.840.1.113883.5.1"
              codesystemname="AdministrativeGender"
              displayname="Male" />
      <race code="2106-4"
            codesystem="2.16.840.1.113883.6.238"
            codesystemname="Race & Ethnicity - CDC"
            displayname="Green" />
      <ethnicity code="2186-5"
                 codesystem="2.16.840.1.113883.6.238"
                 codesystemname="Race & Ethnicity - CDC"
                 displayname="Not Hispanic or Latino" />
      <address use="HP">  <!-- Scotland Yard wants to know! -->
        <line>Highstreet, 10</line>
        <city>Chelsea</city>
        <state>Greater London</state>
        <zipcode>SW10 0AB</zipcode>
        <country>UK</country>
      </address>
    </nextofkin>

  </kin>
</header>
Organization
class Organization extends Pojo
{
  String   name;
  String   facilityoid;*
  Telecom  telecom;
  Address  address;
}

*Warning: In times past, this field was id.
This confuses the SAX parser by failing to
parse and subsume constructs like vital signs
under larger collections. Hence, some data
sections go missing.

<organization>
  <name>Westinghouse Corporation</name>           <!-- facility name -->
  <facilityoid>2.4.87.932456.10.20.3</facilityoid>
  <telecom use="WP">+1617.232.0891</telecom>
  <address use="WP">
    <line>35 Medicine Avenue</line>
    <city>Westinghouse</city>
    <state>MA</state>
    <zipcode>02136</zipcode>
    <country>US</country>
  </address>
<organization>
HParticipant
class HParticipant extends Pojo
{
  String       typecode;
  String       classcode;
  String       certificationnumber;
  Organization organization;
  Person       person;
  Address      address; // (deprecated)
}
    
<header>

  <hparticipant>
    <typecode>VRF</typecode>
    <classcode>ASSIGNED</classcode>
    <certificationnumber>123456</certificationnumber>
    <organization ... />
  </hparticipant>

  <!-- and/or -->
  <hparticipant>
    <typecode>IND</typecode>
    <classcode>GUAR</classcode>
    <certificationnumber>123456</certificationnumber>
    <person ... />
  </hparticipant>

</header>
Person
class Person extends Pojo
{
  String          family;
  String          given;
  List < String > givens;
  String          prefix;
  String          suffix;
  String          npi;
  Telecom         telecom;
  Address         address;
}
<person>
  <family>Lewis</family>
  <first>Clive</first>
  <middle>Staples</middle>
  <middle>Jack</middle>
  <prefix>Prof.</prefix>
  <telecom use="HP">+44 01865 22 3333</telecom>
  <address use="HP">
    <line>The Kilns</line>
    <city>Oxford</city>
    <zipcode>OX1 1AF</zipcode>
    <country>UK</country>
  </address>
</person>
Recipient
class Recipient extends Pojo
{
  boolean      intended;
  Person       person;
  Organization organization;
}
<recipient intended="true">
  <person ... />
  <organization ... />
<recipient>

Used for <informationRecipient ... />

Telecom
class Telecom extends Pojo
{
  String use;
  String number;
}
    
<telecom use="HP">
  <number>+33 9 75.76.65.71</number>
</telecom>

Common (evolved) POJOs

CommonPojo doesn't appear in the IXML, but its instance variables appear—used as attributes on XML elements. Most CommonPojos directly represent sections; some are helpers used to enhance others by composition (as opposed to inheritance).

CommonPojo
class CommonPojo extends Pojo
{                         // internal-use only
  String classcode;       // attribute for CDA section, e.g.: OBS
  String moodcode;        // attribute for CDA section, e.g.: EVN
  String typecode;        // "2.16.840.1.113883.1.11.19601" (more often, "REFR", "SPRT", etc.)
  String startdate;       // "2017-05-02 12:21:36", "20180101000000", etc. or "" or leave field out
  String enddate;         // "2017-05-02 18:23:01", "20180201000000", etc. or "" or leave field out
  String code;            // "2670", "142496001", etc.
  String codesystem;      // "2.16.840.1.113883.6.88"
  String codesystemname;  // "RxNorm", "SNOMED", "LOINC", etc.
  String displayname;     // some formal or informal name, etc.
  String statuscode;      // "completed" or "active"
}
    

CommonPojo features many fields that are used in POJOs that subclass it.

  • classcode, moodcode and typecode are used in situations where the boilerplate cannot know and so IXML must say which.
  • startdate serves in effectivetime for low and also in those situations where it's the only time and there is no enddate (or high) semantically.
  • code, codesystem, codesystemname and displayname are a set of four crucially important codes used to generate MDHT CD or CEcodes in the CCD construct:
    <code code="" codeSystem="" codeSystemName="" displayName="" />
  • Some POJOs, like Problem(and others), must populate value codes with similar sets (to the four explain just above) in the CCD construct:
    <value code="" codeSystem="" codeSystemName="" displayName="" xsi:type="CD" />
    So it is that these POJOs must offer valuecode, valuecodesystem, valuecodesystemname and valuedisplayname in order to reduce confusion as to what construct they'll be used for. In the cases where a complete set of the four is not offered, the missing ones are guaranteed boilerplated.
  • statuscodeis used to supply the value in the construct:
    <statusCode code="completed|active" />
    Even if this value is established by boilerplate, it usually can be overridden.
  • Note that any attribute may be passed to an IXML element. If unrecognized, for example, it's an old, deprecated one, it will simply be ignored without any effect upon what's generated in the CCD.

The HtmlTableFormat POJO

This tailors the human-readable (HTML table) section generated in the CCDA for each principal section (such as Allergies, Encounters, Immunizations, Medications, Problems, Procedures, etc.). This element is usefully applied to any CommonPojo (listed further below) that's expected to provide a human-readable (HTML table) in the generated CCDA. Multiple or none of these definitions appear below the header and above the individual concept lists and their definitions.

Source CodeIXML Sample
HtmlTableFormat
class HtmlTableFormat 
{
  String         sectionname;
  List<  Column > columns;
}
<human-readable-formats>

  <htmltableformat sectionname="encounter">
    <column name="date/time"   source="author:time"                        empty="(no date)" />
    <column name="facility"    source="author:organization:name" />
    <column name="facilityoid" source="author:organization:facilityoid" />
    <column name="description" source="author:displayname" />
  </htmltableformat>

  <htmltableformat sectionname="procedure">
    <column name="date"        source="startdate" />
    <column name="description" source="displayname" />
    <column name="facility"    source="author:organization:name" />
  </htmltableformat>\n"

  ...

</human-readable-formats>
Column
class Column
{
  String name;    // header name for
                  the column (free form:
                  you may name this
                  anything you wish)
  String source;  // IXML CommonPojo
                  member providing 
                  the resource
  String empty;   // what to default
                  to in case of missing
                  resource
}
    

Failure to express attribute empty will cause default "(unknown)" to be substituted for data when the cell data/value is null or empty.

The CommonPojos that are candidates for this treatment are as follows. In the documented examples of some of these, you may find a small example of a column or two based on which you can fully define them. Failure to define an HTML table format override for a section will mean that the original, IMAT Solutions' default columns are used including the data implied (i.e.: what IMAT Solutions used to supply before creating this flexibility feature).

CCDAs
Allergy(sectioname="allergy")
Encounter(sectioname="encounter")
FunctionalStatus(sectioname="functional status")
Immunization(sectioname="immunization")
Medication(sectioname="medication")
Payer(sectioname="payer")
Problem(sectioname="problem")
Procedure(sectioname="procedure")
Result(sectioname="result")
SocialHistory(sectioname="social history")
SmokingStatus(sectioname="smoking status")
VitalSign(sectioname="vital sign")
Care Plans
Goal(sectioname="goal")
HealthConcern(sectioname="health concern")
Intervention(sectioname="intervention")
QRDA
No sections in QRDA I or III participate in explicit human-readable generation.

In the IXML examples below, where there is a <htmltableformat, it is usually the description of the IMAT Solutions default figuring in the explanation above. This means a) that you don't have to do anything (add <htmltableformat) to get that behavior, but b) the default given serves as a good place to start when you do wish to deviate from the default and build your own.

How to know which fieldnames of the POJO can serve as data sources

Not all instance variables (fields) are candidates for this feature. Written Java, obviously there is strict delineation between data and code. Consequently, we predict what you will want to use and annotate POJO fieldnames in this rather light, background color that are eligible.
If you wish to consume data from a field that isn't thus marked, please contact us.

When consuming fields from a list (or array) of subordinate elements of a POJO (a frequent example would be Translation), only the first (or zeroeth) element will be used. In an allergy instrumented thus:

<htmltableformat sectionname="allergy">
  ...
  <column name="type" source="allergyobservation:type" empty="(unknown type)" />
</htmltableformat>

Only the type of the first AllergyObservation will be considered no matter how many additional observations may exist.

Special framework extensions

Name-builder macro

Taking an example from Result for the formation of the primary-care physician's name, it's possible to dictate how that happens using a special syntax. Here's the example:

  <column name="author" source="author:person:name:prefix+given+middle+family" />

The way this works is to

  1. end the source syntax string with an element (name) that doesn't exist in the named POJO (Person), but that is descriptive of the result (though it doesn't matter—it's for documentary value).
  2. A final colon is added, then...
  3. elements by names that do exist for the POJO are added—separated by plus signs (+); these are used to source and format the individual fields they suggest.
OR'd sources

Taking an example from Encounter for the source of date, this value comes from the Problem if there is one. However, as not all Encounters have subordinate Problems, the date can come from the Encounter's startdate or enddate (not really in an encounter—it's just an example to illustrate OR) field thus:

<htmltableformat sectionname="encounter">
  ...
  <column name="date" source="problem:startdate|enddate" empty="(no date)" />
</htmltableformat>
AllergyObservation syntax enhancements

There is a syntactic mechanism in the HtmlTableFormat specification by which fields in the AllergyObservation can contribute to the human-readable (HTML table) for Allergies.

For example, an HR specification for Allergies in IXML might look like this:

<htmltableformat sectionname="allergy">
  <column name="date"        source="startdate"                                       empty="(date unknown)" />
  <column name="description" source="displayname"                                     empty="(no description)" />
  <column name="facility"    source="author:organization:name"                        empty="(facility unknown)" />
  <!-- the discriminant to match is understood to be in field 'type' of an allergyobservation: -->
  <column name="reaction"    source="allergyobservation:valuedisplayname[reaction]" empty="(no reaction)" />
  <column name="severity"    source="allergyobservation:valuedisplayname[severity]" empty="(no severity)" />
</htmltableformat>

The CCD output looks like this (highlighted lines correspond to the highlighted lines of the IXML specification above):

<title>Allergies and Intolerances</title>
<text>
  <table>
    <thead>
      <tr>
        <th> date </th>
        <th> description </th>
        <th> facility </th>
        <th>  reaction </th>
        <th>  severity </th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td> 2020-01-01 </td>
        <td> orange juice </td>
        <td> CharterCare </td>
        <td>  Swelling </td>
        <td>  Severe </td>
      </tr>
    </tbody>
  </table>
</text>

The more obscure details of this lie in mdht-restlet code running the list of AllergyObservations to pick the observation whose type matches the current specification's bracketed expression. There are two in the specification:

<column name="reaction" source="allergyobservation:valuedisplayname[ reaction]" />
<column name="severity" source="allergyobservation:valuedisplayname[ severity]" />

As we do not require that this list just happen to be in the same order as the specification's columns (i.e.: "reaction" first, then "severity"), we have to match the type to ensure we get the correct valuedisplayname as the data for the corresponding column. So, the mysterious detail of this implementation (for the IXML writer) would be that field type is implicitly involved. Hence, the comment in the documented specification sample.

Here we add the allergy observations as coded in the IXML which should help to remove this mystery. I purposely expressed them out of order for the purpose of demonstrating that the implementation is sensitive enough not to require it.

<allergyobservation type="severity"
                    valuecode="24484000"
                    valuecodesystem="2.16.840.1.113883.6.96"
                    valuecodesystemname="SNOMED"
                    valuedisplayname=" Severe" />
<allergyobservation type="reaction"
                    valuecode="65124004"
                    valuecodesystem="2.16.840.1.113883.6.96"
                    valuecodesystemname="SNOMED"
                    valuedisplayname=" Swelling" />

The Author, Participant, and Performer POJOs

Is a mere Pojo, but it's mostly consumed by other POJOs. Note that not every field in Person and Organization is required; in fact, most are not. For example, Person offers a telecom and address, but even if present, these will never be used (in Author). Similarly, Organization offers fields that will not be used in this context.

All authors furnished to any concept section are collected into a list, duplicates are dropped, then the whole list is added to the <documentationOf ... > section near the end of the header in the generated CCD.

AuthorIXML Sample
class Author extends Pojo
	{
  String       time;
  String       code;
  String       codesystem;
  String       codesystemname;
  String       displayname;
  Telecom      telecom;
  Address      address;
  Person       person;       // PCP and NPI
  Organization organization; // facility name and OID
}
<author time="202112090900+0000"
        code="163W00000X"
        codesystem="2.16.840.1.113883.5.53"
        codesystemname="Health Care Provider Taxonomy"
        displayname="Physician">
  <telecom>818 290-9233</telecom>     <!-- optional (encouraged) -->
  <address>                           <!-- optional; used if present -->
    <line>32089 Rodeo Drive</line>
    <city>Beverly Hills</city>
    <state>CA</state>
    <zipcode>90210</zipcode>
    <country>US</country>
  </address>
  <person>
    <family>Seymore</family>          <!-- optional (encouraged)* -->
    <given>Jane</given>            <!-- optional (encouraged)* -->
    <middle>J.</middle>               <!-- optional* -->
    <suffix>MD</suffix>               <!-- optional (encouraged)* -->
    <npi>665892</npi>                 <!-- required for NPI -->
	<!-- any other fields
         from Person are ignored -->
  </person>                           <!-- *used to create PCP if present -->
  <organization>
    <name>Beverly Hills Clinic</name>                   <!-- required facility name -->
    <facilityoid>2.16.840.1.113883.19.42</facilityoid>  <!-- required facility OID -->
	<!-- any other fields
         added to Organization are ignored -->
  </organization>
</author>

<htmltableformat>              <!-- human-readability (column) examples -->
  <column name="npi"           source="author:person:npi"               empty="(unidentified)" />
  <column name="facility name" source="author:organization:name"        empty="(unknown)" />
  <column name="facility oid"  source="author:organization:facilityoid" empty="(unknown)" />
</htmltableformat>

CommonPojo's facilityname, facilityoid, pcp (primary-care physician) and npi (National Provider Identifier) used to be fields shared in common (to all POJOs subclassing CommonPojo). One or more of these were often passed as attribute values. This no longer serves any purpose; this practice has been deprecated. The proper source of this information is in the Author associated with the POJO in question (if expressed):

fieldnamepresent, expected source
facilitynameFrom Organizationname
facilityoidFrom Organizationfacilityoid
pcpFrom Personfamily, given, suffix
npiFrom Personnpi

In generating CCDAs, Author is consumed by the following subclasses of CommonPojo:

  1. Allergy
  2. SelfCare ( FunctionalStatus)
  3. StatusObservation ( FunctionalStatus)
  4. Immunization
  5. Medication
  6. Problem
  7. Procedure
  8. ResultPanel
  9. SocialHistory ( SocialHistories)
  10. SmokingStatus ( SocialHistories)
  11. VitalSignGroup
  12. VitalSign

But, these do not accommodate any Author:

  1. Encounter (has a list of Problems each of which accommodates Author)
  2. FunctionalStatus (⅔ of subsections accommodate Author)
  3. Payer (immature, not really used presently, may change)
  4. Result (parent ResultPanel accommodates the Author for all Results)

Participant

Participant is not ubiquitous; it's currently only supported by Encounter.

ParticipantIXML Sample
class Participant extends Pojo
{
  String       name;      // of Service Delivery Location
  String       code;
  String       codesystem;
  String       codesystemname;
  String       displayname;
  Telecom      telecom;
  Address      address;
}
<participant code="163W00000X"
          codesystem="2.16.840.1.113883.5.53"               <!-- boilerplated from code -->
          codesystemname="Health Care Provider Taxonomy"    <!-- ibid -->
          displayname="Physician"                           <!-- ibid -->
          name="Catskills Health Clinic">                   <!-- playing entity -->
  <telecom>818 290-9233</telecom>
  <address>
    <line>32089 Rodeo Drive</line>
    <city>Beverly Hills</city>
    <state>CA</state>
    <zipcode>90210</zipcode>
    <country>US</country>
  </address>
</participant>

Service Delivery Location

Performer

Performer is very similar to Author. It is not ubiquitous; it's currently only supported by Encounter.

PerformerIXML Sample
class Performer extends Pojo
{
  String       code;
  String       codesystem;
  String       codesystemname;
  String       displayname;
  String       functioncode;
  String       functioncodesystem;
  String       functioncodesystemname;
  String       functiondisplayname;
  String       originaltext;
  Telecom      telecom;
  Address      address;
}
<performer code="163W00000X"
        codesystem="2.16.840.1.113883.5.53"
        codesystemname="Health Care Provider Taxonomy"
        displayname="Physician"
        functioncode="PCP"
        functioncodesystem="2.16.840.1.113883.5.88"
        functioncodesystemname="ParticipationFunction"
        functiondisplayname="Primary Care Provider"
        originaltext="This is a test of the Emergency Broadcast System.">
  <telecom>818 290-9233</telecom>
  <address>
    <line>32089 Rodeo Drive</line>
    <city>Beverly Hills</city>
    <state>CA</state>
    <zipcode>90210</zipcode>
    <country>US</country>
  </address>
  <person>
    <family>Seymore</family>
    <given>Jane</given>
    <middle>J.</middle>                                 <!-- optional* -->
    <suffix>MD</suffix>                                 <!-- optional (encouraged)* -->
    <npi>665892</npi>                                   <!-- required for NPI -->
    <telecom ... />
    <address ... />
  </person>
  <organization>
    <name>Beverly Hills Clinic</name>                   <!-- required facility name -->
    <facilityoid>2.16.840.1.113883.19.42</facilityoid>  <!-- required facility OID -->
    <telecom ... />
    <address ... />
  </organization>
</performer>

Other consumed POJOs

These only serve in subordinate roles to principal POJOs.

These translations correspond to translation noted in the Implementation Guide as generated under <code> constructs. In general, if any of these tetracodes is missing, you're inviting trouble. In some cases, absence will cause "subtranslations" to occur or the translation will be constructed with null or missing values.

TranslationIXML Sample
class Translation extends Pojo
{
  String code;
  String codesystem;
  String codesystemname;
  String displayname;
}
<!-- for handling non-SNOMED setCode() in act, observation, etc. -->
<translation code="345678"
             codesystem="2.4.6.8.10.12"
             codesystemname="This isn't a code system"
             displayname="This is a translation of a code system" />

Principal POJOs

Usually atop CommonPojos, these are used to build the CCDA section by section.

Important note:  All these CommonPojo subclasses offer not only the fields explicitly documented, but also all the fields in superclass CommonPojo such as (especially) code, codesystem, etc. These fields are crucially relevant.
Source CodeIXML Sample
Allergy
class Allergy extends CommonPojo
{
  Author                     author;
  String                     observationstatuscode;
  Author                     observationauthor;
  List< AllergyObservation > allergyobservation;
}
<allergies>

  <allergy startdate="201212250900"
           code="1000082"
           codesystem="2.16.840.1.113883.6.88"
           codesystemname="RxNorm"
           displayname="Christmas candy"
           statuscode="active"
           observationstatuscode="completed"
           displayname="Christmas candy">
    <author ... />
    <observationauthor time="202112090900+0000"
                       code="163W00000X"
                       codesystem="2.16.840.1.113883.5.53"
                       codesystemname="Health Care Provider Taxonomy"
                       displayname="Physician">
       <telecom>818 290-9233<telecom>
       <!-- works like any ordinary author -->
         ...
    </observationauthor>

    <allergyobservation ... />
  </allergy>

</allergies>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="allergy">
    <column name="date"        source="startdate" />
    <column name="description" source="displayname" />
    <column name="facility"    source="author:organization:name" />
    <!-- the discriminant to match is understood to be in field 'type' of an allergyobservation: -->
    <column name="reaction"    source="allergyobservation:valuedisplayname[reaction]" empty="(no reaction)" />
    <column name="severity"    source="allergyobservation:valuedisplayname[severity]" empty="(no severity)" />
  </htmltableformat>
</htmltableformats>
    

Allergies and Intolerances Section (V3)
Allergy Concern Act (V3)
Allergy—Intolerance Observation (V2)


AllergyObservation
class AllergyObservation extends CommonPojo
{
  String type;  ("reaction" or "severity")
  String valuecode;
  String valuecodesystem;
  String valuecodesystemname;
  String valuedisplayname;
}
<allergies>

  <allergy ...>
    <allergyobservation type="severity"
                        valuecode="24484000"
                        valuecodesystem="2.16.840.1.113883.6.96"
                        valuecodesystemname="SNOMED"
                        valuedisplayname="Severe" />
    <allergyobservation type="reaction"
                        valuecode="65124004"
                        valuecodesystem="2.16.840.1.113883.6.96"
                        valuecodesystemname="SNOMED"
                        valuedisplayname="Swelling" />
  </allergy>

</allergies>

Reaction Observation (V2)
Severity Observation (V2)

EncompassingEncounter
class EncmpassingEncounter extends CommonPojo
{
  String root;
  String extension;
  String facilityroot;
}
    
<encompassingencounter root="2.16.840.1.113883.19"
                       extension="9937012"
                       facilityroot="2.16.540.1.113883.19.2" />
    
Encounter
class Encounter extends CommonPojo
{
  List< Translation > translation;
  List< Problem >     problems;
  Performer           performer;
  Participant         participant;
}
    
<encounters>

  <encounter startdate="20120528"
             code="99213"
             codesystemname="CPT-4"
             codesystem="2.16.840.1.113883.6.12"
             displayname="Office outpatient visit 15 minutes">
    <translation ... />
    <performer ... />
    <participant ... />
    <problems>
      <problem 1 ... />
      <problem 2 ... />
      <problem n ... />
    </problems>
  </encounter>

</encounters>

<htmltableformats>          <!-- human-readability example -->
  <htmltableformat sectionname="encounter">
    <column name="type"        source="displayname" />
    <column name="date"        source="problem:startdate" empty="(no date)" />
    <column name="description" source="problem:valuedisplayname" />          <!-- description requires a problem -->
    <column name="facility"    source="problem:author:organization:name" />  <!-- facility name requires a problem -->
  </htmltableformat>
</htmltableformats>
    

Encounters Section (V3)
Encounter Activity (V3)
Encounter Diagnosis (V3)
Problem Observation (V3)


FunctionalStatus
class FunctionalStatus extends CommonPojo
{
  List< StatusObservation > statusobservation;
  List< AssessmentScale >   assessmentscale;
  List< SelfCare >          selfcare;
}
<functionalstatusdetails>

  <functionalstatus>
    <statusobservation startdate="20130309"
                       code="129035000"
                       codesystem="2.16.840.1.113883.6.96"
                       codesystemname="SNOMED CT"
                       displayname="Mental status" />
    <statusobservation startdate="20130311"
                       code="129035000"
                       codesystem="2.16.840.1.113883.6.96"
                       codesystemname="SNOMED CT"
                       displayname="independent with dressing">
      <author ... />
    </statusobservation>
    <assessmentscale startdate="20120214"
                     code="54614-3"
                     codesystem="2.16.840.1.113883.6.1"
                     codesystemname="LOINC"
                     displayname="Brief Interview for Mental Status"
                     value="7">
      <scalesupporting code="248240001"
                       codesystem="2.16.840.1.113883.6.96"
                       codesystemname="SNOMED"
                       displayname="motor response"
                       value="3" />
    </assessmentscale>
    <selfcare startdate="20130311"
              code="46482-6"
              codesystem="2.16.840.1.113883.6.1"
              codesystemname="LOINC"
              displayname="Transferring"
              valuecode="371153006"
              valuecodesystem="2.16.840.1.113883.6.96"
              valuecodesystemname="SNOMED CT"
              valuedisplayname="Independent">
      <author ... />
    </selfcare>
  </functionalstatus>

</functionalstatusdetails>

<htmltableformats>          <!-- human-readability example -->
    <htmltableformat sectionname="functional status">
      <column name="date"   source="startdate" />
      <column name="author" source="author:person:family" />  <!-- need system to forumulate suffix given family -->
      <column name="value"  source="value" />
    </htmltableformat>
</htmltableformats>

Functional Status Section:
Functional Status Observation (V2)
Assessment Scale Observation
Assessment Scale Supporting Observation
Self-care Activities


    StatusObservation
class StatusObservation extends CommonPojo
{
  Author author;
}
<functionalstatus>

  <statusobservation startdate="20130309"
                    code="129035000"
                    codesystem="2.16.840.1.113883.6.96"
                    codesystemname="SNOMED CT"
                    displayname="Mental status" />
  <statusobservation startdate="20130311"
                    code="129035000"
                    codesystem="2.16.840.1.113883.6.96"
                    codesystemname="SNOMED CT"
                    displayname="independent with dressing">
    <author ... />
  </statusobservation>

<functionalstatus>
    
    AssessmentScale
class AssessmentScale extends CommonPojo
{
  String          value;
  ScaleSupporting scalesupporting;
}
<functionalstatusdetails>
  <functionalstatus>
    <statusobservation ... >
      <author ... />
    </statusobservation>

    <assessmentscale startdate="20120214"
                     code="54614-3"
                     codesystem="2.16.840.1.113883.6.1"
                     codesystemname="LOINC" value="7"
                     displayname="Brief Interview for Mental Status"
                     value="7">
      <scalesupporting code="248240001"
                       codesystem="2.16.840.1.113883.6.96"
                       codesystemname="SNOMED"
                       displayname="motor response"
                       value="3" />
    </assessmentscale>

    <selfcare ... >
      <author ... />
    </selfcare>
  </functionalstatus>
</functionalstatusdetails>
      ScaleSupporting
class ScaleSupporting extends CommonPojo  
{
  String value;
}
<functionalstatusdetails>
  <functionalstatus>
    <assessmentscale startdate="20120214"
                     code="54614-3"
                     codesystem="2.16.840.1.113883.6.1"
                     codesystemname="LOINC" value="7"
                     displayname="Brief Interview for Mental Status">

      <scalesupporting code="248240001"
                       codesystem="2.16.840.1.113883.6.96"
                       codesystemname="SNOMED"
                       displayname="motor response"
                       value="3" />

    </assessmentscale>
  </functionalstatus>
</functionalstatusdetails>
    SelfCare
class SelfCare extends CommonPojo
{
  String valuecode;
  String valuecodesystem;
  String valuecodesystemname;
  String valuedisplayname;
  Author author;
}
<functionalstatusdetails>
  <functionalstatus>
    <statusobservation ... >
      <author ... />
    </statusobservation>
    <assessmentscale ... />
      <scalesupporting ... />
    </assessmentscale>

    <selfcare startdate="20130311"
              code="46482-6"
              codesystem="2.16.840.1.113883.6.1"
              codesystemname="LOINC"
              displayname="Transferring"
              valuecode="371153006"
              valuecodesystem="2.16.840.1.113883.6.96"
              valuecodesystemname="SNOMED CT"
              valuedisplayname="Independent">
      <author ... />
    </selfcare>

  </functionalstatus>
</functionalstatusdetails>
Goal
class Goal extends CommonPojo
{
  String value;
  String unit;
  Author author;
}
    
<goal startdate="20220511141903"
      enddate="20220515151903"
      code="59408-5"
      codesystem="2.16.840.1.113883.6.1"
      codesystemname="LOINC"
      displayname="Oxygen saturation in Arterial blood by Pulse oximetry"
      value="92"
      unit="%">
  <author time="201308011235-0800"
          code="163W00000X"
          codesystem="2.16.840.1.113883.19.42"
          codesystemname="Health Care Provider Taxonomy"
          displayname="Beverly Hills Clinic">
    <telecom>818 290-9233</telecom>
    <address>
      <line>32089 Rodeo Drive</line>
      <city>Beverly Hills</city>
      <state>CA</state>
      <zipcode>90210</zipcode>
      <country>US</country>
    </address>
    <person>
      <family>Seymore</family>
      <given>Jane</given>
      <middle>J.</middle>
      <suffix>MD</suffix>
      <npi>665892</npi>
    </person>
  </author>
</goal>

<htmltableformats>          <!-- human-readability example -->
    <htmltableformat sectionname="goal">
      <column name="dates"     source="startdate"/>
      <column name="documents" source="displayname"/>
    </htmltableformat>
</htmltableformats>
    

Goals Section
Goal Observation Identifier


HealthConcern
class HealthConcern extends CommonPojo
{
  Author author;
}
    
<healthconcerns>

  <healthconcern startdate="20220511141903"
                 enddate="20220515151903">
    <author time="201308011235-0800"
            code="163W00000X"
            codesystem="2.16.840.1.113883.19.42"
            codesystemname="Health Care Provider Taxonomy"
            displayname="Beverly Hills Clinic">
      <telecom>818 290-9233</telecom>
      <address>
        <line>32089 Rodeo Drive</line>
        <city>Beverly Hills</city>
        <state>CA</state>
        <zipcode>90210</zipcode>
        <country>US</country>
      </address>
      <person>
        <family>Seymore</family>
        <given>Jane</given>
        <middle>J.</middle>
        <suffix>MD</suffix>
        <npi>665892</npi>
      </person>
    </author>
  </healthconcern>

</healthconcerns>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="health concern">
    <column name="date"        source="startdate" />
    <column name="description" source="displayname" />
  </htmltableformats>
</htmltableformats>
    

Heath Concerns Section (V2)
Health Status Observation (V2)
Health Concern Act (V2)

Immunization
class Immunization extends CommonPojo
{
  boolean             negation;  // false (default)
  String              value;
  String              unit;
  List< Translation > translation;
  Author              author;
}
<immunizations>

  <immunization negation="false"
                startdate="20201007000000+0000"
                enddate="20201007000000+0000"
                value="7.0"                    <!-- for dose quantity -->
                unit="mg/DL"
                code="106"
                codesystem="2.16.840.1.113883.12.292"
                codesystemname="CVX"
                displayname="diphtheria">
    <translation code="345678"
                 codesystem="2.4.6.8.10.12"
                 codesystemname="This isn't a code system"
                 displayname="This is a translation of a code system" />
    <author time="201308011235-0800"
            code="163W00000X"
            codesystem="2.16.840.1.113883.19.42"
            codesystemname="Health Care Provider Taxonomy"
            displayname="Beverly Hills Clinic">
      <telecom>818 290-9233</telecom>
      <address>
        <line>32089 Rodeo Drive</line>
        <city>Beverly Hills</city>
        <state>CA</state>
        <zipcode>90210</zipcode>
        <country>US</country>
      </address>
      <person>
        <family>Seymore</family>
        <given>Jane</given>
        <middle>J.</middle>
        <suffix>MD</suffix>
        <npi>665892</npi>
      </person>
    </author>
  </immunization>

</immunizations>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="immunization">
    <column name="date"        source="startdate" />
    <column name="description" source="displayname" />
    <column name="facility"    source="author:organization:name" />
  </htmltableformats>
</htmltableformats>

Immunization Section (V3)
Immunization Activity (V3)
Immunization Medication Information (V2)


Intervention
class Intervention extends CommonPojo
{
  String                order;    //one of "Intervention 
                                  Act (V2)" (default),
                                  //"Planned Intervention
                                  Act (V2)"or
                                  //"Handoff Communication
                                  Participants"
  String                moodcode; //one of "APT", "ARQ",
                                  "INT","PRMS", "PRP"
                                  or "RQO"
  List< Author >        author;
  List< HParticipant >  hparticipant;
} 
<intervention startdate="20220511141903"
              enddate="20220515151903"
              order="Planned Intervention Act (V2)"
              moodcode="APT">
  <author time="201308011235-0800"
          code="163W00000X"
          codesystem="2.16.840.1.113883.19.42"
          codesystemname="Health Care Provider Taxonomy"
          displayname="Beverly Hills Clinic">
    <telecom>818 290-9233</telecom>
    <address>
      <line>32089 Rodeo Drive</line>
      <city>Beverly Hills</city>
      <state>CA</state>
      <zipcode>90210</zipcode>
      <country>US</country>
    </address>
    <person>
      <family>Seymore</family>
      <given>Jane</given>
      <middle>J.</middle>
      <suffix>MD</suffix>
      <npi>665892</npi>
    </person>
  </author>
</intervention>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="intervention">
    <column name="date"        source="startdate" />
    <column name="description" source="valuedisplayname" />
    <column name="facility"    source="author:organization:name" />
  </htmltableformat>
</htmltableformats>

Interventions Section (V3)
Intervention Act (V2)
Planned Intervention Act (V2)
Handoff Communication Participants


Medication
class Medication extends CommonPojo
{
  String              value;
  String              repeatnumber;
  String              approachsitecode;
  String              approachsitecodesystem;
  String              approachsitecodesystemname;
  String              approachsitedisplayname;
  String              ratequantity;
  String              ratequantityunits;
  String              maxdosequantitynumerator;
  String              maxdosequantitydenominator;
  String              administrationunitcode;
  String              administrationunitcodesystem;
  String              administrationunitcodesystemname;
  String              administrationunitdisplayname;
  String              materialcode;
  String              materialcodesystem;
  String              materialcodesystemname;
  String              materialdisplayname;
  String              routecode;
  String              routecodesystem;
  String              routecodesystemname;
  String              routedisplayname;
  Immunization        immunization;
  List< Translation > translation;
  Author              author;
}
<medications>

  <medication startdate="20200706000000+0000"
              enddate="20200706000000+0000"
              code="198473"
              codesystem="2.16.840.1.113883.6.88"
              codesystemname="RXNORM"
              displayname="Aspirin 600 MG Rectal Suppository"
              .
              .
              . />
    <immunization ... /> <!-- (when medication is an immunization) -->
    <translation ... />
    <author ... />
  </medication>

</medications>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="medication">
    <column name="date"        source="startdate" />
    <column name="description" source="displayname" />
    <column name="facility"    source="author:organization:name" />
  </htmltableformats>
</htmltableformats>

Medications Section (V2)
Medication Activity (V2)
Medication Information (V2)


Payer
class Payer extends CommonPojo
{
  String translationcode;
  String translationdisplayname;
}
<payers>

  <payer startdate="20210411"
         enddate="20210411"
         statuscode="completed"
         code="12"
         codesystem="2.16.840.1.113883.6.255.1336"
         codesystemname="Insurance Type Code (x12N-1336)"
         displayname="Medicare Secondary Working"
         translationcode="2" translationdisplayname="Medicare"
         organizationname="Transylvanian Emigres Health">
    <person>
      <family>Munster</family>
      <given>Lily</given>
      <given>Dracula</given>
      <prefix>Mrs.</prefix>
    </person>
    <telecom use="HP">+400745-443 444</telecom>
    <address use="HP">
      <line>Str. Maslinului nr. 16A</line>
      <city>Bucharest</city>
      <state>Bucharest</state>
      <country>RO</country>
    </address>
  </payer>

</payers>

<htmltableformats>     <!-- human-readability example -->
  <htmltableformat sectionname="payer">
  </htmltableformat>
</htmltableformats>

Payers Section (V3)
Coverage Activity (V3)
Policy Activity (V3)


Plan
class Plan extends CommonPojo
{
  Author author;
}
<assessments>

  <plan startdate="20210411"
         enddate="20210411"
         statuscode="completed"
         code="12"
         codesystem="2.16.840.1.113883.6.255.1336"
         codesystemname="Insurance Type Code (x12N-1336)"
         displayname="Medicare Secondary Working" />
    <author ... />
  </plan>

</assessments>

Assessment and Plan Section (V2)
Planned Act (V2)
—as yet never generated


Problem
class Problem extends CommonPojo
{
  String              translationcode;
  String              translationcodesystem;
  String              translationcodesystemname;
  String              translationdisplayname;
  String              valuecode;
  String              valuecodesystem;
  String              valuecodesystemname;
  String              valuedisplayname;
  List< Translation > translation;
  Author              author;
}
<problems>

  <problem startdate="20120222"          <!-- SHALL -->
           enddate=""                    <!-- MAY -->
           <!-- this goes into Problem Observation (V3) -->
           code="99645-9"
           codesystem="2.16.840.1.113883.6.90"
           codesystemname="SNOMED"       <!-- must be SNOMED -->
           displayname="Acquired absence of unspecified breast and nipple"
           translationcode="Z90.10"      <!-- translation of above to non-SNOMED -->
           translationcodesystem="2.16.840.1.113883.6.90"
           translationcodesystemname="ICD10"
           translationdisplayname="Acquired absence of unspecified breast and nipple"
           valuecode="Z90.10"
           valuecodesystem="2.16.840.1.113883.6.90"
           valuecodesystemname="ICD10"
           valuedisplayname="Acquired absence of unspecified breast and nipple">
    <translation code="345678"            <!-- used for <value ... /> above -->
                 codesystem="2.4.6.8.10.12"
                 codesystemname="This isn't a code system"
                 displayname="This is a translation of a code system" />
    <author ... />
  </problem>

</problems>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="problem">
    <column name="date"        source="startdate" />
    <column name="description" source="valuedisplayname" />
    <column name="facility"    source="author:organization:name" />
  </htmltableformat>
</htmltableformats>

Problem Section (V3)
Problem Concern Act (V3)
Problem Concern Act (V3)
Problem Observation (V3)


Procedure
class Procedure extends CommonPojo
{
  String value;
  String units;
  String targetsitecode; // (SHOULD, probably missing)
  String targetsitecodesystem;
  String targetsitecodesystemname;
  String targetsitedisplayname;
  String activity;       // "observation" (default),
                         // "procedure" or "act"
  Author author;
}
<procedures>

  <procedure startdate="19771006000000+0000"
             enddate="19771006000000+0000"
             code="37894004"
             codesystem="2.16.840.1.113883.6.96"
             codesystemname="SNOMED"
             displayname="Evaluation and management of new patient (procedure)"
             targetsitecode="28273000"
             targetsitecodesystem="2.16.840.1.113883.6.96"
             targetsitecodesystemname="SNOMED CT"
             targetsitedisplayname="bile duct"
             activity="observation">
    <author ... />
  </procedure>

</procedures>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="procedure">
    <column name="date"        source="startdate" />
    <column name="description" source="displayname" />
    <column name="facility"    source="author:organization:name" />
  </htmltableformat>
</htmltableformats>

Procedures Section (V2)
Procedure Activity Observation (V2)
Procedure Activity Procedure (V2)
Procedure Activity Act (V2)


ResultPanel
class ResultPanel extends CommonPojo
{
  String         classcode;  (default is BATTERY)
  Author         author;
  List< Result > result;
}
<resultpanels>

  <resultpanel startdate="20171108"
               enddate="20171108"
               code="70161-5"
               codeSystem="2.16.840.1.113883.6.1"
               codeSystemName="LOINC"
               displayname="Chlamydia trachomatis">
    <author time="201308011235-0800"
            code="163W00000X"
            codesystem="88"
            codesystemname="Health Care Provider Taxonomy"
            displayname="Dogpatch Mule 'n' Maternity">
      <telecom>615 349-7777</telecom>
      <address>
        <line>Main Street</line>
        <city>Dogpatch</city>
        <state>TN</state>
        <zipcode>37026</zipcode>
        <country>US</country>
      </address>
      <person>
        <family>Mamie</family>
        <given>Yokum</given>
        <suffix>MD</suffix>
        <npi>1234</npi>
      </person>
    </author>
    <result 1 ... />
    <result 2 ... />
    <result n ... />
  </resultpanel>

</resultpanels>
(See Result.)
    Result
class Result extends CommonPojo
{
  String              value;
  String              unit;
  String              interpretationcode;
  String              interpretationcodesystem;
  String              observationlowvalue;
  String              observationhighvalue;
  String              observationunit;
  String              observationtext;
  List< Translation > translation;
}
    
<resultpanels>

  <resultpanel ... >
    <author ... />

    <result startdate="20200203000000+0000"
            code="_31777-6"
            codesystem="2.16.840.1.113883.6.1"
            codesystemname="LOINC"
            displayname="Chlamydia trachomatis Ag Presence in Unspecified specimen"
            interpretationcode="Jiminy Cricket"
            interpretationcodesystem="1.2.3.4.5.6"
            value="8"
            unit="mg"
            observationlowvalue="1"
            observationhighvalue="2.9"
            observationunit="%"
            observationtext="Fun, fun, fun, 'til Daddy takes the T-bird away!" />

  </resultpanel>
</resultpanels>

<htmltableformats>                <!-- human-readability example -->
  <htmltableformat sectionname="result">
    <column name="lab"            source="displayname" />
    <column name="date"           source="startdate" />
    <column name="author"         source="author:person:name:prefix+given+middle+family" />
    <column name="facility"       source="author:organization:name" />
    <column name="value"          source="value" />
    <column name="unit"           source="unit" />
    <column name="interpretation" source="interpretationcode" />
  </htmltableformat>
</htmltableformats>
    

Results Section (V3)
Result Organizer (V3)
Result Observation (V3)

Note: despite <htmltableformat ... /> or not, each result panel leads to the generation in the
human-readable (HTML) section of row banners. These make use of ResultPanel.displayname
and are notaffected by anything put into the flexible human-readable mechanism.

SocialHistories
class SocialHistories extends CommonPojo
{
  List< SocialHistory >      socialhistories;
  List< SmokingStatus >      smokingstatus;
  List<  Pregnancy >          pregnancies;
  List<  TobaccoUse >         tobaccouses;
  List<  Caregiver >          caregivers;
  List<  CultureAndReligion > culturesandreligions;
  List<  HomeEnvironment >    homeenvironments;
}
    
<socialhistories>

  <socialhistory ... />
  <smokingstatus ... />

  <!-- not yet supported: -->
  <pregnancy ... />
  <tobaccouse ... />
  <caregiver ... />
  <cultureandreligion ... />
  <homeenvironment ... />

</socialhistories>
    
(See SocialHistory.)
    SocialHistory
class SocialHistory extends CommonPojo
{
  String              value;
  List< Translation > translation;
  Author              author;
}
    
<socialhistories>

  <!-- codesystem and codesystemname are boilerplated if forgotten -->
  <socialhistory startdate="20180110"
                 enddate="20210531"
                 value="1"                                <!-- optional, but SHOULD -->
                 code="102487004"
                 codesystem="2.16.840.1.113883.6.96"      <!-- (boilerplated) -->
                 codesystemname="SNOMED_CT"               <!-- (boilerplated) -->
                 displayname="Environmental risk factor"> <!-- (HTML table cell) -->
    <translation ... />
    <author ... />
  </socialhistory>

</socialhistories>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="social history">
    <column name="date"        source="startdate" />
    <column name="description" source="displayname" />
    <column name="facility"    source="author:organization:name" />
  </htmltableformat>
</htmltableformats>
    

Social History Section (V3)
Social History Observation (V3)


    SmokingStatus
Class SmokingStatus extends CommonPojo
{
  String              valuecode;
  String              valuecodesystem;
  String              valuecodesystemname;
  String              valuedisplayname;
  List< Translation > translation;
  Author              author;
}
    
<socialhistories>

  <!-- code, codesystem, etc. are boilerplated -->
  <!-- valuecode is not boilerplated -->
  <!-- valuecode and valuecodesystem are smoking status current observations -->
  <!-- valuecodesystem and valuecodesystemname are boilerplated if forgotten -->
  <smokingstatus startdate="20130311"
                 enddate="20200104"
                 code="81229-7"                           // (boilerplated)
                 codesystem="LA26103-4"                   // (boilerplated)
                 codesystemname="LOINC"                   // (boilerplated)
                 displayname="Former smoker"              // (boilerplated)
                 valuecode="449868002"
                 valuecodesystem="2.16.840.1.113883.6.96" // (boilerplated)
                 valuecodesystemname="SNOMED CT"          // (boilerplated)
                 valuedisplayname="Heavy tobacco smoker"> // (HTML table cell)
    <author ... />
  </smokingstatus>

</socialhistories>

<htmltableformats>             <!-- human-readability example -->
  <htmltableformat sectionname="smoking status">
    <column name="date"        source="startdate" />
    <column name="description" source="valuedisplayname" />
    <column name="facility"    source="author:organization:name" />
  </htmltableformat>
</htmltableformats>
    

Smoking Status—Meaningful Use (V2)


VitalSignGroup
class VitalSignGroup extends CommonPojo
{
  Author            author;
  List< VitalSign > vitalsign;
}
    
<vitalsigngroups>

  <vitalsigngroup startdate="20171108"
                  enddate="20171108"
                  <!-- code, codesystem, codesystemname
                       and displayname are boilerplated -->
                  >
    <author ... />
    <vital 1 ... />
    <vital 2 ... />
    <vital n ... />
  </vitalsigngroup>

</vitalsigngroups>
    
(See VitalSign.)
    VitalSign
Class VitalSign extends CommonPojo
{
  String              value;
  String              units;
  List< Translation > translation;
  Author              author;
}
    
<vitalsigngroups>
  <vitalsigngroup startdate="20171108"
               enddate="20171108"
               <!-- code, codesystem, codesystemname
                    and valuecodedisplayname are boilerplated -->
               >
    <author ... />

    <vital startdate="20180803"
           enddate="20180803"
           code="46680005"
           codesystem="2.16.840.1.113883.6.96"
           codesystemname="SNOMED CT"
           displayname="BP diastolic"
           statuscode="completed"
           value="80" <!-- must be convertible to floating-point -->
           units="mm[Hg]">
      <translation code="74728-7"
                   codesystem="2.16.840.1.113883.6.1"
                   codesystemname="LOINC"
                   displayname="BP diastolic" />
      <author ... />
    </vital>

  </vitalsigngroup>
</vitalsigngroups>

<!-- legacy format (still supported) -->
<vitals>

  <vital startdate="20180803"
         enddate="20180803"
         code="46680005"
         codesystem="2.16.840.1.113883.6.96"
         codesystemname="SNOMED CT"
         displayname="BP diastolic"
         statuscode="completed"
         value="80" <!-- must be convertible to floating-point -->
         units="mm[Hg]">
  </vital>

</vitals>

<htmltableformats>            <!-- human-readability example -->
  <htmltableformat sectionname="vital sign">
    <column name="date"        source="startdate" />
    <column name="measurement" source="displayname" />
    <column name="value"       source="value" />
    <column name="units"       source="units" />
  </htmltableformat>
</htmltableformats>
    

Vital Signs Section (V3)
Vital Signs Organizer (V3)
Vital Sign Observation (V2)


Specialized POJOs

AdminPojo doesn't appear in the IXML, but its instance variable, count, appears as an attribute on XML elements.

These are also referred to as administrative or demographic POJOs. In the pop-up examples there are multiple, optional forms. The preferred form comes first; the others typically demonstrate backward support for earlier versions of mdht-restlet. Earlier forms probably work, but are not guaranteed always to work.

If any of these are construed inaccurately, i.e.: invalid code (here 9999-9 which is not a valid race code and "white"), code system, code system name, etc., the result will be incorporated in a translation:

<raceCode nullFlavor="UNK">
  <translation code="9999-9"
               codeSystem="2.16.840.1.113883.6.238"
               codeSystemName="Race & Ethnicity - CDC"
               displayName="white" />
</raceCode>

This means that it's possible to substitute non-standard, private or proprietary codes in a way that will nevertheless validate.

Source CodeIXML Sample
AdminPojo
class AdminPojo extendsCommonPojo { }
// internal-use only
Ethnicity
class Ethnicity extends AdminPojo { }
<!-- recommended -->
<ethnicity code="2135-2"
           codesystem="2.16.840.1.113883.6.238"
           codesystemname="Race & Ethnicity - CDC Ethnicity group"
           displayname="Hispanic or Latino" />

<!-- deprecated -->
<ethnicity>2135-2</ethnicity>
Language
class Language extends AdminPojo { }
<!-- recommended -->
<language code="frn"
          codesystem="2.16.840.1.113883.6.121"
          codesystemname="Language"
          displayname="French" />

<!-- deprecated -->
<language>eng</language>
    
MaritalStatus
class MaritalStatus extends AdminPojo { }
<!-- recommended -->
<maritalstatus code="M"
               codesystem="2.16.840.1.113883.5.2"
               codesystemname="MaritalStatusCode"
               displayname="Married" />

<!-- deprecated -->
<maritalstatus>S</maritalstatus>

<!-- deprecated -->
<maritalstatus>Widowed</maritalstatus>
	
Race
class Race extends AdminPojo { }
<!-- recommended -->
<race code="1002-5"
      codesystem="2.16.840.1.113883.6.238"
      codesystemname="Race & Ethnicity - CDC"
      displayname="American Indian or Alaska Native" />

<!-- deprecated -->
<race>1002-5</race>

<!-- deprecated -->
<race>white</race>
Religion
class Religion extends AdminPojo { }
<!-- recommended -->
<religion code="1027"
          codesystem="2.16.840.1.113883.5.1076"
          codesystemname="HL7 Religious Affiliation"
          displayname="Latter Day Saints" />

<!-- deprecated -->
<religion>1027</religion>

<!-- deprecated -->
<religion>Catholic</religion>
Sex
class Sex extends AdminPojo { }
<!-- recommended -->
<sex code="M"
     codesystem="2.16.840.1.113883.5.1"
     codesystemname="HL7AdministrativeGenderCode"
     displayname="Male" />

<!-- deprecated -->
<gender>Female</gender>

<!-- deprecated -->
<gender>Unknown</gender>

Appendix: IXML format templates

POJO Theory

In Java, a POJO is a "plain, old Java object," elsewhere also called a bean. Each XML element in the IXML is rendered in mdht-restlet's data structures as:

  • a POJO 1, 2, 3
  • implied collection of POJOs (but doesn't render as anything itself), 4
  • nothing (because ignored).5

1   all IXML identifiers are lower-case; there is no mixed-case.
2   all POJOs in Java are classnames and are in bold, camelback case here,
but as IXML elements they are lower-case (e.g.: EffectiveTime<effectivetime>).
3 in the POJOs below, instance variable names (or fields) refer either to attributes or
    subelements in IXML; again, no mixed case.
4 an example of this would be <encounters> in the IXML below:

<encounters>
  <encounter ... />
  <encounter ... />
  <encounter ... />
</encounters>

5 <cdadoc> is an example of this.

As pointed out in the notes above, in the names of POJOs, you should recognize principal IXML element names. In the instance variable names or fields of each of these POJOs you should recognize either IXML attributes for those elements or subelements or, in some cases, element content text according to this example:

< element-name  attribute-name="attribute-value">
  < subelement-name />
   element content text
</element-name>

POJOs, as Java objects, may inherit from other POJOs. So it is the case that many POJOs, like Allergy, which appears to have few defined fields (instance variables) of its own, in fact have all those of CommonPojo, to wit, startdate, enddate, code, codesystem, ... codesystemname. Encounter, for CCDAs, has all of CommonPojo plus problems and others still.

Base class Pojo defines instance variables doctype, vendor, name, conformance, etc. These have no significance in the subclassing POJO. For example, for Measure, ____ is not the name of the measure (but only "measure" because from measure). The name of the measure must be stored in name. This is documented here because it's a point of confusion.

Sometimes, what's an attribute and what's a subelement is described by a comment.

Minor inconsistencies caused by this implementation being done first in May 2018 by two persons, both of which left the company, carried on by another, then, at the return of one of the originals, more work was done. Finally, standardization was undertaken (ironically by the two who left the company, then came back), but there are still a few awkward inconsistencies. These may be highlighted erratically here and there.

Here are some sample "railroad tracks" for IXMLs.

Methodology

This documentation is primarily a reference guide or grammar and not a method. It has many uses for reference (mostly), but it is also the only aid to IXML composition. Here are some suggestions for bridging the gap.

  • The examples on this page are not always kept perfectly up to date, but they are more practically useful than the POJO definitions. They are the closest thing to a method.
  • Remember, when using the POJO definitions as your guide, that there are semantics that are rarely apparent, such as:
    • Some, but rarely all of the fields of the resource's superclass (CommonPojo, AdminPojo) pertain to the resource you are composing.
    • However, if you supply unheeded attributes in your resource, they will likely be ignored and not hurt anything.
    • Fields consumed by one resource (e.g.: Problem) may not always be used for exactly the same semantic purpose in another (e.g.: Allergy). Attributes code, codesystem, etc. are usually for the <code ... /> near the top of any generated resource, but not always. Sometimes they may (perplexingly) apply to another such as <value ... />.

Definitions

  • A resource is a major POJO such as Allergy, Medication, VitalSign, etc.
  • Resources are generated as entries in CCDA based on information a corresponding IXML element which becomes a POJO in mdht-restlet.
  • Entries are collected together in a section. Most often, POJO names directly evoke section names ( AllergyAllergies & Intolerances, ProblemProblems, etc.).
  • Sections are subordinate to semantically insignificant components.
  • The MDHT library is called to generate syntagms and outputs CDA (CCDA, QRDA, etc.).

Creating a section

In IXML, a section being one or more entries each represented by an IXML element, these elements are groups together using an element usually given a name in the plural, e.g.:

<allergies>
  <allergy 1 .../>
  <allergy 2 .../>
  <allergy 3 .../>
</allergies>

The plurals are arbitrary; they only need to match (i.e.: legal XML). Hence, the above could be:

<sneezes>
  <allergy 1 .../>
  <allergy 2 .../>
  <allergy 3 .../>
</sneezes>

As plural element names are unknown to mdht-restlet and are discarded except for their value in grouping significant POJOs into a section, any attributes or content text are discarded.

In short, these section elements are collectors that wrap the entries. If you have no entries (for example, if you have no problems to emit), then you do not need to generate an empty section, but it will not cause mdht-restlet to fail:

<allergies />

or:

<allergies>
</allergies>

Creating an entry

This is the significant part of building IXML.

For each instance of a resource, such as (these were the supported sections as of mdht-restlet##3.2.2):

  1. an allergy,
  2. an encounter,
  3. a functional status,
  4. an immunization,
  5. a medication,
  6. a payer,
  7. a problem,
  8. a procedure,
  9. a (lab) result,
  10. a social history or
  11. a vital sign,

There will be a corresponding element with attributes and usually subelements each with more attributes and often their own subelements. This hierarchy should be accurately documented in the lists of CommonPojos above.

In (lab) results, there is the additional complexity that results are grouped into one or more result panels. The numbering used here is only to convey understanding; there is no numbering element or attribute in the XML of the IXML document:

<results>
  <resultpanel 1 .../>
    <result 1.1 .../>
    <result 1.2 .../>
    <result 1.3 .../>
  </resultpanel>
  <resultpanel 2 .../>
    <result 2.1 .../>
  </resultpanel>
</results>

A similar thing happens for vital signs: they are grouped into one or more vital groups (the Implementation Guide doesn't speak of "vital sign panels"). Vital-sign groups should be united by startdate, but can be assembled according to any criteria. If <vitalsigngroup> is used in IXML, then no attempt will be made to impose that defined groups be assembled by date. Each group defined will result in a CDA Organizer that subsumes all of the vital signs defined below it. In the following example, two organizers carrying three (and two) vital signs will be seen in CDA output.

Vital-sign groups should include an author (SHOULD); individual vital signs themselves should include an author (SHOULD). Missing author definitions are tolerated, however.

<vitalsigngroups>
  <vitalsigngroup 1 .../>
    <vital 1.1 .../>
    <vital 1.2 .../>
    <vital 1.3 .../>
  </vitalsigngroup>
  <vitalsigngroup 2 .../>
    <vital 2.1 .../>
  </vitalsigngroup>
</vitalsigngroups>

The following legacy format is still tolerated. The result is that the vitals will be sorted, then grouped, according to startdate under a CDA organizer.

Also, in this case, the CDA Organizer will not carry any author (SHOULD) since there's no IXML element to define one. Individual vital signs can carry an author if defined (SHOULD).

<vitals>
  <vital 1 .../>
  <vital 2 .../>
  <vital 3 .../>
</vitals>

Creating a proper entry

In order to create an entry, you must

  1. generate the proper element name (from the numbered list above),
  2. generate the attributes required for that resource,
  3. generate the subelements required or optional for that resource,
  4. generate the attributes and subelements incumbant upon each of those subelements.

Creating the header

The header has its own required content which differs between CCDA, QRDA and other CDA types. This will not be discussed here. The resources to expect in a CCDA header include most of which are elements rather than attributes on elements):

  • codename
  • title
  • informationrecipiantid
  • patient (has subelements; cannot have plurality)
  • hieinfo (has subelements)
  • nextofkin (has subelements; suggested name of plural collector is "kin")
  • hparticipant (has subelements)
  • custodianinfo (has subelements; plural is "custodians")

Some elements are crucial and, if missing, the IXML will fault. Not all plurality (or collections) is supported in all headers. Passing additional kin, participantsder , custodians, etc. may not result in date being put into the CCDA. Please contact us with observations or complaints about this.

Execution

An example of how CCDA documents are generated (QRDA I).

  1. The JUnit test or Tomcat servlet code passes the IXML input as a stream to a SAX parser.
  2. ParseIncoming.parse( InputStream inputStream ) invokes SAX parsing.
  3. IncomingDataHandler, this is the SAX parser user code, calls...
  4. ...various IncomingDataHandler.method()s until, having reached the IXML document's end...
  5. ...IncomingDataHandler.endDocument() winds up the parsing, then calls for MDHT generators.
  6. Depending on the type of document being generated, CCDA, QRDA I or QRDA III, a generator is called.
  7. Generate.generateDocument() refines the POJOs, then calls generators on all parsed POJOs thus:
  8. Bottles up the (MDHT-generated) document and returns it as a String to the bottom of the SAX parser
    handler, endDocument(), thence to the bottom of the SAX parser and finally to the invoking code in
    (JUnit test or Tomcat servlet).

When "(unknown)" is unexpected

This typically happens in human-readable (HTML) tables and is the result of failing to set tetracode fields code, codesystem, codesystemname, but in particular, displayname (many examples, most concept sections).

Another way for this to happen is to be missing a value or unit (see, for example, VitalSign).

Less clear might be to have failed to provide fields inside more complex structures such as a facility name (in AuthorOrganization → name).

If you leave constructs such as authors and organizations out (unexpressed, null or otherwise unpopulated in IXML), you must expect this sort of thing to happen.

<value value="<N" ... />

You may preserve the attribute value value="<60" of a Result, or other section types in CCD, as expressed:

      <result startdate="20230115"
              code="17636008"
              codesystem="2.4.68.10.1214.16"
              codesystemname="SNOMED"
              displayname="Specimen collection"
              value="&lt;60" unit="mg" />

But, the Implementation Guide and validators do not tolerate any value in that field other than a floating point. The solution you'll see to preserve an annotation (<, >, ˜, etc.) involves generating a (legal) translation construct, but respecting the CCDA standard in the value itself where the annotation is dropped as illegal:

  <value unit="mg" value="60.0" xsi:type="PQ">
    <translation>
      <originalText>&lt;60</originalText>
    </translation>
  </value>

Troubleshooting

When the CCDA or Care Plan produced has problems, consider the following.

  1. Adhere to the strict and exact spelling of identfiers described in this document.
  2. Exact case of POJO names. All POJO names, fieldnames, attribute names, etc. are in lower- not upper or camelback case and without underscores or hyphens.
  3. Changing or old identifier names. There isn't much of this, but the exact naming may conflict.
  4. In times past, the Organization id field has been facility, oid, id, etc.. Getting this particular fieldname wrong confuses the SAX parser and constructs like VitalSign and others that include an author plus organization may go missing under parent collections (like VitalSignGroup). The identifier id only occurs legally inside the Patient (as a list of zero or more Ids).
  5. Note that id-conceptual fields exist as various POJO fields:
    1. id in Patient
    2. oid in CustodianInfo and in HieInfo
    3. facilityoid in Patient and in Organization

Logging

Logged output is generated in the log file, /opt/tomcat/logs/catalina.out, which is managed entirely by Tomcat though it's possible to affect what's generated by mdht-restlet through modifying logback.xml, a file on the path

/opt/tomcat/webapps/mdht-restlet##M.m.r-b/WEB-INF/classes/logback.xml.

...where M refers to the major version number, m to the minor version number, r to the revision level and b to the build number of mdht-restlet.

Edit this file and change (maybe add because usually missing) the following section. In particular, ensure that the level is set to TRACE. The normal value for level is INFO which keeps the log as only informative.

  <logger name="com.imatsolutions.mdht" level="TRACE" additivity="false">
    <appender-ref ref="CONSOLE" />
  </logger>

Normally, this is what's in logback.xml:

  <logger name="com.imatsolutions" level="INFO" additivity="false">
    <appender-ref ref="CONSOLE" />
  </logger>

To shut any logging except for errors off, removing roughly 35 lines for each CCD generated from the log, do this:

  <logger name="com.imatsolutions" level="ERROR" additivity="false">
    <appender-ref ref="CONSOLE" />
  </logger>

Above, name is the Java package path. Knowing the package name makes it possible to constrain the output to just what you want to see happen, but, in order to know what you're tailoring, you would have to understand what code is in what package. This is hard to do and, from time to time, the package paths below com.imatsolutions change depending on design refactoring. I would suggest not attempting to second-guess this, but use the example(s) above.

Note that any time you modify logback.xml, the effect will almost certainly be nil untill you bounce Tomcat:

# systemctl restart tomcat

When doing deep, ugly debugging, do one of these:

Debugging the MDHT generation
  <logger name="com.imatsolutions.mdht" level="TRACE" additivity="false">
    <appender-ref ref="CONSOLE" />
  </logger>
Debugging the SAX parser (very ugly—more interesting to IXML writers)
  <logger name="com.imatsolutions.sax" level="TRACE" additivity="false">
    <appender-ref ref="CONSOLE" />
  </logger>

Logging examples

...processing gold-standard.ixml at one point:

126  [main] WARN  c.i.s.ParseIncoming.parse:115 - Warnings of IXML and other problems arising during SAX parsing and POJO construction:
155  [main] WARN  c.i.p.c.Address.perform:122 - 'NW 092 3C' is not a US zipcode, line 540
155  [main] WARN  c.i.p.c.Address.perform:138 - Country 'UK' is not US, Canada or Mexico, line 541
157  [main] INFO  c.i.s.ParseIncoming.parse:120 - Back from SAX parser...
1103 [main] INFO  c.i.m.Generate.generateDocument:196 - Document generating for MPID 1694505
1106 [main] INFO  c.i.m.Generate.generateDocument:227 - Vendor requesting document is IMAT Solutions
1118 [main] INFO  c.i.m.c.GenerateCcda.generate:111 -    Generating CCDA document (at 20220325174120+0000)
1118 [main] INFO  c.i.m.c.GenerateCcda.generate:116 -    Expected POJOs in play:
                                                           ...Next of kin        4
                                                           ...Custodian info     1
                                                           ...Allergies          1
                                                           ...Encounters         1
                                                           ...Functional Status  1
                                                           ...Immunizations      1
                                                           ...Medications        1
                                                           ...Problems           1
                                                           ...Procedures         1
                                                           ...Result Panels      1
                                                           ...Results            1
                                                           ...Social Histories   1
                                                           ...Vital Sign groups  3
                                                           ...Vital Signs        4
1119 [main] INFO  c.i.m.c.GenerateCcda.generate:120 -      ...for 1 HIE info
1119 [main] INFO  c.i.m.c.GenerateCcda.generate:121 -      ...for 1 Custodian info
1119 [main] INFO  c.i.m.c.GenerateCcda.generate:122 -      ...for 4 Next of kin
1119 [main] INFO  c.i.m.c.GenerateCcda.generate:126 -      ...for 7 Authors (and potential HParticipants)
1161 [main] INFO  c.i.m.c.GenerateCcda.generate:143 -      ...for 1 Allergy or Intolerance
1193 [main] INFO  c.i.m.c.GenerateCcda.generate:150 -      ...for 1 Encounter
1201 [main] INFO  c.i.m.c.GenerateCcda.generate:157 -      ...for 1 Functional Status
1206 [main] INFO  c.i.m.c.GenerateCcda.generate:164 -      ...for 1 Immunization
1217 [main] INFO  c.i.m.c.GenerateCcda.generate:171 -      ...for 1 Medication
1225 [main] INFO  c.i.m.c.GenerateCcda.generate:185 -      ...for 1 Problem
1232 [main] INFO  c.i.m.c.GenerateCcda.generate:192 -      ...for 1 Procedure
1239 [main] INFO  c.i.m.c.GenerateCcda.generate:199 -      ...for 1 Result panel/Lab (1 result)
1253 [main] INFO  c.i.m.c.GenerateCcda.generate:206 -      ...for 1 Social Histories
1258 [main] INFO  c.i.m.c.GenerateCcda.generate:215 -      ...for 3 Vital Sign groups (4 vital signs)
2957 [main] INFO  c.i.m.Generate.generateDocument:260 -          Time spent validating: 1692

If /opt/tomcat/webapps/mdht-restlet##M.m.r-b/WEB-INF/classes/logback.xml is amended to mandate TRACE-level logging, for example,

  <logger name="com.imatsolutions.mdht" level="TRACE" additivity="false">
    <appender-ref ref="CONSOLE" />
  </logger>

...then you might see something like the following extra statements describing the building and folding of authors in lists.

130  [main] WARN  c.i.s.ParseIncoming.parse:115 - Warnings of IXML and other problems arising during SAX parsing and POJO construction:
158  [main] INFO  c.i.s.ParseIncoming.parse:120 - Back from SAX parser...
1228 [main] INFO  c.i.m.Generate.generateDocument:196 - Document generating for MPID 1694505
1232 [main] INFO  c.i.m.Generate.generateDocument:227 - Vendor requesting document is IMAT Solutions
1248 [main]  TRACE c.i.m.c.AuthorsAndPerformers.outputAuthorList:229 - Authors:

     1: npi: 4028-19-4233398, family:  Seymore,    given:  Jane,      middle:  J., facilityoid:  2.16.840.1.113883.5.53, name:                             Allergist
     2: npi:      43-89-hike, family:  of Cleves,  given:  Anne,      middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
     3: npi:                , family:  of Cleves,  given:  Anne,      middle:    , facilityoid:                     568, name:                Good Health Laboratory
     4: npi: 4028-19-4233398, family:  Seymore,    given:  Jane,      middle:  J., facilityoid:  2.16.840.1.113883.5.53, name:                                Doctor
     5: npi:          665892, family:  Parr,       given:  Catherine, middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
     6: npi:          665892, family:  Parr,       given:  Catherine, middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
     7: npi:          665892, family:  Parr,       given:  Catherine, middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
     8: npi:          665892, family:  Parr,       given:  Catherine, middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
     9: npi:          665892, family:  Parr,       given:  Catherine, middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
    10: npi:      9999999999, family:  Boleyn,     given:  Anne,      middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
    11: npi: 4028-19-4233398, family:  Seymore,    given:  Jane,      middle:  J., facilityoid:  2.16.840.1.113883.5.53, name:                                Doctor

1249 [main]  TRACE c.i.m.c.AuthorsAndPerformers.outputAuthorList:229 - Deduplicated authors:

    1: npi: 4028-19-4233398, family:  Seymore,    given:  Jane,      middle:  J., facilityoid:  2.16.840.1.113883.5.53, name:                             Allergist
    2: npi:      43-89-hike, family:  of Cleves,  given:  Anne,      middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
    3: npi:                , family:  of Cleves,  given:  Anne,      middle:    , facilityoid:                     568, name:                Good Health Laboratory
    4: npi: 4028-19-4233398, family:  Seymore,    given:  Jane,      middle:  J., facilityoid:  2.16.840.1.113883.5.53, name:                                Doctor
    5: npi:          665892, family:  Parr,       given:  Catherine, middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
    6: npi:      9999999999, family:  Boleyn,     given:  Anne,      middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse

1249 [main]  TRACE c.i.m.c.AuthorsAndPerformers.outputAuthorList:229 - Sorted authors:

    1: npi:                , family:  of Cleves,  given:  Anne,      middle:    , facilityoid:                     568, name:                Good Health Laboratory
    2: npi: 4028-19-4233398, family:  Seymore,    given:  Jane,      middle:  J., facilityoid:  2.16.840.1.113883.5.53, name:                             Allergist
    3: npi: 4028-19-4233398, family:  Seymore,    given:  Jane,      middle:  J., facilityoid:  2.16.840.1.113883.5.53, name:                                Doctor
    4: npi:      43-89-hike, family:  of Cleves,  given:  Anne,      middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
    5: npi:          665892, family:  Parr,       given:  Catherine, middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse
    6: npi:      9999999999, family:  Boleyn,     given:  Anne,      middle:    , facilityoid:  2.16.840.1.113883.5.53, name:                      Registered Nurse

1249 [main] INFO  c.i.m.c.GenerateCcda.generate:111 -    Generating CCDA document (at 20220405200214+0000)
1250 [main] INFO  c.i.m.c.GenerateCcda.generate:116 -    Expected POJOs in play:
                                                           ...Next of kin        4
                                                           ...Custodian info     1
                                                           ...Allergies          1
                                                           ...Encounters         1
                                                           ...Functional Status  1
                                                           ...Immunizations      1
                                                           ...Medications        1
                                                           ...Problems           1
                                                           ...Procedures         1
                                                           ...Result Panels      1
                                                           ...Results            1
                                                           ...Social Histories   1
                                                           ...Vital Sign groups  3
                                                           ...Vital Signs        4
1250 [main] INFO  c.i.m.c.GenerateCcda.generate:120 -      ...for 1 HIE info
1250 [main] INFO  c.i.m.c.GenerateCcda.generate:121 -      ...for 1 Custodian info
1250 [main] INFO  c.i.m.c.GenerateCcda.generate:122 -      ...for 4 Next of kin
1250 [main] INFO  c.i.m.c.GenerateCcda.generate:126 -      ...for 6 Authors (and potential HParticipants)
1299 [main]  TRACE c.i.m.c.PopulateDocumentationOf.author:109 -      (no NPI): of Cleves, Anne, 568, Good Health Laboratory...
1301 [main] WARN  c.i.m.c.PopulateDocumentationOf.populatePerformerFromAuthor:142 - No NPI code for performer from author.person, line:239
1301 [main]  TRACE c.i.m.c.PopulateDocumentationOf.author:109 -      4028-19-4233398: Seymore, Jane, MD, 2.16.840.1.113883.5.53, Allergist...
1302 [main]  TRACE c.i.m.c.PopulateDocumentationOf.author:109 -      4028-19-4233398: Seymore, Jane, MD, 2.16.840.1.113883.5.53, Doctor...
1302 [main]  TRACE c.i.m.c.PopulateDocumentationOf.author:109 -      43-89-hike: of Cleves, Anne, MD, 2.16.840.1.113883.5.53, Registered Nurse...
1303 [main]  TRACE c.i.m.c.PopulateDocumentationOf.author:109 -      665892: Parr, Catherine, BSN, 2.16.840.1.113883.5.53, Registered Nurse...
1303 [main]  TRACE c.i.m.c.PopulateDocumentationOf.author:109 -      9999999999: Boleyn, Anne, PhD, 2.16.840.1.113883.5.53, Registered Nurse...
1303 [main] INFO  c.i.m.c.GenerateCcda.generate:143 -      ...for 1 Allergy or Intolerance
1338 [main] INFO  c.i.m.c.GenerateCcda.generate:150 -      ...for 1 Encounter
1348 [main] INFO  c.i.m.c.GenerateCcda.generate:157 -      ...for 1 Functional Status
1351 [main]  TRACE c.i.m.c.PopulateFunctionalStatus.status:160 -     Functional Status Observation 1...
1351 [main]  TRACE c.i.m.c.PopulateFunctionalStatus.status:160 -     Functional Status Observation 2...
1352 [main]  TRACE c.i.m.c.PopulateFunctionalStatus.status:160 -     Assessment Scale 1...
1352 [main]  TRACE c.i.m.c.PopulateFunctionalStatus.status:160 -     Self-care Activity 1...
1355 [main] INFO  c.i.m.c.GenerateCcda.generate:164 -      ...for 1 Immunization
1376 [main] INFO  c.i.m.c.GenerateCcda.generate:171 -      ...for 1 Medication
1383 [main] INFO  c.i.m.c.GenerateCcda.generate:185 -      ...for 1 Problem
1390 [main] INFO  c.i.m.c.GenerateCcda.generate:192 -      ...for 1 Procedure
1396 [main] INFO  c.i.m.c.GenerateCcda.generate:199 -      ...for 1 Result panel/Lab (1 result)
1400 [main]  TRACE c.i.m.c.PopulateResultPanels.panel:119 -          Chlamydia trachomatis...
1402 [main]  TRACE c.i.m.c.PopulateResultPanels.populateResultOrganizerV3:156 -     Result 1
1410 [main] INFO  c.i.m.c.GenerateCcda.generate:206 -      ...for 1 Social Histories
1415 [main] INFO  c.i.m.c.GenerateCcda.generate:215 -      ...for 3 Vital Sign groups (4 vital signs)
1418 [main]  TRACE c.i.m.c.PopulateVitalSigns.group:190 -            Vital Sign group 1...
1420 [main]  TRACE c.i.m.c.PopulateVitalSigns.group:190 -            Vital Sign group 2...
1420 [main]  TRACE c.i.m.c.PopulateVitalSigns.group:190 -            Vital Sign group 3...
3131 [main] INFO  c.i.m.Generate.generateDocument:269 - Document generated; elapsed time: 00:00:00:01:1903

Care Plan (V2) logging example

131  [main] WARN  c.i.s.ParseIncoming.parse:115 - Warnings of IXML and other problems arising during SAX parsing and POJO construction:
150  [main] INFO  c.i.s.ParseIncoming.parse:120 - Back from SAX parser...
1102 [main] INFO  c.i.m.Generate.generateDocument:196 - Document generating for MPID 1694505
1104 [main] INFO  c.i.m.Generate.generateDocument:227 - Vendor requesting document is IMAT Solutions
1263 [main] INFO  c.i.m.c.GenerateCarePlan.generate:73 -   Generating Care Plan (V2) (at 20220513182356+0000)
1267 [main] INFO  c.i.m.c.GenerateCarePlan.generate:78 -   Expected POJOs in play (and count):
                                                                  ...HParticipants              2
                                                                  ...Performers                1
                                                                  ...Recipients                1
                                                                  ...Authenticator             1
                                                                  ...EncompassingEncounter     1
                                                                  ...Health Concerns           1
                                                                  ...Goals                     1
                                                                  ...Interventions             1
1337 [main] INFO  c.i.m.c.GenerateCarePlan.validateHeader:171 - Header information found:
1337 [main] INFO  c.i.m.c.GenerateCarePlan.validateHeader:180 -   HParticipant information found
1337 [main] INFO  c.i.m.c.GenerateCarePlan.validateHeader:185 -   Performers information found
1337 [main] INFO  c.i.m.c.GenerateCarePlan.validateHeader:190 -   Recipient information found
1337 [main] INFO  c.i.m.c.GenerateCarePlan.validateHeader:195 -   Authenticator information found
1338 [main] INFO  c.i.m.c.GenerateCarePlan.validateHeader:200 -   ComponentOf/encompassingEncounter information found
1376 [main] INFO  c.i.m.Generate.generateDocument:269 - Document generated; elapsed time: 00:00:00:00:273

The curl command line

These are tailored to a) confirming that mdht-restlet is up and b) sending an IXML to it to generate a CCD—pretty much all mdht-restlet is able to do.

  1. Basic GET retrieves HTML. You can do this in a browser. It tells you that mdht-restlet is live.
    $ curl http://localhost:8080/mdht-restlet
  2. Basic GET requesting plain text. It tells you that mdht-restlet is live.
    $ curl http://localhost:8080/mdht-restlet         -H "Accept: text/plain"
  3. Command to POST a file in the payload as a request. It posts IXML from a file in the local filesystem to mdht-restlet and the generated CCD comes back on stdout.
    $ curl http://localhost:8080/mdht-restlet -X POST -H 'Content-Type: application/xml' --data "@sample.ixml"

Was this article helpful?

What's Next