Skip to content

Commit

Permalink
added local template
Browse files Browse the repository at this point in the history
  • Loading branch information
litlfred committed Nov 8, 2023
1 parent fe5ce62 commit 7a968c9
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 0 deletions.
Binary file added local-template/package/.index.db
Binary file not shown.
4 changes: 4 additions & 0 deletions local-template/package/.index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"index-version" : 2,
"files" : []
}
Binary file added local-template/package/includes/.index.db
Binary file not shown.
4 changes: 4 additions & 0 deletions local-template/package/includes/.index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"index-version" : 2,
"files" : []
}
51 changes: 51 additions & 0 deletions local-template/package/includes/fragment-actors.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<table class="table table-bordered">
<thead class="thead-dark">
<tr>
<th>Name</th>
<th>Title</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for data_file in site.data %}
{% assign filename = data_file[0] %}
{% assign entry = data_file[1] %}

{% assign name = "" %}
{% assign title = "" %}
{% assign description = "" %}
{% assign link_path = filename | remove: ".json" | append: ".html" %}

{% assign profile_includes_string = false %}

{% for extension in entry.extension %}
{% if extension.url == "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.name" %}
{% assign name = extension.valueString %}
{% elsif extension.url == "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.title" %}
{% assign title = extension.valueString %}
{% elsif extension.url == "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.description" %}
{% assign description = extension.valueMarkdown %}
{% endif %}
{% endfor %}

{% if entry.meta and entry.meta.profile %}
{% for profile in entry.meta.profile %}
{% if profile == "http://worldhealthorganization.github.io/smart-base/StructureDefinition/SGPersona" %}
{% assign profile_includes_string = true %}
{% break %}
{% endif %}
{% endfor %}
{% endif %}


{% if entry.resourceType == "ActorDefinition" or profile_includes_string %}
<tr>
<td><a href="{{ link_path }}">{{ name }}</a></td>
<td>{{ title }}</td>
<td>{{ description }}</td>
</tr>
{% endif %}

{% endfor %}
</tbody>
</table>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{% for data_file in site.data %}
{% assign content = data_file[1] %}
{% assign requirements_statement_found = false %}
{% assign requirements_extensions = nil %}



{% if content.code.coding[0].code == "Requirements" %}
{% for ext in content.extension %}
{% if ext.url == "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.title" %}
<h3>{{ext.valueString}}</h3>
{% endif %}
{% endfor %}

<div>
<table class="table table-bordered">
<thead class="thead-dark">
<tr>
<th>Key</th>
<th>Requirement</th>
</tr>
</thead>
<tbody>

{% for ext in content.extension %}
{% if ext.url == "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement" %}
<tr>
{% for statement in ext.extension %}


{% if statement.url == "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.key" %}
<td>{{ statement.valueId }}</td>
{% endif %}

{% if statement.url == "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement.requirement" %}
<td>{{ statement.valueMarkdown | markdownify}}</td>
{% endif %}

{% endfor %}
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
<br> <!-- Adding a break between tables for visual separation -->



{% endif %}
{% endfor %}
12 changes: 12 additions & 0 deletions local-template/package/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "who.fhir.smart-ig-empty-local",
"version": "0.0.1",
"type": "fhir.template",
"license": "CC0-1.0",
"description": "Local template extension for WHO SMART FHIR IG",
"author": "http://who.int",
"base": "who.fhir.template",
"dependencies": {
"who.fhir.template": "current"
}
}

0 comments on commit 7a968c9

Please sign in to comment.