English
Custom printed letters
Goal
Create a reusable letter template that inserts clinic, doctor, patient and consultation information, then review and print the letter. The interface calls this feature Custom Document. Manage its templates under Settings → Printing → Templates.
Before you start
- Check the selected clinic. Custom templates belong to that clinic.
- Creating or editing shared templates requires the corresponding printing-template permissions. You must also be able to open the relevant consultation or checkout record to print.
- Prepare the clinic's approved wording and paper size. Check the result with a fictional or approved sample record.
The training templates in the screenshots remain disabled. The preview uses fictional information built into the system. Only enabled custom templates appear in the daily print menu.
1. Create or select a template
- Open Settings → Printing → Templates.
- Under Custom Templates, select the template to edit. Use the New Custom Template plus button only when you need a new template.
- Enter a clear Template Name, such as “Visit information letter”. This is the name in the menu, separate from the title printed on the letter.
- Review Enabled. Uncheck it while preparing a template; check it and save when colleagues should be able to select it.
- Under Paper Settings, select the size, check all four margins and review Base font size. A4 is 210 × 297 mm; A5 is 148 × 210 mm.
The plus button creates a template immediately
New Custom Template immediately creates a record, enabled by default. Do not repeatedly press the plus button to reopen the form. To keep a draft, uncheck Enabled and select Save Changes.
2. Write the title and body
- Choose a Title Image if needed, then review the fields under Title, Clinic, Doctor, Patient, Case and Sign.
- Scroll to Title Template and enter the heading to print above the letter. It accepts variables and can be left blank.
- Enter the letter text and variables in Body Template. The body cannot contain only whitespace.
- Read the entire Preview on the right. Check line breaks, repeated information, text size and page boundaries.
- Select Save Changes, then reselect the template to check its content. When it is ready for use, confirm Enabled is checked and saved.
The checkboxes control the information blocks in the header and signature area. Variables in the body insert information independently. For example, unchecking Patient Name does not disable {{patient.name}} in the body. Decide whether information repeated in the header and body should appear in both places.
3. Write variables correctly
Place the complete variable inside two pairs of braces:
text
Patient: {{patient.name}}
Patient No.: {{patient.code}}
Appointment date: {{caseInfo.date}}
Doctor: {{doctor.name}}- Variable names are case-sensitive. Keep the dot between the two parts.
{{ patient.name }}also works, but do not insert spaces inside the name. - Title Template and Body Template accept the same variables.
- Missing information, unavailable values and misspelled names become blank. The system does not insert “N/A”. Text surrounding the variable remains.
- The body is plain text with line breaks preserved. HTML, Markdown, conditions, calculations and loops do not become formatting or executable instructions.
- Dates, times, ages and gender use the text supplied by the system. Switching the interface language does not translate the entire letter.
The settings preview has its own sample information. Check actual patient information by opening Custom Document from a consultation or checkout. Symptoms, dates and patient details in the settings preview do not identify a selected real record.
4. All available variables
The following seven groups contain 44 variables that can insert information. Each depends on the relevant record providing a value. Two additional fields with special limitations appear after these tables.
Header information title
These values come from the selected clinic. title holds clinic information used in the header; it is not the letter's heading text.
| Variable | Information inserted |
|---|---|
{{title.clinicName}} | Clinic name. |
{{title.clinicNameEn}} | Clinic name in English. |
{{title.clinicAddress}} | Clinic address. |
{{title.clinicAddressEn}} | Clinic address in English. |
{{title.tel}} | Clinic telephone number. |
{{title.fax}} | Clinic fax number. |
Clinic information clinic
These values also come from the selected clinic, including its opening and closing times.
| Variable | Information inserted |
|---|---|
{{clinic.name}} | Clinic name, from the same source as title.clinicName. |
{{clinic.nameEn}} | Clinic name in English. |
{{clinic.address}} | Clinic address. |
{{clinic.addressEn}} | Clinic address in English. |
{{clinic.tel}} | Clinic telephone number. |
{{clinic.fax}} | Clinic fax number. |
{{clinic.openAt}} | Opening time recorded in the clinic settings. |
{{clinic.closeAt}} | Closing time recorded in the clinic settings. |
Doctor information doctor
These values identify the doctor supplied by this consultation or appointment, rather than the signed-in user. Telephone, email and professional information depend on the doctor's record providing them.
| Variable | Information inserted |
|---|---|
{{doctor.name}} | Doctor's name. |
{{doctor.nameEn}} | Doctor's name in English. |
{{doctor.tel}} | Doctor's telephone number. |
{{doctor.email}} | Doctor's email address. |
{{doctor.major}} | Doctor's qualification. |
{{doctor.subject}} | Doctor's subject. |
For the qualification in English, use {{sign.majorEn}} below.
Patient information patient
These values come from the patient receiving the document.
| Variable | Information and format |
|---|---|
{{patient.name}} | Patient's name. |
{{patient.nameEn}} | Patient's name in English. |
{{patient.gender}} | Gender code: MALE, FEMALE or UNKNOWN. |
{{patient.idNoLabel}} | English document-number label for the recorded document type, such as HKID Card No.. |
{{patient.idNo}} | Identity document number. |
{{patient.dob}} | Date of birth in English date format, such as 1 Jan 1990. |
{{patient.age}} | Completed years of age calculated using the current date, such as 36 year(s). A missing or invalid birth date leaves it blank. |
{{patient.mobileNo}} | Full patient telephone number, including the recorded area code. |
{{patient.code}} | Patient number formatted using the current clinic's settings, which may include a prefix. |
Appointment information caseInfo
Use the exact prefix caseInfo. These values refer to this appointment, rather than the time of printing or the next follow-up.
| Variable | Information and format |
|---|---|
{{caseInfo.date}} | Appointment date in English date format, such as 23 Jan 2025. |
{{caseInfo.appointmentTime}} | Time recorded for the appointment. This group is blank when the appointment has no date. |
Signature information sign
These variables provide clinic names, doctor names and qualification text for the signature area. Inserting them into the body does not create a handwritten signature or signature image.
| Variable | Information inserted |
|---|---|
{{sign.clinicName}} | Clinic name. |
{{sign.clinicNameEn}} | Clinic name in English. |
{{sign.doctorName}} | Doctor's name. |
{{sign.doctorNameEn}} | Doctor's name in English. |
{{sign.major}} | Doctor's qualification. |
{{sign.majorEn}} | Doctor's qualification in English. |
Consultation content report
These values come from the loaded consultation. At checkout, a linked consultation must exist and finish loading first. Unfilled clinical content is blank.
| Variable | Information inserted |
|---|---|
{{report.complaint}} | Symptoms. The variable name is complaint. |
{{report.findings}} | Findings. |
{{report.diagnosis}} | Diagnosis. |
{{report.treatmentPlan}} | Treatment plan. |
{{report.notes}} | Notes for the patient, excluding private notes. |
{{report.vitals}} | Summary of recorded vital signs, including measurements and units. |
{{report.procedures}} | Summary of procedures. |
The built-in settings sample supplies only symptoms, findings, diagnosis and treatment plan. report.notes, report.vitals and report.procedures may be blank in that preview. Check them from a consultation containing the relevant information.
Limitations of two additional fields
| Field syntax | Current behaviour and action |
|---|---|
{{caseInfo.channel}} | The settings sample contains Walk-in, but actual printing currently does not supply the appointment channel, so it is blank. If the letter requires this information, verify and enter it manually in the print dialog. |
{{sign.patientSign}} | This is not a patient signature. The settings sample is true, while actual printing supplies the internal text ignored. Do not insert it into a letter. To provide a space for a paper signature, check Patient Signature under Sign in the template settings. |
Medications, laboratory results, payment amounts, patient addresses, allergies, medical history and custom clinical fields do not have custom-document variables. Do not infer variable names from fields in other document types. Use the appropriate document or enter verified information manually when needed.
5. Letter examples to copy
Visit information letter
Paste this into Title Template:
text
Visit information — {{patient.name}}Paste this into Body Template, then adapt the fixed wording to the clinic's purpose:
text
Dear {{patient.name}},
Please check the following information for this visit:
Patient No.: {{patient.code}}
Appointment date: {{caseInfo.date}}
Appointment time: {{caseInfo.appointmentTime}}
Doctor: {{doctor.name}}
If you have any queries, please contact the clinic on {{clinic.tel}}.
{{clinic.name}}
{{clinic.address}}Consultation summary letter
Enter “Consultation summary” in Title Template and use the following Body Template. The responsible doctor should check every clinical detail and the intended recipient before releasing the document.
text
Patient: {{patient.name}} / {{patient.nameEn}}
Patient No.: {{patient.code}}
Appointment date: {{caseInfo.date}}
Symptoms:
{{report.complaint}}
Findings:
{{report.findings}}
Diagnosis:
{{report.diagnosis}}
Treatment plan:
{{report.treatmentPlan}}
Vitals:
{{report.vitals}}
Procedures:
{{report.procedures}}
Notes for the patient:
{{report.notes}}
{{sign.doctorName}}
{{sign.major}}
{{sign.clinicName}}Remove entire sections that do not apply. An empty variable does not automatically hide fixed labels such as “Diagnosis:”.
6. Create and print a patient's letter
- Open the correct consultation or checkout. Check the clinic, patient, appointment date and doctor. Confirm any consultation changes have saved successfully.
- Select Print → Custom Document, then an enabled template. Wait for patient and related consultation information to finish loading.
- Check the selected name under Custom Templates, then read the populated Title Template and Body Template.
- Edit the text for this particular letter and complete any required information. New variables typed into the print dialog are not automatically substituted again. To change variables, edit the template in settings and reopen the document.
- Choose a Printer. For the browser route, select Browser Print.
- Check Preview on the right for another patient's text, missing required information or sections that do not apply.
- Select Create Document & Print, then complete the browser's print options.
- Check the patient's Documents list for the saved document and open its preview when needed. Confirm the physical print separately.
Switching templates or closing and reopening the dialog reapplies the template. Edits made in the print dialog do not update the original shared template. If printing stalls, check Documents before creating another copy.
Patient document output demonstration to add
The screenshots cover template settings and the sample preview. The complete Create Document → Documents list → PDF preview demonstration and physical print check still need an approved fictional consultation.
7. Save as a new template
With permission to create printing templates, Save as New Template appears at the bottom of the print dialog. Select a template and enter a non-blank body, select this button, enter a new template name, then select Save.
This saves the current text and enables the new template
Patient variables have already been replaced with text when the print dialog opens. For example, {{patient.name}} becomes the patient's name. Save as New Template saves the current title and body without restoring variables, and immediately enables the new template. Remove all patient-specific information before saving a shared template. Afterwards, open Settings → Printing → Templates to restore the required variables and check its enabled state.
For letters reused across patients, prepare the template with variables in settings.
Check that it worked
- Reselect the template and check its name, content, variables, paper settings and enabled state.
- The actual document identifies the correct patient, date and doctor, with required information filled in.
- Read the complete body and remove irrelevant sections and sample wording.
- The expected record appears in the patient's Documents list. Check the print result separately.
❓ FAQ
Why is the template missing from the print menu?
Check the selected clinic and confirm Enabled is checked and saved. Wait for templates to finish loading. If it is still missing, ask an administrator to check access to consultations, checkout and templates.
Why has a variable become blank?
Check the exact case and dot in the variable name, then check whether the source record contains information. Clinical content needs a loaded, linked consultation. caseInfo.channel currently has no actual print value. Fixed text surrounding variables remains in the letter.
Why does the settings preview have information missing from the patient's letter?
Settings uses built-in sample information. Check the real record through Custom Document in a consultation or checkout. Conversely, notes, vitals and procedures missing from the settings preview can still populate when the consultation supplies them.
Can I change the date format or use today's date?
There is no date-format instruction or current-date variable. caseInfo.date is the appointment date and patient.dob is the date of birth; both use English date text supplied by the system. Verify and edit the text in this print dialog when another date or format is needed.
Can the letter include private notes or a medication list?
report.notes contains notes for the patient and excludes private notes. There is no custom-document medication-list variable. Use the prescription document for prescription content.
Will saved documents change when I edit a template?
Created documents retain their layout and content from the time of creation. Shared template changes apply to custom documents opened afterwards. To correct an existing letter, check the original document and follow the clinic's process to create the correct version.
Why can English text remain after switching to Traditional Chinese?
Variable names, gender codes, dates, identity-document labels and some fixed document labels may be in English. The template body is not automatically translated. If settings fields retain the previous interface language, save intended edits before reloading the page.
Does Cancel delete a document that has already been created?
Cancel in the editing dialog does not delete a document. Cancelling the browser's print dialog also does not prove that no document was archived. Check the patient's Documents list before retrying.
Next
Manage patient files and documents, or return to Printing and queue settings.