tobacco_smoking_summary

Summary or persistent information about the tobacco smoking habits of an individual.

Summary or persistent information about the tobacco smoking habits of an individual.

Purpose. To record summary information about the individual's pattern of smoking of tobacco and tobacco-containing products.

Source

ModelLegRole
openEHR-EHR-EVALUATION.tobacco_smoking_summary.v2openEHRdefines this table

Columns

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
form_iduuidformnoThe form this entry was recorded on.
form_block_iduuidyesThe block within the form, when the entry is bound to one.
overall_status
overall_status_code
overall_status_system
overall_status_valueset_id
coded text
text, text, text, text
yesOverall status/data[at0001]/items[at0089]
overall_descriptiontextyesOverall description/data[at0001]/items[at0043]
regular_smoking_commenceddateyesRegular smoking commenced/data[at0001]/items[at0015]
daily_smoking_commenceddateyesDaily smoking commenced/data[at0001]/items[at0080]
overall_quit_datedateyesOverall quit date/data[at0001]/items[at0016]
overall_years_of_smoking_magnitude
overall_years_of_smoking_units
quantity
numeric, text
yesOverall years of smoking/data[at0001]/items[at0093]
smoking_indexintegeryesSmoking index/data[at0001]/items[at0094]
overall_pack_yearsintegeryesOverall pack years/data[at0001]/items[at0074]
overall_commenttextyesOverall comment/data[at0001]/items[at0019]
quit_date_definitiontextyesQuit date definition/protocol[at0021]/items[at0071]
quit_attempt_definitiontextyesQuit attempt definition/protocol[at0021]/items[at0085]
current_smoker_definitiontextyesCurrent smoker definition/protocol[at0021]/items[at0075]
former_smoker_definitiontextyesFormer smoker definition/protocol[at0021]/items[at0076]
never_smoked_definitiontextyesNever smoked definition/protocol[at0021]/items[at0079]
pack_definition_magnitude
pack_definition_units
quantity
numeric, text
yesPack definition/protocol[at0021]/items[at0072]
last_updatedtimestamptzyesLast updated/protocol[at0021]/items[at0022]

Constraints

check ((overall_status_code is null and overall_status_system is null and overall_status_valueset_id is null and overall_status is null) or (overall_status is not null and overall_status_code is not null and overall_status_system is not null and overall_status_valueset_id is not null))
check ((overall_years_of_smoking_magnitude is null and overall_years_of_smoking_units is null) or (overall_years_of_smoking_magnitude is not null and overall_years_of_smoking_units is not null))
check (overall_years_of_smoking_magnitude is null or (overall_years_of_smoking_units = 'a' and overall_years_of_smoking_magnitude >= 0))
check (smoking_index is null or smoking_index >= 0)
check (overall_pack_years is null or overall_pack_years >= 0)
check ((pack_definition_magnitude is null and pack_definition_units is null) or (pack_definition_magnitude is not null and pack_definition_units is not null))
check (pack_definition_magnitude is null or (pack_definition_units = 'g' and pack_definition_magnitude >= 0) or (pack_definition_units = '[oz_av]' and pack_definition_magnitude >= 0))

Unique

References

ColumnsTargetOn delete
form_idformcascade
form_id, form_block_idform_blockcascade
overall_status_valueset_id, overall_status_code, overall_status_system, overall_statusvalueset_coderestrict

Referenced by

Indexes

Child tables

2 tables hang off tobacco_smoking_summary, one row per repetition.

tobacco_smoking_summary_per_type

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
tobacco_smoking_summary_iduuidtobacco_smoking_summaryno
positionintegernoOrder of this row within its parent, from zero.
type
type_code
type_system
type_valueset_id
coded text
text, text, text, text
yesType/data[at0001]/items[at0029]/items[at0095]
status
status_code
status_system
status_valueset_id
coded text
text, text, text, text
yesStatus/data[at0001]/items[at0029]/items[at0052]
descriptiontextyesDescription/data[at0001]/items[at0029]/items[at0053]
quit_datedateyesQuit date/data[at0001]/items[at0029]/items[at0014]
pack_yearsintegeryesPack years/data[at0001]/items[at0029]/items[at0017]
commenttextyesComment/data[at0001]/items[at0029]/items[at0069]

Constraints

check ((type_code is null and type_system is null and type_valueset_id is null) or (type is not null and type_code is not null and type_system is not null and type_valueset_id is not null))
check ((status_code is null and status_system is null and status_valueset_id is null and status is null) or (status is not null and status_code is not null and status_system is not null and status_valueset_id is not null))
check (pack_years is null or pack_years >= 0)

Unique

References

ColumnsTargetOn delete
tobacco_smoking_summary_idtobacco_smoking_summarycascade
type_valueset_id, type_code, type_system, typevalueset_coderestrict
status_valueset_id, status_code, status_system, statusvalueset_coderestrict

Referenced by

tobacco_smoking_summary_per_type_per_episode

Child table — one row per repetition, deleted with its parent.

ColumnTypeNullDescriptionSource
iduuid primary keynoPrimary key.
tobacco_smoking_summary_per_type_iduuidtobacco_smoking_summary_per_typeno
positionintegernoOrder of this row within its parent, from zero.
episode_labeltextyesEpisode label/data[at0001]/items[at0029]/items[at0064]/items[at0081]
status
status_code
status_system
status_valueset_id
coded text
text, text, text, text
yesStatus/data[at0001]/items[at0029]/items[at0064]/items[at0096]
episode_start_datedateyesEpisode start date/data[at0001]/items[at0029]/items[at0064]/items[at0013]
episode_end_datedateyesEpisode end date/data[at0001]/items[at0029]/items[at0064]/items[at0082]
pattern
pattern_code
pattern_system
pattern_valueset_id
coded text
text, text, text, text
yesPattern/data[at0001]/items[at0029]/items[at0064]/items[at0030]
typical_use_units_magnitude
typical_use_units_units
quantity
numeric, text
yesTypical use (units)/data[at0001]/items[at0029]/items[at0064]/items[at0023]
typical_use_mass_magnitude
typical_use_mass_units
quantity
numeric, text
yesTypical use (mass)/data[at0001]/items[at0029]/items[at0064]/items[at0065]
number_of_quit_attemptsintegeryesNumber of quit attempts/data[at0001]/items[at0029]/items[at0064]/items[at0025]
episode_commenttextyesEpisode comment/data[at0001]/items[at0029]/items[at0064]/items[at0087]

Constraints

check ((status_code is null and status_system is null and status_valueset_id is null and status is null) or (status is not null and status_code is not null and status_system is not null and status_valueset_id is not null))
check ((pattern_code is null and pattern_system is null and pattern_valueset_id is null) or (pattern is not null and pattern_code is not null and pattern_system is not null and pattern_valueset_id is not null))
check ((typical_use_units_magnitude is null and typical_use_units_units is null) or (typical_use_units_magnitude is not null and typical_use_units_units is not null))
check (typical_use_units_magnitude is null or (typical_use_units_units = '1/d' and typical_use_units_magnitude >= 0) or (typical_use_units_units = '1/wk' and typical_use_units_magnitude >= 0))
check ((typical_use_mass_magnitude is null and typical_use_mass_units is null) or (typical_use_mass_magnitude is not null and typical_use_mass_units is not null))
check (typical_use_mass_magnitude is null or (typical_use_mass_units = 'g/d' and typical_use_mass_magnitude >= 0) or (typical_use_mass_units = 'g/wk' and typical_use_mass_magnitude >= 0) or (typical_use_mass_units = '[oz_av]/d' and typical_use_mass_magnitude >= 0) or (typical_use_mass_units = '[oz_av]/wk' and typical_use_mass_magnitude >= 0))
check (number_of_quit_attempts is null or number_of_quit_attempts >= 0)

Unique

References

ColumnsTargetOn delete
tobacco_smoking_summary_per_type_idtobacco_smoking_summary_per_typecascade
status_valueset_id, status_code, status_system, statusvalueset_coderestrict
pattern_valueset_id, pattern_code, pattern_system, patternvalueset_coderestrict

Value sets

Value setCodes
org.openehr::openEHR-EHR-EVALUATION.tobacco_smoking_summary.v2/overall_status3
org.openehr::openEHR-EHR-EVALUATION.tobacco_smoking_summary.v2/pattern2
org.openehr::openEHR-EHR-EVALUATION.tobacco_smoking_summary.v2/status3
org.openehr::openEHR-EHR-EVALUATION.tobacco_smoking_summary.v2/status_at00962
org.openehr::openEHR-EHR-EVALUATION.tobacco_smoking_summary.v2/type8