# Runtime name suggestions?

**URL:** https://discourse.openehr.org/t/runtime-name-suggestions/15601
**Category:** Technical (archive)
**Created:** [17 January 2017 07:49 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601 "2017-01-17T07:49:17Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![siljelb](https://discourse.openehr.org/user_avatar/discourse.openehr.org/siljelb/32/12_2.png) [@siljelb](https://discourse.openehr.org/u/siljelb)
#### Post date: [17 January 2017 07:49 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/1 "2017-01-17T07:49:17Z")

</div>

Hi,

We’re trying to finalise the pattern for exclusion archetypes, and would like to use the element names to carry some flavor differences such as “no known history of …” and “no evidence of …”. We’ve considered adding a runtime name constraint to make some level of standardization of these statements, but at the same time we recognize that there will be considerable variation in what will be required as statements in different use cases. So what we’d like to do is to use a kind of “optional runtime name constraint”, or “runtime name suggestion”. We know this isn’t supported by tooling atm, but is it allowed by the specs? If so, how can it be done?

Kind regards,  
**Silje Ljosland Bakke**

Information Architect, RN

Coordinator, National Editorial Board for Archetypes  
Nasjonal IKT HF

Tel. +47 40203298

Web: [http://arketyper.no](http://arketyper.no/) / Twitter: [@arketyper\_no](https://twitter.com/arketyper_no)

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [17 January 2017 10:49 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/2 "2017-01-17T10:49:59Z")

</div>

Hi Silje,

I’m not sure enough of the requirement, but [this ADL logic](http://www.openehr.org/releases/AM/latest/docs/ADL2/ADL2.html#_reference_model_type_refinement) may be what you are looking for. See the DV\_TEXT/DV\_CODED\_TEXT just before the following heading after that section.

The basic logic of this is [described here](http://www.openehr.org/releases/AM/latest/docs/ADL2/ADL2.html#_narrowed_subtype_constraints).

Although these are references from ADL2, they should apply in ADL 1.4 as well.

- thomas

---

<div class="post-metadata">

### Author: ![siljelb](https://discourse.openehr.org/user_avatar/discourse.openehr.org/siljelb/32/12_2.png) [@siljelb](https://discourse.openehr.org/u/siljelb)
#### Post date: [17 January 2017 11:03 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/3 "2017-01-17T11:03:55Z")

</div>

Thank you Thomas, to the extent I understand the ADL, this looks like what we’re looking for. How would the corresponding syntax look in ADL 1.4?

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [17 January 2017 11:16 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/4 "2017-01-17T11:16:51Z")

</div>

Hi Silje

As Thomas has noted, it is possible in adl but is not supported in archetype editor. That is probably fixable but I’m not sure currently how template designer would handle it.

Ian

---

<div class="post-metadata">

### Author: ![siljelb](https://discourse.openehr.org/user_avatar/discourse.openehr.org/siljelb/32/12_2.png) [@siljelb](https://discourse.openehr.org/u/siljelb)
#### Post date: [17 January 2017 11:23 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/5 "2017-01-17T11:23:51Z")

</div>

Thanks! If I knew the syntax I could hack the ADL and test how TD handles it. J

Regards,  
**Silje**

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [17 January 2017 12:36 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/6 "2017-01-17T12:36:38Z")

</div>

It should be the same as for ADL2 except of course, stick to using the correct at-codes, i.e. ‘at0004’ etc, rather than id-codes. SO I think the example from the ADL 2 spec is pretty close to the one you want, with at-codes, and terminal constraints they way you want.

```auto
definition
    ...
        name ∈ {
            DV_CODED_TEXT[id79] ∈ {
                defining_code ∈ {[ac1]}
            }
            DV_TEXT[id14] ∈ {
                value ∈ {/.+/} -- non-empty string
            }
        }
    ...

terminology
    ...
    term_bindings = <
        ["snomed_ct"] = <
            ["ac1"] = <[http://snomed.info/123456789](http://snomed.info/123456789)> -- any SNOMED CT code
        >
    >

```

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [17 January 2017 12:46 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/7 "2017-01-17T12:46:36Z")

</div>

ITEM\_TREE[at0001] matches { – Tree  
items cardinality matches {1.._; unordered} matches {  
CLUSTER[at0009] occurrences matches {0..1} matches { – Flavour  
name matches {  
DV\_TEXT matches {_}  
DV\_CODED\_TEXT matches {  
defining\_code matches {  
[local::  
at0010, – asdasd  
at0011] – asdasda  
}  
}  
}  
…

The main issue is that though the the Archetype Editor will read that construct, it loses the internal codes if the archetype is changed i.e it does not write the data back out again.

Ian

---

<div class="post-metadata">

### Author: ![yampeku](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yampeku/32/25_2.png) [@yampeku](https://discourse.openehr.org/u/yampeku)
#### Post date: [17 January 2017 12:50 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/8 "2017-01-17T12:50:44Z")

</div>

I believe linkEHR supports this, and you can export the archetype to be fully compatible with AD and TD

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [18 January 2017 14:07 UTC](https://discourse.openehr.org/t/runtime-name-suggestions/15601/9 "2017-01-18T14:07:24Z")

</div>

Thanks Diego,

I was hoping you would confirm that.

Ian
