Database exports: child cases not linking with parent cases

29 views
Skip to first unread message

Nyka

unread,
Jul 24, 2015, 6:02:46 AM7/24/15
to commcare-users

Hello,

I have created an app with the help of CommCare staff.  We are deworming children, but are tracking the mothers as existing or potential clients, who may bring several children with them to be dewormed.  Thus the app was created with cases and forms (parent and child cases) so that each child is associated with their mother. 

After a first round of data gathered in the field, trying to look at the data, it seems that the child cases are not linked up with parent cases.  I went through all the export cases and forms options, and have not seen a report that links the mothers to their children, which I had assumed was the very reason for creating child cases, so that indeed the children are linked to their mothers in the database.  Everything looks OK in the cases and forms, looks like they are indeed linked in the app builder, but again, not seeing it in the databases. 

Please advise! 

Sheel Shah

unread,
Jul 24, 2015, 3:12:18 PM7/24/15
to commcar...@googlegroups.com
Hi Nyka,

When you create a custom export for the child cases, if you scroll to the bottom, there should be a checkbox for Parent Cases.  You can use this to find the parent case ID for a given child case and link the data.  

Thanks,
Sheel

--
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.



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


Nyka Kwon

unread,
Jul 24, 2015, 4:22:54 PM7/24/15
to commcar...@googlegroups.com

Hi Sheel,

Thanks for your response. I've already tried that, and it doesn't work. The parent cases don't have the data that is being captured in the app, and also they show up as two separate excel sheets, not what I consider linked. Any other solutions?

Thanks,

Nyka


Grow more with myAgro!
www.myagro.org 



Sent from my iHand
You received this message because you are subscribed to a topic in the Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commcare-users/rULPQbxPKwE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.

Nate Haduch

unread,
Jul 27, 2015, 6:04:17 PM7/27/15
to commcar...@googlegroups.com
Hi Nyka,

I believe that the parent export will have the row numbers that show the correspondence between the parent and child output. You would be able to:

1. Make an export of the parent information as well
2. Export both the parent and child information
3. match up the two separate export files based on this parent meta data

Unfortunately, you are correct that it is not currently done automatically. There are resources available for "joins in excel" and I recommend those as possibilities to aggregate the data.

Thanks,


-- 
Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139

Nyka Kwon

unread,
Jul 27, 2015, 7:27:26 PM7/27/15
to commcar...@googlegroups.com

Thanks, Nate.  Gosh, had I known this from the get-go, I may have gone a different route in designing the app (which was mainly done by a Dimagi staff).  My colleague created an app that I could have followed, as now, her reports come up great and aggregated. 

But still, the problem I'm having is that the parent export data doesn't give me any of the data that should be captured.  The data that shows up has nothing to do with any question in my app.  Any help there?

Thanks,


Nyka

____________________

Grow more with myAgro!

Nate Haduch

unread,
Jul 28, 2015, 12:15:06 PM7/28/15
to commcar...@googlegroups.com
Hi Nyka,

I think you'll have to make a new custom export for the parent case data in order to get all of the data. The parent repeat group information is just to link the two separate exports by case_id.

Cheers,


-- 
Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139

Nyka Kwon

unread,
Jul 29, 2015, 7:28:14 AM7/29/15
to commcar...@googlegroups.com
Hi Nate,
Could you walk me through the steps to do that?  I've tried what I thought should work and have not had any success.
Thanks,


Nyka

____________________

Grow more with myAgro!


Nate Haduch

unread,
Jul 30, 2015, 11:15:11 AM7/30/15
to commcar...@googlegroups.com, ny...@myagro.org
Hi Nyka,

We have just updated the following page that should be of some assistance: https://confluence.dimagi.com/display/commcarepublic/Linking+Parent+and+Child+Case+Data

To create the export for the parent case, navigate to the Case Export page (replace *PROJECT*): https://www.commcarehq.org/a/*PROJECT*/data/case_export/ and click "Create Custom Export" for the case type at the bottom of the page.

Thanks,

Nate 
Reply all
Reply to author
Forward
0 new messages