cdaeau:Stylesheet

Aus Hl7wiki
Wechseln zu: Navigation, Suche

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