DAK spreadsheets → DMN, PlanDefinitions, CQL, requirements, logical models

Run WHO’s extract_dak.py in a DAK or IG repository. It reads the DAK template spreadsheets (input/decision-logic/*.xlsx via dt_extractor, input/system-requirements/*.xlsx via req_extractor, input/dictionary/*.xlsx via dd_extractor) and the BPMN, and writes DMN decision tables, CPG recommendation PlanDefinitions with citations, CQL library skeletons, Requirements and logical-model FSH. Per the WHO IG Starter Kit (l3_decisiontables, l3_cql), an adapted decision or scheduling table is an edited copy of the upstream DAK’s spreadsheet, never a parallel format.

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.

smart-base-tools

Source: smart-base/skills/content/authoring-who-smart-guidelines/smart-base-tools.md.

Also satisfied by: kg-extract-dak, bpmn-graphviz-layout, bpmn-to-fsh, bpmn-validate, kg-extract-bpmn, kg-extract-citations, kg-extract-dmn, kg-extract-l3.

The skill declares no I/O contract (schemas/skills/smart-base-tools/{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.

porttyperequireddescriptionconstraint
indakRepositoryFilesystemPathyesThe working directory: a DAK or IG repository with input/decision-logic/, input/system-requirements/ and input/dictionary/ spreadsheets in the DAK template layout.string · A filesystem path, possibly outside the repository. Not admissible as a command-line argument.
outdmnRepoPathDecision tables in the DAK DMN format (namespace https://www.omg.org/spec/DMN/20240513/MODEL/), each with an Annotations and a Reference(s) output.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
outfshRepoPathPlanDefinition, ActivityDefinition, Requirements and logical-model FSH, for SUSHI to compile.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.
outcqlRepoPathCQL library skeletons, one per decision table, with the definitions already present in input/cql/ carried over.string · pattern ^[A-Za-z0-9._][A-Za-z0-9._/-]*$ · A path relative to the repository root. No .. segments.

Processes and tasks

Steps this Tool can carry out, because each names a skill it satisfies:

processsteplanevia skill
SMART Guideline end to end3 · Choose L2 dependencies (WHO / jurisdiction DAKs)Authoring agentsmart-base-tools
SMART Guideline end to end4 · Create / adapt L2 DAK assetsAuthoring agentsmart-base-tools
SMART Guideline end to end5 · Choose L3 dependencies (WHO / jurisdiction IGs)Authoring agentsmart-base-tools
SMART Guideline end to end6 · Produce L3 assetsAuthoring agentsmart-base-tools

How it is deployed and reached

  • Command line. From the repository root: python3 $SMART_BASE_HOME/input/scripts/extract_dak.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.

installnone
runtimepython3
networkno
when to choose it
whenAn L2 decision-support, scheduling, requirements or data-dictionary component is created or adapted and the upstream DAK keeps it in the WHO DAK spreadsheet template. Look for that spreadsheet upstream before writing a decision table by hand.
limitsReads only the DAK template layout (COVER sheet, per-tab inputs and outputs); a table in any other shape is invisible to it. Requires a smart-base checkout at SMART_BASE_HOME; without one the capability is ABSENT, not a clean run. Where the upstream DAK repository has its own converters (e.g. tools/node/processDT*.js in https://github.com/litlfred/smart-immunizations), use those.
costSeconds to minutes, no network unless --run-publisher is passed.

What it is made of

Its definition names no file it is made of.

Linked data

The Tool is published as its own JSON-LD document at its IRI, http://smart.who.int/base/tools/extract-dak.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/extract-dak.jsonld",
  "@type": "https://litlfred.github.io/cat-harness/v0/ns/Tool",
  "partOf": "http://smart.who.int/base/smart-base.jsonld",
  "name": "extract-dak",
  "title": "DAK spreadsheets → DMN, PlanDefinitions, CQL, requirements, logical models",
  "description": "Run WHO's `extract_dak.py` in a DAK or IG repository. It reads the DAK template spreadsheets (`input/decision-logic/*.xlsx` via `dt_extractor`, `input/system-requirements/*.xlsx` via `req_extractor`, `input/dictionary/*.xlsx` via `dd_extractor`) and the BPMN, and writes DMN decision tables, CPG recommendation PlanDefinitions with citations, CQL library skeletons, Requirements and logical-model FSH. Per the WHO IG Starter Kit (`l3_decisiontables`, `l3_cql`), an adapted decision or scheduling table is an edited copy of the upstream DAK's spreadsheet, never a parallel format.",
  "install": {
    "none": true
  },
  "invoke": {
    "shell": "python3 $SMART_BASE_HOME/input/scripts/extract_dak.py"
  },
  "io": {
    "inputs": [
      {
        "name": "dakRepository",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/FilesystemPath",
        "description": "The working directory: a DAK or IG repository with `input/decision-logic/`, `input/system-requirements/` and `input/dictionary/` spreadsheets in the DAK template layout.",
        "required": true
      }
    ],
    "outputs": [
      {
        "name": "dmn",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "Decision tables in the DAK DMN format (namespace `https://www.omg.org/spec/DMN/20240513/MODEL/`), each with an `Annotations` and a `Reference(s)` output."
      },
      {
        "name": "fsh",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "PlanDefinition, ActivityDefinition, Requirements and logical-model FSH, for SUSHI to compile."
      },
      {
        "name": "cql",
        "schema": "https://litlfred.github.io/folio-assistant/cat-harness/tool-types.schema.json#/$defs/RepoPath",
        "description": "CQL library skeletons, one per decision table, with the definitions already present in `input/cql/` carried over."
      }
    ]
  },
  "satisfies": [
    "smart-base-tools"
  ],
  "requirements": {
    "runtime": [
      "python3"
    ],
    "network": false
  },
  "selection": {
    "when": "An L2 decision-support, scheduling, requirements or data-dictionary component is created or adapted and the upstream DAK keeps it in the WHO DAK spreadsheet template. Look for that spreadsheet upstream before writing a decision table by hand.",
    "limits": "Reads only the DAK template layout (COVER sheet, per-tab inputs and outputs); a table in any other shape is invisible to it. Requires a `smart-base` checkout at `SMART_BASE_HOME`; without one the capability is ABSENT, not a clean run. Where the upstream DAK repository has its own converters (e.g. `tools/node/processDT*.js` in https://github.com/litlfred/smart-immunizations), use those.",
    "cost": "Seconds to minutes, no network unless `--run-publisher` is passed."
  }
}

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev