extractDemographics: Extract demographics

Description Usage Arguments Value

View source: R/extractDemographics.R

Description

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

Usage

1
extractDemographics(connection, patients = NULL, n = -1)

Arguments

connection

ODBC connection object returned by dbConnect.

patients

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

n

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

Value

Returns a data frame with patient demographics from the Diamonds database. PatientAge and PatientAgeGroup are added columns calculated from today's date. RacialGroup column is also added which aggregates similar races into a single group.


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