| name | Assessment Schema YAML |
| description | Use when editing assessment YAML sources in sources/, asking about the assessment schema structure, adding tasks/fields to prescan.yaml, dpia.yaml or iama.yaml, or working with dependencies, calculations, or references in assessment definitions. |
| version | 0.1.0 |
Assessment Schema YAML
Guide for editing YAML assessment sources (sources/prescan.yaml, sources/dpia.yaml, sources/iama.yaml) that conform to schemas/assessment-definition.v1.schema.json.
Top-level Structure
name: "DPIA Rapportagemodel Rijksdienst"
urn: "urn:nl:dpia:3.0"
version: "3.0"
description: "..."
tasks: [...]
assessments: [...]
prefixQuestionIds: true
The IAMA (sources/iama.yaml, urn: "urn:nl:iama", version: "2.0") is a third assessment type alongside Pre-scan and DPIA. It sets prefixQuestionIds: true, which prefixes each task label with its official question ID.
Task Structure
Every task requires these fields:
- task: "Task title"
id: "2.1.3"
type:
- open_text
repeatable: false
Optional fields:
description: explanation text (may contain HTML)
category: grouping category
is_official_id: true if ID matches the Rapportagemodel DPIA numbering
valueType: expected data type (string, boolean, number, string[], boolean|null)
defaultValue: pre-filled value
options: required when type includes select_option, checkbox_option, or radio_option
tasks: nested child tasks (for task_group type)
dependencies: conditional display rules
calculation: score calculation logic
references: cross-references to other assessments
sources: external resource references (images, documents)
required_status: whether the field is mandatory
instance_label_template: template for repeatable instance labels (e.g. "Gegevensverwerking {4.1.1}")
IAMA-specific task fields (present in sources/iama.yaml):
in_fria: true — marks a question as part of the FRIA (Fundamental Rights Impact Assessment, art. 27 AI-verordening)
action_point_group: true — marks a task group that collects the action points ("Actiepunten") for a deel
action_point_summary: true — marks the deel (Deel 5 – Afsluiting) that summarises all action points
Field Types
| Type | Description | Requires |
|---|
text_input | Single-line text | - |
open_text | Multi-line text | - |
select_option | Dropdown select | options array |
multiselect_scrollable | Scrollable multi-select list (used in iama.yaml) | options array |
checkbox_option | Multiple checkboxes | options array |
radio_option | Radio buttons | options array |
task_group | Container for child tasks | tasks array |
informational | Read-only informational block (no input; used in iama.yaml) | - |
date | Date picker | - |
A task can have multiple types (array), e.g. [open_text, select_option].
Options
options:
- value: "option_value"
label: "Display label"
Dependencies
Three types of dependencies control conditional behavior:
conditional — Show/hide based on another answer
dependencies:
- type: conditional
condition:
id: "2.1.6"
operator: equals
value: true
action: show
source_options — Load options dynamically from another field
dependencies:
- type: source_options
condition:
id: "2.1"
action: options
instance_mapping — Sync instances between repeatables
dependencies:
- type: instance_mapping
source:
id: "3.1"
mapping_type: one_to_one
action: sync_instances
Calculations (Pre-scan)
Score calculations use jexl expressions:
calculation:
scoreKey: "gewone_persoonsgegeven"
expression: "answers('1.1.2') | count"
riskScore:
- when: "gewone_persoonsgegeven < 6"
value: 0
- when: "gewone_persoonsgegeven >= 6"
value: 1
Available jexl functions
answers('taskId') — get the answer value for a task
bool(value) — convert to boolean
count — filter/transform that counts array items
countSelectedOptions('taskId') — count selected checkbox options
weightedCountMap(answers, weightMap) — weighted count of selected options
References
Cross-references between Pre-scan and DPIA:
references:
prescanModelId: "1"
DPIA: "1.1"
DPIA:
- id: "1.1"
type: "one-to-one"
DPIA:
id: "12.1.1"
type: "pre-fill"
Assessment Evaluation Rules (Pre-scan)
assessments:
- id: "DPIA"
levels:
- level: "required"
expression: "criteria.wetgeving || criteria.riskscore"
result: "DPIA verplicht"
criteria:
- id: "wetgeving"
expression: "bool(answers('0.1'))"
explanation: "er sprake is van nieuwe wet- of regelgeving"
ID Numbering
- Top-level sections: single number (
"0", "1", "2")
- Subsections: dot-separated (
"2.1", "2.1.3")
- Task ID
"0" is the introduction (not an official DPIA section)
is_official_id: true means the ID corresponds to the Rapportagemodel numbering
Validation
After editing YAML sources, validate with:
python script/schema_validator.py --schema schemas/assessment-definition.v1.schema.json --source sources/dpia.yaml
python script/schema_validator.py --schema schemas/assessment-definition.v1.schema.json --source sources/prescan.yaml
python script/schema_validator.py --schema schemas/assessment-definition.v1.schema.json --source sources/iama.yaml
The schema file schemas/assessment-definition.v1.schema.json is the source of truth. Always read it when unsure about allowed values.