rcprd0.0.2 package

Extraction and Management of Clinical Practice Research Datalink Data

add_to_database

Adds a single .txt file to an SQLite database on the hard disk.

combine_query_boolean.aurum

Combine a CPRD aurum database query with a cohort returning a 0/1 vect...

combine_query_boolean

Combine a database query with a cohort returning a 0/1 vector dependin...

combine_query.aurum

Combine a CPRD aurum database query with a cohort.

combine_query

Combine a database query with a cohort.

connect_database

Open connection to SQLite database

cprd_extract

Adds all the .txt files in a directory, with certain file names, to an...

create_directory_system

Create the appropriate directory system to be able to run functions wi...

db_query

Query an RSQLite database.

delete_directory_system

Deletes directory system created by delete_directory_system

extract_bmi

Extract most recent BMI score relative to an index date.

extract_cholhdl_ratio

Extract most recent total cholesterol/high-density lipoprotein ratio s...

extract_cohort

Create cohort from patient files

extract_diabetes

Extract diabetes status prior to an index date.

extract_ho

Extract a 'history of' type variable

extract_practices

Combine practice files

extract_smoking

Extract smoking status prior to index date.

extract_test_data_var

Extract standard deviation of all test data values over a specified ti...

extract_test_data

Extract test data.

extract_test_recent

Extract test data.

extract_time_until

Extract a 'time until' type variable

extract_txt_char

Read in txt file with all colClasses = "character"

extract_txt_cons

Read in raw .txt consultation file

extract_txt_death

Read in raw ONS death data file

extract_txt_drug

Read in raw .txt drugissue file

extract_txt_hes_primary

Read in raw HES primary diagnoses file

extract_txt_linkage

Read in linkage eligibility file

extract_txt_obs

Read in raw .txt observation file

extract_txt_pat

Read in raw .txt patient file

extract_txt_prac

Read in raw .txt practice file

extract_txt_prob

Read in raw .txt problem file

extract_txt_ref

Read in raw .txt referral file

implement_output

Internal function to implement saving extracted variable to disk or re...

rcprd-package

rcprd: Extraction and Management of Clinical Practice Research Datalin...

Simplify the process of extracting and processing Clinical Practice Research Datalink (CPRD) data in order to build datasets ready for statistical analysis. This process is difficult in 'R', as the raw data is very large and cannot be read into the R workspace. 'rcprd' utilises 'RSQLite' to create 'SQLite' databases which are stored on the hard disk. These are then queried to extract the required information for a cohort of interest, and create datasets ready for statistical analysis. The processes follow closely that from the 'rEHR' package, see Springate et al., (2017) <doi:10.1371/journal.pone.0171784>.