Healthcare reports from laboratories or healthcare systems can be complex, providing data in a form that only practitioners can understand. Providing human-readable reports in healthcare is an important part of improving transparency and patient satisfaction.
With Healthcare as one of our main industries, where TX Text Control is used in various areas, we have some insights into how professional reporting and document processing can be used to create beautiful, readable reports.
The template discussed in this article uses blood pressure measurement data to generate two charts and a data table. All elements are explained, including the data source used, the chart diagrams, merge fields, and merge blocks.
The following screenshot shows the first two pages of the resulting report exported to PDF.
XML Data Source
The data source for the merge process is an XML file, which in many cases is the data exchange format for medical devices or the export format of health apps such as Health for iOS.
Mail Merge Elements
The template consists of various mail merge elements including merge fields, merge blocks and charts. The header contains simple merge fields such as patient name and the date of birth:
In the first section of the report, the average blood pressure data is visualized as a number and a thumbs-up or thumbs-down depending on the values. This is done using two IF fields, one in green color and one in red. The true text for the green IF field is the Unicode "thumbs-up" character if the condition is met that the average value is less than 120. The red field is the opposite.
After the merge, when the positive conditions are met, the true text is rendered in green.
In a negative case, the second red field is rendered.
The first chart is of type radar that displays the systolic and diastolic data in the form of a two-dimensional chart to easily visualize spike areas.
For this chart, the main table is report and the associated child table is measurements. The systolic and diastolic values are used for the 2 axes.
To add the second value, add a second Diastolic line to the Chart Data dialog box.
After a successful merge, both measurements are used and visualized.
The second chart is a line chart with an additional value for the pulse pressure along with the systolic and diastolic values.
Data Table Merge Block
The data table is a repeating merge block that lists all measurement data in a clean table with a table header.
In the template, the merge block is a table row containing the measurement merge fields. The first row of the table is set to repeat on each page.
In the two columns listing the systolic and diastolic pressure values, an additional IF field is used to visualize a value that is higher than the normal, expected value. This field is created using the same technique as the thumbs up fields in the introductory section of the report. If the value is greater than 120, a red triangle is conditionally rendered.
In the resulting document, the red triangles are rendered in the repeating merge block.
Download Template and Data
For your own testing, you can download the template and the sample XML data. Load the template into the provided TX Text Control Words sample application, load the XML file as the data source by clicking Load XML File from the Select Data Source button in the Reporting ribbon tab. Click on Merge and Export to view the results.
Template and data: blood_data.zip