Corrección bug al incorporar nuevo PATID en CC.

This commit is contained in:
2023-11-22 15:50:29 +01:00
parent 9f7430a4ae
commit faffd13524
+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(length(new.nhc) > 0){
if (nrow(dbid) == 0){next.num<-1}else{ 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) print(next.num)
last.num<-next.num+(length(new.nhc)-1) last.num<-next.num+(length(new.nhc)-1)