rqdatatable_prepare function

Apply a treatment plan using rqdatatable.