Fix archetypeNodeId pattern


I found a patched from 2012-2013 definition of the archetypeNodeId type pattern.
Still need to investigate what was the initial problem at that time:
fix for archetypeNodeId () - see support_im.pdf Archetype ID Syntax
perhaps this might be rejected eventually

final version can be checked at


Diego Bosca
December 13, 2018, 4:29 PM

Seems ok to me, it also supports other RMs that start with numbers

Thomas Beale
December 13, 2018, 5:32 PM

Just for the record, openEHR universally uses so-called Perl regex (PCRE), which is where the \d, \w etc etc comes from. So you can use that safely anywhere you like.

Pablo Pazos
December 13, 2018, 9:33 PM

If we use PCREs, we can use this site to validate

Choosing multiline tag, many test cases, one per line, can be set on the test string box to verify the regex works on every desired case.

Sebastian Iancu
December 14, 2018, 11:04 AM

I have a new version of it:
I added support for -rc and -alpha in the version part but also for the namespace of hrid.
For the at-code part I also added support for 'id' prefixed ids - I'm not sure if this is needed for data instances.
The overall expression is optimistic (for instance versions like v000.000.000 are allowed)
Can some of you give me some feedback?

ps: to make these I consulted

Diego Bosca
December 14, 2018, 11:11 AM

I think this is fine. If we really want to disallow the v000 part maybe is just a matter of transforming the \d+ after the version into something like [1-9]*\d
But this probably makes the expression more difficult to read, so your current proposal is ok for me


Sebastian Iancu

Raised By

Sebastian Iancu


Affects versions