IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_001')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_001', '陳昱成耳鼻喉科診所', '臺南市', '安南區', '臺南市安南區海佃路一段196號', '診所', '06-2800178', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_001' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_001', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_002')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_002', '蔡清祥小兒科診所', '臺南市', '安南區', '臺南市安南區同安路46號', '診所', '06-2477127', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_002' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_002', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_003')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_003', '榮銘內科診所', '臺南市', '安南區', '臺南市安南區海佃路一段50號', '診所', '06-2593107', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '腎臟內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('腎臟內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_003' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '腎臟內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_003', Id FROM ServiceItems WHERE Name = '腎臟內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_004')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_004', '明崑診所', '臺南市', '安南區', '臺南市安南區郡安路四段79號', '診所', '06-2833360', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '肝膽腸胃內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('肝膽腸胃內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_004' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '肝膽腸胃內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_004', Id FROM ServiceItems WHERE Name = '肝膽腸胃內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_005')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_005', '張銘顯診所', '臺南市', '安南區', '臺南市安南區安和路三段92號', '診所', '06-3559613', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_005' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_005', Id FROM ServiceItems WHERE Name = '內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_006')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_006', '怡安小兒科診所', '臺南市', '安南區', '臺南市安南區怡安路二段511號', '診所', '06-2456657', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_006' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_006', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_007')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_007', '杏安耳鼻喉科診所', '臺南市', '安南區', '臺南市安南區安中路一段675號', '診所', '06-2550296', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_007' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_007', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '一般科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('一般科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_007' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '一般科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_007', Id FROM ServiceItems WHERE Name = '一般科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_008')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_008', '海東小兒科診所診所', '臺南市', '安南區', '臺南市安南區安中路三段355號', '診所', '06-2561399', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_008' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_008', Id FROM ServiceItems WHERE Name = '兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_009')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_009', '李宗勳耳鼻喉科診所', '臺南市', '安南區', '臺南市安南區海佃路一段282號', '診所', '06-2502345', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_009' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_009', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_010')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_010', '羅景穗診所', '臺南市', '安南區', '臺南市安南區安中路四段262號', '診所', '06-2452123', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_010' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_010', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_011')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_011', '應達儀內科診所', '臺南市', '安南區', '臺南市安南區安和路四段316號', '診所', '06-3559216', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '肝膽腸胃內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('肝膽腸胃內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_011' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '肝膽腸胃內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_011', Id FROM ServiceItems WHERE Name = '肝膽腸胃內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_012')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_012', '安立診所', '臺南市', '安南區', '臺南市安南區安和路五段139號', '診所', '06-3564816', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '精神科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('精神科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_012' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '精神科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_012', Id FROM ServiceItems WHERE Name = '精神科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_013')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_013', '海佃診所', '臺南市', '安南區', '臺南市安南區海佃路二段620號', '診所', '06-2560202', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '婦產科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('婦產科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_013' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '婦產科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_013', Id FROM ServiceItems WHERE Name = '婦產科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_014')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_014', '陳建杉耳鼻喉科診所', '臺南市', '安南區', '臺南市安南區海佃路三段360號', '診所', '06-2450731', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_014' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_014', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_015')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_015', '好神診所', '臺南市', '安南區', '臺南市安南區新宅五街17號', '診所', '06-3567222', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '神經內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('神經內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_015' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '神經內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_015', Id FROM ServiceItems WHERE Name = '神經內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_016')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_016', '十二佃診所', '臺南市', '安南區', '臺南市安南區海佃路四段388巷107弄22號', '診所', '06-2465658', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '外科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('外科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_016' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '外科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_016', Id FROM ServiceItems WHERE Name = '外科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_017')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_017', '吳孟輯皮膚科診所', '臺南市', '安南區', '臺南市安南區安和路一段80號', '診所', '06-2826655', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '皮膚科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('皮膚科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_017' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '皮膚科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_017', Id FROM ServiceItems WHERE Name = '皮膚科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_018')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_018', '蔡添祥耳鼻喉科', '臺南市', '安南區', '臺南市安南區海佃路一段90號', '診所', '06-3587722', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_018' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_018', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_019')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_019', '奇安內科診所', '臺南市', '安南區', '臺南市安南區北安路三段138號', '診所', '06-2471101', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '腎臟內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('腎臟內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_019' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '腎臟內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_019', Id FROM ServiceItems WHERE Name = '腎臟內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_020')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_020', '俊傑診所', '臺南市', '安南區', '臺南市安南區安豐六街242號', '診所', '06-3554717', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_020' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_020', Id FROM ServiceItems WHERE Name = '內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_021')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_021', '陳澤彬婦產科診所', '臺南市', '安南區', '臺南市安南區北安路二段42號', '診所', '06-2819333', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '婦產科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('婦產科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_021' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '婦產科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_021', Id FROM ServiceItems WHERE Name = '婦產科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_022')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_022', '劉伊薰小兒科診所', '臺南市', '北區', '臺南市北區北安路一段259號', '診所', '06-2832111', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_022' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_022', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_023')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_023', '傅耳鼻喉科診所', '臺南市', '北區', '臺南市北區文賢路877號', '診所', '06-2507089', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_023' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_023', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_024')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_024', '雨欣診所', '臺南市', '北區', '臺南市北區北安路一段259號', '診所', '06-2832111', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_024' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_024', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_025')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_025', '許森彥精神科診所', '臺南市', '北區', '臺南市北區育德路466號', '診所', '06-2513283', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '精神科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('精神科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_025' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '精神科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_025', Id FROM ServiceItems WHERE Name = '精神科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_026')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_026', '精準眼科診所', '臺南市', '北區', '臺南市北區北安路一段108號', '診所', '06-2512020', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '眼科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('眼科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_026' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '眼科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_026', Id FROM ServiceItems WHERE Name = '眼科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_027')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_027', '誠逸內科診所', '臺南市', '北區', '臺南市北區北安路一段189號', '診所', '06-2516866', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '肝膽腸胃內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('肝膽腸胃內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_027' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '肝膽腸胃內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_027', Id FROM ServiceItems WHERE Name = '肝膽腸胃內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_028')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_028', '永昕耳鼻喉科診所', '臺南市', '北區', '臺南市北區文賢路677號', '診所', '06-3587366', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_028' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_028', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_029')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_029', '惠幼小兒科診所', '臺南市', '北區', '臺南市北區公園路167號', '診所', '06-2251179', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_029' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_029', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_030')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_030', '心永康身心精神科診所', '臺南市', '永康區', '臺南市永康區小東路679號', '診所', '06-3112000', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '精神科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('精神科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_030' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '精神科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_030', Id FROM ServiceItems WHERE Name = '精神科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_031')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_031', '翁韶嶽耳鼻喉科診所', '臺南市', '永康區', '臺南市永康區中華二路383號', '診所', '06-3135216', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_031' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_031', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_032')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_032', '林俞仲身心精神科診所', '臺南市', '永康區', '臺南市永康區中山南路31號', '診所', '06-3036006', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '精神科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('精神科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_032' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '精神科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_032', Id FROM ServiceItems WHERE Name = '精神科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_033')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_033', '大眾診所', '臺南市', '永康區', '臺南市永康區中華路240號', '診所', '06-3129024', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_033' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_033', Id FROM ServiceItems WHERE Name = '內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_034')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_034', '全民診所', '臺南市', '永康區', '臺南市永康區中華一路88號', '診所', '06-2022119', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '大腸直腸外科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('大腸直腸外科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_034' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '大腸直腸外科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_034', Id FROM ServiceItems WHERE Name = '大腸直腸外科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_035')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_035', '永慶診所', '臺南市', '永康區', '臺南市永康區復國一路198號', '診所', '06-3133996', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_035' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_035', Id FROM ServiceItems WHERE Name = '內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_036')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_036', '許崇哲耳鼻喉科診所', '臺南市', '永康區', '臺南市永康區中山南路126號', '診所', '06-2314815', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_036' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_036', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_037')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_037', '永泰診所', '臺南市', '永康區', '臺南市永康區四維街12號', '診所', '06-2310254', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '外科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('外科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_037' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '外科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_037', Id FROM ServiceItems WHERE Name = '外科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_038')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_038', '心寬診所', '臺南市', '永康區', '臺南市永康區中華路245號', '診所', '06-3131212', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '精神科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('精神科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_038' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '精神科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_038', Id FROM ServiceItems WHERE Name = '精神科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_039')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_039', '杏新耳鼻喉科診所', '臺南市', '永康區', '臺南市永康區中山南路12-2號', '診所', '06-3029066', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_039' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_039', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_039' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_039', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_040')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_040', '骨立診所', '臺南市', '永康區', '臺南市永康區中山南路12-2號', '診所', '06-3029066', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '神經內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('神經內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_040' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '神經內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_040', Id FROM ServiceItems WHERE Name = '神經內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_041')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_041', '郭明陽骨外科診所', '臺南市', '永康區', '臺南市永康區中山路102號', '診所', '06-2035766', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '骨外科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('骨外科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_041' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '骨外科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_041', Id FROM ServiceItems WHERE Name = '骨外科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_042')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_042', '安定區衛生所', '臺南市', '安定區', '臺南市安定區安定里 59 號之 1', '診所', '06-5922022', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_042' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_042', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_043')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_043', '海寮診所', '臺南市', '安定區', '臺南市安定區海寮7之9號', '診所', '06-5932693', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_043' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_043', Id FROM ServiceItems WHERE Name = '內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_044')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_044', '徐春暉診所', '臺南市', '西港區', '臺南市西港區慶安路95之8號', '診所', '06-7961193', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_044' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_044', Id FROM ServiceItems WHERE Name = '內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_045')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_045', '葉佳霖診所', '臺南市', '佳里區', '臺南市佳里區光復路313號', '診所', '06-7227875', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '肝膽腸胃內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('肝膽腸胃內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_045' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '肝膽腸胃內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_045', Id FROM ServiceItems WHERE Name = '肝膽腸胃內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_046')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_046', '茗亮楊宗茗復健科', '臺南市', '佳里區', '臺南市佳里區文化路445號', '診所', '06-7222005', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '復健科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('復健科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_046' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '復健科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_046', Id FROM ServiceItems WHERE Name = '復健科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_047')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_047', '賴建利小兒科診所', '臺南市', '佳里區', '臺南市佳里區延平路280號', '診所', '06-7212233', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_047' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_047', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_048')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_048', '陳外科診所', '臺南市', '官田區', '臺南市官田區隆田里文化街42-1號', '診所', '06-5793804', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '外科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('外科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_048' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '外科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_048', Id FROM ServiceItems WHERE Name = '外科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_049')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_049', '宗政診所', '臺南市', '官田區', '臺南市官田區中山路一段108號', '診所', '06-5792170', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '外科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('外科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_049' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '外科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_049', Id FROM ServiceItems WHERE Name = '外科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_050')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_050', '廖恆輝耳鼻喉科', '臺南市', '麻豆區', '臺南市麻豆區中山路150之9號', '診所', '06-5710688', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_050' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_050', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_051')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_051', '禾安診所', '臺南市', '麻豆區', '臺南市麻豆區中正路59-3號', '診所', '06-5726166', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '腎臟內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('腎臟內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_051' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '腎臟內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_051', Id FROM ServiceItems WHERE Name = '腎臟內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_052')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_052', '沅林內科診所', '臺南市', '善化區', '臺南市善化區大成路382號', '診所', '06-5830538', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '腎臟內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('腎臟內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_052' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '腎臟內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_052', Id FROM ServiceItems WHERE Name = '腎臟內科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_053')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_053', '善化區衛生所', '臺南市', '善化區', '臺南市善化區中山路200號', '診所', '06-5837035', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_053' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_053', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_054')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_054', '明翔診所', '臺南市', '善化區', '南市善化區中山路350號', '診所', '06-5816968', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_054' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_054', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_055')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_055', '蔡奇孟耳鼻喉科診所', '臺南市', '善化區', '臺南市善化區大成路312之1號', '診所', '06-5851696', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_055' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_055', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_056')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_056', '聯合耳鼻喉科診所', '臺南市', '善化區', '臺南市善化區大成路312之1號', '診所', '06-5851696', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_056' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_056', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_057')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_057', '大成診所', '臺南市', '善化區', '臺南市善化區大成路98號', '診所', '06-5833300', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '肝膽腸胃內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('肝膽腸胃內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_057' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '肝膽腸胃內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_057', Id FROM ServiceItems WHERE Name = '肝膽腸胃內科';
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '大腸直腸外科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('大腸直腸外科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_057' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '大腸直腸外科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_057', Id FROM ServiceItems WHERE Name = '大腸直腸外科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_058')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_058', '佳安小兒科診所', '臺南市', '新市區', '臺南市新市區中正路331-1號', '診所', '06-5995234', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_058' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_058', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_059')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_059', '麗新診所', '臺南市', '新市區', '臺南市新市區中正路293號', '診所', '06-5995902', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '皮膚科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('皮膚科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_059' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '皮膚科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_059', Id FROM ServiceItems WHERE Name = '皮膚科';
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_059' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_059', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_060')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_060', '方振崑眼科診所', '臺南市', '新市區', '臺南市新市區中正路319之2號', '診所', '06-5990172', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '眼科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('眼科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_060' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '眼科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_060', Id FROM ServiceItems WHERE Name = '眼科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_061')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_061', '大心診所', '臺南市', '新市區', '臺南市新市區中正路143號', '診所', '06-5899930', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_061' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_061', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_062')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_062', '仁愛診所', '臺南市', '新市區', '臺南市新市區仁愛街148之1號', '診所', '06-5896324', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '家醫科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('家醫科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_062' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '家醫科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_062', Id FROM ServiceItems WHERE Name = '家醫科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_063')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_063', '吳國堯小兒科診所', '臺南市', '安平區', '臺南市安平區文平路438號1樓', '診所', '06-2938860', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_063' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_063', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_064')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_064', '久留媄診所', '臺南市', '安南區', '臺南市安南區海佃路一段196號1樓', '診所', '06-2800178', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_064' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_064', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_065')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_065', '建忠診所', '臺南市', '中西區', '臺南市中西區南門里府前路一段219號', '診所', '06-2133568', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '小兒科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('小兒科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_065' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '小兒科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_065', Id FROM ServiceItems WHERE Name = '小兒科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_066')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_066', '崇德杏新耳鼻喉科診所', '臺南市', '東區', '臺南市東區崇德里崇德路473號', '診所', '06-2685555', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '耳鼻喉科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('耳鼻喉科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_066' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '耳鼻喉科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_066', Id FROM ServiceItems WHERE Name = '耳鼻喉科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_CL_067')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_CL_067', '弘大內科診所', '臺南市', '新市區', '臺南市新市區新和里中正路147號', '診所', '06-5899504', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '內科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('內科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_067' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '內科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_067', Id FROM ServiceItems WHERE Name = '內科';
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '腸胃科')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('腸胃科', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_CL_067' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '腸胃科')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_CL_067', Id FROM ServiceItems WHERE Name = '腸胃科';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_HN_001')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_HN_001', '佳安居家護理所', '臺南市', '東區', '臺南市東區富農街一段282號1-2樓', '居護所', '06-2908861', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '居家護理所')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('居家護理所', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_HN_001' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '居家護理所')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_HN_001', Id FROM ServiceItems WHERE Name = '居家護理所';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_HN_002')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_HN_002', '享健達居家護理所', '臺南市', '東區', '臺南市東區中華東路二段133巷17弄31號2樓', '居護所', '0977-269588', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '居家護理所')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('居家護理所', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_HN_002' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '居家護理所')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_HN_002', Id FROM ServiceItems WHERE Name = '居家護理所';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_HN_003')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_HN_003', '永伈居家護理所', '臺南市', '北區', '臺南市北區北園街38號2樓之6', '居護所', '06-2083232', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '居家護理所')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('居家護理所', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_HN_003' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '居家護理所')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_HN_003', Id FROM ServiceItems WHERE Name = '居家護理所';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_HN_004')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_HN_004', '慈烏居家護理所', '臺南市', '北區', '臺南市北區和緯路一段106號2樓', '居護所', '06-2513306', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '居家護理所')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('居家護理所', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_HN_004' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '居家護理所')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_HN_004', Id FROM ServiceItems WHERE Name = '居家護理所';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_HN_005')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_HN_005', '舒心居家護理所', '臺南市', '北區', '臺南市北區前鋒路293號12樓1211室', '居護所', '06-2090815', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '居家護理所')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('居家護理所', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_HN_005' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '居家護理所')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_HN_005', Id FROM ServiceItems WHERE Name = '居家護理所';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_HN_006')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_HN_006', '荷園居家護理所', '臺南市', '永康區', '臺南市永康區復國路50號5樓之3', '居護所', '06-3120072', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '居家護理所')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('居家護理所', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_HN_006' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '居家護理所')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_HN_006', Id FROM ServiceItems WHERE Name = '居家護理所';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_HN_007')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_HN_007', '信福居家護理所', '臺南市', '永康區', '臺南市永康區忠孝路152巷42號1樓', '居護所', '06-3123228', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '居家護理所')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('居家護理所', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_HN_007' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '居家護理所')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_HN_007', Id FROM ServiceItems WHERE Name = '居家護理所';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_HN_008')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_HN_008', '您好居家護理所', '臺南市', '官田區', '臺南市官田區隆本里中山路一段168號1樓', '居護所', '06-5790095', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '居家護理所')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('居家護理所', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_HN_008' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '居家護理所')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_HN_008', Id FROM ServiceItems WHERE Name = '居家護理所';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_001')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_001', '臺南市立安南醫院附設護理之家', '臺南市', '安南區', '台南市安南區長和路二段66號  第二醫療大樓3、4樓', '長照機構', '06-3553111', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_001' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_001', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_002')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_002', '臺南市私立順安老人長期照顧中心', '臺南市', '安南區', '臺南市安南區原佃里怡安路二段516巷86號', '長照機構', '06-2455566', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_002' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_002', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_003')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_003', '臺南市私立怡安老人長期照顧中心', '臺南市', '安南區', '臺南市安南區怡安路二段516巷86號1樓', '長照機構', '06-2455566', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_003' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_003', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_004')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_004', '喬安長照社團法人附設臺南市私立永安住宿長照機構', '臺南市', '安南區', '臺南市安南區怡安路二段516巷190號', '長照機構', '06-2473936', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_004' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_004', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_005')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_005', '臺南市私立安和老人長期照顧中心', '臺南市', '安南區', '臺南市安南區長和路4段283號', '長照機構', '06-2558385', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_005' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_005', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_006')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_006', '安南翔裕園綜合長照機構', '臺南市', '安南區', '臺南市安南區布袋里布袋路6號', '長照機構', '06-2550138', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_006' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_006', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_007')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_007', '晶泰綜合式長照機構', '臺南市', '安南區', '臺南市安南區長溪路二段163號', '長照機構', '06-2473555', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_007' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_007', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_008')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_008', '台南市私立佳和老人長期照顧中心', '臺南市', '北區', '臺南市北區北成路350號', '長照機構', '06-2826717', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_008' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_008', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO

IF NOT EXISTS (SELECT 1 FROM HealthBureauServiceLocation WHERE Code = 'AN_LT_009')
BEGIN
    INSERT INTO HealthBureauServiceLocation (Code, Location, City, District, Address, LocationType, PhoneNumber, Enabled, Note)
    VALUES ('AN_LT_009', '財團法人臺灣省臺南市臺灣首廟天壇附設臺南市私立天壇老人養護中心', '臺南市', '新化區', '臺南市新化區知義里新和庄22號', '長照機構', '06-5800111', 1, NULL);
END
IF NOT EXISTS (SELECT 1 FROM ServiceItems WHERE Name = '長照機構')
BEGIN
    INSERT INTO ServiceItems (Name, Type, Enabled) VALUES ('長照機構', 'Department', 1);
END

IF NOT EXISTS (
    SELECT 1 FROM ServiceLocationItemRelations 
    WHERE ServiceLocationCode = 'AN_LT_009' 
      AND ServiceItemId = (SELECT TOP 1 Id FROM ServiceItems WHERE Name = '長照機構')
)
BEGIN
    INSERT INTO ServiceLocationItemRelations (ServiceLocationCode, ServiceItemId)
    SELECT 'AN_LT_009', Id FROM ServiceItems WHERE Name = '長照機構';
END
GO
