An agreement revealed Friday in court would keep the hospitals operating through January and potentially longer.