occupation_record

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

ModelLegRole
openEHR-EHR-CLUSTER.occupation_record.v1openEHRdefines this table

Columns

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
job_title_role
job_title_role_code
job_title_role_system
job_title_role_valueset_id
coded text
text, text, text, text
yesJob title/role/items[at0005]
descriptiontextyesDescription/items[at0016]
date_commencedtimestamptzyesDate 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
yesPaid 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
yesFull time equivalent/items[at0013]
time_allocated_magnitude
time_allocated_units
quantity
numeric, text
yesTime allocated/items[at0019]
industry_category
industry_category_code
industry_category_system
industry_category_valueset_id
coded text
text, text, text, text
yesIndustry category/items[at0002]
job_category
job_category_code
job_category_system
job_category_valueset_id
coded text
text, text, text, text
yesJob category/items[at0006]
date_ceasedtimestamptzyesDate ceased/items[at0008]
commenttextyesComment/items[at0014]

Constraints

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

ColumnsTargetOn delete
job_title_role_valueset_id, job_title_role_code, job_title_role_system, job_title_rolevalueset_coderestrict
paid_employment_status_valueset_id, paid_employment_status_code, paid_employment_status_system, paid_employment_statusvalueset_coderestrict
full_time_equivalent_coded_text_valueset_id, full_time_equivalent_coded_text_code, full_time_equivalent_coded_text_system, full_time_equivalent_coded_textvalueset_coderestrict
industry_category_valueset_id, industry_category_code, industry_category_system, industry_categoryvalueset_coderestrict
job_category_valueset_id, job_category_code, job_category_system, job_categoryvalueset_coderestrict

Referenced by

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.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
occupation_record_iduuidoccupation_recordno
positionintegernoOrder of this row within its parent, from zero.
organization_iduuidnoOrganisation details/items[at0004]

Unique

References

ColumnsTargetOn delete
occupation_record_idoccupation_recordcascade
organization_idorganizationno action

Indexes

Value sets

Value setCodes
org.openehr::openEHR-EHR-CLUSTER.occupation_record.v1/full_time_equivalent2