DELETE FROM [dbo].[Patients] WHERE (([patientID] = @Original_patientID) AND ((@IsNull_gender = 1 AND [gender] IS NULL) OR ([gender] = @Original_gender)) AND ((@IsNull_fName = 1 AND [fName] IS NULL) OR ([fName] = @Original_fName)) AND ((@IsNull_midInit = 1 AND [midInit] IS NULL) OR ([midInit] = @Original_midInit)) AND ((@IsNull_lName = 1 AND [lName] IS NULL) OR ([lName] = @Original_lName)) AND ((@IsNull_homePhone = 1 AND [homePhone] IS NULL) OR ([homePhone] = @Original_homePhone)) AND ((@IsNull_workPhone = 1 AND [workPhone] IS NULL) OR ([workPhone] = @Original_workPhone)) AND ((@IsNull_otherPhone = 1 AND [otherPhone] IS NULL) OR ([otherPhone] = @Original_otherPhone)) AND ((@IsNull_homeEmail = 1 AND [homeEmail] IS NULL) OR ([homeEmail] = @Original_homeEmail)) AND ((@IsNull_workEmail = 1 AND [workEmail] IS NULL) OR ([workEmail] = @Original_workEmail)) AND ((@IsNull_otherEmail = 1 AND [otherEmail] IS NULL) OR ([otherEmail] = @Original_otherEmail)) AND ((@IsNull_street1 = 1 AND [street1] IS NULL) OR ([street1] = @Original_street1)) AND ((@IsNull_street2 = 1 AND [street2] IS NULL) OR ([street2] = @Original_street2)) AND ((@IsNull_city = 1 AND [city] IS NULL) OR ([city] = @Original_city)) AND ((@IsNull_locale = 1 AND [locale] IS NULL) OR ([locale] = @Original_locale)) AND ((@IsNull_zipCode = 1 AND [zipCode] IS NULL) OR ([zipCode] = @Original_zipCode)) AND ((@IsNull_Balance = 1 AND [Balance] IS NULL) OR ([Balance] = @Original_Balance)))
INSERT INTO [dbo].[Patients] ([patientID], [gender], [fName], [midInit], [lName], [homePhone], [workPhone], [otherPhone], [homeEmail], [workEmail], [otherEmail], [street1], [street2], [city], [locale], [zipCode], [Balance]) VALUES (@patientID, @gender, @fName, @midInit, @lName, @homePhone, @workPhone, @otherPhone, @homeEmail, @workEmail, @otherEmail, @street1, @street2, @city, @locale, @zipCode, @Balance);
SELECT patientID, gender, fName, midInit, lName, homePhone, workPhone, otherPhone, homeEmail, workEmail, otherEmail, street1, street2, city, locale, zipCode, Balance FROM Patients WHERE (patientID = @patientID)
SELECT patientID, gender, fName, midInit, lName, homePhone, workPhone, otherPhone, homeEmail, workEmail, otherEmail, street1, street2, city, locale, zipCode, Balance FROM dbo.Patients
UPDATE [dbo].[Patients] SET [patientID] = @patientID, [gender] = @gender, [fName] = @fName, [midInit] = @midInit, [lName] = @lName, [homePhone] = @homePhone, [workPhone] = @workPhone, [otherPhone] = @otherPhone, [homeEmail] = @homeEmail, [workEmail] = @workEmail, [otherEmail] = @otherEmail, [street1] = @street1, [street2] = @street2, [city] = @city, [locale] = @locale, [zipCode] = @zipCode, [Balance] = @Balance WHERE (([patientID] = @Original_patientID) AND ((@IsNull_gender = 1 AND [gender] IS NULL) OR ([gender] = @Original_gender)) AND ((@IsNull_fName = 1 AND [fName] IS NULL) OR ([fName] = @Original_fName)) AND ((@IsNull_midInit = 1 AND [midInit] IS NULL) OR ([midInit] = @Original_midInit)) AND ((@IsNull_lName = 1 AND [lName] IS NULL) OR ([lName] = @Original_lName)) AND ((@IsNull_homePhone = 1 AND [homePhone] IS NULL) OR ([homePhone] = @Original_homePhone)) AND ((@IsNull_workPhone = 1 AND [workPhone] IS NULL) OR ([workPhone] = @Original_workPhone)) AND ((@IsNull_otherPhone = 1 AND [otherPhone] IS NULL) OR ([otherPhone] = @Original_otherPhone)) AND ((@IsNull_homeEmail = 1 AND [homeEmail] IS NULL) OR ([homeEmail] = @Original_homeEmail)) AND ((@IsNull_workEmail = 1 AND [workEmail] IS NULL) OR ([workEmail] = @Original_workEmail)) AND ((@IsNull_otherEmail = 1 AND [otherEmail] IS NULL) OR ([otherEmail] = @Original_otherEmail)) AND ((@IsNull_street1 = 1 AND [street1] IS NULL) OR ([street1] = @Original_street1)) AND ((@IsNull_street2 = 1 AND [street2] IS NULL) OR ([street2] = @Original_street2)) AND ((@IsNull_city = 1 AND [city] IS NULL) OR ([city] = @Original_city)) AND ((@IsNull_locale = 1 AND [locale] IS NULL) OR ([locale] = @Original_locale)) AND ((@IsNull_zipCode = 1 AND [zipCode] IS NULL) OR ([zipCode] = @Original_zipCode)) AND ((@IsNull_Balance = 1 AND [Balance] IS NULL) OR ([Balance] = @Original_Balance)));
SELECT patientID, gender, fName, midInit, lName, homePhone, workPhone, otherPhone, homeEmail, workEmail, otherEmail, street1, street2, city, locale, zipCode, Balance FROM Patients WHERE (patientID = @patientID)
DELETE FROM [dbo].[payments] WHERE (([paymentID] = @Original_paymentID) AND ((@IsNull_payAmount = 1 AND [payAmount] IS NULL) OR ([payAmount] = @Original_payAmount)) AND ((@IsNull_paymentMethod = 1 AND [paymentMethod] IS NULL) OR ([paymentMethod] = @Original_paymentMethod)) AND ((@IsNull_patientID = 1 AND [patientID] IS NULL) OR ([patientID] = @Original_patientID)))
INSERT INTO [dbo].[payments] ([paymentID], [payAmount], [paymentMethod], [patientID]) VALUES (@paymentID, @payAmount, @paymentMethod, @patientID);
SELECT paymentID, payAmount, paymentMethod, patientID FROM payments WHERE (paymentID = @paymentID)
SELECT paymentID, payAmount, paymentMethod, patientID FROM dbo.payments
UPDATE [dbo].[payments] SET [paymentID] = @paymentID, [payAmount] = @payAmount, [paymentMethod] = @paymentMethod, [patientID] = @patientID WHERE (([paymentID] = @Original_paymentID) AND ((@IsNull_payAmount = 1 AND [payAmount] IS NULL) OR ([payAmount] = @Original_payAmount)) AND ((@IsNull_paymentMethod = 1 AND [paymentMethod] IS NULL) OR ([paymentMethod] = @Original_paymentMethod)) AND ((@IsNull_patientID = 1 AND [patientID] IS NULL) OR ([patientID] = @Original_patientID)));
SELECT paymentID, payAmount, paymentMethod, patientID FROM payments WHERE (paymentID = @paymentID)
DELETE FROM [dbo].[Physicians] WHERE (([phID] = @Original_phID) AND ((@IsNull_gender = 1 AND [gender] IS NULL) OR ([gender] = @Original_gender)) AND ((@IsNull_fName = 1 AND [fName] IS NULL) OR ([fName] = @Original_fName)) AND ((@IsNull_midInit = 1 AND [midInit] IS NULL) OR ([midInit] = @Original_midInit)) AND ((@IsNull_lName = 1 AND [lName] IS NULL) OR ([lName] = @Original_lName)) AND ((@IsNull_homePhone = 1 AND [homePhone] IS NULL) OR ([homePhone] = @Original_homePhone)) AND ((@IsNull_workPhone = 1 AND [workPhone] IS NULL) OR ([workPhone] = @Original_workPhone)) AND ((@IsNull_otherPhone = 1 AND [otherPhone] IS NULL) OR ([otherPhone] = @Original_otherPhone)) AND ((@IsNull_AOE1 = 1 AND [AOE1] IS NULL) OR ([AOE1] = @Original_AOE1)) AND ((@IsNull_AOE2 = 1 AND [AOE2] IS NULL) OR ([AOE2] = @Original_AOE2)) AND ((@IsNull_AOE3 = 1 AND [AOE3] IS NULL) OR ([AOE3] = @Original_AOE3)) AND ((@IsNull_AOE4 = 1 AND [AOE4] IS NULL) OR ([AOE4] = @Original_AOE4)) AND ((@IsNull_AOE5 = 1 AND [AOE5] IS NULL) OR ([AOE5] = @Original_AOE5)) AND ((@IsNull_AOE6 = 1 AND [AOE6] IS NULL) OR ([AOE6] = @Original_AOE6)) AND ((@IsNull_homeEmail = 1 AND [homeEmail] IS NULL) OR ([homeEmail] = @Original_homeEmail)) AND ((@IsNull_workEmail = 1 AND [workEmail] IS NULL) OR ([workEmail] = @Original_workEmail)) AND ((@IsNull_otherEmail = 1 AND [otherEmail] IS NULL) OR ([otherEmail] = @Original_otherEmail)) AND ((@IsNull_salary = 1 AND [salary] IS NULL) OR ([salary] = @Original_salary)) AND ((@IsNull_street1 = 1 AND [street1] IS NULL) OR ([street1] = @Original_street1)) AND ((@IsNull_street2 = 1 AND [street2] IS NULL) OR ([street2] = @Original_street2)) AND ((@IsNull_city = 1 AND [city] IS NULL) OR ([city] = @Original_city)) AND ((@IsNull_locale = 1 AND [locale] IS NULL) OR ([locale] = @Original_locale)) AND ((@IsNull_zipCode = 1 AND [zipCode] IS NULL) OR ([zipCode] = @Original_zipCode)))
INSERT INTO [dbo].[Physicians] ([phID], [gender], [fName], [midInit], [lName], [homePhone], [workPhone], [otherPhone], [AOE1], [AOE2], [AOE3], [AOE4], [AOE5], [AOE6], [homeEmail], [workEmail], [otherEmail], [salary], [street1], [street2], [city], [locale], [zipCode]) VALUES (@phID, @gender, @fName, @midInit, @lName, @homePhone, @workPhone, @otherPhone, @AOE1, @AOE2, @AOE3, @AOE4, @AOE5, @AOE6, @homeEmail, @workEmail, @otherEmail, @salary, @street1, @street2, @city, @locale, @zipCode);
SELECT phID, gender, fName, midInit, lName, homePhone, workPhone, otherPhone, AOE1, AOE2, AOE3, AOE4, AOE5, AOE6, homeEmail, workEmail, otherEmail, salary, street1, street2, city, locale, zipCode FROM Physicians WHERE (phID = @phID)
SELECT phID, gender, fName, midInit, lName, homePhone, workPhone, otherPhone, AOE1, AOE2, AOE3, AOE4, AOE5, AOE6, homeEmail, workEmail, otherEmail, salary, street1, street2, city, locale, zipCode FROM dbo.Physicians
UPDATE [dbo].[Physicians] SET [phID] = @phID, [gender] = @gender, [fName] = @fName, [midInit] = @midInit, [lName] = @lName, [homePhone] = @homePhone, [workPhone] = @workPhone, [otherPhone] = @otherPhone, [AOE1] = @AOE1, [AOE2] = @AOE2, [AOE3] = @AOE3, [AOE4] = @AOE4, [AOE5] = @AOE5, [AOE6] = @AOE6, [homeEmail] = @homeEmail, [workEmail] = @workEmail, [otherEmail] = @otherEmail, [salary] = @salary, [street1] = @street1, [street2] = @street2, [city] = @city, [locale] = @locale, [zipCode] = @zipCode WHERE (([phID] = @Original_phID) AND ((@IsNull_gender = 1 AND [gender] IS NULL) OR ([gender] = @Original_gender)) AND ((@IsNull_fName = 1 AND [fName] IS NULL) OR ([fName] = @Original_fName)) AND ((@IsNull_midInit = 1 AND [midInit] IS NULL) OR ([midInit] = @Original_midInit)) AND ((@IsNull_lName = 1 AND [lName] IS NULL) OR ([lName] = @Original_lName)) AND ((@IsNull_homePhone = 1 AND [homePhone] IS NULL) OR ([homePhone] = @Original_homePhone)) AND ((@IsNull_workPhone = 1 AND [workPhone] IS NULL) OR ([workPhone] = @Original_workPhone)) AND ((@IsNull_otherPhone = 1 AND [otherPhone] IS NULL) OR ([otherPhone] = @Original_otherPhone)) AND ((@IsNull_AOE1 = 1 AND [AOE1] IS NULL) OR ([AOE1] = @Original_AOE1)) AND ((@IsNull_AOE2 = 1 AND [AOE2] IS NULL) OR ([AOE2] = @Original_AOE2)) AND ((@IsNull_AOE3 = 1 AND [AOE3] IS NULL) OR ([AOE3] = @Original_AOE3)) AND ((@IsNull_AOE4 = 1 AND [AOE4] IS NULL) OR ([AOE4] = @Original_AOE4)) AND ((@IsNull_AOE5 = 1 AND [AOE5] IS NULL) OR ([AOE5] = @Original_AOE5)) AND ((@IsNull_AOE6 = 1 AND [AOE6] IS NULL) OR ([AOE6] = @Original_AOE6)) AND ((@IsNull_homeEmail = 1 AND [homeEmail] IS NULL) OR ([homeEmail] = @Original_homeEmail)) AND ((@IsNull_workEmail = 1 AND [workEmail] IS NULL) OR ([workEmail] = @Original_workEmail)) AND ((@IsNull_otherEmail = 1 AND [otherEmail] IS NULL) OR ([otherEmail] = @Original_otherEmail)) AND ((@IsNull_salary = 1 AND [salary] IS NULL) OR ([salary] = @Original_salary)) AND ((@IsNull_street1 = 1 AND [street1] IS NULL) OR ([street1] = @Original_street1)) AND ((@IsNull_street2 = 1 AND [street2] IS NULL) OR ([street2] = @Original_street2)) AND ((@IsNull_city = 1 AND [city] IS NULL) OR ([city] = @Original_city)) AND ((@IsNull_locale = 1 AND [locale] IS NULL) OR ([locale] = @Original_locale)) AND ((@IsNull_zipCode = 1 AND [zipCode] IS NULL) OR ([zipCode] = @Original_zipCode)));
SELECT phID, gender, fName, midInit, lName, homePhone, workPhone, otherPhone, AOE1, AOE2, AOE3, AOE4, AOE5, AOE6, homeEmail, workEmail, otherEmail, salary, street1, street2, city, locale, zipCode FROM Physicians WHERE (phID = @phID)
DELETE FROM [dbo].[Visits] WHERE (([visitID] = @Original_visitID) AND ((@IsNull_patientID = 1 AND [patientID] IS NULL) OR ([patientID] = @Original_patientID)) AND ((@IsNull_visitTime = 1 AND [visitTime] IS NULL) OR ([visitTime] = @Original_visitTime)) AND ((@IsNull_patientDueAmt = 1 AND [patientDueAmt] IS NULL) OR ([patientDueAmt] = @Original_patientDueAmt)) AND ((@IsNull_phID = 1 AND [phID] IS NULL) OR ([phID] = @Original_phID)) AND ((@IsNull_Diagnosis1 = 1 AND [Diagnosis1] IS NULL) OR ([Diagnosis1] = @Original_Diagnosis1)) AND ((@IsNull_Diagnosis2 = 1 AND [Diagnosis2] IS NULL) OR ([Diagnosis2] = @Original_Diagnosis2)) AND ((@IsNull_Diagnosis3 = 1 AND [Diagnosis3] IS NULL) OR ([Diagnosis3] = @Original_Diagnosis3)) AND ((@IsNull_Diagnosis4 = 1 AND [Diagnosis4] IS NULL) OR ([Diagnosis4] = @Original_Diagnosis4)) AND ((@IsNull_Diagnosis5 = 1 AND [Diagnosis5] IS NULL) OR ([Diagnosis5] = @Original_Diagnosis5)) AND ((@IsNull_Diagnosis6 = 1 AND [Diagnosis6] IS NULL) OR ([Diagnosis6] = @Original_Diagnosis6)))
INSERT INTO [dbo].[Visits] ([visitID], [patientID], [visitTime], [patientDueAmt], [phID], [Diagnosis1], [Diagnosis2], [Diagnosis3], [Diagnosis4], [Diagnosis5], [Diagnosis6]) VALUES (@visitID, @patientID, @visitTime, @patientDueAmt, @phID, @Diagnosis1, @Diagnosis2, @Diagnosis3, @Diagnosis4, @Diagnosis5, @Diagnosis6);
SELECT visitID, patientID, visitTime, patientDueAmt, phID, Diagnosis1, Diagnosis2, Diagnosis3, Diagnosis4, Diagnosis5, Diagnosis6 FROM Visits WHERE (visitID = @visitID)
SELECT visitID, patientID, visitTime, patientDueAmt, phID, Diagnosis1, Diagnosis2, Diagnosis3, Diagnosis4, Diagnosis5, Diagnosis6 FROM dbo.Visits
UPDATE [dbo].[Visits] SET [visitID] = @visitID, [patientID] = @patientID, [visitTime] = @visitTime, [patientDueAmt] = @patientDueAmt, [phID] = @phID, [Diagnosis1] = @Diagnosis1, [Diagnosis2] = @Diagnosis2, [Diagnosis3] = @Diagnosis3, [Diagnosis4] = @Diagnosis4, [Diagnosis5] = @Diagnosis5, [Diagnosis6] = @Diagnosis6 WHERE (([visitID] = @Original_visitID) AND ((@IsNull_patientID = 1 AND [patientID] IS NULL) OR ([patientID] = @Original_patientID)) AND ((@IsNull_visitTime = 1 AND [visitTime] IS NULL) OR ([visitTime] = @Original_visitTime)) AND ((@IsNull_patientDueAmt = 1 AND [patientDueAmt] IS NULL) OR ([patientDueAmt] = @Original_patientDueAmt)) AND ((@IsNull_phID = 1 AND [phID] IS NULL) OR ([phID] = @Original_phID)) AND ((@IsNull_Diagnosis1 = 1 AND [Diagnosis1] IS NULL) OR ([Diagnosis1] = @Original_Diagnosis1)) AND ((@IsNull_Diagnosis2 = 1 AND [Diagnosis2] IS NULL) OR ([Diagnosis2] = @Original_Diagnosis2)) AND ((@IsNull_Diagnosis3 = 1 AND [Diagnosis3] IS NULL) OR ([Diagnosis3] = @Original_Diagnosis3)) AND ((@IsNull_Diagnosis4 = 1 AND [Diagnosis4] IS NULL) OR ([Diagnosis4] = @Original_Diagnosis4)) AND ((@IsNull_Diagnosis5 = 1 AND [Diagnosis5] IS NULL) OR ([Diagnosis5] = @Original_Diagnosis5)) AND ((@IsNull_Diagnosis6 = 1 AND [Diagnosis6] IS NULL) OR ([Diagnosis6] = @Original_Diagnosis6)));
SELECT visitID, patientID, visitTime, patientDueAmt, phID, Diagnosis1, Diagnosis2, Diagnosis3, Diagnosis4, Diagnosis5, Diagnosis6 FROM Visits WHERE (visitID = @visitID)
dbo.patientCount
dbo.AddPatient
dbo.AddPhysician
dbo.AddVisit
dbo.DeletePatientVisit
dbo.UpdatePatientVisit