ehr_extract: Extract observations/test results from raw EHR data

Description Usage Arguments Value

Description

Extracts values from linked EHR data. Data is extracted from the value1 field with the exception of data provider 2 where values are extracted from value2 if value1 is empty. Units are taken from value3 for data provider 2 (otherwise units are unavailable). NA, zero and duplicate values are dropped.

Usage

1
ehr_extract(ehr_data, read_codes)

Arguments

ehr_data

Data table/frame with UK Biobank clinical event data i.e. gp_clinical.txt.

read_codes

Values are extracted from these codes. Data table/frame with Read v2 (read_2) and CTV3 (read_3) columns.

Value

Data table with value and unit columns.


philipdarke/ukbbhelpr documentation built on Dec. 22, 2021, 7:49 a.m.