Stream: IG creation
Topic: Broken links on publisher-generated narrative
Jean Duteau (Jul 09 2021 at 22:19):
I'm getting a set of broken links on the publisher-generated narrative. It's adding boilerplate narrative which includes a faulty link in the modifierExtension element. "This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the definition of modifier extensions." The "definition of modifier extensions" is a relative link to extensibility.html when it should be an absolute link back to the FHIR specification.
http://build.fhir.org/ig/HL7/davinci-pas/branches/master/qa.html
Jean Duteau (Aug 25 2021 at 20:36):
@Lloyd McKenzie @Grahame Grieve Here is the repository: https://github.com/HL7/davinci-pas/. I @d both of you in case this is a template or a publisher bug. In either case, I need a fix or a confirmation that this is a tooling issue.
Jean Duteau (Aug 25 2021 at 20:44):
I'm also getting the following error:
The generated snapshot has a different number of elements 271 than the originally provided snapshot 273
This is on my Claim profile json. The weird thing is that the input and the output look exactly the same, except for the generated narrative.
Lloyd McKenzie (Aug 25 2021 at 20:48):
Why do you have a snapshot on your input at all?
Jean Duteau (Aug 25 2021 at 20:53):
tl;dr - i took the output profile and made it my input
There is a bug either in SUSHI or in the publisher such that my FSH file can't be used to generate the profile. The generated differential causes a NPE in the IG publisher code. I had to use the generated profile that includes the snapshot.
Jean Duteau (Aug 25 2021 at 20:56):
Jean Duteau (Aug 25 2021 at 21:00):
for SUSHI, I can't have a profile that doesn't include a snapshot.
Grahame Grieve (Aug 25 2021 at 21:05):
this I totally don't understand:
for SUSHI, I can't have a profile that doesn't include a snapshot.
Grahame Grieve (Aug 25 2021 at 21:05):
which source file are we talking about?
Jean Duteau (Aug 25 2021 at 21:10):
Jean Duteau (Aug 25 2021 at 21:11):
Because I'm deriving profiles off of that Claim profile, SUSHI needs a snapshot.
Grahame Grieve (Aug 25 2021 at 21:52):
I can't reproduce this:
The generated snapshot has a different number of elements 271 than the originally provided snapshot 273
Grahame Grieve (Aug 25 2021 at 21:52):
is it in a branch?
Grahame Grieve (Aug 25 2021 at 22:06):
but the broken links are because the snpashot was generated improperly. I don't know where you get it from
Jean Duteau (Aug 25 2021 at 22:09):
i reverted the master branch to have the JSON structure definitions so you can reproduce it. To get the snapshots, I took one that had a differential, removed my links to that profile, and then took the output of the publisher and used that as my input
Grahame Grieve (Aug 25 2021 at 22:10):
when the snapshot is generated. relative references must be updated to absolute references. That hasn't been done in that snapshot.
Jean Duteau (Aug 25 2021 at 22:10):
so the master branch has the profiles as structure definitions and the claim-json branch has the profiles as FSH files (and that gets the NPE I've reported elsewhere)
Grahame Grieve (Aug 25 2021 at 22:10):
This is the corrected profile: StructureDefinition-profile-claim.json
Jean Duteau (Aug 25 2021 at 22:12):
hmm, my claim-inquiry had the absolute references.
Jean Duteau (Aug 25 2021 at 22:12):
thanks
Grahame Grieve (Aug 25 2021 at 22:13):
so, I can build master right now. I should be able to ?
Jean Duteau (Aug 25 2021 at 22:14):
master should build but have the error and broken links
Jean Duteau (Aug 25 2021 at 22:22):
when I build it with the profile you gave me, the broken links go away but the "The generated snapshot has a different number of elements 271 than the originally provided snapshot 273" error is still there.
Jean Duteau (Aug 25 2021 at 22:29):
why don't you just use the output from the published specification?
I tried to do that. I tried to get a published version of the profiles with my changes in them.
Grahame Grieve (Aug 25 2021 at 22:29):
... and?
Jean Duteau (Aug 25 2021 at 22:29):
I ended up with what you saw :)
Grahame Grieve (Aug 25 2021 at 22:30):
well, try again, grab it from /output
Jean Duteau (Aug 25 2021 at 22:30):
I did that. I grab the /output and put it in input/resources and I still get that error. If I diff what I have in input/resources against output, it's the same except for the narrative.
Jean Duteau (Aug 25 2021 at 22:31):
(my input resources don't have the narrative)
Grahame Grieve (Aug 25 2021 at 23:10):
ah
Grahame Grieve (Aug 25 2021 at 23:10):
I see what's happening
Grahame Grieve (Aug 25 2021 at 23:13):
you have to fix it up
Grahame Grieve (Aug 25 2021 at 23:16):
but of course, you don't know how to
Grahame Grieve (Aug 25 2021 at 23:41):
no, you can't fix it. Something weird here. Please explain why you have this profile. It's part of the IG but it's not?
Grahame Grieve (Aug 26 2021 at 01:36):
in the future, if you really need to do this, generate the snapshot using the validator
Jean Duteau (Aug 26 2021 at 01:37):
It is part of the IG. Why do you say that it isn’t? How do you generate the snapshot with the validation? And what is happening that I can’t fix?
Grahame Grieve (Aug 26 2021 at 01:44):
the error gives you no information about how to fix the profile, but you should just regenerate it. The validator can do this:
-version 4.0 -snapshot StructureDefinition-profile-claim.json -output StructureDefinition-profile-claim-snapshot.json
I think that in general, you shouldn't freeze snapshots like that, and something seems wrong to me here. FSH can't make profiles on profiles?
Jean Duteau (Aug 26 2021 at 03:56):
it can make profiles on profiles (which is what I'm doing) but it needs the snapshot to be able to do that @Chris Moesel maybe you want to chime in here on why SUSHI requires imported profiles (i.e. non-FSH profiles) to have the snapshot?
Grahame Grieve (Aug 26 2021 at 04:06):
why does it need to be imported? Just author it the same way as everything else?
Jean Duteau (Aug 26 2021 at 04:09):
well, that's the rub. when I created the profile using FSH, I got an error (https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Slice.20Criteria.20Validation.20failing).
Strangely enough, after creating the snapshot using the validator, I'm now getting the exact same error.
Grahame Grieve (Aug 26 2021 at 04:10):
that means there's a problem in the generated snapshot somewhere, but you won't get that after the next release
Jean Duteau (Aug 26 2021 at 04:10):
to be clearer, by "exact same error", I meant that I'm getting the NPE that I was seeing when I was creating the profile in FSH.
Grahame Grieve (Aug 26 2021 at 04:16):
you didn't talk about an NPE, you showed an index out of bounds error
Jean Duteau (Aug 26 2021 at 04:24):
oops, you're right. I don't know why I wrote NPE there. too late in the day for me
Grahame Grieve (Aug 26 2021 at 04:36):
good. fixed next release
Jean Duteau (Aug 26 2021 at 04:45):
Thx
Chris Moesel (Aug 26 2021 at 12:46):
Jean Duteau said:
it can make profiles on profiles (which is what I'm doing) but it needs the snapshot to be able to do that Chris Moesel maybe you want to chime in here on why SUSHI requires imported profiles (i.e. non-FSH profiles) to have the snapshot?
It sounds like you all worked out the issue. That's good!
Regarding SUSHI and snapshots... When SUSHI builds a profile from FSH, it starts from the baseDefinition (parent). If the parent is another FSH definition, SUSHI can do it's thing just fine (because it maintains its own "shadow" snapshots for FSH definitions) -- but if the parent is not a FSH definition (i.e., it's JSON), then SUSHI needs access to the parent's snapshot in order to build out the diff correctly. Since SUSHI does not have its own snapshot generator, the snapshot just needs to be there in the first place.
Last updated: Apr 12 2022 at 19:14 UTC