payments table

The payments table in the Hospital Management System Database Schema schema has 8 columns, keyed by id, with 2 foreign keys to invoices and insurance_claims.

claim_id set means the money came from an insurer. Null means the patient paid it directly.

Columns (8)

Columns of the payments table
ColumnTypeConstraintsDescription
iduuidprimary key
invoice_iduuidnot null, references invoices.id
claim_iduuidreferences insurance_claims.id
methodpayment_method_typenot null
amount_centsintegernot null
currencychar(3)not null
referencevarchar(120)
received_attimestamptznot null

Indexes (1)

  • (invoice_id, received_at)

Relationships