OHDSI / OHDSI/WebAPI

Drilldown data not consistently loading

Open
#2,079 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
151
Forks
183
Avg merge
14m
Merged PRs (30d)
2

Description

Expected behavior

When clicking a block in the treemap in the "data source" section a drilldown event is trigger to pull that data down and display in the sub grids

Actual behavior

No Data found displayed in the subsection

Steps to reproduce behavior

After researching and providing a quick fix on our end it is a combinations of updates that makes this happen. When we started using Achilles 1.7.0 there were several updates made but one in particular changed some values in the @results_database_schema.achilles_results_dist table. The one that is causing this issue is this one https://github.com/OHDSI/Achilles/commit/7bccb474bac5b60138e5481e2099315226133f50

It changed the fill-in value from something like "0.23 secs" to "0.23" in the stratum_1 column. By doing this it open the door for a catch that was working in the past to exclude these 44 rows to be evaluated by using the isnumeric() function. Unfortunately, the error we get is inconsistent on data sources and selections but we do know it's queries like this one that produce the error. The first time we experienced this was when it was running this .sql statement and it produced an error in the logs not being able to convert the value to INT. https://github.com/OHDSI/WebAPI/blob/master/src/main/resources/resources/cdmresults/sql/report/observation/drilldown/ageAtFirstOccurrence.sql

Quick short-term fix

We update all 44 rows with the values in the table from "0.23" back to "0.23 secs" and it works as expected.

Long term fix

The better approach would be to update all the sql statements like the one above by filtering out in the where clause of non-integer values. aka "ard1.stratum_1 NOT LIKE '%.%'" or something similar that the values don't get evaluated and passed as true in the overall statement and throws an error in the logs and displays no data to the user.

-Adam

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/main/resources/resources/cdmresults/sql/report/observation/drilldown/ageAtFirstOccurrence.sql and review the affected achilles_results_dist.stratum_1 values, including the 0.23 entries. Reproduce the conversion error with a non-integer value, then inspect related drilldown SQL statements for the same condition. Done means affected drilldowns no longer fail and return their subsection data.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.