Stream: IG creation
Topic: Unable to resolve Core Spec Example Link
Ramandeep Dhanoa (Nov 02 2021 at 04:43):
I feel like this has been raised before, but raising it just in-case. The core spec example links in SDC IG are not getting resolved:
image.png [image.png]
@Grahame Grieve @Lloyd McKenzie
Lloyd McKenzie (Nov 02 2021 at 05:03):
This is a situation where core defines examples and we're trying to reference them, but the core 'package' doesn't include examples, so the publication validator doesn't find them.
Ramandeep Dhanoa (Nov 02 2021 at 05:06):
right, should I suppress these ones?
Grahame Grieve (Nov 02 2021 at 06:01):
I'm not following this Lloyd
Ramandeep Dhanoa (Nov 02 2021 at 06:22):
Hi @Grahame Grieve The examples in SDC IG are referencing the core examples, for eg - The task example element 'for' is referencing the core patient example - 'http://hl7.org/fhir/R4/patient-example-proband.html' and QA is showing this as an error 'Unable to resolve resource..
image.png
Lloyd McKenzie (Nov 03 2021 at 03:42):
We talked about this before @Grahame Grieve. The issue is supporting IGs that reference examples in the core spec.
Grahame Grieve (Nov 03 2021 at 03:42):
I don't remember this. But I would think that you add hl7.fhir.r4.examples as a dependency and it'd be fine
Lloyd McKenzie (Nov 03 2021 at 03:44):
@Ramandeep Dhanoa, wanna give that a shot? :)
Vassil Peytchev (Nov 03 2021 at 14:39):
Is there a similar dependency for FHIR core profiles (e.g. hl7.fhir.r4.profiles)? Would that let me reference the vital signs core profile in an IG?
Grahame Grieve (Nov 03 2021 at 18:07):
that just part of core
Ramandeep Dhanoa (Nov 04 2021 at 06:15):
@Lloyd McKenzie sure, will try that.
Ramandeep Dhanoa (Nov 09 2021 at 06:33):
I am wondering what will be the canonical reference to be used when declaring the examples dependency in the IG?
Ramandeep Dhanoa (Nov 09 2021 at 17:58):
@Grahame Grieve any pointers to this? packageId is hl7.fhir.r4.examples, not sure what will be the uri (it's a mandatory field)
Grahame Grieve (Nov 09 2021 at 20:06):
http://hl7.org/fhir/ImplementationGuide/fhir
David Pyke (Nov 09 2021 at 20:07):
" Internal Error - unknown id fhir (from crimplementationguide.asp) . "
Grahame Grieve (Nov 09 2021 at 20:11):
? how to reproduce?
David Pyke (Nov 09 2021 at 20:13):
I clicked on the link
Grahame Grieve (Nov 09 2021 at 20:13):
oh. well, I'll add that to my list.
Lloyd McKenzie (Dec 06 2021 at 04:35):
@Grahame Grieve
The id and URL work, but end up with this:
java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 129
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
at java.base/java.lang.String.substring(String.java:1874)
at org.hl7.fhir.r5.conformance.ProfileUtilities.genFixedValue(ProfileUtilities.java:4777)
at org.hl7.fhir.r5.conformance.ProfileUtilities.generateDescription(ProfileUtilities.java:4706)
at org.hl7.fhir.r5.conformance.ProfileUtilities.generateDescription(ProfileUtilities.java:4525)
at org.hl7.fhir.r5.conformance.ProfileUtilities.genElementCells(ProfileUtilities.java:4218)
at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:4035)
at org.hl7.fhir.r5.conformance.ProfileUtilities.genElement(ProfileUtilities.java:4101)
at org.hl7.fhir.r5.conformance.ProfileUtilities.generateTable(ProfileUtilities.java:3869)
at org.hl7.fhir.r5.renderers.StructureDefinitionRenderer.render(StructureDefinitionRenderer.java:31)
at org.hl7.fhir.r5.renderers.StructureDefinitionRenderer.render(StructureDefinitionRenderer.java:27)
at org.hl7.fhir.r5.renderers.ResourceRenderer.render(ResourceRenderer.java:76)
at org.hl7.fhir.igtools.publisher.Publisher.generateNarratives(Publisher.java:1286)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:4093)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:942)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:794)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:8942)
Cause is that the genFixedValue is trying to strip ".html" off the end of the ref, but the ref is this: "https://simplifier.net/resolve?scope=hl7.fhir.r4.examples@4.0.1&canonical=http://hl7.org/fhir/StructureDefinition/CodeableConcept"
That's the ref that's returned by invoking pkp.getLinkFor('http://hl7.org/fhir/R4/', 'CodeableConcept')
I suspect what's happening is that because the example package and the core package have the same base URL, that resolution is hitting the example package first, failing, and then falling back to some funky simplifier resolution thing (which other parts of our code aren't ready to handle). I'm not sure where that code is though and figure it's probably best for me not to mess with it :)
You can reproduce by grabbing the SDC IG and uncommenting the dependency.
I understand your priority for the next few days is getting ballots out, but if you can tackle this one as soon as you have breathing room, that'd be helpful. We're trying to get SDC out by end of year. (Or at least get the publication request in by then.)
Grahame Grieve (Dec 06 2021 at 23:48):
fixed next release
Lloyd McKenzie (Dec 07 2021 at 21:27):
I'm testing the next release in Eclipse and the good news, is it does fix the issue of the examples not resolving. On the downside, I now have over 400k broken links as all links to the R4 spec in SDC are now listed as broken...
E.g. The link 'http://hl7.org/fhir/R4/structuredefinition-bundle.html#Bundle' for "resourceType" cannot be resolved
Lloyd McKenzie (Dec 07 2021 at 21:27):
(@Grahame Grieve)
Grahame Grieve (Dec 07 2021 at 22:54):
people who test live code get live code issues. This will be fixed when PRs are done
Last updated: Apr 12 2022 at 19:14 UTC