[Mpuls-commits] r5305 - in wasko/trunk: . waskoweb/public/formed

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 6 10:45:07 CEST 2011


Author: ludwig
Date: 2011-09-06 10:45:05 +0200 (Tue, 06 Sep 2011)
New Revision: 5305

Modified:
   wasko/trunk/ChangeLog
   wasko/trunk/waskoweb/public/formed/convert-wasko-meta.xsl
Log:
Wasko->Meta: Add phase template,
Add formed-type to cases tag,
Fix allgemeinschulpflicht typo.

Modified: wasko/trunk/ChangeLog
===================================================================
--- wasko/trunk/ChangeLog	2011-09-05 14:20:33 UTC (rev 5304)
+++ wasko/trunk/ChangeLog	2011-09-06 08:45:05 UTC (rev 5305)
@@ -1,3 +1,10 @@
+2011-09-06  Ludwig Reiter <ludwig.reiter at intevation.de>
+
+	* waskoweb/public/formed/convert-wasko-meta.xsl:
+	Wasko->Meta: Add phase template,
+	Add formed-type to cases tag,
+	Fix allgemeinschulpflicht typo.
+
 2011-09-05  Ludwig Reiter <ludwig.reiter at intevation.de>
 
 	* waskoweb/public/formed/convert-wasko-meta.xsl:

Modified: wasko/trunk/waskoweb/public/formed/convert-wasko-meta.xsl
===================================================================
--- wasko/trunk/waskoweb/public/formed/convert-wasko-meta.xsl	2011-09-05 14:20:33 UTC (rev 5304)
+++ wasko/trunk/waskoweb/public/formed/convert-wasko-meta.xsl	2011-09-06 08:45:05 UTC (rev 5305)
@@ -6,7 +6,7 @@
     <xsl:output method="xml" encoding="UTF-8" />
 
     <xsl:template match="/">
-        <cases formed-type="" version="5">
+        <cases formed-type="http://mpuls.intevation.de/formed/air-case/2011-09-02/10:00:00" version="5">
             <case>
                 <master>
                     <rg_einrichtung>
@@ -30,6 +30,7 @@
                     <xsl:apply-templates select="cases/case/master/cm_end_abgr"/>
                     <xsl:call-template name="vorzeitig_durch"/>
                     <xsl:apply-templates select="cases/case/master/cm_end_sonst"/>
+                    <xsl:apply-templates select="cases/case/master/phase"/>
                     <xsl:call-template name="benachteiligung"/>
                     <xsl:for-each select="cases/case/master//rg_hilfsmassnahmen">
                     <rg_ua>
@@ -225,7 +226,7 @@
     </xsl:template>
 
     <xsl:template match="schulpfl_a">
-        <allgeimeinschulpflicht><xsl:value-of select="."/></allgeimeinschulpflicht>
+        <allgemeinschulpflicht><xsl:value-of select="."/></allgemeinschulpflicht>
     </xsl:template>
 
     <xsl:template match="schulpfl_b">
@@ -316,6 +317,48 @@
         </vorzeitig_grund>
     </xsl:template>
 
+    <xsl:template name="zeitraum">
+        <xsl:param name="title"/>
+        <xsl:param name="finished"/>
+        <xsl:param name="start"/>
+        <xsl:param name="end"/>
+        <rg_zeitraum>
+            <zeitraum_phase><xsl:value-of select="$title"/></zeitraum_phase>
+            <datum_zeitraum_start><xsl:value-of select="$start"/></datum_zeitraum_start>
+            <xsl:if test="$end != '' and $finished">
+                <datum_zeitraum_ende><xsl:value-of select="$end"/></datum_zeitraum_ende>
+            </xsl:if>
+        </rg_zeitraum>
+    </xsl:template>
+
+    <xsl:template match="phase">
+        <xsl:variable name="phase" select="."/>
+        <xsl:if test=". >= 0">
+            <xsl:call-template name="zeitraum">
+                <xsl:with-param name="title" select="'Eingangsanamnese'"/>
+                <xsl:with-param name="finished" select=". > 0"/>
+                <xsl:with-param name="start" select="/cases/case/master/erstgespraech"/>
+                <xsl:with-param name="end" select="/cases/case/master/datum_cm_start"/>
+            </xsl:call-template>
+        </xsl:if>
+        <xsl:if test=". >= 2">
+            <xsl:call-template name="zeitraum">
+                <xsl:with-param name="title" select="'Case-Management'"/>
+                <xsl:with-param name="finished" select=". > 2"/>
+                <xsl:with-param name="start" select="/cases/case/master/datum_cm_start"/>
+                <xsl:with-param name="end" select="/cases/case/master/datum_cm_ende"/>
+            </xsl:call-template>
+        </xsl:if>
+        <xsl:if test=". >= 4">
+            <xsl:call-template name="zeitraum">
+                <xsl:with-param name="title" select="'Nachbetreuung'"/>
+                <xsl:with-param name="finished" select=". > 4"/>
+                <xsl:with-param name="start" select="/cases/case/master/nbetr_start"/>
+                <xsl:with-param name="end" select="/cases/case/master/nbetr_ende"/>
+            </xsl:call-template>
+        </xsl:if>
+    </xsl:template>
+
     <xsl:template name="benachteiligung">
         <xsl:if test="//problfam_a &gt; 4 or //problfam_b &gt; 4 or //problfam_c &gt; 4">
             <rg_benachteiligung>



More information about the Mpuls-commits mailing list