Removing Orders from RxXplore
There are cases where orders may be synced from RxUniverse sometime in the past, but get removed due to one reason or another. These orders will remain in RxXplore and you may want to remove them from the database for reporting reasons.
Instructions
Create a CSV file containing order numbers as the first column.
This can be done as an export in rx-reports, or manually created.
It can also be a new-line delimited list of order numbers
Run
bundle exec rails runner -e production lib/del_orders.rb <path_to_file>
within the rx-xplore directoryThis wil remove all orders listed in the file.
The input file can contain duplicate order numbers, it won’t effect the run.