At Axolotl, we dynamically generate template based CDA documents from various data sources.
One commonly transmitted document is the CCD, or Continuity of Care Document. This is a summary document, its intended purpose to have enough information, well organized, to preserve the continuity of patient care between different care providers.
The way I approach template-based CDA is to first look at the document as a container for health data, and construct the empty container first.
You can see it has, first, the necessary meta-data. Source, destination, attribution, author, the time period this document covers, any confidentiality instructions, and other information about this document.
Then it has the patient demographics and a list of all healthcare providers involved in the care described, and all doctors who provided care during the covered period.
The largest part is the clinical information itself. This document is a container, and the clinical section is meant to contain a list of clinical sections.
A section can be thought of as a smaller CDA entity in and of itself, and just as the document is composed of smaller pieces. It has template identifiers, a title, a human readable narrative text in an html-like format, and a number of entries. Each entry represents a single clinical event.
You can subclass the section into the different categories of clinical information, thereby putting a complete summary into a list of clinical sections.
The entries, themselves, have a wide variety of forms, so we subclass them into different types of entries for the various sections, support entries for the support section, insurance plan entries for the payers section, allergy entries for the alerts section, and so on.
If you need to build a CCD, or any template-based CDA document, that’s an approach to think about.