2 Commits

2 changed files with 5 additions and 1 deletions
Split View
  1. +2
    -1
      sqlFunctions.R
  2. +3
    -0
      workflow.R

+ 2
- 1
sqlFunctions.R

@ -102,8 +102,9 @@ sqlSincBD<-function(conn=dta, filetemp="QueryOV.xlsx", sinc.samples=F, sinc.clin
if (sinc.samples & nrow(upd.samples) > 0){
upd.samples$IQ_date<-as.Date(upd.samples$IQ_date)
upd.samples$TIL_date<-as.Date(upd.samples$TIL_date)
### !! Atención, esto cambia la base de datos:
sqlSave(conn, upd.samples, tablename="SAMPLES", append = T, varTypes = c("IQ_date"="date"))
sqlSave(conn, upd.samples, tablename="SAMPLES", append = T, varTypes = c("IQ_date"="date","TIL_date"="date"))
print("Tabla SAMPLES sincronizada.")
}

+ 3
- 0
workflow.R

@ -10,6 +10,9 @@ sqlInitialize()
dta<-odbcConnectAccess2007(access.file = file,
pwd = .rs.askForPassword("Enter password:"))
## Importamos los NHC de las muestras nuevas
nhc.test<-read.xlsx("queryOV.xlsx", sheet = "NHC") %>% pull(NHC)
# Ver si ya hay muestras de los pacientes (opcional, para uno mismo)
sqlShowSamples()

Loading…
Cancel
Save