DMN → FHIR Questionnaire
Generate FHIR Questionnaire resources from a DAK’s DMN decision tables. Authoring, not rendering: the IG Publisher validates and indexes them like any other resource.
| Tool | dmn-to-questionnaire |
| IRI | http://smart.who.int/base/tools/dmn-to-questionnaire.jsonld |
| part of | http://smart.who.int/base/smart-base.jsonld |
| type | https://litlfred.github.io/cat-harness/v0/ns/Tool |
| declared by | smart-base |
| invoked | shell |
| qa | qa-reports |
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.
dak-preprocessing
What each DAK pre-processing step does before the IG Publisher runs, which steps exist only to feed the Publisher’s page index, and how the phase runs as the overlay on fhir-harness’s AST cache refresh (dak-pre-export.sh). Also which files in a DAK repository are authored and which are generated, and the SEMVER rule for DAK and IG versions. Read before changing, assuming or moving a pre-processing step.
Source: smart-base/L3/skills/smart-l3/dak-preprocessing.md.
Also satisfied by: dak-config-from-sushi, dmn-to-html.
The skill declares no I/O contract (schemas/skills/dak-preprocessing/{input,output}.schema.json).
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 | dmnDir | RepoPath | yes | The DMN source directory, by convention input/dmn/. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. |
| out | questionnaires | RepoPath | The generated Questionnaire resources, written beside SUSHI’s output. | string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments. | |
| out | generated | Count | How many were produced. Zero means none only when the DMN directory was found; a missing directory is reported as such. | integer · A non-negative count — how many of something, or how many to show. Zero is a real answer. |
Processes and tasks
Steps this Tool can carry out, because each names a skill it satisfies:
| process | step | lane | via skill |
|---|---|---|---|
| SMART Guideline end to end | 4 · Create / adapt L2 DAK assets | Authoring agent | dak-preprocessing |
How it is deployed and reached
- Command line. From the repository root:
python3 input/scripts/dmn_questionnaire_generator.py. - 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 | python3 |
| network | no |
| when to choose it | |
|---|---|
| when | A DAK carries DMN decision tables and the IG is to expose them as answerable questionnaires. |
| limits | Reads DMN only: a decision expressed only in prose or CQL is skipped without error. It cannot tell an empty DMN directory from a DAK with no decisions. |
| cost | Seconds, no network. It runs before the Publisher, so a failure noticed only downstream costs a build cycle. |
What it is made of
| role | file | |
|---|---|---|
| script | input/scripts/dmn_questionnaire_generator.py | not in this checkout |
Linked data
The Tool is published as its own JSON-LD document at its IRI, http://smart.who.int/base/tools/dmn-to-questionnaire.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": "http://smart.who.int/base/smart-base.context.jsonld",
"@id": "http://smart.who.int/base/tools/dmn-to-questionnaire.jsonld",
"@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
"partOf": "http://smart.who.int/base/smart-base.jsonld",
"name": "dmn-to-questionnaire",
"title": "DMN → FHIR Questionnaire",
"description": "Generate FHIR `Questionnaire` resources from a DAK's DMN decision tables. Authoring, not rendering: the IG Publisher validates and indexes them like any other resource.",
"install": {
"none": true
},
"invoke": {
"shell": "python3 input/scripts/dmn_questionnaire_generator.py"
},
"io": {
"inputs": [
{
"name": "dmnDir",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The DMN source directory, by convention `input/dmn/`.",
"required": true
}
],
"outputs": [
{
"name": "questionnaires",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
"description": "The generated `Questionnaire` resources, written beside SUSHI's output."
},
{
"name": "generated",
"schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/Count",
"description": "How many were produced. Zero means none only when the DMN directory was found; a missing directory is reported as such."
}
]
},
"satisfies": [
"dak-preprocessing"
],
"requirements": {
"runtime": [
"python3"
],
"network": false
},
"selection": {
"when": "A DAK carries DMN decision tables and the IG is to expose them as answerable questionnaires.",
"limits": "Reads DMN only: a decision expressed only in prose or CQL is skipped without error. It cannot tell an empty DMN directory from a DAK with no decisions.",
"cost": "Seconds, no network. It runs before the Publisher, so a failure noticed only downstream costs a build cycle."
}
}