MdrtbPatientChartWidgets Module
THIS PROJECT HAS BEEN RENAMED THE HTMLFORMFLOWSHEET MODULE WHICH CAN BE SEEN HERE: ??HtmlFormFlowsheet Module. ALL FURTHER DEVELOPMENT WILL HAPPEN ON THE HTML FORM FLOWSHEET MODULE. NO FURTHER DEVELOPMENT WILL HAPPEN ON THE MDRTBPATIENTCHARTWIDGETS MODULE.
The 'mdrtb patient chart widgets' module is an OpenMRS module that allows you to generically model a paper flowsheet. The basis for the design of this module is the WHO Cat-IV treatment card, which contains baseline information, that is filled out once, and then flowsheet-type information that can be appended to over time (for items such as monthly regimen adherence, monthly smear and culture results, and regimen changes).
The module allows you to specify any number of tabs in a tab-based layout, each containing a distinct html form. You can then designate whether or not the html form should be used once, or many times. Forms that are one-time forms (like baseline demographics and medical history forms) can be as complex as is necessary, and working with these is almost identical to dealing with a stand-alone html form externally from this module – it just all happens within the visual tab. Forms that are meant to be flowsheets should represent exactly one row in a table on the paper form. Every time a new html form is filled out of this type, view mode appends the results entered through the form to the flowsheet table.
Any form entry of either type can be viewed and edited later, and this has been optimized for performance such that only that tab will be reloaded after a new entry or edit is made.
Configuration
There are two global properties that allow you to configure your tab layout, and form type:
mdrtbpatientchartwidgets.configuration
This global property essentially does the entire layout of the tabs. Here is an example property value:
S:Demographics:15:LAST|F:Smear:21|F:Culture:22|F:Labs:20|F:Adherence:23|F:Adverse Effects:17|F:Steering Committee:19|F:Comments:18
These are pipe-delimited entries of the form:
Type:Title:FormID:<<FIRST or LAST>>, where
Type can be 'F' for flowsheet, and 'S' for single,
Title (any text value),
Form Id should be the base formID in your database (not the html formID),
(optional) the strings 'FIRST' or 'LAST' only apply to
Single forms (type 'S'), and determine which form to show, if there are multiple entries of this form for a patient.
mdrtbpatientchartwidgets.links
allows you to place external links above the page. These are also pipe-delimited and take the form:
Title:URL
for example, here is a valid sample value:
Bacteriologies:/module/mdrtb/mdrtbPatientOverview.form?view=BAC|DSTs:/module/mdrtb/mdrtbPatientOverview.form?view=DST|Regimens:/module/mdrtb/mdrtbPatientOverview.form?view=REG|Treatment Outcomes:/module/mdrtb/mdrtbPatientOverview.form?view=STATUS
NOTE After changing either of these global properties, you will need to stop and start the module in order for your new values to take effect.
DEFAULT CONFIGURATION OVERRIDE
If you would like for your application to have multiple flowsheet layouts, this can be done by adding the URL parameters 'configuration', 'links', and 'fullPage' to the module's URL. 'configuration' expects the exact argument that the global property 'mdrtbpatientchartwidgets.configuration' expects, and 'links' expects the same argument that 'mdrtbpatientchartwidgets.links' expects. 'fullPage' can only accept 'true' and 'false', and this allows you to specify whether or not you want to include the header and footer. If you specify fullPage = true, you get the default 'everything' view of the configured tabs. If you specify fullPage = false, you don't get the header, patient header, or footer, making the tabs suitable for insertion into a ui framework (tested against the ui.springmvc module).
So, for example, if you navigate to:
module/mdrtbpatientchartwidgets/mdrtbPatientWidgetChart.list?patientId=33
you'll get the default tab view for patient #33. However if you navigate to:
module/mdrtbpatientchartwidgets/mdrtbPatientWidgetChart.list?patientId=33&configuration=F:Culture:22|F:Labs:20&links=Treatment Outcomes:/module/mdrtb/mdrtbPatientOverview.form?view=STATUS
you'll get a tab view with only the culture and lab forms, and a link to mdrtb treatment outcomes.
Examples
Here is an example of a one-time form in the tab structure:
And, here is an example of a flowsheet-type form in the tab structure: