While using Annotations in the Archetype Designer I noticed two problems.
When adding a new annotation, both in an archetype or in a template, it is not copied to the other languages, in contrast with other texts (atNNNN) that are copied to all languages and marked for revision with an asterisk.
The AOM2 specification mentions that annotations have to be properly translated, so this replication by default sounds logical. Archetype Object Model 2 (AOM2)
When exporting annotations in OPT, only the one from the primary language is included. In the native format of the template, each annotation is associated with is language, so they are all included. But in OPT the annotations are a separated section with no information of the language. I guess this is a problem of the OPT XML Schema, it is not the first time we talk about its drawbacks.
We are currently not using the annotation. But I am sure there are lots of possibilities to add directives to automatic documentation generators like @ian.mcnicoll has looked into.
There could also be directives to end-user applications and also some tooling for ETL extracts.
Some of these might need translations.
Lotâs of opportunities and also lots of complexity to be added
Multilingual annotations for e.g. local Markup/ directives (potentially for things like PROMS UI directives
ADL1.4 and .oet/.opt actually support both but the tooling chin is a bit inconsistent oh how it is handled
You can extend the Term definitions in ADL1.4, which are multi-lingual
["at4000"] = <
text = <"plan">
description = <"The clinician's professional advice">
provenance = <"ACME_terminology(v3.9a)">
>
and âcommentsâ is actually one of those extensions, just agreed by convention to be supported in tooling. Only text and description are formally defined.
and .oet/.opt template-level annotations are unilingual, which is helpful for e.g UI hinting,
Unfotunately AD-> .opt conflates the additional term definitions and annotations and treats them all as unilingual template-style annotations.
That is probably fixable, and at least in theory it should be possible to add these term-definition extensions at template-level.
Going into ADL2, template-style unilingual annotations can be added to archetypes as well as templates.
So we should be able to do something now which meets the immediate issue.
And using it in this template, Archetype Designer, we realised the Annotations donât follow to all Events in AD. Better will have a look at it, hopefully fix it. Also CKM doesnât show the Annotations in translations.
In our case, the Annotations are merely instructions to the implementers to differentiate the full EPIC questionnaire from the EPIC Short Form, in addition to help the consumers of the data to make various subscores based on the data. In our case there is no need to translate, but I see @damocaâs point.
We can use the Description and Comment to each element, for example to instruct implementers to show certain parts of the questions in bold , CAPITALISED or in italics. Some copyright holders are obsessed with that. But in the CKM, to the reviewers, clinicians and most users, this information is only visual noise. Another thing is that if the information in Annotations or other instructions or hints are changing often, then I really, really donât want to update the archetype each time.
What we need is a âgeek layerâ associated with the archetype, not directly part of it, but still available in the tools. For every language and all Events. Can we all add that to our wish list to Santa Claus, please?
Technically these are not annotations (at least not the same as template annotations, they are just extra âterm definitionsâ.
ADL1.4 says that ânameâ and âdescriptionâ must be present but other terms can be added. âcommentsâ is one of those which is just supported by common practice. They are extra fields added to the ontology section in the archetype, and therefore should be translatable, just like comments. I think this is a good approach and one that we can exploit more, especially where PROMS demand.
The problem seems to be that although AD treats âcommentsâ correctly, it treats any other additional ontology items as if they were unilingual template -level annotations., and munges them together.
@varntzen - when you mentioned Events did you mean Observation Events or something else?
I am more comfortable with allowing a limited set of markdown-based markup, as FHIR does, although I agree an ability to package other documentation to a separate layer would also be helpful.
I believe (as a way forward) to think about âmodelsâ as a base to which you can append several âlayersâ which augment base model with additional specifics.
Analog to Photoshop (PSP) and image editing. You have a base image, but you can augment base image adding vector graphics, special effects, ⌠, performing non-destructive editing on top of base image.
In context of archetypes. You have a base model, and you can add integration layer, terminology layer, presentation layer, ⌠special fx layer , ⌠Of course each layer can interact with base model (reference nodeIDs, âŚ) and possibly adding its own semantics to their layer.
Which also means they can be multi-lingual. On archetype level.
Is it correct or not, ⌠it was discussed, some agreed, the solution is coherent with the spec. However I donât think it is specifically addressed in the spec.
In AD, you can select the node, switch to the Annotation tab on the right.
here you can add keys and values to get the ADL @borut.fabjan describes.
Value e.g. in English first, the n switch language at the top to e.g. Norwegian and do the same again, only this time the value is in Norway, whereas the key is the same.
You can upload this ADL to CKM and I believe this will be fully supported, including translation support.
Regarding how this should look in ADL, the only discussion I can remember is whether these should be full keys Subscale = <"subscale value">
or if they should rather be expressed as other_details with key, value pairs if it is not text or description.
From memory the spec on how to serialise such keys to ADL is a bit ambiguous - but it has always been done in the way @borut.fabjan describes (using full keys), and that is what is supported in tooling, whereas I have never seen the other_details variant in practiceâŚ
When we deal with template things become complicated. Thereâs legacy .OET format and .OPT format. This formats bring along some limitations. Specially around support for multi-language, or multiple use of the same archetypeID were each instance is named differently.
Support for annotations in .OPT is implemented as extra compartment âŚ. However I donât think originally anyone thought annotations would be something language dependant, and therefore thereâs no reference for language.
Unfortunately not, as @damoca pointed to originally in this thread. Annotations donât follow through to other languages, the keys have to be manually duplicated.
I guess youâre right. I donât know how though.
Yep, manual only. When translating an archetype in CKM, we offer it, but would also not add a non-translated marker for these. That would be easy but more likely than not it is an annotation that doesnât have to be translated such as a mapping, gui hint or whatever else this has been used over the years or it is one that could be translated but doesnât need or should not be translated - maybe an original text from a score that only exists in - say - EnglishâŚ
To add to the confusion, the monolingual template annotations are for a complete path, whereas the adl1.4 archetype âannotationsâ aka term_definition key value pairs are for an at-code, not a complete path.
Yes, they are language-dependent by adl 1.4 design, they could be âtranslatedâ in CKM as per the screenshot, but of course it is annoying to âtranslateâ a â24â as in the exampleâŚ
We could come up with a convention of what is a language-specific key and what is a general one for all languages, but all in all, I kinda agree with @borut.fabjan 's comment that there is too much hackery here to ever get this right. More layers make my head spin though.
In essence, âannotationsâ whether in an archetype or template should apply to
either a path or an at-code and (orthogonal to this)
either a specific language or all available languages
Exactly. Unfortunately OPT is legacy but still the main driver for templates. Internally the AD works perfectly, the annotations are kept in place for every language and also included when exporting the template in the native format.
I have the same feeling that the annotations were included to the OPT XML Schema as a patch, without considering all the use cases.
@sebastian.garde, slight side-bar, but is the annotations reordering the CKM does when uploading archetypes a feature or a bug? I tried alphabetising them, but the CKM had other ideas
I was able to have a more detailed look at this today.
They are stored in the correct order, but during serialisation when showing it to you in the CKM frontend this order isnât honoured.
So, donât worry about correcting the order for the moment as long as you have uploaded it ok: It wonât change anything + we can and will make sure that they will be listed in their intended order.
Dear @siljelb and all, we have provided a (backend-only) hotfix for this issue.
Anything after text,description,comment will retain their original order again now.