Accept URI-style terminology ids.
Description
CR fixes the problem in
Activity
Rong Chen November 9, 2020 at 3:56 PM
I like these short ids such as ICD-10, ATC or SNOMED-CT. URLs are long and terrible for display on user interface.
Thomas Beale November 9, 2020 at 3:06 PM
Not sure what you mean by synonyms? The URLs are not (AFAIK) defined by FHIR - e.g. http://snomed.info is a Snomed Intl URI, and http://loing.org is Regenstrief. AFAIK, FHIR just assumes those URIs from the relevant orgs (if it doesn’t it’s going to create chaos).
However, putting the URIs into CODE_PHASE instances I think is very likely to break everyone’s implementation - they won’t be expecting URIs in there.
Ian McNicoll November 9, 2020 at 2:15 PM
I’m not sure which way to go on this but we have very few real-world, definitive terminologyIds in the current format and very, very few duplications/overlaps. I’d be happy just accept the current urls as defined by FHIR as being synonyms. It is a very short list. Maintaining an ongoing set of mappings between ‘our list’ and what is likely to be the ong-ing de-facto source of truth does not feel terribly attractive. THe current urls are pretty short, and I would assume that there is similar desire to keep them so
Thomas Beale November 9, 2020 at 1:51 PM
I think our internal storage form in DV_CODED_TEXT and CODE_PHRASE (where the terminology id and code are held) should stay as it is, with the terminology_id being considered a namespace id, e.g. ‘snomed_ct’, ‘loinc’ etc.
We then need to define a global location where terminology namespaces are defined for all of openEHR - this can allow for synonyms such as ‘snomed_ct’, ‘SNOMED-CT’ etc.
We can also use the BASE class Terminology_id to represent terms in URI form. We would need to allow this to be substituted in e.g. JSON or some ITS serialisation representation.
In XML, we can use the normal ns facilities to indicate the namespacing within a given document.
Some details to be worked out here, but I don’t see a need to change what appears inside DV_CODED_TEXT or CODE_PHRASE.

Pieter Bos September 21, 2020 at 12:05 PM
the term constraint operational binding in ADL 2 syntax is:
[acx@terminologyId]
Although I do not think anyone supports that syntax yet, I think it will be something that is needed.
I’m not sure if it’s possible to replace terminologyId with a URI there. That has the potential to introduce quite a lot of ambiguities in the grammar, leading to even more lexer hacks, and we may need to introduce a different syntax there if we allow URIs there, even if it’s just surrounding the URI with something like “-characters.
Current spec does not allow URI-style terminology ids; various solutions appear possible:
add extra field to CODE_PHRASE (probably not a good solution)
relax TERMINOLOGY_ID regex to allow URIs (at least ':', ... more chars?)
The current regex described in https://openehr.org/releases/BASE/latest/docs/base_types/base_types.html#_syntaxes is...
terminology_id = name-str, [ '(', name-str, ')' ] ;
name-str = letter, { letter | digit | '_' | '-' | '/' | '+' } ;
...and thus does not allow URIs
Additionally create a mapping table for openEHR of all terminology namespace names like 'SNOMED-CT', 'loinc'.