<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="PMSI000041" label="PMSI. Evolution temporelle Sévérités" title="= SELECT.DATA_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ') - ' + SELECT.VERSION_GROUPAGE_LABEL" database="iCTI" swf="*CTI_view1" softCode="iCTI_pmsi" globals="PMSI_globals.XML" componentsFile="PMSI_components.XML" helpDokuWIkiDir="pmsi:sejours_analyse_globale:severites:severites_v10" helpDokuWIkiFile="pmsi000039">
	<VIEWPROPERTIES>
		<PROPERTY name="DATA" value="[EVAL 
											if ('[DATA]' == '1') {return 'viewt.nb_rsa';}
											if ('[DATA]' == '2') {return 'vieww.nb_rsa';}
											if ('[DATA]' == '3') {return 'vieww.nb_rsa';}
											if ('[DATA]' == '4') {return 'vieww.nb_rsa';}
											if ('[DATA]' == '5') {return 'vieww.nb_rsa';}
											return 'nb_rsa_vw';
										EVAL]"/>
		<PROPERTY name="DATA2" value="[EVAL 
											if ('[DATA]' == '3') {return 'viewt.nb_rsa';}
											if ('[DATA]' == '5') {return 'viewt.nb_rsa';}
											return '0';
										EVAL]"/>
		<PROPERTY name="QUERYDATA1" value="[EVAL 
											if ('[DATA]' == '4') {return 'cmd_code';}
											if ('[DATA]' == '5') {return 'cmd_code';}
											return 'ghm_prefixe';
										EVAL]"/>
		<PROPERTY name="QUERYDATA2" value="[EVAL 
											if ('[DATA]' == '4') {return '2';}
											if ('[DATA]' == '5') {return '2';}
											return '5';
										EVAL]"/>
		<PROPERTY name="QUERYDATA3" value="[EVAL 
											if ('[DATA]' == '4') {return 'S';}
											if ('[DATA]' == '5') {return 'S';}
											return 'W';
										EVAL]"/>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse" displayText="= var display:String = '';
					if (SELECT.OCCURENCE != '') {display = display + '#B#Analyse CMA#/B# : Occurences significative = #B#' + SELECT.OCCURENCE + '#/B#'}
					return display;
					">
		<GROUP label="Période">
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
			<FIELD name="PERIODE" label="de" UI="combo" tree="true" width="200" default="2014-01-01" printable="false" globalListProvider="DATE_DEBUT">
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2014-12-31" printable="false" globalListProvider="DATE_FIN">
			</FIELD>
		</GROUP>
		<GROUP label="Données">
			<FIELD name="DATA" label="" UI="combo" default="1" default2="0" printable="false">
				<OPTION label="Nombre RSA V+W" data="1"/>
				<OPTION label="Nombre RSA W" data="2"/>
				<OPTION label="% RSA W" data="3"/>
				<OPTION label="Nombre RSA S" data="4"/>
				<OPTION label="% RSA S" data="5"/>
			</FIELD>
			<FIELD name="OCCURENCE" label="Occurences significatives" UI="number" width="50" default="50" showIfNotDefault="true">
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_RSS_SELECTIONS"/>
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_RSS_X" cacheEnabled="true" select="SELECT oid, code, texte, taux_cma_national * 100,
					sum(viewt.nb_rsa),
					sum([VIEW.DATA]),
					sum(CASE WHEN v_ghm_4.date &lt; '[VIEW.D1]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D1]' AND date &lt;='[VIEW.F1]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D2]' AND date &lt;='[VIEW.F2]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D3]' AND date &lt;='[VIEW.F3]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D4]' AND date &lt;='[VIEW.F4]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D5]' AND date &lt;='[VIEW.F5]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D6]' AND date &lt;='[VIEW.F6]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D7]' AND date &lt;='[VIEW.F7]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D8]' AND date &lt;='[VIEW.F8]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D9]' AND date &lt;='[VIEW.F9]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D10]' AND date &lt;='[VIEW.F10]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D11]' AND date &lt;='[VIEW.F11]' THEN [VIEW.DATA] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D12]' AND date &lt;='[VIEW.F12]' THEN [VIEW.DATA] ELSE 0 END),
					sum([VIEW.DATA2]),
					sum(CASE WHEN date &lt; '[VIEW.D1]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D1]' AND date &lt;='[VIEW.F1]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D2]' AND date &lt;='[VIEW.F2]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D3]' AND date &lt;='[VIEW.F3]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D4]' AND date &lt;='[VIEW.F4]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D5]' AND date &lt;='[VIEW.F5]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D6]' AND date &lt;='[VIEW.F6]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D7]' AND date &lt;='[VIEW.F7]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D8]' AND date &lt;='[VIEW.F8]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D9]' AND date &lt;='[VIEW.F9]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D10]' AND date &lt;='[VIEW.F10]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D11]' AND date &lt;='[VIEW.F11]' THEN [VIEW.DATA2] ELSE 0 END),
					sum(CASE WHEN date &gt;= '[VIEW.D12]' AND date &lt;='[VIEW.F12]' THEN [VIEW.DATA2] ELSE 0 END)
					
				FROM pmsi.v_ghm_4
					
						LEFT JOIN (
							SELECT date_sortie, ghm_code, sum(nb_rsa) as nb_rsa FROM #V_RSS_X#
							WHERE mois_sortie IN ([VIEW.PERIODE_MOIS_LIST]) AND date_sortie &gt;= '[PERIODE]' AND date_sortie &lt;='[TOPERIODE]' [VIEW.FILTRE_RSS_SELECT] GROUP BY date_sortie, ghm_code
								) AS vieww  ON (v_ghm_4.code = vieww.ghm_code AND v_ghm_4.date = vieww.date_sortie) 
					
						LEFT JOIN (
							SELECT date_sortie, [VIEW.QUERYDATA1], sum(nb_rsa) as nb_rsa FROM #V_RSS_X# WHERE mois_sortie IN ([VIEW.PERIODE_MOIS_LIST]) AND date_sortie &gt;= '[PERIODE]' AND date_sortie &lt;='[TOPERIODE]' [VIEW.FILTRE_RSS_SELECT] GROUP BY date_sortie, [VIEW.QUERYDATA1]
								) AS viewt  ON (substr(v_ghm_4.code,1,[VIEW.QUERYDATA2]) = viewt.[VIEW.QUERYDATA1] AND v_ghm_4.date = viewt.date_sortie) 

					WHERE substr(code, 6, 1) = '[VIEW.QUERYDATA3]'
					AND date &gt;= '[PERIODE]' AND date &lt;='[TOPERIODE]'

					GROUP BY oid, code, texte, taux_cma_national * 100
					HAVING sum(viewt.nb_rsa)&gt; 0
					ORDER BY oid
					">
				<FIELDS>
					<FIELD name="OID"/>
					<FIELD name="COD"/>
					<FIELD name="TXT"/>
					<FIELD name="TN"/>
					<FIELD name="NRSA"/>
					<FIELD name="N"/>
					<FIELD name="NA"/>
					<FIELD name="N1"/>
					<FIELD name="N2"/>
					<FIELD name="N3"/>
					<FIELD name="N4"/>
					<FIELD name="N5"/>
					<FIELD name="N6"/>
					<FIELD name="N7"/>
					<FIELD name="N8"/>
					<FIELD name="N9"/>
					<FIELD name="N10"/>
					<FIELD name="N11"/>
					<FIELD name="N12"/>
					<FIELD name="M"/>
					<FIELD name="MA"/>
					<FIELD name="M1"/>
					<FIELD name="M2"/>
					<FIELD name="M3"/>
					<FIELD name="M4"/>
					<FIELD name="M5"/>
					<FIELD name="M6"/>
					<FIELD name="M7"/>
					<FIELD name="M8"/>
					<FIELD name="M9"/>
					<FIELD name="M10"/>
					<FIELD name="M11"/>
					<FIELD name="M12"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL select="SELECT code, texte FROM pmsi.v_calendrier_4 WHERE dernier_mois = to_char('[TOPERIODE]'::timestamp with time zone, 'YYYYMM'::text)">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
			<SQL select="SELECT 'D', CASE WHEN p_calendrier_mois.mois - p_calendrier_mois_1.mois +1 &lt;= 12 THEN p_calendrier_mois.mois - p_calendrier_mois_1.mois +1 ELSE p_calendrier_mois.mois - p_calendrier_mois_1.mois +1 - 88 END      
							FROM base.p_calendrier_mois, base.p_calendrier_mois p_calendrier_mois_1       
							WHERE p_calendrier_mois_1.mois = to_char('[PERIODE]'::timestamp with time zone, 'YYYYMM'::text)       
								AND p_calendrier_mois.mois = to_char('[TOPERIODE]'::timestamp with time zone, 'YYYYMM'::text)">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
			<SQL select="SELECT 'TOPERIODE', date FROM base.p_calendrier WHERE date &gt;= '[TOPERIODE]' AND dernier_jour = 1 ORDER BY date LIMIT 1">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
			<SQL select="
				SELECT 'D12', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 1) as subquery
				UNION ALL
				SELECT 'D11', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 2) as subquery
				UNION ALL
				SELECT 'D10', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 3) as subquery
				UNION ALL
				SELECT 'D9', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 4) as subquery
				UNION ALL
				SELECT 'D8', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 5) as subquery
				UNION ALL
				SELECT 'D7', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 6) as subquery
				UNION ALL
				SELECT 'D6', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 7) as subquery
				UNION ALL
				SELECT 'D5', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 8) as subquery
				UNION ALL
				SELECT 'D4', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 9) as subquery
				UNION ALL
				SELECT 'D3', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 10) as subquery
				UNION ALL
				SELECT 'D2', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 11) as subquery
				UNION ALL
				SELECT 'D1', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND substr(date , 9 , 2) = '01' ORDER BY date DESC LIMIT 12) as subquery
				UNION ALL
				SELECT 'F12', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 1) as subquery
				UNION ALL
				SELECT 'F11', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 2) as subquery
				UNION ALL
				SELECT 'F10', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 3) as subquery
				UNION ALL
				SELECT 'F9', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 4) as subquery
				UNION ALL
				SELECT 'F8', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 5) as subquery
				UNION ALL
				SELECT 'F7', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 6) as subquery
				UNION ALL
				SELECT 'F6', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 7) as subquery
				UNION ALL
				SELECT 'F5', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 8) as subquery
				UNION ALL
				SELECT 'F4', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 9) as subquery
				UNION ALL
				SELECT 'F3', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 10) as subquery
				UNION ALL
				SELECT 'F2', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 11) as subquery
				UNION ALL
				SELECT 'F1', MIN(date) from (SELECT date FROM base.p_calendrier WHERE date &lt;= '[VIEW.TOPERIODE]' AND dernier_jour = 1 ORDER BY date DESC LIMIT 12) as subquery">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
			<SQL select="
				SELECT 'P', count(date) FROM base.p_calendrier WHERE date &gt;= '[PERIODE]' AND date &lt;= '[TOPERIODE]' 
				UNION ALL
				SELECT 'PA', count(date) FROM base.p_calendrier WHERE date &gt;= '[PERIODE]' AND date &lt; '[VIEW.D1]' 
				UNION ALL
				SELECT 'P1', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D1]' AND date &lt;= '[VIEW.F1]'
				UNION ALL
				SELECT 'P2', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D2]' AND date &lt;= '[VIEW.F2]' 
				UNION ALL
				SELECT 'P3', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D3]' AND date &lt;= '[VIEW.F3]'
				UNION ALL
				SELECT 'P4', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D4]' AND date &lt;= '[VIEW.F4]' 
				UNION ALL
				SELECT 'P5', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D5]' AND date &lt;= '[VIEW.F5]'
				UNION ALL
				SELECT 'P6', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D6]' AND date &lt;= '[VIEW.F6]'
				UNION ALL
				SELECT 'P7', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D7]' AND date &lt;= '[VIEW.F7]' 
				UNION ALL
				SELECT 'P8', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D8]' AND date &lt;= '[VIEW.F8]' 
				UNION ALL
				SELECT 'P9', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D9]' AND date &lt;= '[VIEW.F9]'
				UNION ALL
				SELECT 'P10', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D10]' AND date &lt;= '[VIEW.F10]' 
				UNION ALL
				SELECT 'P11', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D11]' AND date &lt;= '[VIEW.F11]' 
				UNION ALL
				SELECT 'P12', count(date) FROM base.p_calendrier WHERE date &gt;= '[VIEW.D12]' AND date &lt;= '[VIEW.F12]' 
				">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Justificatif par RSS" shortLabel="Justificatif RSS" view="PMSI000040.XML" componentName="DATE_EVOL_VIEWLINK">
				<ARG name="GHM" value="if (ROW == null) {
											if (SELECT.GHM != '-1') {return SELECT.GHM}
											if (SELECT.DATA == '1') {return 'CA'} 
											if (SELECT.DATA == '2') {return 'CA'} 
											if (SELECT.DATA == '3') {return 'CA'}
											if (SELECT.DATA == '4') {return 'CS'} 
											if (SELECT.DATA == '5') {return 'CS'} 
											return SELECT.GHM}
										if (SELECT.DATA == '1') {return 'CW' + ROW.OID} 
										if (SELECT.DATA == '2') {return 'GH' + ROW.OID} 
										if (SELECT.DATA == '3') {return 'CW' + ROW.OID} 
										if (SELECT.DATA == '4') {return 'GH' + ROW.OID} 
										if (SELECT.DATA == '5') {return 'GH' + ROW.OID} 
										return SELECT.GHM"/>
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Répartition mensuelle" label="Répartition mensuelle">
			<FILTERSELECTION condition="Number(SELECT.OCCURENCE) == 0 || Number(ROW.NRSA) &gt;= Number(SELECT.OCCURENCE)"/>
			<CHART title="Evolution temporelle (5 premiers)" type="lineChart" maxItems="5" maxItemsSortOn="N" maxItemsSortSeq="D" serieIsCategory="true" sortField="N" sortSeq="D" condition="ROW.LVL == '1'">
				<CATEGORY field="CODTXT" type="Char"/>
				<SERIE field="N1" displayName="VIEW.COLH1" displayNameCalc="true" visibleCondition="VIEW.COLH1 != null"/>
				<SERIE field="N2" displayName="VIEW.COLH2" displayNameCalc="true" visibleCondition="VIEW.COLH2 != null"/>
				<SERIE field="N3" displayName="VIEW.COLH3" displayNameCalc="true" visibleCondition="VIEW.COLH3 != null"/>
				<SERIE field="N4" displayName="VIEW.COLH4" displayNameCalc="true" visibleCondition="VIEW.COLH4 != null"/>
				<SERIE field="N5" displayName="VIEW.COLH5" displayNameCalc="true" visibleCondition="VIEW.COLH5 != null"/>
				<SERIE field="N6" displayName="VIEW.COLH6" displayNameCalc="true" visibleCondition="VIEW.COLH6 != null"/>
				<SERIE field="N7" displayName="VIEW.COLH7" displayNameCalc="true" visibleCondition="VIEW.COLH7 != null"/>
				<SERIE field="N8" displayName="VIEW.COLH8" displayNameCalc="true" visibleCondition="VIEW.COLH8 != null"/>
				<SERIE field="N9" displayName="VIEW.COLH9" displayNameCalc="true" visibleCondition="VIEW.COLH9 != null"/>
				<SERIE field="N10" displayName="VIEW.COLH10" displayNameCalc="true" visibleCondition="VIEW.COLH10 != null"/>
				<SERIE field="N11" displayName="VIEW.COLH11" displayNameCalc="true" visibleCondition="VIEW.COLH11 != null"/>
				<SERIE field="N12" displayName="VIEW.COLH12" displayNameCalc="true" visibleCondition="VIEW.COLH12 != null"/>
			</CHART>
			<CHART title="Comparatif (10 premiers)" type="pieChart" maxItems="10" maxItemsSortOn="N" maxItemsSortSeq="D" sortField="CODTXT" sortSeq="A" condition="ROW.LVL == '1'">
				<CATEGORY field="CODTXT" type="Char"/>
				<SERIE field="N" displayName="SELECT.DATA_LABEL" displayNameCalc="true"/>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" key="N" keySeq="D" headerHeight="36" printRatio="0.6">
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid"/>
				<COLUMN dataField="COD" width="70" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL"/>
				<COLUMN dataField="CODTXT" type="Char" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.TXT" condition="ROW.COD == ROW.TXT"/>
					<CALC formula="ROW.COD + ' - ' + ROW.TXT" condition="ROW.COD != ROW.TXT"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" headerText="GHM" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="Autres"/>
				<COLUMN dataField="N" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="NA" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N1" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N2" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N3" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N4" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N5" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N6" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N7" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N8" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N9" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N10" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N11" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="N12" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="MA" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M1" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M2" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M3" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M4" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M5" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M6" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M7" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M8" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M9" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M10" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M11" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="M12" type="Number" visible="false" otherFunction="sum" totalFunction="sum"/>
				<COLUMN dataField="NRSA" width="70" type="Number" visible="false" outputFormat="#" headerText="Total RSA" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="TN" width="70" type="Number" visibleCondition="SELECT.DATA == '3' || SELECT.DATA == '5' " outputFormat="#,0%" headerText="% National" textAlign="right" totalFunction="text" otherFunction="text">
				</COLUMN>
				<COLUMN dataField="COL" width="70" visible="true" type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" headerText="Total" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.N" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N / ROW.M * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N / ROW.M * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COLA" width="60" visibleCondition="Number(VIEW.D) &gt;= 13" type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" headerText="&lt;&lt;" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.NA" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.NA" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.NA / ROW.MA * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.NA" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.NA / ROW.MA * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL1" width="60" visibleCondition="Number(VIEW.D) &gt;= 12" type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M1" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N1" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N1" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N1 / ROW.M1 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N1" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N1 / ROW.M1 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL2" width="60" visibleCondition="Number(VIEW.D) &gt;= 11 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M2" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N2" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N2" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N2 / ROW.M2 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N2" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N2 / ROW.M2 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL3" width="60" visibleCondition="Number(VIEW.D) &gt;= 10 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M3" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N3" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N3" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N3 / ROW.M3 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N3" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N3 / ROW.M3 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL4" width="60" visibleCondition="Number(VIEW.D) &gt;= 9 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M4" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N4" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N4" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N4 / ROW.M4 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N4" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N4 / ROW.M4 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL5" width="60" visibleCondition="Number(VIEW.D) &gt;= 8 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M5" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N5" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N5" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N5 / ROW.M5 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N5" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N5 / ROW.M5 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL6" width="60" visibleCondition="Number(VIEW.D) &gt;= 7 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M6" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N6" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N6" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N6 / ROW.M6 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N6" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N6 / ROW.M6 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL7" width="60" visibleCondition="Number(VIEW.D) &gt;= 6 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M7" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N7" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N7" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N7 / ROW.M7 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N7" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N7 / ROW.M7 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL8" width="60" visibleCondition="Number(VIEW.D) &gt;= 5 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M8" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N8" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N8" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N8 / ROW.M8 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N8" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N8 / ROW.M8 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL9" width="60" visibleCondition="Number(VIEW.D) &gt;= 4 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M9" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N9" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N9" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N9 / ROW.M9 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N9" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N9 / ROW.M9 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL10" width="60" visibleCondition="Number(VIEW.D) &gt;= 3 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M10" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N10" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N10" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N10 / ROW.M10 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N10" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N10 / ROW.M10 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL11" width="60" visibleCondition="Number(VIEW.D) &gt;= 2 " type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M11" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N11" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N11" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N11 / ROW.M11 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N11" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N11 / ROW.M11 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
				<COLUMN dataField="COL12" width="60" visibleCondition="Number(VIEW.D) &gt;= 2" type="Number" outputFormat="= if (SELECT.DATA == '3' ) {return '#,0%'}
									if (SELECT.DATA == '5' ) {return '#,0%'}
									return '#'" fixed="false" selectable="true" headerText="VIEW.M12" headerTextCalc="true" textAlign="right" otherFunction="calc" totalFunction="calc" calc="true">
					<CALC formula="ROW.N12" condition="SELECT.DATA == '1'"/>
					<CALC formula="ROW.N12" condition="SELECT.DATA == '2'"/>
					<CALC formula="ROW.N12 / ROW.M12 * 100" condition="SELECT.DATA == '3'"/>
					<CALC formula="ROW.N12" condition="SELECT.DATA == '4'"/>
					<CALC formula="ROW.N12 / ROW.M12 * 100" condition="SELECT.DATA == '5'"/>
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
