src: |
  SELECT t_regles_non_valorisation.oid AS regle_non_valorisation_id,
      t_regles_non_valorisation.code AS regle_non_valorisation_code,
      t_regles_non_valorisation.texte AS regle_non_valorisation_texte,
      p_rsf_detail_non_valorise.finess,
      p_rsf_detail_non_valorise.no_rss,
      p_rsf_detail_non_valorise.nature,
      p_rsf_detail_non_valorise.mt,
      p_rsf_detail_non_valorise.dmt,
      p_rsf_detail_non_valorise.date_debut,
      p_rsf_detail_non_valorise.date_fin,
      p_rsf_detail_non_valorise.nombre,
      p_rsf_detail_non_valorise.coefficient,
      p_rsf_detail_non_valorise.prix_unitaire,
      p_rsf_detail_non_valorise.base_remboursement,
      p_rsf_detail_non_valorise.taux_remboursement,
      p_rsf_detail_non_valorise.sejour_facture,
      p_rsf_detail_non_valorise.sejour_remboursable,
      p_rsf_detail_non_valorise.compteur,
      p_rsf_detail_non_valorise.ligne_t2a,
      p_rsf_detail_non_valorise.pec_fj,
      p_rsf_detail_non_valorise.coefficient_mco,
      p_rsf_detail_non_valorise.sejour_remboursable_2,
      p_rsf_detail_non_valorise.ghs_id,
      p_rsf_detail_non_valorise.sejour_rembourse_noemie,
      p_rsf_detail_non_valorise.nature_noemie,
      p_rsf_detail_non_valorise.prestation_id,
      t_prestations.code AS prestation_code,
      t_prestations.texte AS prestation_texte,
      p_rsf_detail_non_valorise.rss_id,
      p_rsf_detail_non_valorise.type,
      p_rsf_detail_non_valorise.coefficient_geo,
      p_rsf_detail_non_valorise.est_ligne_rss,
      p_rsf_detail_non_valorise.est_ligne_rum,
      p_rsf_detail_non_valorise.no_rum,
      p_rsf_detail_non_valorise.unite_medicale_id,
      p_rsf_detail_non_valorise.base_remboursement_rum,
      p_rsf_detail_non_valorise.montant_supplement_nf,
      p_rsf_detail_non_valorise.sejour_remboursable_rum,
      p_rsf_detail_non_valorise.pec_fj_id,
      p_rsf_detail_non_valorise.base_remboursement_sauf_transition,
      p_rsf_detail_non_valorise.base_remboursement_rum_sauf_transition
     FROM pmsi.p_rsf_detail_non_valorise
       JOIN pmsi.t_regles_non_valorisation ON t_regles_non_valorisation.oid = p_rsf_detail_non_valorise.regle_id
       JOIN pmsi.t_prestations ON t_prestations.oid = p_rsf_detail_non_valorise.prestation_id;