Visit order

Donate to this project

Development Project Status: Completed

Due date for completion of this stage: 
Project description: 

Support to order visits is now included in OpenVPMS 2.1


The original project:


In Patients - Medical Records - Summary, and in the Summary tab of the Visit editor, patient visits are displayed from newest to oldest.

Within these visits, medical records can be ordered, as per Medical Records display order

This project will allow a practice wide option to specify the visit sort order.

This will be configured by extending the options available in the Medical Records Sort Order field of the practice.

Currently, this supports:

  • Descending  (i.e. newest items first)
  • Ascending    (i.e. newest items last)

This will be changed to:

  • Visit Descending, Items Descending
  • Visit Descending, Items Ascending
  • Visit Ascending, Items Descending
  • Visit Ascending, Items Ascending

Or, if any clearer...:

  • Newest Visit First, Newest Item First
  • Newest Visit First, Newest Item Last
  • Newest Visit Last, Newest Item First
  • Newest Visit Last, Newest Item Last


  • does there need to be another button to override Visit order?
  • In 1.8, the Problems tab has the same L&F as Summary. Does the sort order apply here?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Visit order

After consulting with the group, it looks like they would be quite happy to have the option set practice wide, without need for an additional override button.  To be able to read the medical record as a story as opposed to a top-posted email exchange is the main goal.  On the Practice page, perhaps Medical Records Sort Order could be changed to Medical Items Sort Order, and be placed underneath a Medical Visits Sort Order, or something along those lines. My sense is that the order displayed on medical records may reflect regional customs and habits more than anything else and so having the option on the setup page can be considered a further step towards internationalization of OpenVPMS.

Actually, we'd probably be happy enough to have the current sort button re-purposed to reflect the order of the visits as well as the items, so that the two options are:

  • Visit Descending, Items Descending
  • Visit Ascending, Items Ascending,

however, I see that there have been previous requests and an earlier project to allow resorting of the items alone.  In this case, we should not tamper with an existing function that others have become accustomed to.

The one drawback to the ascending order, obviously, is the need to get quickly to the bottom of long records.  I've been following the disussion on Medical Records paging and think that the idea of locking the selection panel would be a welcomed improvement.  With this, as long as the "Jump-to-the-bottom' button functions as expected, then getting around in the records should not be an issue.

I take it from the TODO above, that version 1.8 changes the format of the display in the Problems tab away from the tabular format it has now.  In the tabular format, the item order can be changed simply by clicking the Date and/or several other column headers.  This seems very flexible!  If the existing format is being abandoned, then for consistency, the same sort order should probably be applied to both the Summary and Problem pages.  But really, until we get using OpenVPMS in a working environment for a while, it's a little more difficult to have a stong opinion on this.

Thanks for looking at this issue,

Sam Longiaru   






Re: Visit order

By default, Visits are displayed 20 to a page. Navigation buttons will be displayed if there are more than 20 Visits, as shown below.

For Visits with lots of records, you'll get scrollbars. On Firefox, you can use Ctrl-Home and Ctrl-End to jump to the top and bottom respectively.

Locking the selection panel is covered by

The Problems tab is little utilised at present. Its being redeveloped for a group of practices that want to classify patient problems while being able to see the notes and treatments at the same time.  For more details, see:

For the sort order, I think the clearest approach will be to replace the existing sort button with two labelled buttons:

Syndicate content