DELETE FROM [dbo].[MEDICATIONS] WHERE (([Medication_id] = @Original_Medication_id) AND ((@IsNull_MedicationName = 1 AND [MedicationName] IS NULL) OR ([MedicationName] = @Original_MedicationName)) AND ((@IsNull_IntakeMethod = 1 AND [IntakeMethod] IS NULL) OR ([IntakeMethod] = @Original_IntakeMethod)) AND ((@IsNull_Frequency = 1 AND [Frequency] IS NULL) OR ([Frequency] = @Original_Frequency)) AND ((@IsNull_Dosage = 1 AND [Dosage] IS NULL) OR ([Dosage] = @Original_Dosage)) AND ((@IsNull_Purpose = 1 AND [Purpose] IS NULL) OR ([Purpose] = @Original_Purpose)) AND ((@IsNull_RxNum = 1 AND [RxNum] IS NULL) OR ([RxNum] = @Original_RxNum)))
INSERT INTO [dbo].[MEDICATIONS] ([Medication_id], [MedicationName], [IntakeMethod], [Frequency], [Dosage], [Purpose], [RxNum]) VALUES (@Medication_id, @MedicationName, @IntakeMethod, @Frequency, @Dosage, @Purpose, @RxNum);
SELECT Medication_id, MedicationName, IntakeMethod, Frequency, Dosage, Purpose, RxNum FROM MEDICATIONS WHERE (Medication_id = @Medication_id)
SELECT Medication_id, MedicationName, IntakeMethod, Frequency, Dosage, Purpose, RxNum FROM dbo.MEDICATIONS
UPDATE [dbo].[MEDICATIONS] SET [Medication_id] = @Medication_id, [MedicationName] = @MedicationName, [IntakeMethod] = @IntakeMethod, [Frequency] = @Frequency, [Dosage] = @Dosage, [Purpose] = @Purpose, [RxNum] = @RxNum WHERE (([Medication_id] = @Original_Medication_id) AND ((@IsNull_MedicationName = 1 AND [MedicationName] IS NULL) OR ([MedicationName] = @Original_MedicationName)) AND ((@IsNull_IntakeMethod = 1 AND [IntakeMethod] IS NULL) OR ([IntakeMethod] = @Original_IntakeMethod)) AND ((@IsNull_Frequency = 1 AND [Frequency] IS NULL) OR ([Frequency] = @Original_Frequency)) AND ((@IsNull_Dosage = 1 AND [Dosage] IS NULL) OR ([Dosage] = @Original_Dosage)) AND ((@IsNull_Purpose = 1 AND [Purpose] IS NULL) OR ([Purpose] = @Original_Purpose)) AND ((@IsNull_RxNum = 1 AND [RxNum] IS NULL) OR ([RxNum] = @Original_RxNum)));
SELECT Medication_id, MedicationName, IntakeMethod, Frequency, Dosage, Purpose, RxNum FROM MEDICATIONS WHERE (Medication_id = @Medication_id)
DELETE FROM [dbo].[PATIENT] WHERE (([Patient_id] = @Original_Patient_id) AND ((@IsNull_FirstName = 1 AND [FirstName] IS NULL) OR ([FirstName] = @Original_FirstName)) AND ((@IsNull_LastName = 1 AND [LastName] IS NULL) OR ([LastName] = @Original_LastName)) AND ((@IsNull_MiddleIntials = 1 AND [MiddleIntials] IS NULL) OR ([MiddleIntials] = @Original_MiddleIntials)) AND ((@IsNull_Zip = 1 AND [Zip] IS NULL) OR ([Zip] = @Original_Zip)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_UsState = 1 AND [UsState] IS NULL) OR ([UsState] = @Original_UsState)) AND ((@IsNull_lbs = 1 AND [lbs] IS NULL) OR ([lbs] = @Original_lbs)) AND ((@IsNull_Height_feet = 1 AND [Height_feet] IS NULL) OR ([Height_feet] = @Original_Height_feet)) AND ((@IsNull_Height_inches = 1 AND [Height_inches] IS NULL) OR ([Height_inches] = @Original_Height_inches)) AND ((@IsNull_Ailment = 1 AND [Ailment] IS NULL) OR ([Ailment] = @Original_Ailment)) AND ((@IsNull_DOB = 1 AND [DOB] IS NULL) OR ([DOB] = @Original_DOB)) AND ((@IsNull_PhoneNumber = 1 AND [PhoneNumber] IS NULL) OR ([PhoneNumber] = @Original_PhoneNumber)) AND ((@IsNull_Gender = 1 AND [Gender] IS NULL) OR ([Gender] = @Original_Gender)))
INSERT INTO [dbo].[PATIENT] ([Patient_id], [FirstName], [LastName], [MiddleIntials], [Zip], [City], [UsState], [lbs], [Height_feet], [Height_inches], [Ailment], [DOB], [PhoneNumber], [Gender]) VALUES (@Patient_id, @FirstName, @LastName, @MiddleIntials, @Zip, @City, @UsState, @lbs, @Height_feet, @Height_inches, @Ailment, @DOB, @PhoneNumber, @Gender);
SELECT Patient_id, FirstName, LastName, MiddleIntials, Zip, City, UsState, lbs, Height_feet, Height_inches, Ailment, DOB, PhoneNumber, Gender FROM PATIENT WHERE (Patient_id = @Patient_id)
SELECT Patient_id, FirstName, LastName, MiddleIntials, Zip, City, UsState, lbs, Height_feet, Height_inches, Ailment, DOB, PhoneNumber, Gender FROM dbo.PATIENT
UPDATE [dbo].[PATIENT] SET [Patient_id] = @Patient_id, [FirstName] = @FirstName, [LastName] = @LastName, [MiddleIntials] = @MiddleIntials, [Zip] = @Zip, [City] = @City, [UsState] = @UsState, [lbs] = @lbs, [Height_feet] = @Height_feet, [Height_inches] = @Height_inches, [Ailment] = @Ailment, [DOB] = @DOB, [PhoneNumber] = @PhoneNumber, [Gender] = @Gender WHERE (([Patient_id] = @Original_Patient_id) AND ((@IsNull_FirstName = 1 AND [FirstName] IS NULL) OR ([FirstName] = @Original_FirstName)) AND ((@IsNull_LastName = 1 AND [LastName] IS NULL) OR ([LastName] = @Original_LastName)) AND ((@IsNull_MiddleIntials = 1 AND [MiddleIntials] IS NULL) OR ([MiddleIntials] = @Original_MiddleIntials)) AND ((@IsNull_Zip = 1 AND [Zip] IS NULL) OR ([Zip] = @Original_Zip)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_UsState = 1 AND [UsState] IS NULL) OR ([UsState] = @Original_UsState)) AND ((@IsNull_lbs = 1 AND [lbs] IS NULL) OR ([lbs] = @Original_lbs)) AND ((@IsNull_Height_feet = 1 AND [Height_feet] IS NULL) OR ([Height_feet] = @Original_Height_feet)) AND ((@IsNull_Height_inches = 1 AND [Height_inches] IS NULL) OR ([Height_inches] = @Original_Height_inches)) AND ((@IsNull_Ailment = 1 AND [Ailment] IS NULL) OR ([Ailment] = @Original_Ailment)) AND ((@IsNull_DOB = 1 AND [DOB] IS NULL) OR ([DOB] = @Original_DOB)) AND ((@IsNull_PhoneNumber = 1 AND [PhoneNumber] IS NULL) OR ([PhoneNumber] = @Original_PhoneNumber)) AND ((@IsNull_Gender = 1 AND [Gender] IS NULL) OR ([Gender] = @Original_Gender)));
SELECT Patient_id, FirstName, LastName, MiddleIntials, Zip, City, UsState, lbs, Height_feet, Height_inches, Ailment, DOB, PhoneNumber, Gender FROM PATIENT WHERE (Patient_id = @Patient_id)
DELETE FROM [dbo].[PHYSICIAN] WHERE (([Physician_id] = @Original_Physician_id) AND ((@IsNull_FirstName = 1 AND [FirstName] IS NULL) OR ([FirstName] = @Original_FirstName)) AND ((@IsNull_LastName = 1 AND [LastName] IS NULL) OR ([LastName] = @Original_LastName)) AND ((@IsNull_MiddleIntials = 1 AND [MiddleIntials] IS NULL) OR ([MiddleIntials] = @Original_MiddleIntials)) AND ((@IsNull_Zip = 1 AND [Zip] IS NULL) OR ([Zip] = @Original_Zip)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_UsState = 1 AND [UsState] IS NULL) OR ([UsState] = @Original_UsState)) AND ((@IsNull_DOB = 1 AND [DOB] IS NULL) OR ([DOB] = @Original_DOB)) AND ((@IsNull_PhoneNumber = 1 AND [PhoneNumber] IS NULL) OR ([PhoneNumber] = @Original_PhoneNumber)) AND ((@IsNull_Gender = 1 AND [Gender] IS NULL) OR ([Gender] = @Original_Gender)) AND ((@IsNull_Specialty = 1 AND [Specialty] IS NULL) OR ([Specialty] = @Original_Specialty)))
INSERT INTO [dbo].[PHYSICIAN] ([Physician_id], [FirstName], [LastName], [MiddleIntials], [Zip], [City], [UsState], [DOB], [PhoneNumber], [Gender], [Specialty]) VALUES (@Physician_id, @FirstName, @LastName, @MiddleIntials, @Zip, @City, @UsState, @DOB, @PhoneNumber, @Gender, @Specialty);
SELECT Physician_id, FirstName, LastName, MiddleIntials, Zip, City, UsState, DOB, PhoneNumber, Gender, Specialty FROM PHYSICIAN WHERE (Physician_id = @Physician_id)
SELECT Physician_id, FirstName, LastName, MiddleIntials, Zip, City, UsState, DOB, PhoneNumber, Gender, Specialty FROM dbo.PHYSICIAN
UPDATE [dbo].[PHYSICIAN] SET [Physician_id] = @Physician_id, [FirstName] = @FirstName, [LastName] = @LastName, [MiddleIntials] = @MiddleIntials, [Zip] = @Zip, [City] = @City, [UsState] = @UsState, [DOB] = @DOB, [PhoneNumber] = @PhoneNumber, [Gender] = @Gender, [Specialty] = @Specialty WHERE (([Physician_id] = @Original_Physician_id) AND ((@IsNull_FirstName = 1 AND [FirstName] IS NULL) OR ([FirstName] = @Original_FirstName)) AND ((@IsNull_LastName = 1 AND [LastName] IS NULL) OR ([LastName] = @Original_LastName)) AND ((@IsNull_MiddleIntials = 1 AND [MiddleIntials] IS NULL) OR ([MiddleIntials] = @Original_MiddleIntials)) AND ((@IsNull_Zip = 1 AND [Zip] IS NULL) OR ([Zip] = @Original_Zip)) AND ((@IsNull_City = 1 AND [City] IS NULL) OR ([City] = @Original_City)) AND ((@IsNull_UsState = 1 AND [UsState] IS NULL) OR ([UsState] = @Original_UsState)) AND ((@IsNull_DOB = 1 AND [DOB] IS NULL) OR ([DOB] = @Original_DOB)) AND ((@IsNull_PhoneNumber = 1 AND [PhoneNumber] IS NULL) OR ([PhoneNumber] = @Original_PhoneNumber)) AND ((@IsNull_Gender = 1 AND [Gender] IS NULL) OR ([Gender] = @Original_Gender)) AND ((@IsNull_Specialty = 1 AND [Specialty] IS NULL) OR ([Specialty] = @Original_Specialty)));
SELECT Physician_id, FirstName, LastName, MiddleIntials, Zip, City, UsState, DOB, PhoneNumber, Gender, Specialty FROM PHYSICIAN WHERE (Physician_id = @Physician_id)
DELETE FROM [dbo].[REFILLS] WHERE (([Refill_id] = @Original_Refill_id) AND ((@IsNull_Numrefill = 1 AND [Numrefill] IS NULL) OR ([Numrefill] = @Original_Numrefill)) AND ((@IsNull_StartDate = 1 AND [StartDate] IS NULL) OR ([StartDate] = @Original_StartDate)) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ((@IsNull_NotesAndComments = 1 AND [NotesAndComments] IS NULL) OR ([NotesAndComments] = @Original_NotesAndComments)))
INSERT INTO [dbo].[REFILLS] ([Refill_id], [Numrefill], [StartDate], [EndDate], [NotesAndComments]) VALUES (@Refill_id, @Numrefill, @StartDate, @EndDate, @NotesAndComments);
SELECT Refill_id, Numrefill, StartDate, EndDate, NotesAndComments FROM REFILLS WHERE (Refill_id = @Refill_id)
SELECT Refill_id, Numrefill, StartDate, EndDate, NotesAndComments FROM dbo.REFILLS
UPDATE [dbo].[REFILLS] SET [Refill_id] = @Refill_id, [Numrefill] = @Numrefill, [StartDate] = @StartDate, [EndDate] = @EndDate, [NotesAndComments] = @NotesAndComments WHERE (([Refill_id] = @Original_Refill_id) AND ((@IsNull_Numrefill = 1 AND [Numrefill] IS NULL) OR ([Numrefill] = @Original_Numrefill)) AND ((@IsNull_StartDate = 1 AND [StartDate] IS NULL) OR ([StartDate] = @Original_StartDate)) AND ((@IsNull_EndDate = 1 AND [EndDate] IS NULL) OR ([EndDate] = @Original_EndDate)) AND ((@IsNull_NotesAndComments = 1 AND [NotesAndComments] IS NULL) OR ([NotesAndComments] = @Original_NotesAndComments)));
SELECT Refill_id, Numrefill, StartDate, EndDate, NotesAndComments FROM REFILLS WHERE (Refill_id = @Refill_id)