(d) When ruling on a request to review or extend detention, the court shall consider the totality of the circumstances, including
- (1) the length of time the person has been detained;
- (2) the reason the person has not yet been transported;
- (3) the person's current medical and psychiatric condition;
- (4) whether the person is gravely disabled or is likely to cause serious harm to self or others; and
- (5) whether the person is receiving treatment at the person's current placement.