<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="PMSI000434" label="PMSI. Comparaison mensuel séjours" title="= 'Comparaison mensuel séjours par ' +  SELECT.GROUPBY_LABEL + ' ('+ VIEW.COMPAREPERIODETXT + ' : ' + VIEW.PERIODE_D_LABEL + ' à ' + VIEW.TOPERIODE_D_LABEL  + ' vs ' + '  N : '+   SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')'" database="iCTI" swf="*CTI_view1" softCode="iCTI_pmsi" globals="PMSI_globals.XML" componentsFile="PMSI_components.XML" helpDokuWIkiDir="pmsi:sejours_analyse_globale:rss:sejours_rss:" helpDokuWIkiFile="pmsi000008"  helpFile="iCTI_PMSI_PMSI000035.HTML">
	<VIEWPROPERTIES componentName="PROPERTIES_RSS" />
	<VIEWPROPERTIES componentName="PROPERTIES_SELECT_TABTREE" />
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value" />
		<PROPERTY name="DATAFUNC">
			<value><![CDATA[[EVAL 
				// <?php
				
				function PMSI0000434_calcSQL($data,$nb=FALSE) {
					// Pas de donnée sélectionnée, on renvoie des valeurs à zéro
					if ($data == '0') {
						return '0, 0';
					}
					$ctiDivision = "base.cti_division(%s, %s)";
					$sumCaseWhen = "sum(CASE WHEN date_sortie BETWEEN @date_debut@ AND @date_fin@ %s THEN %s ELSE 0 END)";
					$countCaseWhen = "count(DISTINCT CASE WHEN date_sortie BETWEEN @date_debut@ AND @date_fin@ %s THEN %s ELSE NULL END)";
                    if($nb){
                        $periodeDebut = "date_trunc('month','[TOPERIODE]'::date)";
                        $periodePrecDebut = "date_trunc('month','[TOPERIODE_D]'::date)";
                    }else {
                        $periodeDebut = '\'[PERIODE]\'::date';
                        $periodePrecDebut = '\'[PERIODE_D]\'::date';
                    }
					$periodeFin = '\'[TOPERIODE]\'::date';
					$periodePrecFin = '\'[TOPERIODE_D]\'::date';
					$tmp0 = '';
					
			switch ($data) {
						case '1':	// Nombre de séjours
							$tmp = sprintf($countCaseWhen, $tmp0, 'v_rss_1.rss_id');
							break;
						case '2':	// Nombre de séjours 0 nuit
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_rsa_0n');
							break;
						case '3':	// Nombre de séjours 1 nuit
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_rsa_1n');
							break;
						case '3.3':	// Nombre de séjours > 1 nuit
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_rsa_2n + nb_rsa_xn');
							break;
						case '4':	// Nombre de séjours 2 nuits
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_rsa_2n');
							break;
						case '5':	// Nombre de séjours &gt; 2 nuits
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_rsa_xn');
							break;
						case '6':	// Nombre de séances
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_seances');
							break;
                        case '10':	// Nombre CHIR AMBU
							$tmp0 = ' AND duree_sejour = \'0\' AND cas_code = \'C\' ';
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_rsa');
							break;
						case '7':	// Nombre de journées
							$tmp = sprintf($sumCaseWhen, $tmp0, 'duree_sejour');
							break;
						case '8':	// DMS
							$tmp0 = ' AND cmd_code <> \'28\' ';
							$tmp1 = sprintf($sumCaseWhen, $tmp0, 'duree_sejour');
							$tmp2 = sprintf($sumCaseWhen, $tmp0, 'nb_rsa');
							$tmp = sprintf($ctiDivision, $tmp1, $tmp2);
							break;
						case '8.1':	// DMS GHS
							$tmp0 = ' AND cmd_code <> \'28\' ';
							$tmp1 = sprintf($sumCaseWhen, $tmp0, 'dms_nationale_ghs');
							$tmp2 = sprintf($sumCaseWhen, $tmp0, 'nb_rsa');
							$tmp = sprintf($ctiDivision, $tmp1, $tmp2);
							break;                            
                        case '9':	// Nombre décès 
							$tmp0 = ' AND mode_sortie = \'9\' ';
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_rsa');
							break;                        
						case '1X':	// Nombre de séjours > 1 nuit
							$tmp = sprintf($sumCaseWhen, $tmp0, 'nb_rsa_2n + nb_rsa_xn');
							break;
                        case '1.13':	// Age moy public qualifié
							$tmp1 = sprintf($sumCaseWhen,$tmp0, 'ghm_nat.age_prive');
							$tmp2 = sprintf($sumCaseWhen, $tmp0, 'ghm_nat.nb_rsa_prive');
							$tmp = sprintf($ctiDivision, $tmp1, $tmp2);
							break;                        
                        case '1.14':	// Age moy privé qualifié
							$tmp1 = sprintf($sumCaseWhen,$tmp0, 'age_public');
							$tmp2 = sprintf($sumCaseWhen, $tmp0, 'nb_rsa_public');
							$tmp = sprintf($ctiDivision, $tmp1, $tmp2);
							break;
                        case '1.15':	// Age des patients
							$tmp1 = sprintf($sumCaseWhen,$tmp0, 'age');
							$tmp2 = sprintf($countCaseWhen, $tmp0, 'rss_id');
							$tmp = sprintf($ctiDivision, $tmp1, $tmp2);
							break;                        
                        case '1.16':	// Nombre de séjours dont séances
                            $tmp = sprintf($sumCaseWhen, $tmp0,  'nb_rsa');
							break;                        
                        case '1.17':	// Nombre de ghm
                            $tmp = sprintf($countCaseWhen, $tmp0,  'ghm_id');
							break;
						default :	// Nombre de séjours par défaut
							$tmp = sprintf($countCaseWhen, $tmp0, 'v_rss_1.rss_id');
					}
					
					$toReplace = array(
						'@date_debut@',
						'@date_fin@'
					);
					
					$curPeriod = array(
						$periodeDebut,
						$periodeFin
					);
					
					$prevPeriod = array(
						$periodePrecDebut,
						$periodePrecFin
					);
					
					return str_replace($toReplace, $curPeriod, $tmp) . ', ' . str_replace($toReplace, $prevPeriod, $tmp);
				}
				
				// ?>
			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATASQL">
			<value><![CDATA[[EVAL 
				// <?php
				                
				return PMSI0000434_calcSQL('[DATA1]') . ',0,0,'. PHP_EOL . PMSI0000434_calcSQL('[DATA2]') . ',0,0,'
				 .PMSI0000434_calcSQL('[DATA3]') . ',0,0,'. PHP_EOL . PMSI0000434_calcSQL('[DATA1]',TRUE) . ',0,0,'
				 .PMSI0000434_calcSQL('[DATA2]',TRUE) . ',0,0,'. PHP_EOL . PMSI0000434_calcSQL('[DATA3]',TRUE) . ',0,0';
				
				// ?>
			EVAL]]]></value>
		</PROPERTY>
        <PROPERTY name="COMPAREPERIODETXT">
			<value><![CDATA[[EVAL 
					
                $TYPE_COMPARAISON_TXT = '[TYPE_COMPARAISON]';
                if($TYPE_COMPARAISON_TXT == '2'){
                    return 'N-1'; 
                } else {
                        return 'N-2';
                }
                
					
			EVAL]]]></value>
		</PROPERTY>
	</VIEWPROPERTIES>
	<SELECTIONS label="">
		<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="Période" UI="combo" tree="true" width="150" default="2014-07-01" printable="false" globalListProvider="DATE_DEBUT" />
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="150" default="2014-12-31" printable="false" globalListProvider="DATE_FIN" />
		</GROUP>
		<GROUP label="Période précédente">
			<FIELD name="TYPE_COMPARAISON" label="" UI="combo" default="2" width="130">
				<OPTION label="Période N-1" data="2" />
				<OPTION label="Période N-2" data="1" />
				<OPTION label="Saisie période" data="S" />
			</FIELD>			
            <FIELD name="PERIODE_D" label="Période précédente" UI="combo" tree="true" width="150" default="2014-01-01" printable="false" globalListProvider="DATE_DEBUT" visible="= SELECT.TYPE_COMPARAISON == 'S'" />
			<FIELD name="TOPERIODE_D" label="à" UI="combo" tree="true" width="150" default="2014-06-30" printable="false" globalListProvider="DATE_FIN" visible="= SELECT.TYPE_COMPARAISON == 'S'" />
		</GROUP>
		<GROUP label="Présentation">
			<FIELD name="PRESENTATION"  UI="combo" default="1" width="300">
				<OPTION label="Automatique" data="1" />
				<OPTION label="Ecart en nombre" data="2" />
				<OPTION label="Ecart en %" data="3" />
				<OPTION label="Ecart en nombre et %" data="4" />
				<OPTION label="Aucun" data="5" />
			</FIELD>
		</GROUP>
		<GROUP label="Données">
			<FIELD name="DATA1" tree="true" label="" UI="combo" default="1" width="250" showIfNotDefault="true" printable="false">			
				<OPTION label="DATA_SEJOURS" data="" globalListProvider="DATA_SEJOURS"/>
			</FIELD>
			<FIELD name="DATA2" tree="true" label="" UI="combo" default="0" default2="0" width="250" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA1 != '0')">
				<OPTION label="" data="0"/>
				<OPTION label="DATA_SEJOURS" data="" globalListProvider="DATA_SEJOURS"/>
			</FIELD>
			<FIELD name="DATA3" tree="true" label="" UI="combo" default="0" default2="0" width="250" showIfNotDefault="true" printable="false" visible="= (SELECT.DATA1 != '0') &amp;&amp; ( SELECT.DATA2 != '0')">
				<OPTION label="" data="0"/>
				<OPTION label="DATA_SEJOURS" data="" globalListProvider="DATA_SEJOURS"/>
			</FIELD>
		</GROUP>
		<GROUP label="Regroupements">
			<FIELD name="GROUPBY" width="220" label="" UI="combo" default="4" tree="true">
				<OPTION label="Options" data="" globalListProvider="RSS_GROUPBY_OPTIONS" />
			</FIELD>
			<FIELD name="GROUPBY_TAB" width="100" label="Présentation" UI="combo" default="AUTO" visible="= SELECT.GROUPBY_2 != '-1' ">
				<OPTION label="Automatique" data="AUTO" />
				<OPTION label="Arbre" data="TREE" />
				<OPTION label="Onglet" data="TAB" />
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY_2" width="220" label="" UI="combo" default="-1" tree="true">
				<OPTION label="Pas de second niveau" data="-1" />
				<OPTION label="Options" data="" globalListProvider="RSS_GROUPBY_OPTIONS" />
			</FIELD>
		</GROUP>		
        <GROUP label="">
			<FIELD name="GROUPBY_3" width="220" label="" UI="combo" default="-1" tree="true">
				<OPTION label="Pas de troisième niveau" data="-1" />
				<OPTION label="Options" data="" globalListProvider="RSS_GROUPBY_OPTIONS" />
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="SHOWDMSREF" label="" width="1" UI="text" default="1" printable="false" visible="false" />
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_RSS_SOUSSELECTIONS" />
	<SELECTIONS componentName="FILTRES_RSS_SELECTIONS" />
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_RSS_X" cacheEnabled="true">
				<select><![CDATA[ 
					
					CTISELECT_TREE
						GROUPBY1{[VIEW.SELECT_TABTREE_OID_FIELD],, [VIEW.SELECT_TABTREE_COD_FIELD],, [VIEW.SELECT_TABTREE_TXT_FIELD]}
						GROUPBY1MODE{[GROUPBY_TAB]}
						GROUPBY2{[VIEW.SELECT_TABTREE_2_OID_FIELD],, [VIEW.SELECT_TABTREE_2_COD_FIELD],, [VIEW.SELECT_TABTREE_2_TXT_FIELD]}
						GROUPBY3{[VIEW.SELECT_TABTREE_3_OID_FIELD],, [VIEW.SELECT_TABTREE_3_COD_FIELD],, [VIEW.SELECT_TABTREE_3_TXT_FIELD]}
						SIGNIFDATA{[VIEW.SELECT_TABTREE_ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
						ORDERBY{[VIEW.DATA1],, DESC}
						INDICATORS{
							[VIEW.DATASQL]
						}
					FROM 
						#V_RSS_X#
					WHERE 1=1
						AND (
							mois_sortie IN ([VIEW.PERIODE_D_MOIS_LIST]) AND date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' 
							OR 
							mois_sortie IN ([VIEW.PERIODE_MOIS_LIST]) AND date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						)
						[VIEW.FILTRE_RSS_SELECT]
						
					AFTER{
						UPDATE w_table SET 
							indicateurs[3] = indicateurs[1] - indicateurs[2],
							indicateurs[4] = CASE 
												WHEN indicateurs[1] > 0 AND indicateurs[2] > 0 THEN base.cti_division(indicateurs[1] - indicateurs[2], indicateurs[2]) * 100
											 ELSE 0 END,
							indicateurs[7] = indicateurs[5] - indicateurs[6],
							indicateurs[8] = CASE 
												WHEN indicateurs[5] > 0 AND indicateurs[6] > 0 THEN base.cti_division(indicateurs[5] - indicateurs[6], indicateurs[6]) * 100
											 ELSE 0 END,
							indicateurs[11] = indicateurs[9] - indicateurs[10],
							indicateurs[12] = CASE 
												WHEN indicateurs[9] > 0 AND indicateurs[10] > 0 THEN base.cti_division(indicateurs[9] - indicateurs[10], indicateurs[10]) * 100
											  ELSE 0 END,							
                            indicateurs[15] = indicateurs[13] - indicateurs[14],
							indicateurs[16] = CASE 
												WHEN indicateurs[13] > 0 AND indicateurs[14] > 0 THEN base.cti_division(indicateurs[13] - indicateurs[14], indicateurs[14]) * 100
											  ELSE 0 END,                            
                            indicateurs[19] = indicateurs[17] - indicateurs[18],
							indicateurs[20] = CASE 
												WHEN indicateurs[17] > 0 AND indicateurs[18] > 0 THEN base.cti_division(indicateurs[17] - indicateurs[18], indicateurs[18]) * 100
											  ELSE 0 END,                            
                            indicateurs[23] = indicateurs[21] - indicateurs[22],
							indicateurs[24] = CASE 
												WHEN indicateurs[21] > 0 AND indicateurs[22] > 0 THEN base.cti_division(indicateurs[21] - indicateurs[22], indicateurs[22]) * 100
											  ELSE 0 END
					}
					
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS" />
					<FIELD name="SORT" />
					<FIELD name="F1"/>
					<FIELD name="D1"/>
					<FIELD name="E1"/>
					<FIELD name="P1"/>
					<FIELD name="F2"/>
					<FIELD name="D2"/>
					<FIELD name="E2"/>
					<FIELD name="P2"/>
					<FIELD name="F3"/>
					<FIELD name="D3"/>
					<FIELD name="E3"/>
					<FIELD name="P3"/>
					<FIELD name="MF1"/>
					<FIELD name="MD1"/>
					<FIELD name="ME1"/>
					<FIELD name="MP1"/>
					<FIELD name="MF2"/>
					<FIELD name="MD2"/>
					<FIELD name="ME2"/>
					<FIELD name="MP2"/>	
					<FIELD name="MF3"/>
					<FIELD name="MD3"/>
					<FIELD name="ME3"/>
					<FIELD name="MP3"/>		
					<!-- Premier graphique (Nombre de séjours) -->
					<FIELD name="NB_NOW" />
					<FIELD name="NB_OLD" />
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL>
				<select><![CDATA[	
					SELECT 'PERIODE_D' , CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day')  WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[PERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[PERIODE_D]' END::text
					UNION
					SELECT 'TOPERIODE_D' , CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[TOPERIODE_D]' END::text
					UNION
					SELECT 'PERIODE_D_LABEL', CASE WHEN  CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[PERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[PERIODE_D]' END = p_calendrier_mois.date_debut THEN p_calendrier_mois.texte ELSE p_calendrier.texte END
					FROM base.p_calendrier
						JOIN base.p_calendrier_mois ON p_calendrier.mois = p_calendrier_mois.mois
					WHERE date = CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[PERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[PERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[PERIODE_D]' END
					UNION
					SELECT 'TOPERIODE_D_LABEL', CASE WHEN  CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[TOPERIODE_D]' END = p_calendrier_mois.date_fin THEN p_calendrier_mois.texte ELSE p_calendrier.texte_court END
					FROM base.p_calendrier
						JOIN base.p_calendrier_mois ON p_calendrier.mois = p_calendrier_mois.mois
					WHERE date = CASE WHEN '[TYPE_COMPARAISON]' = '2' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '1 year' - interval '1 day') WHEN '[TYPE_COMPARAISON]' = '1' THEN date('[TOPERIODE]'::date + interval '1 day' - interval '2 year' - interval '1 day') ELSE '[TOPERIODE_D]' END
                    UNION
                    SELECT 'X_PERIODE_D', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL  '1 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
					UNION
						SELECT 'X_TOPERIODE_D', greatest(to_date(to_char('[TOPERIODE]'::date - INTERVAL  '1 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
					UNION
						SELECT 'X_PERIODE', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL  '3 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
                				
                ]]></select>
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="PMSI000035.XML" enabled="true" rowContext="false" buttonType="COMPARATIF">
				<ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
				<ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
				<ARG name="DATA1" value="SELECT.DATA1" />
				<ARG name="DATA2" value="SELECT.DATA2" />
				<ARG name="DATA3" value="SELECT.DATA3" />
				<ARG name="DATA4" value="0" />
				<ARG name="DATA5" value="0" />
				<ARG name="DATA6" value="0" />
				<ARG name="DATA7" value="0" />
				<ARG name="DATA8" value="0" />
				<ARG name="DATA9" value="0" />
				<ARG name="DATA010" value="0" />
				<ARG name="DATA011" value="0" />
				<ARG name="DATA012" value="0" />
				<ARG name="DATA013" value="0" />
				<ARG name="DATA014" value="0" />
				<ARG name="DATA015" value="0" />
			</VIEWLINK>			
            <VIEWLINK label="Comparatif mensuel" shortLabel="Comp. Mensuel" view="PMSI000434.XML" enabled="true" rowContext="false" buttonType="COMPARATIF">
				<ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
				<ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
                <ARG name="DATA1" value="SELECT.DATA1" />
				<ARG name="DATA2" value="SELECT.DATA2" />
				<ARG name="DATA3" value="SELECT.DATA3" />
			</VIEWLINK>
			<VIEWLINK label="Evolution comparative" shortLabel="Evol. comparative"  view="PMSI000435.XML"  rowContext="false" componentName=""  enabled="true" buttonType="VIEWLINK_EVO_COMP_1" >			
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
					<ARG name="GROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_2" value="'MSOR'" />
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;"/>
					<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;"/>
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;"/>
			</VIEWLINK>	
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="PMSI000033.XML" enabled="true" rowContext="false" componentName="PERIODICITE_VIEWLINK" buttonType="EVOLUTION">
				<ARG name="DATA" value="'1'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="PMSI000214.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE">
				<ARG name="ALIAS_PERIODE" value="'-1'" />
                <ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="DATA" value="'1'" />
				<ARG name="COLUMNBY" value="'MSOR'" />
				<ARG name="GROUPBY" value="'ASOR'" />
				<ARG name="GROUPBY_2" value="if (SELECT.GROUPBY == 'ASOR') {return 'GHM';} else {return SELECT.GROUPBY;}" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
				<ARG name="LGROUPBY" value="return SELECT.GROUPBY;"/>
				<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2;"/>
				<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3;"/>
			</VIEWLINK>
			<VIEWLINK label="Analyse"  shortLabel="Analyse"  rowContext="false" buttonType="VIEWLINK_ANALYSE_MCO">			
                <VIEWITEM label="Analyse" shortLabel="Analyse" view="PMSI000008.XML" enabled="true" rowContext="false" buttonType="ANALYSE">
                    <ARG name="PERIODE" value="return VIEW.PERIODE;" />
                    <ARG name="TOPERIODE" value="return VIEW.TOPERIODE;" />
                    <ARG name="GROUPBY_TAB" value="'AUTO'" />
                </VIEWITEM>			
                <VIEWITEM label="CA" shortLabel="Analyse CA" view="PMSI000007.XML" enabled="true" rowContext="false" buttonType="ANALYSE">
                    <ARG name="PERIODE" value="return VIEW.PERIODE;" />
                    <ARG name="TOPERIODE" value="return VIEW.TOPERIODE;" />
                    <ARG name="GROUPBY_TAB" value="'AUTO'" />
                </VIEWITEM>                
                <VIEWITEM label="Analyse paramétrable" shortLabel="Analyse CA" view="PMSI000439.XML" enabled="true" rowContext="false" buttonType="ANALYSE">
                    <ARG name="GROUPBY_TAB" value="'AUTO'" />
                    <ARG name="DATA01" value="SELECT.DATA1" />
                    <ARG name="DATA02" value="SELECT.DATA2" />
                    <ARG name="DATA03" value="SELECT.DATA3" />
                    <ARG name="LS_DATA" value="'-1'" />
                    <ARG name="DATA04" value="'0'" />
                    <ARG name="DATA05" value="'0'" />
                    <ARG name="DATA06" value="'0'" />
                    <ARG name="DATA07" value="'0'" />
                    <ARG name="DATA08" value="'0'" />
                    <ARG name="DATA09" value="'0'" />
                    <ARG name="DATA010" value="'0'" />
                    <ARG name="DATA011" value="'0'" />
                    <ARG name="DATA012" value="'0'" />
                    <ARG name="DATA013" value="'0'" />
                    <ARG name="DATA014" value="'0'" />
                    <ARG name="DATA015" value="'0'" />
                </VIEWITEM>
			</VIEWLINK>
			<VIEWLINK label="Liste des RSS" shortLabel="Liste RSS" view="PMSI000034.XML" componentName="RSS_BASE_VIEWLINK" component2Name="DATE_COMP_2_VIEWLINK">
				<ARG name="T_DUREE_SEJOUR" value="	
													var col:String = String(COLUMN.NAME).substr(0,2);
													if (col == 'D1' &amp;&amp; SELECT.DATA1 == '2' || col == 'D2' &amp;&amp; SELECT.DATA2 == '2' || col == 'D3' &amp;&amp; SELECT.DATA3 == '2')
														{return 'DU0';}
													else if (col == 'D1' &amp;&amp; SELECT.DATA1 == '3' || col == 'D2' &amp;&amp; SELECT.DATA2 == '3' || col == 'D3' &amp;&amp; SELECT.DATA3 == '3')
														{return 'DU1';}
													else if (col == 'D1' &amp;&amp; SELECT.DATA1 == '4' || col == 'D2' &amp;&amp; SELECT.DATA2 == '4' || col == 'D3' &amp;&amp; SELECT.DATA3 == '4')
														{return 'DU2';}
													else if (col == 'D1' &amp;&amp; SELECT.DATA1 == '5' || col == 'D2' &amp;&amp; SELECT.DATA2 == '5' || col == 'D3' &amp;&amp; SELECT.DATA3 == '5')
														{return 'X';}
													else if (col == 'D1' &amp;&amp; SELECT.DATA1 == '6' || col == 'D2' &amp;&amp; SELECT.DATA2 == '6' || col == 'D3' &amp;&amp; SELECT.DATA3 == '6')
														{return 'S';}
													else if (col == 'D1' &amp;&amp; SELECT.DATA1 == '1X' || col == 'D2' &amp;&amp; SELECT.DATA2 == '1X' || col == 'D3' &amp;&amp; SELECT.DATA3 == '1X')
														{return '1X';}
                                                    else {
                                                        return SELECT.T_DUREE_SEJOUR;
                                                    }" />
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Comparaison" label="Comparaison" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
            <CHART title="" type="group" subType="h" percentHeight="100" fromTotal="false" visibleCondition="(SELECT.GROUPBY != 'MCAL')">			
                <CHART title="Première donnée (10 premiers) " type="pieChart" maxItems="10" maxItemsSortOn="D1" maxItemsSortSeq="D" sortField="D1" sortSeq="D" condition="ROW.LVL == '1'">
                    <CATEGORY field="COD" type="Char"/>
                    <SERIE field="D1" displayName="SELECT.DATA13 + ' ' + VIEW.PERIODE_D_LABEL + '-' + VIEW.TOPERIODE_D_LABEL" displayNameCalc="true"/>
                </CHART>
                <CHART title="Deuxième donnée (10 premiers)" type="columnChart" maxItems="10" maxItemsSortOn="F2" maxItemsSortSeq="D" sortField="F2" sortSeq="D" condition="ROW.LVL == '1'">
                    <CATEGORY field="COD" type="Char"/>
                    <SERIE field="D2" displayName="SELECT.DATA23 + ' ' + '( ' + VIEW.COMPAREPERIODETXT + ' )'" displayNameCalc="true"/>
                    <SERIE field="F2" displayName="SELECT.DATA23 + ' ' + '( N )'" displayNameCalc="true"/>
                </CHART>
			</CHART>            
            <CHART title="" type="group" subType="h" percentHeight="100" fromTotal="false" visibleCondition="(SELECT.GROUPBY == 'MCAL') || (SELECT.GROUPBY == 'MACT')">			
                <CHART title="Première donnée (10 premiers) " type="pieChart" maxItems="10" maxItemsSortOn="D1" maxItemsSortSeq="D" sortField="D1" sortSeq="D" visibleCondition="SELECT.DATA1 != '-1'" condition="ROW.LVL == '1'">
                    <CATEGORY field="COD" type="Char"/>
                    <SERIE field="D1" displayName="SELECT.DATA13 + ' ' + VIEW.PERIODE_D_LABEL + '-' + VIEW.TOPERIODE_D_LABEL" displayNameCalc="true"/>
                </CHART>
                <CHART title="Comparatif (10 premiers)" type="lineChart" maxItems="10" maxItemsSortOn="D2" maxItemsSortSeq="D" sortField="" visibleCondition="(SELECT.GROUPBY == 'MCAL') || (SELECT.GROUPBY == 'MACT')" sortSeq="D1"  condition="ROW.LVL == '1'">
                    <CATEGORY field="TXT" type="Char"/>
                    <SERIE field="D2" displayName="SELECT.DATA23 + ' ' + '( N-1 )' " displayNameCalc="true" />
                    <SERIE field="F2" displayName="SELECT.DATA23 + ' ' + '( N )' " displayNameCalc="true" />
                </CHART>
			</CHART>	
			<DATAGRID title="" total="true" showOthers="true" headerHeight="54" variableRowHeight="true" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' || SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<INSERT name="DATAGRID_MULTITAB_STYLES" />
				<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" />
				<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">
					<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="CODTXT" type="Char" minWidth="200" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.COD + ' ' + ROW.TXT.toString().substr(0,10)" />
				</COLUMN>
				<COLUMN dataField="D1" width="85" visible="true" type="Number" outputFormat="= SELECT.DATA12" fixed="false" selectable="true" headerText="if(SELECT.DATA13.length &gt; 14){return SELECT.DATA13 + String.fromCharCode(13)  + '&lt;font color=\'#DB1702\'&gt;'+VIEW.COMPAREPERIODETXT+'&lt;/font&gt;';} else {return SELECT.DATA13 + String.fromCharCode(13) +'\n'+ '&lt;font color=\'#DB1702\'&gt;'+VIEW.COMPAREPERIODETXT+'&lt;/font&gt;';}" headerTextCalc="true" textAlign="right" description="=SELECT.DATA1_LABEL" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>
				</COLUMN>
				<COLUMN dataField="F1" width="85" visible="true" type="Number" outputFormat="= SELECT.DATA12" fixed="false" selectable="true" headerText="if(SELECT.DATA13.length &gt; 14){return SELECT.DATA13 + String.fromCharCode(13)  + '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;';} else {return SELECT.DATA13 + String.fromCharCode(13) +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;';}" headerTextCalc="true" textAlign="right" description="=SELECT.DATA1_LABEL" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>
				</COLUMN>
				<COLUMN dataField="E1" type="Number" headerText="Ecart" width="85" visibleCondition="(SELECT.PRESENTATION == '1')  || SELECT.PRESENTATION == '2' || SELECT.PRESENTATION == '4'" outputFormat="= SELECT.DATA12" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.D1 &lt; ROW.F1)) || (ROW.F1 &lt; ROW.D1)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.F1 &lt; ROW.D1)) || (ROW.D1 &lt; ROW.F1)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.D1 == ROW.F1" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>
				</COLUMN>
				<COLUMN dataField="P1" type="Number" headerText="%" width="45" visibleCondition="(SELECT.PRESENTATION != '1') &amp;&amp; (SELECT.PRESENTATION != '2') &amp;&amp; (SELECT.PRESENTATION == '4') || (SELECT.PRESENTATION == '3' &amp;&amp; SELECT.DATA1 !='0')" outputFormat="= if (ROW.D1 != 0) {return '0%'} else {return '#'}" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>
				</COLUMN>
				<COLUMN dataField="D2" width="85" visibleCondition="SELECT.DATA2 != '0' " type="Number" outputFormat="= SELECT.DATA22" fixed="false" selectable="true" headerText="if(SELECT.DATA23.length &gt; 14){return SELECT.DATA23 + String.fromCharCode(13)  + '&lt;font color=\'#DB1702\'&gt;'+VIEW.COMPAREPERIODETXT+'&lt;/font&gt;';} else {return SELECT.DATA23 + String.fromCharCode(13) +'\n'+ '&lt;font color=\'#DB1702\'&gt;'+VIEW.COMPAREPERIODETXT+'&lt;/font&gt;';}" headerTextCalc="true" textAlign="right" description="=SELECT.DATA2_LABEL" totalFunction="sum" otherFunction="sum">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="F2" width="85" visibleCondition="SELECT.DATA2 != '0'" type="Number" outputFormat="= SELECT.DATA22" fixed="false" selectable="true" headerText="if(SELECT.DATA23.length &gt; 14){return SELECT.DATA23 + String.fromCharCode(13)  + '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;';} else {return SELECT.DATA23 + String.fromCharCode(13) +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;';}" headerTextCalc="true" textAlign="right" description="=SELECT.DATA2_LABEL" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="E2" type="Number" headerText="Ecart" width="85" visibleCondition="SELECT.DATA2 != '0'  &amp;&amp; (SELECT.PRESENTATION == '1' )  || SELECT.PRESENTATION == '2' &amp;&amp; SELECT.DATA2 !='0'  || SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA2 !='0' " outputFormat="= SELECT.DATA22" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA2.substr(0,3) == 'DEL' &amp;&amp; (ROW.D2 &lt; ROW.F2)) || (ROW.F2 &lt; ROW.D2)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA2.substr(0,3) == 'DEL' &amp;&amp; (ROW.F2 &lt; ROW.D2)) || (ROW.D2 &lt; ROW.F2)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.D2 == ROW.F2" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="P2" type="Number" headerText="%  " width="70" visibleCondition="SELECT.DATA2 != '0' &amp;&amp; (SELECT.PRESENTATION == '4')  &amp;&amp; SELECT.PRESENTATION != '2' &amp;&amp; (SELECT.PRESENTATION != '1') || (SELECT.PRESENTATION == '3' &amp;&amp; SELECT.DATA2 !='0') || (SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA2 !='0')" outputFormat="= if (ROW.D2 !=0) {return '0%'} else {return '#'}" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="D3" width="85" visibleCondition="SELECT.DATA3 != '0'" type="Number" outputFormat="= SELECT.DATA32" fixed="false" selectable="true" headerText="if(SELECT.DATA33.length &gt; 14){return SELECT.DATA33 + String.fromCharCode(13)  + '&lt;font color=\'#DB1702\'&gt;'+VIEW.COMPAREPERIODETXT+'&lt;/font&gt;';} else {return SELECT.DATA33 + String.fromCharCode(13) +'\n'+ '&lt;font color=\'#DB1702\'&gt;'+VIEW.COMPAREPERIODETXT+'&lt;/font&gt;';}" headerTextCalc="true" textAlign="right" description="=SELECT.DATA3_LABEL" totalFunction="sum" otherFunction="sum">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>	
				<COLUMN dataField="F3" width="85" visibleCondition="SELECT.DATA3 != '0'" type="Number" outputFormat="= SELECT.DATA32" fixed="false" selectable="true" headerText="if(SELECT.DATA33.length &gt; 14){return SELECT.DATA33 + String.fromCharCode(13)  + '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;';} else {return SELECT.DATA33 + String.fromCharCode(13) +'\n'+ '&lt;font color=\'#DB1702\'&gt;N&lt;/font&gt;';}"  headerTextCalc="true" textAlign="right" description="=SELECT.DATA3_LABEL" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>	
				<COLUMN dataField="E3" type="Number" headerText="Ecart" width="85" visibleCondition="SELECT.DATA3 != '0'  &amp;&amp; (SELECT.PRESENTATION == '1')  || SELECT.PRESENTATION == '2' &amp;&amp; SELECT.DATA3 !='0' || SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA3 !='0'" outputFormat="= SELECT.DATA32" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA3.substr(0,3) == 'DEL' &amp;&amp; (ROW.D3 &lt; ROW.F3)) || (ROW.F3 &lt; ROW.D3)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA3.substr(0,3) == 'DEL' &amp;&amp; (ROW.F3 &lt; ROW.D3)) || (ROW.D3 &lt; ROW.F3)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.D3 == ROW.F3" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>	
				<COLUMN dataField="P3" type="Number" headerText="%  " width="45" visibleCondition="SELECT.DATA3 != '0' &amp;&amp; (SELECT.PRESENTATION == '4')  &amp;&amp; SELECT.PRESENTATION != '2' &amp;&amp;  (SELECT.PRESENTATION != '1') || SELECT.PRESENTATION == '3' &amp;&amp; SELECT.DATA3 !='0' || SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA3 !='0'" outputFormat="= if (ROW.D3 !=0) {return '0%'} else {return '#'}" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MD1" width="85"  type="Number" outputFormat="= SELECT.DATA12" fixed="false" selectable="true" headerText="SELECT.DATA13 + String.fromCharCode(13)+ VIEW.TOPERIODE_D_LABEL+'\n'+'&lt;font color=\'#DB1702\'&gt;Mois&lt;/font&gt;';" headerTextCalc="true" textAlign="right" description="=SELECT.DATA1_LABEL" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MF1" width="85"  type="Number" outputFormat="= SELECT.DATA12" fixed="false" selectable="true" headerText="return SELECT.DATA13 + String.fromCharCode(13)+ SELECT.TOPERIODE_LABEL+'\n'+'&lt;font color=\'#DB1702\'&gt;Mois&lt;/font&gt;'" headerTextCalc="true" textAlign="right"  description="=SELECT.DATA1_LABEL" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="ME1" type="Number" headerText="Ecart" width="85" visibleCondition="(SELECT.PRESENTATION == '1')  || SELECT.PRESENTATION == '2' || SELECT.PRESENTATION == '4'"  outputFormat="= SELECT.DATA12" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.MD1 &lt; ROW.MF1)) || (ROW.MF1 &lt; ROW.MD1)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.MF1 &lt; ROW.MD1)) || (ROW.MD1 &lt; ROW.MF1)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.MD1 == ROW.MF1" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MP1" type="Number" headerText="%" width="45" visibleCondition="(SELECT.PRESENTATION == '4')  &amp;&amp; (SELECT.PRESENTATION != '1') || (SELECT.PRESENTATION == '3' &amp;&amp; SELECT.DATA1 !='0') || (SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA1 !='0')" outputFormat="= if (ROW.MD1) {return '0%'} else {return '#'}" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MD2" width="85"  type="Number" visibleCondition="SELECT.DATA2 != '0'" outputFormat="= SELECT.DATA22" fixed="false" selectable="true" headerText="return SELECT.DATA23 + String.fromCharCode(13)+ VIEW.TOPERIODE_D_LABEL+'\n'+'&lt;font color=\'#DB1702\'&gt;Mois&lt;/font&gt;';" headerTextCalc="true" textAlign="right" description="=SELECT.DATA2_LABEL" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MF2" width="85"  type="Number" visibleCondition="SELECT.DATA2 != '0'"  outputFormat="= SELECT.DATA22" fixed="false" selectable="true" headerText="return SELECT.DATA23 +String.fromCharCode(13)+SELECT.TOPERIODE_LABEL+'\n'+'&lt;font color=\'#DB1702\'&gt;Mois&lt;/font&gt;';" headerTextCalc="true" textAlign="right" description="=SELECT.DATA2_LABEL" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="ME2" type="Number" headerText="Ecart" width="85" visibleCondition="SELECT.DATA2 != '0'  &amp;&amp; (SELECT.PRESENTATION == '1')  || (SELECT.PRESENTATION == '2' &amp;&amp; SELECT.DATA2 !='0')  || (SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA2 !='0') " outputFormat="= SELECT.DATA22" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.MD2 &lt; ROW.MF2)) || (ROW.MF2 &lt; ROW.MD2)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA1.substr(0,3) == 'DEL' &amp;&amp; (ROW.MF2 &lt; ROW.MD2)) || (ROW.MD2 &lt; ROW.MF2)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.MD2 == ROW.MF2" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MP2" type="Number" headerText="%" width="45" visibleCondition=" (SELECT.PRESENTATION == '4')  &amp;&amp; SELECT.DATA2 != '0' &amp;&amp; SELECT.PRESENTATION != '2' &amp;&amp; (SELECT.PRESENTATION != '1' || SELECT.PRESENTATION == '3' &amp;&amp; SELECT.DATA2 !='0' || SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA2 !='0')"  outputFormat="= if (ROW.MD2 !=0) {return '0%'} else {return '#'}" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xDCDCDC"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MD3" width="85" visibleCondition="SELECT.DATA3 != '0'" type="Number" outputFormat="= SELECT.DATA32" fixed="false" selectable="true" headerText="SELECT.DATA33 + String.fromCharCode(13)+ VIEW.TOPERIODE_D_LABEL+'\n'+'&lt;font color=\'#DB1702\'&gt;Mois&lt;/font&gt;';" headerTextCalc="true" description="=SELECT.DATA3_LABEL" textAlign="right" totalFunction="sum" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MF3" width="85" visibleCondition="SELECT.DATA3 != '0'" type="Number" outputFormat="= SELECT.DATA32" fixed="false" selectable="true" headerText="return SELECT.DATA33 +String.fromCharCode(13)+SELECT.TOPERIODE_LABEL+'\n'+'&lt;font color=\'#DB1702\'&gt;Mois&lt;/font&gt;'; " headerTextCalc="true" description="=SELECT.DATA3_LABEL" textAlign="right" totalFunction="sum" otherFunction="sum">	
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="ME3" type="Number" headerText="Ecart" width="85" visibleCondition="SELECT.DATA3 != '0' &amp;&amp; SELECT.PRESENTATION != '2'  &amp;&amp; (SELECT.PRESENTATION == '1')  || SELECT.PRESENTATION == '2' &amp;&amp; SELECT.DATA3 !='0' || SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA3 !='0'" outputFormat="= SELECT.DATA32" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="(SELECT.DATA3.substr(0,3) == 'DEL' &amp;&amp; (ROW.MD3 &lt; ROW.MF3)) || (ROW.MF3 &lt; ROW.MD3)" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="(SELECT.DATA3.substr(0,3) == 'DEL' &amp;&amp; (ROW.MF3 &lt; ROW.MD3)) || (ROW.MD3 &lt; ROW.MF3)" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.MD3 == ROW.MF3" />
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
				<COLUMN dataField="MP3" type="Number" headerText="%" width="45" visibleCondition="(SELECT.PRESENTATION == '4')  &amp;&amp; SELECT.DATA3 != '0' &amp;&amp; SELECT.PRESENTATION != '2' &amp;&amp; (SELECT.PRESENTATION != '1') || SELECT.PRESENTATION == '3' &amp;&amp; SELECT.DATA3 !='0' || SELECT.PRESENTATION == '4' &amp;&amp; SELECT.DATA3 !='0'" outputFormat="= if (ROW.MD3 !=0) {return '0%'} else {return '#'}" fixed="false" textAlign="right" totalFunction="sum" totalComplement="" otherFunction="sum">
						<HEADERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<FOOTERCELLSTYLE name="backgroundColor" value="0xbccbed"/>
						<HEADERCELLSTYLE name="textAlign" value="center"/>				
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
