Filtering a list with a list

Hello!

I have a list of clinicians who each treat multiple clinical issues. The clinicians’ names are displayed in a repeating group that I would like to filter based on input from multiple different dropdown inputs (e.g., gender, issues treated, etc.). The inputs are related to the issues that a patient has and are used to help determine the best clinicians for a given patient.

I’ve run into an roadblock related to filtering the clinicians based on the clinical issues a patient has. The data structure is:

  • Clinician has a list of clinical issues they treat (usually 10-15 issues)
  • Patient has a list of clinical issues they need treated (usually 2-3)

I would like to filter the clinicians such that only clinicians who treat all of the patient’s clinical issues are displayed.

@romanmg and @fayewatson - I’ve found forum posts related to the above (e.g., Can't get search to work - #3 by fayewatson) you’ve commented on in the past similar to my issue, but still haven’t been able to make headway. Perhaps if you have some insight, can you please weigh in?

Here is a link to the live page (I’m not sure how to share the editor view).

Thanks so much!

Ryan

Hey Ryan,

  1. Can you make your editor public? Go to Settings > General > set it to Everyone can Read or Everyone can Edit so that we can take a look.
  2. I’m assuming by clinical issues you mean “Focus Areas - Familiar” needs to match “Case’s Clinical Issues” right? Just want to make sure I’m looking at the right fields that you want to match on.
  3. Without looking at your editor yet, the first thing I’d try is replacing that third filter (Focus Areas) with the following filter:

Advanced: This Therapist’s Focus Areas - Familiar contains list Current User’s Current Case’s Clinical Issues.

The advanced filter will allow you to use the “contains list” operation, which will do what you want. It will look for therapists whose focus areas list contains all items in a case’s clinical issues list.

2 Likes

Thanks, @romanmg , for your quick reply!

  1. Here is the read-only link to my app.
  2. So there are a few different categories by which I’d like to filter clinicians similarly; namely, clinical issue (e.g., depression), focus area (e.g., improve my relationships), and treatment (e.g., CBT). I just gave the example of clinical issue in my question since the other two will have the same filtering approach.
  3. I tried your suggestion, but I’m getting an error that says “filtered: value should be a yes/no, but right now it is a…”. I’ve attached a screenshot here:

Some more context: The data is structured such that each clinician has a list of clinical issues (and focus areas / treatments) in which they are 1. experts, 2. familiar, 3, unfamiliar, and 4. do not treat. Eventually I’d like to create a filter that allows a user to specify that they need a therapist who is an expert in one of the areas they specified, but haven’t yet figured that piece out.

Any suggestions?

Thank you!
Ryan

Hi Ryan,

I’ll need to come back to this later, but real quick… change “contains” in that filter to “contains list” first. See if that gets you closer.

Awesome, that worked really well! I’m now able to filter clinicians by clinical issue, focus area, and treatment. If I simply select any of these dropdown menus only therapists who have indicated familiar for those areas will be shown. I’m also able to filter out all therapists who said “Exclude” for those same dropdown choices.

The last thing I need help with is figuring out how to implement the expert functionality. After one of these three dropdown types is chosen the selections are listed above the filters. Each selection has an “x” and a graduation cap icon next to it. The “x” allows removal of just that filter (this is working) and if the graduation cap is clicked, I would like to show only those therapists in the list who listed they are an expert in that particular selection (clinical issue, focus area, or treatment).

I’m really not sure how to even approach this problem without changing the current data structure, but perhaps you have some creative ideas?

Thanks!
Ryan

1 Like

I have the same error, and I’m using “Contains List”

Is the value of "Group C’s Checked_Services a list of Photographers?

1 Like

It’s a list of services.

Photographer has a field “Services Provided” which is a list of texts.
Groups C’s Checked Services is a list of Services - so they weren’t matching.

I got rid of the error by adding "Group C’s “Checked Services’s” “Service name” at the end. So both lists are text lists.

No error now (however it still doesn’t function… I’m a bleary eyed - probably making a 2am mistake somewhere else.)

works now - i didn’t understand with “Current Option” was on the drop down and I had it blank.

Thank you for your help!

I think i finally understand now - I shouldn’t be matching the text labels at all. Photographer’s Services provided should be a list of services - not a text list. Then I should just match the services.

It’s this distinction between a thing and the thing’s name that has been the source of all my confusion in this first week of learning bubble. But I think i finally get it.

1 Like