For referrals from an outreach worker to a clinic, opening a child case into a different app

[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 o
ff
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

Hi Eric,

Here's some quick thoughts on how to make this work. As you suggested, my
recommendation is to create a different case type called "referral" that is
created when you want to create a referral. The clinic application should
be setup to display referrals, not regular clients. Since the referral is
a child of the client, you can access case properties on the client from
any forms that deal with referrals.

I think the case sharing setup you have should be okay.

In the Outreach Application

  1. You need to setup the Outreach Follow Up form to create a new case of
    different type (something like 'referral'). To do this add another module
    to your application, and set the case type on it to be referral.
  2. In the Outreach Follow Up form, in the case management section, set
    it to create a child case (of type referral) only when the answer to "Do
    you want to make a referral to the clinic" is yes

In the Clinic Application

  1. Setup the module in this application so its case type is referral.
  2. You can display information about the client in the case list or
    detail by using the syntax parent/<case_property_name>
  3. In forms, you can load or update parent case properties using the
    same syntax (parent/<case_property_name>)

Thanks,
Sheel

··· On Thu, Sep 18, 2014 at 6:36 AM, Eric Stephan wrote:

[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 o
ff
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
Log In :: CommCare HQ - CommCare HQ
clinic is:
Log In :: CommCare HQ - CommCare HQ

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

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah

Thanks so much -- your reply is really appreciated and I will test your
approach. (Which will perhaps generate more questions! In which case I
will post them here.)

Thanks again! --Eric

Hello Sheel --

Your answer to my question above did indeed work, and now I do see that it
creates one new referral record, off in a different case, and accessible in
that other app (for the clinic worker to then receive the referral.)

(1) I am afraid that I have not yet confirmed that I have correctly set it
up so that that new referral record that is made is fully capable of case
management, so that the clinic worker can visit that case many times over
time, each time recording new data and history. If you have tips on that,
let me know.

But I have a different, related question.

(2) I see that for this existing method of creating a referral, we are
currently using both the creation of a child case and also case sharing.

My worry is that the case sharing aspect of this will create some
complications when we implement these two applications, where outreach
workers create new clients and then in some cases make a new referral
record that will be used off in the clinic.

Our project will be set up where there are perhaps 10 outreach workers, and
all of those outreach workers assign cases the one central clinic.
Because I know from my reading that each person is supposed to be in one
and only one case sharing group... therefore, when I envision the way that
this case sharing will work in our situation, I believe that it is like one
of those "flower petal" diagrams like the diagram on your CommCare help
document called "Assigning cases to one of multiple groups." However,
in my case, the difference is that the individual outreach workers -- the
ones out in the flower petals, not in the "hub" -- are the ones creating
the new shared case. The new shared case is then created for use by the
person at the hub -- the central clinic person... who will continue the
medical care of the person in that case and modify that record.
(a) does that change -- where the many outreach workers are the ones
creating the case, and assigning them to the central hub clinic, who then
continues forward with case management visits via forms -- create a problem?
(b) can you tell me steps that I would take to set this up in the
easiest/best way?

(3) If that challenge isn't enough, here is one more twist -- our project
actually has, for example, 10 outreach workers that all send their
referrals to clinic A ... and then there are 10 other outreach workers that
all work for a different organization that therefore send all their
referrals to clinic B.
(a) Would that create difficulty in setting this up via commcare?
(b) If we were later to expand our program and be lucky enough to work with
10 or even 20 different clinics... each of which would have its own group
of 10 outreach workers referring people to it using this method... would
that cause a problem? Would there be a limit?

Thanks much for all this! When I get myself all set up I will hopefully
stop being so noisy...

Eric

··· On Friday, September 19, 2014 7:24:34 PM UTC+10, Eric Stephan wrote: > > Thanks so much -- your reply is really appreciated and I will test your > approach. (Which will perhaps generate more questions! In which case I > will post them here.) > > Thanks again! --Eric >

Hey Eric,

Sorry about the delay. Please find my responses below:

Follow up with a Referral Multiple Times
If you've created a case for each referral, this should act like any other
cases that you've created. So you should be able to follow up with them
multiple times and view history on our website.

Case Sharing and Clinics
You're correct in that you'll need to setup a situation similar to
"Assigning Cases to One or Multiple Persons". Your situation sounds like
it will work pretty well in CommCare

My recommendation for this would be:

  • Create one case sharing group for each outreach worker
  • In the case sharing group, add the outreach worker and the user who will
    be working at the clinic
  • (In the end, the clinic user will be in multiple case sharing groups)

When the clinic user logs in, we basically try get all the cases for all
the case sharing groups that they are part of. So we will get all the
cases for all the outreach workers that have that clinic worker in their
groups. The clinic user can then continue to modify these cases.

In your second situation, Clinic A for 10 workers and Clinic B for another
10 workers, when setting up the case sharing groups for each outreach
worker, just add the appropriate clinic mobile worker that they will be
working with.

Thanks,
Sheel

··· On Thu, Sep 25, 2014 at 11:57 PM, Eric Stephan wrote:

Hello Sheel --

Your answer to my question above did indeed work, and now I do see that it
creates one new referral record, off in a different case, and accessible in
that other app (for the clinic worker to then receive the referral.)

(1) I am afraid that I have not yet confirmed that I have correctly set it
up so that that new referral record that is made is fully capable of case
management, so that the clinic worker can visit that case many times over
time, each time recording new data and history. If you have tips on that,
let me know.

But I have a different, related question.

(2) I see that for this existing method of creating a referral, we are
currently using both the creation of a child case and also case
sharing.

My worry is that the case sharing aspect of this will create some
complications when we implement these two applications, where outreach
workers create new clients and then in some cases make a new referral
record that will be used off in the clinic.

Our project will be set up where there are perhaps 10 outreach workers,
and all of those outreach workers assign cases the one central clinic.
Because I know from my reading that each person is supposed to be in one
and only one case sharing group... therefore, when I envision the way that
this case sharing will work in our situation, I believe that it is like one
of those "flower petal" diagrams like the diagram on your CommCare help
document called "Assigning cases to one of multiple groups." However,
in my case, the difference is that the individual outreach workers -- the
ones out in the flower petals, not in the "hub" -- are the ones creating
the new shared case. The new shared case is then created for use by the
person at the hub -- the central clinic person... who will continue the
medical care of the person in that case and modify that record.
(a) does that change -- where the many outreach workers are the ones
creating the case, and assigning them to the central hub clinic, who then
continues forward with case management visits via forms -- create a problem?
(b) can you tell me steps that I would take to set this up in the
easiest/best way?

(3) If that challenge isn't enough, here is one more twist -- our project
actually has, for example, 10 outreach workers that all send their
referrals to clinic A ... and then there are 10 other outreach workers that
all work for a different organization that therefore send all their
referrals to clinic B.
(a) Would that create difficulty in setting this up via commcare?
(b) If we were later to expand our program and be lucky enough to work
with 10 or even 20 different clinics... each of which would have its own
group of 10 outreach workers referring people to it using this method...
would that cause a problem? Would there be a limit?

Thanks much for all this! When I get myself all set up I will hopefully
stop being so noisy...

Eric

On Friday, September 19, 2014 7:24:34 PM UTC+10, Eric Stephan wrote:

Thanks so much -- your reply is really appreciated and I will test your
approach. (Which will perhaps generate more questions! In which case I
will post them here.)

Thanks again! --Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah

Huge thanks for this input. I'll move forward and set up the app along the lines that you've described.

Thanks again --

Eric

Hi Sheel -- I have a fairly basic follow-up question to my thread here
about making the outreach application that creates referrals by opening a
child case and using "case sharing" at the same time.

Your advice above has worked well so far. I have set up our app so that
the clinic user is the user that is the member of multiple sharing groups,
each of which also contains one different outreach worker.

Here is my new question. Right now, there are just two "levels" in the
referral process.

1-- An outreach person finds a new client, interviews them and creates a
client case in the outreach forms. Then, if the client gives certain
replies that mean that we should refer them to a clinic, then:

2-- the outreach forms create a new case of type "referral" ... which is
visible also to the CLINIC user because they are in a case sharing group
with the outreach worker.

BUT -- what if we found that as this client/referral person proceeded
through their health care at the clinic, that we wanted them to also go to
a next-level clinic in a different facility, that is actually delivering a
certain additional level of health treatment to that person that we wanted
to track? For instance getting an additional type of drug treatment in
that different facility.
... Could we allow a THIRD user (at this additional health facility)
to also be able to join that case sharing, so that the case could also be
updated by that third facility? That seems a problem since a group only
usually has two people in it.
... I imagine that one possible solution would be that that
additional facility user could log in as the same userID as the
second-level clinic person was using. Then of course they would have
exactly the right access to the case. But perhaps you have a stronger
solution to recommend than that.

Thanks again for all your help, your advice is really allowing me to
develop as a CommCare builder here.

Hi Eric,

You can have multiple people in the same case sharing group. Whenever one
person in the group creates a case, it will be shared with all the other
users in the group.

One thing to keep in mind is that if a user is creating cases, they can be
in one and only one case sharing group. If they are members of two
different case sharing groups, the app won't know which group to assign the
case to and will crash. There's a custom XML workaround if this is
unavoidable. However, it sounds like your facilities will only be updating
and not creating cases, so you should be all set!

Thanks,
Amelia

··· On Wed, Oct 8, 2014 at 10:22 PM, Eric Stephan wrote:

Hi Sheel -- I have a fairly basic follow-up question to my thread here
about making the outreach application that creates referrals by opening a
child case and using "case sharing" at the same time.

Your advice above has worked well so far. I have set up our app so that
the clinic user is the user that is the member of multiple sharing groups,
each of which also contains one different outreach worker.

Here is my new question. Right now, there are just two "levels" in the
referral process.

1-- An outreach person finds a new client, interviews them and creates a
client case in the outreach forms. Then, if the client gives certain
replies that mean that we should refer them to a clinic, then:

2-- the outreach forms create a new case of type "referral" ... which is
visible also to the CLINIC user because they are in a case sharing group
with the outreach worker.

BUT -- what if we found that as this client/referral person proceeded
through their health care at the clinic, that we wanted them to also go to
a next-level clinic in a different facility, that is actually delivering a
certain additional level of health treatment to that person that we wanted
to track? For instance getting an additional type of drug treatment in
that different facility.
... Could we allow a THIRD user (at this additional health facility)
to also be able to join that case sharing, so that the case could also be
updated by that third facility? That seems a problem since a group only
usually has two people in it.
... I imagine that one possible solution would be that that
additional facility user could log in as the same userID as the
second-level clinic person was using. Then of course they would have
exactly the right access to the case. But perhaps you have a stronger
solution to recommend than that.

Thanks again for all your help, your advice is really allowing me to
develop as a CommCare builder here.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ah ha, OK. Just case CREATORS are limited in that way. I get it.

And now I see I could even have many people in a case sharing group... OK.

You always tend to have good news for me! That's a great trait that you
have!

Eric

··· On Monday, October 13, 2014 4:15:56 AM UTC+7, Amelia Sagoff wrote: > > Hi Eric, > > You can have multiple people in the same case sharing group. Whenever one > person in the group creates a case, it will be shared with all the other > users in the group. > > One thing to keep in mind is that if a user is creating cases, they can be > in one and only one case sharing group. If they are members of two > different case sharing groups, the app won't know which group to assign the > case to and will crash. There's a custom XML workaround if this is > unavoidable. However, it sounds like your facilities will only be updating > and not creating cases, so you should be all set! > > Thanks, > Amelia > > On Wed, Oct 8, 2014 at 10:22 PM, Eric Stephan <este...@fhi360.org > wrote: > >> >> Hi Sheel -- I have a fairly basic follow-up question to my thread here >> about making the outreach application that creates referrals by opening a >> child case and using "case sharing" at the same time. >> >> Your advice above has worked well so far. I have set up our app so that >> the clinic user is the user that is the member of multiple sharing groups, >> each of which also contains one different outreach worker. >> >> Here is my new question. Right now, there are just two "levels" in the >> referral process. >> >> 1-- An outreach person finds a new client, interviews them and creates a >> client case in the outreach forms. Then, if the client gives certain >> replies that mean that we should refer them to a clinic, then: >> >> 2-- the outreach forms create a new case of type "referral" ... which is >> visible also to the CLINIC user because they are in a case sharing group >> with the outreach worker. >> >> BUT -- what if we found that as this client/referral person proceeded >> through their health care at the clinic, that we wanted them to also go to >> a next-level clinic in a different facility, that is actually delivering a >> certain additional level of health treatment to that person that we wanted >> to track? For instance getting an additional type of drug treatment in >> that different facility. >> ... Could we allow a THIRD user (at this additional health facility) >> to also be able to join that case sharing, so that the case could also be >> updated by that third facility? That seems a problem since a group only >> usually has two people in it. >> ... I imagine that one *possible* solution would be that that >> additional facility user could log in as the same userID as the >> second-level clinic person was using. Then of course they would have >> exactly the right access to the case. But perhaps you have a stronger >> solution to recommend than that. >> >> Thanks again for all your help, your advice is really allowing me to >> develop as a CommCare builder here. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hello Sheel and Amelia --

I have two questions about the app that I've been talking about in this
thread. To refresh your memory, It has an outreach registration form and
an outreach follow-up form... and either of the two can create a referral
to a clinic, which is done by creating a child case (done also using case
sharing groups) over in a totally different application (an app for use by
clinic staff who will take over the patient from there.)

Here are two questions about this:

1-- In the second message in this thread, Sheel helpfully told me the way
to make it so that I can create a case of a different type ("referral"), I
needed to first make a kind of a "dummy" module in my outreach application,
and set that module's case type to referral. That worked great. But, to
make that work, I had to create a form inside that dummy module. And the
result is that that dummy form (which is called "Untitled R Form") is now
sitting, kind of ugly, in my list of forms, when nobody will ever want to
see or use it. So... how do I tell CommCare to not list that form in the
list of forms? How can I make it kind of hidden or invisible?

2-- The second question is this. As you know, I have my Outreach
application which almost entirely handles cases of the type "Client," and
then I have my Clinic application which entirely handles cases of the type
"Referral." Of course, a person that was once a "Client" later has a
"Referral" record created about him when he is given a referral... but
also, that "Client" case over in the first app will still be used moving
forward -- because the outreach worker may meet up with that same person a
month later and fill out a new form describing the additional outreach that
he did with that person... that doesn't stop just becaue the person earlier
had a referral record created about him. So my question is, let's say I
wanted to make it so that some new piece of information that was put into a
field in the Outreach form by the Outreach worker (for example something
simply like the fact that that client had a consultation with the outreach
worker on March 9th.) Is there a way that I could have that other case
type ("Referral"), used over in the Clinic app used in the clinics, display
that new bit of info that was submitted over in the "Client" case type?
I can imagine difficulties this might create, but it's better for me just
to ask you guys.

Thanks for your help!
Eric

Hey Eric,

See answers below.

Hiding a Dummy Form
Agree that its unsightly. The way I would handle this for now is to set
that dummy form to Update or Close a case. Then set a Form Display
Condition with the value of false(). This will basically just hide the
form permanently.

You can also vote on this idea on our Uservoice (
http://dimagi.uservoice.com/forums/194738-app-builder/suggestions/5654502-enable-filtering-on-modules-or-non-case-forms)
to hopefully make this better in the future.

Referencing Client Information from a Referral
Since the referral is a child case of a client, it can always access the
latest case properties that are specified on a client. To do so:

  • In the case configuration for a form, to load or update a case property
    on the client, use the syntax parent/client_case_property
  • In the case list or detail configuration for a module (i.e. on your
    referral module in the clinic app), you can display client case properties
    by just typing parent/client_case_property in the textbox that lets you
    specify the case property to display.

Let me know if you have any further questions! Thanks!

Sheel

··· On Fri, Oct 24, 2014 at 2:05 PM, Eric Stephan wrote:

Hello Sheel and Amelia --

I have two questions about the app that I've been talking about in this
thread. To refresh your memory, It has an outreach registration form and
an outreach follow-up form... and either of the two can create a referral
to a clinic, which is done by creating a child case (done also using case
sharing groups) over in a totally different application (an app for use by
clinic staff who will take over the patient from there.)

Here are two questions about this:

1-- In the second message in this thread, Sheel helpfully told me the way
to make it so that I can create a case of a different type ("referral"), I
needed to first make a kind of a "dummy" module in my outreach application,
and set that module's case type to referral. That worked great. But, to
make that work, I had to create a form inside that dummy module. And the
result is that that dummy form (which is called "Untitled R Form") is now
sitting, kind of ugly, in my list of forms, when nobody will ever want to
see or use it. So... how do I tell CommCare to not list that form in the
list of forms? How can I make it kind of hidden or invisible?

2-- The second question is this. As you know, I have my Outreach
application which almost entirely handles cases of the type "Client," and
then I have my Clinic application which entirely handles cases of the type
"Referral." Of course, a person that was once a "Client" later has a
"Referral" record created about him when he is given a referral... but
also, that "Client" case over in the first app will still be used moving
forward -- because the outreach worker may meet up with that same person a
month later and fill out a new form describing the additional outreach that
he did with that person... that doesn't stop just becaue the person earlier
had a referral record created about him. So my question is, let's say I
wanted to make it so that some new piece of information that was put into a
field in the Outreach form by the Outreach worker (for example something
simply like the fact that that client had a consultation with the outreach
worker on March 9th.) Is there a way that I could have that other case
type ("Referral"), used over in the Clinic app used in the clinics, display
that new bit of info that was submitted over in the "Client" case type?
I can imagine difficulties this might create, but it's better for me just
to ask you guys.

Thanks for your help!
Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah

Thank you for this!

I have one more question on the "hiding the unsightly form" question that
you answered. I took your advice above. it succeeded in making the form
be invisible... but it still left that dummy module visible and clickable
in the app. Because in order for me to enter the false() requirement, it
made me go over and turn that module's menu mode back to "display module
and then forms."

Can I configure it so that both this dummy module and its dummy form are
both invisible?

thanks!
Eric

··· >

Hi Sheel -- Aha, now I have a question about the other piece of guidance
you gave me. You said the following:

Referencing Client Information from a Referral
Since the referral is a child case of a client, it can always access the
latest case properties that are specified on a client. To do so:

  • In the case configuration for a form, to load or update a case property
    on the client, use the syntax parent/client_case_property
  • In the case list or detail configuration for a module (i.e. on your
    referral module in the clinic app), you can display client case properties
    by just typing parent/client_case_property in the textbox that lets you
    specify the case property to display.

Great info -- that tells me that over forms of case type "referral" used in
the clinics, I am able to bring in the latest info from over in the the
forms of the parent case type "client" over in the Outreach app.

However, I am wondering -- is the reverse possible? In other words, can I
make it so that over in the parent, the outreach forms of type "client,"
I can have it access and display the latest information from a field in the *child
*case type "referral"?

That way, the outreach worker would be able to know the latest stuff that
had happened with a person over in the clinic app... just like the clinic
worker is able to know the latest stuff that had happened with that person
over in the outreach app.

Thanks! I bet you get the same questions 100 times...
Eric

Hey Eric,

Unfortunately it's a lot harder to do the reverse (parent accessing child
information). A child case can only have one parent, so it's easy for it to
reference its parent's case properties. A parent, on the other hand, can
have multiple children, so it's a lot trickier to reference child
information - you have to pick which child you're talking about!

There is a way to use complicated logical expressions in order to let the
parent see the properties of one of its children, but these can get pretty
complex and aren't nearly as robust as using the case configuration tab to
load case properties into the form.

Amelia

··· On Mon, Oct 27, 2014 at 5:02 AM, Eric Stephan wrote:

Hi Sheel -- Aha, now I have a question about the other piece of guidance
you gave me. You said the following:

Referencing Client Information from a Referral
Since the referral is a child case of a client, it can always access the
latest case properties that are specified on a client. To do so:

  • In the case configuration for a form, to load or update a case property
    on the client, use the syntax parent/client_case_property
  • In the case list or detail configuration for a module (i.e. on your
    referral module in the clinic app), you can display client case properties
    by just typing parent/client_case_property in the textbox that lets you
    specify the case property to display.

Great info -- that tells me that over forms of case type "referral" used
in the clinics, I am able to bring in the latest info from over in the the
forms of the parent case type "client" over in the Outreach app.

However, I am wondering -- is the reverse possible? In other words, can
I make it so that over in the parent, the outreach forms of type
"client," I can have it access and display the latest information from a
field in the *child *case type "referral"?

That way, the outreach worker would be able to know the latest stuff that
had happened with a person over in the clinic app... just like the clinic
worker is able to know the latest stuff that had happened with that person
over in the outreach app.

Thanks! I bet you get the same questions 100 times...
Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey Eric,

Sorry, currently there is no way to hide that dummy module from the
application. I typically name it something like "-" so its less visible to
end users. Would recommend voting on this UV idea (
http://dimagi.uservoice.com/forums/194738-app-builder/suggestions/5654502-enable-filtering-on-modules-or-non-case-forms)
to make this a bit better in the future.

Thanks,
Sheel

··· On Mon, Oct 27, 2014 at 11:25 AM, Eric Stephan wrote:

Thank you for this!

I have one more question on the "hiding the unsightly form" question that
you answered. I took your advice above. it succeeded in making the form
be invisible... but it still left that dummy module visible and clickable
in the app. Because in order for me to enter the false() requirement, it
made me go over and turn that module's menu mode back to "display module
and then forms."

Can I configure it so that both this dummy module and its dummy form are
both invisible?

thanks!
Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah

Thanks -- that's good info --

Just so I can fill out my understanding, let me ask --

it just so happens that our app will have a "unique identifier code" (UIC)
present in the fields of both the outreach/client cases and also in the
clinic/referral cases. So, I could imagine in a perfect world, we could try
to get CommCare to have a form using the parent case (client) to do some
great filtering of the child cases that it had, and locate the one with the
same UIC code as the one it has itself.

I can imagine any number of difficulties in doing that, but mainly I was
just interested in hearing your reaction to that possibility -- whether
that sort of effort had ever been attempted in CommCare, or some name given
to that method, etc.

Is that the kind of "complicated logical expressions" that you were
mentioning? What kind of work would that involve?

Thanks! I am sure when you see this thread pop up yet again, you guys roll
your eyes --
Eric

Hi Eric,

There is a way to use the UIC to locate the child referral cases, but you
would still run into problems if there are multiple referral child cases
open with that UIC. Can you tell me a bit more about what information the
parent case needs to read from the child cases, and how you plan to use it?
That will affect the complexity of what you're trying to do.

Thanks,
Amelia

··· On Tue, Oct 28, 2014 at 5:48 AM, Eric Stephan wrote:

Thanks -- that's good info --

Just so I can fill out my understanding, let me ask --

it just so happens that our app will have a "unique identifier code" (UIC)
present in the fields of both the outreach/client cases and also in the
clinic/referral cases. So, I could imagine in a perfect world, we could try
to get CommCare to have a form using the parent case (client) to do some
great filtering of the child cases that it had, and locate the one with the
same UIC code as the one it has itself.

I can imagine any number of difficulties in doing that, but mainly I was
just interested in hearing your reaction to that possibility -- whether
that sort of effort had ever been attempted in CommCare, or some name given
to that method, etc.

Is that the kind of "complicated logical expressions" that you were
mentioning? What kind of work would that involve?

Thanks! I am sure when you see this thread pop up yet again, you guys roll
your eyes --
Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello folks -- Thanks so much for your discussion above about the possible
way for a parent form to reach down and get info from a child case. You
know what: I am actually going to *postpone *that question for right now,
as I should take care of some basics before I get into that more advanced
goal. I'll get back to it someday later! :slight_smile:

Instead, here are some other questions that have popped up as I develop.
Apologies if these are documented, just point me to the right documentation
page:

A couple of them have to do with looking ahead to the best ways to report
our data out of the system.

1-- As you know, I use case management for my outreach, so there’s the
outreach registration form and also the outreach follow-up form. If I later
on want to export data that draws from both of those forms, what is the
best way to integrate fields about the case that’s over in the outreach
form and also info from the follow-up forms? For example, in the outreach
registration form, one field says “how many condoms were given to the
client today” … and then in each of the follow-up forms that may have been
run, it similarly says “how many condoms given today.” Ideally one data
export would be able to tally data from both of those… any thoughts on this
example, and any other thoughts about integrating data from different forms
in reporting?

2-- I am building in the ability to allow the user to change the mobile
phone number of the client because they have acquired a new phone number.
The way I have been doing it is only by using case management to pass the
newly changed mobile number off so that the next time the form is visited,
it loads up the correct number into the phone number field. But I suspect
that might be an odd way to do it. Is there a more robust way to edit core
patient information like mobile number, address, etc, that wouldn’t have
the mobile number weirdly “evolving over time” using case management?

3-- I would like to consider having a form record the name of the outreach
worker (i.e., the commcare mobile user’s userID) into the form itself. For
instance, I could have a hidden field called Name Of Outreach Worker… what
function might I put in there that causes it to insert the username? I’m
sorry if this is in the documentation -- just tell me what section! J

4-- As you know, I am tracking referrals to the clinic, by means of
creating a “child case” in a different case type (“referral”). And of
course, the most basic thing about tracking referrals is that famous
question, “has the client showed up for the referral?” … What is the most
graceful way of recording that fact? Obviously it is clear that IF the new
child referral form has been filled out, that signifies that the patient
followed through on their referral. But is it as simple as that? Because
later, I will want to design ways of (1) reporting how many did and did not
show up, and (2) hopefully designing something like a case list that
dynamically only shows the names of people that have NOT showed up… or
people that DID show up… something like that. Therefore, is there some
other additional configuration I should use to be very smart about how I
record that the person did show up?

5-- Here is a simple one. I have a phone number field formatted as that
special field type… I forgot its name… “phone number or serial number” or
something. I like how it makes phone numbers appear as pressable buttons.
BUT, I see that it is only allowing nine digits when I go to enter the
number into that field! How can I get it to be more? What if the
client’s number was 415-326-5826?

Huge thanks and sorry for the barrage!

Eric

Hi Eric,

Thanks for your questions. See my responses below:

  • 1-- As you know, I use case management for my outreach, so there’s the
    outreach registration form and also the outreach follow-up form. If I later
    on want to export data that draws from both of those forms, what is the
    best way to integrate fields about the case that’s over in the outreach
    form and also info from the follow-up forms? For example, in the outreach
    registration form, one field says “how many condoms were given to the
    client today” … and then in each of the follow-up forms that may have been
    run, it similarly says “how many condoms given today.” Ideally one data
    export would be able to tally data from both of those… any thoughts on this
    example, and any other thoughts about integrating data from different forms
    in reporting? *

You can update the same case properties from multiple forms. So you could
have case property called *condoms_distributed *that is updated in your
registration form and your follow up form. In your follow up form, you can
have logic on *condoms_distributed *(something like a hidden value called
condoms_distributed which is equal to previous_condoms_distributed +
current_condoms_distributed).

If you just want to see a history of same piece of data from multiple form
types (ex. a list of weights for a patient that might have been filled in
different form types), that's not currently possible. You'll need to do
two exports and combine them outside of CommCare.

  • 2-- I am building in the ability to allow the user to change the mobile
    phone number of the client because they have acquired a new phone number.
    The way I have been doing it is only by using case management to pass the
    newly changed mobile number off so that the next time the form is visited,
    it loads up the correct number into the phone number field. But I suspect
    that might be an odd way to do it. Is there a more robust way to edit core
    patient information like mobile number, address, etc, that wouldn’t have
    the mobile number weirdly “evolving over time” using case management?*

That's actually the correct way to do that! You can have an Edit form that
loads previous case properties into normal questions, and then allows them
to be edited and saved after the form is complete.

  • 3-- I would like to consider having a form record the name of the
    outreach worker (i.e., the commcare mobile user’s userID) into the form
    itself. For instance, I could have a hidden field called Name Of Outreach
    Worker… what function might I put in there that causes it to insert the
    username? I’m sorry if this is in the documentation -- just tell me what
    section! J*

Unfortunately, that's not possible directly. We don't send the name of the
user to the phone (ex. Sheel Shah), but the username of the user (ex.
sheel) who filled out the form is automatically captured. What are you
trying to achieve with this?

  • 4-- As you know, I am tracking referrals to the clinic, by means of
    creating a “child case” in a different case type (“referral”). And of
    course, the most basic thing about tracking referrals is that famous
    question, “has the client showed up for the referral?” … What is the most
    graceful way of recording that fact? Obviously it is clear that IF the new
    child referral form has been filled out, that signifies that the patient
    followed through on their referral. But is it as simple as that? Because
    later, I will want to design ways of (1) reporting how many did and did not
    show up, and (2) hopefully designing something like a case list that
    dynamically only shows the names of people that have NOT showed up… or
    people that DID show up… something like that. Therefore, is there some
    other additional configuration I should use to be very smart about how I
    record that the person did show up?*

Are you closing the referral case once the patient shows up at the clinic?
This will remove it from any user's phones automatically and is a good
indication to show which referrals have or have not been completed (you can
look at which cases are open or closed on HQ).

  • 5-- Here is a simple one. I have a phone number field formatted as that
    special field type… I forgot its name… “phone number or serial number” or
    something. I like how it makes phone numbers appear as pressable buttons.
    BUT, I see that it is only allowing nine digits when I go to enter the
    number into that field! How can I get it to be more? What if the
    client’s number was 415-326-5826 <415-326-5826>?*

The special type (Phone Number or Numerical ID) will only let you type
numbers, but no dashes. If you need something a bit more complex (i.e.
415-326-5826) you can try use a regular text question and then a regular
expression to validate what was entered. Regular expression can get pretty
complex, but once you've created one, you can just validate the answer by
setting the validation condition to regex()

Some other references:

Our examples:
https://confluence.dimagi.com/display/commcarepublic/Common+Logic+and+Calculations#CommonLogicandCalculations-CommonValidationExpressions

Good site to help you understand regular expressions: http://www.regexr.com/

Thanks,

Sheel

··· On Thu, Nov 6, 2014 at 5:48 AM, Eric Stephan wrote:

Hello folks -- Thanks so much for your discussion above about the possible
way for a parent form to reach down and get info from a child case. You
know what: I am actually going to *postpone *that question for right now,
as I should take care of some basics before I get into that more advanced
goal. I'll get back to it someday later! :slight_smile:

Instead, here are some other questions that have popped up as I develop.
Apologies if these are documented, just point me to the right documentation
page:

A couple of them have to do with looking ahead to the best ways to
report our data out of the system.

1-- As you know, I use case management for my outreach, so there’s the
outreach registration form and also the outreach follow-up form. If I later
on want to export data that draws from both of those forms, what is the
best way to integrate fields about the case that’s over in the outreach
form and also info from the follow-up forms? For example, in the outreach
registration form, one field says “how many condoms were given to the
client today” … and then in each of the follow-up forms that may have been
run, it similarly says “how many condoms given today.” Ideally one data
export would be able to tally data from both of those… any thoughts on this
example, and any other thoughts about integrating data from different forms
in reporting?

2-- I am building in the ability to allow the user to change the mobile
phone number of the client because they have acquired a new phone number.
The way I have been doing it is only by using case management to pass the
newly changed mobile number off so that the next time the form is visited,
it loads up the correct number into the phone number field. But I suspect
that might be an odd way to do it. Is there a more robust way to edit core
patient information like mobile number, address, etc, that wouldn’t have
the mobile number weirdly “evolving over time” using case management?

3-- I would like to consider having a form record the name of the
outreach worker (i.e., the commcare mobile user’s userID) into the form
itself. For instance, I could have a hidden field called Name Of Outreach
Worker… what function might I put in there that causes it to insert the
username? I’m sorry if this is in the documentation -- just tell me what
section! J

4-- As you know, I am tracking referrals to the clinic, by means of
creating a “child case” in a different case type (“referral”). And of
course, the most basic thing about tracking referrals is that famous
question, “has the client showed up for the referral?” … What is the most
graceful way of recording that fact? Obviously it is clear that IF the new
child referral form has been filled out, that signifies that the patient
followed through on their referral. But is it as simple as that? Because
later, I will want to design ways of (1) reporting how many did and did not
show up, and (2) hopefully designing something like a case list that
dynamically only shows the names of people that have NOT showed up… or
people that DID show up… something like that. Therefore, is there some
other additional configuration I should use to be very smart about how I
record that the person did show up?

5-- Here is a simple one. I have a phone number field formatted as that
special field type… I forgot its name… “phone number or serial number” or
something. I like how it makes phone numbers appear as pressable buttons.
BUT, I see that it is only allowing nine digits when I go to enter the
number into that field! How can I get it to be more? What if the
client’s number was 415-326-5826?

Huge thanks and sorry for the barrage!

Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah

Hi, Eric,

I just wanted to add one additional point. If you want to track one
property that is updated from multiple forms you could try using the Case
History export, which shows how a particular field has been updated from
multiple forms. You can read more about that feature here:
https://help.commcarehq.org/display/commcarepublic/Case+History+Export

Jeremy

··· On Thu, Nov 6, 2014 at 6:49 PM, Sheel Shah wrote:

Hi Eric,

Thanks for your questions. See my responses below:

  • 1-- As you know, I use case management for my outreach, so there’s the
    outreach registration form and also the outreach follow-up form. If I later
    on want to export data that draws from both of those forms, what is the
    best way to integrate fields about the case that’s over in the outreach
    form and also info from the follow-up forms? For example, in the outreach
    registration form, one field says “how many condoms were given to the
    client today” … and then in each of the follow-up forms that may have been
    run, it similarly says “how many condoms given today.” Ideally one data
    export would be able to tally data from both of those… any thoughts on this
    example, and any other thoughts about integrating data from different forms
    in reporting? *

You can update the same case properties from multiple forms. So you could
have case property called *condoms_distributed *that is updated in your
registration form and your follow up form. In your follow up form, you can
have logic on *condoms_distributed *(something like a hidden value called
condoms_distributed which is equal to previous_condoms_distributed +
current_condoms_distributed).

If you just want to see a history of same piece of data from multiple form
types (ex. a list of weights for a patient that might have been filled in
different form types), that's not currently possible. You'll need to do
two exports and combine them outside of CommCare.

  • 2-- I am building in the ability to allow the user to change the mobile
    phone number of the client because they have acquired a new phone number.
    The way I have been doing it is only by using case management to pass the
    newly changed mobile number off so that the next time the form is visited,
    it loads up the correct number into the phone number field. But I suspect
    that might be an odd way to do it. Is there a more robust way to edit core
    patient information like mobile number, address, etc, that wouldn’t have
    the mobile number weirdly “evolving over time” using case management?*

That's actually the correct way to do that! You can have an Edit form that
loads previous case properties into normal questions, and then allows them
to be edited and saved after the form is complete.

  • 3-- I would like to consider having a form record the name of the
    outreach worker (i.e., the commcare mobile user’s userID) into the form
    itself. For instance, I could have a hidden field called Name Of Outreach
    Worker… what function might I put in there that causes it to insert the
    username? I’m sorry if this is in the documentation -- just tell me what
    section! J*

Unfortunately, that's not possible directly. We don't send the name of the
user to the phone (ex. Sheel Shah), but the username of the user (ex.
sheel) who filled out the form is automatically captured. What are you
trying to achieve with this?

  • 4-- As you know, I am tracking referrals to the clinic, by means of
    creating a “child case” in a different case type (“referral”). And of
    course, the most basic thing about tracking referrals is that famous
    question, “has the client showed up for the referral?” … What is the most
    graceful way of recording that fact? Obviously it is clear that IF the new
    child referral form has been filled out, that signifies that the patient
    followed through on their referral. But is it as simple as that? Because
    later, I will want to design ways of (1) reporting how many did and did not
    show up, and (2) hopefully designing something like a case list that
    dynamically only shows the names of people that have NOT showed up… or
    people that DID show up… something like that. Therefore, is there some
    other additional configuration I should use to be very smart about how I
    record that the person did show up?*

Are you closing the referral case once the patient shows up at the
clinic? This will remove it from any user's phones automatically and is a
good indication to show which referrals have or have not been completed
(you can look at which cases are open or closed on HQ).

  • 5-- Here is a simple one. I have a phone number field formatted as that
    special field type… I forgot its name… “phone number or serial number” or
    something. I like how it makes phone numbers appear as pressable buttons.
    BUT, I see that it is only allowing nine digits when I go to enter the
    number into that field! How can I get it to be more? What if the
    client’s number was 415-326-5826 <415-326-5826>?*

The special type (Phone Number or Numerical ID) will only let you type
numbers, but no dashes. If you need something a bit more complex (i.e.
415-326-5826) you can try use a regular text question and then a regular
expression to validate what was entered. Regular expression can get pretty
complex, but once you've created one, you can just validate the answer by
setting the validation condition to regex()

Some other references:

Our examples:
Common Logic and Calculations - CommCare Public - CommCare Public

Good site to help you understand regular expressions:
http://www.regexr.com/

Thanks,

Sheel

On Thu, Nov 6, 2014 at 5:48 AM, Eric Stephan estephan@fhi360.org wrote:

Hello folks -- Thanks so much for your discussion above about the
possible way for a parent form to reach down and get info from a child
case. You know what: I am actually going to *postpone *that question for
right now, as I should take care of some basics before I get into that more
advanced goal. I'll get back to it someday later! :slight_smile:

Instead, here are some other questions that have popped up as I
develop. Apologies if these are documented, just point me to the right
documentation page:

A couple of them have to do with looking ahead to the best ways to
report our data out of the system.

1-- As you know, I use case management for my outreach, so there’s the
outreach registration form and also the outreach follow-up form. If I later
on want to export data that draws from both of those forms, what is the
best way to integrate fields about the case that’s over in the outreach
form and also info from the follow-up forms? For example, in the outreach
registration form, one field says “how many condoms were given to the
client today” … and then in each of the follow-up forms that may have been
run, it similarly says “how many condoms given today.” Ideally one data
export would be able to tally data from both of those… any thoughts on this
example, and any other thoughts about integrating data from different forms
in reporting?

2-- I am building in the ability to allow the user to change the
mobile phone number of the client because they have acquired a new phone
number. The way I have been doing it is only by using case management to
pass the newly changed mobile number off so that the next time the form is
visited, it loads up the correct number into the phone number field. But I
suspect that might be an odd way to do it. Is there a more robust way to
edit core patient information like mobile number, address, etc, that
wouldn’t have the mobile number weirdly “evolving over time” using case
management?

3-- I would like to consider having a form record the name of the
outreach worker (i.e., the commcare mobile user’s userID) into the form
itself. For instance, I could have a hidden field called Name Of Outreach
Worker… what function might I put in there that causes it to insert the
username? I’m sorry if this is in the documentation -- just tell me what
section! J

4-- As you know, I am tracking referrals to the clinic, by means of
creating a “child case” in a different case type (“referral”). And of
course, the most basic thing about tracking referrals is that famous
question, “has the client showed up for the referral?” … What is the most
graceful way of recording that fact? Obviously it is clear that IF the new
child referral form has been filled out, that signifies that the patient
followed through on their referral. But is it as simple as that? Because
later, I will want to design ways of (1) reporting how many did and did not
show up, and (2) hopefully designing something like a case list that
dynamically only shows the names of people that have NOT showed up… or
people that DID show up… something like that. Therefore, is there some
other additional configuration I should use to be very smart about how I
record that the person did show up?

5-- Here is a simple one. I have a phone number field formatted as
that special field type… I forgot its name… “phone number or serial number”
or something. I like how it makes phone numbers appear as pressable
buttons. BUT, I see that it is only allowing nine digits when I go to enter
the number into that field! How can I get it to be more? What if the
client’s number was 415-326-5826?

Huge thanks and sorry for the barrage!

Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.