Integer solution of $a^2+b^2=c^2+d^2$ that relates $a,b,c$, and $d$ explicitly. I have found that the integer solution of $a^2+b^2=c^2+d^2$ is $(a,b,c,d)=(pr+qs,ps-qr,pr-qs,ps+qr)$ for integer $p,r,q,s$.
I wonder if there is an explicit relation between $a,b,c,$ and $d$? Or could you give me a hint on what topics should I learn to find this relation if it exists?
Thank you for all your help.

From https://sites.google.com/site/tpiezas/003 (10. Form $mx^2+ny^2=mz^2+nt^2$-S. Realis(complete):
$$ u^2+nv^2=x^2+ny^2 \\ \Leftrightarrow \small \{ u, v, x, y \}=\{ a^2-n(a-b)^2+n(a-c)^2, b^2-(a-b)^2+n(b-c)^2, a^2+nb^2-nc^2, c^2-(a-c)^2-n(b-c)^2 \}. $$
Substituting $n=1$;
$$ u^2+v^2=x^2+y^2 \\ \Leftrightarrow \small \{ u, v, x, y \}=\{ a^2-(a-b)^2+(a-c)^2, b^2-(a-b)^2+(b-c)^2, a^2+b^2-c^2, c^2-(a-c)^2-(b-c)^2 \}. $$
So, this is the generalized form;
$\small \{a, b, c, d\}=\{m^2-(m-n)^2+(m-l)^2, n^2-(m-n)^2+(n-l)^2, m^2+n^2-l^2, l^2-(m-l)^2-(n-l)^2\}.$
