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: Identified smokers are apportioned into the three groups (Specialist, VBA, None).

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 (readmission discounting)

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. Pharmacotherapy delivery and post-discharge follow-up calls scale in proportion to the discounted admission volume, ensuring that economic tierings do not over-cost the service delivery.