I think you currently need to show you have private medical insurance, covering everything including repatriation, when you apply for a residency visa such as D7.
When your D7 visa is approved, you can move to Portugal and will get your portuguese residency card from the immigration services. This can take several months to be processed.
With your residency card, you are entitled to use the public healthcare service for free, and you are not required to renew your private health insurance if you don't want to.
Now the bad news...
There is a very SERIOUS shortage of medical staff at all levels in the SNS (public heath service) and you might not be able to get the care you need, when you need it.
Depending where you live, it can take several attempts just to make an appointment for a GP and 2 to 3 months wait for that apppointment.
To see a specialist you must go through the GP appointment first, and then wait (sometimes several months) to be called for the specialist appointment that the GP arranged for you.
If you have a serious illness it can take more than 6 months before you get a diagnosis and start treatment. Non-life threatening conditions, can take more then 1 year wait and are often postponed several times.
Currently cancer can take 4 to 5 months wait from diagnosis to surgery & treatment. Knee ops and catarat ops can take years... with several postponements.
Private healthcare gives you more fexibility and choice for conditions that can be booked in advance, but it is no good for emergencies.
Private healhcare is a business, main aim is profit-making, they don't have emergency departments with all the set-up in place and emergency teams ready to receive patients at short notice.
If you have an emergency you'll always be taken to the public service hospitals even if you have private cover, and a few times last summer patients have died while waiting to be seen, because there were not enough doctors to provide emergency life-saving care.
As to the cost of medication, there's a list of medications covered by the government which will be prescribed free of charge, but many medications are not covered and the patient or private insurance will have to pay the full cost.
Portugal is currently not a good place to live if you depend on healthcare. It's an ongoing problem not likely to be solved any time soon, because portuguese doctors are leaving for better paid jobs abroad. There is a shortage all over Europe.