source: ccr2ccd-xslt/trunk/gpl/ccd-socialhistory.xsl@ 1669

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

latest version

File size: 5.9 KB
RevLine 
[981]1 <xsl:if test="a:ContinuityOfCareRecord/a:Body/a:SocialHistory">
2 <component>
3 <section>
4 <templateId root="2.16.840.1.113883.10.20.1.15"/>
5 <code code="29762-2" codeSystem="2.16.840.1.113883.6.1"/>
6 <title>Social History</title>
7 <text>
8 <table>
9 <tbody>
10 <tr>
11 <th>Type</th>
12 <th>Date</th>
13 <th>Code</th>
14 <th>Description</th>
15 <th>Status</th>
16 <th>Source</th>
17 </tr>
18 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:SocialHistory/a:SocialHistoryElement">
19 <tr>
20 <td>
21 <xsl:value-of select="a:Type/a:Text"/>
22 </td>
23 <td>
24 <xsl:call-template name="date:format-date">
25 <xsl:with-param name="date-time" select="a:DateTime/a:ExactDateTime"/>
26 </xsl:call-template>
27 </td>
28 <td>
29 <xsl:apply-templates select="a:Description/a:Code"/>
30 </td>
31 <td>
32 <xsl:value-of select="a:Description/a:Text" disable-output-escaping="yes"/>
33 </td>
34 <td>
35 <xsl:value-of select="a:Status/a:Text"/>
36 </td>
37 <td>
38 <xsl:call-template name="actorName">
39 <xsl:with-param name="objID" select="a:Source/a:Actor/a:ActorID"/>
40 </xsl:call-template>
41 </td>
42 </tr>
43 </xsl:for-each>
44 </tbody>
45 </table>
46 </text>
47 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:SocialHistory/a:SocialHistoryElement">
48 <entry typeCode="DRIV">
49 <observation classCode="OBS" moodCode="EVN">
50 <templateId root="2.16.840.1.113883.3.88.11.83.19" assigningAuthorityName="HITSP C83"/>
51 <templateId root="2.16.840.1.113883.10.20.1.33" assigningAuthorityName="CCD"/>
52 <!-- Social history observation template -->
53 <!-- <id> -->
54 <xsl:call-template name="ccdID">
55 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
56 </xsl:call-template>
57 <statusCode code="completed"/>
58 <xsl:call-template name="ccdDateTime">
59 <xsl:with-param name="dt" select="a:DateTime"/>
60 </xsl:call-template>
61 <entryRelationship typeCode="SUBJ" inversionInd="true">
62 <observation classCode="OBS" moodCode="EVN">
63 <templateId root="2.16.840.1.113883.10.20.1.41"/>
64 <!-- Episode observation template -->
65 <statusCode code="completed"/>
66 <entryRelationship typeCode="SAS">
67 <observation classCode="OBS" moodCode="EVN">
68 <xsl:call-template name="ccdCodedValue">
69 <xsl:with-param name="ccrCodedDescription" select="a:Description"/>
70 <xsl:with-param name="nodeName" select="'code'"/>
71 </xsl:call-template>
72 </observation>
73 </entryRelationship>
74 </observation>
75 </entryRelationship>
76 </observation>
77 </entry>
78 </xsl:for-each>
79 </section>
80 </component>
81 </xsl:if>
Note: See TracBrowser for help on using the repository browser.