bot subscription fhirpath query syntax
# support
b
I'm trying to run a bot only when a resource is updated and meets the fhirpath criteria. (https://www.medplum.com/docs/subscriptions/subscription-extensions#expression-based-criteria) Here is my Subscription filter:
Copy code
"extension": [
            {
              "url": "https://medplum.com/fhir/StructureDefinition/fhir-path-criteria-expression",
              "valueString": "%current.identifier.where(system='com.system.dev').exists()"
            }
          ]
Here is a simplified resource snippet:
Copy code
{
  "identifier": [
    {
      "use": "official",
      "system": "com.system.dev",
    }
  ],
  "resourceType": ...
I've tried different variations of the
valueString
. Depending on the variation, it seems to always run (not expected) or not run (not expected). What is the correct fhirpath to only run when the
identifier
system
is a specific string (
'com.system.dev'
)? Thank you!
188 Views