Report by Template Overview


Report by Template is a way to write scripts that can analyze the database and print or export the results.

This can be used for periodic reporting or special inquiries.

You can a tutorial and many examples at:  http://oscarcanada.org/oscar-users/emr-resource/report-templates

 

This section is for more advanced users who are writing queries for others to use.

 

Note: Need to find the admin role that allows access to the Admin, Report by Template section.

 

Keeping line feeds

When you select text fields, all the line feeds get removed and all the text is printed across the screen.

This code will retain the linefeeds in the text field so that they appear as entered.

UNHEX( REPLACE( HEX(notes), '0A', HEX('<br>') ))