(b) Such notice of motion shall be served on the inmate, the facility and the department not less than seven days prior to the return date of the motion. The persons on whom the notice of motion is served shall answer the motion not less than two days before the return date. On examining the motion and answer and, in its discretion, after hearing argument, the court shall enter an order, granting or denying the motion. 4. Nothing in this section shall preclude an inmate from consenting on his or her own behalf to any medical, dental or mental health service and treatment where otherwise authorized by law to do so.