Structured Report Form
Component Detail
Description
Flutter screen rendered after a home-visit activity wizard completes, presenting a series of typed input widgets - radio groups for health status, dropdowns for course interest, multi-select toggles for assistive device situation, a recommended next-step selector, and a single free-text observations field. The form layout is driven by a JSON schema fetched from the Report Template Service, so field visibility and mandatory status vary per organization without a code branch.
structured-report-form
Sources & reasoning
The UI form is the primary delivery mechanism for the feature. Source explicitly lists four structured fields (health status, course interest, assistive device situation, next step) replacing free-text, and the implementation notes describe typed Flutter widgets driven by a backend schema - requiring a dedicated form screen that differs materially from the simple free-text activity logging screen.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Render form fields dynamically from JSON schema returned by Report Template Service
- Validate required fields before submission
- Serialize completed form as JSON payload and hand off to Report Template Service for persistence
- Display organization-specific field labels via the Organization Labels system
- Ensure all interactive elements meet WCAG 2.2 AA touch-target and contrast requirements
Interfaces
build(BuildContext context) -> Widget
loadSchema(String featureId) -> Future<ReportSchema>
submitReport(String activityId, Map<String, dynamic> formData) -> Future<void>
onFieldChanged(String fieldKey, dynamic value) -> void
Relationships
Dependencies (2)
Components this component depends on
Related Data Entities (2)
Data entities managed by this component