Starting edit position in most recent record

Greetings all -- I've had the same request from each of the vets here and was wondering if there is a code change I could make to implement this.  The Canadian group wanted to have the medical record order changed so that the newest entry was at the bottom so that the record would read story style.  I have done that and got a beer or two out of it for my troubles.  Now they are wondering if when opening a medical record, the cursor position could default to the bottommost (most recent) visit instead of to the topmost (oldest) visit. 

I've tried to point out that jumping to the bottom of a document is not really the default start-up behavior in most editors of any type, but the final upshot of the discussion was that I did have to promise that I would ask.

Thanks,

Sam Longiaru

Kamloops, Canada

 

 

Comment viewing options

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

Re: Starting edit position in most recent record

If you are displaying visits from oldest to newest, then the newest record will always be on the last page, so you need to advance to that page to locate it.

One way to do this is to use PatientHistoryBrowser.setSelected(Act object, boolean find) method. If you have the latest visit, you can use this to advance the history browser to the appropriate page and select it. If you haven't already done so, you'll need to change the PatientHistoryQuery.getPage(Act object) method to order the query results in ascending order.

 

Re: Starting edit position in most recent record

Thanks for the reply Tim.  I had looked into both PatientHistoryBrowser and Query but didn't see anything simple.  I suppose I will put the vets off until at least 1.8 to implement this.  I only have the source code for 1.7.1 as a NetBeans project now but will migrate over to IntelliJ with 1.8's final release.  Also, I couldn't find the .getPage method in 1.7.1.  But I'll dig into this later... or perhaps it will just blow over :)

Thanks again,

Sam

 

Re: Starting edit position in most recent record

In the 1.8 source code 

getpage is found on line 187 of PatientHistoryQuery

here is the Fisheye link for trunk

http://fisheye.openvpms.org/fisheye/browse/Openvpms/vpms/trunk/openvpms-web-workspaces/src/main/java/org/openvpms/web/workspace/patient/history/PatientHistoryQuery.java?hb=true#to187

This was only added to the web app in 1.8 as a result of

https://openvpms.atlassian.net/browse/OVPMS-1505

I wouldnt be trying to patch 1.7 at this point 1.8 should only be a few months away if that with the beta out now.

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Starting edit position in most recent record

http://www.openvpms.org/project/user-preferences
 

has been updated to include these sorts of preferences...please contribute to it if you would like to see this feature in OpenVPMS.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Starting edit position in most recent record

The preference change won't support this functionality. The sort order only applies within visits, whereas Sam has ordered visits from oldest to newest.

Re: Starting edit position in most recent record

My apologies - I misread what he was trying to do.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au
Syndicate content