UPDATE `list_options` SET `notes` = '1315-1' WHERE `option_id` = 'port_gamble_klallam' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Port Gamble Klallam
UPDATE `list_options` SET `notes` = '1315-1' WHERE `title` = 'Port Gamble Klallam' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id port_graham title Port Graham
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','port_graham','Port Graham','6300', '0',' 1988-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id port_graham
UPDATE `list_options` SET `notes` = '1988-5' WHERE `option_id` = 'port_graham' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Port Graham
UPDATE `list_options` SET `notes` = '1988-5' WHERE `title` = 'Port Graham' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id port_heiden title Port Heiden
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','port_heiden','Port Heiden','6310', '0',' 1982-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id port_heiden
UPDATE `list_options` SET `notes` = '1982-8' WHERE `option_id` = 'port_heiden' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Port Heiden
UPDATE `list_options` SET `notes` = '1982-8' WHERE `title` = 'Port Heiden' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id port_lions title Port Lions
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','port_lions','Port Lions','6320', '0',' 2000-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id port_lions
UPDATE `list_options` SET `notes` = '2000-8' WHERE `option_id` = 'port_lions' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Port Lions
UPDATE `list_options` SET `notes` = '2000-8' WHERE `title` = 'Port Lions' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id port_madison title Port Madison
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','port_madison','Port Madison','6330', '0',' 1525-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id port_madison
UPDATE `list_options` SET `notes` = '1525-5' WHERE `option_id` = 'port_madison' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Port Madison
UPDATE `list_options` SET `notes` = '1525-5' WHERE `title` = 'Port Madison' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id portage_creek title Portage Creek
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','portage_creek','Portage Creek','6340', '0',' 1948-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id portage_creek
UPDATE `list_options` SET `notes` = '1948-9' WHERE `option_id` = 'portage_creek' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Portage Creek
UPDATE `list_options` SET `notes` = '1948-9' WHERE `title` = 'Portage Creek' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id potawatomi title Potawatomi
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','potawatomi','Potawatomi','6350', '0',' 1478-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id potawatomi
UPDATE `list_options` SET `notes` = '1478-7' WHERE `option_id` = 'potawatomi' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Potawatomi
UPDATE `list_options` SET `notes` = '1478-7' WHERE `title` = 'Potawatomi' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id powhatan title Powhatan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','powhatan','Powhatan','6360', '0',' 1487-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id powhatan
UPDATE `list_options` SET `notes` = '1487-8' WHERE `option_id` = 'powhatan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Powhatan
UPDATE `list_options` SET `notes` = '1487-8' WHERE `title` = 'Powhatan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id prairie_band title Prairie Band
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','prairie_band','Prairie Band','6370', '0',' 1484-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id prairie_band
UPDATE `list_options` SET `notes` = '1484-5' WHERE `option_id` = 'prairie_band' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Prairie Band
UPDATE `list_options` SET `notes` = '1484-5' WHERE `title` = 'Prairie Band' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id prairie_island_sioux title Prairie Island Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','prairie_island_sioux','Prairie Island Sioux','6380', '0',' 1625-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id prairie_island_sioux
UPDATE `list_options` SET `notes` = '1625-3' WHERE `option_id` = 'prairie_island_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Prairie Island Sioux
UPDATE `list_options` SET `notes` = '1625-3' WHERE `title` = 'Prairie Island Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id principal_creek_indian_nation title Principal Creek Indian Nation
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','principal_creek_indian_nation','Principal Creek Indian Nation','6390', '0',' 1202-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id principal_creek_indian_nation
UPDATE `list_options` SET `notes` = '1202-1' WHERE `option_id` = 'principal_creek_indian_nation' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Principal Creek Indian Nation
UPDATE `list_options` SET `notes` = '1202-1' WHERE `title` = 'Principal Creek Indian Nation' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id prior_lake_sioux title Prior Lake Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','prior_lake_sioux','Prior Lake Sioux','6400', '0',' 1626-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id prior_lake_sioux
UPDATE `list_options` SET `notes` = '1626-1' WHERE `option_id` = 'prior_lake_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Prior Lake Sioux
UPDATE `list_options` SET `notes` = '1626-1' WHERE `title` = 'Prior Lake Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id pueblo title Pueblo
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','pueblo','Pueblo','6410', '0',' 1489-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id pueblo
UPDATE `list_options` SET `notes` = '1489-4' WHERE `option_id` = 'pueblo' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Pueblo
UPDATE `list_options` SET `notes` = '1489-4' WHERE `title` = 'Pueblo' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id puget_sound_salish title Puget Sound Salish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','puget_sound_salish','Puget Sound Salish','6420', '0',' 1518-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id puget_sound_salish
UPDATE `list_options` SET `notes` = '1518-0' WHERE `option_id` = 'puget_sound_salish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Puget Sound Salish
UPDATE `list_options` SET `notes` = '1518-0' WHERE `title` = 'Puget Sound Salish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id puyallup title Puyallup
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','puyallup','Puyallup','6430', '0',' 1526-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id puyallup
UPDATE `list_options` SET `notes` = '1526-3' WHERE `option_id` = 'puyallup' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Puyallup
UPDATE `list_options` SET `notes` = '1526-3' WHERE `title` = 'Puyallup' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id pyramid_lake title Pyramid Lake
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','pyramid_lake','Pyramid Lake','6440', '0',' 1431-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id pyramid_lake
UPDATE `list_options` SET `notes` = '1431-6' WHERE `option_id` = 'pyramid_lake' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Pyramid Lake
UPDATE `list_options` SET `notes` = '1431-6' WHERE `title` = 'Pyramid Lake' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id qagan_toyagungin title Qagan Toyagungin
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','qagan_toyagungin','Qagan Toyagungin','6450', '0',' 2019-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id qagan_toyagungin
UPDATE `list_options` SET `notes` = '2019-8' WHERE `option_id` = 'qagan_toyagungin' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Qagan Toyagungin
UPDATE `list_options` SET `notes` = '2019-8' WHERE `title` = 'Qagan Toyagungin' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id qawalangin title Qawalangin
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','qawalangin','Qawalangin','6460', '0',' 2020-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id qawalangin
UPDATE `list_options` SET `notes` = '2020-6' WHERE `option_id` = 'qawalangin' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Qawalangin
UPDATE `list_options` SET `notes` = '2020-6' WHERE `title` = 'Qawalangin' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id quapaw title Quapaw
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','quapaw','Quapaw','6470', '0',' 1541-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id quapaw
UPDATE `list_options` SET `notes` = '1541-2' WHERE `option_id` = 'quapaw' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Quapaw
UPDATE `list_options` SET `notes` = '1541-2' WHERE `title` = 'Quapaw' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id quechan title Quechan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','quechan','Quechan','6480', '0',' 1730-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id quechan
UPDATE `list_options` SET `notes` = '1730-1' WHERE `option_id` = 'quechan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Quechan
UPDATE `list_options` SET `notes` = '1730-1' WHERE `title` = 'Quechan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id quileute title Quileute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','quileute','Quileute','6490', '0',' 1084-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id quileute
UPDATE `list_options` SET `notes` = '1084-3' WHERE `option_id` = 'quileute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Quileute
UPDATE `list_options` SET `notes` = '1084-3' WHERE `title` = 'Quileute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id quinault title Quinault
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','quinault','Quinault','6500', '0',' 1543-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id quinault
UPDATE `list_options` SET `notes` = '1543-8' WHERE `option_id` = 'quinault' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Quinault
UPDATE `list_options` SET `notes` = '1543-8' WHERE `title` = 'Quinault' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id quinhagak title Quinhagak
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','quinhagak','Quinhagak','6510', '0',' 1949-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id quinhagak
UPDATE `list_options` SET `notes` = '1949-7' WHERE `option_id` = 'quinhagak' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Quinhagak
UPDATE `list_options` SET `notes` = '1949-7' WHERE `title` = 'Quinhagak' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id ramah_navajo title Ramah Navajo
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','ramah_navajo','Ramah Navajo','6520', '0',' 1385-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id ramah_navajo
UPDATE `list_options` SET `notes` = '1385-4' WHERE `option_id` = 'ramah_navajo' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Ramah Navajo
UPDATE `list_options` SET `notes` = '1385-4' WHERE `title` = 'Ramah Navajo' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id rampart title Rampart
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','rampart','Rampart','6530', '0',' 1790-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id rampart
UPDATE `list_options` SET `notes` = '1790-5' WHERE `option_id` = 'rampart' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Rampart
UPDATE `list_options` SET `notes` = '1790-5' WHERE `title` = 'Rampart' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id rampough_mountain title Rampough Mountain
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','rampough_mountain','Rampough Mountain','6540', '0',' 1219-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id rampough_mountain
UPDATE `list_options` SET `notes` = '1219-5' WHERE `option_id` = 'rampough_mountain' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Rampough Mountain
UPDATE `list_options` SET `notes` = '1219-5' WHERE `title` = 'Rampough Mountain' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id rappahannock title Rappahannock
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','rappahannock','Rappahannock','6550', '0',' 1545-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id rappahannock
UPDATE `list_options` SET `notes` = '1545-3' WHERE `option_id` = 'rappahannock' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Rappahannock
UPDATE `list_options` SET `notes` = '1545-3' WHERE `title` = 'Rappahannock' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id red_cliff_chippewa title Red Cliff Chippewa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','red_cliff_chippewa','Red Cliff Chippewa','6560', '0',' 1141-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id red_cliff_chippewa
UPDATE `list_options` SET `notes` = '1141-1' WHERE `option_id` = 'red_cliff_chippewa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Red Cliff Chippewa
UPDATE `list_options` SET `notes` = '1141-1' WHERE `title` = 'Red Cliff Chippewa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id red_devil title Red Devil
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','red_devil','Red Devil','6570', '0',' 1950-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id red_devil
UPDATE `list_options` SET `notes` = '1950-5' WHERE `option_id` = 'red_devil' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Red Devil
UPDATE `list_options` SET `notes` = '1950-5' WHERE `title` = 'Red Devil' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id red_lake_chippewa title Red Lake Chippewa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','red_lake_chippewa','Red Lake Chippewa','6580', '0',' 1142-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id red_lake_chippewa
UPDATE `list_options` SET `notes` = '1142-9' WHERE `option_id` = 'red_lake_chippewa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Red Lake Chippewa
UPDATE `list_options` SET `notes` = '1142-9' WHERE `title` = 'Red Lake Chippewa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id red_wood title Red Wood
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','red_wood','Red Wood','6590', '0',' 1061-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id red_wood
UPDATE `list_options` SET `notes` = '1061-1' WHERE `option_id` = 'red_wood' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Red Wood
UPDATE `list_options` SET `notes` = '1061-1' WHERE `title` = 'Red Wood' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id reno-sparks title Reno-Sparks
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','reno-sparks','Reno-Sparks','6600', '0',' 1547-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id reno-sparks
UPDATE `list_options` SET `notes` = '1547-9' WHERE `option_id` = 'reno-sparks' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Reno-Sparks
UPDATE `list_options` SET `notes` = '1547-9' WHERE `title` = 'Reno-Sparks' AND `list_id` = 'race';
#EndIf

#IfNotRow2D list_options list_id race option_id rocky_boys_chippewa_cree
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','rocky_boys_chippewa_cree',"Rocky Boy's Chippewa Cree",'6610', '0',' 1151-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id rocky_boys_chippewa_cree
UPDATE `list_options` SET `notes` = '1151-0' WHERE `option_id` = 'rocky_boys_chippewa_cree' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id rosebud_sioux title Rosebud Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','rosebud_sioux','Rosebud Sioux','6620', '0',' 1627-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id rosebud_sioux
UPDATE `list_options` SET `notes` = '1627-9' WHERE `option_id` = 'rosebud_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Rosebud Sioux
UPDATE `list_options` SET `notes` = '1627-9' WHERE `title` = 'Rosebud Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id round_valley title Round Valley
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','round_valley','Round Valley','6630', '0',' 1549-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id round_valley
UPDATE `list_options` SET `notes` = '1549-5' WHERE `option_id` = 'round_valley' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Round Valley
UPDATE `list_options` SET `notes` = '1549-5' WHERE `title` = 'Round Valley' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id ruby title Ruby
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','ruby','Ruby','6640', '0',' 1791-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id ruby
UPDATE `list_options` SET `notes` = '1791-3' WHERE `option_id` = 'ruby' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Ruby
UPDATE `list_options` SET `notes` = '1791-3' WHERE `title` = 'Ruby' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id ruby_valley title Ruby Valley
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','ruby_valley','Ruby Valley','6650', '0',' 1593-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id ruby_valley
UPDATE `list_options` SET `notes` = '1593-3' WHERE `option_id` = 'ruby_valley' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Ruby Valley
UPDATE `list_options` SET `notes` = '1593-3' WHERE `title` = 'Ruby Valley' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sac_and_fox title Sac and Fox
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sac_and_fox','Sac and Fox','6660', '0',' 1551-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id sac_and_fox
UPDATE `list_options` SET `notes` = '1551-1' WHERE `option_id` = 'sac_and_fox' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sac and Fox
UPDATE `list_options` SET `notes` = '1551-1' WHERE `title` = 'Sac and Fox' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id saginaw_chippewa title Saginaw Chippewa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','saginaw_chippewa','Saginaw Chippewa','6670', '0',' 1143-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id saginaw_chippewa
UPDATE `list_options` SET `notes` = '1143-7' WHERE `option_id` = 'saginaw_chippewa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Saginaw Chippewa
UPDATE `list_options` SET `notes` = '1143-7' WHERE `title` = 'Saginaw Chippewa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id saipanese title Saipanese
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','saipanese','Saipanese','6680', '0',' 2095-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id saipanese
UPDATE `list_options` SET `notes` = '2095-8' WHERE `option_id` = 'saipanese' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Saipanese
UPDATE `list_options` SET `notes` = '2095-8' WHERE `title` = 'Saipanese' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id salamatof title Salamatof
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','salamatof','Salamatof','6690', '0',' 1792-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id salamatof
UPDATE `list_options` SET `notes` = '1792-1' WHERE `option_id` = 'salamatof' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Salamatof
UPDATE `list_options` SET `notes` = '1792-1' WHERE `title` = 'Salamatof' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id salinan title Salinan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','salinan','Salinan','6700', '0',' 1556-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id salinan
UPDATE `list_options` SET `notes` = '1556-0' WHERE `option_id` = 'salinan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Salinan
UPDATE `list_options` SET `notes` = '1556-0' WHERE `title` = 'Salinan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id salish title Salish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','salish','Salish','6710', '0',' 1558-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id salish
UPDATE `list_options` SET `notes` = '1558-6' WHERE `option_id` = 'salish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Salish
UPDATE `list_options` SET `notes` = '1558-6' WHERE `title` = 'Salish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id salish_and_kootenai title Salish and Kootenai
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','salish_and_kootenai','Salish and Kootenai','6720', '0',' 1560-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id salish_and_kootenai
UPDATE `list_options` SET `notes` = '1560-2' WHERE `option_id` = 'salish_and_kootenai' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Salish and Kootenai
UPDATE `list_options` SET `notes` = '1560-2' WHERE `title` = 'Salish and Kootenai' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id salt_river_pima-maricopa title Salt River Pima-Maricopa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','salt_river_pima-maricopa','Salt River Pima-Maricopa','6730', '0',' 1458-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id salt_river_pima-maricopa
UPDATE `list_options` SET `notes` = '1458-9' WHERE `option_id` = 'salt_river_pima-maricopa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Salt River Pima-Maricopa
UPDATE `list_options` SET `notes` = '1458-9' WHERE `title` = 'Salt River Pima-Maricopa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id samish title Samish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','samish','Samish','6740', '0',' 1527-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id samish
UPDATE `list_options` SET `notes` = '1527-1' WHERE `option_id` = 'samish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Samish
UPDATE `list_options` SET `notes` = '1527-1' WHERE `title` = 'Samish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id samoan title Samoan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','samoan','Samoan','6750', '0',' 2080-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id samoan
UPDATE `list_options` SET `notes` = '2080-0' WHERE `option_id` = 'samoan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Samoan
UPDATE `list_options` SET `notes` = '2080-0' WHERE `title` = 'Samoan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_carlos_apache title San Carlos Apache
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_carlos_apache','San Carlos Apache','6760', '0',' 1018-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_carlos_apache
UPDATE `list_options` SET `notes` = '1018-1' WHERE `option_id` = 'san_carlos_apache' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Carlos Apache
UPDATE `list_options` SET `notes` = '1018-1' WHERE `title` = 'San Carlos Apache' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_felipe title San Felipe
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_felipe','San Felipe','6770', '0',' 1502-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_felipe
UPDATE `list_options` SET `notes` = '1502-4' WHERE `option_id` = 'san_felipe' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Felipe
UPDATE `list_options` SET `notes` = '1502-4' WHERE `title` = 'San Felipe' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_ildefonso title San Ildefonso
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_ildefonso','San Ildefonso','6780', '0',' 1503-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_ildefonso
UPDATE `list_options` SET `notes` = '1503-2' WHERE `option_id` = 'san_ildefonso' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Ildefonso
UPDATE `list_options` SET `notes` = '1503-2' WHERE `title` = 'San Ildefonso' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_juan title San Juan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_juan','San Juan','6790', '0',' 1506-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_juan
UPDATE `list_options` SET `notes` = '1506-5' WHERE `option_id` = 'san_juan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Juan
UPDATE `list_options` SET `notes` = '1506-5' WHERE `title` = 'San Juan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_juan_de title San Juan De
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_juan_de','San Juan De','6800', '0',' 1505-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_juan_de
UPDATE `list_options` SET `notes` = '1505-7' WHERE `option_id` = 'san_juan_de' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Juan De
UPDATE `list_options` SET `notes` = '1505-7' WHERE `title` = 'San Juan De' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_juan_pueblo title San Juan Pueblo
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_juan_pueblo','San Juan Pueblo','6810', '0',' 1504-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_juan_pueblo
UPDATE `list_options` SET `notes` = '1504-0' WHERE `option_id` = 'san_juan_pueblo' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Juan Pueblo
UPDATE `list_options` SET `notes` = '1504-0' WHERE `title` = 'San Juan Pueblo' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_juan_southern_paiute title San Juan Southern Paiute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_juan_southern_paiute','San Juan Southern Paiute','6820', '0',' 1432-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_juan_southern_paiute
UPDATE `list_options` SET `notes` = '1432-4' WHERE `option_id` = 'san_juan_southern_paiute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Juan Southern Paiute
UPDATE `list_options` SET `notes` = '1432-4' WHERE `title` = 'San Juan Southern Paiute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_manual title San Manual
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_manual','San Manual','6830', '0',' 1574-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_manual
UPDATE `list_options` SET `notes` = '1574-3' WHERE `option_id` = 'san_manual' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Manual
UPDATE `list_options` SET `notes` = '1574-3' WHERE `title` = 'San Manual' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_pasqual title San Pasqual
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_pasqual','San Pasqual','6840', '0',' 1229-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_pasqual
UPDATE `list_options` SET `notes` = '1229-4' WHERE `option_id` = 'san_pasqual' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Pasqual
UPDATE `list_options` SET `notes` = '1229-4' WHERE `title` = 'San Pasqual' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id san_xavier title San Xavier
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','san_xavier','San Xavier','6850', '0',' 1656-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id san_xavier
UPDATE `list_options` SET `notes` = '1656-8' WHERE `option_id` = 'san_xavier' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title San Xavier
UPDATE `list_options` SET `notes` = '1656-8' WHERE `title` = 'San Xavier' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sand_hill title Sand Hill
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sand_hill','Sand Hill','6860', '0',' 1220-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id sand_hill
UPDATE `list_options` SET `notes` = '1220-3' WHERE `option_id` = 'sand_hill' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sand Hill
UPDATE `list_options` SET `notes` = '1220-3' WHERE `title` = 'Sand Hill' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sand_point title Sand Point
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sand_point','Sand Point','6870', '0',' 2023-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id sand_point
UPDATE `list_options` SET `notes` = '2023-0' WHERE `option_id` = 'sand_point' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sand Point
UPDATE `list_options` SET `notes` = '2023-0' WHERE `title` = 'Sand Point' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sandia title Sandia
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sandia','Sandia','6880', '0',' 1507-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id sandia
UPDATE `list_options` SET `notes` = '1507-3' WHERE `option_id` = 'sandia' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sandia
UPDATE `list_options` SET `notes` = '1507-3' WHERE `title` = 'Sandia' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sans_arc_sioux title Sans Arc Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sans_arc_sioux','Sans Arc Sioux','6890', '0',' 1628-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id sans_arc_sioux
UPDATE `list_options` SET `notes` = '1628-7' WHERE `option_id` = 'sans_arc_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sans Arc Sioux
UPDATE `list_options` SET `notes` = '1628-7' WHERE `title` = 'Sans Arc Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id santa_ana title Santa Ana
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','santa_ana','Santa Ana','6900', '0',' 1508-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id santa_ana
UPDATE `list_options` SET `notes` = '1508-1' WHERE `option_id` = 'santa_ana' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Santa Ana
UPDATE `list_options` SET `notes` = '1508-1' WHERE `title` = 'Santa Ana' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id santa_clara title Santa Clara
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','santa_clara','Santa Clara','6910', '0',' 1509-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id santa_clara
UPDATE `list_options` SET `notes` = '1509-9' WHERE `option_id` = 'santa_clara' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Santa Clara
UPDATE `list_options` SET `notes` = '1509-9' WHERE `title` = 'Santa Clara' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id santa_rosa title Santa Rosa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','santa_rosa','Santa Rosa','6920', '0',' 1062-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id santa_rosa
UPDATE `list_options` SET `notes` = '1062-9' WHERE `option_id` = 'santa_rosa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Santa Rosa
UPDATE `list_options` SET `notes` = '1062-9' WHERE `title` = 'Santa Rosa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id santa_rosa_cahuilla title Santa Rosa Cahuilla
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','santa_rosa_cahuilla','Santa Rosa Cahuilla','6930', '0',' 1050-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id santa_rosa_cahuilla
UPDATE `list_options` SET `notes` = '1050-4' WHERE `option_id` = 'santa_rosa_cahuilla' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Santa Rosa Cahuilla
UPDATE `list_options` SET `notes` = '1050-4' WHERE `title` = 'Santa Rosa Cahuilla' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id santa_ynez title Santa Ynez
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','santa_ynez','Santa Ynez','6940', '0',' 1163-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id santa_ynez
UPDATE `list_options` SET `notes` = '1163-5' WHERE `option_id` = 'santa_ynez' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Santa Ynez
UPDATE `list_options` SET `notes` = '1163-5' WHERE `title` = 'Santa Ynez' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id santa_ysabel title Santa Ysabel
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','santa_ysabel','Santa Ysabel','6950', '0',' 1230-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id santa_ysabel
UPDATE `list_options` SET `notes` = '1230-2' WHERE `option_id` = 'santa_ysabel' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Santa Ysabel
UPDATE `list_options` SET `notes` = '1230-2' WHERE `title` = 'Santa Ysabel' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id santee_sioux title Santee Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','santee_sioux','Santee Sioux','6960', '0',' 1629-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id santee_sioux
UPDATE `list_options` SET `notes` = '1629-5' WHERE `option_id` = 'santee_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Santee Sioux
UPDATE `list_options` SET `notes` = '1629-5' WHERE `title` = 'Santee Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id santo_domingo title Santo Domingo
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','santo_domingo','Santo Domingo','6970', '0',' 1510-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id santo_domingo
UPDATE `list_options` SET `notes` = '1510-7' WHERE `option_id` = 'santo_domingo' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Santo Domingo
UPDATE `list_options` SET `notes` = '1510-7' WHERE `title` = 'Santo Domingo' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sauk-suiattle title Sauk-Suiattle
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sauk-suiattle','Sauk-Suiattle','6980', '0',' 1528-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id sauk-suiattle
UPDATE `list_options` SET `notes` = '1528-9' WHERE `option_id` = 'sauk-suiattle' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sauk-Suiattle
UPDATE `list_options` SET `notes` = '1528-9' WHERE `title` = 'Sauk-Suiattle' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sault_ste_marie_chippewa title Sault Ste. Marie Chippewa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sault_ste_marie_chippewa','Sault Ste. Marie Chippewa','6990', '0',' 1145-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id sault_ste_marie_chippewa
UPDATE `list_options` SET `notes` = '1145-2' WHERE `option_id` = 'sault_ste_marie_chippewa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sault Ste. Marie Chippewa
UPDATE `list_options` SET `notes` = '1145-2' WHERE `title` = 'Sault Ste. Marie Chippewa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id savoonga title Savoonga
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','savoonga','Savoonga','7000', '0',' 1893-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id savoonga
UPDATE `list_options` SET `notes` = '1893-7' WHERE `option_id` = 'savoonga' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Savoonga
UPDATE `list_options` SET `notes` = '1893-7' WHERE `title` = 'Savoonga' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id saxman title Saxman
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','saxman','Saxman','7010', '0',' 1830-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id saxman
UPDATE `list_options` SET `notes` = '1830-9' WHERE `option_id` = 'saxman' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Saxman
UPDATE `list_options` SET `notes` = '1830-9' WHERE `title` = 'Saxman' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id scammon_bay title Scammon Bay
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','scammon_bay','Scammon Bay','7020', '0',' 1952-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id scammon_bay
UPDATE `list_options` SET `notes` = '1952-1' WHERE `option_id` = 'scammon_bay' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Scammon Bay
UPDATE `list_options` SET `notes` = '1952-1' WHERE `title` = 'Scammon Bay' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id schaghticoke title Schaghticoke
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','schaghticoke','Schaghticoke','7030', '0',' 1562-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id schaghticoke
UPDATE `list_options` SET `notes` = '1562-8' WHERE `option_id` = 'schaghticoke' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Schaghticoke
UPDATE `list_options` SET `notes` = '1562-8' WHERE `title` = 'Schaghticoke' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id scott_valley title Scott Valley
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','scott_valley','Scott Valley','7040', '0',' 1564-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id scott_valley
UPDATE `list_options` SET `notes` = '1564-4' WHERE `option_id` = 'scott_valley' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Scott Valley
UPDATE `list_options` SET `notes` = '1564-4' WHERE `title` = 'Scott Valley' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id scottish title Scottish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','scottish','Scottish','7050', '0',' 2116-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id scottish
UPDATE `list_options` SET `notes` = '2116-2' WHERE `option_id` = 'scottish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Scottish
UPDATE `list_options` SET `notes` = '2116-2' WHERE `title` = 'Scottish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id scotts_valley title Scotts Valley
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','scotts_valley','Scotts Valley','7060', '0',' 1470-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id scotts_valley
UPDATE `list_options` SET `notes` = '1470-4' WHERE `option_id` = 'scotts_valley' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Scotts Valley
UPDATE `list_options` SET `notes` = '1470-4' WHERE `title` = 'Scotts Valley' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id selawik title Selawik
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','selawik','Selawik','7070', '0',' 1878-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id selawik
UPDATE `list_options` SET `notes` = '1878-8' WHERE `option_id` = 'selawik' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Selawik
UPDATE `list_options` SET `notes` = '1878-8' WHERE `title` = 'Selawik' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id seldovia title Seldovia
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','seldovia','Seldovia','7080', '0',' 1793-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id seldovia
UPDATE `list_options` SET `notes` = '1793-9' WHERE `option_id` = 'seldovia' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Seldovia
UPDATE `list_options` SET `notes` = '1793-9' WHERE `title` = 'Seldovia' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sells title Sells
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sells','Sells','7090', '0',' 1657-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id sells
UPDATE `list_options` SET `notes` = '1657-6' WHERE `option_id` = 'sells' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sells
UPDATE `list_options` SET `notes` = '1657-6' WHERE `title` = 'Sells' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id seminole title Seminole
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','seminole','Seminole','7100', '0',' 1566-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id seminole
UPDATE `list_options` SET `notes` = '1566-9' WHERE `option_id` = 'seminole' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Seminole
UPDATE `list_options` SET `notes` = '1566-9' WHERE `title` = 'Seminole' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id seneca title Seneca
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','seneca','Seneca','7110', '0',' 1290-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id seneca
UPDATE `list_options` SET `notes` = '1290-6' WHERE `option_id` = 'seneca' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Seneca
UPDATE `list_options` SET `notes` = '1290-6' WHERE `title` = 'Seneca' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id seneca_nation title Seneca Nation
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','seneca_nation','Seneca Nation','7120', '0',' 1291-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id seneca_nation
UPDATE `list_options` SET `notes` = '1291-4' WHERE `option_id` = 'seneca_nation' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Seneca Nation
UPDATE `list_options` SET `notes` = '1291-4' WHERE `title` = 'Seneca Nation' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id seneca-cayuga title Seneca-Cayuga
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','seneca-cayuga','Seneca-Cayuga','7130', '0',' 1292-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id seneca-cayuga
UPDATE `list_options` SET `notes` = '1292-2' WHERE `option_id` = 'seneca-cayuga' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Seneca-Cayuga
UPDATE `list_options` SET `notes` = '1292-2' WHERE `title` = 'Seneca-Cayuga' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id serrano title Serrano
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','serrano','Serrano','7140', '0',' 1573-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id serrano
UPDATE `list_options` SET `notes` = '1573-5' WHERE `option_id` = 'serrano' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Serrano
UPDATE `list_options` SET `notes` = '1573-5' WHERE `title` = 'Serrano' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id setauket title Setauket
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','setauket','Setauket','7150', '0',' 1329-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id setauket
UPDATE `list_options` SET `notes` = '1329-2' WHERE `option_id` = 'setauket' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Setauket
UPDATE `list_options` SET `notes` = '1329-2' WHERE `title` = 'Setauket' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shageluk title Shageluk
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shageluk','Shageluk','7160', '0',' 1795-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id shageluk
UPDATE `list_options` SET `notes` = '1795-4' WHERE `option_id` = 'shageluk' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shageluk
UPDATE `list_options` SET `notes` = '1795-4' WHERE `title` = 'Shageluk' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shaktoolik title Shaktoolik
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shaktoolik','Shaktoolik','7170', '0',' 1879-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id shaktoolik
UPDATE `list_options` SET `notes` = '1879-6' WHERE `option_id` = 'shaktoolik' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shaktoolik
UPDATE `list_options` SET `notes` = '1879-6' WHERE `title` = 'Shaktoolik' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shasta title Shasta
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shasta','Shasta','7180', '0',' 1576-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id shasta
UPDATE `list_options` SET `notes` = '1576-8' WHERE `option_id` = 'shasta' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shasta
UPDATE `list_options` SET `notes` = '1576-8' WHERE `title` = 'Shasta' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shawnee title Shawnee
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shawnee','Shawnee','7190', '0',' 1578-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id shawnee
UPDATE `list_options` SET `notes` = '1578-4' WHERE `option_id` = 'shawnee' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shawnee
UPDATE `list_options` SET `notes` = '1578-4' WHERE `title` = 'Shawnee' AND `list_id` = 'race';
#EndIf

#IfNotRow2D list_options list_id race option_id sheldons_point
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sheldons_point',"Sheldon's Point",'7200', '0',' 1953-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id sheldons_point
UPDATE `list_options` SET `notes` = '1953-9' WHERE `option_id` = 'sheldons_point' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shinnecock title Shinnecock
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shinnecock','Shinnecock','7210', '0',' 1582-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id shinnecock
UPDATE `list_options` SET `notes` = '1582-6' WHERE `option_id` = 'shinnecock' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shinnecock
UPDATE `list_options` SET `notes` = '1582-6' WHERE `title` = 'Shinnecock' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shishmaref title Shishmaref
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shishmaref','Shishmaref','7220', '0',' 1880-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id shishmaref
UPDATE `list_options` SET `notes` = '1880-4' WHERE `option_id` = 'shishmaref' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shishmaref
UPDATE `list_options` SET `notes` = '1880-4' WHERE `title` = 'Shishmaref' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shoalwater_bay title Shoalwater Bay
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shoalwater_bay','Shoalwater Bay','7230', '0',' 1584-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id shoalwater_bay
UPDATE `list_options` SET `notes` = '1584-2' WHERE `option_id` = 'shoalwater_bay' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shoalwater Bay
UPDATE `list_options` SET `notes` = '1584-2' WHERE `title` = 'Shoalwater Bay' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shoshone title Shoshone
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shoshone','Shoshone','7240', '0',' 1586-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id shoshone
UPDATE `list_options` SET `notes` = '1586-7' WHERE `option_id` = 'shoshone' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shoshone
UPDATE `list_options` SET `notes` = '1586-7' WHERE `title` = 'Shoshone' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shoshone_paiute title Shoshone Paiute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shoshone_paiute','Shoshone Paiute','7250', '0',' 1602-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id shoshone_paiute
UPDATE `list_options` SET `notes` = '1602-2' WHERE `option_id` = 'shoshone_paiute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shoshone Paiute
UPDATE `list_options` SET `notes` = '1602-2' WHERE `title` = 'Shoshone Paiute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id shungnak title Shungnak
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','shungnak','Shungnak','7260', '0',' 1881-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id shungnak
UPDATE `list_options` SET `notes` = '1881-2' WHERE `option_id` = 'shungnak' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Shungnak
UPDATE `list_options` SET `notes` = '1881-2' WHERE `title` = 'Shungnak' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id siberian_eskimo title Siberian Eskimo
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','siberian_eskimo','Siberian Eskimo','7270', '0',' 1891-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id siberian_eskimo
UPDATE `list_options` SET `notes` = '1891-1' WHERE `option_id` = 'siberian_eskimo' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Siberian Eskimo
UPDATE `list_options` SET `notes` = '1891-1' WHERE `title` = 'Siberian Eskimo' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id siberian_yupik title Siberian Yupik
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','siberian_yupik','Siberian Yupik','7280', '0',' 1894-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id siberian_yupik
UPDATE `list_options` SET `notes` = '1894-5' WHERE `option_id` = 'siberian_yupik' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Siberian Yupik
UPDATE `list_options` SET `notes` = '1894-5' WHERE `title` = 'Siberian Yupik' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id siletz title Siletz
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','siletz','Siletz','7290', '0',' 1607-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id siletz
UPDATE `list_options` SET `notes` = '1607-1' WHERE `option_id` = 'siletz' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Siletz
UPDATE `list_options` SET `notes` = '1607-1' WHERE `title` = 'Siletz' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id singaporean title Singaporean
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','singaporean','Singaporean','7300', '0',' 2051-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id singaporean
UPDATE `list_options` SET `notes` = '2051-1' WHERE `option_id` = 'singaporean' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Singaporean
UPDATE `list_options` SET `notes` = '2051-1' WHERE `title` = 'Singaporean' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sioux title Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sioux','Sioux','7310', '0',' 1609-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id sioux
UPDATE `list_options` SET `notes` = '1609-7' WHERE `option_id` = 'sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sioux
UPDATE `list_options` SET `notes` = '1609-7' WHERE `title` = 'Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sisseton_sioux title Sisseton Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sisseton_sioux','Sisseton Sioux','7320', '0',' 1631-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id sisseton_sioux
UPDATE `list_options` SET `notes` = '1631-1' WHERE `option_id` = 'sisseton_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sisseton Sioux
UPDATE `list_options` SET `notes` = '1631-1' WHERE `title` = 'Sisseton Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sisseton-wahpeton title Sisseton-Wahpeton
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sisseton-wahpeton','Sisseton-Wahpeton','7330', '0',' 1630-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id sisseton-wahpeton
UPDATE `list_options` SET `notes` = '1630-3' WHERE `option_id` = 'sisseton-wahpeton' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sisseton-Wahpeton
UPDATE `list_options` SET `notes` = '1630-3' WHERE `title` = 'Sisseton-Wahpeton' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sitka title Sitka
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sitka','Sitka','7340', '0',' 1831-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id sitka
UPDATE `list_options` SET `notes` = '1831-7' WHERE `option_id` = 'sitka' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sitka
UPDATE `list_options` SET `notes` = '1831-7' WHERE `title` = 'Sitka' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id siuslaw title Siuslaw
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','siuslaw','Siuslaw','7350', '0',' 1643-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id siuslaw
UPDATE `list_options` SET `notes` = '1643-6' WHERE `option_id` = 'siuslaw' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Siuslaw
UPDATE `list_options` SET `notes` = '1643-6' WHERE `title` = 'Siuslaw' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id skokomish title Skokomish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','skokomish','Skokomish','7360', '0',' 1529-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id skokomish
UPDATE `list_options` SET `notes` = '1529-7' WHERE `option_id` = 'skokomish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Skokomish
UPDATE `list_options` SET `notes` = '1529-7' WHERE `title` = 'Skokomish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id skull_valley title Skull Valley
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','skull_valley','Skull Valley','7370', '0',' 1594-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id skull_valley
UPDATE `list_options` SET `notes` = '1594-1' WHERE `option_id` = 'skull_valley' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Skull Valley
UPDATE `list_options` SET `notes` = '1594-1' WHERE `title` = 'Skull Valley' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id skykomish title Skykomish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','skykomish','Skykomish','7380', '0',' 1530-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id skykomish
UPDATE `list_options` SET `notes` = '1530-5' WHERE `option_id` = 'skykomish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Skykomish
UPDATE `list_options` SET `notes` = '1530-5' WHERE `title` = 'Skykomish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id slana title Slana
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','slana','Slana','7390', '0',' 1794-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id slana
UPDATE `list_options` SET `notes` = '1794-7' WHERE `option_id` = 'slana' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Slana
UPDATE `list_options` SET `notes` = '1794-7' WHERE `title` = 'Slana' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sleetmute title Sleetmute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sleetmute','Sleetmute','7400', '0',' 1954-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id sleetmute
UPDATE `list_options` SET `notes` = '1954-7' WHERE `option_id` = 'sleetmute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sleetmute
UPDATE `list_options` SET `notes` = '1954-7' WHERE `title` = 'Sleetmute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id snohomish title Snohomish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','snohomish','Snohomish','7410', '0',' 1531-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id snohomish
UPDATE `list_options` SET `notes` = '1531-3' WHERE `option_id` = 'snohomish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Snohomish
UPDATE `list_options` SET `notes` = '1531-3' WHERE `title` = 'Snohomish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id snoqualmie title Snoqualmie
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','snoqualmie','Snoqualmie','7420', '0',' 1532-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id snoqualmie
UPDATE `list_options` SET `notes` = '1532-1' WHERE `option_id` = 'snoqualmie' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Snoqualmie
UPDATE `list_options` SET `notes` = '1532-1' WHERE `title` = 'Snoqualmie' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id soboba title Soboba
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','soboba','Soboba','7430', '0',' 1336-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id soboba
UPDATE `list_options` SET `notes` = '1336-7' WHERE `option_id` = 'soboba' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Soboba
UPDATE `list_options` SET `notes` = '1336-7' WHERE `title` = 'Soboba' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sokoagon_chippewa title Sokoagon Chippewa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sokoagon_chippewa','Sokoagon Chippewa','7440', '0',' 1146-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id sokoagon_chippewa
UPDATE `list_options` SET `notes` = '1146-0' WHERE `option_id` = 'sokoagon_chippewa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sokoagon Chippewa
UPDATE `list_options` SET `notes` = '1146-0' WHERE `title` = 'Sokoagon Chippewa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id solomon title Solomon
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','solomon','Solomon','7450', '0',' 1882-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id solomon
UPDATE `list_options` SET `notes` = '1882-0' WHERE `option_id` = 'solomon' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Solomon
UPDATE `list_options` SET `notes` = '1882-0' WHERE `title` = 'Solomon' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id solomon_islander title Solomon Islander
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','solomon_islander','Solomon Islander','7460', '0',' 2103-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id solomon_islander
UPDATE `list_options` SET `notes` = '2103-0' WHERE `option_id` = 'solomon_islander' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Solomon Islander
UPDATE `list_options` SET `notes` = '2103-0' WHERE `title` = 'Solomon Islander' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id south_american_indian title South American Indian
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','south_american_indian','South American Indian','7470', '0',' 1073-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id south_american_indian
UPDATE `list_options` SET `notes` = '1073-6' WHERE `option_id` = 'south_american_indian' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title South American Indian
UPDATE `list_options` SET `notes` = '1073-6' WHERE `title` = 'South American Indian' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id south_fork_shoshone title South Fork Shoshone
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','south_fork_shoshone','South Fork Shoshone','7480', '0',' 1595-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id south_fork_shoshone
UPDATE `list_options` SET `notes` = '1595-8' WHERE `option_id` = 'south_fork_shoshone' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title South Fork Shoshone
UPDATE `list_options` SET `notes` = '1595-8' WHERE `title` = 'South Fork Shoshone' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id south_naknek title South Naknek
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','south_naknek','South Naknek','7490', '0',' 2024-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id south_naknek
UPDATE `list_options` SET `notes` = '2024-8' WHERE `option_id` = 'south_naknek' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title South Naknek
UPDATE `list_options` SET `notes` = '2024-8' WHERE `title` = 'South Naknek' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id southeast_alaska title Southeast Alaska
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','southeast_alaska','Southeast Alaska','7500', '0',' 1811-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id southeast_alaska
UPDATE `list_options` SET `notes` = '1811-9' WHERE `option_id` = 'southeast_alaska' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Southeast Alaska
UPDATE `list_options` SET `notes` = '1811-9' WHERE `title` = 'Southeast Alaska' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id southeastern_indians title Southeastern Indians
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','southeastern_indians','Southeastern Indians','7510', '0',' 1244-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id southeastern_indians
UPDATE `list_options` SET `notes` = '1244-3' WHERE `option_id` = 'southeastern_indians' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Southeastern Indians
UPDATE `list_options` SET `notes` = '1244-3' WHERE `title` = 'Southeastern Indians' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id southern_arapaho title Southern Arapaho
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','southern_arapaho','Southern Arapaho','7520', '0',' 1023-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id southern_arapaho
UPDATE `list_options` SET `notes` = '1023-1' WHERE `option_id` = 'southern_arapaho' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Southern Arapaho
UPDATE `list_options` SET `notes` = '1023-1' WHERE `title` = 'Southern Arapaho' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id southern_cheyenne title Southern Cheyenne
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','southern_cheyenne','Southern Cheyenne','7530', '0',' 1104-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id southern_cheyenne
UPDATE `list_options` SET `notes` = '1104-9' WHERE `option_id` = 'southern_cheyenne' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Southern Cheyenne
UPDATE `list_options` SET `notes` = '1104-9' WHERE `title` = 'Southern Cheyenne' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id southern_paiute title Southern Paiute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','southern_paiute','Southern Paiute','7540', '0',' 1433-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id southern_paiute
UPDATE `list_options` SET `notes` = '1433-2' WHERE `option_id` = 'southern_paiute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Southern Paiute
UPDATE `list_options` SET `notes` = '1433-2' WHERE `title` = 'Southern Paiute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id spanish_american_indian title Spanish American Indian
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','spanish_american_indian','Spanish American Indian','7550', '0',' 1074-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id spanish_american_indian
UPDATE `list_options` SET `notes` = '1074-4' WHERE `option_id` = 'spanish_american_indian' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Spanish American Indian
UPDATE `list_options` SET `notes` = '1074-4' WHERE `title` = 'Spanish American Indian' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id spirit_lake_sioux title Spirit Lake Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','spirit_lake_sioux','Spirit Lake Sioux','7560', '0',' 1632-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id spirit_lake_sioux
UPDATE `list_options` SET `notes` = '1632-9' WHERE `option_id` = 'spirit_lake_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Spirit Lake Sioux
UPDATE `list_options` SET `notes` = '1632-9' WHERE `title` = 'Spirit Lake Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id spokane title Spokane
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','spokane','Spokane','7570', '0',' 1645-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id spokane
UPDATE `list_options` SET `notes` = '1645-1' WHERE `option_id` = 'spokane' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Spokane
UPDATE `list_options` SET `notes` = '1645-1' WHERE `title` = 'Spokane' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id squaxin_island title Squaxin Island
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','squaxin_island','Squaxin Island','7580', '0',' 1533-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id squaxin_island
UPDATE `list_options` SET `notes` = '1533-9' WHERE `option_id` = 'squaxin_island' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Squaxin Island
UPDATE `list_options` SET `notes` = '1533-9' WHERE `title` = 'Squaxin Island' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sri_lankan title Sri Lankan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sri_lankan','Sri Lankan','7590', '0',' 2045-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id sri_lankan
UPDATE `list_options` SET `notes` = '2045-3' WHERE `option_id` = 'sri_lankan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sri Lankan
UPDATE `list_options` SET `notes` = '2045-3' WHERE `title` = 'Sri Lankan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id st_croix_chippewa title St. Croix Chippewa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','st_croix_chippewa','St. Croix Chippewa','7600', '0',' 1144-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id st_croix_chippewa
UPDATE `list_options` SET `notes` = '1144-5' WHERE `option_id` = 'st_croix_chippewa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title St. Croix Chippewa
UPDATE `list_options` SET `notes` = '1144-5' WHERE `title` = 'St. Croix Chippewa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id st_george title St. George
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','st_george','St. George','7610', '0',' 2021-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id st_george
UPDATE `list_options` SET `notes` = '2021-4' WHERE `option_id` = 'st_george' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title St. George
UPDATE `list_options` SET `notes` = '2021-4' WHERE `title` = 'St. George' AND `list_id` = 'race';
#EndIf

#IfNotRow2D list_options list_id race option_id st_marys
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','st_marys',"St. Mary's",'7620', '0',' 1963-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id st_marys
UPDATE `list_options` SET `notes` = '1963-8' WHERE `option_id` = 'st_marys' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id st_michael title St. Michael
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','st_michael','St. Michael','7630', '0',' 1951-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id st_michael
UPDATE `list_options` SET `notes` = '1951-3' WHERE `option_id` = 'st_michael' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title St. Michael
UPDATE `list_options` SET `notes` = '1951-3' WHERE `title` = 'St. Michael' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id st_paul title St. Paul
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','st_paul','St. Paul','7640', '0',' 2022-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id st_paul
UPDATE `list_options` SET `notes` = '2022-2' WHERE `option_id` = 'st_paul' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title St. Paul
UPDATE `list_options` SET `notes` = '2022-2' WHERE `title` = 'St. Paul' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id standing_rock_sioux title Standing Rock Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','standing_rock_sioux','Standing Rock Sioux','7650', '0',' 1633-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id standing_rock_sioux
UPDATE `list_options` SET `notes` = '1633-7' WHERE `option_id` = 'standing_rock_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Standing Rock Sioux
UPDATE `list_options` SET `notes` = '1633-7' WHERE `title` = 'Standing Rock Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id star_clan_of_muscogee_creeks title Star Clan of Muscogee Creeks
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','star_clan_of_muscogee_creeks','Star Clan of Muscogee Creeks','7660', '0',' 1203-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id star_clan_of_muscogee_creeks
UPDATE `list_options` SET `notes` = '1203-9' WHERE `option_id` = 'star_clan_of_muscogee_creeks' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Star Clan of Muscogee Creeks
UPDATE `list_options` SET `notes` = '1203-9' WHERE `title` = 'Star Clan of Muscogee Creeks' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id stebbins title Stebbins
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','stebbins','Stebbins','7670', '0',' 1955-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id stebbins
UPDATE `list_options` SET `notes` = '1955-4' WHERE `option_id` = 'stebbins' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Stebbins
UPDATE `list_options` SET `notes` = '1955-4' WHERE `title` = 'Stebbins' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id steilacoom title Steilacoom
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','steilacoom','Steilacoom','7680', '0',' 1534-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id steilacoom
UPDATE `list_options` SET `notes` = '1534-7' WHERE `option_id` = 'steilacoom' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Steilacoom
UPDATE `list_options` SET `notes` = '1534-7' WHERE `title` = 'Steilacoom' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id stevens title Stevens
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','stevens','Stevens','7690', '0',' 1796-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id stevens
UPDATE `list_options` SET `notes` = '1796-2' WHERE `option_id` = 'stevens' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Stevens
UPDATE `list_options` SET `notes` = '1796-2' WHERE `title` = 'Stevens' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id stewart title Stewart
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','stewart','Stewart','7700', '0',' 1647-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id stewart
UPDATE `list_options` SET `notes` = '1647-7' WHERE `option_id` = 'stewart' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Stewart
UPDATE `list_options` SET `notes` = '1647-7' WHERE `title` = 'Stewart' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id stillaguamish title Stillaguamish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','stillaguamish','Stillaguamish','7710', '0',' 1535-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id stillaguamish
UPDATE `list_options` SET `notes` = '1535-4' WHERE `option_id` = 'stillaguamish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Stillaguamish
UPDATE `list_options` SET `notes` = '1535-4' WHERE `title` = 'Stillaguamish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id stockbridge title Stockbridge
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','stockbridge','Stockbridge','7720', '0',' 1649-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id stockbridge
UPDATE `list_options` SET `notes` = '1649-3' WHERE `option_id` = 'stockbridge' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Stockbridge
UPDATE `list_options` SET `notes` = '1649-3' WHERE `title` = 'Stockbridge' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id stony_river title Stony River
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','stony_river','Stony River','7730', '0',' 1797-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id stony_river
UPDATE `list_options` SET `notes` = '1797-0' WHERE `option_id` = 'stony_river' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Stony River
UPDATE `list_options` SET `notes` = '1797-0' WHERE `title` = 'Stony River' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id stonyford title Stonyford
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','stonyford','Stonyford','7740', '0',' 1471-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id stonyford
UPDATE `list_options` SET `notes` = '1471-2' WHERE `option_id` = 'stonyford' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Stonyford
UPDATE `list_options` SET `notes` = '1471-2' WHERE `title` = 'Stonyford' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sugpiaq title Sugpiaq
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sugpiaq','Sugpiaq','7750', '0',' 2002-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id sugpiaq
UPDATE `list_options` SET `notes` = '2002-4' WHERE `option_id` = 'sugpiaq' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sugpiaq
UPDATE `list_options` SET `notes` = '2002-4' WHERE `title` = 'Sugpiaq' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sulphur_bank title Sulphur Bank
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sulphur_bank','Sulphur Bank','7760', '0',' 1472-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id sulphur_bank
UPDATE `list_options` SET `notes` = '1472-0' WHERE `option_id` = 'sulphur_bank' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sulphur Bank
UPDATE `list_options` SET `notes` = '1472-0' WHERE `title` = 'Sulphur Bank' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id summit_lake title Summit Lake
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','summit_lake','Summit Lake','7770', '0',' 1434-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id summit_lake
UPDATE `list_options` SET `notes` = '1434-0' WHERE `option_id` = 'summit_lake' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Summit Lake
UPDATE `list_options` SET `notes` = '1434-0' WHERE `title` = 'Summit Lake' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id suqpigaq title Suqpigaq
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','suqpigaq','Suqpigaq','7780', '0',' 2004-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id suqpigaq
UPDATE `list_options` SET `notes` = '2004-0' WHERE `option_id` = 'suqpigaq' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Suqpigaq
UPDATE `list_options` SET `notes` = '2004-0' WHERE `title` = 'Suqpigaq' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id suquamish title Suquamish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','suquamish','Suquamish','7790', '0',' 1536-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id suquamish
UPDATE `list_options` SET `notes` = '1536-2' WHERE `option_id` = 'suquamish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Suquamish
UPDATE `list_options` SET `notes` = '1536-2' WHERE `title` = 'Suquamish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id susanville title Susanville
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','susanville','Susanville','7800', '0',' 1651-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id susanville
UPDATE `list_options` SET `notes` = '1651-9' WHERE `option_id` = 'susanville' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Susanville
UPDATE `list_options` SET `notes` = '1651-9' WHERE `title` = 'Susanville' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id susquehanock title Susquehanock
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','susquehanock','Susquehanock','7810', '0',' 1245-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id susquehanock
UPDATE `list_options` SET `notes` = '1245-0' WHERE `option_id` = 'susquehanock' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Susquehanock
UPDATE `list_options` SET `notes` = '1245-0' WHERE `title` = 'Susquehanock' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id swinomish title Swinomish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','swinomish','Swinomish','7820', '0',' 1537-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id swinomish
UPDATE `list_options` SET `notes` = '1537-0' WHERE `option_id` = 'swinomish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Swinomish
UPDATE `list_options` SET `notes` = '1537-0' WHERE `title` = 'Swinomish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id sycuan title Sycuan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','sycuan','Sycuan','7830', '0',' 1231-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id sycuan
UPDATE `list_options` SET `notes` = '1231-0' WHERE `option_id` = 'sycuan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Sycuan
UPDATE `list_options` SET `notes` = '1231-0' WHERE `title` = 'Sycuan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id syrian title Syrian
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','syrian','Syrian','7840', '0',' 2125-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id syrian
UPDATE `list_options` SET `notes` = '2125-3' WHERE `option_id` = 'syrian' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Syrian
UPDATE `list_options` SET `notes` = '2125-3' WHERE `title` = 'Syrian' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id table_bluff title Table Bluff
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','table_bluff','Table Bluff','7850', '0',' 1705-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id table_bluff
UPDATE `list_options` SET `notes` = '1705-3' WHERE `option_id` = 'table_bluff' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Table Bluff
UPDATE `list_options` SET `notes` = '1705-3' WHERE `title` = 'Table Bluff' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tachi title Tachi
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tachi','Tachi','7860', '0',' 1719-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id tachi
UPDATE `list_options` SET `notes` = '1719-4' WHERE `option_id` = 'tachi' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tachi
UPDATE `list_options` SET `notes` = '1719-4' WHERE `title` = 'Tachi' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tahitian title Tahitian
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tahitian','Tahitian','7870', '0',' 2081-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id tahitian
UPDATE `list_options` SET `notes` = '2081-8' WHERE `option_id` = 'tahitian' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tahitian
UPDATE `list_options` SET `notes` = '2081-8' WHERE `title` = 'Tahitian' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id taiwanese title Taiwanese
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','taiwanese','Taiwanese','7880', '0',' 2035-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id taiwanese
UPDATE `list_options` SET `notes` = '2035-4' WHERE `option_id` = 'taiwanese' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Taiwanese
UPDATE `list_options` SET `notes` = '2035-4' WHERE `title` = 'Taiwanese' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id takelma title Takelma
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','takelma','Takelma','7890', '0',' 1063-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id takelma
UPDATE `list_options` SET `notes` = '1063-7' WHERE `option_id` = 'takelma' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Takelma
UPDATE `list_options` SET `notes` = '1063-7' WHERE `title` = 'Takelma' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id takotna title Takotna
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','takotna','Takotna','7900', '0',' 1798-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id takotna
UPDATE `list_options` SET `notes` = '1798-8' WHERE `option_id` = 'takotna' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Takotna
UPDATE `list_options` SET `notes` = '1798-8' WHERE `title` = 'Takotna' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id talakamish title Talakamish
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','talakamish','Talakamish','7910', '0',' 1397-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id talakamish
UPDATE `list_options` SET `notes` = '1397-9' WHERE `option_id` = 'talakamish' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Talakamish
UPDATE `list_options` SET `notes` = '1397-9' WHERE `title` = 'Talakamish' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tanacross title Tanacross
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tanacross','Tanacross','7920', '0',' 1799-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id tanacross
UPDATE `list_options` SET `notes` = '1799-6' WHERE `option_id` = 'tanacross' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tanacross
UPDATE `list_options` SET `notes` = '1799-6' WHERE `title` = 'Tanacross' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tanaina title Tanaina
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tanaina','Tanaina','7930', '0',' 1800-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id tanaina
UPDATE `list_options` SET `notes` = '1800-2' WHERE `option_id` = 'tanaina' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tanaina
UPDATE `list_options` SET `notes` = '1800-2' WHERE `title` = 'Tanaina' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tanana title Tanana
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tanana','Tanana','7940', '0',' 1801-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id tanana
UPDATE `list_options` SET `notes` = '1801-0' WHERE `option_id` = 'tanana' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tanana
UPDATE `list_options` SET `notes` = '1801-0' WHERE `title` = 'Tanana' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tanana_chiefs title Tanana Chiefs
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tanana_chiefs','Tanana Chiefs','7950', '0',' 1802-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id tanana_chiefs
UPDATE `list_options` SET `notes` = '1802-8' WHERE `option_id` = 'tanana_chiefs' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tanana Chiefs
UPDATE `list_options` SET `notes` = '1802-8' WHERE `title` = 'Tanana Chiefs' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id taos title Taos
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','taos','Taos','7960', '0',' 1511-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id taos
UPDATE `list_options` SET `notes` = '1511-5' WHERE `option_id` = 'taos' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Taos
UPDATE `list_options` SET `notes` = '1511-5' WHERE `title` = 'Taos' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tatitlek title Tatitlek
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tatitlek','Tatitlek','7970', '0',' 1969-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id tatitlek
UPDATE `list_options` SET `notes` = '1969-5' WHERE `option_id` = 'tatitlek' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tatitlek
UPDATE `list_options` SET `notes` = '1969-5' WHERE `title` = 'Tatitlek' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tazlina title Tazlina
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tazlina','Tazlina','7980', '0',' 1803-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id tazlina
UPDATE `list_options` SET `notes` = '1803-6' WHERE `option_id` = 'tazlina' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tazlina
UPDATE `list_options` SET `notes` = '1803-6' WHERE `title` = 'Tazlina' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id telida title Telida
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','telida','Telida','7990', '0',' 1804-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id telida
UPDATE `list_options` SET `notes` = '1804-4' WHERE `option_id` = 'telida' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Telida
UPDATE `list_options` SET `notes` = '1804-4' WHERE `title` = 'Telida' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id teller title Teller
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','teller','Teller','8000', '0',' 1883-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id teller
UPDATE `list_options` SET `notes` = '1883-8' WHERE `option_id` = 'teller' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Teller
UPDATE `list_options` SET `notes` = '1883-8' WHERE `title` = 'Teller' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id temecula title Temecula
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','temecula','Temecula','8010', '0',' 1338-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id temecula
UPDATE `list_options` SET `notes` = '1338-3' WHERE `option_id` = 'temecula' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Temecula
UPDATE `list_options` SET `notes` = '1338-3' WHERE `title` = 'Temecula' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id te-moak_western_shoshone title Te-Moak Western Shoshone
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','te-moak_western_shoshone','Te-Moak Western Shoshone','8020', '0',' 1596-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id te-moak_western_shoshone
UPDATE `list_options` SET `notes` = '1596-6' WHERE `option_id` = 'te-moak_western_shoshone' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Te-Moak Western Shoshone
UPDATE `list_options` SET `notes` = '1596-6' WHERE `title` = 'Te-Moak Western Shoshone' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tenakee_springs title Tenakee Springs
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tenakee_springs','Tenakee Springs','8030', '0',' 1832-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id tenakee_springs
UPDATE `list_options` SET `notes` = '1832-5' WHERE `option_id` = 'tenakee_springs' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tenakee Springs
UPDATE `list_options` SET `notes` = '1832-5' WHERE `title` = 'Tenakee Springs' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tenino title Tenino
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tenino','Tenino','8040', '0',' 1398-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id tenino
UPDATE `list_options` SET `notes` = '1398-7' WHERE `option_id` = 'tenino' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tenino
UPDATE `list_options` SET `notes` = '1398-7' WHERE `title` = 'Tenino' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tesuque title Tesuque
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tesuque','Tesuque','8050', '0',' 1512-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id tesuque
UPDATE `list_options` SET `notes` = '1512-3' WHERE `option_id` = 'tesuque' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tesuque
UPDATE `list_options` SET `notes` = '1512-3' WHERE `title` = 'Tesuque' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tetlin title Tetlin
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tetlin','Tetlin','8060', '0',' 1805-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id tetlin
UPDATE `list_options` SET `notes` = '1805-1' WHERE `option_id` = 'tetlin' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tetlin
UPDATE `list_options` SET `notes` = '1805-1' WHERE `title` = 'Tetlin' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id teton_sioux title Teton Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','teton_sioux','Teton Sioux','8070', '0',' 1634-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id teton_sioux
UPDATE `list_options` SET `notes` = '1634-5' WHERE `option_id` = 'teton_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Teton Sioux
UPDATE `list_options` SET `notes` = '1634-5' WHERE `title` = 'Teton Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tewa title Tewa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tewa','Tewa','8080', '0',' 1513-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id tewa
UPDATE `list_options` SET `notes` = '1513-1' WHERE `option_id` = 'tewa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tewa
UPDATE `list_options` SET `notes` = '1513-1' WHERE `title` = 'Tewa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id texas_kickapoo title Texas Kickapoo
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','texas_kickapoo','Texas Kickapoo','8090', '0',' 1307-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id texas_kickapoo
UPDATE `list_options` SET `notes` = '1307-8' WHERE `option_id` = 'texas_kickapoo' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Texas Kickapoo
UPDATE `list_options` SET `notes` = '1307-8' WHERE `title` = 'Texas Kickapoo' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id thai title Thai
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','thai','Thai','8100', '0',' 2046-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id thai
UPDATE `list_options` SET `notes` = '2046-1' WHERE `option_id` = 'thai' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Thai
UPDATE `list_options` SET `notes` = '2046-1' WHERE `title` = 'Thai' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id thlopthlocco title Thlopthlocco
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','thlopthlocco','Thlopthlocco','8110', '0',' 1204-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id thlopthlocco
UPDATE `list_options` SET `notes` = '1204-7' WHERE `option_id` = 'thlopthlocco' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Thlopthlocco
UPDATE `list_options` SET `notes` = '1204-7' WHERE `title` = 'Thlopthlocco' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tigua title Tigua
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tigua','Tigua','8120', '0',' 1514-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id tigua
UPDATE `list_options` SET `notes` = '1514-9' WHERE `option_id` = 'tigua' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tigua
UPDATE `list_options` SET `notes` = '1514-9' WHERE `title` = 'Tigua' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tillamook title Tillamook
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tillamook','Tillamook','8130', '0',' 1399-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id tillamook
UPDATE `list_options` SET `notes` = '1399-5' WHERE `option_id` = 'tillamook' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tillamook
UPDATE `list_options` SET `notes` = '1399-5' WHERE `title` = 'Tillamook' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id timbi-sha_shoshone title Timbi-Sha Shoshone
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','timbi-sha_shoshone','Timbi-Sha Shoshone','8140', '0',' 1597-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id timbi-sha_shoshone
UPDATE `list_options` SET `notes` = '1597-4' WHERE `option_id` = 'timbi-sha_shoshone' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Timbi-Sha Shoshone
UPDATE `list_options` SET `notes` = '1597-4' WHERE `title` = 'Timbi-Sha Shoshone' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tlingit title Tlingit
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tlingit','Tlingit','8150', '0',' 1833-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id tlingit
UPDATE `list_options` SET `notes` = '1833-3' WHERE `option_id` = 'tlingit' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tlingit
UPDATE `list_options` SET `notes` = '1833-3' WHERE `title` = 'Tlingit' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tlingit-haida title Tlingit-Haida
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tlingit-haida','Tlingit-Haida','8160', '0',' 1813-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id tlingit-haida
UPDATE `list_options` SET `notes` = '1813-5' WHERE `option_id` = 'tlingit-haida' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tlingit-Haida
UPDATE `list_options` SET `notes` = '1813-5' WHERE `title` = 'Tlingit-Haida' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tobagoan title Tobagoan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tobagoan','Tobagoan','8170', '0',' 2073-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id tobagoan
UPDATE `list_options` SET `notes` = '2073-5' WHERE `option_id` = 'tobagoan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tobagoan
UPDATE `list_options` SET `notes` = '2073-5' WHERE `title` = 'Tobagoan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id togiak title Togiak
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','togiak','Togiak','8180', '0',' 1956-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id togiak
UPDATE `list_options` SET `notes` = '1956-2' WHERE `option_id` = 'togiak' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Togiak
UPDATE `list_options` SET `notes` = '1956-2' WHERE `title` = 'Togiak' AND `list_id` = 'race';
#EndIf

#IfNotRow2D list_options list_id race option_id tohono_oodham
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tohono_oodham',"Tohono O'Odham",'8190', '0',' 1653-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id tohono_oodham
UPDATE `list_options` SET `notes` = '1653-5' WHERE `option_id` = 'tohono_oodham' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tok title Tok
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tok','Tok','8200', '0',' 1806-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id tok
UPDATE `list_options` SET `notes` = '1806-9' WHERE `option_id` = 'tok' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tok
UPDATE `list_options` SET `notes` = '1806-9' WHERE `title` = 'Tok' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tokelauan title Tokelauan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tokelauan','Tokelauan','8210', '0',' 2083-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id tokelauan
UPDATE `list_options` SET `notes` = '2083-4' WHERE `option_id` = 'tokelauan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tokelauan
UPDATE `list_options` SET `notes` = '2083-4' WHERE `title` = 'Tokelauan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id toksook title Toksook
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','toksook','Toksook','8220', '0',' 1957-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id toksook
UPDATE `list_options` SET `notes` = '1957-0' WHERE `option_id` = 'toksook' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Toksook
UPDATE `list_options` SET `notes` = '1957-0' WHERE `title` = 'Toksook' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tolowa title Tolowa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tolowa','Tolowa','8230', '0',' 1659-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id tolowa
UPDATE `list_options` SET `notes` = '1659-2' WHERE `option_id` = 'tolowa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tolowa
UPDATE `list_options` SET `notes` = '1659-2' WHERE `title` = 'Tolowa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tonawanda_seneca title Tonawanda Seneca
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tonawanda_seneca','Tonawanda Seneca','8240', '0',' 1293-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id tonawanda_seneca
UPDATE `list_options` SET `notes` = '1293-0' WHERE `option_id` = 'tonawanda_seneca' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tonawanda Seneca
UPDATE `list_options` SET `notes` = '1293-0' WHERE `title` = 'Tonawanda Seneca' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tongan title Tongan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tongan','Tongan','8250', '0',' 2082-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id tongan
UPDATE `list_options` SET `notes` = '2082-6' WHERE `option_id` = 'tongan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tongan
UPDATE `list_options` SET `notes` = '2082-6' WHERE `title` = 'Tongan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tonkawa title Tonkawa
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tonkawa','Tonkawa','8260', '0',' 1661-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id tonkawa
UPDATE `list_options` SET `notes` = '1661-8' WHERE `option_id` = 'tonkawa' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tonkawa
UPDATE `list_options` SET `notes` = '1661-8' WHERE `title` = 'Tonkawa' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id torres-martinez title Torres-Martinez
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','torres-martinez','Torres-Martinez','8270', '0',' 1051-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id torres-martinez
UPDATE `list_options` SET `notes` = '1051-2' WHERE `option_id` = 'torres-martinez' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Torres-Martinez
UPDATE `list_options` SET `notes` = '1051-2' WHERE `title` = 'Torres-Martinez' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id trinidadian title Trinidadian
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','trinidadian','Trinidadian','8280', '0',' 2074-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id trinidadian
UPDATE `list_options` SET `notes` = '2074-3' WHERE `option_id` = 'trinidadian' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Trinidadian
UPDATE `list_options` SET `notes` = '2074-3' WHERE `title` = 'Trinidadian' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id trinity title Trinity
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','trinity','Trinity','8290', '0',' 1272-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id trinity
UPDATE `list_options` SET `notes` = '1272-4' WHERE `option_id` = 'trinity' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Trinity
UPDATE `list_options` SET `notes` = '1272-4' WHERE `title` = 'Trinity' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tsimshian title Tsimshian
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tsimshian','Tsimshian','8300', '0',' 1837-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id tsimshian
UPDATE `list_options` SET `notes` = '1837-4' WHERE `option_id` = 'tsimshian' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tsimshian
UPDATE `list_options` SET `notes` = '1837-4' WHERE `title` = 'Tsimshian' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tuckabachee title Tuckabachee
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tuckabachee','Tuckabachee','8310', '0',' 1205-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id tuckabachee
UPDATE `list_options` SET `notes` = '1205-4' WHERE `option_id` = 'tuckabachee' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tuckabachee
UPDATE `list_options` SET `notes` = '1205-4' WHERE `title` = 'Tuckabachee' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tulalip title Tulalip
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tulalip','Tulalip','8320', '0',' 1538-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id tulalip
UPDATE `list_options` SET `notes` = '1538-8' WHERE `option_id` = 'tulalip' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tulalip
UPDATE `list_options` SET `notes` = '1538-8' WHERE `title` = 'Tulalip' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tule_river title Tule River
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tule_river','Tule River','8330', '0',' 1720-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id tule_river
UPDATE `list_options` SET `notes` = '1720-2' WHERE `option_id` = 'tule_river' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tule River
UPDATE `list_options` SET `notes` = '1720-2' WHERE `title` = 'Tule River' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tulukskak title Tulukskak
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tulukskak','Tulukskak','8340', '0',' 1958-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id tulukskak
UPDATE `list_options` SET `notes` = '1958-8' WHERE `option_id` = 'tulukskak' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tulukskak
UPDATE `list_options` SET `notes` = '1958-8' WHERE `title` = 'Tulukskak' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tunica_biloxi title Tunica Biloxi
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tunica_biloxi','Tunica Biloxi','8350', '0',' 1246-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id tunica_biloxi
UPDATE `list_options` SET `notes` = '1246-8' WHERE `option_id` = 'tunica_biloxi' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tunica Biloxi
UPDATE `list_options` SET `notes` = '1246-8' WHERE `title` = 'Tunica Biloxi' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tuntutuliak title Tuntutuliak
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tuntutuliak','Tuntutuliak','8360', '0',' 1959-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id tuntutuliak
UPDATE `list_options` SET `notes` = '1959-6' WHERE `option_id` = 'tuntutuliak' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tuntutuliak
UPDATE `list_options` SET `notes` = '1959-6' WHERE `title` = 'Tuntutuliak' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tununak title Tununak
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tununak','Tununak','8370', '0',' 1960-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id tununak
UPDATE `list_options` SET `notes` = '1960-4' WHERE `option_id` = 'tununak' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tununak
UPDATE `list_options` SET `notes` = '1960-4' WHERE `title` = 'Tununak' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id turtle_mountain title Turtle Mountain
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','turtle_mountain','Turtle Mountain','8380', '0',' 1147-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id turtle_mountain
UPDATE `list_options` SET `notes` = '1147-8' WHERE `option_id` = 'turtle_mountain' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Turtle Mountain
UPDATE `list_options` SET `notes` = '1147-8' WHERE `title` = 'Turtle Mountain' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tuscarora title Tuscarora
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tuscarora','Tuscarora','8390', '0',' 1294-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id tuscarora
UPDATE `list_options` SET `notes` = '1294-8' WHERE `option_id` = 'tuscarora' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tuscarora
UPDATE `list_options` SET `notes` = '1294-8' WHERE `title` = 'Tuscarora' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tuscola title Tuscola
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tuscola','Tuscola','8400', '0',' 1096-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id tuscola
UPDATE `list_options` SET `notes` = '1096-7' WHERE `option_id` = 'tuscola' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tuscola
UPDATE `list_options` SET `notes` = '1096-7' WHERE `title` = 'Tuscola' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id twenty-nine_palms title Twenty-Nine Palms
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','twenty-nine_palms','Twenty-Nine Palms','8410', '0',' 1337-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id twenty-nine_palms
UPDATE `list_options` SET `notes` = '1337-5' WHERE `option_id` = 'twenty-nine_palms' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Twenty-Nine Palms
UPDATE `list_options` SET `notes` = '1337-5' WHERE `title` = 'Twenty-Nine Palms' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id twin_hills title Twin Hills
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','twin_hills','Twin Hills','8420', '0',' 1961-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id twin_hills
UPDATE `list_options` SET `notes` = '1961-2' WHERE `option_id` = 'twin_hills' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Twin Hills
UPDATE `list_options` SET `notes` = '1961-2' WHERE `title` = 'Twin Hills' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id two_kettle_sioux title Two Kettle Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','two_kettle_sioux','Two Kettle Sioux','8430', '0',' 1635-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id two_kettle_sioux
UPDATE `list_options` SET `notes` = '1635-2' WHERE `option_id` = 'two_kettle_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Two Kettle Sioux
UPDATE `list_options` SET `notes` = '1635-2' WHERE `title` = 'Two Kettle Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tygh title Tygh
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tygh','Tygh','8440', '0',' 1663-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id tygh
UPDATE `list_options` SET `notes` = '1663-4' WHERE `option_id` = 'tygh' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tygh
UPDATE `list_options` SET `notes` = '1663-4' WHERE `title` = 'Tygh' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id tyonek title Tyonek
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','tyonek','Tyonek','8450', '0',' 1807-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id tyonek
UPDATE `list_options` SET `notes` = '1807-7' WHERE `option_id` = 'tyonek' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Tyonek
UPDATE `list_options` SET `notes` = '1807-7' WHERE `title` = 'Tyonek' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id ugashik title Ugashik
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','ugashik','Ugashik','8460', '0',' 1970-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id ugashik
UPDATE `list_options` SET `notes` = '1970-3' WHERE `option_id` = 'ugashik' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Ugashik
UPDATE `list_options` SET `notes` = '1970-3' WHERE `title` = 'Ugashik' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id uintah_ute title Uintah Ute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','uintah_ute','Uintah Ute','8470', '0',' 1672-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id uintah_ute
UPDATE `list_options` SET `notes` = '1672-5' WHERE `option_id` = 'uintah_ute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Uintah Ute
UPDATE `list_options` SET `notes` = '1672-5' WHERE `title` = 'Uintah Ute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id umatilla title Umatilla
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','umatilla','Umatilla','8480', '0',' 1665-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id umatilla
UPDATE `list_options` SET `notes` = '1665-9' WHERE `option_id` = 'umatilla' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Umatilla
UPDATE `list_options` SET `notes` = '1665-9' WHERE `title` = 'Umatilla' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id umkumiate title Umkumiate
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','umkumiate','Umkumiate','8490', '0',' 1964-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id umkumiate
UPDATE `list_options` SET `notes` = '1964-6' WHERE `option_id` = 'umkumiate' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Umkumiate
UPDATE `list_options` SET `notes` = '1964-6' WHERE `title` = 'Umkumiate' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id umpqua title Umpqua
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','umpqua','Umpqua','8500', '0',' 1667-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id umpqua
UPDATE `list_options` SET `notes` = '1667-5' WHERE `option_id` = 'umpqua' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Umpqua
UPDATE `list_options` SET `notes` = '1667-5' WHERE `title` = 'Umpqua' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id unalakleet title Unalakleet
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','unalakleet','Unalakleet','8510', '0',' 1884-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id unalakleet
UPDATE `list_options` SET `notes` = '1884-6' WHERE `option_id` = 'unalakleet' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Unalakleet
UPDATE `list_options` SET `notes` = '1884-6' WHERE `title` = 'Unalakleet' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id unalaska title Unalaska
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','unalaska','Unalaska','8520', '0',' 2025-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id unalaska
UPDATE `list_options` SET `notes` = '2025-5' WHERE `option_id` = 'unalaska' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Unalaska
UPDATE `list_options` SET `notes` = '2025-5' WHERE `title` = 'Unalaska' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id unangan_aleut title Unangan Aleut
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','unangan_aleut','Unangan Aleut','8530', '0',' 2006-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id unangan_aleut
UPDATE `list_options` SET `notes` = '2006-5' WHERE `option_id` = 'unangan_aleut' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Unangan Aleut
UPDATE `list_options` SET `notes` = '2006-5' WHERE `title` = 'Unangan Aleut' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id unga title Unga
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','unga','Unga','8540', '0',' 2026-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id unga
UPDATE `list_options` SET `notes` = '2026-3' WHERE `option_id` = 'unga' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Unga
UPDATE `list_options` SET `notes` = '2026-3' WHERE `title` = 'Unga' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id united_ketowah_band_of_cheroke title United Keetowah Band of Cherokee
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','united_ketowah_band_of_cheroke','United Keetowah Band of Cherokee','8550', '0',' 1097-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id united_ketowah_band_of_cheroke
UPDATE `list_options` SET `notes` = '1097-5' WHERE `option_id` = 'united_ketowah_band_of_cheroke' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title United Keetowah Band of Cherokee
UPDATE `list_options` SET `notes` = '1097-5' WHERE `title` = 'United Keetowah Band of Cherokee' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id upper_chinook title Upper Chinook
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','upper_chinook','Upper Chinook','8560', '0',' 1118-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id upper_chinook
UPDATE `list_options` SET `notes` = '1118-9' WHERE `option_id` = 'upper_chinook' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Upper Chinook
UPDATE `list_options` SET `notes` = '1118-9' WHERE `title` = 'Upper Chinook' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id upper_sioux title Upper Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','upper_sioux','Upper Sioux','8570', '0',' 1636-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id upper_sioux
UPDATE `list_options` SET `notes` = '1636-0' WHERE `option_id` = 'upper_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Upper Sioux
UPDATE `list_options` SET `notes` = '1636-0' WHERE `title` = 'Upper Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id upper_skagit title Upper Skagit
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','upper_skagit','Upper Skagit','8580', '0',' 1539-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id upper_skagit
UPDATE `list_options` SET `notes` = '1539-6' WHERE `option_id` = 'upper_skagit' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Upper Skagit
UPDATE `list_options` SET `notes` = '1539-6' WHERE `title` = 'Upper Skagit' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id ute title Ute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','ute','Ute','8590', '0',' 1670-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id ute
UPDATE `list_options` SET `notes` = '1670-9' WHERE `option_id` = 'ute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Ute
UPDATE `list_options` SET `notes` = '1670-9' WHERE `title` = 'Ute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id ute_mountain_ute title Ute Mountain Ute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','ute_mountain_ute','Ute Mountain Ute','8600', '0',' 1673-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id ute_mountain_ute
UPDATE `list_options` SET `notes` = '1673-3' WHERE `option_id` = 'ute_mountain_ute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Ute Mountain Ute
UPDATE `list_options` SET `notes` = '1673-3' WHERE `title` = 'Ute Mountain Ute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id utu_utu_gwaitu_paiute title Utu Utu Gwaitu Paiute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','utu_utu_gwaitu_paiute','Utu Utu Gwaitu Paiute','8610', '0',' 1435-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id utu_utu_gwaitu_paiute
UPDATE `list_options` SET `notes` = '1435-7' WHERE `option_id` = 'utu_utu_gwaitu_paiute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Utu Utu Gwaitu Paiute
UPDATE `list_options` SET `notes` = '1435-7' WHERE `title` = 'Utu Utu Gwaitu Paiute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id venetie title Venetie
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','venetie','Venetie','8620', '0',' 1808-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id venetie
UPDATE `list_options` SET `notes` = '1808-5' WHERE `option_id` = 'venetie' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Venetie
UPDATE `list_options` SET `notes` = '1808-5' WHERE `title` = 'Venetie' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id vietnamese title Vietnamese
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','vietnamese','Vietnamese','8630', '0',' 2047-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id vietnamese
UPDATE `list_options` SET `notes` = '2047-9' WHERE `option_id` = 'vietnamese' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Vietnamese
UPDATE `list_options` SET `notes` = '2047-9' WHERE `title` = 'Vietnamese' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id waccamaw-siousan title Waccamaw-Siousan
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','waccamaw-siousan','Waccamaw-Siousan','8640', '0',' 1247-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id waccamaw-siousan
UPDATE `list_options` SET `notes` = '1247-6' WHERE `option_id` = 'waccamaw-siousan' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Waccamaw-Siousan
UPDATE `list_options` SET `notes` = '1247-6' WHERE `title` = 'Waccamaw-Siousan' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wahpekute_sioux title Wahpekute Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wahpekute_sioux','Wahpekute Sioux','8650', '0',' 1637-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id wahpekute_sioux
UPDATE `list_options` SET `notes` = '1637-8' WHERE `option_id` = 'wahpekute_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wahpekute Sioux
UPDATE `list_options` SET `notes` = '1637-8' WHERE `title` = 'Wahpekute Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wahpeton_sioux title Wahpeton Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wahpeton_sioux','Wahpeton Sioux','8660', '0',' 1638-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id wahpeton_sioux
UPDATE `list_options` SET `notes` = '1638-6' WHERE `option_id` = 'wahpeton_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wahpeton Sioux
UPDATE `list_options` SET `notes` = '1638-6' WHERE `title` = 'Wahpeton Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wailaki title Wailaki
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wailaki','Wailaki','8670', '0',' 1675-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id wailaki
UPDATE `list_options` SET `notes` = '1675-8' WHERE `option_id` = 'wailaki' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wailaki
UPDATE `list_options` SET `notes` = '1675-8' WHERE `title` = 'Wailaki' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wainwright title Wainwright
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wainwright','Wainwright','8680', '0',' 1885-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id wainwright
UPDATE `list_options` SET `notes` = '1885-3' WHERE `option_id` = 'wainwright' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wainwright
UPDATE `list_options` SET `notes` = '1885-3' WHERE `title` = 'Wainwright' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wakiakum_chinook title Wakiakum Chinook
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wakiakum_chinook','Wakiakum Chinook','8690', '0',' 1119-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id wakiakum_chinook
UPDATE `list_options` SET `notes` = '1119-7' WHERE `option_id` = 'wakiakum_chinook' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wakiakum Chinook
UPDATE `list_options` SET `notes` = '1119-7' WHERE `title` = 'Wakiakum Chinook' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wales title Wales
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wales','Wales','8700', '0',' 1886-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id wales
UPDATE `list_options` SET `notes` = '1886-1' WHERE `option_id` = 'wales' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wales
UPDATE `list_options` SET `notes` = '1886-1' WHERE `title` = 'Wales' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id walker_river title Walker River
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','walker_river','Walker River','8710', '0',' 1436-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id walker_river
UPDATE `list_options` SET `notes` = '1436-5' WHERE `option_id` = 'walker_river' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Walker River
UPDATE `list_options` SET `notes` = '1436-5' WHERE `title` = 'Walker River' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id walla-walla title Walla-Walla
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','walla-walla','Walla-Walla','8720', '0',' 1677-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id walla-walla
UPDATE `list_options` SET `notes` = '1677-4' WHERE `option_id` = 'walla-walla' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Walla-Walla
UPDATE `list_options` SET `notes` = '1677-4' WHERE `title` = 'Walla-Walla' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wampanoag title Wampanoag
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wampanoag','Wampanoag','8730', '0',' 1679-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id wampanoag
UPDATE `list_options` SET `notes` = '1679-0' WHERE `option_id` = 'wampanoag' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wampanoag
UPDATE `list_options` SET `notes` = '1679-0' WHERE `title` = 'Wampanoag' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wappo title Wappo
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wappo','Wappo','8740', '0',' 1064-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id wappo
UPDATE `list_options` SET `notes` = '1064-5' WHERE `option_id` = 'wappo' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wappo
UPDATE `list_options` SET `notes` = '1064-5' WHERE `title` = 'Wappo' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id warm_springs title Warm Springs
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','warm_springs','Warm Springs','8750', '0',' 1683-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id warm_springs
UPDATE `list_options` SET `notes` = '1683-2' WHERE `option_id` = 'warm_springs' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Warm Springs
UPDATE `list_options` SET `notes` = '1683-2' WHERE `title` = 'Warm Springs' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wascopum title Wascopum
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wascopum','Wascopum','8760', '0',' 1685-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id wascopum
UPDATE `list_options` SET `notes` = '1685-7' WHERE `option_id` = 'wascopum' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wascopum
UPDATE `list_options` SET `notes` = '1685-7' WHERE `title` = 'Wascopum' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id washakie title Washakie
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','washakie','Washakie','8770', '0',' 1598-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id washakie
UPDATE `list_options` SET `notes` = '1598-2' WHERE `option_id` = 'washakie' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Washakie
UPDATE `list_options` SET `notes` = '1598-2' WHERE `title` = 'Washakie' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id washoe title Washoe
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','washoe','Washoe','8780', '0',' 1687-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id washoe
UPDATE `list_options` SET `notes` = '1687-3' WHERE `option_id` = 'washoe' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Washoe
UPDATE `list_options` SET `notes` = '1687-3' WHERE `title` = 'Washoe' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wazhaza_sioux title Wazhaza Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wazhaza_sioux','Wazhaza Sioux','8790', '0',' 1639-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id wazhaza_sioux
UPDATE `list_options` SET `notes` = '1639-4' WHERE `option_id` = 'wazhaza_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wazhaza Sioux
UPDATE `list_options` SET `notes` = '1639-4' WHERE `title` = 'Wazhaza Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wenatchee title Wenatchee
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wenatchee','Wenatchee','8800', '0',' 1400-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id wenatchee
UPDATE `list_options` SET `notes` = '1400-1' WHERE `option_id` = 'wenatchee' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wenatchee
UPDATE `list_options` SET `notes` = '1400-1' WHERE `title` = 'Wenatchee' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id west_indian title West Indian
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','west_indian','West Indian','8810', '0',' 2075-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id west_indian
UPDATE `list_options` SET `notes` = '2075-0' WHERE `option_id` = 'west_indian' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title West Indian
UPDATE `list_options` SET `notes` = '2075-0' WHERE `title` = 'West Indian' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id western_cherokee title Western Cherokee
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','western_cherokee','Western Cherokee','8820', '0',' 1098-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id western_cherokee
UPDATE `list_options` SET `notes` = '1098-3' WHERE `option_id` = 'western_cherokee' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Western Cherokee
UPDATE `list_options` SET `notes` = '1098-3' WHERE `title` = 'Western Cherokee' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id western_chickahominy title Western Chickahominy
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','western_chickahominy','Western Chickahominy','8830', '0',' 1110-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id western_chickahominy
UPDATE `list_options` SET `notes` = '1110-6' WHERE `option_id` = 'western_chickahominy' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Western Chickahominy
UPDATE `list_options` SET `notes` = '1110-6' WHERE `title` = 'Western Chickahominy' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id whilkut title Whilkut
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','whilkut','Whilkut','8840', '0',' 1273-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id whilkut
UPDATE `list_options` SET `notes` = '1273-2' WHERE `option_id` = 'whilkut' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Whilkut
UPDATE `list_options` SET `notes` = '1273-2' WHERE `title` = 'Whilkut' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id white_earth title White Earth
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','white_earth','White Earth','8860', '0',' 1148-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id white_earth
UPDATE `list_options` SET `notes` = '1148-6' WHERE `option_id` = 'white_earth' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title White Earth
UPDATE `list_options` SET `notes` = '1148-6' WHERE `title` = 'White Earth' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id white_mountain title White Mountain
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','white_mountain','White Mountain','8870', '0',' 1887-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id white_mountain
UPDATE `list_options` SET `notes` = '1887-9' WHERE `option_id` = 'white_mountain' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title White Mountain
UPDATE `list_options` SET `notes` = '1887-9' WHERE `title` = 'White Mountain' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id white_mountain_apache title White Mountain Apache
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','white_mountain_apache','White Mountain Apache','8880', '0',' 1019-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id white_mountain_apache
UPDATE `list_options` SET `notes` = '1019-9' WHERE `option_id` = 'white_mountain_apache' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title White Mountain Apache
UPDATE `list_options` SET `notes` = '1019-9' WHERE `title` = 'White Mountain Apache' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id white_mountain_inupiat title White Mountain Inupiat
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','white_mountain_inupiat','White Mountain Inupiat','8890', '0',' 1888-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id white_mountain_inupiat
UPDATE `list_options` SET `notes` = '1888-7' WHERE `option_id` = 'white_mountain_inupiat' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title White Mountain Inupiat
UPDATE `list_options` SET `notes` = '1888-7' WHERE `title` = 'White Mountain Inupiat' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wichita title Wichita
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wichita','Wichita','8900', '0',' 1692-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id wichita
UPDATE `list_options` SET `notes` = '1692-3' WHERE `option_id` = 'wichita' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wichita
UPDATE `list_options` SET `notes` = '1692-3' WHERE `title` = 'Wichita' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wicomico title Wicomico
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wicomico','Wicomico','8910', '0',' 1248-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id wicomico
UPDATE `list_options` SET `notes` = '1248-4' WHERE `option_id` = 'wicomico' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wicomico
UPDATE `list_options` SET `notes` = '1248-4' WHERE `title` = 'Wicomico' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id willapa_chinook title Willapa Chinook
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','willapa_chinook','Willapa Chinook','8920', '0',' 1120-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id willapa_chinook
UPDATE `list_options` SET `notes` = '1120-5' WHERE `option_id` = 'willapa_chinook' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Willapa Chinook
UPDATE `list_options` SET `notes` = '1120-5' WHERE `title` = 'Willapa Chinook' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wind_river title Wind River
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wind_river','Wind River','8930', '0',' 1694-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id wind_river
UPDATE `list_options` SET `notes` = '1694-9' WHERE `option_id` = 'wind_river' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wind River
UPDATE `list_options` SET `notes` = '1694-9' WHERE `title` = 'Wind River' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wind_river_arapaho title Wind River Arapaho
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wind_river_arapaho','Wind River Arapaho','8940', '0',' 1024-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id wind_river_arapaho
UPDATE `list_options` SET `notes` = '1024-9' WHERE `option_id` = 'wind_river_arapaho' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wind River Arapaho
UPDATE `list_options` SET `notes` = '1024-9' WHERE `title` = 'Wind River Arapaho' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wind_river_shoshone title Wind River Shoshone
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wind_river_shoshone','Wind River Shoshone','8950', '0',' 1599-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id wind_river_shoshone
UPDATE `list_options` SET `notes` = '1599-0' WHERE `option_id` = 'wind_river_shoshone' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wind River Shoshone
UPDATE `list_options` SET `notes` = '1599-0' WHERE `title` = 'Wind River Shoshone' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id winnebago title Winnebago
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','winnebago','Winnebago','8960', '0',' 1696-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id winnebago
UPDATE `list_options` SET `notes` = '1696-4' WHERE `option_id` = 'winnebago' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Winnebago
UPDATE `list_options` SET `notes` = '1696-4' WHERE `title` = 'Winnebago' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id winnemucca title Winnemucca
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','winnemucca','Winnemucca','8970', '0',' 1700-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id winnemucca
UPDATE `list_options` SET `notes` = '1700-4' WHERE `option_id` = 'winnemucca' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Winnemucca
UPDATE `list_options` SET `notes` = '1700-4' WHERE `title` = 'Winnemucca' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wintun title Wintun
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wintun','Wintun','8980', '0',' 1702-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id wintun
UPDATE `list_options` SET `notes` = '1702-0' WHERE `option_id` = 'wintun' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wintun
UPDATE `list_options` SET `notes` = '1702-0' WHERE `title` = 'Wintun' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wisconsin_potawatomi title Wisconsin Potawatomi
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wisconsin_potawatomi','Wisconsin Potawatomi','8990', '0',' 1485-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id wisconsin_potawatomi
UPDATE `list_options` SET `notes` = '1485-2' WHERE `option_id` = 'wisconsin_potawatomi' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wisconsin Potawatomi
UPDATE `list_options` SET `notes` = '1485-2' WHERE `title` = 'Wisconsin Potawatomi' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wiseman title Wiseman
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wiseman','Wiseman','9000', '0',' 1809-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id wiseman
UPDATE `list_options` SET `notes` = '1809-3' WHERE `option_id` = 'wiseman' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wiseman
UPDATE `list_options` SET `notes` = '1809-3' WHERE `title` = 'Wiseman' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wishram title Wishram
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wishram','Wishram','9010', '0',' 1121-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id wishram
UPDATE `list_options` SET `notes` = '1121-3' WHERE `option_id` = 'wishram' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wishram
UPDATE `list_options` SET `notes` = '1121-3' WHERE `title` = 'Wishram' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wiyot title Wiyot
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wiyot','Wiyot','9020', '0',' 1704-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id wiyot
UPDATE `list_options` SET `notes` = '1704-6' WHERE `option_id` = 'wiyot' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wiyot
UPDATE `list_options` SET `notes` = '1704-6' WHERE `title` = 'Wiyot' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wrangell title Wrangell
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wrangell','Wrangell','9030', '0',' 1834-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id wrangell
UPDATE `list_options` SET `notes` = '1834-1' WHERE `option_id` = 'wrangell' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wrangell
UPDATE `list_options` SET `notes` = '1834-1' WHERE `title` = 'Wrangell' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id wyandotte title Wyandotte
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','wyandotte','Wyandotte','9040', '0',' 1295-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id wyandotte
UPDATE `list_options` SET `notes` = '1295-5' WHERE `option_id` = 'wyandotte' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Wyandotte
UPDATE `list_options` SET `notes` = '1295-5' WHERE `title` = 'Wyandotte' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yahooskin title Yahooskin
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yahooskin','Yahooskin','9050', '0',' 1401-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id yahooskin
UPDATE `list_options` SET `notes` = '1401-9' WHERE `option_id` = 'yahooskin' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yahooskin
UPDATE `list_options` SET `notes` = '1401-9' WHERE `title` = 'Yahooskin' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yakama title Yakama
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yakama','Yakama','9060', '0',' 1707-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id yakama
UPDATE `list_options` SET `notes` = '1707-9' WHERE `option_id` = 'yakama' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yakama
UPDATE `list_options` SET `notes` = '1707-9' WHERE `title` = 'Yakama' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yakama_cowlitz title Yakama Cowlitz
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yakama_cowlitz','Yakama Cowlitz','9070', '0',' 1709-5', 0);
#EndIf

#IfRow2D list_options list_id race option_id yakama_cowlitz
UPDATE `list_options` SET `notes` = '1709-5' WHERE `option_id` = 'yakama_cowlitz' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yakama Cowlitz
UPDATE `list_options` SET `notes` = '1709-5' WHERE `title` = 'Yakama Cowlitz' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yakutat title Yakutat
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yakutat','Yakutat','9080', '0',' 1835-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id yakutat
UPDATE `list_options` SET `notes` = '1835-8' WHERE `option_id` = 'yakutat' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yakutat
UPDATE `list_options` SET `notes` = '1835-8' WHERE `title` = 'Yakutat' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yana title Yana
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yana','Yana','9090', '0',' 1065-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id yana
UPDATE `list_options` SET `notes` = '1065-2' WHERE `option_id` = 'yana' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yana
UPDATE `list_options` SET `notes` = '1065-2' WHERE `title` = 'Yana' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yankton_sioux title Yankton Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yankton_sioux','Yankton Sioux','9100', '0',' 1640-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id yankton_sioux
UPDATE `list_options` SET `notes` = '1640-2' WHERE `option_id` = 'yankton_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yankton Sioux
UPDATE `list_options` SET `notes` = '1640-2' WHERE `title` = 'Yankton Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yanktonai_sioux title Yanktonai Sioux
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yanktonai_sioux','Yanktonai Sioux','9110', '0',' 1641-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id yanktonai_sioux
UPDATE `list_options` SET `notes` = '1641-0' WHERE `option_id` = 'yanktonai_sioux' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yanktonai Sioux
UPDATE `list_options` SET `notes` = '1641-0' WHERE `title` = 'Yanktonai Sioux' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yapese title Yapese
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yapese','Yapese','9120', '0',' 2098-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id yapese
UPDATE `list_options` SET `notes` = '2098-2' WHERE `option_id` = 'yapese' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yapese
UPDATE `list_options` SET `notes` = '2098-2' WHERE `title` = 'Yapese' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yaqui title Yaqui
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yaqui','Yaqui','9130', '0',' 1711-1', 0);
#EndIf

#IfRow2D list_options list_id race option_id yaqui
UPDATE `list_options` SET `notes` = '1711-1' WHERE `option_id` = 'yaqui' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yaqui
UPDATE `list_options` SET `notes` = '1711-1' WHERE `title` = 'Yaqui' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yavapai title Yavapai
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yavapai','Yavapai','9140', '0',' 1731-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id yavapai
UPDATE `list_options` SET `notes` = '1731-9' WHERE `option_id` = 'yavapai' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yavapai
UPDATE `list_options` SET `notes` = '1731-9' WHERE `title` = 'Yavapai' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yavapai_apache title Yavapai Apache
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yavapai_apache','Yavapai Apache','9150', '0',' 1715-2', 0);
#EndIf

#IfRow2D list_options list_id race option_id yavapai_apache
UPDATE `list_options` SET `notes` = '1715-2' WHERE `option_id` = 'yavapai_apache' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yavapai Apache
UPDATE `list_options` SET `notes` = '1715-2' WHERE `title` = 'Yavapai Apache' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yerington_paiute title Yerington Paiute
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yerington_paiute','Yerington Paiute','9160', '0',' 1437-3', 0);
#EndIf

#IfRow2D list_options list_id race option_id yerington_paiute
UPDATE `list_options` SET `notes` = '1437-3' WHERE `option_id` = 'yerington_paiute' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yerington Paiute
UPDATE `list_options` SET `notes` = '1437-3' WHERE `title` = 'Yerington Paiute' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yokuts title Yokuts
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yokuts','Yokuts','9170', '0',' 1717-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id yokuts
UPDATE `list_options` SET `notes` = '1717-8' WHERE `option_id` = 'yokuts' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yokuts
UPDATE `list_options` SET `notes` = '1717-8' WHERE `title` = 'Yokuts' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yomba title Yomba
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yomba','Yomba','9180', '0',' 1600-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id yomba
UPDATE `list_options` SET `notes` = '1600-6' WHERE `option_id` = 'yomba' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yomba
UPDATE `list_options` SET `notes` = '1600-6' WHERE `title` = 'Yomba' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yuchi title Yuchi
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yuchi','Yuchi','9190', '0',' 1722-8', 0);
#EndIf

#IfRow2D list_options list_id race option_id yuchi
UPDATE `list_options` SET `notes` = '1722-8' WHERE `option_id` = 'yuchi' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yuchi
UPDATE `list_options` SET `notes` = '1722-8' WHERE `title` = 'Yuchi' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yuki title Yuki
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yuki','Yuki','9200', '0',' 1066-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id yuki
UPDATE `list_options` SET `notes` = '1066-0' WHERE `option_id` = 'yuki' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yuki
UPDATE `list_options` SET `notes` = '1066-0' WHERE `title` = 'Yuki' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yuman title Yuman
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yuman','Yuman','9210', '0',' 1724-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id yuman
UPDATE `list_options` SET `notes` = '1724-4' WHERE `option_id` = 'yuman' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yuman
UPDATE `list_options` SET `notes` = '1724-4' WHERE `title` = 'Yuman' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yupik_eskimo title Yupik Eskimo
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yupik_eskimo','Yupik Eskimo','9220', '0',' 1896-0', 0);
#EndIf

#IfRow2D list_options list_id race option_id yupik_eskimo
UPDATE `list_options` SET `notes` = '1896-0' WHERE `option_id` = 'yupik_eskimo' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yupik Eskimo
UPDATE `list_options` SET `notes` = '1896-0' WHERE `title` = 'Yupik Eskimo' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id yurok title Yurok
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','yurok','Yurok','9230', '0',' 1732-7', 0);
#EndIf

#IfRow2D list_options list_id race option_id yurok
UPDATE `list_options` SET `notes` = '1732-7' WHERE `option_id` = 'yurok' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Yurok
UPDATE `list_options` SET `notes` = '1732-7' WHERE `title` = 'Yurok' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id zairean title Zairean
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','zairean','Zairean','9240', '0',' 2066-9', 0);
#EndIf

#IfRow2D list_options list_id race option_id zairean
UPDATE `list_options` SET `notes` = '2066-9' WHERE `option_id` = 'zairean' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Zairean
UPDATE `list_options` SET `notes` = '2066-9' WHERE `title` = 'Zairean' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id zia title Zia
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','zia','Zia','9250', '0',' 1515-6', 0);
#EndIf

#IfRow2D list_options list_id race option_id zia
UPDATE `list_options` SET `notes` = '1515-6' WHERE `option_id` = 'zia' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Zia
UPDATE `list_options` SET `notes` = '1515-6' WHERE `title` = 'Zia' AND `list_id` = 'race';
#EndIf

#IfNotRow2Dx2 list_options list_id race option_id zuni title Zuni
INSERT INTO list_options (list_id, option_id,  title, seq, is_default, notes, activity) VALUES ('race','zuni','Zuni','9260', '0',' 1516-4', 0);
#EndIf

#IfRow2D list_options list_id race option_id zuni
UPDATE `list_options` SET `notes` = '1516-4' WHERE `option_id` = 'zuni' AND `list_id` = 'race';
#EndIf

#IfRow2D list_options list_id race title Zuni
UPDATE `list_options` SET `notes` = '1516-4' WHERE `title` = 'Zuni' AND `list_id` = 'race';
#EndIf

#IfMissingColumn lists severity_al
ALTER TABLE lists ADD COLUMN severity_al VARCHAR(50) DEFAULT NULL;
#EndIf

#IfNotRow2D list_options list_id lists option_id severity_ccda
INSERT INTO list_options (list_id, option_id, title) VALUES ('lists','severity_ccda','Severity');
INSERT INTO list_options (list_id, option_id, title, codes, seq) values ('severity_ccda','unassigned','Unassigned','','10');
INSERT INTO list_options (list_id, option_id, title, codes, seq) values ('severity_ccda','mild','Mild','SNOMED-CT:255604002','20');
INSERT INTO list_options (list_id, option_id, title, codes, seq) values ('severity_ccda','mild_to_moderate','Mild to moderate','SNOMED-CT:371923003','30');
INSERT INTO list_options (list_id, option_id, title, codes, seq) values ('severity_ccda','moderate','Moderate','SNOMED-CT:6736007','40');
INSERT INTO list_options (list_id, option_id, title, codes, seq) values ('severity_ccda','moderate_to_severe','Moderate to severe','SNOMED-CT:371924009','50');
INSERT INTO list_options (list_id, option_id, title, codes, seq) values ('severity_ccda','severe','Severe','SNOMED-CT:24484000','60');
INSERT INTO list_options (list_id, option_id, title, codes, seq) values ('severity_ccda','life_threatening_severity','Life threatening severity','SNOMED-CT:442452003','70');
INSERT INTO list_options (list_id, option_id, title, codes, seq) values ('severity_ccda','fatal','Fatal','SNOMED-CT:399166001','80');
#EndIf

#IfNotRow3D list_options list_id drug_route notes PO title Per Oris
UPDATE list_options SET list_options.notes = 'PO' WHERE list_options.list_id = 'drug_route' AND title = 'Per Oris';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title Per Rectum
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'Per Rectum';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title To Skin
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'To Skin';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title To Affected Area
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'To Affected Area';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title Sublingual
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'Sublingual';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title OS
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'OS';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title OD
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'OD';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title OU
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'OU';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title SQ
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'SQ';
#EndIf

#IfNotRow3D list_options list_id drug_route notes IM title IM
UPDATE list_options SET list_options.notes = 'IM' WHERE list_options.list_id = 'drug_route' AND title = 'IM';
#EndIf

#IfNotRow3D list_options list_id drug_route notes IV title IV
UPDATE list_options SET list_options.notes = 'IV' WHERE list_options.list_id = 'drug_route' AND title = 'IV';
#EndIf

#IfNotRow3D list_options list_id drug_route notes NS title Per Nostril
UPDATE list_options SET list_options.notes = 'NS' WHERE list_options.list_id = 'drug_route' AND title = 'Per Nostril';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title Both Ears
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'Both Ears';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title Left Ear
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'Left Ear';
#EndIf

#IfNotRow3D list_options list_id drug_route notes OTH title Right Ear
UPDATE list_options SET list_options.notes = 'OTH' WHERE list_options.list_id = 'drug_route' AND title = 'Right Ear';
#EndIf

#IfNotRow2Dx2 list_options list_id drug_route title intradermal title Intradermal
INSERT INTO list_options ( list_id, option_id, title, seq,  notes ) VALUES ('drug_route', 'intradermal', 'Intradermal', 20, 'ID');
#EndIf

#IfNotRow2Dx2 list_options list_id drug_route title other title Other/Miscellaneous
INSERT INTO list_options ( list_id, option_id, title, seq, notes ) VALUES ('drug_route', 'other', 'Other/Miscellaneous', 30, 'OTH');
#EndIf

#IfNotRow2Dx2 list_options list_id drug_route title transdermal title Transdermal
INSERT INTO list_options ( list_id, option_id, title, seq, notes ) VALUES ('drug_route', 'transdermal', 'Transdermal', 40, 'TD');
#EndIf

#IfNotRow2D list_options list_id lists option_id physician_type
INSERT INTO list_options (list_id,option_id,title) VALUES ('lists','physician_type','Physician Type');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','attending_physician','SNOMED-CT:405279007','Attending physician', '10');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','audiological_physician','SNOMED-CT:310172001','Audiological physician', '20');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','chest_physician','SNOMED-CT:309345004','Chest physician', '30');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','community_health_physician','SNOMED-CT:23278007','Community health physician', '40');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','consultant_physician','SNOMED-CT:158967008','Consultant physician', '50');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','general_physician','SNOMED-CT:59058001','General physician', '60');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','genitourinarymedicinephysician','SNOMED-CT:309358003','Genitourinary medicine physician', '70');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','occupational_physician','SNOMED-CT:158973009','Occupational physician', '80');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','palliative_care_physician','SNOMED-CT:309359006','Palliative care physician', '90');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','physician','SNOMED-CT:309343006','Physician', '100');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','public_health_physician','SNOMED-CT:56466003','Public health physician', '110');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','rehabilitation_physician','SNOMED-CT:309360001','Rehabilitation physician', '120');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','resident_physician','SNOMED-CT:405277009','Resident physician', '130');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','specialized_physician','SNOMED-CT:69280009','Specialized physician', '140');
INSERT INTO list_options (list_id, option_id, codes,title, seq) VALUES ('physician_type','thoracic_physician','SNOMED-CT:309346003','Thoracic physician', '150');
#EndIf

#IfNotRow3D list_options list_id marital option_id married notes M
update list_options set notes = 'M' where list_id = 'marital' and option_id = 'married';
#EndIf

#IfNotRow3D list_options list_id marital option_id single notes S
update list_options set notes = 'S' where list_id = 'marital' and option_id = 'single';
#EndIf

#IfNotRow3D list_options list_id marital option_id divorced notes D
update list_options set notes = 'D' where list_id = 'marital' and option_id = 'divorced';
#EndIf

#IfNotRow3D list_options list_id marital option_id widowed notes W
update list_options set notes = 'W' where list_id = 'marital' and option_id = 'widowed';
#EndIf

#IfNotRow3D list_options list_id marital option_id separated notes L
update list_options set notes = 'L' where list_id = 'marital' and option_id = 'separated';
update list_options set notes = 'T' where list_id = 'marital' and option_id = 'domestic partner';
#EndIf

#IfMissingColumn users physician_type
ALTER TABLE users ADD COLUMN physician_type VARCHAR(50) DEFAULT NULL;
#EndIf

#IfMissingColumn facility facility_code
ALTER TABLE facility ADD COLUMN facility_code VARCHAR(31) default NULL;
#EndIf

#IfMissingColumn documents audit_master_approval_status
ALTER TABLE documents ADD COLUMN audit_master_approval_status TINYINT DEFAULT 1 NOT NULL COMMENT 'approval_status from audit_master table';
#EndIf

#IfMissingColumn documents audit_master_id
ALTER TABLE documents ADD COLUMN  audit_master_id int(11) default NULL;
#EndIf

#IfMissingColumn patient_data religion
SET @group_name = (SELECT group_name FROM layout_options WHERE field_id='ethnicity' AND form_id='DEM');
SET @backup_group_name = (SELECT group_name FROM layout_options WHERE field_id='DOB' AND form_id='DEM');
SET @seq = (SELECT MAX(seq) FROM layout_options WHERE group_name = IFNULL(@group_name,@backup_group_name) AND form_id='DEM');
INSERT INTO `layout_options` (`form_id`, `field_id`, `group_name`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`) VALUES ('DEM', 'religion', IFNULL(@group_name,@backup_group_name), 'Religion', @seq+1, 1, 1, 0, 0, 'religious_affiliation', 1, 3, '', '', 'Patient Religion' ) ;
ALTER TABLE patient_data ADD COLUMN religion varchar(40) NOT NULL default '';
#EndIf

#IfNotRow categories name CCDA
INSERT INTO categories (id, name, value, parent, lft, rght) select (select MAX(id) from categories) + 1, 'CCDA', '', 1, rght, rght + 1 from categories where name = 'Categories';
UPDATE categories SET rght = rght + 2 WHERE name = 'Categories';
UPDATE categories_seq SET id = (select MAX(id) from categories);
#Endif

#IfNotRow2D list_options list_id abook_type option_id ccda
INSERT INTO list_options (list_id, option_id, title, seq, option_value) VALUES ('abook_type', 'ccda', 'Care Coordination', 35, 2);
#EndIf

#IfNotRow2D list_options list_id abook_type option_id emr_direct
INSERT INTO list_options (list_id, option_id, title , seq, option_value) VALUES ('abook_type', 'emr_direct', 'EMR Direct' ,105, 4);
#EndIf

#IfNotRow2D list_options list_id abook_type option_id external_provider
INSERT INTO list_options (list_id, option_id, title , seq, option_value) VALUES ('abook_type', 'external_provider', 'External Provider' ,110, 1);
#EndIf

#IfNotRow2D list_options list_id abook_type option_id external_org
INSERT INTO list_options (list_id, option_id, title , seq, option_value) VALUES ('abook_type', 'external_org', 'External Organization' ,120, 1);
#EndIf

#IfMissingColumn immunizations external_id
ALTER TABLE `immunizations` ADD COLUMN `external_id` VARCHAR(20) DEFAULT NULL;
#EndIf

#IfMissingColumn prescriptions external_id
ALTER TABLE `prescriptions` ADD COLUMN `external_id` VARCHAR(20) DEFAULT NULL;
#EndIf

#IfMissingColumn lists external_id
ALTER TABLE `lists` ADD COLUMN `external_id` VARCHAR(20) DEFAULT NULL;
#EndIf

#IfMissingColumn form_vitals external_id
ALTER TABLE `form_vitals` ADD COLUMN `external_id` VARCHAR(20) DEFAULT NULL;
#EndIf

#IfMissingColumn form_encounter external_id
ALTER TABLE `form_encounter` ADD COLUMN `external_id` VARCHAR(20) DEFAULT NULL;
#EndIf

#IfMissingColumn billing external_id
ALTER TABLE `billing` ADD COLUMN `external_id` VARCHAR(20) DEFAULT NULL;
#EndIf

#IfMissingColumn procedure_order external_id
ALTER TABLE `procedure_order` ADD COLUMN `external_id` VARCHAR(20) DEFAULT NULL;
#EndIf

#IfMissingColumn patient_data industry
SET @group_name = (SELECT group_name FROM layout_options WHERE field_id='occupation' AND form_id='DEM');
SET @backup_group_name = (SELECT group_name FROM layout_options WHERE field_id='DOB' AND form_id='DEM');
SET @seq = (SELECT MAX(seq) FROM layout_options WHERE group_name = IFNULL(@group_name,@backup_group_name) AND form_id='DEM');
INSERT INTO `layout_options` (`form_id`, `field_id`, `group_name`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`) VALUES ('DEM', 'industry', IFNULL(@group_name,@backup_group_name), 'Industry', @seq+1, 1, 1, 0, 0, 'Industry', 1, 1, '', '', 'Industry' ) ;
ALTER TABLE patient_data ADD COLUMN industry TEXT NOT NULL;
#EndIf

#IfNotRow2D list_options list_id lists option_id Industry
INSERT INTO `list_options` (`list_id`, `option_id`, `title`) VALUES('lists','Industry','Industry');
INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('Industry', 'law_firm', 'Law Firm', 10);
INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('Industry', 'engineering_firm', 'Engineering Firm', 20);
INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('Industry', 'construction_firm', 'Construction Firm', 30);
#EndIf

#IfNotListOccupation
#EndIf

#IfNotRow2D list_options list_id Occupation option_id lawyer
SET @max_list_id = (SELECT MAX(seq) FROM list_options WHERE list_id='Occupation');
INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('Occupation', 'lawyer', 'Lawyer', IFNULL(@max_list_id,0) + 10);
#EndIf

#IfNotRow2D list_options list_id Occupation option_id engineer
SET @max_list_id = (SELECT MAX(seq) FROM list_options WHERE list_id='Occupation');
INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('Occupation', 'engineer', 'Engineer', (@max_list_id+10));
#EndIf

#IfNotRow2D list_options list_id Occupation option_id site_worker
SET @max_list_id = (SELECT MAX(seq) FROM list_options WHERE list_id='Occupation');
INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('Occupation', 'site_worker', 'Site Worker', (@max_list_id+10));
#EndIf

#IfNotRow3D layout_options field_id occupation form_id DEM data_type 26
UPDATE layout_options SET list_id='Occupation', data_type='26', fld_length='0', max_length='0', edit_options='' WHERE field_id='occupation' AND form_id='DEM';
#EndIf

#IfMissingColumn patient_access_offsite portal_relation
ALTER TABLE patient_access_offsite ADD COLUMN portal_relation VARCHAR(100) NULL;
#EndIf

#IfMissingColumn pnotes portal_relation
ALTER TABLE pnotes ADD COLUMN `portal_relation` VARCHAR(100) NULL;
#EndIf

#IfMissingColumn pnotes is_msg_encrypted
ALTER TABLE pnotes ADD is_msg_encrypted TINYINT(2) DEFAULT '0' COMMENT 'Whether messsage encrypted 0-Not encrypted, 1-Encrypted'; 
#EndIf

#IfMissingColumn log log_from
ALTER TABLE `log` ADD `log_from` VARCHAR(20) DEFAULT 'open-emr'; 
#EndIf

#IfMissingColumn log menu_item_id
ALTER TABLE `log` ADD `menu_item_id` INT(11) DEFAULT NULL;
#EndIf

#IfNotTable patient_portal_menu
CREATE TABLE `patient_portal_menu` (
  `patient_portal_menu_id` INT(11) NOT NULL AUTO_INCREMENT,
  `patient_portal_menu_group_id` INT(11) DEFAULT NULL,
  `menu_name` VARCHAR(40) DEFAULT NULL,
  `menu_order` SMALLINT(4) DEFAULT NULL,
  `menu_status` TINYINT(2) DEFAULT '1',
  PRIMARY KEY (`patient_portal_menu_id`)
) ENGINE=INNODB AUTO_INCREMENT=14;

INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (1,1,'Dashboard',3,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (2,1,'My Profile',6,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (3,1,'Appointments',9,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (4,1,'Documents',12,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (5,1,'Med Records',15,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (6,1,'My Account',18,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (7,1,'Mailbox',21,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (8,1,'Password',24,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (9,1,'View Log',27,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (10,1,'Logout',30,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (11,1,'View Health Information',33,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (12,1,'Download Health Information',36,1);
INSERT  INTO `patient_portal_menu`(`patient_portal_menu_id`,`patient_portal_menu_group_id`,`menu_name`,`menu_order`,`menu_status`) VALUES (13,1,'Transmit Health Information',39,1);

#Endif

#IfMissingColumn log ccda_doc_id
ALTER TABLE `log` ADD `ccda_doc_id` INT(11) DEFAULT NULL COMMENT 'CCDA document id from ccda';
#Endif

#IfNotListReaction
#EndIf

#IfNotRow2D list_options list_id reaction option_id unassigned
INSERT INTO list_options ( list_id, option_id, title, seq ) VALUES ('reaction', 'unassigned', 'Unassigned', 0);
#EndIf

#IfNotRow2D list_options list_id reaction option_id hives
SET @max_list_id = (SELECT MAX(seq) FROM list_options WHERE list_id='reaction');
INSERT INTO list_options ( list_id, option_id, title, seq, codes ) VALUES ('reaction', 'hives', 'Hives', (@max_list_id+10), 'SNOMED-CT:247472004');
#EndIf

#IfNotRow2D list_options list_id reaction option_id nausea
SET @max_list_id = (SELECT MAX(seq) FROM list_options WHERE list_id='reaction');
INSERT INTO list_options ( list_id, option_id, title, seq, codes ) VALUES ('reaction', 'nausea', 'Nausea', (@max_list_id+10), 'SNOMED-CT:422587007');
#EndIf

#IfNotRow2D list_options list_id lists option_id county
INSERT INTO list_options (list_id, option_id, title) VALUES ('lists','county','County');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('county','adair','ADAIR','001', '10');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('county','andrew','ANDREW','003', '20');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('county','atchison','ATCHISON','005', '30');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('county','audrain','AUDRAIN','007', '40');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('county','barry','BARRY','009', '50');
#EndIf

#IfMissingColumn patient_data county
SET @group_name = (SELECT group_name FROM layout_options WHERE field_id='country_code' AND form_id='DEM');
SET @backup_group_name = (SELECT group_name FROM layout_options WHERE field_id='DOB' AND form_id='DEM');
SET @seq = (SELECT MAX(seq) FROM layout_options WHERE group_name = IFNULL(@group_name,@backup_group_name) AND form_id='DEM');
INSERT INTO `layout_options` (`form_id`, `field_id`, `group_name`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`) VALUES ('DEM', 'county', IFNULL(@group_name,@backup_group_name), 'County', @seq+1, 26, 1, 0, 0, 'county', 1, 1, '', '', 'County' ) ;
ALTER TABLE `patient_data` ADD COLUMN `county` varchar(40) NOT NULL default '';
#EndIf 

#IfNotListImmunizationManufacturer
#EndIf

#IfNotRow2D list_options list_id lists option_id Immunization_Manufacturer
INSERT INTO list_options (list_id, option_id, title) VALUES ('lists','Immunization_Manufacturer','Immunization Manufacturer');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','AB','Abbott Laboratories','AB','10');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','ACA','Acambis, Inc','ACA','20');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','AD','Adams Laboratories, Inc.','AD','30');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','AKR','Akorn, Inc','AKR','40');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','ALP','Alpha Therapeutic Corporation','ALP','50');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','AR','Armour','AR','60');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','AVB','Aventis Behring L.L.C.','AVB','70');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','AVI','Aviron','AVI','80');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','BRR','Barr Laboratories','BRR','90');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','BAH','Baxter Healthcare Corporation','BAH','100');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','BA','Baxter Healthcare Corporation-inactive','BA','110');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','BAY','Bayer Corporation','BAY','120');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','BP','Berna Products','BP','130');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','BPC','Berna Products Corporation','BPC','140');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','BTP','Biotest Pharmaceuticals Corporation','BTP','150');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','CNJ','Cangene Corporation','CNJ','160');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','CMP','Celltech Medeva Pharmaceuticals','CMP','170');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','CEN','Centeon L.L.C.','CEN','180');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','CHI','Chiron Corporation','CHI','190');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','CON','Connaught','CON','200');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','CRU','Crucell','CRU','210');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','CSL','CSL Behring, Inc','CSL','220');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','DVC','DynPort Vaccine Company, LLC','DVC','230');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','MIP','Emergent BioDefense Operations Lansing','MIP','240');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','EVN','Evans Medical Limited','EVN','250');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','GEO','GeoVax Labs, Inc.','GEO','260');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','SKB','GlaxoSmithKline','SKB','270');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','GRE','Greer Laboratories, Inc.','GRE','280');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','GRF','Grifols','GRF','290');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','IDB','ID Biomedical','IDB','300');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','IAG','Immuno International AG','IAG','310');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','IUS','Immuno-U.S., Inc.','IUS','320');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','INT','Intercell Biomedical','INT','330');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','JNJ','Johnson and Johnson','JNJ','340');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','KGC','Korea Green Cross Corporation','KGC','350');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','LED','Lederle','LED','360');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','MBL','Massachusetts Biologic Laboratories','MBL','370');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','MA','Massachusetts Public Health Biologic Laboratories','MA','380');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','MED','MedImmune, Inc.','MED','390');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','MSD','Merck and Co., Inc.','MSD','400');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','IM','Merieux','IM','410');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','MIL','Miles','MIL','420');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','NAB','NABI','NAB','430');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','NYB','New York Blood Center','NYB','440');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','NAV','North American Vaccine, Inc.','NAV','450');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','NOV','Novartis Pharmaceutical Corporation','NOV','460');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','NVX','Novavax, Inc.','NVX','470');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','OTC','Organon Teknika Corporation','OTC','480');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','ORT','Ortho-clinical Diagnostics','ORT','490');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','OTH','Other manufacturer','OTH','500');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','PD','Parkedale Pharmaceuticals','PD','510');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','PFR','Pfizer, Inc','PFR','520');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','PWJ','PowderJect Pharmaceuticals','PWJ','530');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','PRX','Praxis Biologics','PRX','540');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','PSC','Protein Sciences','PSC','550');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','PMC','sanofi pasteur','PMC','560');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','SCL','Sclavo, Inc.','SCL','570');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','SOL','Solvay Pharmaceuticals','SOL','580');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','SI','Swiss Serum and Vaccine Inst.','SI','590');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','TAL','Talecris Biotherapeutics','TAL','600');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','JPN','The Research Foundation for Microbial Diseases of Osaka University (BIKEN)','JPN','610');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','USA','United States Army Medical Research and Material Command','USA','620');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','UNK','Unknown manufacturer','UNK','630');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','VXG','VaxGen','VXG','640');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','WAL','Wyeth','WAL','650');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','WA','Wyeth-Ayerst','WA','660');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Manufacturer','ZLB','ZLB Behring','ZLB','670');
#EndIf

#IfNotRow2D list_options list_id lists option_id Immunization_Completion_Status
INSERT INTO list_options (list_id, option_id, title) VALUES ('lists','Immunization_Completion_Status','Immunization Completion Status');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Completion_Status','Completed','completed','CP', '10');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Completion_Status','Refused','Refused','RE', '20');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Completion_Status','Not_Administered','Not Administered','NA', '30');
INSERT INTO list_options (list_id, option_id, title, notes, seq) VALUES ('Immunization_Completion_Status','Partially_Administered','Partially Administered','PA', '40');
#EndIf

#IfMissingColumn immunizations completion_status
ALTER TABLE immunizations ADD COLUMN `completion_status` VARCHAR(50) DEFAULT NULL;
#EndIf

#IfMissingColumn prescriptions indication
ALTER TABLE prescriptions ADD COLUMN `indication` text;
#EndIf

#IfMissingColumn prescriptions end_date
ALTER TABLE prescriptions ADD COLUMN `end_date` date default NULL;
#EndIf

#IfNotTable external_procedures
CREATE TABLE `external_procedures` (
  `ep_id` int(11) NOT NULL AUTO_INCREMENT,
  `ep_date` date DEFAULT NULL,
  `ep_code_type` varchar(20) DEFAULT NULL,
  `ep_code` varchar(9) DEFAULT NULL,
  `ep_pid` int(11) DEFAULT NULL,
  `ep_encounter` int(11) DEFAULT NULL,
  `ep_code_text` longtext,
  `ep_facility_id` varchar(255) DEFAULT NULL,
  `ep_external_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ep_id`)
) ENGINE=InnoDB;
#EndIf

#IfNotTable external_encounters
CREATE TABLE `external_encounters` (
  `ee_id` int(11) NOT NULL AUTO_INCREMENT,
  `ee_date` date DEFAULT NULL,
  `ee_pid` int(11) DEFAULT NULL,
  `ee_provider_id` varchar(255) DEFAULT NULL,
  `ee_facility_id` varchar(255) DEFAULT NULL,
  `ee_encounter_diagnosis` varchar(255) DEFAULT NULL,
  `ee_external_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ee_id`)
) ENGINE=InnoDB;
#EndIf

#IfMissingColumn prescriptions prn
ALTER TABLE prescriptions ADD COLUMN `prn` VARCHAR(30) DEFAULT NULL;
#EndIf

#IfMissingColumn patient_data care_team
SET @group_name = (SELECT group_name FROM layout_options WHERE field_id='ref_providerID' AND form_id='DEM');
SET @backup_group_name = (SELECT group_name FROM layout_options WHERE field_id='DOB' AND form_id='DEM');
SET @seq = (SELECT MAX(seq) FROM layout_options WHERE group_name = IFNULL(@group_name,@backup_group_name) AND form_id='DEM');
INSERT INTO `layout_options` (`form_id`, `field_id`, `group_name`, `title`, `seq`, `data_type`, `uor`, `fld_length`, `max_length`, `list_id`, `titlecols`, `datacols`, `default_value`, `edit_options`, `description`) VALUES ('DEM', 'care_team', IFNULL(@group_name,@backup_group_name), 'Care Team', @seq+1, 11, 1, 0, 0, '', 1, 1, '', '', '' ) ;
alter table patient_data add column care_team int(11) DEFAULT NULL;
#EndIf

#IfNotTable form_observation
CREATE TABLE `form_observation` (
  `id` bigint(20) NOT NULL,
  `date` DATE DEFAULT NULL,
  `pid` bigint(20) DEFAULT NULL,
  `encounter` varchar(255) DEFAULT NULL,
  `user` varchar(255) DEFAULT NULL,
  `groupname` varchar(255) DEFAULT NULL,
  `authorized` tinyint(4) DEFAULT NULL,
  `activity` tinyint(4) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `observation` varchar(255) DEFAULT NULL,
  `ob_value` varchar(255),
  `ob_unit` varchar(255),
  `description` varchar(255),
  `code_type` varchar(255),
  `table_code` varchar(255)
) ENGINE=InnoDB;
SET @seq = (SELECT MAX(id) FROM registry);
INSERT INTO `registry` (`name`,`state`,`directory`,`id`,`sql_run`,`unpackaged`,`date`,`priority`,`category`,`nickname`) VALUES ('Observation', 1, 'observation', @seq+1, 1, 1, '2015-09-09 00:00:00', 0, 'Clinical', '');
#EndIf

#IfNotTable form_care_plan
CREATE TABLE `form_care_plan` (
  `id` bigint(20) NOT NULL,
  `date` DATE DEFAULT NULL,
  `pid` bigint(20) DEFAULT NULL,
  `encounter` varchar(255) DEFAULT NULL,
  `user` varchar(255) DEFAULT NULL,
  `groupname` varchar(255) DEFAULT NULL,
  `authorized` tinyint(4) DEFAULT NULL,
  `activity` tinyint(4) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `codetext` text,
  `description` text,
  `external_id` VARCHAR(30) DEFAULT NULL
) ENGINE=InnoDB;
SET @seq = (SELECT MAX(id) FROM registry);
INSERT INTO `registry` (`name`,`state`,`directory`,`id`,`sql_run`,`unpackaged`,`date`,`priority`,`category`,`nickname`) VALUES ('Care Plan', 1, 'care_plan', @seq+1, 1, 1, '2015-09-09 00:00:00', 0, 'Clinical', '');
#EndIf

#IfNotTable form_functional_cognitive_status
CREATE TABLE `form_functional_cognitive_status` (
  `id` bigint(20) NOT NULL,
  `date` DATE DEFAULT NULL,
  `pid` bigint(20) DEFAULT NULL,
  `encounter` varchar(255) DEFAULT NULL,
  `user` varchar(255) DEFAULT NULL,
  `groupname` varchar(255) DEFAULT NULL,
  `authorized` tinyint(4) DEFAULT NULL,
  `activity` tinyint(4) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `codetext` text,
  `description` text,
  `external_id` VARCHAR(30) DEFAULT NULL
) ENGINE=InnoDB;
SET @seq = (SELECT MAX(id) FROM registry);
INSERT INTO `registry` (`name`,`state`,`directory`,`id`,`sql_run`,`unpackaged`,`date`,`priority`,`category`,`nickname`) VALUES ('Functional and Cognitive Status', 1, 'functional_cognitive_status', @seq+1, 1, 1, '2015-09-09 00:00:00', 0, 'Clinical', '');
#EndIf

UPDATE `clinical_rules` SET `cqm_2014_flag` = 1 WHERE `id` = 'rule_htn_bp_measure_cqm' AND `pid` = 0;
UPDATE `clinical_rules` SET `cqm_2014_flag` = 1 WHERE `id` = 'rule_adult_wt_screen_fu_cqm' AND `pid` = 0;
UPDATE `clinical_rules` SET `cqm_2014_flag` = 1 WHERE `id` = 'rule_wt_assess_couns_child_cqm' AND `pid` = 0;
UPDATE `clinical_rules` SET `cqm_2014_flag` = 1 WHERE `id` = 'rule_pneumovacc_ge_65_cqm' AND `pid` = 0;

#IfMissingColumn clinical_rules amc_2014_stage1_flag
        ALTER TABLE `clinical_rules` ADD COLUMN `amc_2014_stage1_flag` tinyint(1) COMMENT '2014 Stage 1 - Automated Measure Calculation flag for (unable to customize per patient)';

        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–4' WHERE `clinical_rules`.`id` = 'problem_list_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–5' WHERE `clinical_rules`.`id` = 'med_list_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–6' WHERE `clinical_rules`.`id` = 'med_allergy_list_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–7' WHERE `clinical_rules`.`id` = 'cpoe_med_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–9' WHERE `clinical_rules`.`id` = 'record_dem_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–11' WHERE `clinical_rules`.`id` = 'record_smoke_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–12' WHERE `clinical_rules`.`id` = 'lab_result_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–13' WHERE `clinical_rules`.`id` = 'send_reminder_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–15' WHERE `clinical_rules`.`id` = 'provide_sum_pat_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage1_flag` = '1', `amc_code_2014` = '170.314(g)(1)/(2)–16' WHERE `clinical_rules`.`id` = 'patient_edu_amc' AND `clinical_rules`.`pid` =0;
#EndIf

#IfMissingColumn clinical_rules amc_2014_stage2_flag
        ALTER TABLE `clinical_rules` ADD COLUMN `amc_2014_stage2_flag` tinyint(1) COMMENT '2014 Stage 2 - Automated Measure Calculation flag for (unable to customize per patient)';

        UPDATE `clinical_rules` SET `amc_2014_stage2_flag` = '1' WHERE `clinical_rules`.`id` = 'record_smoke_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage2_flag` = '1' WHERE `clinical_rules`.`id` = 'lab_result_amc' AND `clinical_rules`.`pid` =0;
        UPDATE `clinical_rules` SET `amc_2014_stage2_flag` = '1' WHERE `clinical_rules`.`id` = 'record_dem_amc' AND `clinical_rules`.`pid` =0;
#EndIf

#IfNotRow clinical_rules id rule_children_pharyngitis_cqm
INSERT INTO `clinical_rules` (`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`) VALUES ('rule_children_pharyngitis_cqm', 0, 0, 0, 1, '0002', '', 0, '', 0, 0, 0, '', 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id rule_children_pharyngitis_cqm
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES ('clinical_rules', 'rule_children_pharyngitis_cqm', 'Appropriate Testing for Children with Pharyngitis (CQM)', 502, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id rule_fall_screening_cqm
INSERT INTO `clinical_rules` (`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`) VALUES ('rule_fall_screening_cqm', 0, 0, 0, 1, '0101', '', 0, '', 0, 0, 0, '', 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id rule_fall_screening_cqm
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES ('clinical_rules', 'rule_fall_screening_cqm', 'Falls: Screening, Risk-Assessment, and Plan of Care to Prevent Future Falls (CQM)', 504, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id rule_pain_intensity_cqm
INSERT INTO `clinical_rules` (`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`) VALUES ('rule_pain_intensity_cqm', 0, 0, 0, 1, '0384', '', 0, '', 0, 0, 0, '', 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id rule_pain_intensity_cqm
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES ('clinical_rules', 'rule_pain_intensity_cqm', 'Oncology: Medical and Radiation – Pain Intensity Quantified (CQM)', 506, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id rule_child_immun_stat_2014_cqm
INSERT INTO `clinical_rules` (`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES ('rule_child_immun_stat_2014_cqm', 0, 0, 0, 1, '0038', '', 0, '', 0, 0, 0, '', 0, 1, 0, 0);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id rule_child_immun_stat_2014_cqm
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES ('clinical_rules', 'rule_child_immun_stat_2014_cqm', 'Childhood immunization Status (CQM)', 250, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id rule_tob_use_2014_cqm
INSERT INTO `clinical_rules` (`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES ('rule_tob_use_2014_cqm', 0, 0, 0, 1, '0028', '', 0, '', 0, 0, 0, '', 0, 1, 0, 0);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id rule_tob_use_2014_cqm
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES ('clinical_rules', 'rule_tob_use_2014_cqm', 'Preventive Care and Screening: Tobacco Use: Screening and Cessation Intervention (CQM)', 210, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id image_results_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('image_results_amc', 0, 0, 0, 0, '', '', 1, '', 0, 0, 1, '170.314(g)(1)/(2)–20', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id image_results_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'image_results_amc', 'Image Results', 3000, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id family_health_history_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('family_health_history_amc', 0, 0, 0, 0, '', '', 1, '', 0, 0, 1, '170.314(g)(1)/(2)–21', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id family_health_history_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'family_health_history_amc', 'Family Health History', 3100, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id electronic_notes_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('electronic_notes_amc', 0, 0, 0, 0, '', '', 1, '', 0, 0, 1, '170.314(g)(1)/(2)–22', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id electronic_notes_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'electronic_notes_amc', 'Electronic Notes', 3200, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id secure_messaging_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('secure_messaging_amc', 0, 0, 0, 0, '', '', 1, '', 0, 0, 1, '170.314(g)(1)/(2)', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id secure_messaging_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'secure_messaging_amc', 'Secure Electronic Messaging', 3400, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id view_download_transmit_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('view_download_transmit_amc', 0, 0, 0, 0, '', '', 1, '', 0, 0, 1, '170.314(g)(1)/(2)–14', 0, 0, 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id view_download_transmit_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'view_download_transmit_amc', 'View, Download, Transmit (VDT)  (Measure B)', 3500, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id cpoe_radiology_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('cpoe_radiology_amc', 0, 0, 0, 0, '', '', 1, '170.304(a)', 0, 0, 1, '170.314(g)(1)/(2)–7', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id cpoe_radiology_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'cpoe_radiology_amc', 'Use CPOE for radiology orders.', 46, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id cpoe_proc_orders_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('cpoe_proc_orders_amc', 0, 0, 0, 0, '', '', 1, '170.304(a)', 0, 0, 1, '170.314(g)(1)/(2)–7', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id cpoe_proc_orders_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'cpoe_proc_orders_amc', 'Use CPOE for procedure orders.', 47, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id send_reminder_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('send_reminder_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.304(d)', 0, 0, 1, '170.314(g)(1)/(2)–13', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id send_reminder_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'send_reminder_stage2_amc', 'Send reminders to patients per patient preference for preventive/follow up care.', 60, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id cpoe_med_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('cpoe_med_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.304(a)', 0, 0, 1, '170.314(g)(1)/(2)–7', 0, 0, 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id cpoe_med_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'cpoe_med_stage2_amc', 'Use CPOE for medication orders.(Alternative)', 47, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id patient_edu_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('patient_edu_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.302(m)', 0, 0, 1, '170.314(g)(1)/(2)–16', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id patient_edu_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'patient_edu_stage2_amc', 'Use certified EHR technology to identify patient-specific education resources and provide those resources to the patient if appropriate(New).', 40, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id record_vitals_1_stage1_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('record_vitals_1_stage1_amc', 0, 0, 0, 0, '', '', 1, '170.302(f)', 0, 0, 1, '170.314(g)(1)/(2)–10', 0, 0, 0, 0);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id record_vitals_1_stage1_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'record_vitals_1_stage1_amc', 'Record and chart changes in vital signs (SET 1).', 20, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id record_vitals_2_stage1_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('record_vitals_2_stage1_amc', 0, 0, 0, 0, '', '', 1, '170.302(f)', 0, 0, 1, '170.314(g)(1)/(2)–10', 0, 0, 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id record_vitals_2_stage1_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'record_vitals_2_stage1_amc', 'Record and chart changes in vital signs (BP out of scope).', 20, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id record_vitals_3_stage1_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('record_vitals_3_stage1_amc', 0, 0, 0, 0, '', '', 1, '170.302(f)', 0, 0, 1, '170.314(g)(1)/(2)–10', 0, 0, 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id record_vitals_3_stage1_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'record_vitals_3_stage1_amc', 'Record and chart changes in vital signs (Height / Weight out of scope).', 20, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id record_vitals_4_stage1_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('record_vitals_4_stage1_amc', 0, 0, 0, 0, '', '', 1, '170.302(f)', 0, 0, 1, '170.314(g)(1)/(2)–10', 0, 0, 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id record_vitals_4_stage1_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'record_vitals_4_stage1_amc', 'Record and chart changes in vital signs ( Height / Weight / BP with in scope ).', 20, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id record_vitals_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('record_vitals_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.302(f)', 0, 0, 1, '170.314(g)(1)/(2)–10', 0, 0, 0, 0);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id record_vitals_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'record_vitals_stage2_amc', 'Record and chart changes in vital signs (New).', 20, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id provide_sum_pat_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('provide_sum_pat_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.304(h)', 0, 0, 1, '170.314(g)(1)/(2)–15', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id provide_sum_pat_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'provide_sum_pat_stage2_amc', 'Provide clinical summaries for patients for each office visit (New).', 75, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id vdt_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('vdt_stage2_amc', 0, 0, 0, 0, '', '', 1, '', 0, 0, 1, '170.314(g)(1)/(2)–14', 0, 0, 1, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id vdt_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'vdt_stage2_amc', 'View, Download, Transmit (VDT) (Measure A)', 3500, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id send_sum_stage1_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('send_sum_stage1_amc', 0, 0, 0, 0, '', '', 1, '170.304(i)', 0, 0, 1, '170.314(g)(1)/(2)–18', 0, 0, 1, 0);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id send_sum_stage1_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'send_sum_stage1_amc', 'The EP, eligible hospital or CAH who transitions their patient to another setting of care or provider of care or refers their patient to another provider of care should provide summary of care record for each transition of care or referral.', 80, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id send_sum_1_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('send_sum_1_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.304(i)', 0, 0, 1, '170.314(g)(1)/(2)–18', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id send_sum_1_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'send_sum_1_stage2_amc', 'The EP, eligible hospital or CAH who transitions their patient to another setting of care or provider of care or refers their patient to another provider of care should provide summary of care record for each transition of care or referral (Measure A).', 80, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id send_sum_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('send_sum_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.304(i)', 0, 0, 1, '170.314(g)(1)/(2)–18', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id send_sum_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'send_sum_stage2_amc', 'The EP, eligible hospital or CAH who transitions their patient to another setting of care or provider of care or refers their patient to another provider of care should provide summary of care record for each transition of care or referral (Measure B).', 80, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id e_prescribe_stage1_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('e_prescribe_stage1_amc', 0, 0, 0, 0, '', '', 1, '170.304(b)', 0, 0, 1, '170.314(g)(1)/(2)–8', 0, 0, 1, 0);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id e_prescribe_stage1_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'e_prescribe_stage1_amc', 'Generate and transmit permissible prescriptions electronically (Not including controlled substances).', 50, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id e_prescribe_1_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('e_prescribe_1_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.304(b)', 0, 0, 1, '170.314(g)(1)/(2)–8', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id e_prescribe_1_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'e_prescribe_1_stage2_amc', 'Generate and transmit permissible prescriptions electronically (All Prescriptions).', 50, 0, 0, '', '', '', 0, 0);
#EndIf

#IfNotRow clinical_rules id e_prescribe_2_stage2_amc
	INSERT INTO `clinical_rules` 
	(`id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `amc_2011_flag`, `amc_2014_flag`, `amc_code_2014`, `cqm_2011_flag`, `cqm_2014_flag`, `amc_2014_stage1_flag`, `amc_2014_stage2_flag`) VALUES
	('e_prescribe_2_stage2_amc', 0, 0, 0, 0, '', '', 1, '170.304(b)', 0, 0, 1, '170.314(g)(1)/(2)–8', 0, 0, 0, 1);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id e_prescribe_2_stage2_amc
	INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`, `codes`, `toggle_setting_1`, `toggle_setting_2`) VALUES
	('clinical_rules', 'e_prescribe_2_stage2_amc', 'Generate and transmit permissible prescriptions electronically (Not including controlled substances).', 50, 0, 0, '', '', '', 0, 0);
#EndIf

#IfMissingColumn users cpoe
	ALTER TABLE `users` ADD `cpoe` tinyint(1) NULL DEFAULT NULL;
#EndIf

#IfMissingColumn procedure_order_code procedure_order_title
	ALTER TABLE  `procedure_order_code` ADD  `procedure_order_title` varchar( 255 ) NULL DEFAULT NULL;
#EndIf

#IfMissingColumn procedure_providers lab_director
	ALTER TABLE `procedure_providers` ADD `lab_director` bigint(20) NOT NULL DEFAULT '0';
#EndIf

#IfNotRow2D list_options list_id lists option_id order_type
	INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('lists','order_type','Order Types', 1,0);
	INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('order_type','procedure','Procedure',10,0);
	INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('order_type','intervention','Intervention',20,0);
	INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('order_type','laboratory_test','Laboratory Test',30,0);
	INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('order_type','physical_exam','Physical Exam',40,0);
	INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('order_type','risk_category','Risk Category Assessment',50,0);
	INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('order_type','patient_characteristics','Patient Characteristics',60,0);
	INSERT INTO list_options ( list_id, option_id, title, seq, is_default ) VALUES ('order_type','imaging','Imaging',70,0);
#EndIf

#IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2015-10-01 load_filename 2016-PCS-Long-Abbrev-Titles.zip
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES ('ICD10', 'CMS', '2015-10-01', '2016-PCS-Long-Abbrev-Titles.zip', 'd5ea519d0257db0ed7deb0406a4d0503');
#EndIf

#IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2015-10-01 load_filename 2016-General-Equivalence-Mappings.zip
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES ('ICD10', 'CMS', '2015-10-01', '2016-General-Equivalence-Mappings.zip', '3324a45b6040be7e48ab770a0d3ca695');
#EndIf

#IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2015-10-01 load_filename 2016-Code-Descriptions-in-Tabular-Order.zip
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES ('ICD10', 'CMS', '2015-10-01', '2016-Code-Descriptions-in-Tabular-Order.zip', '518a47fe9e268e4fb72fecf633d15f17');
#EndIf

#IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2015-10-01 load_filename 2016-ProcedureGEMs.zip
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES ('ICD10', 'CMS', '2015-10-01', '2016-ProcedureGEMs.zip', '45a8d9da18d8aed57f0c6ea91e3e8fe4');
#EndIf

#IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2015-10-01 load_filename Reimbursement_Mapping_dx_2016.zip
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES ('ICD10', 'CMS', '2015-10-01', 'Reimbursement_Mapping_dx_2016.zip', '1b53b512e10c1fdf7ae4cfd1baa8dfbb');
#EndIf

#IfNotRow4D supported_external_dataloads load_type ICD10 load_source CMS load_release_date 2015-10-01 load_filename Reimbursement_Mapping_pr_2016.zip
INSERT INTO `supported_external_dataloads` (`load_type`, `load_source`, `load_release_date`, `load_filename`, `load_checksum`) VALUES ('ICD10', 'CMS', '2015-10-01', 'Reimbursement_Mapping_pr_2016.zip', '3c780dd103d116aa57980decfddd4f19');
#EndIf

#IfNotRow2D list_options list_id transactions option_id LBTref
UPDATE list_options SET title = 'Layout-Based Transaction Forms', seq = 9 WHERE list_id = 'lists' AND option_id = 'transactions';
UPDATE list_options SET option_id = 'LBTref'   WHERE list_id = 'transactions' AND option_id = 'Referral';
UPDATE list_options SET option_id = 'LBTptreq' WHERE list_id = 'transactions' AND option_id = 'Patient Request';
UPDATE list_options SET option_id = 'LBTphreq' WHERE list_id = 'transactions' AND option_id = 'Physician Request';
UPDATE list_options SET option_id = 'LBTlegal' WHERE list_id = 'transactions' AND option_id = 'Legal';
UPDATE list_options SET option_id = 'LBTbill'  WHERE list_id = 'transactions' AND option_id = 'Billing';
UPDATE transactions SET title     = 'LBTref'   WHERE title = 'Referral';
UPDATE transactions SET title     = 'LBTptreq' WHERE title = 'Patient Request';
UPDATE transactions SET title     = 'LBTphreq' WHERE title = 'Physician Request';
UPDATE transactions SET title     = 'LBTlegal' WHERE title = 'Legal';
UPDATE transactions SET title     = 'LBTbill'  WHERE title = 'Billing';
UPDATE layout_options SET form_id = 'LBTref'   WHERE form_id = 'REF';

INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,
  `max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`)
  VALUES ('LBTptreq','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5);

INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,
  `max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`)
  VALUES ('LBTphreq','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5);

INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,
  `max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`)
  VALUES ('LBTlegal','body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5);

INSERT INTO `layout_options` (`form_id`,`field_id`,`group_name`,`title`,`seq`,`data_type`,`uor`,`fld_length`,
  `max_length`,`list_id`,`titlecols`,`datacols`,`default_value`,`edit_options`,`description`,`fld_rows`)
  VALUES ('LBTbill' ,'body','1','Details',10,3,2,30,0,'',1,3,'','','Content',5);
#EndIf

#IfNotTable lbt_data
CREATE TABLE `lbt_data` (
  `form_id`     bigint(20)   NOT NULL COMMENT 'references transactions.id',
  `field_id`    varchar(31)  NOT NULL COMMENT 'references layout_options.field_id',
  `field_value` TEXT         NOT NULL,
  PRIMARY KEY (`form_id`,`field_id`)
) ENGINE=MyISAM COMMENT='contains all data from layout-based transactions';
#EndIf

#IfColumn transactions                                body
INSERT INTO lbt_data SELECT id, 'body'              , body               FROM transactions WHERE body               != '';
ALTER TABLE transactions DROP COLUMN                  body;
#EndIf
#IfColumn transactions                                refer_date
INSERT INTO lbt_data SELECT id, 'refer_date'        , refer_date         FROM transactions WHERE refer_date         IS NOT NULL;
ALTER TABLE transactions DROP COLUMN                  refer_date;
#EndIf
#IfColumn transactions                                refer_from
INSERT INTO lbt_data SELECT id, 'refer_from'        , refer_from         FROM transactions WHERE refer_from         != 0;
ALTER TABLE transactions DROP COLUMN                  refer_from;
#EndIf
#IfColumn transactions                                refer_to
INSERT INTO lbt_data SELECT id, 'refer_to'          , refer_to           FROM transactions WHERE refer_to           != 0;
ALTER TABLE transactions DROP COLUMN                  refer_to;
#EndIf
#IfColumn transactions                                refer_diag
INSERT INTO lbt_data SELECT id, 'refer_diag'        , refer_diag         FROM transactions WHERE refer_diag         != '';
ALTER TABLE transactions DROP COLUMN                  refer_diag;
#EndIf
#IfColumn transactions                                refer_risk_level
INSERT INTO lbt_data SELECT id, 'refer_risk_level'  , refer_risk_level   FROM transactions WHERE refer_risk_level   != '';
ALTER TABLE transactions DROP COLUMN                  refer_risk_level;
#EndIf
#IfColumn transactions                                refer_vitals
INSERT INTO lbt_data SELECT id, 'refer_vitals'      , refer_vitals       FROM transactions WHERE refer_vitals       != 0;
ALTER TABLE transactions DROP COLUMN                  refer_vitals;
#EndIf
#IfColumn transactions                                refer_external
INSERT INTO lbt_data SELECT id, 'refer_external'    , refer_external     FROM transactions WHERE refer_external     != 0;
ALTER TABLE transactions DROP COLUMN                  refer_external;
#EndIf
#IfColumn transactions                                refer_related_code
INSERT INTO lbt_data SELECT id, 'refer_related_code', refer_related_code FROM transactions WHERE refer_related_code != '';
ALTER TABLE transactions DROP COLUMN                  refer_related_code;
#EndIf
#IfColumn transactions                                refer_reply_date
INSERT INTO lbt_data SELECT id, 'refer_reply_date'  , refer_reply_date   FROM transactions WHERE refer_reply_date   IS NOT NULL;
ALTER TABLE transactions DROP COLUMN                  refer_reply_date;
#EndIf
#IfColumn transactions                                reply_date
INSERT INTO lbt_data SELECT id, 'reply_date'        , reply_date         FROM transactions WHERE reply_date         IS NOT NULL;
ALTER TABLE transactions DROP COLUMN                  reply_date;
#EndIf
#IfColumn transactions                                reply_from
INSERT INTO lbt_data SELECT id, 'reply_from'        , reply_from         FROM transactions WHERE reply_from         != '';
ALTER TABLE transactions DROP COLUMN                  reply_from;
#EndIf
#IfColumn transactions                                reply_init_diag
INSERT INTO lbt_data SELECT id, 'reply_init_diag'   , reply_init_diag    FROM transactions WHERE reply_init_diag    != '';
ALTER TABLE transactions DROP COLUMN                  reply_init_diag;
#EndIf
#IfColumn transactions                                reply_final_diag
INSERT INTO lbt_data SELECT id, 'reply_final_diag'  , reply_final_diag   FROM transactions WHERE reply_final_diag   != '';
ALTER TABLE transactions DROP COLUMN                  reply_final_diag;
#EndIf
#IfColumn transactions                                reply_documents
INSERT INTO lbt_data SELECT id, 'reply_documents'   , reply_documents    FROM transactions WHERE reply_documents    != '';
ALTER TABLE transactions DROP COLUMN                  reply_documents;
#EndIf
#IfColumn transactions                                reply_findings
INSERT INTO lbt_data SELECT id, 'reply_findings'    , reply_findings     FROM transactions WHERE reply_findings     != '';
ALTER TABLE transactions DROP COLUMN                  reply_findings;
#EndIf
#IfColumn transactions                                reply_services
INSERT INTO lbt_data SELECT id, 'reply_services'    , reply_services     FROM transactions WHERE reply_services     != '';
ALTER TABLE transactions DROP COLUMN                  reply_services;
#EndIf
#IfColumn transactions                                reply_recommend
INSERT INTO lbt_data SELECT id, 'reply_recommend'   , reply_recommend    FROM transactions WHERE reply_recommend    != '';
ALTER TABLE transactions DROP COLUMN                  reply_recommend;
#EndIf
#IfColumn transactions                                reply_rx_refer
INSERT INTO lbt_data SELECT id, 'reply_rx_refer'    , reply_rx_refer     FROM transactions WHERE reply_rx_refer     != '';
ALTER TABLE transactions DROP COLUMN                  reply_rx_refer;
#EndIf
#IfColumn transactions                                reply_related_code
INSERT INTO lbt_data SELECT id, 'reply_related_code', reply_related_code FROM transactions WHERE reply_related_code != '';
ALTER TABLE transactions DROP COLUMN                  reply_related_code;
#EndIf

#IfRow2D clinical_rules id secure_messaging_amc amc_code_2014 170.314(g)(1)/(2)
UPDATE `clinical_rules` SET `amc_code_2014` = '170.314(g)(1)/(2)-19' WHERE `id` = 'secure_messaging_amc' AND `amc_code_2014` = '170.314(g)(1)/(2)'; 
#EndIf

#IfMissingColumn documents documentationOf
ALTER TABLE `documents` ADD `documentationOf` varchar(255) DEFAULT NULL;
#EndIf

#IfMissingColumn ccda_components ccda_type
ALTER TABLE `ccda_components` ADD ccda_type int(11) NOT NULL COMMENT '0=>sections,1=>components';
#EndIf

#IfNotRow2D ccda_components ccda_components_field allergies ccda_components_name Allergies
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('allergies','Allergies',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field medications ccda_components_name Medications
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('medications','Medications',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field problems ccda_components_name Problems
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('problems','Problems',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field immunizations ccda_components_name Immunizations
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('immunizations','Immunizations',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field procedures ccda_components_name Procedures
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('procedures','Procedures',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field results ccda_components_name Results
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('results','Results',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field plan_of_care ccda_components_name Plan Of Care
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('plan_of_care','Plan Of Care',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field vitals ccda_components_name Vitals
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('vitals','Vitals',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field social_history ccda_components_name Social History
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('social_history','Social History',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field encounters ccda_components_name Encounters
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('encounters','Encounters',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field functional_status ccda_components_name Functional Status
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('functional_status','Functional Status',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field referral ccda_components_name Reason for Referral
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('referral','Reason for Referral',1);
#EndIf

#IfNotRow2D ccda_components ccda_components_field instructions ccda_components_name Instructions
INSERT INTO ccda_components (ccda_components_field, ccda_components_name, ccda_type) VALUES ('instructions','Instructions',1);
#EndIf

#IfNotTable form_clinical_instructions
CREATE TABLE `form_clinical_instructions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pid` bigint(20) DEFAULT NULL,
  `encounter` varchar(255) DEFAULT NULL,
  `user` varchar(255) DEFAULT NULL,
  `instruction` text,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `activity` TINYINT DEFAULT 1 NULL,
  PRIMARY KEY (`id`)
)ENGINE=InnoDB;
INSERT INTO `registry` (`name`,`state`,`directory`,`sql_run`,`unpackaged`,`date`,`priority`,`category`,`nickname`) VALUES ('Clinical Instructions', 1, 'clinical_instructions', 1, 1, '2015-09-09 00:00:00', 0, 'Clinical', '');
#EndIf

#IfMissingColumn clinical_rules web_reference
ALTER TABLE  `clinical_rules` ADD  `web_reference` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Clinical Rule Web Reference';
#EndIf

#IfNotTable clinical_rules_log
CREATE TABLE `clinical_rules_log` (
  `id` bigint(20) NOT NULL auto_increment,
  `date` datetime DEFAULT NULL,
  `pid` bigint(20) NOT NULL DEFAULT '0',
  `uid` bigint(20) NOT NULL DEFAULT '0',
  `category` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'An example category is clinical_reminder_widget',
  `value` TEXT NOT NULL,
  PRIMARY KEY (`id`),
  KEY `pid` (`pid`),
  KEY `uid` (`uid`),
  KEY `category` (`category`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
#EndIf

#IfMissingColumn clinical_rules access_control
ALTER TABLE `clinical_rules` ADD `access_control` VARCHAR(255) NOT NULL DEFAULT 'patients:med' COMMENT 'ACO link for access control';
#EndIf

#IfNotRow clinical_rules id rule_socsec_entry
INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag`, `access_control` ) VALUES ('rule_socsec_entry', 0, 0, 0, 0, '', '', 0, '', 0, 'admin:practice');
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id rule_socsec_entry
INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_socsec_entry', 'Data Entry - Social Security Number', 1500, 0);
#EndIf

#IfNotRow2D list_options list_id rule_action option_id act_soc_sec
INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_soc_sec', 'Social Security Number', 155, 0);
#EndIf

#IfNotRow rule_action id rule_socsec_entry
INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_socsec_entry', 1, 'act_cat_assess', 'act_soc_sec');
#EndIf

#IfNotRow2D rule_action_item category act_cat_assess item act_soc_sec
INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_assess', 'act_soc_sec', '', '', 0);
#EndIf

#IfNotRow rule_reminder id rule_socsec_entry
INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_socsec_entry', 'clinical_reminder_pre', 'week', '2');
INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_socsec_entry', 'clinical_reminder_post', 'month', '1');
INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_socsec_entry', 'patient_reminder_pre', 'week', '2');
INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_socsec_entry', 'patient_reminder_post', 'month', '1');
#EndIf

#IfNotRow rule_target id rule_socsec_entry
INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_socsec_entry', 1, 1, 1, 'target_database', '::patient_data::ss::::::ge::1', 0);
#EndIf

#IfRow2D list_options list_id clinical_rules option_id e_prescribe_stage1_amc
UPDATE `list_options` SET `title` = 'Generate and transmit permissible prescriptions electronically (Not including controlled substances).'  WHERE list_id = 'clinical_rules' AND option_id = 'e_prescribe_stage1_amc';
#EndIf

#IfRow2D list_options list_id clinical_rules option_id e_prescribe_2_stage2_amc 
UPDATE `list_options` SET `title` = 'Generate and transmit permissible prescriptions electronically (Not including controlled substances).'  WHERE list_id = 'clinical_rules' AND option_id = 'e_prescribe_2_stage2_amc';
#EndIf

#IfNotRow clinical_rules id rule_penicillin_allergy
INSERT INTO `clinical_rules` ( `id`, `pid`, `active_alert_flag`, `passive_alert_flag`, `cqm_flag`, `cqm_nqf_code`, `cqm_pqri_code`, `amc_flag`, `amc_code`, `patient_reminder_flag` ) VALUES ('rule_penicillin_allergy', 0, 0, 0, 0, '', '', 0, '', 0);
#EndIf

#IfNotRow2D list_options list_id clinical_rules option_id rule_penicillin_allergy
INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('clinical_rules', 'rule_penicillin_allergy', 'Assess Penicillin Allergy', 1600, 0);
#EndIf

#IfNotRow2D list_options list_id rule_action option_id act_penicillin_allergy
INSERT INTO `list_options` ( `list_id`, `option_id`, `title`, `seq`, `is_default` ) VALUES ('rule_action' ,'act_penicillin_allergy', 'Penicillin Allergy', 157, 0);
#EndIf

#IfNotRow rule_action id rule_penicillin_allergy
INSERT INTO `rule_action` ( `id`, `group_id`, `category`, `item` ) VALUES ('rule_penicillin_allergy', 1, 'act_cat_assess', 'act_penicillin_allergy');
#EndIf

#IfNotRow2D rule_action_item category act_cat_assess item act_penicillin_allergy
INSERT INTO `rule_action_item` ( `category`, `item`, `clin_rem_link`, `reminder_message`, `custom_flag` ) VALUES ('act_cat_assess', 'act_penicillin_allergy', '', '', 1);
#EndIf

#IfNotRow rule_reminder id rule_penicillin_allergy
INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_penicillin_allergy', 'clinical_reminder_pre', 'week', '2');
INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_penicillin_allergy', 'clinical_reminder_post', 'month', '1');
INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_penicillin_allergy', 'patient_reminder_pre', 'week', '2');
INSERT INTO `rule_reminder` ( `id`, `method`, `method_detail`, `value` ) VALUES ('rule_penicillin_allergy', 'patient_reminder_post', 'month', '1');
#EndIf

#IfNotRow rule_filter id rule_penicillin_allergy
INSERT INTO `rule_filter` ( `id`, `include_flag`, `required_flag`, `method`, `method_detail`, `value` ) VALUES ('rule_penicillin_allergy', 1, 0, 'filt_lists', 'allergy', 'penicillin');
#EndIf

#IfNotRow rule_target id rule_penicillin_allergy
INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_penicillin_allergy', 1, 1, 1, 'target_interval', 'year', 1);
INSERT INTO `rule_target` ( `id`, `group_id`, `include_flag`, `required_flag`, `method`, `value`, `interval` ) VALUES ('rule_penicillin_allergy', 1, 1, 1, 'target_database', 'CUSTOM::act_cat_assess::act_penicillin_allergy::YES::ge::1', 0);
#EndIf

#IfMissingColumn clinical_rules_log new_value
ALTER TABLE  `clinical_rules_log` ADD `new_value` TEXT NOT NULL;
#EndIf

#IfNotColumnType procedure_report date_report datetime
ALTER TABLE `procedure_report` CHANGE `date_report` `date_report` datetime DEFAULT NULL;
#EndIf
