Yes in general
Generally, almost all western jurisdictions (be they civil law or common law) have some way to get medical records into evidence, be that via subpoenaing, or by discovery requests or court orders.
In most cases, the party that brings the suit is also the patient or their legal representative, and they give (or imply) consent to the use of the records. And in cases where the defendant's medical records are required, usually, the defense wants those in too to prove some condition. And then there are cases where the state or their representatives brings the charge. They usually can bring a warrant or court order to obtain the documents.
Then there are Medical records that had been made specifically on the behest of the state. Here, the warrant is usually filed to obtain the samples or access to the body to be investigated, the record itself forms the basis for the investigators to proceed - and is not under client-doctor confidentially in the first place. It had been made specifically for the state and it is a state-owned medical record, be they made on request of the executive power (police) with a warrant signed by a judge or on behalf of the judicative after a court order to evaluate capacity (see below).
However, medical records can generally only be obtained if the records are relevant to the case at hand and only to the degree necessary: You can't request the medical records about a person's fertility status in a case that discusses damages for his broken arm. As a result, the medical record available in court might be only an extract from the original, with irrelevant passages sealed or redacted.
Unlike many people think, it's quite common to get some medical records into court in some way or another:
As the basis of injury cases
If you have a case of physical injury, the injuries themselves need to be proven in court. This is done generally by getting the medical records - thus they can be subpoenaed by a party, usually the injured party here. Then a medical expert can discuss them, be they a court-appointed one or paid by either of the parties.
In this category also fall mandatory reports of certain types of wounds or situations. As such, the treating doctor has to provide a medical report with enumerated types of injuries, like bullet wounds or where child abuse might be the reason.
Very necessarily in malpractice cases
Malpractice is pretty much injury on steroids: the injuring party made the records and would never want to give them up to the one suing them - if they could.
Alice shall remove Appendix. It goes haywire and the day after Charly needs to cut Bob open again.
Now Bob sues Alice for malpractice. Bob needs medical records from both Alice, the doctor who botched it, and Charly, who was fixing Alice's error. Generally, both records are subpoena-able to the degree relevant and necessary, and indeed the opposing medical opinions on the operation and records form the very basis of the case for either side.
Without the ability to subpoena the - in this case unmodified - records from the injuring doctor, proving - or defending - a case of malpractice would be impossible: the very truth of the allegation should be in the medical records.
It's routine in cases around death
What is the very last medical record a person can ever get? An autopsy record! That's a very sensitive medical record, but they routinely are used in homicide cases. Oftentimes, the investigators also subpoena the medical records of the victim from their doctors to corroborate the autopsy record, while the defense might subpoena them to try and disprove it.
Even in civil cases, like the OJ-Simpson civil damages case, autopsy and medical records from an accompanying criminal case can and will be "pulled" (copied over) from the other trial's docket.
Regularly in child protection cases
Whenever child protection is on the line, be them protective orders or who a child will live with after the child protection service (whatever its name is) is in on a case, then medical records are often required to bolster one side. Those records could be medical records from quite many doctors, be they physicals or psychological evaluations...
Sometimes the medical records required here are only created due to court-ordered medical or psychological evaluation by a doctor.
Whenever incompetence defense is called
When the lawyer claims temporary incompetence or insanity, courts generally order a psychological evaluation. These medical records are evidence, but usually don't need to be subpoenaed: they have a waiver form to be disclosed to the court almost built-in.
Are they available to the public?
Medical records are part of truth-finding, but they are also quite sensitive. As a result, most medical records can not be gotten from the court and enter the dockets under seal. Another option is, that they enter the docket partially or even mostly redacted, with passages blackened.