Every message the toolkit explains, 62 entries in all. Where we recorded a real message, it is shown with the explanation the toolkit gives for it.
Messages that are not in this list still appear in the results, with the original text and a general hint.
SUSHI 3.21.0
Unexpected text in the FSH
Catalogue id: sushi-parse-extraneous
Real message:
extraneous input '}' expecting {<EOF>, KW_ALIAS, KW_PROFILE, KW_EXTENSION, KW_INSTANCE, KW_INVARIANT, KW_VALUESET, KW_CODESYSTEM, KW_RULESET, KW_MAPPING, KW_LOGICAL, KW_RESOURCE}
What it means: SUSHI found "}" where it expected a new definition (Profile, Extension, Instance and so on) or a rule. This usually means a rule line is missing its leading "* ", a keyword is misspelled, or stray characters were pasted in.
Try this: Check the line shown. Every rule must start with "* " (asterisk and a space). Keywords are case sensitive, for example "Parent:" not "parent:". Remove stray characters such as braces or Markdown code fences (```).
Spec: hl7.org/fhir/uv/shorthand/reference.html#grammar
Wrong kind of value for this keyword or rule
Catalogue id: sushi-parse-mismatched
Real message:
mismatched input 'Missing' expecting STRING
What it means: SUSHI read "Missing" but the grammar expected STRING. Here it wanted a quoted string, so the text is probably missing its double quotes.
Try this: Put the value in double quotes, for example: Title: "My Profile".
Spec: hl7.org/fhir/uv/shorthand/reference.html#fsh-rules
Something is missing from this rule
Catalogue id: sushi-parse-missing
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/uv/shorthand/reference.html#fsh-rules
SUSHI could not make sense of this line
Catalogue id: sushi-parse-no-viable
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/uv/shorthand/reference.html#fsh-rules
Empty cardinality
Catalogue id: sushi-card-empty
Real message:
Neither side of the cardinality was specified on path "code". A min, max, or both need to be specified.
What it means: The rule for "code" has ".." with no numbers on either side.
Try this: Give a minimum, a maximum or both, for example: * code 1..1 or * code 0..*.
Spec: hl7.org/fhir/uv/shorthand/reference.html#cardinality-rules
SUSHI could not parse the input
Catalogue id: sushi-parse-generic
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/uv/shorthand/reference.html#grammar
Alias is not defined
Catalogue id: sushi-alias-unresolved
Real message:
Value $LNC does not resolve as alias, values beginning with "$" must resolve
What it means: $LNC looks like an alias (it starts with $), but no "Alias:" line defines it in the code you pasted.
Try this: Add an alias definition at the top, for example: Alias: $LNC = http://loinc.org (use the right URL for your code system), or write the full URL instead of the alias.
Spec: hl7.org/fhir/uv/shorthand/reference.html#defining-aliases
Not a valid URI
Catalogue id: sushi-not-valid-uri
Real message:
Resolved value "$LNC" is not a valid URI.
What it means: $LNC was meant to be an alias, but because it is not defined SUSHI treated it as a literal URI, which is not valid.
Try this: Define it with an Alias: line, for example: Alias: $LNC = http://loinc.org.
Spec: hl7.org/fhir/uv/shorthand/reference.html#defining-aliases
Dependency could not be downloaded
Catalogue id: sushi-dependency-not-loaded
Real message:
Failed to load hl7.fhir.us.cor#6.1.0: Failed to download hl7.fhir.us.cor#6.1.0 from the registry
What it means: SUSHI could not download hl7.fhir.us.cor version 6.1.0 from the FHIR package registry. Usually the package name or the version is misspelled, or that version was never published. Anything that comes from it (parents, value sets, aliases) will also fail.
Try this: Look the package up at https://packages.fhir.org/hl7.fhir.us.cor (or search packages.fhir.org if the name is wrong) and copy the exact id and a published version, for example hl7.fhir.us.core#6.1.0.
Spec: fshschool.org/docs/sushi/configuration/
Two definitions have the same name
Catalogue id: sushi-duplicate-name
Real message:
Skipping Instance: an Instance named X already exists.
What it means: There is already an Instance named X, so SUSHI skipped the second one. Names must be unique within the project.
Try this: Rename one of them (for example X2), or delete the copy if it was pasted twice. If both should be the same Instance, merge their rules into one definition.
Spec: hl7.org/fhir/uv/shorthand/reference.html#item-names
Parent profile or resource not found
Catalogue id: sushi-parent-not-found
Real message:
Parent USCorePatientProfile not found for P08
What it means: P08 says "Parent: USCorePatientProfile", but SUSHI cannot find a definition with that name, id or URL. It is either misspelled, or it lives in an implementation guide package that has not been added as a dependency.
Try this: Check the spelling of USCorePatientProfile. If it comes from another IG (for example US Core), add that package as a dependency (the Dependencies box on the site, or --deps in the CLI, such as hl7.fhir.us.core#6.1.0) and use its exact name, id or canonical URL.
Spec: fshschool.org/docs/sushi/configuration/
InstanceOf target not found
Catalogue id: sushi-instanceof-not-found
Real message:
InstanceOf ProfileThatDoesNotExist not found for Obs14
What it means: Instance Obs14 says "InstanceOf: ProfileThatDoesNotExist", but no profile, extension or resource with that name, id or URL is available.
Try this: Fix the spelling of ProfileThatDoesNotExist, define that profile in the same paste, or add the IG that defines it as a dependency. If the profile itself failed to compile, fix its errors first.
Spec: hl7.org/fhir/uv/shorthand/reference.html#defining-instances
Unknown type
Catalogue id: sushi-type-not-found
Real message:
No definition for the type "Quantityy" could be found.
What it means: "Quantityy" is not a FHIR data type, resource or profile that SUSHI knows about.
Try this: Check the spelling and capitalisation (Quantity, CodeableConcept, Reference(Patient)). For profiles from another IG, add the package as a dependency.
Spec: hl7.org/fhir/uv/shorthand/reference.html#type-rules
RuleSet not found
Catalogue id: sushi-ruleset-not-found
Real message:
Unable to find definition for RuleSet NoSuchRuleSet.
What it means: An "insert NoSuchRuleSet" rule refers to a RuleSet that is not defined.
Try this: Define it with "RuleSet: NoSuchRuleSet" (and its rules) or fix the name in the insert rule.
Spec: hl7.org/fhir/uv/shorthand/reference.html#defining-rule-sets
Wrong number of RuleSet parameters
Catalogue id: sushi-ruleset-params
Real message:
Incorrect number of parameters applied to RuleSet TwoParams
What it means: The insert rule passes a different number of values than RuleSet TwoParams declares.
Try this: Look at the "RuleSet: TwoParams(...)" line and pass exactly one value per parameter, separated by commas.
Spec: hl7.org/fhir/uv/shorthand/reference.html#parameterized-rule-sets
Element path does not exist
Catalogue id: sushi-path-not-found
Real message:
The element or path you referenced does not exist: nmae.family
What it means: There is no element at "nmae.family" in this resource or profile. Common causes: a typo, using a choice type name that the profile does not allow (for example valueInteger when value[x] is limited to Quantity), or referring to a slice or extension by a name that was never defined.
Try this: Check the path against the resource page in the FHIR spec. For choice elements use value[x] or a type that the profile allows. For slices and extensions, use the exact name given in the "contains" rule.
Spec: hl7.org/fhir/uv/shorthand/reference.html#fsh-paths
Rule points at a path that does not exist (rule skipped)
Catalogue id: sushi-no-element-skipping
Real message:
No element found at path nothere for CaretValueRule in P19, skipping rule
What it means: In P19, a CaretValue rule targets "nothere", which does not exist, so SUSHI ignored the rule. The output will be missing that constraint.
Try this: Fix the path spelling. If the path uses a slice name such as identifier[mrn], make sure the slice is created first with a "contains" rule and that slicing is defined on the element.
Spec: hl7.org/fhir/uv/shorthand/reference.html#fsh-paths
Slice added to an element that is not sliced
Catalogue id: sushi-no-slicing
Real message:
Cannot create mrn slice. No slicing found for Observation.identifier.
What it means: You tried to add the slice "mrn" to Observation.identifier, but that element has no slicing definition (discriminator and rules).
Try this: Define slicing before the contains rule, for example:
- identifier ^slicing.discriminator.type = #pattern
- identifier ^slicing.discriminator.path = "system"
- identifier ^slicing.rules = #open
Spec: hl7.org/fhir/uv/shorthand/reference.html#contains-rules-for-slicing
Duplicate slice name
Catalogue id: sushi-slice-exists
Real message:
Slice named lab already exists on element Observation.category of P11
What it means: P11 already has a slice called "lab" on Observation.category, either earlier in your code or inherited from the parent profile.
Try this: Give the new slice a different name, or if the parent already defines it, constrain the existing slice instead of adding it again.
Spec: hl7.org/fhir/uv/shorthand/reference.html#contains-rules-for-slicing
Inline extension inside a profile
Catalogue id: sushi-inline-extension
Real message:
Inline extensions should only be defined in Extensions.
What it means: The rule "extension contains someName" uses a bare name, which creates an inline (local) extension. FSH only allows that inside an Extension definition, for complex extensions. In a Profile, each extension must point to a separate Extension definition.
Try this: Define the extension on its own (Extension: MyExt, with its value[x] rule) and then reference it from the profile: * extension contains MyExt named myExt 0..1.
Spec: hl7.org/fhir/uv/shorthand/reference.html#contains-rules-for-extensions
Extension has both a value and sub-extensions
Catalogue id: sushi-ext-value-and-sub
Real message:
Extension on E18 cannot have both a value and sub-extensions
What it means: E18 defines sub-extensions and also allows value[x]. A FHIR extension is either simple (one value) or complex (sub-extensions), not both.
Try this: Pick one. For a simple extension keep the value[x] rule and remove the sub-extensions. For a complex extension remove the value[x] rule; SUSHI then sets value[x] to 0..0 for you.
Spec: hl7.org/fhir/R4/extensibility.html
Extension definition not found
Catalogue id: sushi-cannot-create-extension
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/uv/shorthand/reference.html#contains-rules-for-extensions
Cardinality can only get narrower
Catalogue id: sushi-card-not-narrower
Real message:
Cannot constrain cardinality to 0..2, as it does not fit within the original 0..1 cardinality.
What it means: The element is already 0..1, set by the parent or by an earlier rule in your FSH, and you tried 0..2. A profile can make cardinality stricter (raise the minimum, lower the maximum) but never looser.
Try this: Choose a range inside 0..1: minimum at least 0, maximum at most 1. If an earlier rule in your FSH set 0..1, change or remove that rule. If the parent sets it and you really need 0..2, use a different parent.
Spec: hl7.org/fhir/uv/shorthand/reference.html#cardinality-rules
Binding strength can only get stronger
Catalogue id: sushi-binding-weaker
Real message:
Cannot override required binding with preferred binding.
What it means: The parent binds this element with strength "required" and the rule tries "preferred". Profiles may tighten a binding (example, preferred, extensible, required) but not loosen it.
Try this: Use (required) or a stronger strength, or leave the strength off to keep the parent's binding.
Spec: hl7.org/fhir/uv/shorthand/reference.html#binding-rules
Value set bound to a non-coded element
Catalogue id: sushi-bind-non-coded
Real message:
Cannot bind value set to integer; must be coded (code, Coding, CodeableConcept, Quantity, CodeableReference), the data types (string, uri), or a logical model with the #can-bind characteristic.
What it means: A value set can only be bound to coded types (code, Coding, CodeableConcept, Quantity) or string/uri. This element is integer.
Try this: Bind the value set to a coded element instead. For a choice element, first restrict it with an only rule (for example value[x] only CodeableConcept) and then bind.
Spec: hl7.org/fhir/uv/shorthand/reference.html#binding-rules
Type is not allowed here
Catalogue id: sushi-type-not-allowed
Real message:
The type "Patient" does not match any of the allowed types: Quantity or CodeableConcept or string or boolean or integer or Range or Ratio or SampledData or time or dateTime or Period
What it means: An only rule (or assignment) uses "Patient", but this element only allows: Quantity or CodeableConcept or string or boolean or integer or Range or Ratio or SampledData or time or dateTime or Period.
Try this: Pick one or more types from the allowed list. For references, the target must be one of the resource types the parent already allows.
Spec: hl7.org/fhir/uv/shorthand/reference.html#type-rules
Element already has an exact (fixed) value
Catalogue id: sushi-pattern-vs-fixed
Real message:
Cannot assign this element using a pattern; as it is already assigned in the StructureDefinition using fixedCode. Since fixed[x] requires exact matches, while pattern[x] allows for variation in unspecified properties, fixed[x] cannot be replaced by pattern[x] since it would loosen the constraint.
What it means: An earlier rule or the parent set this element with fixedCode (an exact match). A later pattern assignment would be looser, so it is not allowed.
Try this: Remove the second assignment, or change the first one. Only use "(exactly)" when you really need an exact match.
Spec: hl7.org/fhir/uv/shorthand/reference.html#assignment-rules
A different value is already assigned
Catalogue id: sushi-already-assigned
Real message:
Cannot assign http://loinc.org#9999-9 to this element; a different CodeableConcept is already assigned: {"coding":[{"code":"1234-5","system":"http://loinc.org"}]}.
What it means: This element already has a CodeableConcept value (from an earlier rule or the parent profile), and the rule tries to assign a different one (http://loinc.org#9999-9).
Try this: Delete one of the two assignments. If the parent fixes the value, you cannot change it in a child profile. To allow several codes, use a binding to a value set instead of an assignment.
Spec: hl7.org/fhir/uv/shorthand/reference.html#assignment-rules
Title is empty
Catalogue id: sushi-empty-title
Real message:
Profile P06 has a title field that should not be empty.
What it means: P06 has a Title line, but SUSHI ended up with an empty title. This often happens after an error on the Title line itself, for example a title written without double quotes.
Try this: Write the title in double quotes, for example: Title: "Body weight". Or remove the Title line.
Spec: hl7.org/fhir/uv/shorthand/reference.html#defining-profiles
Value has the wrong form for this element
Catalogue id: sushi-wrong-value-type
Real message:
Cannot assign string value: my system. Value does not match element type: uri
What it means: The element is of type uri, and "my system" is not a valid uri (for example it contains spaces).
Try this: Use an absolute URI with no spaces, for example: "http://example.org/fhir/CodeSystem/my-codes".
Spec: hl7.org/fhir/uv/shorthand/reference.html#assignment-rules
Assignment to a choice element
Catalogue id: sushi-no-single-type
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/uv/shorthand/reference.html#assignment-rules
Required element is missing in an Instance
Catalogue id: sushi-instance-min-card
Real message:
Element Observation.code has minimum cardinality 1 but occurs 0 time(s).
What it means: The profile behind this Instance requires Observation.code at least 1 time, but the Instance sets it 0 times.
Try this: Add a value, for example: * code = ... . Required elements are those with a minimum cardinality of 1 or more in the profile.
Spec: hl7.org/fhir/uv/shorthand/reference.html#defining-instances
HL7 FHIR Validator 7.0.3
Required element is missing
Catalogue id: val-min-required
Real message:
Observation.effective[x]: minimum required = 1, but only found 0 (from http://hl7.org/fhir/StructureDefinition/bodyweight|4.0.1)
What it means: Observation.effective[x] must appear at least 1 time according to http://hl7.org/fhir/StructureDefinition/bodyweight|4.0.1, but the resource has 0.
Try this: Add effective[x] to the Instance. If the rule comes from your own profile and is stricter than you meant, relax the cardinality there.
Spec: hl7.org/fhir/R4/profiling.html
Element appears too many times
Catalogue id: val-max-allowed
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/profiling.html
Required slice is missing
Catalogue id: val-slice-required
Real message:
Slice 'Observation.category:VSCat': a matching slice is required, but not found (from http://hl7.org/fhir/StructureDefinition/bodyweight|4.0.1). Note that other slices are allowed in addition to this required slice
What it means: The profile requires an entry that matches slice Observation.category:VSCat, and none of the repetitions match it.
Try this: Add a repetition that matches the slice discriminator (for example the exact system and code the slice fixes).
Spec: hl7.org/fhir/R4/profiling.html#slicing
Slicing cannot be evaluated
Catalogue id: val-slicing-cannot-evaluate
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/profiling.html#discriminator
Element matches more than one slice
Catalogue id: val-matches-multiple-slices
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/profiling.html#slicing
Extension slice does not say which extension it is
Catalogue id: val-ext-slice-no-url
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/extensibility.html
Extension URL must be absolute
Catalogue id: val-ext-url-absolute
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/extensibility.html
Example URL used where a real URL is expected
Catalogue id: val-example-urls
Real message:
Example URLs are not allowed in this context (http://example.org/fhir/StructureDefinition/not-there)
What it means: http://example.org/fhir/StructureDefinition/not-there uses an example domain. The validator flags these because real artefacts should not point at example URLs. In this checker the canonical is http://example.org/fhir by default, so this is expected for snippets.
Try this: Safe to ignore for a quick check. For a real IG, set a real canonical URL in your sushi-config.yaml.
Spec: hl7.org/fhir/R4/validation.html
Code system used where a value set is needed
Catalogue id: val-codesystem-where-valueset
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/terminologies.html
Binding does not point to a value set
Catalogue id: val-valueset-ref-not-vs
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/terminologies.html
Code is not in the value set
Catalogue id: val-code-not-in-vs
Real message:
The value provided ('kgg') was not found in the value set 'Body Weight Units' (http://hl7.org/fhir/ValueSet/ucum-bodyweight|4.0.1), and a code is required from this value set (error message = The System URI could not be determined for the code 'kgg' in the ValueSet 'http://hl7.org/fhir/ValueSet/ucum-bodyweight|4.0.1'; The provided code '#kgg' was not found in the value set 'http://hl7.org/fhir/ValueSet/ucum-bodyweight|4.0.1')
What it means: "kgg" is not one of the codes in the value set "Body Weight Units". The binding is required, so only codes from this value set are allowed.
Try this: Use one of the codes from the value set (check spelling and case). Codes are case sensitive.
Spec: hl7.org/fhir/R4/terminologies.html#strength
Code system for this code is unknown
Catalogue id: val-system-not-determined
Real message:
The System URI could not be determined for the code 'kgg' in the ValueSet 'http://hl7.org/fhir/ValueSet/ucum-bodyweight|4.0.1'
What it means: The validator could not tell which code system "kgg" belongs to. Usually the code is misspelled, or it needs a system.
Try this: Check the code spelling. For Coding and CodeableConcept, include the system: system#code.
Spec: hl7.org/fhir/R4/terminologies.html
No coding matches the value set
Catalogue id: val-codings-not-in-vs
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/terminologies.html
Code does not exist in that code system
Catalogue id: val-unknown-code
Real message:
Unknown code 'vitalsigns' in the CodeSystem 'http://terminology.hl7.org/CodeSystem/observation-category' version '2.0.0'
What it means: "vitalsigns" is not a code in http://terminology.hl7.org/CodeSystem/observation-category.
Try this: Look up the correct code in the code system (codes are case sensitive and often hyphenated, for example vital-signs).
Spec: hl7.org/fhir/R4/terminologies.html
Code system not known to the validator
Catalogue id: val-codesystem-not-found
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/terminologies.html
Code not checked (no terminology server)
Catalogue id: val-no-tx
Real message:
Unable to validate code 'kgg' in system 'http://unitsofmeasure.org' because the validator is running without terminology services
What it means: The validator runs here without a terminology server, so codes from large external systems (UCUM, SNOMED CT, LOINC) are not checked.
Try this: Nothing to fix in your FSH. To check these codes, run the validator yourself with a terminology server.
Spec: hl7.org/fhir/R4/validation.html
Value differs from the fixed value
Catalogue id: val-fixed-mismatch
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/uv/shorthand/reference.html#assignment-rules
Type not allowed here
Catalogue id: val-type-not-allowed
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/uv/shorthand/reference.html#type-rules
Invariant not satisfied
Catalogue id: val-constraint-failed
Real message:
Constraint failed: dom-6: 'A resource should have narrative for robust management' (defined in http://hl7.org/fhir/StructureDefinition/DomainResource) (Best Practice Recommendation)
What it means: The resource breaks rule dom-6: "A resource should have narrative for robust management". This one is a best-practice warning that resources should include a narrative (text).
Try this: Safe to ignore for a quick check. SUSHI does not add narrative; the IG Publisher does.
Spec: hl7.org/fhir/R4/conformance-rules.html#constraints
Invariant expression could not be evaluated
Catalogue id: val-fhirpath-error
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhirpath/
Snapshot could not be generated
Catalogue id: val-snapshot-error
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/profiling.html
Empty value
Catalogue id: val-empty-value
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/json.html
Reference target does not fit the allowed profiles
Catalogue id: val-profile-match
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/references.html
Profile not found
Catalogue id: val-profile-not-found
Real message:
Profile reference 'http://example.org/fhir/StructureDefinition/not-there' has not been checked because it could not be found, and fetching it resulted in the error org.hl7.fhir.r4.utils.client.EFhirClientException: Error from https://example.org/fhir: Unparseable HTML Source (unexpected non-end of element null::script at line 1 column 549)
What it means: The resource claims http://example.org/fhir/StructureDefinition/not-there in meta.profile, but the validator could not find that profile in your FSH or in any dependency, so the resource was not checked against it.
Try this: Check the URL spelling. Define the profile in the same FSH, or add the implementation guide that defines it as a dependency (--deps).
Spec: hl7.org/fhir/R4/validation.html
Whitespace in a value
Catalogue id: val-whitespace-base
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/datatypes.html#string
Best-practice advice
Catalogue id: val-best-practice
Real message:
Best Practice Recommendation: In general, all observations should have a performer
What it means: Not an error. The validator suggests: In general, all observations should have a performer
Try this: Optional. Add the element if it makes sense for your example.
Spec: hl7.org/fhir/R4/conformance-rules.html
Deprecated extension
Catalogue id: val-deprecated-ext
No recorded example yet. The entry is matched by its message pattern.
Spec: hl7.org/fhir/R4/extensibility.html
Extension context is too broad
Catalogue id: val-extension-context
Real message:
Review the extension type for ElementContextExt: extensions should not have a context of Element unless it's really intended that they can be used anywhere
What it means: ElementContextExt can be used on any element because no context was set.
Try this: Add a context to the Extension, for example: * ^context[+].type = #element and * ^context[=].expression = "Patient".
Spec: hl7.org/fhir/uv/shorthand/reference.html#defining-extensions
Toolkit messages (hdt fsh-check)
The toolkit writes these messages itself when the validator cannot give a result.
The validator gave no result
Catalogue id: val-no-result
Real message:
The validator did not produce a result.
What it means: The validator started but did not write its report, so the generated JSON was not checked. The SUSHI messages are not affected.
Try this: Run "java -version" and check that it shows Java 17 or newer. Check that --validator-jar points to the HL7 validator_cli.jar (version 7.0.3). Then run the check again.
Read more: Run the full validator on your computer
The validator took too long
Catalogue id: val-timeout
No recorded example yet. The entry is matched by its message pattern.