What is the context?
Template codes are used in the system to dynamically pull data into documents. They allow users to automate the insertion of information, such as appointment details or patient records, into templates.
What is the purpose of the article?
The purpose of this article is to provide guidance on troubleshooting issues with template codes in the system.
Troubleshooting Template Codes
Template Code Does Not Work / Displays a Red Square
- Cause: This can occur when there is no data for the template code to pull, or if the template code itself is incorrect or not saved properly.
-
Solution:
- Ensure that the data you want to pull is entered and saved in the system. If no data is entered, the code won't be able to retrieve anything.
- Verify that the template code is correct and saved within the templates section.
- Hover your mouse pointer over the red square to get more details about the specific issue.
2. Template Code Only Works in Specific Areas
-
Cause: Template codes are tied to specific areas of the system (contexts). For example,
Appointment.StartTime
can only be used in contexts where the system references a specific appointment, and not from a patient record. - Solution: Make sure that the template code you're using is applicable to the context of the document you're generating. If it's referencing something like an appointment, ensure you're generating the document from an appointment context.
3. Template Code Does Not Work in Microsoft Word
- Cause: Some template codes, particularly those that pull data into tables, are not compatible with Microsoft Word.
- Solution: If your template includes tables, avoid using Microsoft Word for the document generation. Instead, use the in-built text editor within your system to create the template, which ensures compatibility with these types of codes.
4. Template Code Displays in the Wrong Format / Font Size
- Cause: Copying and pasting codes may introduce unwanted formatting, especially when copying from external sources.
- Solution: Instead of copying and pasting, manually type in the template codes when creating or editing your templates. This will avoid hidden formatting characters that might interfere with the document formatting.
Review date
This article was last updated on 30th January 2025.