Stream: shorthand
Topic: Rules - Order of Flag and Cardinality
Sheila Connelly (Jul 09 2020 at 13:32):
In FSH, Rules are written with Cardinality prior to Flag: * gender 1..1 MS
However, in the generated IG, the Differential Table tab displays the order as Flag before Cardinality. This Flag before the Cardinality sequence is also true for all FHIR Resources on their Structure tab.
sushi casts an error when I switch the order: * gender MS 1..1
For human reading/proofreading of code and IG, it would be nice if the Flag and Cardinality order written in the FSH Rule (Card/Flag) is allowed to match the order in which it appears in the final IG (Flag/Card), which already matches the actual FHIR Resources structure layout (Flag/Card).
Nick Freiter (Jul 10 2020 at 16:22):
That is a good point, we do go in the opposite direction of the rendering. This would be a change to the FSH syntax though, but a minor one, but it isn't something that came up in the ballot. @Mark Kramer or @Chris Moesel, is this something we could add to the FSH 1.0 syntax?
Mark Kramer (Jul 10 2020 at 17:00):
Allowing the cardinality and the flags in either order seems like a helpful feature. I don’t think there would be an objection to adding it to 1.0.
Sheila Connelly (Jul 11 2020 at 13:07):
Great news! Thanks.
Last updated: Apr 12 2022 at 19:14 UTC