Patients are being put at risk by medicine supply shortages which leave pharmacies unable to dispense prescriptions at least once a day, health leaders have warned.