|
|
<?xml version="1.0" encoding="ISO-8859-15"?>
|
|
|
<VUE
|
|
|
name="PMSI003699"
|
|
|
label="PMSI. Justificatif Simulation FG 2324 UCD/RSS"
|
|
|
title="= 'Justificatif Simulation FG 2324 UCD par RSS (' + 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"/>
|
|
|
<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>
|
|
|
</SELECTIONS>
|
|
|
<SELECTIONS componentName="FILTRES_RSS_SELECTIONS"/>
|
|
|
<QUERIES>
|
|
|
<QUERY label="">
|
|
|
<SQL optimizer="V_RSS_X">
|
|
|
<select><![CDATA[
|
|
|
DROP TABLE IF EXISTS w_ucd_204
|
|
|
;
|
|
|
CREATE TEMP TABLE w_ucd_204 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_DR24_1U'
|
|
|
;
|
|
|
(
|
|
|
SELECT
|
|
|
v_rss_1.rss_id,
|
|
|
v_rss_1.no_rss,
|
|
|
v_rss_1.no_sejour_administratif,
|
|
|
v_rss_1.finess,
|
|
|
identite_nom || ' ' || identite_prenom,
|
|
|
date_ucd,
|
|
|
ucd_code,
|
|
|
ucd_texte,
|
|
|
prix_unitaire,
|
|
|
montant_facture,
|
|
|
montant_ecart_indemnisable,
|
|
|
CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_204) THEN 0 ELSE montant_facture END,
|
|
|
CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_204) THEN 0 ELSE montant_ecart_indemnisable END,
|
|
|
CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_204) THEN montant_facture ELSE 0 END ,
|
|
|
CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_204) THEN montant_ecart_indemnisable ELSE 0 END
|
|
|
FROM
|
|
|
#V_RSS_X#,
|
|
|
pmsi.p_simulation_fg2324,
|
|
|
pmsi.v_rss_ucd_1
|
|
|
WHERE 1=1
|
|
|
AND 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]
|
|
|
)
|
|
|
UNION ALL
|
|
|
(
|
|
|
SELECT
|
|
|
-9999999,
|
|
|
0,
|
|
|
'',
|
|
|
'',
|
|
|
COUNT(DISTINCT v_rss_ucd_1.rss_id)::text || ' séjours, ' || COUNT(DISTINCT v_rss_1.patient_id)::text || ' patients',
|
|
|
null,
|
|
|
'',
|
|
|
COUNT(DISTINCT v_rss_ucd_1.ucd_id)::text || ' codes',
|
|
|
0,
|
|
|
sum(montant_facture),
|
|
|
sum(montant_ecart_indemnisable),
|
|
|
SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_204) THEN 0 ELSE montant_facture END),
|
|
|
SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_204) THEN 0 ELSE montant_ecart_indemnisable END),
|
|
|
SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_204) THEN montant_facture ELSE 0 END) ,
|
|
|
SUM(CASE WHEN ucd_code IN (SELECT ucd_code FROM w_ucd_204) THEN montant_ecart_indemnisable ELSE 0 END)
|
|
|
FROM
|
|
|
#V_RSS_X#,
|
|
|
pmsi.p_simulation_fg2324,
|
|
|
pmsi.v_rss_ucd_1
|
|
|
WHERE 1=1
|
|
|
AND 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]
|
|
|
)
|
|
|
ORDER BY 2, 5
|
|
|
;
|
|
|
]]></select>
|
|
|
<FIELDS>
|
|
|
<FIELD name="OID"/>
|
|
|
<FIELD name="RSS"/>
|
|
|
<FIELD name="SEJ"/>
|
|
|
<FIELD name="FIN"/>
|
|
|
<FIELD name="NOM" ifHideNames="Non autorisé"/>
|
|
|
<FIELD name="DAT"/>
|
|
|
<FIELD name="COD"/>
|
|
|
<FIELD name="TXT"/>
|
|
|
<FIELD name="PU"/>
|
|
|
<FIELD name="MF12"/>
|
|
|
<FIELD name="ME12"/>
|
|
|
<FIELD name="MF13"/>
|
|
|
<FIELD name="ME13"/>
|
|
|
<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="Détail RSS" shortLabel="Détail RSS" view="PMSI000006.XML">
|
|
|
<ARG name="OID" value="ROW.OID"/>
|
|
|
</VIEWLINK>
|
|
|
</VIEWLINKS>
|
|
|
<ONGLET excelLabel="Justificatif UCD" label="Justificatif UCD">
|
|
|
<DATAGRID title="" total="true" showOthers="false" key="RSS" headerHeight="48" totalRowInRows="= ROW.OID == '-9999999'">
|
|
|
<COLUMN dataField="OID" type="Char" visible="false">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="FIN" width="60" type="Char" visible="true" headerText="Etablissement" textAlign="left" visibleCondition="ENV.CONSOLIDATION == '1'" otherFunction="text" totalFunction="text" totalComplement="">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="RSS" width="60" type="Char" visible="true" headerText="N° RSS" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="TOTAL">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="SEJ" width="90" type="Char" visible="true" outputFormat="#" headerText="N° séjour" textAlign="left" otherFunction="text" totalFunction="text" totalComplement="">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NOM" minWidth="150" type="Char" visible="true" headerText="Nom" textAlign="left" totalFunction="text" totalComplement="*ROW">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="COD" type="Char" visibleCondition="SELECT.UCD == '-1' || SELECT.UCD.toString().substr(0,2) == 'LI'" headerText="Code UCD" width="60" textAlign="left"/>
|
|
|
<COLUMN dataField="TXT" type="Char" visibleCondition="SELECT.UCD == '-1' || SELECT.UCD.toString().substr(0,2) == 'LI'" headerText="Texte UCD" minWidth="100" textAlign="left" totalFunction="text" totalComplement="*ROW"/>
|
|
|
<COLUMN dataField="DAT" type="Date" inputFormat="AAAA-MM-JJ" outputFormat="DD/MM/YY" visible="true" headerText="Date" width="80" textAlign="left"/>
|
|
|
<COLUMN dataField="PU" type="Number" visible="true" outputFormat="#,00E" headerText="Prix unitaire" width="80" textAlign="left"/>
|
|
|
<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="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>
|