HICKSVILLE - Court documents claim a legal loophole allowed a Hicksville man to illegally obtain painkillers from numerous pharmacies.

Prosecutors say Adeel Riaz, 28, would pose as doctors and patients and call numerous pharmacies to fill fake prescriptions for oxycodone and Xanax. Court documents reveal Riaz phoned in the prescriptions from 1026 Old Country Road in Plainview, which is a CVS. CVS corporate spokesman Michael Deangelis says no one with Riaz's name has ever worked at the store and no one there is familiar with him.

Woodbury pharmacist Jordan Fogel says the case shows a problem with keeping people from illegally obtaining prescription pills. New York has an I-STOP system where doctors have to enter prescriptions, but pharmacists are not required to check the system before filling prescriptions.

Court documents show from December 2013 to January of this year, Riaz would call the pharmacies and ask for small, five-day supplies of pills. Fogel says doctors are allowed to call in five-day emergency supplies for controlled narcotics.

According to court documents, Riaz pretended to be at least five different patients and two doctors, one of whom says he had Riaz as a patient and gave him a valid prescription at one point. The DA's office would not comment, but court documents say Riaz used slightly different versions of the prescription number to obtain more pills.