Skip to content

Commit

Permalink
Include R5 ImplementationGuide configuration (#67)
Browse files Browse the repository at this point in the history
* Update table to include R5 changes

* Add R5 examples as comments in the exhaustive-config.yaml

* Update link to tips page

* Minor spacing and wording updates

* Minor wording and one space update
  • Loading branch information
jafeltra committed Sep 15, 2022
1 parent 43af0dc commit a3164ec
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
7 changes: 5 additions & 2 deletions content/docs/SUSHI/configuration/_index.md
Expand Up @@ -138,10 +138,11 @@ The table below lists all configuration properties that can be used in SUSHI's *
| contact | contact | As specified in the IG resource |
| contained | contained | As specified in the IG resource |
| copyright | copyright | As specified in the IG resource |
| copyrightLabel| copyrightLabel | As specified in the IG resource - **Note:** this is an R5 IG element |
| copyrightYear or copyrightyear | N/A | Used to add a `copyrightyear` parameter to `IG.definition.parameter` |
| date | date | As specified in the IG resource |
| description | description | As specified in the IG resource |
| dependencies | dependsOn | A `key: value` pair, where key is the package id and 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 | dependsOn | A `key: value` pair, where key is the package id and value is the version (or `dev`/`current`). For advanced use cases, the value can be an object with keys for `id`, `uri` and `version`. For R5 IG resources, the key `reason` can also be provided. |
| experimental | experimental | As specified in the IG resource |
| extension | extension | As specified in the IG resource |
| fhirVersion | fhirVersion | As specified in the IG resource. SUSHI supports FHIR versions in the R4 or R5 sequences, as given in the [FHIR Publication History](http://hl7.org/fhir/directory.html). 5.0.0-snapshot1. Projects that wish to use a 5.0.0 pre-release can specify the version in their sushi-config.yaml file, e.g., `fhirVersion: 5.0.0-snapshot1`. |
Expand All @@ -160,7 +161,7 @@ The table below lists all configuration properties that can be used in SUSHI's *
| name | name | As specified in the IG resource |
| packageId | packageId | As specified in the IG resource. If unspecified, defaults to `id`. |
| pages | definition.page | SUSHI can auto-generate pages, but authors can manage pages through this property. If this property is used, SUSHI will not generate any page entries. The YAML key is the file name containing the page. The title key-value pair provides the title for the page. If a title is not provided, then the title will be generated from the file name. If a generation value (corresponding to definition.page.generation) is not provided, it will be inferred from the file name extension. In the IG resource, pages can contain sub-pages; so in the config file, any sub-properties that are valid filenames with supported extensions (e.g., .md/.xml) will be treated as sub-pages. See the [Exhaustive Example](#exhaustive-example) for details. |
| parameters | definition.parameter | Consists of key-value pairs where the keys are values of `definition.parameter.code`. If a parameter allows repeating values, the value in the YAML may be a sequence/array. For example, the `path-resource` parameter specifies relative paths to additional folders that contain predefined resources (see [Specifying Additional Resource Paths](tips/#specifying-additional-resource-paths)). |
| parameters | definition.parameter | Consists of key-value pairs where the keys are values of `definition.parameter.code`. For R5 IG resources, the key can be a FSH code that specifies the `code` and `system` values of `definition.parameter.code`, which is a Coding. See the [Exhaustive Example](#exhaustive-example) for details. If a parameter allows repeating values, the value in the YAML may be a sequence/array. For example, the `path-resource` parameter specifies relative paths to additional folders that contain predefined resources (see [Specifying Additional Resource Paths](/docs/sushi/tips/#specifying-additional-resource-paths)). |
| publisher | publisher, with cardinality changed to 0..* | Publisher can be a single item or a list, each with a name and optional url and/or email. The first publisher's name will be used as IG.publisher. The contact details and/or additional publishers will be translated into IG.contact values |
| releaseLabel or releaselabel | N/A | Used to add a `releaseLabel` parameter to `IG.definition.parameter` |
| resources | definition.resource | SUSHI can auto-generate a list of resources based on FSH definitions and provided JSON or XML resources, but this property can be used to add additional entries or override generated entries. SUSHI uses the {resource type}/{resource name} format as the YAML key (corresponding to IG.definition.resource.reference). Authors can specify the value "omit" to omit a FSH-generated resource from the resource list. `groupingId` can be used, but top-level groups syntax may be a better option. |
Expand All @@ -171,6 +172,8 @@ The table below lists all configuration properties that can be used in SUSHI's *
| url | url | As specified in the IG resource. If unspecified, defaults to `{canonical}/ImplementationGuide/{id}`. |
| useContext | useContext | As specified in the IG resource |
| version | version | As specified in the IG resource |
| versionAlgorithmString | versionAlgorithm[x] | As specified in the IG resource - **Note:** this is an R5 IG element |
| versionAlgorithmCoding | versionAlgorithm[x] | As specified in the IG resource - **Note:** this is an R5 IG element |

## Exhaustive Example

Expand Down
37 changes: 37 additions & 0 deletions content/docs/SUSHI/configuration/exhaustive-config.yaml
Expand Up @@ -56,6 +56,7 @@ jurisdiction: urn:iso:std:iso:3166#US "United States of America"
# 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 `uri` and `version`.
# For R5 ImplementationGuides, the object can also have a key for `reason`.
dependencies:
hl7.fhir.us.core: 3.1.0
hl7.fhir.us.mcode:
Expand Down Expand Up @@ -94,6 +95,18 @@ resources:
exampleBoolean: true
Patient/bad-example: omit

# For R5 ImplementationGuides, the example[x] property was replaced
# with isExample. A profile property is also included. These can be
# specified directly in configuration. Profile can be a single item
# or an array.
# An example resources configuration for an R5 ImplementationGuide:
# resources:
# Patient/my-example-patient:
# name: My Example Patient
# description: An example Patient
# isExample: true
# profile: http://example.org/fhir/StructureDefinition/my-patient-profile

# 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
Expand Down Expand Up @@ -124,6 +137,11 @@ groups:
# file name extension. Any subproperties that are valid filenames
# with supported extensions (e.g., .md/.xml) will be treated as
# sub-pages.
#
# For R5 ImplementationGuides, the IG.definition.page element now
# supports a source[x] element. SUSHI will generate sourceUrl
# based on the name if it is not provided. To provide a source,
# add a key/value pair subproperty with the type slice as the key.
pages:
index.md:
title: Example Home
Expand All @@ -148,6 +166,12 @@ pages:
# * copyright
# * packageId

# The R5 ImplementationGuide resource defines additional properties
# not represented above. These properties can be used as-is and
# should follow the format defined in ImplementationGuide:
# * copyrightLabel
# * versionAlgorithm[x], which should be specified with the type slice (e.g. versionAlgorithmString)

# 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
Expand All @@ -174,6 +198,19 @@ parameters:
validation: [allow-any-extensions, no-broken-links]
show-inherited-invariants: false

# For R5 ImplementationGuides, the IG.definition.parameter.code became a Coding.
# In this case, the YAML key becomes the code.code. If the code provided is in the
# value set bound in the IG definition (see: http://hl7.org/fhir/2022Sep/valueset-guide-parameter-code.html),
# that system is automatically set. If no system is provided, SUSHI will default the system
# to the system for the IG Parameter Codes
# (see: http://build.fhir.org/ig/FHIR/fhir-tools-ig/branches/master/CodeSystem-ig-parameters.html).
# To use a different system, the YAML key can be a FSH code.
# An example parameters configuration for an R5 ImplementationGuide:
# parameters:
# generate-xml: true
# validation: [allow-any-extensions, no-broken-links]
# http://example.org/fhir/other-system#example: false

# 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.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/SUSHI/project/_index.md
Expand Up @@ -116,7 +116,7 @@ You can populate your project as follows:
* **N\_pagename.xml\|md**: If present, these files will be generated as individual pages in the IG. The leading integer (N) determines the order of the pages in the table of contents. Adding a leading integer is optional, and in the absence of a leading integer, SUSHI will sort the pages alphabetically. The order of the pages can also be explitly specified with the `pages` property in **sushi-config.yaml**.
* **{artifact-file-name}-intro.xml\|md**: If present, the contents of the file will be placed on the relevant page _before_ the artifact's definition.
* **{artifact-file-name}-notes.xml\|md**: If present, the contents of the file will be placed on the relevant page _after_ the artifact's definition.
* **input/{supported-resource-input-directory}/\*** (not shown above): JSON or XML files in [supported resource directories](https://build.fhir.org/ig/FHIR/ig-guidance/using-templates.html#root.input) (e.g., **profiles**, **extensions**, **examples**, etc.) can be referenced by FHIR artifacts defined in FSH, and will be added to the generated **ImplementationGuide.json** file. If there are additional subfolders (e.g., input/resources/nested), use the `path-resource` parameter in **sushi-config.yaml** to tell the IG Publisher which additional input paths to process (see [Specifying Additional Resource Paths](tips/#specifying-additional-resource-paths) for details).
* **input/{supported-resource-input-directory}/\*** (not shown above): JSON or XML files in [supported resource directories](https://build.fhir.org/ig/FHIR/ig-guidance/using-templates.html#root.input) (e.g., **profiles**, **extensions**, **examples**, etc.) can be referenced by FHIR artifacts defined in FSH, and will be added to the generated **ImplementationGuide.json** file. If there are additional subfolders (e.g., input/resources/nested), use the `path-resource` parameter in **sushi-config.yaml** to tell the IG Publisher which additional input paths to process (see [Specifying Additional Resource Paths](/docs/sushi/tips/#specifying-additional-resource-paths) for details).
* **package-list.json**: This optional file, described [here](https://confluence.hl7.org/display/FHIR/FHIR+IG+PackageList+doco), should contain the version history of your IG.
* **sushi-ignoreWarnings.txt**: This optional file can be used to suppress warnings logged by SUSHI. Errors and informational logs from SUSHI cannot be ignored. This file should be placed either at the root of the project (e.g., **my-project/sushi-ignoreWarnings.txt** in the example above), or within the **input** directory (e.g., **my-project/input/sushi-ignoreWarnings.txt**). Warnings will be ignored if they completely match the contents of any line of the file (one line per warning, case-sensitive). Regular expressions can also be specified, one per line, indicated by starting and ending the line with `/`. For example:

Expand Down

0 comments on commit a3164ec

Please sign in to comment.