Data Export Tool - Tracking Progress of a Patient

43 views
Skip to first unread message

Carla Villoria

unread,
Apr 29, 2015, 12:40:55 PM4/29/15
to commcar...@googlegroups.com
Hi, I just started using the data export tool but I am having problems downloading all the data from a case (including previously submitted forms that have updated the case in the past). I would appreciate any help!

I have 2 main forms for my cases: a Patient Registration form and a Visits form. The first time a patient comes into the clinic the doctor registers the patient and then on each subsequent visit the doctor submits only a Visits form. The report I am trying to produce (with the data export tool) is a list of all patients but also including all their visits. We need previous visits information in order to tell if they are progressing as needed, coming to appointments when they should, getting treatment in order, etc. If I export cases then I get a row per patient and only information on the latest visit. If I export the Visit forms then I get all visits but these are not tied to a specific patient/case. Exporting the two forms (registration and visits) by separate would work, but only if there is a unique identifier that links the two forms (like the case id). However, I believe the identifiers for forms are completely different than the identifiers for cases, so I am not sure how to proceed. I could create a hidden value in the Visits form and treat the Full Name of the patient as the identifier, but I would like to avoid that.

Hope this makes sense :)

Thank you very much!
Carla

Nate Haduch

unread,
Apr 29, 2015, 4:41:12 PM4/29/15
to commcar...@googlegroups.com
Hi Carla,

Is the case id not available as a property for your form exports? This should be listed as info.caseid in the exports. 

Thanks,

Nate

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



--
Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139
web: http://www.dimagi.com/

Carla Villoria

unread,
Apr 29, 2015, 7:56:25 PM4/29/15
to commcar...@googlegroups.com
Hi Nate, I can get the id of the form itself but that doesn't seem to match with the case id (i am comparing the cases export with the forms export). I added info.caseid as a "Source Field" column but it returns blank in the export. Not sure what I am doing wrong.

Thanks,
Carla

Nate Haduch

unread,
Apr 30, 2015, 9:25:59 AM4/30/15
to commcar...@googlegroups.com
Hi Carla - I'll follow up with you via a support ticket to look into this deeper. I'll post the conclusion back to this thread if it would be helpful for others. 

Thanks,

Nate

Stephen Khama

unread,
Jun 5, 2015, 3:40:48 AM6/5/15
to commcar...@googlegroups.com
Hi Carla

Did you get a response to this question because I am facing the same challenge.

Can you please share it if you managed to get the solution

Kind regards

Steve

Nate Haduch

unread,
Jun 5, 2015, 7:10:46 AM6/5/15
to commcar...@googlegroups.com
Hi Steve,

Carla and I were able to figure this out and I added it to the wiki page for the CommCare Data Export tool: https://wiki.commcarehq.org/display/commcarepublic/CommCare+Data+Export+Tool#CommCareDataExportTool-B.Gettingstartedwithcommcare-export

The section here describes accessing the case id through the JSON structure: 

"Many different fields are available for output in this way in addition to what is shown in these examples. The fields can be determined form the JSON output as they follow the JSON structure down to each property. For instance, based on the form output here: https://www.commcarehq.org/a/YOUR_PROJECT/api/v0.5/form/ - you would be able to use form.case.@caseid or form.meta.username."

Please let me know if you need further information.

Thanks,


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

Stephen Khama

unread,
Jun 5, 2015, 8:27:33 AM6/5/15
to commcar...@googlegroups.com
Thanks, will try it out

Stephen Khama 
IMAGE M&E Manager
WITS Health Consortium
Parktown
Johannesburg

Cell: (+27) 73 4428 968
E-mail: khama....@gmail.com


--
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/BAjFMSdCWzU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages