Hi Dear!!Thanks for your query to HCM. 
Read your query and understood your health concern.I feel concerned about your health issues.
Based on the facts of your query, Your boy friend seem to suffer from-
Orchitis with 
epididymitis ? TB with diabetes. 
Treatment Suggested-
You need to 
Consult Urologist and evaluate for the cause of it.
Usg and Color doppler is suggested to rule out accompanied 
Varicocele with it.
After tests and physical check he may treat it by - antibiotics/ anti-inflammatory cover - 10 days course and would wait for response after it.
If no response would investigate for TB / or 
Chronic Prostatitis with old STD which needs to be ruled out. Urologist would treat it with antibiotics with intraprostatic injections if need be for the early recovery from this 
testicle pain and headache during intercourse.
Hope this reply would help you to plan further treatment with your doctors there.
Welcome for further query in this regard if any.
Good Day!!
Dr.Savaskar M.N.
Senior Surgical Specialist
M.S.Genl-CVTS