# openEHRArchetypes/openEHR-EHR-OBSERVATION.ecg.v1: Is \<any\_allowed\>...allowed?

**URL:** https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159
**Category:** Technical (archive)
**Created:** [28 March 2012 12:47 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159 "2012-03-28T12:47:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ANASTASIOU\_A1](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/a/ee59a6/32.png) [@ANASTASIOU\_A1](https://discourse.openehr.org/u/ANASTASIOU_A1)
#### Post date: [28 March 2012 12:47 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159/1 "2012-03-28T12:47:06Z")

</div>

Hello everyone

I keep getting an error when parsing this ecg archetype (expressed as XML) and i was wondering if this could be because the archetype was uploaded to the CKM when the CKM used a different version of the published openEHR XSDs, if this used to be a bug of the archetype editor or if it could be something that i am doing wrong.

The error i keep getting is "unrecognised element" for \<any\_allowed\>.

In fact, in my small local collection of archetypes\*, this archetype is the only one that has an \<any\_allowed\> element as part of its C\_COMPLEX\_OBJECT definitions.

If i remove \<any\_allowed\>, the archetype is parsed without any problems, but that's usually a way to create problems, not solve them 🙂

I would really like to use this ECG archetype as a test case because it contains a large number of definitions.

According to the specs C\_COMPLEX\_OBJECT is supposed to inherit "any\_allowed" by C\_DEFINED\_OBJECT but the "Archetype.xsd" does not contain an element / attribute definition for \<any\_allowed\> in any of the relevant class definitions.

This is why i suspect come kind of a (possibly older) mismatch between the CKM / Archetype editor code and the XSDs.

What do you think?

Could this be related to this item as well?  
[http://www.openehr.org/mailarchives/openehr-technical/msg05970.html](http://www.openehr.org/mailarchives/openehr-technical/msg05970.html)

I suppose i can safely remove \<any\_allowed\> (?)

Looking forward to hearing from you  
Athanasios Anastasiou

P.S. (\*) The 7 Archetypes i am interested in: (encounter, menstrual\_cycle\_day, blood\_pressure, body\_temperature, body\_weight\_adjusted, ecg, height)

---

<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: [28 March 2012 15:44 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159/2 "2012-03-28T15:44:31Z")

</div>

> Hello everyone
> 
> I keep getting an error when parsing this ecg archetype (expressed as XML) and i was wondering if this could be because the archetype was uploaded to the CKM when the CKM used a different version of the published openEHR XSDs, if this used to be a bug of the archetype editor or if it could be something that i am doing wrong.

No - the xml in CKM is produced on the fly from the adl, so it is always up to date…  
But of course not necessarily always correct: There may well a bug in the generation process of the Java XML generator,  
but can someone say definitely if the any\_allowed tag should be in the xml or not, first?  
(any\_allowed is an operation, not an attribute in the constraint model)

Many archetypes have this in CKM, e.g. when a DV\_TEXT is not further constrained, this would be expressed in XML using the any\_allowed tag.

I assume you refer to this archetype?  
[http://openehr.org/knowledge/OKM.html#showarchetype\_1013.1.276](http://openehr.org/knowledge/OKM.html#showarchetype_1013.1.276)

Sebastian

---

<div class="post-metadata">

### Author: ![ANASTASIOU\_A1](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/a/ee59a6/32.png) [@ANASTASIOU\_A1](https://discourse.openehr.org/u/ANASTASIOU_A1)
#### Post date: [28 March 2012 16:32 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159/3 "2012-03-28T16:32:17Z")

</div>

Hello Sebastian

Thank you for your response.

A couple of quick comments:

Yes, the archetype that you are linking is the one i am referring to.

"any\_allowed" as an attribute could be inherited from C\_DEFINED\_OBJECT from [http://www.openehr.org/svn/specification/TRUNK/publishing/architecture/am/aom1.4.pdf](http://www.openehr.org/svn/specification/TRUNK/publishing/architecture/am/aom1.4.pdf) (page 27)...It is of course also referred to as a function in C\_PRIMITIVE\_OBJECT but it has the indication (effected) (?) page 28 on the same document)

All the best  
Athanasios Anastasiou

---

<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: [28 March 2012 17:16 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159/4 "2012-03-28T17:16:57Z")

</div>

ADL example:

DV\_TEXT matches {\*} – object case

or

value matches {\*} – attribute case

In the AOM it is computed to be True if…

- in a C\_ATTRIBUTE there are no children
- in a C\_COMPLEX\_OBJECT there are no children
- in a C\_PRIMITIVE\_OBJECT, there is no ‘value’, i.e. no attached C\_PRIMITIVE (parent type of C\_DATE, C\_INTEGER etc etc)

I would also expect it to be computed from the XML, since the XML is based in the AOM.

- thomas

---

<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: [28 March 2012 19:57 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159/5 "2012-03-28T19:57:39Z")

</div>

Although interestingly the same archetype, saved as XML via the archetype editor (or in .opts) does not include any\_allowed elements…

\<node\_id\>at0081\</node\_id\>  
  
\<rm\_attribute\_name\>value\</rm\_attribute\_name\>  
  
\<lower\_included\>true\</lower\_included\>  
\<upper\_included\>true\</upper\_included\>  
\<lower\_unbounded\>false\</lower\_unbounded\>  
\<upper\_unbounded\>false\</upper\_unbounded\>  
1  
1  
  
  
\<rm\_type\_name\>DV\_TEXT\</rm\_type\_name\>  
  
\<lower\_included\>true\</lower\_included\>  
\<upper\_included\>true\</upper\_included\>  
\<lower\_unbounded\>false\</lower\_unbounded\>  
\<upper\_unbounded\>false\</upper\_unbounded\>  
1  
1  
  
\<node\_id /\>

Looks like the java parser is behaving a little differently.

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: [29 March 2012 06:49 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159/6 "2012-03-29T06:49:53Z")

</div>

Sounds like the Java XML generator needs to be corrected to never spit this out then. This should be straightforward to fix.  
I wonder however if this is just in there by mistake and nobody ever cared before that this fairly frequent case breaks the schema or if there was some kind of hidden use case for this.

Sebastian

---

<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: [29 March 2012 07:47 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159/7 "2012-03-29T07:47:12Z")

</div>

The XML generator had a comment “not sure if needed” next to the any\_allowed related code.  
So I have removed this now.  
A corrected version is deployed to the openEHR ckm.

Regards  
Sebastian

---

<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: [29 March 2012 08:04 UTC](https://discourse.openehr.org/t/openehrarchetypes-openehr-ehr-observation-ecg-v1-is-any-allowed-allowed/15159/8 "2012-03-29T08:04:23Z")

</div>

Well, last time I checked the serialization and the schema this was  
one of the things I was not sure which was correct. I have to get some  
time to modify the schema with the missing things I detected some time  
ago
