Opinion by
Orlady, J.,The plaintiff presented his petition to the court of common pleas for an alternative mandamus, to compel the State Board of Veterinary Medical Examiners to register him as a person duly qualified to conduct the practice of the science of veterinary medicine and surgery, in this commonwealth, and to issue to him the proper certificate, etc. The defendant filed an answer setting forth certain facts, which the plaintiff traversed, and the issue of facts so raised was tried before a jury, resulting in a verdict in favor of the plaintiff, which was subsequently set aside, and a judgment non obstante veredicto was entered in favor of the defendant.
*284The first legislative attempt in this state to regulate the practice of veterinary medicine and surgery is found in the Act of April 11, 1889, P. L. 28. The purpose of the act was to reduce to a scientific method, under legislative control, the care and treatment of domestic animals, and to prevent charlatans from practicing their impostures on the credulous public. Preparatory study and training were provided for, and the skill and proficiency of the veterinarian was to be evidenced by a diploma of graduation from legally chartered institutions, and registration on our public records.
To avoid doing injustice to those who had been practicing a bona fide calling, but who were without collegiate training, the second section of the act provided, that any person who had assumed the title of veterinary surgeon or analogous title, for the five years preceding the passage of that act, without being entitled to the degree of veterinary surgeon or analogous title, was authorized to continue the use of that title, but to do this it was imposed as a duty on such person, that he should make an affidavit to that fact and be recorded as an existing practitioner.
The requirements of the act are not ambiguous, and the limit of time within which persons of the plaintiff’s class could avail themselves of the terms of the proviso was extended, by Acts of April 29, 1891, P. L. 36, May 16,1895, P. L. 79, and April 18, 1905, P. L. 209, until January 1, 1906. This plaintiff did not take advantage of any of the earlier statutes, and did not apply for registration until November, 1905, when he was rejected, and in December following he filed another application which the state board again refused. While he was within the statutory time for filing his petition, the authority of the board was enlarged by the terms of the act of April 18, 1905, which he now invokes as his statutory authority for being registered, and he must submit to the tests therein required. In determining his rights we must look to the act of 1889, as the provision in regard to “for the five years preceding the passage of this Act” (1889) is *285carried through all the subsequent enactments, and it is as mandatory now as when that statute was passed. He must show that he assumed the title for five years prior to April 11, 1889, not intermittently but continuously, in good faith, as a practitioner of the science of veterinary medicine and surgery.
The legal principles controlling such cases are clearly defined and have been frequently declared by the courts. The writ of mandamus is but a command to exercise a power already possessed, or to perform a duty already imposed by a statute, and where the duty to be performed is judicial or involves the exercise of discretion, mandamus will lie to compel the official to act in the premises and exercise his judgment and discretion, but will not direct how the duty shall be performed or the discretion exercised. If, however, such judgment or discretion is abused, or there is a mistaken view of the law as applied to the admitted facts of the case, the writ will issue to compel action according to law: Runkle v. Commonwealth, 97 Pa. 328; Kell v. Rudy, 1 Pa. Superior Ct. 507; Douglas v. McLean, 25 Pa. Superior Ct. 9; Com. v. Philadelphia, 211 Pa. 85.
The good faith of the board in refusing to register .the appellant is to be ascertained by the record and the testimony adduced before it when it determined the question, and not from the testimony taken at a subsequent trial of an issue in court.
The terms veterinary surgeon or analogous title as used in the several statutes, were not intended to embrace quacks, grooms, farriers .or others of pretended skill in the mere care of domestic animals, but only persons of such proficiency and experience, who in good faith held themselves out to the world as qualified to render surgical and medical treatment to domestic animals, and the legislative requirement that this professional occupation should be “ for the five years preceding the passage of this Act” (1889) was as important as any other. No other time of actual or pretended service could be substituted, *286nor could any fractional part of the required five years be added to other years.
An examination of the testimony submitted to the board when it refused to register the plaintiff does not satisfy us that it acted from mere caprice, arbitrarily or for unsubstantial or unjustifiable reasons, but fairly shows that the petition was refused because the appellant did not then show by proper and competent evidence, that he had assumed the required title, and had been continuously engaged in the practice of veterinary medicine and surgery for the five years preceding April 11, 1889, as required by the several statutes relating thereto.
i The judgment is affirmed.