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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| invoice_id | uuid | not null, references invoices.id | |
| claim_id | uuid | references insurance_claims.id | |
| method | payment_method_type | not null | |
| amount_cents | integer | not null | |
| currency | char(3) | not null | |
| reference | varchar(120) | ||
| received_at | timestamptz | not null |
Indexes (1)
(invoice_id, received_at)
Relationships
payments.invoice_idreferencesinvoices.idpayments.claim_idreferencesinsurance_claims.id