openEHR / adl2-core

ADL / AOM 2 (previously known as '1.5') core libs and parser
GNU Affero General Public License v3.0
6 stars 8 forks source link

DV_DURATION on INTERVAL EVENT #5

Closed bjornna closed 9 years ago

bjornna commented 9 years ago

I am not sure what is correct with this.

I trying to serialize the Blood Pressure archetype which has an Interval Event.

INTERVAL_EVENT[at1042] 
.... 
width matches {
    DV_DURATION matches {
        value matches {|PT24H|}
    }
}

This is what gets generated:

width matches {
    DV_DURATION matches {
        value matches {[PT24H,PT24H]}
    }
}

The generation of the text {[PT24H,PT24H]} is done in org.openehr.adl.am.mixin.IntervalMixin. Is this a bug in the IntervalMixin or should the DV_DURATION be treated different in this case?

I am not sure

wolandscat commented 9 years ago

This is Marko's code, not mine obviously, but the syntax is wrong anyway - it should be || not []. A lesser bug that might be expected would be |PT24H..PT24H|

bjornna commented 9 years ago

Great feedback. I was just re-reading ADL and AOM specification and found some answers there. I will have a look at the implementation.

bjornna commented 9 years ago

Added a pull request that fixes this. Closing the issue.