source: ccr2ccd-xslt/trunk/make/ccd-immunizations.xsl@ 1703

Last change on this file since 1703 was 875, checked in by George Lilly, 14 years ago

broke the stylesheet into pieces with a script to reassemble

File size: 9.4 KB
Line 
1 <xsl:if test="a:ContinuityOfCareRecord/a:Body/a:Immunizations">
2 <component>
3 <section>
4 <templateId root="2.16.840.1.113883.10.20.1.6"/>
5 <code code="11369-6" codeSystem="2.16.840.1.113883.6.1"/>
6 <title>Immunizations</title>
7 <text>
8 <table>
9 <tbody>
10 <tr>
11 <th>Code</th>
12 <th>Vaccine</th>
13 <th>Date</th>
14 <th>Route</th>
15 <th>Site</th>
16 <th>Source</th>
17 </tr>
18 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Immunizations/a:Immunization">
19 <tr>
20 <xsl:attribute name="id">
21 <xsl:value-of select="a:CCRDataObjectID"/>
22 </xsl:attribute>
23 <td>
24 <xsl:apply-templates select="a:Product/a:ProductName/a:Code"/>
25 </td>
26 <td>
27
28 <xsl:value-of select="a:Product/a:ProductName/a:Text"/>
29 <xsl:if test="a:Product/a:Form">
30 <xsl:text xml:space="preserve"> </xsl:text>(<xsl:value-of select="a:Product/a:Form/a:Text"/>)
31 </xsl:if>
32 </td>
33 <td>
34 <xsl:call-template name="date:format-date">
35 <xsl:with-param name="date-time" select="a:DateTime/a:ExactDateTime"/>
36 </xsl:call-template>
37 </td>
38 <td>
39 <xsl:value-of select="a:Directions/a:Direction/a:Route/a:Text"/>
40 </td>
41 <td>
42 <xsl:attribute name="id">
43 <xsl:value-of select="a:CCRDataObjectID"/>
44 <xsl:text>:Site</xsl:text>
45 </xsl:attribute>
46
47 <xsl:value-of select="a:Directions/a:Direction/a:Site/a:Text"/>
48 </td>
49 <td>
50 <xsl:call-template name="actorName">
51 <xsl:with-param name="objID" select="a:Source/a:Actor/a:ActorID"/>
52 </xsl:call-template>
53 </td>
54 </tr>
55 </xsl:for-each>
56 </tbody>
57 </table>
58 </text>
59 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Immunizations/a:Immunization">
60 <entry typeCode="DRIV">
61 <substanceAdministration classCode="SBADM" moodCode="EVN">
62 <templateId root="2.16.840.1.113883.10.20.1.24" assigningAuthorityName="CCD"/>
63 <templateId root="2.16.840.1.113883.3.88.11.83.13" assigningAuthorityName="HITSP C83"/>
64 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.12" assigningAuthorityName="IHE PCC"/>
65
66 <!-- Medication activity template -->
67
68 <!-- <id> -->
69 <xsl:call-template name="ccdID">
70 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
71 </xsl:call-template>
72
73 <code code="IMMUNIZ" codeSystem="2.16.840.1.113883.5.4" codeSystemName="HL7 ActCode"/>
74 <text>
75 <reference>
76 <xsl:attribute name="value">
77 <xsl:text>#</xsl:text>
78 <xsl:value-of select="a:CCRDataObjectID"/>
79 </xsl:attribute>
80 </reference>
81 </text>
82
83 <statusCode code='completed'/>
84
85 <xsl:call-template name="ccdDateTime">
86 <xsl:with-param name="dt" select="a:DateTime"/>
87 <xsl:with-param name="type" select="'IVL_TS'"/>
88 </xsl:call-template>
89
90 <xsl:call-template name="ccdCodedValue">
91 <xsl:with-param name="ccrCodedDescription" select="a:Directions/a:Direction/a:Route"/>
92 <xsl:with-param name="nodeName" select="'routeCode'"/>
93 <xsl:with-param name="domain" select="'RouteOfAdministration'"/>
94 </xsl:call-template>
95
96 <xsl:if test="a:Directions/a:Direction/a:Site">
97 <xsl:call-template name="ccdCodedValue">
98 <xsl:with-param name="ccrCodedDescription" select="a:Directions/a:Direction/a:Site"/>
99 <xsl:with-param name="nodeName" select="'approachSiteCode'"/>
100 <xsl:with-param name="originalTextReference">
101 <xsl:text>#</xsl:text>
102 <xsl:value-of select="a:CCRDataObjectID"/>
103 <xsl:text>:Site</xsl:text>
104 </xsl:with-param>
105 </xsl:call-template>
106 </xsl:if>
107
108 <consumable>
109 <manufacturedProduct>
110 <templateId root="2.16.840.1.113883.3.88.11.83.8.2" assigningAuthorityName="HITSP C83"/>
111 <templateId root="2.16.840.1.113883.10.20.1.53" assigningAuthorityName="CCD"/>
112 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2" assigningAuthorityName="IHE PCC"/>
113
114 <!-- Product template -->
115
116 <manufacturedMaterial>
117 <xsl:call-template name="ccdCodedValue">
118 <xsl:with-param name="ccrCodedDescription" select="a:Product/a:ProductName"/>
119 <xsl:with-param name="nodeName" select="'code'"/>
120 </xsl:call-template>
121 <name>
122 <xsl:value-of select="a:Product/a:BrandName/a:Text"/>
123 </name>
124 </manufacturedMaterial>
125 </manufacturedProduct>
126 </consumable>
127
128 </substanceAdministration>
129 </entry>
130 </xsl:for-each>
131 </section>
132 </component>
133 </xsl:if>
Note: See TracBrowser for help on using the repository browser.