Templates
Clone specialty templates, make safe clinic-level changes, run checks, publish immutable versions and manage smart phrases.
Who can do this: clinical.template.manage for template cloning, editing, publishing and clinic phrases; clinical.document.create for personal smart phrases.
Where: Clinical ? Clinical Templates (/app/clinical-templates), editor (/app/clinical-templates/:id), Settings ? Smart Phrases (/app/settings/smart-phrases).

Before you start
- Enable the specialty packs your clinic uses.
- Decide if the change is personal, clinic-wide or template-specific.
- Use Template authoring guide for full JSON authoring. This screen is a limited safe editor.
Browse templates
- Open Clinical Templates. Result: Library and Custom templates appear, grouped by specialty.
- Type in Search templates. Result: Matching names and codes remain visible.
- Use Show and choose All, Library or Custom. Result: The list filters by source.
- Check Draft, Published or Archived status. Result: You know whether a template can be used for new documents.
Clone a template
- Click Clone on a library or custom template. Result: Clone template opens.
- Enter Template code, Name (English) and optional Name (Hindi). Result: The clone inputs are validated.
- Click Clone and edit.
Result: A custom template opens at
/app/clinical-templates/:id.
tip
Library templates are read-only. Clone them before changing wording or required fields.
Edit the structure
- Open the custom template editor. Result: Tabs Structure, Smart phrases, Settings and Preview are shown.
- On Structure, edit section and field labels in English or Hindi. Result: New documents use the new labels.
- Turn Visible off for fields your clinic does not use. Result: The field is hidden for new drafts, but old signed documents keep their data.
- Turn Required on where supported. Result: Signing is blocked until that field is filled.
- Use Move up, Move down, Move section up or Move section down. Result: The form order changes.
- Click Edit options to update selectable values. Result: New documents use the updated option list.
- Click Edit ?All normal? to configure normal findings text and preset values. Result: Clinicians can click All normal while writing.

Configure co-signature and preview
- Open Settings. Result: Template name and signature settings appear.
- Turn on Require a co-signature by a second practitioner when review is needed. Result: Signing sends documents to In review until another practitioner co-signs.
- Open Preview. Result: You can test the form with sample data; nothing is saved.
- Click Save draft. Result: The Checks panel runs.
- Fix Errors (must be fixed before publishing). Result: Publishing becomes possible.
- Click Publish. Result: The template is Published as version and future documents pin to that immutable version.
caution
Publishing creates a version. Existing documents stay pinned to their original version and do not change.
Archive a custom template
- Click Archive. Result: The confirmation says existing documents keep their version.
- Confirm. Result: The template is Archived and cannot be used for new documents.
Manage smart phrases
- Open Smart Phrases. Result: My phrases, Clinic phrases and read-only Specialty pack phrases appear.
- Click Add phrase. Result: The phrase form opens.
- Enter Trigger, Text and optional Label.
Result: Typing
.triggerthen Space in a clinical document inserts the text. - If permitted, choose Only me or Everyone in the clinic under Visible to. Result: The phrase scope is saved.
- Click Save. Result: The phrase appears in its list.

Troubleshooting
| Problem / message | What it means | What to do |
|---|---|---|
INVALID_CODE / ?Use 2?64 capital letters, digits or _ starting with a letter.? | Clone code format is wrong. | Use a code like DENTAL_OPD_NOTE_1. |
TEMPLATE_CODE_TAKEN / ?This code is already used by another template.? | The code already exists. | Choose another code. |
LIMIT_REACHED / ?Your clinic has reached the maximum number of templates.? | Tenant template limit was reached. | Archive unused custom templates or contact support. |
| ?This template was changed by someone else. Reload to get the latest version.? | Version conflict. | Click Reload and reapply edits. |
| ?Fix the errors listed under Checks before publishing.? | Lint errors exist. | Fix every error in Checks, save and publish again. |
| ?Required can only be changed for top-level fields and list item fields.? | That field cannot be required in the limited editor. | Leave it optional or request JSON authoring. |
PHRASE_EXISTS / ?A phrase with this trigger already exists.? | Duplicate trigger in scope. | Edit the existing phrase or use another trigger. |
INVALID_TRIGGER / ?Use 1?32 characters: a?z, 0?9, _ or -.? | Trigger characters are invalid. | Use lowercase letters, numbers, underscore or hyphen. |
| ?You do not have permission to change clinic phrases.? | You lack clinical.template.manage. | Use a personal phrase or ask an admin. |