cdaeau:Stylesheet
Version vom 18. Dezember 2017, 16:37 Uhr von Foemig (Diskussion | Beiträge)
Die Arbeitsunfähigkeitsbescheinigung kann über ein Stylesheet angezeigt werden.
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
4 xmlns:hl7="urn:hl7-org:v3"
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xmlns:xhtml="http://www.w3.org/1999/xhtml"
7 xmlns="http://www.w3.org/1999/xhtml"
8 exclude-result-prefixes="xd hl7 xsi xhtml"
9 version="1.0">
10
11 <xsl:template match="/">
12 <xsl:apply-templates select="/hl7:ClinicalDocument"/>
13 </xsl:template>
14
15 <xsl:template match="hl7:ClinicalDocument[not(ancestor::hl7:ClinicalDocument)]">
16 <html xmlns="http://www.w3.org/1999/xhtml" >
17 <xsl:call-template name="printHead" />
18
19 <body>
20 <div style="background-color:#ffffaa; width:800px" >
21 <table >
22 <tr >
23 <td width="450px">
24 <xsl:call-template name="printPatient" />
25
26 </td>
27 <td valign="top">
28 <h1>Arbeitsunfähigkeits-<br/>bescheinigung</h1>
29
30 <h2>
31 <xsl:choose>
32 <xsl:when test="hl7:documentationOf/hl7:ServiceEvent/hl7:code/@code = 'xERST'">
33 <xsl:text>☒</xsl:text>
34 </xsl:when>
35 <xsl:when test="hl7:documentationOf/hl7:ServiceEvent/hl7:code/@code = 'xERST_END'">
36 <xsl:text>☒</xsl:text>
37 </xsl:when>
38 <xsl:otherwise>☐</xsl:otherwise>
39 </xsl:choose>
40 Erstbescheinigung
41 <br/>
42
43 <xsl:choose>
44 <xsl:when test="hl7:documentationOf/hl7:ServiceEvent/hl7:code/@code = 'xFOLGE'">
45 <xsl:text>☒</xsl:text>
46 </xsl:when>
47 <xsl:when test="hl7:documentationOf/hl7:ServiceEvent/hl7:code/@code = 'xFOLGE_END'">
48 <xsl:text>☒</xsl:text>
49 </xsl:when>
50 <xsl:otherwise>☐</xsl:otherwise>
51 </xsl:choose>
52 Folgebescheinigung
53
54 </h2>
55 </td>
56 </tr>
57 </table>
58 <table >
59 <colgroup>
60 <col width="450px"></col>
61 <col width="400px"></col>
62 </colgroup>
63 <tr width="60%">
64 <td>
65 <table>
66 <colgroup>
67 <col width="40px"></col>
68 <col width="220px"></col>
69 <col width="40px"></col>
70 <col width="170px"></col>
71 </colgroup>
72 <tr>
73 <td class="in-red">
74 <font size="+4">
75 <xsl:choose>
76 <xsl:when test="hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation[hl7:code/@code='ACCIDENT']/hl7:value/@code = 'WORK-ACCIDENT'">
77 <xsl:text>☒</xsl:text>
78 </xsl:when>
79 <xsl:otherwise>
80 <xsl:text>☐</xsl:text>
81 </xsl:otherwise>
82 </xsl:choose></font>
83 </td>
84 <td class="in-red">
85 Arbeitsunfall, Arbeitsunfall- <br/>folgen, Berufskrankheit
86 </td>
87 <td class="in-red">
88 <font size="+4">
89 <xsl:choose>
90 <xsl:when test="hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation[hl7:code/@code='ACCIDENT']/hl7:value/@code = 'D-ARZT'">
91 <xsl:text>☒</xsl:text>
92 </xsl:when>
93 <xsl:otherwise>
94 <xsl:text>☐</xsl:text>
95 </xsl:otherwise>
96 </xsl:choose>
97 </font>
98 </td>
99 <td class="in-red">
100 dem Durchgangsarzt<br/> zugewiesen
101 </td>
102 </tr>
103 <tr>
104 <td class="in-red" colspan="2">arbeitsunfähig seit </td>
105 <td colspan="2">
106 <div align="center" style="border:1px solid black; background-color:white;" >
107 <xsl:call-template name="formatDate">
108 <xsl:with-param name="date" select="hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation[hl7:code/@code='X-IATWRK']/hl7:effectiveTime/hl7:low/@value"/>
109 </xsl:call-template>
110 </div>
111 </td>
112 </tr>
113 <tr>
114 <td class="in-red" colspan="2">voraussichtlich arbeitunfähig <br/>bis einschließlich oder letzter <br/>Tag der Arbeitsfähigkeit</td>
115 <td colspan="2">
116 <div align="center" style="border:1px solid black; background-color:white;" >
117 <xsl:call-template name="formatDate">
118 <xsl:with-param name="date" select="hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation[hl7:code/@code='X-IATWRK']/hl7:effectiveTime/hl7:high/@value"/>
119 </xsl:call-template>
120 </div>
121 </td>
122 </tr>
123 <tr>
124 <td class="in-red" colspan="2">festgestellt am</td>
125 <td colspan="2">
126 <div align="center" style="border:1px solid black; background-color:white;" >
127 <xsl:call-template name="formatDate">
128 <xsl:with-param name="date" select="hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation[hl7:code/@code='X-IATWRK']/hl7:performer/hl7:time/@value"/>
129 </xsl:call-template>
130 </div>
131 </td>
132 </tr>
133 </table>
134
135 <div align="center" style="height:40px; width:450px; border:1px solid red;"><h3>Ausfertigung zur Vorlage bei der Krankenkasse</h3></div>
136 </td>
137 <td>
138 <div style="background-color:white; width:300px; border:1px solid red;" >
139 <br/>
140 <br/>
141 <br/>
142 <xsl:value-of select="hl7:author/hl7:assignedAuthor/hl7:assignedPerson/hl7:name"/>
143 <br/>
144 <xsl:value-of select="hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:name"/>
145 <br/>
146 <xsl:value-of select="hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:addr/hl7:streetName"/> 
147 <xsl:value-of select="hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:addr/hl7:houseNumber"/>
148 <br/>
149 <xsl:value-of select="hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:addr/hl7:postalCode"/> 
150 <xsl:value-of select="hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:addr/hl7:city"/>
151 <br/>
152 <br/>
153 <font class="in-red" size="-2">Vertragsarztstempel / Unterschrift</font>
154 </div>
155 </td>
156 </tr>
157 </table>
158 <hr color="red"/>
159 <h2>AU-begründende Diagnose(n) (ICD-10)</h2>
160 <table>
161 <tr>
162 <td class="in-red" width="200px">ICD-10-Code</td>
163 <td width="30px"></td>
164 <td class="in-red" width="200px">ICD-10-Code</td>
165 <td width="30px"></td>
166 <td class="in-red" width="200px">ICD-10-Code</td>
167 </tr>
168 <tr>
169 <td bgcolor="white" style="border-bottom:1px solid red;">
170 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='AU-DIAGNOSIS']/hl7:entry[1]/hl7:observation/hl7:code/@code"/>  
171 </td>
172 <td></td>
173 <td bgcolor="white" style="border-bottom:1px solid red;">
174 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='AU-DIAGNOSIS']/hl7:entry[2]/hl7:observation/hl7:code/@code"/>
175 </td>
176 <td></td>
177 <td bgcolor="white" style="border-bottom:1px solid red;">
178 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='AU-DIAGNOSIS']/hl7:entry[3]/hl7:observation/hl7:code/@code"/>
179 </td>
180 </tr>
181 <tr>
182 <td class="in-red" >ICD-10-Code</td>
183 <td></td>
184 <td class="in-red" >ICD-10-Code</td>
185 <td></td>
186 <td class="in-red" >ICD-10-Code</td>
187 </tr>
188 <tr>
189 <td bgcolor="white" style="border-bottom:1px solid red;">
190 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='AU-DIAGNOSIS']/hl7:entry[4]/hl7:observation/hl7:code/@code"/>  
191 </td>
192 <td></td>
193 <td bgcolor="white" style="border-bottom:1px solid red;">
194 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='AU-DIAGNOSIS']/hl7:entry[5]/hl7:observation/hl7:code/@code"/>
195 </td>
196 <td></td>
197 <td bgcolor="white" style="border-bottom:1px solid red;">
198 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='AU-DIAGNOSIS']/hl7:entry[6]/hl7:observation/hl7:code/@code"/>
199 </td>
200 </tr>
201 <tr>
202 <td class="in-red" >ICD-10-Code</td>
203 <td></td>
204 <td class="in-red" >ICD-10-Code</td>
205 <td></td>
206 <td class="in-red" >ICD-10-Code</td>
207 </tr>
208 <tr>
209 <td colspan="5" bgcolor="white" style="border-bottom:1px solid red;">
210 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='AU-DIAGNOSIS']/hl7:text"/>
211 </td>
212 </tr>
213 </table>
214 <table width="780px">
215 <colgroup>
216 <col width="20px"></col>
217 <col width="120px"></col>
218 <col width="110px"></col>
219 <col width="100px"></col>
220 <col width="10px"></col>
221 <col width="300px"></col>
222 <col width="200px"></col>
223 </colgroup>
224 <tr>
225 <td>
226 <font color="red" size="+3">
227 <xsl:choose>
228 <xsl:when test="hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation[hl7:code/@code='ACCIDENT']/hl7:value/@code = 'WORK-ACCIDENT'">
229 <xsl:text>☒</xsl:text>
230 </xsl:when>
231 <xsl:otherwise>☐</xsl:otherwise>
232 </xsl:choose>
233 </font>
234 </td>
235 <td colspan="2" class="in-red" >sonstiger Unfall, <br/>Unfallfolgen</td>
236 <td></td>
237 <td>
238 <font color="red" size="+3">
239 <xsl:choose>
240 <xsl:when test="hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation[hl7:code/@code='ACCIDENT']/hl7:value/@code = 'VERSORGUNG'">
241 <xsl:text>☒</xsl:text>
242 </xsl:when>
243 <xsl:otherwise>☐</xsl:otherwise>
244 </xsl:choose>
245 </font>
246 </td>
247 <td class="in-red" >Versorgungsleiden<br/>(z.B. BVG)</td>
248 <td></td>
249 </tr>
250 <tr>
251 <td colspan="6" class="in-red">Es wird die Einleitung folgender besonderer Maßnahmen für erforderlich gehalten</td>
252 </tr>
253 <tr>
254 <td>
255 <font color="red" size="+3">
256 <xsl:choose>
257 <xsl:when test="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='TREATMENT']/hl7:entry/hl7:observation[hl7:code/@code='REHA']/hl7:value/@value = 'true'">
258 <xsl:text>☒</xsl:text>
259 </xsl:when>
260 <xsl:otherwise>☐</xsl:otherwise>
261 </xsl:choose>
262 </font>
263 </td>
264 <td colspan="2" class="in-red" >Leistungen zur <br/>medizinischen Rehabilitation</td>
265 <td></td>
266 <td>
267 <font color="red" size="+3">
268 <xsl:choose>
269 <xsl:when test="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='TREATMENT']/hl7:entry/hl7:observation[hl7:code/@code='EINGLIEDERUNG']/hl7:value/@value = 'true'">
270 <xsl:text>☒</xsl:text>
271 </xsl:when>
272 <xsl:otherwise>☐</xsl:otherwise>
273 </xsl:choose>
274 </font >
275 </td>
276 <td class="in-red" >stufenweise<br/> Wiedereingliederung</td>
277 <td></td>
278 </tr>
279 <tr>
280 <td>
281 <font color="red" size="+3">
282 <xsl:choose>
283 <xsl:when test="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='TREATMENT']/hl7:text != ''">
284 <xsl:text>☒</xsl:text>
285 </xsl:when>
286 <xsl:otherwise>☐</xsl:otherwise>
287 </xsl:choose>
288 </font>
289 </td>
290 <td class="in-red" >sonstige</td>
291 <td colspan="5" bgcolor="white" style="border-bottom:1px solid black;">
292 <!-- #11 -->
293 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='TREATMENT']/hl7:text" />
294 </td>
295 </tr>
296 </table>
297 <table width="780px" bgcolor="#ffbbbb" style="border:1px solid red;">
298 <tr>
299 <td><h2>Im Krankengeldfall</h2></td>
300 <td><font color="red" size="+3">
301 <xsl:choose>
302 <!-- wenn dieses Element vorkommt, dann istddas Häkchen zusetzen -->
303 <xsl:when test="hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation/hl7:code[@code='X-IATWRK']/hl7:qualifier/hl7:value/@code = 'x7AU'">
304 <xsl:text>☒</xsl:text>
305 </xsl:when>
306 <xsl:otherwise>☐</xsl:otherwise>
307 </xsl:choose>
308 </font>
309 </td>
310 <td class="in-red" >ab 7. AU-Woche oder <br/>sonstiger Krankengeldfall</td>
311 <td>
312 <font color="red" size="+3">
313 <xsl:choose>
314 <xsl:when test="hl7:documentationOf/hl7:ServiceEvent/hl7:code/@code = 'xERST_END'">
315 <xsl:text>☒</xsl:text>
316 </xsl:when>
317 <xsl:when test="hl7:documentationOf/hl7:ServiceEvent/hl7:code/@code = 'xFOLGE_END'">
318 <xsl:text>☒</xsl:text>
319 </xsl:when>
320 <xsl:otherwise>☐</xsl:otherwise>
321 </xsl:choose>
322 </font>
323 </td>
324 <td class="in-red" >
325 Endbescheinigung
326 </td>
327 </tr>
328 </table>
329 <br/>
330 <br/>
331 </div>
332 </body>
333 </html>
334 </xsl:template>
335
336 <xsl:template name="printHead">
337 <head>
338 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
339 <title>
340 Arbeitsunfähigkeitsbescheinigung
341 </title>
342 <style type="text/css" media="all">
343 h1 {
344 font-size: 16pt;
345 color: #ff0000;
346 font-weight: bold;
347 font-family: Verdana;
348 }
349 h2 {
350 font-size: 14pt;
351 color: #ff0000;
352 font-weight: bold;
353 font-family: Verdana;
354 }
355 h3 {
356 font-size: 12pt;
357 color: #ff0000;
358 font-weight: bold;
359 font-family: Verdana;
360 }
361 h4 {
362 font-size: 8pt;
363 color: #ff0000;
364 font-weight: normal;
365 font-family: Verdana;
366 }
367 p {
368 font-gamily: "Courier";
369 font-size: small;
370 }
371
372 .in-red {
373 font-size: 10pt;
374 color: #ff0000;
375 font-weight: normal;
376 font-family: Verdana;
377 }
378 </style>
379 </head>
380 </xsl:template>
381
382 <xsl:template name="printPatient">
383 <table style="border:1px solid red;" bgcolor="white" >
384 <colgroup>
385 <col width="180px"></col>
386 <col width="170px"></col>
387 <col width="100px"></col>
388 </colgroup>
389 <tr>
390 <td class="in-red" colspan="3">Krankenkasse bzw. Kostenträger</td>
391 </tr>
392 <tr>
393 <td colspan="3" style="border-bottom:1px solid red;">
394 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='48768-0']/hl7:entry/hl7:act/hl7:entryRelationship/hl7:act/hl7:performer/hl7:assignedEntity/hl7:representedOrganization"/> 
395 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='48768-0']/hl7:entry/hl7:act/hl7:entryRelationship/hl7:act/hl7:performer/hl7:assignedEntity/hl7:addr"/>
396 </td>
397 </tr>
398 <tr >
399 <td class="in-red" colspan="3" >Name, Vorname des Versicherten</td>
400 </tr>
401 <tr >
402 <td colspan="2" style="border-bottom:1px solid red;">
403 <xsl:value-of select="hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:name"/><br/>
404 <xsl:value-of select="hl7:recordTarget/hl7:patientRole/hl7:addr"/>
405 </td>
406 <td style="border-bottom:1px solid red;"><div class="in-red">geb. am</div>
407 <br/>
408 <xsl:call-template name="formatDate">
409 <xsl:with-param name="date" select="hl7:recordTarget/hl7:patientRole/hl7:patient/hl7:birthTime/@value"/>
410 </xsl:call-template>
411 </td>
412 </tr>
413 <tr>
414 <td class="in-red" >Kostenträgerkennung</td>
415 <td class="in-red" style="border-left:1px solid red;">Versichertennummer</td>
416 <td class="in-red" style="border-left:1px solid red;">Status</td>
417 </tr>
418 <tr>
419 <td>
420 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='48768-0']/hl7:entry/hl7:act/hl7:entryRelationship/hl7:act/hl7:performer/hl7:assignedEntity/hl7:id/@extension"/>
421 </td>
422 <td>
423 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='48768-0']/hl7:entry/hl7:act/hl7:entryRelationship/hl7:act/hl7:participant[@typeCode='HLD']/hl7:participantRole/hl7:id/@extension"/>
424 </td>
425 <td>
426 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='48768-0']/hl7:entry/hl7:act/hl7:entryRelationship/hl7:act/hl7:participant[@typeCode='COV']/hl7:participantRole/hl7:code/@code"/> _
427 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='48768-0']/hl7:entry/hl7:act/hl7:entryRelationship/hl7:act/hl7:entryRelationship/hl7:observation[hl7:code/@code='PRSNGRP']/hl7:value/@code"/> _
428 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='48768-0']/hl7:entry/hl7:act/hl7:entryRelationship/hl7:act/hl7:entryRelationship/hl7:observation[hl7:code/@code='DMP']/hl7:value/@code"/> _
429 <xsl:value-of select="hl7:component/hl7:structuredBody/hl7:component/hl7:section[hl7:code/@code='48768-0']/hl7:entry/hl7:act/hl7:entryRelationship/hl7:act/hl7:entryRelationship/hl7:observation[hl7:code/@code='ASV']/hl7:value/@code"/>
430 </td>
431 </tr>
432 <tr >
433 <td class="in-red" style="border-top:1px solid red;">Betriebsstättennummer</td>
434 <td class="in-red" style="border-top:1px solid red;border-left:1px solid red;">Arzt-Nr</td>
435 <td class="in-red" style="border-top:1px solid red;border-left:1px solid red;">Datum</td>
436 </tr>
437 <tr >
438 <td>
439 <xsl:value-of select="hl7:author/hl7:assignedAuthor/hl7:representedOrganization/hl7:id/@extension"/>
440 </td>
441 <td>
442 <xsl:value-of select="hl7:author/hl7:assignedAuthor/hl7:id/@extension"/>
443 </td>
444 <td>
445 <xsl:call-template name="formatDate">
446 <xsl:with-param name="date" select="hl7:effectiveTime/@value"/>
447 </xsl:call-template>
448 </td>
449 </tr>
450 </table>
451 </xsl:template>
452
453 <xsl:template name="formatDate">
454 <xsl:param name="date"/>
455 <xsl:variable name="yearNum" select="substring ($date, 1, 4)"/>
456 <xsl:variable name="monthNum" select="substring ($date, 5, 2)"/>
457 <xsl:variable name="dayNum" select="substring ($date, 7, 2)"/>
458
459 <xsl:value-of select="$dayNum"/>
460 <xsl:text>. </xsl:text>
461 <xsl:value-of select="$monthNum"/>
462 <xsl:text>. </xsl:text>
463 <xsl:value-of select="$yearNum"/>
464
465 </xsl:template>
466
467</xsl:stylesheet>