FHIR Chat · Forge 16.5 for STU3 · implementers

Stream: implementers

Topic: Forge 16.5 for STU3


view this post on Zulip Michel Rutten (Aug 18 2017 at 15:13):

Forge 16.5 for STU3 is now available for download from https://simplifier.net/forge.

This new release fixes some issues reported by the community and also introduces a couple of usability improvements. All users are encouraged to update to the current version.

FHIR API Improvements:

  • Update the FHIR .NET API library to 0.93.5-beta6
  • Stability improvements for DirectorySource
  • Handle bug in SimpleQuantity core datatype definition

Features:

  • NEW! Automatically initialize default slicing discriminator for type slices
  • NEW! FHIR Path expression validation

Bug fixes:

  • EXPERIMENTAL! Improved matching of base element types
  • Serialize constraints on meta.security.* and meta.tag.* elements to differential in proper order
  • eld-16 sliceName validation
  • Explicitly remove old child constraints after updating element type
  • Import resources from FHIR server and/or Simplifier
  • Fix broken hyperlink to Furore news page on Simplifier

Detailed release notes: https://simplifier.net/ui/OrganizationNews/Show?id=34

If you discover any issues or want to submit a feature request, please contact us.

Happy profiling!

Michel Rutten

view this post on Zulip Chris Munro (Aug 23 2017 at 11:08):

Forge 16.5 for STU3 is now available for download from https://simplifier.net/forge.

This new release fixes some issues reported by the community and also introduces a couple of usability improvements. All users are encouraged to update to the current version.

FHIR API Improvements:

  • Update the FHIR .NET API library to 0.93.5-beta6
  • Stability improvements for DirectorySource
  • Handle bug in SimpleQuantity core datatype definition

Features:

  • NEW! Automatically initialize default slicing discriminator for type slices
  • NEW! FHIR Path expression validation

Bug fixes:

  • EXPERIMENTAL! Improved matching of base element types
  • Serialize constraints on meta.security.* and meta.tag.* elements to differential in proper order
  • eld-16 sliceName validation
  • Explicitly remove old child constraints after updating element type
  • Import resources from FHIR server and/or Simplifier
  • Fix broken hyperlink to Furore news page on Simplifier

Detailed release notes: https://simplifier.net/ui/OrganizationNews/Show?id=34

If you discover any issues or want to submit a feature request, please contact us.

Happy profiling!

Michel Rutten

I've just created an extension in forge and run it through the validator and I get an warning

Overall result: SUCCESS

[WARNING] Evaluation of FhirPath for constraint 'eld-16' failed: Invocation of 'binary.or' failed: Invocation of 'matches' failed: parsing "^[a-zA-Z0-9\-\_]+$" - Unrecognized escape sequence \_. (at StructureDefinition.differential[0].element[1])

Validation run took 53 miliseconds

<differential>
<element id="Extension.url">
<path value="Extension.url"/>
<fixedUri value="http://www.eldbdev.org/StructureDefinition/MyExtension"/>
</element>
<element id="Extension.value[x]:valueString">
<path value="Extension.valueString"/>
<sliceName value="valueString"/>
<type>
<code value="string"/>
</type>
</element>
</differential>

Is this an error in the underlying validator rather than the extension? An incorrectly copied regular expression?

view this post on Zulip Michel Rutten (Aug 23 2017 at 11:30):

Hi @Chris Munro, apparently the current regex on element id rejects the "[" and "]" brackets.
Per convention, the standard element id for polymorphic elements is always generated from the original element name, e.g. "value[x]". We agreed on this format during the Madrid WGM.
So I guess the element id regex should be updated to also accept "[]" characters.
Maybe you can submit an issue to GForge?

view this post on Zulip Chris Munro (Aug 23 2017 at 12:48):

Thanks @Michel Rutten for the reply- I know that the warning is safe to ignore now.

view this post on Zulip Michel Rutten (Aug 23 2017 at 12:52):

Did you already submit a GForge issue, or shall I take care of it?

view this post on Zulip Chris Munro (Aug 23 2017 at 12:54):

Did you already submit a GForge issue, or shall I take care of it?

No, I haven't used GForge before so if you could do that it would be great, thanks

view this post on Zulip Michel Rutten (Aug 23 2017 at 13:21):

Done: #13769
https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=13769

view this post on Zulip Chris Munro (Aug 23 2017 at 13:32):

Thanks @Michel Rutten

I've noticed that even with <sliceName value="Test"/>

I still get a warning of
[WARNING] Evaluation of FhirPath for constraint 'eld-16' failed: Invocation of 'binary.or' failed: Invocation of 'matches' failed: parsing "^[a-zA-Z0-9\-\_]+$" - Unrecognized escape sequence \_. (at StructureDefinition.differential[0].element[6])

This looks to be because in the spec there are escape characters (https://www.hl7.org/fhir/elementdefinition-definitions.html) :

eld-16: sliceName must be composed of proper tokens separated by "/" (expression : sliceName.empty() or sliceName.matches('^[a-zA-Z0-9\\/\\-\\_]+$'), xpath: not(exists(f:sliceName/@value)) or matches(f:sliceName/@value, '^[a-zA-Z0-9\\/\\-\\_]+$'))

and the way java/c# process the escaped character in the regular expression?

view this post on Zulip Michel Rutten (Aug 23 2017 at 13:46):

Hi @Chris Munro, this has been fixed in release 16.5. I recommend you update to the latest version.
Originally, I literally copied the regex from the spec to C# code. But as you discovered, character escaping rules are different. The current release should fix that.

view this post on Zulip Michel Rutten (Aug 23 2017 at 14:09):

BTW Are you referring to the .NET Validator or the Java validator?

view this post on Zulip Chris Munro (Aug 23 2017 at 14:10):

Yes it's fine in forge, but in simplifier there is still an error showing once you load in the profile from forge and the same for the C# API validator I'm not sure about the java one though

view this post on Zulip Michel Rutten (Aug 23 2017 at 14:25):

OK thanks for the feedback. We'll have to fix this in the API.

view this post on Zulip Michel Rutten (Aug 23 2017 at 14:28):

https://github.com/ewoutkramer/fhir-net-api/issues/413

view this post on Zulip Ewout Kramer (Aug 23 2017 at 14:34):

Funny this shows up here and now - it means our unit-test that checks all fhirpath statements must have missed this.

view this post on Zulip Ewout Kramer (Aug 23 2017 at 15:00):

It seems that on its way from the FHIRPath expression in the StructureDefinition for ElementDefinition to the FHIRPath validator, the double backslashes get unescaped. @Chris Munro, did the message on your screen really have \_ in the pattern or had it \\_ ? Just to make sure Zulip did not mess things up ;-)

view this post on Zulip Josh Mandel (Aug 23 2017 at 15:01):

(BTW in Zulip you can click a message and "view source" to see how it was initially entered.)

view this post on Zulip Chris Munro (Aug 23 2017 at 15:01):

pasted image

view this post on Zulip Josh Mandel (Aug 23 2017 at 15:03):

And from the FHIR spec:

pasted image

view this post on Zulip Ewout Kramer (Aug 24 2017 at 11:02):

Ok, so I think I found the culprit. I was assuming my FHIRPath parser complained about the unrecognized escape sequence, but in fact it is the .NET regex evaluator that is called in the end. It will not accept \_ as an escape sequence, and from what I find (superficially) in Google, it's right not to accept it. \/ and \- are fine, but \_ is not....

view this post on Zulip Ewout Kramer (Aug 24 2017 at 11:03):

For PCRE, and most other so-called Perl-compatible flavors, escape these outside character classes:
.^$*+?()[{\|
and these inside character classes:
^-]\
For POSIX extended regexes (ERE), escape these outside character classes (same as PCRE):
.^$*+?()[{\|
Escaping any other characters is an error with POSIX ERE.

view this post on Zulip Ewout Kramer (Aug 24 2017 at 11:03):

(note that last sentence, it's from https://stackoverflow.com/questions/399078/what-special-characters-must-be-escaped-in-regular-expressions)

view this post on Zulip Ewout Kramer (Aug 24 2017 at 11:17):

Created a tracker item: https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=13771


Last updated: Apr 12 2022 at 19:14 UTC