Stream: shorthand
Topic: value[x] confusion on Instances
Patrick Werner (Feb 14 2021 at 15:46):
I got a weird issue with constrains on value[x] in an Extension. What i did:
- created a Profile on Money for Euro: https://simplifier.net/erezeptabgabedaten/dav-pr-erp-preisangabeeur
- used this in an Extension: https://simplifier.net/erezeptabgabedaten/davexerpkostenversicherter (extension[Kostenbetrag].value[x])
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
}
}
]
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?
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
Patrick Werner (Feb 15 2021 at 11:45):
will dig deeper
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
Patrick Werner (Feb 15 2021 at 12:58):
FSH seemst to work, i think this is some side effect from another issue
Patrick Werner (Feb 15 2021 at 13:56):
And i managed to reproduce! :
https://fshschool.org/FSHOnline/#/share/2Zhcys3
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?
Chris Moesel (Feb 15 2021 at 13:59):
Oh! Our messages crossed paths. I see you reproduced it now!
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.
Chris Moesel (Feb 15 2021 at 14:04):
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).
Patrick Werner (Feb 15 2021 at 14:05):
ah you are right, i'll keep investigating
Chris Moesel (Feb 15 2021 at 14:19):
Logged the new double-extension issue as SUSHI#759.
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
Patrick Werner (Feb 15 2021 at 14:45):
thats also my current guess. Thanks for the "confirmation" :smile:
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