CREATE TABLE [dbo].[patient_medication_link] (
    [medication_link_key] INT IDENTITY (1, 1) NOT NULL,
    [pt_key]              INT NULL,
    [medication_key]      INT NULL,
    CONSTRAINT [PK_patient_medication_link] PRIMARY KEY CLUSTERED ([medication_link_key] ASC),
    CONSTRAINT [patient_medication_link_medication_FK] FOREIGN KEY ([medication_key]) REFERENCES [dbo].[patient_medication] ([medication_key]),
    CONSTRAINT [patient_medication_link_patient_FK] FOREIGN KEY ([pt_key]) REFERENCES [dbo].[patient] ([pt_key])
);

