# Is terminology_id=local compatible to not specifying a code list in the archetype? **Category:** [ADL](https://discourse.openehr.org/c/adl/40) **Created:** 2021-10-07 20:55 UTC **Views:** 506 **Replies:** 3 **URL:** https://discourse.openehr.org/t/is-terminology-id-local-compatible-to-not-specifying-a-code-list-in-the-archetype/1921 --- ## Post #1 by @pablo In the conformance tests data sets I created, I have an OPT with an ELEMENT.value = DV_CODED_TEXT in which the terminology_id = local but there is no code list specified. Since that is specified in an archetype and wasn't constrained any more, this ends up in the OPT. And when I commit a COMPOSITION complying with that OPT I get a validation error, I guess from Archie, in EHRBASE, because the code specified, which is autogenerated, doesn't match the DV_CODED_TEXT.value. I guess it is looking for codes and texts in the OPT, and since none is specified, it considers that an error. But my question is about the archetype and template, is this case even valid? Thanks ``` ELEMENT true true false false 0 1 at0005 value true true false false 0 1 DV_CODED_TEXT true true false false 1 1 defining_code true true false false 1 1 CODE_PHRASE true true false false 1 1 local ``` --- ## Post #2 by @thomas.beale Just happened to be reworking the Antlr grammars for just this case tonight. `[local::]` is valid according to the existing grammar. I'm inclined to make it invalid, i.e. at least 2 at-codes are required (one is already handled with just `[at0123]`). If the intention is to allow 'any at-code in the archetype', no constraint at all is needed, so I can't see any use for `[local::]`. --- ## Post #3 by @pablo The only case I can think of in ADL is the definition of a generic archetype so it can be constrained in specializations or in the template itself. Though the issue is if that ends up in the OPT because there was no further constraint at ADL or template level. So for archetypes it might be valid but I guess it shouldn't be valid for templates/OPTs. --- ## Post #4 by @pablo @thomas.beale I have fixed this on our test templates and recommended the team to add an extra validation for the REST API on the POST /template to verify for code text constraints with local terminology without a list of codes specified. As said, I don't think this is strictly wrong on archetypes. I guess it could be for "finalized" archetypes, which I think is supported in ADL 2. --- **Canonical:** https://discourse.openehr.org/t/is-terminology-id-local-compatible-to-not-specifying-a-code-list-in-the-archetype/1921 **Original content:** https://discourse.openehr.org/t/is-terminology-id-local-compatible-to-not-specifying-a-code-list-in-the-archetype/1921