Reformats the UK Biobank primary care clinical events dataset to match the
output format for tidy_clinical_events
.
Arguments
- gp_clinical
The UK Biobank primary care clinical events dataset
- .details_only
logical. If
TRUE
, return a character vector of output table names only
Value
A named list. Item 'clinical_events' contains the read codes with event dates, and item 'gp_clinical_values' contains the 'value' columns.
Details
The UK Biobank primary care clinical events data lists read codes in separate
columns, one for Read2 and one for Read3. 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 3 'value' columns. The clinical codes/dates in long format and 'value' columns are both returned in a list under the names 'clinical_events' and 'gp_clinical_values' respectively.
Other notes
By default, special date values (see
resource 591 for
further details) are set to NA
.