I worked at Epic a long time ago. They're a bad employer -- churn that would make the worst valley sweatshop blush -- and even when I worked there had 10s of millions of lines of vb6 and the same in mumps/cache, the world's worst programming language. I'd imagine their systems have broken 100m lines of code by now.
You're essentially using software to automate how hospitals and outpatient clinics work. Each one of those has established workflows/procedures; each of those workflows have started or evolved to be (at bare minimum) subtly different than everywhere else. Each and every procedure has to be build into the software or adapted to it. Installs are comparable to installing ERP systems into fortune 500 or fortune 100 companies, with at least comparable risks. Imagine how risk adverse you would be if inaccessible, incorrect, or incomplete health records could quite reasonably contribute to severe medical problems for humans.
If you were ever in a hospital for something serious pre EMRs, you would be unsurprised to have a file that is several hundred sheets of paper. Every single scrap of paper in a hospital has to make it's way into Epic's EMR.
Oh, and hospitals / clinics often buy these systems piecemeal, starting eg with labs. Your code has to talk to their code.
Lots of these got started before web clients worked well, so they're deployed clients. You can't upgrade 10k seats simultaneously, so both the clients and the servers have to be compatible up and down protocol versions. Ponder just how much fun that would be.
Or ponder just how convoluted the logic would be to ask if a person who does X in clinic A is allowed to see record B for patient C. In, for example, a hospital chain that may employ 25k+ people in the hospital and various outpatient clinics.
And follow up with questioning the idea (and expense!) of retraining every nurse, doctor, aide, tech, etc in a hospital on a new system.