<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="PMSI000227" label="PMSI. Comparaison File active" title="= 'Comparaison File active par ' +  SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ' vs ' + SELECT.PERIODE_D_LABEL + ' à ' + SELECT.TOPERIODE_D_LABEL + ') - ' + SELECT.VERSION_GROUPAGE_LABEL" database="iCTI" swf="*CTI_view1" softCode="iCTI_pmsi" globals="PMSI_globals.XML" componentsFile="PMSI_components.XML" helpDokuWIkiDir="pmsi:file_active" helpDokuWIkiFile="pmsi000114"  helpFile="iCTI_PMSI_PMSI000227.HTML">
	<VIEWPROPERTIES componentName="PROPERTIES_RSS"/>
	<VIEWPROPERTIES componentName="PROPERTIES_SELECT_TABTREE"/>
	<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-01-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="PERIODE_D" label="" UI="combo" tree="true" width="150" default="2014-01-01" printable="false" globalListProvider="DATE_DEBUT" />
			<FIELD name="TOPERIODE_D" label="à" UI="combo" tree="true" width="150" default="2014-12-31" printable="false" globalListProvider="DATE_FIN" />
		</GROUP>
		<GROUP label="Données">
			<FIELD name="DATA1" width="250" UI="combo" tree="true" default="1" default2="0" printable="false">
				<OPTION label="Options" data="" globalListProvider="DATA_REENTREES" />
			</FIELD>
		</GROUP>		
        <GROUP>
			<FIELD name="DATA2" width="250" label="" UI="combo" tree="true" default="0" default2="0" printable="false">
				<OPTION label="" data="0" data2="0"/>
				<OPTION label="Options" data="" globalListProvider="DATA_REENTREES" />
			</FIELD>
		</GROUP>		
        <GROUP>
			<FIELD name="DATA3" width="250" label="" UI="combo" tree="true" default="0" default2="0" printable="false">
				<OPTION label="" data="0" data2="0"/>
				<OPTION label="Options" data="" globalListProvider="DATA_REENTREES" />
			</FIELD>
		</GROUP>
		<GROUP label="Regroupements">
			<FIELD name="GROUPBY" width="300" label="" UI="combo" default="IPA" 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="300" 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="300" 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>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_RSS_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_RSS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_REENTREE_SELECTIONS" />
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_RSS_X">
				<comment><![CDATA[ 
					
					Sélectionne les séjours pour lesquels la date de sortie est comprise dans
					les bornes de la période d'analyse
					
				]]></comment>
				<select><![CDATA[ 
					
					DROP TABLE IF EXISTS w_reentrees;
					CREATE TEMP TABLE w_reentrees AS
					SELECT 
						v_rss_1.patient_id, 
						v_rss_1.rss_id AS rss_id, 
						v_rss_1.no_rss, 
						v_rss_1.date_entree AS date_entree, 
						v_rss_1.date_sortie AS date_sortie, 
						
						0::bigint AS avant_rss_id, 
						'00011231'::date AS avant_date_entree, 
						'00011231'::date AS avant_date_sortie, 
						
						0::bigint AS avant2_rss_id, 
						'00011231'::date AS avant2_date_entree, 
						'00011231'::date AS avant2_date_sortie, 
						
						0::bigint AS apres_rss_id, 
						'20991231'::date AS apres_date_entree, 
						'20991231'::date AS apres_date_sortie, 
						0::numeric AS delai, 
						
						[VIEW.SELECT_TABTREE_OID_FIELD] AS groupby_oid 
						
					FROM #V_RSS_X#
					WHERE 
						patient_id > 0 
						AND (v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' OR
							v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]')
						[VIEW.FILTRE_RSS_SELECT]
					;
					
				]]></select>
			</SQL>
			<SQL optimizer="V_RSS_X">
				<comment><![CDATA[ 
					
					Sélectionne les séjours pour lesquels la date d'entrée est postérieure
					à la date du début de la période d'analyse.
					Permettra de trouver les ré-entrées.
					
				]]></comment>
				<select><![CDATA[ 
					
					DROP TABLE IF EXISTS w_apres;
					CREATE TEMP TABLE w_apres AS
					SELECT 
						v_rss_1.patient_id, 
						v_rss_1.rss_id AS apres_rss_id, 
						v_rss_1.date_entree AS apres_date_entree, 
						v_rss_1.date_sortie AS apres_date_sortie 
					FROM #V_RSS_X#
					WHERE 
						v_rss_1.patient_id > 0 
						AND v_rss_1.date_entree >= '[PERIODE]' 
						[VIEW.FILTRE_REENTREE_SELECT] 
					ORDER BY patient_id, apres_date_entree;
					
					DROP TABLE IF EXISTS w_apres_d;
					CREATE TEMP TABLE w_apres_d AS
					SELECT 
						v_rss_1.patient_id, 
						v_rss_1.rss_id AS apres_rss_id, 
						v_rss_1.date_entree AS apres_date_entree, 
						v_rss_1.date_sortie AS apres_date_sortie 
					FROM #V_RSS_X#
					WHERE 
						v_rss_1.patient_id > 0 
						AND v_rss_1.date_entree >= '[PERIODE_D]' 
						[VIEW.FILTRE_REENTREE_SELECT] 
					ORDER BY patient_id, apres_date_entree;
					
				]]></select>
			</SQL>
			<SQL optimizer="V_RSS_X">
				<comment><![CDATA[ 
					
					Sélectionne les séjours pour lesquels la date de sortie est antérieure
					à la date de fin de la période d'analyse.
					Permettra de trouver les nouveaux patients.
					
				]]></comment>
				<select><![CDATA[ 
					
					DROP TABLE IF EXISTS w_avant; 
					CREATE TEMP TABLE w_avant  AS 
					SELECT 
						v_rss_1.patient_id, 
						v_rss_1.rss_id AS avant_rss_id, 
						v_rss_1.date_entree AS avant_date_entree, 
						v_rss_1.date_sortie AS avant_date_sortie, 
						[VIEW.SELECT_TABTREE_OID_FIELD] AS groupby_oid 
					FROM #V_RSS_X#
					WHERE 
						v_rss_1.patient_id > 0 
						AND v_rss_1.date_sortie <= '[TOPERIODE]'
					ORDER BY patient_id, avant_date_sortie DESC; 
					
					DROP TABLE IF EXISTS w_avant_d; 
					CREATE TEMP TABLE w_avant_d  AS 
					SELECT 
						v_rss_1.patient_id, 
						v_rss_1.rss_id AS avant_rss_id, 
						v_rss_1.date_entree AS avant_date_entree, 
						v_rss_1.date_sortie AS avant_date_sortie, 
						[VIEW.SELECT_TABTREE_OID_FIELD] AS groupby_oid 
					FROM #V_RSS_X#
					WHERE 
						v_rss_1.patient_id > 0 
						AND v_rss_1.date_sortie <= '[TOPERIODE_D]'
					ORDER BY patient_id, avant_date_sortie DESC; 
					
				]]></select>
			</SQL>
			<SQL optimizer="V_RSS_X">
				<comment><![CDATA[ 
					
					Met à jour la table des ré-entrées.
					Si le patient d'un RSS est revenu après son séjour, on renseigne les dates
					d'entrée et de sortie du premier séjour de ré-entrée. 
					On calcule le délai de ré-entrée.
					
				]]></comment>
				<select><![CDATA[ 
					
					UPDATE w_reentrees
					SET apres_rss_id = subview.apres_rss_id,
						apres_date_entree = subview.apres_date_entree,
						apres_date_sortie = subview.apres_date_sortie,
						delai = subview.apres_date_entree - w_reentrees.date_sortie
					FROM
					(
						SELECT rss_id,	
							(MIN(ARRAY[w_apres.apres_date_entree::text,w_apres.apres_rss_id::text]))[2]::bigint AS apres_rss_id,
							MIN(w_apres.apres_date_entree) AS apres_date_entree,
							(MIN(ARRAY[w_apres.apres_date_entree,w_apres.apres_date_sortie]))[2] AS apres_date_sortie
						FROM w_reentrees
						JOIN w_apres ON
							w_reentrees.patient_id = w_apres.patient_id
							AND w_apres.apres_rss_id <> w_reentrees.rss_id
							AND w_apres.apres_date_entree >= w_reentrees.date_sortie
							GROUP BY 1
						) subview
						WHERE w_reentrees.rss_id = subview.rss_id
					;

					UPDATE w_reentrees
					SET apres_rss_id = subview.apres_rss_id,
						apres_date_entree = subview.apres_date_entree,
						apres_date_sortie = subview.apres_date_sortie,
						delai = subview.apres_date_entree - w_reentrees.date_sortie
					FROM
					(
						SELECT rss_id,	
							(MIN(ARRAY[w_apres_d.apres_date_entree::text,w_apres_d.apres_rss_id::text]))[2]::bigint AS apres_rss_id,
							MIN(w_apres_d.apres_date_entree) AS apres_date_entree,
							(MIN(ARRAY[w_apres_d.apres_date_entree,w_apres_d.apres_date_sortie]))[2] AS apres_date_sortie
						FROM w_reentrees
						JOIN w_apres_d ON
							w_reentrees.patient_id = w_apres_d.patient_id
							AND w_apres_d.apres_rss_id <> w_reentrees.rss_id
							AND w_apres_d.apres_date_entree >= w_reentrees.date_sortie
							GROUP BY 1
						) subview
						WHERE w_reentrees.rss_id = subview.rss_id
					;
						
					UPDATE w_reentrees
					SET apres_rss_id = 0
					WHERE NOT (1=1 [VIEW.DELAI_REENTREE_SELECT])
					;
					
					ANALYSE w_reentrees
					;
					
				]]></select>
			</SQL>
			<SQL optimizer="V_RSS_X">
				<comment><![CDATA[ 
					
					Met à jour la table des ré-entrées.
					Si le patient d'un RSS est déjà venu avant ce séjour, on renseigne les dates
					d'entrée et de sortie du séjour directement antérieur.
					
				]]></comment>
				<select><![CDATA[ 
					
					UPDATE w_reentrees SET 
						avant_rss_id = w_avant.avant_rss_id, 
						avant_date_entree = w_avant.avant_date_entree, 
						avant_date_sortie = w_avant.avant_date_sortie 
					FROM 
						w_avant 
					WHERE 
						w_reentrees.patient_id = w_avant.patient_id AND 
						w_avant.avant_rss_id <> w_reentrees.rss_id AND 
						w_avant.avant_date_sortie < w_reentrees.date_entree AND 
						w_avant.avant_date_sortie > w_reentrees.avant_date_sortie; 
					
					UPDATE w_reentrees SET 
						avant_rss_id = w_avant_d.avant_rss_id, 
						avant_date_entree = w_avant_d.avant_date_entree, 
						avant_date_sortie = w_avant_d.avant_date_sortie 
					FROM 
						w_avant_d 
					WHERE 
						w_reentrees.patient_id = w_avant_d.patient_id AND 
						w_avant_d.avant_rss_id <> w_reentrees.rss_id AND 
						w_avant_d.avant_date_sortie < w_reentrees.date_entree AND 
						w_avant_d.avant_date_sortie > w_reentrees.avant_date_sortie; 
					
				]]></select>
			</SQL>
			<SQL optimizer="V_RSS_X">
				<comment><![CDATA[ 
					
					Met à jour la table des ré-entrées.
					Si le patient d'un RSS est déjà venu avant ce séjour et si ce séjour
					appartient au même critère de regroupement, on renseigne les dates
					d'entrée et de sortie du séjour directement antérieur au séjour testé.
					
				]]></comment>
				<select><![CDATA[ 
					
					UPDATE w_reentrees SET 
						avant2_rss_id = w_avant.avant_rss_id, 
						avant2_date_entree = w_avant.avant_date_entree, 
						avant2_date_sortie = w_avant.avant_date_sortie 
					FROM 
						w_avant 
					WHERE 
						w_reentrees.patient_id = w_avant.patient_id AND 
						w_reentrees.groupby_oid = w_avant.groupby_oid AND 
						w_avant.avant_rss_id <> w_reentrees.rss_id AND 
						w_avant.avant_date_sortie < w_reentrees.date_entree AND 
						w_avant.avant_date_sortie > w_reentrees.avant2_date_sortie; 
					
					UPDATE w_reentrees SET 
						avant2_rss_id = w_avant_d.avant_rss_id, 
						avant2_date_entree = w_avant_d.avant_date_entree, 
						avant2_date_sortie = w_avant_d.avant_date_sortie 
					FROM 
						w_avant_d 
					WHERE 
						w_reentrees.patient_id = w_avant_d.patient_id AND 
						w_reentrees.groupby_oid = w_avant_d.groupby_oid AND 
						w_avant_d.avant_rss_id <> w_reentrees.rss_id AND 
						w_avant_d.avant_date_sortie < w_reentrees.date_entree AND 
						w_avant_d.avant_date_sortie > w_reentrees.avant2_date_sortie; 
					
				]]></select>
			</SQL>			
			<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]}
						INDICATORS{
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN nb_rsa ELSE 0 END),
                            count(DISTINCT CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN w_reentrees.patient_id ELSE null END),
                            count(DISTINCT CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND w_reentrees.avant_rss_id = 0 THEN w_reentrees.patient_id ELSE null END),
                            count(DISTINCT CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND w_reentrees.avant2_rss_id = 0 THEN w_reentrees.patient_id ELSE null END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND apres_rss_id <> 0 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND apres_rss_id <> 0 AND delai BETWEEN 0 AND 1 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND apres_rss_id <> 0 AND delai BETWEEN 2 AND 7 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND apres_rss_id <> 0 AND delai BETWEEN 8 AND 15 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND apres_rss_id <> 0 AND delai BETWEEN 16 AND 30 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND apres_rss_id <> 0 AND delai BETWEEN 31 AND 90 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND apres_rss_id <> 0 AND delai >= 91 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' THEN nb_rsa ELSE 0 END),
                            count(DISTINCT CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' THEN w_reentrees.patient_id ELSE null END) ,
                            count(DISTINCT CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND w_reentrees.avant_rss_id = 0 THEN w_reentrees.patient_id ELSE null END),
                            count(DISTINCT CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND w_reentrees.avant2_rss_id = 0 THEN w_reentrees.patient_id ELSE null END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND apres_rss_id <> 0 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND apres_rss_id <> 0 AND delai BETWEEN 0 AND 1 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND apres_rss_id <> 0 AND delai BETWEEN 2 AND 7 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND apres_rss_id <> 0 AND delai BETWEEN 3 AND 15 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND apres_rss_id <> 0 AND delai BETWEEN 16 AND 30 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND apres_rss_id <> 0 AND delai BETWEEN 31 AND 90 THEN 1 ELSE 0 END),
                            sum(CASE WHEN v_rss_1.date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' AND apres_rss_id <> 0 AND delai >= 91 THEN 1 ELSE 0 END)
                        }
                        ORDERBY{indicateurs[14],, DESC}
                    FROM #V_RSS_X#
					JOIN w_reentrees ON v_rss_1.rss_id = w_reentrees.rss_id
						
						
				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT" />
					<FIELD name="NB_SEJ"/>
					<FIELD name="NB_PAT"/>
					<FIELD name="NB_NEW_PAT"/>
					<FIELD name="NB_NEW_PAT_CAT"/>
					<FIELD name="NB_RE"/>
					<FIELD name="NB_00_01"/>
					<FIELD name="NB_02_07"/>
					<FIELD name="NB_08_15"/>
					<FIELD name="NB_16_30"/>
					<FIELD name="NB_31_90"/>
					<FIELD name="NB_91_XX"/>
					<FIELD name="NB_SEJ_D"/>
					<FIELD name="NB_PAT_D"/>
					<FIELD name="NB_NEW_PAT_D"/>
					<FIELD name="NB_NEW_PAT_CAT_D"/>
					<FIELD name="NB_RE_D"/>
					<FIELD name="NB_00_01_D"/>
					<FIELD name="NB_02_07_D"/>
					<FIELD name="NB_08_15_D"/>
					<FIELD name="NB_16_30_D"/>
					<FIELD name="NB_31_90_D"/>
					<FIELD name="NB_91_XX_D"/>
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Liste des patients" shortLabel="Liste Patients" view="PMSI000117.XML" componentName="RSS_BASE_VIEWLINK" component2Name="DATE_COMP_VIEWLINK">
				<ARG name="PERIODE">
					<value><![CDATA[ 
						
						if (SELECT.GROUPBY == 'AMSOR') {
							return ROW.OID;
						}
						if (SELECT.GROUPBY == 'MSOR') {
							if (COLUMN.NAME == 'COL1D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL1F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
						}
						
					]]></value>
				</ARG>
				<ARG name="TOPERIODE">
					<value><![CDATA[ 
						
						if (SELECT.GROUPBY == 'AMSOR') {
							return ROW.OID;
						}
						if (SELECT.GROUPBY == 'MSOR') {
							if (COLUMN.NAME == 'COL1D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL1F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
						}
						
					]]></value>
				</ARG>
			</VIEWLINK>
			<VIEWLINK label="Justificatif Ré-Entrées" shortLabel="Liste Ré-Entrées" view="PMSI000116.XML" componentName="RSS_BASE_VIEWLINK" component2Name="DATE_COMP_VIEWLINK">
				<ARG name="PERIODE">
					<value><![CDATA[ 
						
						if (SELECT.GROUPBY == 'AMSOR') {
							return ROW.OID;
						}
						if (SELECT.GROUPBY == 'MSOR') {
							if (COLUMN.NAME == 'COL1D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL1F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
						}
						
					]]></value>
				</ARG>
				<ARG name="TOPERIODE">
					<value><![CDATA[ 
						
						if (SELECT.GROUPBY == 'AMSOR') {
							return ROW.OID;
						}
						if (SELECT.GROUPBY == 'MSOR') {
							if (COLUMN.NAME == 'COL1D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL1F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
						}
						
					]]></value>
				</ARG>
				<ARG name="DELAI_REENTREE">
					<value><![CDATA[ 
						
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '1') {return '0';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '2') {return '2';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '3') {return '8';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '4') {return '16';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '5') {return '31';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '6') {return '91';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '1') {return '0';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '2') {return '2';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '3') {return '8';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '4') {return '16';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '5') {return '31';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '6') {return '91';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '1') {return '0';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '2') {return '2';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '3') {return '8';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '4') {return '16';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '5') {return '31';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '6') {return '91';}
						
					]]></value>
				</ARG>
				<ARG name="DELAI_REENTREE2">
					<value><![CDATA[ 
						
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '1') {return '1';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '2') {return '7';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '3') {return '15';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '4') {return '30';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '5') {return '90';}
						if ((COLUMN.NAME == 'COL1D' || COLUMN.NAME == 'COL1F') & SELECT.DATA1 == '6') {return '';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '1') {return '1';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '2') {return '7';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '3') {return '15';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '4') {return '30';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '5') {return '90';}
						if ((COLUMN.NAME == 'COL2D' || COLUMN.NAME == 'COL2F') & SELECT.DATA2 == '6') {return '';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '1') {return '1';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '2') {return '7';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '3') {return '15';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '4') {return '30';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '5') {return '90';}
						if ((COLUMN.NAME == 'COL3D' || COLUMN.NAME == 'COL3F') & SELECT.DATA3 == '6') {return '';}
						
					]]></value>
				</ARG>
			</VIEWLINK>
			<VIEWLINK label="Liste des RSS" shortLabel="Liste RSS" view="PMSI000005.XML" componentName="RSS_BASE_VIEWLINK" component2Name="DATE_COMP_VIEWLINK">
				<ARG name="PERIODE">
					<value><![CDATA[ 
						
						if (SELECT.GROUPBY == 'AMSOR') {
							return ROW.OID;
						}
						if (SELECT.GROUPBY == 'MSOR') {
							if (COLUMN.NAME == 'COL1D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL1F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
						}
						
					]]></value>
				</ARG>
				<ARG name="TOPERIODE">
					<value><![CDATA[ 
					
						if (SELECT.GROUPBY == 'AMSOR') {
							return ROW.OID;
						}
						if (SELECT.GROUPBY == 'MSOR') {
							if (COLUMN.NAME == 'COL1D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL1F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL2F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3D') {return SELECT.TOPERIODE_D.substr(0,4) + ROW.COD;}
							if (COLUMN.NAME == 'COL3F') {return SELECT.TOPERIODE.substr(0,4) + ROW.COD;}
						}
						
					]]></value>
				</ARG>
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Comparaison" label="Comparaison" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
			<CHART title="Nombre total de Ré-entrées pour les 12 premiers" type="columnChart" maxItems="12" maxItemsSortOn="NB_RE" maxItemsSortSeq="D" sortField="CODTXT" sortSeq="A" condition="ROW.LVL == '1'">
				<CATEGORY field="CODTXT" type="Char"/>
				<SERIE field="NB_RE_D" displayName="'Nb Ré-entrées ' + SELECT.PERIODE_D_LABEL + '-' + SELECT.TOPERIODE_D_LABEL" displayNameCalc="true"/>
				<SERIE field="NB_RE" displayName="'Nb Ré-entrées ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" displayNameCalc="true"/>
			</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_2 == '-1' || SELECT.GROUPBY_3 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="150" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
				</COLUMN>
                <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="NB_SEJ" 				outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_PAT" 				outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_NEW_PAT" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_NEW_PAT_CAT" 		outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_RE" 				outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_00_01" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_02_07" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_08_15" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_16_30" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_31_90" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_91_XX" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_SEJ_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_PAT_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_NEW_PAT_D" 		outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_NEW_PAT_CAT_D" 	outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_RE_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_00_01_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_02_07_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_08_15_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_16_30_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_31_90_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="NB_91_XX_D" 			outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum"/>
				<COLUMN dataField="COL1D" type="Number" width="80" fixed="false" textAlign="right" outputFormat="#" selectable="true" headerText="SELECT.PERIODE_D_LABEL + '\n' + SELECT.TOPERIODE_D_LABEL + '\n' + SELECT.DATA12" headerTextCalc="true" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.NB_PAT_D" 			condition="SELECT.DATA1 == 'P'"/>
					<CALC formula="ROW.NB_NEW_PAT_D" 		condition="SELECT.DATA1 == 'N'"/>
					<CALC formula="ROW.NB_NEW_PAT_CAT_D"	condition="SELECT.DATA1 == 'C'"/>
					<CALC formula="ROW.NB_SEJ_D" 			condition="SELECT.DATA1 == 'S'"/>
					<CALC formula="ROW.NB_RE_D" 			condition="SELECT.DATA1 == '0'"/>
					<CALC formula="ROW.NB_00_01_D" 			condition="SELECT.DATA1 == '1'"/>
					<CALC formula="ROW.NB_02_07_D" 			condition="SELECT.DATA1 == '2'"/>
					<CALC formula="ROW.NB_08_15_D" 			condition="SELECT.DATA1 == '3'"/>
					<CALC formula="ROW.NB_16_30_D" 			condition="SELECT.DATA1 == '4'"/>
					<CALC formula="ROW.NB_31_90_D" 			condition="SELECT.DATA1 == '5'"/>
					<CALC formula="ROW.NB_91_XX_D" 			condition="SELECT.DATA1 == '6'"/>
				</COLUMN>
				<COLUMN dataField="COL1F" type="Number" width="80" fixed="false" textAlign="right" outputFormat="#" selectable="true" headerText="SELECT.PERIODE_LABEL + '\n' + SELECT.TOPERIODE_LABEL + '\n' + SELECT.DATA12" headerTextCalc="true" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.NB_PAT" 			condition="SELECT.DATA1 == 'P'"/>
					<CALC formula="ROW.NB_NEW_PAT" 		condition="SELECT.DATA1 == 'N'"/>
					<CALC formula="ROW.NB_NEW_PAT_CAT" 	condition="SELECT.DATA1 == 'C'"/>
					<CALC formula="ROW.NB_SEJ" 			condition="SELECT.DATA1 == 'S'"/>
					<CALC formula="ROW.NB_RE" 			condition="SELECT.DATA1 == '0'"/>
					<CALC formula="ROW.NB_00_01" 		condition="SELECT.DATA1 == '1'"/>
					<CALC formula="ROW.NB_02_07" 		condition="SELECT.DATA1 == '2'"/>
					<CALC formula="ROW.NB_08_15" 		condition="SELECT.DATA1 == '3'"/>
					<CALC formula="ROW.NB_16_30" 		condition="SELECT.DATA1 == '4'"/>
					<CALC formula="ROW.NB_31_90" 		condition="SELECT.DATA1 == '5'"/>
					<CALC formula="ROW.NB_91_XX" 		condition="SELECT.DATA1 == '6'"/>
				</COLUMN>
				<COLUMN dataField="COL1E" type="Number" width="50" fixed="false" textAlign="right" outputFormat="#" headerText="Ecart" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL1F - ROW.COL1D"/>
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="ROW.COL1F &lt; ROW.COL1D" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="ROW.COL1F &gt; ROW.COL1D" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.COL1F != null &amp;&amp; ROW.COL1D != null &amp;&amp; ROW.COL1F == ROW.COL1D" />
				</COLUMN>
				<COLUMN dataField="COL1P" type="Number" width="45" fixed="false" textAlign="right" outputFormat="= if (ROW.COL1D != 0 || ROW.COL1F != 0) {return '0%'} else {return '#'}" headerText="% évol." totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL1E / ROW.COL1D * 100"/>
				</COLUMN>
				<COLUMN dataField="COL2D" type="Number" width="80" fixed="false" textAlign="right" outputFormat="#" selectable="true" visibleCondition="SELECT.DATA2 != '0'" headerText="SELECT.PERIODE_D_LABEL + '\n' + SELECT.TOPERIODE_D_LABEL + '\n' + SELECT.DATA22" headerTextCalc="true" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.NB_PAT_D" 			condition="SELECT.DATA2 == 'P'"/>
					<CALC formula="ROW.NB_NEW_PAT_D" 		condition="SELECT.DATA2 == 'N'"/>
					<CALC formula="ROW.NB_NEW_PAT_CAT_D"	condition="SELECT.DATA2 == 'C'"/>
					<CALC formula="ROW.NB_SEJ_D" 			condition="SELECT.DATA2 == 'S'"/>
					<CALC formula="ROW.NB_RE_D" 			condition="SELECT.DATA2 == '0'"/>
					<CALC formula="ROW.NB_00_01_D" 			condition="SELECT.DATA2 == '1'"/>
					<CALC formula="ROW.NB_02_07_D" 			condition="SELECT.DATA2 == '2'"/>
					<CALC formula="ROW.NB_08_15_D" 			condition="SELECT.DATA2 == '3'"/>
					<CALC formula="ROW.NB_16_30_D" 			condition="SELECT.DATA2 == '4'"/>
					<CALC formula="ROW.NB_31_90_D" 			condition="SELECT.DATA2 == '5'"/>
					<CALC formula="ROW.NB_91_XX_D" 			condition="SELECT.DATA2 == '6'"/>
				</COLUMN>
				<COLUMN dataField="COL2F" type="Number" width="80" fixed="false" textAlign="right" outputFormat="#" selectable="true" visibleCondition="SELECT.DATA2 != '0'" headerText="SELECT.PERIODE_LABEL + '\n' + SELECT.TOPERIODE_LABEL + '\n' + SELECT.DATA22" headerTextCalc="true" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.NB_PAT" 			condition="SELECT.DATA2 == 'P'"/>
					<CALC formula="ROW.NB_NEW_PAT" 		condition="SELECT.DATA2 == 'N'"/>
					<CALC formula="ROW.NB_NEW_PAT_CAT" 	condition="SELECT.DATA2 == 'C'"/>
					<CALC formula="ROW.NB_SEJ" 			condition="SELECT.DATA2 == 'S'"/>
					<CALC formula="ROW.NB_RE" 			condition="SELECT.DATA2 == '0'"/>
					<CALC formula="ROW.NB_00_01" 		condition="SELECT.DATA2 == '1'"/>
					<CALC formula="ROW.NB_02_07" 		condition="SELECT.DATA2 == '2'"/>
					<CALC formula="ROW.NB_08_15" 		condition="SELECT.DATA2 == '3'"/>
					<CALC formula="ROW.NB_16_30" 		condition="SELECT.DATA2 == '4'"/>
					<CALC formula="ROW.NB_31_90" 		condition="SELECT.DATA2 == '5'"/>
					<CALC formula="ROW.NB_91_XX" 		condition="SELECT.DATA2 == '6'"/>
				</COLUMN>
				<COLUMN dataField="COL2E" type="Number" width="50" fixed="false" textAlign="right" outputFormat="#" visibleCondition="SELECT.DATA2 != '0'" headerText="Ecart" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL2F - ROW.COL2D"/>
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="ROW.COL2F &lt; ROW.COL2D" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="ROW.COL2F &gt; ROW.COL2D" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.COL2F != null &amp;&amp; ROW.COL2D != null &amp;&amp; ROW.COL2F == ROW.COL2D" />
				</COLUMN>
				<COLUMN dataField="COL2P" type="Number" width="45" fixed="false" textAlign="right" outputFormat="= if (ROW.COL2D != 0 || ROW.COL2F != 0) {return '0%'} else {return '#'}" visibleCondition="SELECT.DATA2 != '0'" headerText="% évol." totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL2E / ROW.COL2D * 100"/>
				</COLUMN>
				<COLUMN dataField="COL3D" type="Number" width="80" fixed="false" textAlign="right" outputFormat="#" selectable="true" visibleCondition="SELECT.DATA3 != '0'" headerText="SELECT.PERIODE_D_LABEL + '\n' + SELECT.TOPERIODE_D_LABEL + '\n' + SELECT.DATA32" headerTextCalc="true" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.NB_PAT_D" 			condition="SELECT.DATA3 == 'P'"/>
					<CALC formula="ROW.NB_NEW_PAT_D" 		condition="SELECT.DATA3 == 'N'"/>
					<CALC formula="ROW.NB_NEW_PAT_CAT_D"	condition="SELECT.DATA3 == 'C'"/>
					<CALC formula="ROW.NB_SEJ_D" 			condition="SELECT.DATA3 == 'S'"/>
					<CALC formula="ROW.NB_RE_D" 			condition="SELECT.DATA3 == '0'"/>
					<CALC formula="ROW.NB_00_01_D" 			condition="SELECT.DATA3 == '1'"/>
					<CALC formula="ROW.NB_02_07_D" 			condition="SELECT.DATA3 == '2'"/>
					<CALC formula="ROW.NB_08_15_D" 			condition="SELECT.DATA3 == '3'"/>
					<CALC formula="ROW.NB_16_30_D" 			condition="SELECT.DATA3 == '4'"/>
					<CALC formula="ROW.NB_31_90_D" 			condition="SELECT.DATA3 == '5'"/>
					<CALC formula="ROW.NB_91_XX_D" 			condition="SELECT.DATA3 == '6'"/>
				</COLUMN>
				<COLUMN dataField="COL3F" type="Number" width="80" fixed="false" textAlign="right" outputFormat="#" selectable="true" visibleCondition="SELECT.DATA3 != '0'" headerText="SELECT.PERIODE_LABEL + '\n' + SELECT.TOPERIODE_LABEL + '\n' + SELECT.DATA32" headerTextCalc="true" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.NB_PAT" 			condition="SELECT.DATA3 == 'P'"/>
					<CALC formula="ROW.NB_NEW_PAT" 		condition="SELECT.DATA3 == 'N'"/>
					<CALC formula="ROW.NB_NEW_PAT_CAT" 	condition="SELECT.DATA3 == 'C'"/>
					<CALC formula="ROW.NB_SEJ" 			condition="SELECT.DATA3 == 'S'"/>
					<CALC formula="ROW.NB_RE" 			condition="SELECT.DATA3 == '0'"/>
					<CALC formula="ROW.NB_00_01" 		condition="SELECT.DATA3 == '1'"/>
					<CALC formula="ROW.NB_02_07" 		condition="SELECT.DATA3 == '2'"/>
					<CALC formula="ROW.NB_08_15" 		condition="SELECT.DATA3 == '3'"/>
					<CALC formula="ROW.NB_16_30" 		condition="SELECT.DATA3 == '4'"/>
					<CALC formula="ROW.NB_31_90" 		condition="SELECT.DATA3 == '5'"/>
					<CALC formula="ROW.NB_91_XX" 		condition="SELECT.DATA3 == '6'"/>
				</COLUMN>
				<COLUMN dataField="COL3E" type="Number" width="50" fixed="false" textAlign="right" outputFormat="#" visibleCondition="SELECT.DATA3 != '0'" headerText="Ecart" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL3F - ROW.COL3D"/>
					<CELLSTYLE name="cellIndicator" value="triangle_down, 10, left middle, 0xD63E00" condition="ROW.COL3F &lt; ROW.COL3D" />
					<CELLSTYLE name="cellIndicator" value="triangle_up, 10, left middle, 0x75a0eb" condition="ROW.COL3F &gt; ROW.COL3D" />
					<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0xFFA500" condition="ROW.COL3F != null &amp;&amp; ROW.COL3D != null &amp;&amp; ROW.COL3F == ROW.COL3D" />
				</COLUMN>
				<COLUMN dataField="COL3P" type="Number" width="45" fixed="false" textAlign="right" outputFormat="= if (ROW.COL3D != 0 || ROW.COL3F != 0) {return '0%'} else {return '#'}" visibleCondition="SELECT.DATA3 != '0'" headerText="% évol." totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL3E / ROW.COL3D * 100"/>
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
