<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
	xmlns:ant="http://www.gkv-datenaustausch.de/XMLSchema/EEBZ0-ANT/1.3" 
	xmlns:kbr="http://www.gkv-datenaustausch.de/XMLSchema/EEBZ0-KBR/1.3" 
	xmlns:kgl="http://www.gkv-datenaustausch.de/XMLSchema/EEBZ0-KGL/1.3" 
	xmlns:bas="http://www.gkv-datenaustausch.de/XMLSchema/EEBZ0-basis/1.3" 
	xmlns:dat="http://www.gkv-datenaustausch.de/xml-schema/EEBZ0-DAT/1.3" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:xhtml="http://www.w3.org/1999/xhtml" 
	xmlns="http://www.w3.org/1999/xhtml" 
	exclude-result-prefixes="xsi xhtml" version="1.0">
	<!-- Stylesheet für Behandlungsplan KGL und KBR in der logischen Version 1.4.0 - Anzeige als Vektorgrafik mit dynamisierten Inhalten -->
	<!--<xsl:strip-space elements="*"/>-->
	<xsl:template match="/">
		<html xmlns="http://www.w3.org/1999/xhtml" lang="de">
			<head>
				<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
				<title>KG-KB (Formular 2)</title>
				<style type="text/css" media="all">
					html,body{
						height:297mm;
						width:210mm;
						max-width:210mm;
					}
					html {
						height: 100%;
					}
					body {
						padding-left:2em;
						margin-top:1em;
						height: 100%;
					}
					p {
						font-family: "Courier New", "Nimbus Mono L", monospace;
						font-size: small;
					}
					h4 {
						font-size: 10pt;
						color: #000000;
						font-weight: normal;
						font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
						padding:0;
						margin:0 0 5mm 0;
					}		
					h3 {
						margin:0;
						padding:0;
						font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
					}
					table {
						border-collapse:collapse;
						margin-top:2em;
					}
					#personalienfeld {
						border-spacing:1px;
					}
					#tab_erl_befund {
						max-width:90mm;
					}
					#tab_erl_befund td {
						vertical-align:top;
					}
					#letzte_seite {
						padding: 2em;
					}
					.in-black {
						font-size: 7pt;
						color: #000000;
						font-weight: normal;
						font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
					}
					.tiny {
						font-size: 6pt;
						color: #000000;
						font-weight: normal;
						font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
					}
					.info {
						font-size: 8pt;
						color: #000000;
						font-weight: normal;
						font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
					}
					.stempel {
						font-family: "Courier New", "Nimbus Mono L", monospace;
						font-size: 10pt;
					}
					.daten {
						font-family: "Courier New", "Nimbus Mono L", monospace;
						font-size: 12pt;
					}
					.nowrap {
						white-space: nowrap;
					}
					.overflow {
						overflow:hidden;
					}
					.thin-space {
						font-size: 12pt;
						font-weight: normal;
						font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
					}
					<!--.groesse1 {
						font-size: 16pt;
						color: #000000;
						font-weight: normal;
						font-family: "Geneva CY", "DejaVu Sans", sans-serif, Verdana;
					}-->
					.groesse2, h2 {
						font-size: 14pt;
						color: #000000;
						font-weight: normal;
						font-family: Verdana, "Geneva CY", "DejaVu Sans", sans-serif;
						padding:0;
						margin:0;
					}
					.groesse3, h4 {
						font-size: 10pt;
						color: #000000;
						font-weight: normal;
						font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
					}
					.hervorgehoben3 {
						font-size: 10pt;
						color: #000000;
						font-weight: bold;
						font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
					}
					.status {
						font-family: "Courier New", "Nimbus Mono L", monospace;
						font-size: 9pt;
						word-spacing:"-0.3em"
					}
					.hidden {
						display: none;
					}
					.hg_weiss {
						background-color: white;
					}
					.umrandet {
						border: 1px solid rgb(236,94,168);
					}
					.hintergrund {
						background-color:rgb(253,238,243);
						max-width:100%;
						<!--background-color:#EEEEEE;-->
					}
					.text_links {
						text-align:left;
					}
					.text_rechts {
						text-align:right;
					}
					.text_mittig {
						text-align:center;
					}
					.fliessend {
						float:left;
					}
					.breitenlimit {
						max-width:210mm;
						align:center;
					}
					.hohe_zeile {
						height:10mm;
					}
					.kaestchen {
						display: inline-flex;
						font-size:5mm;
						font-weight: normal;
						line-height:0.7;
						align:center;
						vertical-align:middle;
					}
					.abstand_rechts {
						margin-right:1mm;
					}
					.abstand_oben {
						margin-top:5mm;
					}
					@media screen {
						<![CDATA[
							.formularhintergrund {
								fill:#ffffff;	/* zum Test */
								fill:#fde6f4;
								fill-opacity:1;
								fill-rule:evenodd;
								stroke:none;
							}
							.hg_dunkel {
								fill:#cccccc;	/* zum Test */
								fill:#fbcce8;
								fill-opacity:1;
								fill-rule:evenodd;
								stroke:none;
							}
							.hg_hell {
								fill:#eeeeee;	/* zum Test */
								fill:#fde6f4;
								fill-opacity:1;
								fill-rule:evenodd;
								stroke:none;
							}
							.textfarbe_formular {
								fill:#000000;	/* zum Test */
								fill:#ec008c;
								fill-opacity:1;
								fill-rule:evenodd;
								stroke:none;
							}
							.tabellenzeile {
								stroke:#eeeeee;	/* zum Test */
								stroke:#fde6f4;
							}
							.formularlinie {
								stroke:#000000;	/* zum Test */
								stroke:#ec008c;
							}
						]]>
					}
					@media print {
						<![CDATA[
							.formularhintergrund {
								fill:#ffffff;
								fill-opacity:1;
								fill-rule:evenodd;
								stroke:none;
							}
							.hg_dunkel {
								fill:#cccccc;
								fill-opacity:1;
								fill-rule:evenodd;
								stroke:none;
							}
							.hg_hell {
								fill:#eeeeee;
								fill-opacity:1;
								fill-rule:evenodd;
								stroke:none;
							}
							.textfarbe_formular {
								fill:#333333;
								fill-opacity:1;
								fill-rule:evenodd;
								stroke:none;
							}
							.tabellenzeile {
								stroke:#eeeeee;
							}
							.formularlinie {
								stroke:#333333;
							}		
							.rahmen {
								fill:#ffffff !important;
								fill-opacity: 1 !important;
								fill-rule: evenodd !important;
								stroke:#333333 !important;
								stroke-width:0.25 !important;
							}										
						]]>
						@page {
							size: A4;
							margin: 0;
						}
						body {
							margin: 0;
							padding: 0;
						}
						.pb {
							page-break-before: always;
						}
						.hintergrund {
							background-color:#eeeeee;
							max-width:100%;
						}						
					}
				</style>
			</head>
			<body>
				<xsl:variable name="maxProZeileInterdental" select="15"/>				<!-- max. Anzahl Interdentalzwischenräume pro Zeile -->
				<xsl:variable name="maxProSeiteLeistungen" select="8"/>					<!-- max. Anzahl Zeilen pro Seite für geplante Leistungen (BEMA) -->
				<xsl:variable name="maxProZeileFreitext" select="90"/>					<!-- max. Anzahl Zeichen pro Zeile für Freitextfelder (90 bei Schriftgröße 10, 75 bei Schriftgröße 12) -->
				<xsl:variable name="maxProSeiteFreitext" select="5"/>					<!-- max. Anzahl Zeilen pro Seite für Freitextfelder (max. 5) -->
				<xsl:variable name="gebrauchteZeilenLeistungKgl">
					<xsl:choose>
						<xsl:when test="count(dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Geplante_Leistungen/kgl:Leistung_BEMA) = 0"><xsl:value-of select="0" /></xsl:when>
						<xsl:otherwise>
							<xsl:call-template name="verbrauchteZeilenLeistungKGL">
								<xsl:with-param name="nummer" select="
								count(dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Geplante_Leistungen/kgl:Leistung_BEMA) + 	
								ceiling(count(dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Geplante_Leistungen/kgl:Leistung_BEMA[position() = last()]/kgl:Interdentalraeume/kgl:Interdentalraum) div $maxProZeileInterdental)"/>
							</xsl:call-template>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:variable name="gebrauchteZeilenLeistungKbr">
					<xsl:choose>
						<xsl:when test="count(dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Geplante_Leistungen/kbr:Leistung_BEMA) = 0"><xsl:value-of select="0" /></xsl:when>
						<xsl:otherwise>
							<xsl:call-template name="verbrauchteZeilenLeistungKBR">
								<xsl:with-param name="nummer" select="
								count(dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Geplante_Leistungen/kbr:Leistung_BEMA) + 	
								ceiling(count(dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Geplante_Leistungen/kbr:Leistung_BEMA[position() = last()]/kbr:Interdentalraeume/kbr:Interdentalraum) div $maxProZeileInterdental)"/>
							</xsl:call-template>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:variable name="gebrauchteSeitenFreitext" xml:space="default">
					<xsl:choose>
						<xsl:when test="string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung) + string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung) = 0 
								and string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose) + string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Anamnese_Befund_Diagnose) = 0">
							<xsl:value-of select="1"/>
						</xsl:when>
						<xsl:when test="string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung) and 
										string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose) and
										string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Anamnese_Befund_Diagnose)">
							<xsl:value-of select="ceiling(string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung) div ($maxProZeileFreitext * $maxProSeiteFreitext))"/>
						</xsl:when>
						<xsl:when test="string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung) and 
										string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose) and
										string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Anamnese_Befund_Diagnose)">
							<xsl:value-of select="ceiling(string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung) div ($maxProZeileFreitext * $maxProSeiteFreitext))"/>
						</xsl:when>
						<xsl:when test="string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung) and 
										string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung) and
										string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Anamnese_Befund_Diagnose)">
							<xsl:value-of select="ceiling(string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose) div ($maxProZeileFreitext * $maxProSeiteFreitext))"/>
						</xsl:when>
						<xsl:when test="string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Anamnese_Befund_Diagnose) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung) and 
										string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Anamnese_Befund_Diagnose) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose) and
										string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Anamnese_Befund_Diagnose) &gt;= string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung)">
							<xsl:value-of select="ceiling(string-length(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Anamnese_Befund_Diagnose) div ($maxProZeileFreitext * $maxProSeiteFreitext))"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="1"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:variable name="gebrauchteSeitenLeistung">
					<xsl:choose>
						<xsl:when test="$gebrauchteZeilenLeistungKbr = 0 and $gebrauchteZeilenLeistungKgl = 0">
							<xsl:value-of select="1"/>
						</xsl:when>
						<xsl:when test="$gebrauchteZeilenLeistungKbr &gt;= $gebrauchteZeilenLeistungKgl">
							<xsl:value-of select="ceiling($gebrauchteZeilenLeistungKbr div $maxProSeiteLeistungen)"/>
						</xsl:when>		
						<xsl:when test="$gebrauchteZeilenLeistungKbr &lt; $gebrauchteZeilenLeistungKgl">
							<xsl:value-of select="ceiling($gebrauchteZeilenLeistungKgl div $maxProSeiteLeistungen)"/>
						</xsl:when>						
						<xsl:otherwise>
							<xsl:value-of select="1"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:variable name="gebrauchteSeiten">
					<xsl:if test="$gebrauchteSeitenFreitext &gt;= $gebrauchteSeitenLeistung"><xsl:value-of select="$gebrauchteSeitenFreitext"/></xsl:if>
					<xsl:if test="$gebrauchteSeitenFreitext &lt; $gebrauchteSeitenLeistung"><xsl:value-of select="$gebrauchteSeitenLeistung"/></xsl:if>
				</xsl:variable>
			
				<xsl:for-each select="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/*">
					<xsl:variable name="seite" select="position()"/>
					<xsl:if test="$seite &lt;= $gebrauchteSeiten">
						<svg version="1.1" id="svg9" xml:space="preserve" width="793.7" height="1111.51" viewBox="0 0 793.7 1111.51" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
							<defs id="defs13"/>
							<g id="g188" transform="matrix(1.3333333,0,0,-1.3333333,0,1122.52)">
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:'Helvetica 55 Roman';writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="text1040" x="28.346201" y="-820.8042">
										<tspan x="28.346201 32.348202 34.346199 37.568199 40.904202 44.0182 47.2402 50.576199 53.690201 56.912201 59.912201 62.912201 66.134201 67.8022 71.360199 74.240204 78.458199 80.126198 81.794197 85.796204 89.240196 92.240196 94.130203 97.352196 100.6882 102.5782 104.5762 107.7982 111.2422 114.4642" y="-820.8042" id="tspan1038" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Krankenkasse bzw. Kostenträger</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:'Helvetica 55 Roman';writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="text1048" x="28.346201" y="-793.87622">
										<tspan x="28.346201 32.6782 35.9002 41.0182 44.2402 45.908199 47.576199 50.918201 54.362202 56.4622 59.798199 63.020199 68.138199 71.360199 73.028198 76.586197 79.808197 82.808197 84.476196 87.812202 91.034203 93.032196 96.032204 97.364197 100.5862 103.9222 107.1442 109.1422 111.0322 114.2542" y="-793.87622" id="tspan1046" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Name, Vorname des Versicherten</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:'Helvetica 55 Roman';writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="text1064" x="28.346201" y="-737.18219">
										<tspan x="28.346201 32.348202 35.792202 38.792202 40.682201 43.904202 47.2402 49.130199 51.128201 54.350201 57.794201 61.016197 63.014198 66.128204 69.350204 72.686203 76.022202 79.3582 82.694199" y="-737.18219" id="tspan1062" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Kostenträgerkennung</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:'Helvetica 55 Roman';writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="text1068" x="107.7142" y="-737.18219">
										<tspan x="107.7142 111.0562 114.2782 116.2762 119.2762 120.6082 123.8302 127.1662 130.3882 132.3862 134.2762 137.4982 140.8342 143.1682 147.5002 148.9462" y="-737.18219" id="tspan1066" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Versicherten-Nr.</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:'Helvetica 55 Roman';writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="text1080" x="200.9722" y="-737.18219">
										<tspan x="200.9722 204.8602 206.7502 209.9722 211.8622 215.1982" y="-737.18219" id="tspan1078" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Status</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:'Helvetica 55 Roman';writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="text1084" x="208.40021" y="-780.25818">
										<tspan x="208.40021 211.84419 215.06619 218.62421 220.29221 221.96021 225.18221" y="-780.25818" id="tspan1082" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">geb. am</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:'Helvetica 55 Roman';writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="text1088" x="107.7142" y="-713.11621">
										<tspan x="107.7142 111.0562 114.2782 116.2762 118.1662 120.1642 123.3862 126.8302 129.8302 132.71021 135.93221 139.2682 142.6042 145.8262 147.8242 150.70419 152.59419 154.92821 159.26019 160.70621" y="-713.11621" id="tspan1086" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Vertragszahnarzt-Nr.</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:'Helvetica 55 Roman';writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none" id="text1100" x="187.0822" y="-713.11621">
										<tspan x="187.0822 191.3062 194.5282 196.4182 199.7542" y="-713.11621" id="tspan1098" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Datum</tspan>
									</text>
									<path d="M 25.724,694.914 H 252.07 V 827.717 H 25.724 Z" style="fill:none;stroke:#231f20;stroke-width:0.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1102"/>
									<path d="m 25.6816,799.583 h 226.388" style="fill:none;stroke:#231f20;stroke-width:0.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1106"/>
									<path d="m 25.5117,718.8101 h 226.558" style="fill:none;stroke:#231f20;stroke-width:0.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1110"/>
									<path d="m 25.6816,742.9043 h 226.388" style="fill:none;stroke:#231f20;stroke-width:0.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1114"/>
									<path d="m 105.1084,718.8101 v 8.504" style="fill:none;stroke:#231f20;stroke-width:0.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1118"/>
									<path d="m 105.1084,694.8003 v 8.504" style="fill:none;stroke:#231f20;stroke-width:0.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1122"/>
									<path d="m 198.7085,718.8101 v 8.504" style="fill:none;stroke:#231f20;stroke-width:0.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1126"/>
									<path d="m 184.252,694.8003 v 8.504" style="fill:none;stroke:#231f20;stroke-width:0.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path1130"/>									
									<text transform="scale(1,-1)" id="text22919" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8px;font-family:Arial;" x="45" y="-175" class="nowrap">
										<tspan x="45" dy="0" id="tspan85989">Antragsnummer</tspan>
										<tspan x="45" dy="26" id="tspan85989">Antragsnummer ursprünglicher Behandlungsplan</tspan>
										<tspan x="45" dy="26" id="tspan85989">Verarbeitungskennzeichen</tspan>
									</text>									
							</g>							
							<g id="g15" transform="matrix(1.3333333,0,0,-1.3333333,-37.795293,1594.2047)">
								<path d="M 71.004,403.773 H 311.651 V 535.494 H 71.004 Z" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path17"/>
								<path d="M 318.453,403.773 H 462.728 V 535.494 H 318.453 Z" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path75"/>
								<text transform="matrix(1,0,0,-1,318.311,537.435)" style="font-variant:normal;font-weight:normal;font-size:6px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text81">
									<tspan x="0 4.224 7.4460001 9.3360004 12.672 17.790001 19.458 21.125999 25.458 28.794001 30.684 33.905998 35.903999 38.903999 42.125999 45.462002 47.459999 48.792 50.568001 52.458 54.125999 57.462002 60.798 64.356003 66.024002 69.912003 71.802002 75.024002 80.141998 83.699997 86.921997 88.253998 89.921997 93.480003 96.702003 98.699997" y="0" id="tspan79" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6.00000015px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Datum, Unterschrift und Stempel der </tspan>
								</text>
								<text transform="matrix(1,0,0,-1,418.685,537.435)" style="font-variant:normal;font-weight:bold;font-size:6px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text85">
									<tspan x="0 4.3319998 6.6659999 10.11 13.668 17.112 20.556 24.114 27.558001 31.002001 34.223999 37.445999" y="0" id="tspan83" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:6.00000015px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Krankenkasse</tspan>
								</text>
								<path d="M 470.664,403.773 H 614.939 V 535.494 H 470.664 Z" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path87"/>
								<path d="M 470.806,403.915 H 614.797 V 535.352 H 470.806 Z" style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path89"/>
								<text transform="matrix(1,0,0,-1,469.68,537.435)" style="font-variant:normal;font-weight:normal;font-size:6px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text93">
									<tspan x="0 4.224 7.4460001 9.3360004 12.672 17.790001 19.458 21.125999 25.458 28.794001 30.684 33.905998 35.903999 38.903999 42.125999 45.462002 47.459999 48.792 50.568001 52.458 54.125999 57.462002 60.798 64.356003 66.024002 69.912003 71.802002 75.024002 80.141998 83.699997 86.921997 88.253998 89.921997 93.480003 96.702003 99.702003" y="0" id="tspan91" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6.00000015px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Datum, Unterschrift und Stempel des </tspan>
								</text>
								<text transform="matrix(1,0,0,-1,571.056,537.435)" style="font-variant:normal;font-weight:bold;font-size:6px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text97">
									<tspan x="0 3.888 7.3319998 10.89 14.448 17.892 20.226 23.34 25.452 28.896" y="0" id="tspan95" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:6.00000015px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Zahnarztes</tspan>
								</text>
								<path d="m 39.683,651.437 h 8.52 m -8.52,297.619 h 8.52" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path99"/>
								<text transform="matrix(1,0,0,-1,371.446,1118.853)" style="font-variant:normal;font-weight:bold;font-size:16px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text105">
									<tspan x="0 11.264 20.448 29.936001 39.119999 48.608002 58.383999 62.512001 72 81.487999 91.264 99.856003 109.632 113.76 122.944" y="0" id="tspan101" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15.99999944px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Behandlungsplan</tspan>
									<tspan x="0 5.3280001 14.816" y="18" id="tspan103" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15.99999944px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">für</tspan>
								</text>
								<text transform="matrix(1,0,0,-1,395.446,1076.852)" style="font-variant:normal;font-weight:bold;font-size:12px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text111">
									<tspan x="0 8.6639996 11.76 18.648001 22.643999 29.532 34.200001 41.532001 48.419998 51.515999 58.403999 65.519997 72.407997 78.851997 85.739998 90.407997 97.295998 101.964 108.852 115.968 122.856 129.972 137.088" y="0" id="tspan107" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.0000003px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Kiefergelenkserkrankung</tspan>
									<tspan x="0 8.6639996 11.76 18.648001 22.643999 29.532 34.200001 41.532001 46.200001 53.316002 60.203999" y="24.0012" id="tspan109" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.0000003px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Kieferbruch</tspan>
								</text>
								<path d="m 371.587,1072.793 h 12.677 v 17.717 h -12.677 z" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path113"/>
								<path d="m 371.729,1072.935 h 12.394 v 17.434 h -12.394 z" style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path115"/>
								<path d="m 371.587,1048.792 h 12.677 v 17.717 h -12.677 z" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path117"/>
								<path d="m 371.729,1048.934 h 12.394 v 17.434 h -12.394 z" style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none" id="path119"/>
								<path d="m 70.862,991.649 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12.001 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12 h 543.6" style="fill:none;stroke:#e9e9e9;stroke-width:0.85;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path137"/>
								<text transform="matrix(1,0,0,-1,70.862,1015.65)" style="font-variant:normal;font-weight:bold;font-size:9px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text141">
									<tspan x="0 6.165 11.502 17.000999 22.167 27.666 32.832001 38.168999 40.671001 46.007999 51.507 56.673 60.174 62.675999 69.678001 73.179001 76.347 78.848999 81.350998 87.182999 92.348999 94.670998 97.838997 100.341 105.678 111.015 116.514 119.016 125.685 129.186 134.019 139.185 144.351 149.688 154.854 157.35600 162.18901 167.68800 175.01400 177.33599 182.50199 185.00399 191.16900 194.66999 197.83799 200.34001 205.83900 211.00502 214.50599 217.00801 222.19740 227.36341 230.86439 233.18641 238.35240 241.52040 246.19139 251.52839 256.86540" y="0" id="tspan139" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:9.00000023px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Angaben über Ort, Zeit und Ursache sowie Art der Verletzung</tspan>
								</text>
								<text transform="matrix(1,0,0,-1,335.864,1015.65)" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9px;font-family:Arial;" id="text145">
									<tspan x="0 2.3310001 7.335 12.339 15.336 17.837999 23.174999 28.007999 30.006001 32.507999 38.511002 40.508999 45.341999 48.006001 52.839001 55.836001 61.173001 64.170001 69.174001 74.007001 78.677998" y="0" id="tspan143">(nur bei Kieferbruch)</tspan>
								</text>
								<text transform="matrix(1,0,0,-1,70.862,1003.649)" style="font-variant:normal;font-weight:bold;font-size:9px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text149">
									<tspan x="0 6.165 11.502 16.667999 24.822001 30.159 35.325001 40.158001 45.324001 48.662998 54.999001 60.165001 63.161999 68.499001 73.835999 79.334999 84.500999 87.839996 94.509003 96.831001 101.997 107.496 112.833 118.332 123.165 128.33099" y="0" id="tspan147" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:9.00000023px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Anamnese/Befunde/Diagnose </tspan>
								</text>
								<text transform="matrix(1,0,0,-1,201.6896,1003.649)" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9px;font-family:Arial;" id="text159">
									<tspan x="0 2.3310001 7.335 12.339 15.336 17.837999 23.174999 28.007999 30.006001 32.507999 38.511002 40.508999 45.341999 48.006001 52.839001 55.595699 60.7617 65.594704 67.592697 72.425697 77.429703 82.1007 86.6007 91.433701 94.430702 99.1017 102.0987 106.9317 111.9357 116.6067 121.6107 126.6147 131.7807 136.61369 141.61771" y="0" id="tspan151">(nur bei Kiefergelenkserkrankungen)</tspan>
									<tspan x="-130.82761 -125.8092 -120.6432 -117.8865 -112.7205 -107.8875 -103.3875 -98.554497 -93.550499 -88.717499 -83.713501 -78.880501 -76.378502 -70.213501 -65.380501 -60.376499 -55.543499 -50.539501 -45.202499 -43.204498 -38.2005 -33.196499" y="84.002403" id="tspan153" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.00000023px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Vorgesehene Behandlung</tspan>
									<tspan x="-130.82761 -124.9956 -122.1606 -117.3276 -114.4926 -112.4946 -107.3286 -102.3246 -97.4916 -94.614304 -89.781303 -87.279297 -81.114304 -76.281303 -71.277298 -66.444298 -61.4403 -56.103298 -54.105301 -49.101299 -44.097301 -38.931301 28.6227 33.641102 38.807098 41.8041 46.6371 51.641102 56.141102 60.641102 62.639099 67.472099 72.476097 75.311096 77.309097 79.307098 84.140099 89.144096 93.977097 96.479103 102.8151 107.6481 112.6521 117.4851 121.3218 123.8238 133.8318 138.3318 143.4978 148.5018 223.5618 228.8988 230.8968" y="168.00481" id="tspan155" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.00000023px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Stationäre Behandlung Voraussichtliche Dauer: von bis</tspan>
									<tspan x="-130.82761 -124.8246 -121.8276 -116.9946 -111.9906 -107.3196 -102.4866 -97.482597 -92.4786 -87.645599 -82.641602 -78.141602" y="180.0054" id="tspan157" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.00000023px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Krankenhaus:</tspan>
								</text>
								<g id="g13885" transform="translate(0,-129)">
									<path d="m 460.715,762.046 h 11.054 V 773.1 h -11.054 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path165"/>	<!-- Ankreuzkästchen genehmigt -->
									<path d="m 255.848,762.046 h 11.054 V 773.1 h -11.054 z" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path167"/>	<!-- Ankreuzkästchen nicht genehmigt -->
									<text style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9px;font-family:Arial;" x="70.721474" y="-752.40356" id="text28974" transform="scale(1,-1)" class="nowrap">
										<tspan id="tspan28972" x="70.721474" y="-764.40356">Entscheidung der Krankenkasse</tspan>
										<tspan id="tspan143" x="70.721474 73.052474 78.056474 83.060474 86.057474 88.559473 93.896473 98.729473 100.727475 103.229473 109.232476 111.230473 116.063473 118.727475 123.560475 126.317173 131.483174 136.316178 138.314171 143.147171 148.151177 152.822174 157.322174 162.155175 165.152176 169.823174 172.820174 177.653174 182.657174 187.328174 192.332174 197.336174 202.502174 207.335164 212.339184 " y="-752.40356">(nur bei Kiefergelenkserkrankung)</tspan>
										<tspan id="tspan51088" x="275.7215" y="-764.40356">nicht genehmigt</tspan>
										<tspan id="tspan51088" x="275.7215" y="-752.40356">(Begründung ggf. auf besonderem Blatt)</tspan>
										<tspan id="tspan56120" x="480.59647" y="-764.40356">genehmigt</tspan>
									</text>
								</g>
								<path d="m 356.106,834.993 v 4.393" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path169"/>
								<path d="M 413.568,835.134 H 355.965" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path171"/>
								<path d="m 413.427,839.386 v -4.393" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path173"/>
								<path d="m 442.512,834.993 v 4.393" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path175"/>
								<path d="M 499.974,835.134 H 442.37" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path177"/>
								<path d="m 499.832,839.386 v -4.393" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path179"/>
								<path d="m 70.862,907.646 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12.001 h 543.6 m -543.6,-12 h 543.6 m -543.6,-48.001 h 543.6 m -543.6,-12.001 h 543.6 m -543.6,-12.002 h 543.6 m -543.6,-24 h 543.6 M 70.862,751.64 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12.001 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12.001 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12 h 543.6 m -543.6,-60.001 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12 h 543.6 m -543.6,-12.001 h 543.6" style="fill:#010000;fill-opacity:1;stroke:#e9e9e9;stroke-width:0.84975;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path181"/>
								<path d="m 28.345,353.855 h 595.2 v 841.8 h -595.2 z" style="fill:none;stroke:#808080;stroke-width:0.05;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path207"/>
								<path d="m 22.676,1195.655 h 3.72 m 1.949,5.669 v -3.72 m 595.239,3.72 v -3.72 m 5.669,-1.949 h -3.72 m 3.72,-841.838 h -3.72 m -1.949,-5.669 v 3.72 m -595.239,-3.72 v 3.72 m -5.669,1.949 h 3.72" style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path209"/>
								<g id="g149310">
									<path d="m 569.45677,1013.6749 h 11.054 v 11.0539 h -11.054 z" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path165-6"/>
									<path d="m 530.67365,1013.9678 h 11.054 v 11.054 h -11.054 z" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path165-4"/>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:bold;font-size:8px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text145-3" x="530.3147" y="-1016.0114">
										<tspan id="tspan143-9" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:9px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" x="490.3147" y="-1016.0114">Unfall</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-size:8px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text145-3-0" x="546.14911" y="-1005.2172">
										<tspan id="tspan143-9-2" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" x="546.14911" y="-1016.0114">ja</tspan>
									</text>
									<text transform="scale(1,-1)" style="font-variant:normal;font-weight:normal;font-size:8px;font-family:Arial;writing-mode:lr-tb;fill:#231f20;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" id="text145-3-8" x="584.76056" y="-1004.8992">
										<tspan id="tspan143-9-6" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" x="584.76056" y="-1016.0114">nein</tspan>
									</text>
								</g>
								<text style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:9px;line-height:1.25;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.75" x="71.103699" y="-777.52856" id="text28257" transform="scale(1,-1)">
									<tspan id="tspan28255" style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:9px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.75" x="71.103699" y="-777.52856">Geplante Leistungen</tspan>
								</text>
								<text style="font-size:12px;line-height:1.25;font-family:Arial;stroke-width:0.75" x="70.875183" y="-765.52856" id="text37299" transform="scale(1,-1)" class="nowrap">
									<tspan id="tspan37297" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.75" x="70.875183" y="-765.52856">BEMA-Nr.</tspan>
								</text>
								<text style="font-size:12px;line-height:1.25;font-family:Arial;stroke-width:0.75" x="113.09647" y="-765.52856" id="text50817" transform="scale(1,-1)" class="nowrap">
									<tspan id="tspan50815" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:6.75px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.75" x="113.09647" y="-765.52856">Anz.</tspan>
								</text>
								<text style="font-size:12px;line-height:1.25;font-family:Arial;stroke-width:0.75" x="130.09647" y="-765.52856" id="text50817" transform="scale(1,-1)" class="nowrap">
									<tspan id="tspan50815" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9px;font-family:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.75" x="130.09647" y="-765.52856">Interdentalräume (nur bei BEMA-Nr. K4)</tspan>
								</text>
								<path d="m 70.862,1027.65 h 543.6 Z M 127.862,772.641 V 667.643" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path1895"/>
								<path d="m 70.862,1027.65 h 543.6 M 70.862,667.4555 h 543.6 m -543.975,-108.007 543.6,-0.375 Z M 111.362,772.641 V 667.643" style="fill:none;stroke:#231f20;stroke-width:0.283;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path2011"/>
								<path d="m 70.960904,510.68918 240.616566,-0.0117" style="fill:none;stroke:#231f20;stroke-width:0.282916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path1895-8"/>
								<path d="m 70.960904,483.68918 240.616566,-0.0117" style="fill:none;stroke:#231f20;stroke-width:0.282916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path3320"/>
								<path d="m 70.960904,458.18918 240.616566,-0.0117" style="fill:none;stroke:#231f20;stroke-width:0.282916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" id="path3322"/>
							</g>
							<!-- Ende fixe Formularinhalte -->

							<!-- dynamisierte Inhalte -->
							<g id="g188" transform="matrix(1.3333333,0,0,-1.3333333,0,1122.52)">
								<!-- Personalienfeld -->
								<!--<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="28" y="-830" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="'123456789012345678901234567890'"/>
									</tspan>
								</text>-->
								<xsl:variable name="persolimit" select="30" />
								<!-- KK-Name -->
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="28" y="-805" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Krankenkasse, 1, $persolimit)"/>
									</tspan>
								</text>
								<!-- Name, Adresse, Geburtsdatum -->
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="190" y="-770" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:call-template name="formatDate">
											<xsl:with-param name="date" select="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Geburtsdatum"/>
											<xsl:with-param name="jahr_zweistellig" select="true()"/>
										</xsl:call-template>
									</tspan>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="28" y="-782" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Name, 1, $persolimit)"/>
									</tspan>
								</text>
								<xsl:variable name="N_Titel" xml:space="default">
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Titel != ''">
										<xsl:value-of select="concat(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Titel, '&#160;')"/>
									</xsl:if>
								</xsl:variable>
								<xsl:variable name="N_Vorname" xml:space="default">
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Vorname != ''">
										<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Vorname"/>
									</xsl:if>
								</xsl:variable>
								<xsl:variable name="N_Namenszusatz" xml:space="default">
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Namenszusatz != ''">
										<xsl:value-of select="concat('&#160;', /dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Namenszusatz)"/>
									</xsl:if>
								</xsl:variable>
								<xsl:variable name="N_Vorsatzwort" xml:space="default">
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Vorsatzwort != ''">
										<xsl:value-of select="concat('&#160;', /dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Vorsatzwort)"/>
									</xsl:if>
								</xsl:variable>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="28" y="-770" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0" >
										<xsl:value-of select="substring(concat($N_Titel, $N_Vorname, $N_Namenszusatz, $N_Vorsatzwort), 1, ($persolimit)-9)"/>
									</tspan>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="28" y="-758" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Strasse">
										<tspan dx="0" dy="0">
											<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Hausnummer">
												<xsl:value-of select="concat(substring(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Strasse, 1, ($persolimit)-(string-length(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Hausnummer)+1)),'&#160;',/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Hausnummer)"/>
											</xsl:if>
											<xsl:if test="not(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Hausnummer)">
												<xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Strasse, 1, $persolimit)"/>
											</xsl:if>
										</tspan>
									</xsl:if>
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Postfach">		<!-- ab logischer Version 1.4.0 -->
										<tspan dx="0" dy="0">
											<xsl:value-of select="concat('Postfach&#160;',/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Postfach)"/>
										</tspan>
									</xsl:if>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="28" y="-746" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="substring(concat(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Laendercode,'&#160;',/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Postleitzahl,'&#160;',/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Ort), 1, $persolimit)"/>
									</tspan>
								</text>
								<!-- KassenIK | eGKVNR | Status -->
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="28" y="-723" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="/dat:Nutzdaten/@ik_krankenkasse"/>
									</tspan>
								</text>						
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="108" y="-723" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Krankenversichertennummer"/>
									</tspan>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="201" y="-723" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="concat(/dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Versichertenart, /dat:Nutzdaten/dat:Antrag/ant:Versicherter/bas:Besondere_Personengruppe, '0000')"/>	<!-- DMP- sowie ASV-/TSS-Kennzeichen stets '00' -->
									</tspan>
								</text>
								<!-- BSNR | LANR | Datum -->
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="28" y="-699" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Abrechnungsnummer"/>
									</tspan>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="108" y="-699" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Zahnarztnummer"/>
									</tspan>
								</text>
								<!-- Ausstellungsdatum (3) -->
								<text xml:space="default" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="190" y="-699" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:call-template name="formatDate">
											<xsl:with-param name="date">
												<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR"><xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Ausstellungsdatum"/></xsl:if>
												<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL"><xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Ausstellungsdatum"/></xsl:if>
											</xsl:with-param>
											<!--<xsl:with-param name="date" select="/dat:Nutzdaten/@erstellungsdatum"/>-->	<!-- Alternative, da kein Karteneinlesedatum in XML-Datensatz hinterlegt -->
											<xsl:with-param name="jahr_zweistellig" select="true()"/>
										</xsl:call-template>
									</tspan>
								</text>

								<!-- Antragsnummer | VKZ -->
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="46" y="-160" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0"><xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Antragsnummer"/></tspan>
									<tspan dx="0" dy="0"><xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Antragsnummer"/></tspan>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="46" y="-134" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0"><xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Antragsnummer_urspruenglicher_Behandlungsplan"/></tspan>
									<tspan dx="0" dy="0"><xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Antragsnummer_urspruenglicher_Behandlungsplan"/></tspan>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="46" y="-108" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0">
										<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Verarbeitungskennzeichen='10'">erstmalige Übermittlung</xsl:if>
										<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Verarbeitungskennzeichen='21'">Änderung</xsl:if>
										<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Verarbeitungskennzeichen='10'">erstmalige Übermittlung</xsl:if>
										<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Verarbeitungskennzeichen='21'">Änderung</xsl:if>
									</tspan>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="186" y="-54" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0"><xsl:value-of select="concat('Version&#160;',/dat:Nutzdaten/@logische_version)" /></tspan>
								</text>
								<text xml:space="preserve" style="font-size:12px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="46" y="-54" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<tspan dx="0" dy="0"><xsl:value-of select="concat('Seite&#160;',$seite,'&#160;von&#160;',$gebrauchteSeiten)"/></tspan>
								</text>

								<!-- geplante Leistungen -->
								<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL">
									<xsl:for-each select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Geplante_Leistungen/kgl:Leistung_BEMA[position() &lt;= $maxProSeiteLeistungen * $seite]">
										<xsl:variable name="verbraucht">
											<xsl:call-template name="verbrauchteZeilenLeistungKGL">
												<xsl:with-param name="nummer" select="position()"/>
											</xsl:call-template>
										</xsl:variable>
										<xsl:variable name="ersteZeileBefund" select="($verbraucht) + 1"/>
										<xsl:variable name="letzteZeileBefund" select="$verbraucht + ceiling(count(kgl:Interdentalraeume/*) div $maxProZeileInterdental)"/>
										<xsl:variable name="verbrauchteZeilenAufSeite" select="$verbraucht - ($seite - 1) * $maxProSeiteLeistungen"/>
										<xsl:if test="ceiling($ersteZeileBefund div $maxProSeiteLeistungen) = $seite or ceiling($letzteZeileBefund div $maxProSeiteLeistungen) = $seite">
											<xsl:variable name="WertY" select="-400 + ($verbraucht - ($seite - 1) * $maxProSeiteLeistungen) * 12" />
											<xsl:if test="$verbrauchteZeilenAufSeite &lt; $maxProSeiteLeistungen and not(ceiling($ersteZeileBefund div $maxProSeiteLeistungen) &lt; $seite)">
												<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="43" y="{$WertY}" transform="scale(1,-1)" text-anchor="start" class="nowrap">
													<tspan dx="0" dy="0"><xsl:value-of select="./kgl:Gebuehrennummer_BEMA" /></tspan>
												</text>
												<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="85" y="{$WertY}" transform="scale(1,-1)" text-anchor="start" class="nowrap">
													<tspan dx="0" dy="0"><xsl:value-of select="./kgl:Anzahl" /></tspan>
												</text>
											</xsl:if>
											<text xml:space="preserve" style="font-size:8px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="101" y="{$WertY}" transform="scale(1,-1)" text-anchor="start" class="nowrap">
												<xsl:for-each select="./kgl:Interdentalraeume/kgl:Interdentalraum">
													<xsl:if test="not(ceiling($ersteZeileBefund div $maxProSeiteLeistungen) &lt; $seite and position() &lt; 16 or ceiling($letzteZeileBefund div $maxProSeiteLeistungen) &gt; $seite and position() &gt;= 16)">
														<xsl:if test="position() mod 16 = 0">
															<tspan x="101" dy="12">
																<xsl:value-of select="." />
															</tspan>
														</xsl:if>
														<xsl:if test="position() mod 16 &gt; 0">
															<tspan dx="0" dy="0">
																<xsl:value-of select="." />
															</tspan>
														</xsl:if>
													</xsl:if>
												</xsl:for-each>
											</text>
										</xsl:if>
									</xsl:for-each>
								</xsl:if>
								<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR">
									<xsl:for-each select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Geplante_Leistungen/kbr:Leistung_BEMA[position() &lt;= $maxProSeiteLeistungen * $seite]">
										<xsl:variable name="verbraucht">
											<xsl:call-template name="verbrauchteZeilenLeistungKBR">
												<xsl:with-param name="nummer" select="position()"/>
											</xsl:call-template>
										</xsl:variable>
										<xsl:variable name="ersteZeileBefund" select="($verbraucht) + 1"/>
										<xsl:variable name="letzteZeileBefund" select="$verbraucht + ceiling(count(kbr:Interdentalraeume/*) div $maxProZeileInterdental)"/>
										<xsl:variable name="verbrauchteZeilenAufSeite" select="$verbraucht - ($seite - 1) * $maxProSeiteLeistungen"/>
										<xsl:if test="ceiling($ersteZeileBefund div $maxProSeiteLeistungen) = $seite or ceiling($letzteZeileBefund div $maxProSeiteLeistungen) = $seite">
											<xsl:variable name="WertY" select="-400 + ($verbraucht - ($seite - 1) * $maxProSeiteLeistungen) * 12" />
											<xsl:if test="$verbrauchteZeilenAufSeite &lt; $maxProSeiteLeistungen and not(ceiling($ersteZeileBefund div $maxProSeiteLeistungen) &lt; $seite)">
												<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="43" y="{$WertY}" transform="scale(1,-1)" text-anchor="start" class="nowrap">
													<tspan dx="0" dy="0"><xsl:value-of select="./kbr:Gebuehrennummer_BEMA" /></tspan>
												</text>
												<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="85" y="{$WertY}" transform="scale(1,-1)" text-anchor="start" class="nowrap">
													<tspan dx="0" dy="0"><xsl:value-of select="./kbr:Anzahl" /></tspan>
												</text>
											</xsl:if>
											<text xml:space="preserve" style="font-size:8px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="101" y="{$WertY}" transform="scale(1,-1)" text-anchor="start" class="nowrap">
												<xsl:for-each select="./kbr:Interdentalraeume/kbr:Interdentalraum">
													<xsl:if test="not(ceiling($ersteZeileBefund div $maxProSeiteLeistungen) &lt; $seite and position() &lt; 16 or ceiling($letzteZeileBefund div $maxProSeiteLeistungen) &gt; $seite and position() &gt;= 16)">
														<xsl:if test="position() mod 16 = 0">
															<tspan x="101" dy="12">
																<xsl:value-of select="." />
															</tspan>
														</xsl:if>
														<xsl:if test="position() mod 16 &gt; 0">
															<tspan dx="0" dy="0">
																<xsl:value-of select="." />
															</tspan>
														</xsl:if>
													</xsl:if>
												</xsl:for-each>
											</text>
										</xsl:if>
									</xsl:for-each>
								</xsl:if>

								<!-- Zahnarztstempel -->
								<xsl:variable name="zeilenlimit" select="28"/>
								<text xml:space="preserve" style="font-size:8px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="446" y="-664.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR">
										<tspan x="446" y="-54"><xsl:call-template name="formatDate"><xsl:with-param name="date" select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Ausstellungsdatum"/></xsl:call-template></tspan>
									</xsl:if>
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL">
										<tspan x="446" y="-54"><xsl:call-template name="formatDate"><xsl:with-param name="date" select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Ausstellungsdatum"/></xsl:call-template></tspan>										
									</xsl:if>
									<tspan x="446" y="-171"><xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Name, 1, $zeilenlimit)"/></tspan>
									<xsl:if test="string-length(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Name) &gt; $zeilenlimit"><tspan x="446" dy="10"><xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Name, $zeilenlimit+1, $zeilenlimit)"/></tspan></xsl:if>
									<tspan x="446" dy="10"><xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Strasse_und_Hausnummer, 1, $zeilenlimit)"/></tspan>
									<xsl:if test="string-length(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Strasse_und_Hausnummer) &gt; $zeilenlimit"><tspan x="446" dy="10"><xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Strasse_und_Hausnummer, $zeilenlimit+1, $zeilenlimit)"/></tspan></xsl:if>
									<tspan x="446" dy="10"><xsl:value-of select="substring(concat(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Postleitzahl,'&#160;',/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Ort), 1, $zeilenlimit)"/></tspan>
									<xsl:if test="string-length(concat(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Postleitzahl,'&#160;',/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Ort)) &gt; $zeilenlimit"><tspan x="446" dy="10"><xsl:value-of select="substring(concat(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Postleitzahl,'&#160;',/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Ort), $zeilenlimit+1, $zeilenlimit)"/></tspan></xsl:if>
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Telefonnummer">	
										<tspan x="446" dy="10"><xsl:value-of select="concat('Tel:&#160;', /dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:Telefonnummer)"/></tspan>
									</xsl:if>
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:E_Mail">
										<tspan x="446" dy="10"><xsl:value-of select="concat('E-Mail:&#160;', substring(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:E_Mail, 1, ($zeilenlimit)-8))"/></tspan>
										<tspan x="446" dy="10"><xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:E_Mail, -8+$zeilenlimit+1, $zeilenlimit)"/></tspan>
										<tspan x="446" dy="10"><xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:E_Mail, -8+$zeilenlimit*2+1, $zeilenlimit)"/></tspan>
										<tspan x="446" dy="10"><xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Zahnarzt/bas:E_Mail, -8+$zeilenlimit*3+1, $zeilenlimit)"/></tspan>
									</xsl:if>
								</text>

								<!-- Daten, die nur auf der ersten Seite angezeigt werden, bei mehr als einer benötigten Seite insgesamt aufgrund von wiederholbaren Strukturen -->
								<xsl:if test="$seite = 1">
									<!-- Ankreuzfelder Behandlungsplan für -->
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL">
										<g id="Kreuz_KGL">
											<path style="fill:none;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 356,735 -13,-15" id="path1001-1"/>
											<path style="fill:none;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 356,720 -13,15" id="path1001-2"/>
										</g>
									</xsl:if>
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR">
										<g id="Kreuz_KBR">
											<path style="fill:none;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 356,711 -13,-15" id="path1001-1"/>
											<path style="fill:none;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 356,696 -13,15" id="path1001-2"/>
										</g>
									</xsl:if>
									<!-- Ankreuzfelder Unfallkennzeichen -->
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Unfallkennzeichen='1'">
										<g id="Kreuz_Unfall_ja">
											<path style="fill:none;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 513,670.5 -10,-10" id="path1001-1"/>
											<path style="fill:none;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 513,660.5 -10,10" id="path1001-2"/>										
										</g>
									</xsl:if>
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Unfallkennzeichen='0'">
										<g id="Kreuz_Unfall_nein">
											<path style="fill:none;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 551.75,670.5 -10,-10" id="path1001-1"/>
											<path style="fill:none;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 551.75,660.5 -10,10" id="path1001-2"/>
										</g>
									</xsl:if>
								</xsl:if>

								<!-- kbr:Unfall_Art_der_Verletzung / kgl:Anamnese_Befund_Diagnose -->
								<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75;letter-spacing:0px;word-spacing:0px;" x="43" y="-651.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<xsl:for-each select="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/*" xml:space="default">	<!-- beliebige Zählschleife: Anzahl Elemente in XPath muss größer als "maxProSeiteFreit sein -->
										<xsl:if test="position() &lt;= $maxProSeiteFreitext">
											<tspan x="43" dy="12">
												<xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Unfall_Art_der_Verletzung, (position()-1)*$maxProZeileFreitext+(($seite)-1)*$maxProZeileFreitext*$maxProSeiteFreitext, $maxProZeileFreitext)"/>
											</tspan>
										</xsl:if>
									</xsl:for-each>
								</text>
								<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75;letter-spacing:0px;word-spacing:0px;" x="43" y="-651.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<xsl:for-each select="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/*" xml:space="default">
										<xsl:if test="position() &lt;= $maxProSeiteFreitext">
											<tspan x="43" dy="12">
												<xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Anamnese_Befund_Diagnose, (position()-1)*$maxProZeileFreitext+(($seite)-1)*$maxProZeileFreitext*$maxProSeiteFreitext, $maxProZeileFreitext)"/>
											</tspan>
										</xsl:if>
									</xsl:for-each>
								</text>

								<!-- Vorgesehene Behandlung -->
								<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75;letter-spacing:0px;word-spacing:0px;" x="43" y="-567.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<xsl:for-each select="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/*" xml:space="default">
										<xsl:if test="position() &lt;= $maxProSeiteFreitext">
											<tspan x="43" dy="12">
												<xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Vorgesehene_Behandlung, (position()-1)*$maxProZeileFreitext+(($seite)-1)*$maxProZeileFreitext*$maxProSeiteFreitext, $maxProZeileFreitext)"/>
											</tspan>
										</xsl:if>
									</xsl:for-each>
								</text>
								<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75;letter-spacing:0px;word-spacing:0px;" x="43" y="-567.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
									<xsl:for-each select="/dat:Nutzdaten/dat:Antrag/ant:Versicherter/*" xml:space="default">
										<xsl:if test="position() &lt;= $maxProSeiteFreitext">
											<tspan x="43" dy="12">
												<xsl:value-of select="substring(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Vorgesehene_Behandlung, (position()-1)*$maxProZeileFreitext+(($seite)-1)*$maxProZeileFreitext*$maxProSeiteFreitext, $maxProZeileFreitext)"/>
											</tspan>
										</xsl:if>
									</xsl:for-each>
								</text>

								<xsl:if test="$seite = 1">
									<!-- Krankenhausbehandlung -->
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung">
										<text xml:space="preserve" style="font-size:9px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="329" y="-483.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
											<tspan dx="0" dy="0">
												<xsl:call-template name="formatDate">
													<xsl:with-param name="date" select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Beginn"/>
												</xsl:call-template>
											</tspan>
											<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Ende">
												<tspan dx="27" dy="0"><xsl:call-template name="formatDate">
													<xsl:with-param name="date" select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Ende"/></xsl:call-template>
												</tspan>
											</xsl:if>
										</text>
										<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Krankenhaus">
											<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="43" y="-459.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
												<tspan dx="0" dy="0">
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Krankenhaus/kbr:Name"/>
												</tspan>
												<tspan x="43" dy="12">
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Krankenhaus/kbr:Strasse"/>
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Krankenhaus/kbr:Hausnummer"/>,&#160;
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Krankenhaus/kbr:Postleitzahl"/>
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Stationaere_Krankenhausbehandlung/kbr:Krankenhaus/kbr:Ort"/>
												</tspan>
											</text>
										</xsl:if>							
									</xsl:if>
									<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung">
										<text xml:space="preserve" style="font-size:9px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="329" y="-483.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
											<tspan dx="0" dy="0">
												<xsl:call-template name="formatDate">
													<xsl:with-param name="date" select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Beginn"/>
												</xsl:call-template>
											</tspan>
											<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Ende">
												<tspan dx="27" dy="0"><xsl:call-template name="formatDate">
													<xsl:with-param name="date" select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Ende"/></xsl:call-template>
												</tspan>
											</xsl:if>
										</text>
										<xsl:if test="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Krankenhaus">
											<text xml:space="preserve" style="font-size:10px;line-height:1.25;font-family:'Courier New';stroke-width:0.75" x="43" y="-459.20795" transform="scale(1,-1)" text-anchor="start" class="nowrap">
												<tspan dx="0" dy="0">
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Krankenhaus/kgl:Name"/>
												</tspan>
												<tspan x="43" dy="12">
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Krankenhaus/kgl:Strasse"/>
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Krankenhaus/kgl:Hausnummer"/>,&#160;
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Krankenhaus/kgl:Postleitzahl"/>
													<xsl:value-of select="/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Stationaere_Krankenhausbehandlung/kgl:Krankenhaus/kgl:Ort"/>
												</tspan>
											</text>
										</xsl:if>
									</xsl:if>
								</xsl:if>
							</g>
						</svg>
					</xsl:if>
				</xsl:for-each>
			</body>
		</html>
	</xsl:template>

	<xsl:template name="verbrauchteZeilenLeistungKGL">
		<xsl:param name="nummer"/>
		<xsl:param name="ergebnis" select="0"/>
		<xsl:choose>
			<xsl:when test="$nummer &lt;= 1">
				<xsl:value-of select="$ergebnis"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="linkerNachbar" select="$nummer - 1"/>
				<xsl:variable name="test">
					<xsl:choose>
						<xsl:when test="count(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Geplante_Leistungen/kgl:Leistung_BEMA[position() = $linkerNachbar]/kgl:Interdentalraeume/*) = 0">	<!-- falls keine Zahnangabe hinterlegt -->
							<xsl:value-of select="1"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="(ceiling(((count(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KGL/kgl:Geplante_Leistungen/kgl:Leistung_BEMA[position() = $linkerNachbar]/kgl:Interdentalraeume/*)) div 15)))"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:call-template name="verbrauchteZeilenLeistungKGL">
					<xsl:with-param name="nummer" select="$nummer - 1"/>
					<xsl:with-param name="ergebnis" select="$ergebnis + $test"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>	

	<xsl:template name="verbrauchteZeilenLeistungKBR">
		<xsl:param name="nummer"/>
		<xsl:param name="ergebnis" select="0"/>
		<xsl:choose>
			<xsl:when test="$nummer &lt;= 1">
				<xsl:value-of select="$ergebnis"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:variable name="linkerNachbar" select="$nummer - 1"/>
				<xsl:variable name="test">
					<xsl:choose>
						<xsl:when test="count(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Geplante_Leistungen/kbr:Leistung_BEMA[position() = $linkerNachbar]/kbr:Interdentalraeume/*) = 0">	<!-- falls keine Zahnangabe hinterlegt -->
							<xsl:value-of select="1"/>
						</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="(ceiling(((count(/dat:Nutzdaten/dat:Antrag/ant:Leistung/ant:KBR/kbr:Geplante_Leistungen/kbr:Leistung_BEMA[position() = $linkerNachbar]/kbr:Interdentalraeume/*)) div 15)))"/></xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<xsl:call-template name="verbrauchteZeilenLeistungKBR">
					<xsl:with-param name="nummer" select="$nummer - 1"/>
					<xsl:with-param name="ergebnis" select="$ergebnis + $test"/>
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>	
	
	<xsl:template name="formatDate">
		<xsl:param name="date"/>
		<xsl:param name="jahr_zweistellig" select="false()"/>	<!-- optionaler Parameter; default "false", d. h. 4-stellige Jahreszahl -->
		<xsl:variable name="jahr_laenge">
			<xsl:if test="$jahr_zweistellig"><xsl:value-of select="2"/></xsl:if>
			<xsl:if test="not($jahr_zweistellig)"><xsl:value-of select="4"/></xsl:if>
		</xsl:variable>
		<xsl:variable name="jahr_start">
			<xsl:if test="$jahr_zweistellig"><xsl:value-of select="3"/></xsl:if>
			<xsl:if test="not($jahr_zweistellig)"><xsl:value-of select="1"/></xsl:if>
		</xsl:variable>
		<xsl:variable name="yearNum" select="substring ($date, $jahr_start, $jahr_laenge)"/>
		<xsl:variable name="monthNum" select="substring ($date, 5, 2)"/>
		<xsl:variable name="dayNum" select="substring ($date, 7, 2)"/>
		<xsl:value-of select="$dayNum"/>
		<xsl:text>.</xsl:text>
		<xsl:value-of select="$monthNum"/>
		<xsl:text>.</xsl:text>
		<xsl:value-of select="$yearNum"/>
	</xsl:template>
</xsl:stylesheet>
