Closed gowthamrao closed 1 year ago
@azimov i think, and please confirm with @leeevans
@leeevans has configured database and server as one system variable. as "server/database"
i.e. the database below is NULL, and both server and database is in the server. So the code will have to be intelligent to handle that.
store connection details with environment variables
Note - if dbms and port vars are unset in environment variables they will default to above connectionDetails settings
connectionEnvironmentVariables: dbms: ~ database: ~ server: ~ user: ~ password: ~ port: ~ extraSettings: ~
Another comment on same topic: i tried to deploy the shiny app on data.ohdsi.org as shown here
https://github.com/OHDSI/ShinyDeploy/blob/master/Phenotype_0002_AcutePancreatitis/config.yml#L15-L22
but am receiving this error message
Added to config readme
With the large size of CD output - we are more likely to need connection to remote db most of the time.
The configuration of connection will probably need a vignette, especially about how to support the various ways to manage secrets (keyring to sys.getenv).
Also - we probably need the following as defaults 1) Check if there is a local sqlite file in the data folder - if yes, use that the default with preference 1. 2) If not, and there is no other connection details -- attempt connecting to ohdsi postgres server as default - preference 2. i.e. in this case, we assume that the environment is the OHDSI Shiny server and the credentials are available to it using Sys.getenv. We might need to confirm the system global environment with @leeevans but i think they are
https://github.com/OHDSI/CohortDiagnostics/blob/befe0eb0e488fa8a4d308fed861cb03c64b67294/inst/shiny/DiagnosticsExplorer/global.R#L56-L64