<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="ACTI000059" label="Activité. Evolution de l'état des dossiers de séjour" title="= SELECT.PERIODICITE_LABEL + ' - ' +  SELECT.DATA_LABEL + ' 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:etat_des_dossiers_superviseur_activite" 
    helpDokuWIkiFile="acti000057" 
>
	<VIEWPROPERTIES componentName="PROPERTIES_ETATDOSSIERS"/>
	<VIEWPROPERTIES>
		<PROPERTY name="TDATA">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
							
								case 'MCPT':
									return "SUM( v_factures_reference_1.montant_comptabilise[VIEW.CLIHON])";
									break;
								case 'MNFAC':
									return "SUM( v_factures_reference_1.montant_encours[VIEW.CLIHON])";
									break;
								case 'NBFAC':
									return 'SUM(v_factures_reference_1.nb_factures)';
									break;
								case 'NBREG':
									return 'SUM(v_factures_reference_1.nb_factures_regularisation)';
									break;
								case 'PRREG':
									return 'base.cti_division(
												SUM(v_factures_reference_1.nb_factures_regularisation),
												SUM(v_factures_reference_1.nb_factures)
											) * 100';
									break;
								case 'NBREJ':
									return 'SUM(v_factures_reference_1.nb_rejets)';
									break;
								case 'NBNGRP':
									return 'SUM(v_factures_reference_1.nb_non_groupe)';
									break;
								case 'DELGRP':
									return 'AVG(v_factures_reference_1.delai_groupage)';
									break;
								case 'NBNFAC':
									return 'SUM(v_factures_reference_1.nb_non_calcules)';
									break;
								case 'DELFAC':
									return 'AVG(v_factures_reference_1.delai_facture)';
									break;
								case 'NBNEXP':
									return 'SUM(v_factures_reference_1.nb_non_expedie[VIEW.CLIHON])';
									break;
								case 'MTNEXP':
									return 'SUM(v_factures_reference_1.montant_non_expedie[VIEW.CLIHON])';
									break;				
								case 'MTNEXPHC':
									return "SUM( CASE WHEN type_sejour = '1'  THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTNEXPHJ':
									return "SUM( CASE WHEN (type_sejour = '2' OR type_sejour = '5') THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTNEXPA':
									return "SUM( CASE WHEN type_sejour = '3' THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'DELEXP':
									return 'AVG(v_factures_reference_1.delai_expedition)';
									break;
								case 'NBNSOL':
									return "SUM(v_factures_reference_1.nb_non_solde[VIEW.CLIHON])";
									break;
								case 'MTNSOL':
									return 'SUM(v_factures_reference_1.montant_solde[VIEW.CLIHON])';
									break;
								case 'DELSOL':
									return 'AVG(v_factures_reference_1.delai_solde[VIEW.CLIHON])';
									break;
								case 'NBNCLO':
									return "SUM(v_factures_reference_1.nb_non_cloture[VIEW.CLIHON] - v_factures_reference_1.nb_non_solde[VIEW.CLIHON])";
									break;
								case 'NSEJ':
									return "COUNT(v_factures_reference_1.no_sejour)";
									break;
								case 'MFAC':
									return "SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON])";
									break;
								case 'CAMFAC':
									return "base.cti_division(
											SUM( v_factures_reference_1.montant_facture[VIEW.CLIHON] ),
											COUNT( v_factures_reference_1.no_sejour  )
											) ";
									break;
								case 'CAMFHC':
									return "base.cti_division(
											SUM(CASE WHEN type_sejour = '1' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFHJ':
									return "base.cti_division(
											SUM(CASE WHEN type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN type_sejour = '2' OR type_sejour = '5'  THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFA':
									return "base.cti_division(
											SUM(CASE WHEN type_sejour = '3' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN type_sejour = '3' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFV':
									return "base.cti_division(
											SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON]),
											COUNT(v_factures_reference_1.no_sejour)
											) ";
									break;
								case 'CAMFVHC':
									return "base.cti_division(
											SUM(CASE WHEN  type_sejour = '1' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN  type_sejour = '1' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFVHJ':
									return "base.cti_division(
											SUM(CASE WHEN  type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN  type_sejour = '2' OR type_sejour = '5'  THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFVA':
									return "base.cti_division(
											SUM(CASE WHEN  type_sejour = '3' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN  type_sejour = '3' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'MFACHC':
									return "SUM( CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MFACHJ':
									return "SUM( CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MFACA':
									return "SUM( CASE WHEN type_sejour = '3' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END  )";
									break;
								case 'MVFAC':
									return "SUM(v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON])";
									break;
								case 'MCPTHC':
									return "SUM( CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MCPTHJ':
									return "SUM( CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MCPTA':
									return "SUM( CASE WHEN type_sejour = '3'  THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MNFHC':
									return "SUM(CASE WHEN type_sejour = '1' THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MNFHJ':
									return "SUM( CASE WHEN type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  )";
									break;					
								case 'MNFACA':
									return "SUM(  CASE WHEN type_sejour = '3'  THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END)";
									break;
								case 'MTEXP':
									return "SUM( CASE WHEN  v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPHC':
									return "SUM( CASE WHEN type_sejour = '1' AND  v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPHJ':
									return "SUM( CASE WHEN (type_sejour = '2' OR type_sejour = '5') AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPA':
									return "SUM( CASE WHEN type_sejour = '3' AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MTSOL':
									return "SUM(CASE WHEN  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLHC':
									return "SUM(CASE WHEN type_sejour = '1' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLHJ':
									return "SUM(CASE WHEN (type_sejour = '2' OR type_sejour = '5') AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLA':
									return "SUM(CASE WHEN type_sejour = '3' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								default:
									return 'SUM(v_factures_reference_1.nb_factures)';
								}
					EVAL]]]></value>
		</PROPERTY>
		<PROPERTY name="CDATA">
			<value><![CDATA[[EVAL 
								switch ('[DATA]') {
								case 'MCPT':
									return 'SUM( CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )';
									break;
								case 'MNFAC':
									return 'SUM( CASE WHEN COLUMNCHECKSEQUENCE THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'NBFAC':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures ELSE NULL END)';
									break;
								case 'NBREG':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures_regularisation ELSE NULL END)';
									break;
								case 'PRREG':
									return 'base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures_regularisation ELSE NULL END),
											SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures ELSE NULL END)
											) * 100 ';
									break;
								case 'NBREJ':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_rejets ELSE NULL END)';
									break;
								case 'NBNGRP':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_groupe ELSE NULL END)';
									break;
								case 'DELGRP':
									return 'AVG(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.delai_groupage ELSE NULL END)';
									break;
								case 'NBNFAC':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_calcules ELSE NULL END)';
									break;
								case 'DELFAC':
									return 'AVG(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.delai_facture ELSE NULL END)';
									break;
								case 'NBNEXP':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'MTNEXP':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'MTNEXPHC':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE  AND type_sejour = '1'  THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTNEXPHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE  AND (type_sejour = '2' OR type_sejour = '5') THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTNEXPA':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE  AND type_sejour = '3' THEN v_factures_reference_1.montant_non_expedie[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'DELEXP':
									return 'AVG(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.delai_expedition ELSE NULL END)';
									break;
								case 'NBNSOL':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_solde[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'MTNSOL':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_solde[VIEW.CLIHON] ELSE 0 END)';
									break;
								case 'DELSOL':
									return 'AVG(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.delai_solde[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'NBNCLO':
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_non_cloture[VIEW.CLIHON] - v_factures_reference_1.nb_non_solde[VIEW.CLIHON] ELSE NULL END)';
									break;
								case 'NSEJ':
									return "COUNT(CASE WHEN COLUMNCHECKSEQUENCE THEN  v_factures_reference_1.no_sejour  ELSE NULL END)";
									break;
								case 'MFAC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'CAMFAC':
									return "base.cti_division(
																SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
																COUNT(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
								break;
								case 'CAMFAC':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFHC':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFHJ':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5'  THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFA':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;								
								case 'CAMFV':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFVHC':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;	
								case 'CAMFVHJ':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5'  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '2' OR type_sejour = '5'  THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'CAMFVA':
									return "base.cti_division(
											SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END),
											COUNT(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' THEN  v_factures_reference_1.no_sejour  ELSE NULL END)
											) ";
									break;
								case 'MFACHC':
									return "SUM( CASE WHEN  COLUMNCHECKSEQUENCE and type_sejour = '1' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MFACHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE and type_sejour = '2' OR type_sejour = '5' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MFACA':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE and type_sejour = '3' THEN  v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END  )";
									break;
								case 'MVFAC':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] + v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MCPTHC':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MCPTHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND (type_sejour = '2' OR type_sejour = '5') THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MCPTA':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3'  THEN  v_factures_reference_1.montant_comptabilise[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MNFHC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MNFHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND (type_sejour = '2' OR type_sejour = '5') THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END  )";
									break;					
								case 'MNFACA':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3'  THEN  v_factures_reference_1.montant_encours[VIEW.CLIHON] ELSE NULL END)";
									break;
								case 'MTEXP':
									return "SUM( CASE WHEN  COLUMNCHECKSEQUENCE AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPHC':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' AND  v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPHJ':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND (type_sejour = '2' OR type_sejour = '5') AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTEXPA':
									return "SUM( CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' AND v_factures_reference_1.nb_non_expedie[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								case 'MTSOL':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLHC':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '1' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLHJ':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND (type_sejour = '2' OR type_sejour = '5') AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;					
								case 'MTSOLA':
									return "SUM(CASE WHEN COLUMNCHECKSEQUENCE AND type_sejour = '3' AND  v_factures_reference_1.nb_non_solde[VIEW.CLIHON] <> 1  THEN v_factures_reference_1.montant_facture[VIEW.CLIHON] ELSE NULL END )";
									break;
								default:
									return 'SUM(CASE WHEN COLUMNCHECKSEQUENCE THEN v_factures_reference_1.nb_factures ELSE NULL END)';
								}
					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 dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		<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 de sortie" UI="combo" tree="true" width="200" default="2007-01-01" globalListProvider="DATE_DEBUT" >
			</FIELD>
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2007-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" globalListProvider="PERIODICITE_JOURNALIERE" visible="= SELECT.PERIODICITE == 'DAY' " />			
		</GROUP>
		<GROUP>
			<FIELD name="GROUPBY" label="Regroupement" UI="combo" default="SOR" width="200" tree="true">
				<OPTION label="ETATDOSSIERS_GROUPBY" data="" globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>
			<FIELD name="GROUPBY_TAB" 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>
			<FIELD name="GROUPBY_2" label="" UI="combo" default="-1" width="200" tree="true">
				<OPTION label="" data="-1"/>
				<OPTION label="ETATDOSSIERS_GROUPBY"  globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>
			<FIELD name="GROUPBY_3" label="" UI="combo" default="-1" width="200" tree="true">
				<OPTION label="" data="-1"/>
				<OPTION label="ETATDOSSIERS_GROUPBY"  globalListProvider="ETATDOSSIERS_GROUPBY"/>
			</FIELD>
		</GROUP>
		<GROUP>
			<FIELD name="DATA" label="Données" UI="combo" tree="true" width="260" default="NBFAC" default2="0">
				<OPTION label="ETATDOSSIERS_DATA" data="" globalListProvider="ETATDOSSIERS_DATA" />
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_ETAT_SEJOURS_SOUSSELECTIONS"/>
	<SELECTIONS componentName="FILTRES_ETATDOSSIERS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_SEJOURS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PATIENTS_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PASSAGES_SELECTIONS" />
	<QUERIES>
		<QUERY label="">
			
			<SQL optimizer="V_SEJOURS_X">
				<select><![CDATA[		

					CTISELECT_TREE
						OPTIONS{NOTZERO=1}
						LEVEL0_PROPERTIES{VIEWNAME=[VIEW.LEVEL0_VIEW]}
						LEVEL1_PROPERTIES{VIEWNAME=[VIEW.LEVEL1_VIEW]}
						LEVEL2_PROPERTIES{VIEWNAME=[VIEW.LEVEL2_VIEW]}
						LEVEL3_PROPERTIES{VIEWNAME=[VIEW.LEVEL3_VIEW]}
						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]{v_factures_reference_1.date_fin_facture,, '[PERIODE]' ,, '[TOPERIODE]' ,,[VIEW.COMBIEN_JOURS]}
						INDICATORS{[VIEW.TDATA],,}	
						INDICATORS_COLUMNS{[VIEW.CDATA] }
					FROM activite.[LEVELPROPERTY.VIEWNAME] v_factures_reference_1
						JOIN #V_SEJOURS_X#  ON (v_factures_reference_1.no_sejour = v_sejours_1.no_sejour)
					WHERE 
						[VIEW.DATE_GBY] BETWEEN '[PERIODE]' AND '[TOPERIODE]' 
						[VIEW.ETATDOSSIERS_SELECT] 
						[VIEW.SEJOURS_SELECT]
						[VIEW.PASSAGES_SELECT]
						[VIEW.PATIENTS_SELECT]
						
					

				]]></select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<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><![CDATA[
						SELECT 'X_PERIODE', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL  '3 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM activite.p_factures ))::text;
				]]></select>
				<FIELDS>
					<FIELD name="name"/>
					<FIELD name="value"/>
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="(&#8721;) Dernier Mois/Année " shortLabel="Mois/Année"   rowContext="false" buttonType="VIEWLINKPOPUP">
				<VIEWITEM label="Dernier mois" data="1" shortLabel="dernier mois"  view="ACTI000060.XML" enabled="true"  >
					<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,8)+'01';" />
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE;" />
					<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="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'DELFAC'" />
					<ARG name="TYPE_COMPARAISON" value="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernier mois" data="2" shortLabel="&#8721; dernier  mois"  view="ACTI000146.XML" enabled="true" rowContext="false" 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,8) + '01';" />
					<ARG name="TOPERIODE" value=" return SELECT.TOPERIODE" />
					<ARG name="GROUPBY" value="return 'JOURS'" />
					<ARG name="GROUPBY_2" value="return '-1'" />
					<ARG name="GROUPBY_3" value="return '-1'" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<ARG name="DATA3" value="'DELFAC'" />
					<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="'2'"/>
				</VIEWITEM>
				<VIEWITEM  label="Dernière année" data="2" shortLabel="derniere  année"  view="ACTI000060.XML" enabled="true" rowContext="false" 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="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<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="'2'" />
				</VIEWITEM>	
				<VIEWITEM label="&#8721; dernière Année" shortLabel="&#8721; derniere année"  view="ACTI000146.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="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MVFAC'" />
					<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="'2'" />
				</VIEWITEM>	
			</VIEWLINK>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif"  view="ACTI000060.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="GROUPBY" value="if (SELECT.GROUPBY == 'JOUR' ) {return 'JOURS'}
										   if (SELECT.GROUPBY == 'JOURF' ) {return 'JOURSF'}
										   if (SELECT.GROUPBY == 'MOIS' ) {return 'NUMEROMOIS'}
										   if (SELECT.GROUPBY == 'MOISF' ) {return 'NUMEROMOISF'}
				" />
				<ARG name="DATA1" value="'NSEJ'" />
				<ARG name="DATA2" value="'MVFAC'" />
				<ARG name="DATA3" value="'NSEJHC'" />					
				<ARG name="DATA4" value="'MVFHC'" />
				<ARG name="DATA5" value="'NSEJHJ'" />					
				<ARG name="DATA6" value="'MVFHJ'" />
				<ARG name="DATA7" value="'0'" />
				<ARG name="DATA8" value="'0'" />					
				<ARG name="DATA9" value="'0'" />
				<ARG name="DATA10" value="'0'" />					
				<ARG name="DATA011" value="'0'" />
				<ARG name="DATA012" value="'0'" />
				<ARG name="DATA013" value="'0'" />					
				<ARG name="DATA014" value="'0'" />
				<ARG name="DATA1015" value="'0'" />
				<ARG name="TYPE_COMPARAISON" value="'2'" />
				<ARG name="LGROUPBY" value="return SELECT.GROUPBY" />
				<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2" />
				<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3" />
			</VIEWLINK>
			<VIEWLINK label="Comparatif mensuel" shortLabel="Comp. Mensuel"  view="ACTI000161.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="GROUPBY" value="if (SELECT.GROUPBY == 'JOUR' ) {return 'JOURS'}
											   if (SELECT.GROUPBY == 'JOURF' ) {return 'JOURSF'}
											   if (SELECT.GROUPBY == 'MOIS' ) {return 'NUMEROMOIS'}
											   if (SELECT.GROUPBY == 'MOISF' ) {return 'NUMEROMOISF'}
					" />
					<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="'MVFAC'" />
					<ARG name="DATA3" value="'NSEJHC'" />					
					<ARG name="TYPE_COMPARAISON" value="'2'" />
			</VIEWLINK>		   
		    <VIEWLINK label="Effets" shortLabel="Effets"  view="ACTI000140.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
					<ARG name="ALIAS_PERIODE" value="return '-1';" />
                    <ARG name="PERIODE" value="return VIEW.COMP_PERIODE;" />
					<ARG name="GROUPBY" value="if (SELECT.GROUPBY == 'JOUR' ) {return 'JOURS'}
											   if (SELECT.GROUPBY == 'JOURF' ) {return 'JOURSF'}
											   if (SELECT.GROUPBY == 'MOIS' ) {return 'NUMEROMOIS'}
											   if (SELECT.GROUPBY == 'MOISF' ) {return 'NUMEROMOISF'}
					
					" />
					<ARG name="DATA01" value="'1.1'" />
                    <ARG name="TYPE_COMPARAISON" value="'2'" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY" />
					<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2" />
					<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3" />
			</VIEWLINK>
			<VIEWLINK label="Evolution comparative" shortLabel="Evol. comparative"   rowContext="false" buttonType="VIEWLINK_EVO_COMP" >			
				<VIEWITEM label="Standard" shortLabel="Evolution comparative" view="ACTI000162.XML" rowContext="false" enabled="true" buttonType="VIEWLINK_EVO_COMP">
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="GROUPBY" value="return SELECT.LGROUPBY;" />
					<ARG name="GROUPBY_2" value="return 'NUMEROMOIS';" />
					<ARG name="DATA1" value="'NSEJ'"/>
					<ARG name="DATA2" value="'MVFAC'"/>
					<ARG name="DATA3" value="'NSEJHC'"/>					
					<ARG name="DATA4" value="'MVFHC'"/>
					<ARG name="DATA5" value="'NSEJHJ'"/>					
					<ARG name="DATA6" value="'MVFHJ'"/>
					<ARG name="DATA7" value="'0'" />
					<ARG name="DATA8" value="'0'" />					
					<ARG name="DATA9" value="'0'" />
					<ARG name="DATA10" value="'0'" />					
					<ARG name="DATA011" value="'0'" />
					<ARG name="DATA012" value="'0'" />
					<ARG name="DATA013" value="'0'" />					
					<ARG name="DATA014" value="'0'" />
					<ARG name="DATA1015" value="'0'" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<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="ACTI000162.XML" rowContext="false" enabled="true" buttonType="COMPARATIF">
					<ARG name="QUELLEDATE" value="return SELECT.QUELLEDATE;" /> 
					<ARG name="PERIODE" value="return SELECT.TOPERIODE.substr(0,4)+'-01-01';" />
					<ARG name="GROUPBY" value="return SELECT.LGROUPBY;" />
					<ARG name="GROUPBY_2" value="return 'NUMEROMOIS';" />
					<ARG name="DATA1" value="'NSEJ'" />
					<ARG name="DATA2" value="'MFAC'" />
					<ARG name="DATA3" value="'DELGRP'" />					
					<ARG name="DATA4" value="'DELFAC'" />
					<ARG name="DATA5" value="'MVFAC'" />						
					<ARG name="DATA6" value="'CAMFV'" />
					<ARG name="DATA7" value="'MNFAC'" />
					<ARG name="DATA8" value="'NSEJHC'" />					
					<ARG name="DATA9" value="'MVFHC'" />
					<ARG name="DATA10" value="'CAMFVHC'" />					
					<ARG name="DATA011" value="'NSEJHJ'" />
					<ARG name="DATA012" value="'MVFHJ'" />
					<ARG name="DATA013" value="'CAMFVHJ'" />					
					<ARG name="DATA014" value="'NBNSOL'" />
					<ARG name="DATA1015" value="'MTNSOL'" />
					<ARG name="LGROUPBY" value="return SELECT.GROUPBY;" />
					<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="ACTI000059.XML" rowContext="false" enabled="true" buttonType="EVOLUTION" componentName="PERIODICITE_VIEWLINK">
				<ARG name="DATA" value="return SELECT.DATA1"/>
				<ARG name="LGROUPBY" value="return SELECT.GROUPBY" />
				<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2" />
				<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3" />
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ACTI000137.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE">
				<ARG name="ALIAS_PERIODE" value="return '-1'"/>
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;"/>
				<ARG name="DATA" value="return SELECT.DATA1"/>
				<ARG name="COLUMNBY" value="'NUMEROMOIS'"/>
				<ARG name="GROUPBY" value="'ANNEE'" />
				<ARG name="GROUPBY_2" value="if (SELECT.GROUPBY != 'ANNEE' ) {return SELECT.GROUPBY } "/>
				<ARG name="GROUPBY_TAB" value="'TAB'"/>
				<ARG name="COLUMNBYCOUNT" value="'12'"/>
				<ARG name="LGROUPBY" value="return SELECT.GROUPBY" />
				<ARG name="LGROUPBY_2" value="return SELECT.GROUPBY_2" />
				<ARG name="LGROUPBY_3" value="return SELECT.GROUPBY_3" />
			</VIEWLINK>	
			<VIEWLINK label="Analyse" shortLabel="Analyse" view="ACTI000057.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="return SELECT.GROUPBY_2;"/>
				<ARG name="GROUPBY_3" value="return SELECT.GROUPBY_3;"/>
				<ARG name="GROUPBY_TAB" value="'TAB'" />
			</VIEWLINK>	
			<VIEWLINK label="Liste séjours" shortLabel="Séjours" view="ACTI000058.XML" componentName="ETA_DOS_BASE_VIEWLINK" component2Name="STANDARD_BASE_VIEWLINK" >
				<ARG name="ALIAS_PERIODE" value="return '-1'" />
				<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.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="TIERS" value="if (ROW != null &amp; SELECT.GROUPBY == 'TPY') {return 'TP' + ROW.OID}
												if (ROW != null &amp; SELECT.GROUPBY == 'TTP') {return 'TT' + ROW.OID}
												if (ROW != null &amp; SELECT.GROUPBY == 'TRG') {return 'RG' + ROW.OID}
												return '-1' "/>
				<ARG name="QGROUPE" value="if (SELECT.DATA == 'NBNGRP') {return '1'}
										if (SELECT.DATA == 'DELGRP') {return '2'}
										return '-1'"/>
				<ARG name="QFACTURE" value="if (SELECT.DATA == 'NBNFAC') {return '1'}
										if (SELECT.DATA == 'DELFAC') {return '2'}
										return '-1'"/>
				<ARG name="QEXPEDIE" value="if (SELECT.DATA == 'NBNEXP') {return '1'}
										if (SELECT.DATA == 'MTNEXP') {return '1'}
										if (SELECT.DATA == 'DELEXP') {return '2'}
										return '-1'"/>
				<ARG name="QSOLDE" value="if (SELECT.DATA == 'NBNSOL') {return '1'}
										if (SELECT.DATA == 'MTNSOL') {return '1'}
										if (SELECT.DATA == 'DELSOL') {return '2'}
										return '-1'"/>
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET excelLabel="Répartition mensuelle" label="Répartition mensuelle" multiTab="true">
			<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 != 'JOURS'  &amp;&amp; SELECT.GROUPBY != 'NUMEROTRIM' &amp;&amp; SELECT.GROUPBY != 'NUMEROMOIS'">
				<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 title="Comparatif (10 premiers)" type="pieChart" maxItems="10" maxItemsSortOn="N" maxItemsSortSeq="D" sortField="TXT" sortSeq="A">
				<CATEGORY field="TXT" type="Char"/>
				<SERIE field="N" displayName="SELECT.DATA_LABEL" displayNameCalc="true"/>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="36" variableRowHeight="true" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'">
				<INSERT name="DATAGRID_MULTITAB_STYLES"/>
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
				</COLUMN>
				<COLUMN dataField="COD" width="60" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="150" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="*ROW">
				</COLUMN>
				<COLUMN dataField="N" width="80" visible="true" type="Number" outputFormat="= SELECT.DATA2" headerText="Total" textAlign="right" totalFunction="sum" otherFunction="sum">
				</COLUMN>
				<COLUMN dataField="N_P" type="Number" headerText="% / Total" width="40" 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>
				<COLUMN dataField="N1" width="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>
				<COLUMN dataField="N2" width="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>
				<COLUMN dataField="N3" width="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>
				<COLUMN dataField="N4" width="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>
				<COLUMN dataField="N5" width="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>
				<COLUMN dataField="N6" width="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>
				<COLUMN dataField="N7" width="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>
				<COLUMN dataField="N8" width="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>
				<COLUMN dataField="N9" width="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>
				<COLUMN dataField="N10" width="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>
				<COLUMN dataField="N11" width="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>
				<COLUMN dataField="N12" width="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>
				<COLUMN dataField="N13" width="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>
				<COLUMN dataField="N14" width="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>
				<COLUMN dataField="N15" width="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>
				<COLUMN dataField="N16" width="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>
				<COLUMN dataField="N17" width="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>
				<COLUMN dataField="N18" width="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>
				<COLUMN dataField="N19" width="70" visibleCondition="VIEW.COLH19 != null" type="Number" outputFormat="= SELECT.DATA2" selectable="true"  fixed="false" headerText="VIEW.COLH19" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N20" width="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>
				<COLUMN dataField="N21" width="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>
				<COLUMN dataField="N22" width="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>
				<COLUMN dataField="N23" width="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>
				<COLUMN dataField="N24" width="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>
				<COLUMN dataField="N25" width="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>				
				<COLUMN dataField="N26" width="70" visibleCondition="VIEW.COLH26 != null" type="Number" selectable="true" outputFormat="= SELECT.DATA2" fixed="false" headerText="VIEW.COLH26" headerTextCalc="true" textAlign="right" otherFunction="sum" totalFunction="sum">
				</COLUMN>
				<COLUMN dataField="N27" width="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>
				<COLUMN dataField="N28" width="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>
				<COLUMN dataField="N29" width="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>
				<COLUMN dataField="N30" width="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>
				<COLUMN dataField="N31" width="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">
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
