IntakeForm is a dynamic questionnaire widget that renders intake questions from a questionnaire definition and collects patient responses. It handles multiple answer types, supports nested question groups, and auto-saves in-progress responses so patients can complete the intake across multiple sessions. Completed submissions are stored as FHIR QuestionnaireResponse resources through a backend proxy you control.
Props
URL of your backend proxy endpoint. The widget sends GET requests to load the questionnaire definition and any in-progress response, and POST requests to submit completed responses.
CSS class name applied to the widget’s root element for layout and theming control.
Callback invoked when a load or submission request to your proxy fails. Use this to notify the patient and offer retry options.
Proxy setup
Your proxy needs to return the questionnaire definition on GET and accept responses on POST. The example below shows a Next.js App Router implementation:Usage
Features
- Dynamic question rendering based on the questionnaire definition returned by your proxy — no hardcoded form fields
- Multiple answer types: text, boolean, integer, date, and coded (choice) responses
- Nested question groups: hierarchical sections render with proper indentation and grouping
- Auto-save as
in-progress: the widget periodically saves partial responses so patients can return later - Final submission as
completed: submitting the form updates the status tocompletedin a single request
Responses are stored as FHIR
QuestionnaireResponse resources. This means intake data is structured, queryable, and can be linked to the patient’s broader clinical record in ClinikAPI.