Clinical trial operations
Four runnable examples, each in Python and JavaScript, for a clinical trial operations team that wants a record of what the study decided, when, and on what evidence. They use a fictional Phase II study (KVR-417-201) with four sites, a CRO and a sponsor, all invented for the demo.
| Example | What it does |
|---|---|
| Ingest a monitoring visit report | Add a new CRA visit report with the visit date as its valid time |
| Ask an as-of question | Which consent form version should site 03 have used on 2026-03-03 |
| Provenance of a decision | Who recommended and who decided dose level 2, what was rejected, and the evidence |
| Export the audit trail | Download the workspace and write one audit line per record |
Before you run them
You need the "Clinical trial demo" workspace, an API key for it, and the SmartMemory 2.0 SDKs (the ones whose add returns a save receipt).
pip install smartmemory-client # Python, 2.0 line
npm install @smartmemory/sdk-js # JavaScript, 2.0 line
export SMARTMEMORY_API_KEY=... # your key
export SMARTMEMORY_WORKSPACE_ID=... # the demo workspace id
# optional, defaults to https://api.smartmemory.ai
# export SMARTMEMORY_BASE_URL=...The JavaScript files are ES modules. Run them with node 01_ingest_visit_report.mjs and the Python files with python 01_ingest_visit_report.py.
Each example has its own page with the full code: ingest a visit report, ask an as-of question, provenance of a decision, and export the audit trail.
Read more
- The whitepaper: Memory for clinical trial operations
- A live demo app on the same dataset: trial.smartmemory.ai
- Decisions lifecycle example
What this is not
SmartMemory keeps a traceable, exportable record next to your trial systems. It does not make clinical decisions and it does not replace your EDC or CTMS.