Stream: fhirpath
Topic: fhirpath coalesce equivalent?
Craig McClendon (Mar 08 2019 at 21:07):
Is there any way to do the functional equivalent of COALESCE in FHIRPath?
For instance, if I am trying to extract Patient.gender, and I want to return a default value if the value is empty/null.
Functionally I want something equivalent to:
COALESCE(Patient.name.given, 'unknown')
Is there a way to do that?
Paul Lynch (Mar 08 2019 at 21:45):
You could achieve that with iif:
iif(Patient.name.given.exists(), Patient.name.given, 'unknown')
Last updated: Apr 12 2022 at 19:14 UTC