src: |
  SELECT DISTINCT t_medecins.nom,
      t_medecins.prenom,
      t_medecins.oid AS medecin_id,
      t_medecins.code AS medecin_code,
          CASE
              WHEN t_medecins.oid <> 0 THEN (t_medecins.nom || ' '::text) || t_medecins.prenom
              ELSE 'Non saisi'::text
          END AS medecin_texte,
      t_specialites_medecin.oid AS specialite_id,
      t_specialites_medecin.code AS specialite_code,
      t_specialites_medecin.texte AS specialite_texte
     FROM base.t_medecins
       LEFT JOIN base.t_specialites_medecin ON t_medecins.specialite_id = t_specialites_medecin.oid
    WHERE (t_medecins.oid IN ( SELECT DISTINCT p_mouvements_articles.medecin_reference_id
             FROM eco.p_mouvements_articles))
    ORDER BY t_medecins.nom, t_medecins.prenom, t_medecins.oid, t_medecins.code;