The website runs SUSHI only. The HL7 FHIR Validator is a Java program, so the toolkit runs it in a command-line tool on your own computer. Nothing is sent to a server.
Needs
- Node.js 22
- Java 17 or later, for the validator
validator_cli.jarversion 7.0.3 (download)
Install
The command-line tool installs from the toolkit's source code, which is not public yet. These steps will appear here when it is. Until then, use the FSH Checker on this site: it runs the same SUSHI compiler.
Use
Once the tool is installed, these are the commands to run.
# SUSHI only
npx hdt fsh-check my-profile.fsh
# SUSHI, then the validator on everything SUSHI made
npx hdt fsh-check my-profile.fsh --validator-jar ./validator_cli.jar
# Read FSH from standard input
cat my-profile.fsh | npx hdt fsh-check -
# Extra packages, and JSON output for scripts
npx hdt fsh-check my-profile.fsh --deps "hl7.fhir.us.core#6.1.0" --json
| Option | Meaning |
|---|---|
--validator-jar PATH |
Run the validator too. You can also set HDT_VALIDATOR_JAR. |
--deps "pkg#ver,..." |
Extra FHIR packages. |
--json |
Print results as JSON. |
--all |
Also show information-level validator messages. |
The validator runs with -version 4.0.1 -tx n/a. -tx n/a means codes are not checked against a terminology server, so the run works offline once packages are cached.
Exit codes
| Code | Meaning |
|---|---|
| 0 | No errors |
| 1 | Errors found |
| 2 | Bad usage, for example a missing file |