<?xml version="1.0" encoding="ISO-8859-15"?>
<VUE name="ACTI000054" label="Activité. Evolution temporelle" title="= SELECT.PERIODICITE_LABEL + ' - ' +  SELECT.DATA_LABEL + ' ' + SELECT.REAPRE2 + ' par ' +  SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')'" database="iCTI" swf="*CTI_view1" softCode="iCTI_activite" globals="ACTI_globals.XML" componentsFile="ACTI_components.XML" 
    helpFile="iCTI_ACTI_ACTI000123.HTML"
    helpDokuWIkiDir="activite:occupation_sejours" 
    helpDokuWIkiFile="acti000123" 
>
	<VIEWPROPERTIES componentName="PROPERTIES_OCCUPATION"/>
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
		<PROPERTY name="REAPRE_SELECT">
			<value><![CDATA[
						[EVAL 
							if ('[REAPRE]' == '1') {return "";}
							if ('[REAPRE]' == '2') {return " AND est_mouvement_previsionnel = '1'";}
							return " AND est_mouvement_previsionnel <> '1'";
						EVAL]
					]]></value>
		</PROPERTY>
<!-- 		<PROPERTY name="COMBIEN_JOURS">
			<value><![CDATA[
						[EVAL 
							if ('[PERIODICITE]' == 'DAY') {
								if ('[NBJOURS]' != '-1') {
									return [NBJOURS];
								}
								else {
									return "date_part('day', '[VIEW.TOPERIODE]'::date)::int";
								}
							}
							else {return "12";}
						EVAL]
					]]></value>
		</PROPERTY>
 -->		
		<PROPERTY name="COMBIEN_JOURS">
			<value><![CDATA[
						[EVAL 
							if ('[PERIODICITE]' == 'DAY') {
								if ('[NBJOURS]' != '-1') {
									return [NBJOURS];
								}
								else {
									return substr('[TOPERIODE]', -2);
								}
							}
							else {return "12";}
						EVAL]
					]]></value>
		</PROPERTY>
		<!-- <PROPERTY name="PER">
			<value><![CDATA[[EVAL 
					
					if ('[PERIODICITE]' == 'DAY') {
						if ('[NBJOURS]' != '-1') {
							return "'[VIEW.TOPERIODE]'::date - [NBJOURS] + 1";
						}
						else {
							return "'[VIEW.TOPERIODE]'::date - date_part('day', '[VIEW.TOPERIODE]'::date)::int + 1";
						}
					}
					else {
						return "'[PERIODE]'::date";
					}
			EVAL]]]></value>
		</PROPERTY> -->
		<PROPERTY name="C_FACTEUR_MOYENNE">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'NJNM':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND v_places_1.est_ouvert = '1' AND heberge_hospitalises = '1' THEN date ELSE NULL END)";
									break;
								case 'NEXM':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND v_places_1.est_ouvert = '1' AND heberge_externes = '1' THEN date ELSE NULL END)";
									break;
								case 'NAMM':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND v_places_1.est_ouvert = '1' AND heberge_ambulatoires = '1' THEN date ELSE NULL END)";
									break;
								case 'NSEM':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND v_places_1.est_ouvert = '1' AND heberge_seances = '1' THEN date ELSE NULL END)";
									break;
								case 'TAU':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND v_places_1.est_ouvert = '1' THEN v_places_1.[VIEW.PLACES_FIELD] ELSE 0 END) / 100";
									break;
								default:
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND v_places_1.est_ouvert = '1' THEN date ELSE NULL END)";
								}

			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="T_FACTEUR_MOYENNE">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'NJNM':
									return "COUNT(DISTINCT CASE WHEN v_places_1.est_ouvert = '1' AND heberge_hospitalises = '1' THEN date ELSE NULL END)";
									break;
								case 'NEXM':
									return "COUNT(DISTINCT CASE WHEN v_places_1.est_ouvert = '1' AND heberge_externes = '1' THEN date ELSE NULL END)";
									break;
								case 'NAMM':
									return "COUNT(DISTINCT CASE WHEN v_places_1.est_ouvert = '1' AND heberge_ambulatoires = '1' THEN date ELSE NULL END)";
									break;
								case 'NSEM':
									return "COUNT(DISTINCT CASE WHEN v_places_1.est_ouvert = '1' AND heberge_seances = '1' THEN date ELSE NULL END)";
									break;
								case 'TAU':
									return "SUM(CASE WHEN v_places_1.est_ouvert = '1' THEN v_places_1.[VIEW.PLACES_FIELD] ELSE 0 END) / 100";
									break;
								default:
									return "COUNT(DISTINCT CASE WHEN v_places_1.est_ouvert = '1' THEN date ELSE NULL END)";
								}

			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="DATA_SELECT">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'NED':
									return 'AND nb_entrees_directes > 0';
									break;
								case 'NEM':
									return 'AND (nb_entrees_directes > 0 OR nb_entrees_mutation_[VIEW.MUTATION_FIELD] > 0)';
									break;
								case 'NSD':
									return 'AND nb_sorties_directes > 0';
									break;
								case 'NSM':
									return 'AND (nb_sorties_directes > 0 OR nb_sorties_mutation_[VIEW.MUTATION_FIELD] > 0)';
									break;
                                case 'NSDAM':
									return 'AND (nb_sorties_directes > 0 OR nb_sorties_mutation_[VIEW.MUTATION_FIELD] > 0 OR nb_ambulatoires > 0)';
									break;
								case 'NJN':
									return 'AND [VIEW.JOURNEES_FIELD] > 0';
									break;
								case 'NEX':
									return 'AND nb_externes > 0';
									break;
								case 'NPX':
									return 'AND nb_passage_externe > 0';
									break;
								case 'NAM':
									return 'AND nb_ambulatoires > 0';
									break;
								case 'NEDA':
									return 'AND (nb_entrees_directes > 0 OR nb_ambulatoires > 0)';
									break;
								case 'NSDA':
									return 'AND (nb_sorties_directes > 0 OR nb_ambulatoires > 0)';
									break;
								case 'NEDXA':
									return 'AND (nb_entrees_directes > 0 OR nb_externes > 0 OR nb_ambulatoires > 0)';
									break;
								case 'NSDXA':
									return 'AND (nb_sorties_directes > 0 OR nb_externes > 0 OR nb_ambulatoires > 0)';
									break;
								case 'NSDXBB':
									return 'AND (nb_sorties_directes > 0 OR nb_bebes > 0 OR nb_ambulatoires > 0)';
									break;
								case 'NJNXA':
									return 'AND ([VIEW.JOURNEES_FIELD] > 0 OR nb_externes > 0 OR nb_ambulatoires > 0)';
									break;
								case 'NEDXAS':
									return 'AND (nb_entrees_directes > 0 OR nb_externes > 0 OR nb_ambulatoires > 0 OR nb_seances > 0)';
									break;
								case 'NSDXAS':
									return 'AND (nb_sorties_directes > 0 OR nb_externes > 0 OR nb_ambulatoires > 0 OR nb_seances > 0)';
									break;
								case 'NSDXASSH':
									return "AND (nb_sorties_directes > 0 OR nb_externes > 0 OR nb_ambulatoires > 0 OR CASE WHEN type_sejour = '5' THEN nb_seances ELSE 0 END > 0)";
									break;
								case 'NJNXAS':
									return 'AND ([VIEW.JOURNEES_FIELD] > 0 OR nb_externes > 0 OR nb_ambulatoires > 0 OR nb_seances > 0)';
									break;
								case 'NSE':
									return "AND nb_seances > 0";
									break;
								case 'NSEDIA':
									return "AND nb_seances_dialyse > 0";
									break;
								case 'NSECHM':
									return "AND nb_seances_chimio > 0";
									break;
								case 'NSEDIV':
									return "AND nb_seances_autre > 0";
									break;
								case 'NBB':
									return "AND nb_bebes > 0";
									break;
                                case 'NBP':
									return "AND no_patient > 0";
									break;
								case 'NCP':
									return "AND [VIEW.CP_FIELD] > 0";
									break;
								case 'NJO':
									return "";
									break;
								case 'NJNM':
									return 'AND [VIEW.JOURNEES_FIELD] > 0';
									break;
								case 'NEXM':
									return 'AND nb_externes > 0';
									break;
								case 'NAMM':
									return 'AND nb_ambulatoires > 0';
									break;
								case 'NSEM':
									return "AND nb_seances > 0";
									break;
								case 'NJNXAM':
									return 'AND ([VIEW.JOURNEES_FIELD] > 0 OR nb_externes > 0 OR nb_ambulatoires > 0)';
									break;
								case 'TAU':
									return 'AND ([VIEW.JOURNEES_FIELD] > 0 OR nb_ambulatoires > 0 OR nb_seances_dans_taux > 0)';
									break;
								case 'NSHP':
									return "AND v_sejours_1.date_sortie > '[TOPERIODE]' AND v_sejours_1.code_sorti = 1";
									break;
								case 'NJNAS':
									return 'AND ([VIEW.JOURNEES_FIELD] > 0 OR nb_ambulatoires > 0 OR nb_seances > 0)';
									break;
								case 'NSFAC':
									return "AND v_mouvements_sejour_2.est_facture = '1'";
									break;
								case 'NSNFAC':
									return "AND v_mouvements_sejour_2.est_facture = '0'";
									break;
								case 'JRNSORFAC':
									return "AND v_mouvements_sejour_2.est_facture = '1' AND [VIEW.JOURNEES_FIELD] > 0";
									break;
								case 'JRNSORHONFAC':
									return "AND v_mouvements_sejour_2.est_facture = '1' AND ([VIEW.JOURNEES_FIELD] > 0 OR nb_ambulatoires > 0 OR nb_seances > 0)";
									break;
								case 'URG':
									return "AND nb_urgences > 0";
									break;
								case 'EMC':
									return 'AND equivalent_malade_complet > 0';
									break;
								default:
									return '';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="CDATA">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'NED':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_entrees_directes ELSE null END)';
									break;
								case 'NEM':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_entrees_directes + nb_entrees_mutation_[VIEW.MUTATION_FIELD] ELSE null END)';
									break;
								case 'NSD':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes ELSE null END)';
									break;
								case 'NSM':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes + nb_sorties_mutation_[VIEW.MUTATION_FIELD] ELSE null END)';
									break;
                                case 'NSDAM':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes + nb_sorties_mutation_[VIEW.MUTATION_FIELD] + nb_ambulatoires ELSE null END)';
									break;
								case 'NJN':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN [VIEW.JOURNEES_FIELD] ELSE null END)';
									break;
								case 'NJNS':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE AND nb_sorties_directes = 1 THEN nb_jour_sejour_sorti ELSE null END)';
									break;
								case 'NEX':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_externes ELSE null END)';
									break;
								case 'NPX':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_passage_externe ELSE null END)';
									break;
								case 'NAM':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_ambulatoires ELSE null END)';
									break;
								case 'NEDA':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_entrees_directes + nb_ambulatoires ELSE null END)';
									break;
								case 'NSDA':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes + nb_ambulatoires ELSE null END)';
									break;
								case 'NEDXA':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_entrees_directes + nb_externes + nb_ambulatoires ELSE null END)';
									break;
								case 'NSDXA':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes + nb_externes + nb_ambulatoires ELSE null END)';
									break;
								case 'NSDXBB':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes + nb_bebes + nb_ambulatoires ELSE null END)';
									break;
								case 'NJNXA':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN [VIEW.JOURNEES_FIELD] + nb_externes + nb_ambulatoires ELSE null END)';
									break;
								case 'NEDXAS':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_entrees_directes + nb_externes + nb_ambulatoires +  CASE WHEN type_sejour = '5' THEN nb_seances ELSE 0 END ELSE null END)";
									break;
								case 'NSDXAS':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes + nb_externes + nb_ambulatoires + CASE WHEN type_sejour = '5' THEN nb_seances ELSE 0 END ELSE null END)";
									break;
								case 'NSDXASSH':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes + nb_externes + nb_ambulatoires + CASE WHEN type_sejour = '5' THEN nb_seances ELSE 0 END ELSE null END)";
									break;	
								case 'NJNXAS':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN [VIEW.JOURNEES_FIELD] + nb_externes + nb_ambulatoires + nb_seances_dans_taux ELSE null END)';
									break;
								case 'NSE':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_seances ELSE null END)";
									break;
								case 'NSEDIA':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_seances_dialyse ELSE null END)";
									break;
								case 'NSECHM':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_seances_chimio ELSE null END)";
									break;
								case 'NSEDIV':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_seances_autre ELSE null END)";
									break;
								case 'NBB':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_bebes ELSE null END)";
									break;
                                case 'NBP':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE THEN no_patient ELSE null END)";
									break;
								case 'NCP':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN [VIEW.CP_FIELD] ELSE null END)";
									break;
								case 'NJO':
									return "COUNT(*)";
									break;
								case 'NJNM':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN [VIEW.JOURNEES_FIELD] ELSE null END)";
									break;
								case 'NEXM':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_externes ELSE null END)";
									break;
								case 'NAMM':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_ambulatoires ELSE null END)";
									break;
								case 'NSEM':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_seances ELSE null END)";
									break;
								case 'NJNXAM':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN [VIEW.JOURNEES_FIELD] + nb_externes + nb_ambulatoires ELSE null END)";
									break;
								case 'TAU':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN [VIEW.JOURNEES_FIELD] + nb_ambulatoires + nb_seances_dans_taux ELSE null END)";
									break;
								case 'NSHP':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE THEN CASE WHEN v_sejours_1.date_sortie > '[TOPERIODE]' AND v_sejours_1.code_sorti = 1 THEN v_sejours_1.no_sejour ELSE null END ELSE null END)";
									break;
								case 'NJNAS':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN [VIEW.JOURNEES_FIELD] + nb_ambulatoires + nb_seances_dans_taux ELSE null END)";
									break;
								case 'NAD':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND v_sejours_1.date_entree BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NADPRE':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND v_sejours_1.date_entree < '[PERIODE]' THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NSEJ':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NNONSOR':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND code_sorti = 0 THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NFULL':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND v_sejours_1.date_entree BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND v_sejours_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NSFAC':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND date_sortie <= '[TOPERIODE]'::date AND code_sorti = '1' AND v_mouvements_sejour_2.est_facture = '1' THEN v_sejours_1.no_sejour ELSE NULL END)";
									break;
								case 'NSNFAC':
									return "COUNT(DISTINCT CASE WHEN COLUMNCHECKSEQUENCE AND date_sortie <= '[TOPERIODE]'::date AND code_sorti = '1' AND v_mouvements_sejour_2.est_facture = '0' THEN v_sejours_1.no_sejour ELSE NULL END)";
									break;
								case 'JRNSORFAC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND date_sortie <= '[TOPERIODE]' AND v_mouvements_sejour_2.est_facture = '1' THEN [VIEW.JOURNEES_FIELD] ELSE null END)";
									break;
								case 'JRNSORHONFAC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND date_sortie <= '[TOPERIODE]' AND v_mouvements_sejour_2.est_facture = '1' THEN [VIEW.JOURNEES_FIELD] + nb_ambulatoires + nb_seances_dans_taux ELSE null END)";
									break;
								case 'DMSHES':
									return "base.cti_division(SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' AND nb_sorties_directes = 1 THEN duree ELSE 0 END), SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_sorties_directes ELSE null END))";
									break;
								case 'DMSHON':
									return "base.cti_division(SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN CASE WHEN type_sejour = '1' AND nb_sorties_directes = 1 THEN duree WHEN type_sejour = '2' THEN nb_ambulatoires WHEN type_sejour = '5' THEN nb_seances ELSE 0 END ELSE 0 END), SUM(CASE WHEN COLUMNCHECKSEQUENCE AND v_sejours_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND nb_sorties_directes + nb_ambulatoires + nb_seances_dans_taux > 0 THEN 1 ELSE 0 END))";
									break;
								case 'URG':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN nb_urgences ELSE 0 END)";
									break;
								case 'EMC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN equivalent_malade_complet ELSE 0 END)";
									break;
                                case 'GMP':
									return "base.cti_division(
                                        SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN gir_gmp_base*gir_gmp_coefficient ELSE 0 END),
                                        SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN gir_gmp_base ELSE 0 END)
                                        )";
									break;
								default:
									return '0';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="TDATA">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'NED':
									return 'SUM(nb_entrees_directes)';
									break;
								case 'NEM':
									return 'SUM(nb_entrees_directes + nb_entrees_mutation_[VIEW.MUTATION_FIELD])';
									break;
								case 'NSD':
									return 'SUM(nb_sorties_directes)';
									break;
								case 'NSM':
									return 'SUM(nb_sorties_directes + nb_sorties_mutation_[VIEW.MUTATION_FIELD])';
									break;
                                case 'NSDAM':
									return 'SUM(nb_sorties_directes + nb_sorties_mutation_[VIEW.MUTATION_FIELD] + nb_ambulatoires)';
									break;
								case 'NJN':
									return 'SUM([VIEW.JOURNEES_FIELD])';
									break;
								case 'NJNS':
									return 'SUM(CASE WHEN nb_sorties_directes = 1 THEN nb_jour_sejour_sorti ELSE null END)';
									break;
								case 'NEX':
									return 'SUM(nb_externes)';
									break;
								case 'NPX':
									return 'SUM(nb_passage_externe)';
									break;
								case 'NAM':
									return 'SUM(nb_ambulatoires)';
									break;
								case 'NEDA':
									return 'SUM(nb_entrees_directes + nb_ambulatoires)';
									break;
								case 'NSDA':
									return 'SUM(nb_sorties_directes + nb_ambulatoires)';
									break;
								case 'NEDXA':
									return 'SUM(nb_entrees_directes + nb_externes + nb_ambulatoires)';
									break;
								case 'NSDXA':
									return 'SUM(nb_sorties_directes + nb_externes + nb_ambulatoires)';
									break;
								case 'NSDXBB':
									return 'SUM(nb_sorties_directes + nb_bebes + nb_ambulatoires)';
									break;
								case 'NJNXA':
									return 'SUM([VIEW.JOURNEES_FIELD] + nb_externes + nb_ambulatoires)';
									break;
								case 'NEDXAS':
									return "SUM(nb_entrees_directes + nb_externes + nb_ambulatoires + CASE WHEN type_sejour = '5' THEN nb_seances ELSE 0 END)";
									break;
								case 'NSDXAS':
									return 'SUM(nb_sorties_directes + nb_externes + nb_ambulatoires + nb_seances_dans_taux)';
									break;
								case 'NSDXASSH':
									return "SUM(nb_sorties_directes + nb_externes + nb_ambulatoires + CASE WHEN type_sejour = '5' THEN nb_seances ELSE 0 END)";
									break;	
								case 'NJNXAS':
									return 'SUM([VIEW.JOURNEES_FIELD] + nb_externes + nb_ambulatoires + nb_seances_dans_taux)';
									break;
								case 'NSE':
									return "SUM(nb_seances)";
									break;
								case 'NSEDIA':
									return "SUM(nb_seances_dialyse)";
									break;
								case 'NSECHM':
									return "SUM(nb_seances_chimio)";
									break;
								case 'NSEDIV':
									return "SUM(nb_seances_autre)";
									break;
								case 'NBB':
									return "SUM(nb_bebes)";
									break;
                                case 'NBP':
									return "COUNT(DISTINCT no_patient)";
									break;
								case 'NCP':
									return "SUM([VIEW.CP_FIELD])";
									break;
								case 'NJO':
									return "COUNT(DISTINCT date)";
									break;
								case 'NJNM':
									return "base.cti_division(SUM([VIEW.JOURNEES_FIELD]), MAX(date(date)) - MIN(date(date)) + 1)";
									break;
								case 'NEXM':
									return "base.cti_division(SUM(nb_externes), MAX(date(date)) - MIN(date(date)) + 1)";
									break;
								case 'NAMM':
									return "base.cti_division(SUM(nb_ambulatoires), MAX(date(date)) - MIN(date(date)) + 1)";
									break;
								case 'NSEM':
									return "base.cti_division(SUM(nb_seances), MAX(date(date)) - MIN(date(date)) + 1)";
									break;
								case 'NJNXAM':
									return "base.cti_division(SUM([VIEW.JOURNEES_FIELD] + nb_externes + nb_ambulatoires), MAX(date(date)) - MIN(date(date)) + 1)";
									break;
								case 'TAU':
									return "SUM([VIEW.JOURNEES_FIELD] + nb_ambulatoires + nb_seances_dans_taux)";
									break;
								case 'NSHP':
									return "COUNT(DISTINCT CASE WHEN v_sejours_1.date_sortie > '[TOPERIODE]' AND v_sejours_1.code_sorti = 1 THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NJNAS':
									return "SUM([VIEW.JOURNEES_FIELD] + nb_ambulatoires + nb_seances_dans_taux)";
									break;
								case 'NAD':
									return "COUNT(DISTINCT CASE WHEN v_sejours_1.date_entree BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NADPRE':
									return "COUNT(DISTINCT CASE WHEN v_sejours_1.date_entree < '[PERIODE]' THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NSEJ':
									return "COUNT(DISTINCT v_sejours_1.no_sejour)";
									break;
								case 'NNONSOR':
									return "COUNT(DISTINCT CASE WHEN code_sorti = 0 THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NFULL':
									return "COUNT(DISTINCT CASE WHEN v_sejours_1.date_entree BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND v_sejours_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN v_sejours_1.no_sejour ELSE null END)";
									break;
								case 'NSFAC':
									return "COUNT(DISTINCT CASE WHEN date_sortie <= '[TOPERIODE]'::date AND code_sorti = '1' AND v_mouvements_sejour_2.est_facture = '1' THEN v_sejours_1.no_sejour ELSE NULL END)";
									break;
								case 'NSNFAC':
									return "COUNT(DISTINCT CASE WHEN date_sortie <= '[TOPERIODE]'::date AND code_sorti = '1' AND v_mouvements_sejour_2.est_facture = '0' THEN v_sejours_1.no_sejour ELSE NULL END)";
									break;
								case 'JRNSORFAC':
									return "SUM(CASE WHEN date_sortie <= '[TOPERIODE]' AND v_mouvements_sejour_2.est_facture = '1' THEN [VIEW.JOURNEES_FIELD] ELSE null END)";
									break;
								case 'JRNSORHONFAC':
									return "SUM(CASE WHEN date_sortie <= '[TOPERIODE]' AND v_mouvements_sejour_2.est_facture = '1' THEN [VIEW.JOURNEES_FIELD] + nb_ambulatoires + nb_seances_dans_taux ELSE null END)";
									break;
								case 'DMSHES':
									return "base.cti_division(SUM(CASE WHEN type_sejour = '1' AND nb_sorties_directes = 1 THEN duree ELSE 0 END), SUM(nb_sorties_directes))";
									break;
								case 'DMSHON':
									return "base.cti_division(SUM(CASE WHEN type_sejour = '1' AND nb_sorties_directes = 1 THEN duree WHEN type_sejour = '2' THEN nb_ambulatoires WHEN type_sejour = '5' THEN nb_seances ELSE 0 END), SUM(CASE WHEN v_sejours_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' AND nb_sorties_directes + nb_ambulatoires + nb_seances_dans_taux > 0 THEN 1 ELSE 0 END))";
									break;
								case 'URG':
									return "SUM(nb_urgences)";
									break;
								case 'EMC':
									return "SUM(equivalent_malade_complet)";
									break;
                                case 'GMP':
									return "base.cti_division(
                                        SUM(gir_gmp_base*gir_gmp_coefficient),
                                        SUM(gir_gmp_base)
                                        )";
								default:
									return '0';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="ORDERBY">
			<value><![CDATA[[EVAL 
					
					$groupbys = array(
										'[GROUPBY]', 
										'[GROUPBY_2]', 
										'[GROUPBY_3]',
										substr('[GROUBY]', 0, 6), 
										substr('[GROUBY_2]', 0, 6), 
										substr('[GROUBY_3]', 0, 6)
									);
					$exceptions = array('ANNEE', 'TRIM', 'MOIS', 'JOUR','JOURS', 'NUMEROTRIM', 'NUMEROMOIS', 'NUMEROJOUR');
					
					$result = array_intersect($groupbys, $exceptions);
					
					if (count($result) > 0) {
						return "DEFAULT";
					}
					else {
						return "indicateurs[2]";
					}
					
			EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="GROUPBY_DATE">
			<value>
				<![CDATA[
				[EVAL 	
					switch ('[GROUPBY]') {
						case 'ANNEE' :			$s = 'JOURS'; 		break;
						case 'TRIM' :			$s = 'JOURS';		break;
						case 'MOIS' :			$s = 'JOURS';		break;
						case 'NUMEROMOIS' :		$s = 'JOURS';		break;
						case 'NUMEROTRIM' :		$s = 'JOURS';		break;
						case 'SEMAINEWE' :		$s = 'JOURS';		break;
						case 'SEMAINEANNE' :	$s = 'JOURS';		break;
						case 'NUMEROJOUR' :		$s = 'JOURS';		break;
						case 'JOURS' :			$s = 'JOURS';		break;
						case 'JOUR' :			$s = 'JOURS';		break;
						
				
						default :				
								{$s = 'JOURS';			break;}
						
					}
					return $s;
				EVAL]
				]]>
			</value>
		</PROPERTY>
		
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		<GROUP>
			<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="200" default="2009-01-01" globalListProvider="DATE_DEBUT" >
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2009-01-31" globalListProvider="DATE_FIN" >
			</FIELD>
		</GROUP>
		<GROUP label="Périodicité">
			<FIELD name="PERIODICITE" width="200" UI="combo" default="MONTH" globalListProvider="PERIODICITE" />
			<FIELD name="NBJOURS" label="Nombre de jours" UI="combo" width="200" default="12" visible="= SELECT.PERIODICITE == 'DAY' ">
				<OPTION data="-1" label="A partir du début du mois"/>
				<OPTION data="1" label="1 jour"/>
				<OPTION data="2" label="2 jours"/>
				<OPTION data="3" label="3 jours"/>
				<OPTION data="4" label="4 jours"/>
				<OPTION data="5" label="5 jours"/>
				<OPTION data="6" label="6 jours"/>
				<OPTION data="7" label="7 jours"/>
				<OPTION data="8" label="8 jours"/>
				<OPTION data="9" label="9 jours"/>
				<OPTION data="10" label="10 jours"/>
				<OPTION data="11" label="11 jours"/>
				<OPTION data="12" label="12 jours"/>
				<OPTION data="13" label="13 jours"/>
				<OPTION data="14" label="14 jours"/>
				<OPTION data="15" label="15 jours"/>
				<OPTION data="16" label="16 jours"/>
				<OPTION data="17" label="17 jours"/>
				<OPTION data="18" label="18 jours"/>
				<OPTION data="19" label="19 jours"/>
				<OPTION data="20" label="20 jours"/>
 				<OPTION data="21" label="21 jours"/>
				<OPTION data="22" label="22 jours"/>
				<OPTION data="23" label="23 jours"/>
				<OPTION data="24" label="24 jours"/>
				<OPTION data="25" label="25 jours"/>
				<OPTION data="26" label="26 jours"/>
				<OPTION data="27" label="27 jours"/>
				<OPTION data="28" label="28 jours"/>
				<OPTION data="29" label="29 jours"/>
				<OPTION data="30" label="30 jours"/>
				<OPTION data="31" label="31 jours"/>			
			</FIELD>
			<FIELD name="FORCEFIN" label="Forcer fin" UI="check" selectedValue="1" unselectedValue="0" default="0" showIfNotDefault="true" />
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" width="300" default="SER" tree="true">
				<OPTION label="OCCUPATION_GROUPBY" data="" globalListProvider="OCCUPATION_GROUPBY"/>
			</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" label="" UI="combo" width="300" default="-1" tree="true">
				<OPTION label="Pas de second niveau" data="-1" treeLevel="1"/>
				<OPTION label="OCCUPATION_GROUPBY" data="" globalListProvider="OCCUPATION_GROUPBY"/>
			</FIELD>
			<FIELD name="GROUPBY_3" label="" UI="combo" width="300" default="-1" tree="true">
				<OPTION label="Pas de troisième niveau" data="-1" treeLevel="1"/>
				<OPTION label="OCCUPATION_GROUPBY" data="" globalListProvider="OCCUPATION_GROUPBY"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="DATA" label="Données" UI="combo" width="500" default="NED" default2="0" tree="true">
				<OPTION label="Options" data="" globalListProvider="DATA_OCCUPATION" />
			</FIELD>
			<FIELD name="REAPRE" label="" UI="combo" default="0" visible="= ENV.OPTADM_PREVUS == '1'" showIfNotDefault="true">
				<OPTION data="0" label="Prévus exclus" data2=""/>
				<OPTION data="1" label="Prévus inclus" data2="(Réalisation et Prévisions)"/>
				<OPTION data="2" label="Uniquement prévus" data2="(Prévisions)"/>
			</FIELD>
		</GROUP>
	</SELECTIONS>
	
	<SELECTIONS componentName="DAYS_SELECTIONS" />
	
	<SELECTIONS label="Modes de calcul" displayText="= var display:String = '';
						display = display + 'Modes de calcul : #B#' + SELECT.QPLACES_LABEL + '. ' + VIEW.OPTADM_DAYOUT + '. ' + SELECT.QJMUT_LABEL + '#/B#';
						return display;
						">
		<GROUP label="Modes">
			<FIELD name="QPLACES" label="" width="200" UI="combo" default="OUV">
				<OPTION data="OUV" label="Lits et box ouverts"/>
				<OPTION data="THEO" label="Lits et box théoriques"/>
			</FIELD>
			<FIELD name="QJMUT" label="" UI="combo" default="f">
				<OPTION data="d" label="Si mutation, journée affectée à la premiere localisation"/>
				<OPTION data="f" label="Si mutation, journée affectée à la dernière localisation"/>
				<OPTION data="12" label="Si mutation, journée affectée à la localisation occupée à 12h"/>
				<OPTION data="prorata" label="Si mutation, journée affectée au prorata du temps passé"/>
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_OCCUPATION_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_MOUVEMENTS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>	
	<SELECTIONS componentName="FILTRES_PATIENTS_SELECTIONS" />
	<SELECTIONS componentName="FILTRES_PASSAGES_SELECTIONS" />

	<QUERIES>
		<QUERY label="">
			<SQL>
				<select><![CDATA[		
					DROP TABLE IF EXISTS w_periode
					.,
					CREATE TEMP TABLE w_periode AS
					SELECT 
						count(DISTINCT date) AS duree_periode
					FROM activite.p_mouvements_sejour	
					WHERE date BETWEEN '[PERIODE]' AND '[VIEW.TOPERIODE]';
						
					CTIPREPAR_TREE
						WORKTABLE{acti000054_places}
						GROUPBY1{[VIEW.GROUPBY_PLACES_OID_FIELD],, [VIEW.GROUPBY_PLACES_COD_FIELD],, [VIEW.GROUPBY_PLACES_TXT_FIELD]}
						GROUPBY1MODE{[GROUPBY_TAB]}
						GROUPBY2{[VIEW.GROUPBY_2_PLACES_OID_FIELD],, [VIEW.GROUPBY_2_PLACES_COD_FIELD],, [VIEW.GROUPBY_2_PLACES_TXT_FIELD]}
						GROUPBY3{[VIEW.GROUPBY_3_PLACES_OID_FIELD],, [VIEW.GROUPBY_3_PLACES_COD_FIELD],, [VIEW.GROUPBY_3_PLACES_TXT_FIELD]}
						COLUMNBY[PERIODICITE]{date,, '[PERIODE]' ,, '[VIEW.TOPERIODE]' ,, [VIEW.COMBIEN_JOURS]}
					INDICATORS{
						SUM(CASE WHEN date = '[VIEW.TOPERIODE]' THEN v_places_1.nb_lits_theoriques ELSE 0 END),,
						[VIEW.T_FACTEUR_MOYENNE]
					}
					INDICATORS_COLUMNS{
						[VIEW.C_FACTEUR_MOYENNE]
						}
					FROM activite.v_places_1
					WHERE 
						date BETWEEN '[PERIODE]' AND '[VIEW.TOPERIODE]'
						[VIEW.ETAGE_PLACES_SELECT]

				]]></select>
			</SQL>
			<SQL optimizer="V_SEJOURS_X" optimizer2="V_MOUVEMENTS_SEJOUR_X">
				<select><![CDATA[		
					
					CTISELECT_TREE
						WORKTABLE{acti000054}
						GROUPBY1{[VIEW.GROUPBY_OID_FIELD],, [VIEW.GROUPBY_COD_FIELD],, [VIEW.GROUPBY_TXT_FIELD]}
						GROUPBY1MODE{[GROUPBY_TAB]}
						GROUPBY2{[VIEW.GROUPBY_2_OID_FIELD],, [VIEW.GROUPBY_2_COD_FIELD],, [VIEW.GROUPBY_2_TXT_FIELD]}
						GROUPBY3{[VIEW.GROUPBY_3_OID_FIELD],, [VIEW.GROUPBY_3_COD_FIELD],, [VIEW.GROUPBY_3_TXT_FIELD]}
						SIGNIFDATA{[VIEW.ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
						COLUMNBY[PERIODICITE]{date,, '[PERIODE]' ,, '[VIEW.TOPERIODE]' ,, [VIEW.COMBIEN_JOURS]}
						INDICATORS{
							0,,
							[VIEW.TDATA]}	
						INDICATORS_COLUMNS{[VIEW.CDATA]}
						
						ORDERBY{[VIEW.ORDERBY],, DESC}

					FROM #V_SEJOURS_X#
					JOIN #V_MOUVEMENTS_SEJOUR_X# ON v_mouvements_sejour_2.no_sejour = v_sejours_1.no_sejour 
					, w_periode
					WHERE 
						date BETWEEN '[PERIODE]' AND '[VIEW.TOPERIODE]'
						[VIEW.SEJOURS_SELECT] [VIEW.PATIENTS_SELECT]
						[VIEW.MOUVEMENTS_SELECT] [VIEW.REAPRE_SELECT]
						[VIEW.DATA_SELECT] [VIEW.JOURS_SELECT] [VIEW.PASSAGES_SELECT]
						AND v_sejours_1.type_sejour <> '9'
					AFTER{
					
						UPDATE acti000054 SET 
							indicateurs[1] = acti000054_places.indicateurs[1]
							[EVAL 
							
							if ('[DATA]' == 'TAU' || '[DATA]' == 'NJNM' || '[DATA]' == 'NEXM' || '[DATA]' == 'NAMM' || '[DATA]' == 'NJNXAM'  ) {
								return "
								,
								
								indicateurs[2] = base.cti_division(acti000054.indicateurs[2] , acti000054_places.indicateurs[2]),
								indicateurs[3] = base.cti_division(acti000054.indicateurs[3] , acti000054_places.indicateurs[3]),
								indicateurs[4] = base.cti_division(acti000054.indicateurs[4] , acti000054_places.indicateurs[4]),
								indicateurs[5] = base.cti_division(acti000054.indicateurs[5] , acti000054_places.indicateurs[5]),
								indicateurs[6] = base.cti_division(acti000054.indicateurs[6] , acti000054_places.indicateurs[6]),
								indicateurs[7] = base.cti_division(acti000054.indicateurs[7] , acti000054_places.indicateurs[7]),
								indicateurs[8] = base.cti_division(acti000054.indicateurs[8] , acti000054_places.indicateurs[8]),
								indicateurs[9] = base.cti_division(acti000054.indicateurs[9] , acti000054_places.indicateurs[9]),
								indicateurs[10] = base.cti_division(acti000054.indicateurs[10] , acti000054_places.indicateurs[10]),
								indicateurs[11] = base.cti_division(acti000054.indicateurs[11] , acti000054_places.indicateurs[11]),
								indicateurs[12] = base.cti_division(acti000054.indicateurs[12] , acti000054_places.indicateurs[12]),
								indicateurs[13] = base.cti_division(acti000054.indicateurs[13] , acti000054_places.indicateurs[13]),
								indicateurs[14] = base.cti_division(acti000054.indicateurs[14] , acti000054_places.indicateurs[14]),
								indicateurs[15] = base.cti_division(acti000054.indicateurs[15] , acti000054_places.indicateurs[15]),
								indicateurs[16] = base.cti_division(acti000054.indicateurs[16] , acti000054_places.indicateurs[16]),
								indicateurs[17] = base.cti_division(acti000054.indicateurs[17] , acti000054_places.indicateurs[17]),
								indicateurs[18] = base.cti_division(acti000054.indicateurs[18] , acti000054_places.indicateurs[18]),
								indicateurs[19] = base.cti_division(acti000054.indicateurs[19] , acti000054_places.indicateurs[19]),
								indicateurs[20] = base.cti_division(acti000054.indicateurs[20] , acti000054_places.indicateurs[20]),
								indicateurs[21] = base.cti_division(acti000054.indicateurs[21] , acti000054_places.indicateurs[21]),
								indicateurs[22] = base.cti_division(acti000054.indicateurs[22] , acti000054_places.indicateurs[22]),
								indicateurs[23] = base.cti_division(acti000054.indicateurs[23] , acti000054_places.indicateurs[23]),
								indicateurs[24] = base.cti_division(acti000054.indicateurs[24] , acti000054_places.indicateurs[24]),
								indicateurs[25] = base.cti_division(acti000054.indicateurs[25] , acti000054_places.indicateurs[25]),
								indicateurs[26] = base.cti_division(acti000054.indicateurs[26] , acti000054_places.indicateurs[26]),
								indicateurs[27] = base.cti_division(acti000054.indicateurs[27] , acti000054_places.indicateurs[27]),
								indicateurs[28] = base.cti_division(acti000054.indicateurs[28] , acti000054_places.indicateurs[28]),
								indicateurs[29] = base.cti_division(acti000054.indicateurs[29] , acti000054_places.indicateurs[29]),
								indicateurs[30] = base.cti_division(acti000054.indicateurs[30] , acti000054_places.indicateurs[30]),
								indicateurs[31] = base.cti_division(acti000054.indicateurs[31] , acti000054_places.indicateurs[31]),
								indicateurs[32] = base.cti_division(acti000054.indicateurs[32] , acti000054_places.indicateurs[32]),
								indicateurs[33] = base.cti_division(acti000054.indicateurs[33] , acti000054_places.indicateurs[33]),
								indicateurs[34] = base.cti_division(acti000054.indicateurs[34] , acti000054_places.indicateurs[34])
								";
							}
							if ('[DATA]' == 'NJO'  ) {
								return "
								,
								
								indicateurs[2] = acti000054_places.indicateurs[2],
								indicateurs[3] = acti000054_places.indicateurs[3],
								indicateurs[4] = acti000054_places.indicateurs[4],
								indicateurs[5] = acti000054_places.indicateurs[5],
								indicateurs[6] = acti000054_places.indicateurs[6],
								indicateurs[7] = acti000054_places.indicateurs[7],
								indicateurs[8] = acti000054_places.indicateurs[8],
								indicateurs[9] = acti000054_places.indicateurs[9],
								indicateurs[10] = acti000054_places.indicateurs[10],
								indicateurs[11] = acti000054_places.indicateurs[11],
								indicateurs[12] = acti000054_places.indicateurs[12],
								indicateurs[13] = acti000054_places.indicateurs[13],
								indicateurs[14] = acti000054_places.indicateurs[14],
								indicateurs[15] = acti000054_places.indicateurs[15],
								indicateurs[16] = acti000054_places.indicateurs[16],
								indicateurs[17] = acti000054_places.indicateurs[17],
								indicateurs[18] = acti000054_places.indicateurs[18],
								indicateurs[19] = acti000054_places.indicateurs[19],
								indicateurs[20] = acti000054_places.indicateurs[20],
								indicateurs[21] = acti000054_places.indicateurs[21],
								indicateurs[22] = acti000054_places.indicateurs[22],
								indicateurs[23] = acti000054_places.indicateurs[23],
								indicateurs[24] = acti000054_places.indicateurs[24],
								indicateurs[25] = acti000054_places.indicateurs[25],
								indicateurs[26] = acti000054_places.indicateurs[26],
								indicateurs[27] = acti000054_places.indicateurs[27],
								indicateurs[28] = acti000054_places.indicateurs[28],
								indicateurs[29] = acti000054_places.indicateurs[29],
								indicateurs[30] = acti000054_places.indicateurs[30],
								indicateurs[31] = acti000054_places.indicateurs[31],
								indicateurs[32] = acti000054_places.indicateurs[32],
								indicateurs[33] = acti000054_places.indicateurs[33],
								indicateurs[34] = acti000054_places.indicateurs[34]
								";
							}
							
							EVAL]
						FROM acti000054_places
						WHERE 
							(acti000054_places.oidt = acti000054.oidt OR acti000054_places.oidt = -111) AND
							(acti000054_places.oid1 = acti000054.oid1 OR acti000054_places.oid1 = -111) AND
							(acti000054_places.oid2 = acti000054.oid2 OR acti000054_places.oid2 = -111) AND
							(acti000054_places.oid3 = acti000054.oid3 OR acti000054_places.oid3 = -111)
						
						
					
				}	
						

				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="SORT"/>
					<FIELD name="LIT"/>
					<FIELD name="N"/>
					<FIELD name="N0"/>
					<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="N13"/>
					<FIELD name="N14"/>
					<FIELD name="N15"/>
					<FIELD name="N16"/>
					<FIELD name="N17"/>
					<FIELD name="N18"/>
					<FIELD name="N19"/>
					<FIELD name="N20"/>
					<FIELD name="N21"/>
					<FIELD name="N22"/>
					<FIELD name="N23"/>
					<FIELD name="N24"/>
					<FIELD name="N25"/>
					<FIELD name="N26"/>
					<FIELD name="N27"/>
					<FIELD name="N28"/>
					<FIELD name="N29"/>
					<FIELD name="N30"/>
					<FIELD name="N31"/>
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL select="SELECT 'TOPERIODE', COALESCE(MAX(CASE WHEN '[FORCEFIN]' = '1' THEN '[TOPERIODE]' ELSE date END),'[TOPERIODE]') 
				FROM activite.p_mouvements_sejour 
				WHERE date BETWEEN '[PERIODE]' AND '[TOPERIODE]' 
					[VIEW.REAPRE_SELECT]
				UNION 
				SELECT 'PERIODE', COALESCE(MIN(date),'[PERIODE]') 
				FROM activite.p_mouvements_sejour 
				WHERE date BETWEEN '[PERIODE]' AND '[TOPERIODE]' 
					[VIEW.REAPRE_SELECT]">
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
			
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL>
				<select><![CDATA[ 
					
						SELECT 
							'TOPERIODE', 
							to_char(COALESCE(MAX(date),'[TOPERIODE]'::date), 'YYYY-MM-DD')
						FROM 
							activite.p_mouvements_sejour 
						WHERE 
							date BETWEEN '[PERIODE]' AND '[TOPERIODE]' [VIEW.REAPRE_SELECT]
					UNION 
						SELECT 
							'PERIODE_ENHANCED_2',
							CASE WHEN '[PERIODE]' = '[TOPERIODE]' THEN ' = ' || '''' || to_char(COALESCE(MIN(date),'[PERIODE]'::date), 'YYYY-MM-DD') || '''::date'
								ELSE ' BETWEEN ''' || to_char(COALESCE(MIN(date),'[PERIODE]'::date), 'YYYY-MM-DD') || '''::date AND ''' || to_char(COALESCE(MAX(date),'[TOPERIODE]'::date), 'YYYY-MM-DD') || '''::date'
							END
						FROM 
							activite.p_mouvements_sejour 
						WHERE 
							date BETWEEN '[PERIODE]' AND '[TOPERIODE]' [VIEW.REAPRE_SELECT]
					UNION ALL
						SELECT 'ANA_CROI_PERIODE', to_char(greatest(	date_trunc('year', '[TOPERIODE]'::date) - INTERVAL  '3 year', 
														(SELECT date_trunc('year', min(date_comptable)) FROM activite.p_chiffrier_comptable)
													)::date, 'YYYY-MM-DD')
					UNION ALL
						SELECT 'ANA_CROI_TOPERIODE', 	to_char(
									least(	date_trunc('year', '[TOPERIODE]'::date) - interval '1 day' + interval '1 year',
												'[TOPERIODE]'::date)
									, 'YYYY-MM-DD')
					UNION ALL
						SELECT 'COMP_PERIODE', to_char(
									greatest(	date_trunc('year', '[TOPERIODE]'::date),
												date_trunc('month', '[PERIODE]'::date))
									, 'YYYY-MM-DD')
					UNION ALL
						SELECT 'COMP_PERIODE_D', to_char(
									greatest(	date_trunc('year', '[TOPERIODE]'::date) - interval '1 year',
												date_trunc('month', '[PERIODE]'::date) - interval '1 year')
									, 'YYYY-MM-DD')
					UNION ALL
						SELECT 'COMP_TOPERIODE_D', 	to_char(
									least(	date_trunc('year', '[TOPERIODE]'::date) - interval '1 day',
												'[TOPERIODE]'::date - interval '1 year')
									, 'YYYY-MM-DD')
					UNION ALL
						SELECT	
							'PLACESREF_GROUPBY',
							CASE 	WHEN t_divers.valeur = 'SER' THEN 'service'::text
									WHEN t_divers.valeur = 'UF' THEN  'uf'::text
									ELSE 'etage'::text
							END
						FROM activite.t_divers WHERE code = 'PLACESREF'
					UNION ALL
						SELECT	
							'PLACESREF_TEXT',
							CASE 	WHEN t_divers.valeur = 'SER' THEN 'Service'::text
									WHEN t_divers.valeur = 'UF' THEN  'Unité Fonctionnelle'::text
									ELSE 'Etage'::text
							END
						FROM activite.t_divers WHERE code = 'PLACESREF'
					UNION ALL
						SELECT	
							'PLACESREF',valeur
						FROM activite.t_divers WHERE code = 'PLACESREF'
						
				]]></select>
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Dernier mois/année" shortLabel="Dernier mois/année"   rowContext="false" buttonType="VIEWLINKPOPUP">
				<VIEWITEM label="Dernier mois" shortLabel="Dernier mois"  view="ACTI000056.XML" rowContext="false" enabled="true" buttonType="COMPARATIF" >
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,8)+'01';"/>
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;"/>
					<ARG name="GROUPBY" value="return VIEW.GROUPBY_DATE;"/>
					<ARG name="GROUPBY_2" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_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;" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'NSD'" />
					<ARG name="DATA3" value="'NJN'" />
					<ARG name="DATA4" value="'NAM';"/>
					<ARG name="DATA5" value="'NJNAS';"/>	
					<ARG name="TYPE_COMPARAISON" value="'2'" />
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernier mois" data="2" shortLabel="&#8721; dernier  mois"  view="ACTI000172.XML" enabled="true" rowContext="false" buttonType="COMPARATIF" >
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,8)+'01';"/>
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'NSD'" />
					<ARG name="DATA3" value="'NJN'" />
					<ARG name="GROUPBY" value="return 'JOURS';"/>
					<ARG name="GROUPBY_2" value="return '-1';" />
					<ARG name="GROUPBY_3" value="return '-1';" />
					<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;" />
					<ARG name="TYPE_COMPARAISON" value="return '2';" />
				</VIEWITEM>
				<VIEWITEM  label="Dernière année" data="2" shortLabel="derniere  année"  view="ACTI000056.XML" enabled="true" rowContext="false" buttonType="COMPARATIF" >
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';"/>
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;"/>
					<ARG name="GROUPBY" value="return VIEW.GROUPBY_DATE;"/>
					<ARG name="GROUPBY_2" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_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;" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'NSD'" />
					<ARG name="DATA3" value="'NJN'" />
					<ARG name="DATA4" value="'NAM';"/>
					<ARG name="DATA5" value="'NJNAS';"/>	
					<ARG name="TYPE_COMPARAISON" value="'2'" />
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernière Année" shortLabel="&#8721; derniere année"  view="ACTI000172.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
					<ARG name="PERIODE_D" value="return VIEW.COMP_PERIODE_D;" />
					<ARG name="TOPERIODE_D" value="return VIEW.COMP_TOPERIODE_D;" />
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;" />
					<ARG name="GROUPBY" value="return 'NUMEROMOIS';"/>
					<ARG name="GROUPBY_2" value="return '-1';"/>
					<ARG name="GROUPBY_3" value="return '-1';"/>
					<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;" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'NSD'" />
					<ARG name="DATA3" value="'NJN'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
			</VIEWLINK>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif"  view="ACTI000056.XML" rowContext="false" enabled="true" buttonType="COMPARATIF" >
					<ARG name="PERIODE" value="return VIEW.COMP_PERIODE;" />
					<ARG name="PERIODE_D" value="return VIEW.COMP_PERIODE_D;" />
					<ARG name="TOPERIODE_D" value="return VIEW.COMP_TOPERIODE_D;" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'NSD'" />
					<ARG name="DATA3" value="'NJN'" />
					<ARG name="DATA4" value="'NAM';"/>
					<ARG name="DATA5" value="'NJNAS';"/>	
					<ARG name="TYPE_COMPARAISON" value="'S'" />
			</VIEWLINK>			
			<VIEWLINK label="Comparatif mensuel" shortLabel="Comp. mensuel"  view="ACTI000165.XML" rowContext="false" enabled="true" buttonType="COMPARATIF" >
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'NSD'" />
					<ARG name="DATA3" value="'NJN'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Evolution comparative" shortLabel="Evol. comparative"   rowContext="false" buttonType="VIEWLINK_EVO_COMP" >			
				<VIEWITEM label="Standard" shortLabel="Evolution comparative" view="ACTI000173.XML" rowContext="false" enabled="true" buttonType="VIEWLINK_EVO_COMP">
					<ARG name="GROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_2" value="return 'NUMEROMOIS';" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'NSD'" />
					<ARG name="DATA3" value="'NJN'" />
					<ARG name="DATA4" value="'NAM';"/>
					<ARG name="DATA5" value="'NJNAS';"/>					
					<ARG name="DATA6"   value="return '0';" />
					<ARG name="DATA7"   value="return '0';" />
					<ARG name="DATA8"   value="return '0';" />
					<ARG name="DATA9"   value="return '0';"/>
					<ARG name="DATA10" 	value="return '0';"/>			
					<ARG name="DATA011" value="return '0';" />
					<ARG name="DATA012" value="return '0';" />
					<ARG name="DATA013" value="return '0';" />
					<ARG name="DATA014" value="return '0';"/>
					<ARG name="DATA015" value="return '0';"/>
					<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;"/>
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="Détaillée" shortLabel="Evolution comparative" view="ACTI000173.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
					<ARG name="GROUPBY" value="return SELECT.GROUPBY;" />
					<ARG name="GROUPBY_2" value="return 'NUMEROMOIS';" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'NSD'" />
					<ARG name="DATA3" value="'NJN'" />
					<ARG name="DATA4" value="'NAM';"/>
					<ARG name="DATA5" value="'NJNAS';"/>					
					<ARG name="DATA6" value="'NSE'" />
					<ARG name="DATA7" value="'NEX'" />
					<ARG name="DATA8" value="'EMC'" />
					<ARG name="DATA9" value="'DMSHES';"/>
					<ARG name="DATA10" value="'DMSHON';"/>					
					<ARG name="DATA011" value="return '0';" />
					<ARG name="DATA012" value="return '0';" />
					<ARG name="DATA013" value="return '0';" />
					<ARG name="DATA014" value="return '0';"/>
					<ARG name="DATA015" value="return '0';"/>
					<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;"/>
					<ARG name="GROUPBY_TAB" value="return 'TAB';" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
			</VIEWLINK>	
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="ACTI000054.XML" rowContext="false" enabled="true" buttonType="EVOLUTION" componentName="PERIODICITE_VIEWLINK" component2Name="OCC_BASE_VIEWLINK" >
			</VIEWLINK>
			<VIEWLINK label="Répartition hebdomadaire" shortLabel="Répartition hebdo" view="ACTI000036.XML" rowContext="false" enabled="true" buttonType="EVOLUTION" componentName="OCC_BASE_VIEWLINK">
				<ARG name="DATA" value="'NSD'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000072.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE" componentName="OCC_BASE_VIEWLINK" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />				
				<ARG name="PERIODE" value="return VIEW.ANA_CROI_PERIODE;" />
				<ARG name="TOPERIODE" value="return VIEW.ANA_CROI_TOPERIODE;" />
				<ARG name="COLUMNBY" value="'NUMEROMOIS'" />
				<ARG name="GROUPBY" value="'ANNEE'" />
				<ARG name="GROUPBY_2" value="if (SELECT.GROUPBY == 'ANNEE' || SELECT.GROUPBY == 'JOUR') {return 'SER';} else {return SELECT.GROUPBY;}" />
				<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;"/>			
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse" shortLabel="Analyse" view="ACTI000123.XML" enabled="true" rowContext="false" buttonType="ANALYSE" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<ARG name="GROUPBY" value="return SELECT.GROUPBY;" />
				<ARG name="GROUPBY_2" value="reurn SELECT.GROUPBY_2" />
				<ARG name="GROUPBY_2" value="reurn SELECT.GROUPBY_3" />
				<ARG name="GROUPBY_TAB" value="return 'TAB';" />
				<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="Liste des séjours" shortLabel="Séjours" view="ACTI000052.XML" componentName="OCC_BASE_VIEWLINK" component3Name="STANDARD_BASE_VIEWLINK">
				<ARG name="PERIODE" value="	if (COLUMN.NAME == 'N1') {return VIEW.COLD1}
											if (COLUMN.NAME == 'N2') {return VIEW.COLD2}
											if (COLUMN.NAME == 'N3') {return VIEW.COLD3}
											if (COLUMN.NAME == 'N4') {return VIEW.COLD4}
											if (COLUMN.NAME == 'N5') {return VIEW.COLD5}
											if (COLUMN.NAME == 'N6') {return VIEW.COLD6}
											if (COLUMN.NAME == 'N7') {return VIEW.COLD7}
											if (COLUMN.NAME == 'N8') {return VIEW.COLD8}
											if (COLUMN.NAME == 'N9') {return VIEW.COLD9}
											if (COLUMN.NAME == 'N10') {return VIEW.COLD10}
											if (COLUMN.NAME == 'N11') {return VIEW.COLD11}
											if (COLUMN.NAME == 'N12') {return VIEW.COLD12}
											if (COLUMN.NAME == 'N13') {return VIEW.COLD13}
											if (COLUMN.NAME == 'N14') {return VIEW.COLD14}
											if (COLUMN.NAME == 'N15') {return VIEW.COLD15}
											if (COLUMN.NAME == 'N16') {return VIEW.COLD16}
											if (COLUMN.NAME == 'N17') {return VIEW.COLD17}
											if (COLUMN.NAME == 'N18') {return VIEW.COLD18}
											if (COLUMN.NAME == 'N19') {return VIEW.COLD19}
											if (COLUMN.NAME == 'N20') {return VIEW.COLD20}
											if (COLUMN.NAME == 'N21') {return VIEW.COLD21}
											if (COLUMN.NAME == 'N22') {return VIEW.COLD22}
											if (COLUMN.NAME == 'N23') {return VIEW.COLD23}
											if (COLUMN.NAME == 'N24') {return VIEW.COLD24}
											if (COLUMN.NAME == 'N25') {return VIEW.COLD25}
											if (COLUMN.NAME == 'N26') {return VIEW.COLD26}
											if (COLUMN.NAME == 'N27') {return VIEW.COLD27}
											if (COLUMN.NAME == 'N28') {return VIEW.COLD28}
											if (COLUMN.NAME == 'N29') {return VIEW.COLD29}
											if (COLUMN.NAME == 'N30') {return VIEW.COLD30}
											if (COLUMN.NAME == 'N31') {return VIEW.COLD31}
											"/>
				<ARG name="TOPERIODE" value="	if (COLUMN.NAME == 'N1') {return VIEW.COLF1}
											if (COLUMN.NAME == 'N2') {return VIEW.COLF2}
											if (COLUMN.NAME == 'N3') {return VIEW.COLF3}
											if (COLUMN.NAME == 'N4') {return VIEW.COLF4}
											if (COLUMN.NAME == 'N5') {return VIEW.COLF5}
											if (COLUMN.NAME == 'N6') {return VIEW.COLF6}
											if (COLUMN.NAME == 'N7') {return VIEW.COLF7}
											if (COLUMN.NAME == 'N8') {return VIEW.COLF8}
											if (COLUMN.NAME == 'N9') {return VIEW.COLF9}
											if (COLUMN.NAME == 'N10') {return VIEW.COLF10}
											if (COLUMN.NAME == 'N11') {return VIEW.COLF11}
											if (COLUMN.NAME == 'N12') {return VIEW.COLF12}
											if (COLUMN.NAME == 'N13') {return VIEW.COLF13}
											if (COLUMN.NAME == 'N14') {return VIEW.COLF14}
											if (COLUMN.NAME == 'N15') {return VIEW.COLF15}
											if (COLUMN.NAME == 'N16') {return VIEW.COLF16}
											if (COLUMN.NAME == 'N17') {return VIEW.COLF17}
											if (COLUMN.NAME == 'N18') {return VIEW.COLF18}
											if (COLUMN.NAME == 'N19') {return VIEW.COLF19}
											if (COLUMN.NAME == 'N20') {return VIEW.COLF20}
											if (COLUMN.NAME == 'N21') {return VIEW.COLF21}
											if (COLUMN.NAME == 'N22') {return VIEW.COLF22}
											if (COLUMN.NAME == 'N23') {return VIEW.COLF23}
											if (COLUMN.NAME == 'N24') {return VIEW.COLF24}
											if (COLUMN.NAME == 'N25') {return VIEW.COLF25}
											if (COLUMN.NAME == 'N26') {return VIEW.COLF26}
											if (COLUMN.NAME == 'N27') {return VIEW.COLF27}
											if (COLUMN.NAME == 'N28') {return VIEW.COLF28}
											if (COLUMN.NAME == 'N29') {return VIEW.COLF29}
											if (COLUMN.NAME == 'N30') {return VIEW.COLF30}
											if (COLUMN.NAME == 'N31') {return VIEW.COLF31}
											"/>
				<ARG name="DATA" value="if (SELECT.DATA == 'NED') {return 'ENT'}
										if (SELECT.DATA == 'NEM') {return 'ENT'}
										if (SELECT.DATA == 'NSD') {return 'SOR'}
										if (SELECT.DATA == 'NSM') {return 'SOR'}
										if (SELECT.DATA == 'NJN') {return 'JRN'}
										if (SELECT.DATA == 'NJNS') {return 'JRN'}
										if (SELECT.DATA == 'NJNM') {return 'JRN'}
										if (SELECT.DATA == 'NCP') {return 'CP'}
										if (SELECT.DATA == 'NEX') {return 'EXT'}
										if (SELECT.DATA == 'NPX') {return 'EXT'}
										if (SELECT.DATA == 'NEXM') {return 'EXT'}
										if (SELECT.DATA == 'NAM') {return 'AMB'}
										if (SELECT.DATA == 'NAMM') {return 'AMB'}
										if (SELECT.DATA == 'NSE') {return 'SEA'}
										return '-1'"/>
				<ARG name="ALIAS_PERIODE" value="
					var pattern:RegExp = /^N[0-9]/;
					if (String(COLUMN.NAME).search(pattern) == 0) {return '-1';}
					else {return SELECT.ALIAS_PERIODE;}" />
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Occupation" label="Occupation" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
            <CHART title="" type="group" subType="h" percentHeight="100" fromTotal="false">				
                <CHART title="Comparatif (10 premiers) " type="pieChart" maxItems="10" maxItemsSortOn="N" maxItemsSortSeq="D" sortField="N" sortSeq="D" condition="Number(ROW.LVL) == 1"
                    visibleCondition="SELECT.GROUPBY != 'ANNEE' &amp;&amp; SELECT.GROUPBY != 'TRIM' &amp;&amp; SELECT.GROUPBY != 'MOIS' &amp;&amp; SELECT.GROUPBY != 'NUMEROTRIM' &amp;&amp; SELECT.GROUPBY != 'NUMEROMOIS' &amp;&amp; SELECT.GROUPBY != 'JOUR' ">
                    <CATEGORY field="TXT" type="Char"/>
                    <SERIE field="N" displayName="SELECT.DATA_LABEL" displayNameCalc="true"/>
                </CHART>
                <CHART title="Evolution temporelle (5 premiers)" type="lineChart" maxItems="5" maxItemsSortOn="N" maxItemsSortSeq="D" serieIsCategory="true" sortField="N" sortSeq="D" condition="ROW.LVL == '1'"
                    visibleCondition="SELECT.GROUPBY != 'TRIM' &amp;&amp; SELECT.GROUPBY != 'MOIS' &amp;&amp; SELECT.GROUPBY != 'JOUR' &amp;&amp; SELECT.GROUPBY != 'NUMEROTRIM' &amp;&amp; SELECT.GROUPBY != 'NUMEROMOIS' &amp;&amp; SELECT.GROUPBY != 'JOURS'">
                    <CATEGORY field="TXT" 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"/>
                    <SERIE field="N13" displayName="VIEW.COLH13" displayNameCalc="true" visibleCondition="VIEW.COLH13 != null"/>
                    <SERIE field="N14" displayName="VIEW.COLH14" displayNameCalc="true" visibleCondition="VIEW.COLH14 != null"/>
                    <SERIE field="N15" displayName="VIEW.COLH15" displayNameCalc="true" visibleCondition="VIEW.COLH15 != null"/>
                    <SERIE field="N16" displayName="VIEW.COLH16" displayNameCalc="true" visibleCondition="VIEW.COLH16 != null"/>
                    <SERIE field="N17" displayName="VIEW.COLH17" displayNameCalc="true" visibleCondition="VIEW.COLH17 != null"/>
                    <SERIE field="N18" displayName="VIEW.COLH18" displayNameCalc="true" visibleCondition="VIEW.COLH18 != null"/>
                    <SERIE field="N19" displayName="VIEW.COLH19" displayNameCalc="true" visibleCondition="VIEW.COLH19 != null"/>
                    <SERIE field="N20" displayName="VIEW.COLH20" displayNameCalc="true" visibleCondition="VIEW.COLH20 != null"/>
                    <SERIE field="N21" displayName="VIEW.COLH21" displayNameCalc="true" visibleCondition="VIEW.COLH21 != null"/>
                    <SERIE field="N22" displayName="VIEW.COLH22" displayNameCalc="true" visibleCondition="VIEW.COLH22 != null"/>
                    <SERIE field="N23" displayName="VIEW.COLH23" displayNameCalc="true" visibleCondition="VIEW.COLH23 != null"/>
                    <SERIE field="N24" displayName="VIEW.COLH24" displayNameCalc="true" visibleCondition="VIEW.COLH24 != null"/>
                    <SERIE field="N25" displayName="VIEW.COLH25" displayNameCalc="true" visibleCondition="VIEW.COLH25 != null"/>
                    <SERIE field="N26" displayName="VIEW.COLH26" displayNameCalc="true" visibleCondition="VIEW.COLH26 != null"/>
                    <SERIE field="N27" displayName="VIEW.COLH27" displayNameCalc="true" visibleCondition="VIEW.COLH27 != null"/>
                    <SERIE field="N28" displayName="VIEW.COLH28" displayNameCalc="true" visibleCondition="VIEW.COLH28 != null"/>
                    <SERIE field="N29" displayName="VIEW.COLH29" displayNameCalc="true" visibleCondition="VIEW.COLH29 != null"/>
                    <SERIE field="N30" displayName="VIEW.COLH30" displayNameCalc="true" visibleCondition="VIEW.COLH30 != null"/>
                    <SERIE field="N31" displayName="VIEW.COLH31" displayNameCalc="true" visibleCondition="VIEW.COLH31 != null"/>
                </CHART>
            </CHART>
                <CHART title="Répartition (Total)" type="columnChart" serieIsCategory="true" fromTotal="true" 
                    visibleCondition="SELECT.GROUPBY == 'TRIM' || SELECT.GROUPBY == 'MOIS' || SELECT.GROUPBY == 'JOUR' || SELECT.GROUPBY == 'NUMEROTRIM' || SELECT.GROUPBY == 'NUMEROMOIS' || SELECT.GROUPBY == 'JOUR'">
                    <CATEGORY field="TXT" 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"/>
                    <SERIE field="N13" displayName="VIEW.COLH13" displayNameCalc="true" visibleCondition="VIEW.COLH13 != null"/>
                    <SERIE field="N14" displayName="VIEW.COLH14" displayNameCalc="true" visibleCondition="VIEW.COLH14 != null"/>
                    <SERIE field="N15" displayName="VIEW.COLH15" displayNameCalc="true" visibleCondition="VIEW.COLH15 != null"/>
                    <SERIE field="N16" displayName="VIEW.COLH16" displayNameCalc="true" visibleCondition="VIEW.COLH16 != null"/>
                    <SERIE field="N17" displayName="VIEW.COLH17" displayNameCalc="true" visibleCondition="VIEW.COLH17 != null"/>
                    <SERIE field="N18" displayName="VIEW.COLH18" displayNameCalc="true" visibleCondition="VIEW.COLH18 != null"/>
                    <SERIE field="N19" displayName="VIEW.COLH19" displayNameCalc="true" visibleCondition="VIEW.COLH19 != null"/>
                    <SERIE field="N20" displayName="VIEW.COLH20" displayNameCalc="true" visibleCondition="VIEW.COLH20 != null"/>
                    <SERIE field="N21" displayName="VIEW.COLH21" displayNameCalc="true" visibleCondition="VIEW.COLH21 != null"/>
                    <SERIE field="N22" displayName="VIEW.COLH22" displayNameCalc="true" visibleCondition="VIEW.COLH22 != null"/>
                    <SERIE field="N23" displayName="VIEW.COLH23" displayNameCalc="true" visibleCondition="VIEW.COLH23 != null"/>
                    <SERIE field="N24" displayName="VIEW.COLH24" displayNameCalc="true" visibleCondition="VIEW.COLH24 != null"/>
                    <SERIE field="N25" displayName="VIEW.COLH25" displayNameCalc="true" visibleCondition="VIEW.COLH25 != null"/>
                    <SERIE field="N26" displayName="VIEW.COLH26" displayNameCalc="true" visibleCondition="VIEW.COLH26 != null"/>
                    <SERIE field="N27" displayName="VIEW.COLH27" displayNameCalc="true" visibleCondition="VIEW.COLH27 != null"/>
                    <SERIE field="N28" displayName="VIEW.COLH28" displayNameCalc="true" visibleCondition="VIEW.COLH28 != null"/>
                    <SERIE field="N29" displayName="VIEW.COLH29" displayNameCalc="true" visibleCondition="VIEW.COLH29 != null"/>
                    <SERIE field="N30" displayName="VIEW.COLH30" displayNameCalc="true" visibleCondition="VIEW.COLH30 != null"/>
                    <SERIE field="N31" displayName="VIEW.COLH31" displayNameCalc="true" visibleCondition="VIEW.COLH31 != null"/>
                </CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="36" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" 
						sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB')">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid" />
				<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="100" maxWidth="300" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="LIT" type="Number" width="50" outputFormat="0" visible="false" headerText="Places" textAlign="right" totalFunction="text" otherFunction="text" otherComplement="" />
				<COLUMN dataField="N" width="80" visible="true" type="Number" outputFormat="= SELECT.DATA2" headerText="Total" textAlign="right" totalFunction="sum" otherFunction="sum" />
				<COLUMN dataField="N_P" type="Number" headerText="% / Total" width="50" outputFormat="0%" textAlign="right" visibleCondition="SELECT.DATA != 'TAU' " totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.N / TOTALROW.N * 100"/>
				</COLUMN>
				<COLUMN dataField="N0" width="70" visibleCondition="VIEW.COLH0 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="false" headerText="&lt;&lt;" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N1" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH1 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH1" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N2" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH2 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH2" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N3" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH3 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH3" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N4" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH4 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH4" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N5" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH5 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH5" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N6" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH6 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH6" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N7" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH7 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH7" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N8" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH8 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH8" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N9" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH9 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH9" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N10" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH10 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH10" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N11" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH11 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH11" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N12" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH12 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH12" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N13" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH13 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH13" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N14" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH14 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH14" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N15" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH15 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH15" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N16" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH16 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH16" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N17" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH17 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH17" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N18" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH18 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH18" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N19" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH19 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH19" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N20" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH20 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH20" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N21" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH21 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH21" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N22" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH22 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH22" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N23" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH23 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH23" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N24" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH24 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH24" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N25" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH25 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH25" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N26" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH26 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH26" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N27" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH27 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH27" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N28" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH28 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH28" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N29" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH29 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH29" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N30" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH30 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH30" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
				<COLUMN dataField="N31" width="= if (SELECT.PERIODICITE == 'DAY') { return 50;} else { return  70;}" visibleCondition="VIEW.COLH31 != null" type="Number" outputFormat="= SELECT.DATA2" fixed="false" selectable="true" headerText="VIEW.COLH31" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum" />
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
