Stream: shorthand
Topic: SUSHI 0.13.0-beta.1
Nick Freiter (May 13 2020 at 22:39):
Announcing SUSHI 0.13.0-beta.1 which adds a new experimental approach to configuring SUSHI. Further details are available in the release notes: https://github.com/FHIR/sushi/releases/tag/v0.13.0-beta.1.
NOTE: This is an experimental beta recommended for established users only.
Install or Update:
To install or update to the beta version, run the following command:
$ npm install -g fsh-sushi@beta
Chris Moesel (May 13 2020 at 22:41):
@David Hay -- this one's for you!
David Hay (May 13 2020 at 22:43):
hurrah!
David Hay (May 13 2020 at 23:20):
Pretty disappointing so far - it just seems to work! Where are the fireworks I was expecting? :)
David Hay (May 13 2020 at 23:21):
One question - how can I specify that a page should open in a separate tab? ie replicating:
<li>
<a target="_blank" href="{{site.data.fhir.path}}index.html">FHIR Spec <img src="external.png" style="text-align: baseline"/></a>
</li>
Pétur Valdimarsson (May 13 2020 at 23:28):
This is AWESOME! Now I can remove quite a few sed -i
workarounds from my build script :D Trying it out first thing in the Swedish morning.
Chris Moesel (May 14 2020 at 00:24):
David Hay said:
One question - how can I specify that a page should open in a separate tab?:
You can't. There. Is that the firework you were looking for?
Chris Moesel (May 14 2020 at 00:25):
But seriously... it's not a current feature. Maybe we can come up w/ something. But for now, if you want "advanced" menu features, I guess you need to provide your own menu.xml
.
Chris Moesel (May 14 2020 at 00:27):
TBH though -- there are some who think SUSHI should not be doing anything at all w/ menu.xml, package-list.json, pages, etc -- so depending on what the feedback is and how discussions go, the entire menu feature may or may not make it through the beta.
Mark Kramer (May 14 2020 at 12:14):
In markdown, you can always fall back on plain html <a href> with target = "_blank"
Chris Moesel (May 14 2020 at 12:54):
That's true and helpful for pages -- but the menu
format in config.yaml isn't markdown, nor is menu.xml
, so it doesn't get at @David Hay's question. One thing we could possibly do is support a new-tab
keyword in the config.yaml to indicate it should open in a new tab, and maybe external
to indicate you want the little external icon. What do you think of something like:
menu:
Home: index.md
FHIR Spec: external new-tab {{site.data.fhir.path}}index.html
David Hay (May 14 2020 at 16:54):
Yep - that should work. In my specific case the url is fixed, so I wouldn't need the {{}} - but it's a good option to have. Interestingly, the other option to use is an iframe - @Jose Costa Teixeira figured that out for me - works well for my specific use case (I wanted to embed an example query page for developers), though won't suit all use cases of course...
Bob Milius (May 15 2020 at 16:05):
I think I found a bug. If I add more than one special-url
parameter to config.yaml
, sushi stops.
parameters:
show-inherited-invariants: true
special-url: http://www.genenames.org/geneId
special-url: http://glstring.org
results in
$ sushi
info Running SUSHI v0.13.0-beta.1
info path-to-fsh-defs defaulted to current working directory
info Using configuration file: /Users/bmilius/Documents/src/fsh/hla-reporting-ig/config.yaml
$
Chris Moesel (May 15 2020 at 16:22):
Yep. I think you found a bug! SUSHI definitely shouldn't just stop without any output or errors.
That said, the way you do multi-value parameters in config.yaml is by declaring the parameter once but using a list as its value. So try this instead:
parameters:
show-inherited-invariants: true
special-url:
- http://www.genenames.org/geneId
- http://glstring.org
Bob Milius (May 15 2020 at 16:51):
about time for me to learn yaml :upside_down:
Chris Moesel (May 15 2020 at 17:53):
Actually, YAML doesn't explicitly forbid repeated keys in its spec -- but we do. ;-)
Kurt Allen (May 17 2020 at 14:05):
Yo @Chris Moesel - thanks for the work you all did last week, FSH is really taking off...
I got a couple questions.
a) How do I set a Range to a fixed code system. i.e. I want to constrain value[x] to a Range of Quantities and constrain the upper and lower units. Not sure hot to do this.
b) This is an expansion of (a). I want to constrain Observation.value[x] to be a Quantity or a Range. I want to constrain the Range and Quantity units to a fixed value (UCUM).
Unless I misunderstand FHIR, I believe I need to slice value[x], so I have a valueQuanityt slice and a valueRange slice and then set each slices pattern to appropriately.
I tried doing this, and I can't access the slices properly.
- value[x] contains quantity 0..1 and range 0..1
- value[x][quantity] only Quantity
- value[x][quantity] units http://hl7.org/fhir/us/breast-radiology/ValueSet/UnitsOfLengthVS#abc
sushi doesn't like value[x][quantity] - I assume I have the slice name syntax wrong?
Thx,
Kurt A.
Nick Freiter (May 18 2020 at 12:50):
@Kurt Allen although value[x]
properties are represented using slicing, they require special treatment, and they are very commonly constrained, so they are treated specially in SUSHI. So instead of accessing slices as value[x][quantity]
, you simply access the valueQuantity
element. I think the following example shows how you would want to achieve what you described:
Profile: MyObservation
Parent: Observation
* value[x] only Quantity or Range
// Setting the units on the quantities and range
* valueQuantity units = http://hl7.org/fhir/us/breast-radiology/ValueSet/UnitsOfLengthVS#abc
* valueRange.low units = http://hl7.org/fhir/us/breast-radiology/ValueSet/UnitsOfLengthVS#def
* valueRange.high units = http://hl7.org/fhir/us/breast-radiology/ValueSet/UnitsOfLengthVS#def
Profile: MyObservation2
Parent: Observation
* value[x] only Quantity or Range
// Setting fixed values on the quantity and range, automatically assuming UCUM units
* valueQuantity = 10 'mm'
* valueRange.low = 5 'mm'
* valueRange.high = 20 'mm'
I think the first example is doing what you described, setting the units system and code on the Quantity and Range. The second example shows how to set a value and units code on a quantity, where the system is automatically assumed to be UCUM. I don't think this is what you were asking about, but I'm adding that on just in case.
Mark Kramer (May 19 2020 at 12:13):
@Nick Freiter @Kurt Allen The first example is not actually correct. Codes follow the pattern {system}#{code}, not {value set}#{code} . It should be something like this:
* valueQuantity units = UCUM#abc
* valueRange.low units = UCUM#def
* valueRange.high units = UCUM#def
The value set only comes into play when an instance is validated (i.e., the code is checked to see it is in the required value set).
Last updated: Apr 12 2022 at 19:14 UTC