has_seen_nephrologist: Find patients who have seen a nephrologist within specified...

Description Usage Arguments Value Examples

Description

This function allows you to create a dataframe which includes the Patient MRN and an indicator variable (returns 'Yes' for 'has_seen_neph') for all patients who have seen a nephrologist within a specified time period. This dataframe can then be merged with a summarized blood pressure data table (see wfbmcr::summarize_bp_dt' for data table creation and 'wfbmcr::merge_w_indicator' for merging)

Usage

1
has_seen_nephrologist(df, cutoff_date, num_years, enc_date_var, pat_mrn)

Arguments

df

Raw EHR dataset which includes blood pressure data

cutoff_date

End date of interest in month-day-4digityear format (ie. 11012018 is Nov 1, 2018)

num_years

Number of years to search back from cutoff_date

pat_mrn

The variable name which includes the Patient MRN information

Value

A data table listing Patient MRN and an indicator variable for nephrology visit

Examples

1
2
3
4
5
## Not run: 
has_seen_nephrologist(df, enc_date_var = CONTACT_DATE, cutoff_date, num_years = 1,
pat_mrn = PAT_MRN_ID)

## End(Not run)

jjwillard/wfbmcr documentation built on May 7, 2019, 9:21 p.m.