Maps any CDA release 2 to CDA release 3 based on September 2012 Ballot, picks up any
contents in other namespaces,
and places that content to the end of the element if was found in. It is not possible
to keep elements from other namespaces in between hl7 elements.
Maps all datatypes that are explicitly present in the CDAr2 specification. It may
not map datatypes you explicitly declare in your instance, e.g. PPD_TS.
Supported dtatypes are: 'AD','BL','BN','CD','CE','CO','CV','ED','EIVL_TS','EN','II','INT','IVL_INT','IVL_MO','IVL_PQ','IVL_REAL','IVL_TS','MO','ON',
'PIVL_TS','PN','PQ','REAL','RTO_PQ_PQ','SC','ST','TEL','TS'. In the event this should
happen, the XSL gives a message and stops mapping.
NOTE: in datatypes R1 there used to be a qualifier element to coded elements. This no longer
exists in datatypes R2. Hence this element is left
out of the output. Instead a comment will be add to the output stating what was omitted
leading to data loss. Example:
Could not map qualifier for: name/code="12313" name/codeSystem="1.34" name/displayName="3453" value/code="23123" value/codeSystem="1.2.3" value/displayName="dsf"
See http://vimeo.com/16813271 for a video by Grahame Grieve on what changed in datatypes
R2.
CDAr2 was not completely moved over to CDAr3 as it currently stands. In the context
of where data would/will not be mapped you'll find a comment that
starts with 'Skipping mapping of'. Currently skipped elements include: 'POCD_MT000040.AuthoringDevice.asMaintainedEntity',
'POCD_MT000040.ClinicalDocument.copyTime',
'POCD_MT000040.MaintainedEntity.effectiveTime', 'POCD_MT000040.MaintainedEntity.maintainingPerson'
and 'POCD_MT000040UV.Patient.id'
Description
cda2_to_cdar3.xsl
Copyright (C) 2012 Alexander-Henket
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
See http://www.gnu.org/licenses/gpl.html
<xsl:template match="*" mode="POCD_MT000040.AuthoringDevice"><xsl:call-template name="dt-CE-to-CD"><xsl:with-param name="in" select="hl7:code"/></xsl:call-template><xsl:call-template name="dt-SC-to-SC"><xsl:with-param name="in" select="hl7:manufacturerModelName"/></xsl:call-template><xsl:call-template name="dt-SC-to-SC"><xsl:with-param name="in" select="hl7:softwareName"/></xsl:call-template><!-- Skipping mapping of 'POCD_MT000040.AuthoringDevice.asMaintainedEntity', because there is no matching 'POCD_MT000040UV.Device.asMaintainedEntity' --><xsl:apply-templates select="*[not(namespace-uri()='urn:hl7-org:v3')]"/></xsl:template>
<xsl:template match="*" mode="POCD_MT000040.MaintainedEntity"><!-- Skipping mapping of 'POCD_MT000040.MaintainedEntity.effectiveTime', because there is no matching 'POCD_MT000040UV.MaintainedEntity.effectiveTime' --><!-- Skipping mapping of 'POCD_MT000040.MaintainedEntity.maintainingPerson', because there is no matching 'POCD_MT000040UV.MaintainedEntity.maintainingPerson' --><xsl:apply-templates select="*[not(namespace-uri()='urn:hl7-org:v3')]"/></xsl:template>
<xsl:template name="dt-StrucDoc.Text-to-ED"><xsl:param name="in"/><xsl:if test="not(empty($in))"><xsl:element name="{name($in)}" namespace="urn:hl7-org:v3"><!-- TODO: @ID and @styleCode seem no longer supported in ED... missing anything without them? --><xsl:copy-of select="$in/@mediaType|$in/@language"/><!-- TODO: copying any text content into text/xml regardless. Need more intelligent copying? --><xsl:element name="xml" namespace="urn:hl7-org:v3"><xsl:copy-of select="$in/node()"/></xsl:element></xsl:element></xsl:if></xsl:template>