Certain drugs, such as pain medicines, will lead to constipation. Some chemotherapy drugs can cause constipation.
Increasing fiber in your diet will not prevent or help treat the constipation caused from pain medicine. If you take pain medicine on a regular or daily basis you will need instructions from your doctor on how to prevent constipation or how to resolve it if it develops.