calculateMappingStatus
calculateMappingStatus.Rd
Calculates the mapping status for code counts in different databases and vocabularies.
Usage
calculateMappingStatus(
pathToCodeCountsFolder,
connectionDetails,
vocabularyDatabaseSchema,
includeCountForAllDatabases = TRUE,
skipValidation = TRUE
)
Arguments
- pathToCodeCountsFolder
The path to the vocabularies coverage file.
- connectionDetails
The connection details for the OMOP tables.
- vocabularyDatabaseSchema
The database schema for the OMOP vocabulary.
- includeCountForAllDatabases
Logical value indicating whether to include code counts for all databases (default is TRUE).
- skipValidation
Logical value indicating whether to skip validation of the input parameters (default is TRUE).
Value
A list containing two tables: concepts_to_match
and code_counts_matched
, representing the mapping status for code counts.
Details
This function calculates the mapping status for code counts in different databases and vocabularies. The calculation involves the following steps:
Validating the input parameters to ensure they meet the required format.
Reading and validating the provided vocabularies coverage file.
Creating a table called
concepts_to_match
that collects concepts in OMOP with mapping relationships and synonyms.Creating a table called
all_code_counts
that contains all code counts in the vocabularies coverage, optionally ignoring databases with failed rules.Creating a new database called "all_databases" with normalized event counts across all databases.
Calculating the percentage of codes per database and vocabulary.
Calculating the mapping status for code counts based on whether they have mappings and codes.
Returning the mapping status information in the form of two tables:
concepts_to_match
andcode_counts_matched
.