|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
<VUE name="PMSI000114"
|
|
|
label="PMSI. File active"
|
|
|
title="= 'File active ' + SELECT.GROUPBY_LABEL + ' (' + SELECT.PERIODE_LABEL + ' à ' + SELECT.TOPERIODE_LABEL + ') - ' + SELECT.VERSION_GROUPAGE_LABEL"
|
|
|
database="iCTI"
|
|
|
swf="*CTI_view1"
|
|
|
softCode="iCTI_pmsi"
|
|
|
globals="PMSI_globals.XML"
|
|
|
componentsFile="PMSI_components.XML"
|
|
|
helpDokuWIkiDir="pmsi:file_active"
|
|
|
helpDokuWIkiFile="pmsi000114"
|
|
|
helpFile="iCTI_PMSI_PMSI000114.HTML">
|
|
|
<VIEWPROPERTIES componentName="PROPERTIES_RSS" />
|
|
|
<VIEWPROPERTIES componentName="PROPERTIES_SELECT_TABTREE" />
|
|
|
<VIEWPROPERTIES>
|
|
|
<PROPERTY dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
|
|
|
<PROPERTY name="COLUMN_RE_RENTREE">
|
|
|
<value><![CDATA[[EVAL
|
|
|
// <?php FOCNTIONNE
|
|
|
$groupby_selected = '';
|
|
|
|
|
|
$groupbys = array('[GROUPBY]', '[GROUPBY_2]', '[GROUPBY_3]');
|
|
|
$groupby_re_entree = array('G_RE_ENTREE_GHM', 'G_RE_ENTREE_RACINE_GHM','G_RE_ENTREE_DIAG', 'G_RE_ENTREE_MEDECIN');
|
|
|
|
|
|
$re_entree_intersect = array_intersect($groupbys, $groupby_re_entree);
|
|
|
|
|
|
if (count($re_entree_intersect) == 0) {
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
$column_by_choice = array(
|
|
|
'G_RE_ENTREE_GHM' => ',t_ghm.oid AS apres_ghm_id, t_ghm.code AS apres_ghm_code, t_ghm.texte AS apres_ghm_texte',
|
|
|
'G_RE_ENTREE_RACINE_GHM'=> ',t_ghm5.oid AS apres_ghm5_id, t_ghm5.code AS apres_ghm5_code, t_ghm5.texte AS apres_ghm5_texte',
|
|
|
'G_RE_ENTREE_DIAG' => ',t_diagnostics.oid AS apres_diagnostic_principal_id, t_diagnostics.code AS apres_diagnostic_principal_code, t_diagnostics.texte AS apres_diagnostic_principal_texte',
|
|
|
'G_RE_ENTREE_MEDECIN' => ',t_medecins_c.oid AS apres_medecin_rss_id, t_medecins_c.code AS apres_medecin_rss_code, t_medecins_c.nom_prenom AS apres_medecin_rss_texte',
|
|
|
);
|
|
|
|
|
|
|
|
|
foreach($re_entree_intersect AS $value){
|
|
|
$groupby_selected .= ' '.$column_by_choice[$value];
|
|
|
}
|
|
|
|
|
|
return $groupby_selected;
|
|
|
|
|
|
// ?>
|
|
|
EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
|
|
|
<PROPERTY name="JOINTURE_RE_RENTREE">
|
|
|
<value><![CDATA[[EVAL
|
|
|
// <?php FOCNTIONNE
|
|
|
|
|
|
$groupby_selected = '[VIEW.GROUPBY_RE_ENTREE]';
|
|
|
|
|
|
if ($groupby_selected == '') {
|
|
|
return '';
|
|
|
}
|
|
|
$jointure_re_entree = '';
|
|
|
|
|
|
$column_by_choice = array(
|
|
|
'G_RE_ENTREE_GHM' => 'LEFT JOIN pmsi.t_ghm on ghm_id = t_ghm.oid',
|
|
|
'G_RE_ENTREE_RACINE_GHM'=> 'LEFT JOIN pmsi.t_ghm5 on ghm5_id = t_ghm5.oid',
|
|
|
'G_RE_ENTREE_DIAG' => 'LEFT JOIN pmsi.t_diagnostics ON p_rss.diagnostic_principal_id = t_diagnostics.oid',
|
|
|
'G_RE_ENTREE_MEDECIN' => 'LEFT JOIN pmsi.t_medecins_c ON p_rss.medecin_rss_id = t_medecins_c.oid',
|
|
|
);
|
|
|
|
|
|
$groupbys = array('[GROUPBY]', '[GROUPBY_2]', '[GROUPBY_3]');
|
|
|
$groupby_re_entree = array('G_RE_ENTREE_GHM', 'G_RE_ENTREE_RACINE_GHM','G_RE_ENTREE_DIAG', 'G_RE_ENTREE_MEDECIN');
|
|
|
|
|
|
$re_entree_intersect = array_intersect($groupbys, $groupby_re_entree);
|
|
|
|
|
|
$is_re_entree_ghm = false;
|
|
|
foreach($re_entree_intersect AS $value){
|
|
|
|
|
|
if ($value == 'G_RE_ENTREE_GHM'){
|
|
|
$is_re_entree_ghm = true;
|
|
|
}
|
|
|
|
|
|
// On rajoute la jointure sur les GHM pour récupérer les racines
|
|
|
if(!$is_re_entree_ghm && $value == 'G_RE_ENTREE_RACINE_GHM'){
|
|
|
$jointure_re_entree .= ' '.$column_by_choice['G_RE_ENTREE_GHM'];
|
|
|
}
|
|
|
|
|
|
$jointure_re_entree .= ' '.$column_by_choice[$value];
|
|
|
}
|
|
|
|
|
|
return $jointure_re_entree;
|
|
|
|
|
|
// ?>
|
|
|
EVAL]]]></value>
|
|
|
</PROPERTY>
|
|
|
</VIEWPROPERTIES>
|
|
|
<SELECTIONS label="Paramètres de l'analyse" displayText="">
|
|
|
<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="" UI="combo" tree="true" width="200" default="2014-01-01" printable="false" globalListProvider="DATE_DEBUT" />
|
|
|
<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2014-12-31" printable="false" globalListProvider="DATE_FIN" />
|
|
|
</GROUP>
|
|
|
<GROUP label="Regroupements">
|
|
|
<FIELD name="GROUPBY" width="220" label="" UI="combo" default="4" tree="true">
|
|
|
<OPTION label="Options" data="" globalListProvider="RSS_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" treeLevel="1" />
|
|
|
<OPTION label="Options" data="" globalListProvider="RSS_GROUPBY_OPTIONS_RE_ENTREE" />
|
|
|
<OPTION label="Options" data="" globalListProvider="RSS_GROUPBY_OPTIONS" />
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP label="">
|
|
|
<FIELD name="GROUPBY_3" width="220" label="" UI="combo" default="-1" tree="true">
|
|
|
<OPTION label="Pas de troisième niveau" data="-1" treeLevel="1" />
|
|
|
<OPTION label="Options" data="" globalListProvider="RSS_GROUPBY_OPTIONS_RE_ENTREE" />
|
|
|
<OPTION label="Options" data="" globalListProvider="RSS_GROUPBY_OPTIONS" />
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
</SELECTIONS>
|
|
|
<SELECTIONS componentName="FILTRES_GROUPBY_TEXT" />
|
|
|
<SELECTIONS componentName="FILTRES_RSS_SOUSSELECTIONS" />
|
|
|
<SELECTIONS componentName="FILTRES_RSS_SELECTIONS" />
|
|
|
<SELECTIONS componentName="FILTRES_REENTREE_SELECTIONS" />
|
|
|
<QUERIES>
|
|
|
<QUERY label="">
|
|
|
<SQL optimizer="V_RSS_X">
|
|
|
<comment><![CDATA[
|
|
|
|
|
|
Sélectionne les séjours pour lesquels la date de sortie est comprise dans
|
|
|
les bornes de la période d'analyse
|
|
|
|
|
|
]]></comment>
|
|
|
<select><![CDATA[
|
|
|
|
|
|
DROP TABLE IF EXISTS w_reentrees;
|
|
|
CREATE TEMP TABLE w_reentrees AS
|
|
|
SELECT
|
|
|
v_rss_1.patient_id,
|
|
|
v_rss_1.rss_id AS rss_id,
|
|
|
v_rss_1.no_rss,
|
|
|
v_rss_1.date_entree AS date_entree,
|
|
|
v_rss_1.date_sortie AS date_sortie,
|
|
|
|
|
|
0::bigint AS avant_rss_id,
|
|
|
'00011231'::date AS avant_date_entree,
|
|
|
'00011231'::date AS avant_date_sortie,
|
|
|
|
|
|
0::bigint AS avant2_rss_id,
|
|
|
'00011231'::date AS avant2_date_entree,
|
|
|
'00011231'::date AS avant2_date_sortie,
|
|
|
|
|
|
0::bigint AS apres_rss_id,
|
|
|
'20991231'::date AS apres_date_entree,
|
|
|
'20991231'::date AS apres_date_sortie,
|
|
|
0::numeric AS delai,
|
|
|
|
|
|
[VIEW.SELECT_TABTREE_OID_FIELD] AS groupby_oid
|
|
|
|
|
|
FROM #V_RSS_X#
|
|
|
WHERE
|
|
|
patient_id > 0
|
|
|
AND v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
|
|
|
[VIEW.FILTRE_RSS_SELECT]
|
|
|
;
|
|
|
|
|
|
|
|
|
]]></select>
|
|
|
</SQL>
|
|
|
<SQL optimizer="V_RSS_X">
|
|
|
|
|
|
<comment><![CDATA[
|
|
|
|
|
|
Calcul pour les patients concernés de leur intervalle d'entrée dans l'établissement
|
|
|
- Entre 0 et 1 an
|
|
|
- Entre 1 et 2 ans
|
|
|
- A partir de 3 ans et plus
|
|
|
|
|
|
]]></comment>
|
|
|
<select><![CDATA[
|
|
|
|
|
|
DROP TABLE IF EXISTS w_patients_intervalle_entree
|
|
|
;
|
|
|
|
|
|
CREATE TEMP TABLE w_patients_intervalle_entree AS
|
|
|
with patients AS (
|
|
|
SELECT
|
|
|
v_rss_1.patient_id,
|
|
|
v_rss_1.rss_id,
|
|
|
MIN(date_sortie) AS date_sortie_min
|
|
|
FROM #V_RSS_X#
|
|
|
WHERE
|
|
|
patient_id > 0 AND
|
|
|
v_rss_1.date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
|
|
|
[VIEW.FILTRE_RSS_SELECT]
|
|
|
GROUP BY 1,2
|
|
|
ORDER BY 2)
|
|
|
SELECT
|
|
|
patients.patient_id,
|
|
|
patients.rss_id,
|
|
|
patients.date_sortie_min,
|
|
|
DATE_PART('year', AGE(patients.date_sortie_min, MIN(v_rss_1.date_sortie))) AS intervalle
|
|
|
FROM #V_RSS_X#
|
|
|
JOIN patients ON v_rss_1.patient_id = patients.patient_id
|
|
|
GROUP BY 1,2,3
|
|
|
ORDER BY 3
|
|
|
;
|
|
|
|
|
|
ANALYSE w_patients_intervalle_entree
|
|
|
;
|
|
|
|
|
|
]]></select>
|
|
|
</SQL>
|
|
|
<SQL optimizer="V_RSS_X">
|
|
|
<comment><![CDATA[
|
|
|
|
|
|
Sélectionne les séjours pour lesquels la date d'entrée est postérieure
|
|
|
à la date du début de la période d'analyse.
|
|
|
|
|
|
]]></comment>
|
|
|
<select><![CDATA[
|
|
|
|
|
|
DROP TABLE IF EXISTS w_apres;
|
|
|
CREATE TEMP TABLE w_apres AS
|
|
|
SELECT
|
|
|
v_rss_1.patient_id,
|
|
|
v_rss_1.rss_id AS apres_rss_id,
|
|
|
v_rss_1.date_entree AS apres_date_entree,
|
|
|
v_rss_1.date_sortie AS apres_date_sortie
|
|
|
FROM #V_RSS_X#
|
|
|
WHERE
|
|
|
v_rss_1.patient_id > 0
|
|
|
AND v_rss_1.date_entree >= '[PERIODE]'
|
|
|
[VIEW.FILTRE_REENTREE_SELECT]
|
|
|
ORDER BY patient_id, apres_date_entree;
|
|
|
|
|
|
|
|
|
]]></select>
|
|
|
</SQL>
|
|
|
<SQL optimizer="V_RSS_X">
|
|
|
<comment><![CDATA[
|
|
|
|
|
|
Sélectionne les séjours pour lesquels la date de sortie est antérieure
|
|
|
à la date de fin de la période d'analyse.
|
|
|
|
|
|
]]></comment>
|
|
|
<select><![CDATA[
|
|
|
|
|
|
DROP TABLE IF EXISTS w_avant;
|
|
|
CREATE TEMP TABLE w_avant AS
|
|
|
SELECT
|
|
|
v_rss_1.patient_id,
|
|
|
v_rss_1.rss_id AS avant_rss_id,
|
|
|
v_rss_1.date_entree AS avant_date_entree,
|
|
|
v_rss_1.date_sortie AS avant_date_sortie,
|
|
|
[VIEW.SELECT_TABTREE_OID_FIELD] AS groupby_oid
|
|
|
FROM #V_RSS_X#
|
|
|
WHERE
|
|
|
v_rss_1.patient_id > 0
|
|
|
AND v_rss_1.date_sortie <= '[TOPERIODE]'
|
|
|
ORDER BY patient_id, avant_date_sortie DESC;
|
|
|
|
|
|
|
|
|
]]></select>
|
|
|
</SQL>
|
|
|
<SQL optimizer="V_RSS_X">
|
|
|
<comment><![CDATA[
|
|
|
|
|
|
Met à jour la table des ré-entrées.
|
|
|
Si le patient d'un RSS est revenu après son séjour, on renseigne les dates
|
|
|
d'entrée et de sortie du premier séjour de ré-entrée.
|
|
|
On calcule le délai de ré-entrée.
|
|
|
|
|
|
]]></comment>
|
|
|
<select><![CDATA[
|
|
|
|
|
|
UPDATE w_reentrees
|
|
|
SET apres_rss_id = subview.apres_rss_id,
|
|
|
apres_date_entree = subview.apres_date_entree,
|
|
|
apres_date_sortie = subview.apres_date_sortie,
|
|
|
delai = subview.apres_date_entree - w_reentrees.date_sortie
|
|
|
FROM
|
|
|
(
|
|
|
SELECT rss_id,
|
|
|
(MIN(ARRAY[w_apres.apres_date_entree::text,w_apres.apres_rss_id::text]))[2]::bigint AS apres_rss_id,
|
|
|
MIN(w_apres.apres_date_entree) AS apres_date_entree,
|
|
|
(MIN(ARRAY[w_apres.apres_date_entree,w_apres.apres_date_sortie]))[2] AS apres_date_sortie
|
|
|
FROM w_reentrees
|
|
|
JOIN w_apres ON
|
|
|
w_reentrees.patient_id = w_apres.patient_id
|
|
|
AND w_apres.apres_rss_id <> w_reentrees.rss_id
|
|
|
AND w_apres.apres_date_entree >= w_reentrees.date_sortie
|
|
|
GROUP BY 1
|
|
|
) subview
|
|
|
WHERE w_reentrees.rss_id = subview.rss_id
|
|
|
;
|
|
|
|
|
|
|
|
|
UPDATE w_reentrees
|
|
|
SET apres_rss_id = 0
|
|
|
WHERE NOT (1=1 [VIEW.DELAI_REENTREE_SELECT])
|
|
|
;
|
|
|
|
|
|
]]></select>
|
|
|
</SQL>
|
|
|
<SQL optimizer="V_RSS_X">
|
|
|
<comment><![CDATA[
|
|
|
|
|
|
Met à jour la table des ré-entrées.
|
|
|
Si le patient d'un RSS est déjà venu avant ce séjour, on renseigne les dates
|
|
|
d'entrée et de sortie du séjour directement antérieur.
|
|
|
|
|
|
]]></comment>
|
|
|
<select><![CDATA[
|
|
|
|
|
|
UPDATE w_reentrees SET
|
|
|
avant_rss_id = w_avant.avant_rss_id,
|
|
|
avant_date_entree = w_avant.avant_date_entree,
|
|
|
avant_date_sortie = w_avant.avant_date_sortie
|
|
|
FROM
|
|
|
w_avant
|
|
|
WHERE
|
|
|
w_reentrees.patient_id = w_avant.patient_id AND
|
|
|
w_avant.avant_rss_id <> w_reentrees.rss_id AND
|
|
|
w_avant.avant_date_sortie < w_reentrees.date_entree AND
|
|
|
w_avant.avant_date_sortie > w_reentrees.avant_date_sortie
|
|
|
;
|
|
|
|
|
|
]]></select>
|
|
|
</SQL>
|
|
|
<SQL optimizer="V_RSS_X">
|
|
|
<comment><![CDATA[
|
|
|
|
|
|
Met à jour la table des ré-entrées.
|
|
|
Si le patient d'un RSS est déjà venu avant ce séjour et si ce séjour
|
|
|
appartient au même critère de regroupement, on renseigne les dates
|
|
|
d'entrée et de sortie du séjour directement antérieur au séjour testé.
|
|
|
|
|
|
]]></comment>
|
|
|
<select><![CDATA[
|
|
|
|
|
|
UPDATE w_reentrees SET
|
|
|
avant2_rss_id = w_avant.avant_rss_id,
|
|
|
avant2_date_entree = w_avant.avant_date_entree,
|
|
|
avant2_date_sortie = w_avant.avant_date_sortie
|
|
|
FROM
|
|
|
w_avant
|
|
|
WHERE
|
|
|
w_reentrees.patient_id = w_avant.patient_id AND
|
|
|
w_reentrees.groupby_oid = w_avant.groupby_oid AND
|
|
|
w_avant.avant_rss_id <> w_reentrees.rss_id AND
|
|
|
w_avant.avant_date_sortie < w_reentrees.date_entree AND
|
|
|
w_avant.avant_date_sortie > w_reentrees.avant2_date_sortie;
|
|
|
|
|
|
]]></select>
|
|
|
</SQL>
|
|
|
|
|
|
<SQL>
|
|
|
<comment><![CDATA[
|
|
|
|
|
|
Ajout des regroupements de ré-entrée dynamiquementn
|
|
|
|
|
|
]]></comment>
|
|
|
<select><![CDATA[
|
|
|
DROP TABLE IF EXISTS w_rentrees_groupby;
|
|
|
CREATE TEMP TABLE w_rentrees_groupby AS (
|
|
|
SELECT w_reentrees.* [VIEW.COLUMN_RE_RENTREE]
|
|
|
FROM w_reentrees
|
|
|
LEFT JOIN pmsi.p_rss ON apres_rss_id = p_rss.oid
|
|
|
[VIEW.JOINTURE_RE_RENTREE]
|
|
|
);
|
|
|
ANALYSE w_rentrees_groupby;
|
|
|
|
|
|
]]></select>
|
|
|
</SQL>
|
|
|
<SQL optimizer="V_RSS_X" cacheEnabled="true">
|
|
|
<select><![CDATA[
|
|
|
|
|
|
CTISELECT_TREE
|
|
|
GROUPBY1{[VIEW.SELECT_TABTREE_OID_FIELD],, [VIEW.SELECT_TABTREE_COD_FIELD],, [VIEW.SELECT_TABTREE_TXT_FIELD]}
|
|
|
GROUPBY1MODE{[GROUPBY_TAB]}
|
|
|
GROUPBY2{[VIEW.SELECT_TABTREE_2_OID_FIELD],, [VIEW.SELECT_TABTREE_2_COD_FIELD],, [VIEW.SELECT_TABTREE_2_TXT_FIELD]}
|
|
|
GROUPBY3{[VIEW.SELECT_TABTREE_3_OID_FIELD],, [VIEW.SELECT_TABTREE_3_COD_FIELD],, [VIEW.SELECT_TABTREE_3_TXT_FIELD]}
|
|
|
SIGNIFDATA{[VIEW.SELECT_TABTREE_ACTIVITE_SIGNIFICATIVE_DATA],, [ACTIVITE_SIGNIFICATIVE_MODE],, [ACTIVITE_SIGNIFICATIVE_NUMBER]}
|
|
|
INDICATORS{
|
|
|
sum(nb_rsa),
|
|
|
count(DISTINCT w_reentrees.patient_id),
|
|
|
count(DISTINCT CASE WHEN w_patients_intervalle_entree.intervalle < 1 THEN v_rss_1.patient_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN w_patients_intervalle_entree.intervalle BETWEEN 1 AND 2 THEN v_rss_1.patient_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN w_patients_intervalle_entree.intervalle > 2 THEN v_rss_1.patient_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN SUBSTR(v_rss_1.no_patient , 1 , 4) = DATE_PART('year', v_rss_1.date_sortie) THEN v_rss_1.patient_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN w_reentrees.avant2_rss_id = 0 THEN w_reentrees.patient_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN apres_rss_id = 0 THEN w_reentrees.rss_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN apres_rss_id <> 0 THEN w_reentrees.rss_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN apres_rss_id <> 0 AND delai BETWEEN 0 AND 1 THEN w_reentrees.rss_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN apres_rss_id <> 0 AND delai BETWEEN 2 AND 7 THEN w_reentrees.rss_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN apres_rss_id <> 0 AND delai BETWEEN 8 AND 15 THEN w_reentrees.rss_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN apres_rss_id <> 0 AND delai BETWEEN 16 AND 30 THEN w_reentrees.rss_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN apres_rss_id <> 0 AND delai BETWEEN 31 AND 90 THEN w_reentrees.rss_id ELSE NULL END),
|
|
|
count(DISTINCT CASE WHEN apres_rss_id <> 0 AND delai >= 91 THEN w_reentrees.rss_id ELSE NULL END)
|
|
|
}
|
|
|
ORDERBY{indicateurs[2],, DESC}
|
|
|
FROM #V_RSS_X#
|
|
|
JOIN w_rentrees_groupby w_reentrees ON v_rss_1.rss_id = w_reentrees.rss_id
|
|
|
JOIN w_patients_intervalle_entree ON v_rss_1.patient_id = w_patients_intervalle_entree.patient_id AND v_rss_1.rss_id = w_patients_intervalle_entree.rss_id
|
|
|
|
|
|
]]></select>
|
|
|
<FIELDS>
|
|
|
<INSERT name="CTISELECT_TREE_FIELDS"/>
|
|
|
<FIELD name="SORT" />
|
|
|
<FIELD name="NBR" />
|
|
|
<FIELD name="NBP" />
|
|
|
<FIELD name="NBNP1" />
|
|
|
<FIELD name="NBNP2" />
|
|
|
<FIELD name="NBNP3" />
|
|
|
<FIELD name="NBNPB" />
|
|
|
<FIELD name="NBNPL" />
|
|
|
<FIELD name="NBNRE" />
|
|
|
<FIELD name="NBRET" />
|
|
|
<FIELD name="NBRE1" />
|
|
|
<FIELD name="NBRE2" />
|
|
|
<FIELD name="NBRE3" />
|
|
|
<FIELD name="NBRE4" />
|
|
|
<FIELD name="NBRE5" />
|
|
|
<FIELD name="NBRE6" />
|
|
|
</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="PMSI000227.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;" />
|
|
|
<ARG name="DATA1" value="'1'" />
|
|
|
<ARG name="DATA2" value="'2'" />
|
|
|
<ARG name="DATA3" value="'3'" />
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Evolution" shortLabel="Evolution" view="PMSI000228.XML" enabled="true" rowContext="false" componentName="PERIODICITE_VIEWLINK" buttonType="EVOLUTION">
|
|
|
<ARG name="DATA" value="'1'" />
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Analyse croisée" shortLabel="Analyse croisée" view="PMSI000115.XML" enabled="true" rowContext="false" buttonType="ANALYSE_CROISEE">
|
|
|
<ARG name="PERIODE" value="return VIEW.X_PERIODE;" />
|
|
|
<ARG name="DATA" value="'1'" />
|
|
|
<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 patients" shortLabel="Liste Patients" view="PMSI000117.XML" componentName="RSS_BASE_VIEWLINK" />
|
|
|
<VIEWLINK label="Justificatif Ré-Entrées" shortLabel="Liste Ré-Entrées" view="PMSI000116.XML" componentName="RSS_BASE_VIEWLINK">
|
|
|
<ARG name="DELAI_REENTREE" value="
|
|
|
if (COLUMN.NAME == 'NBRE2') {return '2'}
|
|
|
if (COLUMN.NAME == 'NBRE3') {return '8'}
|
|
|
if (COLUMN.NAME == 'NBRE4') {return '16'}
|
|
|
if (COLUMN.NAME == 'NBRE5') {return '31'}
|
|
|
if (COLUMN.NAME == 'NBRE6') {return '91'}" />
|
|
|
<ARG name="DELAI_REENTREE2" value="
|
|
|
if (COLUMN.NAME == 'NBRE1') {return '1'}
|
|
|
if (COLUMN.NAME == 'NBRE2') {return '7'}
|
|
|
if (COLUMN.NAME == 'NBRE3') {return '15'}
|
|
|
if (COLUMN.NAME == 'NBRE4') {return '30'}
|
|
|
if (COLUMN.NAME == 'NBRE5') {return '90'}" />
|
|
|
</VIEWLINK>
|
|
|
<VIEWLINK label="Liste des RSS" shortLabel="Liste RSS" view="PMSI000005.XML" componentName="RSS_BASE_VIEWLINK" />
|
|
|
</VIEWLINKS>
|
|
|
<ONGLET excelLabel="File active" label="File active" multiTab="true" multiTabBreakField="TABD" multiTabBreakLabelField="TABDL" multiTabBreakLonglabelField="TABDLL">
|
|
|
<CHART title="Décomposition des plus fréquents" type="columnChart" subType="stacked" maxItems="10" maxItemsSortOn="NBRET" sortField="NBRET" sortSeq="D" visibleCondition="SELECT.GROUPBY != 'AMSOR' && SELECT.GROUPBY != 'MSOR' && SELECT.GROUPBY != 'ATRIMSOR'" condition="ROW.LVL == '1'">
|
|
|
<CATEGORY field="COD" type="Char"/>
|
|
|
<SERIE field="NBRE1" displayName="Nb ré-entrées 24h"/>
|
|
|
<SERIE field="NBRE2" displayName="Nb ré-entrées 2-7 j"/>
|
|
|
<SERIE field="NBRE3" displayName="Nb ré-entrées 8-15 j"/>
|
|
|
<SERIE field="NBRE4" displayName="Nb ré-entrées 16-30 j"/>
|
|
|
<SERIE field="NBRE5" displayName="Nb ré-entrées 1-3 m"/>
|
|
|
<SERIE field="NBRE6" displayName="Nb ré-entrées >3 m"/>
|
|
|
</CHART>
|
|
|
<CHART title="Evolution" type="lineChart" maxItems="36" maxItemsSortOn="COD" maxItemsSortSeq="D" sortField="COD" sortSeq="A" visibleCondition="SELECT.GROUPBY == 'AMSOR' || SELECT.GROUPBY == 'MSOR' || SELECT.GROUPBY == 'ATRIMSOR'" condition="ROW.LVL == '1'">
|
|
|
<CATEGORY field="COD" type="Char"/>
|
|
|
<SERIE field="NBRE1" displayName="Nb ré-entrées 24h"/>
|
|
|
<SERIE field="NBRE2" displayName="Nb ré-entrées 2-7 j"/>
|
|
|
<SERIE field="NBRE3" displayName="Nb ré-entrées 8-15 j"/>
|
|
|
<SERIE field="NBRE4" displayName="Nb ré-entrées 16-30 j"/>
|
|
|
<SERIE field="NBRE5" displayName="Nb ré-entrées 1-3 m"/>
|
|
|
<SERIE field="NBRE6" displayName="Nb ré-entrées >3 m"/>
|
|
|
</CHART>
|
|
|
<DATAGRID title="" total="true" showOthers="true" headerHeight="64" selectRowInRows="= ROW.OID == '-9999997'" otherRowInRows="= ROW.OID == '-9999998'" totalRowInRows="= ROW.OID == '-9999999'" variableRowHeight="true"
|
|
|
sortable="= SELECT.GROUPBY_2 == '-1' || SELECT.GROUPBY_3 == '-1' || SELECT.GROUPBY_TAB == 'TAB'">
|
|
|
<INSERT name="DATAGRID_MULTITAB_STYLES"/>
|
|
|
<COLUMN dataField="OID" width="60" type="Char" visible="false" headerText="Oid">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="COD" width="70" type="Char" visible="true" headerText="Code" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
<INSERT name="COLUMN_COD_MULTITAB_STYLES"/>
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="TXT" type="Char" minWidth="150" headerText="SELECT.GROUPBY_LABEL" headerTextCalc="true" textAlign="left" totalFunction="text" totalComplement="TOTAL" otherFunction="text" otherComplement="Autres">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NBP" width="65" type="Number" outputFormat="#" headerText="Patients" textAlign="right" totalFunction="sum" otherFunction="sum"
|
|
|
description="Nombre de patients pour lesques la date de sortie du séjour est comprise dans la période d'analyse" />
|
|
|
<COLUMN dataField="NBNP1" width="80" type="Number" outputFormat="#" headerText="Dont nouveaux (Ets) 0-1 an" textAlign="right" totalFunction="sum" otherFunction="sum"
|
|
|
description="Nombre de patients dont la première venue dans l'établissement est dans l'intervalle de temps 0-1 an" />
|
|
|
<COLUMN dataField="NBNP2" width="80" type="Number" outputFormat="#" headerText="Dont nouveaux (Ets) 1-2 ans" textAlign="right" totalFunction="sum" otherFunction="sum"
|
|
|
description="Nombre de patients dont la première venue dans l'établissement est dans l'intervalle de temps 1-2 ans" />
|
|
|
<COLUMN dataField="NBNP3" width="80" type="Number" outputFormat="#" headerText="Dont nouveaux (Ets) 3 ans et plus" textAlign="right" totalFunction="sum" otherFunction="sum"
|
|
|
description="Nombre de patients dont la première venue dans l'établissement est dans l'intervalle de temps 3 ans et plus" />
|
|
|
<COLUMN dataField="NBNPB" width="85" type="Number" visibleCondition="ENV.PMSIPROVIDER == 'baclessepmsi'" outputFormat="#" headerText="Dont nouveaux (N°Baclesse)" textAlign="right" totalFunction="sum" otherFunction="sum" />
|
|
|
<COLUMN dataField="NBNPL" width="80" type="Number" outputFormat="#" headerText="'Dont nouveaux (' + SELECT.GROUPBY_LABEL + ')'" headerTextCalc="true" textAlign="right" totalFunction="sum" otherFunction="sum"
|
|
|
description="= return "Nombre de patients déjà venus ou non dans l'établissement mais pour lesquels il s'agit du premier séjour classé dans le critère de regroupement (" + SELECT.GROUPBY_LABEL + ")"" />
|
|
|
<COLUMN dataField="NBR" width="65" type="Number" outputFormat="#" headerText="Séjours" textAlign="right" totalFunction="sum" otherFunction="sum"
|
|
|
description="Nombre de séjours (pour les séjours de la CMD 28, nombre de séances)" />
|
|
|
<COLUMN dataField="NBRET" width="65" type="Number" outputFormat="#" headerText="Nb ré-entrées total" textAlign="right" totalFunction="sum" otherFunction="sum" selectable="true"
|
|
|
description="Nombre de séjours pour lesquels les patients sont revenus après leurs séjours classés dans le critère de regroupement" />
|
|
|
<COLUMN dataField="NBRE1" width="65" type="Number" outputFormat="#" headerText="Nb ré-entrées
24h" textAlign="right" fixed="false" totalFunction="sum" otherFunction="sum" selectable="true"
|
|
|
description="Nombre de séjours pour lesquels les patients sont revenus moins de 24h après leurs séjours classés dans le critère de regroupement" />
|
|
|
<COLUMN dataField="NBRE2" width="65" type="Number" outputFormat="#" headerText="Nb ré-entrées
2-7 j" textAlign="right" fixed="false" totalFunction="sum" otherFunction="sum" selectable="true"
|
|
|
description="Nombre de séjours pour lesquels les patients sont revenus entre 2 et 7 jours après leurs séjours classés dans le critère de regroupement" />
|
|
|
<COLUMN dataField="NBRE3" width="65" type="Number" outputFormat="#" headerText="Nb ré-entrées
8-15 j" textAlign="right" fixed="false" totalFunction="sum" otherFunction="sum" selectable="true"
|
|
|
description="Nombre de séjours pour lesquels les patients sont revenus entre 8 et 15 jours après leurs séjours classés dans le critère de regroupement" />
|
|
|
<COLUMN dataField="NBRE4" width="65" type="Number" outputFormat="#" headerText="Nb ré-entrées
16-30 j" textAlign="right" fixed="false" totalFunction="sum" otherFunction="sum" selectable="true"
|
|
|
description="Nombre de séjours pour lesquels les patients sont revenus entre 16 et 30 jours après leurs séjours classés dans le critère de regroupement" />
|
|
|
<COLUMN dataField="NBRE5" width="65" type="Number" outputFormat="#" headerText="Nb ré-entrées
1-3 m" textAlign="right" fixed="false" totalFunction="sum" otherFunction="sum" selectable="true"
|
|
|
description="Nombre de séjours pour lesquels les patients sont revenus entre 1 et 3 mois jours après leurs séjours classés dans le critère de regroupement" />
|
|
|
<COLUMN dataField="NBRE6" width="65" type="Number" outputFormat="#" headerText="Nb ré-entrées
>3 m" textAlign="right" fixed="false" totalFunction="sum" otherFunction="sum" selectable="true"
|
|
|
description="Nombre de séjours pour lesquels les patients sont revenus plus de 3 mois après leurs séjours classés dans le critère de regroupement" />
|
|
|
</DATAGRID>
|
|
|
</ONGLET>
|
|
|
</PRESENTATION>
|
|
|
</VUE>
|