<?xml version="1.0" encoding="ISO-8859-15"?>
<VUE name="ECO000075" label="ECO. LPP" title="= 'LPP par ' +  SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ') '" database="iCTI" swf="*CTI_view1" softCode="iCTI_eco" globals="ECO_globals.XML" componentsFile="ECO_components.XML" dboptimizer="ECO_dboptimizer.XML" helpDokuWIkiDir="eco:consommations:lpp" helpDokuWIkiFile="eco000075" helpFile="iCTI_ECO_ECO00075.HTML">
	<VIEWPROPERTIES componentName="PROPERTIES_MOUVEMENTS"/>
	<VIEWPROPERTIES componentName="PROPERTIES_GROUPBY"/>
	<VIEWPROPERTIES componentName="PROPERTIES_DATA"/>
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value" />
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse">
		<FIELD name="ITEM_BASE" label="" UI="combo" tree="false" width="200" default="article" visible="false"/>
		<GROUP label="Période">
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="180" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
			<FIELD name="PERIODE" label="" UI="combo" tree="true" width="200" default="2010-01-01" globalListProvider="PERIODE_DEBUT">
			</FIELD>
			<FIELD name="TOPERIODE" label="au" UI="combo" tree="true" width="200" default="2010-01-31" globalListProvider="PERIODE_FIN">
			</FIELD>
		</GROUP>
		<GROUP label="Regroupement">
			<FIELD name="GROUPBY" label="" width="200" UI="combo" default="-1" tree="true">
				<OPTION label="Site" data="SIT" treeLevel="1" globalListProvider="SITE_GROUPBY"/>
				<OPTION label="Article" data="ART" treeLevel="1" globalListProvider="ARTICLE_GROUPBY"/>
				<OPTION label="Compte" data="CPA" treeLevel="1" globalListProvider="COMPTE_ARTICLE_GROUPBY"/>
				<OPTION label="Fournisseur" data="FOU" treeLevel="1" globalListProvider="FOURNISSEUR_GROUPBY"/>
				<OPTION label="Gestionnaire" data="GES" treeLevel="1" globalListProvider="GESTIONNAIRE_GROUPBY"/>
				<OPTION label="Lieu" data="LIE" treeLevel="1" globalListProvider="LIEU_GROUPBY"/>
				<OPTION label="Pole" data="POL" treeLevel="1" globalListProvider="POLE_GROUPBY"/>
				<OPTION label="Unité fonctionnelle" data="UFO" treeLevel="1" globalListProvider="UNITE_FONCTIONNELLE_GROUPBY"/>
				<OPTION label="Type de mouvement" data="TYM" treeLevel="1" globalListProvider="TYPE_MOUVEMENT_GROUPBY"/>
				<OPTION label="Année-Mois mouvement" globalListProvider="DATE_GROUPBY" treeLevel="1" />
				<OPTION label="Source de données" data="PVD" treeLevel="1" globalListProvider="PROVIDER_GROUPBY"/>
				<OPTION label="Séjours" data="SEJ" treeLevel="1"/>
				<OPTION label="Séjours" data="RSS" treeLevel="2"/>
				<OPTION label="RSS" data="RSS" treeLevel="2"/>
				<OPTION label="Médecins" data="MED" treeLevel="1"/>
				<OPTION label="Spécialités médecins" data="SPE" treeLevel="2"/>
			</FIELD>
			<FIELD name="GROUPBY_TAB" width="100" label="Présentation" UI="combo" default="AUTO" visible="= SELECT.GROUPBY_2 != '-1' " update="= if(SELECT.GROUPBY != '-1') {return 'no_update'} else {return 'AUTO'}">
				<OPTION label="Automatique" data="AUTO"/>
				<OPTION label="Arbre" data="TREE"/>
				<OPTION label="Onglet" data="TAB"/>
			</FIELD>

		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY_2" label="" width="200" UI="combo" default="-1" tree="true">
				<OPTION label="Pas de second niveau" data="-1"/>
				<OPTION label="Site" data="SIT" treeLevel="1" globalListProvider="SITE_GROUPBY"/>
				<OPTION label="Article" data="ART" treeLevel="1" globalListProvider="ARTICLE_GROUPBY"/>
				<OPTION label="Compte" data="CPA" treeLevel="1" globalListProvider="COMPTE_ARTICLE_GROUPBY"/>
				<OPTION label="Fournisseur" data="FOU" treeLevel="1" globalListProvider="FOURNISSEUR_GROUPBY"/>
				<OPTION label="Gestionnaire" data="GES" treeLevel="1" globalListProvider="GESTIONNAIRE_GROUPBY"/>
				<OPTION label="Lieu" data="LIE" treeLevel="1" globalListProvider="LIEU_GROUPBY"/>
				<OPTION label="Pole" data="POL" treeLevel="1" globalListProvider="POLE_GROUPBY"/>
				<OPTION label="Unité fonctionnelle" data="UFO" treeLevel="1" globalListProvider="UNITE_FONCTIONNELLE_GROUPBY"/>
				<OPTION label="Type de mouvement" data="TYM" treeLevel="1" globalListProvider="TYPE_MOUVEMENT_GROUPBY"/>
				<OPTION label="Année-Mois mouvement" globalListProvider="DATE_GROUPBY" treeLevel="1" />
				<OPTION label="Source de données" data="PVD" treeLevel="1" globalListProvider="PROVIDER_GROUPBY"/>
				<OPTION label="Séjours" data="SEJ" treeLevel="1"/>
				<OPTION label="Séjours" data="RSS" treeLevel="2"/>
				<OPTION label="RSS" data="RSS" treeLevel="2"/>
				<OPTION label="Médecins" data="MED" treeLevel="1"/>
				<OPTION label="Spécialités médecins" data="SPE" treeLevel="2"/>
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY_3" label="" width="200" UI="combo" default="-1" tree="true">
				<OPTION label="Pas de troisième niveau" data="-1"/>
				<OPTION label="Site" data="SIT" treeLevel="1" globalListProvider="SITE_GROUPBY"/>
				<OPTION label="Article" data="ART" treeLevel="1" globalListProvider="ARTICLE_GROUPBY"/>
				<OPTION label="Compte" data="CPA" treeLevel="1" globalListProvider="COMPTE_ARTICLE_GROUPBY"/>
				<OPTION label="Fournisseur" data="FOU" treeLevel="1" globalListProvider="FOURNISSEUR_GROUPBY"/>
				<OPTION label="Gestionnaire" data="GES" treeLevel="1" globalListProvider="GESTIONNAIRE_GROUPBY"/>
				<OPTION label="Lieu" data="LIE" treeLevel="1" globalListProvider="LIEU_GROUPBY"/>
				<OPTION label="Pole" data="POL" treeLevel="1" globalListProvider="POLE_GROUPBY"/>
				<OPTION label="Unité fonctionnelle" data="UFO" treeLevel="1" globalListProvider="UNITE_FONCTIONNELLE_GROUPBY"/>
				<OPTION label="Type de mouvement" data="TYM" treeLevel="1" globalListProvider="TYPE_MOUVEMENT_GROUPBY"/>
				<OPTION label="Année-Mois mouvement" globalListProvider="DATE_GROUPBY" treeLevel="1" />
				<OPTION label="Source de données" data="PVD" treeLevel="1" globalListProvider="PROVIDER_GROUPBY"/>
				<OPTION label="Séjours" data="SEJ" treeLevel="1"/>
				<OPTION label="Séjours" data="RSS" treeLevel="2"/>
				<OPTION label="RSS" data="RSS" treeLevel="2"/>
				<OPTION label="Médecins" data="MED" treeLevel="1"/>
				<OPTION label="Spécialités médecins" data="SPE" treeLevel="2"/>
			</FIELD>
		</GROUP>
		<GROUP label = "Filtres LPP">
			<OPTION label="Type de LPP" data="-1" globalListProvider="LPP_TYPE"/>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_MOUVEMENT_SIGNIFICATIF"/>
	<SELECTIONS componentName="FILTRES_ARTICLE_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_FOURNISSEUR_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_MOUVEMENT_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PROVIDER_SELECTIONS"/>
	<SELECTIONS componentName="FILTRES_PROVIDER_SELECTIONS"/>
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_MOUVEMENTS_ARTICLES_X" optimizer2="V_ALL_X">
				<select><![CDATA[		
					
					DROP TABLE IF EXISTS ECO000075;
					CREATE TEMP TABLE ECO000075 AS 
					SELECT
						[VIEW.GROUPBY_OID_FIELD] AS oid1,
						[VIEW.GROUPBY_COD_FIELD] AS cod1,
						[VIEW.GROUPBY_TXT_FIELD] AS txt1,
						[VIEW.GROUPBY_2_OID_FIELD] AS oid2,
						[VIEW.GROUPBY_2_COD_FIELD] AS cod2,
						[VIEW.GROUPBY_2_TXT_FIELD] AS txt2,
						[VIEW.GROUPBY_3_OID_FIELD] AS oid3,
						[VIEW.GROUPBY_3_COD_FIELD] AS cod3,
						[VIEW.GROUPBY_3_TXT_FIELD] AS txt3,
						rss_id,
						rss_code,
						rss_texte,
						sejour_id,
						sejour_code,
						sejour_texte,
						lpp_id,
						lpp_code,
						lpp_texte,
						CASE WHEN lpp_sus_id IS NOT NULL THEN 'SUS' ELSE 'INC' END AS type_lpp_code,
						SUM(sortie_quantite-entree_quantite) AS sortie_quantite,
						SUM(sortie_montant-entree_montant) AS sortie_montant,
						AVG(prix_unitaire) As prix_unitaire,
						MAX(lpp_code || ' ' || article_code || ' ' || article_texte)::text AS lpp_article_texte,
						MAX(montant_ligne_facture) AS montant_ligne_facture,
						MAX(quantite_ligne_facture) AS quantite_ligne_facture,
						MAX(ca_ghs) AS ca_ghs,
						MAX(encours) AS encours,
						array_to_string(array_agg(DISTINCT type_mouvement_code),',') AS type_mouvement_code,
						array_to_string(array_agg(DISTINCT lieu_code),',') AS lieu_code,
						array_to_string(array_agg(DISTINCT unite_fonctionnelle_code),',') AS UF_CODE,
						array_to_string(array_agg(DISTINCT gestionnaire_code),',') as gestionnaire_code,
						array_to_string(array_agg(DISTINCT CASE WHEN unite_stockage_article_id <> 0 AND unite_stockage_article_code <> 'UN' THEN unite_stockage_article_texte ELSE '' END),',') as unite_stockage_article_texte
					FROM #V_MOUVEMENTS_ARTICLES_X##V_ALL_X#
					WHERE (date BETWEEN '[PERIODE]' AND '[TOPERIODE]')
						AND (lpp_id != 0 OR type_article_cti_code = ANY(ARRAY['DM','DMI']))
						AND type_mouvement_id IN (SELECT to_id from eco.t_classes JOIN eco.t_classes_sections ON t_classes.oid = classe_id
							JOIN eco.t_classes_sections_elements ON section_id = t_classes_sections.oid
							WHERE t_classes.code = 'CTI_TYPMVT' AND t_classes_sections.code = '01')
						AND sejour_code IS NOT NULL
						AND sejour_code <> ''
						[VIEW.ARTICLE_SELECT]
						[VIEW.FOURNISSEUR_SELECT]
						[VIEW.MOUVEMENT_SELECT]
						[VIEW.PROVIDER_SELECT]
					GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
					;
							
				]]>				</select>
			</SQL>
		</QUERY>
		<QUERY label="sus">
			<SQL optimizer="V_MOUVEMENTS_ARTICLES_X" optimizer2="V_ALL_X">
				<select><![CDATA[
					CTISELECT_TREE
						GROUPBY1{oid1,, cod1,, txt1}
						GROUPBY1MODE{[GROUPBY_TAB]}
						[EVAL   
						$ret = '';
                        if ('[GROUPBY_2]' == '-1') {
                            $ret = "GROUPBY2{,,,,}";
                        } else {
                            $ret = "GROUPBY2{oid2,, cod2,, txt2}";
                        }
						if ('[GROUPBY_3]' == '-1') {
                            $ret .= "GROUPBY3{,,,,}";
                        } else {
                            $ret .= "GROUPBY3{oid3,, cod3,, txt3}";
                        }
						return $ret;
                        EVAL]
					INDICATORS{
						count(DISTINCT sejour_texte),
						count(DISTINCT sejour_code),
						sum(sortie_quantite),
						sum(sortie_montant),
						sum(CASE WHEN quantite_ligne_facture != 0 THEN quantite_ligne_facture ELSE 0 END),
						sum(montant_ligne_facture),
						sum(sortie_quantite) - sum(CASE WHEN quantite_ligne_facture != 0 THEN quantite_ligne_facture ELSE 0 END),
						sum(sortie_montant) - sum(montant_ligne_facture),
						}
					FROM ECO000075
						[VIEW.MOUVEMENT_FACTURE_SELECT]
					WHERE 
						quantite_ligne_facture != 0
				]]>				</select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="NPAT" />
					<FIELD name="NSEJ" />
					<FIELD name="NC" />
					<FIELD name="MC" />
					<FIELD name="NF" />
					<FIELD name="MF" />
					<FIELD name="NE" />
					<FIELD name="ME" />
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="inclus">
			<SQL optimizer="V_MOUVEMENTS_ARTICLES_X" optimizer2="V_ALL_X">
				<select><![CDATA[				
					CTISELECT_TREE
						GROUPBY1{oid1,, cod1,, txt1}
						GROUPBY1MODE{[GROUPBY_TAB]}
						[EVAL   
						$ret = '';
                        if ('[GROUPBY_2]' == '-1') {
                            $ret = "GROUPBY2{,,,,}";
                        } else {
                            $ret = "GROUPBY2{oid2,, cod2,, txt2}";
                        }
						if ('[GROUPBY_3]' == '-1') {
                            $ret .= "GROUPBY3{,,,,}";
                        } else {
                            $ret .= "GROUPBY3{oid3,, cod3,, txt3}";
                        }
						return $ret;
                        EVAL]
					INDICATORS{
						count(DISTINCT sejour_texte),
						count(DISTINCT sejour_code),
						sum(sortie_quantite),
						sum(sortie_montant),
						sum(ca_ghs),
						base.cti_division(sum(100*sortie_montant),sum(ca_ghs))
						}
					FROM ECO000075
					WHERE 
						quantite_ligne_facture = 0
						AND encours = 0
						[VIEW.MOUVEMENT_FACTURE_SELECT]
					;
				]]>				</select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="NPAT" />
					<FIELD name="NSEJ" />
					<FIELD name="NC" />
					<FIELD name="MC" />
					<FIELD name="MGHS" />
					<FIELD name="PGHS" />
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY label="en attente de facturation">
			<SQL optimizer="V_MOUVEMENTS_ARTICLES_X" optimizer2="V_ALL_X">
				<select><![CDATA[				
					CTISELECT_TREE
						GROUPBY1{oid1,, cod1,, txt1}
						GROUPBY1MODE{[GROUPBY_TAB]}
						[EVAL   
						$ret = '';
                        if ('[GROUPBY_2]' == '-1') {
                            $ret = "GROUPBY2{,,,,}";
                        } else {
                            $ret = "GROUPBY2{oid2,, cod2,, txt2}";
                        }
						if ('[GROUPBY_3]' == '-1') {
                            $ret .= "GROUPBY3{,,,,}";
                        } else {
                            $ret .= "GROUPBY3{oid3,, cod3,, txt3}";
                        }
						return $ret;
                        EVAL]
					INDICATORS{
						count(DISTINCT sejour_texte),
						count(DISTINCT sejour_code),
						sum(sortie_quantite),
						sum(sortie_montant),
						sum(ca_ghs),
						base.cti_division(sum(100*sortie_montant),sum(ca_ghs))
						}
					FROM ECO000075
					WHERE
						montant_ligne_facture = 0
						AND encours = 1
						[VIEW.MOUVEMENT_FACTURE_SELECT]
					;
				]]>				</select>
				<FIELDS>
					<INSERT name="CTISELECT_TREE_FIELDS"/>
					<FIELD name="NPAT" />
					<FIELD name="NSEJ" />
					<FIELD name="NC" />
					<FIELD name="MC" />
					<FIELD name="MGHS" />
					<FIELD name="PGHS" />
				</FIELDS>
			</SQL>
		</QUERY>
		<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
			<SQL>
				<select><![CDATA[
						SELECT 'X_PERIODE_D', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL  '1 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
					UNION ALL
						SELECT 'X_TOPERIODE_D', greatest(to_date(to_char('[TOPERIODE]'::date - INTERVAL  '1 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
					UNION ALL
						SELECT 'X_PERIODE', greatest(to_date(to_char('[PERIODE]'::date - INTERVAL  '3 year', 'YYYY-MM-DD'), 'YYYY-MM-DD'), (SELECT min(date_debut) FROM pmsi.p_imports))::text
					
				]]>				</select>
				<FIELDS>
					<FIELD name="name" />
					<FIELD name="value" />
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Comparatif" shortLabel="Comparatif" view="ECO000072.XML" enabled="true" rowContext="false" buttonType="COMPARATIF">
				<ARG name="PERIODE_D" value="return VIEW.X_PERIODE_D;" />
				<ARG name="TOPERIODE_D" value="return VIEW.X_TOPERIODE_D;" />
			</VIEWLINK>
			<VIEWLINK label="Evolution" shortLabel="Evolution" view="ECO000073.XML" enabled="true" rowContext="false" componentName="PERIODICITE_VIEWLINK" buttonType="EVOLUTION">
				<ARG name="DATA" value="'2'" />
			</VIEWLINK>
			<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="ECO000074.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE">
				<ARG name="ALIAS_PERIODE" value="'-1'" />
				<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
				<ARG name="DATA" value="'2'" />
				<ARG name="COLUMNBY" value="'MSOR'" />
				<ARG name="GROUPBY" value="'ASOR'" />
				<ARG name="GROUPBY_2" value="if (SELECT.GROUPBY == 'ASOR') {return 'GHM';} else {return SELECT.GROUPBY;}" />
				<ARG name="GROUPBY_TAB" value="'TAB'" />
				<ARG name="COLUMNBYCOUNT" value="'12'" />
			</VIEWLINK>
			<VIEWLINK label="Liste des LPP" shortLabel="Liste LPP" view="ECO000076.XML" componentName="ECO_VIEWLINK" component2Name="" component3Name="">
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['GROUPBY'] = 'SEJ'
						LINKVARIABLES['GROUPBY_2'] = 'RSS'
						LINKVARIABLES['GROUPBY_3'] = 'LPP'
						LINKVARIABLES['TYPE_LPP'] = TABNAME
						
						return 'OK';
					]]>					</value>
				</ARGS>
			</VIEWLINK>
			<VIEWLINK label="Détail article" shortLabel="Détail article" view="ECO000069.XML" componentName="ECO_VIEWLINK" component2Name="DATE_EVOL_VIEWLINK">
				<ARGS name="SPEC">
					<value><![CDATA[
						LINKVARIABLES['GROUPBY'] = 'AMCMD'
						LINKVARIABLES['GROUPBY_2'] = 'AMMVT'
						LINKVARIABLES['GROUPBY_3'] = 'AMSTO'
						LINKVARIABLES['TAB'] = 'AUTO'
						return 'OK';
					]]>					</value>
				</ARGS>
			</VIEWLINK>
		</VIEWLINKS>
		<ONGLET name="FSUS" excelLabel="LPP en sus (facturés ou valorisés)" label="LPP en sus" multiTab="true" queryNumber="1">
			<CHART title="" type="group" subType="" percentWidth="100">
				<CHART title="Répartition Montants consommés" type="pieChart" maxItems="10" maxItemsSortOn="MC" maxItemsSortSeq="D" sortField="MC" sortSeq="D" condition="ROW.LVL == '1'" percentHeight="80">
					<CATEGORY field="COD" type="Char" />
					<SERIE field="MC" displayName="Montant consommé"/>
				</CHART>
				<CHART title="Comparatif consommation et facturation" type="columnChart" subType="" maxItems="10" maxItemsSortOn="MF" maxItemsSortSeq="D" sortField="MF" sortSeq="D" condition="ROW.LVL == '1'">
					<CATEGORY field="COD" type="Char" />
					<SERIE field="MC" displayName="Montant consommé" />
					<SERIE field="MF" displayName="Montant facturé" />
				</CHART>
			</CHART>
			<DATAGRID title="" total="true" headerHeight="40" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" variableRowHeight="true" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<ROWSTYLE name="rowHeight" value="20" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="backgroundColor" value="0xFFD393" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderSides" value="top bottom" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderStyle" value="solid" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderThickness" value="2" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" />
				<COLUMN dataField="TABD" width="60" type="Number" visible="false" headerText="Oid" />
				<COLUMN dataField="OID1" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD1" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID2" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD2" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID3" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD3" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID" type="Number" visible="false" />
				<COLUMN dataField="COD" type="Char" width="100" outputFormat="#" headerText="Code" textAlign="left" totalComplement="*ROW">
					<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="110" headerText="Texte" textAlign="left" totalComplement="*ROW"/>

				<COLUMN dataField="NPAT" width="80" type="Number" outputFormat="#" headerText="Patients" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de patients différents" />
				<COLUMN dataField="NSEJ" width="80" type="Number" outputFormat="#" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours différents" />
				<COLUMN dataField="NC" width="80" type="Number" outputFormat="#" headerText="LPP cons." textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre d'lpp consommés" />
				<COLUMN dataField="NF" width="80" type="Number" outputFormat="#" headerText="LPP fact." textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre d'lpp facturés" />
				<COLUMN dataField="MC" width="80" type="Number" outputFormat="#E" headerText="Montant Consommé" textAlign="right" totalFunction="sum" otherFunction="sum" description="Somme des montants consommés" />
				<COLUMN dataField="MF" width="80" type="Number" outputFormat="#E" headerText="Montant facturé" textAlign="right" totalFunction="sum" otherFunction="sum" description="Somme des montants facturés" />
				<COLUMN dataField="NE" width="80" type="Number" outputFormat="#" headerText="Qté Ecart" textAlign="right" totalFunction="sum" otherFunction="sum" description="Ecart quantité consommée/facturée" />
				<COLUMN dataField="ME" width="80" type="Number" outputFormat="#E" headerText="Montant Ecart" textAlign="right" totalFunction="sum" otherFunction="sum" description="Ecart montant consommés/facturés" />

			</DATAGRID>
		</ONGLET>
		<ONGLET name="FINC" excelLabel="LPP inclus dans GHS facturé" label="LPP inclus dans GHS facturé" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL" queryNumber="2">
			<CHART title="" type="group" subType="" percentWidth="100">
				<CHART title="Répartition Montants consommés" type="pieChart" maxItems="10" maxItemsSortOn="MC" maxItemsSortSeq="D" sortField="MC" sortSeq="D" condition="ROW.LVL == '1'" percentHeight="80">
					<CATEGORY field="COD" type="Char" />
					<SERIE field="MC" displayName="Montant consommé" displayNameCalc="true"/>
				</CHART>
				<CHART title="Pourcentage du GHS" type="columnChart" subType="" maxItems="10" maxItemsSortOn="PGHS" maxItemsSortSeq="D" sortField="PGHS" sortSeq="D" condition="ROW.LVL == '1'">
					<CATEGORY field="COD" type="Char" />
					<SERIE field="PGHS" displayName="" />
				</CHART>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="48" variableRowHeight="true" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<ROWSTYLE name="rowHeight" value="20" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="backgroundColor" value="0xFFD393" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderSides" value="top bottom" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderStyle" value="solid" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderThickness" value="2" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" />
				<COLUMN dataField="TABD" width="60" type="Number" visible="false" headerText="Oid" />
				<COLUMN dataField="OID1" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD1" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID2" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD2" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID3" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD3" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD" width="80" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
					<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" maxWidth="300" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="CODTXT" type="Char" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.COD + ' ' + ROW.TXT.toString().substr(0,20)" />
				</COLUMN>
				<COLUMN dataField="NPAT" width="80" type="Number" outputFormat="#" headerText="Patients" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de patients différents" />
				<COLUMN dataField="NSEJ" width="80" type="Number" outputFormat="#" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours différents" />
				<COLUMN dataField="NC" width="80" type="Number" outputFormat="#" headerText="LPP cons." textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre d'lpp consommés" />
				<COLUMN dataField="MC" width="80" type="Number" outputFormat="#E" headerText="Montant Consommé" textAlign="right" totalFunction="sum" otherFunction="sum" description="Somme des montants consommés" />
				<COLUMN dataField="MGHS" width="80" type="Number" outputFormat="#E" headerText="CA GHS" textAlign="right" totalFunction="sum" otherFunction="sum" description="Somme des montants GHS facturés" />
				<COLUMN dataField="PGHS" width="80" type="Number" outputFormat="#%" headerText="% GHS" textAlign="right" totalFunction="sum" otherFunction="sum" description="montant consommés par rapport au CA GHS" />

			</DATAGRID>
		</ONGLET>
		<ONGLET name="VINC" excelLabel="LPP inclus dans GHS valorisé" label="LPP inclus dans GHS valorisé" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL" queryNumber="3">
			<CHART title="" type="group" subType="" percentWidth="100">
				<CHART title="Répartition Montants consommés" type="pieChart" maxItems="10" maxItemsSortOn="MC" maxItemsSortSeq="D" sortField="MC" sortSeq="D" condition="ROW.LVL == '1'" percentHeight="80">
					<CATEGORY field="COD" type="Char" />
					<SERIE field="MC" displayName="Montant consommé" displayNameCalc="true"/>
				</CHART>
				<CHART title="Pourcentage du GHS" type="columnChart" subType="" maxItems="10" maxItemsSortOn="PGHS" maxItemsSortSeq="D" sortField="PGHS" sortSeq="D" condition="ROW.LVL == '1'">
					<CATEGORY field="COD" type="Char" />
					<SERIE field="PGHS" displayName="" />
				</CHART>
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="48" variableRowHeight="true" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
				<ROWSTYLE name="rowHeight" value="20" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="backgroundColor" value="0xFFD393" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderSides" value="top bottom" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderStyle" value="solid" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<ROWSTYLE name="borderThickness" value="2" condition="ROW.LVL == '1' &amp;&amp; SELECT.GROUPBY_2 != '-1' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" />
				<COLUMN dataField="TABD" width="60" type="Number" visible="false" headerText="Oid" />
				<COLUMN dataField="OID1" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD1" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID2" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD2" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID3" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD3" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD" width="80" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
					<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" maxWidth="300" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="CODTXT" type="Char" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.COD + ' ' + ROW.TXT.toString().substr(0,20)" />
				</COLUMN>
				<COLUMN dataField="NPAT" width="80" type="Number" outputFormat="#" headerText="Patients" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de patients différents" />
				<COLUMN dataField="NSEJ" width="80" type="Number" outputFormat="#" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre de séjours différents" />
				<COLUMN dataField="NC" width="80" type="Number" outputFormat="#" headerText="LPP cons." textAlign="right" totalFunction="sum" otherFunction="sum" description="Nombre d'lpp consommés" />
				<COLUMN dataField="MC" width="80" type="Number" outputFormat="#E" headerText="Montant Consommé" textAlign="right" totalFunction="sum" otherFunction="sum" description="Somme des montants consommés" />
				<COLUMN dataField="MGHS" width="80" type="Number" outputFormat="#E" headerText="CA GHS" textAlign="right" totalFunction="sum" otherFunction="sum" description="Somme des montants GHS facturés" />
				<COLUMN dataField="PGHS" width="80" type="Number" outputFormat="#%" headerText="% GHS" textAlign="right" totalFunction="sum" otherFunction="sum" description="montant consommés par rapport au CA GHS" />

			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
