FHIR Chat · suggestions / discussion · shorthand

Stream: shorthand

Topic: suggestions / discussion


view this post on Zulip Jose Costa Teixeira (Jan 06 2021 at 14:40):

A couple of things I've been thinking of, hope they are worth discussing:

view this post on Zulip Jose Costa Teixeira (Jan 06 2021 at 14:41):

  1. does sushi / shorthand need to be so sensitive about the whitespace before or after the = sign?

view this post on Zulip Jose Costa Teixeira (Jan 06 2021 at 14:53):

  1. perhaps this is covered by macros: Does / should shorthand support complex objects as aliases?
    If we could say:
Alias: $professionalID =
  * identifier.system = "..."
  * identifier.type = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
  * identifier.use = #official
...

then when we make instances, we could have

performer.identifier = $professionalID
...
reporter.identifier = $professionalID

(sorry for poor example, i'm looking for feedback)

view this post on Zulip Elliot Silver (Jan 06 2021 at 17:44):

Jose Costa Teixeira said:

  1. does sushi / shorthand need to be so sensitive about the whitespace before or after the = sign?

Please make it not care.

view this post on Zulip Nick Freiter (Jan 06 2021 at 19:27):

@Jose Costa Teixeira, in response to 2, is this something you could do using an Inline Instance of an Identifier? Here is an example of how that would look:

Instance: ObservationInstance
InstanceOf: Observation
* identifier[0] = IdentifierInstance

Instance: IdentifierInstance
InstanceOf: Identifier
Usage: #inline
* system = "http://some-system.com"
* type = http://terminology.hl7.org/CodeSystem/v2-0203#PRN
* use = #official

The IdentifierInstance can be re-used anywhere you want that Identifier.

view this post on Zulip Jose Costa Teixeira (Jan 06 2021 at 19:30):

@Nick Freiter right, we could do that. My purpose was to stimulate discussion around the language, because I think it would be very interesting.

view this post on Zulip Jose Costa Teixeira (Jan 06 2021 at 19:31):

if we allow this AND the with syntax, I expect some hours of work to be saved

view this post on Zulip Chris Moesel (Jan 06 2021 at 20:12):

To be clear, what @Nick Freiter posted above (w/ inline instance of Identifier) is valid FSH STU1 syntax and supported today.

Regarding with, yeah -- that would then allow you to do something like this using with and a ruleset instead (which would be slightly fewer lines of code).

Regarding =, I think we have it on our list to look at that. It will require a grammar update, but I think it should be possible.

view this post on Zulip David Hay (Jan 06 2021 at 22:25):

I haven't tried it, but do mixins help with #2?

view this post on Zulip Jose Costa Teixeira (Jan 07 2021 at 00:22):

That would indeed be the same / similar principle, I guess.

view this post on Zulip Jose Costa Teixeira (Jan 07 2021 at 00:23):

maybe my #2 topic is "do we have a generic syntax for reusing mixins with any kind of content?"


Last updated: Apr 12 2022 at 19:14 UTC