Agree with Diego, I would use indexes only for repeatable data.
--
Kind regards,
Eng. Pablo Pazos Guti?rrez
http://cabolabs.com
> From: yampeku at gmail.com
> Date: Tue, 19 Nov 2013 13:57:43 +0100
> Subject: Re: Index in array's in ADL
> To: openehr-technical at lists.openehr.org
>
> Hi Bert,
>
> Personally I would use:
>
> /items[at0008]/value[1]/value = Jan
> /items[at0008]/value[2]/value = Peter
> /items[at0009]/value/value = Balkenende
>
> Regards
>
> 2013/11/19 Bert Verhees <bert.verhees at rosa.nl>:
> > Hi all,
> >
> > I had following interesting discussion.
> >
> > Suppose we have a cluster containing name of a person.
> >
> > There is a field called firstname, and a field called lastname.
> >
> > The problem is concerning the ADL-path, what should be used.
> >
> > This is a part of the archetype:
> >
> > CLUSTER[at0007] occurrences matches {0..1} matches { -- voornamen
> > items cardinality matches {0..*; ordered} matches {
> > ELEMENT[at0008] occurrences matches {0..*}
> > matches { -- firstname
> > value matches {
> > DV_TEXT matches {*}
> > }
> > }
> > ELEMENT[at0009] occurrences matches {0..1}
> > matches { -- lastname
> > value matches {
> > DV_TEXT matches {*}
> > }
> > }
> > }
> >
> >
> > This is a hypothecical example, only to explain:
> >
> > Because at0008 has upper-occurrences of more then 1 ( a person can have more
> > then one firstnames)
> > And at0009 has upper-occurrences of 1 (people only have one last-name (in
> > this hypothetical country))
> >
> > If we want to express data in a path/value combination, what would be the
> > best solution?
> >
> > /items[at0008][1]/value/value = Jan
> > /items[at0008][2]/value/value = Peter
> > /items[at0009]/value/value = Balkenende
> >
> > /items[at0008][1]/value/value = Jan
> > /items[at0008][2]/value/value = Peter
> > /items[at0009][1]/value/value = Balkenende
> >
> > /items[at0008][1]/value/value = Jan
> > /items[at0008][2]/value/value = Peter
> > /items[at0009][3]/value/value = Balkenende
> >
> > Or would another solution be better?
> > Thanks in advance for suggestions.
> >
> > Kind regards
> > Bert Verhees
> >
> > _______________________________________________
> > openEHR-technical mailing list
> > openEHR-technical at lists.openehr.org
> > http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
>
> _______________________________________________
> openEHR-technical mailing list
> openEHR-technical at lists.openehr.org
> http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20131119/6abf6b62/attachment-0001.html>