Skip to contents

Reads OPCS-4 files and adds the lookup and relationship tables to the active CodeMiner database. This is a convenience wrapper around read_opcs4_trud() that automatically calls add_lookup_table() and add_relationship_table().

Usage

add_opcs4_trud(
  path = get_opcs4_trud(),
  version = NULL,
  source = "https://isd.digital.nhs.uk/trud/"
)

Arguments

path

Path to the OPCS-4 release (zip file or unzipped directory). Default uses get_opcs4_trud() to download the latest release.

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_opcs4_trud() (a named list of tables with metadata).

Examples

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