OHDSI / CohortDiagnostics

An R package for performing various cohort diagnostics.
https://ohdsi.github.io/CohortDiagnostics
40 stars 45 forks source link

CohortDiagnostics - R Shiny app does not generate any results when generate table is selected under cohort characterization #1052

Open ssivarama opened 1 year ago

ssivarama commented 1 year ago

Hi,

After launching the R shiny app using launchDiagnosticsExplorer, when I click on the generate table from the cohort characterization tab, I am seeing the following error

Warning: Error in rJava::.jcall: RcallMethod: cannot determine object class 166: rJava::.jcall 165: supportsJava8 164: SqlRender::render 163: renderTranslateQuerySql [R/ResultRetrieval.R#11] 162: getResultsTemporalTimeRef [R/ResultRetrieval.R#1192] 161: getCharacterizationOutput [R/ResultRetrieval.R#215] 160: [R/CharacterizationModule.R#423] 144: characterizationOutput 143: eventReactiveValueFunc [R/CharacterizationModule.R#482] 99: cohortCharacterizationPrettyTable 98: :: htmlwidgets shinyRenderWidget [R/CharacterizationModule.R#557] 97: func 84: renderFunc 83: output$DiagnosticsExplorer-characterization-characterizationTable 2: shiny::runApp 1: CohortDiagnostics::launchDiagnosticsExplorer rshiny_app_characterization_error

Can you please help in resolving this issue. Thanks.

azimov commented 1 year ago

I'm wondering if this is a data model problem. Did you run in to any issues when generating either the results schema or the results themselves?

ssivarama commented 1 year ago

I didn't see any errors while generating the results. I could see the counts in the Cohort Counts section.

azimov commented 1 year ago

Does this issue persist if you update to the latest verion of cohort diagnostics/OhdsiShinyModules:

remotes::install_github("ohdsi/CohortDiagnostics")
remotes::install_github("ohdsi/OhdsiShinyModules")
# RESTART R session here!
CohortDiagnostics::launchDiagnosticsExplorer()
carmenOT commented 11 months ago

Hi @azimov, I have the latest versions of both packages and there were no errors when executing CohortDiagnostics. I still have the same issue as reported here. @ssivarama, could you please share whether you solved the issue?

azimov commented 11 months ago

@carmenOT are you using an sqlite database or postgres to host your results? This might be an issue with an underlying library but its hard to tell from this error message

carmenOT commented 11 months ago

It's Postgres (Redshift), I am using the Diagnostics Explorer with the following functions:

createMergedResultsFile("C:/temp/allZipFiles", sqliteDbPath = "MyCohortDiagnosticsResulst.sqlite")

launchDiagnosticsExplorer(sqliteDbPath = "MyCohortDiagnosticsResulst.sqlite")

Do you think I should use something different? @azimov

azimov commented 11 months ago

@carmenOT this is difficult to diagnose.

The output of this tab has been changed significantly in the development release of our shiny package

Trying

remotes::install_github("ohdsi/ohdsiShinyModules", ref="develop")

May help (or at least produce a different error)

lluo0 commented 11 months ago

Hi @azimov, I have the same error too, after reinstalling the latest and developer version of both packages.

Here's a more detailed error message if that helps:

launchDiagnosticsExplorer(sqliteDbPath = normalizePath('cohortdiagnostics_marketscan/MyResults.sqlite', winslash = "/", mustWork = NA)) # the sqlite file should be in the data folder if running on Rstudio
Loading required package: shiny
Connecting using SQLite driver

Listening on http://127.0.0.1:5406
Warning: Navigation containers expect a collection of `bslib::nav()`/`shiny::tabPanel()`s and/or `bslib::nav_menu()`/`shiny::navbarMenu()`s. Consider using `header` or `footer` if you wish to place content above (or below) every panel's contents.
Warning: Error in rJava::.jcall: RcallMethod: cannot determine object class                                                                                                                                                                                                             
  165: eval_tidy
  164: tibble_quos
  163: dplyr::tibble
  162: tidyr::replace_na
  160: <reactive>
  144: getPrettyCharacterizationData
  143: eventReactiveValueFunc
   99: cohortCharacterizationPrettyTable
   98: ::
htmlwidgets
shinyRenderWidget
   97: func
   84: renderFunc
   83: output$DiagnosticsExplorer-characterization-characterizationTable
    2: shiny::runApp
    1: launchDiagnosticsExplorer
<pool> Failed to activate and/or validate existing object.
<pool> Trying again with a new object.
Connecting using SQLite driver
Warning: Error in rJava::.jcall: RcallMethod: cannot determine object class
  146: <Anonymous>
  145: stop
  144: getPrettyCharacterizationData
  143: eventReactiveValueFunc
   99: cohortCharacterizationPrettyTable
   98: ::
htmlwidgets
shinyRenderWidget
   97: func
   84: renderFunc
   83: output$DiagnosticsExplorer-characterization-characterizationTable
    2: shiny::runApp
    1: launchDiagnosticsExplorer
ssivarama commented 11 months ago

@azimov Apologies for the delayed response. I initially had CohortDiagnostics 3.1.2 when I initially posted the issue. Based on your comments, I updated it to 3.2.3 but still the issue persists. The OMOP CDM data is on AWS Redshift. I am seeing the same error as posted by @lluo0 after installing the developer version.