FHIR / sushi

SUSHI (aka "SUSHI Unshortens Short Hand Inputs") is a reference implementation command-line interpreter/compiler for FHIR Shorthand (FSH).
Apache License 2.0
145 stars 44 forks source link

Invalid extension context syntax seems to compile #1525

Closed Fronq closed 1 week ago

Fronq commented 1 week ago

Hi I noticed that extension contexts formatted as * ^context.type = #element are being successfully compiled when from my knowledge the correct FSH syntax should be something along the lines of * ^context[+].type = #element.

cmoesel commented 1 week ago

This is allowed because the spec says:

If the index is omitted, the first element of the array ([0]) SHALL be assumed.

So ^context.type is equivalent to ^context[0].type.