ACTIVITY.timing spec needs more definition and XSD should allow complex timing.value

Description

ACTIVITY.timing : DV_PARSABLE is a mandatory attribute.

The definition is "Timing of the activity, in the form of a parsable string, such as an HL7 GTS or ISO8601 string."

http://www.openehr.org/releases/RM/latest/docs/ehr/ehr.html#_activity_class

1. Should it be mandatory even if the system generating the data doesn't have/can't generate a structured/parsable timing?

2. When frequencies and durations need to be specified in a GTS expression, that is not a parsable string, is a complex XML structure. Trying to put that on the XML gives an XSD validation error since the ACTIVITY.timing.value is string (simple type) and the content is complex.

http://www.openehr.org/releases/RM/latest/docs/data_types/data_types.html#_dv_parsable_class

3. The issue on 2. also happens with DV_TIME_SPECIFICATION.value : DV_PARSABLE "The specification, in the HL7v3 syntax for PIVL or EIVL types.". The syntax is XML and that content is not allowed on a string (DV_PARSABLE.value).

http://www.openehr.org/releases/RM/latest/docs/data_types/data_types.html#_dv_time_specification_class

4. Points 2 and 3 are related to ITS, but the issue comes from the IM.

5. The spec definition for DV_PARSABLE.value is insufficient to understand how to use it, and examples are needed.

Some ideas:

For 1. make the timing attribute optional.

For 2. while at the IM level, DV_PARSABLE.value can store the XML for GTS, PIVL, EIVL, etc., at the XSD level if the type of DV_PARSABLE is string, the XML can't be stored in a XML composition instance.

An idea is to change the type of DV_PARSABLE.value from:

<xs:element name="value" type="xs:string"/>

To:

<xs:element name="value" type="AllowAny"/>

<xs:complexType name="AllowAny" mixed="true">
<xs:sequence>
<xs:any minOccurs="0"/>
</xs:sequence>
</xs:complexType>

That allows content like (I tested this and work OK):

<value>sdfgsdfgsfg</value>

OR

<value>
{
"effectiveTime": {
"_xsi:type": "PIVL_TS",
"period": {
"_value": 12,
"_unit": "h"
}
}
}
</value>

OR

<value>
<effectiveTime xsi:type="PIVL_TS">
<period value="12" unit="h"/>
</effectiveTime>
</value>

That last one, is using the "any" from the XSD and require that the PIVL_TS is declared in a referenced XSD. The HL7 v3 XSD can be used to resolve the type.

That solution doesn't change the IM, allows extensions at the XSD level to use any formalism based on XML to represent the parsable expression, but makes the XSD to look different than the IM (not really an issue since those represent different things).

Environment

None

Status

Reporter

Pablo Pazos

Labels

Components

Affects versions

RM Release 1.0.2

Priority

Major