src: |
  SELECT DISTINCT 'DT'::text || t_ghm_cout_patient_shs.pole_oap_id::text AS oid,
      (t_ghm_cout_patient_shs.pole_oap_code::text || ' '::text) || t_ghm_cout_patient_shs.pole_oap_texte::text AS texte,
      t_ghm_cout_patient_shs.pole_oap_code,
      '1'::text AS level,
      '9'::text || t_ghm_cout_patient_shs.pole_oap_code::text AS tri
     FROM compta.t_ghm_cout_patient_shs
    WHERE (t_ghm_cout_patient_shs.oid IN ( SELECT p_oids.oid
             FROM compta.p_oids
            WHERE p_oids.code_table::text = 'ghm_cout_patient_shs'::text))
    ORDER BY '9'::text || t_ghm_cout_patient_shs.pole_oap_code::text, 'DT'::text || t_ghm_cout_patient_shs.pole_oap_id::text, (t_ghm_cout_patient_shs.pole_oap_code::text || ' '::text) || t_ghm_cout_patient_shs.pole_oap_texte::text, t_ghm_cout_patient_shs.pole_oap_code, '1'::text;