HL7v3 (CDA) notes

Russell Bateman
March 2021
last update:

Links to Implementation Guides

Note, if you're an implementor, i.e.: you write code calling into the MDHT library (discussed later), that the documents above will work better for you if opened in a browser (rather than in Acrobat or another PDF reader). This has been my (very extensive) experience. I work on Linux. Your mileage may vary.

General discussion on using guides to generate CCDs, CCDAs, etc....

To generate a CDA (CCD, CCDA, QRDA I, QRDA II, QRDA III, etc.), there is something named an Implementation Guide (downloads or URLs above) that states in three ways what constitutes a section of CDA for each and every resource (patient, enounter, observation, etc.).

The first way is a table that's difficult to read, but quickly searched. It has a column, Verb, with expressions like SHALL, SHOULD, MAY, etc. that are a sort of legalistic pronouncement accompanying cardinality answering the question, do I have to include this, how much do I include or can I just not provide it in the first place?

The second way is a point by point list, more in English, of the same thing. Harder to find stuff in, but a little easier to understand.

The third way is an out and out example of CDA XML that gives easy indication of what should come out from your generation.

Generation is done by the Model-drive Health Tools library (MDHT) written by Sean Muir, Ken Lord and a short list of other guys. It's a bit confusing to constitute the 12-20 JARs (you can't use Maven1) in your project, but support (via the MDHT Skype channel) is very good. See MDHT Notes.

I generally work off the third method and use the other two to resolve questions that arise (like whether or not I have to do something or can get away with not doing it). But, the third way, the example, is more my world. Other people I have worked with tend to look at the first two ways probably because they don't write code to generate, but come from a background of having to read already generated CDA.

1 If getting around this is a problem for you, please consider reading my notes over a period of time beginning at Local-to-project Maven repository and How to create Maven local repositories (faster way), as well as nearby notes, the last one being an even faster way around the problem.

HL7v4 (FHIR), an aside...

On a sort of related matter, incidentally, HL7v4 (FHIR) has two ways...

First, a very legalistic and somewhat complicated list of what a resource can be composed of. Second, examples that are not too useful—I almost never look at them. They aren't like the examples for HL7v3; they aren't even close to anything that looks like what you'd actually see in the FHIR document (whereas the examples of CDA generated look pretty much exactly as it appears in the document).

For FHIR topics, please see...