Skip to content

Commit 24eb30c

Browse files
committed
Fixed handling of logical models to exclude JSON/XML tabs and to properly display name of artifact
Moved Questionnaire contained information to appear in a more logical place
1 parent 0768744 commit 24eb30c

4 files changed

Lines changed: 39 additions & 7 deletions

File tree

layouts/layout-instance-base.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,26 @@
66
<div class="col-12">
77
<!--ReleaseHeader--><p id="publish-box">Publish Box goes here</p><!--EndReleaseHeader-->
88

9+
{% if site.data.artifacts[localPage].logical %}
10+
<p>{{site.data.stringsBase['{{[lang]}}']['ModelOf']}}
11+
{% if site.data.artifacts[localPage].logicalInstanceOfLocal %}
12+
{% assign localRef = site.data.artifacts[localPage].logicalInstanceOfLocal %}
13+
<a href="{{site.data.resources[localRef].path}}">{{site.data.resources[localRef].titlelang['{{[lang]}}']}}</a>
14+
{% else %}
15+
{{site.data.artifacts[localPage].logicalInstanceOf}}
16+
{% endif %}
17+
</p>
18+
{% else %}
919
{% include fragment-base-navtabs.html type='{{[type]}}' id='{{[id]}}' active='content' lang="{{[lang]}}" %}
20+
{% endif %}
1021

1122
<a name="root"> </a>
1223
{% if site.data.artifacts[localPage].example %}
1324
{% assign example = site.data.stringsBase['{{[lang]}}']['Example'] | append: ' ' %}
1425
{% endif %}
1526
{% assign prefix = site.data.artifacts[localPage].type %}
1627
{% assign respath = site.data.resources[resource_].path %}
17-
<h2 id="root">{{example}}{{prefix}}: {{site.data.pages[respath].titlelang['{{[lang]}}'] | escape_once}}</h2>
28+
<h2 id="root">{{example}}{{prefix}}: {{site.data.pages[localPage].titlelang['{{[lang]}}'] | escape_once}}</h2>
1829

1930
{% include fragment-simpletable.html lang="{{[lang]}}" %}
2031
{% unless example %}

layouts/layout-questionnaire.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ <h2 id="root">Questionnaire: {{site.data.resources[resource_].titlelang['{{[lang
6262
</div>
6363
</div>
6464

65+
{% if site.data.resources[resource_].contained != nil %}
66+
<h4>{{site.data.stringsBase['{{[lang]}}']['Contained']}}</h4>
67+
{% include {{[type]}}-{{[id]}}-contained-index{{[langsuffix]}}.xhtml %}
68+
{% endif %}
69+
6570
<a name="test"> </a>
6671
<h3>{{site.data.stringsBase['{{[lang]}}']['TestQuestionnaire']}}</h3>
6772
{% include {{[type]}}-{{[id]}}-links{{[langsuffix]}}.xhtml %}
@@ -75,11 +80,6 @@ <h3>{{site.data.stringsBase['{{[lang]}}']['ResponsesQuestionnaire']}}</h3>
7580
{{responses}}
7681
{% endif %}
7782

78-
{% if site.data.resources[resource_].contained != nil %}
79-
<h4>{{site.data.stringsBase['{{[lang]}}']['Contained']}}</h4>
80-
{% include {{[type]}}-{{[id]}}-contained-index{{[langsuffix]}}.xhtml %}
81-
{% endif %}
82-
8383
<!-- insert notes if present -->
8484
{% include fragment-notes.html type='{{[type]}}' id='{{[id]}}' lang="{{[lang]}}" %}
8585

scripts/onGenerate.data.xslt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@
2626
<xsl:value-of select="concat(',&quot;exampleOf&quot;:{&quot;name&quot;:&quot;', f:name/@value, '&quot;,&quot;url&quot;:&quot;', $page, '&quot;}')"/>
2727
</xsl:for-each>
2828
</xsl:for-each>
29+
<xsl:for-each select="f:extension[@url='http://hl7.org/fhir/tools/StructureDefinition/implementationguide-resource-logical']/f:valueCanonical">
30+
<xsl:text>,"logical":true</xsl:text>
31+
<xsl:variable name="baseUrl" select="substring-before(ancestor::f:ImplementationGuide/f:url/@value, 'ImplementationGuide/')"/>
32+
<xsl:choose>
33+
<xsl:when test="contains(@value, $baseUrl)">
34+
<xsl:variable name="localUrl" select="substring-after(@value, $baseUrl)"/>
35+
<xsl:choose>
36+
<xsl:when test="contains($localUrl, '|')">
37+
<xsl:value-of select="concat(',&quot;logicalInstanceOfLocal&quot;:&quot;', substring-before($localUrl, '|'), '&quot;')"/>
38+
</xsl:when>
39+
<xsl:otherwise>
40+
<xsl:value-of select="concat(',&quot;logicalInstanceOfLocal&quot;:&quot;', $localUrl, '&quot;')"/>
41+
</xsl:otherwise>
42+
</xsl:choose>
43+
</xsl:when>
44+
<xsl:otherwise>
45+
<xsl:value-of select="concat(',&quot;logicalInstanceOf&quot;:&quot;', @value, '&quot;')"/>
46+
</xsl:otherwise>
47+
</xsl:choose>
48+
</xsl:for-each>
2949
<xsl:text>}</xsl:text>
3050
</xsl:template>
3151
</xsl:stylesheet>

translations/stringsBase.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
"HighlightChangesHelp": "Enable this to see changes since the last official release",
125125
"NewContent": "New Content",
126126
"ModifiedContent": "Modified Content",
127-
"TermParameters": "Terminology Parameters"
127+
"TermParameters": "Terminology Parameters",
128+
"ModelOf": "Instance of logical model"
128129
}
129130
}

0 commit comments

Comments
 (0)