Thanks for posting your query.
With the available described details, there appears to be diabetes associated complications.
Flank pain could be due to diabetic neuropathy
(dermatomal) or fecolith impaction.
You should consult with internal medicine specialist/ endocrinologist
and should go for thorough check up.
You should go for complete blood count
, renal function test, lipid profile glycosylated hemoglobin (HbA1c), urine routine microscopy.
You should take plenty of water, high fibres diet with laxative containing dulcolax, milk of magnesia
and liquid paraffin.
You should also take Gabapentin. pregabalin, epalrestat, methylcobalamin and oxcarbazepine.
Dr. Mayank Bhargava