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

Dashboard filters for custom dashboards #1292

Open
9 of 10 tasks
vinayvenu opened this issue Jan 30, 2023 · 1 comment
Open
9 of 10 tasks

Dashboard filters for custom dashboards #1292

vinayvenu opened this issue Jan 30, 2023 · 1 comment
Labels

Comments

@vinayvenu
Copy link
Member

vinayvenu commented Jan 30, 2023

As part of this epic, we will support filters on the custom dashboard.

With this epic, we will provide options to define filters for Custom Dashboards.

Filters will need to be defined on a per-dashboard basis at the minimum because the filter on each dashboard can be different.

Current configuration style

Given below is a sample My Dashboard filter. This is present as part of the organisation config of an organisation. Each filter is marked against a specific subject type.

[
  {
    "type": "Address",
    "widget": "Default",
    "titleKey": "Address",
    "subjectTypeUUID": "9f2af1f9-e150-4f8e-aad3-40bb7eb05aa3"
  },
  {
    "type": "Address",
    "widget": "Default",
    "titleKey": "Address",
    "subjectTypeUUID": "ea7e5c94-5e90-4288-803d-6a1aa9d80acd"
  },
  {
    "type": "GroupSubject",
    "widget": "Default",
    "titleKey": "Phulwari",
    "subjectTypeUUID": "9f2af1f9-e150-4f8e-aad3-40bb7eb05aa3",
    "groupSubjectTypeUUID": "ea7e5c94-5e90-4288-803d-6a1aa9d80acd"
  },
  {
    "type": "Concept",
    "scope": "programEncounter",
    "titleKey": "Growth Faltering",
    "conceptName": "Growth Faltering Status",
    "conceptUUID": "a5067bcc-d333-4c80-a0f2-d61df9d210d3",
    "conceptDataType": "Coded",
    "scopeParameters": {
      "programUUIDs": [
        "352d906c-b386-496c-ba23-91b1468a5613"
      ],
      "encounterTypeUUIDs": [
        "02c72b2b-19f0-4f75-b734-dcad5601881b"
      ]
    },
    "subjectTypeUUID": "9f2af1f9-e150-4f8e-aad3-40bb7eb05aa3"
  }
]

Changes required

  • We need the dashboard uuid to be part of this configuration
  • We need a new place to store this new configuration type to ensure backwards compatibility. Move dashboard configuration to new table. Keep old configuration and maintain it for default dashboard cards.
  • Change app designer to give an option to provide dashboard name as well. Save in two different places - organisation_config and dashboard_filter (new table)
  • Sync dashboard_filter table to app and start using it
  • New app will exclusively use the dashboard_filter to show dashboards. Old MyDashboard will be removed
  • Send these dashboard filters (based on dashboard) to each report card to apply the filter

Tasks

  • New db design for dashboard_filter
  • Sync of dashboard_filter to client
  • Usage of dashboard_filter on organisations using myDashboard
  • New screen for filters on Custom Dashboard (on home as well as dashboard screens)
  • Sending of dashboard_filter to new dashboards
  • Change of app designer to have a new field for Dashboard name
  • Save of dashboard filters on server (remember to keep old dashboard content)
  • Removal of flag "showTotalForProgram" in orgConfig.settings, introduced as part of avni-client card

Out of scope

Deprecation of MyDashboard

There are some features that are still available in MyDashboard that prevent us from migrating over to this new structure. Since these are out of scope for this epic, we will not be migrating over all MyDashboards to Custom Dashboard. The missing features are

  • Autorefresh
  • Today/Tomorrow in the filters
  • showTotalForProgram where we optionally add or remove cards based on configuration 868
@vinayvenu vinayvenu added the Epic label Jan 30, 2023
@vinayvenu
Copy link
Member Author

We will need to add the ability to have default values here. See https://app.zenhub.com/workspaces/avni-product-635b73bded85e50018871ae6/issues/gh/avniproject/avni-client/828

@vinayvenu vinayvenu moved this to New Issues in Avni Product Jun 15, 2023
@vinayvenu vinayvenu moved this from New Issues to In Play Epics in Avni Product Jun 15, 2023
@vinayvenu vinayvenu moved this from In Play Epics to In Analysis in Avni Product Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Analysis
Development

No branches or pull requests

1 participant