You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FhirPath subtraction for dateTime and date are currently not included in the standard functions, but can be simulated by changing the expression to use binary.+ and unary.- which is cumbersome.
Fails: Patient.birthDate - 100 years
Exception: Invocation of operator '-' failed: Unable to cast object of type 'Hl7.Fhir.ElementModel.Types.Date' to type 'Hl7.Fhir.ElementModel.Types.Quantity'.
Works: Patient.birthDate + (-100 years)
We are able to use the desired expression by adding the operations to the symbol table which I think should be included by default.
FhirPath subtraction for dateTime and date are currently not included in the standard functions, but can be simulated by changing the expression to use
binary.+
andunary.-
which is cumbersome.Fails:
Patient.birthDate - 100 years
Exception:
Invocation of operator '-' failed: Unable to cast object of type 'Hl7.Fhir.ElementModel.Types.Date' to type 'Hl7.Fhir.ElementModel.Types.Quantity'.
Works:
Patient.birthDate + (-100 years)
We are able to use the desired expression by adding the operations to the symbol table which I think should be included by default.
FHIRPath date/time subtraction
The text was updated successfully, but these errors were encountered: