Overview
This module provides the ability for users to define their own, customized patient summaries. It provides a clean separation between the underlying data to present and the actual format of the resulting summary, enabling users to create several different output documents depending on the circumstance. For example, on output summary might be appropriate for a mobile device, another might be for display in-line on the patient dashboard, and yet another might be a printable PDF.
The patientsummary module builds upon (and depends upon) the reporting module, leveraging the power of that framework for computing data and rendering output. Although we are working to provide a user experience that hides as much of the underlying complexity of the reporting module as possible, there still may be areas where the reporting module user interface is used to perform a particular activity. We expect to minimize this in future versions of the module.
The patientsummary module version has undergone a major re-write in the 2.0 release line. The 1.x release line of this module (available in svn under http://svn.openmrs.org/openmrs-modules/patientsummary/) contains very limited functionality that provides a single hard-coded HIV patient summary, mainly targeted at the PIH Rwanda Implementation. The 2.0 release is not intending to provide backwards-compatibility to the 1.0 version, but rather to provide the framework within which the 1.0 version can be re-defined using new configurable constructs. Stay tuned for more details on plans for merging these two versions over time.
Getting Started
Building a Patient Summary in 3 simple steps
- Define the data points that you want to make available
- Define a Patient Summary Report Definition containing the relevant data points
- Define a Patient Summary Template that defines how your patient summary should look
Viewing a Patient Summary
There are a couple of options:
- Preview your summary as you author it
- Preview your summary using the preview page
- Enable display of your patient summary via the patient dashboard, and view it there
Reporting bugs and requesting new features
All new feature requests and bug reports can be raised in [JIRA|https://tickets.openmrs.org/browse/PS}.
Getting involved
If you wish to check out the source code and/or contribute, the code can be found in github (http:/github.com/openmrs/openmrs-module-patientsummary)
Requirements
Some early thoughts and requirements for this module can be found on this project page: Configurable Clinical Summary. At a high-level, this module aims to provide the following:
- Provide a means for modeling the data (schema) for one or more patient summaries separately from the output
- Provide a means to render to multiple output formats for the same summary model
- Efficiently produce a patient summary for a single patient
- Provide an interface for previewing any patient summary quickly for a specific patient
- Configure that a patient summary for a single patient can automatically render in a new patient dashboard tab
- Configure one or more patient summary documents in a list accessible from the patient dashboard
- Support for a printable patient summary (eg. render with no header or footer, and integrate with printer)
- Produce a batch of patient summaries for a Cohort of patients
- Support doing this ad-hoc
- Support doing this via a scheduled process for off-peak hours
- Support producing a zip file containing one output document per patient
- Support producing a separate output document per patient, saved to a particular location on disk
- Support producing a single output document containing several concatenated patient summaries
- Support a wide range of data elements
- Include Obs for a particular Concept for a patient (all, last N, lowest/highest N)
- Include Encounters for a patient (limited by type, last N, all, linked to form page)
- Include particular output if a data value matches a certain conditional expression (eg. a patient flag)
- Include current program enrollment data for a particular Program
- Support built-in summary functionality
- Graph a particular data element that is a date/value pair over time
- Produce a table of data elements
- Support translations so that one summary template can be written to support multiple languages
- Support nice/easy authoring tools"
- Allow the user to edit the summary template and to see a preview of their changes easily as they work
- Support personal summary customization
- Allow users with the appropriate privileges to tweak a provided patient summary and save a personal version that they see instead
Mockups/Examples
- The sample mockups attached to this page are from the ticket Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.
Technical Notes
While the UI for the patient summary is in development, sample patient summaries can be developed as follows:
- Create a new PatientSummaryReportDefinition by going to: http://localhost:8080/openmrs/module/patientsummary/patientSummaryReportDefinitionEditor.form, entering a Name and clicking "Save"
- Go over to the reporting module UI, and from here:
- Click on "Data Definitions" and save a couple of Patient Data Definitions and/or Person Data Definitions (eg. gender, age, name, etc)
- Click on "Data Set Definitions". You will see a Row-per-patient data set definitions called "Patient Dataset for <Name you chose above>". Edit this one.
- Add one or more of the data definitions you created above to this
- Now you need to create your "template"
- Create a new text file called something like "template.txt" and in it, author the html for the way you want to display your patient summary
- Where you want patient data to be included, add this in by referring to the name you gave this when you added it to the schema above. For example, if you added columns "age" and "gender" to your report definition, you could have a very simple template with the text:
My age is $data.age and my gender is $data.gender
-
- Go to "Report Administration", click on the report that you created above, click "Add" under Output Designs:
- The "Name" should be however you want this summary to be presented to the end user
- The renderer should be a TextTemplateRenderer
- For resources, you should upload the text file you authored above
- For design properties, you will want to put: templatetype=Groovy
- Go to "Report Administration", click on the report that you created above, click "Add" under Output Designs:
- Now that this is in place, you should be able to go back to Administration and click on "Preview Patient Summary Templates":
- Choose a patient
- Choose your summary template
- Click Preview, and this should display the patient summary
- You can also make this summary available in a new tab on the patient dashboard by configuring a global property:
- Currently the global property is named "patientsummary.reportDesignUuids", which will likely be changed. You want to set this to the uuid of the report design you created above (probably need to get this out of the database in the reporting_report_design table for now. Will make this more user friendly later on...
- Once this is configured, go to the patient dashboard for a patient and the selected summary should appear in a new tab.