Organization Data Management
The sections below walk through how to manage data from Organizations.
Registering Data to Locations
After assigning mobile workers to locations, it's time to test whether case sharing within the organization structure is working correctly. If you have multiple users at a location, you want to ensure that when one user registers a case, it is visible to all other users. You also want to ensure that users in parent locations who have “view child data” set can, in fact, view data from child locations.
Using the same example of ‘Hope Care Clinic’ and ‘Sunrise Health Center’, as explained in Managing Case Sharing & Data Access in Organizations | How Case Sharing Works with Organizations page, log in as a CHW, register a few patients, and then log in as its respective clinic user to check if the CHW-registered cases are visible. These cases function as child data that clinic users can access because we have enabled the option to view child data.
Look below in the gif to see how logging in as a CHW from Sunrise Health Center allows the clinic user from Sunrise Health Clinic to view the registered cases.
Viewing Data Assigned to Locations
After registering cases to locations, you can also verify the data using the Case List Report. This report helps you view cases assigned to specific locations, including any child locations.
To check case assignments:
Open the Case List Report and select a location.
The report will display all cases registered under that location and its child locations.
Use the search bar to quickly find a location by typing its name.
Note: Only certain built-in reports support organization-based filtering, so ensure you're using a compatible report to view location-specific data.
Searching for Locations
When searching for locations in CommCare, you can use special symbols to refine your results and find the exact location you need more efficiently.
Exact Search with Quotation Marks
To search for an exact location name, place the name in quotation marks (""
). This ensures that CommCare only suggests locations that match the exact text you entered.
For example:
Searching for "Cambridge" will return only Cambridge and not similar names like Cambridgeport.
Narrowing Search with Slashes
You can use slashes (/
) to specify multiple location levels, helping you refine your search results.
For example:
Typing Mass may show Massachusetts as a result.
Adding a slash (
/
) after it allows you to continue searching within Massachusetts.You can keep refining your search this way to find specific sub-locations.
Combining Techniques for Precision
For the most precise search results, you can combine quotation marks (""
)and slashes (/
). This allows you to quickly locate specific locations, even in complex hierarchies.
By using these techniques, you can efficiently navigate through large datasets and find the exact location you need in CommCare.
Reassigning Cases to Locations
Just as you can assign cases between mobile workers, you can also reassign cases to different locations using the Reassign Cases Report. This ensures that cases are managed by the appropriate location based on changes in service areas, staff assignments, or organizational needs.
Steps to Reassign Cases to a Location:
Navigate to the Data tab in CommCare HQ.
Click on View All, then select Reassign Cases from the left-side menu.
Use the search and filter options to find the cases you need to reassign.
Select the cases by checking the boxes next to them.
Choose Group, then select the new Location to which you want to assign the cases.
By reassigning cases, you ensure that data remains accessible to the right users while maintaining a structured and organized workflow within the organization.
Assign Cases to Locations Using Excel Importer
In addition to reassigning cases within CommCare HQ, you can also bulk assign cases to locations using the Excel Importer. This method is useful when importing large datasets or updating existing case assignments efficiently.
Importing Cases from Excel
For a detailed guide on how to import cases from an Excel file, refer to: Importing Cases Using Excel.
Assigning Cases Using the Owner Name
When uploading cases via the bulk importer, you can assign them to a location using the owner_name column. This column should contain either:
The name of the location, or
The site code for the location.
Important: The importer first checks for matching mobile worker names and groups before looking for matching locations. If you have multiple locations with the same name, using the site code ensures that cases are assigned correctly.
Assigning Cases Using the Owner ID (recommended method)
You can directly assign cases to a location by specifying the owner_id
column in your Excel file.
Finding the Location ID
There are two ways to find the location_id
:
Method 1: Downloading the Location List
Go to Organization Structure under the Users tab.
Click Download Organization Structure to access the location filtering and download page.
Select All Locations and click Download Locations.
The downloaded Excel file will contain a list of all locations and their corresponding
location_id
.The
location_id
is usually in the second tab, in the first column.
Refer to the GIF below for a visual guide.
Method 2: Retrieving the location_id from the location page’s URL
Go to Organization Structure under the Users tab.
Choose any location and click on Edit
Check the last part of the URL in your browser. Example:
https://www.commcarehq.org/a/[your_domain]/settings/locations/ddc5de8aedb66637cc96ab25d6fb9e2c/
Here,
ddc5de8aedb66637cc96ab25d6fb9e2c
is thelocation_id
.
Refer to the GIF below for visual guidance.
By using either the owner_name
or owner_id
, you can efficiently assign cases to locations when importing data, ensuring a structured and organized case management process.
Assigning Lookup Table Rows to a Location
Overview
Lookup tables in CommCare allow users to store structured data that can be referenced in applications. Assigning lookup table rows to a specific location ensures that all mobile workers within that location—and any child locations—can access the relevant fields. This functionality helps streamline data access and management for specific regions or groups of mobile workers.
For example, imagine an agriculture project is tracking crops across several countries and regions, and wants the crops to be tracked in a standard way. They have built a lookup table to store all possible crops, and included data like the genus and species, growing seasons, etc. You could assign certain rows (e.g. certain crops) only to certain locations, based on where that crop is grown. This ensures that only the correct crops are selected when field workers are filling out data.
Lookup Table Documentation
For more details on using Lookup tables, view https://dimagi.atlassian.net/wiki/x/gijKfw.
Step 1: Preparing the Lookup Table Upload
To assign lookup table rows to a location, you must modify the Excel file used for bulk uploading lookup tables.
Steps to Assign Locations:
Open the lookup table Excel file.
Navigate to the ‘Table ID’ tab (usually the second sheet if downloaded using the Download Lookup Tables feature).
Add a new column titled ‘Location 1’ (or ‘Location 2’, ‘Location 3’, etc. if assigning multiple locations to a row).
Enter the 'location name' or 'site code' for each row to specify which location it should be assigned to.
Step 2: Avoiding Duplicate Location Names
Since location names can sometimes be duplicated, using the ‘site code’ ensures that the lookup table row is assigned correctly.
If a location name results in duplicates, CommCare will display a warning after importing the lookup table.
Step 3: Uploading the Modified Lookup Table
Save the modified lookup table file.
Navigate to ‘Data’ > ‘Lookup Tables’ in CommCareHQ.
Click ‘Import Lookup’ Table and select your updated file.
Review any warnings or errors related to duplicate location names.
Confirm and complete the upload.
Once uploaded, the assigned lookup table rows will be accessible to mobile workers based on their designated locations. This setup ensures that workers only see relevant lookup table data, improving efficiency and data management within your application.
Show Orphan Case Alerts
Overview
In CommCare, locations can "own" cases, and mobile workers are assigned to manage them. If a location has only one assigned mobile worker and that worker is removed, the cases become inaccessible—like locking a door without leaving a key.
However, if a worker is removed from a location that has no cases, nothing changes because no new cases can be created there.
Why Is This Important?
Some workflows rely on this behavior, but others might face issues if cases become inaccessible. To prevent mistakes, CommCare allows administrators to enable an Orphan Case Alert, which warns them when they are about to remove the last assigned worker from a case-owning location.
How to Enable Warning Banner Display
The display of the orphan case warning banner is controlled by the ‘Show Orphan Case Alerts on Mobile Worker Edit Page’ option under Project Settings.
To enable this:
Click on the Settings icon on the top right in your project space.
Select ‘Project Settings’ and go to the Basic section.
Scroll down to Orphan Case Alerts and check the box ‘Show Orphan Case Alerts on Mobile Worker Edit Page’ to enable it.
Once enabled, a warning banner will appear under the ‘Locations’ tab on the Mobile Worker Edit Page whenever a user edits a mobile worker—but only if the following conditions are met:
The location owns cases.
The mobile worker is the only assigned user.
The banner will list the affected locations and show the number of cases in each. This helps administrators quickly spot and resolve potential accessibility issues. Check out this GIF to see how to enable the feature and how it works!