Thanks for your query,based on the facts that you have posted it appears that you have passed a clot of blood and had pain in penis while urinating .
This could be most likely to be due to small urinary stone
being passed through urethra
Please get your urine analysis done to rule out presence of any crystals of either Oxalates,phosphates ,uric acis your urine.and urine infection.
Please take broad spectrum antibiotics like Cefotaxime
along with urinary antiseptic like Nitrofurantoin
twice daily and urine alkaliser thrice daily.
Ensure to drink more water.To keep your urine dilute This will help to control dysuria.