|
|
<?xml version="1.0" encoding="ISO-8859-15"?>
|
|
|
<VUE
|
|
|
name="PMSI003693"
|
|
|
label="PMSI. Analyse Simulation FG 2324 UCD"
|
|
|
title="= 'Analyse UCD Simulation FG 2324 par ' + SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ')'"
|
|
|
database="iCTI" swf="*CTI_view1"
|
|
|
softCode="iCTI_pmsi"
|
|
|
globals="PMSI_globals.XML"
|
|
|
componentsFile="PMSI_components.XML"
|
|
|
>
|
|
|
<VIEWPROPERTIES componentName="PROPERTIES_UCD"/>
|
|
|
<VIEWPROPERTIES componentName="PROPERTIES_SELECT_TABTREE"/>
|
|
|
<SELECTIONS label="Paramètres de l'analyse" displayText="= var display:String = '';
|
|
|
if (SELECT.UCD != '-1') {display = display + '#B#Analyse UCD#/B# : #B#' + SELECT.UCD_LABEL + '#/B#'}
|
|
|
return display;
|
|
|
">
|
|
|
<GROUP label="Période">
|
|
|
<FIELD name="PERIODE" label="" UI="combo" tree="true" width="200" default="2023-03-01">
|
|
|
<OPTION dataLink="DATE_DEBUT" treeLevelField="lvl" dataField="cod" aliasField="alias" data2Field="mois" labelField="txt" />
|
|
|
</FIELD>
|
|
|
<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2024-02-29" >
|
|
|
<OPTION dataLink="DATE_FIN" treeLevelField="lvl" dataField="cod" aliasField="alias" data2Field="mois" labelField="txt" />
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="UCD">
|
|
|
<FIELD name="UCD" label="" UI="combo" tree="true" width="400" default="-1" globalListProvider="UCD" showIfNotDefault="true">
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="Regroupements">
|
|
|
<FIELD name="GROUPBY" width="200" label="" UI="combo" default="UCD" tree="true">
|
|
|
<OPTION label="Options" data="" globalListProvider="UCD_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="200" label="" UI="combo" default="-1" tree="true">
|
|
|
<OPTION label="Pas de second niveau" data="-1"/>
|
|
|
<OPTION label="Options" data="" globalListProvider="UCD_GROUPBY_OPTIONS"/>
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
</SELECTIONS>
|
|
|
<SELECTIONS componentName="FILTRES_UCD_SOUSSELECTIONS"/>
|
|
|
<SELECTIONS componentName="FILTRES_RSS_SELECTIONS"/>
|
|
|
<QUERIES>
|
|
|
<QUERY label="">
|
|
|
<SQL optimizer="V_RSS_X" cacheEnabled="false">
|
|
|
<select><![CDATA[
|
|
|
DROP TABLE IF EXISTS w_ucd_198
|
|
|
;
|
|
|
CREATE TEMP TABLE w_ucd_198 AS
|
|
|
SELECT t_ucd.code as ucd_code
|
|
|
FROM pmsi.t_listes
|
|
|
JOIN pmsi.t_listes_contenu ON t_listes_contenu.liste_id = t_listes.oid
|
|
|
JOIN pmsi.t_listes_tables ON t_listes_tables.oid = t_listes.table_id
|
|
|
JOIN pmsi.t_ucd ON t_ucd.oid = t_listes_contenu.to_id
|
|
|
WHERE 1=1
|
|
|
AND t_listes.is_cti = '1'
|
|
|
AND t_listes_tables.name = 't_ucd'
|
|
|
AND t_listes.code = 'CTI_DR23_1U'
|
|
|
;
|
|
|
SELECT [VIEW.SELECT_TABTREE_COLUMNS],
|
|
|
base.cti_sum_distinct_on(DISTINCT ARRAY[v_rss_1.rss_id::text, v_rss_1.nb_rsa::text]),
|
|
|
sum(nombre),
|
|
|
sum(montant_facture),
|
|
|
sum(montant_ecart_indemnisable),
|
|
|
sum(nombre) - SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_198) THEN nombre ELSE 0 END),
|
|
|
sum(montant_facture) - SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_198) THEN montant_facture ELSE 0 END),
|
|
|
sum(montant_ecart_indemnisable) - SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_198) THEN montant_ecart_indemnisable ELSE 0 END),
|
|
|
0 - SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_198) THEN nombre ELSE 0 END),
|
|
|
0 - SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_198) THEN montant_facture ELSE 0 END) ,
|
|
|
0 - SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_198) THEN montant_ecart_indemnisable ELSE 0 END)
|
|
|
FROM #V_RSS_X#
|
|
|
, pmsi.p_simulation_fg2324
|
|
|
, pmsi.v_rss_ucd_1,
|
|
|
[VIEW.SELECT_TABTREE_VIEW]
|
|
|
WHERE
|
|
|
v_rss_1.rss_id = v_rss_ucd_1.rss_id
|
|
|
AND p_simulation_fg2324.rss_id = v_rss_1.rss_id
|
|
|
AND p_simulation_fg2324.est_envoye = '1'
|
|
|
AND p_simulation_fg2324.est_regroupe = '1'
|
|
|
AND date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
|
|
|
AND v_rss_ucd_1.type_ucd_code = 'SUS'::text
|
|
|
-- A commenter dans le cas ou le PMSI n'est pas à jour pour ne pas tenir compte de cette vue. AND v_rss_ucd_1.type_ucd_code = 'SUS'::text
|
|
|
|
|
|
[VIEW.UCD_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="NRSS"/>
|
|
|
<FIELD name="NB12"/>
|
|
|
<FIELD name="MF12"/>
|
|
|
<FIELD name="ME12"/>
|
|
|
<FIELD name="NB13"/>
|
|
|
<FIELD name="MF13"/>
|
|
|
<FIELD name="ME13"/>
|
|
|
|
|
|
<FIELD name="NBEC"/>
|
|
|
<FIELD name="MFEC"/>
|
|
|
<FIELD name="MEEC"/>
|
|
|
</FIELDS>
|
|
|
</SQL>
|
|
|
</QUERY>
|
|
|
<QUERY type="comboLink" name="DATE_DEBUT" >
|
|
|
<SQL select="SELECT date, alias, texte, mois, level
|
|
|
FROM pmsi.v_calendrier_1
|
|
|
WHERE date_part('year',date) IN (SELECT annee_sortie FROM pmsi.p_simulation_fg2324 WHERE est_envoye <> '0' GROUP BY 1)" >
|
|
|
<FIELDS>
|
|
|
<FIELD name="cod" />
|
|
|
<FIELD name="alias" />
|
|
|
<FIELD name="txt" />
|
|
|
<FIELD name="mois" />
|
|
|
<FIELD name="lvl" />
|
|
|
</FIELDS>
|
|
|
</SQL>
|
|
|
</QUERY>
|
|
|
<QUERY type="comboLink" name="DATE_FIN" >
|
|
|
<SQL select="SELECT date, alias, texte, mois, level
|
|
|
FROM pmsi.v_calendrier_2
|
|
|
WHERE date_part('year',date) IN (SELECT annee_sortie FROM pmsi.p_simulation_fg2324 WHERE est_envoye <> '0' GROUP BY 1)" >
|
|
|
<FIELDS>
|
|
|
<FIELD name="cod" />
|
|
|
<FIELD name="alias" />
|
|
|
<FIELD name="txt" />
|
|
|
<FIELD name="mois" />
|
|
|
<FIELD name="lvl" />
|
|
|
</FIELDS>
|
|
|
</SQL>
|
|
|
</QUERY>
|
|
|
<QUERY type="propertiesLink" name="VIEWPROPERTIES" forSelections="false">
|
|
|
</QUERY>
|
|
|
</QUERIES>
|
|
|
<PRESENTATION>
|
|
|
<VIEWLINKS>
|
|
|
<VIEWLINK label="Justificatif par RSS" shortLabel="Justificatif UCD" view="PMSI000509.XML" componentName="RSS_BASE_VIEWLINK" component2Name="UCD_VIEWLINK" component3Name="" />
|
|
|
</VIEWLINKS>
|
|
|
<ONGLET excelLabel="Analyse UCD" label="Analyse UCD" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
|
|
|
<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' && SELECT.GROUPBY_2 != '-1' && SELECT.GROUPBY_TAB != 'TAB'"/>
|
|
|
<ROWSTYLE name="backgroundColor" value="0xFFD393" condition="ROW.LVL == '1' && SELECT.GROUPBY_2 != '-1' && SELECT.GROUPBY_TAB != 'TAB'"/>
|
|
|
<ROWSTYLE name="fontWeight" value="bold" condition="ROW.LVL == '1' && SELECT.GROUPBY_2 != '-1' && SELECT.GROUPBY_TAB != 'TAB'"/>
|
|
|
<ROWSTYLE name="borderSides" value="top bottom" condition="ROW.LVL == '1' && SELECT.GROUPBY_2 != '-1' && SELECT.GROUPBY_TAB != 'TAB'"/>
|
|
|
<ROWSTYLE name="borderStyle" value="solid" condition="ROW.LVL == '1' && SELECT.GROUPBY_2 != '-1' && SELECT.GROUPBY_TAB != 'TAB'"/>
|
|
|
<ROWSTYLE name="borderThickness" value="2" condition="ROW.LVL == '1' && SELECT.GROUPBY_2 != '-1' && SELECT.GROUPBY_TAB != 'TAB'"/>
|
|
|
<COLUMN dataField="LVL" width="50" type="Char" visible="false" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="OID1" width="60" type="Char" visible="false" headerText="Oid">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="COD1" width="60" type="Char" visible="false" headerText="Oid">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="OID2" width="60" type="Char" visible="false" headerText="Oid">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="COD2" width="60" type="Char" visible="false" headerText="Oid">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="COD" width="80" type="Char" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
<CELLSTYLE name="paddingLeft" value="15" condition="ROW.LVL == '2' && 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>
|
|
|
<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="NRSS" width="80" type="Number" visible="true" outputFormat="#" headerText="Nb Séjours" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NB12" width="80" type="Number" visibleCondition="SELECT.GROUPBY == 'UCD' || SELECT.UCD != '-1'" outputFormat="#" headerText="FG 2023 Nb UCD" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="MF12" width="80" type="Number" outputFormat="#E" headerText="FG 2023 Montant UCD" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="ME12" width="80" type="Number" largeSeparator="true" outputFormat="#E" headerText="FG 2023 Montant EMI" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NB13" width="80" type="Number" visibleCondition="SELECT.GROUPBY == 'UCD' || SELECT.UCD != '-1'" outputFormat="#" headerText="FG 2324 Nb UCD" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
<HEADERCELLSTYLE name="color" value="0xff5001"/>
|
|
|
<CELLSTYLE name="color" value="0xff5001"/>
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="MF13" width="80" type="Number" outputFormat="#E" headerText="FG 2024 Montant UCD" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
<HEADERCELLSTYLE name="color" value="0xff5001"/>
|
|
|
<CELLSTYLE name="color" value="0xff5001"/>
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="ME13" width="80" type="Number" largeSeparator="true" outputFormat="#E" headerText="FG 2024 Montant EMI" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
<HEADERCELLSTYLE name="color" value="0xff5001"/>
|
|
|
<CELLSTYLE name="color" value="0xff5001"/>
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="MFEC" width="80" type="Number" outputFormat="#E" headerText="Ecart. Montant UCD" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="MEEC" width="80" type="Number" largeSeparator="true" outputFormat="#E" headerText="Ecart. Montant EMI" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
</DATAGRID>
|
|
|
</ONGLET>
|
|
|
</PRESENTATION>
|
|
|
</VUE>
|