columns:
  acte_principal_id:
    type: bigint
    default: "0"
  adm_prod_reshospi_id:
    type: smallint
    default: (0)::smallint
    comment: 1:Oui | 2:Non | blanc
  age:
    type: numeric
  age_gestationnel:
    type: numeric(2,0)
    default: "0"
  annee_ivg_precedente:
    type: smallint
    default: "0"
  avec_anesthesie:
    type: character(1)
    default: "'0'::bpchar"
    comment: "1 = séjours avec au moins un acte d''anesthesie, 0 = Sejours sans actes d''anesthesie"
  base_remboursement:
    type: numeric(13,2)
  ca_exb:
    type: numeric(13,2)
  ca_exh:
    type: numeric(13,2)
  ca_ghs:
    type: numeric(13,2)
  ca_ghs_raac:
    type: numeric(13,2)
  ca_ghs_theorique:
    type: numeric(13,2)
  ca_neonat:
    type: numeric(13,2)
  ca_rea:
    type: numeric(13,2)
  ca_si:
    type: numeric(13,2)
  ca_sur:
    type: numeric(13,2)
  cma:
    type: character(1)
  code_postal:
    type: character(5)
  code_postal_id:
    type: bigint
    default: "0"
  code_retour_groupage:
    type: character(3)
    default: "'000'::bpchar"
  coefficient_prudentiel_theorique:
    type: numeric
    default: "1"
  comite_medical_id:
    type: bigint
    default: "0"
  confirmation_codage:
    type: character(1)
    comment: |
      * 1 = oui
      * blanc ou 2 = non
  contexte_pat_id:
    type: smallint
    default: (0)::smallint
    comment: 1:Oui | 2:Non | blanc
  conversion_hp_hc_id:
    type: smallint
    default: (0)::smallint
    comment: 1:conversion HP-HC | 2:pas de conversion | blanc
  date_dernieres_regles:
    type: date
    default: "'2099-12-31'::date"
  date_entree:
    type: date
  date_import:
    type: date
    default: "'0001-01-01 BC'::date"
  date_naissance:
    type: date
  date_sortie:
    type: date
  destination:
    type: character(1)
  diagnostic_principal_id:
    type: bigint
    default: "0"
  diagnostic_relie_id:
    type: bigint
    default: "0"
  dmi_facture:
    type: numeric(13,2)
  duree_sejour:
    type: numeric(5,0)
  en_cours:
    type: character(1)
    default: "'0'::bpchar"
    comment: 1 = Non facturable, 0 = Facturable
  en_cours_etat:
    type: character(1)
    default: "''::bpchar"
    comment: |
      V = groupé et validé
      G = groupé
      S = Sorti non groupé
      P = Présent
  etat:
    type: character(1)
    default: "''::bpchar"
  etat_sejour:
    type: character(1)
    default: "'?'::bpchar"
  finess:
    type: character(9)
  forfait_facture:
    type: numeric(13,2)
  from_oid:
    type: bigint
    default: "0"
  ghm_fg9:
    type: character(8)
  ghm_id:
    type: bigint
    default: "0"
  ghm_production_id:
    type: bigint
    default: "0"
  ghs_id:
    type: bigint
  groupe_ghm:
    type: character(1)
  honoraires_factures:
    type: numeric(13,2)
  igs2:
    type: numeric(5,0)
    default: "0"
  import_id:
    type: bigint
    default: "0"
  medecin_rss_id:
    type: bigint
  mode_entree:
    type: character(1)
  mode_sortie:
    type: character(1)
  mois_sortie:
    type: numeric(6,0)
  nb_exb:
    type: numeric(5,0)
  nb_exh:
    type: numeric(5,0)
  nb_ghs:
    type: numeric(5,0)
  nb_ghsmin:
    type: numeric(5,0)
    comment: GHS minoré si UCD en sus dans le séjour
  nb_intervention_id:
    type: smallint
    default: (0)::smallint
    comment: "A:Nombre d''interventions > 3 | B: 3 interventions |C: + de 3 interventions | blanc"
  nb_neonat:
    type: numeric(5,0)
  nb_rea:
    type: numeric(5,0)
  nb_rsa:
    type: numeric(5,0)
  nb_rum:
    type: numeric(5,0)
  nb_seances:
    type: numeric(5,0)
  nb_si:
    type: numeric(5,0)
  nb_sur:
    type: numeric(5,0)
  no_patient:
    type: bigint
    default: "0"
  no_rss:
    type: bigint
    default: "0"
  no_rum_principal:
    type: numeric(5,0)
    default: "0"
  no_sejour_administratif:
    type: character(20)
  nombre_ivg_anterieures:
    type: smallint
    default: "0"
  nombre_naissances_vivantes_anterieures:
    type: smallint
    default: "0"
  np_id:
    type: smallint
    default: (0)::smallint
  numero_editeur_pmsi:
    type: bigint
    default: "0"
  numero_innovation:
    type: character(15)
  oid:
    type: bigint
    default: "0"
  passage_urgences_code:
    type: character(1)
    default: "''::bpchar"
    comment: '5:Passage urgences même entité | U:Passage urgences autre entité | V:5+U  | blanc'
  patient_id:
    type: bigint
    default: "0"
  phc_facture:
    type: numeric(13,2)
  poids_bebe:
    type: numeric(5,0)
  pole_id:
    type: bigint
    default: "0"
  prestation_principale_id:
    type: bigint
    default: "0"
  provenance:
    type: character(1)
  raac_id:
    type: smallint
    default: (0)::smallint
    comment: 1:prise en charge RAAC | 2:pas de prise en charge | blanc
  rehosp_meme_ghm:
    type: character(1)
    default: "'0'::bpchar"
  rescrit_tarif_id:
    type: smallint
    default: (0)::smallint
    comment: 1:Oui | 2:Non | blanc
  rss_mere_id:
    type: bigint
    default: "0"
  secteur:
    type: character(5)
  sejour_facture:
    type: numeric(13,2)
  severite_fg11_simulation_code:
    type: character(1)
    default: "'0'::bpchar"
  sexe:
    type: character(1)
  supprime:
    type: character(1)
  t2a_facture:
    type: numeric(13,2)
  traitement_epmsi:
    type: character(2)
    default: "'30'::bpchar"
  type_dosimetrie:
    type: character(1)
    comment: 1,2,3,4 ou blanc
  type_machine_rdth:
    type: character(1)
    comment: 1,2,3,4 ou blanc
  unite_medicale_principale_id:
    type: bigint
    default: "0"
  valorise_valosejace:
    type: text
    default: "'0'::text"
  version_groupage:
    type: character(2)
indexes:
  i_rss_1:
    column: no_rss
    method: btree
  i_rss_10:
    column: mode_sortie
    method: btree
  i_rss_11:
    column: ghm_production_id
    method: btree
  i_rss_12:
    column: no_sejour_administratif
    method: btree
  i_rss_13:
    column: no_rum_principal
    method: btree
  i_rss_14:
    column: unite_medicale_principale_id
    method: btree
  i_rss_15:
    column: oid
    method: btree
  i_rss_16:
    column: code_postal_id
    method: btree
  i_rss_17:
    column: acte_principal_id
    method: btree
  i_rss_18:
    column: prestation_principale_id
    method: btree
  i_rss_19:
    column: patient_id
    method: btree
  i_rss_2:
    column: mois_sortie
    method: btree
  i_rss_20:
    column: traitement_epmsi
    method: btree
  i_rss_21:
    column: comite_medical_id
    method: btree
  i_rss_3:
    column: date_sortie
    method: btree
  i_rss_4:
    column: ghm_id
    method: btree
  i_rss_5:
    column: medecin_rss_id
    method: btree
  i_rss_6:
    column: diagnostic_principal_id
    method: btree
  i_rss_7:
    column: diagnostic_relie_id
    method: btree
  i_rss_8:
    column: finess
    method: btree
  i_rss_9:
    column: mode_entree
    method: btree