columns:
  budget_cle_id:
    type: bigint
    default: "0"
  date:
    type: date
    not_null: NOT NULL
  equivalent_malade_complet:
    type: numeric
    default: "0"
  est_chambre_particuliere:
    type: character(1)
    default: "'0'::bpchar"
  est_chambre_particuliere_facturee:
    type: character(1)
    default: "'0'::bpchar"
  est_dernier_mouvement_jour:
    type: character(1)
  est_facture:
    type: character(1)
    default: "'1'::bpchar"
  est_jour_entree:
    type: character(1)
    default: "'0'::bpchar"
  est_jour_hospitalisation:
    type: character(1)
    default: "'0'::bpchar"
  est_jour_sortie:
    type: character(1)
    default: "'0'::bpchar"
  est_mouvement_previsionnel:
    type: character(1)
    default: "'0'::bpchar"
  est_premier_mouvement_jour:
    type: character(1)
  finess:
    type: character(9)
    not_null: NOT NULL
    default: "''::bpchar"
  heure_debut:
    type: numeric(6,0)
    default: "0"
  heure_fin:
    type: numeric(6,0)
    default: "240000"
  is_annulation:
    type: smallint
    default: "0"
  is_weekend:
    type: character(1)
  jour_semaine:
    type: numeric
  lieu_id:
    type: bigint
    not_null: NOT NULL
  medecin_sejour_id:
    type: bigint
  nb_ambulatoires:
    type: numeric(5,0)
    default: "0"
  nb_bebes:
    type: numeric(5,0)
    default: "0"
  nb_chambres_particulieres:
    type: numeric(5,0)
    default: "0"
  nb_deces:
    type: integer
    default: "0"
  nb_entrees_directes:
    type: numeric(5,0)
    default: "0"
  nb_entrees_mutation_activite:
    type: numeric(5,0)
    default: "0"
  nb_entrees_mutation_etage:
    type: numeric(5,0)
    default: "0"
  nb_entrees_mutation_service:
    type: numeric(5,0)
    default: "0"
  nb_entrees_mutation_unite_medicale:
    type: numeric(5,0)
    default: "0"
  nb_entrees_mutations:
    type: numeric(5,0)
    default: "0"
  nb_externes:
    type: numeric(5,0)
    default: "0"
  nb_jour_sejour_sorti:
    type: integer
    default: "0"
  nb_jours_12:
    type: integer
    default: "0"
  nb_jours_cp_12:
    type: integer
    default: "0"
  nb_jours_cp_d:
    type: integer
    default: "1"
  nb_jours_cp_f:
    type: integer
    default: "0"
  nb_jours_d:
    type: integer
    default: "1"
  nb_jours_f:
    type: integer
    default: "0"
  nb_jours_js_inclus:
    type: numeric(5,0)
  nb_jours_js_non_inclus:
    type: numeric(5,0)
  nb_jours_prorata:
    type: numeric
    default: "0"
  nb_passage_externe:
    type: integer
    default: "0"
  nb_preadmission_validee:
    type: numeric
    default: "0"
  nb_preadmission_validee_j1:
    type: numeric
    default: "0"
  nb_preadmission_validee_j2:
    type: numeric
    default: "0"
  nb_seances:
    type: numeric(5,0)
    default: "0"
  nb_seances_autre:
    type: integer
    default: "0"
  nb_seances_chimio:
    type: integer
    default: "0"
  nb_seances_dans_taux:
    type: numeric(5,0)
    default: "0"
  nb_seances_dialyse:
    type: integer
    default: "0"
  nb_sorties_directes:
    type: numeric(5,0)
    default: "0"
  nb_sorties_mutation_activite:
    type: numeric(5,0)
    default: "0"
  nb_sorties_mutation_etage:
    type: numeric(5,0)
    default: "0"
  nb_sorties_mutation_service:
    type: numeric(5,0)
    default: "0"
  nb_sorties_mutation_unite_medicale:
    type: numeric(5,0)
    default: "0"
  nb_sorties_mutations:
    type: numeric(5,0)
    default: "0"
  nb_urgences:
    type: numeric(5,0)
    default: "0"
  no_sejour:
    type: text
    not_null: NOT NULL
  pole_id:
    type: bigint
    default: "0"
  sejour_id:
    type: bigint
    default: "0"
  sequences:
    type: bigint
constraints:
  mouvements_sejour_ukey:
    type: UNIQUE
    column: date, heure_debut, no_sejour
indexes:
  i_mouvements_sejour_1:
    column: date, no_sejour
    method: btree
  i_mouvements_sejour_2:
    column: date
    method: btree
  i_mouvements_sejour_3:
    column: lieu_id
    method: btree
  i_mouvements_sejour_4:
    column: medecin_sejour_id
    method: btree
  i_mouvements_sejour_5:
    column: sejour_id
    method: btree
  i_mouvements_sejour_budget_cle_id:
    column: budget_cle_id
    method: btree
  i_mouvements_sejour_no_sejour:
    column: no_sejour
    method: btree
  i_mouvements_sejour_pole_id:
    column: pole_id
    method: btree