Skip to content

Commit

Permalink
add example button examples to index page
Browse files Browse the repository at this point in the history
  • Loading branch information
healthedata1 committed Dec 14, 2023
1 parent 8fdbb63 commit 1815e69
Show file tree
Hide file tree
Showing 8 changed files with 233 additions and 14 deletions.
37 changes: 37 additions & 0 deletions input/examples-yaml/hl7east.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
resourceType: Location
id: hl7east
meta:
profile:
- http://hl7.org/fhir/us/core/StructureDefinition/us-core-location
extension:
- url: http://hl7.org/fhir/StructureDefinition/instance-name
valueString: HL7East Example
- url: http://hl7.org/fhir/StructureDefinition/instance-description
valueMarkdown: This is a HL7East example for the *US Core Location Profile*.
identifier:
- system: http://www.acme.org/location
value: '29'
status: active
name: Health Level Seven International - Amherst
type:
- coding:
- system: 'http://terminology.hl7.org/CodeSystem/v3-RoleCode'
code: _DedicatedNonClinicalLocationRoleType
display: DedicatedNonClinicalLocationRoleType
text: Administrative Office
description: HL7 Headquarters - East
telecom:
- system: phone
value: (+1) 734-677-7777
address:
line:
- 3300 Washtenaw Avenue, Suite 227
city: Amherst
state: MA
postalCode: '01002'
country: USA
position:
longitude: -72.519854
latitude: 42.373222
managingOrganization:
display: Health Level Seven International
62 changes: 62 additions & 0 deletions input/examples/hl7east.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"resourceType": "Location",
"id": "hl7east",
"meta": {
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-location|0.1.0"
],
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/instance-name",
"valueString": "HL7East Example"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/instance-description",
"valueMarkdown": "This is a HL7East example for the *US Core Location Profile*."
}
]
},
"identifier": [
{
"system": "http://www.acme.org/location",
"value": "29"
}
],
"status": "active",
"name": "Health Level Seven International - Amherst",
"type": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"code": "_DedicatedNonClinicalLocationRoleType",
"display": "DedicatedNonClinicalLocationRoleType"
}
],
"text": "Administrative Office"
}
],
"description": "HL7 Headquarters - East",
"telecom": [
{
"system": "phone",
"value": "(+1) 734-677-7777"
}
],
"address": {
"line": [
"3300 Washtenaw Avenue, Suite 227"
],
"city": "Amherst",
"state": "MA",
"postalCode": "01002",
"country": "USA"
},
"position": {
"longitude": -72.519854,
"latitude": 42.373222
},
"managingOrganization": {
"display": "Health Level Seven International"
}
}
98 changes: 98 additions & 0 deletions input/images/inline_examples/Patient-deceased-example2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>

<Patient xmlns="http://hl7.org/fhir">
<id value="deceased-example"/>
<meta>
<extension url="http://hl7.org/fhir/StructureDefinition/instance-name">
<valueString value="Deceased Patient Example"/>
</extension>
<extension url="http://hl7.org/fhir/StructureDefinition/instance-description">
<valueMarkdown value="This is a deceased patient example for the *US Core Patient Profile*."/>
</extension>
<profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient|0.1.0"/>
</meta>
<text>
<status value="extensions"/><div xmlns="http://www.w3.org/1999/xhtml">

<p>
<strong>resourceType:</strong>
</p>
<p>
<strong>id:</strong>
deceased-example</p>

</div>
</text>
<extension url="http://hl7.org/fhir/us/core/StructureDefinition/us-core-race">
<extension url="ombCategory">
<valueCoding>
<system value="urn:oid:2.16.840.1.113883.6.238"/>
<code value="2106-3"/>
<display value="White"/>
</valueCoding>
</extension>
<extension url="ombCategory">
<valueCoding>
<system value="urn:oid:2.16.840.1.113883.6.238"/>
<code value="2028-9"/>
<display value="Asian"/>
</valueCoding>
</extension>
<extension url="text">
<valueString value="Mixed"/>
</extension>
</extension>
<extension url="http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity">
<extension url="ombCategory">
<valueCoding>
<system value="urn:oid:2.16.840.1.113883.6.238"/>
<code value="2186-5"/>
<display value="Not Hispanic or Latino"/>
</valueCoding>
</extension>
<extension url="text">
<valueString value="Not Hispanic or Latino"/>
</extension>
</extension>
<identifier>
<use value="usual"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0203"/>
<code value="MR"/>
<display value="Medical Record Number"/>
</coding>
<text value="Medical Record Number"/>
</type>
<system value="http://hospital.smarthealthit.org"/>
<value value="55555555"/>
</identifier>
<active value="true"/>
<name>
<family value="Shaw"/>
<given value="Mary"/>
<given value="A."/>
</name>
<telecom>
<system value="phone"/>
<value value="555-555-5555"/>
<use value="home"/>
</telecom>
<telecom>
<system value="email"/>
<value value="[email protected]"/>
</telecom>
<gender value="female"/>
<birthDate value="1937-10-21"/>
<deceasedDateTime value="2022-07-22"/>
<address>
<line value="49 Meadow St"/>
<city value="Mounds"/>
<state value="OK"/>
<postalCode value="74047"/>
<country value="US"/>
<period>
<start value="2016-12-06"/>
</period>
</address>
</Patient>
25 changes: 15 additions & 10 deletions input/includes/examplebutton_default.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
{% assign target = include.example | split: "." | first %}
{% assign target = include.example | split: "/" | last | split: "." | first %}
{% assign file_type = include.example | split: "." | last %}

<p>
<button class="btn btn-info btn-lg btn-block" type="button" title="Click to Open or Close Example" data-toggle="collapse" data-target="#{{target}}" aria-expanded="false" aria-controls="collapseExample">
<button class="btn btn-info btn-lg btn-block" type="button" title="Click to Open or Close Example"
data-toggle="collapse" data-target="#{{target}}" aria-expanded="false" aria-controls="collapseExample">
{{include.b_title | default: "Example" }}
</button>
</p>

<div class="collapse" id="{{target}}">
<div class="card card-body" style="border:1px solid;border-color:#cccccc;padding:10px" markdown="1">
{% if file_type =="xhtml" or file_type =="html" or file_type =="md"%}
{% include {{include.example}} %}
{% else %}
{% include {{target}}.md %}
{% endif %}
</div>
<div class="card card-body" style="border:1px solid;border-color:#cccccc;padding:10px" markdown="1">
{% if file_type =="xhtml" or file_type =="html" or file_type =="md"%}
{% include {{include.example}} %}
{% elsif file_type =="xml" or file_type =="json" %}
~~~
{% include_relative {{include.example}} %}
~~~
{% else %}
{% include {{target}}.md %}
{% endif %}
</div>
<br />
</div>
<br />
3 changes: 2 additions & 1 deletion input/pagecontent/guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ The helper file checks if the line overlap. If they do it will print a warning
\~~~
~~~json
~~~
{% include_relative includelines filename='Patient-deceased-example.json' start=1 count=15 linenumber=true rel=true %}
~~~
Expand Down
18 changes: 17 additions & 1 deletion input/pagecontent/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
### Health eData Sandbox
testbed for ideas....

#### Example bar

showing JSON example from examples folder. Note that the narrative section renders poorly and should not be used if displaying inline examples. Use the `no-narrative` IG parameter to do this.

<!-- {% raw %} {% include examplebutton_default.html example='Patient-deceased-example.json' %} {% endraw %} -->

{% include examplebutton_default.html example='Patient-deceased-example.json' %}

showing XML example in images sub-folder `images/inline_examples` . Note that the file name is used as an id parameter in the html so they must be unique within a page.:

<!-- {% raw %} {% include examplebutton_default.html example='inline_examples/Patient-deceased-example2.xml' %} {% endraw %} -->

{% include examplebutton_default.html example='inline_examples/Patient-deceased-example2.xml' %}

See the [guidance page](guidance.html) for how to render code snippets from examples

#### FOO

using http:
Expand Down Expand Up @@ -102,7 +118,7 @@ without markdown filter

<div class="bg-success" markdown="1">

#### Complete list of Code System URIs used in US Core
#### Complete list of Code System URIs used in US Core
The value set used in the US Core Profiles includes codes from following Code Systems URIs:

{% for cs in site.data.codesystems -%}
Expand Down
2 changes: 1 addition & 1 deletion publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ echo "Optional Parameters"
echo "================================================================="
echo "-a copy searchparameter excel sheet to data folder as csv file for creating SP artifacts = $COPY_SPS"
echo "-b Turns on debugging (this produces extra logging, and can be verbose) = $DEBUG_ON"
echo "-c copy data csv files to the image folder and create excel file too (currently only input/data/uscdi-table.csv,assessments-valuesets.csv) = $COPY_CSV"
echo "-c copy data csv files and created excel files to the image/tables folder = $COPY_CSV"
echo "-d flag if output in "docs" folder = $IN_DOCS"
echo "-e flag to add current profile version to all examples = $APP_VERSION"
echo "-f flag to add valueset-ref-all-list.csv and valueset-ref-all-list.csv to data folders to process as tables = $TERMINOLOGY_TABLES"
Expand Down
2 changes: 1 addition & 1 deletion sushi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies:
hl7.fhir.uv.smart-app-launch: 2.0.0
us.nlm.vsac:
uri: 'http://fhir.org/packages/us.nlm.vsac/ImplementationGuide/us.nlm.vsac'
version: 0.15.0
version: 0.17.0
id: vsac
us.cdc.phinvads:
id: uscdcphinvads
Expand Down

0 comments on commit 1815e69

Please sign in to comment.