-
Type:
Technical Correction
-
Resolution: Persuasive
-
Priority:
Medium
-
FHIR Core (FHIR)
-
R5
-
FHIR Infrastructure
-
StructureDefinition
-
ElementDefinition
-
Correction
ElementDefinition invariant eld-19 still has Schematron issues.
Current assertion in fhirPath:
path.matches('[^\\s\\.,:;\\\'"\\/|?!@#$%&*()\\[\\]{}]{1,64}(\\.[^\\s\\.,:;\\\'"\\/|?!@#$%&*()\\[\\]{}]{1,64}(\\[x\\])?(\\:[^\\s\\.]+)?)*')
Leads to assertion in Schematron:
matches(path/@value, '[^\s\.,:;\'"\/|?!@#$%&*()\[\]{}]{1,64}(\.[^\s\.,:;\'"\/|?!@#$%&*()\[\]{}]{1,64}(\[x\])?(\:[^\s\.]+)?)*')
The first problem is that path/@value is missing the namespace prefix. The rest is about escaping.
I think the correct statement should be:
matches(f:path/@value, '^[^\s\.,:;''"/\|\?!@#\$%&\*()\[\]{}]{1,64}(\.[^\s\.,:;''"/\|\?!@#\$%&\*()\[\]{}]{1,64}(\[x\])?(:[^\s\.]+)?)*$')
Note the leading ^ and trailing $ which means the whole string should match and not just somewhere in f:path/@value.
Note that this ticket is related to FHIR-19968.