columns:
  activite_force_id:
    type: bigint
    default: "0"
  activite_par_defaut_id:
    type: bigint
    default: "0"
  avec_facturation_intermediaire:
    type: character(1)
    default: "''::bpchar"
    comment: 1 = Facturation intermediaire
  code:
    type: text
  code_original:
    type: text
  dmt_id:
    type: bigint
    default: "0"
  est_absence:
    type: character(1)
    default: "'0'::bpchar"
    comment: "1 = Service d''absence"
  est_budget_global:
    type: character(1)
    default: "'0'::bpchar"
    comment: 1 = Budget_global
  est_sans_facturation:
    type: character(1)
    default: "''::bpchar"
    comment: |
      1 = Pas de facturation
      2 = Facturation facultative si budget global expédié MAT2A
  est_sans_mouvement:
    type: character(1)
    default: "''::bpchar"
    comment: 1 = Pas de mouvement (Entrées, journ Sorties)
  etage_force_id:
    type: bigint
    default: "0"
  etage_par_defaut_id:
    type: bigint
    default: "0"
  finess_id:
    type: bigint
    default: "0"
  medecin_force_id:
    type: bigint
    default: "0"
  medecin_par_defaut_id:
    type: bigint
    default: "0"
  mode_calcul_journees:
    type: text
    default: "''::text"
  mode_traitement_id:
    type: bigint
    default: "0"
  nb_cp:
    type: numeric(5,0)
    default: "0"
  nb_lits:
    type: numeric(5,0)
  oid:
    type: bigint
    not_null: NOT NULL
    default: "nextval('s_services_facturation'::regclass)"
  option_jour_ferme:
    type: character(1)
    default: "''::bpchar"
    comment: 1 = Enlever les mouvements des jours de fermeture
  particularites_encours:
    type: text
    default: "''::bpchar"
    comment: IVG, MAT
  prestations_presence:
    type: text
    default: "''::text"
    comment: |
      Si renseigné, identifie les prestations qui permettent d''identifier la présence (Exemple PY* pour HDJ PSY)
      Codes ou génériques* séparés par virgule
  section_code:
    type: 'text[]'
  section_id:
    type: 'bigint[]'
  section_texte:
    type: 'text[]'
  sej_sans_acte_fictif:
    type: character(1)
    default: "''::bpchar"
  statut:
    type: character(1)
  texte:
    type: text
  texte_court:
    type: text
  type_sejour:
    type: text
    default: "''::bpchar"
    comment: 0 = Pas de type séjour forcé
  type_t2a:
    type: character(1)
    default: "''::bpchar"
    comment: |
      1 = PMSI
      2 = PMSI SSR
      3 = PMSI PSY
      0 = Hors PMSI
  unite_medicale_modifiable:
    type: character(1)
    default: "'0'::bpchar"
constraints:
  t_services_facturation_pkey:
    type: PRIMARY KEY
    column: oid
indexes:
  i_services_facturation_1:
    column: code_original
    method: btree