(a) Except as provided by Subsection (c), on a motion filed by a person described by Subsection (b), the court shall seal the medical records of a child who is a victim of an offense described by Section 1, Article 38.071.
(b) A motion under this article may be filed on the court's own motion or by:
(1) the attorney representing the state;
(2) the defendant; or
(3) the parent or guardian of the victim or, if the victim is no longer a child, the victim.
(c) The court is not required to seal the records described by this article on a finding of good cause after a hearing held under Subsection (d).
(d) The court shall grant the motion without a hearing unless the motion is contested not later than the seventh day after the date the motion is filed.