Checking structure phase 2
ALTER TABLE stock_warehouse_adj_detail ADD `item_lotno` varchar(30) NULL
ALTER TABLE stock_warehouse_adj_detail ADD `item_list_id` int NULL
ALTER TABLE stock_transfer_draw_list ADD `stock_draw_list_id` int NULL
ALTER TABLE stock_transfer_draw_list ADD `stock_transfer_draw_item_id` int NULL
ALTER TABLE stock_transfer_draw_list ADD `total_price` float NULL
ALTER TABLE stock_transfer_draw_list ADD `item_qty` int NULL
ALTER TABLE stock_transfer_draw_list ADD `stock_package_qty` int NULL
ALTER TABLE stock_transfer_draw_list ADD `item_unit_id` int NULL
ALTER TABLE stock_transfer_draw_list ADD `item_list_id` int NULL
ALTER TABLE stock_transfer_draw_list ADD `stock_transfer_draw_id` int NULL
ALTER TABLE stock_transfer_draw_item ADD `stock_draw_list_id` int NULL
ALTER TABLE stock_transfer_draw_item ADD `remain_qty` int NULL
ALTER TABLE stock_transfer_draw_item ADD `item_list_id` int NULL
ALTER TABLE stock_transfer_draw_item ADD `total_price` float NULL
ALTER TABLE stock_transfer_draw_item ADD `item_qty` int NULL
ALTER TABLE stock_transfer_draw_item ADD `stock_package_qty` int NULL
ALTER TABLE stock_transfer_draw_item ADD `stock_transfer_draw_item_unit_id` int NULL
ALTER TABLE stock_transfer_draw_item ADD `item_id` int NULL
ALTER TABLE stock_transfer_draw_item ADD `stock_transfer_draw_id` int NULL
ALTER TABLE stock_transfer_draw ADD `total_price` float NULL
ALTER TABLE stock_transfer_draw ADD `item_count` int NULL
ALTER TABLE stock_transfer_draw ADD `stock_transfer_draw_complete` varchar(2) NULL
ALTER TABLE stock_transfer_draw ADD `stock_transfer_draw_departmant_id_end` int NULL
ALTER TABLE stock_transfer_draw ADD `stock_transfer_draw_departmant_id_start` int NULL
ALTER TABLE stock_transfer_draw ADD `stock_transfer_draw_user_id` int NULL
ALTER TABLE stock_transfer_draw ADD `stock_transfer_draw_office_name` varchar(100) NULL
ALTER TABLE stock_transfer_draw ADD `stock_transfer_draw_no` varchar(30) NULL
ALTER TABLE stock_transfer_draw ADD `stock_transfer_draw_date` date NULL
ALTER TABLE stock_summary ADD `adjust_price` double(22,3) NULL
ALTER TABLE stock_summary ADD `adjust_qty` int NULL
ALTER TABLE stock_summary ADD `return_price` double(22,3) NULL
ALTER TABLE stock_summary ADD `return_qty` int NULL
ALTER TABLE stock_summary ADD `borrow_price` double(22,3) NULL
ALTER TABLE stock_summary ADD `borrow_qty` int NULL
ALTER TABLE stock_summary ADD `remain_price` double(22,3) NULL
ALTER TABLE stock_summary ADD `remain_qty` int NULL
ALTER TABLE stock_summary ADD `transfer_price` double(22,3) NULL
ALTER TABLE stock_summary ADD `transfer_qty` int NULL
ALTER TABLE stock_summary ADD `receive_price` double(22,3) NULL
ALTER TABLE stock_summary ADD `receive_qty` int NULL
ALTER TABLE stock_summary ADD `issue_price` double(22,3) NULL
ALTER TABLE stock_summary ADD `issue_qty` int NULL
ALTER TABLE stock_summary ADD `warehouse_id` int NULL
ALTER TABLE stock_summary ADD `item_price` double(22,3) NULL
ALTER TABLE stock_summary ADD `item_qty` int NULL
ALTER TABLE stock_summary ADD `summary_date` date NULL
ALTER TABLE stock_summary ADD `summary_year` varchar(10) NULL
ALTER TABLE stock_summary ADD `summary_month` varchar(10) NULL
ALTER TABLE stock_summary ADD `unit_id` int NULL
ALTER TABLE stock_summary ADD `item_id` int NULL
ALTER TABLE stock_subdraw ADD `stock_subdraw_complete_user_id` int NULL
ALTER TABLE stock_return_item ADD `typeprice_id` int NULL
ALTER TABLE stock_return_item ADD `stock_draw_id` int NULL
ALTER TABLE stock_return_item ADD `item_price` double(11,0) NULL
ALTER TABLE stock_request_committee ADD `stock_doctor_id` varchar(20) NULL
ALTER TABLE stock_item_type_price ADD `typeprice_name` varchar(30) NULL
ALTER TABLE stock_item_remain ADD `item_old_amount` int NULL
ALTER TABLE stock_item_remain ADD `item_old_price` double(22,3) NULL
ALTER TABLE stock_item_remain ADD `adjust_amount` int NULL
ALTER TABLE stock_item_remain ADD `adjust_price` double(22,3) NULL
ALTER TABLE stock_item_remain ADD `item_total_amount` int NULL
ALTER TABLE stock_item_remain ADD `item_total_price` double(22,3) NULL
ALTER TABLE stock_item_remain ADD `unit_id` int NULL
ALTER TABLE stock_item_remain ADD `warehouse_id` int NULL
ALTER TABLE stock_item_remain ADD `remain_year` varchar(10) NULL
ALTER TABLE stock_item_remain ADD `remain_month` varchar(10) NULL
ALTER TABLE stock_item_remain ADD `remain_date` varchar(10) NULL
ALTER TABLE stock_item_remain ADD `issue_amount` int NULL
ALTER TABLE stock_item_remain ADD `issue_price` double(22,3) NULL
ALTER TABLE stock_item_remain ADD `receive_amount` int NULL
ALTER TABLE stock_item_remain ADD `receive_price` double(22,3) NULL
ALTER TABLE stock_item_remain ADD `item_remain_date` date NULL
ALTER TABLE stock_item_list ADD `price_total` double(22,3) NULL
ALTER TABLE stock_item_list ADD `balance_qty` double(22,3) NULL
ALTER TABLE stock_item ADD `item_trand` varchar(250) NULL
ALTER TABLE stock_item ADD `item_eng` varchar(250) NULL
ALTER TABLE stock_item ADD `balance_qty` double(22,3) NULL
ALTER TABLE stock_draw_item ADD `item_lotno` varchar(30) NULL
ALTER TABLE stock_draw_item ADD `item_list_id` int NULL
ALTER TABLE stock_draw ADD `stock_transfer_draw_id` varchar(11) NULL
ALTER TABLE stock_deliver_detail ADD `balance_qty` double(22,3) NULL
ALTER TABLE stock_committee_group ADD `stock_committee_group_status` int NULL
ALTER TABLE stock_committee_group ADD `stock_committee_group_name` varchar(100) NULL
ALTER TABLE stock_class ADD `item_type` int NULL
ALTER TABLE stock_adjust_detail ADD `item_list_id` int NULL
ALTER TABLE sks_reimb_user_type ADD `sks_code` varchar(5) NULL
ALTER TABLE sks_reimb_user_type ADD `sks_reimb_user_type_name` varchar(200) NOT NULL
ALTER TABLE sks_product_selection_type ADD `sks_code` varchar(10) NULL
ALTER TABLE sks_product_selection_type ADD `sks_product_selection_type_name` varchar(150) NOT NULL
ALTER TABLE sks_product_category ADD `sks_product_category_name` varchar(200) NOT NULL
ALTER TABLE sks_dispense_status ADD `sks_code` varchar(10) NULL
ALTER TABLE sks_dispense_status ADD `sks_dispense_status_name` varchar(150) NOT NULL
ALTER TABLE sks_claim_control_type ADD `sks_code` varchar(10) NULL
ALTER TABLE sks_claim_control_type ADD `sks_claim_control_type_name` varchar(150) NOT NULL
ALTER TABLE sks_claim_category_type ADD `sks_code` varchar(10) NULL
ALTER TABLE sks_claim_category_type ADD `sks_claim_category_type_name` varchar(150) NOT NULL
ALTER TABLE sks_bill_tran ADD `tflag` varchar(20) NULL
ALTER TABLE sks_bill_tran ADD `vercode` varchar(20) NULL
ALTER TABLE sks_bill_tran ADD `paid` double(15,3) NULL
ALTER TABLE sks_bill_tran ADD `amount` double(15,3) NULL
ALTER TABLE sks_bill_tran ADD `memberno` varchar(20) NULL
ALTER TABLE sks_bill_tran ADD `hn` varchar(9) NULL
ALTER TABLE sks_bill_tran ADD `billno` varchar(25) NULL
ALTER TABLE sks_bill_tran ADD `invcode` varchar(20) NULL
ALTER TABLE sks_bill_tran ADD `hcode` varchar(5) NULL
ALTER TABLE sks_bill_tran ADD `dttran` datetime NULL
ALTER TABLE sks_bill_tran ADD `authcode` varchar(50) NULL
ALTER TABLE sks_bill_tran ADD `station` varchar(20) NULL
ALTER TABLE sks_bill_tran ADD `sks_bill_id` int NOT NULL
ALTER TABLE sks_bill_opbill ADD `paid` double(15,3) NULL
ALTER TABLE sks_bill_opbill ADD `amount` double(15,3) NULL
ALTER TABLE sks_bill_opbill ADD `billmuad` varchar(10) NULL
ALTER TABLE sks_bill_opbill ADD `invno` varchar(20) NULL
ALTER TABLE sks_bill_opbill ADD `bill_line` int NULL
ALTER TABLE sks_bill_opbill ADD `invcount` int NULL
ALTER TABLE sks_bill_opbill ADD `sks_bill_id` int NOT NULL
ALTER TABLE sks_bill_dispensing_item ADD `claim_category` varchar(3) NULL
ALTER TABLE sks_bill_dispensing_item ADD `claim_control` char(2) NULL
ALTER TABLE sks_bill_dispensing_item ADD `refill` char(1) NULL
ALTER TABLE sks_bill_dispensing_item ADD `product_selection` char(1) NULL
ALTER TABLE sks_bill_dispensing_item ADD `reimb_amount` double(15,3) NULL
ALTER TABLE sks_bill_dispensing_item ADD `reimb_price` double(15,3) NULL
ALTER TABLE sks_bill_dispensing_item ADD `charge_amount` double(15,3) NULL
ALTER TABLE sks_bill_dispensing_item ADD `unit_price` double(15,3) NULL
ALTER TABLE sks_bill_dispensing_item ADD `quantity` int NULL
ALTER TABLE sks_bill_dispensing_item ADD `sig_text` varchar(250) NULL
ALTER TABLE sks_bill_dispensing_item ADD `sig_code` varchar(150) NULL
ALTER TABLE sks_bill_dispensing_item ADD `pack_size` varchar(50) NULL
ALTER TABLE sks_bill_dispensing_item ADD `dfs_text` varchar(200) NULL
ALTER TABLE sks_bill_dispensing_item ADD `dfs_code` varchar(100) NULL
ALTER TABLE sks_bill_dispensing_item ADD `drug_id` varchar(25) NULL
ALTER TABLE sks_bill_dispensing_item ADD `hospital_drug_id` varchar(100) NULL
ALTER TABLE sks_bill_dispensing_item ADD `product_category` char(1) NULL
ALTER TABLE sks_bill_dispensing_item ADD `sks_bill_dispensing_id` int NOT NULL
ALTER TABLE sks_bill_dispensing ADD `dispense_status` char(1) NULL
ALTER TABLE sks_bill_dispensing ADD `benefit_plan` varchar(2) NULL
ALTER TABLE sks_bill_dispensing ADD `reimburser` varchar(2) NULL
ALTER TABLE sks_bill_dispensing ADD `other_amount` double(15,3) NULL
ALTER TABLE sks_bill_dispensing ADD `paid_amount` double(15,3) NULL
ALTER TABLE sks_bill_dispensing ADD `claim_amount` double(15,3) NULL
ALTER TABLE sks_bill_dispensing ADD `charge_amount` double(15,3) NULL
ALTER TABLE sks_bill_dispensing ADD `item_count` int NULL
ALTER TABLE sks_bill_dispensing ADD `prescriber` varchar(20) NULL
ALTER TABLE sks_bill_dispensing ADD `prescription_date` datetime NULL
ALTER TABLE sks_bill_dispensing ADD `pid` varchar(13) NULL
ALTER TABLE sks_bill_dispensing ADD `hn` varchar(9) NULL
ALTER TABLE sks_bill_dispensing ADD `invoice_no` varchar(25) NULL
ALTER TABLE sks_bill_dispensing ADD `dispense_id` varchar(25) NULL
ALTER TABLE sks_bill_dispensing ADD `provider_id` char(5) NULL
ALTER TABLE sks_bill_dispensing ADD `sks_bill_id` int NOT NULL
ALTER TABLE sks_bill ADD `reccount` int NULL
ALTER TABLE sks_bill ADD `sessno` int NULL
ALTER TABLE sks_bill ADD `bill_datetime` datetime NULL
ALTER TABLE sks_bill ADD `hname` varchar(150) NOT NULL
ALTER TABLE sks_bill ADD `hcode` char(5) NOT NULL
ALTER TABLE sks_benefit_plan_type ADD `sks_code` varchar(10) NULL
ALTER TABLE sks_benefit_plan_type ADD `sks_benefit_plan_type_name` varchar(200) NOT NULL
ALTER TABLE pttype ADD `sks_benefit_plan_type_id` int NULL
ALTER TABLE ovst_sks_opitemrece ADD `sks_claim_category_type_id` int NULL
ALTER TABLE ovst_sks_opitemrece ADD `sks_claim_control_type_id` int NULL
ALTER TABLE ovst_sks_opitemrece ADD `sks_product_category_id` int NULL
ALTER TABLE ovst_sks_opitemrece ADD `sks_product_selection_type_id` int NULL
ALTER TABLE ovst_sks_opitemrece ADD `opi_guid` varchar(38) NULL
ALTER TABLE ovst_sks_opitemrece ADD `vn` varchar(12) NOT NULL
ALTER TABLE ovst_sks_finance ADD `sks_benefit_dispense_status_id` int NULL
ALTER TABLE ovst_sks_finance ADD `sks_benefit_plan_type_id` int NULL
ALTER TABLE ovst_sks_finance ADD `sks_reimb_user_type_id` int NULL
ALTER TABLE ovst_sks_finance ADD `finance_datetime` datetime NULL
ALTER TABLE ovst_sks_finance ADD `finance_staff` varchar(25) NULL
ALTER TABLE ovst_sks_finance ADD `vn` varchar(12) NOT NULL
ALTER TABLE nondrugitems ADD `sks_product_category_id` int NULL
ALTER TABLE drugitems ADD `sks_reimb_price` double(15,3) NULL
ALTER TABLE drugitems ADD `sks_dfs_text` varchar(150) NULL
ALTER TABLE drugitems ADD `sks_dfs_code` varchar(50) NULL
ALTER TABLE drugitems ADD `sks_drug_code` varchar(25) NULL
ALTER TABLE drugitems ADD `sks_clain_control_type_id` int NULL
ALTER TABLE drugitems ADD `sks_product_category_id` int NULL
CREATE TABLE stock_transfer_draw_list ( `stock_transfer_draw_list_id` int NULL )
CREATE TABLE stock_transfer_draw_item ( `stock_transfer_draw_item_id` int NULL )
CREATE TABLE stock_transfer_draw ( `stock_transfer_draw_id` int NULL )
CREATE TABLE stock_summary ( `summary_id` int NOT NULL )
CREATE TABLE stock_item_type_price ( `typeprice_id` int NULL )
CREATE TABLE stock_item_remain ( `item_id` int NULL )
CREATE TABLE stock_committee_group ( `stock_committee_group_id` int NOT NULL )
CREATE TABLE sks_reimb_user_type ( `sks_reimb_user_type_id` int NOT NULL )
CREATE TABLE sks_product_selection_type ( `sks_product_selection_type_id` int NOT NULL )
CREATE TABLE sks_product_category ( `sks_product_category_id` int NOT NULL )
CREATE TABLE sks_dispense_status ( `sks_dispense_status_id` int NOT NULL )
CREATE TABLE sks_claim_control_type ( `sks_claim_control_type_id` int NOT NULL )
CREATE TABLE sks_claim_category_type ( `sks_claim_category_type_id` int NOT NULL )
CREATE TABLE sks_bill_tran ( `sks_bill_tran_id` int NOT NULL )
CREATE TABLE sks_bill_opbill ( `sks_bill_opbill_id` int NOT NULL )
CREATE TABLE sks_bill_dispensing_item ( `sks_bill_dispensing_item_id` int NOT NULL )
CREATE TABLE sks_bill_dispensing ( `sks_bill_dispensing_id` int NOT NULL )
CREATE TABLE sks_bill ( `sks_bill_id` int NOT NULL )
CREATE TABLE sks_benefit_plan_type ( `sks_benefit_plan_type_id` int NOT NULL )
CREATE TABLE ovst_sks_opitemrece ( `ovst_sks_opitemrece_id` int NOT NULL )
CREATE TABLE ovst_sks_finance ( `ovst_sks_finance_id` int NOT NULL )
Checking structure phase 1
สร้าง ตาราง....