The court's order dismissing or refusing to dismiss a legal action pursuant to a petition filed under this chapter is immediately appealable as a matter of right to the court of appeals. The Tennessee Rules of Appellate Procedure applicable to appeals as a matter of right governs such appeals.