Stream: implementers
Topic: Constraints on Optional fields
Nick George (Feb 25 2022 at 20:41):
Xposting this from fhirpath, since it's really less a question about mechanics of fhirpath and more about the implementation:
A lot of resources have a name
field, and a warning regex that name.matches('[A-Z]([A-Za-z0-9_]){0,254}')
My validation engine barfs on this when name
is absent, because it says that this expression evaluates to {}
which is not true
.
Should this expression instead be name.exists() implies name.matches('[A-Z]([A-Za-z0-9_]){0,254}')
? Or else put the constraint on name
rather than the root element?
Ex.: http://hl7.org/fhir/plandefinition-definitions.html#PlanDefinition
Last updated: Apr 12 2022 at 19:14 UTC