In ADL/AOM, constraints can be made on computed properties as well as 
stored ones.  If you look at the spec, EVENT.offset is computed as 
time.diff(parent.origin). Making a constraint on EVENT.time, which is 
the absolute time (which is what you want in the data) is annoying 
because you want to constraint on relative time, not absolute time. It 
would mean creating constraints in the rules section with an equivalent 
expression, i.e.

.../some/path/to/event[5 min]/time - .../some/path/to/event[5 
min]/parent/origin <= PT5m

- thomas

On 09/01/2012 11:41, Diego Bosc? wrote:
> When I was trying to validate an archetype with the reference model
> (openEHR-EHR-OBSERVATION.apgar), I found something strange on all
> 'event' archetypes.
> The EVENT class has a function (method) that calculates the offset.
> However, in that archetype the offset was restricted as if it was an
> attribute.
> What is the sense for this? Shouldn't this restriction be expressed as
> an assertion over the different attributes? (that is, a restriction
> that must be checked at runtime as it is a result from a method).
> _______________________________________________
> openEHR-technical mailing list
> openEHR-technical at openehr.org
> http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical
>


Reply via email to