Schematron implementation of eld-19 technically incorrect

XMLWordPrintableJSON

    • 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.

            Assignee:
            Grahame Grieve (Inactive)
            Reporter:
            Alexander Henket
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: