Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add location and caresite support #177 #181

Merged
merged 7 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions R/CreateVocabMapTables.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' \code{DatabaseConnector} package.
#' @param cdmSchema The name of the database schema that will contain the Vocab mapping
#' tables. Requires read and write permissions to this database. On SQL
#' Server, this should specifiy both the database and the schema,
#' Server, this should specify both the database and the schema,
#' so for example 'cdm_instance.dbo'.
#' @param cdmVersion The version of your CDM. Currently "5.3" and "5.4" are supported.
#' @param sqlOnly A boolean that determines whether or not to perform the load or generate SQL scripts. Default is FALSE.
Expand All @@ -33,7 +33,8 @@ CreateVocabMapTables <-
queries <-
c(
"create_source_to_standard_vocab_map.sql",
"create_source_to_source_vocab_map.sql"
"create_source_to_source_vocab_map.sql",
"create_states_map.sql"
)

if (!sqlOnly) {
Expand Down
22 changes: 22 additions & 0 deletions R/LoadEventTables.r
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,28 @@ LoadEventTables <- function(connectionDetails,
}
}

# location
fileQuery <- "insert_location.sql"
sql <- SqlRender::loadRenderTranslateSql(
sqlFilename = file.path(sqlFilePath, fileQuery),
packageName = "ETLSyntheaBuilder",
dbms = connectionDetails$dbms,
cdm_schema = cdmSchema,
synthea_schema = syntheaSchema
)
runStep(sql, fileQuery)

# care_site
fileQuery <- "insert_care_site.sql"
sql <- SqlRender::loadRenderTranslateSql(
sqlFilename = file.path(sqlFilePath, fileQuery),
packageName = "ETLSyntheaBuilder",
dbms = connectionDetails$dbms,
cdm_schema = cdmSchema,
synthea_schema = syntheaSchema
)
runStep(sql, fileQuery)

# person
fileQuery <- "insert_person.sql"
sql <- SqlRender::loadRenderTranslateSql(
Expand Down
20 changes: 13 additions & 7 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions docs/articles/Condition_occurrence.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions docs/articles/Cost.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 16 additions & 9 deletions docs/articles/Device_exposure.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions docs/articles/Drug_exposure.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions docs/articles/Measurement.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading