Write FHIR questionnaires
npx skills add StanfordSpezi/SpeziVibe --skill fhir-questionnaire-authoring
Or install all skills: npx skills add StanfordSpezi/SpeziVibe --skill '*'. See the Getting Started guide for tool-specific options.
Explore this skill in browser chat. Each button opens a new conversation; bring any earlier briefs with you and save the results yourself.
Need to paste the prompt yourself?
Please act as the SpeziVibe `fhir-questionnaire-authoring` skill and walk me through it interactively.
STEP 1 — Fetch the skill instructions from this URL and read them carefully:
https://raw.githubusercontent.com/StanfordSpezi/SpeziVibe/main/skills/fhir-questionnaire-authoring/SKILL.md
STEP 2 — This skill references additional files. When the instructions tell you to read one, fetch it from these URLs:
- references/questionnaire-patterns.md: https://raw.githubusercontent.com/StanfordSpezi/SpeziVibe/main/skills/fhir-questionnaire-authoring/references/questionnaire-patterns.md
- references/renderer-support.md: https://raw.githubusercontent.com/StanfordSpezi/SpeziVibe/main/skills/fhir-questionnaire-authoring/references/renderer-support.md
STEP 3 — Walk me through the skill interactively. When a step would normally save a markdown file to a project, show the file content in a code block instead so I can copy it. Don't simulate my answers — wait for me to respond.
If you cannot fetch the skill instructions or their reference files, ask me to paste them before proceeding.
Ask me to paste or attach any existing briefs you need. Do not claim to have read files, run commands, created a project, or tested an integration from this chat. Help me prepare the decisions and instructions, then hand off file and code work to my coding tool.If your chat can’t open the skill link, open the instructions in a new tab and paste them into the chat.
Turns the surveys your app needs into FHIR R4 Questionnaire files that the app shows exactly as intended, checks them against the app's questionnaire renderer, and hands them to a person to review in the Phoenix survey builder.
Why It Matters
FHIR allows far more than any app renderer implements, and most gaps are silent. On iOS, a condition on a question inside a group is ignored, and a slider with more than 13 steps is rejected. In the React Native template, limits on optional questions aren't enforced, and a required question hidden by a condition blocks Submit. This skill writes within what the app supports, and checks the result with a tool instead of from memory.
What It Does
- Reads the study brief, data model and implementation plan, and works out the app's platform and renderer version.
- Writes one Questionnaire JSON file per survey, keeping validated instruments' wording exactly as published.
- Runs
questionnaire-checkagainst the app's renderer and fixes every error. - Wires the survey into the Spezi template, if the app exists.
- Gives the reviewer a Phoenix link to read and edit the survey, and explains in plain words anything the app will ignore.
Output
One checked Questionnaire JSON file per survey (for example questionnaires/phq-9.json), the app wiring, and Phoenix review links.
Example
AI: Your study brief lists a weekly PHQ-9 and a daily sleep check-in,
and the app is the Spezi Template Application with
ResearchKitOnFHIR 2.0.7. Do you have the official PHQ-9 wording?
You: Yes, here it is. The sleep check-in is ours.
AI: Written and checked against ios@2.0.7:
questionnaires/phq-9.json no issues
questionnaires/sleep-check-in.json
fixed: the "Hours of sleep" slider was 0–24 in steps of 1
(24 steps; iOS allows at most 13). It's now a number field
with a 0–24 limit.
Review links for your coordinator:
https://stanfordbdhg.github.io/phoenix/#questionnaire-deflate=…