The best way to answer this would depend on your reason for making the list, which I do not know. Also, I am not sure how to create an international list, as specialties within a country are defined by the training path and board exams, which do differ somewhat between countries. But you do have some misunderstandings on some of the fundamentals of this, and I can at least advise you on those. I can speak from the perspective of the US system.
The general order of training goes:
- Undergraduate (Bachelor degree)
- Medical School (MD or DO)
- Residency (in a specialty) training by practicing in your field under supervision of "attending physicians," after which you complete a boards exam and are "board certified" in that specialty.
- After this step you can either apply to enter a FELLOWSHIP or you can go practice in your field independently.
- Optional next step: Fellowship (in a subspecialty) where you similarly practice the subspecialty under attendings, and take a boards exam etc.
Subspecialties such as Cardiology, Hematology-Oncology, Rheumatology, etc cannot be selected straight out of medical school. You must first complete a residency in Internal Medicine; similarly for Pediatric Cardiology, a residency in Pediatrics.
This list breaks down the specialties from which you can enter specific subspecialties:
They are too long to copy here, but definitely check it out - it should help a lot to see how it breaks down.
The specialties referred to as "generalists" are NOT the same as GP (General Practice)
Internal Medicine, Family Medicine, and Pediatrics are specialties. Those residencies are 3 or 4 years long and have a boards exam at the end. An IM, FM, or Peds boarded physician is sometimes referred to as a "generalist." A generalist is NOT the same as a GP (General Practice) physician.
The term "generalist" comes from the fact that these specialties practice broadly, rather than focused on a specific narrow field. FM, IM, and Peds all do learn quite a bit of cardiology, rheumatology, heme-onc, etc and can practice almost everything non-surgical at least at a basic level. But they will refer to a Cardiologist (a subspecialist who spent 3 additional years in a fellowship studying just cardiology AFTER doing 3 years of Internal Medicine) for extremely complex cases, procedures (stents, pacemakers, ablations), and other things not within their scope of practice.
Family Medicine is unique in that it includes adult medicine, pediatric medicine, and basic obstetrics (minus the extensive surgical training that the OB/GYN specialists obtain). From FM you can go to subspecialties like sports med, geriatrics, palliative care, adolescent med... but not cardiology or rheumatology. FM might be considered the broadest specialty of all.
General Practice is a special case, and is not a residency (at least not in the USA).
Internationally, a General Practice physician (GP) functions similarly to a Primary Care Provider in the USA (a PCP, which is generally either IM FM or Peds in the USA), providing "generalist" type care of most concerns and chronic disease management, referring to specialists for complex cases etc.
In many countries, it's its own residency. In some, it's what you are after completing the one or two year "Internship" type training post-medical-school. Perhaps someone outside the USA can help beef this section up :)
Within the USA, a GP is usually a physician who did a single year of residency (or more, but did not sit for their specialty boards) and applied for a license. They are not boarded in any particular specialty. Many of these have received extensive on-the-job training and are hired to practice in primary care or even in other specialty offices - but aren't boarded.
When considering medical management of children, they are not just smaller-sized adults.
That is why all subspecialties branch off of adult medicine (IM) or child medicine (Pediatrics). Slightly different, pediatric surgery (and surgical subspecialties) is usually a subspecialty done AFTER a surgical residency like General Surgery or Orthopedic Surgery.
There are sometimes multiple ways to arrive at a subspecialty.
For example, a Pediatric Emergency physician can either go from Emergency Medicine to Peds EM fellowship, or Pediatrics to and EM fellowship. A Geriatrician could have come from either Internal Medicine or Family Medicine.
If a doctor is boarded in a subspecialty, then almost certianly she/he is also boarded in a specialty.
Since a Cardiologist has to go through Internal Medicine to get to Cardiology, the vast majority of them sit for the boards exams for Internal Medicine.