Develop RM toward OpenEHR


I would like to know how I can develop RM to represent something in OpenEHR. I need to develop a privacy reference model, but I haven’t found any clear documentation on how to create an OpenEHR oriented RM.

Short answer: you cannot do that.

Longer: the RM is the Reference Model underlying all models one can build with openEHR. Any openEHR model has to consist of a combination of instances of data, where every data instance has to be one of the types in the RM An openEHR model is a document that defines which combinations of data (based on RM types) are allowed together, and what constraints that group of data instances must fit into (no systolic value of -122 when doing blood pressure measurement). The language used to write that document (model) is ADL, and that document is called an Archetype (or a template, though the distinction can be omitted here)
Given this picture of how openEHR works, you cannot develop an RM. The RM is fixed in openEHR, combinations of its use are infinite, but the RM itself cannot be changed, or extended etc. Except when openEHR SEC decides to make changes to it, but that’s not something the consumers of the openEHR specs or tools can do (or there goes the interop).

Now it may be the case that you got the terminology wrong, and you already know everything I wrote above. No problem, I just wanted to be sure :slight_smile: In that case, I’m assuming you want to develop an openEHR model to represent a privacy model. That’d be an archetype to describe privacy, but it’d have to be put together using the RM types, and whether or not this is possible, or a good idea is a whole different discussion.

If you can clarify what you mean based on the above, the community would be able to help you better.


If I understand correctly, Demographics and Task Planning are both “additional” models on top of RM.

@Rodrigo_Ronner Would you like to write a similar model for “Privacy”?
@Seref Would that work?

1 Like

You’re technically correct @NeoEHR . I actually forgot about these, since RM has a very clear (narrow :slight_smile: ) meaning in my mind.

The reason I say technically is because it takes enormous amount of work to get tooling (modelling and dev tooling) and actual platform implementations working with RM, and even though it is technically possible to come up with a new RM, similar to your examples, that would require the same adoption in tooling and platform space that the RM has gone through in the last 20 years or so, so that it can be actually used. So depending on what you mean by ‘Would that work?’, the answer can be yes or no :slight_smile:

I think it’d be best if we hear @Rodrigo_Ronner’s requirement first and see if it can be dealt with less drastic measures.

1 Like

Absolutely. It could be that he is not talking of developing an additional package of the openEHR RM, but asking for a methodology to develop a dual-model oriented RM for another domain of knowledge.

1 Like

I had in mind using the benefits of computable specifications to generate APIs and CDR support based on the new model. I can see how writing the support by hand could take years.

BMM file is not that difficult to write. Using the new model as source code (without visual editing support) would also make it possible to use it immediately.

I’m just guessing. I don’t have the experience. That is why I asked for your opinion :blush:

I had a similar idea as Rodrigo - adding a new model that uses RM. So I’m also interested if this is possible.

1 Like

That’s definitely the approach I’d favour as a developer. However, things get tricky down the line depending on what you’re building, so even though BMM (or similar meta model based approaches) can help quite a bit, you may still end up looking at a big chunk of work.

Even if you build a very small satellite model to RM , it’s useless unless everybody else implements it, so there’s more than one dimension to what we may call ‘working’.

1 Like

At the moment, what we call the ‘RM’ includes the Demographic model - the intention was to have a full model of EHR + Parties (and other things eventually).

But the openEHR ‘RM’ is just an information model. Task Planning is another stable information model, also designed for archetyping. So ‘reference model’ is really just a relative term. For Task Planning archetypes, the Task Planning information model is the ‘reference model’, in the sense that it is the ‘reference’ for those archetypes. Elsewhere I have used the term ‘underlying information model’.

See the original paper.

1 Like

Hello @NeoEHR I was thinking about building a privacy oriented RM such as: De-Identification, Authentication, Emergency Access and etc (this only example). This reference model could be used for people to use to develop their archetypes. I don’t know if I understand correctly, but from what @Seref said, this would not be possible through OpenEHR.

1 Like

Hi Rodrigo,

In openEHR the RM is given, then on top of it you can model your domain-specific data structures, adding the semantics you need. That is done using archetypes. Then when you need to build a specific record for a specific use, you put many archetypes into a template, and that is your information model.

Then if you want to include other data structures that might not be in the scope of openEHR, first you need to check if those shouldn’t be just archetypes designed on top of the RM. Then if the answer is NO, whatever you do is just a feature of your system that goes beyond the scope of openEHR, thus that part is not compliant with the standard. Though you can grab some part of the openEHR RM and reuse them, or even the modeling methodology, like creating archetypes for your domain-specific information model.

Another thing to consider is what is RM and what is SM. I’m guessing for de-identification, authentication, emergency access, etc. you need also some domain-specific Service Model, which is the interface/service layer to access/provide those kinds of services, and inside data is managed using your specific RM (if needed, i.e. if it’s really out of the scope of the openEHR RM).

Sorry for the long message, there is no simple answer for your question :slight_smile:


Hi @pablo It´s happen that more easy build directly into Archetype. :slight_smile:

1 Like