<?xml version="1.0" encoding="ISO-8859-15"?>
<DBOPTIMIZER>

	<VIEWNAMEOPTIMIZER viewName="V_RSS_X" defaultViewName="pmsi.v_rss_base v_rss_1" label="RSS">
		
		<LEFTJOININDICATOR LABEL="Adm Prod Reshopsi" leftjoin="JOIN pmsi.v_adm_prod_reshospi_link ON v_rss_1.adm_prod_reshospi_id = v_adm_prod_reshospi_link.adm_prod_reshospi_linkid">
			<FIELD name="adm_prod_reshospi_linkid" />
			<FIELD name="adm_prod_reshospi_code" />
			<FIELD name="adm_prod_reshospi_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Age" leftjoin="LEFT JOIN pmsi.v_ages_1 ON (v_rss_1.age =  v_ages_1.age_id)">
			<FIELD name="age_id" />
			<FIELD name="age_code" />
			<FIELD name="age_texte" />
			<FIELD name="age_section_id" />
			<FIELD name="age_section_code" />
			<FIELD name="age_section_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Age jours" leftjoin="LEFT JOIN pmsi.v_rsa_1 ON v_rsa_1.rss_id = v_rss_1.rss_id">
			<FIELD name="top_uhcd" />
			<FIELD name="age_jours" />
			<FIELD name="age_jours_id" />
			<FIELD name="age_jours_code" />
			<FIELD name="age_jours_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Acte Principal" leftjoin="JOIN pmsi.v_acte_principal_link ON v_rss_1.acte_principal_id = v_acte_principal_link.acte_principal_linkid">
			<FIELD name="acte_principal_linkid" />
			<FIELD name="acte_principal_code" />
			<FIELD name="acte_principal_texte" />
			<FIELD name="acte_principal_section_id" />
			<FIELD name="acte_principal_section_code" />
			<FIELD name="acte_principal_section_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Cancérologie" leftjoin="LEFT JOIN pmsi.v_rss_cancero_1 ON (v_rss_1.rss_id = v_rss_cancero_1.rss_id)">
			<FIELD name="cancero_id" />
			<FIELD name="cancero_code" />
			<FIELD name="cancero_texte" />
			<FIELD name="activite_cancero_id" />
			<FIELD name="activite_cancero_code" />
			<FIELD name="activite_cancero_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Cancérologie Principal" leftjoin="LEFT JOIN pmsi.v_rss_cancero_2022 ON (v_rss_1.rss_id = v_rss_cancero_2022.rss_id)">
			<FIELD name="cancero_principal_id" />
			<FIELD name="cancero_principal_code" />
			<FIELD name="cancero_principal_texte" />
			<FIELD name="activite_cancero_principal_id" />
			<FIELD name="activite_cancero_principal_code" />
			<FIELD name="activite_cancero_principal_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Codes Retour Groupeur" leftjoin="LEFT JOIN pmsi.v_rss_leg_1 ON (v_rss_1.rss_id = v_rss_leg_1.rss_id)">
			<FIELD name="code_retour_groupeur_id" />
			<FIELD name="code_retour_groupeur_code" />
			<FIELD name="code_retour_groupeur_texte" />
			<FIELD name="nombre_erreur_groupeur" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Comité médical" leftjoin="LEFT JOIN pmsi.v_comites_medicaux_1 ON (v_rss_1.comite_medical_id =  v_comites_medicaux_1.comite_medical_id)">
			<FIELD name="comite_medical_code" />
			<FIELD name="comite_medical_texte" />
			<FIELD name="comite_medical_section" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Contexte particulier" leftjoin="JOIN pmsi.v_contexte_pat_link ON v_rss_1.contexte_pat_id = v_contexte_pat_link.contexte_pat_linkid">
			<FIELD name="contexte_pat_linkid" />
			<FIELD name="contexte_pat_code" />
			<FIELD name="contexte_pat_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Conversion HP_HC" leftjoin="JOIN pmsi.v_conversion_hp_hc_link ON v_rss_1.conversion_hp_hc_id = v_conversion_hp_hc_link.conversion_hp_hc_linkid">
			<FIELD name="conversion_hp_hc_linkid" />
			<FIELD name="conversion_hp_hc_code" />
			<FIELD name="conversion_hp_hc_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Diagnostic principal" leftjoin="JOIN pmsi.v_diagnostic_principal_link ON v_rss_1.diagnostic_principal_id = v_diagnostic_principal_link.diagnostic_principal_linkid">
			<FIELD name="diagnostic_principal_linkid" />
			<FIELD name="diagnostic_principal_code" />
			<FIELD name="diagnostic_principal_texte" />
			<FIELD name="diagnostic_principal_racine_id" />
			<FIELD name="diagnostic_principal_racine_code" />
			<FIELD name="diagnostic_principal_racine_texte" />
			<FIELD name="diagnostic_principal_section_id" />
			<FIELD name="diagnostic_principal_section_code" />
			<FIELD name="diagnostic_principal_section_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Diagnostic relie" leftjoin="JOIN pmsi.v_diagnostic_relie_link ON v_rss_1.diagnostic_relie_id =  v_diagnostic_relie_link.diagnostic_relie_linkid">
			<FIELD name="diagnostic_relie_linkid" />
			<FIELD name="diagnostic_relie_code" />
			<FIELD name="diagnostic_relie_texte" />
			<FIELD name="diagnostic_relie_racine_id" />
			<FIELD name="diagnostic_relie_racine_code" />
			<FIELD name="diagnostic_relie_racine_texte" />
			<FIELD name="diagnostic_relie_section_id" />
			<FIELD name="diagnostic_relie_section_code" />
			<FIELD name="diagnostic_relie_section_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Diagnostic Severité" leftjoin="JOIN pmsi.v_rss_diagnostics_1 ON v_rss_1.rss_id = v_rss_diagnostics_1.rss_id ">
			<FIELD name="diagnostic_severite_fg2016_code" />
			<FIELD name="diagnostic_severite_fg2017_code" />
			<FIELD name="diagnostic_severite_fg2022_code" />
			<FIELD name="diagnostic_severite_fg2023_code" />
			<FIELD name="diagnostic_severite_fg2024_code" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Destination Sortie" leftjoin="JOIN pmsi.v_destinations_sortie_link ON v_rss_1.destination = v_destinations_sortie_link.destination_linkcode">
			<FIELD name="destination_linkcode" />
			<FIELD name="destination_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Durée séjour" leftjoin="LEFT JOIN pmsi.v_durees_sejour_1 ON (v_rss_1.duree_sejour =  v_durees_sejour_1.duree_sejour_id)">
			<FIELD name="duree_sejour_id" />
			<FIELD name="duree_sejour_code" />
			<FIELD name="duree_sejour_texte" />
			<FIELD name="duree_sejour_section_id" />
			<FIELD name="duree_sejour_section_code" />
			<FIELD name="duree_sejour_section_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Etablissement provenance" leftjoin="LEFT JOIN pmsi.v_etablissement_provenance_1 ON v_etablissement_provenance_1.rss_id = v_rss_1.rss_id">
			<FIELD name="etablissement_provenance_id" />
			<FIELD name="etablissement_provenance_code" />
			<FIELD name="etablissement_provenance_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Etablissement destination" leftjoin="LEFT JOIN pmsi.v_etablissement_destination_1 ON v_etablissement_destination_1.rss_id = v_rss_1.rss_id">
			<FIELD name="etablissement_destination_id" />
			<FIELD name="etablissement_destination_code" />
			<FIELD name="etablissement_destination_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Etat" leftjoin="JOIN pmsi.v_rss_etat_1 ON v_rss_etat_1.rss_id = v_rss_1.rss_id">
			<FIELD name="v_rss_etat_1.date_groupage" />
			<FIELD name="date_groupage_id" />
			<FIELD name="date_groupage_code" />
			<FIELD name="date_groupage_texte" />
			<FIELD name="date_groupage_mois_id" />
			<FIELD name="date_groupage_mois_code" />
			<FIELD name="date_groupage_mois_texte" />
			<FIELD name="date_groupage_semaine_id" />
			<FIELD name="date_groupage_semaine_code" />
			<FIELD name="date_groupage_semaine_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="État séjour" leftjoin="LEFT JOIN pmsi.v_etat_sejour_link ON v_rss_1.etat_sejour = v_etat_sejour_link.etat_sejour_code">
			<FIELD name="etat_sejour_id" />
			<FIELD name="etat_sejour_code" />
			<FIELD name="etat_sejour_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Gestes Marqueurs" leftjoin="LEFT JOIN pmsi.v_rss_gm_1 ON (v_rss_1.rss_id = v_rss_gm_1.rss_id)">
			<FIELD name="gm_id" />
			<FIELD name="gm_code" />
			<FIELD name="gm_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Identité" leftjoin="JOIN pmsi.v_identites_link ON v_rss_1.rss_id = v_identites_link.identite_rss_id">
			<FIELD name="identite_nom" />
			<FIELD name="identite_nom_naissance" />
			<FIELD name="identite_prenom" />
		</LEFTJOININDICATOR>
        <LEFTJOININDICATOR label="Indicateurs base national" leftjoin="JOIN pmsi.t_ghm_indicateurs_nationaux ghm_nat ON ghm_nat.ghm_id = v_rss_1.ghm_id">
			<FIELD name="nb_deces_prive" />
			<FIELD name="nb_sev_j_prive" />
			<FIELD name="nb_sev_j_public" />
			<FIELD name="age_public" />
		</LEFTJOININDICATOR>
        <LEFTJOININDICATOR label="Indicateurs VIDHOSP" leftjoin="LEFT JOIN pmsi.v_vidhosp_1 ON v_rss_1.rss_id = v_vidhosp_1.rss_id ">
			<FIELD name="v_vidhosp_1.taux_remboursement" />
			<FIELD name="v_vidhosp_1.code_pec_fj_id" />
			<FIELD name="v_vidhosp_1.montant_fj" />
			<FIELD name="v_vidhosp_1.hospit_nouveau_ne" />
			<FIELD name="v_vidhosp_1.montant_tm" />
			<FIELD name="v_vidhosp_1.exoneration_tm_code" />
			<FIELD name="v_vidhosp_1.code_pec_code" />
			<FIELD name="v_vidhosp_1.prelevement_organe" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="I.P.A" leftjoin="LEFT JOIN pmsi.v_rss_ipa_1 ON (v_rss_1.rss_id = v_rss_ipa_1.rss_id)">
			<FIELD name="ipa_id" />
			<FIELD name="ipa_est_maitre" />
			<FIELD name="ipa_code" />
			<FIELD name="ipa_texte" />
			<FIELD name="ipa_texte_court" />
			<FIELD name="categorie_ipa_id" />
			<FIELD name="categorie_ipa_code" />
			<FIELD name="categorie_ipa_texte" />
			<FIELD name="categorie_ipa_texte_court" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Localisation" leftjoin="LEFT JOIN pmsi.v_codes_postaux_2 ON (v_rss_1.code_postal_id = v_codes_postaux_2.code_postal_id)">
			<FIELD name="code_postal_id" />
			<FIELD name="code_postal_code" />
			<FIELD name="code_postal_texte" />
			<FIELD name="departement_id" />
			<FIELD name="departement_code" />
			<FIELD name="departement_texte" />
			<FIELD name="code_geographique_pmsi_id" />
			<FIELD name="code_geographique_pmsi_code" />
			<FIELD name="code_geographique_pmsi_texte" />
			<FIELD name="territoire_sante_id" />
			<FIELD name="territoire_sante_code" />
			<FIELD name="territoire_sante_texte" />
			<FIELD name="code_postal_section_id" />
			<FIELD name="code_postal_section_code" />
			<FIELD name="code_postal_section_texte" />
            <FIELD name="region_id" />
			<FIELD name="region_code" />
			<FIELD name="region_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR lablel="Médecin RSS" leftjoin="JOIN pmsi.v_medecin_rss_link ON v_rss_1.medecin_rss_id = v_medecin_rss_link.medecin_rss_linkid">
			<FIELD name="medecin_rss_linkid" />
			<FIELD name="medecin_rss_code" />
			<FIELD name="medecin_rss_nom" />
			<FIELD name="medecin_rss_section_id" />
			<FIELD name="medecin_rss_section_code" />
			<FIELD name="medecin_rss_section_texte" />
			<FIELD name="specialite_medecin_rss_id" />
			<FIELD name="specialite_medecin_rss_code" />
			<FIELD name="specialite_medecin_rss_texte" />
			<FIELD name="specialite_interne_medecin_rss_id" />
			<FIELD name="specialite_interne_medecin_rss_code" />
			<FIELD name="specialite_interne_medecin_rss_texte" />
			<FIELD name="specialite_medecin_reference_rss_id" />
			<FIELD name="specialite_medecin_reference_rss_code" />
			<FIELD name="specialite_medecin_reference_rss_texte" />
			<FIELD name="specialite_interne_medecin_reference_rss_id" />
			<FIELD name="specialite_interne_medecin_reference_rss_code" />
			<FIELD name="specialite_interne_medecin_reference_rss_texte" />
			<FIELD name="medecin_reference_rss_id" />
			<FIELD name="medecin_reference_rss_code" />
			<FIELD name="medecin_reference_rss_nom" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Mode Entrée" leftjoin="JOIN pmsi.v_modes_entree_link ON v_rss_1.mode_entree = v_modes_entree_link.mode_entree_linkcode">
			<FIELD name="mode_entree_linkcode" />
			<FIELD name="mode_entree_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Mode Sortie" leftjoin="JOIN pmsi.v_modes_sortie_link ON v_rss_1.mode_sortie = v_modes_sortie_link.mode_sortie_linkcode">
			<FIELD name="mode_sortie_linkcode" />
			<FIELD name="mode_sortie_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Nombre d'interventions" leftjoin="JOIN pmsi.v_nb_interventions_link ON v_rss_1.nb_intervention_id = v_nb_interventions_link.nb_intervention_linkid">
			<FIELD name="nb_intervention_linkid" />
			<FIELD name="nb_intervention_code" />
			<FIELD name="nb_intervention_texte" />
		</LEFTJOININDICATOR>
        <LEFTJOININDICATOR label="Patients" leftjoin="JOIN pmsi.v_patients_link ON v_rss_1.patient_id = v_patients_link.patient_linkid">
			<FIELD name="patient_linkid" />
			<FIELD name="patient_prenom" />
			<FIELD name="patient_nom" />
			<FIELD name="patient_no_patient" />
			<FIELD name="patient_date_naissance" />
			<FIELD name="patient_sexe" />
			<FIELD name="patient_finess" />
		</LEFTJOININDICATOR>
        <LEFTJOININDICATOR label="Pole" leftjoin="LEFT JOIN pmsi.v_pole_3 ON (v_rss_1.pole_principal_id =  v_pole_3.join_pole_id)">
			<FIELD name="pole_principal_code" />
			<FIELD name="pole_principal_texte" />
			<FIELD name="pole_principal_section_id" />
			<FIELD name="pole_principal_section_code" />
			<FIELD name="pole_principal_section_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Prise en charge" leftjoin="JOIN pmsi.v_rsf_total_1 ON (v_rss_1.rss_id = v_rsf_total_1.rss_id)">
			<FIELD name="type_contrat_oc_id" />
			<FIELD name="type_contrat_oc_code" />
			<FIELD name="type_contrat_oc_texte" />
			<FIELD name="motif_non_facturation_id" />
			<FIELD name="motif_non_facturation_code" />
			<FIELD name="motif_non_facturation_texte" />
			<FIELD name="regime_id" />
			<FIELD name="regime_code" />
			<FIELD name="regime_texte" />
			<FIELD name="exoneration_tm_id" />
			<FIELD name="exoneration_tm_code" />
			<FIELD name="exoneration_tm_texte" />
			<FIELD name="code_pec_fj_id" />
			<FIELD name="code_pec_fj_code" />
			<FIELD name="code_pec_fj_texte" />
			<FIELD name="nature_pec_id" />
			<FIELD name="nature_pec_code" />
			<FIELD name="nature_pec_texte" />
			<FIELD name="facturation_18euros_id" />
			<FIELD name="facturation_18euros_code" />
			<FIELD name="facturation_18euros_texte" />
			<FIELD name="code_pec_id" />
			<FIELD name="code_pec_code" />
			<FIELD name="code_pec_texte" />
			<FIELD name="pat_benef_cmu" />
			<FIELD name="valorise_fides_id" />
			<FIELD name="valorise_fides_code" />
			<FIELD name="valorise_fides_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Paramètres personnalisés" leftjoin="LEFT JOIN pmsi.v_rss_parametres_personnalises_1 ON v_rss_1.rss_id =  v_rss_parametres_personnalises_1.rss_id ">
			<FIELD name="parametre_personnalise" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR lable="Prestation Princpale" leftjoin="JOIN pmsi.v_prestation_principale_link ON v_rss_1.prestation_principale_id = v_prestation_principale_link.prestation_principale_linkid">
			<FIELD name="prestation_principale_linkid" />
			<FIELD name="prestation_principale_code" />
			<FIELD name="prestation_principale_texte" />
			<FIELD name="prestation_principale_section_id" />
			<FIELD name="prestation_principale_section_code" />
			<FIELD name="prestation_principale_section_texte" />
			<FIELD name="activite_urgence" />
		</LEFTJOININDICATOR> 
		<LEFTJOININDICATOR label="Provenance Entrée" leftjoin="JOIN pmsi.v_provenances_entree_link ON v_rss_1.provenance = v_provenances_entree_link.provenance_linkcode">
			<FIELD name="provenance_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR lbael="Rescrit Tarif" leftjoin="JOIN pmsi.v_rescrit_tarif_link ON v_rss_1.rescrit_tarif_id = v_rescrit_tarif_link.rescrit_tarif_linkid">
			<FIELD name="rescrit_tarif_linkid" />
			<FIELD name="rescrit_tarif_code" />
			<FIELD name="rescrit_tarif_texte" />
		</LEFTJOININDICATOR>		
		<LEFTJOININDICATOR label="Sexe" leftjoin="JOIN pmsi.v_sexe_link ON v_sexe_link.sexe_linkcode = v_rss_1.sexe">
			<FIELD name="sexe_id" />
			<FIELD name="sexe_linkcode" />
			<FIELD name="sexe_texte" />
			<FIELD name="sexe_texte_court" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Unité médicale et type autorisation" leftjoin="JOIN pmsi.v_unite_medicale_principale_link ON v_rss_1.unite_medicale_principale_id =  v_unite_medicale_principale_link.unite_medicale_principale_linkid">
			<FIELD name="unite_medicale_principale_linkid" />
			<FIELD name="unite_medicale_principale_code" />
			<FIELD name="unite_medicale_principale_texte" />
			<FIELD name="unite_medicale_principale_section_id" />
			<FIELD name="unite_medicale_principale_section_code" />
			<FIELD name="unite_medicale_principale_section_texte" />
			<FIELD name="type_autorisation_principale_id" />
			<FIELD name="type_autorisation_principale_code" />
			<FIELD name="type_autorisation_principale_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Unité médicale première" leftjoin="LEFT JOIN pmsi.v_premiere_unite_medicale_link ON v_rss_1.rss_id =  v_premiere_unite_medicale_link.premiere_unite_medicale_rss_id">
			<FIELD name="premiere_unite_medicale_rss_id" />
			<FIELD name="premiere_unite_medicale_id" />
			<FIELD name="premiere_unite_medicale_code" />
			<FIELD name="premiere_unite_medicale_texte" />
			<FIELD name="premiere_unite_medicale_section_id" />
			<FIELD name="premiere_unite_medicale_section_code" />
			<FIELD name="premiere_unite_medicale_section_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Variable NP" leftjoin="JOIN pmsi.v_np_link ON v_rss_1.np_id = v_np_link.np_linkid">
			<FIELD name="np_linkid" />
			<FIELD name="np_code" />
			<FIELD name="np_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Variable Passage Urgences" leftjoin="JOIN pmsi.v_passage_urgences_link ON v_passage_urgences_link.passage_urgences_linkcode = v_rss_1.passage_urgences_code">
			<FIELD name="passage_urgences_id" />
			<FIELD name="passage_urgences_linkcode" />
			<FIELD name="passage_urgences_texte" />
		</LEFTJOININDICATOR>
		<LEFTJOININDICATOR label="Variable RAAC" leftjoin="JOIN pmsi.v_raac_link ON v_rss_1.raac_id = v_raac_link.raac_linkid">
			<FIELD name="raac_linkid" />
			<FIELD name="raac_code" />
			<FIELD name="raac_texte" />
		</LEFTJOININDICATOR>

	</VIEWNAMEOPTIMIZER> 	
	
	<VIEWNAMEOPTIMIZER viewName="V_RSS_ACTES_X" defaultViewName="pmsi.v_rss_actes_1 v_rss_actes_1" label="Actes"> 	
		<LEFTJOININDICATOR label="CCAM Descriptive" leftjoin="LEFT JOIN pmsi.v_acte_ccam_descriptif_link ON v_rss_actes_1.acte_ccam_descriptif_id = link_acte_ccam_descriptif_id">
			<FIELD name="acte_ccam_descriptif_code" />
			<FIELD name="acte_ccam_descriptif_texte" />
			<FIELD name="acte_ccam_descriptif_section" />
		</LEFTJOININDICATOR>
	</VIEWNAMEOPTIMIZER>

	
	
	
</DBOPTIMIZER>