Giter Club home page Giter Club logo

aou-dq-cohorts's Introduction

Example Package

This study package demonstrates how to currently use CohortDiagnostics in a package. The package only contains code to run StudyDiagnostics.

To modify the package to include the cohorts of interest, take these steps:

  1. Copy/download the examplePackage folder. For example, download the Zip file here, open it, and locate the examplePackage folder and extract it.

  2. Change the package name as needed. Most importantly:

    • Change the Package: field in the DESCRIPTION file,
    • The packageName argument in the R/CohortDiagnostics file, and
    • The library() call at the top of extras/CodeToRun.R
    • The name of the .Rproj file.
  3. Open the R project in R studio (e.g. by double-clicking on the .Rproj file).

  4. Modify inst/settings/CohortsToCreate.csv to include only those cohorts you are interested in. Fill in each of the four columns:

    • atlasId: The cohort ID in ATLAS.
    • atlasName: The full name of the cohort. This will be shown in the Shiny app.
    • cohortId: The cohort ID to use in the package. USually the same as the cohort ID in ATLAS.
    • name: A short name for the cohort, to use to create file names. do not use special characters.
  5. Run this code (note, this can also be found in extras/PackageMaintenance.R):

    # If ROhdsiWebApi is not yet installed:
    install.packages("devtools")
    devtools::install_github("ROhdsiWebApi")
    
    ROhdsiWebApi::insertCohortDefinitionSetInPackage(fileName = "inst/settings/CohortsToCreate.csv",
                                                     baseUrl = <baseUrl>,
                                                     insertTableSql = TRUE,
                                                     insertCohortCreationR = TRUE,
                                                     generateStats = TRUE,
                                                     packageName = <package name>)

    Where <baseUrl> is the base URL for the WebApi instance, for example: "http://server.org:80/WebAPI", and <package name> is the name of your new package.

You can now build your package. See extras/CodeToRun.R on how to run the package.

aou-dq-cohorts's People

Contributors

cukarthik avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.