Skip to contents

Reads the clinically assured Read V2 and CTV3 to SNOMED CT mapping tables from the NHS Data Migration release and adds them to the active CodeMiner database. This is a convenience wrapper around read_nhs_data_migration() that automatically calls add_mapping_table() for each table.

Usage

add_nhs_data_migration(
  path = get_nhs_data_migration(),
  tables = c("ctv3sctmap2", "rcsctmap2"),
  version = NULL,
  source =
    "https://isd.digital.nhs.uk/trud/users/guest/filters/0/categories/9/items/9/releases"
)

Arguments

path

Path to the NHS Data Migration release (zip file or unzipped directory). Default uses get_nhs_data_migration() to download the file.

tables

Character vector of table names to add. See read_nhs_data_migration() for available tables. By default, adds both tables.

version

Character string for the version label. If NULL (default), derived from the zip file or directory name.

source

Character string for the data source URL or description.

Value

Invisibly returns the result from read_nhs_data_migration() (a named list of tables with metadata).

Examples

if (FALSE) { # \dontrun{
build_database(db_path = "my_codes.db")
add_nhs_data_migration()
add_nhs_data_migration(tables = "ctv3sctmap2")
} # }