hr.person_health_conditions
Schema: hr
English table: hr.person_health_conditions
Italian original table: hr.ana_situazione_sanitaria
Description: Records temporal health conditions, disabilities, and special health situations for persons (employees), including disability types and statuses.
Overview
- Columns: 14
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 0
- Indexes: 8
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Primary key identifier for the health condition record. | |
person_health_condition_id | anasitsan_id | integer | NO | Internal reference ID for the health condition. | |
person_health_person_id | anasitsan_ana_id | integer | NO | Foreign key referencing the person (employee) whose health condition is recorded. | |
person_health_condition_type | anasitsan_type | character varying(5) | NO | Type code of the health condition (e.g., disability, chronic illness, special status). | |
person_health_condition_value | anasitsan_value | character varying(250) | NO | Description or value of the health condition. | |
person_health_condition_valid_from | anasitsan_dal | date | NO | Start date when this health condition is valid/active. | |
person_health_condition_valid_to | anasitsan_al | date | NO | End date until which this health condition is valid/active. | |
person_health_disability_type_id | anasitsan_tipiinv_id | integer | NO | Foreign key referencing the type of disability (if applicable). | |
person_health_disability_status_id | anasitsan_xtipstainv_id | integer | NO | Foreign key referencing the disability status (e.g., recognized, pending, expired). | |
person_health_condition_notes | anasitsan_note | text | NO | Free-text notes regarding the health condition. | |
tenant_id | tenant_id | integer | YES | Multi‑tenant isolation column. References cloud._tenant. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSONB field for custom, tenant‑specific extensions. |
_deleted | _deleted | boolean | YES | false | Soft‑delete flag. When true, the record is considered logically deleted. |
person_health_condition_period | anasitsan_periodo | daterange | YES | GENERATED: daterange(person_health_condition_valid_from, person_health_condition_valid_to, '[]'::text) | Generated daterange column combining valid_from and valid_to for efficient range queries. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_person_health_conditions_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_person_health_conditions→id - Unique:
uk_person_health_conditions_condition_tenant→person_health_condition_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_phc_tenant | NO | btree | tenant_id |
idx_phc_tenant_condition | NO | btree | tenant_id, person_health_condition_id) WHERE (_deleted = false |
idx_phc_tenant_condition_type | NO | btree | tenant_id, person_health_condition_type) WHERE (_deleted = false |
idx_phc_tenant_disability_status | NO | btree | tenant_id, person_health_disability_status_id) WHERE (_deleted = false |
idx_phc_tenant_disability_type | NO | btree | tenant_id, person_health_disability_type_id) WHERE (_deleted = false |
idx_phc_tenant_period_gist | NO | gist | tenant_id, person_health_condition_period) WHERE (_deleted = false |
idx_phc_tenant_person | NO | btree | tenant_id, person_health_person_id) WHERE (_deleted = false |
idx_phc_tenant_person_period_gist | NO | gist | tenant_id, person_health_person_id, person_health_condition_period) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)