PatientOS v0.93 - Reports
to
For any information system it is critical to be able to get the data out as easily as you can get the data in. PatientOS supports a number of different features for viewing and reporting data. Version 0.93 wraps these up into a fairly accessible way.
The different types of reports can be divided into reports for viewing (HTML) and reports for printing (PDF).
- HTML reports generated for online viewing within the application using the default system defined XSL
- PDF reports generated from the HTML (above) for printing
- PDF or HTML reports generated using the iReport tool from PatientOS generated XML
- PDF or HTML reports generated using the iReport tool and a native SQL connection
- PDF created using the Adobe forms designer
- XSL custom reports that can generate almost anything (Text e.g. X12, HTML, PDF etc)
HTML reports (System Default)
The report pane control is used to display an HTML representation of a form. This is down through the generation of XML from the form and then passing it through a stylesheet to generate the HTML.
The XML is generated by a ‘custom controller’ which acts like a plugin . You can create new plugins to generate different XML.
PDF reports (System Default)
For controls that execute the action ‘System Preview’ it will generate the HTML and convert it directly to PDF. This is quick and convenient but is missing some header and footer information generally desired.
PDF reports (iReport)
To create a custom PDF report (in version 0.93) for a form that uses XML you can follow these steps.
Part 1 - Get the XML PatientOS will generate
- Login as the user which has the form you want to add a custom PDF output to.
- Use the menu Help–> Debug
- Start a new form and use the menu Tools–>Show XML
- Copy and save the XML to a file.
Part II - Create the .jasper file in iReport
- Download and install the compatible version of iReport (currently 3.0)
- Create an XML data source using the XML generated from Part I
- Use a report query of /report and drag the fields into your report
- Complete the layout, test the report and generate the .jasper file
Part III - Create the PatientOS Report
- Login as admin and add a new report
- Given the report a name, select the DefaultJasperOutputController controller and upload your new Jasper file.
- Save the report
- Open all form types, find the form identified in Part I and on the properties screen set the report to match.
- Save clear cache and the PDF is generated for the form generated XML.
HTML reports (iReport)
By following the steps above for the PDF report the HTML view of the form will also be generated using this same report.
PDF reports (SQL)
To create a custom PDF report (in version 0.93) using iReport and SQL you can follow these steps.
Part 1 - Create the Report
- PgAdmin III has a query tool that is best suited to testing and validating the SQL prior to using iReport.
- Create a datasource in iReport that connects to the database (note you may need the PostgreSQL jar copied to iReport lib)
- Test the query, layout the fields and generate the .jasper file.
Part II - Create the PatientOS Report
- Login as admin and add a new report
- Given the report a name, select the DefaultJasperSQLOutputController controller and upload your new Jasper file.
- Save the report
- If the report requires a form to prompt the user for parameters edit the settings and add the form which has the prompt
- The controls on the prompt form will be used a parameter names (lowercase no space)
- The form control name and value will be passed as parameters to the report
Part III - Attach Report to Toolbar or Menu
- Login as user and edit a toolbar or menu
- Add a button with
Action System Generate Report
Report Your report
To be continued…
