dep:
  - v_cancero_1
src: |
  SELECT 'IC'::text || v_cancero_1.activite_code AS code,
          CASE
              WHEN v_cancero_1.activite_code::bpchar <> ''::bpchar THEN (v_cancero_1.activite_code || ' - '::text) || v_cancero_1.activite_texte
              ELSE 'Non saisi'::text
          END AS texte,
          CASE
              WHEN v_cancero_1.activite_code::bpchar <> ''::bpchar THEN (v_cancero_1.activite_code || ' - '::text) || v_cancero_1.activite_texte
              ELSE 'Non saisi'::text
          END AS texte_court,
      1 AS level
     FROM pmsi.v_cancero_1
  UNION
   SELECT 'SC'::text || v_cancero_1.activite_code AS code,
          CASE
              WHEN v_cancero_1.activite_code::bpchar <> ''::bpchar THEN (('SAUF '::text || v_cancero_1.activite_code) || ' - '::text) || v_cancero_1.activite_texte
              ELSE 'SAUF Non saisi'::text
          END AS texte,
          CASE
              WHEN v_cancero_1.activite_code::bpchar <> ''::bpchar THEN (('SAUF '::text || v_cancero_1.activite_code) || ' - '::text) || v_cancero_1.activite_texte
              ELSE 'SAUF Non saisi'::text
          END AS texte_court,
      1 AS level
     FROM pmsi.v_cancero_1
    WHERE v_cancero_1.activite_code::bpchar <> ''::bpchar
  UNION
   SELECT 'II'::text || v_cancero_1.code AS code,
          CASE
              WHEN v_cancero_1.code::bpchar <> ''::bpchar THEN (v_cancero_1.code || ' - '::text) || v_cancero_1.texte
              ELSE 'Non saisi'::text
          END AS texte,
          CASE
              WHEN v_cancero_1.code::bpchar <> ''::bpchar THEN (v_cancero_1.code || ' - '::text) || v_cancero_1.texte_court
              ELSE 'Non saisi'::text
          END AS texte_court,
      2 AS level
     FROM pmsi.v_cancero_1
  UNION
   SELECT 'SI'::text || v_cancero_1.code AS code,
          CASE
              WHEN v_cancero_1.code::bpchar <> ''::bpchar THEN (('SAUF '::text || v_cancero_1.code) || ' - '::text) || v_cancero_1.texte
              ELSE 'SAUF Non saisi'::text
          END AS texte,
          CASE
              WHEN v_cancero_1.code::bpchar <> ''::bpchar THEN (('SAUF '::text || v_cancero_1.code) || ' - '::text) || v_cancero_1.texte_court
              ELSE 'SAUF Non saisi'::text
          END AS texte_court,
      2 AS level
     FROM pmsi.v_cancero_1
    WHERE v_cancero_1.code::bpchar <> ''::bpchar
    ORDER BY 2;