Shortages of drugs ranging from life-saving chemotherapies to basic generics are straining the health care system. Hospitals are adapting to chronic interruptions in the supply of medicines.