Difference between revisions of "CDA R3 avoid xsi:type"
Line 30: | Line 30: | ||
For example, In the following observation: | For example, In the following observation: | ||
+ | |||
<observation classCode="OBS" moodCode="EVN"> | <observation classCode="OBS" moodCode="EVN"> | ||
<code code="50373000" codeSystem="2.16.840.1.113883.6.96" | <code code="50373000" codeSystem="2.16.840.1.113883.6.96" | ||
Line 37: | Line 38: | ||
<value xsi:type="PQ" value="1.77" unit="m"/> | <value xsi:type="PQ" value="1.77" unit="m"/> | ||
</observation> | </observation> | ||
− | + | ||
+ | you could replace | ||
+ | |||
<value xsi:type="PQ" value="1.77" unit="m"/> | <value xsi:type="PQ" value="1.77" unit="m"/> | ||
− | + | ||
+ | with | ||
+ | |||
<physicalQuantity value="1.77" unit="m"/> | <physicalQuantity value="1.77" unit="m"/> | ||
Revision as of 06:09, 31 August 2009
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>> |
Issue
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.
Recommendation
- 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.
Rationale
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"/>
</observation>
you could replace
<value xsi:type="PQ" value="1.77" unit="m"/>
with
<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: http://norman.walsh.name/2004/01/29/trainwreck.
Discussion
Recommended Action Items
Resolution
(Resolution is to be recorded here and in the referenced minutes, which are the authoritative source of resolution).