
784 A.2d 874 (2001)
FRUEHAUF TRAILER CORPORATION, Petitioner,
v.
WORKERS' COMPENSATION APPEAL BOARD (Barnhart), Respondent.
Commonwealth Court of Pennsylvania.
Submitted on Briefs June 29, 2001.
Decided October 19, 2001.
*875 Stewart A. Karn, Pittsburgh, for petitioner.
Daniel K. Bricmont, Pittsburgh, for respondent.
Before DOYLE, President Judge, SMITH, Judge, and FLAHERTY, Senior Judge.
DOYLE, President Judge.
Fruehauf Trailer Corporation (Employer) petitions for review of an order of the Workers' Compensation Appeal Board (Board) affirming an order of a Workers' Compensation Judge (WCJ) that had granted the claim petition of George Barnhart.
Barnhart worked for Employer from 1965 until his retirement in 1991. He worked in several departments and was exposed to loud industrial noises throughout Employer's facility. Hearing protection was not made available to Barnhart until it was made mandatory in 1985 by regulations promulgated pursuant to the Occupational Safety and Health Act (OSHA).[1] Barnhart then wore foam earplugs, but they failed to keep out all of the noise. He experienced a ringing in his ears and a temporary hearing loss after his shift, and he often felt pressure in his ears. Barnhart subsequently worked as a driver for U.S. Cargo and Carrier between 1992 and 1993, but he was not exposed to loud noises in that job and has not worked *876 since 1993. Barnhart is a hunter and acknowledged that he fires a rifle three or four times a year during deer season. He is occasionally exposed to the noise of his power saw, drill and riding lawn mower, but he wears hearing protection while operating this equipment. Barnhart first became aware of his hearing loss when he received a medical report, dated September 26, 1994, after an examination by Michael C. Bell, M.D., on April 26, 1994.
At a hearing before the WCJ, Barnhart presented Dr. Bell's report and the results of his April 26, 1994, audiogram. Dr. Bell opined that Barnhart suffered from permanent bilateral sensorineural hearing loss. This was, Dr. Bell concluded, characteristic of industrial noise-induced hearing loss. Dr. Bell calculated Barnhart's hearing impairment at 17.8 percent according to the American Medical Association (AMA) formula and opined that this impairment was caused by the long and continuous exposure to noise that Barnhart experienced in his various duties for Employer.
Employer presented a March 17, 1995, medical report by Donald B. Kamerer, M.D., and the test results of an audiogram presented in an October 20, 1997, supplemental report by Dr. Kamerer. The March 17, 1995, report was based on Dr. Kamerer's examination of Barnhart on March 7, 1995. In that report Dr. Kamerer concluded that, according to the AMA formula, Barnhart had a binaural impairment of 2 percent. In the October 20, 1997, supplement, Dr. Kamerer recalculated the impairment because the original figure was based on a corrective scale. In his October 1997 letter, Dr. Kamerer amended his original finding to 12.82 percent binaural impairment and opined that noise exposure had contributed to the hearing loss.
It is the function of the WCJ to weigh the evidence and resolve conflicting testimony. Alpo Petfoods, Inc. v. Workmen's Compensation Appeal Board (Neff), 663 A.2d 293 (Pa.Cmwlth.1995); Buczynski v. Workmen's Compensation Appeal Board (Richardson-Vicks, Inc.), 133 Pa.Cmwlth.532, 576 A.2d 421 (1990). The WCJ is free to accept or reject, in whole or in part, the testimony of any witness, including medical witnesses. Greenwich Collieries v. Workmen's Compensation Appeal Board (Buck), 664 A.2d 703 (Pa.Cmwlth.1995).
The WCJ found Barnhart's testimony and the opinion of Dr. Bell to be credible and adopted Dr. Bell's opinion as a factual conclusion. The WCJ found Dr. Kamerer's opinion credible only to the extent that he found that Barnhart's hearing loss was caused by exposure to noise. The WCJ accepted Dr. Bell's calculation that Barnhart suffered a 17.8 percent loss of hearing and noted that the difference between that and Dr. Kamerer's 12.8 percent calculation was within an acceptable range.
The sole issue that Employer asks us to address on appeal[2] is whether the WCJ committed an error of law in granting the claim petition when no evidence was submitted that the audiometric testing data upon which the WCJ relied was performed according to the standards established in the Workers' Compensation Act (Act).[3]
*877 The Act was amended in 1995[4] to require that all audiometric testing must conform to OSHA occupational noise exposure standards. Section 306(c)(8)(iv) of the Act pertaining to claims for permanent loss of hearing caused by exposure to hazardous occupational noise provides that
[t]he percentage of hearing impairment for which compensation may be payable shall be established solely by audiogram. The audiometric testing must conform to OSHA Occupational Noise Exposure Standards, 29 CFR 1910.95 (relating to occupational noise exposure) and Appendices C, D and E to part 1910.95 (July 1, 1994).
77 P.S. § 513(8)(iv) (emphasis added).
Nothing in the record in this case indicates whether or not the audiometric testing upon which Barnhart relied to establish his work-related hearing loss was conducted in accordance with OSHA standards. Barnhart does not contend otherwise, but Employer did not assert that the test was not in accord with OSHA standards until it filed its petition with this Court.
Employer argues that the decision of the WCJ must be reversed because Barnhart never asserted that the audiometric testing conducted by his medical witness, Dr. Bell, conformed to OSHA standards. However, the failure of a party to abide by a rule of law in an administrative proceeding does nothing more than give rise to an affirmative defense available to the opposing party. If the opposing party does not assert that defense during the administrative proceeding, that party waives the defense and may not raise it on appeal. Employer has waived the affirmative defense that Barnhart's testing was not conducted in accordance with OSHA standards by failing to raise it before the WCJ. Employer may not complain to us that Barnhart did not comply with the Act, because it did not first assert that as an affirmative defense to the WCJ.
The waiver doctrine was first applied to administrative proceedings in Wing v. Unemployment Compensation Board of Review, 496 Pa. 113, 436 A.2d 179 (1981). The claimants in Wing were denied benefits after the referee found that they had voluntarily quit their employment. The Unemployment Compensation Board of Review affirmed, but this Court reversed, finding insufficient evidence to establish the fact that the claimants had voluntarily left their employment. A divided Commonwealth Court remanded, however, on the issue, raised initially before us and not before the Board, of whether the claimants had been fired for willful misconduct. Id.
Our Supreme Court disagreed and, holding that the employer had waived the issue of willful misconduct by failing to raise it before the Board, remanded the matter to the Board for the computation of benefits only. By finding that the employer had waived the issue, the Supreme Court extended its holding in Dilliplaine v. Lehigh Valley Trust Co., 457 Pa. 255, 322 A.2d 114 (1974), which had applied the doctrine of waiver rule to civil and criminal cases; Wing applied it to administrative proceedings in the context of unemployment compensation. The waiver doctrine was applied specifically to workers' compensation proceedings in DeMarco v. Jones & Laughlin Steel Corp., 513 Pa. 526, 522 A.2d 26 (1987). Our Supreme Court found there that the employer had waived the application of res judicata as an affirmative defense by failing *878 to raise either the facts or the issue before the WCJ. The Court said in DeMarco that "[l]egal issues and facts not presented to the referee[[5]] cannot be asserted on appeal without sacrificing the integrity, efficiency, and orderly administration of the workmen's compensation scheme of redress for work-related injury and occupational disease." Id. at 532, 522 A.2d at 29 (footnote added).
In this appeal, Employer has waived the bases of any objections to the admission of Dr. Bell's audiogram.
Accordingly, the decision of the Board in this matter is affirmed.[6]

ORDER
NOW, October 19, 2001, the order of the Workers' Compensation Appeal Board in the above-captioned matter is hereby affirmed.
NOTES
[1]  29 U.S.C. § 655(b).
[2]  Our standard of review in workers' compensation appeals is limited to determining whether an error of law was committed, constitutional rights were violated, or whether necessary findings of fact are supported by substantial evidence. Morey v. Workmen's Compensation Appeal Board (Bethenergy Mines, Inc.), 684 A.2d 673 (Pa.Cmwlth.1996).
[3]  Act of June 2, 1915, P.L. 736, as amended, 77 P.S. §§ 1-1041.4; 2501-2626.
[4]  See the hearing loss amendments to the Act, i.e., Act of Feb. 23, 1995, P.L. 1 (commonly referred to as Act 1).
[5]  WCJs were known as referees before the 1993 amendments to the Act. See Act of July 2, 1993, P.L. 190 (commonly referred to as Act 44).
[6]  See, e.g., USX Corp. v. Workmen's Compensation Appeal Board (McDermott), 152 Pa.Cmwlth.174, 618 A.2d 1150, 1151 (1992), in which we stated that, "[b]ecause neither party's argument has been properly preserved for review, we affirm."
