Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Being able to configure custom filters based on subject type #1204

Open
Tracked by #912 ...
mahalakshme opened this issue Apr 16, 2024 · 3 comments
Open
Tracked by #912 ...

Being able to configure custom filters based on subject type #1204

mahalakshme opened this issue Apr 16, 2024 · 3 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Apr 16, 2024

Need:

When user likes to select filter(subject type) when using the app, based on preference - there are some filters, say concepts that can be shown only for specific subject types and not applicable for all subject types.

AC:

  • Since the need is to have subject Type optionally associated with any filter, changed the AC to show list of subject types if the type of the filter is anything other than 'Subject Type' which the implementer can associate with the filter.

  • Make sure the format used to save filters are backward compatible (the existing custom dashboard filters should continue to work)

  • When none of the subsequent filters are selected as well should be able to save. In this case it means the default program and encounter type filters will show up, and there are no specific filters to get displayed based on the subject type selected in the mobile app.

OLD AC before Development was started:

  • Hence when 'Subject type' filter is selected, then show option to be able to select the particular subject type.
Screenshot 2024-04-19 at 4 56 03 PM
  • When none of the subsequent filters are selected as well should be able to save. In this case it means the default program and encounter type filters will show up, and there are no specific filters to get displayed based on the subject type selected in the mobile app.
  • For the 'Type of Filter for the Selected Subject Type' display all types other than 'Subject type'(Gender, Registeration Date, Enrolment Date, Encounter Date, Program Encounter Date, Address, Concept, Group Subject)
  • Make sure the format used to save filters are backward compatible (the existing custom dashboard filters should continue to work)

Out of scope:

The need for above configuration to work in mobile app.

Old: ignore will delete once my analysis on the epic associated with this card is complete

Usecases:

  • custom filters added when common across all subject types - Account name, location, gender
  • custom filters on custom cards - CD logic will take care of it - so no need subject type - encounter date filter in CHASHMA
  • used for purposes not intended because logic resides in report card - program name filter in LAHI
  • Registeration date on approval related cards default - Sacode

SRCs:

  • 3 approval cards, Due visits, overdue visits, last 24 hour registerations, enrolments, visits, Total, Comments, tasks, call tasks, open subject tasks, due checklist

Complexities:

  • Need to be backward compatible
  • subject type filter if supported for custom dashboard - then implementors need to replicate the code that we wrote for MyDashboard here - not happening
  • so separate out subject type filter
  • so to advice on better reasonable usage - distinguish - segregate subject type based filter separate

Realisations:

  • We need not support new functionalities

Analysis

  • some filters meaningless without subject type - some concept in registeration - how will we know what subject type to search for - unless the concept is mentioned across subject types - for custom cards not a problem, problem for SRC part of CD
  • 3 types: user can filer based on subject type - My dashboard, default subject type scope defined, since concept present across all subject types - no need to define the scope
    - can we merge both?
  • so confusing :(
  • so now lets define how we want it to work:------- MD need to work
    - CD with
@mahalakshme mahalakshme transferred this issue from avniproject/avni-client Apr 19, 2024
@mahalakshme mahalakshme changed the title Being able to add specific custom filters based on subject type Being able to add custom filters based on subject type Apr 19, 2024
@mahalakshme mahalakshme changed the title Being able to add custom filters based on subject type Being able to configure custom filters based on subject type Apr 19, 2024
@1t5j0y 1t5j0y self-assigned this May 27, 2024
1t5j0y added a commit to avniproject/avni-models that referenced this issue May 29, 2024
@1t5j0y
Copy link
Contributor

1t5j0y commented May 29, 2024

Since the need is to have subject Type optionally associated with any filter, changed the AC to show list of subject types if the type of the filter is anything other than 'Subject Type' which the implementer can associate with the filter.

@himeshr
Copy link
Contributor

himeshr commented Jun 7, 2024

@mahalakshme Please clarify all the capabilities that are required as part of SubjectType filter configuration here.
The AC was changes during development, and yesterday i had some discussion with @1t5j0y and we weren't clear on whether we need to show additional Program / Encounter Filter capability when a SubjectType select filter has a value selected, which is currently not implemented.

@mahalakshme
Copy link
Contributor Author

@himeshr this card covers only what is needed for webapp. Only the location of subject type filter in the pop up was changed as part of AC. Independent of where it is placed, the purpose of subject type filter is to determine when(on selection of which subject type on mobile app) the configured filter needs to display. Program / Encounter Filters need not be shown on the popup. Only the scope filters are needed. The intent is to add the behaviour existing in the MyDashboard Filters. Let me know if there is any confusion on the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA Ready
Development

No branches or pull requests

3 participants