tidy_gp_scripts | R Documentation |
Reformats the UK Biobank primary care prescriptions dataset to match the
output format for tidy_clinical_events
.
tidy_gp_scripts(gp_scripts, .details_only = FALSE)
gp_scripts |
The UK Biobank primary care prescriptions dataset |
.details_only |
logical. If |
The UK Biobank primary care prescriptions data has multiple code columns
(Read, BNF and DMD codes). This function reshapes the data to long format so
that all codes are in a single column. The index
column values relate
to row numbers in the original data.
The primary care data also contains drug name and quantities columns. The clinical codes/dates in long format and drug name/quantity columns are both returned in a list under the names 'clinical_events' and 'gp_scripts_names_and_quantities' respectively.
A named list. Item 'clinical_events' contains the read codes with event dates, and item 'gp_scripts_names_and_quantities' contains the drug names/quantities columns.
By default, special date values (see
resource 591 for
further details) are set to NA
.
tidy_clinical_events
,
make_clinical_events_db
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.