Skip to content

add c3q form, adjust tags and title#29

Open
david-roper wants to merge 2 commits into
DouglasNeuroInformatics:mainfrom
david-roper:add-c3q
Open

add c3q form, adjust tags and title#29
david-roper wants to merge 2 commits into
DouglasNeuroInformatics:mainfrom
david-roper:add-c3q

Conversation

@david-roper

@david-roper david-roper commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

closes issue https://github.com/DouglasNeuroInformatics/CPP/issues/78

Moves the content of the starkstein apathy form into the c3q form.

form can be viewed here

Summary by CodeRabbit

  • New Features
    • Added a bilingual (English/French) HIV C3Q questionnaire with 14 Likert-style rating questions (0–3).
    • All questions use radio inputs with consistent labels and localized titles, descriptions, and instructions.
    • Built-in validation ensures responses are integer values 0–3 for reliable data collection.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30c60de9-7157-4f0d-a694-2e39fece809b

📥 Commits

Reviewing files that changed from the base of the PR and between 01215e5 and af5d82d.

📒 Files selected for processing (1)
  • lib/forms/C3Q/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/forms/C3Q/index.ts

Walkthrough

A new C3Q HIV questionnaire instrument is added at lib/forms/C3Q/index.ts. The form defines 14 bilingual Likert-scale radio fields (0–3), a shared Zod validation schema, localized metadata, and measures references for each field.

Changes

C3Q Form Definition

Layer / File(s) Summary
Validation schema and Likert options
lib/forms/C3Q/index.ts
Zod integer schema constrains values to 0–3 and maps to English/French Likert labels ("Not at all" / "A little" / "Moderately" / "Very much" with French equivalents).
Instrument configuration, fields, and metadata
lib/forms/C3Q/index.ts
Top-level instrument metadata includes form kind, supported languages, validation schema, localized description/title/instructions, and reference information. A single content section defines 14 questionnaire fields as radio-numeric inputs with shared Likert options, localized labels, and disableAutoPrefix: true. Internal metadata, measures references for each field, and localized tags complete the definition.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • joshunrau

Poem

📋 Fourteen questions now shine bright,
From zero to three, a Likert delight!
Bilingual labels dance side by side,
French and English, unified with pride.
HIV wisdom, clearly defined. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'add c3q form, adjust tags and title' is partially related to the changeset but lacks specificity about the main change—adding a bilingual HIV C3Q questionnaire with 14 radio-scale fields.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
lib/forms/C3Q/index.ts (1)

2-2: ⚡ Quick win

Consider using Zod v4 API for new instruments.

New instruments should prefer the v4 API. Update the import to:

-import { z } from '/runtime/v1/zod@3.x';
+import { z } from '/runtime/v1/zod@3.x/v4';

No code changes required in the validation schema itself.

As per coding guidelines: "New instruments should use the v4 API (/runtime/v1/zod@3.x/v4)."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/forms/C3Q/index.ts` at line 2, The import is using the Zod v3 path;
update the module specifier to the v4 API per guideline by changing the import
of z from '/runtime/v1/zod@3.x' to the v4 runtime path (use the v4 variant used
across the repo) in lib/forms/C3Q/index.ts; no schema changes required—only
update the import statement so the rest of the file (z usages) continues to work
with Zod v4.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lib/forms/C3Q/index.ts`:
- Line 14: There is a French typo in the options list: change the string 'Un
peut' to the correct 'Un peu' (locate and update the entry containing "'Un
peut'" in lib/forms/C3Q/index.ts and replace it with "'Un peu'").
- Around line 210-213: internal.name is incorrectly set to
'STARKSTEIN_APATHY_SCALE' but should identify the C3Q instrument; update the
internal.name property in the form definition (the object containing
internal.name) to 'C3Q' so the instrument identity matches title/tags/PR intent
(search for internal.name in the C3Q form module to locate and change it).

---

Nitpick comments:
In `@lib/forms/C3Q/index.ts`:
- Line 2: The import is using the Zod v3 path; update the module specifier to
the v4 API per guideline by changing the import of z from '/runtime/v1/zod@3.x'
to the v4 runtime path (use the v4 variant used across the repo) in
lib/forms/C3Q/index.ts; no schema changes required—only update the import
statement so the rest of the file (z usages) continues to work with Zod v4.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e9c2bd7-782f-4ecd-b51f-63b3b3d2cfeb

📥 Commits

Reviewing files that changed from the base of the PR and between b74a6fc and 01215e5.

📒 Files selected for processing (1)
  • lib/forms/C3Q/index.ts

Comment thread lib/forms/C3Q/index.ts Outdated
Comment thread lib/forms/C3Q/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant