Search the OSCAR Documentation
< All Topics

Make Your Own Custom Templates for Rich Text Letter

Share this

Documentation Copyright © 2024 by Adrian Starzynski under the Creative Commons Attribution-Share Alike 3.0 Unported License

If you are a programmer you can create your own custom templates for Rich Text Letter.

Need to order an eForm to be created? Need help with programming? Custom RTL Templates? Need OSCAR help? Contact us

Start with this bare-bones template:

<!DOCTYPE html >
<html>

<head>
<title>Custom Letter Template</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
body {font-size: 1em; font-family:"Times New Roman", Times, serif; background-color: #FFFFFF;}
@media print {
    @page {
        margin-top: 0;
        margin-bottom: 0;
    }
    body {
        padding-top: 36px;
        padding-bottom: 36px ;
    }
}
</style>

</head>

<body contenteditable onLoad="document.designMode = 'on';">


</body>
</html>

Change the text in between <title></title> of the template file to the text you want to appear in the template dropdown of the RTL editor screen.

Next, add your content that you want to have in the template into the <body> section. A great resource that lists many possibilities of what you can do in HTML is W3Schools.com

You can add some OSCAR database tags into the template body. See the list of database tags here? Those bits of code tell RTL to fetch specific bits of information from the patient’s demographic file/clinic or provider details and to insert them into your letter in the spot where you put the tag in the template (just like you would use OSCAR database tags in eForms).

How to include measurements in the RTL template

***Note: RTL WILL ONLY SAVE WHAT IS IN THE BODY OF THE TEMPLATE WHEN YOU SUBMIT THE RTL EFORM***

Example custom off work note template:

<!DOCTYPE html >
<html>

<head>
<title>Custom Off Work Note</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
body {font-size: 1em; font-family:"Times New Roman", Times, serif; background-color: #FFFFFF;}
@media print {
    @page {
        margin-top: 0;
        margin-bottom: 0;
    }
    body {
        padding-top: 36px;
        padding-bottom: 36px ;
    }
}
</style>

</head>

<body contenteditable onLoad="document.designMode = 'on';">

##letterhead##

<div>Date: ##today_with_month_in_letters##</div><div><br></div>

<div>Addressee here</div>

<div>RE: ##label##</div>

<div><br></div>
<div>Dear Sir or Madame:<br></div>
<div>##first_last_name## was seen at my office today. The patient is severely stressed. In my medical opinion, this patient needs at least a month of healing, yoga and relax. For this reason ##first_last_name## cannot be contacted and will not be able to perform any duties at work.</div>
<div><br></div>

<div><i><font size="3">Sincerely,</font></i></div>
<div><i><font size="3">##current_user_fname_lname##</font></i></div>
<div><i><font size="3">CPSO #: ##current_user_cpsid##</font></i></div>

<div>##stamp##</div>

</body>
</html>

Now save the file as .rtl
e.g. custom off work note.rtl
(the file name doesn’t really matter as long as it’s not duplicate and it’s saved as .rtl)

Rich Text Letter will take all .rtl files from the OSCAR images folder and display them as templates in the templates dropdown. Previous RTL versions required users to change the RTL’s eForm code to have custom names for the templates, but the latest versions do not require this anymore.

Open a test patient chart and test drive your brand new letter template by selecting it from the template dropdown.

Auto-populate signatures into template

Just add ##stamp## into the <body> part of the eForm where you want signature to auto-populate.

Table of Contents