[Mpuls-commits] r618 - in wasko/branches/1.0: . waskaweb/public/xml

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 5 12:27:53 CEST 2009


Author: torsten
Date: 2009-10-05 12:27:52 +0200 (Mon, 05 Oct 2009)
New Revision: 618

Modified:
   wasko/branches/1.0/ChangeLog.txt
   wasko/branches/1.0/waskaweb/public/xml/eval_adele.xml
   wasko/branches/1.0/waskaweb/public/xml/eval_aktiv.xml
   wasko/branches/1.0/waskaweb/public/xml/eval_analyse.xml
   wasko/branches/1.0/waskaweb/public/xml/eval_tagebuch.xml
   wasko/branches/1.0/waskaweb/public/xml/eval_verlauf.xml
   wasko/branches/1.0/waskaweb/public/xml/eval_weitere.xml
   wasko/branches/1.0/waskaweb/public/xml/eval_zusammenfassung.xml
Log:
Issue505


Modified: wasko/branches/1.0/ChangeLog.txt
===================================================================
--- wasko/branches/1.0/ChangeLog.txt	2009-10-05 08:23:52 UTC (rev 617)
+++ wasko/branches/1.0/ChangeLog.txt	2009-10-05 10:27:52 UTC (rev 618)
@@ -17,6 +17,17 @@
 	  Added function (bundle and single case) to check for validity. The
 	  function is currently commented out in bundles actions.
 
+	Issue505
+
+	* waskaweb/public/xml/eval_adele.xml,
+	  waskaweb/public/xml/eval_analyse.xml,
+	  waskaweb/public/xml/eval_aktiv.xml,
+	  waskaweb/public/xml/eval_tagebuch.xml,
+	  waskaweb/public/xml/eval_verlauf.xml,
+	  waskaweb/public/xml/eval_weitere.xml,
+	  waskaweb/public/xml/eval_zusammenfassung.xml: Changed
+	  master_tbl_view to master_tbl_eval_total_view
+
 2009-10-02	Torsten Irlaender	<torsten.irlaender at intevation.de> 
 
 	Issue438

Modified: wasko/branches/1.0/waskaweb/public/xml/eval_adele.xml
===================================================================
--- wasko/branches/1.0/waskaweb/public/xml/eval_adele.xml	2009-10-05 08:23:52 UTC (rev 617)
+++ wasko/branches/1.0/waskaweb/public/xml/eval_adele.xml	2009-10-05 10:27:52 UTC (rev 618)
@@ -14,7 +14,7 @@
     <name>Eintritte gesamt</name>
     <desc>Zeigt die Anzahl der Eintritte in das CM innerhalb des Auswertungszeitraums</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -26,8 +26,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>('%(sdate)s'::date &lt;= datum_cm_start 
 				AND '%(edate)s'::date &gt;= datum_cm_start)
@@ -42,7 +42,7 @@
       <phase>3,4,5</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -54,8 +54,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>('%(edate)s'::date &gt;= coalesce(datum_cm_ende, now()) 
 				AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))
@@ -70,7 +70,7 @@
       <phase>3,4,5</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -82,8 +82,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>('%(edate)s'::date &gt;= coalesce(datum_cm_ende, now()) 
 				AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now())
@@ -99,7 +99,7 @@
       <phase>3</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -111,8 +111,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>('%(edate)s'::date &gt;= coalesce(datum_cm_ende, now()) 
 				AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now())
@@ -125,7 +125,7 @@
     <name>Alterklasse (15-24 Jahre)</name>
     <desc>Zeigt die Anzahl der Jugendlichem im Alter von 15-24 Jahren. Das Alter bezieht sich auf das Eintrittsdatum ins Case Management.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -137,8 +137,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) &gt;= 15 			AND date_part('year', age(datum_cm_start, geburtsdatum)) &lt;= 24)
       </where> 
@@ -149,7 +149,7 @@
     <name>Alterklasse (jünger 15, 25-54,  älter 64 Jahre)</name>
     <desc>Zeigt die Anzahl der Jugendlichem im Alter von jünger als 15, 25-54, älter 64 Jahren. Das Alter bezieht sich auf das Eintrittsdatum ins Case Management.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -161,8 +161,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) &lt; 15 
 		OR (date_part('year', age(datum_cm_start, geburtsdatum)) &gt;= 25 
@@ -177,7 +177,7 @@
     <name>Alterklasse (55-64 Jahre)</name>
     <desc>Zeigt die Anzahl der Jugendlichem im Alter von 55-64 Jahren. Das Alter bezieht sich auf das Eintrittsdatum ins Case Management.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -189,8 +189,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) &gt;= 55 
 		AND date_part('year', age(datum_cm_start, geburtsdatum)) &lt;= 64)
@@ -202,7 +202,7 @@
     <name>Menschen mit Migrationshintergrund</name>
     <desc>Zeigt die Anzahl der Menschen mit Migrationshintergund. Ein Migrationshintergrund besteht, wenn a) die Muttersprache nicht deutsch ist, oder b) die Staatsangehörigkeit nicht deutsch ist, oder c) die Mutter oder der Vater des jungen Menschen nicht in Deutschland geboren sind.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -214,8 +214,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(nat_muspra not in (18,-1,-3) 
 				OR nat_staat not in (1,-1,-3) 
@@ -229,7 +229,7 @@
     <name>Menschen mit Behinderung</name>
     <desc>Zeigt die Anzahl der Menschen mit Behinderung. Ein Behinderung besteht, wenn in den Angaben zur Entwicklung des jungen Menschen eine anerkannte Behinderung dokumentiert wurde.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT t.id, t.entw_beh, %(xfield)s, %(yfield)s from %(from)s t WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -241,8 +241,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(t.entw_beh = 1)</where>
     </ydim>
@@ -252,7 +252,7 @@
     <name>Menschen mit sonstiger Benachteiligung</name>
     <desc>Zeigt die Anzahl der Menschen mit sonstiger Benachteiligung. Ein Benachteiligung besteht, wenn in den Angaben zur Entwicklung des jungen Menschen eine a) physische, oder b) psychische Krankheit dokumentiert wurde (geringes Problem oder größer).</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT t.id, t.entw_h_1, t.entw_i_1, %(xfield)s, %(yfield)s from %(from)s t WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -264,8 +264,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(t.entw_h_1 > 1 or t.entw_i_1 > 1)</where>
     </ydim>
@@ -275,7 +275,7 @@
     <name>Gesamtzahl CM-Kunden</name>
     <desc>Zeigt die Gesamtzahl der Jugendlichen an die sich während des Auswertungszeitraum im CM befunden haben.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -287,8 +287,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>

Modified: wasko/branches/1.0/waskaweb/public/xml/eval_aktiv.xml
===================================================================
--- wasko/branches/1.0/waskaweb/public/xml/eval_aktiv.xml	2009-10-05 08:23:52 UTC (rev 617)
+++ wasko/branches/1.0/waskaweb/public/xml/eval_aktiv.xml	2009-10-05 10:27:52 UTC (rev 618)
@@ -16,7 +16,7 @@
       <phase>0</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>(erstgespraech &lt;= '%(edate)s'::date AND coalesce(datum_cm_start, now()) &gt; '%(edate)s'::date)</where>
     </basequery>
@@ -42,8 +42,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>
@@ -55,7 +55,7 @@
       <phase>2</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>(datum_cm_start &lt;= '%(edate)s'::date AND coalesce(datum_cm_ende, now()) &gt; '%(edate)s'::date)</where>
     </basequery>
@@ -81,8 +81,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>
@@ -94,7 +94,7 @@
       <phase>4</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>(nbetr_start &lt;= '%(edate)s'::date AND coalesce(nbetr_ende, now()) &gt; '%(edate)s'::date)</where>
     </basequery>
@@ -120,8 +120,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>

Modified: wasko/branches/1.0/waskaweb/public/xml/eval_analyse.xml
===================================================================
--- wasko/branches/1.0/waskaweb/public/xml/eval_analyse.xml	2009-10-05 08:23:52 UTC (rev 617)
+++ wasko/branches/1.0/waskaweb/public/xml/eval_analyse.xml	2009-10-05 10:27:52 UTC (rev 618)
@@ -8,7 +8,7 @@
     <name>Gesamtzahl</name>
     <desc>Zeigt die Gesamtanzahl der Fälle in der Datenbank an.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>(TRUE)</where>
     </basequery>
@@ -20,9 +20,75 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>
+  <evaluation>
+    <id>2</id>
+    <name>Phase</name>
+    <desc>Zeigt Verteilung von Phasen über die Geschlechter auf.</desc>
+    <basequery>
+      <table>master_tbl_eval_total_view</table>
+      <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
+      <where>(TRUE)</where>
+    </basequery>
+    <xdim>
+      <label>Geschlecht</label>
+      <field>geschlecht</field>
+      <table>geschlecht_tbl</table>
+      <join>geschlecht</join>
+    </xdim>
+    <ydim>
+      <label>Phase</label>
+      <field>phase</field>
+      <table>phase_tbl</table>
+      <join>phase</join>
+    </ydim>
+  </evaluation>
+  <evaluation>
+    <id>3</id>
+    <name>Validität</name>
+    <desc>Zeigt Verteilung der Validitäten über die Geschlechter auf.</desc>
+    <basequery>
+      <table>(select DISTINCT p.id, p.geschlecht, l.tag_id from nm_tags_cases_view l join master_tbl_eval_total_view p on l.case_id = p.id) zzz</table>
+      <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
+      <where>(TRUE)</where>
+    </basequery>
+    <xdim>
+      <label>Geschlecht</label>
+      <field>geschlecht</field>
+      <table>geschlecht_tbl</table>
+      <join>geschlecht</join>
+    </xdim>
+    <ydim>
+      <label>Validität</label>
+      <field>tag_id</field>
+      <table>(select id, label as value from tags_view where id in (1,2,3,4,0))</table>
+      <join>tag_id</join>
+    </ydim>
+  </evaluation>
+  <evaluation>
+    <id>4</id>
+    <name>Validität in Phasen</name>
+    <desc>Zeigt Verteilung Validitäten in den verschiedenen Phasen auf.</desc>
+    <basequery>
+      <table>(select DISTINCT p.id, p.phase, p.geschlecht, l.tag_id from nm_tags_cases_view l join master_tbl_eval_total_view p on l.case_id = p.id) zzz</table>
+      <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
+      <where>(TRUE)</where>
+    </basequery>
+    <xdim>
+      <label>Phase</label>
+      <field>phase</field>
+      <table>phase_tbl</table>
+      <join>phase</join>
+    </xdim>
+    <ydim>
+      <label>Validität</label>
+      <field>tag_id</field>
+      <table>(select id, label as value from tags_view where id in (1,2,3,4,0))</table>
+      <join>tag_id</join>
+    </ydim>
+  </evaluation>
 </evaluationset>

Modified: wasko/branches/1.0/waskaweb/public/xml/eval_tagebuch.xml
===================================================================
--- wasko/branches/1.0/waskaweb/public/xml/eval_tagebuch.xml	2009-10-05 08:23:52 UTC (rev 617)
+++ wasko/branches/1.0/waskaweb/public/xml/eval_tagebuch.xml	2009-10-05 10:27:52 UTC (rev 618)
@@ -16,7 +16,7 @@
       <phase>2</phase>
     </requirement>
     <basequery>
-      <table>(select p.id, p.geschlecht, l.art, l.dauer from ka_logbuch_tbl_view l join master_tbl_view p on l.master_id = p.id) zzz</table>
+      <table>(select p.id, p.geschlecht, l.art, l.dauer from ka_logbuch_tbl l join master_tbl_eval_total_view p on l.master_id = p.id) zzz</table>
       <template>SELECT id, EXTRACT(epoch FROM dauer) as dauer, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>TRUE</where>
       <aggregate>sum(m.dauer)/60</aggregate>

Modified: wasko/branches/1.0/waskaweb/public/xml/eval_verlauf.xml
===================================================================
--- wasko/branches/1.0/waskaweb/public/xml/eval_verlauf.xml	2009-10-05 08:23:52 UTC (rev 617)
+++ wasko/branches/1.0/waskaweb/public/xml/eval_verlauf.xml	2009-10-05 10:27:52 UTC (rev 618)
@@ -16,7 +16,7 @@
       <phase>2</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -42,8 +42,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>
@@ -55,7 +55,7 @@
       <phase>2</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= datum_cm_start AND '%(edate)s'::date &gt;= datum_cm_start)</where>
     </basequery>
@@ -81,21 +81,21 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
     <ydim>
       <label>Davon Wiederaufnahmen</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(cm2c=1 AND cm_wiederauf_genehm_1 = 1 OR cm_wiederauf_genehm_2 = 1)</where>
     </ydim>
     <ydim>
       <label>Davon Neuaufnahmen</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(cm2c=1 AND cm_neuauf_genehm = 1)</where>
     </ydim>
@@ -105,7 +105,7 @@
     <name>Gesamtzahl der Austritte</name>
     <desc>Zeigt die Gesamtanzahl der Austritte innerhalb des Auswertungszeitraums.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= coalesce(datum_cm_ende, now()) AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -134,28 +134,28 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
     <ydim>
       <label>davon erfolgreiche Beendigung</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>cm_end_art = 1</where>
     </ydim>
     <ydim>
       <label>davon mit sonst. Beendigung</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>cm_end_art = 2</where>
     </ydim>
     <ydim>
       <label>davon Abbrüche</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>cm_end_art = 3</where>
     </ydim>

Modified: wasko/branches/1.0/waskaweb/public/xml/eval_weitere.xml
===================================================================
--- wasko/branches/1.0/waskaweb/public/xml/eval_weitere.xml	2009-10-05 08:23:52 UTC (rev 617)
+++ wasko/branches/1.0/waskaweb/public/xml/eval_weitere.xml	2009-10-05 10:27:52 UTC (rev 618)
@@ -1,6 +1,6 @@
 <evaluationset>
   <id>3</id>
-  <version>0.9</version>
+  <version>0.9.2</version>
   <name>Weitere Kategorien</name>
   <desc>Keine weitere Beschreibung</desc>
   <requirement>
@@ -13,7 +13,7 @@
     <name>Eintrittsalter</name>
     <desc>Zeigt die Gesamtanzahl der Fälle aufgeteilt nach den verschiedenen Alterstufen (Alter zum Ende Eintritt in das Case Management).</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()) 
 		AND '%(edate)s'::date &gt;= datum_cm_start)</where>
@@ -40,67 +40,74 @@
     </xdim>
     <ydim>
       <label>jünger als 12 Jahre</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) &lt; 12)</where>
     </ydim>
     <ydim>
       <label>12 Jahre</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) = 12)</where>
     </ydim>
     <ydim>
       <label>13 Jahre</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) = 13)</where>
     </ydim>
     <ydim>
       <label>14 Jahre</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) = 14)</where>
     </ydim>
     <ydim>
       <label>15 Jahre</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) = 15)</where>
     </ydim>
     <ydim>
       <label>16 Jahre</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) = 16)</where>
     </ydim>
     <ydim>
       <label>älter als 16 Jahre</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(date_part('year', age(datum_cm_start, geburtsdatum)) &gt; 16)</where>
     </ydim>
     <ydim>
       <label>unbekannt</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(geburtsdatum IS NULL)</where>
     </ydim>
+    <ydim>
+      <label>total</label>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
+      <join>anzahl</join>
+      <where>((date_part('year', age(datum_cm_start, geburtsdatum)) &lt; 12) OR (date_part('year', age(datum_cm_start, geburtsdatum)) = 12) OR (date_part('year', age(datum_cm_start, geburtsdatum)) = 13) OR (date_part('year', age(datum_cm_start, geburtsdatum)) = 14) OR (date_part('year', age(datum_cm_start, geburtsdatum)) = 15) OR (date_part('year', age(datum_cm_start, geburtsdatum)) = 16) OR (date_part('year', age(datum_cm_start, geburtsdatum)) &gt; 16) OR (geburtsdatum is NULL))</where>
+    </ydim>
   </evaluation>
   <evaluation>
     <id>2</id>
     <name>Zugang</name>
     <desc>Zeigt die Gesamtanzahl der Fälle aufgeteilt nach den verschiedenen Zugangswegen</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()) 
 		AND '%(edate)s'::date &gt;= datum_cm_start)</where>
@@ -137,7 +144,7 @@
     <name>Schulform bei Aufnahme</name>
     <desc>Zeigt die Gesamtanzahl der Fälle aufgeteilt nach den verschiedenen Schulformen</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()) 
 		AND '%(edate)s'::date &gt;= datum_cm_start)</where>
@@ -174,7 +181,7 @@
     <name>Aktive Schulverweigerungshaltung</name>
     <desc>Zeigt die Gesamtanzahl der Fälle aufgeteilt nach den verschiedenen Graden der Verweigerungshaltung</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()) 
 		AND '%(edate)s'::date &gt;= datum_cm_start)</where>
@@ -211,7 +218,7 @@
     <name>Passive Schulverweigerungshaltung</name>
     <desc>Zeigt die Gesamtanzahl der Fälle aufgeteilt nach den verschiedenen Graden der Verweigerungshaltung</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()) 
 		AND '%(edate)s'::date &gt;= datum_cm_start)</where>
@@ -248,7 +255,7 @@
     <name>Verlängerungen, Wiederaufnahmen, Neuaufnahmen</name>
     <desc>Zeigt die Anzahl der Fälle aufgeteilt nach Verlängerungen, Wieder- bzw. Neuaufnahmen.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()) 
 		AND '%(edate)s'::date &gt;= datum_cm_start)</where>
@@ -275,29 +282,29 @@
     </xdim>
     <ydim>
       <label>Eine Verlängerung</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(cm_datum_verlaengerung_1 is not NULL)</where>
     </ydim>
     <ydim>
       <label>Zwei Verlängerungen</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(cm_datum_verlaengerung_2 is not NULL)</where>
     </ydim>
     <ydim>
       <label>Wiederaufnahmen</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(cm2c=1 AND cm_wiederauf_genehm_1 = 1 OR cm_wiederauf_genehm_2 = 1)</where>
     </ydim>
     <ydim>
       <label>Neuaufnahmen</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
       <where>(cm2c=1 AND cm_neuauf_genehm = 1)</where>
     </ydim>
@@ -308,7 +315,7 @@
     <name>Übergang in Schulform</name>
     <desc>Zeigt die Gesamtanzahl der Fälle aufgeteilt nach den verschiedenen Übergängen</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()) 
 		AND '%(edate)s'::date &gt;= datum_cm_start)</where>
@@ -346,11 +353,11 @@
   <evaluation>
     <id>9</id>
     <name>Durchschnittliche Verweildauer in Phase A (Eingangsdokumentation)</name>
-    <desc>Zeigt die durchschnittliche Verweildauer der Fälle in der Phase A. Die Phase muss abgeschlossen sein.</desc>
+    <desc>Zeigt die durchschnittliche Verweildauer (Tage zu 24 Stunden) der Fälle in der Phase A. Die Phase muss abgeschlossen sein.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, erstgespraech, datum_cm_start, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
-      <aggregate>trunc(sum(extract(epoch from age(m.datum_cm_start, m.erstgespraech))/604800))</aggregate>
+      <aggregate>trunc(sum(extract(epoch from age(m.datum_cm_start, m.erstgespraech))/86400))</aggregate>
       <where>(TRUE)</where>
     </basequery>
     <requirement>
@@ -377,20 +384,20 @@
       <join>migration</join>
     </xdim>
     <ydim>
-      <label>Dauer (Wochen)</label>
-      <field>(select DISTINCT 1 from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT 1 as id, 'Gesamt' as value from master_tbl_view)</table>
+      <label>Dauer (Tage)</label>
+      <field>(select DISTINCT 1 from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT 1 as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>
   <evaluation>
     <id>10</id>
     <name>Durchschnittliche Verweildauer in Phase B (Case Management)</name>
-    <desc>Zeigt die durchschnittliche Verweildauer der Fälle in der Phase B. Die Phase muss abgeschlossen sein.</desc>
+    <desc>Zeigt die durchschnittliche Verweildauer (Tage zu 24 Stunden) der Fälle in der Phase B. Die Phase muss abgeschlossen sein.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, datum_cm_ende, datum_cm_start, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
-      <aggregate>trunc(sum(extract(epoch from age(m.datum_cm_ende, m.datum_cm_start))/604800))</aggregate>
+      <aggregate>trunc(sum(extract(epoch from age(m.datum_cm_ende, m.datum_cm_start))/86400))</aggregate>
       <where>(TRUE)</where>
     </basequery>
     <requirement>
@@ -417,20 +424,20 @@
       <join>migration</join>
     </xdim>
     <ydim>
-      <label>Dauer (Wochen)</label>
-      <field>(select DISTINCT 1 from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT 1 as id, 'Gesamt' as value from master_tbl_view)</table>
+      <label>Dauer (Tage)</label>
+      <field>(select DISTINCT 1 from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT 1 as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>
   <evaluation>
     <id>11</id>
     <name>Durchschnittliche Verweildauer in Phase C (Nachbetreuung)</name>
-    <desc>Zeigt die durchschnittliche Verweildauer der Fälle in der Phase C. Die Phase muss abgeschlossen sein.</desc>
+    <desc>Zeigt die durchschnittliche Verweildauer (Tage zu 24 Stunden) der Fälle in der Phase C. Die Phase muss abgeschlossen sein.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>master_tbl_eval_total_view</table>
       <template>SELECT id, nbetr_start, nbetr_ende, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
-      <aggregate>trunc(sum(extract(epoch from age(m.nbetr_ende, m.nbetr_start))/604800))</aggregate>
+      <aggregate>trunc(sum(extract(epoch from age(m.nbetr_ende, m.nbetr_start))/86400))</aggregate>
       <where>(TRUE)</where>
     </basequery>
     <requirement>
@@ -457,9 +464,9 @@
       <join>migration</join>
     </xdim>
     <ydim>
-      <label>Dauer (Wochen)</label>
-      <field>(select DISTINCT 1 from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT 1 as id, 'Gesamt' as value from master_tbl_view)</table>
+      <label>Dauer (Tage)</label>
+      <field>(select DISTINCT 1 from master_tbl_eval_total_view) as anzahl</field>
+      <table>(select DISTINCT 1 as id, 'Gesamt' as value from master_tbl_eval_total_view)</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>

Modified: wasko/branches/1.0/waskaweb/public/xml/eval_zusammenfassung.xml
===================================================================
--- wasko/branches/1.0/waskaweb/public/xml/eval_zusammenfassung.xml	2009-10-05 08:23:52 UTC (rev 617)
+++ wasko/branches/1.0/waskaweb/public/xml/eval_zusammenfassung.xml	2009-10-05 10:27:52 UTC (rev 618)
@@ -16,7 +16,7 @@
       <phase>2</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>( %(table)s )</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= datum_cm_start AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -42,8 +42,8 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from ( %(table)s )) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from ( %(table)s ))</table>
       <join>anzahl</join>
     </ydim>
   </evaluation>
@@ -55,7 +55,7 @@
       <phase>2</phase>
     </requirement>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>( %(table)s )</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(sdate)s'::date &lt;= datum_cm_start AND '%(edate)s'::date &gt;= datum_cm_start)</where>
     </basequery>
@@ -81,21 +81,21 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from ( %(table)s )) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from ( %(table)s ))</table>
       <join>anzahl</join>
     </ydim>
     <ydim>
       <label>Davon Wiederaufnahmen</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from ( %(table)s )) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from ( %(table)s ))</table>
       <join>anzahl</join>
       <where>(cm2c=1 AND cm_wiederauf_genehm_1 = 1 OR cm_wiederauf_genehm_2 = 1)</where>
     </ydim>
     <ydim>
       <label>Davon Neuaufnahmen</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from ( %(table)s )) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from ( %(table)s ))</table>
       <join>anzahl</join>
       <where>(cm2c=1 AND cm_neuauf_genehm = 1)</where>
     </ydim>
@@ -105,7 +105,7 @@
     <name>Gesamtzahl der Austritte</name>
     <desc>Zeigt die Gesamtanzahl der Austritte innerhalb des Auswertungszeitraums.</desc>
     <basequery>
-      <table>master_tbl_view</table>
+      <table>( %(table)s )</table>
       <template>SELECT id, %(xfield)s, %(yfield)s from %(from)s WHERE %(where)s</template>
       <where>('%(edate)s'::date &gt;= coalesce(datum_cm_ende, now()) AND '%(sdate)s'::date &lt;= coalesce(datum_cm_ende, now()))</where>
     </basequery>
@@ -134,28 +134,28 @@
     </xdim>
     <ydim>
       <label>Gesamtzahl Teilnehmer</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from ( %(table)s )) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from ( %(table)s ))</table>
       <join>anzahl</join>
     </ydim>
     <ydim>
       <label>davon erfolgreiche Beendigung</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from ( %(table)s )) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from ( %(table)s ))</table>
       <join>anzahl</join>
       <where>cm_end_art = 1</where>
     </ydim>
     <ydim>
       <label>davon mit sonst. Beendigung</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from ( %(table)s )) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from ( %(table)s ))</table>
       <join>anzahl</join>
       <where>cm_end_art = 2</where>
     </ydim>
     <ydim>
       <label>davon Abbrüche</label>
-      <field>(select count(id) from master_tbl_view) as anzahl</field>
-      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from master_tbl_view)</table>
+      <field>(select count(id) from ( %(table)s )) as anzahl</field>
+      <table>(select DISTINCT count(id) as id, 'Gesamt' as value from ( %(table)s ))</table>
       <join>anzahl</join>
       <where>cm_end_art = 3</where>
     </ydim>



More information about the Mpuls-commits mailing list