columns:
  code_cp_demandee:
    type: character(1)
    default: "0"
  code_origine:
    type: character(1)
    default: "'C'::bpchar"
  code_sorti:
    type: character(1)
    default: "'0'::bpchar"
  date_calcul:
    type: date
    default: "'2099-12-31'::date"
  date_debut:
    type: date
  date_encours:
    type: date
    default: "'2099-12-31'::date"
  date_entree:
    type: date
  date_fin:
    type: date
  date_groupage:
    type: date
  date_sortie:
    type: date
  finess:
    type: character(9)
    not_null: NOT NULL
    default: "''::bpchar"
  ghm_id:
    type: bigint
  ghs_bebe1_id:
    type: bigint
    default: "0"
  ghs_bebe2_id:
    type: bigint
    default: "0"
  ghs_bebe3_id:
    type: bigint
    default: "0"
  ghs_id:
    type: bigint
    default: "0"
  heure_entree:
    type: numeric(6,0)
  heure_sortie:
    type: numeric(6,0)
  lieu_sortie_id:
    type: bigint
  montant_encours_0_c:
    type: numeric(13,2)
    default: "0"
  montant_encours_0_h:
    type: numeric(13,2)
    default: "0"
  montant_encours_1_c:
    type: numeric(13,2)
    default: "0"
  montant_encours_1_h:
    type: numeric(13,2)
    default: "0"
  montant_encours_22_c:
    type: numeric(13,2)
    default: "0"
  montant_encours_22_h:
    type: numeric(13,2)
    default: "0"
  montant_encours_2_c:
    type: numeric(13,2)
    default: "0"
  montant_encours_2_h:
    type: numeric(13,2)
    default: "0"
  montant_encours_c:
    type: numeric(13,2)
    default: "0"
  montant_encours_h:
    type: numeric(13,2)
    default: "0"
  no_facture:
    type: text
    not_null: NOT NULL
  no_facture_reference:
    type: text
    default: "''::text"
  no_sejour:
    type: text
  oid:
    type: bigint
    not_null: NOT NULL
    default: "nextval('s_factures_encours'::regclass)"
  provider_id:
    type: bigint
  sejour_id:
    type: bigint
    not_null: NOT NULL
  tiers_payant_0_id:
    type: bigint
    default: "0"
  tiers_payant_1_id:
    type: bigint
    default: "0"
  tiers_payant_22_id:
    type: bigint
    default: "0"
  tiers_payant_2_id:
    type: bigint
    default: "0"
  type_sejour:
    type: text
  filiere_soin_principale_id:
    type: bigint
    default: "0"
constraints:
  p_factures_encours_pkey:
    type: PRIMARY KEY
    column: oid
indexes:
  i_factures_encours_1:
    column: no_facture
    method: btree
  i_factures_encours_10:
    column: sejour_id
    method: btree
  i_factures_encours_11:
    column: ghs_id
    method: btree
  i_factures_encours_12:
    column: no_sejour
    method: btree
  i_factures_encours_13:
    column: type_sejour
    method: btree
  i_factures_encours_2:
    column: date_encours
    method: btree
  i_factures_encours_4:
    column: no_facture_reference
    method: btree
  i_factures_encours_5:
    column: date_fin
    method: btree
  i_factures_encours_6:
    column: tiers_payant_1_id
    method: btree
  i_factures_encours_7:
    column: tiers_payant_2_id
    method: btree
  i_factures_encours_8:
    column: tiers_payant_0_id
    method: btree
  i_factures_encours_9:
    column: tiers_payant_22_id
    method: btree