Structure

A yaml rules file is named as follows: <name>.rules.yaml. The default ruleset is called default.rules.yaml

Rulesets

A yaml ruleset file consists of entries, start with a dash, followed by a series of indented key-value pairs: Notice that the comments here are not part of the entry, just an description how to read it.

# comment for first entry

- first: value
  second: value
  third: value

# comment for second entry

- first: value
  second: value
  third: value
Simplifier.net project drop-down for running rulesets

Executing a ruleset in Simplifier.net

Default rulesets

Simplifier will provide a few default rulesets, accessible to every project: minimal.rules.yaml and recommended.rules.yaml.

Minimal ruleset

The minimal series a very small set of rules that we know everyone aggrees on. This minimal series include the bulk validation rule, validating all resources against the FHIR specification and your profiles.

Additionally it validates whether all your canonical URLs are unique, another minimal requirement for a FHIR specification.

Warning

The rules below are a snapshot in time of the QC minimal rules and are subject to change.

# This is the minimal rule series

- action: parse
  name: parse-fhir-resources
  status: "Checking if all FHIR Resource files can be parsed"
  files:
    - /**/*.xml
    - /**/*.json
    - "!package.json"

- name: resource-validation
  status: "Validating resources against the FHIR standard and their profiles"
  action: validate
  category: Resource
  suppress:
    - 6005
    - eld-16

- action: unique
  name: unique-canonicals
  status: "Checking if all StructureDefinitions have a unique canonical"
  filter: StructureDefinition
  unique: url

Minimal ruleset snapshot 05-2021

Custom rulesets

You can add other rule files to your project, as long as their name follows this pattern: <name>.rules.yaml and they are placed in the root of your project. They will all be discovered by the system, and exposed in the Quality Control menu of your project, to allow you to run them.

Running individual or multiple rulesets

In Simplifier and in Firely Terminal you can run individual rulesets, in which case the default set and other sets will not be run.

You can however include other rulesets in a Yaml Rule File, allowing you to run multiple sets at once. See the include action for more details.