|
|
@@ -70,7 +70,7 @@ inputPanel( |
|
|
|
) |
|
|
|
inputPanel( |
|
|
|
fileInput("exhau_pims", "Fichier d'exhaustivité", accept = "text/csv"), |
|
|
|
downloadButton("report", "Télécharger le rapport") |
|
|
|
actionButton("publish", "Publier et archiver le rapport") |
|
|
|
) |
|
|
|
|
|
|
|
# Récupération des fichiers ePMSI ---- |
|
|
@@ -304,20 +304,27 @@ periode <- reactive({ |
|
|
|
``` |
|
|
|
|
|
|
|
```{r report} |
|
|
|
output$report <- downloadHandler(filename = "bilan.html", |
|
|
|
content = function(file) |
|
|
|
{ |
|
|
|
rmarkdown::render("cloture.Rmd", |
|
|
|
output_file = file, |
|
|
|
params = list(annee = input$annee, |
|
|
|
mois = input$mois, |
|
|
|
rum = rum(), |
|
|
|
rss = rss(), |
|
|
|
exhau = exhau(), |
|
|
|
exhau_pims = exhau_pims(), |
|
|
|
Ovalide = tibble::data_frame(nom = names(Ovalide()), tab = Ovalide()), |
|
|
|
OvalideP = tibble::data_frame(nom = names(OvalideP()), tab = OvalideP()))) |
|
|
|
}) |
|
|
|
observeEvent(input$publish, |
|
|
|
{ |
|
|
|
req(input$annee, input$mois, exhau(), rum(), rss(), exhau_pims(), Ovalide(), OvalideP()) |
|
|
|
|
|
|
|
|
|
|
|
rmarkdown::render("cloture.Rmd", |
|
|
|
output_file = "cloture.html", |
|
|
|
params = list(annee = input$annee, |
|
|
|
mois = input$mois, |
|
|
|
rum = rum(), |
|
|
|
rss = rss(), |
|
|
|
exhau = exhau(), |
|
|
|
exhau_pims = exhau_pims(), |
|
|
|
Ovalide = tibble::data_frame(nom = names(Ovalide()), tab = Ovalide()), |
|
|
|
OvalideP = tibble::data_frame(nom = names(OvalideP()), tab = OvalideP()))) |
|
|
|
file.copy("cloture.html", str_c("/var/www/html/cloture/archive/cloture", input$annee, "_", str_pad(input$mois, 2, "left", "0"), ".html"), overwrite = T) |
|
|
|
file.copy("cloture.html", str_c("archive/cloture", input$annee, "_", str_pad(input$mois, 2, "left", "0"), ".html"), overwrite = T) |
|
|
|
file.copy("cloture.html", "/var/www/html/cloture/", overwrite = T) |
|
|
|
|
|
|
|
showModal(modalDialog(title = "Publication", p("Fichier archivé et publié, disponible", a("ici", href = "https://livenne.chu-nancy.fr/sitedim/index.php/clot/bilan")), easyClose = T)) |
|
|
|
}) |
|
|
|
``` |
|
|
|
|
|
|
|
## Rapport |
|
|
|