Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

The Policy Custom Fields page (/gr/settings/policy-custom-fields) renders PolicyCustomFieldsPage, which manages pf_custom_field_definitions records scoped to entity_type = 'gr_policy'.

Overview

PolicyCustomFieldsPage uses the platform PF-16 custom fields system:
  • useCustomFieldDefinitions('gr_policy') — fetches all custom field definitions for the gr_policy entity type.
  • useCustomFieldMutation — provides createDefinition, updateDefinition, and deleteDefinition mutations.
The page renders a table with columns for field name, type, and enabled/disabled toggle (a Switch). Each row has edit (pencil) and delete (trash) icon buttons. A + Add Field button opens a Dialog containing CustomFieldDefinitionForm. Deletion uses a confirmation AlertDialog. The ENTITY_TYPE constant is 'gr_policy', ensuring fields defined here appear only on policy forms and detail views.

Who it’s for

Requires permission: gr.policies.custom-fields.manage (GR_PERMISSIONS.POLICIES_CUSTOM_FIELDS_MANAGE). Users without this permission cannot access this route.

Before you start

  • You must hold gr.policies.custom-fields.manage.
  • Custom fields defined here will appear on the policy creation wizard and policy detail forms for all users in the organization.
  • Coordinate with compliance before adding fields that might capture regulated data.

Steps

1

Open Policy Custom Fields settings

Navigate to /gr/settings/policy-custom-fields. The page loads all pf_custom_field_definitions for entity_type='gr_policy'.
2

Review existing fields

The table shows each field’s name, type, and enabled status. Use the toggle switch to enable or disable a field without deleting it.
3

Add a new custom field

Click + Add Field. The CustomFieldDefinitionForm dialog opens. Enter the field name, select a type, and set options if applicable. Save to create the definition.
4

Edit an existing field

Click the pencil icon on a field row. The same form opens pre-populated with the field’s current values. Save to update.
5

Delete a field

Click the trash icon. A confirmation dialog (AlertDialog) asks you to confirm deletion. Confirm to call deleteDefinition.

Key concepts

  • pf_custom_field_definitions — platform table (PF-16) storing per-tenant custom field schemas; scoped by entity_type.
  • entity_type = ‘gr_policy’ — ensures these fields appear only on policy records.
  • CustomFieldDefinitionForm — shared platform form component for creating or editing a custom field definition.
  • enabled toggle — controls whether the field appears on forms without permanently removing the definition.

Governance & Compliance

Governance & Compliance core overview.

Governance & parity

This page documents shipped product behavior. It is not medical, legal, or billing advice. Verify against your organization’s policies and applicable regulations before using it for clinical, compliance, or billing decisions. Protected health information (PHI) shown in the product is governed by your tenant’s access controls and is never exposed in this documentation.
  • src/routes/gr.tsx
  • src/cores/gr/pages/settings/PolicyCustomFieldsPage.tsx
  • src/platform/permissions/constants.ts
  • src/platform/custom-fields/index.ts