Thanks @fernandoshake for sharing details of your use case, and @Gassim for your response.
From my reading of your requirements, a new enrollment will be opened when a new contact is identified. The enrollment is closed when five consecutive visits have been made where the contact presents no symptoms. If the enrollment is closed, and at a later time the same person (TEI) becomes a household contact of a second index case, then the same person can re-registered with a new enrollment to repeat the cycle. I think this is what Gassim means by “I had the idea that it might be possible to enroll a TEI more than once in a program”.
Stage 1: Screening Visit
Scan for symptoms
You could have yes-only or yes-no data elements for each of the five symptoms as you describe.
If any symptoms are present, then a yes-only data element is shown and auto-filled Yes, saying patient has symptoms and referral should be made to health facility.
Stage counter program rule.
This assumes you need five consecutive visits without symptoms to close the case.
a) Create a data element for program stage for “Stage Counter” (positive integer).
b) Create a program rule variable for “Stage Counter, Previous” for previous event in the program stage and “Stage Counter, Current” for current event.
c) Create a program rule variable for “Symptoms Present, Previous” for previous event in the program stage.
d) Program rule Priority 1: if !d2:hasValue('counter_previous') || d2:hasValue('symptoms_previous')
then ASSIGN Stage Counter value 1.
e) Program rule Priority 2: if d2:hasValue('counter_previous') && !d2:hasValue('symptoms_previous')
then ASSIGN Stage Counter value V{counter_previous} + 1
f) Program rule Priority 3: if V{stage_counter} == 5 then WARNING under the stage counter data element that enrollment should be closed if no symptoms are present.
g) Program Rule Priority 3: if V{stage_counter} > 5 then SHOW ERROR under stage counter. You can also have a program rule action to HIDE PROGRAM STAGE to prevent the user from generating more Screening Visit events.
Scheduling
I see from the reporting form that the scheduled contact visits are unevenly spaced.
You could use program rules to suggest a next contact date to the activist in a separate data element, based on the current stage number (if this is visit 2, add 15 days from event date; if this is visit 3, add 2 months). The activist would then manually schedule a new visit at that date.
Chemoprophylaxis
You may want to have a separate stage for this, or include it in a combined “Treatment” stage (see below). Note there is also a program rule action to “Hide Program Stage”. So if the contact is over 15 yeas old, the chemoprophylaxis stage is “hidden”. If contact is under 15 years old, a program rule alerts the user to make this referral.
For the referrals, this could be made through the DHIS2 referrals feature. You would need a program rule (warning box) to tell the user to make this referral to the appropriate facility.
Some remaining questions to think about for the other program stages.
- Will labs have access to the program to capture lab results for diagnosis, or is this information captured elsewhere? Can there potentially be more than one lab result for the same contact?
- Will facilities have access to the program to capture details on a child’s Chemoprophylaxis treatment, or is this data captured elsewhere?
- Will facilities have access to the program to capture details on the Treatment of positive TB Cases, or is this data captured elsewhere? Note that the Metadata Package linked above is for TB Case Surveillance, i.e. positive TB cases, and does not capture TB contacts or presumptive TB cases. So once the patient has been identified as a positive case, perhaps they should be enrolled in a separate Case Surveillance program to track their treatment.