Code4Health-Platform / openehr-care-connect-adaptor

3 stars 8 forks source link

Workaround for Ethercis Date AQL issue #20

Closed freshehr closed 6 years ago

freshehr commented 6 years ago

See https://github.com/ethercis/ethercis/issues/88#issuecomment-365469826

This is causing #17, #16, #15.

The problem is caused by Ethercis not accepting partial dates in query parameters.

e.g. and b_a/activities[at0001]/description[at0002]/items[at0113]/items[at0012]/value/value >= '2000-12-07T14:47Z'

when it expects

and b_a/activities[at0001]/description[at0002]/items[at0113]/items[at0012]/value/value >= '2000-12-07T14:47:00Z'

Suggested workaround convert any partial ISO date to the full date string before we include in the AQL.

Looking further at our code, the tests are passing in full ISO datestrings so something must be stripping the seconds when the dateParam is serialised to a string again.

I still think Ertheris is wrong and should accept partial string but!...!