The doctors prescribe different medications.
The patient goes to two different pharmacists to pick them up.
In a victory for privacy, the patient dies from a fatal interaction of the prescribed medications.
In the US there is a strong medical privacy law. And it includes an exception for providers of medical care to share treatment information with each other, for precisely this reason. Even so, every single time you see a doctor in the US, you are handed a notice saying they'll share information for permitted purposes (the triad of "TPO" -- Treatment, Payment, and Operations), and given a form to sign saying you have been made aware of this.