Most doctors in South Carolina will soon be required to consult a database of patients’ medical history as a way to combat the state’s rampant prescription painkiller problem. Policy changes will direct any doctor who wants to bill either Medicaid or the state’s health plan for public workers to use the database.