Stream: IG creation
Topic: Bad links in Vital Signs derived profiles
Jean Duteau (Aug 25 2020 at 15:57):
I am suddenly getting a bunch of broken links in my vital signs derived profiles. When I open the resource html, the narrative now includes the narrative from the base vital signs profile which includes a bunch of links to value sets and such. Except that those links are relative so they fail in my IGuide. Why is the narrative generator including the vital signs narrative in my profile?
Eric Haas (Aug 25 2020 at 17:09):
can you point to an example?
Grahame Grieve (Aug 25 2020 at 21:00):
nothing has changed recently in this space to my knowledge. The links should not be relative, that's for sure. but Eric is right - where's an example?
Jean Duteau (Aug 25 2020 at 21:11):
https://best-im.com/fhir-ig/StructureDefinition-ibm-fda-icsr-patientheight.html
https://best-im.com/fhir-ig/StructureDefinition-ibm-fda-icsr-patientlastmenstrualperiod.html
Grahame Grieve (Aug 25 2020 at 21:14):
I'm not seeing any broken links there
Jean Duteau (Aug 25 2020 at 22:04):
Look at the 2nd one (Last Menstrual Period) and the Text Summary 1) ObservationStatus value set link, 3) Vital Signs value set link, etc.
In general, that entire text summary is NOT from my profile but is seemingly imported from the base profile. I've never seen this summary before nor has the link checker complained before.
Grahame Grieve (Aug 25 2020 at 22:32):
@Lloyd McKenzie @Eric Haas I didn't generate that text that is a problem for Jean. I presume it's coming from the template somewhere
Lloyd McKenzie (Aug 25 2020 at 23:24):
It's grabbing the [id]-summary.xhtml fragment. Pretty sure that comes from the publisher. I don't believe anything has been committed that overrides it - though it does look less sucky than it used to... @Eric Haas ?
Jean Duteau (Aug 25 2020 at 23:37):
but that summary is the vitalsigns summary. Why is it slurping it into my profile? Does the publisher (or template?) slurp the summary of any based-on profile?
Eric Haas (Aug 25 2020 at 23:39):
mmm the summary is being inherited.... lemme see where that is defined. since I want to do custom summaries in the future. but I don't recall anything in the templates.
Jean Duteau (Aug 25 2020 at 23:41):
and the weird thing is that this wasn't happening until I re-ran the publisher today.
Eric Haas (Aug 25 2020 at 23:43):
template...
<div id="tabs-summ">
<div id="tbl-summ">
<p>This structure is derived from <a href="{{site.data.structuredefinitions['{{[id]}}'].basepath}}">{{site.data.structuredefinitions['{{[id]}}'].basename}}</a>
</p>
<div id="tbl-summ-inner">
<a name="summary"> </a>
{%include StructureDefinition-{{[id]}}-summary.xhtml%} ******* INJECTED HERE********
</div>
</div>
</div>
Grahame Grieve (Aug 25 2020 at 23:44):
the summary that the publisher generates looks like the first pic in this topic: https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Profile.20Text.20Summary.20not.20picking.20up.20all.20referenced.20structure
Jean Duteau (Aug 25 2020 at 23:46):
right, that's what I expect to see and what I was seeing before.
Eric Haas (Aug 25 2020 at 23:46):
Jean can you show us the file in the temp/includes for {%include StructureDefinition-{{[id]}}-summary.xhtml%}
Eric Haas (Aug 25 2020 at 23:46):
or just share your repro - where is it?
Jean Duteau (Aug 25 2020 at 23:47):
repro is currently an IBM github so not publicly accessible
Jean Duteau (Aug 25 2020 at 23:48):
another data point - take it for what it's worth - but the Generating Narratives step has taken a long time today
Eric Haas (Aug 25 2020 at 23:51):
ok lemme see if I can reproduce this behavior
Eric Haas (Aug 25 2020 at 23:52):
got my test ig on it....
Jean Duteau (Aug 25 2020 at 23:52):
i can bundle up my source and send it to you
it looks like I don't have a temp/include
Eric Haas (Aug 25 2020 at 23:53):
it would be here :
~/[your-ig]/temp/_includes
Jean Duteau (Aug 25 2020 at 23:53):
my temp directory only has a pages and a qa directory
Grahame Grieve (Aug 25 2020 at 23:56):
you certainly do have a temp/_includes after the build happens
Jean Duteau (Aug 25 2020 at 23:58):
does it get deleted? because I just finished a build and there is no _includes. temp only has pages and qa directory
Grahame Grieve (Aug 25 2020 at 23:58):
then you're putting it somewhere else
Jean Duteau (Aug 25 2020 at 23:59):
ah, it is in temp/pages/_includes
Jean Duteau (Aug 25 2020 at 23:59):
i'm not putting it anywhere :) I think the template might be.
Eric Haas (Aug 26 2020 at 00:01):
I think the template might be.
nope it puts in temp/_includes
Jean Duteau (Aug 26 2020 at 00:02):
you guys keep saying that, but I'm not doing anything but running _genonce.sh with the base template and it is doing whatever it is doing. i'm not overriding anything
Jean Duteau (Aug 26 2020 at 00:03):
in any case, StructureDefinition-ibm-fda-icsr-patientlastmenstrualperiod-summary.html has the text that you see in the guide.
Grahame Grieve (Aug 26 2020 at 00:03):
we're trying to figure out where it came from
Jean Duteau (Aug 26 2020 at 00:03):
so whatever is generating that file is grabbing the summary from the vitalsigns profile
Eric Haas (Aug 26 2020 at 00:10):
cannot reproduce in my test case
Jean Duteau (Aug 26 2020 at 00:11):
i just pmed you a zip of my source
Jean Duteau (Aug 26 2020 at 00:14):
okay, looks like SUSHI is adding this in as the input/StructureDefinition has an extension with the inherited summary in it. I just blew away my input directory and just ran SUSHI and I get this:
{
"resourceType": "StructureDefinition",
"id": "ibm-fda-icsr-patientlastmenstrualperiod",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
"valueMarkdown": "\"#### Complete Summary of the Mandatory Requirements\n\n1. One status in `Observation.status`which has a [required](http://build.fhir.org/terminologies.html#extensible) binding to:\n - [ObservationStatus] value set.\n1. A category in `Observation.category` which must have:\n - a fixed `Observation.category.coding.system`=\"http://terminology.hl7.org/CodeSystem/observation-category\"\n - a fixed `Observation.category.coding.code`= \"vital-signs\"\n\n1. A code in `Observation.code`\n - a fixed `Observation.code.coding.system`= \"http://loinc.org\"\"\n - a LOINC code in `Observation.code.coding.code` which has an [extensible](http://build.fhir.org/terminologies.html#extensible) binding to:\n - [Vital Signs] value set.\n \n1. One patient in `Observation.subject`\n1. A date and time in `effectiveDateTime` or `effectivePeriod`\n1. Either one `Observation.value[x]` or, if there is no value, one code in `Observation.DataAbsentReason`\n - if a vital sign measure then:\n - One numeric value in Observation.valueQuantity.value\n - a fixed Observation.valueQuantity.system=\"http://unitsofmeasure.org\"\n - a UCUM unit code in Observation.valueQuantity.code which has an required binding to the [Vital Signs Units] value set.\n - Observation.DataAbsentReason is bound to [Observation Value\n Absent Reason] value set.\n\n1. When using a panel code to group component observations (Note: See\n the comments regarding blood pressure in the table above), one or\n more `Observation.component.code` each of which must have:\n - a fixed\n `Observation.component.code.coding.system` =\"\"http://loinc.org\"\"\n - a LOINC code in `Observation.code.coding.code` which has an [extensible] binding to:\n - [Vital Signs Units] value set.\n\n1. Either one `Observation.component.valueQuantity` or, if there is\n no value, one code in `Observation.component.DataAbsentReason`\n - Observation.component.DataAbsentReason is bound to [Observation\n Value Absent Reason] value set.\n\n1. When using a panel code to group observations, one or more reference\n to Vitals Signs Observations in `Observation.related.target`\n - a fixed `Observation.related.type`= \"has-member\"\"\n\n [Vital Signs]: valueset-observation-vitalsignresult.html\n [Vital Signs Units]: valueset-ucum-vitals-common.html\n [extensible]: terminologies.html#extensible\n [ObservationStatus]: valueset-observation-status.html\n [Observation Value Absent Reason]: valueset-data-absent-reason.html\n[required]: terminologies.html#required\""
}
],
"url": "http://ibm.com/fhir/fda/icsr/StructureDefinition/ibm-fda-icsr-patientlastmenstrualperiod",
...
Grahame Grieve (Aug 26 2020 at 00:14):
I don't think that Sushi can do this. The logic to get the links right is sadly rather complicated
Grahame Grieve (Aug 26 2020 at 00:15):
and I don't think that they should inherit the summary like this
Jean Duteau (Aug 26 2020 at 00:15):
i totally agree.
Eric Haas (Aug 26 2020 at 00:17):
(deleted)
Jean Duteau (Aug 26 2020 at 00:21):
thanks for everyone's help in narrowing down what wasn't happening :)
Lloyd McKenzie (Aug 26 2020 at 00:22):
the template uses temp/pages for as the 'temp' folder - so Jean is correct that the relevant place is temp/pages/includes
Lloyd McKenzie (Aug 26 2020 at 00:22):
There should be no inheritance of summary - it should be generated for each structure definition...
Chris Moesel (Aug 26 2020 at 12:42):
@Nick Freiter discussed this here. Based on previous discussions with @Grahame Grieve and @Ward Weistra, SUSHI maintains a list of extensions that should not be inherited. That list has been discussed here and is also tracked here. The structuredefinition-summary
is not currently on that list, but we'll add it based on the above conversation.
Chris Moesel (Aug 26 2020 at 12:43):
So, to be clear, SUSHI isn't really adding it (or doing anything special to include it) -- it's merely being inherited from the parent; and we'll make a fix to explicitly prevent this specific extension from being inherited.
Grahame Grieve (Aug 26 2020 at 20:06):
thanks
Last updated: Apr 12 2022 at 19:14 UTC