hr.person_medical_examinations
Schema: hr
English table: hr.person_medical_examinations
Italian original table: hr.ana_visite_mediche
Description: Person medical examination records, including booking details, last visit, outcome code, and expiration date.
Overview
- Columns: 15
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 0
- Indexes: 9
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Primary key. | |
pme_code | avm_id | integer | NO | Source record identifier for the person medical examination entry (unique per tenant). | |
pme_person_id | avm_ana_id | integer | NO | Person identifier (anagrafico) linked to this medical examination record. | |
pme_medical_exam_type_id | avm_vm_id | integer | NO | Medical examination type identifier (links to medical examination master data). | |
pme_last_visit_on | avm_last_visit | date | NO | Date of the most recent medical examination performed for this record. | |
pme_result_code | avm_result | numeric(1,0) | NO | Outcome/result code (numeric flag) for the medical examination. | |
pme_notes | avm_note | text | NO | Notes related to the medical examination. | |
pme_expires_on | avm_date_expired | date | NO | Expiration date of the medical examination validity. | |
pme_requires_new_visit | avm_new_visit | boolean | NO | Whether a new medical examination visit is required. | |
pme_booking_on | avm_date_booking | date | NO | Booking date for the scheduled medical examination. | |
pme_booking_time | avm_time_booking | integer | NO | Booking time for the scheduled medical examination (stored as integer, source format). | |
pme_subject_id | avm_sog_id | integer | NO | Related subject (soggetto) identifier associated with this medical examination record. | |
tenant_id | tenant_id | integer | YES | Tenant identifier. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom fields payload (JSON). |
_deleted | _deleted | boolean | YES | false | Soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_person_medical_examinations_tenant_id | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_person_medical_examinations→id - Unique:
uk_pme_code_tenant→pme_code, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_pme_tenant | NO | btree | tenant_id |
idx_pme_tenant_booking_on | NO | btree | tenant_id, pme_booking_on) WHERE (_deleted = false |
idx_pme_tenant_code | NO | btree | tenant_id, pme_code) WHERE (_deleted = false |
idx_pme_tenant_expires_on | NO | btree | tenant_id, pme_expires_on) WHERE (_deleted = false |
idx_pme_tenant_medical_exam_type | NO | btree | tenant_id, pme_medical_exam_type_id) WHERE (_deleted = false |
idx_pme_tenant_person | NO | btree | tenant_id, pme_person_id) WHERE (_deleted = false |
idx_pme_tenant_person_booking_on | NO | btree | tenant_id, pme_person_id, pme_booking_on) WHERE (_deleted = false |
idx_pme_tenant_person_expires_on | NO | btree | tenant_id, pme_person_id, pme_expires_on) WHERE (_deleted = false |
idx_pme_tenant_subject | NO | btree | tenant_id, pme_subject_id) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)