Currently we have the ability to revise a drug order in OpenMRS, which means that when a drug order is recorded and the user wants to change the drug order he/she can revise the order which would void the original order and create a revised version of the same. Now this is good in a clinical scenario where history of drug order data is needed.
However since we do not have the ability to edit the drug orders, in a “Data Entry Scenario”, if the data entry person makes a mistake while creating the order, he/she would have to revise the order to correct this mistake. This means that the original order would still be present and would show up as an inactive drug order. This is not preferable as this would affect the data analysis as it takes into consideration an order with erroneous data.
Also for the clinical perspective, the ability to edit orders would be useful. Because in some of our implementations we have purposefully hidden the original orders that were “Revised” when the user actually wanted to “edit” the orders. Here the users are forced to revise even when they mean to edit the order.
Can this be done in OpenMRS? Is there an implementation that is handling this in any other way.
The Order Entry API introduce in Platform 1.10 does not support this data entry scenario. The Bahmni team has added support for that scenario in Platform 1.12 (which Bharat is releasing a beta of toda), so actually the version of openmrs-core that Bahmni is running does support what you’re talking about. In code it’s the OrderService.saveRetrospectiveOrder method.
I just tried to document the thought process behind the current API on the Order Entry API wiki page. (Hopefully @burke can improve that section; I’m trying to convey his thinking.)
What I wrote is:
The API introduced in Platform 1.10 is primarily a real-time API that can interoperate with external systems, while still preserving patient safety. This means that as soon as an order is signed and activated, the API assumes that it may be communicated to external systems (e.g. for dispensing or med administration), and acted upon outside of OpenMRS’s control or knowledge. A consequence of this is that the real-time API does not allow you to edit an order after it has been signed. (The API can’t guarantee no external system has carried out that order, e.g. given the patient a medication, and editing the OpenMRS order record might lead to giving the patient an overdose of a drug.)
In Platform 1.12 we introduce a retrospective API that allows you to make changes required in a retrospective data entry workflow, but not allowed by the real-time API. See the OrderService.saveRetrospectiveOrder method. The retrospective API bypasses assumptions made for patient safety in the real-time API, so if you use it, you must be aware that OpenMRS cannot guarantee that any order you are changing has not already been fulfilled or acted on by an external system.
Hi @darius, The ability to saveRetrospectiveOrders doesn’t support editing the current order as per the code.
My mistake, I had thought that the code added in 1.12.0 did allow you to
edit existing orders.
I believe it would be consistent with our philosophy to introduce
OrderService.editOrderRetrospective(Order), and document that this is “safe
only for a retrospective data entry scenario” or similar.
On Wed, Mar 16, 2016 at 10:31 PM, Bharat Akkinepalli < talk+noreply■■■■■■■■■■■■> wrote:
bharatak https://talk.openmrs.org/users/bharatak Bharat Akkinepalli
Hi @darius https://talk.openmrs.org/users/darius, The ability to
saveRetrospectiveOrders doesn’t support editing the current order as per
In Reply To
darius https://talk.openmrs.org/users/darius Darius Jazayeri
@prabhuawasthi https://talk.openmrs.org/users/prabhuawasthi The Order
Entry API introduce in Platform 1.10 does not support this data entry
scenario. The Bahmni team has added support for that scenario in Platform
1.12 (which Bharat is releasing a beta of toda), so actually the version of
openmrs-core that Bahmni is running does support what…
or reply to this email to respond
To stop receiving notifications for this particular topic, click here
To unsubscribe from these emails, change your user preferences
or, click here <email@example.com?subject=unsubscribe> to
unsubscribe via email.
I believe what we said is that this could be allowed on the head of any order as long as validation is performed the same as if validation was being performed on the order’s date.
By “head of any order” I mean an unrevised order or the last in a series of revision (i.e., no other orders row exists with
previous_order_id linked to this order). I don’t think we want to allow editing in place of orders that have been subsequently revised, since that could get really messy. If someone needs to edit-in-place an order that has subsequently been revised, then they’d first need to void or purge the subsequent revisions to the order.
So, per this conversation, it’s appropriate to add support into Platform 1.12 for retrospective editing of still-active orders.
(As Burke says, you shouldn’t be allowed to edit an order that has a later revision. But since you’re talking about editing active orders, I don’t think the is relevant.)
This should be done in a purpose-built new method like
editOrderRetrospectively(Order), and the javadoc for this method needs to describe what was discussed above about patient safety. (We can help with the precise wording later.)
Thanks @darius @burke we will work on a PR for this after an internal discussion.
@bharatak, did this end up getting included in Platform 1.12?
We did not pick this card yet. We have done the analysis of it but not scheduled it due to priority. Will update on this thread when this gets picked up. It might not end up in 1.12.0.
Thanks Barat. Do we have a planned release date for 1.12.0?
@burke Sorry for the delay in the release. The openmrs 1.12.0 is released now and is available here