# Using Observational Health Data Sciences and Informatics (OHDSI) Report Generator

## Jenna Reps, Anthony Sena

### 2026-08-03

# Using the OhdsiReportGenerator Package

This package enables users to extract characterization, estimation and prediction results from the OHDSI results (see result model) generated via R packages such as `PatientLevelPrediction`, `Characterization`, `CohortMethod` and `SelfControlledCaseSeries`.

## Example Result Database

This package provides users with an example OHDSI result database. This can be accessed via `getExampleConnectionDetails()` and contains the results of running a demo analysis using the Eunomia R package sample OMOP CDM data.

    library(OhdsiReportGenerator)
    # create a connection details object to
    connectionDetails <- getExampleConnectionDetails()

    # create a connection handler to the results
    library(ResultModelManager)

    ## Loading required package: R6

    ## Loading required package: DatabaseConnector

    ConnectionHandler <- ResultModelManager::ConnectionHandler$new(connectionDetails)

    ## Connecting using SQLite driver

## Extracting Cohorts

The cohort details can be extracted using the function `getCohortDefinitions` that requires the user to input the connection handler, schema, table prefix used by CohortGenerator (default is ‘cg_’) and target cohort ids to restrict to.

The example results are in a sqlite database and use the schema ‘main’.

    cohorts <- getCohortDefinitions(
        connectionHandler = ConnectionHandler,
        schema = 'main',
        cgTablePrefix = 'cg_',
        targetIds = NULL
    )

    knitr::kable(
      x = cohorts %>%
        dropJsonColumns() %>%
        dplyr::select(-dplyr::any_of(c("sqlCommand"))),
      caption = 'The data.frame extracted containing the cohort details minus JSON columns and sqlCommand.'
      )

Table: The data.frame extracted containing the cohort details minus JSON columns and sqlCommand.

cohortDefinitionId | cohortName | description | subsetParent | isSubset | subsetDefinitionId | isTemplatedCohort | templateName | templateSql
--- | --- | --- | --- | --- | --- | --- | --- | ---
1 | Celecoxib | NA | 1 | 0 | NA | 0 | NA | NA
2 | Diclofenac | NA | 2 | 0 | NA | 0 | NA | NA
3 | GI bleed | NA | 3 | 0 | NA | 0 | NA | NA
4 | Acetaminophen | NA | 4 | 0 | NA | 0 | NA | NA
5 | Amoxicillin | NA | 5 | 0 | NA | 0 | NA | NA
6 | Aspirin | NA | 6 | 0 | NA | 0 | NA | NA
7 | Clavulanate | NA | 7 | 0 | NA | 0 | NA | NA
8 | Death | NA | 8 | 0 | NA | 0 | NA | NA
9 | Doxylamine | NA | 9 | 0 | NA | 0 | NA | NA
10 | PenicillinV | NA | 10 | 0 | NA | 0 | NA | NA
11 | ViralSinusitis | NA | 11 | 0 | NA | 0 | NA | NA
1001 | Celecoxib - age 18 to 64 Age 18 to 64 | NA | 1 | 1 | 1 | 0 | NA | NA
2001 | Diclofenac - age 18 to 64 Age 18 to 64 | NA | 2 | 1 | 1 | 0 | NA | NA
1002 | Celecoxib - first event with 365 prior obs first event with 365 prior obs | NA | 1 | 1 | 2 | 0 | NA | NA
2002 | Diclofenac - first event with 365 prior obs first event with 365 prior obs | NA | 2 | 1 | 2 | 0 | NA | NA
1003 | Celecoxib - age 18 to 64 and first event with 365 prior obs Age 18 to 64, first event with 365 prior obs | NA | 1 | 1 | 3 | 0 | NA | NA
2003 | Diclofenac - age 18 to 64 and first event with 365 prior obs Age 18 to 64, first event with 365 prior obs | NA | 2 | 1 | 3 | 0 | NA | NA

You can process the cohorts definitions to extract the parent cohorts and the children for each parent cohort.

    if(nrow(cohorts) > 0){
    processedCohorts <- processCohorts(cohorts)

    knitr::kable(
      x = data.frame(
        parentId = processedCohorts$parents,
        parentName= names(processedCohorts$parents)
        ),
      caption = 'The parent cohorts.'
      )

    knitr::kable(
      x = processedCohorts$cohortList[[1]] %>%
        dropJsonColumns() %>%
        dplyr::select(-dplyr::any_of(c("sqlCommand"))),
      caption = 'The children/subset cohorts for the first parent cohort.'
      )
    }

Table: The children/subset cohorts for the first parent cohort.

cohortDefinitionId | cohortName | description | subsetParent | isSubset | subsetDefinitionId | isTemplatedCohort | templateName | templateSql
--- | --- | --- | --- | --- | --- | --- | --- | ---
1 | Celecoxib | NA | 1 | 0 | NA | 0 | NA | NA
1001 | Celecoxib - age 18 to 64 Age 18 to 64 | NA | 1 | 1 | 1 | 0 | NA | NA
1002 | Celecoxib - first event with 365 prior obs first event with 365 prior obs | NA | 1 | 1 | 2 | 0 | NA | NA
1003 | Celecoxib - age 18 to 64 and first event with 365 prior obs Age 18 to 64, first event with 365 prior obs | NA | 1 | 1 | 3 | 0 | NA | NA

For example, if you created a cohort corresponding to all patients exposed to drug A with an id of 1 and then created ‘children’ subset cohorts corresponding to patients exposed to drug A for indication X with an id 1001 and patients exposed to drug A aged 60+ with a cohort id 1002, then `getCohortDefinition()` would extract all three of these cohorts and `processCohorts()` would identify cohort 1 as the parent and cohorts 1,1001,1002 as the children/subset of cohort 1.

You can also extract the subset logic for a subset id:

    subsets <- getCohortSubsetDefinitions(
        connectionHandler = ConnectionHandler,
        schema = 'main',
        cgTablePrefix = 'cg_'
    )

    knitr::kable(
      x = subsets %>% dropJsonColumns(),
      caption = 'The subset cohort logic used in the analysis.'
      )

Table: The subset cohort logic used in the analysis.

subsetDefinitionId
1
2
3

## Extracting Characterization Results

The characterization analysis contains time to event results, dechallenge-rechallenge, risk factor and cohort incidence results.

The time-to-event results tell you how often a outcome occurs relative to some target cohort index date on a 1-day, 30-day and 365-day scale.

    tte <- getTimeToEvent(
        connectionHandler = ConnectionHandler,
        schema = 'main'
    )

    knitr::kable(
      x = tte %>% dplyr::filter(.data$timeScale == 'per 365-day'),
      caption = 'Example time-to-event results for the 365-day scale.'
      )

Table: Example time-to-event results for the 365-day scale.

databaseName | databaseId | characterizationTargetId | targetName | targetId | limitToFirstInNDays | minPriorObservation | nestingCohortId | nestingName | minAge | maxAge | studyStart | studyEnd | genderConceptIds | outcomeName | outcomeId | outcomeType | targetOutcomeType | timeToEvent | numEvents | timeScale
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
Synthea | 388020256 | 10 | Celecoxib | 1 | 0 | 365 | 0 | NA | 0 | 9999 | 19960701.0 | 20180331.0 | NA | GI bleed | 3 | first | After last target end | 365 | 200 | per 365-day
Synthea | 388020256 | 20 | Celecoxib | 1 | 0 | 365 | 0 | NA | 0 | 9999 | 20010101.0 | 20181231.0 | NA | GI bleed | 3 | first | After last target end | 365 | 162 | per 365-day
Synthea | 388020256 | 50 | Diclofenac | 2 | 0 | 365 | 0 | NA | 0 | 9999 | 19960701.0 | 20180331.0 | NA | GI bleed | 3 | first | After last target end | 365 | 75 | per 365-day
Synthea | 388020256 | 60 | Diclofenac | 2 | 0 | 365 | 0 | NA | 0 | 9999 | 20010101.0 | 20181231.0 | NA | GI bleed | 3 | first | After last target end | 365 | 64 | per 365-day
Synthea | 388020256 | 110 | Acetaminophen | 4 | 0 | 365 | 0 | NA | 0 | 9999 | 19960701.0 | 20180331.0 | NA | GI bleed | 3 | first | After last target end | 365 | 275 | per 365-day
Synthea | 388020256 | 120 | Acetaminophen | 4 | 0 | 365 | 0 | NA | 0 | 9999 | 20010101.0 | 20181231.0 | NA | GI bleed | 3 | first | After last target end | 365 | 226 | per 365-day

The dechallenge-rechallenge analysis shows you how often an outcome occurs during some target exposure and then how often the target exposure is stopped shortly after the outcome and whether the outcome re-occurs when the target exposure restarts:

    drc <- getDechallengeRechallenge(
        connectionHandler = ConnectionHandler,
        schema = 'main'
    )

    knitr::kable(
      x = drc,
      caption = 'Example dechallenge-rechallenge results.'
      )

Table: Example dechallenge-rechallenge results.

databaseName | databaseId | characterizationTargetId | targetName | targetId | limitToFirstInNDays | minPriorObservation | nestingCohortId | nestingName | minAge | maxAge | studyStart | studyEnd | genderConceptIds | outcomeName | outcomeId | dechallengeStopInterval | dechallengeEvaluationWindow | numExposureEras | numPersonsExposed | numCases | dechallengeAttempt | dechallengeFail | dechallengeSuccess | rechallengeAttempt | rechallengeFail | rechallengeSuccess | pctDechallengeAttempt | pctDechallengeFail | pctDechallengeSuccess | pctRechallengeAttempt | pctRechallengeFail | pctRechallengeSuccess
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
Synthea | 388020256 | 10 | Celecoxib | 1 | 0 | 365 | 0 | NA | 0 | 9999 | 19960701.0 | 20180331.0 | NA | GI bleed | 3 | 30 | 30 | 100 | 80 | 20 | 15 | 10 | 5 | 5 | 1 | 4 | 0.75 | 0.67 | 0.33 | 1 | 0.2 | 0.8

It is also possible to find the incidence rates (where we restrict to all ages, genders and start years):

    ir <- getIncidenceRates(
        connectionHandler = ConnectionHandler,
        schema = 'main',
        targetIds = 1
    )

    knitr::kable(
      x = ir %>% dplyr::filter(
        subgroupName == 'All' &
        ageGroupName == 'Any' &
        genderName == 'Any' &
        startYear == 'Any'
      ),
      caption = 'Example incidence rate results.'
      )

Table: Example incidence rate results.

databaseName | databaseId | targetName | targetId | outcomeName | outcomeId | tar | cleanWindow | subgroupName | ageGroupName | genderName | startYear | tarStartWith | tarStartOffset | tarEndWith | tarEndOffset | personsAtRiskPe | personsAtRisk | personDaysPe | personDays | personOutcomesPe | personOutcomes | outcomesPe | outcomes | incidenceProportionP100p | incidenceRateP100py
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
Synthea | 388020256 | Celecoxib | 1 | GI bleed | 3 | ( start + 0 ) - ( end + 0 ) | 9999 | All | Any | Any | Any | start | 0 | end | 0 | 1800 | 1800 | 1800 | 1800 | 0 | 0 | 0 | 0 | 0 | 0
Synthea | 388020256 | Celecoxib | 1 | GI bleed | 3 | ( start + 0 ) - ( start + 365 ) | 9999 | All | Any | Any | Any | start | 0 | start | 365 | 1800 | 1800 | 648214 | 540789 | 0 | 0 | 0 | 0 | 0 | 0

Finally, it is possible to get risk factors (associations between features and the occurrence of the outcome during a time-at-risk). The risk-factor functions now use characterization identifiers (for example `characterizationCaseId`) rather than only `targetId`/`outcomeId`:

    caseSettings <- getCharacterizationCaseSettings(
      connectionHandler = ConnectionHandler,
      schema = 'main',
      targetIds = 1,
      outcomeIds = 3
    )

    charCaseId <- caseSettings$characterizationCaseId[1]

    rf <- getBinaryRiskFactors(
        connectionHandler = ConnectionHandler,
        schema = 'main',
      characterizationCaseId = charCaseId
    )

    ## Warning: Parameter 'use_risk_window_start' not found in SQL

    ## Warning: Parameter 'risk_window_start' not found in SQL

    ## Warning: Parameter 'use_risk_window_end' not found in SQL

    ## Warning: Parameter 'risk_window_end' not found in SQL

    ## Warning: Parameter 'use_start_anchor' not found in SQL

    ## Warning: Parameter 'start_anchor' not found in SQL

    ## Warning: Parameter 'use_end_anchor' not found in SQL

    ## Warning: Parameter 'end_anchor' not found in SQL

    knitr::kable(
      x = rf,
      caption = 'Example risk factors for binary features results.'
      )

Table: Example risk factors for binary features results.

databaseName | databaseId | targetName | targetCohortId | minPriorObservation | limitToFirstInNDays | nestingCohortId | nestingName | minAge | maxAge | studyStart | studyEnd | genderConceptIds | outcomeName | outcomeCohortId | outcomeWashoutDays | riskWindowStart | startAnchor | riskWindowEnd | endAnchor | covariateId | covariateName | nonCaseCount | caseCount | nonCaseAverage | caseAverage | smd | absSmd
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---

and `getContinuousRiskFactors` for the continuous features:

    rf <- getContinuousRiskFactors(
        connectionHandler = ConnectionHandler,
        schema = 'main',
      characterizationCaseId = charCaseId
    )

    knitr::kable(
      x = rf,
      caption = 'Example risk factors for continuous features results.'
      )

Table: Example risk factors for continuous features results.

databaseName | databaseId | targetName | targetCohortId | minPriorObservation | limitToFirstInNDays | nestingCohortId | nestingName | minAge | maxAge | studyStart | studyEnd | genderConceptIds | outcomeName | outcomeCohortId | outcomeWashoutDays | riskWindowStart | startAnchor | riskWindowEnd | endAnchor | covariateId | covariateName | targetCountValue | caseCountValue | targetMinValue | caseMinValue | targetMaxValue | caseMaxValue | targetAverageValue | caseAverageValue | targetMedianValue | caseMedianValue | targetP10Value | caseP10Value | targetP25Value | caseP25Value | targetP75Value | caseP75Value | targetP90Value | caseP90Value | targetStandardDeviation | caseStandardDeviation | smd | absSmd
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---

## Extracting Prediction Results

The model designs used to develop prediction models in an analysis can be extracted using `getPredictionModelDesigns`:

    modelDesigns <- getPredictionModelDesigns(
        connectionHandler = ConnectionHandler,
        schema = 'main',
        targetIds = 1002,
        outcomeIds = 3
    )

    knitr::kable(
      x = modelDesigns %>%
        dplyr::select(
          "modelDesignId",
          "modelType",
          "developmentTargetId",
          "developmentTargetName",
          "developmentOutcomeId",
          "developmentOutcomeName",
          "timeAtRisk"
        ),
      caption = 'Example model designs for the prediction results.'
      )

Table: Example model designs for the prediction results.

modelDesignId | modelType | developmentTargetId | developmentTargetName | developmentOutcomeId | developmentOutcomeName | timeAtRisk
--- | --- | --- | --- | --- | --- | ---
1 | logistic | 1002 | Celecoxib - first event with 365 prior obs first event with 365 prior obs | 3 | GI bleed | (cohort start + 1) - (cohort start + 365)

Once you know the modelDesignId of interest, you can then extract the model performance:

    perform <- getFullPredictionPerformances(
        connectionHandler = ConnectionHandler,
        schema = 'main',
        modelDesignId = 1
    )

    knitr::kable(
      x = perform,
      caption = 'Example performance for the prediction results.'
      )

Table: Example performance for the prediction results.

performanceId | modelDesignId | timeStamp | modelType | covariateName | algorithmName | developmentDatabaseId | validationDatabaseId | developmentTargetId | developmentTargetName | validationTargetId | validationTargetName | developmentOutcomeId | developmentOutcomeName | validationOutcomeId | validationOutcomeName | developmentDatabase | validationDatabase | validationTarId | developmentTarId | devTarStartDay | devTarStartAnchor | devTarEndDay | devTarEndAnchor | validationTimeAtRisk | developmentTimeAtRisk | evaluation | populationSize | outcomeCount | AUROC | 95% lower AUROC | 95% upper AUROC | AUPRC | brier score | brier score scaled | Eavg | E90 | Emax | calibrationInLarge mean prediction | calibrationInLarge observed risk | calibrationInLarge intercept | weak calibration intercept | weak calibration gradient | Hosmer-Lemeshow calibration intercept | Hosmer-Lemeshow calibration gradient | Average Precision
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
1 | 1 | 2025-02-13 | logistic | getDbDefaultCovariateData (29 types) inc age and sex | logistic | 1 | 1 | 1002 | Celecoxib - first event with 365 prior obs first event with 365 prior obs | 1002 | - | 3 | GI bleed | 3 | - | Synthea | - | 1 | 1 | 1 | cohort start | 365 | cohort start | (cohort start + 1) - (cohort start + 365) | (cohort start + 1) - (cohort start + 365) | Test | 449 | 88 | 0.6885703 | 0.6264985 | 0.7506421 | 0.3085693 | 0.1469204 | 0.0720927 | 0.0318938 | 0.0650422 | 0.1390867 | 0.1972381 | 0.1959911 | 0.0976443 | 0.0976443 | 1.081961 | 0.0150102 | 0.9957815 | 0.3141461
1 | 1 | 2025-02-13 | logistic | getDbDefaultCovariateData (29 types) inc age and sex | logistic | 1 | 1 | 1002 | Celecoxib - first event with 365 prior obs first event with 365 prior obs | 1002 | - | 3 | GI bleed | 3 | - | Synthea | - | 1 | 1 | 1 | cohort start | 365 | cohort start | (cohort start + 1) - (cohort start + 365) | (cohort start + 1) - (cohort start + 365) | Train | 1351 | 267 | 0.7091712 | 0.6750978 | 0.7432446 | 0.3665755 | 0.1451619 | 0.0845800 | 0.0211919 | 0.0365588 | 0.0525081 | 0.1976328 | 0.1976314 | 0.2335147 | 0.2335147 | 1.181563 | -0.0358802 | 1.1620115 | 0.3702857
1 | 1 | 2025-02-13 | logistic | getDbDefaultCovariateData (29 types) inc age and sex | logistic | 1 | 1 | 1002 | Celecoxib - first event with 365 prior obs first event with 365 prior obs | 1002 | - | 3 | GI bleed | 3 | - | Synthea | - | 1 | 1 | 1 | cohort start | 365 | cohort start | (cohort start + 1) - (cohort start + 365) | (cohort start + 1) - (cohort start + 365) | CV | 1351 | 267 | 0.6818760 | 0.6457077 | 0.7180443 | 0.3151896 | 0.1490119 | 0.0586252 | 0.0265908 | 0.0447049 | 0.2297922 | 0.1971663 | 0.1976314 | 0.0905528 | 0.0905528 | 1.066780 | -0.0116256 | 1.0545190 | 0.3196781

As well as the top predictors, in this case we will return the top 5:

    top5 <- getPredictionTopPredictors(
        connectionHandler = ConnectionHandler,
        schema = 'main',
        targetIds = 1002,
        outcomeIds = 3,
        numberPredictors = 5
    )

    knitr::kable(
      x = top5 ,
      caption = 'Example top five predictors.'
      )

Table: Example top five predictors.

databaseName | tarStartDay | tarStartAnchor | tarEndDay | tarEndAnchor | performanceId | covariateId | covariateName | conceptId | covariateValue | covariateCount | covariateMean | covariateStDev | withNoOutcomeCovariateCount | withNoOutcomeCovariateMean | withNoOutcomeCovariateStDev | withOutcomeCovariateCount | withOutcomeCovariateMean | withOutcomeCovariateStDev | standardizedMeanDiff | rn
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
Synthea | 1 | cohort start | 365 | cohort start | 1 | 1901 | Charlson index - Romano adaptation | 0 | 1.4448410 | 935 | 0.6144444 | 0.6533777 | 660 | 0.5307958 | 0.6301972 | 275 | 0.9549296 | 0.6352971 | 0.6702998 | 1
Synthea | 1 | cohort start | 365 | cohort start | 1 | 4266809210 | condition_era group (ConditionGroupEraLongTerm) during day -365 through 0 days relative to index: Diverticular disease | 4266809 | 0.5045103 | 338 | 0.1877778 | 0.3905346 | 210 | 0.1453287 | 0.3524320 | 128 | 0.3605634 | 0.4801640 | 0.5110418 | 2
Synthea | 1 | cohort start | 365 | cohort start | 1 | 4285898212 | condition_era group (ConditionGroupEraShortTerm) during day -30 through 0 days relative to index: Polyp of colon | 4285898 | 0.4321971 | 28 | 0.0155556 | 0.1237481 | 13 | 0.0089965 | 0.0944225 | 15 | 0.0422535 | 0.2011670 | 0.2116439 | 3
Synthea | 1 | cohort start | 365 | cohort start | 1 | 2007 | index month: 2 | 0 | -0.2439688 | 124 | 0.0688889 | 0.2532651 | 104 | 0.0719723 | 0.2584421 | 20 | 0.0563380 | 0.2305733 | -0.0638383 | 4
Synthea | 1 | cohort start | 365 | cohort start | 1 | 6007 | index month: 6 | 0 | -0.1786601 | 144 | 0.0800000 | 0.2712932 | 122 | 0.0844291 | 0.2780302 | 22 | 0.0619718 | 0.2411044 | -0.0862999 | 5

You can also select certain results such as the attrition:

    attrition <- getPredictionPerformanceTable(
        connectionHandler = ConnectionHandler,
        schema = 'main',
        table = 'attrition',
        performanceId = 1
    )

    knitr::kable(
      x = attrition ,
      caption = 'Example prediction attrition for performance 1.'
      )

Table: Example prediction attrition for performance 1.

modelDesignId | developmentDatabaseId | developmentDatabaseName | validationDatabaseId | validationDatabaseName | targetId | outcomeId | tarId | performanceId | outcomeId | description | targetCount | uniquePeople | outcomes
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
1 | 1 | Synthea | 1 | Synthea | 1 | 2 | 1 | 1 | 3 | Original cohorts | 1800 | 1800 | 355
1 | 1 | Synthea | 1 | Synthea | 1 | 2 | 1 | 1 | 3 | Initial plpData cohort or population | 1800 | 1800 | 355
1 | 1 | Synthea | 1 | Synthea | 1 | 2 | 1 | 1 | 3 | No prior outcome | 1800 | 1800 | 355
1 | 1 | Synthea | 1 | Synthea | 1 | 2 | 1 | 1 | 3 | Removing non-outcome subjects with insufficient time at risk (if any) | 1800 | 1800 | 355

## Extracting Estimation Results

It is possible to extract cohort method and self controlled case series results and make nice plots.

To extract all the cohort method estimations for target id 1002 and outcome 3:

    cmEst <- getCMEstimation(
        connectionHandler = ConnectionHandler,
        schema = 'main',
        targetIds = 1002,
        comparatorIds = 2002,
        outcomeIds = 3
    )

    knitr::kable(
      x = cmEst ,
      caption = 'Example cohort method estimation results.'
      )

Table: Example cohort method estimation results.

databaseName | databaseId | analysisId | description | targetComparatorId | targetName | targetId | comparatorName | comparatorId | indicationName | indicationId | outcomeName | outcomeId | calibratedRr | calibratedCi95Lb | calibratedCi95Ub | calibratedP | calibratedOneSidedP | calibratedLogRr | calibratedSeLogRr | targetSubjects | comparatorSubjects | targetDays | comparatorDays | targetOutcomes | comparatorOutcomes | unblind | unblindForEvidenceSynthesis | targetEstimator
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
Synthea | 388020256 | 1 | No matching, simple outcome model | -927689127 | Celecoxib - first event with 365 prior obs first event with 365 prior obs | 1002 | Diclofenac - first event with 365 prior obs first event with 365 prior obs | 2002 | NA | 0 | GI bleed | 3 | 1.342495 | 1.097514 | 1.653167 | 0.0048267 | 0.0024133 | 0.29453 | 0.1045033 | 1793 | 830 | 539527 | 261005 | 353 | 124 | 1 | 1 | ate
Synthea | 388020256 | 2 | Matching on ps and covariates, simple outcomeModel | -927689127 | Celecoxib - first event with 365 prior obs first event with 365 prior obs | 1002 | Diclofenac - first event with 365 prior obs first event with 365 prior obs | 2002 | NA | 0 | GI bleed | 3 | NA | NA | NA | NA | NA | NA | NA | 830 | 830 | 267053 | 261005 | 108 | 124 | 0 | 0 | att

You can also extract any meta-analysis estimate for cohort method:

    cmMe <- getCmMetaEstimation(
        connectionHandler = ConnectionHandler,
        schema = 'main'
    )

    knitr::kable(
      x = cmMe ,
      caption = 'Example cohort method meta analysis estimation results.'
      )

Table: Example cohort method meta analysis estimation results.

databaseName | analysisId | description | targetName | targetId | comparatorName | comparatorId | indicationName | indicationId | outcomeName | outcomeId | calibratedRr | calibratedCi95Lb | calibratedCi95Ub | calibratedP | calibratedOneSidedP | calibratedLogRr | calibratedSeLogRr | targetSubjects | comparatorSubjects | targetDays | comparatorDays | targetOutcomes | comparatorOutcomes | unblind | nDatabases | pi95Lb | pi95Ub | calibratedPi95Lb | calibratedPi95Ub | tau | i2
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---

and you can create a nice plot to show the results:

    plotCmEstimates(
      cmData = cmEst,
      cmMeta = NULL,
      cohortNames = data.frame(
        cohortName = c('Example Target', 'Example Comp'),
        cohortId= c(1002,2002)
      ),
      selectedAnalysisId = 1
    )

    ## refline_col will be deprecated, use refline_gp instead.

    ## footnote_col will be deprecated, use footnote_gp instead.

    ## $`Example Target-GI bleed-NA`