Do not use. This package is under development
This is an R package that implements a library of standard queries that run against the OMOP-CDM. The purpose of the library is to help new users to learn how to query the CDM. The queries in the library have been approved by the OHDSI community. The query library will be mainly used for training purposes, but will also be a valuable resource for the experienced users.
- Automatically renders the queries to the dialect, cdm and vocabulary schemas as specified by the user
- Can execute the query against a user's database
- Allows saving and loading user settings
- Supports the addition of user-defined queries loaded automatically from a user folder (under-development)
QueryLibrary is an R package that uses Shiny and Markdown. The tool automatically reads and renders sql from Markdown files in its queries folder. The query file contains a description of the query, and explains the input variables and results table. The following information is parsed from the markdown files using tags:
- Group. Allows to group queries, e.g. by domain
- Name. The name of the query in the search table.
- CDM-Version. The version this query runs on, e.g. >5.0
- Author. The person responsible for writing the query
- Query. The query is taken from the .Md file, rendered using SqlRender and is shown to the user in its preferred dialect.
Running the package requires R with the package rJava installed. Also requires Java 1.6 or higher.
- SQLRender
- DatabaseConnector
- Shiny
To install the latest development version, install from GitHub:
install.packages("devtools")
devtools::install_github("ohdsi/QueryLibrary")
Once installed, you can try out the Shiny app that comes with the package:
library(QueryLibrary)
QueryLibrary::launchQueryLibraryApp()
The configuration section allows the user to set the dialect and other connectionDetails for the CDM. This settings file can be saved and loaded using the buttons on the top of the page.
Using the library table the user can select a query. The markdown file of the query can be see on the right. The Execute tab allows the user to import the selected query, edit the query (the window can be made bigger if needed), run, copy, and save the query. The tool will show a counter when the query is runninng and will show the results table below the query.
We would like to increase the number of queries in the library based on the need of the community. If there are suggestions please post them in the issue tracker.
- Vignette: Using QueryLibrary
- Package manual: QueryLibrary manual
- Developer questions/comments/feedback: OHDSI Forum
- We use the GitHub issue tracker for all bugs/issues/enhancements
QueryLibrary is licensed under Apache License 2.0
QueryLibrary is being developed in R Studio.
Under heavy development. The code should not be used yet.