Stream: shorthand
Topic: Problem assigning values to specific slice
Pétur Valdimarsson (Apr 15 2020 at 11:00):
Thanks for the new release!
Ran into an issue when trying it out on my fsh-tanks. If I try to assign a value to a specific slice I get an error.
Cannot read property 'some' of undefined File: /[...]/Patient.fsh Line: 9
Here is a sample file that I created to isolate the problem:
Profile: OurNewProfile Parent: Patient Id: our-new-profile * telecom 2.. * telecom ^slicing.rules = #closed * telecom contains phone 1..1 and email 1..1 * telecom[phone].system = #phone
Unsure if this is related to #357
Nick Freiter (Apr 15 2020 at 11:44):
This looks to be an issue with a place in the code where we assumed a slicing.discriminator would exist but it actually does not. You'll notice that if you add something along the lines of:
* telecom ^slicing.discriminator.type = #value * telecom ^slicing.discriminator.path = "system"
the error should go away. But, the discriminator has cardinality 0..1, so we should not be assuming it exists, and you should not be required to add the two lines shown above, so this is a bug we will fix. Thanks for the find!
Chris Moesel (Apr 15 2020 at 19:12):
@Pétur Valdimarsson -- this is fixed in the newly released SUSHI 0.12.1 (which also contains your _updatePublisher contribution!).
Pétur Valdimarsson (Apr 16 2020 at 07:03):
Chris Moesel said:
Pétur Valdimarsson -- this is fixed in the newly released SUSHI 0.12.1 (which also contains your _updatePublisher contribution!).
Excellent! I've verified that this works as expected. Thank you guys for the incredibly fast response :)
Last updated: Apr 12 2022 at 19:14 UTC