Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
||||||||||||
| practice_id | text | 2147483647 | null |
|
|
||||||||||||
| kind | text | 2147483647 | null |
|
|
||||||||||||
| name | text | 2147483647 | null |
|
|
||||||||||||
| description | text | 2147483647 | √ | null |
|
|
|||||||||||
| sku | text | 2147483647 | √ | null |
|
|
|||||||||||
| upc | text | 2147483647 | √ | null |
|
|
|||||||||||
| manufacturer_name | text | 2147483647 | √ | null |
|
|
|||||||||||
| manufacturer_id | text | 2147483647 | √ | null |
|
|
|||||||||||
| service_code | text | 2147483647 | √ | null |
|
|
|||||||||||
| service_duration_minutes | int4 | 10 | √ | null |
|
|
|||||||||||
| is_procedural | bool | 1 | false |
|
|
||||||||||||
| is_lot_tracked | bool | 1 | false |
|
|
||||||||||||
| is_taxable | bool | 1 | false |
|
|
||||||||||||
| is_active | bool | 1 | true |
|
|
||||||||||||
| is_deleted | bool | 1 | false |
|
|
||||||||||||
| legacy_item_id | text | 2147483647 | √ | null |
|
|
|||||||||||
| legacy_service_id | text | 2147483647 | √ | null |
|
|
|||||||||||
| legacy_practice_service_type_id | text | 2147483647 | √ | null |
|
|
|||||||||||
| legacy_fee_id | text | 2147483647 | √ | null |
|
|
|||||||||||
| legacy_item_type | int4 | 10 | √ | null |
|
|
|||||||||||
| legacy_payload | jsonb | 2147483647 | '{}'::jsonb |
|
|
||||||||||||
| metadata | jsonb | 2147483647 | '{}'::jsonb |
|
|
||||||||||||
| created_at | timestamptz | 35,6 | now() |
|
|
||||||||||||
| updated_at | timestamptz | 35,6 | now() |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| catalog_items_pkey | Primary key | Asc | id |
| catalog_items_legacy_fee_unique | Must be unique | Asc/Asc/Asc | practice_id + kind + legacy_fee_id |
| catalog_items_legacy_item_unique | Must be unique | Asc/Asc/Asc | practice_id + kind + legacy_item_id |
| catalog_items_legacy_service_idx | Performance | Asc/Asc/Asc | practice_id + kind + legacy_service_id |
| catalog_items_practice_kind_active_idx | Performance | Asc/Asc/Asc | practice_id + kind + is_active |
| catalog_items_practice_name_idx | Performance | Asc | practice_id |
| catalog_items_sku_idx | Performance | Asc/Asc | practice_id + sku |
| catalog_items_upc_idx | Performance | Asc/Asc | practice_id + upc |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| catalog_items_kind_check | ((kind = ANY (ARRAY['product'::text, 'service'::text, 'fee'::text]))) |
| catalog_items_service_duration_minutes_check | (((service_duration_minutes IS NULL) OR (service_duration_minutes > 0))) |


