| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -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( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            " | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <style> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            table { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              font-family: Arial, Helvetica, sans-serif; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              border-collapse: collapse; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              width: 100%; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					             | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            table td, table th { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              border: 1px solid #ddd; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              padding: 8px; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					             | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            table tr:nth-child(even){background-color: #f2f2f2;} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					             | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            table tr:hover {background-color: #ddd;} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					             | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            table th { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              padding-top: 12px; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              padding-bottom: 12px; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              text-align: left; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              background-color: #04AA6D; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              color: white; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </style> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            ", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            "<h3>Muestra: ",input$id,"</h3>", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            "<b>OVID</b>: ",samples_sel$OVID,"<br>", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            "<b>Fecha</b>: ",samples_sel$IQ_date,"<br>", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            "<b>Tipo de tejido: </b>",samples_sel$Tissue,"<br><br>", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            "<b>AP: </b>",samples_sel$AP,"<br><br>", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            "<b>Comments:</b>","<br>   ",samples_sel$Coments,"<br><br>", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					             | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            "<table style='width:auto;'> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <tg> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <th><b>Hist</b></th> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <th><b>RNA</b></th> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <th><b>Slide</b></th> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <th><b>Frag</b></th> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <th><b>Disg</b></th> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </tr> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <tr> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <td>",samples_sel$Hist_dic,"</td> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <td>",samples_sel$RNA_dic,"</td> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <td>",samples_sel$Slide_dic,"</td> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <td>",samples_sel$Frag_vial,"</td> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <td>",samples_sel$Disg_vial,"</td> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            " | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            )) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        #**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 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
 |