combine patient contact log with survey response data

  • cohort: pts who received pro survey emails

  • added var:

    • pro_response: pts who completed pro survey (opt out pts also consider complete)

    • pts choose to opt out: survey_informed_consent_b_0 ==0

create_pv_response_dt(obi_dt, pro_survey_expired = FALSE)

Arguments

obi_dt

OBI nightly export data

pro_survey_expired

logical, if TRUE, only include patients who are after 12 weeks postpartum

Value

a data frame with variables: patientid, site_name, infant_dob_dt, complete_pro_survey_flg, survey_informed_consent_b_0

Details

this function read in pro survey data from

  • survey response: P:/OBI_abstracted_data/Current_Data/data/input/pro_6_week_postpartum.csv

  • contact log pts who received emails: P:/OBI_abstracted_data/Current_Data/data/input/contactlog.csv

Examples

if (FALSE) {
obi_dt <- read_current_data() |> 
  create_obi_cohort(limit_to_locked = FALSE) 
create_pv_response_dt(obi_dt) 
}