Stream: IG creation
Topic: Broken links
Lloyd McKenzie (Nov 14 2021 at 21:13):
In SDC, I'm still getting a bunch of broken link messages based on narrative references that definitely resolve and look totally correct as far as I can tell. For example:
The link 'http://hl7.org/fhir/R4/QuestionnaireResponse.html' for "QuestionnaireResponse" cannot be resolved
I'm also seeing this (for no good reason I can figure out):
The link 'StructureDefinition-sdc-questionnaire-search.html/StructureDefinition-sdc-questionnaire-subQuestionnaire.html' for "sub-questionnaire" cannot be resolved
Finally, I'm having extra pages being created for contained value sets and other resources where there are no XML/JSON/TTL pages being generated for them - and I'm not sure why...
Grahame Grieve (Nov 15 2021 at 00:42):
The link 'http://hl7.org/fhir/R4/QuestionnaireResponse.html' for "QuestionnaireResponse" cannot be resolved
that's a case error
Grahame Grieve (Nov 15 2021 at 00:45):
and you generated it or something
Grahame Grieve (Nov 15 2021 at 01:02):
the other two issues are template problems - to do with contained resources
Grahame Grieve (Nov 15 2021 at 01:02):
they get their own page, so they get a typed page, but there's no source to reference
Lloyd McKenzie (Nov 15 2021 at 02:34):
I don't think it's a template problem - or at least not anything the templates can do anything about... There's no entries for these pages in artifacts.json or pages.json or anything else that the templates could use to figure out "what kind of template should apply here?". They also don't get included in the ToC, get breadcrumbs, get section numbers or anything else.
Lloyd McKenzie (Nov 15 2021 at 02:42):
The templates drive off the metadata in the JSON files. What entry should be in the config.json to indicate the template to use for these 'contained' resources? Also, why wouldn't we break out the XML/JSON/TTL for them? Just seeing the narrative isn't that helpful. What a lot of people are going to want to do is go see the raw structure. Ideally in the template we'd have a link that said "contained content extracted from xxx" with a hyperlink to the base resource. However, to make that work, we need to know it's contained and have the relevant metadata available in a data file.
Lloyd McKenzie (Nov 15 2021 at 03:04):
On the first part, I folded to lower-case - still including the .html. I now get this:
The link 'http://hl7.org/fhir/R4/questionnaireresponse' for "QuestionnaireResponse" cannot be resolved
Lloyd McKenzie (Nov 15 2021 at 03:05):
Which is particularly weird given that the narrative in the CapabilityStatement says http://hl7.org/fhir/R4/questionnaireresponse.html
Grahame Grieve (Nov 15 2021 at 03:28):
well, you could try actually adding the .html bit
Grahame Grieve (Nov 15 2021 at 03:29):
the template can produce pages for these - and used to.
Grahame Grieve (Nov 15 2021 at 03:29):
when I added the code generation for that.
Grahame Grieve (Nov 15 2021 at 03:29):
and if you want to link to source, link to the source in the xml/json that actually contains it
Lloyd McKenzie (Nov 15 2021 at 03:58):
I did add the .html bit. It's there in the source. It's not in the output page. I don't know why...
Grahame Grieve (Nov 15 2021 at 03:58):
in the resource source:
Grahame Grieve (Nov 15 2021 at 03:58):
<a href="{{site.data.fhir.path}}questionnaireresponse">QuestionnaireResponse</a>
Grahame Grieve (Nov 15 2021 at 03:59):
input\resources\capabilitystatement-sdc-form-archiver.xml
Lloyd McKenzie (Nov 15 2021 at 03:59):
I haven't pushed the change that has the .html. I will now.
Lloyd McKenzie (Nov 15 2021 at 04:02):
Now pushed.
Lloyd McKenzie (Nov 15 2021 at 04:06):
I'm happy for the template to produce pages for these. But the publisher needs to create links for them in the pages.json file and there needs to be something in the config.json in the template that allows the template to set rules for what layout should be used for these 'contained' files.
I disagree that pointing to the 'owning' resource is a terribly useful thing to do. If I'm looking at a 'contained' resource that's one of 10+, the last thing I want to see when I click on the 'XML' or 'JSON' tab is to be jumped back to the root of the parent resource. That's not helpful from a navigation process, nor does it allow them to see what they want to see.
Grahame Grieve (Nov 15 2021 at 05:19):
well, I don't know how entries for resources get into pages.json. it looks to me like it's generated straight off the IG resource, though I see that the template can change that part of the resource
Grahame Grieve (Nov 15 2021 at 05:31):
and I don't see anything different in config.json. I'm not sure how that can be, because it clearly needs something to manage the different source reference
Grahame Grieve (Nov 15 2021 at 05:32):
is to be jumped back to the root of the parent resource
Why would we do that when we could go straight to the contained resource (container.xml.html#{{id}})?
Grahame Grieve (Nov 15 2021 at 05:36):
Now pushed.
Doesn't look any different to me
Elliot Silver (Nov 15 2021 at 06:13):
I think this is something I was poking at almost a year ago and finally gave up on trying to do a fix. See https://github.com/HL7/fhir-ig-publisher/issues/228.
Lloyd McKenzie (Nov 15 2021 at 06:43):
Ah. Didn't know we had ids. There's still the problem of jumping to a completely different 'resource' - so we couldn't use tabs. And people would have to use the back arrow to navigate back to the narrative. But I guess that's semi-manageable.
Right now, pages is driven by the pages in the IG, which are in turn driven by the list of artifacts available in the IG after it sucks in resources. How do I find out what the 'contained' resources are - and what they're going to be called so I can create the relevant pages for those?
Lloyd McKenzie (Nov 15 2021 at 06:43):
As for the SDC references, I realized that we were looking at two different sets of links. I've now addressed that problem.
Grahame Grieve (Nov 15 2021 at 07:09):
you have to iterate them, and they'll be called whatever you define the pattern is, based on their id
Lloyd McKenzie (Nov 15 2021 at 14:58):
It's not super-efficient for the templates to try to process every model. Can we define an extension you can spit out in the IG on the resource entries that indicates the resource type, id and (if available) the title and description of each of the contained resources? As well as adding them into the artifacts.json file?
Grahame Grieve (Nov 16 2021 at 02:01):
ok http://hl7.org/fhir/tools/StructureDefinition/contained-resource-information
Grahame Grieve (Nov 16 2021 at 02:17):
<extension url="http://hl7.org/fhir/tools/StructureDefinition/contained-resource-information">
<extension url="type">
<valueCode value="ValueSet"/>
</extension>
<extension url="id">
<valueId value="LL2821-8"/>
</extension>
</extension>
Lloyd McKenzie (Nov 16 2021 at 02:25):
And title and description if they exist? :)
Grahame Grieve (Nov 16 2021 at 02:54):
ok
Nagesh Bashyam (Nov 16 2021 at 20:32):
I am having a few broken links in the CapabilitySTatements
IG: https://github.com/HL7/fhir-health-care-surveys-reporting-ig
Broken Links are being reported when I refer to external IGs and their resources.
For e.g : {{site.data.fhir.ver.subscriptionsIg}}/OperationDefinition-backport-subscriptiontopic-list.html
The same links work on Pages (*.md). Is there something special about Capability STatements where the above variables do not work. By the way, the variable {{site.data.fhir.path}} variable works.
Nagesh Bashyam (Nov 17 2021 at 05:35):
@Grahame Grieve @Lloyd McKenzie Any thoughts on the broken links to External IGs in CapabilityStatements posted above ?
Grahame Grieve (Nov 17 2021 at 05:35):
still on my todo list
Nagesh Bashyam (Nov 17 2021 at 05:37):
:+1:
Grahame Grieve (Nov 18 2021 at 01:05):
I have no idea. It all looks like it should work to me, but it's a jekyll thing.
Grahame Grieve (Nov 18 2021 at 01:06):
however... the replacement won't happen in the actual instances, that go in the package - so I recommend against trying to do this
Grahame Grieve (Nov 18 2021 at 01:06):
I know it's duplicative, but you should just put the whole URL in the resource narrative
Last updated: Apr 12 2022 at 19:14 UTC