# Template Designer - remove slot

**URL:** https://discourse.openehr.org/t/template-designer-remove-slot/15364
**Category:** Technical (archive)
**Created:** [3 May 2015 02:49 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364 "2015-05-03T02:49:25Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [3 May 2015 02:49 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/1 "2015-05-03T02:49:25Z")

</div>

Hi, I’m creating a template from the Encounter archetype using the TD.

That archetype has a slot in the compo.context.other\_context. I don’t use that slot so I don’t want it to appear in my final OPT, but I couldn’t find any way in the TD to let me remove that node or put 0..0 on the cardinality, so the exported OPT has the slot.

Is there any way to do this? Maybe other OPT designers?

I’m using TD v2.6.1214Beta

Thanks!

---

<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: [3 May 2015 07:27 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/2 "2015-05-03T07:27:07Z")

</div>

Hi Pablo,

This is not possible. The ability to ‘close’ a slot comes with ADL1.5/2

Ian

---

<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: [3 May 2015 10:37 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/3 "2015-05-03T10:37:44Z")

</div>

Hi Diego,

My understanding is that ADL 1.4 does not formally support slot closures or indeed setting ocurrences of any element to 0 in specialisations/templates.

Certainly not supported in the openEHR Archetype Editor.

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: [3 May 2015 10:45 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/4 "2015-05-03T10:45:45Z")

</div>

I assumed that it was an optional slot, if not you could never "remove" it.

---

<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: [3 May 2015 11:10 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/5 "2015-05-03T11:10:20Z")

</div>

Agree - by ‘remove’, I mean set occurences to 0, not remove it altogether.

Ian

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [3 May 2015 16:12 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/6 "2015-05-03T16:12:50Z")

</div>

Hi Ian,

Looking at the current AOM, the ARCHETYPE\_SLOT has an occurrences attribute, I think that specifying 0..0 occurrences is legal for ADL 1.4, that way I can “remove” the slot.

Also this is compatible with the node occurrences in the Encounter archetype because is 0..\*:

allow\_archetype CLUSTER[at0002] occurrences matches {0.._} matches { – Extension  
include archetype\_id/value matches {/._/}  
}

I think is the template designer that is not allowing to constraint the slot occurrences.

Any thoughts?

---

<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: [4 May 2015 06:29 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/7 "2015-05-04T06:29:08Z")

</div>

As far as I understand it, the AOM/ADL 2 “close” statement avoids including further archetypes into a slot, but do no remove it. To do that, we have to put its occurrences to 0..0, which is perfectly legal in AOM/ADL 1.4 (unless the original slot has a minimal occurrence \>=1, of course).

---

<div class="post-metadata">

### Author: ![Seref](https://discourse.openehr.org/user_avatar/discourse.openehr.org/seref/32/13_2.png) [@Seref](https://discourse.openehr.org/u/Seref)
#### Post date: [4 May 2015 07:22 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/8 "2015-05-04T07:22:51Z")

</div>

It makes perfect sense to me. A slot is part of the model. The constraint mechanisms of ADL work _on_ the types of RM. Closing a slot or setting occurrence to 0 would both leave the model intact but constrain the set of instances compatible with the model. I’d classify this as further constraining the model.

Removing the slot would create another model, or at least that is how I’d see it.

---

<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: [4 May 2015 10:07 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/9 "2015-05-04T10:07:54Z")

</div>

ok thanks all.

This looks like a TD limitation then.

Ian

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [4 May 2015 15:11 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/10 "2015-05-04T15:11:43Z")

</div>

Awesome, I’ll add this to the TD JIRA. Do anyone remember where that JIRA is?

---

<div class="post-metadata">

### Author: ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)
#### Post date: [16 May 2015 19:39 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/11 "2015-05-16T19:39:16Z")

</div>

Here is a n - please add it here. - thomas

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [24 May 2015 01:34 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/12 "2015-05-24T01:34:41Z")

</div>

Hi Thomas, trying to create an issue I got this error\>

Assignee: The default assignee does NOT have ASSIGNABLE permission OR Unassigned issues are turned off.

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [25 May 2015 16:30 UTC](https://discourse.openehr.org/t/template-designer-remove-slot/15364/13 "2015-05-25T16:30:08Z")

</div>

Hi Thomas,

Please let me know when I can create issues for the TD. I have found a couple more. Thanks!
