Extraction and Management of Clinical Practice Research Datalink Data
Adds a single .txt file to an SQLite database on the hard disk.
Combine a CPRD aurum database query with a cohort returning a 0/1 vect...
Combine a database query with a cohort returning a 0/1 vector dependin...
Combine a CPRD aurum database query with a cohort.
Combine a database query with a cohort.
Open connection to SQLite database
Adds all the .txt files in a directory, with certain file names, to an...
Create the appropriate directory system to be able to run functions wi...
Query an RSQLite database.
Deletes directory system created by delete_directory_system
Extract most recent BMI score relative to an index date.
Extract most recent total cholesterol/high-density lipoprotein ratio s...
Create cohort from patient files
Extract diabetes status prior to an index date.
Extract a 'history of' type variable
Combine practice files
Extract smoking status prior to index date.
Extract standard deviation of all test data values over a specified ti...
Extract test data.
Extract test data.
Extract a 'time until' type variable
Read in txt file with all colClasses = "character"
Read in raw .txt consultation file
Read in raw ONS death data file
Read in raw .txt drugissue file
Read in raw HES primary diagnoses file
Read in linkage eligibility file
Read in raw .txt observation file
Read in raw .txt patient file
Read in raw .txt practice file
Read in raw .txt problem file
Read in raw .txt referral file
Internal function to implement saving extracted variable to disk or re...
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>.