Link

Below are available rulesets we have developed for extracting different variables. Feel free to use and modify these for your own purposes! Refer to the instructions for loading existing rules.

Unless otherwise noted, these rules are to be used with the RegexClassifier.


Tuberculosis rulesets

These rules were developed to extract variables from dictated notes in a tuberculosis outpatient clinic and from radiology reports.

Medication variables

These variables were extracted from dictated consult notes.

Variable Description Label(s) Negative Label Dictionaries
Ever started INH Did the patient ever start isoniazide (INH) medication? yes no countries
Ever started RIF Did the patient ever start rifampin (RIF) medication? yes no countries
Ever started PZA Did the patient ever start pyrazinamide (PZA) medication? yes no countries
Ever started EMB Did the patient ever start ethambutol (EMB) medication? yes no countries
Ever started MOXI Did the patient ever start moxifloxacin (MOXI) medication? yes no countries
Ever started Cycloserine Did the patient ever start this medication? yes no countries
Ever started Rifabutin Did the patient ever start this medication? yes no countries
Ever started Rifapentine Did the patient ever start this medication? yes no countries
Ever started Amikacin Did the patient ever start this medication? yes no countries
Ever started Capreomycin Did the patient ever start this medication? yes no countries
Ever started PAS Did the patient ever start this medication? yes no countries
Ever started Ethionamide Did the patient ever start this medication? yes no countries
Ever started levofloxacin Did the patient ever start this medication? yes no countries

Drug sensitivity variables

These variables were extracted from dictated consult notes.

Variable Description Label(s) Negative Label Dictionaries
Fully sensitive If active TB was culture positive, what was the drug sensitivity? yes no -
Resistant to INH If active TB was culture positive, what was the drug sensitivity? yes no -
Resistant to PZA If active TB was culture positive, what was the drug sensitivity? yes no -

Treatment duration

These variables were extracted from dictated consult notes.

Variable Description Label(s) Negative Label Dictionaries
Duration What was the final duration of LTBI/TB treatment with medications? 4 months, 6 months, 9 months, 12 months + Not dictated countries

Sites of active tuberculosis (TB)

These variables were extracted from consult notes.

Variable Description Label(s) Negative label Dictionaries
Pulmonary Was there active TB in the pulmonary region? yes no -
GI/Abdominal Was there active TB in the gastrointestinal/abdominal region? yes no -
Lymphnode Was there active TB in the lymphnode region? yes no -
Ocular Was there active TB in the ocular region? yes no -
CNS Was there active TB in the CNS region? yes no -
Vertebral Was there active TB in the vertebral region? yes no -
Disseminated Is the active TB disseminated? yes no -
Miliary Is the active TB miliary? yes no -
Pleural Is the active TB pleural? yes no -
Other extra-pulmonary sites Are there other extra-pulmonary active TB sites? yes no -

Adverse drug reactions

These variables were extracted from consult notes.

Variable Description Label(s) Negative label Dictionaries
Rash Did the patient experience any rash after starting and while on TB medications? yes no -
Neuropathy Did the patient experience neuropathy symptoms after starting and while on TB medications? yes no -
Ocular toxicity Did the patietn experience ocular toxicity symptoms after starting and while on TB medications? yes no -

Old tuberculosis (TB)

This variable was extracted from consult notes.

Variable Description Label(s) Negative label Dictionaries
Old TB Does the patient have previously treated or old tuberculosis (via imaging, or known treatment)? yes no -

IGRA

This variable was extracted from consult notes.

Variable Description Label(s) Negative label Dictionaries
IGRA What was the result of the most recent Interferon-Gamma Release Assay (IGRA)? Positive, Negative, Not conducted Not mentioned -

Chest X-ray results

These variables were extracted from radiology reports.

Variable Description Label(s) Negative label Dictionaries
Abnormal Was the chest X-ray result normal or abnormal? Abnormal Normal -
Granuloma Does the chest X-ray result indicate presence of granuloma? yes no -
Fibronodular Does the chest X-ray result indicate presence of fibronodular changes? yes/no -  
Cavity Does the chest X-ray result indicate presence of cavity? yes no -
Pleural thickening Does the chest X-ray result indicate presence of pleural thickening? yes no -
Apical pleural thickening Does the chest X-ray result indicate presence of apical pleural thickening? yes no -
Pleural effusion Does the chest X-ray result indicate presence of pleural effusion? yes no -
Hilar lymphadenopathy Does the chest X-ray result indicate presence of Hilar lymphadenopath? yes no -

Tuberculosis skin test

This variable was extracted from consult notes.

Variable Description Label(s) Negative label Dictionaries
Skin test What was the result of the most recent tuberculosis skin test (TST)? TST Positive, TST Negative, TST Positive - conversion, Not conducted Not mentioned -

Demographics

These variables were extracted from consult notes. The rules were written to be used with the CaptureClassifier

Variable Description Label(s) Negative Label Dictionaries
Year of immigration to Canada In which calendar year did the patient migrate to Canada? None -

Smoking status

This variable was extracted from consult notes.

Variable Description Label(s) Negative Label Dictionaries
Smoking status Did or does the patient smoke (cigarettes/tobacco)? Never smoked, Former smoker, Current smoker Not recorded -

Diagnosis

These variables were extracted from consult notes.

Variable Description Label(s) Negative label Dictionaries
Diagnosis Was the patient diagnosed with active TB or latent tuberculosis infection during (LTBI) their time in the clinic’s care? Active TB, LTBI None/Other countries

Table of contents