Stream: IG creation
Topic: nasty link error due to this...
Eric Haas (May 25 2018 at 02:56):
(deleted)
Eric Haas (May 25 2018 at 02:58):
(deleted)
Eric Haas (May 28 2018 at 16:56):
I'm getting this qa error for my extensions a very recent version 3.4.0 build as well a link errors which are new since I didn't change anything but the version.
Path Severity Message template-basic2 error template-basic2: Unable to find Extension 'http://www.fhir.org/guides/test3/StructureDefinition/template-blah' referenced at http://www.fhir.org/guides/test3/StructureDefinition/template-basic2 differential Basic.extension (Simple_Extension)
This occurs for all extension leading to 1500 bad links which oddly will go away after a build refresh using the -watch option.
Grahame Grieve (May 28 2018 at 21:03):
hmm. maybe not checking for the errors in the -watch.
Eric Haas (May 28 2018 at 21:57):
I can not find a reason for the underlying error
Eric Haas (May 29 2018 at 17:28):
Which is my main focus of the this stream
Chris Moesel (Jul 13 2018 at 19:27):
@Eric Haas -- were you ever able to resolve this? I'm getting a similar error using the latest build of the publisher jar. The same source worked fine with the v3.3 jar.
qa-extension-error.png
Chris Moesel (Jul 13 2018 at 19:28):
But... when I browse the IG web pages, everything seems fine (that extension is correctly linked from the profile reporting the error).
Eric Haas (Jul 14 2018 at 08:08):
No, I can't find an error on my end. I'm waiting for a follow-up from @Grahame Grieve on whether is an ig-pub issue .
Rob Hausam (Jul 14 2018 at 12:35):
We're getting similar "Unable to find Extension" errors in the IPS IG.
Grahame Grieve (Jul 16 2018 at 00:23):
umm I don't know what's changed here. Can I reproduce this?
Eric Haas (Jul 16 2018 at 17:04):
here is my test IG: https://healthedata1.github.io/IG-Template2/qa.html from this repo: https://github.com/Healthedata1/IG-Template2
it shows up there see qa.html: https://healthedata1.github.io/IG-Template2/qa.html
It shows up whether I use spreadsheets or Forge.
Eric Haas (Jul 16 2018 at 17:05):
version 3.0.1 or 3.4.0 in the latest publisher
Chris Moesel (Jul 23 2018 at 18:01):
Here is an example from the US Breast Cancer IG... HumanNameProfile adds a PreferredFlag extension. IG publisher complains it cannot find the extension, yet the HumanNameProfile documentation page looks fine (and properly links to the extension).
HumanNameProfile JSON: http://build.fhir.org/ig/HL7/us-breastcancer/StructureDefinition-shr-core-HumanName.json.html
PreferredFlag JSON: http://build.fhir.org/ig/HL7/us-breastcancer/StructureDefinition-cimi-element-PreferredFlag-extension.json.html
QA errors: http://build.fhir.org/ig/HL7/us-breastcancer/qa.html#_scratch_ig-build-temp-L1C73T_repo_resources_structuredefinition-shr-core-HumanName
Eric Haas (Aug 14 2018 at 02:56):
does anybody else have qa issues with extension like this?
Chris Moesel (Aug 14 2018 at 03:06):
We still do (in BreastCancer and ODH IGs). I actually have a decent number of extensions, so those QA errors make my IGs look pretty naughty.
Grahame Grieve (Aug 14 2018 at 04:44):
ok that was a loading order issue - the extensions hadn't been loaded at the point the validator was looking for them
Chris Moesel (Aug 14 2018 at 12:40):
Thanks, @Grahame Grieve. I can confirm that all of those errors disappeared from my IG with the new publisher!
Eric Haas (Aug 14 2018 at 14:09):
ty grahame, I never would have figured that out!
Eric Haas (Aug 14 2018 at 19:24):
mmm ....my errors are still present?
Eric Haas (Aug 14 2018 at 19:25):
see https://chat.fhir.org/#narrow/stream/9-committers/subject/ig-build/near/175969
Grahame Grieve (Aug 14 2018 at 20:01):
what is
http://hl7.org/fhir/tooling/StructureDefinition/r4ModifierReason
Eric Haas (Aug 14 2018 at 20:09):
I have an extension marked as a modifier and that pops up. I'm using spreadsheets so I thought you added it to the parser.
Grahame Grieve (Aug 14 2018 at 20:10):
I'm not familiar with that extension, so it's not surprising to me that the validator isn't either?
Eric Haas (Aug 14 2018 at 20:12):
but that one I at least understand... I am still get the extension link error it sounded l like you fixed the order of resources issue above. ( at least for Chris) These extension live in the same spreadsheet as the resources they extend...
Grahame Grieve (Aug 14 2018 at 20:13):
I only see that one extension not found....
Eric Haas (Aug 14 2018 at 20:24):
I'm sorry, the issue for are the bad links for these:
- StructureDefinition-measurereport-deqm.html#MeasureReport.evaluatedResources.extension.valueReference'
- StructureDefinition-measurereport-deqm.html#MeasureReport.evaluatedResources.extension.
- StructureDefinition-practitioner-deqm.html#Practitioner.extension.valueCodeableConcept'
- 'StructureDefinition-practitioner-deqm.html#Practitioner.identifier.extension'
- StructureDefinition-organization-deqm.html#Organization.identifier.extension'
- StructureDefinition-subscription-deqm.html#Subscription.extension.valueCode'
assuming from the definitions file and all these elements all have been profiled ( slice or in one case an extension)
Eric Haas (Aug 14 2018 at 23:06):
VHDIR has about 3000 bad links due to a bug: The IG publisher is adding a value[x] to extension with a context on the Identifier datatype. I looked the extension closely and there are no errors there. I mocked up an example here since is much easier to wade through it all.
https://healthedata1.github.io/IG-Template2/StructureDefinition-template-basic.html check out the snap shot...
Eric Haas (Aug 14 2018 at 23:08):
the extension is lifted from VhDir and can be viewed here: https://healthedata1.github.io/IG-Template2/StructureDefinition-extension-identifier-status.html
Brian Postlethwaite (Aug 14 2018 at 23:09):
Thanks so much for digging into this one Eric, I wouldn't have been able to find it.
Grahame Grieve (Aug 14 2018 at 23:28):
adding it where?
Eric Haas (Aug 14 2018 at 23:36):
that will get us down to <100 i hope
Eric Haas (Aug 14 2018 at 23:38):
if you look at the link above at the shapshot rendering you will see a bunch of active links to all the value[x] choices for the extension off of Indentifier.
Eric Haas (Aug 14 2018 at 23:39):
Screen-Shot-2018-08-14-at-4.39.15-PM.png
Grahame Grieve (Aug 14 2018 at 23:39):
well, I see what I expect to see and I don't know what you think is wrong
Eric Haas (Aug 14 2018 at 23:40):
why is there a value[x] for this extension?
Eric Haas (Aug 14 2018 at 23:40):
the other extensions don't render this way
Grahame Grieve (Aug 14 2018 at 23:41):
oh. I was looking for broken links...
Eric Haas (Aug 14 2018 at 23:42):
each one of those value{x} links will creates a broken link error in qa.html
Grahame Grieve (Aug 14 2018 at 23:42):
the links look ok to me
Eric Haas (Aug 14 2018 at 23:44):
the number of qa link errors jump by about a 100 when I added that extension.
Eric Haas (Aug 14 2018 at 23:45):
for example:
The link 'StructureDefinition-template-basic.html#Basic.identifier.extension.valueId' for "valueId" cannot be resolved (valid targets: [page-content-wrapper, mandatory-data-elements-and-terminology, tbl-snap-inner, Basic.identifier.extension.id, Basic.implicitRules, Basic.id, all-tbl-diff, Basic.code.coding, Basic.code.coding.id, tabs-summ, tbl-summ, stripe, segment-footer, Basic.code.coding.system, Basic.modifierExtension, Basic.identifier.id, all-tbl-snap-inner, segment-header, Basic.code.coding.display, Basic.created, profile, tabs-diff, all-tbl-summ, tbl-diff, Basic.extension, Basic.identifier.use, all-json-inner, Basic.text, all-tbl-summ-inner, examples, tabs-json, tabs-all, back-to-top, Basic.identifier.value, Basic.code.text, tbl-diff-inner, segment-navbar, Basic.identifier.extension.value_x_, Basic.identifier.assigner, Basic.code.coding.version, Basic, Basic.identifier.extension, Basic.subject, tabs, Basic.author, segment-post-footer, Basic.language, json-inner, all-tbl-snap, Basic.identifier.system, search, Basic.identifier.type, Basic.code, downloads, Basic.code.coding.code, json, tabs-snap, introduction, Basic.code.id, tbl-snap, summary, scope-and-usage, Basic.contained, Basic.identifier.period, all-tbl-diff2-inner, Basic.identifier, Basic.meta, Basic.code.coding.userSelected, all-tbl-diff-inner, project-status, Basic.identifier.extension.url, all-json])
Grahame Grieve (Aug 14 2018 at 23:46):
the broken links are in the json template
Grahame Grieve (Aug 14 2018 at 23:48):
@Lloyd McKenziethe snapshot generator is the problem here - it's walking into the extension, and getting it wrong when it does. But why is it walking into the extension? it should just reference it. Here's the relevant bit of the diff:
<element id="Basic.identifier"> <path value="Basic.identifier"/> <min value="1"/> <max value="1"/> <type> <code value="Identifier"/> </type> <mustSupport value="true"/> <isModifier value="false"/> </element> <element id="Basic.identifier.extension:foo"> <path value="Basic.identifier.extension"/> <sliceName value="foo"/> <min value="1"/> <max value="1"/> <type> <code value="Extension"/> <profile value="http://www.fhir.org/guides/test3/StructureDefinition/extension-identifier-status"/> </type> <mustSupport value="true"/> <isModifier value="false"/> </element>
Grahame Grieve (Aug 14 2018 at 23:48):
I don't think it should walk into the extension here...
Eric Haas (Aug 14 2018 at 23:53):
I think I discovered the broken link issue. had right version, but the specification path was wrong. :-/
Eric Haas (Aug 14 2018 at 23:53):
any way I still don't think we need to look at value[x] in snapshot.
Lloyd McKenzie (Aug 14 2018 at 23:54):
It has to walk into it to get the URL - the URL can't be determined by the profile URL
Eric Haas (Aug 14 2018 at 23:56):
never mind that did not fix the link errors I'm getting
Brian Postlethwaite (Aug 14 2018 at 23:56):
@Eric Haas , is this also causing it not to pick up that its constrained to just the code type?
(and therefore showing all the types)
Eric Haas (Aug 15 2018 at 00:00):
no that did not fix anything
Eric Haas (Aug 15 2018 at 00:02):
Maybe its myframework? - should I throw this on a different framework and try it?
Eric Haas (Aug 15 2018 at 00:05):
What does " the broken links are in the json template" mean exactly?
Brian Postlethwaite (Aug 15 2018 at 00:15):
I'm also wondering why the snapshot is showing all the types, when it was constrained to only code?
Eric Haas (Aug 15 2018 at 00:30):
i'm taking a break from this for a bit at least we have identified the issue
Grahame Grieve (Aug 15 2018 at 01:29):
It has to walk into it to get the URL - the URL can't be determined by the profile URL
@Lloyd McKenzie I don't know what you mean
Lloyd McKenzie (Aug 15 2018 at 01:34):
In order to render the URL for an extension, you have to walk into the extension. The profile URL is not necessarily the URL for the extension - because it could be that the original extension was profiled.
Grahame Grieve (Aug 15 2018 at 01:36):
that doesn't explain why the snapshot generator walks into the extension
Lloyd McKenzie (Aug 15 2018 at 01:38):
I presume so the URL is in the snapshot for rendering
Grahame Grieve (Aug 15 2018 at 01:40):
can render anyway. if that's the only reason, it's not enough
Lloyd McKenzie (Aug 15 2018 at 01:43):
I'm hypothesizing. I don't actually remember. If we're going to remove it, we need to ensure that resources that reference profiled extensions still render correctly.
Grahame Grieve (Aug 15 2018 at 01:51):
@Eric Haas - can you remove sliceName from the root of the extension in the definition please, and see if it makes any difference
Grahame Grieve (Aug 15 2018 at 01:53):
and I know it's nothing to do with what I am investigating, but it doesn't make sense to have an extension with type code and an example binding
Grahame Grieve (Aug 15 2018 at 02:09):
and where's the source for this test thing?
Grahame Grieve (Aug 15 2018 at 02:17):
I copied Eric's definitions into the snapshot tests, and it doesn't walk into the extension in the snapshot.... so why does it do that in the IG? (Eric, does your source have an erroneous snapshot in it?)
Grahame Grieve (Aug 15 2018 at 03:11):
so, rendering:
Grahame Grieve (Aug 15 2018 at 03:13):
Grahame Grieve (Aug 15 2018 at 03:14):
this URL at this point: we understand this to to be the presentation of the URL for the extension, right? what should the rendering be if the reference is to a profile on the extension?
Lloyd McKenzie (Aug 15 2018 at 03:41):
Sorry, had to rebuild a couple of IGs to see
Lloyd McKenzie (Aug 15 2018 at 03:42):
Turns out it wasn't the URL - it was the other stuff: the data type and the binding
Lloyd McKenzie (Aug 15 2018 at 03:42):
Lloyd McKenzie (Aug 15 2018 at 03:43):
The data type of the base extension was CodeableConcept and the base binding wasn't extensible.
Grahame Grieve (Aug 15 2018 at 04:04):
what is this in regard to?
Grahame Grieve (Aug 15 2018 at 04:04):
I have just committed a change to render profiled extensions differently
Grahame Grieve (Aug 15 2018 at 04:05):
any IG authors who have one of these should regenerate and look at the rendering
Lloyd McKenzie (Aug 15 2018 at 04:24):
Seems ok to me
Grahame Grieve (Aug 15 2018 at 05:22):
that'll be because the build failed and you didn't get a new IG publisher
Grahame Grieve (Aug 15 2018 at 11:02):
@Eric Haas I believe that the IG publisher is good on this now, but I suspect that you're still having problems... please check and let me know
Lloyd McKenzie (Aug 15 2018 at 15:03):
Rebuilt with the update. And I can live with the change.
Eric Haas (Aug 15 2018 at 15:09):
@Grahame Grieve
- I made the change to make code required - (will let the VhDIR team know about that)
- updated and ran against the latest build
- as you predicted I am still having the same issue.
- I am looking at my snapshot source
Eric Haas (Aug 15 2018 at 15:22):
https://github.com/Healthedata1/IG-Template2 is the source repro
Eric Haas (Aug 15 2018 at 16:26):
Also now I have errors because the spreadsheet parser is adding a slice name to the extension root.
'StructureDefinition/extension-blah: StructureDefinition error No slice name on root [(snapshot | differential).element.all(path.contains('.').not() implies sliceName.empty())]'
Eric Haas (Aug 15 2018 at 16:34):
so what is happening is extension.extension is getting expanded in the snapshot and we don't want that. ( At least I don't)
Lloyd McKenzie (Aug 15 2018 at 18:38):
I'm working on fixing that one
Eric Haas (Aug 15 2018 at 19:50):
which one ? extension.extension or spreadsheet parser?
Eric Haas (Aug 15 2018 at 19:50):
and thanks
Lloyd McKenzie (Aug 15 2018 at 20:35):
extension having slice name on extension root - should now be fixed
Eric Haas (Aug 15 2018 at 23:59):
@Grahame Grieve what about extension.extension showing up in snapshot. Its killing us over here | - P
Grahame Grieve (Aug 16 2018 at 00:05):
so does this fix the broken links ?
Eric Haas (Aug 16 2018 at 01:53):
which fix? the one that lloyd did? nope.
I'm hoping to at least erase most of the link errors without the extension.extension. did you fix it?
Grahame Grieve (Aug 16 2018 at 02:03):
fix what? the snapshot generator works correctly for me... so I don't know why it's not for you. Did you check the source to see if the source walks into the extension?
Eric Haas (Aug 16 2018 at 02:07):
OK I will create a new extension. And see what happens.
Eric Haas (Aug 16 2018 at 06:13):
OK I admit the links errors are because my templates include the build generated JSON views. So I have reluctantly removed that view.... BUT there is still an extension.extension in the rendering of the snapshot under the datatype but not when the context is resource .... and ... it lists all the value types. I don't think it my source since is happening when I use spreadsheets or use the build generated xml.
Eric Haas (Aug 16 2018 at 06:20):
Screen-Shot-2018-08-15-at-11.15.43-PM.png
Brian Postlethwaite (Aug 16 2018 at 06:23):
I may have found something @Eric Haas , just trying it out now.
I believe it may have something to do with how we've defined the complex extensions is different to the ones that are defined in the spec.
Brian Postlethwaite (Aug 16 2018 at 06:23):
This may mean you can keep the json view
Brian Postlethwaite (Aug 16 2018 at 06:24):
I'm comparing how this one is defined to what we've done, and they are different.
http://build.fhir.org/extension-patient-citizenship.xml.html
Eric Haas (Aug 16 2018 at 06:32):
OK
Eric Haas (Aug 16 2018 at 06:35):
@Brian Postlethwaite but the status-identifier- extension is not complex
Grahame Grieve (Aug 16 2018 at 06:43):
the json view is not the problem - it's a symptom. The problem is that the extension is wrong in the snapshot - and I can't reproduce it in the snapshot tests
Brian Postlethwaite (Aug 16 2018 at 07:20):
I agree, this is something else.
Brian Postlethwaite (Aug 16 2018 at 07:21):
I'll keep hunting tonight too.
Last updated: Apr 12 2022 at 19:14 UTC