FHIR Chat · nasty link error due to this... · IG creation

Stream: IG creation

Topic: nasty link error due to this...


view this post on Zulip Eric Haas (May 25 2018 at 02:56):

(deleted)

view this post on Zulip Eric Haas (May 25 2018 at 02:58):

(deleted)

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (May 28 2018 at 21:03):

hmm. maybe not checking for the errors in the -watch.

view this post on Zulip Eric Haas (May 28 2018 at 21:57):

I can not find a reason for the underlying error

view this post on Zulip Eric Haas (May 29 2018 at 17:28):

Which is my main focus of the this stream

view this post on Zulip 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

view this post on Zulip 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).

view this post on Zulip 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 .

view this post on Zulip Rob Hausam (Jul 14 2018 at 12:35):

We're getting similar "Unable to find Extension" errors in the IPS IG.

view this post on Zulip Grahame Grieve (Jul 16 2018 at 00:23):

umm I don't know what's changed here. Can I reproduce this?

view this post on Zulip 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.

view this post on Zulip Eric Haas (Jul 16 2018 at 17:05):

version 3.0.1 or 3.4.0 in the latest publisher

view this post on Zulip 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

view this post on Zulip Eric Haas (Aug 14 2018 at 02:56):

does anybody else have qa issues with extension like this?

view this post on Zulip 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.

view this post on Zulip 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

view this post on Zulip 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!

view this post on Zulip Eric Haas (Aug 14 2018 at 14:09):

ty grahame, I never would have figured that out!

view this post on Zulip Eric Haas (Aug 14 2018 at 19:24):

mmm ....my errors are still present?

view this post on Zulip Eric Haas (Aug 14 2018 at 19:25):

see https://chat.fhir.org/#narrow/stream/9-committers/subject/ig-build/near/175969

view this post on Zulip Grahame Grieve (Aug 14 2018 at 20:01):

what is

http://hl7.org/fhir/tooling/StructureDefinition/r4ModifierReason

view this post on Zulip 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.

view this post on Zulip 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?

view this post on Zulip 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...

view this post on Zulip Grahame Grieve (Aug 14 2018 at 20:13):

I only see that one extension not found....

view this post on Zulip 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)

view this post on Zulip 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...

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Aug 14 2018 at 23:28):

adding it where?

view this post on Zulip Eric Haas (Aug 14 2018 at 23:36):

that will get us down to <100 i hope

view this post on Zulip 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.

view this post on Zulip Eric Haas (Aug 14 2018 at 23:39):

Screen-Shot-2018-08-14-at-4.39.15-PM.png

view this post on Zulip 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

view this post on Zulip Eric Haas (Aug 14 2018 at 23:40):

why is there a value[x] for this extension?

view this post on Zulip Eric Haas (Aug 14 2018 at 23:40):

the other extensions don't render this way

view this post on Zulip Grahame Grieve (Aug 14 2018 at 23:41):

oh. I was looking for broken links...

view this post on Zulip Eric Haas (Aug 14 2018 at 23:42):

each one of those value{x} links will creates a broken link error in qa.html

view this post on Zulip Grahame Grieve (Aug 14 2018 at 23:42):

the links look ok to me

view this post on Zulip Eric Haas (Aug 14 2018 at 23:44):

the number of qa link errors jump by about a 100 when I added that extension.

view this post on Zulip 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])

view this post on Zulip Grahame Grieve (Aug 14 2018 at 23:46):

the broken links are in the json template

view this post on Zulip 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>

view this post on Zulip Grahame Grieve (Aug 14 2018 at 23:48):

I don't think it should walk into the extension here...

view this post on Zulip 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. :-/

view this post on Zulip Eric Haas (Aug 14 2018 at 23:53):

any way I still don't think we need to look at value[x] in snapshot.

view this post on Zulip 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

view this post on Zulip Eric Haas (Aug 14 2018 at 23:56):

never mind that did not fix the link errors I'm getting

view this post on Zulip 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)

view this post on Zulip Eric Haas (Aug 15 2018 at 00:00):

no that did not fix anything

view this post on Zulip Eric Haas (Aug 15 2018 at 00:02):

Maybe its myframework? - should I throw this on a different framework and try it?

view this post on Zulip Eric Haas (Aug 15 2018 at 00:05):

What does " the broken links are in the json template" mean exactly?

view this post on Zulip 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?

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Aug 15 2018 at 01:36):

that doesn't explain why the snapshot generator walks into the extension

view this post on Zulip Lloyd McKenzie (Aug 15 2018 at 01:38):

I presume so the URL is in the snapshot for rendering

view this post on Zulip Grahame Grieve (Aug 15 2018 at 01:40):

can render anyway. if that's the only reason, it's not enough

view this post on Zulip 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.

view this post on Zulip 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

view this post on Zulip 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

view this post on Zulip Grahame Grieve (Aug 15 2018 at 02:09):

and where's the source for this test thing?

view this post on Zulip 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?)

view this post on Zulip Grahame Grieve (Aug 15 2018 at 03:11):

so, rendering:

view this post on Zulip Grahame Grieve (Aug 15 2018 at 03:13):

pasted image

view this post on Zulip 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?

view this post on Zulip Lloyd McKenzie (Aug 15 2018 at 03:41):

Sorry, had to rebuild a couple of IGs to see

view this post on Zulip 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

view this post on Zulip Lloyd McKenzie (Aug 15 2018 at 03:42):

pasted image

view this post on Zulip Lloyd McKenzie (Aug 15 2018 at 03:43):

The data type of the base extension was CodeableConcept and the base binding wasn't extensible.

view this post on Zulip Grahame Grieve (Aug 15 2018 at 04:04):

what is this in regard to?

view this post on Zulip Grahame Grieve (Aug 15 2018 at 04:04):

I have just committed a change to render profiled extensions differently

view this post on Zulip Grahame Grieve (Aug 15 2018 at 04:05):

any IG authors who have one of these should regenerate and look at the rendering

view this post on Zulip Lloyd McKenzie (Aug 15 2018 at 04:24):

Seems ok to me

view this post on Zulip Grahame Grieve (Aug 15 2018 at 05:22):

that'll be because the build failed and you didn't get a new IG publisher

view this post on Zulip 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

view this post on Zulip Lloyd McKenzie (Aug 15 2018 at 15:03):

Rebuilt with the update. And I can live with the change.

view this post on Zulip 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

view this post on Zulip Eric Haas (Aug 15 2018 at 15:22):

https://github.com/Healthedata1/IG-Template2 is the source repro

view this post on Zulip 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())]'

view this post on Zulip 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)

view this post on Zulip Lloyd McKenzie (Aug 15 2018 at 18:38):

I'm working on fixing that one

view this post on Zulip Eric Haas (Aug 15 2018 at 19:50):

which one ? extension.extension or spreadsheet parser?

view this post on Zulip Eric Haas (Aug 15 2018 at 19:50):

and thanks

view this post on Zulip Lloyd McKenzie (Aug 15 2018 at 20:35):

extension having slice name on extension root - should now be fixed

view this post on Zulip Eric Haas (Aug 15 2018 at 23:59):

@Grahame Grieve what about extension.extension showing up in snapshot. Its killing us over here | - P

view this post on Zulip Grahame Grieve (Aug 16 2018 at 00:05):

so does this fix the broken links ?

view this post on Zulip 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?

view this post on Zulip 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?

view this post on Zulip Eric Haas (Aug 16 2018 at 02:07):

OK I will create a new extension. And see what happens.

view this post on Zulip 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.

view this post on Zulip Eric Haas (Aug 16 2018 at 06:20):

Screen-Shot-2018-08-15-at-11.15.43-PM.png

view this post on Zulip 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.

view this post on Zulip Brian Postlethwaite (Aug 16 2018 at 06:23):

This may mean you can keep the json view

view this post on Zulip 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

view this post on Zulip Eric Haas (Aug 16 2018 at 06:32):

OK

view this post on Zulip Eric Haas (Aug 16 2018 at 06:35):

@Brian Postlethwaite but the status-identifier- extension is not complex

view this post on Zulip 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

view this post on Zulip Brian Postlethwaite (Aug 16 2018 at 07:20):

I agree, this is something else.

view this post on Zulip Brian Postlethwaite (Aug 16 2018 at 07:21):

I'll keep hunting tonight too.


Last updated: Apr 12 2022 at 19:14 UTC