From 0ac7eaba8873ce64e99a0706cf790bad6f666339 Mon Sep 17 00:00:00 2001 From: Elliot Silver Date: Tue, 31 Jan 2023 15:35:56 -0800 Subject: [PATCH 1/2] New repo --- ExampleIG/.gitignore | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ExampleIG/.gitignore diff --git a/ExampleIG/.gitignore b/ExampleIG/.gitignore new file mode 100644 index 0000000..5a93fa4 --- /dev/null +++ b/ExampleIG/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +Thumbs.db +/fsh-generated +/input-cache +/output +/temp +/template \ No newline at end of file From 4ca6a196c782fac61331c73d167ae7a1434e0c80 Mon Sep 17 00:00:00 2001 From: Elliot Silver Date: Tue, 31 Jan 2023 16:10:34 -0800 Subject: [PATCH 2/2] Example project --- .gitignore | 5 + _gencontinuous.bat | 2 + _gencontinuous.sh | 2 + _genonce.bat | 27 ++++ _genonce.sh | 30 +++++ _updatePublisher.bat | 219 +++++++++++++++++++++++++++++++ _updatePublisher.sh | 129 ++++++++++++++++++ ig.ini | 3 + input/fsh/bundle-history.fsh | 10 ++ input/fsh/change-log.fsh | 29 ++++ input/fsh/provenance-history.fsh | 31 +++++ input/fsh/valueset-history.fsh | 6 + input/ignoreWarnings.txt | 5 + input/pagecontent/index.md | 3 + sushi-config.yaml | 209 +++++++++++++++++++++++++++++ 15 files changed, 710 insertions(+) create mode 100644 .gitignore create mode 100644 _gencontinuous.bat create mode 100644 _gencontinuous.sh create mode 100644 _genonce.bat create mode 100755 _genonce.sh create mode 100644 _updatePublisher.bat create mode 100755 _updatePublisher.sh create mode 100644 ig.ini create mode 100644 input/fsh/bundle-history.fsh create mode 100644 input/fsh/change-log.fsh create mode 100644 input/fsh/provenance-history.fsh create mode 100644 input/fsh/valueset-history.fsh create mode 100644 input/ignoreWarnings.txt create mode 100644 input/pagecontent/index.md create mode 100644 sushi-config.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..611308c --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/output +/temp +/template +/fsh-generated +/input-cache diff --git a/_gencontinuous.bat b/_gencontinuous.bat new file mode 100644 index 0000000..ca2867a --- /dev/null +++ b/_gencontinuous.bat @@ -0,0 +1,2 @@ +@ECHO OFF +CALL ./_genonce.bat -watch \ No newline at end of file diff --git a/_gencontinuous.sh b/_gencontinuous.sh new file mode 100644 index 0000000..b9ac593 --- /dev/null +++ b/_gencontinuous.sh @@ -0,0 +1,2 @@ +#!/bin/bash +./_genonce.sh -watch diff --git a/_genonce.bat b/_genonce.bat new file mode 100644 index 0000000..a9864ef --- /dev/null +++ b/_genonce.bat @@ -0,0 +1,27 @@ +@ECHO OFF +SET publisher_jar=publisher.jar +SET input_cache_path=%CD%\input-cache + +ECHO Checking internet connection... +PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline +ECHO We're offline... +SET txoption=-tx n/a +GOTO igpublish + +:isonline +ECHO We're online +SET txoption= + +:igpublish + +SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 + +IF EXIST "%input_cache_path%\%publisher_jar%" ( + JAVA -jar "%input_cache_path%\%publisher_jar%" -ig . %txoption% %* +) ELSE If exist "..\%publisher_jar%" ( + JAVA -jar "..\%publisher_jar%" -ig . %txoption% %* +) ELSE ( + ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting... +) + +PAUSE diff --git a/_genonce.sh b/_genonce.sh new file mode 100755 index 0000000..4f981f0 --- /dev/null +++ b/_genonce.sh @@ -0,0 +1,30 @@ +#!/bin/bash +publisher_jar=publisher.jar +input_cache_path=./input-cache/ +echo Checking internet connection... +curl -sSf tx.fhir.org > /dev/null + +if [ $? -eq 0 ]; then + echo "Online" + txoption="" +else + echo "Offline" + txoption="-tx n/a" +fi + +echo "$txoption" + +export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF-8" + +publisher=$input_cache_path/$publisher_jar +if test -f "$publisher"; then + java -jar $publisher -ig . $txoption $* + +else + publisher=../$publisher_jar + if test -f "$publisher"; then + java -jar $publisher -ig . $txoption $* + else + echo IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting... + fi +fi diff --git a/_updatePublisher.bat b/_updatePublisher.bat new file mode 100644 index 0000000..67aebf5 --- /dev/null +++ b/_updatePublisher.bat @@ -0,0 +1,219 @@ +@ECHO OFF + +SETLOCAL + +SET dlurl=https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar +SET publisher_jar=publisher.jar +SET input_cache_path=%CD%\input-cache\ +SET skipPrompts=false + +SET scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main +SET update_bat_url=%scriptdlroot%/_updatePublisher.bat +SET gen_bat_url=%scriptdlroot%/_genonce.bat +SET gencont_bat_url=%scriptdlroot%/_gencontinuous.bat +SET gencont_sh_url=%scriptdlroot%/_gencontinuous.sh +SET gen_sh_url=%scriptdlroot%/_genonce.sh +SET update_sh_url=%scriptdlroot%/_updatePublisher.sh + +IF "%~1"=="/f" SET skipPrompts=y + + +ECHO. +ECHO Checking internet connection... +PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline +ECHO We're offline, nothing to do... +GOTO end + +:isonline +ECHO We're online + + +:processflags +SET ARG=%1 +IF DEFINED ARG ( + IF "%ARG%"=="-f" SET FORCE=true + IF "%ARG%"=="--force" SET FORCE=true + SHIFT + GOTO processflags +) + +FOR %%x IN ("%CD%") DO SET upper_path=%%~dpx + +ECHO. +IF NOT EXIST "%input_cache_path%%publisher_jar%" ( + IF NOT EXIST "%upper_path%%publisher_jar%" ( + SET jarlocation="%input_cache_path%%publisher_jar%" + SET jarlocationname=Input Cache + ECHO IG Publisher is not yet in input-cache or parent folder. + REM we don't use jarlocation below because it will be empty because we're in a bracketed if statement + GOTO create + ) ELSE ( + ECHO IG Publisher FOUND in parent folder + SET jarlocation="%upper_path%%publisher_jar%" + SET jarlocationname=Parent folder + GOTO upgrade + ) +) ELSE ( + ECHO IG Publisher FOUND in input-cache + SET jarlocation="%input_cache_path%%publisher_jar%" + SET jarlocationname=Input Cache + GOTO upgrade +) + +:create +IF DEFINED FORCE ( + MKDIR "%input_cache_path%" 2> NUL + GOTO download +) + +IF "%skipPrompts%"=="y" ( + SET create=Y +) ELSE ( + SET /p create="Ok? (Y/N) " +) +IF /I "%create%"=="Y" ( + ECHO Will place publisher jar here: %input_cache_path%%publisher_jar% + MKDIR "%input_cache_path%" 2> NUL + GOTO download +) +GOTO done + +:upgrade +IF "%skipPrompts%"=="y" ( + SET overwrite=Y +) ELSE ( + SET /p overwrite="Overwrite %jarlocation%? (Y/N) " +) + +IF /I "%overwrite%"=="Y" ( + GOTO download +) +GOTO done + +:download +ECHO Downloading most recent publisher to %jarlocationname% - it's ~100 MB, so this may take a bit + +FOR /f "tokens=4-5 delims=. " %%i IN ('ver') DO SET VERSION=%%i.%%j +IF "%version%" == "10.0" GOTO win10 +IF "%version%" == "6.3" GOTO win8.1 +IF "%version%" == "6.2" GOTO win8 +IF "%version%" == "6.1" GOTO win7 +IF "%version%" == "6.0" GOTO vista + +ECHO Unrecognized version: %version% +GOTO done + +:win10 +CALL POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%dlurl%\",\"%jarlocation%\") } else { Invoke-WebRequest -Uri "%dlurl%" -Outfile "%jarlocation%" } + +GOTO done + +:win7 +rem this may be triggering the antivirus - bitsadmin.exe is a known threat +rem CALL bitsadmin /transfer GetPublisher /download /priority normal "%dlurl%" "%jarlocation%" + +rem this didn't work in win 10 +rem CALL Start-BitsTransfer /priority normal "%dlurl%" "%jarlocation%" + +rem this should work - untested +call (New-Object Net.WebClient).DownloadFile('%dlurl%', '%jarlocation%') +GOTO done + +:win8.1 +:win8 +:vista +GOTO done + + + +:done + + + + +ECHO. +ECHO Updating scripts +IF "%skipPrompts%"=="y" ( + SET updateScripts=Y +) ELSE ( + SET /p updateScripts="Update scripts? (Y/N) " +) +IF /I "%updateScripts%"=="Y" ( + GOTO scripts +) +GOTO end + + +:scripts + +REM Download all batch files (and this one with a new name) + +SETLOCAL DisableDelayedExpansion + + + +:dl_script_1 +ECHO Updating _updatePublisher.sh +call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%update_sh_url%\",\"_updatePublisher.new.sh\") } else { Invoke-WebRequest -Uri "%update_sh_url%" -Outfile "_updatePublisher.new.sh" } +if %ERRORLEVEL% == 0 goto upd_script_1 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_2 +:upd_script_1 +start copy /y "_updatePublisher.new.sh" "_updatePublisher.sh" ^&^& del "_updatePublisher.new.sh" ^&^& exit + + +:dl_script_2 +ECHO Updating _genonce.bat +call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gen_bat_url%\",\"_genonce.new.bat\") } else { Invoke-WebRequest -Uri "%gen_bat_url%" -Outfile "_genonce.bat" } +if %ERRORLEVEL% == 0 goto upd_script_2 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_3 +:upd_script_2 +start copy /y "_genonce.new.bat" "_genonce.bat" ^&^& del "_genonce.new.bat" ^&^& exit + +:dl_script_3 +ECHO Updating _gencontinuous.bat +call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gencont_bat_url%\",\"_gencontinuous.new.bat\") } else { Invoke-WebRequest -Uri "%gencont_bat_url%" -Outfile "_gencontinuous.bat" } +if %ERRORLEVEL% == 0 goto upd_script_3 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_4 +:upd_script_3 +start copy /y "_gencontinuous.new.bat" "_gencontinuous.bat" ^&^& del "_gencontinuous.new.bat" ^&^& exit + + +:dl_script_4 +ECHO Updating _genonce.sh +call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gen_sh_url%\",\"_genonce.new.sh\") } else { Invoke-WebRequest -Uri "%gen_sh_url%" -Outfile "_genonce.sh" } +if %ERRORLEVEL% == 0 goto upd_script_4 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_5 +:upd_script_4 +start copy /y "_genonce.new.sh" "_genonce.sh" ^&^& del "_genonce.new.sh" ^&^& exit + +:dl_script_5 +ECHO Updating _gencontinuous.sh +call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%gencont_sh_url%\",\"_gencontinuous.new.sh\") } else { Invoke-WebRequest -Uri "%gencont_sh_url%" -Outfile "_gencontinuous.sh" } +if %ERRORLEVEL% == 0 goto upd_script_5 +echo "Errors encountered during download: %errorlevel%" +goto dl_script_6 +:upd_script_5 +start copy /y "_gencontinuous.new.sh" "_gencontinuous.sh" ^&^& del "_gencontinuous.new.sh" ^&^& exit + + + +:dl_script_6 +ECHO Updating _updatePublisher.bat +call POWERSHELL -command if ('System.Net.WebClient' -as [type]) {(new-object System.Net.WebClient).DownloadFile(\"%update_bat_url%\",\"_updatePublisher.new.bat\") } else { Invoke-WebRequest -Uri "%update_bat_url%" -Outfile "_updatePublisher.new.bat" } +if %ERRORLEVEL% == 0 goto upd_script_6 +echo "Errors encountered during download: %errorlevel%" +goto end +:upd_script_6 +start copy /y "_updatePublisher.new.bat" "_updatePublisher.bat" ^&^& del "_updatePublisher.new.bat" ^&^& exit + + +:end + + +IF "%skipPrompts%"=="true" ( + PAUSE +) diff --git a/_updatePublisher.sh b/_updatePublisher.sh new file mode 100755 index 0000000..f127f66 --- /dev/null +++ b/_updatePublisher.sh @@ -0,0 +1,129 @@ +#!/bin/bash +pubsource=https://github.com/HL7/fhir-ig-publisher/releases/latest/download/ +publisher_jar=publisher.jar +dlurl=$pubsource$publisher_jar + +input_cache_path=$PWD/input-cache/ + +scriptdlroot=https://raw.githubusercontent.com/HL7/ig-publisher-scripts/main +update_bat_url=$scriptdlroot/_updatePublisher.bat +gen_bat_url=$scriptdlroot/_genonce.bat +gencont_bat_url=$scriptdlroot/_gencontinuous.bat +gencont_sh_url=$scriptdlroot/_gencontinuous.sh +gen_sh_url=$scriptdlroot/_genonce.sh +update_sh_url=$scriptdlroot/_updatePublisher.sh + +skipPrompts=false +FORCE=false + +if ! type "curl" > /dev/null; then + echo "ERROR: Script needs curl to download latest IG Publisher. Please install curl." + exit 1 +fi + +while [ "$#" -gt 0 ]; do + case $1 in + -f|--force) FORCE=true ;; + -y|--yes) skipPrompts=true ; FORCE=true ;; + *) echo "Unknown parameter passed: $1. Exiting"; exit 1 ;; + esac + shift +done + +echo "Checking internet connection" +curl -sSf tx.fhir.org > /dev/null + +if [ $? -ne 0 ] ; then + echo "Offline (or the terminology server is down), unable to update. Exiting" + exit 1 +fi + +if [ ! -d "$input_cache_path" ] ; then + if [ $FORCE != true ]; then + echo "$input_cache_path does not exist" + message="create it?" + read -r -p "$message" response + else + response=y + fi +fi + +if [[ $response =~ ^[yY].*$ ]] ; then + mkdir ./input-cache +fi + +publisher="$input_cache_path$publisher_jar" + +if test -f "$publisher" ; then + echo "IG Publisher FOUND in input-cache" + jarlocation="$publisher" + jarlocationname="Input Cache" + upgrade=true +else + publisher="../$publisher_jar" + upgrade=true + if test -f "$publisher"; then + echo "IG Publisher FOUND in parent folder" + jarlocation="$publisher" + jarlocationname="Parent Folder" + upgrade=true + else + echo "IG Publisher NOT FOUND in input-cache or parent folder" + jarlocation=$input_cache_path$publisher_jar + jarlocationname="Input Cache" + upgrade=false + fi +fi + +if [[ $skipPrompts == false ]]; then + + if [[ $upgrade == true ]]; then + message="Overwrite $jarlocation? (Y/N) " + else + echo Will place publisher jar here: "$jarlocation" + message="Ok (enter 'y' or 'Y' to continue, any other key to cancel)?" + fi + read -r -p "$message" response +else + response=y +fi +if [[ $skipPrompts == true ]] || [[ $response =~ ^[yY].*$ ]]; then + + echo "Downloading most recent publisher to $jarlocationname - it's ~100 MB, so this may take a bit" + curl -L $dlurl -o "$jarlocation" --create-dirs +else + echo cancelled publisher update +fi + +if [[ $skipPrompts != true ]]; then + message="Update scripts? (enter 'y' or 'Y' to continue, any other key to cancel)?" + read -r -p "$message" response + fi + +if [[ $skipPrompts == true ]] || [[ $response =~ ^[yY].*$ ]]; then + echo "Downloading most recent scripts " + + curl -L $update_bat_url -o /tmp/_updatePublisher.new + cp /tmp/_updatePublisher.new _updatePublisher.bat + rm /tmp/_updatePublisher.new + + curl -L $gen_bat_url -o /tmp/_genonce.new + cp /tmp/_genonce.new _genonce.bat + rm /tmp/_genonce.new + + curl -L $gencont_bat_url -o /tmp/_gencontinuous.new + cp /tmp/_gencontinuous.new _gencontinuous.bat + rm /tmp/_gencontinuous.new + + curl -L $gencont_sh_url -o /tmp/_gencontinuous.new + cp /tmp/_gencontinuous.new _gencontinuous.sh + rm /tmp/_gencontinuous.new + + curl -L $gen_sh_url -o /tmp/_genonce.new + cp /tmp/_genonce.new _genonce.sh + rm /tmp/_genonce.new + + curl -L $update_sh_url -o /tmp/_updatePublisher.new + cp /tmp/_updatePublisher.new _updatePublisher.sh + rm /tmp/_updatePublisher.new +fi diff --git a/ig.ini b/ig.ini new file mode 100644 index 0000000..8381cc6 --- /dev/null +++ b/ig.ini @@ -0,0 +1,3 @@ +[IG] +ig = fsh-generated/resources/ImplementationGuide-fhir.example.json +template = fhir.base.template#current \ No newline at end of file diff --git a/input/fsh/bundle-history.fsh b/input/fsh/bundle-history.fsh new file mode 100644 index 0000000..4f80809 --- /dev/null +++ b/input/fsh/bundle-history.fsh @@ -0,0 +1,10 @@ +Profile: BundleIgHistory +Parent: Bundle +Id: BundleIgHistory +Title: "Bundle for IG History entries" +Description: "TODO" +* type = #collection +* entry 1.. + * fullUrl 1.. + * resource 1.. + * resource only ProvenanceIgHistory diff --git a/input/fsh/change-log.fsh b/input/fsh/change-log.fsh new file mode 100644 index 0000000..f4122ec --- /dev/null +++ b/input/fsh/change-log.fsh @@ -0,0 +1,29 @@ +// Change log follows: +Instance: change-log +InstanceOf: Bundle +//InstanceOf: BundleIgHistory +Usage: #definition +Title: "Change Log Bundle" +Description: "TODO" +* type = #collection +* entry[+] + * fullUrl = "urn:uuid:a36ec3cb-cb1c-46e7-8f5b-792e3ee20b9a" + * resource = provenance-ig-monday + +Instance: provenance-ig-monday +//InstanceOf: Provenance +InstanceOf: ProvenanceIgHistory +Usage: #inline +Title: "IG Creation Provenance" +Description: "Provenance Entry documenting the creation of this IG" +* target[+] = Reference(ValueSet/ValueSetIGHistoryActivity) +* recorded = "2023-01-26T00:00:00Z" +* occurredDateTime = "2023-01-23" +* reason = http://terminology.hl7.org/CodeSystem/v3-ActReason#METAMGT + * text = "Monday" +* activity = http://terminology.hl7.org/CodeSystem/v3-DataOperation#CREATE +* agent[+] + * type = http://terminology.hl7.org/CodeSystem/provenance-participant-type#author + * who + * display = "Elliot" + diff --git a/input/fsh/provenance-history.fsh b/input/fsh/provenance-history.fsh new file mode 100644 index 0000000..c6c47e3 --- /dev/null +++ b/input/fsh/provenance-history.fsh @@ -0,0 +1,31 @@ +Profile: ProvenanceIgHistory +Parent: Provenance +Id: ProvenanceIgHistory +Title: "Provenance for IG History entries" +Description: "TODO" +* id 1.. + * ^short = "Unique Id of the history entry" +* target + * ^short = "A reference to each of the changed resources" +* occurred[x] only dateTime +* occurredDateTime 1.. + * ^short = "When the change was made" +* reason = http://terminology.hl7.org/CodeSystem/v3-ActReason#METAMGT + * text 1.. + * ^short = "Description of the change" +* activity 1.. +* activity from ValueSetIGHistoryActivity (extensible) +* agent + * ^slicing.discriminator.type = #pattern + * ^slicing.discriminator.path = "type" + * ^slicing.rules = #open + * ^slicing.description = "Participants in the change" + * ^slicing.ordered = false +* agent contains + author 1.. +* agent[author] + * ^short = "Author of the change" + * type = http://terminology.hl7.org/CodeSystem/provenance-participant-type#author + * who 1.. + * display 1.. + diff --git a/input/fsh/valueset-history.fsh b/input/fsh/valueset-history.fsh new file mode 100644 index 0000000..f4e7508 --- /dev/null +++ b/input/fsh/valueset-history.fsh @@ -0,0 +1,6 @@ +ValueSet: ValueSetIGHistoryActivity +Id: ValueSetIGHistoryActivity +Title: "ValueSet IG History Activity" +Description: "Value set of common IG history activities" +* ^experimental = false +* include codes from valueset http://hl7.org/fhir/ValueSet/provenance-activity-type and system http://terminology.hl7.org/CodeSystem/v3-DataOperation \ No newline at end of file diff --git a/input/ignoreWarnings.txt b/input/ignoreWarnings.txt new file mode 100644 index 0000000..d03142b --- /dev/null +++ b/input/ignoreWarnings.txt @@ -0,0 +1,5 @@ +== Suppressed Messages == + +# Add warning and/or information messages here after you've confirmed that they aren't really a problem +# (And include comments like this justifying why) +# See https://github.com/FHIR/sample-ig/blob/master/input/ignoreWarnings.txt for examples \ No newline at end of file diff --git a/input/pagecontent/index.md b/input/pagecontent/index.md new file mode 100644 index 0000000..31f036f --- /dev/null +++ b/input/pagecontent/index.md @@ -0,0 +1,3 @@ +# ExampleIG + +Feel free to modify this index page with your own awesome content! \ No newline at end of file diff --git a/sushi-config.yaml b/sushi-config.yaml new file mode 100644 index 0000000..9ab7dfb --- /dev/null +++ b/sushi-config.yaml @@ -0,0 +1,209 @@ +# ╭─────────────────────────Commonly Used ImplementationGuide Properties───────────────────────────╮ +# │ The properties below are used to create the ImplementationGuide resource. The most commonly │ +# │ used properties are included. For a list of all supported properties and their functions, │ +# │ see: https://fshschool.org/docs/sushi/configuration/. │ +# ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ +id: fhir.example +canonical: http://example.org +name: ExampleIG +# title: Example Title +# description: Example Implementation Guide for getting started with SUSHI +status: draft # draft | active | retired | unknown +version: 0.1.0 +fhirVersion: 4.0.1 # https://www.hl7.org/fhir/valueset-FHIR-version.html +copyrightYear: 2023+ +releaseLabel: ci-build # ci-build | draft | qa-preview | ballot | trial-use | release | update | normative+trial-use +# license: CC0-1.0 # https://www.hl7.org/fhir/valueset-spdx-license.html +# jurisdiction: urn:iso:std:iso:3166#US "United States of America" # https://www.hl7.org/fhir/valueset-jurisdiction.html +publisher: + name: Example Publisher + url: http://example.org/example-publisher + # email: test@example.org + +# The dependencies property corresponds to IG.dependsOn. The key is the +# package id and the value is the version (or dev/current). For advanced +# use cases, the value can be an object with keys for id, uri, and version. +# +# dependencies: +# hl7.fhir.us.core: 3.1.0 +# hl7.fhir.us.mcode: +# id: mcode +# uri: http://hl7.org/fhir/us/mcode/ImplementationGuide/hl7.fhir.us.mcode +# version: 1.0.0 +# +# +# The pages property corresponds to IG.definition.page. SUSHI can +# auto-generate the page list, but if the author includes pages in +# this file, it is assumed that the author will fully manage the +# pages section and SUSHI will not generate any page entries. +# The page file name is used as the key. If title is not provided, +# then the title will be generated from the file name. If a +# generation value is not provided, it will be inferred from the +# file name extension. Any subproperties that are valid filenames +# with supported extensions (e.g., .md/.xml) will be treated as +# sub-pages. +# +# pages: +# index.md: +# title: Example Home +# implementation.xml: +# examples.xml: +# title: Examples Overview +# simpleExamples.xml: +# complexExamples.xml: +# +# +# The parameters property represents IG.definition.parameter. Rather +# than a list of code/value pairs (as in the ImplementationGuide +# resource), the code is the YAML key. If a parameter allows repeating +# values, the value in the YAML should be a sequence/array. +# For parameters defined by core FHIR see: +# http://build.fhir.org/codesystem-guide-parameter-code.html +# For parameters defined by the FHIR Tools IG see: +# http://build.fhir.org/ig/FHIR/fhir-tools-ig/branches/master/CodeSystem-ig-parameters.html +# +# parameters: +# excludettl: true +# validation: [allow-any-extensions, no-broken-links] +# +# ╭────────────────────────────────────────────menu.xml────────────────────────────────────────────╮ +# │ The menu property will be used to generate the input/menu.xml file. The menu is represented │ +# │ as a simple structure where the YAML key is the menu item name and the value is the URL. │ +# │ The IG publisher currently only supports one level deep on sub-menus. To provide a │ +# │ custom menu.xml file, do not include this property and include a `menu.xml` file in │ +# │ input/includes. To use a provided input/includes/menu.xml file, delete the "menu" │ +# │ property below. │ +# ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ +menu: + Home: index.html + Artifacts: artifacts.html + +# ╭───────────────────────────Less Common Implementation Guide Properties──────────────────────────╮ +# │ Uncomment the properties below to configure additional properties on the ImplementationGuide │ +# │ resource. These properties are less commonly needed than those above. │ +# ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ +# +# Those who need more control or want to add additional details to the contact values can use +# contact directly and follow the format outlined in the ImplementationGuide resource and +# ContactDetail. +# +# contact: +# - name: Bob Smith +# telecom: +# - system: email # phone | fax | email | pager | url | sms | other +# value: bobsmith@example.org +# use: work +# +# +# The global property corresponds to the IG.global property, but it +# uses the type as the YAML key and the profile as its value. Since +# FHIR does not explicitly disallow more than one profile per type, +# neither do we; the value can be a single profile URL or an array +# of profile URLs. If a value is an id or name, SUSHI will replace +# it with the correct canonical when generating the IG JSON. +# +# global: +# Patient: http://example.org/fhir/StructureDefinition/my-patient-profile +# Encounter: http://example.org/fhir/StructureDefinition/my-encounter-profile +# +# +# The resources property corresponds to IG.definition.resource. +# SUSHI can auto-generate all of the resource entries based on +# the FSH definitions and/or information in any user-provided +# JSON or XML resource files. If the generated entries are not +# sufficient or complete, however, the author can add entries +# here. If the reference matches a generated entry, it will +# replace the generated entry. If it doesn't match any generated +# entries, it will be added to the generated entries. The format +# follows IG.definition.resource with the following differences: +# * use IG.definition.resource.reference.reference as the YAML key. +# * if the key is an id or name, SUSHI will replace it with the +# correct URL when generating the IG JSON. +# * specify "omit" to omit a FSH-generated resource from the +# resource list. +# * if the exampleCanonical is an id or name, SUSHI will replace +# it with the correct canonical when generating the IG JSON. +# * groupingId can be used, but top-level groups syntax may be a +# better option (see below). +# The following are simple examples to demonstrate what this might +# look like: +# +# resources: +# Patient/my-example-patient: +# name: My Example Patient +# description: An example Patient +# exampleBoolean: true +# Patient/bad-example: omit +# +# +# Groups can control certain aspects of the IG generation. The IG +# documentation recommends that authors use the default groups that +# are provided by the templating framework, but if authors want to +# use their own instead, they can use the mechanism below. This will +# create IG.definition.grouping entries and associate the individual +# resource entries with the corresponding groupIds. If a resource +# is specified by id or name, SUSHI will replace it with the correct +# URL when generating the IG JSON. +# +# groups: +# GroupA: +# name: Group A +# description: The Alpha Group +# resources: +# - StructureDefinition/animal-patient +# - StructureDefinition/arm-procedure +# GroupB: +# name: Group B +# description: The Beta Group +# resources: +# - StructureDefinition/bark-control +# - StructureDefinition/bee-sting +# +# +# The ImplementationGuide resource defines several other properties +# not represented above. These properties can be used as-is and +# should follow the format defined in ImplementationGuide: +# * date +# * meta +# * implicitRules +# * language +# * text +# * contained +# * extension +# * modifierExtension +# * experimental +# * useContext +# * copyright +# * packageId +# +# +# ╭──────────────────────────────────────────SUSHI flags───────────────────────────────────────────╮ +# │ The flags below configure aspects of how SUSHI processes FSH. │ +# ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ +# The FSHOnly flag indicates if only FSH resources should be exported. +# If set to true, no IG related content will be generated. +# The default value for this property is false. +# +# FSHOnly: false +# +# +# When set to true, the "short" and "definition" field on the root element of an Extension will +# be set to the "Title" and "Description" of that Extension. Default is true. +# +# applyExtensionMetadataToRoot: true +# +# +# The instanceOptions property is used to configure certain aspects of how SUSHI processes instances. +# See the individual option definitions below for more detail. +# +# instanceOptions: +# Determines for which types of Instances SUSHI will automatically set meta.profile +# if InstanceOf references a profile: +# +# setMetaProfile: always # always | never | inline-only | standalone-only +# +# +# Determines for which types of Instances SUSHI will automatically set id +# if InstanceOf references a profile: +# +# setId: always # always | standalone-only