The XML syntax for representing a medication frequency of “once” (i.e. “take a single pill one time on a given date”) in a CDA document, is both simple and subtle.

In a CDA document, here is the correct XML syntax to represent a SIG (schedule for taking a medication) of “Take once on October 1, 2014″:

<effectiveTime value='20141001' />

Simple, right? Now let’s understand why it’s not so trivial…

No xsi:type in a substanceAdministration/effectiveTime Timestamp
To express a SIG of “once”, it is sufficient to use a timestamp to represent a moment in time.

Following the pattern for other uses of the effectiveTime element to express a SIG (see below for some references to articles about this topic), we would expect to see an xsi:type attribute that is set to the value “TS” to indicate that a Timestamp is being used. Refer to the article What is the role of the xsi:type attribute in CDA? for additional information about the use of xsi:type.

However, doing so results in a validation error in the TTT validator!

The reason for this error is explained in the article titled Using “combined type” time intervals in the section of the article titled Use of xsi:type Attribute with SXCM_TS Data Type. It is due to a subtle technicality of how the XML Schema definition for SXCM_TS works.

In the XML Schema for CDA documents, the data type name assigned to elements that can represent complex “combined type” time intervals – such as the effectiveTime sub-element of the substanceAdministration clinical act statement, which is used to express a SIG – is SXCM_TS.

An element of type SXCM_TS is actually already of type TS (this is its “base type”), and thus schema validation will fail if xsi:type=”TS” is explicitly indicated.

The correct syntax is thus as shown above, using only the value attribute in the effectiveTime element, without the use of xsi:type.

SIGs with Time Intervals Do Require xsi:type
As noted, the case where a single timestamp is used in the effectiveTime element, is the exception to the rule when it comes to using the xsi:type attribute. For time intervals, the xsi:type attribute must be used.

The article Combining time intervals in CDA, overviews the use of the xsi:type attribute and the operator attribute, within an effectiveTime element, in order to express a SIG involving multiple time intervals.

The article Using “Parenthetical Expressions” in SIGs discusses the further complexity of expressing SIGs such as “three times a week for two weeks, then twice a week for two weeks, then once a week thereafter – starting on Feb 2, 2014″.

In all of the examples in those articles, the xsi:type attribute is correctly used.

Other CDA PRO Know Articles Referenced In This Article