[note, earlier I submitted this question prematurely and then deleted it,
and here is the real question. in case that caused a fragment to appear in
your email.]
Hi folks --
I am trying to make commcare project with two apps, that does the following
arrangement for referrals:
1-- There is an "outreach" application for a health worker that is out and
about identifying new outreach clients. So, inside that app, there is an outreach
registration form (to create new clients) and also an *outreach follow-up
form *(for when the outreach worker meets up with that client on subsequent
times and checks in with them on their health.) Therefore, I use case
management, and the case type is called client.
2-- ... Now, inside that outreach follow-up form, if the health worker
answers "yes" to a field that asks "do you want to make a referral to a
clinic," then the app should create a new record in a different form off
in a different app that will be used by the clinic to carry out the
ongoing history of that person as they have repeated visits to that clinic.
3-- So, I have built a second app, called "clinic." And in that app, I made
a form called "clinic followup," which the clinic worker will hopefully be
able to load up only for the cases that are created by the outreach worker,
and then through case management the clinic worker will be able to continue
the engagement with this person over time, recording their symptoms over
time and so forth.
I have been referring to the help documentation such as: Referrals in
CommCare, Child Cases ("subcases"), Multiple Applications in a Project
Space, and Case Sharing. These documents (particularly the first three)
are really a bit too brief in their explanation.
However, my apps are not working quite right... I think I need some
explanation from you guys.
Two last bits of background:
(1) To build this so far, I have made it so that when the health worker
answers "yes" to the "referral?" question, it creates a child case. The
way that I have it set up now, both the "outreach" application and the
"clinic" application both use the* same case type*, which is called client.
(However, I wonder if, once the child case is created, it might be smarter
for the case type to be different -- perhaps changing it to be "patient"
because of their new status. BUT... when I configure the outreach followup
form's case management tab to create a child case, The place where I
configure "opens a case for a different list..." does not allow me to
choose a different case type that I create off in the different
application. It only allows "client" ... and perhaps it also would allow me
to choose other case types that are located in the same application.)
(2) I also turned on case sharing and I have been working with it so that
the outreach worker and the clinic worker are in the same sharing group.
Clearly some of this is perhaps overkill or done wrong.
To make a long story short, here are my problems:
** The way the apps are behaving now, the moment the outreach worker
creates a new case in the registration form, it immediately shows up over
in the clinic's app too! But that's not what I wanted... I wanted the case
to only show up for the clinic worker if the child case was created because
the outreach worker replied yes to the "referral?" question. (I am eyeing
the fact that I set up case sharing suspiciously right now, but I want to
get this question submitted to you or the time zone will cause a further
delay.)
** And, if I do then open up that newly made case in the outreach follow-up
form, and reply "yes" to the question of if they should get a referral,
then over in the clinic application, a second copy of the case appears in
the case list.
-- For your info, if you are able to look into my project, here are the two
apps:
outreach is
https://www.commcarehq.org/a/zakopane/apps/view/aa642d74f4fbf0fb618b23fb75e82a45/modules-0/?edit=true
clinic is:
https://www.commcarehq.org/a/zakopane/apps/view/6622017ad0108ee807040c0c7b4d3bb6/modules-0/?edit=true
Can you tell me how to get it working the way I want, with new child cases
only appearing for the clinic worker when the referral question is answered
"yes?" I was stumped once I found that I wasn't able to tell it to create
the child case off in a DIFFERENT case list.
THANKS for your help!
Eric