I'm going to give away the secret sauce I created for our backend.
"Traditional" EMRs imagine an idealized data model and then write ETLs to import to that model. The jargon we used was "adjudicating the single best record (SBR)" or "source of truth".
My system slurped up all data, stored mostly as-is, and then used information retrieval strategies (think Lucene) instead of querying (think SQL).
This solution was wicked fast. We showed our customers data back to them, so validation was simple. And we were super nimble when they changed their minds (what is a "visitation", how to displays scripts, updating lab results).
Sad story short: our group was acquired, my strategy made the reigning CTO's head explode, he attempted a rewrite, failed, then the execs killed the product.