Case search options in CommCare 1.3 J2ME

We’re hoping to support uses cases like the following:
1 - List all pregnancy cases associated with one or more pregnancy risk
factors
2 - List all pregnancy cases associated with one specific risk factor (e.g.
had a previous miscarriage)
3 - List all pregnancy cases associated with two or more specific risk
factors (e.g. less than 18 years old AND had a previous miscarriage)
4 - List all pregnancy cases in a specific community that are associated
with one or more risk factor

So far we have implemented support for a hidden search string that supports
the first cases (e.g. entering “.X” in the search box lists all pregnancies
associated).

To support #3 and similar use cases, we’re thinking about:

  • Increasing the ‘semantics’ of the current search string to encode
    multiple risk factors in a single string (e.g. by concatenating several
    short search strings together into a longer search string: “.XA.XY” for
    young woman who had an abortion)
  • (or) Creating multiple hidden search strings (e.g. one for each risk
    factor)
  • Somehow supporting ‘AND’ / ‘OR’ search constraints. We really don’t know
    if/how this can be done with the current client software

So, I guess my question is: does the current case list search box support
any ‘advanced’ search logic and, if so, how does that work?

Thanks, Ray

Ray,

Unfortunately, the case list search box doesn’t support any advanced
options at the moment due to the complexity of the interface required.
Unfortunately we don’t even support if or and searches.

Some of these workflows are somewhat more possible in CommCare 2.0, but we
haven’t really spent a great deal of time addressing searching features in
general. I’d love to hear what you guys arrive upon as your ideal use case
as something we can work on rolling into the code in the future.

-Clayton

··· On Fri, May 18, 2012 at 2:21 AM, Ray Brunsting wrote:

We’re hoping to support uses cases like the following:
1 - List all pregnancy cases associated with one or more pregnancy risk
factors
2 - List all pregnancy cases associated with one specific risk factor
(e.g. had a previous miscarriage)
3 - List all pregnancy cases associated with two or more specific risk
factors (e.g. less than 18 years old AND had a previous miscarriage)
4 - List all pregnancy cases in a specific community that are
associated with one or more risk factor

So far we have implemented support for a hidden search string that
supports the first cases (e.g. entering “.X” in the search box lists all
pregnancies associated).

To support #3 and similar use cases, we’re thinking about:

  • Increasing the ‘semantics’ of the current search string to encode
    multiple risk factors in a single string (e.g. by concatenating several
    short search strings together into a longer search string: “.XA.XY” for
    young woman who had an abortion)
  • (or) Creating multiple hidden search strings (e.g. one for each risk
    factor)
  • Somehow supporting ‘AND’ / ‘OR’ search constraints. We really don’t
    know if/how this can be done with the current client software

So, I guess my question is: does the current case list search box
support any ‘advanced’ search logic and, if so, how does that work?

Thanks, Ray

Clayton.

Thanks for the feedback. Good to know the current capabilities and
limitations.

We’ll likely proceed by using additional sequences for common searches
(e.g. “.XQ” will list very young woman who have been pregnant more than
once; “.XY” all young women; “.XM” women pregnant more than once).
Although it could get complex, I suspect we’ll end up with a relatively
small set of combinations that can be easily remembered and used by our
end-users. We’ll concatenate multiple strings together, which I believe
can be done already and should work fine.

Yes, I can see how designing the UI is a challenge. I wonder if supporting
only ‘AND’ semantics using a simple modifiers would actually handle many of
the real-world use cases (e.g. cases for ‘Clayton’ from ‘Boston’ could be
found by entering “clayton boston”). Other than that, perhaps supporting
application level ‘saved’ or ‘pre-defined’ searches could help — which is
essentially what we’re building.

Ray

··· On Friday, May 18, 2012 6:27:27 AM UTC-4, Clayton Sims wrote: > > Ray, > > Unfortunately, the case list search box doesn't support any advanced > options at the moment due to the complexity of the interface required. > Unfortunately we don't even support if or and searches. > > Some of these workflows are somewhat more possible in CommCare 2.0, but we > haven't really spent a great deal of time addressing searching features in > general. I'd love to hear what you guys arrive upon as your ideal use case > as something we can work on rolling into the code in the future. > > -Clayton > > On Fri, May 18, 2012 at 2:21 AM, Ray Brunsting wrote: > >> We're hoping to support uses cases like the following: >> 1 - List all pregnancy cases associated with one or more pregnancy risk >> factors >> 2 - List all pregnancy cases associated with one specific risk factor >> (e.g. had a previous miscarriage) >> 3 - List all pregnancy cases associated with two or more specific risk >> factors (e.g. less than 18 years old AND had a previous miscarriage) >> 4 - List all pregnancy cases *in a specific community* that are >> associated with one or more risk factor >> >> So far we have implemented support for a hidden search string that >> supports the first cases (e.g. entering ".X" in the search box lists all >> pregnancies associated). >> >> To support #3 and similar use cases, we're thinking about: >> - Increasing the 'semantics' of the current search string to encode >> multiple risk factors in a single string (e.g. by concatenating several >> short search strings together into a longer search string: ".XA.XY" for >> young woman who had an abortion) >> - (or) Creating multiple hidden search strings (e.g. one for each risk >> factor) >> - Somehow supporting 'AND' / 'OR' search constraints. We really don't >> know if/how this can be done with the current client software >> >> So, I guess *my question is*: does the current case list search box >> support any 'advanced' search logic and, if so, how does that work? >> >> Thanks, Ray >> > >

Ray,

Yeah, my current thinking is that doing tiered selection of predefined
searches (IE: Choose a village, choose a risk group, then choose a mother)
rather than more ad-hoc searches will likely be a bit easier for most of
our users, although now that CommCare ODK is becoming more feasible for a
lot of groups, the UI complexity of doing such searches is a bit more
tenable, so generalizing that design to work with J2ME seems pretty likely.

Generally speaking I agree that AND semantics would work pretty well for a
lot of use cases and wouldn’t require much UI complexity. It’s not super
common for text fields to overlap a whole lot (Person name and location,
for instance), so those can be put in with no context. Numbers are a bit
trickier.

-Clayton

··· On Fri, May 18, 2012 at 8:35 AM, Ray Brunsting wrote:

Clayton.

Thanks for the feedback. Good to know the current capabilities and
limitations.

We’ll likely proceed by using additional sequences for common searches
(e.g. “.XQ” will list very young woman who have been pregnant more than
once; “.XY” all young women; “.XM” women pregnant more than once).
Although it could get complex, I suspect we’ll end up with a relatively
small set of combinations that can be easily remembered and used by our
end-users. We’ll concatenate multiple strings together, which I believe
can be done already and should work fine.

Yes, I can see how designing the UI is a challenge. I wonder if
supporting only ‘AND’ semantics using a simple modifiers would actually
handle many of the real-world use cases (e.g. cases for ‘Clayton’ from
’Boston’ could be found by entering “clayton boston”). Other than that,
perhaps supporting application level ‘saved’ or ‘pre-defined’ searches
could help — which is essentially what we’re building.

Ray

On Friday, May 18, 2012 6:27:27 AM UTC-4, Clayton Sims wrote:

Ray,

Unfortunately, the case list search box doesn’t support any advanced
options at the moment due to the complexity of the interface required.
Unfortunately we don’t even support if or and searches.

Some of these workflows are somewhat more possible in CommCare 2.0, but
we haven’t really spent a great deal of time addressing searching features
in general. I’d love to hear what you guys arrive upon as your ideal use
case as something we can work on rolling into the code in the future.

-Clayton

On Fri, May 18, 2012 at 2:21 AM, Ray Brunsting wrote:

We’re hoping to support uses cases like the following:
1 - List all pregnancy cases associated with one or more pregnancy risk
factors
2 - List all pregnancy cases associated with one specific risk factor
(e.g. had a previous miscarriage)
3 - List all pregnancy cases associated with two or more specific risk
factors (e.g. less than 18 years old AND had a previous miscarriage)
4 - List all pregnancy cases in a specific community that are
associated with one or more risk factor

So far we have implemented support for a hidden search string that
supports the first cases (e.g. entering “.X” in the search box lists all
pregnancies associated).

To support #3 and similar use cases, we’re thinking about:

  • Increasing the ‘semantics’ of the current search string to encode
    multiple risk factors in a single string (e.g. by concatenating several
    short search strings together into a longer search string: “.XA.XY” for
    young woman who had an abortion)
  • (or) Creating multiple hidden search strings (e.g. one for each risk
    factor)
  • Somehow supporting ‘AND’ / ‘OR’ search constraints. We really don’t
    know if/how this can be done with the current client software

So, I guess my question is: does the current case list search box
support any ‘advanced’ search logic and, if so, how does that work?

Thanks, Ray