The waiver of any privilege does not apply to any treatment, consultation, prescription, or examination for any condition not related to the pending action. On a timely motion for good cause and on notice to all parties and the person to be examined, the court in which the action is pending may issue an order to prohibit the introduction of evidence of any such portion of any person's medical record not related to the pending action.
§ 35, MCA