Hi,
Welcome to the RStudio community!
The theoretical answer is yes, but Shiny apps in a hospital setting are usually used in a research setting where a specific dashboard or analysis is built on top of and existing EMR.
Building a full, real EMR from scratch is a near impossible using R and Shiny given the complexity of an EMR and the huge data security requirements and multi-user interaction.
I don't know why you are asking this, but you can elaborate if you have additional questions. There are some open source EMR (EHR) projects online you can look for (example openEMR)
Hope this helps,
PJ