In a lot of use cases CommTrack mobile worker needs to be associated with potentially multiple locations (i.e. 50-100 facilities per mobile worker). This page would walk you through the bulk upload tool to create multiple locations, and the tool to associate each CommTrack mobile worker with multiple locations.
Bulk upload location using excel
Assuming in your project there are 3 mobile workers and each of them manages the inventory of 2 facilities. The first thing to do is to bulk upload 6 clinics. To do this, you first go to Setup and select 'Upload Locations from Excel'
Download 'locations.xlsx'
In the example domain we created two types of location hierarchy. Accordingly in the excel file there would be two sheets: sheet1 for District information and sheet2 for Clinic information.
Let's say the 6 facilities are equally distributed from district a to district c. Fill the 'name' column, save the file and upload. The system would automatically generate an id for each district.
Once you have successfully uploaded the excel file, repeat the download step and open the downloaded excel file. You should be able to see 3 ids for each district type. This time you would work on clinic sheet.
The concept for uploading clinic information is the same: fill in 'name' column with name of facilities. Two more manual steps: 1) fill in 'parent_id' column with district id. Let's say clinic 5 and clinic 6 are located in district a (a.k.a. district a is the parent of the two clinics). Then the parent id for these two clinics should be the system-generated id for district a in sheet district. 2) fill in 'site_code' column with unique codes for each clinic.
Save the excel file and upload it again on the same screen. Once it is successfully uploaded, select 'Manage Locations' and you should be able to see the three districts and clinics within each district. You need to manually fill in all parent id for all clinics even when there are more than hundreds of them.
...
There are two ways creating mobile users: Manual creation and Bulk upload. You should use bulk upload tool if:
- You have more than a certain number of mobile users (anyway, a lot)
- In your project each mobile user is associated with multiple locations / programs
Manual Creation
Go to Users screen and select "New Mobile Worker". Two steps are included in this manual creation process:
- Basic input: username and password
- CommCare Supply settings: clicking the username of the newly created mobile user, select 'Locations' to the right of 'Groups' and associate the mobile user with a specific supply point and program.
Bulk Upload
...
...
In sheet users, username and password are two required columns. All else are optional (phone-number would also be required if you are using CommTrack CommCare Supply SMS instead of mobile app).
Once you are done with the sheet, go to sheet locations and associate each mobile worker with facilities. It is necessary to fill in username and location-sms-code columns.
Once you are done with these two sheets, upload it and click 'Create Mobile Workers'. After you see the line "Your bulk user upload is completed!", go back to Mobile Worker page and check if they are associated with facilities you assigned them.
Displaying all the facilities that that person is linked to is a future feature, but is not currently implemented. Right now we just show 1 facility that the mobile worker is associated with. In matt's case, Go to CommTrack and you would see the Supply Point he is associated with clinic 6.
...
Fill in the other fields as necessary and note that a user can be assigned a location (Supply Point) through the location columns. A user can be assigned multiple locations if desired, though for each additional location a new column must be added in excel (location_code 2, etc.)
Once you are done editing the download, upload it and if there are no errors, you will be shown a screen like the image below.
On the Mobile Workers page, selecting that worker's user name will bring you to Edit Mobile Workers. The Locations tab on this screen will show you what Locations (or Supply Points) are assigned to this user. Here, you can also see that user's primary location and any associated Program.