Deleting a lab procedure order

jyo2013 wrote on Friday, July 31, 2015:

If I create a lab procedure order for a patient accidentally and then delete it,
the pending review still shows the tests.

From the mysql log, I can see that it is only updating the forms table and is setting deleted=1 when I delete the order, but it is not removing the entries from any of the procedure_ tables.

Is there any way to delete the required rows from the procedure_ tables so the tests don’t show up in the pending review page?

OpenEMR version 4.2.0

Thanks,
Jyotsna

fsgl wrote on Friday, July 31, 2015:

The structure of procedure_order seems to suggest that the deletion of the unwanted test is possible from that table.

jyo2013 wrote on Monday, August 03, 2015:

Thanks fsgl. I deleted the records from procedure_order table manually.

fsgl wrote on Tuesday, August 04, 2015:

You’re welcome.

Glad it worked.

visolveemr wrote on Thursday, August 06, 2015:

Hello Jyotsna
Following is the code change to delete the related procedure order under ‘Peding Review’ screen, once the procedure form in encounter screen is deleted. Do find the changes in this commit link.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library

sunsetsystems wrote on Thursday, August 06, 2015:

It would be better to fix orders_results.php so that it checks the forms.deleted flag. Setting that flag (not physical deletion) is the normal way to delete any encounter form.

Rod
http://www.sunsetsystems.com/

visolveemr wrote on Friday, August 14, 2015:

Hello Rod
As suggested, the orders_results.php file has been handled to skip the deleted order, instead of deleting the procedure from the table. Changes can be find in this commit link.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library

kodusote wrote on Sunday, August 16, 2015:

Dear ViSolve,

I added the script to my customization and it worked. The deleted procedure forms did not show up in the Pending Review page.

Thanks.

Kayode

visolveemr wrote on Monday, August 17, 2015:

Thank You Kayode. Glad that worked for you.

bradymiller wrote on Saturday, August 22, 2015:

Hi Visolve,
Committed this fix to the codebase. Thanks for the contribution!
-brady
OpenEMR

Hello.
I have this problem with openemr 5.0.2!!!
What is the solution?