Custom forms
The form builder — JSON-driven, versioned, audit-logged.
Most clinic-specific customization in Tenelix happens in the form builder. Forms power patient registration, intake, custom protocols, and any other data-capture surface.
Field types
The form builder supports:
- Text, number, date, time, datetime
- Select (single, multi)
- Boolean (toggle, checkbox)
- Long text (multiline)
- File attachment
- Signature pad
- Repeating groups
Each field has type-appropriate validation, conditional visibility, and per-role permissions.
Lifecycle
Forms have a state machine:
draft— editable, not visible to userspublished— live, accepting submissionsarchived— read-only, historical submissions preserved
Editing a published form with submissions triggers auto-versioning — the previous version is preserved alongside its historical submissions, and a new version is created for future submissions.
Audit
Every form lifecycle event (publish, version, archive) is logged via
FormLifecycleLogger to the forms_audit channel. FK guards on
form_submissions and patient_form_assignments use
ON DELETE RESTRICT to prevent orphaned submissions.
Best practice
Keep forms small and focused. A patient registration form should not include intake-of-the-day fields. Build a separate intake form per visit type, and assign it from the appointment.