📝

Custom Fields

Define custom data fields for patients and visits with various field types

3 min read

Overview

Custom fields let you extend SehaFile's data model to capture information specific to your clinic's specialty or workflow. For example, a dermatology clinic might add a "Skin Type (Fitzpatrick)" dropdown to patient records, or an orthopedic clinic might add a "Side Affected" field to visits. Custom fields support text, number, select (dropdown), and date types, and appear automatically in the relevant forms.

Creating Custom Fields

  1. Navigate to Settings > Custom Fields — Click Settings, then select the Custom Fields tab.
  2. Click "Add Field" — A creation form appears.
  3. Configure the field:
    • Entity type — Choose where this field appears: "patient" (Patient registration form) or "visit" (Visit form)
    • Field name (Arabic) — Label shown to users (e.g., "نوع البشرة")
    • Field name (English) — English label (e.g., "Skin Type")
    • Field type — Select: text, number, select, date
    • Options — For "select" type only: enter the dropdown choices (e.g., ["Type I", "Type II", "Type III", "Type IV", "Type V", "Type VI"])
    • Is required — Toggle to make the field mandatory
    • Display order — Number determining field position in the form (lower = higher on form)
  4. Save — The field immediately appears in the specified form for all users.
Tip: Keep custom fields focused and minimal. Each field adds cognitive load to the form. Only add fields that provide real clinical or administrative value. Use the display_order to group related fields together.
Warning: Changing a field type after data has been entered may cause display issues for existing records. If you need to change a field's type, create a new field instead and deactivate the old one.

Custom fields manager showing field list with entity type, field type, and required status columns

How Custom Fields Render

The CustomFieldsRenderer component dynamically renders your custom fields in the PatientForm or VisitForm based on entity_type. Select fields show as dropdowns, date fields use the DatePicker component, and text/number fields render as standard inputs.

Frequently Asked Questions

Can I make a custom field searchable?

Currently, custom field values are displayed on records but are not included in the global search. You can filter patients by custom field values using the advanced filter panel on the patients list.

Is there a limit on the number of custom fields?

No hard limit, but we recommend no more than 10 custom fields per entity type for optimal form usability.

Can I deactivate a custom field without losing existing data?

Yes. Toggle is_active to false. The field will no longer appear on forms, but existing values in custom_field_values are preserved and visible in historical records.

Was this article helpful?