Combining time intervals in CDA

[Category: Dates, Times, & Schedules; Original Post: 06-Feb-14]
Note: Refer to the article Dates and times in CDA for an overview of the subject and links to other relevant CDA PRO Know articles and CDA PRO Learn sessions.

There are many contexts in which an XML sub-element is added to "something" in CDA in order to capture the time interval when that "something" took place, or is relevant.

Different Time Interval Types
As noted in the article Dates and times in CDA, there are four different types of time interval representations in CDA:

Combining Time Interval Types
In the context of medication or other therapy schedules, it can be necessary to express more complex time intervals than any of the four types above support - such as: "twice a day for the next three days". This requires the use of a combination of time interval types.

In CDA, the XML elements that support a "combined type" time interval for medication schedules and similar, are named effectiveTime. Note that not all instances in a CDA where effectiveTime is used support the "combined type" time interval, only a small number of specific instances (refer to the article The effectiveTime element for additional information).

Additionally, the useablePeriod element that is a sub-element of addr, telecom, and reference elements, also supports "combined type" time intervals (refer to the articles The addr element and The telecom element, for additional information).

For additional details of how "combined type" time intervals are used in CDA, refer to the article Using "combined type" time intervals.

"Combined Type" Time Interval Syntax
To combine time interval types, the element effectiveTime (or useablePeriod - for the remainder of the article only effectiveTime will be referenced), is repeated as many times as needed for each time interval expression that will be combined.

Indicating the Type
Since each effectiveTime element in this context can be of a different time interval type - and each type has different sub-elements and/or attributes - it's necessary to use the xsi:Type attribute to explicitly let XML Schema processors know what type is being used.

The relevant values for xsi:Type in combined time intervals, are as follows:

  • "TS": Timestamp

  • "IVL_TS": Contiguous time interval

  • "PIVL_TS": Periodic time interval

  • "EIVL": Event-related time interval


Note, however, that there is an exception to the use of the xsi:Type attribute with "combined type" time intervals. If the "TS" data type is used (and would thus be the value in xsi:type) is used, then xsi:type="TS" is NOT included. For additional information on why, refer to the article Using "combined type" time intervals.

How to Combine the Elements
There are different ways that the individual effectiveTime elements can be combined. They can be "union-ed" together to indicate "this time period and also that time period". They can be "intersected" to indicate "within this overall time period, the specific times noted in that time period". One period can be "excluded" from another to indicate "this time period, except for that time period".

The operator attribute indicates how each effectiveTime element should be combined with the other effectvieTime elements. It can take on the following values:

  • "A": Intersection

  • "E": Exclusion

  • "I": Inclusion ("Union")


There is also support for more complex "set operations" for combining the time intervals. These additional value, which are rarely used, are:

  • "H": Convex Hull set operation

  • "P": Periodic Hull set operation


Examples of Combined Time Intervals


...







...

 


...










...

Other CDA PRO Know Articles Referenced In This Article



    Print
    Categories: Standards
    Tags:
    Rate this article:
    No rating
    Please login or register to post comments.