Fact (1): If $n>0$ is a rational number, then the quadratic form $q:\mathbb{Q}^4\to\mathbb{Q}_0^+$, $q(s,t,u,v)=s^2+t^2+n(u^2+v^2)$ is surjective. In particular, every nonnegative rational number $x$ can be written as $x=r^2+s^2+n(t^2+u^2)$ for some rational numbers $r,s,t,u$.
As a remark: If $d_k=0$ for some $k$ (and all $j>k$), we can by the same method also find a decomposition, but now every row and column starting with $k$ will be $0$, for the other rows, we use the same construction as before.
Since it was asked in a comment, I am adding the idea of a proof for Fact (1) here: The idea is to apply the local-global principle (Hasse-Minkowski) to the quadratic form $v^2+w^2+n(x^2+y^2)-cz^2=0$. It is quite obvious that this has a nontrivial rational root, iff $c$ is in the image of the $q$ mentioned in fact (1)($z$ can not be $0$ then, so we can divide by $z^2$). It is also easy to see that $z=1,v=\sqrt{c}$ is a root in $\mathbb{R}$.
The p-adic fields are a bit more involved, and to make things easier, we may assume (by simple quadratic substitution in x and y or z) that $n$ and $c$ are squarefree integers (if $c=0$, the problem would be trivial; and we assumed $n>0$).
$p=2$ is the messiest part: We can't use Hensel's Lemma here, however it is well-known that every integer congruent to $1 \pmod 8$ has a square root in $\mathbb{Z}_2$. Hence we set $z=1$ and check for each of the $6$ possible values for $c \pmod 8$ ($0$ and $4$ are not squarefree) and each of the $6$ possible values for $n \pmod 8$ that we can get numbers for $w,x,y$ such that $w^2+n(x^2+y^2)-q=7\pmod 8$ and take as $v$ a square root of $-(w^2+n(x^2+y^2)-q)$.
For $p>2$, we can basically use the proof of Lagrange's theorem, however we need some preparation.
There are 3 cases: $p\nmid q$, $p\mid q$ and $p\mid n$, and $p\mid q$ and $p\nmid n$. In the first case, we set $x=y=0$, and only need to solve $v^2+w^2-qz^2=0$ In the second case, we set $v$ and $w$ to $0$ and then divide by $p$ to get an equation of the form $nx^2+ny^2-cz^2=0$ where $p$ is not a divisor of the coefficients. In the third case, we set $y=z=0$ to get $v^2+w^2+nx^2=0$
In any case, it suffices to show that for $p\nmid a,b,c$ the equation $ax^2+by^2+cz^2=0$ has some nontrivial solution in $\mathbb{Q}_p$. So, we set $z=1$ (which guarantees that a solution will be nontrivial). By the same pigeonhole-principle argument as in Lagrange's 4 squares theorem, we get some $x',y'$ such that $a{x'}^2+b{y'}^2+c=0\pmod p$ and since $p\nmid c$, $x'\neq 0\pmod p$ or $y'\neq q$, so we can use Hensel's Lemma to lift this to a solution of $ax^2+by^2+c=0$ in $\mathbb{Q}_p$.
Now, we have a nontrivial root in each local field, so by the local-global principle the quadratic form also has a non trivial root in $\mathbb{Q}$.