avg_sbp_visits: Average Systolic Blood Pressures and Visit Information

Description Usage Arguments Value Examples

Description

This function allows you to find average SBP, DBP, and number of visits per month for patients in addition to calculating total number of visits.

Usage

1
2
avg_sbp_visits(df, birth_date_var, pat_mrn, pcp_var, enc_date_var, sbp_var,
  dbp_var, age_var)

Arguments

df

EHR dataset which has had dates properly formatted by format_ehr_date function

birth_date_var

The variable name which includes information pertaining to birthdate

pat_mrn

The variable name which includes the Patient MRN information

pcp_var

The variable name which includes the names of the PCP's

enc_date_var

The variable name which includes information pertaining to visit/encounter dates

sbp_var

The variable name which includes information pertaining to systolic blood pressure

dbp_var

The variable name which includes information pertaining to diastolic blood pressure

age_var

The variable name which includes information pertaining to age

Value

A data frame with several newly derived variables related to sbp and number of visits

Examples

1
2
3
4
5
6
## Not run: 
average_sbp(df, birth_date_var = Birth.Date, pat_mrn = Patient.MRN, pcp_var = Patient.PCP,
enc_date_var = Encounter.Date, sbp_var = Systolic.BP, dbp_var = Diastolic.BP,
age_var = age_at_last_encounter)

## End(Not run)

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