Most likely you are having bladder stone
. So when the bladder is full the irritation of stone will be less and when the bladder is empty it irritates more. also you are having blood in urine which is a sign of bladder stone. There are other possibilities like infection.
You need urine examination, ultrasound
of the abdomen and x-ray of the abdomen. please consult a urologist