Introduction

In this section we will: * identify which IUD insertion procedures were excluded and why * identify which different IUD insertion subgroups were created and why

If you have questions or concerns about this data please contact Alexander Nielson ()

Load Libraries

Load Libraries

library(data.table)
library(tidyverse)
## Warning: replacing previous import 'vctrs::data_frame' by 'tibble::data_frame'
## when loading 'dplyr'
library(stringi)
library(ggridges)
library(broom)
library(disk.frame)
library(RecordLinkage)
library(googlesheets4)
library(bigrquery)
library(DBI)
devtools::install_github("utah-osa/hcctools2", upgrade="never" )
library(hcctools2)

Establish color palettes

cust_color_pal1 <- c(
        "Anesthesia" = "#f3476f",
        "Facility" = "#e86a33",
        "Medicine Proc" = "#e0a426",
        "Pathology" = "#77bf45",
        "Radiology" = "#617ff7",
        "Surgery" = "#a974ee"
    )

cust_color_pal2 <- c(
        "TRUE" = "#617ff7",
        "FALSE" = "#e0a426"
    )

cust_color_pal3 <- c(
        "above avg" = "#f3476f",
        "avg" = "#77bf45",
        "below avg" = "#a974ee"
    )



  fac_ref_regex <- "(UTAH)|(IHC)|(HOSP)|(HOSPITAL)|(CLINIC)|(ANESTH)|(SCOPY)|(SURG)|(LLC)|(ASSOC)|(MEDIC)|(CENTER)|(ASSOCIATES)|(U OF U)|(HEALTH)|(OLOGY)|(OSCOPY)|(FAMILY)|(VAMC)|(SLC)|(SALT LAKE)|(CITY)|(PROVO)|(OGDEN)|(ENDO )|( VALLEY)|( REGIONAL)|( CTR)|(GRANITE)|( INSTITUTE)|(INSTACARE)|(WASATCH)|(COUNTY)|(PEDIATRIC)|(CORP)|(CENTRAL)|(URGENT)|(CARE)|(UNIV)|(ODYSSEY)|(MOUNTAINSTAR)|( ORTHOPEDIC)|(INSTITUT)|(PARTNERSHIP)|(PHYSICIAN)|(CASTLEVIEW)|(CONSULTING)|(MAGEMENT)|(PRACTICE)|(EMERGENCY)|(SPECIALISTS)|(DIVISION)|(GUT WHISPERER)|(INTERMOUNTAIN)|(OBGYN)"

Connect to GCP database

bigrquery::bq_auth(path = 'D:/gcp_keys/healthcare-compare-prod-95b3b7349c32.json')

# set my project ID and dataset name
project_id <- 'healthcare-compare-prod'
dataset_name <- 'healthcare_compare'

con <- dbConnect(
  bigrquery::bigquery(),
  project = project_id,
  dataset = dataset_name,
  billing = project_id
)

Get NPI table

query <-  paste0("SELECT npi, clean_name, osa_group, osa_class, osa_specialization
                 FROM `healthcare-compare-prod.healthcare_compare.npi_full`")

#bq_project_query(billing, query) # uncomment to determine billing price for above query.

npi_full <- dbGetQuery(con, query) %>%
  data.table()

get a subset of the NPI providers based upon taxonomy groups

gs4_auth(email="alexnielson@utah.gov")
surgery <- read_sheet("https://docs.google.com/spreadsheets/d/1GY8lKwUJuPHtpUl4EOw9eriLUDG9KkNWrMbaSnA5hOU/edit#gid=0",
                    sheet="major_surgery") %>% as.data.table
## Reading from "Doctor Types to Keep"
## Range "'major_surgery'"
surgery <-  surgery[is.na(Remove) ] %>% .[["NUCC Classification"]]
  npi_prov_pair <-  npi_full[osa_class %in% surgery] %>%
    .[,.(npi=npi,
         clean_name = clean_name
         )
      ]

Load Data

bun_proc <-  disk.frame("full_apcd.df")
uterine_insert <- bun_proc[proc_code_str_sorted %>% stri_detect_regex("58300") & cnt >1 & tp_med >0 & tp_med < 20000]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 430 x 2
##    name                   correlation
##    <chr>                        <dbl>
##  1 anes_bun_t_anes              0.790
##  2 anes_bun_t_anesth            0.790
##  3 anes_bun_t_deliver           0.609
##  4 anes_bun_t_liver             0.609
##  5 duration_mean                0.578
##  6 anes_bun_t_analg             0.537
##  7 medi_bun_t_sodium            0.514
##  8 anes_bun_t_vag               0.495
##  9 surg_bun_t_obstetrical       0.469
## 10 medi_bun_t_inject            0.439
## # ... with 420 more rows
uterine_insert %>% get_tag_density_information("anes_bun_t_anes") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ anes_bun_t_anes"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 613
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[anes_bun_t_anes==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 368 x 2
##    name                  correlation
##    <chr>                       <dbl>
##  1 faci_bun_t_dept             0.305
##  2 faci_bun_t_emergency        0.305
##  3 faci_bun_t_initial          0.269
##  4 surg_bun_t_hyst             0.265
##  5 duration_max                0.264
##  6 path_bun_t_fibrinogen       0.260
##  7 faci_bun_t_critical         0.260
##  8 duration_mean               0.255
##  9 faci_bun_t_discharge        0.233
## 10 medi_bun_t_inject           0.232
## # ... with 358 more rows
uterine_insert %>% get_tag_density_information("faci_bun_t_emergency") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ faci_bun_t_emergency"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 246
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[faci_bun_t_emergency==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 356 x 2
##    name                   correlation
##    <chr>                        <dbl>
##  1 surg_bun_t_hyst              0.298
##  2 medi_bun_t_sodium            0.248
##  3 path_bun_t_patho             0.231
##  4 path_bun_t_pathologist       0.231
##  5 path_bun_t_tissue            0.230
##  6 faci_bun_t_visit             0.226
##  7 medi_bun_t_inject            0.213
##  8 surg_bun_t_biopsy            0.181
##  9 surg_bun_t_vag               0.175
## 10 faci_bun_t_est               0.164
## # ... with 346 more rows
uterine_insert %>% get_tag_density_information("surg_bun_t_hyst") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ surg_bun_t_hyst"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 231
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[surg_bun_t_hyst==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 355 x 2
##    name                   correlation
##    <chr>                        <dbl>
##  1 faci_bun_t_visit             0.262
##  2 faci_bun_t_est               0.190
##  3 surg_bun_t_remov             0.177
##  4 surg_bun_t_remove            0.175
##  5 path_bun_t_tissue            0.172
##  6 path_bun_t_patho             0.170
##  7 path_bun_t_pathologist       0.170
##  8 radi_bun_t_bone              0.154
##  9 path_bun_t_cytopath          0.150
## 10 medi_bun_t_inject            0.148
## # ... with 345 more rows
uterine_insert %>% get_tag_density_information("surg_bun_t_remov") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ surg_bun_t_remov"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 28.2
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[surg_bun_t_remov==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 320 x 2
##    name                   correlation
##    <chr>                        <dbl>
##  1 faci_bun_t_visit             0.212
##  2 radi_bun_t_bone              0.180
##  3 path_bun_t_tissue            0.180
##  4 path_bun_t_patho             0.178
##  5 path_bun_t_pathologist       0.178
##  6 medi_bun_t_inject            0.158
##  7 faci_bun_t_est               0.154
##  8 surg_bun_t_ablate            0.151
##  9 surg_bun_t_cesarean          0.150
## 10 surg_bun_t_obstetrical       0.137
## # ... with 310 more rows
uterine_insert %>% get_tag_density_information("path_bun_t_pathologist") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ path_bun_t_pathologist"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 56
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[path_bun_t_pathologist==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 309 x 2
##    name                   correlation
##    <chr>                        <dbl>
##  1 faci_bun_t_visit             0.201
##  2 radi_bun_t_bone              0.191
##  3 surg_bun_t_cesarean          0.158
##  4 medi_bun_t_inject            0.151
##  5 faci_bun_t_est               0.147
##  6 surg_bun_t_obstetrical       0.146
##  7 medi_bun_t_applicat          0.142
##  8 faci_bun_t_pat               0.120
##  9 faci_bun_t_office            0.120
## 10 path_bun_t_cytopath          0.107
## # ... with 299 more rows
uterine_insert %>% get_tag_density_information("surg_bun_t_obstetrical") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ surg_bun_t_obstetrical"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 166
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[surg_bun_t_obstetrical==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 308 x 2
##    name                correlation
##    <chr>                     <dbl>
##  1 faci_bun_t_visit          0.206
##  2 radi_bun_t_bone           0.193
##  3 surg_bun_t_cesarean       0.160
##  4 medi_bun_t_inject         0.153
##  5 faci_bun_t_est            0.150
##  6 medi_bun_t_applicat       0.144
##  7 faci_bun_t_pat            0.123
##  8 faci_bun_t_office         0.122
##  9 path_bun_t_cytopath       0.110
## 10 duration_mean             0.110
## # ... with 298 more rows
uterine_insert %>% get_tag_density_information("radi_bun_t_bone") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ radi_bun_t_bone"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 107
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[radi_bun_t_bone==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 307 x 2
##    name                correlation
##    <chr>                     <dbl>
##  1 faci_bun_t_visit          0.218
##  2 surg_bun_t_cesarean       0.175
##  3 medi_bun_t_inject         0.168
##  4 medi_bun_t_applicat       0.158
##  5 faci_bun_t_est            0.156
##  6 faci_bun_t_pat            0.136
##  7 faci_bun_t_office         0.136
##  8 path_bun_t_cytopath       0.122
##  9 duration_mean             0.120
## 10 duration_max              0.111
## # ... with 297 more rows
uterine_insert %>% get_tag_density_information("medi_bun_t_inject") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ medi_bun_t_inject"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 91.7
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[medi_bun_t_inject==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 292 x 2
##    name                   correlation
##    <chr>                        <dbl>
##  1 faci_bun_t_visit             0.246
##  2 surg_bun_t_cesarean          0.204
##  3 faci_bun_t_est               0.171
##  4 faci_bun_t_pat               0.151
##  5 faci_bun_t_office            0.151
##  6 duration_mean                0.140
##  7 path_bun_t_cytopath          0.134
##  8 duration_max                 0.130
##  9 radi_bun_t_without_dye       0.113
## 10 path_bun_t_fluid             0.111
## # ... with 282 more rows
uterine_insert[surg_bun_t_cesarean==T] %>% nrow()# %>% get_tag_density_information("surg_bun_t_cesarean") %>% print()
## [1] 1
uterine_insert <- uterine_insert[surg_bun_t_cesarean==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 291 x 2
##    name                    correlation
##    <chr>                         <dbl>
##  1 faci_bun_t_visit              0.253
##  2 faci_bun_t_est                0.176
##  3 faci_bun_t_pat                0.155
##  4 faci_bun_t_office             0.155
##  5 path_bun_t_cytopath           0.137
##  6 radi_bun_t_without_dye        0.116
##  7 path_bun_t_fluid              0.114
##  8 medi_bun_t_puncture           0.107
##  9 medi_bun_t_routine            0.107
## 10 medi_bun_t_venipuncture       0.107
## # ... with 281 more rows
uterine_insert  %>% get_tag_density_information("faci_bun_t_office") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ faci_bun_t_office"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 30.9
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[faci_bun_t_office==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 228 x 2
##    name                    correlation
##    <chr>                         <dbl>
##  1 faci_bun_t_visit              0.249
##  2 path_bun_t_cytopath           0.170
##  3 faci_bun_t_est                0.167
##  4 path_bun_t_fluid              0.145
##  5 surg_bun_t_egd                0.128
##  6 surg_bun_t_tip                0.128
##  7 path_bun_t_dna                0.11 
##  8 medi_bun_t_puncture           0.095
##  9 medi_bun_t_routine            0.095
## 10 medi_bun_t_venipuncture       0.095
## # ... with 218 more rows
uterine_insert  %>% get_tag_density_information("path_bun_t_cytopath") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ path_bun_t_cytopath"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 24.3
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[path_bun_t_cytopath==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 209 x 2
##    name                   correlation
##    <chr>                        <dbl>
##  1 faci_bun_t_visit            0.189 
##  2 surg_bun_t_egd              0.142 
##  3 surg_bun_t_tip              0.142 
##  4 faci_bun_t_est              0.114 
##  5 radi_bun_t_brain            0.0958
##  6 radi_bun_t_without_dye      0.0908
##  7 radi_bun_t_mri              0.0862
##  8 radi_bun_t_exam             0.0827
##  9 radi_bun_t_pelvi            0.0808
## 10 medi_bun_t_puncture         0.0801
## # ... with 199 more rows
uterine_insert[surg_bun_t_egd==T] %>% nrow()
## [1] 1
uterine_insert <- uterine_insert[surg_bun_t_egd==F] 
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 207 x 2
##    name                    correlation
##    <chr>                         <dbl>
##  1 faci_bun_t_visit             0.191 
##  2 faci_bun_t_est               0.116 
##  3 radi_bun_t_brain             0.0968
##  4 radi_bun_t_without_dye       0.0918
##  5 radi_bun_t_mri               0.0871
##  6 radi_bun_t_exam              0.0838
##  7 radi_bun_t_pelvi             0.0818
##  8 medi_bun_t_puncture          0.0811
##  9 medi_bun_t_routine           0.0811
## 10 medi_bun_t_venipuncture      0.0811
## # ... with 197 more rows
uterine_insert  %>% get_tag_density_information("radi_bun_t_brain") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ radi_bun_t_brain"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 158
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[radi_bun_t_brain==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 206 x 2
##    name                    correlation
##    <chr>                         <dbl>
##  1 faci_bun_t_visit             0.193 
##  2 faci_bun_t_est               0.117 
##  3 radi_bun_t_exam              0.0844
##  4 radi_bun_t_pelvi             0.0824
##  5 medi_bun_t_hpv               0.0781
##  6 medi_bun_t_puncture          0.078 
##  7 medi_bun_t_routine           0.078 
##  8 medi_bun_t_venipuncture      0.078 
##  9 path_bun_t_dna               0.0777
## 10 radi_bun_t_mammo             0.0765
## # ... with 196 more rows
uterine_insert  %>% get_tag_density_information("faci_bun_t_visit") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ faci_bun_t_visit"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 23.6
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[faci_bun_t_visit==F]
uterine_insert %>% plot_med_density() %>% print()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

uterine_insert %>% get_tag_cor() %>% print()
## Warning in stats::cor(cor_data): the standard deviation is zero
## # A tibble: 195 x 2
##    name                           correlation
##    <chr>                                <dbl>
##  1 radi_bun_t_exam                     0.0853
##  2 radi_bun_t_pelvi                    0.0822
##  3 medi_bun_t_hpv                      0.0769
##  4 surg_bun_t_breast                   0.0769
##  5 surg_bun_t_imag                     0.0769
##  6 surg_bun_t_percutaneous             0.0769
##  7 radi_bun_t_mammo                    0.0752
##  8 medi_bun_t_medroxyprogesterone      0.0648
##  9 path_bun_t_pregnancy                0.0606
## 10 path_bun_t_urine                    0.0599
## # ... with 185 more rows
uterine_insert  %>% get_tag_density_information("radi_bun_t_exam") %>% print()
## Scale for 'y' is already present. Adding another scale for 'y', which will
## replace the existing scale.
## Scale for 'x' is already present. Adding another scale for 'x', which will
## replace the existing scale.
## [1] "tp_med ~ radi_bun_t_exam"
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Picking joint bandwidth of 42.7
## $dist_plots

## 
## $stat_tables

uterine_insert <- uterine_insert[,`:=`(
  surg_sp_name_clean = surg_sp_npi %>% map_chr(get_npi_standard_name),
  surg_bp_name_clean = surg_bp_npi %>% map_chr(get_npi_standard_name),
  
  medi_sp_name_clean = medi_sp_npi %>% map_chr(get_npi_standard_name),
  medi_bp_name_clean = medi_bp_npi %>% map_chr(get_npi_standard_name),
  
  radi_sp_name_clean = radi_sp_npi %>% map_chr(get_npi_standard_name),
  radi_bp_name_clean = radi_bp_npi %>% map_chr(get_npi_standard_name),
  
  path_sp_name_clean = path_sp_npi %>% map_chr(get_npi_standard_name),
  path_bp_name_clean = path_bp_npi %>% map_chr(get_npi_standard_name),
  
  anes_sp_name_clean = anes_sp_npi %>% map_chr(get_npi_standard_name),
  anes_bp_name_clean = anes_bp_npi %>% map_chr(get_npi_standard_name),
  
  faci_sp_name_clean = faci_sp_npi %>% map_chr(get_npi_standard_name),
  faci_bp_name_clean = faci_bp_npi %>% map_chr(get_npi_standard_name)
  )]
uterine_insert_btbv5 <- uterine_insert %>% 
  btbv5(
    osa_group_p=NA,
    osa_class_p = "Obstetrics & Gynecology",
    osa_specialization_p = NA
  ) %>% 
  .[,`:=`(procedure_type=20, 
          procedure_modifier="Standard", 
          ingest_date =Sys.Date())]
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "SCOTT S. REES"       "PETER GILSON DREWES"
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "JENNIFER J. TRAUSCHT-VAN HORN" "DAVID KEITH TUROK"            
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "KAREN BOHEEN  (LAYTON)" "KAREN  BOHEEN"         
## [1] "multiple meet class req"
## [1] "DAVID KEITH TUROK"  "ROBERT NEAL TAYLOR"
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "CRAIG L HURST MD  (LAYTON)" "CRAIG L HURST"             
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "KAREN BOHEEN  (LAYTON)" "KAREN  BOHEEN"         
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "CRAIG L HURST MD  (LAYTON)" "CRAIG L HURST"             
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "KAREN BOHEEN  (LAYTON)" "KAREN  BOHEEN"         
## [1] "multiple meet class req"
## [1] "KAREN BOHEEN  (LAYTON)" "KAREN  BOHEEN"         
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "CRAIG L HURST MD  (LAYTON)" "CRAIG L HURST"             
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "CRAIG L HURST MD  (LAYTON)" "CRAIG L HURST"             
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "KAREN BOHEEN  (LAYTON)" "KAREN  BOHEEN"         
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "CRAIG L HURST MD  (LAYTON)" "CRAIG L HURST"             
## [1] "multiple meet class req"
## [1] "CRAIG L HURST MD  (LAYTON)" "CRAIG L HURST"             
## [1] "multiple meet class req"
## [1] "KAREN BOHEEN  (LAYTON)" "KAREN  BOHEEN"         
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "CRAIG L HURST MD  (LAYTON)" "CRAIG L HURST"             
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "KAREN BOHEEN  (LAYTON)" "KAREN  BOHEEN"         
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "CHAD C LUNT"                    
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"              
## [1] "multiple meet class req"
## [1] "LUNT  KVARFORDT  (SAINT GEORGE)" "TRACY D KVARFORDT"
bq_table_upload(x=procedure_dev_table, values= uterine_insert_btbv5, create_disposition='CREATE_IF_NEEDED', write_disposition='WRITE_APPEND')