|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
<VUE name="PMSI000382" label="Tirage au sort de RSS" title="= 'Tirage au sort de RSS (' + 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:sejours_analyse_globale:rss:sejours_rss:" helpDokuWIkiFile="pmsi000008" helpFile="iCTI_PMSI_PMSI000382.HTML">
|
|
|
<VIEWPROPERTIES>
|
|
|
<PROPERTYx dataLink="VIEWPROPERTIES" nameField="name" valueField="value"/>
|
|
|
</VIEWPROPERTIES>
|
|
|
<SELECTIONS label="Paramètres de l'analyse" displayText="">
|
|
|
<GROUP label="Date sortie">
|
|
|
<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" globalListProvider="DATE_DEBUT" printable="false">
|
|
|
</FIELD>
|
|
|
<FIELD name="TOPERIODE" label="à" UI="combo" tree="true" width="200" default="2014-12-31" globalListProvider="DATE_FIN" printable="false">
|
|
|
</FIELD>
|
|
|
</GROUP>
|
|
|
<GROUP>
|
|
|
<FIELD name="NBSORT" label="Nb RSS tirés au sort" UI="text" width="100" default="1" showIfNotDefault="true"/>
|
|
|
</GROUP>
|
|
|
</SELECTIONS>
|
|
|
<SELECTIONS componentName="FILTRES_RSS_SELECTIONS"/>
|
|
|
<QUERIES>
|
|
|
<QUERY label="">
|
|
|
<SQL optimizer="V_RSS_X" select="
|
|
|
DROP TABLE IF EXISTS TEST;
|
|
|
CREATE TEMP TABLE TEST AS
|
|
|
(SELECT random() AS num_aleatoire,
|
|
|
v_rss_1.rss_id AS RSS_ID,
|
|
|
v_rss_1.no_rss AS no_rss,
|
|
|
v_rss_1.no_sejour_administratif AS no_sejour_administratif,
|
|
|
v_rss_1.finess AS F,
|
|
|
identite_nom || ' ' || identite_prenom AS NOM,
|
|
|
sexe,
|
|
|
age,
|
|
|
ghm_code,
|
|
|
ghs_code,
|
|
|
ligne_oap_code,
|
|
|
medecin_reference_rss_nom,
|
|
|
diagnostic_principal_code,
|
|
|
date_naissance,
|
|
|
date_entree,
|
|
|
date_sortie,
|
|
|
mode_sortie,
|
|
|
mode_entree::text || provenance::text,
|
|
|
duree_sejour AS duree_sejour,
|
|
|
nb_rsa AS nb_rsa,
|
|
|
nb_rum AS nb_rum,
|
|
|
nb_seances AS nb_seances,
|
|
|
patient_id as patient_id
|
|
|
FROM #V_RSS_X#
|
|
|
WHERE
|
|
|
date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
|
|
|
|
|
|
[VIEW.FILTRE_RSS_SELECT]
|
|
|
ORDER BY 1
|
|
|
LIMIT '[NBSORT]'
|
|
|
)
|
|
|
;
|
|
|
|
|
|
SELECT ROW_NUMBER() OVER(ORDER BY num_aleatoire),* FROM TEST
|
|
|
|
|
|
UNION ALL
|
|
|
|
|
|
(SELECT COUNT(DISTINCT TEST.no_rss),
|
|
|
0,
|
|
|
-9999999,
|
|
|
COUNT(DISTINCT TEST.no_rss),
|
|
|
'',
|
|
|
'',
|
|
|
SUM(nb_rsa)::text || ' séjours, ' || COUNT(DISTINCT patient_id)::text || ' patients' ,
|
|
|
'',
|
|
|
0,
|
|
|
'',
|
|
|
'',
|
|
|
'',
|
|
|
'',
|
|
|
'',
|
|
|
null,
|
|
|
null,
|
|
|
null,
|
|
|
'',
|
|
|
'',
|
|
|
sum(duree_sejour),
|
|
|
sum(nb_rsa),
|
|
|
sum(nb_rum),
|
|
|
sum(nb_seances),
|
|
|
0
|
|
|
|
|
|
FROM TEST
|
|
|
)
|
|
|
|
|
|
ORDER BY 2
|
|
|
|
|
|
">
|
|
|
<FIELDS>
|
|
|
<FIELD name="RAK"/>
|
|
|
<FIELD name="RDM"/>
|
|
|
<FIELD name="OID"/>
|
|
|
<FIELD name="RSS"/>
|
|
|
<FIELD name="SEJ"/>
|
|
|
<FIELD name="FIN"/>
|
|
|
<FIELD name="NOM" ifHideNames="Non autorisé"/>
|
|
|
<FIELD name="SEX"/>
|
|
|
<FIELD name="AGE"/>
|
|
|
<FIELD name="GHM"/>
|
|
|
<FIELD name="GHS"/>
|
|
|
<FIELD name="OAP"/>
|
|
|
<FIELD name="MED"/>
|
|
|
<FIELD name="DIAGP"/>
|
|
|
<FIELD name="DATE_NAI"/>
|
|
|
<FIELD name="DATE"/>
|
|
|
<FIELD name="DATS"/>
|
|
|
<FIELD name="MODS"/>
|
|
|
<FIELD name="PROV"/>
|
|
|
<FIELD name="NBJ"/>
|
|
|
<FIELD name="NRSA"/>
|
|
|
<FIELD name="NRUM"/>
|
|
|
<FIELD name="NSEA"/>
|
|
|
|
|
|
</FIELDS>
|
|
|
</SQL>
|
|
|
</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="Liste RSS">
|
|
|
<DATAGRID title="" total="true" key="RSS" headerHeight="36" 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="RDM" type="Char" visible="false">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="RAK" width="40" type="Number" visible="true" headerText="Rang" outputFormat="#" textAlign="left">
|
|
|
</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" otherFunction="text" totalFunction="text" totalComplement="*ROW">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="SEX" width="40" type="Char" visible="true" headerText="Sexe" textAlign="right" otherFunction="text" totalFunction="text">
|
|
|
<CELLSTYLE name="cellIndicator" value="femme, 12,left middle , 0xEB76B1" condition="ROW.SEX == '2'" />
|
|
|
<CELLSTYLE name="cellIndicator" value="homme, 12,left middle , 0x75a0eb " condition="ROW.SEX == '1'" />
|
|
|
<CELLSTYLE name="cellIndicator" value="rectangle, 10,left middle , #FF5001 " condition="ROW.SEX == '3'" />
|
|
|
<CELLSTYLE name="cellIndicator" value="rectangle, 10, left middle, 0x666666" condition="ROW.SEX != '2' && ROW.SEX != '1' && ROW.SEX != '3'" />
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="DATE_NAI" width="70" type="Date" inputFormat="AAAA-MM-JJ" outputFormat="DD/MM/YY" visible="true" headerText="Date de Naissance" textAlign="right" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="AGE" width="40" type="Number" outputFormat="#" visible="true" headerText="Age" textAlign="right" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="DATE" width="60" type="Date" inputFormat="AAAA-MM-JJ" outputFormat="DD/MM/YY" visible="true" headerText="Date entrée" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="DATS" width="60" type="Date" inputFormat="AAAA-MM-JJ" outputFormat="DD/MM/YY" visible="true" headerText="Date sortie" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="PROV" width="45" type="Char" visible="true" fixed="false" headerText="Prov." textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="MODS" width="45" type="Char" inputFormat="AAAA-MM-JJ" outputFormat="DD/MM/YY" visible="true" fixed="false" headerText="Mode Sortie" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NBJ" width="50" visible="true" type="Number" outputFormat="#" headerText="Durée séjour" fixed="false" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="GHM" width="60" type="Char" visible="true" headerText="GHM" fixed="false" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="GHS" width="60" type="Char" visible="true" headerText="GHS" fixed="false" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="OAP" width="50" type="Char" visible="true" headerText="OAP" fixed="false" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="MED" width="60" type="Char" visible="true" headerText="Médecin" fixed="false" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="DIAGP" width="50" type="Char" visible="true" headerText="Diag P" fixed="false" textAlign="left" otherFunction="text" totalFunction="text">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NRSA" width="55" visible="false" type="Number" outputFormat="#" fixed="false" headerText="Nb séjours" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NRUM" width="55" visible="true" type="Number" outputFormat="#" fixed="false" headerText="Nb RUM" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
<COLUMN dataField="NSEA" width="55" visible="true" type="Number" outputFormat="#" headerText="Nb séances" fixed="false" textAlign="right" totalFunction="sum" otherFunction="sum">
|
|
|
</COLUMN>
|
|
|
</DATAGRID>
|
|
|
</ONGLET>
|
|
|
</PRESENTATION>
|
|
|
</VUE>
|