Check an IG’s built Questionnaires with CSIRO’s SDC libraries
Build-time Structured Data Capture checks, one result per Questionnaire (sdcChecks[] of fhir-questionnaire-wireframe): assemble (@aehrc/sdc-assemble 2.0.3: an assemble-root’s sub-forms resolve in this IG, and --out writes the assembled Questionnaire), template-extract (@aehrc/sdc-template-extract 1.0.16: extraction from the IG’s fixture response yields the expected resources), populate (@aehrc/sdc-populate 4.7.2: FHIRPath pre-population from a fixture context gives the expected answers) and behaviour (@aehrc/questionnaire-test-toolkit 0.1.0: the IG’s own behavioural test, warn-only). Checks only, no UI.
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-questionnaire-wireframe
Source: fhir-harness/skills/content/fhir-ig-authoring/fhir-questionnaire-wireframe.md.
Also satisfied by: check-wireframe-questionnaire.
input — fhir-harness/schemas/skills/fhir-questionnaire-wireframe/input.schema.json, https://litlfred.github.io/folio-assistant/fhir-harness/skills/fhir-questionnaire-wireframe/input.schema.json
| field | type | required | description |
|---|---|---|---|
questionnaire | string | yes | Repository-relative path of ONE built Questionnaire JSON (fsh-generated/resources/Questionnaire-<id>.json), never FSH. Several Questionnaires are several runs, so each carries its own fidelity findings and review. |
mode | render \| fidelity-check \| wireframe-from-questionnaire | render: wireframe and form view for review. fidelity-check: only the field-for-field check against wireframe. wireframe-from-questionnaire: draw an L2 wireframe from a Questionnaire that has none. | |
wireframe | string | Repository-relative path of the L2 wireframe HTML the Questionnaire was derived from (the chosen wireframe-design-review candidate), when one exists. | |
renderer | lhc-forms | The form-view renderer. Only the vendored NLM LHC-Forms (owner, 2026-10-14). | |
assetDir | string | Repository-relative directory for the wireframes, captures and checks. | |
suggest | boolean | Offer ✍ suggest, in its Questionnaire mode, on the form view. | |
issueForm | string | The issue form change requests are opened with. | |
channels | object[] | Where the request for review goes: chosen by judgement, and more than one may be right (staging-review, the deep-link rule, point 5). | |
branch | string | The feature branch the renderings are committed on, so feature-staging publishes them. |
output — fhir-harness/schemas/skills/fhir-questionnaire-wireframe/output.schema.json, https://litlfred.github.io/folio-assistant/fhir-harness/skills/fhir-questionnaire-wireframe/output.schema.json
| field | type | required | description |
|---|---|---|---|
use | design \| as-is | yes | |
topic | string | yes | |
assetDir | string | yes | Repository-relative directory holding the wireframes, the form-view captures and their checks. |
intent | string | Repository-relative path of intent.md. | |
candidates | object[] | yes | At least two for Design use, exactly one (marked as-is) for as-is use. |
chosen | object | Design use: the candidate the human reviewer chose. Absent until they choose; an agent never records a choice on a person’s behalf. | |
questionnaire | string | The built Questionnaire JSON rendered, as in the input. | |
renderer | object | yes | What drew the form view. The vendored build, never a CDN at runtime (owner, 2026-10-14). |
fidelity | fidelityEntry[] | check-wireframe-questionnaire’s findings, one entry per Questionnaire and wireframe layout. Absent when no L2 wireframe exists; an entry whose status is could-not-determine (exit 2) is never a pass. | |
sdcChecks | sdcCheckResult[] | The SDC build checks (fhir-harness sdc-checks, CSIRO’s libraries), one entry per Questionnaire. not-applicable, no-fixture and could-not-determine are never a pass; a behavioural test’s failure is a warning. | |
changeRequests | changeRequest[] | Change requests received through ✍ suggest or the questionnaire-change issue form, and where each stands. | |
changedAssets | changedAsset[] | yes | Every file the branch adds, changes or removes — wireframe HTML, form-view pages, screenshots, reviews — in the changed-assets record shape a staging preview’s graph carries. |
stagingLinks | stagingLinks | yes |
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 | ast | FilesystemPath | yes | The IG’s FHIR AST (output-ast/): its Questionnaires, and the canonicals a sub-form resolves against. | string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument. |
| in | questionnaire | Text | A Questionnaire id to check; default every one in the AST. | string · A short single-line human string. Not admissible as a command-line argument. | |
| in | fixtures | FilesystemPath | One directory per Questionnaire id: response.json + extract-expected.json, populate-context.json + populate-expected.json, behaviour.test.tsx. | string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument. | |
| in | out | FilesystemPath | Where assembled Questionnaires are written. | string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument. | |
| out | sdcChecks | Text | Per Questionnaire, per check: pass, fail, not-applicable, no-fixture or could-not-determine — the last three never a pass. JSON with --json. Exit 1 on an error-severity failure; behavioural tests never fail the run. | 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 |
|---|---|---|---|
| Questionnaire wireframe review | Read the built Questionnaire JSON | FHIR modeller | fhir-questionnaire-wireframe |
| Questionnaire wireframe review | Render the wireframe and the LHC-Forms view | FHIR modeller | fhir-questionnaire-wireframe |
| Questionnaire wireframe review | Check field for field | Build pipeline — rendering, screenshots, fidelity | fhir-questionnaire-wireframe |
| Questionnaire wireframe review | Review the staged form and wireframe | Clinical reviewer — the staged form | fhir-questionnaire-wireframe |
| SMART Guideline end to end | Review each L3 asset (before / after if adapted) | Human adjudicators | fhir-questionnaire-wireframe |
How it is deployed and reached
- Command line. From the repository root:
bun run fhir-harness/scripts/sdc-checks.ts --ast <ast> [--questionnaire <id>] [--fixtures <dir>] [--out <dir>] [--json]. - GitHub Actions. No workflow in this checkout runs its command.
As an API: its operation in the OpenAPI document and the MCP tool list of its layer.
| install | none |
| runtime | bun |
| network | no |
| when to choose it | |
|---|---|
| when | After SUSHI has built the IG’s Questionnaires and before they are reviewed as forms; whenever a Questionnaire uses modular sub-forms, template extraction or pre-population. |
| limits | Only as good as the IG’s fixtures: with none, extraction and population say no-fixture rather than pass. Nothing is fetched from a server: sub-forms resolve in the AST and population queries in the fixture. The behavioural toolkit is early and needs React and Smart Forms peers installed with the IG’s tests; without them it is could-not-determine, a warning. |
| cost | Seconds per Questionnaire; a behavioural test runs a bun test process. |
What it is made of
| role | file | |
|---|---|---|
| definition | fhir-harness/tools/sdc-checks/sdc-checks.ts | |
| script | fhir-harness/scripts/sdc-checks.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/sdc-checks.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/sdc-checks.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "https://litlfred.github.io/folio-assistant/fhir-harness/fhir-harness.jsonld",
"name": "sdc-checks",
"title": "Check an IG's built Questionnaires with CSIRO's SDC libraries",
"description": "Build-time Structured Data Capture checks, one result per Questionnaire (`sdcChecks[]` of `fhir-questionnaire-wireframe`): `assemble` (`@aehrc/sdc-assemble` 2.0.3: an assemble-root's sub-forms resolve in this IG, and `--out` writes the assembled Questionnaire), `template-extract` (`@aehrc/sdc-template-extract` 1.0.16: extraction from the IG's fixture response yields the expected resources), `populate` (`@aehrc/sdc-populate` 4.7.2: FHIRPath pre-population from a fixture context gives the expected answers) and `behaviour` (`@aehrc/questionnaire-test-toolkit` 0.1.0: the IG's own behavioural test, warn-only). Checks only, no UI.",
"install": {
"none": true
},
"invoke": {
"shell": "bun run fhir-harness/scripts/sdc-checks.ts --ast <ast> [--questionnaire <id>] [--fixtures <dir>] [--out <dir>] [--json]"
},
"io": {
"inputs": [
{
"name": "ast",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
"description": "The IG's FHIR AST (`output-ast/`): its Questionnaires, and the canonicals a sub-form resolves against.",
"required": true
},
{
"name": "questionnaire",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
"description": "A Questionnaire id to check; default every one in the AST.",
"required": false
},
{
"name": "fixtures",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
"description": "One directory per Questionnaire id: `response.json` + `extract-expected.json`, `populate-context.json` + `populate-expected.json`, `behaviour.test.tsx`.",
"required": false
},
{
"name": "out",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
"description": "Where assembled Questionnaires are written.",
"required": false
}
],
"outputs": [
{
"name": "sdcChecks",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Text",
"description": "Per Questionnaire, per check: pass, fail, not-applicable, no-fixture or could-not-determine — the last three never a pass. JSON with `--json`. Exit 1 on an error-severity failure; behavioural tests never fail the run."
}
]
},
"satisfies": [
"fhir-questionnaire-wireframe"
],
"requirements": {
"runtime": [
"bun"
],
"network": false
},
"selection": {
"when": "After SUSHI has built the IG's Questionnaires and before they are reviewed as forms; whenever a Questionnaire uses modular sub-forms, template extraction or pre-population.",
"limits": "Only as good as the IG's fixtures: with none, extraction and population say `no-fixture` rather than pass. Nothing is fetched from a server: sub-forms resolve in the AST and population queries in the fixture. The behavioural toolkit is early and needs React and Smart Forms peers installed with the IG's tests; without them it is `could-not-determine`, a warning.",
"cost": "Seconds per Questionnaire; a behavioural test runs a bun test process."
}
}