Questionnaire Structure
Hierarchy
Questionnaires are organized hierarchically:Components
| Component | Description |
|---|---|
| Questionnaire | The complete form |
| Group | A section containing related items |
| Item | An individual field or question |
Item Types
Text Items
| Type | Description |
|---|---|
| String | Single-line text |
| Text | Multi-line text area |
Numeric Items
| Type | Description |
|---|---|
| Integer | Whole numbers |
| Decimal | Numbers with decimal places |
| Quantity | Value with unit |
Date/Time Items
| Type | Description |
|---|---|
| Date | Calendar date |
| Time | Time of day |
| DateTime | Combined date and time |
Choice Items
| Type | Description |
|---|---|
| Choice | Single selection from options |
| Open Choice | Choice with optional free text |
| Boolean | Yes/No selection |
Special Items
| Type | Description |
|---|---|
| Attachment | File upload |
| Display | Read-only text/instructions |
| Calculated | Auto-computed value |
Validation Rules
Built-in Validation
| Rule | Description |
|---|---|
| Required | Field must have a value |
| Min/Max Length | Text length constraints |
| Min/Max Value | Numeric range constraints |
| Decimal Places | Maximum decimal digits |
| Pattern | Regex pattern matching |
Custom Validation
Questionnaires can include custom validation:- Cross-field validation
- Conditional requirements
- Business rule checks
Conditional Logic
Enable When
Fields can be conditionally displayed:Enable Behavior
When multiple conditions exist:| Behavior | Logic |
|---|---|
| All | All conditions must be true |
| Any | Any condition can be true |
How Conditions Work
How Conditions Work
When a field has enable conditions, it’s hidden until conditions are met. Changing answers updates field visibility dynamically.
Calculated Fields
Fields that compute values automatically:Types of Calculations
- Sum of other fields
- Averages and scores
- Derived values (e.g., BMI)
- Date differences
Calculation Expressions
Calculations use FHIRPath expressions to reference other fields and perform computations.Calculated fields update automatically when source values change. Users cannot manually edit calculated values.
Repeating Groups
Some sections can repeat:- Multiple medications
- Multiple adverse events
- Repeated assessments
How Repeating Works
- User clicks “Add” to create a new instance
- All items in the group repeat
- Each instance has unique data
- Instances can be removed if allowed
Instructions and Help
Display Items
Read-only text providing:- Section instructions
- Field-level guidance
- Reference information
Help Text
Individual fields can have:- Tooltip help
- Extended descriptions
- Coding guidelines
Questionnaire Templates
Questionnaires are typically created from templates:- Create template in organization library
- Import template into study
- Customize for study-specific needs
Version Control
Questionnaires support versioning:- Track changes over time
- Multiple versions can exist
- Active version used for data entry
FHIR Foundation
Questionnaires are built on HL7 FHIR:- Standard Questionnaire resource
- QuestionnaireResponse for data
- Interoperable structure
Best Practices
Clear Labels
Clear Labels
Use clear, unambiguous labels for all fields.
Logical Grouping
Logical Grouping
Group related fields together in logical sections.
Appropriate Types
Appropriate Types
Choose field types that match the expected data.
Validation
Validation
Add validation to catch errors early in the process.
Related
Data Entry
How to enter data in questionnaires.
Questionnaire Templates
Create reusable questionnaire templates.
