write("Export SPA healthcare provider interview data and run corresponding quality checks", stderr())
spa_hcpi_data <- process_spa_hcpi_data(spa_hcpi_data) n_raw_spa_hcpi_data <- nrow(spa_hcpi_data) db_name <- "SPA healthcare provider interview"
There are r n_raw_spa_hcpi_data
records in the raw r db_name
database.
r qc_spa_hcpi_nonvalid_ids
]\n\nqc_description <- "Healthcare providers who are interviewed as part of the SPA should have been observed during their consultation. If there is no observation recorded for a provider, their ID is considered as non-valid." qc_rule <- "Keep only records for which the healthcare provider ID (X-Fxxxx-Hxx) has been found in the locked SPA sick child observation database." qc_type <- "nonvalid_ids" df <- spa_hcpi_data idcol1 <- "hcp_id" refdf <- locked_spa_sco_data idcol2 <- "hcp_identification-hcpid" qc_text <- "healthcare provider ID not valid" qc_idx <- qc_spa_hcpi_nonvalid_ids qc_export_label <- "nonvalid_hcpid" qc_export_description <- "non-valid participant ID" cat(knitr::knit_child('database_export_sub_quality_check.Rmd', envir = environment(), quiet = TRUE))
locked_spa_hcpi_data <- cleaned_df
r qc_spa_hcpi_duplicates
]\n\nqc_description <- "Keep duplicated records and investigate the reason for duplicates." qc_rule <- action_alert_no_modification qc_type <- "duplicates" df <- locked_spa_hcpi_data col_id <- "hcp_id" col_date <- "interview_start" cleaning <- "none" qc_text <- "duplicated IDs" qc_idx <- qc_spa_hcpi_duplicates qc_export_label <- "duplicated_spa_hcpi" qc_export_description <- "SPA healthcare provider interviews are duplicated" cat(knitr::knit_child('database_export_sub_quality_check.Rmd', envir = environment(), quiet = TRUE))
n_locked_spa_hcpi_data <- nrow(locked_spa_hcpi_data)
There are r n_locked_spa_hcpi_data
records in the locked r db_name
database.
timci::dataset_export(spa_hcpi_data, "12", "timci_spa_provider_interview_data", params$spa_dir, "Raw SPA healthcare provider interview data")
timci::dataset_export(locked_spa_hcpi_data, "12", "timci_spa_provider_interview_data", locked_db_dir, "Cleaned SPA healthcare provider interview data")
skimr::skim(locked_spa_hcpi_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.