Fixing the Dashboard

About

The Nurture Website ( http://www.nurturebiobank.org ) contains embedded charts from an instance of Metabase ( http://dashboard.nurturebiobank.org ).

A script ( https://bitbucket.renalregistry.nhs.uk/projects/RDR/repos/nurture-dashboard/browse ) runs on rr-systems-live. This connects to the RADAR Live database and runs a number of queries. It stores the results of these queries in an SQLite database. A second script then SFTPs this to the Metabase server, overwriting the copy alread there.

Issue

Sometimes one or more of the charts will display incorrect numbers - usually significantly (38 rather than 425 etc.). An early cause of a lesser, similar error was that someone was modifying the database while the queries has been run but this has been prevented by changing the run time to midnight.

Solution

Log onto Metabase and try some of the following -

  • Go into Questions and select the Chart with the issue. Click Refresh.
  • Go into the Admin Panel (via menu in top right). Go to Databases and select Nurture. On the right hand side click "Sync" and wait for it to finish.
  • Go into the Admin Panel. Choose Caching from the Settings Menu at the Left. Turn it on, then off.

I'm unsure of the optimum order in which to do this.


If that doesn't work SSH to the Metabase server and use the sqlite3 command line tool to connect to the database and see how many rows each table has. patient_demographics, diagnoses & egfrs should all have the same number of rows (same as on the dashboard). The samples one will have less and can be ignored as it's not yet used.

If there are fewer rows than expected SSH to rr-systems-live as the nurture user and manually re-run the report process.