Specialization depth

Hi all,

I am looking at this error message from http://www.openehr.org/releases/AM/latest/docs/AOM2/AOM2.html#_validity_rules

VARCN: archetype concept validity. The *node_id* of the root object of the archetype must be of the form id1{.1}*, where the number of .1 components equals the specalisation depth, and must be defined in the terminology.
(which has a spelling-error in “specalisation”, it should be “specialisation”)

My first question:
How can the parser know the specialization-depth?
When I look at the grammar, it seems not possible to layer the specializationSection
So it can only check that it is a specialization.

Or am I overseeing something

My second question:
There is another thing, only small, thing, not very important, but I thought, I mention it anyway.
In the grammar specialization is spelled in the US way ( in specialization_section : SYM_SPECIALIZE archetype_ref ;), while in the error-messages specialisation is spelled in the UK-way (in VASID).

Is there a preferred spelling for when handling texts which belong to software-definitions?

Thanks
Bert

Parsing current archetype identifiers you can know the specialization
depth and compare it with root node_id.

Parsing current archetype identifiers you can know the specialization
depth and compare it with root node_id.

Hi Diego,

Thanks for your answer, and I hope you will answer my follow up question

I thought the the versionId's in the archetype_hrid denote the corrections/versions on an archetype.
But maybe I misunderstand that concept.

Or are you referring to something else?

Bert

The concept_id part from the archetype_hrid shows all the parents of a
given node (or at least did in 1.4)

According to the Grammar for Adl this seems not the case. There can only be one archetypeRef in an specialization-section

In AOM/ADL 2 this is not true anymore, so I fear we have lost the only way to know the specialization depth of an archetype (without navigating through all its parents).

Thanks, David,

I am afraid then we must say that there is a not very effective error-specification in http://www.openehr.org/releases/AM/latest/docs/AOM2/AOM2.html#_validity_rules
Because it is not always possible to check the specialization-depth, getting no error cannot always be trusted as meaning the archetype is valid.

I think it would be good if there came a solution for this. I am now doubting if I should implement that error-detection/message.

The issuetracker page seems under construction, so I cannot report it.
http://www.openehr.org/programs/software/issuetrackers

But I guess people responsible for this have read this.

Best regards
Bert Verhees

but there is an example of an specialized identifier in that same document
e.g. "uk.nhs.clinical::openEHR-EHR-SECTION.t_encounter_report-vital_signs_headings-0001.v1"
in http://www.openehr.org/releases/AM/latest/docs/AOM2/AOM2.html#_an_example

but there is an example of an specialized identifier in that same document
e.g. "uk.nhs.clinical::openEHR-EHR-SECTION.t_encounter_report-vital_signs_headings-0001.v1"
in http://www.openehr.org/releases/AM/latest/docs/AOM2/AOM2.html#_an_example

Thanks Diego, for pointing this out, I checked it in RM 1.0.3 ArchetypeId, and there is indeed a specialization-numbering in the archetype identifier.
So this information will become redundant in the archetype, available in the concept/root-node id, and in the archetype id.

This is not good, according to many programming standards which advise to not have redundant information.

Because it adds nothing, and if it differs, it is not trustworthy.

Also, we lost the track of archetypes from where was specialized, we only know the last archetype, and if that is not available, then it is not possible to have that information.
As far as I understand, this seems a lost of information and a redundancy added in the new AOM/RM combination.

But maybe I do not oversee everything.

I think it is best to wait for an official reaction of the openehr chief architect.

Thanks for helping me with this.

Bert

No offending intended, just joking :wink:

That is gone in ADL2.

in ADL2 you can know the specialisation depth of the archetype by looking at the root node code, e.g.

id1 → depth = 0
id1.1 → depth = 1
etc

For US/international English spelling, we tend to use International English for all natural language, and where we can, accommodate US English in the formal spec. Thus, an ADL parser has to be able to parse specialise | specialize. The error texts probably are not consistent.

Bert, can you create a PR for ‘ADL2/AOM2 documentation errors’ or similar in the main PR tracker. If you find a number of them, it wold be preferable to include them all in the description of the one PR, rather than create a proliferation of PRs, for obvious reasons.

An official release of AOM2/ADL2 is around the corner and we’ll include fixes for any errors you find.

thanks

  • thomas

This is not a specialised identifier, it's just an identifier that has '-' characters in it, which in ADL2 are not special.

Just look at the id1.x code of the root node to get the specialisation depth of any ADL2 archetype.

- thomas

that's why it is gone in ADL2/AOM2.

The new ARCHETYPE_HRID class is the one that matters, and it does not know about specialisation depth.

- thomas

Must put AOM2 glasses on!
:sunglasses:

Thanks Thomas for your answers, I will study them tomorrow

Best regards
Bert

I write, as you suggest, from now on the errors/remarks in the PR tracker, I had not used it for some years, but I found it, and also my login credentials again. As you say, I create one single PR for all my errors/remarks, which are probably not very many. The problem is only important for keywords in a definition language, it is cumbersome to let a parser check several spelling-forms in keywords. The problem I found, however was in a data-string (an error-message), and in that case, it is possible to have more languages, which can be changed and do not effect the parser. So, I take back my remark on this. Bert

Please allow me a question, maybe it is explained somewhere.

What is the meaning of the class Archetype_Id in the support-section of RM 1.0.3, while in the AOM Archetype_HRID exist which overlaps the first.

Thanks
Bert

ARCHETYPE_ID is for AOM 1.4, ARCHETYPE_HRID is for AOM 2.0

We will rationalise all these classes in to the BASE component in Release 1.1.0 of the RM.

- thomas

The error messages are actually in ODIN format, which can accommodate EN-US as well as EN, if we really want to bother with that.

  • thomas

That is the good thing, you can create error messages in any language, even switch the language if wanted, which fits fine in an application. Bert