Due to Qualtrics' HCAHPs sampling engine, Memorial Hermann's Inpatient survey
is a master file containing responses for Inpatient, Pedi Inpatient, and
Inpatient Rehab (Inpatient Rehab was separated out to its own standing survey
in early 2022, but historical responses are duplicated across both the
Inpatient and Inpatient Rehab survey files). deduplicate_ip()
takes in a
tibble from fetch_surveys()
and removes duplicated responses from the
Inpatient file, using the encounter ID ("UNIQUE_ID"
) as the key.
Arguments
- .data
a tibble. The column
survey_name
must be present and include responses from the Inpatient, Pedaitric Inpatient, and Inpatient Rehab surveys.
Examples
if (FALSE) {
# pull in surveys from Qualtrics
surveys <-
c("Live - Inpatient",
"Live - Pediatric Inpatient",
"Live - Inpatient Rehab")
surveys <- fetch_surveys(surveys)
# deduplicate records
deduplicate_ip(surveys)
}