Compare the metalworker and the swordsmith. The metalworker's profession is defined by a particular technique for achieving human ends: the production and modification of items made of metal. The swordsmith's profession, on the other hand, is not defined by any particular technique. It is, instead, defined by an end: the existence of a sword. The two sets of skills may overlap: both a swordsmith and an metalworker can make a sword of metal, and in so doing remain within their professional competency. But a swordsmith can remain within her professional discipline in producing a sword of horn, wood and flint (say, in an emergency when metals are unavailable), while the metalworker who made such a sword would not be working within her profession. On the other hand, the metalworker remains within her professional competency when she makes a metal spoon, while the swordsmith is not working as a swordsmith when she makes a spoon—even though she may be as qualified to produce a spoon as any metalworker, and more so than some.
We can in general distinguish means-defined professions and end-defined ones. Examples of means-defined ones: software engineer, electrical engineer, chemical engineer, metalworker, woodworker, machinist, applied mathematician, lawyer. Examples of end-defined ones: civil engineer, aviation engineer, swordsmith, bowyer, cabinet maker, physicist, pure mathematician, biologist, legislator. There will also be cases of professions defined both by and end means. Some of these result from specializations within a means-defined or an end-defined profession—and sometimes it will be unclear which way is the better way to look at it. Is a biomathematician an applied mathematician (means-defined) who uses mathematical methods for the sake of gaining biological knowledge, or is a biomathematician a biologist (end-defined) who uses mathematical methods to pursue the end distinctive of her biological profession (namely, biological knowledge)?
It may be that in all cases of end-defined professions there are some constraints on which means count as part of the distinctive activity of the profession. Thus, it may be argued not be a part of the civil engineer's profession to pray that the bridge not collapse, even though doing so promotes the end that defines her profession. However, it is not clear that this is so. It may be a prejudice to say that the civil engineer does not pray qua engineer.
Nonetheless, despite borderline cases, a basic division into professions primarily defined by a means or set of means, and those defined by an end or set of ends, seems helpful.
Does any of this matter? I think it can. For instance, consider this question: Is it the job of the physician, qua physician, to execute criminals? Assume that the case is one of the rare cases where capital punishment is morally permissible. As has been noted at least since the time of Plato, the physician's professional knowledge makes her the most effective person at both preserving life and taking away life. Moreover, her skills may particularly enable the taking away of life to be reliably painless. If the physicians's profession is primarily defined by means or techniques, then to execute painlessly falls under her profession just as much as to heal. If, on the other hand, her profession is defined in terms of ends, presumably the relevant end is something like the good functioning of the body, and this goal is not promoted by killing. And euthanasia is also not something that falls to the role of a physician.
I think our concept of a physician is a mix. When we talk of the crime of practicing medicine without a license, we are thinking of medicine as in part defined by a particular set of techniques. One does not count as practicing medicine without a license if one suggests to someone that she refrain from eating too many cheeseburgers or if one prays for her health. But only in part. If someone who is not a medical professional intentionally stabs someone else to death with a surgical knife, she would not, I suspect, be charged with practicing medicine without a license in addition to murder, no matter if she had pored anatomy books to figure out how to do the deed.
Still, I think, the primary focus in the medical profession is on the end. Consider that the physician remains within her medical role if the means she recommends to promote end of health involve pharmaceuticals, surgery, physical exercises, psychological exercises, the taking of a placebo, etc. Almost anything that in a morally acceptable way promotes health—with the possible exception of the supernatural—can legitimately fall within the scope of her medical recommendations. She might even diagnose that the patient's headaches are due to financial worries and recommend that the patient come up with a good budget. She would be going beyond her medical competence, I suppose, if she recommended a particular set of safe investments, but that may only be because recommending investments is not a skill that physicians typically have. (A particular practitioner of profession will not have all the skills that can fall under the professional role—the bowyer who cannot work in fiberglass can still be a competent bowyer.)
Moreover, most of the subdivisions within medicine, with the most obvious exception being surgeon, are end-based: the neurologist, the psychiatrist, the gastroenterologist and the pediatrician are each defined by which instances of the goal of health it is their special task to promote.
The pharmacist, on the other hand, is equally defined by means and by end. She does not act within her role if she prepares medication for an execution. It is, after all, her job to take solicitude for the health of the patient, ensure that she is not allergic to the drugs, etc. But she also does not act within her role if she performs surgery.