<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="PMSI000152" label="PMSI. Comparaison Prestations" title="= 'Comparaison Prestations (' + SELECT.DATA_LABEL + ') par ' +  SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ' vs ' + SELECT.PERIODE_D_LABEL + ' à ' + SELECT.TOPERIODE_D_LABEL + ') - ' + SELECT.VERSION_GROUPAGE_LABEL" database="iCTI" swf="*CTI_view1" softCode="iCTI_pmsi" globals="PMSI_globals.XML" typeEts="23" componentsFile="PMSI_components.XML" helpDokuWIkiDir="" helpDokuWIkiFile=""  helpFile="">
	<VIEWPROPERTIES componentName="PROPERTIES_PRESTATIONS" />
	<VIEWPROPERTIES componentName="PROPERTIES_SELECT_TABTREE" />
	<VIEWPROPERTIES>
		<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value" />
		<PROPERTY name="MONTANT_FIELD" value="[EVAL 
						if ('[DATA]' == 'BRHT') {return 'base_remboursement_sauf_transition';}
						return 'base_remboursement'; 
			EVAL]" />
	</VIEWPROPERTIES>
	<SELECTIONS label="Paramètres de l'analyse" displayText="= var display:String = '';
					if (SELECT.PRESTATION != '-1') {display = display + '#B#Analyse prestation#/B# : #B#' + SELECT.PRESTATION_LABEL + '#/B#'}
					return display;
					">
		<GROUP label="Période">
			<FIELD name="ALIAS_PERIODE" label="" UI="combo" width="220" default="CUM_LAST_MONTH" tree="true" globalListProvider="ALIAS_PERIODE" />
			<FIELD name="PERIODE" label="Période" UI="combo" tree="true" width="150" default="2014-07-01" printable="false" globalListProvider="DATE_DEBUT" />
			<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="150" default="2014-12-31" printable="false" globalListProvider="DATE_FIN" />
		</GROUP>
		<GROUP label="Période précédente">
			<FIELD name="PERIODE_D" label="" UI="combo" tree="true" width="150" default="2014-01-01" printable="false" globalListProvider="DATE_DEBUT" />
			<FIELD name="TOPERIODE_D" label="à" UI="combo" tree="true" width="150" default="2014-06-30" printable="false" globalListProvider="DATE_FIN" />
		</GROUP>
		<GROUP label="Prestation">
			<FIELD name="PRESTATION" label="" UI="combo" tree="true" width="400" default="-1" globalListProvider="PRESTATION" showIfNotDefault="true" />
		</GROUP>
		<GROUP label="Données">
			<FIELD name="DATA" label="" UI="combo" default="BR">
				<OPTION label="BR" data="BR" />
				<OPTION label="BR hors transition" data="BRHT" />
			</FIELD>
		</GROUP>
		<GROUP label="Regroupements">
			<FIELD name="GROUPBY" width="220" label="" UI="combo" default="PRESTA" tree="true">
				<OPTION label="Options" data="" globalListProvider="PRESTATIONS_GROUPBY_OPTIONS" />
			</FIELD>
			<FIELD name="GROUPBY_TAB" width="100" label="Présentation" UI="combo" default="AUTO" visible="= SELECT.GROUPBY_2 != '-1' ">
				<OPTION label="Automatique" data="AUTO" />
				<OPTION label="Arbre" data="TREE" />
				<OPTION label="Onglet" data="TAB" />
			</FIELD>
		</GROUP>
		<GROUP label="">
			<FIELD name="GROUPBY_2" width="220" label="" UI="combo" default="-1" tree="true">
				<OPTION label="Pas de second niveau" data="-1" />
				<OPTION label="Options" data="" globalListProvider="PRESTATIONS_GROUPBY_OPTIONS" />
			</FIELD>
		</GROUP>
	</SELECTIONS>
	<SELECTIONS componentName="FILTRES_PRESTATION_SOUSSELECTIONS" />
	<SELECTIONS componentName="FILTRES_RSS_SELECTIONS" />
	<QUERIES>
		<QUERY label="">
			<SQL optimizer="V_RSS_X" cacheEnabled="true">
				<select><![CDATA[ 
					
					SELECT [VIEW.SELECT_TABTREE_COLUMNS],
						
						sum(CASE WHEN date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN nombre_coefficient ELSE 0 END),
						sum(CASE WHEN date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]' THEN v_rsf_detail_1.[VIEW.MONTANT_FIELD] ELSE 0 END),
						sum(CASE WHEN date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' THEN nombre_coefficient ELSE 0 END),
						sum(CASE WHEN date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' THEN v_rsf_detail_1.[VIEW.MONTANT_FIELD] ELSE 0 END)

					FROM [VIEW.V_RSS_VIEW_OPTIMIZE], pmsi.v_rsf_detail_6 v_rsf_detail_1, [VIEW.SELECT_TABTREE_VIEW]
					WHERE 
						v_rss_1.rss_id = v_rsf_detail_1.rss_id
						AND (date_sortie BETWEEN '[PERIODE_D]' AND '[TOPERIODE_D]' 
							OR date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]')
						
						[VIEW.PRESTATION_SELECT]
						[VIEW.FILTRE_RSS_SELECT]
						[VIEW.SELECT_TABTREE_WHERE]
						
					GROUP BY 1,2,3,4,5,6,7,8,9,10,11
					ORDER BY 2,5,7
					
				]]></select>
				<FIELDS>
					<FIELD name="TABD" />
					<FIELD name="TABDL" />
					<FIELD name="TABDLL" />
					<FIELD name="OID1" />
					<FIELD name="COD1" />
					<FIELD name="OID2" />
					<FIELD name="COD2" />
					<FIELD name="OID" />
					<FIELD name="COD" />
					<FIELD name="TXT" />
					<FIELD name="LVL" />
					<FIELD name="FNB" />
					<FIELD name="FMF" />
					<FIELD name="DNB" />
					<FIELD name="DMF" />
				</FIELDS>
			</SQL>
		</QUERY>
	</QUERIES>
	<PRESENTATION>
		<VIEWLINKS>
			<VIEWLINK label="Justificatif Prestations par RSS" shortLabel="Liste Prestations" view="PMSI000153.XML" componentName="RSS_BASE_VIEWLINK" component2Name="PRESTATION_VIEWLINK" component3Name="DATE_COMP_VIEWLINK" />
			<VIEWLINK label="Liste des RSS" shortLabel="Liste RSS" view="PMSI000005.XML" componentName="RSS_BASE_VIEWLINK" component2Name="RSS_OTHERS_VIEWLINK" component3Name="DATE_COMP_VIEWLINK" />
		</VIEWLINKS>
		<ONGLET excelLabel="Comparatif" label="Comparatif" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
			<CHART title="Nombre pour les 10 premiers" type="columnChart" maxItems="10" maxItemsSortOn="FNB" maxItemsSortSeq="D" sortField="CODTXT" sortSeq="A" condition="ROW.LVL == '1'">
				<CATEGORY field="CODTXT" type="Char" />
				<SERIE field="DNB" displayName="'Nb ' + SELECT.PERIODE_D_LABEL + '-' + SELECT.TOPERIODE_D_LABEL" displayNameCalc="true" />
				<SERIE field="FNB" displayName="'Nb ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" displayNameCalc="true" />
			</CHART>
			<CHART title="Montant facturé pour les 10 premiers" type="columnChart" maxItems="10" maxItemsSortOn="FMF" maxItemsSortSeq="D" sortField="CODTXT" sortSeq="A" condition="ROW.LVL == '1'">
				<CATEGORY field="CODTXT" type="Char" />
				<SERIE field="DMF" displayName="'Montant ' + SELECT.PERIODE_D_LABEL + '-' + SELECT.TOPERIODE_D_LABEL" displayNameCalc="true" />
				<SERIE field="FMF" displayName="'Montant ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" displayNameCalc="true" />
			</CHART>
			<DATAGRID title="" total="true" showOthers="true" headerHeight="54" variableRowHeight="true" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" sortable="= SELECT.GROUPBY_3 == '-1' &amp;&amp; (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="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="OID" width="60" type="Char" visible="false" headerText="Oid" />
				<COLUMN dataField="COD" width="60" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
					<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' &amp;&amp; SELECT.GROUPBY_TAB != 'TAB'" />
				</COLUMN>
				<COLUMN dataField="TXT" type="Char" minWidth="200" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" otherFunction="text" otherComplement="Autres" />
				<COLUMN dataField="CODTXT" type="Char" minWidth="200" visible="false" totalFunction="text" otherFunction="text" calc="true">
					<CALC formula="ROW.COD + ' ' + ROW.TXT.toString().substr(0,10)" />
				</COLUMN>
				<COLUMN dataField="FNB" outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum" />
				<COLUMN dataField="DNB" outputFormat="#" visible="false" type="Number" totalFunction="sum" otherFunction="sum" />
				<COLUMN dataField="FMF" outputFormat="#E" visible="false" type="Number" totalFunction="sum" otherFunction="sum" />
				<COLUMN dataField="DMF" outputFormat="#E" visible="false" type="Number" totalFunction="sum" otherFunction="sum" />
				<COLUMN dataField="COL1D" width="80" visibleCondition="SELECT.GROUPBY == 'PRESTA' || SELECT.PRESTATION != '-1'" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="'Nb ' + SELECT.PERIODE_D_LABEL + '-' + SELECT.TOPERIODE_D_LABEL" headerTextCalc="true" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.DNB" />
				</COLUMN>
				<COLUMN dataField="COL1F" width="80" visibleCondition="SELECT.GROUPBY == 'PRESTA' || SELECT.PRESTATION != '-1'" type="Number" outputFormat="#" fixed="false" selectable="true" headerText="'Nb ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" headerTextCalc="true" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.FNB" />
				</COLUMN>
				<COLUMN dataField="COL1E" type="Number" headerText="Ecart" width="70" visibleCondition="SELECT.GROUPBY == 'PRESTA' || SELECT.PRESTATION != '-1'" outputFormat="#" fixed="false" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL1F - ROW.COL1D" />
				</COLUMN>
				<COLUMN dataField="COL1P" type="Number" headerText="% évol." width="45" visibleCondition="SELECT.GROUPBY == 'PRESTA' || SELECT.PRESTATION != '-1'" outputFormat="= if (ROW.COL1D !=0 || ROW.COL1F != 0) {return '0%'} else {return '#'}" fixed="false" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL1E / ROW.COL1D * 100" />
				</COLUMN>
				<COLUMN dataField="COL2D" width="80" type="Number" outputFormat="#E" fixed="false" selectable="true" headerText="'Facturé ' + SELECT.PERIODE_D_LABEL + '-' + SELECT.TOPERIODE_D_LABEL" headerTextCalc="true" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.DMF" />
				</COLUMN>
				<COLUMN dataField="COL2F" width="80" type="Number" outputFormat="#E" fixed="false" selectable="true" headerText="'Facturé ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" headerTextCalc="true" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.FMF" />
				</COLUMN>
				<COLUMN dataField="COL2E" type="Number" headerText="Ecart" width="70" outputFormat="#E" fixed="false" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL2F - ROW.COL2D" />
				</COLUMN>
				<COLUMN dataField="COL2P" type="Number" headerText="% évol." width="45" fixed="false" outputFormat="= if (ROW.COL2D !=0 || ROW.COL2F != 0) {return '0%'} else {return '#'}" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL2E / ROW.COL2D * 100" />
				</COLUMN>
				<COLUMN dataField="COL3D" width="80" visibleCondition="SELECT.GROUPBY == 'PRESTA' || SELECT.PRESTATION != '-1'" type="Number" outputFormat="#,00E" fixed="false" selectable="true" headerText="'PU Moyen ' + SELECT.PERIODE_D_LABEL + '-' + SELECT.TOPERIODE_D_LABEL" headerTextCalc="true" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.DMF / ROW.DNB" />
				</COLUMN>
				<COLUMN dataField="COL3F" width="80" visibleCondition="SELECT.GROUPBY == 'PRESTA' || SELECT.PRESTATION != '-1'" type="Number" outputFormat="#,00E" fixed="false" headerText="'PU Moyen ' + SELECT.PERIODE_LABEL + '-' + SELECT.TOPERIODE_LABEL" headerTextCalc="true" textAlign="right" totalFunction="calc" otherFunction="calc" calc="true">
					<CALC formula="ROW.FMF / ROW.FNB" />
				</COLUMN>
				<COLUMN dataField="COL3E" type="Number" headerText="Ecart" width="70" visibleCondition="SELECT.GROUPBY == 'PRESTA' || SELECT.PRESTATION != '-1'" outputFormat="#,00E" fixed="false" selectable="true" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL3F - ROW.COL3D" />
				</COLUMN>
				<COLUMN dataField="COL3P" type="Number" headerText="% évol." width="45" visibleCondition="SELECT.GROUPBY == 'PRESTA' || SELECT.PRESTATION != '-1'" outputFormat="= if (ROW.COL3D !=0 || ROW.COL3F != 0) {return '0%'} else {return '#'}" fixed="false" textAlign="right" totalFunction="calc" totalComplement="" otherFunction="calc" calc="true">
					<CALC formula="ROW.COL3E / ROW.COL3D * 100" />
				</COLUMN>
			</DATAGRID>
		</ONGLET>
	</PRESENTATION>
</VUE>
