Hi All,
I’ve got some questions about data types and structures. I was wondering if someone could help me.
1. Why an item_single can,t be empty but other structures may be. I mean ‘items" attribute’s cardinality in item_single is 1..1 (and this is logical. coz’ an item_single without element is meanless). But in other structures, the cardinality of “items” attribute is 0..1. What’s the point of having an empty list or tree or table (without ant item in it)?
2. What’s the difference between CLUSTER and ITEM_TREE? Both can have CLUSTERs and ELEMENTs. And why in all structures in CKM, there is a Data branch shown in archetype mindmap but in cluster archetypes, there is a Items branch?
3. There is an Interval intrface containing lower and upper attributes. Other intervals like IntervalOfReal, IntervalofDate, IntervalofDateTime, IntervalofTime and IntervalofDuration with lower and upper attributes in xsd file in the site. My question is, why there is not an Interval class that contains an attribute for declaring the type of interval and so get rid of other interval classes for every type?
Thanks in advance
Masoumeh
|
Hi Masoumeh
There is a difficulty that arises with data that is not completely entered and being able to save it in the repository in that state. One could argue that it should all be entirely consistent, but it does mean that it is not so easy to use in reality. I am always arguing for a degree of flexibility in the specs – you are free to put it in your software if you want it like that.
Cheers, Sam
Hi Masoumeh
I’ll try to answer your second question:
Re 2: What’s the difference between CLUSTER and ITEM_TREE? Both can have CLUSTERs and ELEMENTs. And why in all structures in CKM, there is a Data branch shown in archetype mindmap but in cluster archetypes, there is a Items branch?
A Cluster you could “plugin” anywhere within an archetype e.g. somewhere deep down in the data, protocol or state, an ITEM_TREE (or any other structure archetype such as ITEM_LIST, ITEM_SINGLE and ITEM_TABLE) where an ITEM_* structure is expected - e.g. the top-level of data, protocol, state
. Usually you’d use the ITEM_* archetypes to reuse them in both an ACTION and INSTRUCTION archetype, see e.g. medication or follow up in CKM.
The specs determine what structures are displayed in the mindmap in CKM - an observation archetype for example has data, protocol, state - where as a cluster archetype has Items - just being faithful to the specs here.
Sebastian
Sam Heard wrote:
Hi Masoumeh
There is a difficulty that arises with data that is not completely entered and being able to save it in the repository in that state. One could argue that it should all be entirely consistent, but it does mean that it is not so easy to use in reality. I am always arguing for a degree of flexibility in the specs – you are free to put it in your software if you want it like that.
Cheers, Sam
From: openehr-technical-bounces@chime.ucl.ac.uk [mailto:openehr-technical-bounces@chime.ucl.ac.uk] On Behalf Of Masoumeh Seydi
Sent: 21 December 2009 14:53
To: openehr-technical@openehr.org
Subject: data types and structures questions
Hi All,
I’ve got some questions about data types and structures. I was wondering if someone could help me.
1. Why an item_single can,t be empty but other structures may be. I mean ‘items" attribute’s cardinality in item_single is 1..1 (and this is logical. coz’ an item_single without element is meanless). But in other structures, the cardinality of “items” attribute is 0..1. What’s the point of having an empty list or tree or table (without ant item in it)?
2. What’s the difference between CLUSTER and ITEM_TREE? Both can have CLUSTERs and ELEMENTs. And why in all structures in CKM, there is a Data branch shown in archetype mindmap but in cluster archetypes, there is a Items branch?
3. There is an Interval intrface containing lower and upper attributes. Other intervals like IntervalOfReal, IntervalofDate, IntervalofDateTime, IntervalofTime and IntervalofDuration with lower and upper attributes in xsd file in the site. My question is, why there is not an Interval class that contains an attribute for declaring the type of interval and so get rid of other interval classes for every type?
Thanks in advance
Masoumeh
|
- |
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4628 (20091122) __________
The message was checked by ESET NOD32 Antivirus.
--- _______________________________________________ openEHR-technical mailing list [openEHR-technical@openehr.org](mailto:openEHR-technical@openehr.org) [http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical](http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical) __________ Information from ESET NOD32 Antivirus, version of virus signature database 4628 (20091122) __________ The message was checked by ESET NOD32 Antivirus. [http://www.eset.com](http://www.eset.com)
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4628 (20091122) __________ The message was checked by ESET NOD32 Antivirus.
(attachments)

Hi Sebastian,
Stef Verlinden wrote:
Hi Sebastian,A Cluster you could "plugin" anywhere within an archetype e.g. somewhere deep down in the data, protocol or state, an ITEM_TREE (or any other structure archetype such as ITEM_LIST, ITEM_SINGLE and ITEM_TABLE) where an ITEM_* structure is expected - e.g. the top- level of data, protocol, stateIs there a specific reason for this of is is just to keep an archetype 'tidy'?
The way I understand it (and I hope Tom will correct me if I am wrong) is that the ITEM_STRUCTURE classes are a bit more powerful - http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109066824738_487684_2609Report.html
ITEM_TREE is closest to CLUSTER, ITEM_LIST, ITEM_SINGLE, ITEM_TABLE differ slightly, but can all be converted to a CLUSTER using the asHierarchy() operation.
Cheers
Sebastian
Hi All,
> I've got some questions about data types and structures. I was
wondering if someone could help me.
>
> 1. Why an item_single can,t be empty but other structures may be. I
mean 'items" attribute's cardinality in item_single is 1..1 (and this is
logical. coz' an item_single without element is meanless). But in other
structures, the cardinality of "items" attribute is 0..1. What's the
point of having an empty list or tree or table (without ant item in it)?
These larger structures might be partially created at certain points of
time.
>
> 2. What's the difference between CLUSTER and ITEM_TREE? Both can have
CLUSTERs and ELEMENTs. And why in all structures in CKM, there is a Data
branch shown in archetype mindmap but in cluster archetypes, there is a
Items branch?
A CLUSTER is just a low-level 'node' abstraction, that along with ITEM
and ELEMENT provide the basic hierarchical structure building pattern
used in most openEHR & ISO 13606 data. The ITEM_XXX classes are designed
as abstract types and provide rules for their structure and functions
for accessing them. The ITEM_TREE is the 'tree' variant of these data
structures. It has (or could have) all kinds of functions for
interrogating the tree structure that would not necessarily be provided
by CLUSTER/ELEMENT. This level of abstraction also allows the
possibility one day of using more efficient internal structures than
CLUSTER/ELEMENT.
>
> 3. There is an Interval intrface containing lower and upper
attributes. Other intervals like IntervalOfReal, IntervalofDate,
IntervalofDateTime, IntervalofTime and IntervalofDuration with lower and
upper attributes in xsd file in the site. My question is, why there is
not an Interval class that contains an attribute for declaring the type
of interval and so get rid of other interval classes for every type?
This is hard to do in an XSD, in fact I think it is impossible, because
XSD does not support the concept of genericity, i.e. types like
Interval<Date> etc. If you look in the reference model documents (see
Support IM and also Data types (Quantity & Date/time packages) - all
available from the specifications page), you will see that Interval<T>
is indeed defined, and inherited into the appropriate places. The XSD
just defines the resulting concrete types.
- thomas beale
Thanks for the reply. Are you pointing the interval classes?
Regards
Masoumeh
No – I did that in the second email. Sam
Masourmeh,
There is no generics in XML Schema, hence you cannot define a single type for all intervals. The XSD does what compilers that support generics do and creates a real type for each type of T that is used with the generic type. It should also be noted that these IntervalOf* types are only used in XML Archetypes to make it easier to validate and use the resulting archetype document without an AM implementation. These IntervalOf* types are not used in openEHR RM data but instead uses the DV_INTERVAL type that allows any DV_ORDERED as the lower and upper without any insurance that they are of the same type and requires an RM implementation to enforce these RM assertions.
Heath