source: ccr2ccd-xslt/trunk/make/ccd-vitals.xsl@ 1435

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

broke the stylesheet into pieces with a script to reassemble

File size: 5.7 KB
Line 
1 <xsl:if test="a:ContinuityOfCareRecord/a:Body/a:VitalSigns">
2 <component>
3 <section>
4 <templateId root="2.16.840.1.113883.10.20.1.16"/>
5 <code code="8716-3" codeSystem="2.16.840.1.113883.6.1"/>
6 <title>Vital Signs</title>
7 <text>
8 <table>
9 <tbody>
10 <tr>
11 <th>Vital Sign</th>
12 <th>Date</th>
13 <th>Result</th>
14 <th>Source</th>
15 </tr>
16 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:VitalSigns/a:Result">
17 <tr>
18 <xsl:attribute name="id">
19 <xsl:value-of select="a:CCRDataObjectID"/>
20 </xsl:attribute>
21
22 <td>
23 <xsl:value-of select="a:Description/a:Text"/>
24 </td>
25 <td>
26 <xsl:call-template name="date:format-date">
27 <xsl:with-param name="date-time" select="a:DateTime/a:ExactDateTime"/>
28 </xsl:call-template>
29 </td>
30 <td>
31 <xsl:for-each select="a:Test">
32 <xsl:value-of select="a:Description/a:Text"/>
33 <xsl:text xml:space="preserve"> </xsl:text>
34 <xsl:value-of select="a:TestResult/a:Value"/>
35 <xsl:text xml:space="preserve"> </xsl:text>
36 <xsl:value-of select="a:TestResult/a:Units/a:Unit"/>
37 <xsl:text xml:space="preserve"> </xsl:text>
38 <xsl:value-of select="a:Flag/a:Text"/>
39 <br/>
40 </xsl:for-each>
41 </td>
42 <td>
43 <xsl:call-template name="actorName">
44 <xsl:with-param name="objID" select="a:Source/a:Actor/a:ActorID"/>
45 </xsl:call-template>
46 </td>
47 </tr>
48 </xsl:for-each>
49 </tbody>
50 </table>
51 </text>
52 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:VitalSigns/a:Result">
53 <entry typeCode="DRIV">
54 <organizer classCode="CLUSTER" moodCode="EVN">
55 <templateId root="2.16.840.1.113883.10.20.1.32" assigningAuthorityName="CCD"/>
56 <templateId root="2.16.840.1.113883.10.20.1.35" assigningAuthorityName="CCD"/>
57 <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.13.1" assigningAuthorityName="IHE PCC"/>
58 <!-- Vital signs organizer template -->
59
60 <xsl:variable name="testDate" select="a:DateTime"/>
61
62 <!-- <id> -->
63 <xsl:call-template name="ccdID">
64 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
65 </xsl:call-template>
66
67 <code code="46680005" codeSystem="2.16.840.1.113883.6.96" displayName="Vital signs" codeSystemName="SNOMED CT"/>
68 <statusCode code="completed"/>
69 <xsl:call-template name="ccdDateTime">
70 <xsl:with-param name="dt" select="$testDate"/>
71 </xsl:call-template>
72
73 <xsl:call-template name="ccdObservation">
74 <xsl:with-param name="ccrTestNode" select="a:Test[1]"/>
75 <xsl:with-param name="testDate" select="$testDate"/>
76 </xsl:call-template>
77
78 </organizer>
79 </entry>
80 </xsl:for-each>
81 </section>
82 </component>
83 </xsl:if>
Note: See TracBrowser for help on using the repository browser.