Seref, i certainly wish i received a response like this one 5-6 years ago! 
Jose, in (small) addition to what Seref says, your "problem" is NOT mongoDB...Your "problem" is not 100% technological.
The first thing that you have to do is understand the openEHR data structure and how a tiny little humble number (like a single OBSERVATION for example, just one number) is stored and associated with the rest of the data in a subject's EHR.
Do this mentally, based on the specification documents. Don't worry about technology. If you had to do this "by hand" how would you do it? Where do you start? What do you need? What do you need first, second, third, etc. And then try to generalise to how would you do it for Archetypes & Templates of ANY structure.
What you are dealing with here is a Dual Model (it specifies both a Reference Model (RM) and an Archetype Model (AM)). The Reference Model specifies abstract data structures (like a list of numbers for example, or a table, etc) and the Archetype Model specifies how are these abstract data structures pieced together in even larger structures that support a specific use-case. (And Template's are doing the exact same thing by piecing together different Archetypes).
The key-point here is that the AM contains a huge ammount of extremely important data: _Constraints_ . And, it is not always possible to map an Archetype's (or Template's) constraints to whatever similar mechanism some DBMS is using. It's not always as simple as "NOT NULL"....It's more like "This list of numbers should be between 4 and 8 items long and each entry of this list, being a number, should have constraints (lowLimit<(<=)x<(<=)highLimit) that depend on the unit that the user will select!!! (and which units are allowed are also specified BY the Archetype!!!!!)". In other words, an Archetype may be allowing you to specify "length" in feet / inches / meters / cm / etc and the constraint "0-1 meters" has different "physical" representation (0-1, 0-100, 0-3.9, etc) depending on the unit.....This "detail" can not be ignored or simplified....This specificity is the actual objective.
Once this way of describing data is specified, once this huge data structure is in place, you can't just leave it there. You now need a way to query it. This is where the Archetype Query Language (AQL) is coming in. This is a project on its own (i am not joking). You have to parse AQL and then plug the parameters to a function that will actually implement the query. The "best case" scenario is one where you can "translate" a query from AQL to whatever a DBMS is using....But that can turn to a bloodshed pretty quickly too so better keep AQL in the radar from the beginning.
Once you have your data in place, all impecably organised and queryable...you can then start using them to actually generate some useful information...This is where GDL is coming in (http://www.openehr.org/news_events/releases/20130311)…But we are already in 2020 by now (and everything has gone beautifully, ideal and full-time)...so let's come back to what you are trying to do.
In general, even ignoring the GUI part, you will end-up implementing an openEHR DBMS to a certain extent. Whether it's totally file based like Seref is proposing or it makes use of facilities provided by some underlying DBMS, you will end up implementing functionality that CRUDs (Create, Recall, Update, Delete) this large data structure specified over several PDFs in openEHR.org.
The mongoDB business is a tiny little branch of the tree (not insignificant). You have to stand back and appreciate the bigger picture because this will save you a huge ammount of design-redesign cycles (and the more you have built, the worst the "tearing down" is).
Of course, you can always scour the XML of an Archetype (AT SOME VERSION!!!!!), grab all the paths and then assign values to those paths in a key/value kind of way and query the graph using the query language of the DBMS......Solved. (???)
(Maybe this is a way to handle JUST the "last 10 meters" of the persistence)
I am in no case trying to scare you off but as Seref says, you need to understand what is going on and you need to do this before you write even a single line of code, this will bring the right questions to the surface.
I hope this helps.
All the best
Athanasios Anastasiou