generateDbSummary can be run after the Achilles analyses are complete to create a high-level database summary.

generateDbSummary(
  connectionDetails,
  cdmDatabaseSchema,
  resultsDatabaseSchema,
  country,
  provenance
)

Arguments

connectionDetails

An R object of type connectionDetails created using the function createConnectionDetails in the DatabaseConnector package.

cdmDatabaseSchema

Fully qualified name of database schema that contains OMOP CDM schema. On SQL Server, this should specifiy both the database and the schema, so for example, on SQL Server, 'cdm_instance.dbo'.

resultsDatabaseSchema

Fully qualified name of database schema that we can write final results to. Default is cdmDatabaseSchema. On SQL Server, this should specifiy both the database and the schema, so for example, on SQL Server, 'cdm_results.dbo'.

country

The country of origin of the database

provenance

The provenance of the data (EHR, claims, registry, etc)

Value

none

Details

Used to generate a high-level database summary consisting of earliest date available, latest date available, median age at first observation, total persons, etc. This function creates a summary table meant for a manuscript detailing the network of databases used in an analysis

Examples

if (FALSE) {
connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = "sql server",
                                                                server = "yourserver")
dbSummary <- generateDbSummary(connectionDetails,
                               cdmDatabaseSchema = "cdm_schema",
                               resultsDatabaseSchema = "results_schema",
                               country = "Country of Origin",
                               provenance = "Provenance of data")
}