SAN DIEGO (NEWS 8) - San Diego county taxpayers spend tens of millions of dollars every year to pay for the health care of jail inmates.

Medical, mental health, dental, prescription drugs; the expenses really add up. Still, not everybody believes the quality of care is up to par.

Vista jail inmate Bill Avignone, 62, is preparing to go to trial on securities fraud charges.

But his defense attorney, William Sharp, was arguing in downtown court last week about something else: the quality of his client’s health care in jail.

“At this point, I don't think he's getting the appropriate medical treatment,” Sharp told the judge on Friday during a motion hearing.

“Every hour that I have to spend dealing with Mr. Avignone's medical condition is an hour I'm not able to spend on his legal issues,” said Sharp.

As an alternate public defender, Sharp’s salary and legal defense expenses are paid for by the county.

He told the judge that another branch of county government – the San Diego County Sheriff’s Department -- isn't doing its job when it comes to caring for inmates.

“He’s had severe headaches. He's got tissue masses that haven't been examined,” Sharp told the court.

Avignone is a prostate cancer survivor. He agreed to talk to CBS News 8 about his medical care while inside the Vista jail.

“I want to know of the cancer is spreading, if it's getting worse or what it's doing,” he said during an in-custody interview. “It’s a death sentence if it metastasizes.”

Over the past five months, Avignone has filed numerous grievances with the county sheriff’s department over access to health care and cancer testing.

“What they're not doing for me is they're not monitoring me closely,” he said.

Avignone’s doctors at UCSD Moores Cancer Center wrote letters to the court.

“He has a high likelihood of progression and should he go untreated while in custody his risk of progression increases tremendously," UCSD Dr. A. Karim Kader wrote in 2017.

UCSD Dr. Michael Randall also wrote the court in 2017 expressing concern that Avignone receive “laboratory monitoring and possible imaging studies in the future to closely monitor his cancer.”

But it wasn't until Avignone’s defense attorney filed a motion in San Diego County Superior Court that Avignone finally got the bone and body scans he needed.

“I finally went to go and see my oncologist after two and a half months of being in custody,” the inmate said.

“The follow up tests that my doctor ordered, they took almost seven weeks to perform those tests and they're still not all done,” he said.

The sheriff department’s Medical Services Division serves an average of 5,800 jail inmates on any given day. It’s most recent annual budget was $74.3 million.

The chief medical officer for the division is Dr. Alfred Joshua.

“We have to basically provide medical, mental health and dental care to all our inmates housed in our custody,” said Dr. Joshua.

“Inmates are really getting access much more expeditiously than even the community,” he said.

Dr. Joshua said the county jail employs 225 nurses who screen inmates for health issues, and inmates can see a doctor or specialist if needed.

“Sometimes there's a confusion between what the inmate feels they want for their care and it’s not the same as what is clinically the standard for their care,” said Dr. Joshua.

On May 18, Avignone will be back in court where his doctor from UCSD may be called to testify under oath about what care is clinically needed.

Avignone’s defense attorney is asking Judge Melinda Lasater to order the sheriff’s department to follow the doctor’s health care plan.

“It's a lethal and non-curable condition so you can see my concern,” said Avignone.

The San Diego County Sheriff’s Department currently is working to get its jail system accredited with the National Commission on Correctional Health Care, a nonprofit that monitors health care quality in jails.

That accreditation is expected by the end of the year.

Additionally, the San Diego County department of Public Health Services contracts with the Institute for Medical Quality to conduct annual jail audits.

Those audits currently are not posted online, although the sheriff’s department is working on that, too.

“Historically the Sheriff's Department has not posted the Medical Service Audits online. The department will have internal discussion regarding the posting of future reports for public review,” according to an emailed statement from a sheriff’s department spokesperson.

The jail’s most recent audits are posted below:

San Diego Central Jail 2017 audit

Vista Detention Facility 2017 audit

George Bailey Detention Facility 2017 audit

Las Colinas Detention Facility 2017 audit