From 1815e692b6dfb53489ad0343a1e5a8ed0c0e1e04 Mon Sep 17 00:00:00 2001 From: healthedata1 Date: Wed, 13 Dec 2023 20:31:58 -0800 Subject: [PATCH] add example button examples to index page --- input/examples-yaml/hl7east.yml | 37 +++++++ input/examples/hl7east.json | 62 ++++++++++++ .../Patient-deceased-example2.xml | 98 +++++++++++++++++++ input/includes/examplebutton_default.html | 25 +++-- input/pagecontent/guidance.md | 3 +- input/pagecontent/index.md | 18 +++- publish.sh | 2 +- sushi-config.yaml | 2 +- 8 files changed, 233 insertions(+), 14 deletions(-) create mode 100644 input/examples-yaml/hl7east.yml create mode 100644 input/examples/hl7east.json create mode 100644 input/images/inline_examples/Patient-deceased-example2.xml diff --git a/input/examples-yaml/hl7east.yml b/input/examples-yaml/hl7east.yml new file mode 100644 index 0000000..69c49eb --- /dev/null +++ b/input/examples-yaml/hl7east.yml @@ -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 diff --git a/input/examples/hl7east.json b/input/examples/hl7east.json new file mode 100644 index 0000000..a7b9fa9 --- /dev/null +++ b/input/examples/hl7east.json @@ -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" + } +} diff --git a/input/images/inline_examples/Patient-deceased-example2.xml b/input/images/inline_examples/Patient-deceased-example2.xml new file mode 100644 index 0000000..9f43f22 --- /dev/null +++ b/input/images/inline_examples/Patient-deceased-example2.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + +
+ +

+ resourceType: +

+

+ id: + deceased-example

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+
\ No newline at end of file diff --git a/input/includes/examplebutton_default.html b/input/includes/examplebutton_default.html index 6ff0115..c878710 100644 --- a/input/includes/examplebutton_default.html +++ b/input/includes/examplebutton_default.html @@ -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 %}

-

-
- {% if file_type =="xhtml" or file_type =="html" or file_type =="md"%} - {% include {{include.example}} %} - {% else %} - {% include {{target}}.md %} - {% endif %} -
+
+{% 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 %}
-
+
+
\ No newline at end of file diff --git a/input/pagecontent/guidance.md b/input/pagecontent/guidance.md index 62998b6..989ca67 100644 --- a/input/pagecontent/guidance.md +++ b/input/pagecontent/guidance.md @@ -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 %} ~~~ diff --git a/input/pagecontent/index.md b/input/pagecontent/index.md index 02a5b9f..a635226 100644 --- a/input/pagecontent/index.md +++ b/input/pagecontent/index.md @@ -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. + + + +{% 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.: + + + +{% 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: @@ -102,7 +118,7 @@ without markdown filter
- #### 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 -%} diff --git a/publish.sh b/publish.sh index 246432c..040223f 100644 --- a/publish.sh +++ b/publish.sh @@ -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" diff --git a/sushi-config.yaml b/sushi-config.yaml index fea93be..934db01 100644 --- a/sushi-config.yaml +++ b/sushi-config.yaml @@ -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