Compile and check an IG’s translation CodeSystem supplements
Compile the IG’s CodeSystems with every input/fsh/translations/<locale>.fsh CodeSystem supplement in a throw-away FSHOnly SUSHI project, require 0 SUSHI errors, and check that each supplement’s base CodeSystem is the IG’s own, its codes are a subset of the base’s, its language is the file’s locale, and every CodeSystem id is unique. SUSHI is the version ig-toolchain.env pins, installed from scripts/sushi/package-lock.json with install scripts off; the FHIR core package is pinned by sha512; SUSHI runs with no network.
Skills it satisfies
A skill states the capability; this Tool is one way to exercise it. Each skill’s declared input and output contract follows, where it has one.
fhir-validation
Source: fhir-harness/skills/content/fhir-ig-authoring/fhir-validation.md.
Also satisfied by: fsh-cone.
input — fhir-harness/schemas/skills/fhir-validation/input.schema.json
| field | type | required | description |
|---|---|---|---|
igRoot | string | yes | Path to the IG repository root. |
validationLevel | sushi-only \| publisher-qa \| full | Level of validation to perform. | |
targetProfiles | string[] | Specific CRMI profiles to validate against (Shareable, Publishable, Computable, Executable). |
output — fhir-harness/schemas/skills/fhir-validation/output.schema.json
| field | type | required | description |
|---|---|---|---|
overallStatus | pass \| warnings \| errors | yes | |
sushiResult | object | ||
publisherResult | object | ||
conformanceResults | object[] |
Inputs and outputs
Each port names a shared type by IRI, so two Tools for one skill can be checked for interchangeability.
| port | type | required | description | constraint | |
|---|---|---|---|---|---|
| in | igRoot | RepoPath | The IG root; default the working directory. Only paths its contentTypes.ig.include declares are read. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| in | json | Flag | Print the result as JSON. | boolean · A boolean switch — projects to a bare flag, with no value word | |
| out | verdict | Text | Exit 0 pass or not applicable, 1 findings (each named with its file), 2 could not run. Could-not-run is never a pass. | string · A short single-line human string. Not admissible as a command-line argument. |
Processes and tasks
Steps this Tool can carry out, because each names a skill it satisfies:
| process | step | lane | via skill |
|---|---|---|---|
| Incremental IG build | Validate the cone (fhir_validate) | Publisher + validator services (JVM) | fhir-validation |
| L3 FHIR IG pipeline | Validate against profiles | Build pipeline — SUSHI · validator · IG Publisher | fhir-validation |
How it is deployed and reached
- Command line. From the repository root:
bun run fhir-harness/scripts/check-translation-supplements.ts. - GitHub Actions. 2 workflow line(s) run its command:
| workflow | line | |
|---|---|---|
fhir-harness/.github/workflows/translation-supplements.yml | 84 | [ -f fhir-harness/scripts/check-translation-supplements.ts ] \\ |
fhir-harness/.github/workflows/translation-supplements.yml | 111 | run: bun run fhir-harness/scripts/check-translation-supplements.ts "$IG_ROOT" --tarballs "$RUNNER_TEMP/fhir-tarballs" |
As an API: its operation in the OpenAPI document and the MCP tool list of its layer.
| install | cli: npm ci --ignore-scripts --no-audit --no-fund --prefix fhir-harness/scripts/sushi |
| runtime | bun, node, npm |
| network | yes |
When a host it reaches is refused:
| host / error | remedy |
|---|---|
registry.npmjs.org | none: SUSHI and the FHIR core package both come from npm. Without it, pass --sushi an installed SUSHI of the pinned version and --tarballs a directory holding the core tarball; both are still verified. |
| when to choose it | |
|---|---|
| when | A pull request changes an IG’s CodeSystems or its translation supplements, and the IG build is not run on it. |
| limits | Compiles only CodeSystems, Aliases and RuleSets with the supplements: a base CodeSystem written as an Instance, or one from another package, is reported as missing. |
| cost | One SUSHI run of a few seconds; the first run fetches the pinned FHIR core package (megabytes). |
What it is made of
| role | file | |
|---|---|---|
| definition | fhir-harness/tools/check-translation-supplements/check-translation-supplements.ts | |
| script | fhir-harness/scripts/check-translation-supplements.ts |
Linked data
The Tool is published as its own JSON-LD document at its IRI, https://litlfred.github.io/folio-assistant/fhir-harness/tools/check-translation-supplements.jsonld, partOf its layer’s document. The node below is the definition this page was drawn from, and is embedded in the page as application/ld+json.
{
"@context": "https://litlfred.github.io/folio-assistant/fhir-harness/fhir-harness.context.jsonld",
"@id": "https://litlfred.github.io/folio-assistant/fhir-harness/tools/check-translation-supplements.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "https://litlfred.github.io/folio-assistant/fhir-harness/fhir-harness.jsonld",
"name": "check-translation-supplements",
"title": "Compile and check an IG's translation CodeSystem supplements",
"description": "Compile the IG's CodeSystems with every `input/fsh/translations/<locale>.fsh` CodeSystem supplement in a throw-away FSHOnly SUSHI project, require 0 SUSHI errors, and check that each supplement's base CodeSystem is the IG's own, its codes are a subset of the base's, its language is the file's locale, and every CodeSystem id is unique. SUSHI is the version `ig-toolchain.env` pins, installed from `scripts/sushi/package-lock.json` with install scripts off; the FHIR core package is pinned by sha512; SUSHI runs with no network.",
"install": {
"cli": "npm ci --ignore-scripts --no-audit --no-fund --prefix fhir-harness/scripts/sushi"
},
"invoke": {
"shell": "bun run fhir-harness/scripts/check-translation-supplements.ts"
},
"io": {
"inputs": [
{
"name": "igRoot",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The IG root; default the working directory. Only paths its `contentTypes.ig.include` declares are read.",
"required": false,
"arg": {
"positional": 0
}
},
{
"name": "json",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Flag",
"description": "Print the result as JSON.",
"required": false,
"arg": {
"flag": "--json"
}
}
],
"outputs": [
{
"name": "verdict",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
"description": "Exit 0 pass or not applicable, 1 findings (each named with its file), 2 could not run. Could-not-run is never a pass."
}
]
},
"satisfies": [
"fhir-validation"
],
"requirements": {
"runtime": [
"bun",
"node",
"npm"
],
"network": true
},
"remedies": [
{
"host": "registry.npmjs.org",
"none": "SUSHI and the FHIR core package both come from npm. Without it, pass `--sushi` an installed SUSHI of the pinned version and `--tarballs` a directory holding the core tarball; both are still verified."
}
],
"selection": {
"when": "A pull request changes an IG's CodeSystems or its translation supplements, and the IG build is not run on it.",
"limits": "Compiles only CodeSystems, Aliases and RuleSets with the supplements: a base CodeSystem written as an Instance, or one from another package, is reported as missing.",
"cost": "One SUSHI run of a few seconds; the first run fetches the pinned FHIR core package (megabytes)."
}
}