# Bulk upload of mother & child

**URL:** <https://forum.dimagi.com/t/bulk-upload-of-mother-child/2398>\
**Category:** Users\
**Created:** [September 16, 2015, 6:30am UTC](https://forum.dimagi.com/t/bulk-upload-of-mother-child/2398 "2015-09-16T06:30:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vyramuthu\_miralan](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/v/c67d28/32.png) [@vyramuthu\_miralan](https://forum.dimagi.com/u/vyramuthu_miralan)\
**Post date:** [September 16, 2015, 6:30am UTC](https://forum.dimagi.com/t/bulk-upload-of-mother-child/2398/1 "2015-09-16T06:30:12Z")

</div>

I'm trying to upload mother and child data as a bulk data.  
My application has two modules (registration and child screening). In the  
registration module there are two forms (mother registration and child  
registration). Now I have full set of data with unique IDs for mother and  
children.  
The problem I face when I use the bulk importer, it asks for case type. Can  
you lead me to do this upload correctly. This is confusing to me since I  
see only "mother" and "childgmp" as case types. I have attached part of my  
data here.

[kilinochi\_GMP\_akkarayan.xls](https://dimagi.b-cdn.net/uploads/default/original/1X/c2db441e82896821302efbd8c1c7f613592dbd22.xls) (37 KB)

---

<div class="post-metadata">

**Author:** ![Sheel\_Shah](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/s/779978/32.png) [@Sheel\_Shah](https://forum.dimagi.com/u/Sheel_Shah)\
**Post date:** [September 16, 2015, 8:58pm UTC](https://forum.dimagi.com/t/bulk-upload-of-mother-child/2398/2 "2015-09-16T20:58:17Z")

</div>

Hi Miralan,

You need to upload mothers and children separately from each other:

- Create an Excel document that lists all the mothers (and only mothers)
- Only include columns in this document that are case properties you  
want to save (i.e. you don't need to import last\_modified\_by\_username)
- Remove any odd values from the sheet (i.e. replace --- with a blank)
- Create a column called external\_id (the first column of the sheet)  
that contains the Mother ID
- Import this document using the case importer (on the import page,  
choose the mother case type and make sure you have External ID chosen in  
the dropdown. Make sure that "Create New Cases" is also checked)
- You can click on Auto Complete case properties on the page that asks  
you to map Excel columns to case properties
- Complete this import (recommend you do this with 5 rows to test first)

You now have all the mothers imported with a special ID (the external\_id)  
that contains the mother's ID. You can now use this to relate imported  
children to mothers.

- Create another Excel document that lists all the children
- Only include columns in this document that are case properties you  
want to save to the child case
- Remove any odd values from the sheet (i.e. replace --- with a blank  
value)
- Create a column called external\_id (the first column of the sheet)  
that contains the child ID
- Add another column called parent\_external\_id that contains the ID of  
the mother for that child
- Add another column called parent\_type with the value _mother_ for each  
row
- Import this document using the case importer. Make sure you choose the  
child\_gmp case type and choose External ID when prompted in the dropdown  
(instead of case ID). Make sure Create New Cases is also checked
- You can click on Auto Complete case properties on the page that asks  
you to map Excel columns to case properties
- Complete this import - recommend you do this with a few test rows  
first before all of your data

Thanks,  
Sheel

> **···**
>
> On Wed, Sep 16, 2015 at 2:30 AM, vyramuthu miralan wrote:
> 
> > I'm trying to upload mother and child data as a bulk data.  
> > My application has two modules (registration and child screening). In the  
> > registration module there are two forms (mother registration and child  
> > registration). Now I have full set of data with unique IDs for mother and  
> > children.  
> > The problem I face when I use the bulk importer, it asks for case type.  
> > Can you lead me to do this upload correctly. This is confusing to me since  
> > I see only "mother" and "childgmp" as case types. I have attached part of  
> > my data 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](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Sheel Shah  
> Project Manager | Dimagi  
> m: +1.781.428.5419 | skype: sheel\_shah

---

<div class="post-metadata">

**Author:** ![vyramuthu\_miralan](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/v/c67d28/32.png) [@vyramuthu\_miralan](https://forum.dimagi.com/u/vyramuthu_miralan)\
**Post date:** [September 17, 2015, 8:52am UTC](https://forum.dimagi.com/t/bulk-upload-of-mother-child/2398/3 "2015-09-17T08:52:39Z")

</div>

Hi shell!  
It works. thank you. I think in the mother cases we have to link a case  
property to \*name \*as well.

> **···**
>
> On Wednesday, 16 September 2015 12:00:12 UTC+5:30, vyramuthu miralan wrote: \> \> I'm trying to upload mother and child data as a bulk data. \> My application has two modules (registration and child screening). In the \> registration module there are two forms (mother registration and child \> registration). Now I have full set of data with unique IDs for mother and \> children. \> The problem I face when I use the bulk importer, it asks for case type. \> Can you lead me to do this upload correctly. This is confusing to me since \> I see only "mother" and "childgmp" as case types. I have attached part of \> my data here. \>

---

<div class="post-metadata">

**Author:** ![vyramuthu\_miralan](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/v/c67d28/32.png) [@vyramuthu\_miralan](https://forum.dimagi.com/u/vyramuthu_miralan)\
**Post date:** [January 26, 2016, 9:46am UTC](https://forum.dimagi.com/t/bulk-upload-of-mother-child/2398/4 "2016-01-26T09:46:37Z")

</div>

Dear All,  
I used bulk upload to update this file under mother case. Then when I tried  
to create child case under this mother. According to the mobile application  
the child ID should automatically come (ex if mother ID is XXA then the  
child ID should be XXA-1). But this automatic child was not coming. Instead  
I can see in the mobile app as follows XXA-NaN. Please explain this fault.

Please note when creating the bulk update for the Excel column I matched  
"mother\_id" and for the corresponding case filed I matched "External ID".  
Please update me on this. thank you.

> **···**
>
> On Wednesday, 16 September 2015 12:00:12 UTC+5:30, vyramuthu miralan wrote: \> \> I'm trying to upload mother and child data as a bulk data. \> My application has two modules (registration and child screening). In the \> registration module there are two forms (mother registration and child \> registration). Now I have full set of data with unique IDs for mother and \> children. \> The problem I face when I use the bulk importer, it asks for case type. \> Can you lead me to do this upload correctly. This is confusing to me since \> I see only "mother" and "childgmp" as case types. I have attached part of \> my data here. \>

---

<div class="post-metadata">

**Author:** ![Robin\_Selwitz](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/r/e9a140/32.png) [@Robin\_Selwitz](https://forum.dimagi.com/u/Robin_Selwitz)\
**Post date:** [January 26, 2016, 10:44pm UTC](https://forum.dimagi.com/t/bulk-upload-of-mother-child/2398/5 "2016-01-26T22:44:35Z")

</div>

Hi,

Would you be able to report an issue using CommCare HQ?

This way we can take a closer look to see what's going on.

Thanks,

Robin Selwitz

> **···**
>
> On Tuesday, January 26, 2016 at 4:46:37 AM UTC-5, vyramuthu miralan wrote: \> \> Dear All, \> I used bulk upload to update this file under mother case. Then when I \> tried to create child case under this mother. According to the mobile \> application the child ID should automatically come (ex if mother ID is XXA \> then the child ID should be XXA-1). But this automatic child was not \> coming. Instead I can see in the mobile app as follows XXA-NaN. Please \> explain this fault. \> \> Please note when creating the bulk update for the Excel column I matched \> "mother\_id" and for the corresponding case filed I matched "External ID". \> Please update me on this. thank you. \> \> On Wednesday, 16 September 2015 12:00:12 UTC+5:30, vyramuthu miralan wrote: \>\> \>\> I'm trying to upload mother and child data as a bulk data. \>\> My application has two modules (registration and child screening). In the \>\> registration module there are two forms (mother registration and child \>\> registration). Now I have full set of data with unique IDs for mother and \>\> children. \>\> The problem I face when I use the bulk importer, it asks for case type. \>\> Can you lead me to do this upload correctly. This is confusing to me since \>\> I see only "mother" and "childgmp" as case types. I have attached part of \>\> my data here. \>\> \>
