Updated

Thirteen California hospitals have been fined for alleged code violations that endangered patient safety.

The California Department of Public Health announced the penalties Wednesday, which were each $25,000 or more. The hospitals can appeal within 10 days, or submit plans outlining how they will avoid errors in the future.

The fined hospitals are in Los Angeles, San Diego, Orange, Riverside, Alameda, San Francisco and Santa Clara counties.

Kathleen Billingsly, the deputy director for the State Center for Healthcare Quality, says more than 30 percent of administrative penalties are a result of medication errors.

The second most common violation is when sponges or surgical tools are left inside patients, occurring in 18.6 percent of administrative penalties.