This wiki has undergone a migration to Confluence found Here

CDA R3 avoid xsi:type

From HL7Wiki
Revision as of 20:50, 23 March 2010 by Rhdolin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Return to SDTC page; Return to CDA R3 Formal Proposals page.

See CDA R3 Formal Proposals for instructions on using this form. Failure to adhere to these instructions may result in delays. Editing of formal proposals is restricted to the submitter and SDTC co-chairs. Other changes will be undone. Comments can be captured in the associated discussion page.

(An announcement of this proposal must be submitted to the Structured Documents list to be formally submitted.)

Submitted by: Rick Geimer Revision date: August 31, 2009
Submitted date: August 31, 2009 Change request ID: <<Change Request ID>>


Requiring the use of the xsi:type attribute is problematic. First, it binds CDA to the XML Schema language (other schema languages, like RelaxNG, do not support xsi:type), and also many XML tools to not support this XML Schema specific attribute.


  • Create clones of the <value/> element (inside an observation) that are pre-bound to specific datatypes, i.e. <physicalQuantity/> would be pre-defined as a PQ.


Creating named clones for each datatype allowed in CDA would limit our dependence on the XML Schema language, and also improve tool compatibility.

For example, In the following observation:

    <observation classCode="OBS" moodCode="EVN">
        <statusCode code="completed"/>
        <effectiveTime value="200004071430"/>
        <value xsi:type="PQ" value="1.77" unit="m"/>

you could replace

    <value xsi:type="PQ" value="1.77" unit="m"/>


    <physicalQuantity value="1.77" unit="m"/>

For more reasons why the use of xsi:type is often frowned upon, refer to Norm's blog entry on the subject:


Recommended Action Items


March 23, 2010: This is an ITS and data types issue. Opposed: 0; Abstain: 0; In favor: 6.