z230
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# doplnujici_dotazy_v1.0 — evidence doplňujících dotazů na centra
|
||||
|
||||
**Verze:** 1.0 · **Datum:** 2026-06-17 · **Studie:** 77242113UCO3002 (ICONIC / DAWN)
|
||||
|
||||
## Účel
|
||||
Když v SIPIQ chybí odpověď a do dotazníku už NELZE vstoupit, doptáváme se centra zvlášť.
|
||||
Kolekce `feasibility.doplnujici_dotazy` eviduje, **ke kterému centru a ke které otázce** dotaz
|
||||
patří a v jakém je stavu. Souvisí s `sipiq_responses` / `sipiq_questions` (viz sipiq_import).
|
||||
|
||||
## Model (domluva 17JUN2026)
|
||||
- **1 dok = dotazová UDÁLOST** (může nést více otázek v `questions[]`).
|
||||
- Když centrum odpoví → odpověď se **promítne do `sipiq_responses.answers_supplement{}`**
|
||||
(`{value, source:"doplneno", doplnujici_dotaz_id, answered_at, answer_source}`); původní
|
||||
Qualtrics `answers` se **NEMĚNÍ**. Analýza/rekonstrukce pak může překrýt answers o answers_supplement.
|
||||
|
||||
## Struktura dokumentu
|
||||
```jsonc
|
||||
{
|
||||
"_id": ObjectId,
|
||||
"response_id": "R_…", // ref sipiq_responses._id
|
||||
"investigator_oid": ObjectId, // ref investigators
|
||||
"pi_last_name","site_name","site_country","pi_email", // denormalizace
|
||||
"status": "open", // open → asked → answered → closed / no_response
|
||||
"asked_at": null, "asked_via": null, "reason": "…", "note": null,
|
||||
"questions": [
|
||||
{"qcode":"Q72_1","question_base":"Q72","question_text":"…","section":"…",
|
||||
"answer":null,"answered_at":null,"answer_source":null,"status":"open"}
|
||||
],
|
||||
"created_at":"…","updated_at":"…","history":[]
|
||||
}
|
||||
```
|
||||
Indexy: `investigator_oid`, `response_id`, `status`, `questions.qcode`, `questions.status`.
|
||||
|
||||
## Příkazy
|
||||
```
|
||||
.venv\Scripts\python.exe Feasibility\doplnujici_dotazy_v1.0.py ensure
|
||||
.venv\Scripts\python.exe Feasibility\doplnujici_dotazy_v1.0.py add --center <email|prijmeni|R_id> [--country CZ|SK] \
|
||||
--qcodes Q72_1,Q73_1 [--reason "…"] [--asked-via "…"] [--status asked] [--note "…"] [--apply]
|
||||
.venv\Scripts\python.exe Feasibility\doplnujici_dotazy_v1.0.py answer --id <dotaz_id> --qcode Q72_1 \
|
||||
--answer "8" [--source "email 18JUN2026"] [--apply]
|
||||
.venv\Scripts\python.exe Feasibility\doplnujici_dotazy_v1.0.py list [--center …] [--open]
|
||||
```
|
||||
- `add`/`answer` defaultně **dry-run**, ostrý běh `--apply`.
|
||||
- `add` dohledá centrum v `sipiq_responses` (R_id / pi_email / příjmení+země) a text+sekci otázky
|
||||
v `sipiq_questions` (qcode může být leaf, např. Q72_1 → text báze Q72 + popisek item).
|
||||
- `answer` zapíše odpověď k otázce, přepočítá stav události (answered až když všechny otázky answered)
|
||||
a promítne do `sipiq_responses.answers_supplement`.
|
||||
|
||||
## Stav 17JUN2026
|
||||
Kolekce + indexy založeny (`ensure`), zatím 0 dokumentů. Dry-run `add` ověřen (Svoboda, Q72_1+Q73_1).
|
||||
Mongo 192.168.1.76:27017, bez auth, pymongo.
|
||||
Reference in New Issue
Block a user