Hello folks -- I have a new problem with the "case sharing by means of
passing owner_id" that has proved so useful to me.
Here is the story. As Sheel and other Dimagi people know all too well by
now, my app https://www.commcarehq.org/a/praha-lao/ has a few levels of
case sharing. first, outreach workers create cases of type "client" when
they interview people. When it's appropriate to create a referral to a
clinic, it creates a child case using normal case sharing, and thanks to
each user's case sharing group, the *HCT clinic *can load that case and
work with it.
But ---> My *second *level of referrals is different. It is a child case
that is made by that HCT clinic user when the client tests HIV positive and
so should create a new case of type ART-Client. FOR THIS ONE, I could not
use regular case sharing, because at this level, the originating user is in
more than one case sharing group. Therefore, I used the method where it
uses case management to pass owner_id to the child case. That worked just
great to create that second jump, so the full chain (from outreach, to hct
clinic, to art clinic) worked fine.)
Please see the attached diagram that shows the overall method. (see the
sloppy addition in the middle link that illustrates the problem I describe
BUT -- Here is my problem -- I needed to make another new form at that
second level (the HCT clinic) that would process walk-ins to that clinic
(rather than always getting referrals from the outreach workers. Therefore,
This walk-in form (case type SNS-walkin) would collect data on the walk-in
person, and then that form would create the child case of type referral.
So, this walk-in form would simply do almost the same as the outreach form
did -- create "referrals" to HCT...
BUT, it does it from the very same mobile user as will ultimately handle
the Referral case form that it is creating.
And, my problem is, I now find that when the new referral cases are
initially created by child-case-creation from this new SNS-walkin form, it
is NOT succeeding in the pseudo-case sharing when the referral form goes to
make the onward child case creation to ART by passing owner_id! In other
words, when "referral" case has originated by child-case from that new
form, and the user at the referral form determines the client is HIV
positive and goes to create a new child case of type ART, it does so, and
that new ART case IS visible on that SAME phone of that same user... but
that other mobile user over at the ART clinic, on a different phone, is not
able to see those new ART child cases! they are only seeing the ones that
were created by the normal, original route. So the "pass the owner_id"
method is failing in this new situation.
To be honest, I thoughI had this working correctly when I made the SNS
forms, but now I realize I guess I never tested it successfully making that
last share (jeez!!)
Can you tell me why owner_id passing is not working in this situation?
It's important, I have a deadline ....
HUGE THANKS --