ctsit / redcapcustodian

Simplified, automated data management on REDCap systems
Other
12 stars 6 forks source link

Use parameters in get_hipaa_disclosure_log_from_ehr_fhir_logs.R #162

Open pbchase opened 5 days ago

pbchase commented 5 days ago

@saipavan10-git, please add better test data and tests

pbchase commented 5 days ago

Consider reading the FHIR logs like this:

redcap_ehr_fhir_logs <- dplyr::tbl(conn, "redcap_ehr_fhir_logs") |>
  dplyr::filter(.data$resource_type == "Patient" &
                  .data$mrn != "") |>
  head(n = 30) |>
  dplyr::collect()

Then mutate ehr_id and created_at to the mix of values you need for testing the parameters