exportToJson.Rd
exportToJson
Exports Achilles statistics into a JSON form for reports.
exportToJson(
connectionDetails,
cdmDatabaseSchema,
resultsDatabaseSchema,
outputPath,
reports = getAllReports(),
vocabDatabaseSchema = cdmDatabaseSchema,
compressIntoOneFile = FALSE
)
An R object of type ConnectionDetail (details for the function that contains server info, database type, optionally username/password, port)
Name of the database schema that contains the OMOP CDM.
Name of the database schema that contains the Achilles analysis files. Default is cdmDatabaseSchema
A folder location to save the JSON files. Default is current working folder
A character vector listing the set of reports to generate. Default is all reports.
string name of database schema that contains OMOP Vocabulary. Default is cdmDatabaseSchema. On SQL Server, this should specifiy both the database and the schema, so for example 'results.dbo'.
Boolean indicating if the JSON files should be compressed into one
zip file. Please note that in Windows, the zip application must be
stored in the system environment, e.g. Sys.setenv("R_ZIPCMD",
"some_path_to_zip"). Due to recursion, the actual Achilles files and
folders will be embedded in any parent directories that the source
folder has. See showReportTypes
for a list of all report types
none
Creates individual files for each report found in Achilles.Web
if (FALSE) {
connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server",
server = "yourserver")
exportToJson(connectionDetails, cdmDatabaseSchema = "cdm4_sim", outputPath = "your/output/path")
}