Create Patient Summary Templates
Overview
Patient Summary Templates represent the actual output that you are producing. They enable the user to take the data defined in the Patient Summary Report Definition, apply layout, formatting and other processing, and to produce a rendered summary that meets their needs.
As the patientsummary module leverages the full power of the reporting module, all Report Renderers that are available in the reporting module are available for use when creating a Patient Summary Template. This also means that any custom ReportRenderer that an implementation has added through a module is also available for use by patient summaries. If one wanted to produce a custom XML patient summary output, or a PDF patient summary output, or a Word patient summary output, one only needs to utilize an appropriate ReportRenderer that is capable of rendering in this format.
HTML/Text-based Patient Summaries
| Example Template in Edit Mode | Example Template in Preview Mode |
---|---|---|
The most common patient summary format that we are expecting is one that renders to HTML, and which utilizes a single text-based template to design the output. This will enable users to provide a custom clinical summary, directly accessible in a tab on the patient dashboard. The Patient Summary module achieves this by leveraging the Text Template Renderer provided by the reporting module, and as such brings all of the capabilities of that renderer to bear, including support for Groovy, Velocity, and other user-installed scripting capabilities. The module also provides a user interface that aims to simplify the creation of these templates by providing an in-line editor and preview tool, which you can use to preview your template for any patient in the system. The screenshots to the right show this in action. |
The following references should be utilized to assist with authoring your templates:
Documentation of what data is available for reference within a template
Groovy Template documentation / syntax: http://groovy.codehaus.org/Groovy+Templates
Velocity Template documentation / syntax: http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html
Printing your Text-based Patient Summaries
When displayed on the patient dashboard, each Patient Summary can be printed by clicking on a Print link. When this is done, an additional variable is added that can be queried within your template, in the event that you want to have a slightly different display in print mode than in view mode. This is available in the template by checking data['parameter.patientSummaryMode'] with a value of "print".
As an example:
<% if (data["parameter.patientSummaryMode"] == 'print') { %>
You printed me!
<% } %>
Other Patient Summaries
|
|
---|---|
For other types of Patient Summaries that require more sophisticated configuration than is possible with a single text-based template, the Patient Summary module allows the user to select and configure any other type of Report Design and Renderer that is supported by the reporting module. This would be done by changing the Template Type in the template editor, and then using the file upload tool to upload the appropriate files. If this interface proves insufficient, you can also use the standard reporting module tools for authoring various report designs associated with your Patient Summary Report Definition. These tools can be used interchangeably. |