Determination of smoking status at a specified date.
This phenotype determines smoking status at a specified date using the most recent smoking-related event recorded on or before that date. It applies curated SNOMED CT codelists representing current smoker, ex-smoker, and non-smoker states, and maps the latest qualifying code to a harmonised status category (SMOKER, EX-SMOKER, NON-SMOKER). Where no qualifying smoking-status record is available, status is UNKNOWN.
| Parameter | Description | Value |
|---|---|---|
patient_record |
A single patient's longitudinal record | To be specified on execution |
status_date |
Date at which the status is to be determined | To be specified on execution |
start_date |
Earliest date from which to search | To be specified on execution |
active_smoker_codelist |
SNOMED CT codes identifying active smokers | RSC-C2065 (Active Smoker) |
ex_smoker_codelist |
SNOMED CT codes identifying ex-smokers | RSC-C2066 (Ex-Smoker) |
non_smoker_codelist |
SNOMED CT codes identifying ex-smokers | RSC-C2067 (Non-Smoker) |
A composite codelist all_smoker_status_codelist is defined as the union of active_smoker_codelist, ex_smoker_codelist and non_smoker_codelist.
Let observation_window be the period from start_date to status_date (inclusive)
Let most_recent_event be the most recent event in patient_record within the observation_window with a code from all_smoker_status_codelist.
If such an event exists:
active_smoker_codelist -> return SMOKERex_smoker_codelist -> return EX-SMOKERnon_smoker_codelist -> return NON-SMOKEROtherwise: