--- title: "occupation_record" description: "A single job or role carried out by an individual during a specified period of time." --- A single job or role carried out by an individual during a specified period of time. **Purpose.** To record details about a single job or role carried out by an individual during a specified period of time. ## Source | Model | Leg | Role | |---|---|---| | `openEHR-EHR-CLUSTER.occupation_record.v1` | openEHR | defines this table | ## Columns | Column | Type | Null | Description | Source | |---|---|---|---|---| | `id` | `uuid primary key` | no | Primary key. | — | | `job_title_role`
`job_title_role_code`
`job_title_role_system`
`job_title_role_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Job title/role | `/items[at0005]` | | `description` | `text` | yes | Description | `/items[at0016]` | | `date_commenced` | `timestamptz` | yes | Date commenced | `/items[at0007]` | | `paid_employment_status`
`paid_employment_status_code`
`paid_employment_status_system`
`paid_employment_status_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Paid employment status | `/items[at0001]` | | `full_time_equivalent_coded_text`
`full_time_equivalent_coded_text_code`
`full_time_equivalent_coded_text_system`
`full_time_equivalent_coded_text_valueset_id`
`full_time_equivalent_proportion_numerator`
`full_time_equivalent_proportion_denominator` | coded text
`text`, `text`, `text`, `text`, `numeric`, `numeric` | yes | Full time equivalent | `/items[at0013]` | | `time_allocated_magnitude`
`time_allocated_units` | quantity
`numeric`, `text` | yes | Time allocated | `/items[at0019]` | | `industry_category`
`industry_category_code`
`industry_category_system`
`industry_category_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Industry category | `/items[at0002]` | | `job_category`
`job_category_code`
`job_category_system`
`job_category_valueset_id` | coded text
`text`, `text`, `text`, `text` | yes | Job category | `/items[at0006]` | | `date_ceased` | `timestamptz` | yes | Date ceased | `/items[at0008]` | | `comment` | `text` | yes | Comment | `/items[at0014]` | ## Constraints ```sql check ((job_title_role_code is null and job_title_role_system is null and job_title_role_valueset_id is null) or (job_title_role is not null and job_title_role_code is not null and job_title_role_system is not null and job_title_role_valueset_id is not null)) check ((paid_employment_status_code is null and paid_employment_status_system is null and paid_employment_status_valueset_id is null) or (paid_employment_status is not null and paid_employment_status_code is not null and paid_employment_status_system is not null and paid_employment_status_valueset_id is not null)) check ((full_time_equivalent_coded_text_code is null and full_time_equivalent_coded_text_system is null and full_time_equivalent_coded_text_valueset_id is null) or (full_time_equivalent_coded_text is not null and full_time_equivalent_coded_text_code is not null and full_time_equivalent_coded_text_system is not null and full_time_equivalent_coded_text_valueset_id is not null)) check ((full_time_equivalent_proportion_numerator is null and full_time_equivalent_proportion_denominator is null) or (full_time_equivalent_proportion_numerator is not null and full_time_equivalent_proportion_denominator is not null)) check (full_time_equivalent_proportion_denominator is null or full_time_equivalent_proportion_denominator <> 0) check (full_time_equivalent_proportion_denominator is null or full_time_equivalent_proportion_denominator = 100) check (full_time_equivalent_proportion_numerator is null or full_time_equivalent_proportion_numerator >= 0) check (num_nonnulls(full_time_equivalent_coded_text, full_time_equivalent_proportion_numerator) <= 1) check ((time_allocated_magnitude is null and time_allocated_units is null) or (time_allocated_magnitude is not null and time_allocated_units is not null)) check (time_allocated_magnitude is null or (time_allocated_units = 'h/d' and time_allocated_magnitude >= 0) or (time_allocated_units = 'h/wk' and time_allocated_magnitude >= 0) or (time_allocated_units = 'h/mo' and time_allocated_magnitude >= 0) or (time_allocated_units = 'h/a' and time_allocated_magnitude >= 0) or (time_allocated_units = 'd/wk' and time_allocated_magnitude >= 0) or (time_allocated_units = 'd/mo' and time_allocated_magnitude >= 0) or (time_allocated_units = 'wk/mo' and time_allocated_magnitude >= 0) or (time_allocated_units = 'd/a' and time_allocated_magnitude >= 0) or (time_allocated_units = 'wk/a' and time_allocated_magnitude >= 0) or (time_allocated_units = 'mo/a' and time_allocated_magnitude >= 0)) check ((industry_category_code is null and industry_category_system is null and industry_category_valueset_id is null) or (industry_category is not null and industry_category_code is not null and industry_category_system is not null and industry_category_valueset_id is not null)) check ((job_category_code is null and job_category_system is null and job_category_valueset_id is null) or (job_category is not null and job_category_code is not null and job_category_system is not null and job_category_valueset_id is not null)) ``` ## References | Columns | Target | On delete | |---|---|---| | `job_title_role_valueset_id, job_title_role_code, job_title_role_system, job_title_role` | [`valueset_code`](/docs/tables/valueset_code) | restrict | | `paid_employment_status_valueset_id, paid_employment_status_code, paid_employment_status_system, paid_employment_status` | [`valueset_code`](/docs/tables/valueset_code) | restrict | | `full_time_equivalent_coded_text_valueset_id, full_time_equivalent_coded_text_code, full_time_equivalent_coded_text_system, full_time_equivalent_coded_text` | [`valueset_code`](/docs/tables/valueset_code) | restrict | | `industry_category_valueset_id, industry_category_code, industry_category_system, industry_category` | [`valueset_code`](/docs/tables/valueset_code) | restrict | | `job_category_valueset_id, job_category_code, job_category_system, job_category` | [`valueset_code`](/docs/tables/valueset_code) | restrict | ## Referenced by - [`occupation_record_organisation_details`](/docs/tables/occupation_record_organisation_details) via `occupation_record_id` - [`occupation_summary_occupation_episode`](/docs/tables/occupation_summary_occupation_episode) via `occupation_record_id` ## Child tables 1 table hang off `occupation_record`, one row per repetition. ### `occupation_record_organisation_details` Child table — one row per repetition, deleted with its parent. | Column | Type | Null | Description | Source | |---|---|---|---|---| | `id` | `uuid primary key` | no | Primary key. | — | | `occupation_record_id` | `uuid` → [`occupation_record`](/docs/tables/occupation_record) | no | — | — | | `position` | `integer` | no | Order of this row within its parent, from zero. | — | | `organization_id` | `uuid` | no | Organisation details | `/items[at0004]` | #### Unique - `occupation_record_id, position` - `occupation_record_id, organization_id` #### References | Columns | Target | On delete | |---|---|---| | `occupation_record_id` | [`occupation_record`](/docs/tables/occupation_record) | cascade | | `organization_id` | [`organization`](/docs/tables/organization) | no action | #### Indexes - `occupation_record_organisation_details_organization_id_idx` on `organization_id` ## Value sets | Value set | Codes | |---|---| | `org.openehr::openEHR-EHR-CLUSTER.occupation_record.v1/full_time_equivalent` | 2 |