-
Notifications
You must be signed in to change notification settings - Fork 97
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
Create function for exporting dqdashboard_results
table to a json file
#497
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested minor changes.
Also, want to update this doc to use your function? https://ohdsi.github.io/DataQualityDashboard/articles/SqlOnly.html
@katy-sadowski - thanks so much for the quick review! I've implemented all changes as suggested, included the additional test of check rows, and modified the SQLOnly vignette to reference the new function prior to viewing json results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 more minor change
R/writeDBResultsTo.R
Outdated
@@ -36,43 +36,27 @@ writeDBResultsToJson <- function(connection, | |||
outputFile) { | |||
startTime <- Sys.time() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove start and end time, and the delta variable now we're not using it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
) | ||
# Extract results table to JSON file for viewing or secondary use | ||
|
||
DataQualityDashboard::writeDBResultsToJson( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩 love to see those lines of code slashed!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #497 +/- ##
===========================================
+ Coverage 86.00% 86.03% +0.03%
===========================================
Files 15 16 +1
Lines 850 881 +31
===========================================
+ Hits 731 758 +27
- Misses 119 123 +4
☔ View full report in Codecov by Sentry. |
Following up on a discussion with @katy-sadowski and in response to Issue #367:
This PR adds a function,
writeDBResultsToJson
that extracts data from thedqdashboard_results
database table and exports it to a json file for use with other OHDSI tools like AresIndexer or the shiny dashboard viewer.The added functionality enhances the recently updated SQLOnly execution use case, where users can incrementally fill a database table with output of SQL checks executed with custom orchestration schemes.
Note that the exported json file may require a case change for use with AresIndexer depending on the version of that package.