Ladd, J.
Every citizen has the undoubted right to follow any lawful' calling, business, or profession he may se*467lect, subject only to such restrictions as the government may impose for the welfare and safety of society. This right ia one of the distinguishing features of republican institutions. Many of the occupations of life may be followed by persons, irrespective of fitness, without danger to the public health or in detriment to the general welfare. Others demand special knowledge, training, or experience; and the power of the state to prescribe such restrictions and regulations for these as in its judgment shall protect the people from the consequences of ignorance or incapacity, as well as of deception and fraud, has never been questioned. Dent v. West Virginia, 129 U. S., 122 (9 Sup. Ct. Rep. 231, 32 L. Ed. 623); State v. Randolph, 23 Or. 74 (31 Pac. Rep. 201, 37 Am. St. Rep. 655, 17 L. R. A. 470). This is especially true with respect to the practice of medicine. “It has to deal with all those subtle and mysterious influences upon which health and life depénd, and requires not only a knowledge of the properties of vegetable and mineral substances, but of the human body, in all its complicated parts, and their relation to each other, as well as their influence upon the mind.” Nearly every one, of necessity, consults the physician at some period of life, but few are able to judge his qualifications in point of learning and skill. And because of the importance of the interests committed to his care, involving health and life, chapter 17, title 12, of the Code was enacted, requiring knowledge and capacity commensurated therewith, and upon which the community may rely. Prior to January 1, 1899, this was to be evidenced in three different ways: (1) By examination before the state board of medical examiners; (2) by a genuine certificate of graduation from a medical school, found by the board to be of good standing; and (3) by a showing that the physician had “been in practice in this state for five consecutive years, three years of which time.shall have been in one locality.” Code, section 2579. The nature and extent of these qualifications wero primarily for the determination of the legislature. No1 ob*468jection can be urged because of their severity, if appropriate to the profession, and attainable by reasonable study or application. No one is deprived of the right to practice medicine. All that is exacted is that every one who assumes to do so shall be possessed of the requisite knowledge and skill, and that this be evidenced by a certificate of the board designated by the state to ascertain his fitness. In other words, the real test, applicable to all alike, is that of qualification, dud this statute relates to the proof to be furnished in order io establish this as a basis for such certificate. The satisfactory character of a diploma from a reputable medical school, and the disclosures of an examination, as such proof, are not questioned; and statutes which, in addition thereto, treat the practice of the profession within the state for a number of years, or the fact of being in practice at the timo of their enactment, as sufficient evidence of qualification, have often been upheld, as invulnerable to the charge of discrimination. State v. Randolph, supra; State v. Dent, 25 W. Va. 1; Ex parte Spinney, 10 Nev. 323; Fox v. Territory, 2 Wash. T. 297, 6 Pac. Rep. 603; State v. Creditor, 44 Kan. 565 (24 Pac. Rep. 346, 21 Am. St. Rep. 306); Gosnell v. State, 52 Ark. 228 (12 S. W. Rep. 392); State v. State Medical Examining Board, 32 Minn. 324 (20 N. W. Rep. 238) ; State v. Vandersluis, 42 Minn. 129 (43 N. W. Rep. 789, 6 L R. A. 119); State v. Green, 112 Ind. 462 (14 N. E. Rep. 352; People v. Phippin, 70 Mich. 6 (37 N. W. Rep. 888).
But section 2579 not only requires practice of medicino in the state for five consecutive years, as prima facie evidence of. qualification, but stipulates that three of these shall .have been in one locality; and it is asserted that thereby ■physicians of five years’ residence in the state are divided into two classes — those who have practiced three of the five consecutive years in one place, and those who have not. This may be conceded, as, for the purpose of efficient legislation, it is often necessary to divide the subjects upon which *469it operates into classes. Such division may not be based on differences which merely serve to definitely separate, biit must rest on those of the “situation and circumstances of the subjects placed in the different classes as suggest the necessity or propriety of different legislation with respect to them.” If the distinction upon which the classification is grounded is not arbitrary, but reasonable and apparent, relating somewhat to the subject of the enactment, it will justify the application of different rules to the subjects thus separated, and legislation founded thereon is not subject to condemnation as class legislation. State v. Garbroski. 111 Iowa, 496. Thestatute recognizes that actual experience in the practice of medicine tends to render the physician capable. Success therein denotes the possession of learning and skill. . Continuing in the profession several years in a particular locality indicates a degree of merit not likely to be found in a person moving from place to place. Indeed, it is a matter of general observation that the itinerant doctor, roving about, without remaining in one locality longer than a few days or weeks, is usually wanting in honesty, and too frequently but a charlatan or quack. Besides, such a professional residence affords the opportunity of becoming known by neighbors, and, if lacking in capacity or character, obstacles may be interposed to the issuance of a certificate; for it must not be overlooked that, notwithstanding continuous practice in one place, a certificate may be denied, owing to incompetency or immorality. State v. Mosher, 78 Iowa, 321. In practical operation, the law admits those to practice who. have followed the profession at one place long enough ta acquire knowledge through experience in the profession, and to become known, unless want of capacity or good character-affirmatively appears. Others must be examined or present, diplomas. It makes a distinction recognized in all the affairs of life. Will any one contend for a moment that,, everything else being equal, the permanent resident of a locality is not likely to be superior in capacity and morals to him who has no fixed professional abiding place ? The oíd *470adage, “A rolling stone gathers no moss,” is quite as applicable to the acquirement of learning, skill, and the elements that make up good character as to the accumulation of worldly possessions. That there may be and are exceptions is readily conceded, but the legislature was not bound to adopt an absolutely infallible test. If, within the ordinary experience of men, and as a matter of common observation, physicians of learning, skill, and character are generally permanently located, and seldom change the places where their profession is followed, as appears to be true, we can discover no tenable reason why this circumstance might not be treated by the legislature as evidence of qualification un■der the statute. For the law does not purport to grant privileges or immunities to any physician or class of physicians. It;, simply establishes a rule of evidence by which qualification to practice medicine and surgery shall be ascertained. What should be such evidence, if appropriate for that purpose, and bearing somewhat on the matter of fitness, was peculiarly within the discretion of the lawmakers. ■ We think the distinction neither arbitrary nor unreasonable, but in harmony with common knowledge of differences which ordinarily exist between persons following the medical profession who have a permanent locus in quo, and those who ■do not. We are not unmindful of a decision to the contrary, construing a somewhat similar statute, by the supreme court of New Hampshire. State v. Pennoyer, 65 N. H. 113 (18 Atl. Rep. 879, 5 L. R. A. 709). See, also, State v. Hinman, 65 N. H. 103 (18 Atl. Rep. 194, 23 Am. St. Rep. 22). But that court appears to have grounded its conclusion on the erroneous assumption that permanency in the practice in a locality furnishes no evidence of qualification. This, as we have undertaken to demonstrate, is not warranted.
Note — Briií >i counsel for th<* defendant used in the district court was printed by attorney-general Ju connection with his argument.
As the statute is not in contravention of the provision of the constitution prohibiting unjust discrimination, the demurrer to the indictment should have been overruled.— Reversed.