ALTER TABLE tempdental1 ADD `occupation` varchar(150) NULL
ALTER TABLE tempdental1 ADD `nationality` varchar(250) NULL
ALTER TABLE tempdental1 ADD `marrystatus` varchar(20) NULL
ALTER TABLE tempdental1 ADD `age` varchar(100) NULL
ALTER TABLE tempdental1 ADD `sex` varchar(4) NULL
ALTER TABLE tempdental1 ADD `address` varchar(250) NULL
ALTER TABLE tempdental1 ADD `ptname` varchar(250) NULL
ALTER TABLE tempdental1 ADD `dx_list` varchar(250) NULL
ALTER TABLE tempdental1 ADD `fm_name` varchar(250) NULL
ALTER TABLE tempdental1 ADD `disease` varchar(250) NULL
ALTER TABLE tempdental1 ADD `regdate` date NULL
ALTER TABLE tempdental1 ADD `an` varchar(9) NULL
ALTER TABLE tempdental1 ADD `hn` varchar(7) NULL
ALTER TABLE tempdental1 ADD `code` int NULL
ALTER TABLE opdconfig MODIFY COLUMN `hospitalcode` varchar(9)
ALTER TABLE iptbedmove MODIFY COLUMN `oward` varchar(9)
ALTER TABLE iptbedmove MODIFY COLUMN `obedno` varchar(9)
ALTER TABLE iptbedmove MODIFY COLUMN `nward` varchar(9)
ALTER TABLE iptbedmove MODIFY COLUMN `nbedno` varchar(9)
ALTER TABLE icd10_health_med ADD `name` varchar(150) NOT NULL
ALTER TABLE health_med_treatment_type ADD `health_med_treatment_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_treatment_subtype ADD `icd10` varchar(9) NULL
ALTER TABLE health_med_treatment_subtype ADD `health_med_treatment_type_id` int NOT NULL
ALTER TABLE health_med_treatment_subtype ADD `health_med_treatment_subtype_name` varchar(150) NOT NULL
ALTER TABLE health_med_service_type ADD `health_med_service_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_service_treatment ADD `health_med_treatment_subtype_id` int NOT NULL
ALTER TABLE health_med_service_treatment ADD `health_med_treatment_type_id` int NOT NULL
ALTER TABLE health_med_service_treatment ADD `health_med_service_id` int NOT NULL
ALTER TABLE health_med_service_operation ADD `health_med_provider_id` int NOT NULL
ALTER TABLE health_med_service_operation ADD `opi_guid` varchar(38) NULL
ALTER TABLE health_med_service_operation ADD `service_qty` int NULL
ALTER TABLE health_med_service_operation ADD `service_icode` varchar(7) NULL
ALTER TABLE health_med_service_operation ADD `service_price` double(15,3) NULL
ALTER TABLE health_med_service_operation ADD `health_med_service_operation_time_minute` int NULL
ALTER TABLE health_med_service_operation ADD `health_med_organ_id` int NOT NULL
ALTER TABLE health_med_service_operation ADD `health_med_operation_item_id` int NOT NULL
ALTER TABLE health_med_service_operation ADD `health_med_operation_type_id` int NOT NULL
ALTER TABLE health_med_service_operation ADD `health_med_service_id` int NOT NULL
ALTER TABLE health_med_service_medication ADD `health_med_medication_id` int NULL
ALTER TABLE health_med_service_medication ADD `print_sticker` char(1) NULL
ALTER TABLE health_med_service_medication ADD `opi_guid` varchar(38) NULL
ALTER TABLE health_med_service_medication ADD `total_price` double(15,3) NULL
ALTER TABLE health_med_service_medication ADD `unitprice` double(15,3) NULL
ALTER TABLE health_med_service_medication ADD `qty` int NOT NULL
ALTER TABLE health_med_service_medication ADD `sp_use` varchar(9) NULL
ALTER TABLE health_med_service_medication ADD `drugusage` varchar(9) NULL
ALTER TABLE health_med_service_medication ADD `icode` varchar(7) NOT NULL
ALTER TABLE health_med_service_medication ADD `health_med_service_id` int NOT NULL
ALTER TABLE health_med_service_diagnosis ADD `ovst_diag_id` int NULL
ALTER TABLE health_med_service_diagnosis ADD `icd10` varchar(9) NOT NULL
ALTER TABLE health_med_service_diagnosis ADD `health_med_service_id` int NOT NULL
ALTER TABLE health_med_service ADD `health_med_treatment_type_id` int NULL
ALTER TABLE health_med_service ADD `health_med_doctor_id` int NULL
ALTER TABLE health_med_service ADD `service_time` time NULL
ALTER TABLE health_med_service ADD `service_date` date NULL
ALTER TABLE health_med_service ADD `health_med_service_type_id` int NOT NULL
ALTER TABLE health_med_service ADD `an` varchar(9) NULL
ALTER TABLE health_med_service ADD `vn` varchar(13) NULL
ALTER TABLE health_med_service ADD `hn` varchar(9) NOT NULL
ALTER TABLE health_med_provider_type ADD `health_med_provider_type_code` varchar(10) NULL
ALTER TABLE health_med_provider_type ADD `health_med_provider_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_provider_status ADD `service_type_list_text` varchar(100) NULL
ALTER TABLE health_med_provider_status ADD `health_med_provider_level_id` int NOT NULL
ALTER TABLE health_med_provider_service_type_list ADD `health_med_provider_service_type_id` int NOT NULL
ALTER TABLE health_med_provider_service_type ADD `health_med_provider_service_type_code` varchar(10) NULL
ALTER TABLE health_med_provider_service_type ADD `health_med_provider_service_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_provider_level ADD `health_med_provider_level_name` varchar(150) NOT NULL
ALTER TABLE health_med_provider_category_list ADD `health_med_provider_category_id` int NOT NULL
ALTER TABLE health_med_provider_category ADD `health_med_provider_category_code` varchar(10) NULL
ALTER TABLE health_med_provider_category ADD `health_med_provider_category_name` varchar(150) NOT NULL
ALTER TABLE health_med_provider ADD `health_med_provider_full_name` varchar(100) NULL
ALTER TABLE health_med_provider ADD `health_med_provider_fname` varchar(50) NULL
ALTER TABLE health_med_provider ADD `health_med_provider_category_id` int NULL
ALTER TABLE health_med_provider ADD `health_med_provider_type_id` int NULL
ALTER TABLE health_med_provider ADD `health_med_license_type_id` int NULL
ALTER TABLE health_med_provider ADD `health_med_institute_id` int NULL
ALTER TABLE health_med_provider ADD `health_med_institute_type_id` int NULL
ALTER TABLE health_med_provider ADD `health_med_educational_id` int NULL
ALTER TABLE health_med_provider ADD `health_med_curriculum_id` int NULL
ALTER TABLE health_med_provider ADD `health_med_provider_license_no` varchar(50) NULL
ALTER TABLE health_med_provider ADD `health_med_provider_lname` varchar(50) NULL
ALTER TABLE health_med_provider ADD `health_med_provider_pname` varchar(30) NULL
ALTER TABLE health_med_product_type ADD `health_med_product_type_code` varchar(10) NULL
ALTER TABLE health_med_product_type ADD `health_med_product_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_product ADD `health_med_product_type_id` int NULL
ALTER TABLE health_med_product ADD `health_med_product_name` varchar(150) NOT NULL
ALTER TABLE health_med_organ ADD `health_med_organ_code` varchar(10) NULL
ALTER TABLE health_med_organ ADD `health_med_organ_name` varchar(150) NOT NULL
ALTER TABLE health_med_operation_type ADD `health_med_operation_type_code` varchar(10) NULL
ALTER TABLE health_med_operation_type ADD `health_med_operation_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_operation_item_organ ADD `health_med_operation_type_id` int NULL
ALTER TABLE health_med_operation_item_organ ADD `health_med_organ_id` int NOT NULL
ALTER TABLE health_med_operation_item_organ ADD `health_med_operation_item_id` int NOT NULL
ALTER TABLE health_med_operation_item ADD `operation_time_default` int NULL
ALTER TABLE health_med_operation_item ADD `health_med_operation_type_id` int NULL
ALTER TABLE health_med_operation_item ADD `price` double(15,3) NULL
ALTER TABLE health_med_operation_item ADD `icode` varchar(7) NULL
ALTER TABLE health_med_operation_item ADD `health_med_operation_item_code` varchar(10) NULL
ALTER TABLE health_med_operation_item ADD `health_med_operation_item_name` varchar(250) NOT NULL
ALTER TABLE health_med_operation_code ADD `name` varchar(250) NOT NULL
ALTER TABLE health_med_medication ADD `drugusage` varchar(7) NULL
ALTER TABLE health_med_medication ADD `price` double(15,3) NULL
ALTER TABLE health_med_medication ADD `icode` varchar(7) NULL
ALTER TABLE health_med_medication ADD `health_med_medication_code` varchar(50) NULL
ALTER TABLE health_med_medication ADD `health_med_medication_name` varchar(200) NOT NULL
ALTER TABLE health_med_license_type ADD `health_med_license_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_institute_type ADD `health_med_institute_type_code` varchar(50) NULL
ALTER TABLE health_med_institute_type ADD `health_med_institute_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_institute ADD `health_med_institute_type_id` int NULL
ALTER TABLE health_med_institute ADD `health_med_institute_code` varchar(50) NULL
ALTER TABLE health_med_institute ADD `health_med_institute_name` varchar(200) NOT NULL
ALTER TABLE health_med_educational ADD `health_med_educational_code` varchar(50) NULL
ALTER TABLE health_med_educational ADD `health_med_educational_name` varchar(250) NOT NULL
ALTER TABLE health_med_doctor_type ADD `health_med_doctor_type_name` varchar(150) NOT NULL
ALTER TABLE health_med_doctor ADD `health_med_institute_other` varchar(200) NULL
ALTER TABLE health_med_doctor ADD `health_med_institute_type_other` varchar(200) NULL
ALTER TABLE health_med_doctor ADD `health_med_educational_other` varchar(200) NULL
ALTER TABLE health_med_doctor ADD `health_med_curriculum_other` varchar(200) NULL
ALTER TABLE health_med_doctor ADD `health_med_doctor_type_id` int NULL
ALTER TABLE health_med_doctor ADD `health_med_license_type_id` int NULL
ALTER TABLE health_med_doctor ADD `health_med_institute_id` int NULL
ALTER TABLE health_med_doctor ADD `health_med_institute_type_id` int NULL
ALTER TABLE health_med_doctor ADD `health_med_educational_id` int NULL
ALTER TABLE health_med_doctor ADD `health_med_curriculum_id` int NULL
ALTER TABLE health_med_doctor ADD `license_number` varchar(50) NULL
ALTER TABLE health_med_doctor ADD `lname` varchar(50) NULL
ALTER TABLE health_med_doctor ADD `fname` varchar(50) NULL
ALTER TABLE health_med_doctor ADD `pname` varchar(30) NULL
ALTER TABLE health_med_doctor ADD `doctor_code` varchar(9) NULL
ALTER TABLE health_med_doctor ADD `health_med_doctor_name` varchar(150) NOT NULL
ALTER TABLE health_med_curriculum ADD `health_med_curriculum_code` varchar(50) NULL
ALTER TABLE health_med_curriculum ADD `health_med_curriculum_name` varchar(250) NOT NULL
ALTER TABLE edoc_revolve_list ADD `edoc_revolve_datetime` datetime NULL
ALTER TABLE edoc_revolve_list ADD `staff` varchar(50) NULL
ALTER TABLE edoc_revolve_list ADD `to_hospital_department_id` int NOT NULL
ALTER TABLE edoc_revolve_list ADD `from_hospital_department_id` int NOT NULL
ALTER TABLE edoc_revolve_list ADD `edoc_id` int NOT NULL
CREATE TABLE tempdental1 ( `vn` varchar(12) NULL )
CREATE TABLE icd10_health_med ( `icd10` varchar(9) NOT NULL )
CREATE TABLE health_med_treatment_type ( `health_med_treatment_type_id` int NOT NULL )
CREATE TABLE health_med_treatment_subtype ( `health_med_treatment_subtype_id` int NOT NULL )
CREATE TABLE health_med_service_type ( `health_med_service_type_id` int NOT NULL )
CREATE TABLE health_med_service_treatment ( `health_med_service_treatment_id` int NOT NULL )
CREATE TABLE health_med_service_operation ( `health_med_service_operation_id` int NOT NULL )
CREATE TABLE health_med_service_medication ( `health_med_service_medication_id` int NOT NULL )
CREATE TABLE health_med_service_diagnosis ( `health_med_service_diagnosis_id` int NOT NULL )
CREATE TABLE health_med_service ( `health_med_service_id` int NOT NULL )
CREATE TABLE health_med_provider_type ( `health_med_provider_type_id` int NOT NULL )
CREATE TABLE health_med_provider_status ( `health_med_provider_status_id` int NOT NULL )
CREATE TABLE health_med_provider_service_type_list ( `health_med_provider_service_type_list_id` int NOT NULL )
CREATE TABLE health_med_provider_service_type ( `health_med_provider_service_type_id` int NOT NULL )
CREATE TABLE health_med_provider_level ( `health_med_provider_level_id` int NOT NULL )
CREATE TABLE health_med_provider_category_list ( `health_med_provider_category_list_id` int NOT NULL )
CREATE TABLE health_med_provider_category ( `health_med_provider_category_id` int NOT NULL )
CREATE TABLE health_med_provider ( `health_med_provider_id` int NOT NULL )
CREATE TABLE health_med_product_type ( `health_med_product_type_id` int NOT NULL )
CREATE TABLE health_med_product ( `health_med_product_id` int NOT NULL )
CREATE TABLE health_med_organ ( `health_med_organ_id` int NOT NULL )
CREATE TABLE health_med_operation_type ( `health_med_operation_type_id` int NOT NULL )
CREATE TABLE health_med_operation_item_organ ( `health_med_operation_item_organ_id` int NOT NULL )
CREATE TABLE health_med_operation_item ( `health_med_operation_item_id` int NOT NULL )
CREATE TABLE health_med_operation_code ( `code` char(9) NOT NULL )
CREATE TABLE health_med_medication ( `health_med_medication_id` int NOT NULL )
CREATE TABLE health_med_license_type ( `health_med_license_type_id` int NOT NULL )
CREATE TABLE health_med_institute_type ( `health_med_institute_type_id` int NOT NULL )
CREATE TABLE health_med_institute ( `health_med_institute_id` int NOT NULL )
CREATE TABLE health_med_educational ( `health_med_educational_id` int NOT NULL )
CREATE TABLE health_med_doctor_type ( `health_med_doctor_type_id` int NOT NULL )
CREATE TABLE health_med_doctor ( `health_med_doctor_id` int NOT NULL )
CREATE TABLE health_med_curriculum ( `health_med_curriculum_id` int NOT NULL )
CREATE TABLE edoc_revolve_list ( `edoc_revolve_list_id` int NOT NULL )
Checking structure phase 1
รอมานาน ครับ แพทย์แผนไทย