1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="urn:hl7-org:v3" xmlns:a="urn:astm-org:CCR" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="a">
|
---|
3 |
|
---|
4 | <xsl:import href="cdavocablookup.xsl"/>
|
---|
5 | <xsl:import href="HL7OIDLookup.xsl"/>
|
---|
6 |
|
---|
7 | <xsl:template name="ccdCodedValue">
|
---|
8 | <xsl:param name="ccrCodedDescription"/>
|
---|
9 | <xsl:param name="type"/>
|
---|
10 | <xsl:param name="domain"/>
|
---|
11 | <xsl:param name="nodeName">value</xsl:param>
|
---|
12 |
|
---|
13 | <xsl:element name="{$nodeName}">
|
---|
14 | <xsl:if test="$type">
|
---|
15 | <xsl:attribute name="xsi:type">
|
---|
16 | <xsl:value-of select="$type"/>
|
---|
17 | </xsl:attribute>
|
---|
18 | </xsl:if>
|
---|
19 | <xsl:attribute name="displayName">
|
---|
20 | <xsl:value-of select="$ccrCodedDescription/a:Text"/>
|
---|
21 | </xsl:attribute>
|
---|
22 | <xsl:choose>
|
---|
23 | <xsl:when test="$ccrCodedDescription/a:Code">
|
---|
24 | <xsl:attribute name="code">
|
---|
25 | <xsl:value-of select="$ccrCodedDescription/a:Code/a:Value"/>
|
---|
26 | </xsl:attribute>
|
---|
27 | <xsl:attribute name="codeSystemName">
|
---|
28 | <xsl:value-of select="$ccrCodedDescription/a:Code/a:CodingSystem"/>
|
---|
29 | </xsl:attribute>
|
---|
30 | <xsl:attribute name="codeSystem">
|
---|
31 | <xsl:call-template name="HL7OIDLookup">
|
---|
32 | <xsl:with-param name="name" select="$ccrCodedDescription/a:Code/a:CodingSystem"/>
|
---|
33 | </xsl:call-template>
|
---|
34 | </xsl:attribute>
|
---|
35 | </xsl:when>
|
---|
36 | <xsl:when test="$domain">
|
---|
37 | <xsl:attribute name="code">
|
---|
38 | <xsl:call-template name="CDAVocabularyLookup">
|
---|
39 | <xsl:with-param name="domain" select="$domain"/>
|
---|
40 | <xsl:with-param name="ccrDescription" select="$ccrCodedDescription/a:Text"/>
|
---|
41 | </xsl:call-template>
|
---|
42 | </xsl:attribute>
|
---|
43 | <xsl:attribute name="codeSystemName">
|
---|
44 | <xsl:call-template name="CDAVocabularyCodeSystemNameLookup">
|
---|
45 | <xsl:with-param name="domain" select="$domain"/>
|
---|
46 | </xsl:call-template>
|
---|
47 | </xsl:attribute>
|
---|
48 | <xsl:attribute name="codeSystemName">
|
---|
49 | <xsl:call-template name="CDAVocabularyCodeSystemLookup">
|
---|
50 | <xsl:with-param name="domain" select="$domain"/>
|
---|
51 | </xsl:call-template>
|
---|
52 | </xsl:attribute>
|
---|
53 | </xsl:when>
|
---|
54 | </xsl:choose>
|
---|
55 | </xsl:element>
|
---|
56 |
|
---|
57 | </xsl:template>
|
---|
58 | </xsl:stylesheet>
|
---|