Stream: IG creation
Topic: References to Extensions Do Not Resolve
Saul Kravitz (Aug 02 2019 at 15:58):
I'm working on the DaVinci Plan-net IG. We are incorporating extensions from VHDir into profiles of USCore and R4 resources.
So, I'm trying to incorporate extensions like http://hl7.org/fhir/uv/vhdir/StructureDefinition/newpatients (http://hl7.org/fhir/uv/vhdir/2018Sep/StructureDefinition-newpatients.html).
Apparently, since these are still in ballot, they don't have resolvable URLs, like extensions in published IGs.
The IG publisher flags them as unresolvable extensions: "URL value 'http://hl7.org/fhir/uv/vhdir/StructureDefinition/newpatients' does not resolve"
The type of extension is listed as: ?? [CanonicalType[http://hl7.org/fhir/uv/vhdir/StructureDefinition/newpatients]]
What can be done?
Lloyd McKenzie (Aug 02 2019 at 17:28):
The validator will complain about any extensions referenced from external IGs if you haven't specifically identified those IGs as dependencies. That's the only way it can know how to resolve the URLs.
Lloyd McKenzie (Aug 02 2019 at 17:29):
Given that VHDir depends on USCore, why is USCore referencing VHDir extensions? If they're useful in US-Core, then migrate them and define them there. Otherwise, US-Core shouldn't be referencing any extensions from IGs that depend on it. In terms of referencing extensions defined in IGs within the core spec, that's a harder problem. @Grahame Grieve ?
Saul Kravitz (Aug 02 2019 at 18:11):
USCore isn't referencing VHDir extensions (unless Plan-Net is destined to be annointed as part of USCore)...
I'll need to learn how to define the VHDir (and USCore?) IG as a dependency....
Bryn Rhodes (Aug 02 2019 at 18:53):
Here's an example from QI-Core, depending on US-Core STU 3:
Bryn Rhodes (Aug 02 2019 at 18:53):
https://github.com/cqframework/qi-core/blob/master/ig.json#L26
Saul Kravitz (Aug 02 2019 at 19:14):
Thanks @Bryn Rhodes
When I added the dependency to my ig.json file as follows:
Here is the dependency I added to ig.json:
"dependencyList": [
{
"package": "hl7.fhir.us.core",
"version": "3.0.0",
"name": "uscore",
"location": "http://hl7.org/fhir/us/core"
},
{
"package": "hl7.fhir.uv.vhdir",
"version": "0.2.0",
"name": "VhDir",
"location": "http://build.fhir.org/ig/HL7/VhDir/"
}
I get a strange IG builder error:
Load VhDir (http://build.fhir.org/ig/HL7/VhDir/) from hl7.fhir.uv.vhdir#0.2.0 (43.0793sec)
Version mismatch. This IG is version 4.0.0, while the IG 'VhDir' is from version 3.5.0 (will try to run anyway) (43.0800sec)
Publishing Content Failed: Unsupported version 3.5.0 (43.0802sec)
(43.0802sec)
Use -? to get command line help (43.0802sec)
(43.0802sec)
Stack Dump (for debugging): (43.0802sec)
java.lang.Exception: Unsupported version 3.5.0
at org.hl7.fhir.igtools.publisher.Publisher.loadFromPackage(Publisher.java:2130)
at org.hl7.fhir.igtools.publisher.Publisher.loadIg(Publisher.java:2201)
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:1685)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1123)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:606)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6208)
Exception in thread "main" java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6218)
(FHIR IG Publisher Version 0.9.43-SNAPSHOT - Built 2019-07-23T10:57:09.698Z - Git 6aa2358bd653)
The VHDir IG clearly says it is based on R4:
{
"resourceType": "ImplementationGuide",
"id": "hl7.core.uv.vhdir-0.2.0",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h2>VhDir</h2><p>The official URL for this implementation guide is: </p><pre>http://hl7.org/fhir/uv/vhdir/ImplementationGuide/ig</pre></div>"
},
"url": "http://hl7.org/fhir/uv/vhdir/ImplementationGuide/ig",
"version": "0.2.0",
"name": "VhDir",
"title": "Validated Healthcare Directory",
"status": "draft",
"publisher": "HL7 International - Patient Admistration Working Group",
"contact": [
{
"telecom": [
{
"system": "url",
"value": "http://www.hl7.org/Special/Committees/pafm/index.cfm"
}
]
}
],
"copyright": "Used by permission of HL7 Patient Administration Committee, all rights reserved Creative Commons License",
"packageId": "hl7.fhir.uv.vhdir",
"license": "CC0-1.0",
"fhirVersion": [
"4.0.0"
],
Bryn Rhodes (Aug 02 2019 at 19:16):
Hmmm... check the fhirVersion attribute in your ImplementationGuide resource?
Saul Kravitz (Aug 02 2019 at 19:20):
"packageId": "hl7.fhir.uv.vhdir",
"license": "CC0-1.0",
"fhirVersion": [
"4.0.0"
Lynn Laakso (Aug 02 2019 at 19:32):
https://build.fhir.org/ig/HL7/VhDir/branches/master/qa.html shows the package id not in the usual format hl7.core.uv.vhdir#0.2.0 could that be it? should probably be hl7.fhir.uv.vhdir#0.2.0
Bryn Rhodes (Aug 02 2019 at 19:33):
It looks like there's already a dependencyList entry in the IG, pointing to the current US Core and bulk data:
Bryn Rhodes (Aug 02 2019 at 19:33):
https://github.com/HL7/VhDir/blob/master/ig.json#L1108
Bryn Rhodes (Aug 02 2019 at 19:33):
Is it possible you now have 2 dependencyList entries in your ig.json?
Saul Kravitz (Aug 02 2019 at 19:39):
The dependency list in my plan-net IG has two dependencies:
"dependencyList": [
{
"package": "hl7.fhir.us.core",
"version": "3.0.0",
"name": "uscore",
"location": "http://hl7.org/fhir/us/core"
},
{
"package": "hl7.fhir.uv.vhdir",
"version": "0.2.0",
"name": "VhDir",
"location": "http://build.fhir.org/ig/HL7/VhDir/"
}
],
FHIR 3.5 seems to correspond to FHIR v3.5.0: R4 Ballot #2
http://hl7.org/fhir/2018Sep/
The version history says it is based on 3.5:
http://www.hl7.org/fhir/uv/vhdir/history.cfml
The Implementation guide file says it is based on 4.0….
Saul Kravitz (Aug 02 2019 at 19:48):
For the time being, the content is here: https://github.com/saulakravitz/davinci-pdex-plan-net
Bryn Rhodes (Aug 02 2019 at 20:04):
Right, so you need to point to the "current" version of VhDir, not 0.2.0. 0.2.0 was based on Fhir 3.5, the latest version is based on R4, but it's going to ballot, so they haven't bumped the version in the CI Build yet.
Saul Kravitz (Aug 02 2019 at 20:48):
So, until the conclusion of the ballot, are we stuck? This seems like a accounting /procedural problem, not a technical problem....or am I missing something (as is often the case in my naive wanderings through HL7/FHIR-land).
Bryn Rhodes (Aug 02 2019 at 20:53):
No, change the version in your dependencyList to "current", it should work.
Bryn Rhodes (Aug 02 2019 at 20:55):
Of course, I can't get VhDir to build locally, so there might be a different issue there :)
Saul Kravitz (Aug 02 2019 at 20:59):
Works like a charm.... I never would have figured that out. Thanks for saving us 1-2 days! Enjoy the weekend.
Last updated: Apr 12 2022 at 19:14 UTC