<?xml version="1.0" encoding="ISO-8859-1"?>
<VUE name="PMSI000055" 
	label="PMSI. Extrait de base de données" 
	title="= 'Extrait de base de données (' + 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">
	<CACHE cachable="false" />
	<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 label="Données">
			<FIELD name="CSVRSS" label="RSS" UI="check" selectedValue="1" unselectedValue="0" default="1" />
			<FIELD name="CSVRUM" label="RUM" UI="check" selectedValue="1" unselectedValue="0" default="0" />
			<FIELD name="CSVDIAG" label="Diagnostics" UI="check" selectedValue="1" unselectedValue="0" default="0" />
			<FIELD name="CSVACTE" label="Actes" UI="check" selectedValue="1" unselectedValue="0" default="0" />
			<FIELD name="CSVPRESTA" label="Prestations" UI="check" selectedValue="1" unselectedValue="0" default="0" />
			<FIELD name="CSVLPP" label="LPP" UI="check" selectedValue="1" unselectedValue="0" default="0" />
			<FIELD name="CSVUCD" label="UCD" UI="check" selectedValue="1" unselectedValue="0" default="0" />
		</GROUP>
		<GROUP label="Format">
			<FIELD name="CSVFMT" label="" UI="combo" default="DFT">
				<OPTION label="Format par défaut du PC" data="DFT" />
				<OPTION label="SILK (Excel et OpenOffice)" data="SLK"  />
				<OPTION label="SILK sans limite (Excel 2007 et OpenOffice)" data="SLK_EXCEL2007"  />
				<OPTION label="CSV avec ; (Excel)" data="CSV_PV" />
				<OPTION label="CSV avec ; sans limite (Excel 2007)" data="CSV_EXCEL2007_PV" />
				<OPTION label="CSV avec , (OpenOffice)" data="CSV_V"  />
				<OPTION label="CSV sans entete avec |" data="CSV_PIPE_WITHOUT_HEADER" />
			</FIELD>
		</GROUP>
		
	</SELECTIONS>
		
	<SELECTIONS componentName="FILTRES_RSS_SELECTIONS" />
		

	<QUERIES>
		<QUERY label="RSS"> 
			<SQL optimizer="V_RSS_X">
				<select><![CDATA[
				
				SELECT v_rss_1.finess, 
						CASE WHEN v_rss_1.no_patient &gt; 0 THEN v_rss_1.no_patient ELSE 0 END,
						v_rss_1.matricule_assure, v_rss_1.no_sejour_administratif,
						v_rss_1.no_rss, identite_nom || ' ' || identite_prenom, 
                        CASE WHEN identite_nom_naissance <> identite_nom THEN identite_nom_naissance ELSE ' ' END,
						date_entree, date_sortie, en_cours_texte_tres_court, sexe_texte_court, date_naissance, age, code_postal,
                        CASE WHEN base.t_codes_postaux.texte <> '' THEN texte ELSE 'Non renseigné' END,
						mode_entree, mode_entree_texte, provenance, provenance_texte,
						mode_sortie, mode_sortie_texte, destination, destination_texte,
						unite_medicale_principale_code, unite_medicale_principale_texte,
						CASE WHEN cmd_id > 0 THEN cmd_code ELSE '' END, CASE WHEN cmd_id >  0 THEN cmd_texte ELSE '' END,
						CASE WHEN ghm_id > 0 THEN ghm_code ELSE '' END, CASE WHEN cmd_id >  0 THEN ghm_texte ELSE '' END,
						mco, ghs_code, ghs_texte, ghs_borne_basse, ghs_borne_haute, dms_nationale_ghs, 
						CASE WHEN cas_id > 0 THEN cas_code ELSE '' END, CASE WHEN cas_id >  0 THEN cas_texte ELSE '' END,
						CASE WHEN pole_oap_id > 0 THEN pole_oap_code ELSE '' END, CASE WHEN pole_oap_id >  0 THEN pole_oap_texte ELSE '' END,
						CASE WHEN ligne_oap_id > 0 THEN ligne_oap_code ELSE '' END, CASE WHEN ligne_oap_id >  0 THEN ligne_oap_texte ELSE '' END,
						CASE WHEN ghm_section_id[7] > 0 THEN ghm_section_code[7] ELSE '' END, CASE WHEN ghm_section_id[7] >  0 THEN ghm_section_texte[7] ELSE '' END,
						CASE WHEN ghm_section_id[8] > 0 THEN ghm_section_code[8] ELSE '' END, CASE WHEN ghm_section_id[8] >  0 THEN ghm_section_texte[8] ELSE '' END,
						CASE WHEN ghm_section_id[9] > 0 THEN ghm_section_code[9] ELSE '' END, CASE WHEN ghm_section_id[9] >  0 THEN ghm_section_texte[9] ELSE '' END,
						CASE WHEN specialite_interne_medecin_reference_rss_id > 0 THEN specialite_interne_medecin_reference_rss_code ELSE '' END,
						CASE WHEN specialite_interne_medecin_reference_rss_id > 0 THEN specialite_interne_medecin_reference_rss_texte ELSE '' END,
						CASE WHEN medecin_reference_rss_id > 0 THEN medecin_reference_rss_code ELSE '' END, 
						CASE WHEN medecin_reference_rss_id > 0 THEN medecin_reference_rss_nom ELSE '' END, 
						CASE WHEN diagnostic_principal_id > 0 THEN diagnostic_principal_code ELSE '' END, CASE WHEN diagnostic_principal_id > 0 THEN diagnostic_principal_texte ELSE '' END,
						CASE WHEN diagnostic_relie_id > 0 THEN diagnostic_relie_code ELSE '' END, CASE WHEN diagnostic_relie_id > 0 THEN diagnostic_relie_texte ELSE '' END,
						subview_d.diagnostics_associes_codes,
						acte_principal_code, acte_principal_texte,
						subview_a.actes_codes,  
						nb_rsa, nb_rum, duree_sejour, nb_seances,
						poids_bebe,age_gestationnel,
						CASE WHEN date_dernieres_regles = '2099-12-31' THEN null ELSE date_dernieres_regles END,
						confirmation_codage,type_machine_rdth,type_dosimetrie,numero_innovation,
						base_remboursement, ca_ghs, t2a_facture, dmi_facture, phc_facture,
						nb_exb, ca_exb, nb_exh, ca_exh, honoraires_factures,
						igs2,date_groupage,
                        conversion_hp_hc_id::text || ' : ' || conversion_hp_hc_texte ,
                        raac_id::text || ' : ' ||raac_texte,
						etablissement_provenance_code,
						etablissement_provenance_texte,
						etablissement_destination_code,
						etablissement_destination_texte,
						ca_ghs_sans_coefficient
					FROM #V_RSS_X#
          JOIN base.t_codes_postaux ON t_codes_postaux.code = v_rss_1.code_postal
					LEFT JOIN pmsi.p_rss_etat ON p_rss_etat.rss_id = v_rss_1.rss_id
					LEFT JOIN (
								SELECT 
									v_rss_actes_1.rss_id, 
									base.cti_group_concat(DISTINCT COALESCE(acte_ccam_descriptif_code,acte_code)) as actes_codes 
								FROM 
									#V_RSS_X#
									JOIN pmsi.v_rss_actes_1 ON v_rss_actes_1.rss_id = v_rss_1.rss_id
									LEFT JOIN pmsi.v_acte_ccam_descriptif_link ON v_rss_actes_1.acte_ccam_descriptif_id = link_acte_ccam_descriptif_id
								WHERE 
									date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
									[VIEW.FILTRE_RSS_SELECT]
								GROUP BY v_rss_actes_1.rss_id
							) subview_a ON subview_a.rss_id = v_rss_1.rss_id
					LEFT JOIN (
								SELECT 
									v_rss_diagnostics_1.rss_id, 
									base.cti_group_concat(DISTINCT diagnostic_code) as diagnostics_associes_codes 
								FROM #V_RSS_X#
									JOIN pmsi.v_rss_diagnostics_1  ON v_rss_diagnostics_1.rss_id = v_rss_1.rss_id
								WHERE 
									type_diagnostic_rss &lt;&gt; 'DP' and type_diagnostic_rss &lt;&gt; 'DR' 
									AND date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
									[VIEW.FILTRE_RSS_SELECT]
								GROUP BY v_rss_diagnostics_1.rss_id
							) subview_d ON subview_d.rss_id = v_rss_1.rss_id
				WHERE 
					date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
					[VIEW.FILTRE_RSS_SELECT]
				ORDER BY v_rss_1.no_rss
					
				]]></select>
				<FIELDS>
					<FIELD name="FINESS" />
					<FIELD name="NPAT" />
					<FIELD name="MAT" />
					<FIELD name="NSEJ" />
					<FIELD name="RSS" />
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
					<FIELD name="NOMNAISS" ifHideNames="Non autorisé"/>
					<FIELD name="DATENT" />
					<FIELD name="DATSOR" />
					<FIELD name="EXP" />
					<FIELD name="SEXE" />
					<FIELD name="DATNAI" ifHideNames="Non autorisé"/>
					<FIELD name="AGE" />
					<FIELD name="CODPOS" />
					<FIELD name="VILLE" />
					<FIELD name="MODENTCOD" />
					<FIELD name="MODENTTXT" />
					<FIELD name="PROVENCOD" />
					<FIELD name="PROVENTXT" />
					<FIELD name="MODSORCOD" />
					<FIELD name="MODSORTXT" />
					<FIELD name="DESTINCOD" />
					<FIELD name="DESTINTXT" />
					<FIELD name="UMPCOD" />
					<FIELD name="UMPTXT" />
					<FIELD name="CMDCOD" />
					<FIELD name="CMDTXT" />
					<FIELD name="GHMCOD" />
					<FIELD name="GHMTXT" />
					<FIELD name="ASO" />
					<FIELD name="GHSCOD" />
					<FIELD name="GHSTXT" />
					<FIELD name="GHSBAS" />
					<FIELD name="GHSHAU" />
					<FIELD name="GHSDMS" />
					<FIELD name="CASCOD" />
					<FIELD name="CASTXT" />
					<FIELD name="POLOAPCOD" />
					<FIELD name="POLOAPTXT" />
					<FIELD name="LIGOAPCOD" />
					<FIELD name="LIGOAPTXT" />
                    <FIELD name="GACOD" />
					<FIELD name="GATXT" />
					<FIELD name="GAPCOD" />
					<FIELD name="GAPTXT" />
                    <FIELD name="DACOD" />
					<FIELD name="DATXT" />
					<FIELD name="SPEMEDRSSCOD" />
					<FIELD name="SPEMEDRSSTXT" />
					<FIELD name="MEDRSSCOD" />
					<FIELD name="MEDRSSTXT" />
					<FIELD name="DIAGPCOD" />
					<FIELD name="DIAGPTXT" />
					<FIELD name="DIAGRCOD" />
					<FIELD name="DIAGRTXT" />
					<FIELD name="DIAGSACOD" />
					<FIELD name="ACTEPPLCOD" />
					<FIELD name="ACTEPPLTXT" />
					<FIELD name="ACTESCOD" />
					<FIELD name="NBRSA"/>
					<FIELD name="NBRUM"/>
					<FIELD name="NBJ"/>
					<FIELD name="NBSEA"/>
					<FIELD name="POIDSBB"/>
					<FIELD name="AGEGEST"/>
					<FIELD name="DATEREG"/>
					<FIELD name="CONFCOD"/>
					<FIELD name="TYPRDTH"/>
					<FIELD name="TYPDOSI"/>
					<FIELD name="NOINNOV"/>
					<FIELD name="CA"/>
					<FIELD name="CAGHS"/>
					<FIELD name="CAT2A"/>
					<FIELD name="CADMI"/>
					<FIELD name="CAPHC"/>
					<FIELD name="NBEXB" />
					<FIELD name="CAEXB" />
					<FIELD name="NBEXH" />
					<FIELD name="CAEXH" />
					<FIELD name="CAHON" />
					<FIELD name="IGS2" />
					<FIELD name="DATGRP" />
					<FIELD name="CONHPHC" />
					<FIELD name="RAAC" />
					<FIELD name="ETABPROVCOD" />
					<FIELD name="ETABPROVTXT" />
					<FIELD name="ETABDESTINCOD" />
					<FIELD name="ETABDESTINTXT" />
					<FIELD name="CA_GHS_BRUT" />
				</FIELDS>
			</SQL>
		</QUERY>
		
		<QUERY label="Prestations"> 
			
			<SQL optimizer="V_RSS_X">
				<select><![CDATA[
				
					SELECT v_rss_1.finess, v_rss_1.no_sejour_administratif, v_rss_1.matricule_assure,
						v_rss_1.no_rss, identite_nom || ' ' || identite_prenom,
                        CASE WHEN identite_nom_naissance <> identite_nom THEN identite_nom_naissance ELSE ' ' END, 
						v_rss_1.date_entree, v_rss_1.date_sortie, en_cours_texte_tres_court, sexe_texte_court, v_rss_1.date_naissance, v_rss_1.age, v_rss_1.code_postal,
                        CASE WHEN base.t_codes_postaux.texte <> '' THEN texte ELSE 'Non renseigné' END,
						mode_entree, mode_entree_texte, provenance, provenance_texte,
						mode_sortie, mode_sortie_texte, destination, destination_texte,
						unite_medicale_principale_code, unite_medicale_principale_texte, 
						v_rss_1.igs2,
						v_rss_1.cmd_code, v_rss_1.cmd_texte, 
						v_rss_1.ghm_code, v_rss_1.ghm_texte, v_rss_1.mco, v_rss_1.ghs_code, v_rss_1.ghs_texte, v_rss_1.ghs_borne_basse, v_rss_1.ghs_borne_haute, v_rss_1.dms_nationale_ghs, 
						v_rss_1.cas_code, v_rss_1.cas_texte,v_rss_1.pole_oap_code, pole_oap_texte, v_rss_1.ligne_oap_code, v_rss_1.ligne_oap_texte, 
                        v_rss_1.ghm_section_code[7], v_rss_1.ghm_section_texte[7],v_rss_1.ghm_section_code[8], v_rss_1.ghm_section_texte[8],v_rss_1.ghm_section_code[9], v_rss_1.ghm_section_texte[9],
						specialite_interne_medecin_reference_rss_code, specialite_interne_medecin_reference_rss_texte, medecin_reference_rss_code, medecin_reference_rss_nom,
						diagnostic_principal_code, diagnostic_principal_texte, diagnostic_relie_code, diagnostic_relie_texte, acte_principal_code, acte_principal_texte,  

						v_rsf_detail_1.date_debut, v_rsf_detail_1.date_fin,  
						v_rsf_detail_1.prestation_code, v_rsf_detail_1.prestation_texte,
						v_rsf_detail_1.nombre, v_rsf_detail_1.coefficient, v_rsf_detail_1.coefficient_mco, v_rsf_detail_1.prix_unitaire, v_rsf_detail_1.base_remboursement
						
					FROM #V_RSS_X#
						JOIN pmsi.v_rsf_detail_1 ON v_rss_1.rss_id = v_rsf_detail_1.rss_id
                        JOIN base.t_codes_postaux ON t_codes_postaux.code = v_rss_1.code_postal
					WHERE 
						date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.FILTRE_RSS_SELECT]
					ORDER BY v_rss_1.no_rss
					
				]]></select> 
				<FIELDS>
					<FIELD name="FINESS" />
					<FIELD name="NSEJ" />
                    <FIELD name="MAT" />
					<FIELD name="RSS" />
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
                    <FIELD name="NOMNAISS" ifHideNames="Non autorisé"/>
					<FIELD name="DATENT" />
					<FIELD name="DATSOR" />
					<FIELD name="EXP" />
					<FIELD name="SEXE" />
					<FIELD name="DATNAI" ifHideNames="Non autorisé"/>
					<FIELD name="AGE" />
					<FIELD name="CODPOS" />
					<FIELD name="VILLE" />
					<FIELD name="MODENTCOD" />
					<FIELD name="MODENTTXT" />
					<FIELD name="PROVENCOD" />
					<FIELD name="PROVENTXT" />
					<FIELD name="MODSORCOD" />
					<FIELD name="MODSORTXT" />
					<FIELD name="DESTINCOD" />
					<FIELD name="DESTINTXT" />
					<FIELD name="UMPCOD" />
					<FIELD name="UMPTXT" />
					<FIELD name="IGS2" />
					<FIELD name="CMDCOD" />
					<FIELD name="CMDTXT" />
					<FIELD name="GHMCOD" />
					<FIELD name="GHMTXT" />
					<FIELD name="ASO" />
					<FIELD name="GHSCOD" />
					<FIELD name="GHSTXT" />
					<FIELD name="GHSBAS" />
					<FIELD name="GHSHAU" />
					<FIELD name="GHSDMS" />
                    <FIELD name="CASCOD" />
					<FIELD name="CASTXT" />
					<FIELD name="POLOAPCOD" />
					<FIELD name="POLOAPTXT" />
					<FIELD name="LIGOAPCOD" />
					<FIELD name="LIGOAPTXT" />
					<FIELD name="GACOD" />
					<FIELD name="GATXT" />
					<FIELD name="GAPCOD" />
					<FIELD name="GAPTXT" />
                    <FIELD name="DACOD" />
					<FIELD name="DATXT" />
					<FIELD name="SPEMEDRSSCOD" />
					<FIELD name="SPEMEDRSSTXT" />
					<FIELD name="MEDRSSCOD" />
					<FIELD name="MEDRSSTXT" />
					<FIELD name="DIAGPCOD" />
					<FIELD name="DIAGPTXT" />
					<FIELD name="DIAGRCOD" />
					<FIELD name="DIAGRTXT" />
					<FIELD name="ACTEPPLCOD" />
					<FIELD name="ACTEPPLTXT" />
					<FIELD name="DATDEB"/>
					<FIELD name="DATFIN"/>
					<FIELD name="PRECOD"/>
					<FIELD name="PRETXT"/>
					<FIELD name="NB" />
					<FIELD name="COEF" />
					<FIELD name="COEFMCO" />
					<FIELD name="PU" />
					<FIELD name="CA" />
				</FIELDS>
			</SQL>
			
			
		</QUERY>
		
		<QUERY label="LPP"> 
			
			<SQL optimizer="V_RSS_X">
				<select><![CDATA[
				
					SELECT v_rss_1.finess, v_rss_1.no_sejour_administratif, v_rss_1.matricule_assure,
						v_rss_1.no_rss, identite_nom || ' ' || identite_prenom,
                        CASE WHEN identite_nom_naissance <> identite_nom THEN identite_nom_naissance ELSE ' ' END,
						v_rss_1.date_entree, v_rss_1.date_sortie, en_cours_texte_tres_court, sexe_texte_court, v_rss_1.date_naissance, v_rss_1.age, v_rss_1.code_postal,
                        CASE WHEN base.t_codes_postaux.texte <> '' THEN texte ELSE 'Non renseigné' END,
						mode_entree, mode_entree_texte, provenance, provenance_texte,
						mode_sortie, mode_sortie_texte, destination, destination_texte,
						unite_medicale_principale_code, unite_medicale_principale_texte, 
						v_rss_1.cmd_code, v_rss_1.cmd_texte, 
						v_rss_1.ghm_code, v_rss_1.ghm_texte, v_rss_1.mco, v_rss_1.ghs_code, v_rss_1.ghs_texte, v_rss_1.ghs_borne_basse, v_rss_1.ghs_borne_haute, v_rss_1.dms_nationale_ghs, 
						v_rss_1.cas_code, v_rss_1.cas_texte,v_rss_1.pole_oap_code, pole_oap_texte, v_rss_1.ligne_oap_code, v_rss_1.ligne_oap_texte,
                        v_rss_1.ghm_section_code[7], v_rss_1.ghm_section_texte[7],v_rss_1.ghm_section_code[8], v_rss_1.ghm_section_texte[8],v_rss_1.ghm_section_code[9], v_rss_1.ghm_section_texte[9],
						specialite_interne_medecin_reference_rss_code, specialite_interne_medecin_reference_rss_texte, medecin_reference_rss_code, medecin_reference_rss_nom,
						diagnostic_principal_code, diagnostic_principal_texte, diagnostic_relie_code, diagnostic_relie_texte, acte_principal_code, acte_principal_texte,   

						v_rss_lpp_1.date_lpp, 
						v_rss_lpp_1.lpp_code, v_rss_lpp_1.lpp_texte,
						v_rss_lpp_1.nombre, v_rss_lpp_1.prix_unitaire, v_rss_lpp_1.montant_facture
						
					FROM #V_RSS_X#
						JOIN pmsi.v_rss_lpp_1 ON v_rss_1.rss_id = v_rss_lpp_1.rss_id
                        JOIN base.t_codes_postaux ON t_codes_postaux.code = v_rss_1.code_postal
					WHERE 
						date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.FILTRE_RSS_SELECT]
					ORDER BY v_rss_1.no_rss
					
				]]></select>  
				<FIELDS>
					<FIELD name="FINESS" />
					<FIELD name="NSEJ" />
                    <FIELD name="MAT" />
					<FIELD name="RSS" />
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
                    <FIELD name="NOMNAISS" ifHideNames="Non autorisé"/>
					<FIELD name="DATENT" />
					<FIELD name="DATSOR" />
					<FIELD name="EXP" />
					<FIELD name="SEXE" />
					<FIELD name="DATNAI" ifHideNames="Non autorisé"/>
					<FIELD name="AGE" />
					<FIELD name="CODPOS" />
					<FIELD name="VILLE" />
					<FIELD name="MODENTCOD" />
					<FIELD name="MODENTTXT" />
					<FIELD name="PROVENCOD" />
					<FIELD name="PROVENTXT" />
					<FIELD name="MODSORCOD" />
					<FIELD name="MODSORTXT" />
					<FIELD name="DESTINCOD" />
					<FIELD name="DESTINTXT" />
					<FIELD name="UMPCOD" />
					<FIELD name="UMPTXT" />
					<FIELD name="CMDCOD" />
					<FIELD name="CMDTXT" />
					<FIELD name="GHMCOD" />
					<FIELD name="GHMTXT" />
					<FIELD name="ASO" />
					<FIELD name="GHSCOD" />
					<FIELD name="GHSTXT" />
					<FIELD name="GHSBAS" />
					<FIELD name="GHSHAU" />
					<FIELD name="GHSDMS" />
                    <FIELD name="CASCOD" />
					<FIELD name="CASTXT" />
					<FIELD name="POLOAPCOD" />
					<FIELD name="POLOAPTXT" />
					<FIELD name="LIGOAPCOD" />
					<FIELD name="LIGOAPTXT" />
					<FIELD name="GACOD" />
					<FIELD name="GATXT" />
					<FIELD name="GAPCOD" />
					<FIELD name="GAPTXT" />
                    <FIELD name="DACOD" />
					<FIELD name="DATXT" />
					<FIELD name="SPEMEDRSSCOD" />
					<FIELD name="SPEMEDRSSTXT" />
					<FIELD name="MEDRSSCOD" />
					<FIELD name="MEDRSSTXT" />
					<FIELD name="DIAGPCOD" />
					<FIELD name="DIAGPTXT" />
					<FIELD name="DIAGRCOD" />
					<FIELD name="DIAGRTXT" />
					<FIELD name="ACTEPPLCOD" />
					<FIELD name="ACTEPPLTXT" />
					<FIELD name="DATLPP"/>
					<FIELD name="LPPCOD"/>
					<FIELD name="LPPTXT"/>
					<FIELD name="NB" />
					<FIELD name="PU" />
					<FIELD name="CA" />
				</FIELDS>
			</SQL>
			
			
		</QUERY>
		
		
		<QUERY label="Actes"> 
			
			<SQL optimizer="V_RSS_X">
				<select><![CDATA[
				
					SELECT v_rss_1.finess, v_rss_1.no_sejour_administratif, v_rss_1.matricule_assure,
						v_rss_1.no_rss, identite_nom || ' ' || identite_prenom, 
                        CASE WHEN identite_nom_naissance <> identite_nom THEN identite_nom_naissance ELSE ' ' END,
						date_entree, date_sortie, en_cours_texte_tres_court, sexe_texte_court, date_naissance, age, code_postal,
                        CASE WHEN base.t_codes_postaux.texte <> '' THEN texte ELSE 'Non renseigné' END,
						mode_entree, mode_entree_texte, provenance, provenance_texte,
						mode_sortie, mode_sortie_texte, destination, destination_texte,
						unite_medicale_principale_code, unite_medicale_principale_texte, 
						cmd_code, cmd_texte, 
						ghm_code, ghm_texte, mco, ghs_code, ghs_texte, ghs_borne_basse, ghs_borne_haute, dms_nationale_ghs, 
						cas_code, cas_texte,pole_oap_code, pole_oap_texte, ligne_oap_code, ligne_oap_texte,
                        v_rss_1.ghm_section_code[7], v_rss_1.ghm_section_texte[7],v_rss_1.ghm_section_code[8], v_rss_1.ghm_section_texte[8],v_rss_1.ghm_section_code[9], v_rss_1.ghm_section_texte[9],
						specialite_interne_medecin_reference_rss_code, specialite_interne_medecin_reference_rss_texte, medecin_reference_rss_code, medecin_reference_rss_nom,
						diagnostic_principal_code, diagnostic_principal_texte, diagnostic_relie_code, diagnostic_relie_texte,

						date_acte, 
						acte_code,
						CASE WHEN acte_principal_id = v_rss_actes_1.acte_id THEN '1'::char(1) ELSE '0'::char(1) END as acte_principal,
						activite_ccam, acte_texte, acte_nomenclature,
						acte_regroupement_code, acte_regroupement_texte, acte_classant,
						geste_marqueur_code, geste_marqueur_texte,
						specialite_medecin_code, specialite_medecin_texte, medecin_code, medecin_nom,
						nombre, icr, icr_prive_atih, icr_public_atih
						
					FROM #V_RSS_X# 
						JOIN pmsi.v_rss_actes_1 ON v_rss_1.rss_id = v_rss_actes_1.rss_id
                        JOIN base.t_codes_postaux ON t_codes_postaux.code = v_rss_1.code_postal
					WHERE 
						date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.FILTRE_RSS_SELECT]
					ORDER BY v_rss_1.no_rss
					
				]]></select>  
				<FIELDS>
					<FIELD name="FINESS" />
					<FIELD name="NSEJ" />
                    <FIELD name="MAT" />
					<FIELD name="RSS" />
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
                    <FIELD name="NOMNAISS" ifHideNames="Non autorisé"/>
					<FIELD name="DATENT" />
					<FIELD name="DATSOR" />
					<FIELD name="EXP" />
					<FIELD name="SEXE" />
					<FIELD name="DATNAI" ifHideNames="Non autorisé"/>
					<FIELD name="AGE" />
					<FIELD name="CODPOS" />
					<FIELD name="VILLE" />
					<FIELD name="MODENTCOD" />
					<FIELD name="MODENTTXT" />
					<FIELD name="PROVENCOD" />
					<FIELD name="PROVENTXT" />
					<FIELD name="MODSORCOD" />
					<FIELD name="MODSORTXT" />
					<FIELD name="DESTINCOD" />
					<FIELD name="DESTINTXT" />
					<FIELD name="UMPCOD" />
					<FIELD name="UMPTXT" />
					<FIELD name="CMDCOD" />
					<FIELD name="CMDTXT" />
					<FIELD name="GHMCOD" />
					<FIELD name="GHMTXT" />
					<FIELD name="ASO" />
					<FIELD name="GHSCOD" />
					<FIELD name="GHSTXT" />
					<FIELD name="GHSBAS" />
					<FIELD name="GHSHAU" />
					<FIELD name="GHSDMS" />
                    <FIELD name="CASCOD" />
					<FIELD name="CASTXT" />
					<FIELD name="POLOAPCOD" />
					<FIELD name="POLOAPTXT" />
					<FIELD name="LIGOAPCOD" />
					<FIELD name="LIGOAPTXT" />
					<FIELD name="GACOD" />
					<FIELD name="GATXT" />
					<FIELD name="GAPCOD" />
					<FIELD name="GAPTXT" />
                    <FIELD name="DACOD" />
					<FIELD name="DATXT" />
					<FIELD name="SPEMEDRSSCOD" />
					<FIELD name="SPEMEDRSSTXT" />
					<FIELD name="MEDRSSCOD" />
					<FIELD name="MEDRSSTXT" />
					<FIELD name="DIAGPCOD" />
					<FIELD name="DIAGPTXT" />
					<FIELD name="DIAGRCOD" />
					<FIELD name="DIAGRTXT" />
					
					<FIELD name="DATACT"/>
					<FIELD name="ACTCOD"/>
					<FIELD name="ACTPRINCIPAL"/>
					<FIELD name="ACTACTCOD"/>
					<FIELD name="ACTTXT"/>
					<FIELD name="ACTNOMCOD"/>
					<FIELD name="ACTREGCOD"/>
					<FIELD name="ACTREGTXT"/>
					<FIELD name="ACTCLA"/>
					<FIELD name="GESMARCOD"/>
					<FIELD name="GESMARTXT"/>
					<FIELD name="SPEMEDCOD" />
					<FIELD name="SPEMEDTXT" />
					<FIELD name="MEDCOD" />
					<FIELD name="MEDTXT" />
					<FIELD name="NBACT" />
					<FIELD name="NBICR" />
					<FIELD name="NBICRATIHPRIVE" />
					<FIELD name="NBICRATIHPUBLIC" />
				</FIELDS>
			</SQL>
			
			
		</QUERY>
		
		<QUERY label="Diagnostics"> 
			
			<SQL optimizer="V_RSS_X">
				<select><![CDATA[
				
					SELECT v_rss_1.finess, v_rss_1.no_sejour_administratif, v_rss_1.matricule_assure,
						v_rss_1.no_rss, identite_nom || ' ' || identite_prenom, 
                        CASE WHEN identite_nom_naissance <> identite_nom THEN identite_nom_naissance ELSE ' ' END,
						v_rss_1.date_entree, v_rss_1.date_sortie, v_rss_1.en_cours_texte_tres_court, sexe_texte_court, v_rss_1.date_naissance, v_rss_1.age, v_rss_1.code_postal, CASE WHEN base.t_codes_postaux.texte <> '' THEN texte ELSE 'Non renseigné' END,
						mode_entree, mode_entree_texte, provenance, provenance_texte,
						mode_sortie, mode_sortie_texte, destination, destination_texte,
						unite_medicale_principale_code, unite_medicale_principale_texte, 
						v_rss_1.cmd_code, v_rss_1.cmd_texte, 
						v_rss_1.ghm_code, v_rss_1.ghm_texte, v_rss_1.mco, v_rss_1.ghs_code, v_rss_1.ghs_texte, v_rss_1.ghs_borne_basse, v_rss_1.ghs_borne_haute, v_rss_1.dms_nationale_ghs, 
						v_rss_1.cas_code, v_rss_1.cas_texte,v_rss_1.pole_oap_code, pole_oap_texte, v_rss_1.ligne_oap_code, v_rss_1.ligne_oap_texte, 
                        v_rss_1.ghm_section_code[7], v_rss_1.ghm_section_texte[7],v_rss_1.ghm_section_code[8], v_rss_1.ghm_section_texte[8],v_rss_1.ghm_section_code[9], v_rss_1.ghm_section_texte[9],
						specialite_interne_medecin_reference_rss_code, specialite_interne_medecin_reference_rss_texte, medecin_reference_rss_code, medecin_reference_rss_nom,
						diagnostic_principal_code, diagnostic_principal_texte, diagnostic_relie_code, diagnostic_relie_texte, acte_principal_code, acte_principal_texte,    

						v_rss_diagnostics_1.diagnostic_code, v_rss_diagnostics_1.diagnostic_texte, v_rss_diagnostics_1.type_diagnostic_rss
											
					FROM #V_RSS_X#
						JOIN pmsi.v_rss_diagnostics_1  ON v_rss_1.rss_id = v_rss_diagnostics_1.rss_id
                        JOIN base.t_codes_postaux ON t_codes_postaux.code = v_rss_1.code_postal
					WHERE 
						date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.FILTRE_RSS_SELECT]
					ORDER BY v_rss_1.no_rss
					
				]]></select>   
				<FIELDS>
					<FIELD name="FINESS" />
					<FIELD name="NSEJ" />
                    <FIELD name="MAT" />
					<FIELD name="RSS" />
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
                    <FIELD name="NOMNAISS" ifHideNames="Non autorisé"/>
					<FIELD name="DATENT" />
					<FIELD name="DATSOR" />
					<FIELD name="EXP" />
					<FIELD name="SEXE" />
					<FIELD name="DATNAI" ifHideNames="Non autorisé"/>
					<FIELD name="AGE" />
					<FIELD name="CODPOS" />
					<FIELD name="VILLE" />
					<FIELD name="MODENTCOD" />
					<FIELD name="MODENTTXT" />
					<FIELD name="PROVENCOD" />
					<FIELD name="PROVENTXT" />
					<FIELD name="MODSORCOD" />
					<FIELD name="MODSORTXT" />
					<FIELD name="DESTINCOD" />
					<FIELD name="DESTINTXT" />
					<FIELD name="UMPCOD" />
					<FIELD name="UMPTXT" />
					<FIELD name="CMDCOD" />
					<FIELD name="CMDTXT" />
					<FIELD name="GHMCOD" />
					<FIELD name="GHMTXT" />
					<FIELD name="ASO" />
					<FIELD name="GHSCOD" />
					<FIELD name="GHSTXT" />
					<FIELD name="GHSBAS" />
					<FIELD name="GHSHAU" />
					<FIELD name="GHSDMS" />
                    <FIELD name="CASCOD" />
					<FIELD name="CASTXT" />
					<FIELD name="POLOAPCOD" />
					<FIELD name="POLOAPTXT" />
					<FIELD name="LIGOAPCOD" />
					<FIELD name="LIGOAPTXT" />
					<FIELD name="GACOD" />
					<FIELD name="GATXT" />
					<FIELD name="GAPCOD" />
					<FIELD name="GAPTXT" />
                    <FIELD name="DACOD" />
					<FIELD name="DATXT" />
					<FIELD name="SPEMEDRSSCOD" />
					<FIELD name="SPEMEDRSSTXT" />
					<FIELD name="MEDRSSCOD" />
					<FIELD name="MEDRSSTXT" />
					<FIELD name="DIAGPCOD" />
					<FIELD name="DIAGPTXT" />
					<FIELD name="DIAGRCOD" />
					<FIELD name="DIAGRTXT" />
					<FIELD name="ACTEPPLCOD" />
					<FIELD name="ACTEPPLTXT" />
					<FIELD name="DIAGCOD"/>
					<FIELD name="DIAGTXT"/>
					<FIELD name="DIAGTYP"/>

				</FIELDS>
			</SQL>
			
			
		</QUERY>
		
		<QUERY label="RUM"> 
			
			<SQL optimizer="V_RSS_X">
				<select><![CDATA[
				
				SELECT v_rss_1.finess, v_rss_1.no_sejour_administratif, v_rss_1.matricule_assure,
						v_rss_1.no_rss, identite_nom || ' ' || identite_prenom, 
                        CASE WHEN identite_nom_naissance <> identite_nom THEN identite_nom_naissance ELSE ' ' END,
						v_rss_1.date_entree, v_rss_1.date_sortie, v_rss_1.en_cours_texte_tres_court, sexe_texte_court, 
						v_rss_1.date_naissance, v_rss_1.age, v_rss_1.code_postal, CASE WHEN base.t_codes_postaux.texte <> '' THEN texte ELSE 'Non renseigné' END,
						mode_entree, mode_entree_texte, provenance, provenance_texte,
						mode_sortie, mode_sortie_texte, destination, destination_texte,
						unite_medicale_principale_code, unite_medicale_principale_texte, 
						v_rss_1.cmd_code, v_rss_1.cmd_texte, 
						v_rss_1.ghm_code, v_rss_1.ghm_texte, v_rss_1.mco, v_rss_1.ghs_code, v_rss_1.ghs_texte, v_rss_1.ghs_borne_basse, v_rss_1.ghs_borne_haute, v_rss_1.dms_nationale_ghs, 
						v_rss_1.cas_code, v_rss_1.cas_texte,v_rss_1.pole_oap_code, pole_oap_texte, v_rss_1.ligne_oap_code, v_rss_1.ligne_oap_texte, 
                        v_rss_1.ghm_section_code[7], v_rss_1.ghm_section_texte[7],v_rss_1.ghm_section_code[8], v_rss_1.ghm_section_texte[8],v_rss_1.ghm_section_code[9], v_rss_1.ghm_section_texte[9],
						specialite_interne_medecin_reference_rss_code, specialite_interne_medecin_reference_rss_texte, medecin_reference_rss_code, medecin_reference_rss_nom,
						diagnostic_principal_code, diagnostic_principal_texte, diagnostic_relie_code, diagnostic_relie_texte, acte_principal_code, acte_principal_texte,    

						v_rss_rum_2.date_entree_rum, v_rss_rum_2.date_sortie_rum,  
						v_rss_rum_2.mode_entree_rum, v_rss_rum_2.mode_entree_rum_texte, v_rss_rum_2.provenance_rum, v_rss_rum_2.provenance_rum_texte,
						v_rss_rum_2.mode_sortie_rum, v_rss_rum_2.mode_sortie_rum_texte, v_rss_rum_2.destination_rum, v_rss_rum_2.destination_rum_texte,
						v_rss_rum_2.unite_medicale_code, v_rss_rum_2.unite_medicale_texte, v_rss_rum_2.type_autorisation,
						v_rss_rum_2.diagnostic_principal_rum_code, v_rss_rum_2.diagnostic_principal_rum_texte, 
						v_rss_rum_2.diagnostic_relie_rum_code, v_rss_rum_2.diagnostic_relie_rum_texte, 
						COALESCE(subview_d.diagnostics_associes_codes ,''),  
						COALESCE(subview_a.actes_codes,''),  
						v_rss_rum_2.duree_sejour_rum, v_rss_rum_2.nb_seances_rum, v_rss_rum_2.igs2_rum
						
				FROM #V_RSS_X#
					JOIN pmsi.v_rss_rum_2 ON v_rss_1.rss_id = v_rss_rum_2.rss_id
                    JOIN base.t_codes_postaux ON t_codes_postaux.code = v_rss_1.code_postal
					LEFT JOIN (
						SELECT v_rss_actes_1.rss_id, no_rum, base.cti_group_concat(DISTINCT acte_code) as actes_codes 
						FROM #V_RSS_X#
						JOIN pmsi.v_rss_actes_1 ON v_rss_actes_1.rss_id = v_rss_1.rss_id
						WHERE 1=1
						[VIEW.FILTRE_RSS_SELECT]
						GROUP BY 1,2
						) subview_a ON subview_a.rss_id = v_rss_rum_2.rss_id AND subview_a.no_rum = v_rss_rum_2.no_rum
					LEFT JOIN (
						SELECT v_rss_diagnostics_1.rss_id, no_rum, base.cti_group_concat(DISTINCT diagnostic_code) as diagnostics_associes_codes 
						FROM #V_RSS_X# 
						JOIN pmsi.v_rss_diagnostics_1 ON v_rss_diagnostics_1.rss_id = v_rss_1.rss_id
						WHERE type_diagnostic_rss <> 'DP' and type_diagnostic_rss <> 'DR' 
						[VIEW.FILTRE_RSS_SELECT]
						GROUP BY 1,2) subview_d ON subview_d.rss_id = v_rss_rum_2.rss_id AND subview_d.no_rum = v_rss_rum_2.no_rum
				WHERE 
					date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
					[VIEW.FILTRE_RSS_SELECT]
				ORDER BY v_rss_rum_2.no_rss, v_rss_rum_2.no_rum
					
				]]></select>
				<FIELDS>
					<FIELD name="FINESS" />
					<FIELD name="NSEJ" />
                    <FIELD name="MAT" />
					<FIELD name="RSS" />
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
                    <FIELD name="NOMNAISS" ifHideNames="Non autorisé"/>
					<FIELD name="DATENT" />
					<FIELD name="DATSOR" />
					<FIELD name="EXP" />
					<FIELD name="SEXE" />
					<FIELD name="DATNAI" ifHideNames="Non autorisé"/>
					<FIELD name="AGE" />
					<FIELD name="CODPOS" />
					<FIELD name="VILLE" />
					<FIELD name="MODENTCOD" />
					<FIELD name="MODENTTXT" />
					<FIELD name="PROVENCOD" />
					<FIELD name="PROVENTXT" />
					<FIELD name="MODSORCOD" />
					<FIELD name="MODSORTXT" />
					<FIELD name="DESTINCOD" />
					<FIELD name="DESTINTXT" />
					<FIELD name="UMPCOD" />
					<FIELD name="UMPTXT" />
					<FIELD name="CMDCOD" />
					<FIELD name="CMDTXT" />
					<FIELD name="GHMCOD" />
					<FIELD name="GHMTXT" />
					<FIELD name="ASO" />
					<FIELD name="GHSCOD" />
					<FIELD name="GHSTXT" />
					<FIELD name="GHSBAS" />
					<FIELD name="GHSHAU" />
					<FIELD name="GHSDMS" />
                    <FIELD name="CASCOD" />
					<FIELD name="CASTXT" />
					<FIELD name="POLOAPCOD" />
					<FIELD name="POLOAPTXT" />
					<FIELD name="LIGOAPCOD" />
					<FIELD name="LIGOAPTXT" />
					<FIELD name="GACOD" />
					<FIELD name="GATXT" />
					<FIELD name="GAPCOD" />
					<FIELD name="GAPTXT" />
                    <FIELD name="DACOD" />
					<FIELD name="DATXT" />
					<FIELD name="SPEMEDRSSCOD" />
					<FIELD name="SPEMEDRSSTXT" />
					<FIELD name="MEDRSSCOD" />
					<FIELD name="MEDRSSTXT" />
					<FIELD name="DIAGPCOD" />
					<FIELD name="DIAGPTXT" />
					<FIELD name="DIAGRCOD" />
					<FIELD name="DIAGRTXT" />
					<FIELD name="ACTEPPLCOD" />
					<FIELD name="ACTEPPLTXT" />
					
					<FIELD name="DATENTRUM"/>
					<FIELD name="DATSORRUM"/>
					<FIELD name="MODENTRUMCOD" />
					<FIELD name="MODENTRUMTXT" />
					<FIELD name="PROVENRUMCOD" />
					<FIELD name="PROVENRUMTXT" />
					<FIELD name="MODSORRUMCOD" />
					<FIELD name="MODSORRUMTXT" />
					<FIELD name="DESTINRUMCOD" />
					<FIELD name="DESTINRUMTXT" />
					<FIELD name="UMCOD" />
					<FIELD name="UMTXT" />
					<FIELD name="UMAUT" />
					<FIELD name="DIAGPRUMCOD" />
					<FIELD name="DIAGPRUMTXT" />
					<FIELD name="DIAGRRUMCOD" />
					<FIELD name="DIAGRRUMTXT" />
					<FIELD name="DIAGSARUMCOD" />
					<FIELD name="ACTESRUMCOD" />
					
					<FIELD name="NBJRUM"/>
					<FIELD name="NBSEARUM"/>
					<FIELD name="IGSRUM"/>
				</FIELDS>
			</SQL>
			
			
		</QUERY>
		
		
		<QUERY label="UCD"> 
			
			<SQL optimizer="V_RSS_X">
				<select><![CDATA[
				
					SELECT v_rss_1.finess, v_rss_1.no_sejour_administratif, v_rss_1.matricule_assure,
						v_rss_1.no_rss, identite_nom || ' ' || identite_prenom, 
                        CASE WHEN identite_nom_naissance <> identite_nom THEN identite_nom_naissance ELSE ' ' END,
						v_rss_1.date_entree, v_rss_1.date_sortie, en_cours_texte_tres_court, sexe_texte_court, v_rss_1.date_naissance, v_rss_1.age, v_rss_1.code_postal,
                        CASE WHEN base.t_codes_postaux.texte <> '' THEN texte ELSE 'Non renseigné' END,
						mode_entree, mode_entree_texte, provenance, provenance_texte,
						mode_sortie, mode_sortie_texte, destination, destination_texte,
						unite_medicale_principale_code, unite_medicale_principale_texte, 
						v_rss_1.cmd_code, v_rss_1.cmd_texte, 
						v_rss_1.ghm_code, v_rss_1.ghm_texte, v_rss_1.mco, v_rss_1.ghs_code, v_rss_1.ghs_texte, v_rss_1.ghs_borne_basse, v_rss_1.ghs_borne_haute, v_rss_1.dms_nationale_ghs, 
						v_rss_1.cas_code, v_rss_1.cas_texte,v_rss_1.pole_oap_code, pole_oap_texte, v_rss_1.ligne_oap_code, v_rss_1.ligne_oap_texte, 
                        v_rss_1.ghm_section_code[7], v_rss_1.ghm_section_texte[7],v_rss_1.ghm_section_code[8], v_rss_1.ghm_section_texte[8],v_rss_1.ghm_section_code[9], v_rss_1.ghm_section_texte[9],
						specialite_interne_medecin_reference_rss_code, specialite_interne_medecin_reference_rss_texte, medecin_reference_rss_code, medecin_reference_rss_nom,
						diagnostic_principal_code, diagnostic_principal_texte, diagnostic_relie_code, diagnostic_relie_texte, acte_principal_code, acte_principal_texte,   

						v_rss_ucd_1.date_ucd, 
						v_rss_ucd_1.ucd_code, v_rss_ucd_1.ucd_texte,
						v_rss_ucd_1.type_ucd_code, v_rss_ucd_1.type_ucd_texte,
						v_rss_ucd_1.laboratoire_texte, v_rss_ucd_1.conditionnement_texte,
						v_rss_ucd_1.atc_code, v_rss_ucd_1.atc_texte, 
						v_rss_ucd_1.ephmra_code, v_rss_ucd_1.ephmra_texte, 
						v_rss_ucd_1.prix_unitaire_achat,
						v_rss_ucd_1.nombre, v_rss_ucd_1.prix_unitaire, v_rss_ucd_1.montant_facture
						,v_rss_ucd_1.montant_ecart_indemnisable
					FROM #V_RSS_X#
						JOIN pmsi.v_rss_ucd_1 ON v_rss_1.rss_id = v_rss_ucd_1.rss_id
                        JOIN base.t_codes_postaux ON t_codes_postaux.code = v_rss_1.code_postal
					WHERE 
						date_sortie BETWEEN '[PERIODE]' AND '[TOPERIODE]'
						[VIEW.FILTRE_RSS_SELECT]
					ORDER BY v_rss_1.no_rss
					
				]]></select>    
				
				<FIELDS>
					<FIELD name="FINESS" />
					<FIELD name="NSEJ" />
                    <FIELD name="MAT" />
					<FIELD name="RSS" />
					<FIELD name="NOM" ifHideNames="Non autorisé"/>
                    <FIELD name="NOMNAISS" ifHideNames="Non autorisé"/>
					<FIELD name="DATENT" />
					<FIELD name="DATSOR" />
					<FIELD name="EXP" />
					<FIELD name="SEXE" />
					<FIELD name="DATNAI" ifHideNames="Non autorisé"/>
					<FIELD name="AGE" />
					<FIELD name="CODPOS" />
					<FIELD name="VILLE" />
					<FIELD name="MODENTCOD" />
					<FIELD name="MODENTTXT" />
					<FIELD name="PROVENCOD" />
					<FIELD name="PROVENTXT" />
					<FIELD name="MODSORCOD" />
					<FIELD name="MODSORTXT" />
					<FIELD name="DESTINCOD" />
					<FIELD name="DESTINTXT" />
					<FIELD name="UMPCOD" />
					<FIELD name="UMPTXT" />
					<FIELD name="CMDCOD" />
					<FIELD name="CMDTXT" />
					<FIELD name="GHMCOD" />
					<FIELD name="GHMTXT" />
					<FIELD name="ASO" />
					<FIELD name="GHSCOD" />
					<FIELD name="GHSTXT" />
					<FIELD name="GHSBAS" />
					<FIELD name="GHSHAU" />
					<FIELD name="GHSDMS" />
                    <FIELD name="CASCOD" />
					<FIELD name="CASTXT" />
					<FIELD name="POLOAPCOD" />
					<FIELD name="POLOAPTXT" />
					<FIELD name="LIGOAPCOD" />
					<FIELD name="LIGOAPTXT" />
					<FIELD name="GACOD" />
					<FIELD name="GATXT" />
					<FIELD name="GAPCOD" />
					<FIELD name="GAPTXT" />
                    <FIELD name="DACOD" />
					<FIELD name="DATXT" />
					<FIELD name="SPEMEDRSSCOD" />
					<FIELD name="SPEMEDRSSTXT" />
					<FIELD name="MEDRSSCOD" />
					<FIELD name="MEDRSSTXT" />
					<FIELD name="DIAGPCOD" />
					<FIELD name="DIAGPTXT" />
					<FIELD name="DIAGRCOD" />
					<FIELD name="DIAGRTXT" />
					<FIELD name="ACTEPPLCOD" />
					<FIELD name="ACTEPPLTXT" />
					<FIELD name="DATUCD"/>
					<FIELD name="UCDCOD"/>
					<FIELD name="UCDTXT"/>
					<FIELD name="UCDTYPECOD"/>
					<FIELD name="UCDTYPETXT"/>
					<FIELD name="UCDLABT"/>
					<FIELD name="UCDCNDT"/>
					<FIELD name="UCDATCC"/>
					<FIELD name="UCDATCT"/>
					<FIELD name="UCDEPHC"/>
					<FIELD name="UCDEPHT"/>
					<FIELD name="PUA" />
					<FIELD name="NB" />
					<FIELD name="PU" />
					<FIELD name="CA" />
					<FIELD name="MTEMI" />
				</FIELDS>
			</SQL>
			
			
		</QUERY>
		
	</QUERIES>
	
	<CSVFILES>
		<CSVFILE label="RSS" name="rss" queryNumber="0" enabled="[CSVRSS!=1::false]" format="[CSVFMT]">
				
			<COLUMN dataField="FINESS"	headerText="Etablissement" />
			<COLUMN dataField="NPAT"	headerText="N° Patient" />
			<COLUMN dataField="MAT"	headerText="N° Sécurité Sociale" />
			<COLUMN dataField="NSEJ"	headerText="N° Séjour" />
			<COLUMN dataField="RSS"	headerText="N° RSS" />
			<COLUMN dataField="NOM"	headerText="Nom" />
			<COLUMN dataField="NOMNAISS"	headerText="Nom de naissance" />
			<COLUMN dataField="SEXE"	headerText="Sexe" />
			<COLUMN dataField="DATNAI"	headerText="Date naissance" />
			<COLUMN dataField="AGE"	headerText="Age" />
			<COLUMN dataField="CODPOS"	headerText="Code postal" />
			<COLUMN dataField="VILLE"	headerText="Ville" />
			<COLUMN dataField="DATENT" headerText="Date entrée" />
			<COLUMN dataField="MODENTCOD" headerText="Mode entrée" />
			<COLUMN dataField="MODENTTXT" headerText="Texte mode entrée" />
			<COLUMN dataField="PROVENCOD" headerText="Code provenance" />
			<COLUMN dataField="PROVENTXT" headerText="Texte provenance" />
			<COLUMN dataField="ETABPROVCOD" headerText="Code établissement de provenance" />
			<COLUMN dataField="ETABPROVTXT" headerText="Texte établissement de provenance" />
			<COLUMN dataField="DATSOR" headerText="Date sortie" />
			<COLUMN dataField="DATGRP" headerText="Date groupage" />
			<COLUMN dataField="EXP" headerText="Expédié/Non expédié" />
			<COLUMN dataField="MODSORCOD" headerText="Mode sortie" />
			<COLUMN dataField="MODSORTXT" headerText="Texte mode sortie" />
			<COLUMN dataField="DESTINCOD" headerText="Code destination" />
			<COLUMN dataField="DESTINTXT" headerText="Texte destination" />
			<COLUMN dataField="ETABDESTINCOD" headerText="Code établissement de destination" />
			<COLUMN dataField="ETABDESTINTXT" headerText="Texte établissement de destination" />
			<COLUMN dataField="UMPCOD" headerText="Code unité médicale principale" />
			<COLUMN dataField="UMPTXT" headerText="Texte unité médicale principale" />
			<COLUMN dataField="CMDCOD" headerText="Code CMD" />
			<COLUMN dataField="CMDTXT" headerText="Texte CMD" />
			<COLUMN dataField="GHMCOD" headerText="Code GHM" />
			<COLUMN dataField="GHMTXT" headerText="Texte GHM" />
			<COLUMN dataField="ASO" headerText="ASO" />
			<COLUMN dataField="CASCOD" headerText="Code CAS" />
			<COLUMN dataField="CASTXT" headerText="Texte CAS" />
			<COLUMN dataField="GHSCOD" headerText="Code GHS" />
			<COLUMN dataField="GHSTXT" headerText="Texte GHS" />
			<COLUMN dataField="GHSBAS" headerText="Borne basse GHS" />
			<COLUMN dataField="GHSHAU" headerText="Borne haute GHS" />
			<COLUMN dataField="GHSDMS" headerText="DMS nationale GHS" />
			<COLUMN dataField="POLOAPCOD" headerText="Code pole OAP" />
			<COLUMN dataField="POLOAPTXT" headerText="Texte pole OAP" />
			<COLUMN dataField="LIGOAPCOD" headerText="Code ligne OAP" />
			<COLUMN dataField="LIGOAPTXT" headerText="Texte ligne OAP" />
            <COLUMN dataField="GACOD" headerText="Code groupe d'activité ATIH" />
			<COLUMN dataField="GATXT" headerText="Texte groupe d'activité ATIH" />
			<COLUMN dataField="GAPCOD" headerText="Code groupe planification ATIH" />
			<COLUMN dataField="GAPTXT" headerText="Texte groupe planification ATIH" />
            <COLUMN dataField="DACOD" headerText="Code domaine d'activité ATIH" />
			<COLUMN dataField="DATXT" headerText="Texte domaine d'activité ATIH" />
			<COLUMN dataField="SPEMEDRSSCOD" headerText="Code spécialité médecin RSS" />
			<COLUMN dataField="SPEMEDRSSTXT" headerText="Texte spécialité médecin RSS" />
			<COLUMN dataField="MEDRSSCOD" headerText="Code médecin RSS" />
			<COLUMN dataField="MEDRSSTXT" headerText="Nom médecin RSS" />
			<COLUMN dataField="DIAGPCOD" headerText="Code diagnostic principal RSS" />
			<COLUMN dataField="DIAGPTXT" headerText="Texte diagnostic principal RSS" />
			<COLUMN dataField="DIAGRCOD" headerText="Code diagnostic relié RSS" />
			<COLUMN dataField="DIAGRTXT" headerText="Texte diagnostic relié RSS" />
			<COLUMN dataField="DIAGSACOD" headerText="Codes diagnostic associés RSS" />
			<COLUMN dataField="ACTEPPLCOD" headerText="Code acte principal RSS" />
			<COLUMN dataField="ACTEPPLTXT" headerText="Texte acte principal RSS" />
			<COLUMN dataField="ACTESCOD" headerText="Codes actes RSS" />
			
			<COLUMN dataField="NBRSA" headerText="Nombre RSA" />
			<COLUMN dataField="NBRUM" headerText="Nombre RUM" />
			<COLUMN dataField="NBSEA" headerText="Nombre séances" />
			<COLUMN dataField="NBJ" headerText="Nombre jours" />
			<COLUMN dataField="POIDSBB" headerText="Poids du bébé"/>
			<COLUMN dataField="AGEGEST" headerText="Age gestationnel"/>
			<COLUMN dataField="DATEREG" headerText="Date dernière règles"/>
			<COLUMN dataField="CONFCOD" headerText="Confirmation codage RSS"/>
			<COLUMN dataField="TYPRDTH" headerText="Type machine radiothérapie"/>
			<COLUMN dataField="TYPDOSI" headerText="Type dosimétrie"/>
			<COLUMN dataField="NOINNOV" headerText="Numéro innovation"/>
			<COLUMN dataField="IGS2" headerText="IGS 2" />
			<COLUMN dataField="CA" headerText="C.A. (base rembousement)" />
			<COLUMN dataField="CAGHS" headerText="C.A. GHS" />
			<COLUMN dataField="CA_GHS_BRUT" headerText="C.A. GHS BRUT" />
			<COLUMN dataField="CAT2A" headerText="C.A. T2A" />
			<COLUMN dataField="CADMI" headerText="C.A. DMI" />
			<COLUMN dataField="CAPHC" headerText="C.A. PHC" />
			<COLUMN dataField="NBEXB" headerText="Nombre EXB" />
			<COLUMN dataField="CAEXB" headerText="C.A. EXB" />
			<COLUMN dataField="NBEXH" headerText="Nombre EXH" />
			<COLUMN dataField="CAEXH" headerText="C.A. EXH" />
			<COLUMN dataField="CAHON" headerText="C.A. Honoraires" />
			<COLUMN dataField="RAAC" headerText="RAAC" />
			<COLUMN dataField="CONHPHC" headerText="Conversion HP-HC" />
		</CSVFILE>
		
		<CSVFILE label="RUM" name="rum" queryNumber="5" enabled="[CSVRUM!=1::false]" format="[CSVFMT]">
				
			<COLUMN dataField="FINESS"	headerText="Etablissement" />
			<COLUMN dataField="NSEJ"  headerText="N° Séjour" />
			<COLUMN dataField="RSS"	headerText="N° RSS" />
            <COLUMN dataField="MAT"	headerText="N° Sécurité Sociale" />
			<COLUMN dataField="NOM"	headerText="Nom" />
            <COLUMN dataField="NOMNAISS"	headerText="Nom de naissance" />
			<COLUMN dataField="SEXE"	headerText="Sexe" />
			<COLUMN dataField="DATNAI"	headerText="Date naissance" />
			<COLUMN dataField="AGE"	headerText="Age" />
			<COLUMN dataField="CODPOS"	headerText="Code postal" />
            <COLUMN dataField="VILLE"	headerText="Ville" />
			<COLUMN dataField="DATENT" headerText="Date entrée" />
			<COLUMN dataField="MODENTCOD" headerText="Mode entrée" />
			<COLUMN dataField="MODENTTXT" headerText="Texte mode entrée" />
			<COLUMN dataField="PROVENCOD" headerText="Code provenance" />
			<COLUMN dataField="PROVENTXT" headerText="Texte provenance" />
			<COLUMN dataField="DATSOR" headerText="Date sortie" />
			<COLUMN dataField="EXP" headerText="Expédié/Non expédié" />
			<COLUMN dataField="MODSORCOD" headerText="Mode sortie" />
			<COLUMN dataField="MODSORTXT" headerText="Texte mode sortie" />
			<COLUMN dataField="DESTINCOD" headerText="Code destination" />
			<COLUMN dataField="DESTINTXT" headerText="Texte destination" />
			<COLUMN dataField="UMPCOD" headerText="Code unité médicale principale" />
			<COLUMN dataField="UMPTXT" headerText="Texte unité médicale principale" />
			<COLUMN dataField="CMDCOD" headerText="Code CMD" />
			<COLUMN dataField="CMDTXT" headerText="Texte CMD" />
			<COLUMN dataField="GHMCOD" headerText="Code GHM" />
			<COLUMN dataField="GHMTXT" headerText="Texte GHM" />
			<COLUMN dataField="ASO" headerText="ASO" />
            <COLUMN dataField="CASCOD" headerText="Code CAS" />
			<COLUMN dataField="CASTXT" headerText="Texte CAS" />
			<COLUMN dataField="GHSCOD" headerText="Code GHS" />
			<COLUMN dataField="GHSTXT" headerText="Texte GHS" />
			<COLUMN dataField="GHSBAS" headerText="Borne basse GHS" />
			<COLUMN dataField="GHSHAU" headerText="Borne haute GHS" />
			<COLUMN dataField="GHSDMS" headerText="DMS nationale GHS" />
			<COLUMN dataField="POLOAPCOD" headerText="Code pole OAP" />
			<COLUMN dataField="POLOAPTXT" headerText="Texte pole OAP" />
			<COLUMN dataField="LIGOAPCOD" headerText="Code ligne OAP" />
			<COLUMN dataField="LIGOAPTXT" headerText="Texte ligne OAP" />
			<COLUMN dataField="GACOD" headerText="Code groupe d'activité ATIH" />
			<COLUMN dataField="GATXT" headerText="Texte groupe d'activité ATIH" />
			<COLUMN dataField="GAPCOD" headerText="Code groupe planification ATIH" />
			<COLUMN dataField="GAPTXT" headerText="Texte groupe planification ATIH" />
            <COLUMN dataField="DACOD" headerText="Code domaine d'activité ATIH" />
			<COLUMN dataField="DATXT" headerText="Texte domaine d'activité ATIH" />
			<COLUMN dataField="SPEMEDRSSCOD" headerText="Code spécialité médecin RSS" />
			<COLUMN dataField="SPEMEDRSSTXT" headerText="Texte spécialité médecin RSS" />
			<COLUMN dataField="MEDRSSCOD" headerText="Code médecin RSS" />
			<COLUMN dataField="MEDRSSTXT" headerText="Nom médecin RSS" />
			<COLUMN dataField="DIAGPCOD" headerText="Code diagnostic principal RSS" />
			<COLUMN dataField="DIAGPTXT" headerText="Texte diagnostic principal RSS" />
			<COLUMN dataField="DIAGRCOD" headerText="Code diagnostic relié RSS" />
			<COLUMN dataField="DIAGRTXT" headerText="Texte diagnostic relié RSS" />
			<COLUMN dataField="ACTEPPLCOD" headerText="Code acte principal RSS" />
			<COLUMN dataField="ACTEPPLTXT" headerText="Texte acte principal RSS" />
			
			<COLUMN dataField="DATENTRUM" headerText="Date entrée RUM" />
			<COLUMN dataField="MODENTRUMCOD" headerText="Mode entrée RUM" />
			<COLUMN dataField="MODENTRUMTXT" headerText="Texte mode entrée RUM" />
			<COLUMN dataField="PROVENRUMCOD" headerText="Code provenance RUM" />
			<COLUMN dataField="PROVENRUMTXT" headerText="Texte provenance RUM" />
			<COLUMN dataField="DATSORRUM" headerText="Date sortie RUM" />
			<COLUMN dataField="MODSORRUMCOD" headerText="Mode sortie RUM" />
			<COLUMN dataField="MODSORRUMTXT" headerText="Texte mode sortie RUM" />
			<COLUMN dataField="DESTINRUMCOD" headerText="Code destination RUM" />
			<COLUMN dataField="DESTINRUMTXT" headerText="Texte destination RUM" />
			<COLUMN dataField="UMCOD" headerText="Code unité" />
			<COLUMN dataField="UMTXT" headerText="Texte unité" />
			<COLUMN dataField="UMAUT" headerText="Type autorisation RUM" />
			<COLUMN dataField="DIAGPRUMCOD" headerText="Code diagnostic principal RUM" />
			<COLUMN dataField="DIAGPRUMTXT" headerText="Texte diagnostic principal RUM" />
			<COLUMN dataField="DIAGRRUMCOD" headerText="Code diagnostic relié RUM" />
			<COLUMN dataField="DIAGRRUMTXT" headerText="Texte diagnostic relié RUM" />
			<COLUMN dataField="DIAGSARUMCOD" headerText="Codes diagnostic associés RUM" />
			<COLUMN dataField="ACTESRUMCOD" headerText="Codes actes RUM" />
			
			<COLUMN dataField="NBJRUM" headerText="Durée séjour RUM" />
			<COLUMN dataField="NBSEARUM" headerText="Nb séances RUM" />
			<COLUMN dataField="IGSRUM" headerText="IGS 2" />

		</CSVFILE>
		
		<CSVFILE label="Diagnostics" name="diagnostics" queryNumber="4" enabled="[CSVDIAG!=1::false]" format="[CSVFMT]">
				
			<COLUMN dataField="FINESS"	headerText="Etablissement" />
			<COLUMN dataField="NSEJ"  headerText="N° Séjour" />
			<COLUMN dataField="RSS"	headerText="N° RSS" />
            <COLUMN dataField="MAT"	headerText="N° Sécurité Sociale" />
			<COLUMN dataField="NOM"	headerText="Nom" />
            <COLUMN dataField="NOMNAISS"	headerText="Nom de naissance" />
			<COLUMN dataField="SEXE"	headerText="Sexe" />
			<COLUMN dataField="DATNAI"	headerText="Date naissance" />
			<COLUMN dataField="AGE"	headerText="Age" />
			<COLUMN dataField="CODPOS"	headerText="Code postal" />
            <COLUMN dataField="VILLE"	headerText="Ville" />
			<COLUMN dataField="DATENT" headerText="Date entrée" />
			<COLUMN dataField="MODENTCOD" headerText="Mode entrée" />
			<COLUMN dataField="MODENTTXT" headerText="Texte mode entrée" />
			<COLUMN dataField="PROVENCOD" headerText="Code provenance" />
			<COLUMN dataField="PROVENTXT" headerText="Texte provenance" />
			<COLUMN dataField="DATSOR" headerText="Date sortie" />
			<COLUMN dataField="MODSORCOD" headerText="Mode sortie" />
			<COLUMN dataField="MODSORTXT" headerText="Texte mode sortie" />
			<COLUMN dataField="DESTINCOD" headerText="Code destination" />
			<COLUMN dataField="DESTINTXT" headerText="Texte destination" />
			<COLUMN dataField="UMPCOD" headerText="Code unité médicale principale" />
			<COLUMN dataField="UMPTXT" headerText="Texte unité médicale principale" />
			<COLUMN dataField="CMDCOD" headerText="Code CMD" />
			<COLUMN dataField="CMDTXT" headerText="Texte CMD" />
			<COLUMN dataField="GHMCOD" headerText="Code GHM" />
			<COLUMN dataField="GHMTXT" headerText="Texte GHM" />
			<COLUMN dataField="ASO" headerText="ASO" />
            <COLUMN dataField="CASCOD" headerText="Code CAS" />
			<COLUMN dataField="CASTXT" headerText="Texte CAS" />
			<COLUMN dataField="GHSCOD" headerText="Code GHS" />
			<COLUMN dataField="GHSTXT" headerText="Texte GHS" />
			<COLUMN dataField="GHSBAS" headerText="Borne basse GHS" />
			<COLUMN dataField="GHSHAU" headerText="Borne haute GHS" />
			<COLUMN dataField="GHSDMS" headerText="DMS nationale GHS" />
			<COLUMN dataField="POLOAPCOD" headerText="Code pole OAP" />
			<COLUMN dataField="POLOAPTXT" headerText="Texte pole OAP" />
			<COLUMN dataField="LIGOAPCOD" headerText="Code ligne OAP" />
			<COLUMN dataField="LIGOAPTXT" headerText="Texte ligne OAP" />
			<COLUMN dataField="GACOD" headerText="Code groupe d'activité ATIH" />
			<COLUMN dataField="GATXT" headerText="Texte groupe d'activité ATIH" />
			<COLUMN dataField="GAPCOD" headerText="Code groupe planification ATIH" />
			<COLUMN dataField="GAPTXT" headerText="Texte groupe planification ATIH" />
            <COLUMN dataField="DACOD" headerText="Code domaine d'activité ATIH" />
			<COLUMN dataField="DATXT" headerText="Texte domaine d'activité ATIH" />
			<COLUMN dataField="SPEMEDRSSCOD" headerText="Code spécialité médecin RSS" />
			<COLUMN dataField="SPEMEDRSSTXT" headerText="Texte spécialité médecin RSS" />
			<COLUMN dataField="MEDRSSCOD" headerText="Code médecin RSS" />
			<COLUMN dataField="MEDRSSTXT" headerText="Nom médecin RSS" />
			<COLUMN dataField="DIAGPCOD" headerText="Code diagnostic principal RSS" />
			<COLUMN dataField="DIAGPTXT" headerText="Texte diagnostic principal RSS" />
			<COLUMN dataField="DIAGRCOD" headerText="Code diagnostic relié RSS" />
			<COLUMN dataField="DIAGRTXT" headerText="Texte diagnostic relié RSS" />
			<COLUMN dataField="ACTEPPLCOD" headerText="Code acte principal RSS" />
			<COLUMN dataField="ACTEPPLTXT" headerText="Texte acte principal RSS" />
			
			<COLUMN dataField="DIAGCOD" headerText="Code diagnostic"/>
			<COLUMN dataField="DIAGTXT" headerText="Code diagnostic"/>
			<COLUMN dataField="DIAGTYP" headerText="Type diagnostic"/>
			
		</CSVFILE>
		
		<CSVFILE label="Actes" name="actes" queryNumber="3" enabled="[CSVACTE!=1::false]" format="[CSVFMT]">
				
			<COLUMN dataField="FINESS"	headerText="Etablissement" />
			<COLUMN dataField="NSEJ"  headerText="N° Séjour" />
			<COLUMN dataField="RSS"	headerText="N° RSS" />
            <COLUMN dataField="MAT"	headerText="N° Sécurité Sociale" />
			<COLUMN dataField="NOM"	headerText="Nom" />
            <COLUMN dataField="NOMNAISS"	headerText="Nom de naissance" />
			<COLUMN dataField="SEXE"	headerText="Sexe" />
			<COLUMN dataField="DATNAI"	headerText="Date naissance" />
			<COLUMN dataField="AGE"	headerText="Age" />
			<COLUMN dataField="CODPOS"	headerText="Code postal" />
            <COLUMN dataField="VILLE"	headerText="Ville" />
			<COLUMN dataField="DATENT" headerText="Date entrée" />
			<COLUMN dataField="MODENTCOD" headerText="Mode entrée" />
			<COLUMN dataField="MODENTTXT" headerText="Texte mode entrée" />
			<COLUMN dataField="PROVENCOD" headerText="Code provenance" />
			<COLUMN dataField="PROVENTXT" headerText="Texte provenance" />
			<COLUMN dataField="DATSOR" headerText="Date sortie" />
			<COLUMN dataField="EXP" headerText="Expédié/Non expédié" />
			<COLUMN dataField="MODSORCOD" headerText="Mode sortie" />
			<COLUMN dataField="MODSORTXT" headerText="Texte mode sortie" />
			<COLUMN dataField="DESTINCOD" headerText="Code destination" />
			<COLUMN dataField="DESTINTXT" headerText="Texte destination" />
			<COLUMN dataField="UMPCOD" headerText="Code unité médicale principale" />
			<COLUMN dataField="UMPTXT" headerText="Texte unité médicale principale" />
			<COLUMN dataField="CMDCOD" headerText="Code CMD" />
			<COLUMN dataField="CMDTXT" headerText="Texte CMD" />
			<COLUMN dataField="GHMCOD" headerText="Code GHM" />
			<COLUMN dataField="GHMTXT" headerText="Texte GHM" />
			<COLUMN dataField="ASO" headerText="ASO" />
            <COLUMN dataField="CASCOD" headerText="Code CAS" />
			<COLUMN dataField="CASTXT" headerText="Texte CAS" />
			<COLUMN dataField="GHSCOD" headerText="Code GHS" />
			<COLUMN dataField="GHSTXT" headerText="Texte GHS" />
			<COLUMN dataField="GHSBAS" headerText="Borne basse GHS" />
			<COLUMN dataField="GHSHAU" headerText="Borne haute GHS" />
			<COLUMN dataField="GHSDMS" headerText="DMS nationale GHS" />
			<COLUMN dataField="POLOAPCOD" headerText="Code pole OAP" />
			<COLUMN dataField="POLOAPTXT" headerText="Texte pole OAP" />
			<COLUMN dataField="LIGOAPCOD" headerText="Code ligne OAP" />
			<COLUMN dataField="LIGOAPTXT" headerText="Texte ligne OAP" />
			<COLUMN dataField="GACOD" headerText="Code groupe d'activité ATIH" />
			<COLUMN dataField="GATXT" headerText="Texte groupe d'activité ATIH" />
			<COLUMN dataField="GAPCOD" headerText="Code groupe planification ATIH" />
			<COLUMN dataField="GAPTXT" headerText="Texte groupe planification ATIH" />
            <COLUMN dataField="DACOD" headerText="Code domaine d'activité ATIH" />
			<COLUMN dataField="DATXT" headerText="Texte domaine d'activité ATIH" />
			<COLUMN dataField="SPEMEDRSSCOD" headerText="Code spécialité médecin RSS" />
			<COLUMN dataField="SPEMEDRSSTXT" headerText="Texte spécialité médecin RSS" />
			<COLUMN dataField="MEDRSSCOD" headerText="Code médecin RSS" />
			<COLUMN dataField="MEDRSSTXT" headerText="Nom médecin RSS" />
			<COLUMN dataField="DIAGPCOD" headerText="Code diagnostic principal RSS" />
			<COLUMN dataField="DIAGPTXT" headerText="Texte diagnostic principal RSS" />
			<COLUMN dataField="DIAGRCOD" headerText="Code diagnostic relié RSS" />
			<COLUMN dataField="DIAGRTXT" headerText="Texte diagnostic relié RSS" />
			
			<COLUMN dataField="DATACT" headerText="Date acte"/>
			<COLUMN dataField="ACTCOD" headerText="Code acte"/>
			<COLUMN dataField="ACTPRINCIPAL" headerText="Acte principal"/>
			<COLUMN dataField="ACTACTCOD" headerText="Code activité"/>
			<COLUMN dataField="ACTTXT" headerText="Texte acte"/>
			<COLUMN dataField="ACTNOMCOD" headerText="Code nomenclature"/>
			<COLUMN dataField="ACTREGCOD" headerText="Code regroupement CCAM"/>
			<COLUMN dataField="ACTREGTXT" headerText="Code regroupement CCAM"/>
			<COLUMN dataField="ACTCLA" headerText="Classant"/>
			<COLUMN dataField="GESMARCOD" headerText="Code geste marqueur"/>
			<COLUMN dataField="GESMARTXT" headerText="Texte geste marqueur"/>
			<COLUMN dataField="SPEMEDCOD" headerText="Code spécialité exécutant" />
			<COLUMN dataField="SPEMEDTXT" headerText="Texte spécialité exécutant" />
			<COLUMN dataField="MEDCOD" headerText="Code médecin exécutant" />
			<COLUMN dataField="MEDTXT" headerText="Nom médecin exécutant" />
			<COLUMN dataField="NBACT" headerText="Nombre actes" />
			<COLUMN dataField="NBICR" headerText="Nombre d'ICR (AMELI NX)" />
			<COLUMN dataField="NBICRATIHPRIVE" headerText="Nombre d'ICR (ATIH Privé)" />
			<COLUMN dataField="NBICRATIHPUBLIC" headerText="Nombre d'ICR (ATIH Public)" />

		</CSVFILE>
		
		
		
		<CSVFILE label="Prestations" name="prestations" queryNumber="1" enabled="[CSVPRESTA!=1::false]" format="[CSVFMT]">
				
			<COLUMN dataField="FINESS"	headerText="Etablissement" />
			<COLUMN dataField="NSEJ"  headerText="N° Séjour" />
			<COLUMN dataField="RSS"	headerText="N° RSS" />
            <COLUMN dataField="MAT"	headerText="N° Sécurité Sociale" />
			<COLUMN dataField="NOM"	headerText="Nom" />
            <COLUMN dataField="NOMNAISS"	headerText="Nom de naissance" />
			<COLUMN dataField="SEXE"	headerText="Sexe" />
			<COLUMN dataField="DATNAI"	headerText="Date naissance" />
			<COLUMN dataField="AGE"	headerText="Age" />
			<COLUMN dataField="CODPOS"	headerText="Code postal" />
            <COLUMN dataField="VILLE"	headerText="Ville" />
			<COLUMN dataField="DATENT" headerText="Date entrée" />
			<COLUMN dataField="MODENTCOD" headerText="Mode entrée" />
			<COLUMN dataField="MODENTTXT" headerText="Texte mode entrée" />
			<COLUMN dataField="PROVENCOD" headerText="Code provenance" />
			<COLUMN dataField="PROVENTXT" headerText="Texte provenance" />
			<COLUMN dataField="DATSOR" headerText="Date sortie" />
			<COLUMN dataField="EXP" headerText="Expédié/Non expédié" />
			<COLUMN dataField="MODSORCOD" headerText="Mode sortie" />
			<COLUMN dataField="MODSORTXT" headerText="Texte mode sortie" />
			<COLUMN dataField="DESTINCOD" headerText="Code destination" />
			<COLUMN dataField="DESTINTXT" headerText="Texte destination" />
			<COLUMN dataField="UMPCOD" headerText="Code unité médicale principale" />
			<COLUMN dataField="UMPTXT" headerText="Texte unité médicale principale" />
			<COLUMN dataField="CMDCOD" headerText="Code CMD" />
			<COLUMN dataField="CMDTXT" headerText="Texte CMD" />
			<COLUMN dataField="GHMCOD" headerText="Code GHM" />
			<COLUMN dataField="GHMTXT" headerText="Texte GHM" />
			<COLUMN dataField="ASO" headerText="ASO" />
            <COLUMN dataField="CASCOD" headerText="Code CAS" />
			<COLUMN dataField="CASTXT" headerText="Texte CAS" />
			<COLUMN dataField="GHSCOD" headerText="Code GHS" />
			<COLUMN dataField="GHSTXT" headerText="Texte GHS" />
			<COLUMN dataField="GHSBAS" headerText="Borne basse GHS" />
			<COLUMN dataField="GHSHAU" headerText="Borne haute GHS" />
			<COLUMN dataField="GHSDMS" headerText="DMS nationale GHS" />
			<COLUMN dataField="POLOAPCOD" headerText="Code pole OAP" />
			<COLUMN dataField="POLOAPTXT" headerText="Texte pole OAP" />
			<COLUMN dataField="LIGOAPCOD" headerText="Code ligne OAP" />
			<COLUMN dataField="LIGOAPTXT" headerText="Texte ligne OAP" />
			<COLUMN dataField="GACOD" headerText="Code groupe d'activité ATIH" />
			<COLUMN dataField="GATXT" headerText="Texte groupe d'activité ATIH" />
			<COLUMN dataField="GAPCOD" headerText="Code groupe planification ATIH" />
			<COLUMN dataField="GAPTXT" headerText="Texte groupe planification ATIH" />
            <COLUMN dataField="DACOD" headerText="Code domaine d'activité ATIH" />
			<COLUMN dataField="DATXT" headerText="Texte domaine d'activité ATIH" />
			<COLUMN dataField="SPEMEDRSSCOD" headerText="Code spécialité médecin RSS" />
			<COLUMN dataField="SPEMEDRSSTXT" headerText="Texte spécialité médecin RSS" />
			<COLUMN dataField="MEDRSSCOD" headerText="Code médecin RSS" />
			<COLUMN dataField="MEDRSSTXT" headerText="Nom médecin RSS" />
			<COLUMN dataField="DIAGPCOD" headerText="Code diagnostic principal RSS" />
			<COLUMN dataField="DIAGPTXT" headerText="Texte diagnostic principal RSS" />
			<COLUMN dataField="DIAGRCOD" headerText="Code diagnostic relié RSS" />
			<COLUMN dataField="DIAGRTXT" headerText="Texte diagnostic relié RSS" />
			<COLUMN dataField="ACTEPPLCOD" headerText="Code acte principal RSS" />
			<COLUMN dataField="ACTEPPLTXT" headerText="Texte acte principal RSS" />

			<COLUMN dataField="DATDEB" headerText="Date début"/>
			<COLUMN dataField="DATFIN" headerText="Date fin"/>
			<COLUMN dataField="PRECOD" headerText="Code prestation"/>
			<COLUMN dataField="PRETXT" headerText="Texte prestation"/>
			<COLUMN dataField="NB" headerText="Nombre" />
			<COLUMN dataField="COEF" headerText="Coefficient" />
			<COLUMN dataField="COEFMCO" headerText="Coefficient MCO" />
			<COLUMN dataField="PU" headerText="P.U." />
			<COLUMN dataField="CA" headerText="C.A." />

		</CSVFILE>
		
		<CSVFILE label="LPP" name="lpp" queryNumber="2" enabled="[CSVLPP!=1::false]" format="[CSVFMT]">
				
			<COLUMN dataField="FINESS"	headerText="Etablissement" />
			<COLUMN dataField="NSEJ"  headerText="N° Séjour" />
			<COLUMN dataField="RSS"	headerText="N° RSS" />
            <COLUMN dataField="MAT"	headerText="N° Sécurité Sociale" />
			<COLUMN dataField="NOM"	headerText="Nom" />
            <COLUMN dataField="NOMNAISS"	headerText="Nom de naissance" />
			<COLUMN dataField="SEXE"	headerText="Sexe" />
			<COLUMN dataField="DATNAI"	headerText="Date naissance" />
			<COLUMN dataField="AGE"	headerText="Age" />
			<COLUMN dataField="CODPOS"	headerText="Code postal" />
            <COLUMN dataField="VILLE"	headerText="Ville" />
			<COLUMN dataField="DATENT" headerText="Date entrée" />
			<COLUMN dataField="MODENTCOD" headerText="Mode entrée" />
			<COLUMN dataField="MODENTTXT" headerText="Texte mode entrée" />
			<COLUMN dataField="PROVENCOD" headerText="Code provenance" />
			<COLUMN dataField="PROVENTXT" headerText="Texte provenance" />
			<COLUMN dataField="DATSOR" headerText="Date sortie" />
			<COLUMN dataField="EXP" headerText="Expédié/Non expédié" />
			<COLUMN dataField="MODSORCOD" headerText="Mode sortie" />
			<COLUMN dataField="MODSORTXT" headerText="Texte mode sortie" />
			<COLUMN dataField="DESTINCOD" headerText="Code destination" />
			<COLUMN dataField="DESTINTXT" headerText="Texte destination" />
			<COLUMN dataField="UMPCOD" headerText="Code unité médicale principale" />
			<COLUMN dataField="UMPTXT" headerText="Texte unité médicale principale" />
			<COLUMN dataField="CMDCOD" headerText="Code CMD" />
			<COLUMN dataField="CMDTXT" headerText="Texte CMD" />
			<COLUMN dataField="GHMCOD" headerText="Code GHM" />
			<COLUMN dataField="GHMTXT" headerText="Texte GHM" />
			<COLUMN dataField="ASO" headerText="ASO" />
            <COLUMN dataField="CASCOD" headerText="Code CAS" />
			<COLUMN dataField="CASTXT" headerText="Texte CAS" />
			<COLUMN dataField="GHSCOD" headerText="Code GHS" />
			<COLUMN dataField="GHSTXT" headerText="Texte GHS" />
			<COLUMN dataField="GHSBAS" headerText="Borne basse GHS" />
			<COLUMN dataField="GHSHAU" headerText="Borne haute GHS" />
			<COLUMN dataField="GHSDMS" headerText="DMS nationale GHS" />
			<COLUMN dataField="POLOAPCOD" headerText="Code pole OAP" />
			<COLUMN dataField="POLOAPTXT" headerText="Texte pole OAP" />
			<COLUMN dataField="LIGOAPCOD" headerText="Code ligne OAP" />
			<COLUMN dataField="LIGOAPTXT" headerText="Texte ligne OAP" />
			<COLUMN dataField="GACOD" headerText="Code groupe d'activité ATIH" />
			<COLUMN dataField="GATXT" headerText="Texte groupe d'activité ATIH" />
			<COLUMN dataField="GAPCOD" headerText="Code groupe planification ATIH" />
			<COLUMN dataField="GAPTXT" headerText="Texte groupe planification ATIH" />
            <COLUMN dataField="DACOD" headerText="Code domaine d'activité ATIH" />
			<COLUMN dataField="DATXT" headerText="Texte domaine d'activité ATIH" />
			<COLUMN dataField="SPEMEDRSSCOD" headerText="Code spécialité médecin RSS" />
			<COLUMN dataField="SPEMEDRSSTXT" headerText="Texte spécialité médecin RSS" />
			<COLUMN dataField="MEDRSSCOD" headerText="Code médecin RSS" />
			<COLUMN dataField="MEDRSSTXT" headerText="Nom médecin RSS" />
			<COLUMN dataField="DIAGPCOD" headerText="Code diagnostic principal RSS" />
			<COLUMN dataField="DIAGPTXT" headerText="Texte diagnostic principal RSS" />
			<COLUMN dataField="DIAGRCOD" headerText="Code diagnostic relié RSS" />
			<COLUMN dataField="DIAGRTXT" headerText="Texte diagnostic relié RSS" />
			<COLUMN dataField="ACTEPPLCOD" headerText="Code acte principal RSS" />
			<COLUMN dataField="ACTEPPLTXT" headerText="Texte acte principal RSS" />

			<COLUMN dataField="DATLPP" headerText="Date"/>
			<COLUMN dataField="LPPCOD" headerText="Code LPP"/>
			<COLUMN dataField="LPPTXT" headerText="Texte LPP"/>
			<COLUMN dataField="NB" headerText="Nombre" />
			<COLUMN dataField="PU" headerText="P.U." />
			<COLUMN dataField="CA" headerText="C.A." />

		</CSVFILE>
		
		<CSVFILE label="UCD" name="ucd" queryNumber="6" enabled="[CSVUCD!=1::false]" format="[CSVFMT]">
				
			<COLUMN dataField="FINESS"	headerText="Etablissement" />
			<COLUMN dataField="NSEJ"  headerText="N° Séjour" />
			<COLUMN dataField="RSS"	headerText="N° RSS" />
            <COLUMN dataField="MAT"	headerText="N° Sécurité Sociale" />
			<COLUMN dataField="NOM"	headerText="Nom" />
            <COLUMN dataField="NOMNAISS"	headerText="Nom de naissance" />
			<COLUMN dataField="SEXE"	headerText="Sexe" />
			<COLUMN dataField="DATNAI"	headerText="Date naissance" />
			<COLUMN dataField="AGE"	headerText="Age" />
			<COLUMN dataField="CODPOS"	headerText="Code postal" />
            <COLUMN dataField="VILLE"	headerText="Ville" />
			<COLUMN dataField="DATENT" headerText="Date entrée" />
			<COLUMN dataField="MODENTCOD" headerText="Mode entrée" />
			<COLUMN dataField="MODENTTXT" headerText="Texte mode entrée" />
			<COLUMN dataField="PROVENCOD" headerText="Code provenance" />
			<COLUMN dataField="PROVENTXT" headerText="Texte provenance" />
			<COLUMN dataField="DATSOR" headerText="Date sortie" />
			<COLUMN dataField="EXP" headerText="Expédié/Non expédié" />
			<COLUMN dataField="MODSORCOD" headerText="Mode sortie" />
			<COLUMN dataField="MODSORTXT" headerText="Texte mode sortie" />
			<COLUMN dataField="DESTINCOD" headerText="Code destination" />
			<COLUMN dataField="DESTINTXT" headerText="Texte destination" />
			<COLUMN dataField="UMPCOD" headerText="Code unité médicale principale" />
			<COLUMN dataField="UMPTXT" headerText="Texte unité médicale principale" />
			<COLUMN dataField="CMDCOD" headerText="Code CMD" />
			<COLUMN dataField="CMDTXT" headerText="Texte CMD" />
			<COLUMN dataField="GHMCOD" headerText="Code GHM" />
			<COLUMN dataField="GHMTXT" headerText="Texte GHM" />
			<COLUMN dataField="ASO" headerText="ASO" />
            <COLUMN dataField="CASCOD" headerText="Code CAS" />
			<COLUMN dataField="CASTXT" headerText="Texte CAS" />
			<COLUMN dataField="GHSCOD" headerText="Code GHS" />
			<COLUMN dataField="GHSTXT" headerText="Texte GHS" />
			<COLUMN dataField="GHSBAS" headerText="Borne basse GHS" />
			<COLUMN dataField="GHSHAU" headerText="Borne haute GHS" />
			<COLUMN dataField="GHSDMS" headerText="DMS nationale GHS" />
			<COLUMN dataField="POLOAPCOD" headerText="Code pole OAP" />
			<COLUMN dataField="POLOAPTXT" headerText="Texte pole OAP" />
			<COLUMN dataField="LIGOAPCOD" headerText="Code ligne OAP" />
			<COLUMN dataField="LIGOAPTXT" headerText="Texte ligne OAP" />
			<COLUMN dataField="GACOD" headerText="Code groupe d'activité ATIH" />
			<COLUMN dataField="GATXT" headerText="Texte groupe d'activité ATIH" />
			<COLUMN dataField="GAPCOD" headerText="Code groupe planification ATIH" />
			<COLUMN dataField="GAPTXT" headerText="Texte groupe planification ATIH" />
            <COLUMN dataField="DACOD" headerText="Code domaine d'activité ATIH" />
			<COLUMN dataField="DATXT" headerText="Texte domaine d'activité ATIH" />
			<COLUMN dataField="SPEMEDRSSCOD" headerText="Code spécialité médecin RSS" />
			<COLUMN dataField="SPEMEDRSSTXT" headerText="Texte spécialité médecin RSS" />
			<COLUMN dataField="MEDRSSCOD" headerText="Code médecin RSS" />
			<COLUMN dataField="MEDRSSTXT" headerText="Nom médecin RSS" />
			<COLUMN dataField="DIAGPCOD" headerText="Code diagnostic principal RSS" />
			<COLUMN dataField="DIAGPTXT" headerText="Texte diagnostic principal RSS" />
			<COLUMN dataField="DIAGRCOD" headerText="Code diagnostic relié RSS" />
			<COLUMN dataField="DIAGRTXT" headerText="Texte diagnostic relié RSS" />
			<COLUMN dataField="ACTEPPLCOD" headerText="Code acte principal RSS" />
			<COLUMN dataField="ACTEPPLTXT" headerText="Texte acte principal RSS" />

			<COLUMN dataField="DATUCD" headerText="Date"/>
			<COLUMN dataField="UCDCOD" headerText="Code UCD"/>
			<COLUMN dataField="UCDTXT" headerText="Texte UCD"/>
			<COLUMN dataField="UCDLABT" headerText="Laboratoire"/>
			<COLUMN dataField="UCDTYPECOD" headerText="Code type UCD"/>
			<COLUMN dataField="UCDTYPETXT" headerText="Texte type UCD"/>
			<COLUMN dataField="UCDCNDT" headerText="Conditionnement"/>
			<COLUMN dataField="UCDATCC" headerText="Code ATC"/>
			<COLUMN dataField="UCDATCT" headerText="Texte ATC"/>
			<COLUMN dataField="UCDEPHC" headerText="Code EPHMRA"/>
			<COLUMN dataField="UCDEPHT" headerText="Texte EPHMRA"/>
			<COLUMN dataField="PUA" headerText="Prix unitaire achat"/>
			
			<COLUMN dataField="NB" headerText="Nombre" />
			<COLUMN dataField="PU" headerText="P.U." />
			<COLUMN dataField="CA" headerText="C.A." />
			
			<COLUMN dataField="MTEMI" headerText="Mt EMI" />

		</CSVFILE>
		
	</CSVFILES>
	
	<PRESENTATION>
	
		
		
	</PRESENTATION>
	
</VUE>

			
