If the community program director believes that a person on outpatient status will be a danger to himself or others if confinement is delayed pending the outcome of a revocation hearing, the person may be confined to a facility. If the person is confined in a jail, the community medical director shall apply with the court to confine the person pending the hearing. The application shall specify the behavior or reason justifying confinement in jail and the factual basis for finding that confinement in jail was necessary. The court shall provide copies to the prosecutor and defense counsel.