# Why can't CLUSTER.dosage.v2 be imported into the SLOT? **Category:** [Template Designer](https://discourse.openehr.org/c/template-designer/93) **Created:** 2024-09-12 02:36 UTC **Views:** 58 **Replies:** 15 **URL:** https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700 --- ## Post #1 by @linforest 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|544x155](upload://lVnrUxDsfEYXLaHUKWqP2oqD5h5.png) The SLOT "Structured dose and timing" has a Constraint: ``` 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|690x145](upload://8ngbom80T4y3hF0mqdsnUWUVOzp.png) BTW, in the recommendation list, neither the top two CLUSTERs could be imported due to the same reason but the other two could. --- ## Post #2 by @pablo The RM doesn't allow a CLUSTER inside a SECTION. A CLUSTER can only be inside some ITEM_STRUCTUREs and inside other CLUSTERs. --- ## Post #3 by @linforest 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) --- ## Post #4 by @ian.mcnicoll Hi Lin, This document should help with usage of the various dose and timing components https://ckm.openehr.org/ckm/documents/1013.17.119 An example of a basic pattern is ``` 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. --- ## Post #5 by @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. --- ## Post #6 by @linforest Many thanks, @ian.mcnicoll. A valuable pattern document :heart: I'll give it try immediately. --- ## Post #7 by @linforest [quote="ian.mcnicoll, post:5, topic:5700, full:true"] 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. [/quote] Haha, EXACTLY as you said. --- ## Post #8 by @linforest [quote="ian.mcnicoll, post:5, topic:5700"] if you want ot use the Medication List Section (I would not)... [/quote] 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. [quote="linforest, post:3, topic:5700"] ``` 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) ``` [/quote] 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... --- ## Post #9 by @ian.mcnicoll Sections can be useful, but we nearly always just use the SECTION.ad_hoc and rename to suit the local use. --- ## Post #10 by @linforest 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. --- ## Post #11 by @linforest 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|690x385](upload://sKqmJ0eZKgUothF9MLihQQLvnX0.png) But still got the error (Error loading ...): ![image|690x310](upload://uEdOYsW42WWkOx2iT2ovvA8vfHJ.png) And in the TD, when right-clicking the CLUSTER "Medication details (v2)" to edit the Archetype, the Archetype Editor gives several **RED errors** :x: as follows. It looks like it can't do some data types conversions. Could it be the cause of the loading error above? ![image|671x407](upload://obaTR2BBAZ6CjjQ7U4BbqYK2lwH.png) --- ## Post #12 by @ian.mcnicoll @sebastian.garde -any thoughts? ``` ELEMENT[at0153] matches { -- Strength numerator value matches { DV_QUANTITY matches {*} } } ``` Is the 'open' Quantity the problem? --- ## Post #13 by @sebastian.garde @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 --- ## Post #14 by @linforest Thanks a lot, @sebastian.garde. --- ## Post #15 by @linforest 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|618x205](upload://9Mt2hABKEiYyGmdf7z2T1KwCRHA.png) --- ## Post #16 by @ian.mcnicoll I think it must be a local issue. Occasionally there is a slow save but mostly it is pretty usable. --- **Canonical:** https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700 **Original content:** https://discourse.openehr.org/t/why-cant-cluster-dosage-v2-be-imported-into-the-slot/5700