Skip to content

Advanced Filters

The Advanced tab of Subjects is where users can build complex filters. It's accessed by first navigating to Subjects (left panel of the PHC interface), then clicking on Advanced tab (as shown below).

Subjects Advanced Main

Note

While all Standard filters are Advanced filters, not all Advanced filters are Standard filters.

An Advanced filter is a complex filter with one of the following:

  • Multiple Operators
  • An Operator set to either:
    • Subjects in ANY sub-filter
    • Subjects NOT IN ANY sub-filter
  • Competing criteria (For instance, setting a filter to find subjects that have a birth sex of both male and female. This is competing because they cannot be born as both genders.)

Example

In the clip below, we illustrate some of the capabilities of advanced filtering. In the clip we: - began in Subjects/Standard tab where you can easily select filters by checking boxes. We selected Male (2 subjects) and Unknown (1 subject). The table updated to show 3 subjects as any filter selections in Standard are "Anded" (show me all subjects that had a birth sex of male and unknown). Advanced in Action

Terms

Filter Tree - The Filter Tree is a layout of your selected filters and their Operators. Filter Trees are found on the Advanced tab of the Subjects page.

Operator - An Operator is the root of the filter tree. Each Operator represents a grouping of filters (one or more filters) you've selected. Operator conditions can be set to:

  • Has all - Subjects in EVERY sub-filter (All subjects matching these filters)
  • Has any - Subjects in ANY sub-filter (Subjects meet one filter or another)
  • Has none - Subjects NOT IN ANY sub-filter (Subjects do not match any filter)

Node - A node is like a leaf on the filter tree, representing a filter.

Advanced Layout

The Advanced tab is laid out in a similar fashion as the Standard tab. Orange is the designated color for Advanced filters and is reflected in the orange line across Subjects as well as the colored "filtered subjects" oval located above the Subjects Table (as seen below).

Subjects Advanced Layout

On the left side of the Advanced tab:

On the right side of the Advanced tab:

  • Subjects and Insights tabs
  • Action buttons - allow you to perform an action on the selected subjects in your project (these become active once you select one or more subjects)
  • Filtered Subjects count - shows how many subjects match your filtering criteria
  • Subjects Table - displays all subjects in the project that meet the filtering criteria you've selected
  • Subject Search Table Configuration - select the table columns, row actions, and default-opened filter categories users will view and interact with (shown below)

    Subjects Search Table Config

Filter Tree and Adding a Filter

The Filter Tree displays the architecture of your filtering criteria. It is comprised of nodes representing the Operator (root) and the filters (branches) selected. Users can build a complex filter using the filter tree. You can modify your filtering using the filter tree by:

  • Clicking on a node to access the settings and options for that filter

    Operator Commands

  • Hovering on the node to access icons to:

    • Add a filter - lets you add a filter to the tree and specify its parameters
    • Clone a filter - lets you clone and modify a filter

    Subjects Hover

    Note: When you add a filter that has more parameters to define, an "incomplete" banner will display on the new node, prompting you to add the parameters to complete the filter (see image below).

    Subjects Incomplete

  • Rearranging the nodes on the tree (drag and drop using node handles)

    Subjects Operator move

    Notice in the clip above, the filtered subjects table updates with the new placement of the Operator.

Operator

The Operator, or root of the Filter Tree, dictates whether the filters branching off from it will find and display subjects that meet every filter, any filter, or no filter.

To change the Operator settings:

  1. In the Advanced tab, click on the Operator node in the filter tree.
  2. In the window that opens, select one of the following (your selection will be denoted on the note):

    • Has all - this selection means the subjects shown in the table match every filter
    • Has any - this selection means the subjects shown in the table match at least one of the chosen filters
    • Has none - this selection means the subjects shown in the table do not match the chosen filters

There can be more than one Operator on a filter tree as shown in the image below. In this example, we filtered our subject pool for the following:

  • Everyone who is female
  • Everyone who is male that answered "yes" to the survey question, "Do you vape or smoke?"

Multiple Operators

Saved Filters

Saved Filters are complex filters created and saved by users with the Layout Admin ABAC privilege. Saved Filters allow other users to access these complex filters with a simple dropdown menu. (For instance, an admin may select filtering criteria seen in high risk cancer patients and save it as a filter named "High Risk Cancer Patients". Other users can access this filter from the Saved Filters dropdown in the Subjects tab.)

How to Save a Filter

There are two options available for saving a filter:

  • Save All - saves the entire filter tree

    1. Click the Save dropdown
    2. Select Save All
    3. In the window that opens give it a descriptive name (to make it easier to select in the future) and a description (optional)

    Save All

  • Save Selected Nodes and All Children - only saves the selected node and any children nodes connected to it

    1. Select the Node you wish to save (remember any children nodes will also be saved)
    2. Click the Save dropdown
    3. Select Save Selected Node and All Children
    4. In the window that opens give it a descriptive name (to make it easier to select in the future) and a description (optional)

Access Control

Saving a Filter requires LayoutAdmin privileges. To grant privileges, see Access Control.

Accessing Saved Filters

Any Saved Filters created in a project are accessible to users in the following places:

  • Saved Filters dropdown menu at the top left of the Standard or Advanced tabs (as seen below).

    Saved Filters

    When you click on the Saved Filters search box, each name of the available filters has either Standard or Advanced beneath it, letting you know what kind of filter it is.

    Also, clicking on a Saved Filter will open the corresponding tab (Standard or Advanced).

  • Advanced tab via a Operator node:

    1. Hover your cursor on the Operator node
    2. Click the Add a Filter icon
    3. In the Add Filter window that opens, select the "+" beside Saved Filters

      Operator Saved Filters

    4. In the window that opens, select the Saved Filter you wish to apply.

      Subjects Filter Description

    Note: Users can see a view only list of Saved Filters (see image below) by clicking the Filters button of the Filter Toolbar.

    Subjects Configured Filters

Access Control

Delete Filter requires layoutAdmin or projectAdmin privileges. To grant privileges, see Access Control.

Saving a Sub-Filter

You may also save a sub-filter, or a single node on the filter tree to use later. (For example, you may want to save the filter "subjects who answered 'yes' to 'Do you intermittent fast?'" for easy filtering.) Because this saved filter is not saved at the root (or Operator), it will not be available in the Saved Filters dropdown at the top of the screen.

To save a sub-filter or single node (any children nodes connected will also be saved):

  1. Navigate to the filter tree found in the Advanced tab
  2. Click on the sub-filter or single node you wish to save
  3. Click the Save dropdown above the filter tree
  4. Select Save Selected Node and All Children (if any children nodes are connected they also will be saved)
  5. Name this sub-filter and give it a description (optional)
  6. Click Save
  7. Close the node window by clicking the "x"

Saved sub-filters or single nodes can be viewed from the Advanced tab by clicking on Filters within the Filter Toolbar.

To add saved sub-filters or single nodes to your filter tree:

  1. Hover your cursor on the Operator node
  2. Click the Add a Filter icon
  3. In the Add Filter window that opens, select the “+” beside Saved Filters and select the saved sub-filter from the list (as shown below) - remember, the saved subfilter is not accessible from the Saved Filters dropdown because it was not saved at the Operator level

Saved Subfilter

Filter toolbar

The Filter toolbar has 4 tools to help the user's experience:

Filter Toolbar

  • Clear – Users can clear their selected filters by clicking this button. This will also change the coloring of lines from orange (advanced filter) or green (standard filter) to blue (no filter).

  • Save – Users with the Layout Admin ABAC privilege can create a custom Saved Filter for others to later select from the Saved Filters dropdown menu.

  • Filters – Clicking this button opens a new window entitled Configured Filters. Here you can view all the Saved Filters created in the project. Also, users with the Layout Admin ABAC privilege can delete a saved filter by clicking the trash can icon as seen in the image below.

    Saved Filters

  • Filter Types – Users with the Layout Admin ABAC privilege can simplify the Subjects experience for users in their project by eliminating filter options that are not relevant to the project. (E.g., in the example below, a fitness coach will not need access to genetic filters so the admin can uncheck any that do not apply to their project.)

    Modify Filter

    To modify which filters are available, admins will click on Filter Types and select the checkboxes for the filters that apply to the project.

    Note: Selecting the checkbox beside a filter category automatically selects all checkbox options within that category. Likewise, deselecting at least one of the checkbox options within a category will deselect the checkbox beside the filter category.

Enable Filters

Examples

Example #1: Building a Complex Filter

In the clip below we demonstrate how you can build a complex filter by beginning in the Standard tab, then switching to the Advanced tab to add complexity.

Advanced Tree

Below are the steps taken to achieve this:

  1. Begin in the Standard tab of Subjects
  2. Under Demographics, select subjects with the birth sex of female

    Advanced Female

  3. Click on the Advanced tab to view the "filtering tree" on the left of the screen

    Advanced Female Tree

    Note: It begins with the Operator or root, and shows our first branch, birth sex = female.

  4. Click on the Operator. This opens a window allowing you to add more filtering branches and options.

    Advanced Logical

  5. Click on the "+" beside Demographics

  6. Select the "+" beside Birth Sex and select "unknown".

Competing Data

Note: Zero subjects match our filters. This is because the Operator is set to the default Standard setting of "Has all". This means any filtering branch coming off that Operator has to be met. And since someone cannot be born as both female and unknown, the filters are competing and we end up with zero subjects.

If you click back to the Standard tab, you’ll get the following message popup:

Subjects Switch

This is because Standard is for simple filters with non-competing criteria, and in our subject pool someone cannot have two different birth sex selections at the same time.

However, you can fix competing filters by: - Removing one of the competing filters - Adjusting the command of the Operator.

In this instance, we'll fix it using the Operator method:

  1. Click on the Advanced tab
  2. Click on the Operator node connected to the competing filters.
  3. In the window that opens, click on Settings
  4. Switch the command from "Subjects in EVERY sub-filter" to "Subjects in ANY sub-filter"

Subjects Any

Note: The table on the right now shows all subjects (13) that match EITHER the female (5) or unknown birth sex (8) filter.

Example #2: Building a Complex Filter with Multiple Operators

Using multiple Operators allows you to have different settings (and/any/not) for each Operator and the filters branching from it, allowing you to fine tune your selection and craft a complex filter.

For this example, consider the following: An organization wants to send a follow-up survey to subjects who have consented to a project (and not revoked their consent), have received their lab results at least 30 days ago, and they have not received the "Participant Follow-up Survey".

Filter Tree setup:

Complex Filter Example

"Consent Subjects Needing 1 Month Followup Survey" Operator is set to "Has All" and will filter out subjects that meet the criteria of any attached filter. There are three branches coming off this Operator:

  • Operator "has none" - Setting "Subjects in NOT IN ANY sub-filter" because we want to see subjects who HAVE NOT received the follow-up survey

    • Survey Assignment - Subjects who have been assigned survey “Participant Follow-up Form”
      • “All versions of survey?” checkbox is checked
  • Observations (filter settings for "HAVE received a kit results at least 30 days ago")

    • Observations Exist – "Kit Results Received" – Toggle on “Filter by Date”
    • “After Days Ago” - leave blank
      • Check the “relative” checkbox
    • “Before Days Ago” -input 30 in the box
      • Check the “relative” checkbox
  • 2nd Operator "has none" - Setting "Subjects in NOT IN ANY sub-filter"

    • Consent (filter settings for "have NOT have had a consent with a 'rejected' status") - In Consent settings, select 4 for “Consent Version” & select 4 for “Consent Minor Version" - In "Consent Status" check the “Rejected” checkbox

Last update: 2021-06-24