Invoice Edit Locks
Donate to this project
Development Project Status: Under Discussion
You can either donate money to this project by entering the amount above and clicking the 'Add to cart' button, or you can pledge an amount by clicking here to email your commitment. If you make a pledge, then when we have 100% funding commitments, you will be notified by email and you can then make your actual donation. Note that development will not commence until all funds are received.
OpenVPMS uses a technique called optimistic locking to ensure that multiple users editing the same object don't overwrite each other's changes. If two users edit the same object, the first user to save wins, and the second user's changes are rolled back.
Whilst this prevents data corruption, it means that the second user to save loses their changes.
This project will introduce edit locks so that when a user edits an object, they acquire a lock. If another tries to edit the same object, a message will be displayed and editing will be prevented.
Initially, only support for invoice edit locks will be provided, but this may be extended to other objects in future.
Locks
Locks are acquired when editing an object. A lock contains:
- the object being edited
- the user
- the time the lock was acquired
When editing completes, the lock is released.
If a lock has been acquired for an object, and another user tries to edit the same object, an error message will be displayed e.g.
This invoice is being currently being edited by J Smith.
Invoice Editing
Invoices are the primary cause of save conflicts, so these will be the first candidates for edit locks. It also means that deadlock detection won't be required.
Invoice locks need to be acquired when performing:
- Customer Charges (new, edit, delete, finalisation)
- Check-In
- Consult
- Check-Out
- Estimates - Invoice
- Customer Orders - Invoice
- Prescriptions - Dispense
Invoices also update many other objects. These must not be edited while their associated invoice is edited. This includes:
- medications
- prescriptions
- investigations
- documents
- reminders
- visits
Lock Expiry
Locks will automatically expire if a user logs out or their session is terminated.
Lock Removal
A new administration workspace will be provided to:
- query current locks
- remove individual locks
Exclusions
This project will not support:
- automatically releasing locks if a user is away from their terminal
- preventing invoices or related objects being updated by background tasks e.g.:
- Reporting - Debtors - End Period
- Reporting - Reminders - Send All
These could cause a user's changes to be rolled back, so should be run when editing is not being performed.
Comments
Re: Invoice Edit Locks
Could this please be costed?
Thanks,
Asha Stott.
Re: Invoice Edit Locks
One of our members has started the ball rolling with a donation of $100. Thanks very much! If everyone were to donate this amount there would be more than enough funds to have this project available in version 1.9.
Re: Invoice Edit Locks
Another member has contributed $200 to this project. Thanks very much!
Re: Invoice Edit Locks
Thanks very much to the member of our community who has donated $50 to this project!
Re: Invoice Edit Locks
We will Pledge $800 to this project...
thanks,
adrian