diff --git a/BDAccess/app.R b/BDAccess/app.R index c262390..76a08e7 100644 --- a/BDAccess/app.R +++ b/BDAccess/app.R @@ -48,8 +48,17 @@ ui <- fluidPage( ) ), tabPanel("Visor", - sidebarPanel(), - mainPanel() + sidebarPanel( + radioButtons("nhc", label = h3("Código"), + choices = list("NHC" = 1, "UMID/OVID" = 2, "UM/OV"=3), + selected = 2), + textInput("id", label = "ID", value = ""), + ), + mainPanel( + htmlOutput("report"), + h3("Nitrogen"), + tableOutput("nitrogen") + ) ) ) ) @@ -443,6 +452,85 @@ server <- function(input, output) { ## Visor + output$report<-renderUI({ + samples<-sqlFetch(dta, "samples") + if (input$nhc == 1){samples_sel<-samples %>% filter(OVID == input$id)} + if (input$nhc == 2){samples_sel<-samples %>% filter(OVID == input$id)} + if (input$nhc == 3){samples_sel<-samples %>% filter(samples == input$id)} + + print(input$id) + print(samples_sel) + + if (input$nhc == 3){ + HTML(paste0( + " + + ", + "

Muestra: ",input$id,"

", + "OVID: ",samples_sel$OVID,"
", + "Fecha: ",samples_sel$IQ_date,"
", + "Tipo de tejido: ",samples_sel$Tissue,"

", + "AP: ",samples_sel$AP,"

", + "Comments:","
",samples_sel$Coments,"

", + + " + + + + + + + + + + + + + + " + )) + } + #**AP**: `r samples_sel$AP` + + #**Macro**: + # `r samples_sel$Macro` + + #**Despcripción**: + # `r samples_sel$Description` + + #**Procesado**: + # `r samples_sel$Process` + }) + + output$nitrogen<-renderTable({ + nitro<-sqlFetch(dta, "NITROGEN") + if (input$nhc == 3){nitro<-nitro %>% filter(CODIGO == input$id)} + else{nitro<-as.data.frame(matrix(ncol=0, nrow=0))} + nitro + }) }
HistRNASlideFragDisg
",samples_sel$Hist_dic,"",samples_sel$RNA_dic,"",samples_sel$Slide_dic,"",samples_sel$Frag_vial,"",samples_sel$Disg_vial,"