WHO TB Package: Automatic TB resistance classification process

Hi, Community
I need your validation of the process used in the WHO TB package to automatically display TB resistance classification (DS, RR, MDR, XDR, Mono R, Poly R).
I use the example of the RR display in the field “resistance classification based on laboratory results”

To view the TB resistance classification (eg: RR):

Step 1 – Create the “CaseClassification” variable

Step 2 – Create the “ResistantRifampicin” variable

Step 3 – Create the program rule “Lab - Resistance to rifampicin”
Enter program rule details

Enter the program rule expression

Set program rule actions

Step 4 – Create the program rule “Classification - RR”

Enter program rule details

Enter the program rule expression

Set program rule actions

Thank you for your support

1 Like

Hi @elmoujarrade !

The automatic resistance classification was based on the guidelines we have received from WHO.
Mono R,
Poly R,

The principle of how the program rules work to evaluate and assign the values are as follows:

  1. The assignment of resistance is dependent on data entered in the “Laboratory Tests results” stage.
    It is a repeatable stage, so the classification can change as new lab events are added. It is accumulated, which means that you can move up the resistance scale overtime but not down. (Unless you manually overwrite the automatic classification).
  2. By default, if no resistance is detected by any test, you are DS. (this has changed if you register presumptive cases in TB CS tracker, Version 2.0.0 (you only get assigned resistance if you are a confirmed case).
  3. The program rules are set up in hierarchical order.
  4. The program rule evaluates data and assigns a value to a program rule variable.
  5. The program rule variable is displayed in the tracker dashboard once it has value assigned.
  6. You need to separate 3 groups of program rules:
    a) Bacteriologically confirmed vs clinically diagnosed:
    b) Resistance classification
    c) Resistance to specific drugs

To be more precise:
Your example of “RR” cases:
If a case has a lab stage and in one of the following tests resistance to rifampicin is detected:
(IDST_SM, XPERT_RIF, XPERT_ULTRA, IDST_LM, SDST_SM, SDST_LM, TRUENAT, FL_LPA) the value “Rif” is assigned to a calculated program rule variable.

The next program rule checks for value in the calculated program rule variable and assigns a value RR to another program rule variable. That value is displayed in the tracker dashboard.

If a patient will also have Isoniazid resistance in the next lab event, the program rule will check for both isoniazid and rifampicin resistance values and assign MDR to the resistance prv.

It is quite a complex algorithm. Let me know if I can guide you through the program rules there.

I see you would like to update the assignmen process to follow the new guidelines. (another community post).
Let’s move the discussion here and I will be happy to support you in the config process.



Hi, @YuryR
Thank you for your feedback and comment on the process for automatically displaying resistance rankings.
I share with you, for your information, the document: “GLOBAL TUBERCULOSIS REPORT 2021”

you can see page 19 which specifies the new classification of resistance TB.

Here is the text from the WHO:

" Drug-resistant TB: diagnosis and treatment: Recent gains reversed, targets off track WHO uses five categories to classify cases of drug-resistant TB: isoniazid-resistant TB, RR-TB and MDR-TB (defined above), plus pre-extensively drug-resistant TB (pre-XDR-TB) and XDR-TB. Pre-XDR-TB is TB that is resistant to rifampicin and any fluoroquinolone (a class of second-line anti-TB drug). XDR-TB is TB that is resistant to rifampicin, plus any fluoroquinolone, plus at least one of the drugs bedaquiline and linezolid"
9789240037021-eng.pdf (4.0 MB)

Thank you for sharing.

Let me know if you need more clarifications on program rules.

As for the new definitions, I am aware they are published, and we will at some point soon start the process of updating the packages to match the new standards.