extractLabs: Extract labs

Description Usage Arguments Value

View source: R/extractLabs.R

Description

Extracts patient labs from the Diamonds database and returns a data frame.

Usage

1
2
extractLabs(connection, labs = NULL, patients = NULL, format = "raw",
  n = -1)

Arguments

connection

ODBC connection object returned by dbGetQuery.

labs

A character vector of lab test identifiers. Refer to the University of Washington Lab Medicine website to search of test codes (http://menu.labmed.washington.edu/oltg). If no limit is desired then set as NULL.

patients

A character vector of patient medical record numbers. If no limit is desired then set as NULL.

format

A character vector indicating the output format. Options include "raw", "byObservationId", "byDaysFromFirstObservation", or "byObservationDate".

n

Number of records to retrieve. Use n = -1 to retrieve all records.

Value

Returns a data frame with patient labs from the Diamonds database.


davidcoffey/Diamonds documentation built on March 8, 2020, 12:34 a.m.