# Building Archetypes **Category:** [Implementers (archive)](https://discourse.openehr.org/c/implementers-archive/158) **Created:** 2008-07-10 20:38 UTC **Views:** 6 **Replies:** 3 **URL:** https://discourse.openehr.org/t/building-archetypes/14785 --- ## Post #1 by @Tim_Cook2 Hi All, I am currently attempting to build Instruction archetypes and I'm a bit confused\. From the NHS tree there are two: openEHR\-EHR\-INSTRUCTION\.haemodialysis\_prescription\.v1draft and openEHR\-EHR\-INSTRUCTION\.disposition\.v2draft That have ITEM\_TREEs that do not have openEHR datatypes in them\. They contain a 0 \(zero\) where I expect to find a datatype \(DV\_TEXT,DV\_COUNT,etc\.\) The definition section of the first one is below: --- ## Post #2 by @Thilo_Schuler1 Hi Tim, the archetype contains a slot which references this http://www.openehr.org/wsvn/knowledge/archetypes/dev-uk-nhs/adl/openehr/ehr/structure/openEHR-EHR-ITEM_TREE.haemodialysis.v1draft.adl?op=file&rev=0&sc=0 ITEM\_TREE archetype\. There you find the datatypes you are looking for\.\.\. It is a common pattern in instruction and action archetypes to reference the same ITEM\_TREE structure\. As usually they come in pairs meaning that often you first issue and instruction \(recorded by the instruction archetype\) and possibly later the corresponding action is conducted \(recorded by the action archetype\)\. The data items that need to be recorded are often quite similar, therefore a reusable ITEM\_TREE structure is factored out\. See 8\.2\.5\.7 on page 65\-67 here: http://svn.openehr.org/specification/TRUNK/publishing/architecture/rm/ehr_im.pdf The instruction/action distinction makes it possible to record a workflow \(worflow engines can interact with it\)\. As mentioned ususally they are used in pairs, but if an instruction has never been carried out \(e\.g\. forgotten\) the EHR would not contain a corresponding action\. Conversely it is possible to record 'ad\-hoc' action if suited \(see 8\.2\.5\.1 in the above linke document for this second case\)\. INSTRUCTIONS and ACTIONS are the most "experimental" \(meaning there is the least experience designing and using them\) archetype types\. I will create a number of them soon \(as par of a chronic wound use case\) in the next weeks and I plan to report on that on the list\. Hope this helped, Thilo P\.S\. : Cross\-posted to the clinical list as this might be of interest\. --- ## Post #3 by @Tim_Cook2 Hi Thilo, Thanks for the great explanation even though I didn't state the correct question\. :\-\) I am building 'instances' of archetypes; not the archetypes themselves\. I will be taking a look at my parser to see how I missed the slot references\. Cheers, Tim --- ## Post #4 by @system Hi Tim I think you got an answer somewhere else on this but in case: When the activity description and the action description are the same data then it is useful to use an embedded archetype to carry the data. This is the slot you are seeing and it carries a regex of the name of the archetype: ``` allow_archetype ITEM_TREE occurrences matches {0..*} matches { include archetype_id/value matches {/haemodialysis\.v1draft/} ``` the archetype to go in this slot is: openEHR-EHR-ITEM_TREE.haemodialysis.v1draft I hope that helps - Sam Tim Cook wrote: [details="(attachments)"] ![OceanInformaticsl.JPG|183x82](upload://2lcnRHcC3QqDv6AeaDZuo8M9Qlv.jpeg) [/details] --- **Canonical:** https://discourse.openehr.org/t/building-archetypes/14785 **Original content:** https://discourse.openehr.org/t/building-archetypes/14785