Template Macros

<< Click to Display Table of Contents >>

Navigation:  Designing Templates >

Template Macros

You can embed several items and properties from your UltraPort HL7 Template and Library in your Documents.

 

The Rules:

1.Macro names are case-sensitive and must always be in UPPERCASE.

2.Macro names cannot be split across lines in your HTML source code.

 

hmtoggle_plus1EXAMPLESanimatedlink

 

Embedded Macros Reference

 

General Use Macros:

 

##TODAY## - Embeds the current system date in the 'Short' date format defined by the OS

##TODAYLONG## - Embeds the current system date in the 'Long' date format defined by the OS

##NOW## - Embeds the current system time (down to the minute)

##NOW2## - Embeds the current system time (down to the second)

##TODAYINTL## - Embeds the current system date in an 'international' format (yyyy-mm-dd EX: 2015-09-28)

To insert both date and time just enter the 2 appropriate macros together in your HTML source code like so: System Date = ##TODAY## ##NOW2##

 

Library Macros:

 

##LIBRARYNAME - Embeds the name of the HL7 Template Library

##LIBRARYNOTES - Embeds your user notes for the HL7 Library

##LIBRARYFILETITLE - Embeds the File Name (no path) of the HL7 Template Library

##LIBRARYLOCATION - Embeds the full path of the HL7 Template Library file

 

Template Macros:

 

##TEMPLATENAME - Embeds the name of the HL7 Template

##TEMPLATENOTES - Embeds your user notes for the HL7 Template

##TEMPLATEVERSION - Embeds the version of the template

##TEMPLATEAUTHOR - Embeds the author's name of the template

##TEMPLATELASTMODIFIED - Embeds the last modified date of the template using the system default date format

##TEMPLATELASTCOMPUTER - Embeds the name of the computer which was used to last modify the template

##TEMPLATESOFTWARE - Embeds the name of the product used to create the template (UltraPort HL7 Notepad)

##TEMPLATESOFTWAREVERSION - Embeds the version of the product used to create the template

 

Special Use Macros:

 

##PDFPAGENUMBER - Embeds the current page number in a PDF page Header or Footer. **SEE NOTE BELOW**

##PDFPAGECOUNT - Embeds the total document page count in a PDF page Header or Footer. **SEE NOTE BELOW**

 

**NOTE Regarding the use of the PDFPAGENUMBER and PDFPAGECOUNT macros. These macros are ONLY evaluated if the template is being published to a PDF document. This means that they are ignored and left in place unchanged when rendering documents to HTML or HL7 Document formats. To keep your templates "tidy" you will probably want to make sure that any PDF page header or page footer is hidden inside of an invisible HTML DIV element like so <div style="display:none;">...header or footer html...</div>. See the section on PDF Page Headers and Footers for more information.

 

Example HTML - Hiding a PDF Page Footer

 

 <div style="display:none;">
   <pdfpagefooter>
   <hr />
   <table style="width:100%;margin: 0; font:8pt Tahoma;color:black; padding-top: 1px; padding-left: 2px;">
       <tr>
           <td style="text-align: left;">
               <b>Patient:</b> ##HL7.PID.5.1##, ##HL7.PID.5.2##
           </td>
           <td style="text-align: center;">
               - ##PDFPAGENUMBER of ##PDFPAGECOUNT -
           </td>
           <td style="text-align: right;">
               <b>HL7 Date: </b>##HL7.MSH.7.1.datetime##
           </td>
       </tr>
   </table>
   </pdfpagefooter>
 </div>