Stream: shorthand
Topic: Bring your own XML resources
Torben M. Hagensen (Aug 10 2020 at 09:06):
Please, can anybody help me with this error from SUSHI?
"Cannot create identifier extension; unable to locate extension definition for: http://hl7.org/fhir/dk/core/StructureDefinition/dk-core-crn-identifier."
FSH resource:
Alias: CPR = http://hl7.org/fhir/dk/core/StructureDefinition/dk-core-crn-identifier
Profile: GatewayCareCitizen
Parent: Patient
Id: gateway-care-citizen
Title: "GatewayCareCitizen"
Description: "Administrative information about a citizen receiving care or care related services."
- identifier 1..1
- identifier.extension contains CPR named identifier 1..1
I have placed the xml structure definition for dk-core-crn-identifier in the ig-data/input/extensions folder . It has the correct url value:
<url value="http://hl7.org/fhir/dk/core/StructureDefinition/dk-core-crn-identifier" />
/Torben
Jose Costa Teixeira (Aug 10 2020 at 10:10):
is CPR the name or ID of the extension?
In any case since it's a BYOX, shoudn't it be the ID?
Torben M. Hagensen (Aug 10 2020 at 10:21):
Jose Costa Teixeira said:
is CPR the name or ID of the extension?
In any case since it's a BYOX, shoudn't it be the ID?
Thanks for your help.
CPR is an alias for the url of the extension. I have tried the id as well as the documentation seems to allow both. Just tried the name with no luck. Do I need to add something to config.yaml or the like?
Nick Freiter (Aug 10 2020 at 12:12):
It seems like you have the right setup. Is it possible you are using an older version of SUSHI? Support for BYO-XML resources was only added in sushi 0.15.0, so if you have an earlier version, that would explain the error. To see if you are running an earlier version, you can try doing:
sushi --version
You can update to the latest version (0.15.1) by doing
npm install -g fsh-sushi@0.15.1
Torben M. Hagensen (Aug 10 2020 at 12:45):
Nick Freiter said:
It seems like you have the right setup. Is it possible you are using an older version of SUSHI? Support for BYO-XML resources was only added in sushi 0.15.0, so if you have an earlier version, that would explain the error. To see if you are running an earlier version, you can try doing:
sushi --version
You can update to the latest version (0.15.1) by doing
npm install -g fsh-sushi@0.15.1
Thanks, but sushi --version does return 0.15.1
Do you (or anyone) have a simple working example that I could try?
Mark Kramer (Aug 10 2020 at 12:54):
@Torben M. Hagensen Did you declare a dependency (in config.yaml) on the IG that contains the extension dk-core-crn-identifier? SUSHI by default only looks at the core FHIR. Anything else needs to be declared as a dependency.
Nick Freiter (Aug 10 2020 at 12:56):
Well, what @Mark Kramer said is usually true, in this case you shouldn't need to declare a dependency, since the dependency is fulfilled by having the definition in ig-data
. Using BYO-XML like this allows you to avoid explicitly declaring the dependency
Nick Freiter (Aug 10 2020 at 12:58):
So in this case I don't think you have to add anything to config.yaml. I will try to make a simple working example of BYO-XML.
Torben M. Hagensen (Aug 10 2020 at 13:18):
Nick Freiter said:
So in this case I don't think you have to add anything to config.yaml. I will try to make a simple working example of BYO-XML.
Thanks - I would appreciate that a lot.
Nick Freiter (Aug 10 2020 at 13:27):
I've made a simple example here https://github.com/ngfreiter/byo-xml-example. I tried to replicate your use case as closely as I could, having a single extension in ig-data/input/extensions
, and referencing that extension from the FSH files. For me this example is working well.
Torben M. Hagensen (Aug 10 2020 at 14:08):
Nick Freiter said:
I've made a simple example here https://github.com/ngfreiter/byo-xml-example. I tried to replicate your use case as closely as I could, having a single extension in
ig-data/input/extensions
, and referencing that extension from the FSH files. For me this example is working well.
Thanks a lot - your example work fine for me as well
Given that I found the problem. My resource should look like this (actually it was not an extension as I thought, but a profile).
Profile: GatewayCareCitizen
Parent: Patient
Id: gateway-care-citizen
Title: "GatewayCareCitizen"
Description: "Administrative information about a citizen receiving care or care related services."
- identifier 1..1
- identifier only dk-core-crn-identifier
Thanks to everyone who helped :-)
Nick Freiter (Aug 10 2020 at 14:18):
Ah that makes sense, glad it works now!
Last updated: Apr 12 2022 at 19:14 UTC