4  The clinical pathway model

The clinical pathway model (01_clinical_pathway.R) is a deterministic module that calculates service uptake, resource utilisation, and subsequent smoking cessation trajectories.

The model evaluates the clinical flow across three distinct treatment allocation groups: patients seen by a specialist tobacco dependency adviser, patients receiving Very Brief Advice (VBA) only, and patients receiving no intervention.

4.1 Input validation and parameter extraction

The model does not rely on hard-coded assumptions. It extracts parameters dynamically from the user-defined scenarios_control_panel.csv.

The engine utilises a strict extraction function (get_exact_val). If a required clinical parameter (such as pr_screened or quit_rate_4w_csss) is missing from the designated scenario arm, the engine triggers a fatal error rather than substituting a default value. Furthermore, the engine uses explicit assertions (assert_that) to verify the structural integrity of the input cohort data before execution:

Code
# Extract from 01_clinical_pathway.R

assert_that(TOB_COL_CONDITION %in% names(cohort_dt),
msg = sprintf("[QA AUDIT FATAL]: Cohort data is missing the '%s' column. 
              Check upstream config mappings.", TOB_COL_CONDITION))

4.2 Separating admissions from unique individuals

Patients with tobacco-related comorbidities are frequently readmitted to hospital within a single year. If a model applies quitting probabilities directly to overall admission counts, it mathematically double-counts successful quits and artificially inflates the cost-effectiveness of the service.

To address this, the model isolates unique individuals before applying quitting logic. If the input cohort does not explicitly provide a count of unique individuals, the engine dynamically derives it using the baseline admission multiplier:

Code
# Extract from 01_clinical_pathway.R
if (!"unique_individuals" %in% names(pathway_dt)) {
pathway_dt[, unique_individuals := get(FOCAL_ADMISSIONS) / get(ADMISSION_MULTIPLIERS)]
}

4.3 The quitting cascade and longitudinal trajectories

The model calculates successful quits strictly against the unique_individuals headcount. The clinical cascade partitions quit attempts into two mutually exclusive pathways: supported quits via Community Stop Smoking Services (CSSS) and unassisted/self-quits.

Screening and identification: Unique individuals are screened on their first admission to identify current smokers.

Treatment allocation and LOS bottleneck: The model explicitly factors in a patient’s Length of Stay (LOS). Rather than relying on a static, hospital-wide assumption, the model utilises a highly dynamic probability of an overnight stay (pr_los_ge1) that is calculated upstream directly from raw hospital data for every specific demographic and disease stratum. Identified smokers are partitioned into those staying one or more days and those discharged sooner. Separate probabilities of being seen by a specialist (pr_seen_by_adviser_ge1 and pr_seen_by_adviser_lt1) are applied to these groups to accurately model real-world hospital operational bottlenecks. Unseen patients are subsequently apportioned into VBA or No Intervention pathways.

CSSS supported quits: The model calculates the proportion of patients referred to, and accepting support from, CSSS. A specific 4-week quit rate (quit_rate_4w_csss) is applied to this cohort.

Unassisted/Self-quits: To prevent double-counting, the model strictly subtracts the individuals who engaged with CSSS from the available pool before calculating unassisted quit attempts. A lower, unassisted 4-week quit rate is then applied.

Code
# Extract from 01_clinical_pathway.R: Preventing double-counting of quit attempts
pathway_dt[, self_attempt_seen := (group_seen_indiv - 
                                     (group_seen_indiv * pr_supported_quit_seen * 
                                        pr_register_csss_seen * 
                                        val_pr_quit_support_csss)) * pr_self_quit_seen]

Following the calculation of total 4-week quits, the model applies sequential, conditional decay probabilities to project long-term success. The cohort is stepped down to 6-month, 12-month, and finally lifetime smokefree states. This generates an effective_quit_rate for each specific demographic and clinical stratum.

4.4 Adjusted in-hospital cascade and operational scaling

While quitting happens to individuals, screening, pharmacotherapy, and staff utilisation happen during admission events. Every time a patient enters the hospital, they require administrative screening time. However, if a patient successfully quits during their index admission, they do not require specialist assessment or nicotine replacement therapy (NRT) upon readmission.

The model accounts for this via readmission discounting. The model identifies the pool of expected readmissions (ADMISSION_MULTIPLIERS - 1) and removes the proportion of patients who successfully quit:

Code
# Extract from 01_clinical_pathway.R

# Step 1: 100% of individuals are identified as smokers on their first admission
pathway_dt[, id_smokers_first_adm := identified_smokers_indiv]

# Step 2: Calculate readmissions, removing successful quitters
pathway_dt[, id_smokers_readm := identified_smokers_indiv * (get(ADMISSION_MULTIPLIERS) - 1) * (1 - effective_quit_rate)]

# Step 3: Combine for the true total of smoker admissions requiring treatment
pathway_dt[, identified_smokers_adms := id_smokers_first_adm + id_smokers_readm]

Once the true volume of identified_smokers_adms is established, the remainder of the in-hospital cascade flows mathematically from this adjusted pool.

To ensure that the downstream economic evaluation applies costs accurately, the clinical model decouples post-discharge follow-up calls based on clinical intent. Patients who were successfully seen in the hospital receive a routine follow-up call, whereas patients who were missed (unseen) receive a longer telephone assessment. This guarantees the model can generalise to future service configurations attempting to capture day-cases.

Code
# Extract from 01_clinical_pathway.R: Decoupling operational intent

# Cascade hospital operational burden based on the LOS bottleneck
pathway_dt[, adms_ge1 := identified_smokers_adms * pr_los_ge1]
pathway_dt[, adms_lt1 := identified_smokers_adms * (1 - pr_los_ge1)]

pathway_dt[, group_seen_adms := (adms_ge1 * pr_seen_by_adviser_ge1) + 
                                (adms_lt1 * pr_seen_by_adviser_lt1)]

pathway_dt[, unseen_adms := identified_smokers_adms - group_seen_adms]

# Explicitly decouple phone calls into their clinical intent
pathway_dt[, calls_seen_adms   := group_seen_adms * pr_call_seen]
pathway_dt[, calls_unseen_adms := unseen_adms * pr_call_unseen]