# Why can't CLUSTER.dosage.v2 be imported into the SLOT?

**URL:** https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700
**Category:** Template Designer
**Created:** [12 September 2024 02:36 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700 "2024-09-12T02:36:32Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [12 September 2024 02:36 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/1 "2024-09-12T02:36:32Z")

</div>

During design a medication list ([openEHR-EHR-SECTION.medication\_list.v0](https://ckm.openehr.org/ckm/archetypes/1013.1.609)) to document medication use statements, when I’m trying to drag [openEHR-EHR-CLUSTER.dosage.v2](https://ckm.openehr.org/ckm/archetypes/1013.1.5948) into the SLOT “Structured dose and timing”, the Ocean Template Designer tells me:

![image](https://discourse.openehr.org/uploads/default/original/2X/9/99aa14c73320a7709a18d545b947716c94c4d69f.png)

The SLOT “Structured dose and timing” has a Constraint:

```auto
openEHR-EHR-CLUSTER\.timing_daily(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-CLUSTER\.timing_nondaily(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-CLUSTER\.therapeutic_direction(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-CLUSTER\.dosage(-[a-zA-Z0-9_]+)*\.v2

```

Does the Ocean Template Designer refer to this constraint which would prevent the dragging/importing?

When right-clicking the SLOT, _Dosage v2_ appears on the top:

 ![image](https://discourse.openehr.org/uploads/default/original/2X/3/3ab286b075e8f31782cb1459e8321f0152e13153.png)

BTW, in the recommendation list, neither the top two CLUSTERs could be imported due to the same reason but the other two could.

---

<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: [12 September 2024 05:39 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/2 "2024-09-12T05:39:13Z")

</div>

The RM doesn’t allow a CLUSTER inside a SECTION. A CLUSTER can only be inside some ITEM\_STRUCTUREs and inside other CLUSTERs.

---

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [12 September 2024 05:49 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/3 "2024-09-12T05:49:27Z")

</div>

Thanks, @pablo. But my Composition Template has a structure as follows:

**Composition** : _openEHR-EHR-COMPOSITION.report.v1_  
– **Section** : _openEHR-EHR-SECTION.medication\_list.v0_  
---- **Observation** : _openEHR-EHR-OBSERVATION.medication\_statement.v0_  
------ **SLOT** : _Structured dose and timing_ (where [openEHR-EHR-CLUSTER.dosage.v2](https://ckm.openehr.org/ckm/archetypes/1013.1.5948) is needed)

---

<div class="post-metadata">

### Author: ![ian.mcnicoll](https://discourse.openehr.org/user_avatar/discourse.openehr.org/ian.mcnicoll/32/4430_2.png) [@ian.mcnicoll](https://discourse.openehr.org/u/ian.mcnicoll)
#### Post date: [12 September 2024 07:07 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/4 "2024-09-12T07:07:22Z")

</div>

Hi Lin,

This document should help with usage of the various dose and timing components

[https://ckm.openehr.org/ckm/documents/1013.17.119](https://ckm.openehr.org/ckm/documents/1013.17.119)

An example of a basic pattern is

```auto
Medication order
  Medication item: Atenolol 40mg tabs
  Therapeutic direction..
    Direction sequence: 0
    Dosage administration..
      Pattern sequence: 0
      Dose amount: 1
      Dose unit: tablet
      Timing - daily..
        Named time event: in the morning
    Direction duration: Indefinitely

```

So start with a therapeutic direction cluster in the top slot.

---

<div class="post-metadata">

### Author: ![ian.mcnicoll](https://discourse.openehr.org/user_avatar/discourse.openehr.org/ian.mcnicoll/32/4430_2.png) [@ian.mcnicoll](https://discourse.openehr.org/u/ian.mcnicoll)
#### Post date: [12 September 2024 07:12 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/5 "2024-09-12T07:12:34Z")

</div>

And if you want ot use the Medication List Section (I would not) then the Medicaiton order would slot into Medications slot with in the Section.

---

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [12 September 2024 07:20 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/6 "2024-09-12T07:20:11Z")

</div>

Many thanks, @ian.mcnicoll. A valuable pattern document ❤  
I’ll give it try immediately.

---

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [12 September 2024 07:23 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/7 "2024-09-12T07:23:31Z")

</div>

> [@ian.mcnicoll](#):
>
> And if you want ot use the Medication List Section (I would not) then the Medicaiton order would slot into Medications slot with in the Section.

Haha, EXACTLY as you said.

---

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [12 September 2024 08:24 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/8 "2024-09-12T08:24:18Z")

</div>

> [@ian.mcnicoll](#):
>
> if you want ot use the Medication List Section (I would not)…

For now, it seems like I don’t have any other choice but to do so.

My template requirement (from my exercise modeling scenario) is:

Develop a Composition template for a health checkup report which has many top-level sections . _Medication List_ and _Vaccination List_ are just two sections among them.

> [@linforest](#):
>
> ```auto
> Composition: openEHR-EHR-COMPOSITION.report.v1
> –Section: openEHR-EHR-SECTION.medication_list.v0
> ----Observation: openEHR-EHR-OBSERVATION.medication_statement.v0
> ------SLOT: Structured dose and timing (where [openEHR-EHR-CLUSTER.dosage.v2](https://ckm.openehr.org/ckm/archetypes/1013.1.5948) is needed)
> 
> ```

The structure above is my current design for the Medication List section. Apprently, it doesn’t cover all the needs yet. My thoughts on the other section _Vaccination List_ are much the same. And such a modeling exercise looks like it’s getting bogged down…

---

<div class="post-metadata">

### Author: ![ian.mcnicoll](https://discourse.openehr.org/user_avatar/discourse.openehr.org/ian.mcnicoll/32/4430_2.png) [@ian.mcnicoll](https://discourse.openehr.org/u/ian.mcnicoll)
#### Post date: [12 September 2024 08:33 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/9 "2024-09-12T08:33:24Z")

</div>

Sections can be useful, but we nearly always just use the SECTION.ad\_hoc and rename to suit the local use.

---

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [12 September 2024 08:45 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/10 "2024-09-12T08:45:10Z")

</div>

Yes, most of the sections are renamed from SECTION.ad\_hoc. Initially, All of them were.  
I thought SECTION.medication\_list and SECTION.immunisation\_list would be more specific and therfore suitable.

---

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [12 September 2024 10:04 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/11 "2024-09-12T10:04:36Z")

</div>

So far, the best attempt to cover as many data points as possible. For this, the constraint on the slot “Vaccine details” in the Archetype “Vaccination summary” have even been temporarily changed as highlighted, i.e., from **/openEHR-EHR-CLUSTER.medication(-[a-zA-Z0-9\_]+)\*.v1/** to **/openEHR-EHR-CLUSTER.medication(-[a-zA-Z0-9\_]+)\*.v2/**.

 ![image](https://discourse.openehr.org/uploads/default/original/2X/c/c97c56c5dceb67016bb3785eb24afaef5131889e.png)

But still got the error (Error loading …):

 ![image](https://discourse.openehr.org/uploads/default/original/2X/d/d6cd33bddddf872d57810150fbda48aff94f4c1b.png)

And in the TD, when right-clicking the CLUSTER “Medication details (v2)” to edit the Archetype, the Archetype Editor gives several **RED errors** ❌ as follows. It looks like it can’t do some data types conversions. Could it be the cause of the loading error above?

![image](https://discourse.openehr.org/uploads/default/original/2X/a/a977959b0f51e4ca9eac733e57becdfa69491a8f.png)

---

<div class="post-metadata">

### Author: ![ian.mcnicoll](https://discourse.openehr.org/user_avatar/discourse.openehr.org/ian.mcnicoll/32/4430_2.png) [@ian.mcnicoll](https://discourse.openehr.org/u/ian.mcnicoll)
#### Post date: [12 September 2024 10:15 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/12 "2024-09-12T10:15:18Z")

</div>

@sebastian.garde -any thoughts?

```auto
		ELEMENT[at0153] matches { -- Strength numerator
						value matches {
							DV_QUANTITY matches {*}
						}
					}

```

Is the ‘open’ Quantity the problem?

---

<div class="post-metadata">

### Author: ![sebastian.garde](https://discourse.openehr.org/user_avatar/discourse.openehr.org/sebastian.garde/32/3070_2.png) [@sebastian.garde](https://discourse.openehr.org/u/sebastian.garde)
#### Post date: [12 September 2024 10:48 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/13 "2024-09-12T10:48:22Z")

</div>

@linforest @ian.mcnicoll I don’t have any intimate knowledge of Archetype Editor and have not used it in a long time, but from the error message, yes, it sounds a bit like that might be a problem.

For Template Designer related issues, you can use  
[https://oceanehr.atlassian.net/servicedesk/customer/portal/5](https://oceanehr.atlassian.net/servicedesk/customer/portal/5)

---

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [12 September 2024 10:54 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/14 "2024-09-12T10:54:33Z")

</div>

Thanks a lot, @sebastian.garde.

---

<div class="post-metadata">

### Author: ![linforest](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/ac8455/32.png) [@linforest](https://discourse.openehr.org/u/linforest)
#### Post date: [13 September 2024 02:10 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/15 "2024-09-13T02:10:50Z")

</div>

I guess I had to use [openEHR Archetype Designer Online](https://tools.openehr.org/designer) to complete the above template instead, but the login to this online tool is not very stable (which is one of the reasons why I didn’t use this tool in the first place).

As of now, the template editing process utilizing the [online tool](https://tools.openehr.org/designer) is relatively smooth, although the saving process is a bit time-consuming. Is the slowness of the saving process due to local traffic throttling? But not ervery time.

![image](https://discourse.openehr.org/uploads/default/original/2X/4/448e280ec36dbd98e1a89031cf28a4c364686032.png)

---

<div class="post-metadata">

### Author: ![ian.mcnicoll](https://discourse.openehr.org/user_avatar/discourse.openehr.org/ian.mcnicoll/32/4430_2.png) [@ian.mcnicoll](https://discourse.openehr.org/u/ian.mcnicoll)
#### Post date: [13 September 2024 08:46 UTC](https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700/16 "2024-09-13T08:46:37Z")

</div>

I think it must be a local issue. Occasionally there is a slow save but mostly it is pretty usable.
