Reporting module: how it works

The core idea is simple: fetch structured inputs from multiple sources (RIS, modalities, AI services), merge them into a single input_json, then run doctor-authored Python scripts that populate a result dictionary. Each key in result becomes a report snippet placeholder.

High-level flow
Architecture diagram
The contract for scripts
  • Scripts receive input_json (merged data from services).
  • Scripts write snippets into result (a dict).
  • All *.py scripts are concatenated in filename order and executed as one program.
  • In production this happens in a restricted environment; the static demo runs locally in your browser.
Placeholders in the report
Example placeholder:
<ext:CuraForge.impression_snippet>
In the demo we “render” the report by replacing these placeholders with values from result.