/*Sealant */

insert ignore into `icd10tm_operation` (`icd10tm_operation_code`, `description_english`, `description_thai`, `hos_guid`, `hos_guid_ext`) VALUES ('238703A', 'Sealant per tooth 16 -permanent', 'เคลือบหลุมร่องฟันแท้ ฟันซี่ 16', NULL, NULL);

insert ignore into `icd10tm_operation` (`icd10tm_operation_code`, `description_english`, `description_thai`, `hos_guid`, `hos_guid_ext`) VALUES ('238703B', 'Sealant per tooth 17-permanent', 'เคลือบหลุมร่องฟันแท้ ฟันซี่ 17 ', NULL, NULL);

insert ignore into `icd10tm_operation` (`icd10tm_operation_code`, `description_english`, `description_thai`, `hos_guid`, `hos_guid_ext`) VALUES ('238703C', 'Sealant per tooth 26-permanent', 'เคลือบหลุมร่องฟันแท้ ฟันซี่ 26 ', NULL, NULL);

insert ignore into `icd10tm_operation` (`icd10tm_operation_code`, `description_english`, `description_thai`, `hos_guid`, `hos_guid_ext`) VALUES ('238703D', 'Sealant per tooth 27-permanent', 'เคลือบหลุมร่องฟันแท้ ฟันซี่ 27 ', NULL, NULL);

insert ignore into `icd10tm_operation` (`icd10tm_operation_code`, `description_english`, `description_thai`, `hos_guid`, `hos_guid_ext`) VALUES ('238703E', 'Sealant per tooth 36-permanent', 'เคลือบหลุมร่องฟันแท้ ฟันซี่ 36 ', NULL, NULL);

insert ignore into `icd10tm_operation` (`icd10tm_operation_code`, `description_english`, `description_thai`, `hos_guid`, `hos_guid_ext`) VALUES ('238703F', 'Sealant per tooth 37-permanent', 'เคลือบหลุมร่องฟันแท้ ฟันซี่ 37 ', NULL, NULL);

insert ignore into `icd10tm_operation` (`icd10tm_operation_code`, `description_english`, `description_thai`, `hos_guid`, `hos_guid_ext`) VALUES ('238703G', 'Sealant per tooth 46-permanent', 'เคลือบหลุมร่องฟันแท้ ฟันซี่ 46 ', NULL, NULL);

insert ignore into `icd10tm_operation` (`icd10tm_operation_code`, `description_english`, `description_thai`, `hos_guid`, `hos_guid_ext`) VALUES ('238703H', 'Sealant per tooth 47-permanent', 'เคลือบหลุมร่องฟันแท้ ฟันซี่ 47 ', NULL, NULL);

/*

dttm_sealant

*/

delete from dttm WHERE icd10tm_operation_code = '238703A';

SET @c = (select lpad(MAX(CODE)+1,6,'0') FROM dttm) ;

insert ignore into dttm (code,name,requiredtc,vorder,treatment,icd10,icd9cm,icode,opd_price1,opd_price2,opd_price3,ipd_price1,ipd_price2,ipd_price3,dttm_group_id,unit,charge_per_qty,active_status,dttm_guid,thai_name,charge_area_qty,dttm_subgroup_id,icd10tm_operation_code,dttm_dw_report_group_id,export_proced,dent2006_item_code,hos_guid)

VALUES (@c,'เคลือบหลุมร่องฟันแท้ ฟันซี่ 16', NULL, NULL,'N','', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,310, NULL, NULL,'Y', NULL, NULL, NULL, NULL,'238703A',6, NULL, NULL, NULL);

delete from dttm WHERE icd10tm_operation_code = '238703B';

SET @d = (select lpad(MAX(CODE)+2,6,'0') FROM dttm) ;

insert ignore into dttm (code,name,requiredtc,vorder,treatment,icd10,icd9cm,icode,opd_price1,opd_price2,opd_price3,ipd_price1,ipd_price2,ipd_price3,dttm_group_id,unit,charge_per_qty,active_status,dttm_guid,thai_name,charge_area_qty,dttm_subgroup_id,icd10tm_operation_code,dttm_dw_report_group_id,export_proced,dent2006_item_code,hos_guid)

VALUES (@d,'เคลือบหลุมร่องฟันแท้ ฟันซี่ 17', NULL, NULL,'N','', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,310, NULL, NULL,'Y', NULL, NULL, NULL, NULL,'238703B',6, NULL, NULL, NULL);

delete from dttm WHERE icd10tm_operation_code = '238703C';

SET @e = (select lpad(MAX(CODE)+3,6,'0') FROM dttm );

insert ignore into dttm (code,name,requiredtc,vorder,treatment,icd10,icd9cm,icode,opd_price1,opd_price2,opd_price3,ipd_price1,ipd_price2,ipd_price3,dttm_group_id,unit,charge_per_qty,active_status,dttm_guid,thai_name,charge_area_qty,dttm_subgroup_id,icd10tm_operation_code,dttm_dw_report_group_id,export_proced,dent2006_item_code,hos_guid)

VALUES (@e,'เคลือบหลุมร่องฟันแท้ ฟันซี่ 26 ', NULL, NULL,'N','', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,310, NULL, NULL,'Y', NULL, NULL, NULL, NULL,'238703C',6, NULL, NULL, NULL);

delete from dttm WHERE icd10tm_operation_code = '238703D';

SET @f = (select lpad(MAX(CODE)+4,6,'0') FROM dttm) ;

insert ignore into dttm (code,name,requiredtc,vorder,treatment,icd10,icd9cm,icode,opd_price1,opd_price2,opd_price3,ipd_price1,ipd_price2,ipd_price3,dttm_group_id,unit,charge_per_qty,active_status,dttm_guid,thai_name,charge_area_qty,dttm_subgroup_id,icd10tm_operation_code,dttm_dw_report_group_id,export_proced,dent2006_item_code,hos_guid)

VALUES (@f,'เคลือบหลุมร่องฟันแท้ ฟันซี่ 27 ', NULL, NULL,'N','', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,310, NULL, NULL,'Y', NULL, NULL, NULL, NULL,'238703D',6, NULL, NULL, NULL);

delete from dttm WHERE icd10tm_operation_code = '238703E';

SET @g = (select lpad(MAX(CODE)+5,6,'0') FROM dttm );

insert ignore into dttm (code,name,requiredtc,vorder,treatment,icd10,icd9cm,icode,opd_price1,opd_price2,opd_price3,ipd_price1,ipd_price2,ipd_price3,dttm_group_id,unit,charge_per_qty,active_status,dttm_guid,thai_name,charge_area_qty,dttm_subgroup_id,icd10tm_operation_code,dttm_dw_report_group_id,export_proced,dent2006_item_code,hos_guid)

VALUES (@g,'เคลือบหลุมร่องฟันแท้ ฟันซี่ 36 ', NULL, NULL,'N','', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,310, NULL, NULL,'Y', NULL, NULL, NULL, NULL,'238703E',6, NULL, NULL, NULL);

delete from dttm WHERE icd10tm_operation_code = '238703F';

SET @h = (select lpad(MAX(CODE)+6,6,'0') FROM dttm) ;

insert ignore into dttm (code,name,requiredtc,vorder,treatment,icd10,icd9cm,icode,opd_price1,opd_price2,opd_price3,ipd_price1,ipd_price2,ipd_price3,dttm_group_id,unit,charge_per_qty,active_status,dttm_guid,thai_name,charge_area_qty,dttm_subgroup_id,icd10tm_operation_code,dttm_dw_report_group_id,export_proced,dent2006_item_code,hos_guid)

VALUES (@h,'เคลือบหลุมร่องฟันแท้ ฟันซี่ 37 ', NULL, NULL,'N','', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,310, NULL, NULL,'Y', NULL, NULL, NULL, NULL,'238703F',6, NULL, NULL, NULL);

delete from dttm WHERE icd10tm_operation_code = '238703G';

SET @j = (select lpad(MAX(CODE)+7,6,'0') FROM dttm) ;

insert ignore into dttm (code,name,requiredtc,vorder,treatment,icd10,icd9cm,icode,opd_price1,opd_price2,opd_price3,ipd_price1,ipd_price2,ipd_price3,dttm_group_id,unit,charge_per_qty,active_status,dttm_guid,thai_name,charge_area_qty,dttm_subgroup_id,icd10tm_operation_code,dttm_dw_report_group_id,export_proced,dent2006_item_code,hos_guid)

VALUES (@j,'เคลือบหลุมร่องฟันแท้ ฟันซี่ 46 ', NULL, NULL,'N','', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,310, NULL, NULL,'Y', NULL, NULL, NULL, NULL,'238703G',6, NULL, NULL, NULL);

delete from dttm WHERE icd10tm_operation_code = '238703H';

SET @k = (select lpad(MAX(CODE)+8,6,'0') FROM dttm) ;

insert ignore into dttm (code,name,requiredtc,vorder,treatment,icd10,icd9cm,icode,opd_price1,opd_price2,opd_price3,ipd_price1,ipd_price2,ipd_price3,dttm_group_id,unit,charge_per_qty,active_status,dttm_guid,thai_name,charge_area_qty,dttm_subgroup_id,icd10tm_operation_code,dttm_dw_report_group_id,export_proced,dent2006_item_code,hos_guid)

VALUES (@k,'เคลือบหลุมร่องฟันแท้ ฟันซี่ 47 ', NULL, NULL,'N','', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,310, NULL, NULL,'Y', NULL, NULL, NULL, NULL,'238703H',6, NULL, NULL, NULL);

#-------------------------