[resolved] Import cases without creating a registration form


(zekarias) #1

Is it possible to import cases without creating a registration form.

We have a case that we just only want to display the data; we dont want to make registration, and dont want to do followup on that.


(Clayton Sims) #2

Hi,

If you want the case to exist in the system but not be associated with a mobile worker, you can do a case import with the owner set to blank, or as ‘closed’ from the start, preventing them from making it to a mobile device.

-Clayton


(Chaiwa Berian) #3

@zekarias Case Import Tool requires that you select the case type you would like to import records for(whether importing new cases or existing cases). This means that, in your case, you will need to create a case type in CommCareHQ before you import the case records of that case type. The only way I know you could create a case type is by creating a module that would track that case type. In your case, since you do not want the registration form at all, you could create a follow-up form in that module. Add all the questions to the follow-up form that represent the fields you will be importing and save them as case properties, or you can create just one question(it can even be hidden) that would be used as case name, and then create the rest of the questions that represent the case properties after import.

Note: Pay extra attention during the Case Import process to ensure creation of new records is ticked and also that Excel column names match those of the case property names you saved in the follow-up form!


(zekarias) #4

@Clayton_Sims
Thank you for the reply! I want it to be associated to a mobile worker that are grouped together into different groups.


(zekarias) #5

@Chaiwa_Berian
Thank you for your reply! On my question, I meant to say - I also dont want to use follow-up form. The case should be imported and only displayed.

May be I will delete the registration form after I do import and will see what is going to happen, but then how can I display the properties of the import.


(Chaiwa Berian) #6

Firstly, CommCare will not allow you to create an empty module(module without a form). And a module is what we use to display cases of a given type. So if you follow the steps I posted, you will be able to see cases in the module. Since you do not want the follow-up form to be available to users, just set its display condition to false()(display condition for the form is found in the form settings), but keep the form in the module so just CommCare is satisfied.


(Chaiwa Berian) #7

Again, this is if you want to display them in the App that mobile worker users will be using!


(Chaiwa Berian) #8

Also carefully read the Case Import Instructions for New Cases and if you are using case sharing groups, set owner_name=name of the case sharing group for your users otherwise set owner_name=username of a given user : https://confluence.dimagi.com/plugins/servlet/mobile#content/view/25264298


(zekarias) #9

Thank you again @Chaiwa_Berian; making a display condition false() and hiding it will solve the problem. But I cant see the display condition on my form setting.


(Chaiwa Berian) #10

Go to application settings( some little gear icon just on the right side of the App name ), then click on Add-ons, scroll down to the Calculations Add logic to your app with xPath expressions section and then tick or mark the Display condition option. Save, then go back to form settings and check if option is now available! :slight_smile:


(zekarias) #11

Thank you :slightly_smiling_face: