Am having a problem with FHIRPath datetime expressions in HAPI 6.0.1.
The R4 fhirpath engine correctly evaluates this expression: (effective as Period).start + 24 'h'
The FhirInstanceValidator fhirpath engine (seems to be using the r5 version though my context is r4):
- succeeds the first time after server boot
- fails on successive tries with this error: (Error evaluating FHIRPath expression: right operand to + has the wrong type Quantity (@char 14))
Any ideas on how to fix it?
I did trace it down to FhirPathEngine.opPlus(..), where this condition holds:
!((Base)right.get(0)).isPrimitive() && (!((Base)left.get(0)).isDateTime() && !"0".equals(((Base)left.get(0)).primitiveValue()) && !((Base)left.get(0)).hasType(new String[]{"Quantity"})
left is an element with value "2013-04-02T09:30:10+01:00" - is neither datetime nor quantity (but the R4 engine seemed to handle it just fine).