Ok, so many have said “due process” is required.

Describe to me “due process” in regards to mental illness.
Is a mental health Dr. standing before a judge, making his/her case to confine their patient for two more weeks, against their will, though no crime has been committed, considered “due process?”