This function has been deprecated in favour of a single function to
read all record-level data. Use bio_record()
to retrieve data.
Summarize/ inspect record-level data with bio_record_map()
.
Record-level information for COVID-19 testing. Only available if these data have been requested for the particular project you have access to.
bio_covid(project_dir, data = "results", covid_dir = "raw/", code_dir = "raw/")
Path to the enclosing directory of a UKB project.
A string specifying data required: "results", "misc", "tppscripts", "tppclinical", "emisscripts", "emisclinical", "codes".
Path to the enclosing directory of the covid19_results.txt
Path to the enclosing directory of the data coding files described in the UKB showcase notes under data field 40100.
Returns a dataframe of either the COVID-19 testing results,
blood group, or codes associated with fields in the results
dataframe, depending on the value of argument data
.
UKB showcase documentation for data field 40100 describes the categorical columns of the COVID-19 results dataframe as follows:
Coding 1853: COVID19 test locations. Locations/methods used to generate samples for COVID19 testing.
Coding 1854: Test result. Result of a binary test.
Coding 1855: Origin of test sample. Indicates where a participant was believed to be (or be doing) when their sample was taken.
Coding 1856: COVID19 testing laboratories. Laboratories performing tests for COVID19.
Coding 3311: Requesting organisation. Organisations responsible for requesting blood tests.
Coding 12: ACE boolean. True/False boolean value.
Coding 21: Yes No or Unknown. Artificial coding, generated after data collection.
The data
option returns various parts of the COVID-19 data:
"results" returns COVID-19 test results; "misc" returns blood group
extracted from imputed genotype; "tppscripts" and "emisscripts"
return information on the issuing of prescription medication for the
TPP and EMIS suppliers respectively; "tppclinical" and
"emisclinical" return data on primary care events, such as
consultations, diagnoses, history, symptoms, procedures, laboratory
tests and administrative information for the TPP and EMIS suppliers
respectively; "codes" returns the code meanings for the categorical
variables.
For details of the structure of the data, the various GP coding systems, and UKB categorical codes used for each variable see Resource 3151, Primary Care Data for COVID-19 Research.