mirror of
https://github.com/soconnor0919/hristudio.git
synced 2025-12-11 14:44:44 -05:00
docs: update participant trialCount documentation; fix participants view & experiments router diagnostics; add StepPreview placeholder and block-converter smoke test
This commit is contained in:
@@ -552,7 +552,7 @@ HRIStudio uses tRPC for type-safe API communication between client and server. A
|
||||
## Participant Management Routes (`participants`)
|
||||
|
||||
### `participants.list`
|
||||
- **Description**: List study participants
|
||||
- **Description**: List participants in a study
|
||||
- **Type**: Query
|
||||
- **Input**:
|
||||
```typescript
|
||||
@@ -563,7 +563,7 @@ HRIStudio uses tRPC for type-safe API communication between client and server. A
|
||||
search?: string
|
||||
}
|
||||
```
|
||||
- **Output**: Paginated participant list
|
||||
- **Output**: Paginated participant list. Each participant object in this response includes a computed `trialCount` field (number of linked trials) plus derived consent metadata; sensitive fields like `demographics` and `notes` are omitted in this list view.
|
||||
- **Auth Required**: Yes (Study member)
|
||||
|
||||
### `participants.get`
|
||||
@@ -586,7 +586,7 @@ HRIStudio uses tRPC for type-safe API communication between client and server. A
|
||||
demographics?: Record<string, any>
|
||||
}
|
||||
```
|
||||
- **Output**: Created participant object
|
||||
- **Output**: Created participant object (does NOT include `notes` or `trialCount`; `trialCount` is computed and only appears in list output as an aggregate)
|
||||
- **Auth Required**: Yes (Study researcher)
|
||||
|
||||
### `participants.update`
|
||||
|
||||
@@ -202,6 +202,9 @@ CREATE TABLE actions (
|
||||
|
||||
```sql
|
||||
-- Participants in studies
|
||||
-- NOTE: The application exposes a computed `trialCount` field in API list responses.
|
||||
-- This value is derived at query time by counting linked trials and is NOT persisted
|
||||
-- as a physical column in this table to avoid redundancy and maintain consistency.
|
||||
CREATE TABLE participants (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
study_id UUID NOT NULL REFERENCES studies(id) ON DELETE CASCADE,
|
||||
|
||||
Reference in New Issue
Block a user