FHIR Chat · value[x] confusion on Instances · shorthand

Stream: shorthand

Topic: value[x] confusion on Instances


view this post on Zulip Patrick Werner (Feb 14 2021 at 15:46):

I got a weird issue with constrains on value[x] in an Extension. What i did:

When now trying to create Instances on these sushi converts this:

* lineItem[=].priceComponent.extension[KostenVersicherter].extension[Kostenbetrag].valueMoney.value = 5.00
* lineItem[=].priceComponent.extension[KostenVersicherter].extension[Kostenbetrag].valueMoney.currency = #EUR

to this:

                   "extension": [
                      {
                        "url": "Kategorie",
                        "valueCodeableConcept": {
                          "coding": [
                            {
                              "code": "0"
                            }
                          ]
                        }
                      },
                      {
                        "url": "Kostenbetrag",
                        "value[x]": {
                          "currency": "EUR"
                        },
                        "valueMoney": {
                          "currency": "EUR",
                          "value": 5
                        }
                      }
                    ]

view this post on Zulip Patrick Werner (Feb 14 2021 at 15:47):

i think the value[x] should be valueMoney in the Instance. Is this a bug? Or am i missing smth?

view this post on Zulip Patrick Werner (Feb 15 2021 at 11:45):

Tried to replicate with defining the extension and profile in FSH, works:
https://fshschool.org/FSHOnline/#/share/2N78gko

view this post on Zulip Patrick Werner (Feb 15 2021 at 11:45):

will dig deeper

view this post on Zulip Patrick Werner (Feb 15 2021 at 12:57):

Changed the fhs created Example to a complex extension -> no change.
https://fshschool.org/FSHOnline/#/share/3jRrZAt

view this post on Zulip Patrick Werner (Feb 15 2021 at 12:58):

FSH seemst to work, i think this is some side effect from another issue

view this post on Zulip Patrick Werner (Feb 15 2021 at 13:56):

And i managed to reproduce! :
https://fshschool.org/FSHOnline/#/share/2Zhcys3

view this post on Zulip Chris Moesel (Feb 15 2021 at 13:59):

I agree that the first output (w/ value[x] in the instance) definitely looks wrong. But if we cannot reproduce it, it will be hard to fix it. First things first -- are you running the latest version of SUSHI?

view this post on Zulip Chris Moesel (Feb 15 2021 at 13:59):

Oh! Our messages crossed paths. I see you reproduced it now!

view this post on Zulip Chris Moesel (Feb 15 2021 at 14:04):

Actually... that's not reproducing the same problem, is it? I don't see any value[x] in the instance. What I do see is an error about cardinality, which actually seems to be caused by a different issue: the top-level "test" extension in the instance is missing the extension URL. This is a different bug that we're aware of and currently working on.

view this post on Zulip Chris Moesel (Feb 15 2021 at 14:04):

SUSHI #751

EDIT: Nope. Not the same issue at 751. I looked at it too quickly. The real problem is that the two FSH statements that should be modifying the same instance of valueMoney are actually creating/modifying two separate extensions. That's a new bug (but still not the same as the one originally reported).

view this post on Zulip Patrick Werner (Feb 15 2021 at 14:05):

ah you are right, i'll keep investigating

view this post on Zulip Chris Moesel (Feb 15 2021 at 14:19):

Logged the new double-extension issue as SUSHI#759.

view this post on Zulip Chris Moesel (Feb 15 2021 at 14:43):

Alright. I just reproduced the value[x] bug by bringing in your exact profile definitions (as JSON) and then creating a FSH Instance that uses them. I haven't had time to look into it -- but I guess it may have to do specifically w/ how the extension is defined. ValueXBug.zip

view this post on Zulip Patrick Werner (Feb 15 2021 at 14:45):

thats also my current guess. Thanks for the "confirmation" :smile:

view this post on Zulip Chris Moesel (Feb 15 2021 at 15:52):

Alright, and that bug is now tracked as SUSHI#760.


Last updated: Apr 12 2022 at 19:14 UTC