Stream: Profiling Academy
Topic: Help with a FHIRPath expression?
Joan Harper (Jan 14 2021 at 21:05):
I have created a Patient profile and I am trying to implement a constraint --> Must have [identifier of type JHN] or [address and phone]
I initially wrote the FHIRPath expression as:
(identifier.type.coding.code="JHN") or (address.exists() and telecom.exists()) --- the two test cases that should trigger the error (no JHN and no address, no JHN and no telecom) come back with success instead of fail.
I tried changing it to:
(identifier.type.coding.code="JHN") or ((address.exists()) and (telecom.exists())) --- I got the same result
If a resource is missing JHN, or address, or phone, the validation succeeds as expected.
If a resource is missing JHN and address, or JHN and phone, the validation succeeds when it should fail.
Does anyone have any idea what is wrong with this FHIRPath expression?
Appreciate any help.
Joanie
Last updated: Apr 12 2022 at 19:14 UTC