/* Navicat Premium Data Transfer Source Server : 192.168.5.86 Source Server Type : MariaDB Source Server Version : 100307 Source Host : 192.168.5.86:3306 Source Schema : spider0 Target Server Type : MariaDB Target Server Version : 100307 File Encoding : 65001 Date: 01/08/2018 17:36:42 */ SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for phms_attachment -- ---------------------------- DROP TABLE IF EXISTS `phms_attachment`; CREATE TABLE `phms_attachment` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `type` int(11) NULL DEFAULT NULL COMMENT '附件类型 1 体检 2 高血压随访 3 糖尿病随访 4 高糖合并随访 5 重精随访等需要再加', `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `category` int(11) NULL DEFAULT NULL COMMENT '1 图片 2 视频 3 word文档 4 PDF文件等', `size` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `notes` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `url` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `source` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源在App上面的显示位置', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_attachment\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_billboards -- ---------------------------- DROP TABLE IF EXISTS `phms_billboards`; CREATE TABLE `phms_billboards` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `update_board_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `billboarks_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `billboarks_place` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `billboarks_description` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_billboards\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_billboards_attachment -- ---------------------------- DROP TABLE IF EXISTS `phms_billboards_attachment`; CREATE TABLE `phms_billboards_attachment` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `eid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `notes` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_billboards_attachment\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_chronic_disease -- ---------------------------- DROP TABLE IF EXISTS `phms_chronic_disease`; CREATE TABLE `phms_chronic_disease` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `card_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `region_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `type` int(11) NULL DEFAULT NULL COMMENT '1 高血压 2 糖尿病', `info` int(11) NULL DEFAULT NULL COMMENT '1表示左侧 2表示右侧 当为糖尿病时 1表示空腹 2表示餐后', `measured_data` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` int(11) NULL DEFAULT NULL COMMENT ' 状态默认为1 当确认建档之后置为0', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_chronic_disease\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_cm_person -- ---------------------------- DROP TABLE IF EXISTS `phms_cm_person`; CREATE TABLE `phms_cm_person` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '与居民表得id对应', `diseasekind_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `diagnosis_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `org_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `record_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_cm_person\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_cm_schizophrenia_ex -- ---------------------------- DROP TABLE IF EXISTS `phms_cm_schizophrenia_ex`; CREATE TABLE `phms_cm_schizophrenia_ex` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `guardian` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `guardian_address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `guardian_tel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `relationship` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `village_contact` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `informed_consent` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1同意参加管理2不同意参加管理', `informed_signed` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `informed_signed_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `initial_onset` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `previous_symptoms` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1幻觉2交流困难4猜疑8喜怒无常16行为怪异32兴奋话多64伤人毁物128悲观厌世256无故外走512自语自笑1024孤僻懒散2048其他', `previous_symptoms_other` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `outpatient_treatment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1未治2间断门诊治疗4连续门诊治疗', `outpatient_treatment_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hospitalizations` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `recent_diagnosis` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hospital_diagnosis` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `diagnosis_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `treatment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1痊愈2好转4无变化8加重', `trouble` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `accident` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `court_disaster` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `selfInjury` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `attempted_suicide` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `close_case` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1无关锁2关锁4关锁已解除', `illness_year` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `economic_conditions` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1贫困,在当地贫困线标准以下2非贫困3不详', `specialist_advice` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `rec_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `residence_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1:城镇,2:农村', `employment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1在岗工人,2在岗管理者,4农民,8下岗或无业,16在校学生,32退休,64专业技术人员,128其他,256不详', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_cm_schizophrenia_ex\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_code -- ---------------------------- DROP TABLE IF EXISTS `phms_code`; CREATE TABLE `phms_code` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `type` int(11) NULL DEFAULT NULL COMMENT '1 名族 2 疾病类型', `code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `value_` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` int(11) NULL DEFAULT NULL COMMENT '1 启用 2 停用', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_code\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_constitution_item -- ---------------------------- DROP TABLE IF EXISTS `phms_constitution_item`; CREATE TABLE `phms_constitution_item` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `moderate_quality` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是:1,基本是:2,否则为0', `quality_deficiency` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `yang_quality` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `yin_quality` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `phlegm` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `damp_heat` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `blood_quality` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `qi_quality` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `te_bing_quality` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_constitution_item\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_dictionary -- ---------------------------- DROP TABLE IF EXISTS `phms_dictionary`; CREATE TABLE `phms_dictionary` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `table_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `column_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `key_` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `value_` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` int(11) NULL DEFAULT NULL COMMENT '0 正常 1 禁用', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_dictionary\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_doctor -- ---------------------------- DROP TABLE IF EXISTS `phms_doctor`; CREATE TABLE `phms_doctor` ( `id` int(11) NOT NULL AUTO_INCREMENT, `jw_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医生基卫账号对应的ID', `region_code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '区划ID,用来查找对应区划下的服务地址', `org_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_name` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称', `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账号的真实名字,比如张三、李四', `tel` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医护人员电话号', `office` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医生所属科室信息', `product_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基卫的ProductCode,对应phms_bind_user的产品验证码', `jw_account` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基卫账号', `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基卫账号密码', `org_type` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构类型', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NULL DEFAULT NULL, `parent_org_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `department` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '科室', `extinfo` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '去基卫注册产品的参数,解决同一个平板mac注册两次的问题', PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_doctor\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_doctor_region -- ---------------------------- DROP TABLE IF EXISTS `phms_doctor_region`; CREATE TABLE `phms_doctor_region` ( `id` int(11) NOT NULL AUTO_INCREMENT, `jw_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '医生账号的UserId', `region_code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '区划Code', PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_doctor_region\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_doctor_test -- ---------------------------- DROP TABLE IF EXISTS `phms_doctor_test`; CREATE TABLE `phms_doctor_test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `jw_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医生基卫账号对应的ID', `region_code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '区划ID,用来查找对应区划下的服务地址', `org_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_name` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称', `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账号的真实名字,比如张三、李四', `tel` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医护人员电话号', `office` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医生所属科室信息', `product_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基卫的ProductCode,对应phms_bind_user的产品验证码', `jw_account` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基卫账号', `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基卫账号密码', `org_type` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构类型', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_doctor\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_edu_knowledge_base -- ---------------------------- DROP TABLE IF EXISTS `phms_edu_knowledge_base`; CREATE TABLE `phms_edu_knowledge_base` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `knowledge_type_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `lifecycle_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sex` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_edu_knowledge_base\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_edu_person -- ---------------------------- DROP TABLE IF EXISTS `phms_edu_person`; CREATE TABLE `phms_edu_person` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `activity_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `business_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `source_rec_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `edu_content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_edu_person\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_edu_plan -- ---------------------------- DROP TABLE IF EXISTS `phms_edu_plan`; CREATE TABLE `phms_edu_plan` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `edu_plan_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `activity_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `theme_day_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `activity_location` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `activities_type_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `activities_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `activity_title` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `organizer` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `people_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `person_amount` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `files_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `files_amount` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `activity_content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `activity_summary` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `cognitive_evaluation` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `charge_person` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `responsible` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `filling_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_edu_plan\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_family -- ---------------------------- DROP TABLE IF EXISTS `phms_family`; CREATE TABLE `phms_family` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `build_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `master_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `custom_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `master_card_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `member_count` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `disability_count` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `current_count` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `house_area` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `house_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0 未知,1 平房,2 楼房,3 四合院,4 高层电梯公寓', `water_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0 未知,1 自来水,2 井水', `fuel_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0 未知,1 天然气,2 煤气罐,3 蜂窝煤,4 木材', `toilet_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0 未知,1 马桶,2 蹲厕', `monty_average_income` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `have_lcebox` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'true 有,false 无', `police_station` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `county_committee` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `build_org_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `build_employee_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `region_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `region_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `position` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '未知,集居,孤居', `tohealthstation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `tohospitals` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `data_status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `salcro` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `family_address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `family_tel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `last_synctime` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '县级平台', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `family_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `delete_status` int(10) NULL DEFAULT NULL COMMENT '1表示删除,其他表示正常', `region_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_family\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_file_upload -- ---------------------------- DROP TABLE IF EXISTS `phms_file_upload`; CREATE TABLE `phms_file_upload` ( `id` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `file_name` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `size` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `url` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `user_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_file_upload\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_follow_drug -- ---------------------------- DROP TABLE IF EXISTS `phms_follow_drug`; CREATE TABLE `phms_follow_drug` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `cm_drug_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `cm_drug_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `daily_times` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `each_dose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mg,ml,g,片,粒,袋,瓶,支,盒U\"', `remark1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_follow_drug\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_follow_insulindrug -- ---------------------------- DROP TABLE IF EXISTS `phms_follow_insulindrug`; CREATE TABLE `phms_follow_insulindrug` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `cm_drug_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `daily_times` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `each_dose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mg,ml,g,片,粒,袋,瓶,支,盒U\"', `remark1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_follow_insulindrug\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_body -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_body`; CREATE TABLE `phms_followup_body` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `body_temperature` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `pulse_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '次/分钟', `heart_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `respiratory_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_sbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_dbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_sbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_dbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `height` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'cm\r\n ', `weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'kg', `waistline` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `bmi` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(kg/m2) ', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `dorsalis_pedis_artery_pulse` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_body\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_cm_diab -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_cm_diab`; CREATE TABLE `phms_followup_cm_diab` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `mt_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `low_bloodsugar_reactions` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无 2 偶尔 4 频繁', `way_up` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 门诊 2 家庭 4 电话', `symptom` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无症状 512 多饮 1024 多食 2048 多尿 4096 视力模糊 8192 感染 16384 手脚麻木 32768 下肢浮肿 65536 体重明显下降 131072 其他(内容放otherjson里)', `exam_body_other` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_heart_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_smoking` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_daily_alcohol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `salt_intake` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 轻 2 中 4重', `next_salt_intake` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(咸淡)1 轻 2 中 4 重', `next_exercise_week_times` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_exercise_week_minute` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `psychological_adjustment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 良好 2 一般 4 差', `compliance_behavior` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 良好 2 一般 4 差', `medication_compliance` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `adverse_drug_reactions` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '“1”无 “2”有(内容放otherjson里面)', `fu_classification` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 控制满意 2 控制不满意 4 不良反应 8 并发症', `followup_remarks` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `staple` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_staple` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `delete_status` int(11) NULL DEFAULT 0, `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `card_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `source` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_cm_diab\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_cm_hydblite -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_cm_hydblite`; CREATE TABLE `phms_followup_cm_hydblite` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `mt_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `low_bloodsugar_reactions` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无 2 偶尔 4 频繁', `way_up` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 门诊 2 家庭 4 电话', `symptom` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无症状,2 头痛头晕,4 恶心呕吐,8 眼花耳鸣,16 呼吸困难,32 心悸胸闷,64 鼻鼾,128 四肢发麻,256 下肢水肿,512 多饮,1024 多食,2048 多尿,4096 视力模糊,8192 感染,16384 手脚麻木,32769 下肢浮肿,65536 体重明显下降,131072 其他(内容放otherjson里)', `exam_body_other` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_heart_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_smoking` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_daily_alcohol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `salt_intake` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 轻 2 中 4重', `next_salt_intake` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(咸淡)1 轻 2 中 4 重', `next_exercise_week_times` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_exercise_week_minute` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `psychological_adjustment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 良好 2 一般 4 差', `compliance_behavior` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 良好 2 一般 4 差', `hy_medication_compliance` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 规律 2 间断 3 不服药', `db_medication_compliance` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 规律 2 间断 4 不服药', `adverse_drug_reactions` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '“1”无 “2”有(内容放otherjson里面)', `fu_classification` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 控制满意 2 控制不满意 4 不良反应 8 并发症', `followup_remarks` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `staple` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_staple` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `delete_status` int(11) NULL DEFAULT 0, `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `card_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `source` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_cm_hydblite\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_cm_hyper -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_cm_hyper`; CREATE TABLE `phms_followup_cm_hyper` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `mt_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `way_up` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 门诊 2 家庭 4 电话', `symptom` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无症状(选1就不能选择其它选项) 2 头痛头晕 4 恶心呕吐 8 眼花耳鸣 16 呼吸困难 32 心悸胸闷 64 鼻衄 128 四肢发麻 256 下肢水肿 131072 其他(内容放otherjson里))<必填>', `exam_body_other` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_heart_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_smoking` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_daily_alcohol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `salt_intake` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 轻 2 中 4重', `next_salt_intake` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(咸淡)1 轻 2 中 4 重', `next_exercise_week_times` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_exercise_week_minute` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `psychological_adjustment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 良好 2 一般 4 差', `compliance_behavior` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 良好 2 一般 4 差', `medication_compliance` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `adverse_drug_reactions` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '“1”无 “2”有(内容放otherjson里面)', `fu_classification` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 控制满意 2 控制不满意 4 不良反应 8 并发症', `followup_remarks` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `delete_status` int(11) NULL DEFAULT 0, `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `card_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `source` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_cm_hyper\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_cm_schizophrenia -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_cm_schizophrenia`; CREATE TABLE `phms_followup_cm_schizophrenia` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `mt_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `danger` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1(0级)2(1级)4(2级)8(3级)16(4级)32(5级)64(6级)', `symptom` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1幻觉2交流困难4猜疑8喜怒无常16行为怪异32兴奋话多64伤人毁物128悲观厌世256无故外走512自语自笑1024孤僻懒散2048其他', `insight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1-自知力完全,2-自知力不全,4-自知力缺失', `sleep` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1-良好,2-一般,4-较差', `diet` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1-良好,2-一般,4-较差', `living_cuisine` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1-良好,2-一般,4-较差', `housework` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1-良好,2-一般,4-较差', `labor_and_work` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1-良好,2-一般,4-较差', `learning_ability` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1-良好,2-一般,4-较差', `social` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1-良好,2-一般,4-较差', `trouble` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `accident` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `court_disaster` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `self_injury` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `attempted_suicide` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `close_case` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1无关锁2关锁4关锁已解除', `hospitalization` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1从未住院2目前正在住院4既往住院,现未住院', `end_discharge_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `medication_compliance` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1规律2间断4不服药', `adverse_drug_reactions` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1无2有', `treatment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1痊愈2好转4无变化8加重', `fu_classification` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1不稳定2基本稳定4稳定8未随访到', `followup_remarks` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `rehabilitation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1生活劳动能力2职业训练4学习能力8社会交往16其他', `next_followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `followup_way` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1门诊,2家庭访视,4电话', `miss_reason` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `death_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `death_reason` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `death_body_reason` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `perfect` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `delete_status` int(11) NULL DEFAULT 0, `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `card_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `source` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_cm_schizophrenia\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_diabetesuse -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_diabetesuse`; CREATE TABLE `phms_followup_diabetesuse` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `cm_drug_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `cm_drug_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `daily_times` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `each_dose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `Remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark1` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_diabetesuse\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_labor -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_labor`; CREATE TABLE `phms_followup_labor` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `fasting_blood_glucose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保存单位mmol/L', `postprandial_blood_glucose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `random_blood_glucose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hemoglobin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '血红蛋白g/L', `leukocyte` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '白细胞×10^9/L', `platelet` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `other_blood` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `urine_protein` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项值分别为:-、+-、+、++、+++、++++', `urine` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项值分别为:-、+-、+、++、+++、++++', `ketone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项值分别为:-、+-、+、++、+++、++++)', `occult_bloodIn_urine` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(选项值分别为:-、+-、+、++、+++、++++)', `other_urine` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `urinary_albumin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mg/dL', `fecal_occult_blood` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 阴性、2 阳性)', `serum_ala` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'U/L', `serum_aa` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `albumin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `total_bilirubin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `bilirubin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `serum_creatinine` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'μmol/L', `bun` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `potassium_concentration` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mmol/L', `sodium_concentration` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mmol/L', `total_cholesterol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mmol/L', `triglycerides` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mmol/L', `gpt` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ldl_cholesterol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hdl_cholesterol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `glycated_hemoglobin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hepatitis_bSurface_antigen` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 阴性、2 阳性)', `ecg` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `chest_x_ray` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `b_ultrasonic_other` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `b_ultrasonic_wave` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `cervical_smear` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `other_laboratory` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `erythrocytes` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '×10^9/L', `differential_count` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `blood_transaminase` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sg` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ph` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ng` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `tppa` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hiv` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_labor\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_lifestyle -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_lifestyle`; CREATE TABLE `phms_followup_lifestyle` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `each_exercise_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `exercise_week_times` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `smoking` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `daily_alcohol_intake` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_lifestyle\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_organ -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_organ`; CREATE TABLE `phms_followup_organ` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_eye` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_eye` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_eye_vc` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_eye_vc` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hearing` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 听见 2 听不清或无法听见', `motor_function` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 可顺利完成 2 无法独立完成其中任何一个动作', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_organ\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_other -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_other`; CREATE TABLE `phms_followup_other` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `attr_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `other_text` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_other\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_followup_transout -- ---------------------------- DROP TABLE IF EXISTS `phms_followup_transout`; CREATE TABLE `phms_followup_transout` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `target_org_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `tranout_reasons` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_followup_transout\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form`; CREATE TABLE `phms_health_form` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `mt_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ans1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ans2` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ans3` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `delete_status` int(11) NULL DEFAULT 0, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_body -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_body`; CREATE TABLE `phms_health_form_body` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `body_temperature` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `pulse_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '次/分钟', `heart_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `respiratory_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_sbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_dbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_sbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_dbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `height` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'cm\r\n ', `weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'kg', `waistline` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `bmi` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(kg/m2) ', `whr` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `dorsalis_pedis_artery_pulse` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未触及、\r\n 2 触及双侧对称、4 触及左侧弱或消失、\r\n 8 触及右侧弱或消失', `dorsalis_pulse_result` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_body\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_drug -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_drug`; CREATE TABLE `phms_health_form_drug` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `drug_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `us_age` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `amount` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `medication_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `medication_unit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1年、2月、3天)', `medication_compliance` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1规律、2间断、3不服药)', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_drug\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_examhiv -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_examhiv`; CREATE TABLE `phms_health_form_examhiv` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hiv_qu_result` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hiv_fr_positive` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hiv_blood_collect` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hiv_blood_result` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `syphilis_qu_result` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `tppa_result` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `rpr_result` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `iud` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `pregnant` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `gestational_weeks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_examhiv\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_extend -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_extend`; CREATE TABLE `phms_health_form_extend` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `location_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `location_lat` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `location_long` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `location_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `guidance_detail` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_extend\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_labor -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_labor`; CREATE TABLE `phms_health_form_labor` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `fasting_blood_glucose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保存单位mmol/L', `postprandial_blood_glucose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `random_blood_glucose` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hemoglobin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '血红蛋白g/L', `leukocyte` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '白细胞×10^9/L', `platelet` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `other_blood` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `urine_protein` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项值分别为:-、+-、+、++、+++、++++', `urine` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项值分别为:-、+-、+、++、+++、++++', `ketone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项值分别为:-、+-、+、++、+++、++++)', `occult_bloodIn_urine` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(选项值分别为:-、+-、+、++、+++、++++)', `other_urine` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `urinary_albumin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mg/dL', `fecal_occult_blood` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 阴性、2 阳性)', `serum_ala` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'U/L', `serum_aa` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `albumin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `total_bilirubin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `bilirubin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `serum_creatinine` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'μmol/L', `bun` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `potassium_concentration` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mmol/L', `sodium_concentration` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mmol/L', `total_cholesterol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mmol/L', `triglycerides` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'mmol/L', `gpt` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ldl_cholesterol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hdl_cholesterol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `glycated_hemoglobin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hepatitis_bSurface_antigen` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 阴性、2 阳性)', `ecg` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `chest_x_ray` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `b_ultrasonic_other` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `b_ultrasonic_wave` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `cervical_smear` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常 、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `other_laboratory` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `erythrocytes` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '×10^9/L', `differential_count` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `blood_transaminase` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sg` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ph` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ng` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_labor\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_lifestyle -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_lifestyle`; CREATE TABLE `phms_health_form_lifestyle` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `exercise_frequency` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 每天、2 每周一次以上、4 偶尔、8 不锻炼)', `each_exercise_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(分钟)', `exercise_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(年)', `exercise_method` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `exercise_week_times` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `diet` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 荤素均衡、2 荤食为主、4 素食为主、8 嗜盐、16 嗜油、32 嗜糖)', `smoking_status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 从不吸烟、2 已戒烟、4 吸烟)', `smoking` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '平均支数)', `smoking_age` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `age_quit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `drinking_frequency` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 从不、2 偶尔、4 经常、8 每天)', `daily_alcoholIntake` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `is_alcohol` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未戒酒、2 已戒酒', `alcohol_age` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `age_started_drinking` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `is_drunk_last_year` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 是、2 否)', `alcohol_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 白酒、2 啤酒、4 红酒、8 黄酒、16 其他)', `is_oe` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无、2 有', `occupation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `working_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '年数', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_lifestyle\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_master -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_master`; CREATE TABLE `phms_health_form_master` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '与体检总表的id一一对应', `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `exam_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `symptom` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无症状、2 头痛、4 头晕、8 心悸、\r\n 16 胸闷、32 胸痛、64 慢性咳嗽、128 咳痰、\r\n 256 呼吸困难、512 多饮、1024 多尿、\r\n 2048 体重下降、4096 乏力、8192 关节肿痛、\r\n 16384 视力模糊、32768 手脚麻木、65536 尿急、\r\n 131072 尿痛、262144 便秘、524288 腹泻、\r\n 1048576 恶心呕吐、2097152 眼花、4194304 耳鸣、\r\n 8388608 乳房胀痛、16777216 其他', `assessment` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 正常 2 异常', `assessment_abnormal` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `guidance` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1纳入慢性病患者健康管理、2建议复查、4建议转诊', `risk_crtl` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 戒烟 2 健康饮酒 4 饮食 \r\n 8 锻炼 16 减体重 32 建议接种疫苗 64 其他', `risk_crtl_weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'kg', `risk_crtl_vaccine` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `risk_crtl_other` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `health_summary` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_Id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `is_standard` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `delete_status` int(255) NULL DEFAULT 0, `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `card_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `source` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_master\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_oepostion -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_oepostion`; CREATE TABLE `phms_health_form_oepostion` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `poison_kind` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(0粉尘、1放射物质、2物理因素、3化学物质、4其他)', `poison_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `is_protection` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否防护(1无、2有)有的情况,才传防护信息值', `protection_measures` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_oepostion\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_organ -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_organ`; CREATE TABLE `phms_health_form_organ` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `lips` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 红润、2 苍白、4 发绀、8 皲裂、16 疱疹', `dentition` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 正常、2 缺齿、4 龋齿、8 义齿(假牙)', `missing_teeth` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Dentition值正常以外的情况下,该字段值为以下4组分别先组内任选值求和,再将4组值求和;\r\n 第一组1~8的分别为:2的[24~31]次方的值,比如1为2的24次方,8则是2的31次方;\r\n 第二组1~8的分别为:2的[23~16]次方的值,比如1为2的23次方,8则是2的16次方;\r\n 第三组1~8的分别为:2的[8~15]次方的值,比如1为2的8次方,8则是2的15次方;\r\n 第四组1~8的分别为:2的[7~0]次方的值,比如1为2的7次方,8则是2的0次方;\r\n 还不懂的话请结合基层系统理解', `caries` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(同上)', `denture` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(同上)', `throat` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无充血、2 充血、4 淋巴滤泡增生', `left_eye` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_eye` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_eye_vc` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_eye_vc` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hearing` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 听见、2 听不清或无法听见', `motor_function` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 可顺利完成、2 无法独立完成任何一个动作', `fundus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 正常、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001血丝)', `skin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 正常、2 潮红、4 苍白、\r\n 8 发绀、16 黄染、32 色素沉着、64 其他', `sclera` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 正常、2 黄染、4 充血、8 其他', `lymph_nodes` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未触及、2 锁骨上、4 腋窝、8 其他', `barrel_chest` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 否、2 是', `breath_sounds` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 正常、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001暗区扩大)', `rale` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无、2 干罗音、4 湿罗音、8 其他', `rhythm` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 齐、2 不齐、4 绝对不齐)', `heart_murmur` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 无、2 有)\r\n 如果有,则保存信息,值与信息以u0001分隔;如(2u0001小)', `abdominal_tenderness` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '腹部压痛(1 无、2 有)\r\n 如果有,则保存信息,值与信息以u0001分隔;如(2u0001小)', `abdominal_mass` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 无、2 有)\r\n 如果有,则保存信息,值与信息以u0001分隔;如(2u0001小)', `the_abdomen_liver` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 无、2 有)\r\n 如果有,则保存信息,值与信息以u0001分隔;如(2u0001小)', `splenomegaly` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 无、2 有)\r\n 如果有,则保存信息,值与信息以u0001分隔;如(2u0001小)', `shifting_dullness` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 无、2 有)\r\n 如果有,则保存信息,值与信息以u0001分隔;如(2u0001小)', `lower_extremity_edema` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 无、2 单侧、4 双侧不对称、8 双侧对称)', `dre` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未及异常、2 触痛、4 包块、8 前列腺异常 、16 其他)', `breast` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 未见异常、2 乳房切除、4 异常泌乳、8 乳腺包块、16 其他)', `organ_other` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_organ\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_other -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_other`; CREATE TABLE `phms_health_form_other` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `attr_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `other_text` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_other\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_problems -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_problems`; CREATE TABLE `phms_health_form_problems` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `cerebrovascular` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未发现、2 缺血性卒中、\r\n 4 脑出血、8 蛛网膜下腔出血、16 短暂性脑缺血发作、32 其他', `kidney` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未发现、2 糖尿病肾病、\r\n 4 肾功能衰竭、8 急性肾炎、16 慢性肾炎、32 其他', `heart` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未发现、2 心肌梗死、4 心绞痛、\r\n 8 冠状动脉血运重建、16 充血性心力衰竭、\r\n 32 心前区疼痛、64 其他', `vascular` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未发现、2 夹层动脉瘤、\r\n 4 动脉闭塞性疾病、8 其他', `eyes` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未发现、2 视网膜出血或渗出、\r\n 4 视乳头水肿、8 白内障、16 其他', `nervoussystems` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 未发现、2 有)', `others` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未发现、2 有', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_problems\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_scalescore -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_scalescore`; CREATE TABLE `phms_health_form_scalescore` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `health` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 满意、2 基本满意、4 说不清楚、8 不太满意、16 不满意', `life_skills` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 可自理(0~3分)、\r\n 2 轻度依赖(4~8分)、4 中度依赖(9~18分) 、8 不能自理(≥19分))', `life_skills_score` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `cognitive_function` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '认知功能选项(1 粗筛阴性、2 粗筛阳性,简易智力状态检查)', `cognitive_function_score` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '如果得分为空,表示认知粗筛阴性)', `emotional_state` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 粗筛阴性、2 粗筛阳性,老年人抑郁评分检查)', `emotional_state_score` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(如果情感状态为空,表示粗筛阴性)', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_scalescore\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_vacc -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_vacc`; CREATE TABLE `phms_health_form_vacc` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `vaccine_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `vacc_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `vacc_org_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_vacc\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_form_woman -- ---------------------------- DROP TABLE IF EXISTS `phms_health_form_woman`; CREATE TABLE `phms_health_form_woman` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `vulva` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 未见异常、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001不懂1)', `vaginal` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 未见异常、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001不懂2)', `cervix` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 未见异常、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001不懂3)', `palace` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 未见异常、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001不懂4)', `uterine_adnexa` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1 未见异常、2 异常)\r\n 如果存在异常,则保存异常信息,值与信息以u0001分隔;如(2u0001不懂5)', `vaginalSecretions` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `vdrl` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `vaginal_cleanness` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `other` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `trichomonas` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `albicans` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_form_woman\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_health_from_hospt -- ---------------------------- DROP TABLE IF EXISTS `phms_health_from_hospt`; CREATE TABLE `phms_health_from_hospt` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `health_form_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `history_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(1住院史、2病床史', `in_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `out_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `reason` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `org_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `medical_record_number` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_health_from_hospt\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_hx_group -- ---------------------------- DROP TABLE IF EXISTS `phms_hx_group`; CREATE TABLE `phms_hx_group` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `team_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '服务医生团队ID', `family_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '家庭ID', `group_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '环信群组名称', `group_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '环信群组ID', `create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE, INDEX `INDEX_HXGP_TEAM_ID`(`team_id`) USING BTREE, INDEX `INDEX_HXGP_FAMILY_ID`(`family_id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_hx_group\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_machine -- ---------------------------- DROP TABLE IF EXISTS `phms_machine`; CREATE TABLE `phms_machine` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '如果有体检表使用了本条小站数据,将使用得体检得主表ID保存到里面,删除该体检表得同时将此字段设置为空,同时将使用状态设置为0', `machine_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `card_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `person_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `measure_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `bmi` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `weight` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `height` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `body_fat_rate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `body_water_rate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `body_muscle` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `viscera_fat_level` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `body_metabolic` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `body_shape` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `body_temperature` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `spo2` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `spo2_array` varchar(3000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `pulse_array` varchar(3000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `heart_rete` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ecg_data` varchar(3000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ecg_result` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sbp` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `dbp` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `pulse` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `bp_reslut` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `waist` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hip` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `wth` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `glu` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ua` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `chol` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `use_status` int(11) NULL DEFAULT 0 COMMENT '0 未使用 1 已使用', `delete_status` int(11) NULL DEFAULT 0 COMMENT '0 正常 1 已删除', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_machine\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_ncd_cm_hylevel -- ---------------------------- DROP TABLE IF EXISTS `phms_ncd_cm_hylevel`; CREATE TABLE `phms_ncd_cm_hylevel` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `cm_person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hy_Level` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0-不详,1-1级高血压(轻度),2-2级高血压(中度),4-3级高血压(重度),8-单纯收缩期高血压,16-正常高值,32-正常血压', `other_risk_factors` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1无,2收缩压和舒张压水平(1-3级),4男性>55岁,女性>65岁,8烟,16血脂异常,32早发心血管病家族史,64腹型肥胖,128c反应蛋白,256糖尿病,512缺乏体力活动', `target_organ_damage` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无,2心,3脑,4肾', `clinical_complications` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1无,2高血压心脏病,4冠心病,8高血压脑病,16脑血管病,32高血压危象,64慢性肾功能衰竭', `hy_risk` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_ncd_cm_hylevel\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_ncd_cm_person -- ---------------------------- DROP TABLE IF EXISTS `phms_ncd_cm_person`; CREATE TABLE `phms_ncd_cm_person` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '与居民档案表的主键关联', `diseaseKind_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `diagnosis_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `org_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `record_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `mt_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `delete_status` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_ncd_cm_person\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_ncd_exam_body -- ---------------------------- DROP TABLE IF EXISTS `phms_ncd_exam_body`; CREATE TABLE `phms_ncd_exam_body` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `cm_person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `body_temperature` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `pulse_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '次/分钟', `heart_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `respiratory_rate` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_sbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `left_dbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_sbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `right_dbp` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `height` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'cm\r\n ', `weight` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'kg', `waistline` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `bmi` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(kg/m2) ', `whr` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `dorsalis_pedis_artery_pulse` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 未触及、\r\n 2 触及双侧对称、4 触及左侧弱或消失、\r\n 8 触及右侧弱或消失', `exam_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `source` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_ncd_exam_body\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_network -- ---------------------------- DROP TABLE IF EXISTS `phms_network`; CREATE TABLE `phms_network` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区划的名字', `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对应的服务器地址', `region_code` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对应的三级区划的CODE', `company_code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '厂商代码,从信息中心获取', `region_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对应于bh_user表中的region_id字段', `status` int(11) NULL DEFAULT NULL COMMENT '状态信息,是否可用(1可用,0禁用)', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_network\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_offline_file -- ---------------------------- DROP TABLE IF EXISTS `phms_offline_file`; CREATE TABLE `phms_offline_file` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构id', `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医生id(医生基卫id)', `region_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构所在的行政区划,比如乡镇区划,留着扩展使用', `file_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1:上传 2:下载,其他自定义', `file_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件名', `file_size` int(11) NULL DEFAULT NULL COMMENT '文件大小KB', `file_path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件路径', `file_content_desc` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件内容描述', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `md5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_offline_file\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_org -- ---------------------------- DROP TABLE IF EXISTS `phms_org`; CREATE TABLE `phms_org` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `region_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `org_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `org_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `user_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `pass_word` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ext_info` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `product_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `product_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品类型: 02,健康小屋;03,健康一体机;04,APP应用;05,其他', `product_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '输入账号密码 产品信息后去基卫获取', `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_org\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_org_service_package -- ---------------------------- DROP TABLE IF EXISTS `phms_org_service_package`; CREATE TABLE `phms_org_service_package` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `category` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `fee` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `app_object` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `org_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_org_service_package\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_org_sync -- ---------------------------- DROP TABLE IF EXISTS `phms_org_sync`; CREATE TABLE `phms_org_sync` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` int(11) NULL DEFAULT NULL COMMENT '0 未下载 1 下载中 2 下载完成', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_org_sync\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_person -- ---------------------------- DROP TABLE IF EXISTS `phms_person`; CREATE TABLE `phms_person` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `person_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `custom_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `card_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '可以输入身份证号,也可选择无和不详', `nation_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '01汉族', `gender_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0未知的性别,1男,2女,9未说明的性别', `marry_status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1未婚,2已婚,3丧偶,4离婚,5未说明的婚姻状况', `work_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `job_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1国家机关 党群组织 企业 事业单位负责人,2专业技术人员,3办事人员和有关人员,4商业 服务业人员,5农 林 牧 渔 水利业生产人员,6生产 运输设备操作人员及有关人员,7军人,8不便分类的其他从业人员,9无职业(选择8后面加上选择的身份的拼音小写,例如:8_xs,表示学生', `hukou_ind` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 户籍,0 非户籍', `education_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '11研究生,12大学本科,13大学专科和专科学校,14中等专业学校,15技工学校,16高中,3初中,2小学,1文盲和半文盲,6不详', `in_family_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `in_org_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `photo` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `contact_person` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `nationality_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '01中国', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name_pinyin` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `birthday` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `hr_status_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `build_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `build_org_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '与机构表得id对应', `build_employee_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `family_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '与家庭表得主键关联', `responsibility_doctor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `work_org_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_sync_tatus` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `update_date_d` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `res_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1农业,2非农业', `p_user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `p_user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hr_status` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `hr_status_remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `death_cause` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `last_sync_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `last_hl_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `in_come_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0无,1低保,2五保,3优抚', `region_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '与区划表得id对应', `region_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '与区划表中得region_code对应', `person_tel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '可输入电话号码,也可选择无和不详', `contact_tel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `nh_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `residence_address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `current_address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `blood_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 A型,2 B型,3 o型,4 AB型, 5 不详', `rh_blood` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 阳性,2 阴性,3 不详', `payment_waystring` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 城镇职工基本医疗保险,2 城镇居民基本医疗保险,4 新型农村合作医疗8贫困救助,16 商业医疗保险 ,32 全公费 ,64 全自费(选了64就不能选择其它选项了) ,128 其他', `other_payment_waystring` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `build_employee_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `responsibility_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `drug_Allergy_history` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无(选1就不能选择其它选项), 2 青霉素, 4 磺胺, 8 链霉素, 16 其他', `other_drug_allergy_history` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '(DrugAllergyHistory中选择了16这里就填具体过敏史', `disability` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无(选1就不能选择其它选项),2 视力残疾,4 听力残疾,8 语言残疾, 16 肢体残疾,32 智力残疾,64 精神残疾,128 其他残疾', `other_disability` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Disability中选择了128这里就填具体残疾情况如:多重残疾。否则就留空', `disability_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Disability中除了只选择1的情况留空,其它情况都得填残疾证号,由18位身份证号加1位残疾类别代码和1位残疾人等级代码组成', `kitchen_exhaust` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无(选1就不能选择其它选项), 2 油烟机, 4 换气扇,8 烟囱', `fuel_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 液化气,2 煤,4 天然气,8 沼气,16 柴火,32 其他', `drinking_water` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT ' 1 自来水, 2经净化过滤的水, 4井水, 8河湖水,16 塘水,32 其他', `toilet` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1卫生厕所, 2一格或二格粪池式,3马桶,4露天粪坑,5 简易棚厕', `livestock_column` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0 无,1 单设,2 室内,3 室外', `householder_relationship` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1本人, 2配偶, 3子, 4女婿, 5女, 6儿媳, 7父亲, 8母亲, 9孙子,10孙女, 11外孙子, 12外孙女, 13爷爷, 14奶奶, 15外公, 16外婆,17兄弟姐妹, 18孙媳妇或外孙媳妇, 19孙女婿或外孙女婿,20曾孙子或外曾孙子, 21曾孙女或外曾孙女, 22公公, 23婆婆,24岳父, 25岳母, 26其他, 27,不详', `is_flowing` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '0不是流动人口,1是流动人口', `is_poor` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '2 是,1 否', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `exposure_history` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `xiang_zhen` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `cun` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `build_org_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_person\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_person_family_history -- ---------------------------- DROP TABLE IF EXISTS `phms_person_family_history`; CREATE TABLE `phms_person_family_history` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '与居民基本档案表的id关联', `relationship_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 父亲 2 母亲 3 兄弟姐妹 4 子女', `disease` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 无(选1就不能选择其它选项), 2 高血压, 4 糖尿病, 8 冠心病, 16 慢性阻塞性肺疾病,32 恶性肿瘤, 64 脑卒中,128 重性精神病,256 结核病, 512肝炎,1024 先天畸形, 2048 其他', `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Disease中选择2048时,这里填具体的疾病类型(如风湿),否则留空', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_person_family_history\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_person_history -- ---------------------------- DROP TABLE IF EXISTS `phms_person_history`; CREATE TABLE `phms_person_history` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '与居民表得id关联', `record_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '1 手术 2 外伤 3 输血 4 遗传病史', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `occurrence_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_person_history\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_product_info -- ---------------------------- DROP TABLE IF EXISTS `phms_product_info`; CREATE TABLE `phms_product_info` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '批次名字', `contact` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '联系人', `info` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息', `region_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '三级区划对应的ID', `contact_tel` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_product_info\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_product_mac -- ---------------------------- DROP TABLE IF EXISTS `phms_product_mac`; CREATE TABLE `phms_product_mac` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `info_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '对应bhc_product_info的id字段', `mac` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备mac地址', `type` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '02,健康小屋(健康小站);04,APP应用', `org_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '使用机构', `addr` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '使用地址', `contact` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人', `contact_tel` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话', `active` smallint(6) NULL DEFAULT NULL, `start_time` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), `end_time` timestamp(0) NOT NULL DEFAULT '0000-00-00 00:00:00', `region_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sn` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `version` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '该Mac地址正在使用的版本号', `upload_jw` smallint(6) NULL DEFAULT 1, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_product_mac\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_product_user -- ---------------------------- DROP TABLE IF EXISTS `phms_product_user`; CREATE TABLE `phms_product_user` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `org_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对应列表批次bh_product_info的ID', `user_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户ID,根据基卫账号密码获取', `login` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基卫账号', `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基卫账号密码(MD5)', `active` int(11) NULL DEFAULT NULL COMMENT '是否启用该账号(1启用,0禁用)', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\",table \"phms_product_user\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_region -- ---------------------------- DROP TABLE IF EXISTS `phms_region`; CREATE TABLE `phms_region` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `full_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `region_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `post_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `region_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '省 = 1,市州=2,县区=4,乡镇街道=8,村居委会=16,组=32', `parent_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NULL DEFAULT NULL, `org_quantity` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `administrative` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `lastsynctime` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `map_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `map_pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sequence` int(11) NULL DEFAULT -1, `parent_sequences` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\",table \"phms_region\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_service_pack_content -- ---------------------------- DROP TABLE IF EXISTS `phms_service_pack_content`; CREATE TABLE `phms_service_pack_content` ( `content_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `service_pack_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sn` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `fre_compare` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `fre_num` int(11) NULL DEFAULT NULL, `fre_remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`content_id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_service_pack_content\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_sign_contract -- ---------------------------- DROP TABLE IF EXISTS `phms_sign_contract`; CREATE TABLE `phms_sign_contract` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `family_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签约得家庭ID', `sign_doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sign_person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sign_person_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sign_date` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), `sign_year` int(11) NULL DEFAULT NULL, `sign_photo` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `scene_photo` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `team_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `channel` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sync_flag` int(11) NULL DEFAULT NULL, `sign_type` int(11) NULL DEFAULT NULL, `sign_stauts` int(11) NULL DEFAULT NULL, `create_date` timestamp(0) NOT NULL DEFAULT '0000-00-00 00:00:00', `update_date` timestamp(0) NOT NULL DEFAULT '0000-00-00 00:00:00', `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_sign_contract\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_sign_contract_member -- ---------------------------- DROP TABLE IF EXISTS `phms_sign_contract_member`; CREATE TABLE `phms_sign_contract_member` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `sign_table_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `contract_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `contract_services` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `person_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `tags` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `start_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `end_time` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `sign_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '如果是续约表,那么必然存在原合同ID', `channel_type` int(11) NULL DEFAULT NULL, `status` int(11) NULL DEFAULT NULL, `sync_status` int(11) NULL DEFAULT NULL, `fail_reason` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), `update_date` timestamp(0) NOT NULL DEFAULT '0000-00-00 00:00:00', `region` int(11) NOT NULL, `hx_account` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '环信账号', PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_sign_contract_member\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_sync_data -- ---------------------------- DROP TABLE IF EXISTS `phms_sync_data`; CREATE TABLE `phms_sync_data` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '0 pad 1 小站 ', `method_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '数据来自同步方式表', `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据主表的ID,如果同步的是体检,那就是体检主表的ID,随访就是随访主表的ID', `user_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `product_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` int(11) NULL DEFAULT NULL COMMENT '0 未同步 1 同步成功 2 同步失败 ', `error_message` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '如果同步失败,记录同步失败原因', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `org_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '机构ID字段', `sync_type` int(3) NULL DEFAULT NULL COMMENT '请参考SyncType类', PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_sync_data\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_sync_method -- ---------------------------- DROP TABLE IF EXISTS `phms_sync_method`; CREATE TABLE `phms_sync_method` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `type` int(11) NULL DEFAULT NULL, `weight` int(11) NULL DEFAULT NULL, `info` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '方法的描述,比如新增体检', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_sync_method\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_team_info -- ---------------------------- DROP TABLE IF EXISTS `phms_team_info`; CREATE TABLE `phms_team_info` ( `team_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `team_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `team_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `org_id` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` tinyint(255) NULL DEFAULT NULL COMMENT '1代表初始状态,2代表更新,3代表删除', PRIMARY KEY (`team_id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_team_info\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_team_mem_info -- ---------------------------- DROP TABLE IF EXISTS `phms_team_mem_info`; CREATE TABLE `phms_team_mem_info` ( `id` int(11) NOT NULL AUTO_INCREMENT, `team_mem_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `team_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `emp_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `master` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `professional` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `duty` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `remark` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `attachfile` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存储的是照片id,此id关联另外一个专门存储照片表的主键', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `tty_doctor_id` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_team_mem_info\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_template -- ---------------------------- DROP TABLE IF EXISTS `phms_template`; CREATE TABLE `phms_template` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `doctor_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `template_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `content` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `status` int(11) NULL DEFAULT 0 COMMENT '0 正常 1 禁用', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_template\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_traditional_chinese_medicine -- ---------------------------- DROP TABLE IF EXISTS `phms_traditional_chinese_medicine`; CREATE TABLE `phms_traditional_chinese_medicine` ( `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '如果是体检得时候做得中医体质辨识,那么此字段存体检表得ID', `resident` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `tc_health_guide` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `tc_health_guide_other` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `next_followup_date` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `doctor_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A01` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A02` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A03` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A04` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A05` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A06` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A07` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A08` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A09` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A10` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A11` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A12` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A13` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A14` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A15` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A16` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A17` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A18` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A19` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A20` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A21` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A22` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A23` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A24` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A25` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A26` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A27` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A28` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A29` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A30` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A31` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A32` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `A33` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, `mt_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `delete_status` int(11) NULL DEFAULT 0, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_traditional_chinese_medicine\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_update -- ---------------------------- DROP TABLE IF EXISTS `phms_update`; CREATE TABLE `phms_update` ( `id` int(100) NOT NULL AUTO_INCREMENT, `version` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '版本号', `force_upgrade` int(11) NOT NULL COMMENT '1强制升级2不强制升级', `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '更新地址', `description` varchar(240) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '应用升级描述', `md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'md5值', `device_type` int(3) NOT NULL COMMENT 'Pad/小站/小站浏览器/导诊单打印系统', `status` int(11) NULL DEFAULT NULL COMMENT '1上线 2下线', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_update\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_update_detail -- ---------------------------- DROP TABLE IF EXISTS `phms_update_detail`; CREATE TABLE `phms_update_detail` ( `id` int(11) NOT NULL AUTO_INCREMENT, `update_id` int(11) NULL DEFAULT NULL, `upgrade_type` int(11) NULL DEFAULT NULL, `mac` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_update_detail\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_update_type -- ---------------------------- DROP TABLE IF EXISTS `phms_update_type`; CREATE TABLE `phms_update_type` ( `id` int(11) NOT NULL AUTO_INCREMENT, `update_id` int(11) NOT NULL, `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', `update_type` tinyint(2) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\",table \"phms_update_type\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for phms_user_region -- ---------------------------- DROP TABLE IF EXISTS `phms_user_region`; CREATE TABLE `phms_user_region` ( `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '账号唯一标识ID,与phms_doctor中的基卫账号ID对应', `jw_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '基卫账号ID', `region_code` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '管辖区划Code,其他详细信息与区划表关联', `create_date` datetime(0) NULL DEFAULT NULL, `update_date` datetime(0) NULL DEFAULT NULL, `region` int(11) NOT NULL, PRIMARY KEY (`id`, `region`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_user_region\"' ROW_FORMAT = Dynamic PARTITION BY LIST COLUMNS (`region`) PARTITIONS 1 (PARTITION `pt510411` values in (510411) COMMENT = 'srv \"db510411\"' MAX_ROWS = 0 MIN_ROWS = 0 ) ; -- ---------------------------- -- Table structure for phms_web_account -- ---------------------------- DROP TABLE IF EXISTS `phms_web_account`; CREATE TABLE `phms_web_account` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `account` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账号', `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码', `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名字', `remark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息', `authority` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '权限', `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `region` int(255) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"phms_web_account\"' PARTITION BY range columns(id) ( PARTITION pt1 values less than (maxvalue) COMMENT = 'srv \"dbbasic\"' ); -- ---------------------------- -- Table structure for tty_doctor -- ---------------------------- DROP TABLE IF EXISTS `tty_doctor`; CREATE TABLE `tty_doctor` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `PORTRAIT` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像', `RANK` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `INTRO` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `MAJOR` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ZGZH` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ZGZH_EXPIRED` date NULL DEFAULT NULL, `ZGZH_IMAGE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `SKILLS` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `HOSPITAL_ID` int(11) NULL DEFAULT NULL, `DEPT_ID` int(11) NULL DEFAULT NULL, `CREATE_TIME` datetime(0) NOT NULL, `TWZX_FLAG` tinyint(1) NOT NULL DEFAULT 0, `DHZX_FLAG` tinyint(1) NOT NULL DEFAULT 0, `TWZX_PRICE` int(11) NOT NULL DEFAULT 0, `DHZX_PRICE` int(11) NOT NULL DEFAULT 0, `BAIDU_CHANNEL_ID` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ZG_STATUS` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0δ', `CONSULT_PERIOD` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `HIS_SYSTEM_ID` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `CONSULT_SCORE_TIMES` int(11) NOT NULL DEFAULT 0, `CONSULT_SCORE_TOTAL` int(11) NOT NULL DEFAULT 0, `STATUS` int(1) NOT NULL DEFAULT 1, `RESERVATION_TIMES` int(11) NULL DEFAULT 0, `LAST_LOGIN_TIME` datetime(0) NULL DEFAULT NULL, `LAST_LOGIN_OS` int(1) NULL DEFAULT NULL, `BANK` int(11) NULL DEFAULT NULL, `BANK_CARD_NO` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `BANK_CARDHOLDER` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `IDCARD_IMAGE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `PERSON_IDCARD_IMAGE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `AUTH_FAIL_REASON` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `RED_WARNING_PRICE` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '红色预警价格', `YELLOW_WARNING_PRICE` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '黄色预警价格', `INCOME` decimal(8, 2) NULL DEFAULT 0.00 COMMENT '医生收益', `BACK_ID` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `IMG_TXT_ACCOUNT_FLAG` int(1) NULL DEFAULT 2 COMMENT '图文账号标记 1成功并加入群组,2需要创建并加入群组,3创建好需要加入群组', `SRTWZX_PRICE` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '私人图文咨询价格', `SRDHZX_PRICE` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '私人电话咨询价格', `SPZX_FLAG` tinyint(1) NOT NULL DEFAULT 0, `SPZX_PRICE` int(11) NOT NULL DEFAULT 0, `SRSPZX_PRICE` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '视频咨询服务包价格', `SPZX_PERIOD` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `CONSULT_TIMES` int(11) NOT NULL DEFAULT 0, `NAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `MOBILE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `LOGIN` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `EMAIL` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `PASSWORD` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `IDENTITY` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `GENDER` tinyint(1) NULL DEFAULT 1, `NATIONALITY` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `BRITHDAY` date NULL DEFAULT NULL, `AUTH_NAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `INVITE_CODE` varchar(6) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邀请码', `ISINVITE` tinyint(1) NULL DEFAULT 0, `BE_INVITED_ID` int(11) NULL DEFAULT NULL COMMENT '邀请人id', `FROM` int(11) NULL DEFAULT 0, `QRCODE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '二维码', `UUID_CODE` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `BASIC_DOCTOR_ID` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`ID`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"tty_doctor\"' PARTITION BY HASH (id) ( PARTITION pt1 COMMENT = 'srv \"dbtty\"' ); -- ---------------------------- -- Table structure for tty_hospital_dept -- ---------------------------- DROP TABLE IF EXISTS `tty_hospital_dept`; CREATE TABLE `tty_hospital_dept` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `DEPT_NAME` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `DEPT_NUM` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `DEPT_INTRO` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `PARENT_ID` int(11) NULL DEFAULT NULL, `HOSPITAL_ID` int(11) NOT NULL, `CREATE_TIME` timestamp(0) NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP(0), `DEPT_GROUP` tinyint(1) NOT NULL DEFAULT 0, `MAPPING_DEPT_ID` int(11) NULL DEFAULT NULL, `GROUP_ID` int(11) NULL DEFAULT NULL, PRIMARY KEY (`ID`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper "mysql", table \"tty_hospital_dept\"' PARTITION BY HASH (id) ( PARTITION pt1 COMMENT = 'srv \"dbtty\"' ); -- ---------------------------- -- Table structure for tty_user -- ---------------------------- DROP TABLE IF EXISTS `tty_user`; CREATE TABLE `tty_user` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `PORTRAIT` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像URL', `CAREER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `BLOODTYPE` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `MARRIAGE` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ADDRESS_PROVIENCE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ADDRESS_CITY` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `ADDRESS_COUNTRY` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `INSURANCE_CODE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `MEDICALRECORD` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `MEDICALRECORDTYPE` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `SENSITIVERECORD` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `HEALTHLEVEL` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `CREATE_TIME` datetime(0) NOT NULL, `BAIDU_CHANNEL_ID` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `LAST_LOGIN_TIME` datetime(0) NULL DEFAULT NULL COMMENT '上次登录时间', `CONTINUOUS_LOGIN_TIMES` int(11) NULL DEFAULT 0 COMMENT '连续登录次数', `SCORE` int(11) NULL DEFAULT NULL COMMENT '积分', `LOGIN_TIMES` int(11) NULL DEFAULT NULL COMMENT '登录总次数', `LAST_LOGIN_OS` int(1) NULL DEFAULT NULL COMMENT '最后一次登录的操作系统', `HEALTH_ADVICE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `HEALTH_ADVICE_TIME` timestamp(0) NULL DEFAULT NULL, `DRUG_ALLERGY` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `DRUG_ALLERGY_DETAIL` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `FOOD_ALLERGY` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `FOOD_ALLERGY_DETAIL` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `OPERATION` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `OPERATION_DETAIL` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `HABITS` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `HABITS_DETAIL` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `FAMILIAL_DISEASE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `FAMILIAL_DISEASE_DETAIL` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `FERTILITY` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `PERSON_DISEASE` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `PERSON_DISEASE_DETAIL` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `HEIGHT` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `WEIGHT` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `BACK_ID` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `IMG_TXT_ACCOUNT_FLAG` int(1) NULL DEFAULT 1 COMMENT '图文账号标记', `NAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `MOBILE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `LOGIN` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `EMAIL` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `PASSWORD` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `IDENTITY` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `GENDER` tinyint(1) NULL DEFAULT 1, `NATIONALITY` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `BRITHDAY` date NULL DEFAULT NULL, `INVITE_CODE` varchar(6) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邀请码', `ISINVITE` tinyint(1) NULL DEFAULT 0, `BE_INVITED_ID` int(11) NULL DEFAULT NULL COMMENT '邀请人id', `FROM` int(11) NULL DEFAULT 0 COMMENT '注册来源', `OPEN_ID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `XZ_IS_FIRST_LOGIN` tinyint(1) NULL DEFAULT 1 COMMENT '小站是否首次登录', `TOKEN` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `TOKEN_EXPIRE_TIME` datetime(0) NULL DEFAULT NULL, `HOME_ID` int(11) NULL DEFAULT NULL, PRIMARY KEY (`ID`) USING BTREE ) ENGINE = SPIDER CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'wrapper \"mysql\", table \"tty_user\"' PARTITION BY HASH (id) ( PARTITION pt1 COMMENT = 'srv \"dbtty\"' ); -- ---------------------------- -- Function structure for FUNCTION_DIC -- ---------------------------- DROP FUNCTION IF EXISTS `FUNCTION_DIC`; delimiter ;; CREATE DEFINER=`spider`@`%` FUNCTION `FUNCTION_DIC`(tableName VARCHAR(255), colName VARCHAR(255), dKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8 COMMENT '计算一天N次的计费次数' BEGIN DECLARE dValue VARCHAR(255); SELECT value_ INTO dValue FROM phms_dictionary d WHERE d.table_name = tableName AND d.column_name = colName AND d.key_ = dKey; RETURN dValue; END ;; delimiter ; -- ---------------------------- -- Function structure for get_labels -- ---------------------------- DROP FUNCTION IF EXISTS `get_labels`; delimiter ;; CREATE DEFINER=`spider`@`%` FUNCTION `get_labels`(label_ids VARCHAR(50)) RETURNS varchar(100) CHARSET utf8 BEGIN /** @author: 赵海涛 根据标签id获取标签名称 **/ DECLARE len INT DEFAULT 0; DECLARE flag INT DEFAULT 0; DECLARE label_name VARCHAR(100) DEFAULT ''; IF label_ids IS NOT NULL THEN SELECT FIND_IN_SET('101',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','糖尿病'); END IF; SELECT FIND_IN_SET('103',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','高血压'); END IF; SELECT FIND_IN_SET('104',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','结核病'); END IF; SELECT FIND_IN_SET('105',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','普通人群'); END IF; SELECT FIND_IN_SET('106',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','65岁以上老人'); END IF; SELECT FIND_IN_SET('107',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','0-6岁儿童'); END IF; SELECT FIND_IN_SET('108',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','孕产妇'); END IF; SELECT FIND_IN_SET('109',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','残疾人'); END IF; SELECT FIND_IN_SET('110',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','计生特殊家庭'); END IF; SELECT FIND_IN_SET('111',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','贫困人群'); END IF; SELECT FIND_IN_SET('112',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','COPD'); END IF; SELECT FIND_IN_SET('113',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','正常人群'); END IF; SELECT FIND_IN_SET('114',label_ids) INTO flag; IF flag>0 THEN SET label_name=CONCAT(label_name,',','建档立卡贫困人口'); END IF; SELECT INSTR(label_name,',') INTO len; IF len=1 THEN SET label_name = SUBSTR(label_name,2); END IF; ELSE SET label_name='健康人群'; END IF; RETURN label_name; END ;; delimiter ; -- ---------------------------- -- Function structure for get_service_fee -- ---------------------------- DROP FUNCTION IF EXISTS `get_service_fee`; delimiter ;; CREATE DEFINER=`spider`@`%` FUNCTION `get_service_fee`(service_ids VARCHAR(1000)) RETURNS varchar(10) CHARSET utf8 BEGIN /** @author: 赵海涛 根据服务包id计算费用 **/ /** DECLARE temp_service_ids VARCHAR(1000) DEFAULT ''; DECLARE flag INT DEFAULT 0; **/ DECLARE total_fee VARCHAR(10) DEFAULT ''; IF service_ids IS NOT NULL THEN /** SELECT service_ids REGEXP ',' INTO flag; IF flag THEN SELECT CONCAT('\'',REPLACE(service_ids,',','\',\''),'\'') INTO temp_service_ids; ELSE SET temp_service_ids=service_ids; END IF; **/ SELECT IFNULL(SUM(sp.fee),0) INTO total_fee FROM phms_org_service_package sp WHERE FIND_IN_SET(sp.id,service_ids); ELSE SET total_fee='0'; END IF; RETURN total_fee; END ;; delimiter ; SET FOREIGN_KEY_CHECKS = 1;