Applying multiple filters to a case list

I addressed this question to the fellows list this morning and received
some helpful guidance from Sheel, however, I think that perhaps further
guidance might be required as this is a rather convoluted Xpath and logic
I’m trying to use.

Basically, I have a second module in an application which will allow a
second set of users to access a filtered list of cases based on a set of
criteria. Specifically, we will want to filter the cases that appear in
this list to show only those individuals with a high viral load count (in
excess of 400), and whose test results have been uploaded to the system
between 14-16 days ago. Additionally, this follow-up module will prompt the
user to confirm whether they have actioned each case on this list,
providing them with essentially a ‘yes’ or ‘no’ option. When they select
’Yes’, we want the case to drop off the list (not close it, simply remove
it so that it no longer appears) and when they answer ‘No’, we want that
case to remain in the list.

Based on the discussion I had earlier on the chat, I understand that all
three filters will have to be contained in a single property and that it
doesn’t matter which of these three properties I choose. I have therefore
entered the following Xpath, based on my understanding of how the cases
should be filtered:

.>=400 and if(Follow_up = ‘Pos_contact’, false()) and (Test_date + 14) <=
today() and today() <= (Test_date + 16)

I’m not sure what I’m missing here, but despite having edited cases to
contain the necessary criteria to place them on the list, my list is still
empty. I am wondering if this has to do with the if(Follow_up =
‘Pos_contact’, false()) filter as this is a question in the follow-up
module, as opposed to the first module where the other two pieces of
information will be recorded. Is it possible that because this question has
not yet been addressed when the client list is opened that it is causing it
to display none of the cases?

I hope that makes sense, please let me know if it would be easier to talk
out over the phone.

Thanks,

Steve

Sounds like it’s that the if function requires 3 arguments: if(Follow_up =
‘Pos_contact’, false(), true()). But it’d probably be easier to just to
write Follow_up != ‘Pos_contact’, unless I’m misunderstanding what you’re
trying to do.

Let me know if that fixes it.

Cheers,
Danny

I addressed this question to the fellows list this morning and received
some
helpful guidance from Sheel, however, I think that perhaps further
guidance
might be required as this is a rather convoluted Xpath and logic I’m
trying
to use.

Basically, I have a second module in an application which will allow a
second set of users to access a filtered list of cases based on a set of
criteria. Specifically, we will want to filter the cases that appear in
this
list to show only those individuals with a high viral load count (in
excess
of 400), and whose test results have been uploaded to the system between
14-16 days ago. Additionally, this follow-up module will prompt the user
to
confirm whether they have actioned each case on this list, providing them
with essentially a ‘yes’ or ‘no’ option. When they select ‘Yes’, we want
the
case to drop off the list (not close it, simply remove it so that it no
longer appears) and when they answer ‘No’, we want that case to remain in
the list.

Based on the discussion I had earlier on the chat, I understand that all
three filters will have to be contained in a single property and that it
doesn’t matter which of these three properties I choose. I have therefore
entered the following Xpath, based on my understanding of how the cases
should be filtered:

.>=400 and if(Follow_up = ‘Pos_contact’, false()) and (Test_date + 14) <=
today() and today() <= (Test_date + 16)

I’m not sure what I’m missing here, but despite having edited cases to
contain the necessary criteria to place them on the list, my list is still
empty. I am wondering if this has to do with the if(Follow_up =
‘Pos_contact’, false()) filter as this is a question in the follow-up
module, as opposed to the first module where the other two pieces of
information will be recorded. Is it possible that because this question
has
not yet been addressed when the client list is opened that it is causing
it

··· 2012/7/20 Steve : > to display none of the cases? > > I hope that makes sense, please let me know if it would be easier to talk > out over the phone. > > Thanks, > > Steve

While I don’t know the answer to Steve’s question, I would like to learn
more about the expected user experience…since I’m not sure if/how I am
able to filter the list of cases shown in a particular module. As far as I
know, CCHQ only allows me to specify a case_type at the module level, and
does not allow me to further filter the module’s case list.

So, is it possible to have two or more modules from the same application
lists cases of the same case type (e.g. pregnancy), but have each module
list a different set of cases (e.g. one module for prenatal and a second
for postpartum, based on the value of a ‘had_delivery’ case property)?

Perhaps I don’t correctly understand what Steve is attempting to achieve.

Thanks, Ray

··· On Friday, July 20, 2012 7:58:09 AM UTC-4, Steve wrote: > > I addressed this question to the fellows list this morning and received > some helpful guidance from Sheel, however, I think that perhaps further > guidance might be required as this is a rather convoluted Xpath and logic > I'm trying to use. > > Basically, I have a second module in an application which will allow a > second set of users to access a filtered list of cases based on a set of > criteria. Specifically, we will want to filter the cases that appear in > this list to show only those individuals with a high viral load count (in > excess of 400), and whose test results have been uploaded to the system > between 14-16 days ago. Additionally, this follow-up module will prompt the > user to confirm whether they have actioned each case on this list, > providing them with essentially a 'yes' or 'no' option. When they select > 'Yes', we want the case to drop off the list (not close it, simply remove > it so that it no longer appears) and when they answer 'No', we want that > case to remain in the list. > > Based on the discussion I had earlier on the chat, I understand that all > three filters will have to be contained in a single property and that it > doesn't matter which of these three properties I choose. I have therefore > entered the following Xpath, based on my understanding of how the cases > should be filtered: > > .>=400 and if(Follow_up = 'Pos_contact', false()) and (Test_date + 14) <= > today() and today() <= (Test_date + 16) > > I'm not sure what I'm missing here, but despite having edited cases to > contain the necessary criteria to place them on the list, my list is still > empty. I am wondering if this has to do with the if(Follow_up = > 'Pos_contact', false()) filter as this is a question in the follow-up > module, as opposed to the first module where the other two pieces of > information will be recorded. Is it possible that because this question has > not yet been addressed when the client list is opened that it is causing it > to display none of the cases? > > I hope that makes sense, please let me know if it would be easier to talk > out over the phone. > > Thanks, > > Steve >

Hi Ray,

That’s exactly right - the “filter” feature allows you to show in the case
list only the cases that match the filter criteria. You can use case
properties and xpath functions in the filter expression.

You can configure this in the case detail configuration page (click on the
module name). For now, next to each case property, there is the "format"
dropbdown. One of the dropdown items you can select for “filter
(Advanced)”. You can only have 1 filter per module. The case property you
choose as the “filter” you can refer to with the self-reference “.” in the
filter expression.

Right now, this is an advanced feature of the 2.0 app builder - as we work
more on the 2.0 app builder we plan to improve the usability of this
feature.

Thanks,
Amelia

··· On Mon, Jul 30, 2012 at 12:32 PM, Ray Brunsting wrote:

While I don’t know the answer to Steve’s question, I would like to learn
more about the expected user experience…since I’m not sure if/how I am
able to filter the list of cases shown in a particular module. As far as I
know, CCHQ only allows me to specify a case_type at the module level, and
does not allow me to further filter the module’s case list.

So, is it possible to have two or more modules from the same application
lists cases of the same case type (e.g. pregnancy), but have each module
list a different set of cases (e.g. one module for prenatal and a second
for postpartum, based on the value of a ‘had_delivery’ case property)?

Perhaps I don’t correctly understand what Steve is attempting to achieve.

Thanks, Ray

On Friday, July 20, 2012 7:58:09 AM UTC-4, Steve wrote:

I addressed this question to the fellows list this morning and received
some helpful guidance from Sheel, however, I think that perhaps further
guidance might be required as this is a rather convoluted Xpath and logic
I’m trying to use.

Basically, I have a second module in an application which will allow a
second set of users to access a filtered list of cases based on a set of
criteria. Specifically, we will want to filter the cases that appear in
this list to show only those individuals with a high viral load count (in
excess of 400), and whose test results have been uploaded to the system
between 14-16 days ago. Additionally, this follow-up module will prompt the
user to confirm whether they have actioned each case on this list,
providing them with essentially a ‘yes’ or ‘no’ option. When they select
’Yes’, we want the case to drop off the list (not close it, simply remove
it so that it no longer appears) and when they answer ‘No’, we want that
case to remain in the list.

Based on the discussion I had earlier on the chat, I understand that all
three filters will have to be contained in a single property and that it
doesn’t matter which of these three properties I choose. I have therefore
entered the following Xpath, based on my understanding of how the cases
should be filtered:

.>=400 and if(Follow_up = ‘Pos_contact’, false()) and (Test_date + 14) <=
today() and today() <= (Test_date + 16)

I’m not sure what I’m missing here, but despite having edited cases to
contain the necessary criteria to place them on the list, my list is still
empty. I am wondering if this has to do with the if(Follow_up =
‘Pos_contact’, false()) filter as this is a question in the follow-up
module, as opposed to the first module where the other two pieces of
information will be recorded. Is it possible that because this question has
not yet been addressed when the client list is opened that it is causing it
to display none of the cases?

I hope that makes sense, please let me know if it would be easier to talk
out over the phone.

Thanks,

Steve

Hi Amelia.
That sounds like a great feature, and we’ll be sure to give a try.
Thanks for the info.
Ray

··· On Monday, July 30, 2012 1:13:56 PM UTC-4, Amelia Sagoff wrote: > > Hi Ray, > > That's exactly right - the "filter" feature allows you to show in the case > list only the cases that match the filter criteria. You can use case > properties and xpath functions in the filter expression. > > You can configure this in the case detail configuration page (click on the > module name). For now, next to each case property, there is the "format" > dropbdown. One of the dropdown items you can select for "filter > (Advanced)". You can only have 1 filter per module. The case property you > choose as the "filter" you can refer to with the self-reference "." in the > filter expression. > > Right now, this is an advanced feature of the 2.0 app builder - as we work > more on the 2.0 app builder we plan to improve the usability of this > feature. > > Thanks, > Amelia > > On Mon, Jul 30, 2012 at 12:32 PM, Ray Brunsting wrote: > >> While I don't know the answer to Steve's question, I would like to learn >> more about the expected user experience...since I'm not sure if/how I am >> able to filter the list of cases shown in a particular module. As far as I >> know, CCHQ only allows me to specify a case_type at the module level, and >> does not allow me to further filter the module's case list. >> >> So, is it possible to have two or more modules from the same application >> lists cases of the same case type (e.g. pregnancy), but have each module >> list a different set of cases (e.g. one module for prenatal and a second >> for postpartum, based on the value of a 'had_delivery' case property)? >> >> Perhaps I don't correctly understand what Steve is attempting to achieve. >> >> Thanks, Ray >> >> >> On Friday, July 20, 2012 7:58:09 AM UTC-4, Steve wrote: >>> >>> I addressed this question to the fellows list this morning and received >>> some helpful guidance from Sheel, however, I think that perhaps further >>> guidance might be required as this is a rather convoluted Xpath and logic >>> I'm trying to use. >>> >>> Basically, I have a second module in an application which will allow a >>> second set of users to access a filtered list of cases based on a set of >>> criteria. Specifically, we will want to filter the cases that appear in >>> this list to show only those individuals with a high viral load count (in >>> excess of 400), and whose test results have been uploaded to the system >>> between 14-16 days ago. Additionally, this follow-up module will prompt the >>> user to confirm whether they have actioned each case on this list, >>> providing them with essentially a 'yes' or 'no' option. When they select >>> 'Yes', we want the case to drop off the list (not close it, simply remove >>> it so that it no longer appears) and when they answer 'No', we want that >>> case to remain in the list. >>> >>> Based on the discussion I had earlier on the chat, I understand that all >>> three filters will have to be contained in a single property and that it >>> doesn't matter which of these three properties I choose. I have therefore >>> entered the following Xpath, based on my understanding of how the cases >>> should be filtered: >>> >>> .>=400 and if(Follow_up = 'Pos_contact', false()) and (Test_date + 14) >>> <= today() and today() <= (Test_date + 16) >>> >>> I'm not sure what I'm missing here, but despite having edited cases to >>> contain the necessary criteria to place them on the list, my list is still >>> empty. I am wondering if this has to do with the if(Follow_up = >>> 'Pos_contact', false()) filter as this is a question in the follow-up >>> module, as opposed to the first module where the other two pieces of >>> information will be recorded. Is it possible that because this question has >>> not yet been addressed when the client list is opened that it is causing it >>> to display none of the cases? >>> >>> I hope that makes sense, please let me know if it would be easier to >>> talk out over the phone. >>> >>> Thanks, >>> >>> Steve >>> >> >