Need help for structuring an app

Hi folks,

I would be grateful if you could help me structuring an app.

I was assigned a task to build a tb app and I have started it.

I want to try to describe the workflow. There are three cases that I have to register:

  • Tb index case and its contacts
  • Presumptive tb case (a patient who presents with symptoms or signs suggestive of TB)

In module I, I have a registration form where I register the three cases. In this form there are many questions. One of them is a single select question: ‘select the case types’ with two options – index case and presumptive. If the selected answer is index case, I register all the contacts living with the index in a repeat group. If the selected answer is presumptive case, there is another group of questions

In module II, Both contacts of index case and presumptive cases are screened for tb. If any contact or presumptive case tests positive, they must follow a treatment.

The biggest problem is if the presumptive tests positive, he/she becomes an index case and I must ask the same questions and register all their contacts as I did with tb index case in the registration form. (How to register the contacts of new tb index case? Copy the questions from the registration form into another form in a different module?)

Things are wired up in the flow and as someone new to commcare, Iam rather puzzled.

I got help from folks in my previous posts but Iam still stuck. The flow is complex

Can you share the solution suggested/attempted? We have a suggestion. Split your registration form in two parts.
Part 1 is registration form with case i.e using case method of commcare.
Part 2 is your details of index cases

The registration form will have only screening questions to decide if it is an index or a presumptive case.
If it is identified as index then immediately display the second form for details
If it is identified as presumptive and from presumptive if it is identified as tb case then display the registration form

Hope this would solve your problem

I suggest looking into child cases.

presumptive cases that create child index cases when the tests follow up form is filled with a positive.
this will allow you to see them as regular index cases. just make sure the follow up form for the presumptive case is loaded the values you need for the index case in a bunch of hidden calculated values picking up values from the case properties.

HTH

Mazz

Thank you, Mazzen and Amit. I will try to follow your approach.