OHDSI / OhdsiShinyModules

An R package containing Shiny modules used by various OHDSI Shiny apps
https://ohdsi.github.io/OhdsiShinyModules/
8 stars 11 forks source link

Add an export button to get csv for any table #196

Closed gowthamrao closed 2 months ago

gowthamrao commented 1 year ago

In all shiny app output, i think it would be useful to have an export button that outputs the table as a csv. e.g. in cohort diagnostics resolved concepts - does not have an export button.

image

nhall6 commented 1 year ago

@jreps @azimov When using the components-data-viewer standard reactable table output, we accomplish this with the "Download All" and "Download Filtered" buttons. But my question is - in the modules you both have been focusing on, do all result tables now conform to this standard, or are there still some tables (whether intermediary or not) that are not downloadable (e.g. are all result tables inside of CD downloadable? In the PLP module, etc.?_

azimov commented 1 year ago

There is a lot of customization in the CD tables that makes converting them all to the standard not possible or not worth it. I think some tables can be converted (or removed alltogether, like the counts which is already included in 2 other places)

The tables that will not easily be converted:

Other tables in CD should be relatively easy to convert one by one and then get the standard features included.

On a side note. I would also like to see the removal of Incidence within CD altogether and use a single codebase but this will take some work as there is no notion of a "target" or "outcome" in cohort diagnostics so it would need to be an "all by all" analysis which should be possible if the package is optimized.

nhall6 commented 1 year ago

There is a lot of customization in the CD tables that makes converting them all to the standard not possible or not worth it. I think some tables can be converted (or removed alltogether, like the counts which is already included in 2 other places)

The tables that will not easily be converted:

  • Characterization/CompareCharacterization
  • Cohort Definitions as this uses a lot of custom input selects
  • Cohort Overlap

Other tables in CD should be relatively easy to convert one by one and then get the standard features included.

On a side note. I would also like to see the removal of Incidence within CD altogether and use a single codebase but this will take some work as there is no notion of a "target" or "outcome" in cohort diagnostics so it would need to be an "all by all" analysis which should be possible if the package is optimized.

Re: removing incidence from CD, I think this is a good idea, and perhaps we can add options/a tab to the existing Incidence module in Characterization that does not require a T and an O.

jreps commented 2 months ago

We have a component for creating tables that has a download button but some cohort diagnostics tables are not using it. These tables have their own download button.