Preview a template
Overview
This flow describes how to preview a report template in the Template Builder. Care fills the template with sample values, so you can check the layout.
Pre-requisites
- You create a new report template, or you edit an existing report template.
- You have the permissions listed below.
Permissions
| Permission | Access |
|---|---|
| Can Preview Template | Lets you preview the template. You can hold it in any organization of any facility. Only Facility Admin has it by default. |
| Can Read Template | Shows Templates in the facility settings and lists the templates. You can hold it in any organization of the facility. Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist have it by default. |
| Can Create Template on Facility | Shows Create Template and the Edit button on each card, which open the Template Builder. Facility Admin, Doctor and Nurse have it by default. |
| Can View Template Schema | Loads the contexts and their fields in the Template Builder. You can hold it in any organization of any facility. Only Facility Admin has it by default. |
By default, only a Facility Admin has all of these permissions. A Doctor or a Nurse does not have Can Preview Template or Can View Template Schema by default.
Steps
1. Open the template in the builder
Create a new report template, or open an existing template with Edit. Care shows the Template Builder.
See Create a report template or Edit a report template.

2. Select the context and the format
In Select Context, select the context that matches the report type. The preview uses this context.
In Default Format, select the format to preview: HTML or PDF. The preview uses this format.
Note: If people print the report, preview it as PDF. Only PDF reports open and print in Care.
Note: If you change Default Format and save the template, new reports use the new format.

3. Preview the template
Select Preview Template.
Care fills the template with sample values. It does not use the data of a real patient, encounter, or billing account.
Each list in the template shows one to four sample rows. The number of rows can change each time.

4. Check the preview
Care shows the message "Template preview generated successfully".
The preview replaces the template body in the builder. Its heading is Preview Template.
An HTML preview shows in the page, without scripts. A PDF preview shows in a frame.
Read the preview. Check the layout and the wording.

5. Go back to the template body
Select Clear Preview. Care shows Template HTML again.
Note: Preview Template is not available while the preview shows.

6. Correct any errors
If the template body has an error, the preview fails.
Correct the template body in Template HTML. Then select Preview Template again.
Note: The preview does not save the template. To keep your changes, select Save Template.

Expected Outcome
- Care shows the message "Template preview generated successfully".
- Care shows the template filled with sample values, in HTML or PDF.
Related
Concepts:
Flows: