FHIR Chat · error The element or path you referenced does not exist · shorthand

Stream: shorthand

Topic: error The element or path you referenced does not exist


view this post on Zulip Michaela Ziegler (Dec 21 2021 at 13:46):

With the example here, I get the following errors:

Sushi: error The element or path you referenced does not exist: contact.name.family (00:08.0069)
Sushi: File: C:\Users\micha\Documents\GitHub\ch-ems\input\fsh\instances\patient\1-PeterMuster.fsh (00:08.0070)
Sushi: Line: 52                                                                  (00:08.0071)
Sushi: error The element or path you referenced does not exist: contact.name.given (00:08.0072)
Sushi: File: C:\Users\micha\Documents\GitHub\ch-ems\input\fsh\instances\patient\1-PeterMuster.fsh (00:08.0072)
Sushi: Line: 53

What am I doing wrong?

view this post on Zulip Chris Moesel (Dec 21 2021 at 14:24):

Hi @Michaela Ziegler. When I run your example on FSH Online, it runs without any errors. I also copied it to a local project and ran it using SUSHI and it did not produce any errors. So, I can't reproduce this issue. A couple of things to check:

  1. What version of SUSHI are you using? The latest is 2.2.3.
  2. What version of FHIR does your project specify? I tested using FHIR 4.0.1.

view this post on Zulip Michaela Ziegler (Dec 21 2021 at 17:31):

Hi @Chris Moesel

  1. Sushi: info Running SUSHI v2.2.4 (implements FHIR Shorthand specification v1.2.0) (00:01.0692)
  2. FHIR version 4.0.1

You can find the fsh-file in this repo, I commented the lines for the ci-build out.

view this post on Zulip Chris Moesel (Dec 21 2021 at 20:16):

Thanks, @Michaela Ziegler. I was able to reproduce this locally. I see that this is an instance of CHEmsPatient, whose parent is CHCorePatient. In CHCorePatient I also see that contact is sliced. I experimented a bit and found that if I used one of the slices, it worked correctly. E.g.:

* contact[nameOfMother].name.family = "Muster"
* contact[nameOfMother].name.given = "Erika"

So it seems it only doesn't work if you're not specifying a particular slice. You should be able to do that though -- so it is a bug. But... we'll need to look into it further to see what is going on and fix it.

For now, if it is valid to put the contact into the nameOfMother, nameOfFather, or contact slice, then that should get you by this error.

view this post on Zulip Michaela Ziegler (Dec 21 2021 at 20:23):

Thanks a lot @Chris Moesel . Yes exactly, actually it should be an independent slice.

view this post on Zulip Chris Moesel (Dec 21 2021 at 20:38):

OK. It looks like the problem might be isolated to cases where a path is sliced using a slice name that is the same as the path. In this case, the problem is that contact is sliced with a slice also having the name contact. For some reason, SUSHI doesn't handle this right. I've made a simple example of it here: https://fshschool.org/FSHOnline/#/share/3egT4Lo

view this post on Zulip Chris Moesel (Dec 21 2021 at 20:39):

I've also filed a bug for this: SUSHI#993.

view this post on Zulip Chris Moesel (Dec 22 2021 at 21:02):

Hi @Michaela Ziegler. Our friend, @Mint Thompson dug into this, found the bug, and fixed it! If you upgrade to the latest SUSHI (2.2.5), your FSH should work!


Last updated: Apr 12 2022 at 19:14 UTC