cc_from_file: This function will read a JSON file containing options used...

View source: R/core.R

cc_from_fileR Documentation

This function will read a JSON file containing options used to build a clinical dictionary object. This is used by subsequent functions to direct building and querying. For security reasons, for non-SQLite databases this function is preferred to cc_from_list, as this prevents usernames and passwords being included in source code.

Description

This function will read a JSON file containing options used to build a clinical dictionary object. This is used by subsequent functions to direct building and querying. For security reasons, for non-SQLite databases this function is preferred to cc_from_list, as this prevents usernames and passwords being included in source code.

Usage

cc_from_file(dict_type, json_file)

Arguments

dict_type

Clinical concept dictionary type. Currently supported are NHSReadV2, NHSReadV3, NHSICD10 and NHSSnomedCT

json_file

Location of JSON file containing options to use to create a clinical dictionary object

See Also

cc_from_list

Examples

## Not run: 
config_file<-paste0(system.file(package="clinconcept"),"/extdata/dictconfig.json"))
dict<-cc_from_file("NHSReadV3",config_file)

#clinical dictionary object then passed to other functions
...

# extdata/dictconfig.json file
 {
   "type":"sqlite"
   "dbname":"/path/to/sqlitedb.sqlite"
 }

## End(Not run)


rcfgroup/clinconcept documentation built on Nov. 12, 2022, 2:40 a.m.