Skip to content

Commit

Permalink
Updating LEGEND apps to new DatabaseConnector interface
Browse files Browse the repository at this point in the history
  • Loading branch information
schuemie committed Apr 26, 2021
1 parent 088926b commit c377681
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions LegendBasicViewer/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ connectionDetails <- createConnectionDetails(dbms = "postgresql",
sep = "/"),
port = Sys.getenv("shinydbPort"),
user = Sys.getenv("shinydbUser"),
password = Sys.getenv("shinydbPw"),
schema = Sys.getenv("shinydbSchema"))
password = Sys.getenv("shinydbPw"))

connection <- connect(connectionDetails)

renderTranslateExecuteSql(connection, "USE @schema;", schema = Sys.getenv("shinydbSchema"))

indications <- getIndications(connection)
exposures <- getExposures(connection)
exposures$exposureGroup[exposures$exposureGroup == "Drug" | exposures$exposureGroup == "Procedure"] <- "Drug or procedure"
Expand Down
4 changes: 2 additions & 2 deletions LegendMedCentral/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ connectionDetails <- createConnectionDetails(dbms = "postgresql",
sep = "/"),
port = Sys.getenv("shinydbPort"),
user = Sys.getenv("shinydbUser"),
password = Sys.getenv("shinydbPw"),
schema = Sys.getenv("shinydbSchema"))
password = Sys.getenv("shinydbPw"))
connection <- connect(connectionDetails)
renderTranslateExecuteSql(connection, "USE @schema;", schema = Sys.getenv("shinydbSchema"))
indications <- getIndications(connection)
exposures <- getExposures(connection)
exposures$exposureGroup[exposures$exposureGroup == "Drug" | exposures$exposureGroup == "Procedure"] <- "Drug or procedure"
Expand Down

0 comments on commit c377681

Please sign in to comment.