I use something similar:
# add this code inside the server function
rv <- reactiveValues()
observeEvent(rv$message, {
if(is.null(rv$message)) {return()}
showModal(modalDialog(title = "NOTIFICATION", rv$message, easyClose = TRUE, footer = NULL))
rv$message <- NULL
})
i'd consider keeping an additional reactive value (rv$nrow), which will be updated at the end of Filtered_Data().
this way (there are numerous other alternatives i'm sure) you can easily call for such a notification from anywhere in your code:
rv$message <- paste(paste("Working with", rv$nrow, "patients..."))