After a witness called by the state has testified on direct examination, the court shall, on motion of the defendant, order the state to produce any statement of the witness in the possession of the state that relates to the subject matter as to which the witness has testified. If the entire contents of the statement relate to the subject matter of the testimony of the witness, the court shall order it to be delivered directly to the defendant for examination and use.