Compare commits

...

2 Commits

Author SHA1 Message Date
marcelcosta d3dcbc3d51 Limpieza de código. 2023-11-22 15:56:39 +01:00
marcelcosta faffd13524 Corrección bug al incorporar nuevo PATID en CC. 2023-11-22 15:50:29 +01:00
2 changed files with 3 additions and 13 deletions
-10
View File
@@ -169,16 +169,6 @@ server <- function(input, output) {
}
})
# observe({
# if (!is.null(input$file_access)){
# # Inicializar conexión
# dta<<-odbcConnectAccess2007(access.file = file,
# pwd = .rs.askForPassword("Enter password:"))
# print(dta)
# sqlBackUp()
# }
# })
observe({
if (!is.null(input$file_query)){
## Importamos los NHC de las muestras nuevas
+1 -1
View File
@@ -82,7 +82,7 @@ sqlGenOVID<-function(conn=dta, nhcs=nhc.test, verb=T, sinc=F, dbtype=NULL){
if(length(new.nhc) > 0){
if (nrow(dbid) == 0){next.num<-1}else{
next.num<-gsub(db["dbcode"],"",dbid[,db["dbcode"]]) %>% as.numeric %>% max(na.rm=T)+1
next.num<-gsub(db["dbpref"],"",dbid[,db["dbcode"]]) %>% as.numeric %>% max(na.rm=T)+1
}
print(next.num)
last.num<-next.num+(length(new.nhc)-1)