# question about archetype **Category:** [Implementers (archive)](https://discourse.openehr.org/c/implementers-archive/158) **Created:** 2007-05-16 13:23 UTC **Views:** 2 **Replies:** 4 **URL:** https://discourse.openehr.org/t/question-about-archetype/12413 --- ## Post #1 by @system Please allow me a question, I don't know if an archetype on tne openehrwebsite correct is and I would like to have a confirmation I foudn structure below in the archetype: openEHR\-EHR\-EVALUATION\.goal\.v1 It has an ELEMENT, and an ELEMENT can only have one \(or none\) attribute: value, accordig the lates version of document "Data structures" The attribute "value" inside Element has to RM\-objects connected: DV\_INTERVAL<COUNT> and DV\_INTERVAL<QUANTITY> Both RM\-objects have a attribute lower, of a diffrent kind, but on the same path: /data\[at0001\]/items\[at0005\]/items\[at0007\]/value/lower Is this construction allowed, and if not, what is wrong with it Thanks, Bert --- ## Post #2 by @sebastian.garde Bert, If I understand correctly, that is the way a 'Choice' of different datatypes is modelled in archetypes: In the goal archetype you can choose to use either DV\_INTERVAL<COUNT> or DV\_INTERVAL<QUANTITY> for the Target Measurement \(as the correct datatype depends on the target itself\)\. Lower/upper limits can consequently then be different too\. I believe that this construction is allowed\. Regards Sebastian --- ## Post #3 by @system Sebastian Garde schreef: > Bert, > > If I understand correctly, that is the way a 'Choice' of different datatypes is modelled in archetypes: > In the goal archetype you can choose to use either DV\_INTERVAL<COUNT> or DV\_INTERVAL<QUANTITY> for the Target Measurement \(as the correct datatype depends on the target itself\)\. Lower/upper limits can consequently then be different too\. > > I believe that this construction is allowed\. >   Thank you very much, Sebastian, I didn't know that\. You helped me a lot\. Sounds reasonable to me\. If you are wrong we will certainly find out, because of others telling us\. kind regards Bert Verhees --- ## Post #4 by @thomas.beale Bert Verhees wrote: > Sebastian Garde schreef: >   >> Bert, >> >> If I understand correctly, that is the way a 'Choice' of different datatypes is modelled in archetypes: >> In the goal archetype you can choose to use either DV\_INTERVAL<COUNT> or DV\_INTERVAL<QUANTITY> for the Target Measurement \(as the correct datatype depends on the target itself\)\. Lower/upper limits can consequently then be different too\. >> >> I believe that this construction is allowed\. >>   It is \- it is a normal consequence of OO subtyping\. \- thomas --- ## Post #5 by @system > Bert Verhees wrote: >> Sebastian Garde schreef: >> >>> Bert, >>> >>> If I understand correctly, that is the way a 'Choice' of different >>> datatypes is modelled in archetypes: >>> In the goal archetype you can choose to use either DV\_INTERVAL<COUNT> >>> or DV\_INTERVAL<QUANTITY> for the Target Measurement \(as the correct >>> datatype depends on the target itself\)\. Lower/upper limits can >>> consequently then be different too\. >>> >>> I believe that this construction is allowed\. >>> > > It is \- it is a normal consequence of OO subtyping\. I understand, I did not know how to read it\. Bert --- **Canonical:** https://discourse.openehr.org/t/question-about-archetype/12413 **Original content:** https://discourse.openehr.org/t/question-about-archetype/12413