初始sql.sql 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  1. SET FOREIGN_KEY_CHECKS=0;
  2. -- ----------------------------
  3. -- Table structure for wlyy_door_cancel_log
  4. -- ----------------------------
  5. DROP TABLE IF EXISTS `wlyy_door_cancel_log`;
  6. CREATE TABLE `wlyy_door_cancel_log` (
  7. `id` varchar(50) NOT NULL,
  8. `order_id` varchar(50) NOT NULL COMMENT '工单id',
  9. `patient` varchar(50) NOT NULL COMMENT '居民code',
  10. `cancel_type` int(1) NOT NULL COMMENT '取消类型:1-调度员取消,2-居民取消',
  11. `cancel_reason` varchar(50) DEFAULT NULL COMMENT '取消理由',
  12. `time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '取消时间',
  13. PRIMARY KEY (`id`)
  14. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工单取消记录';
  15. -- ----------------------------
  16. -- Table structure for wlyy_door_comment
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `wlyy_door_comment`;
  19. CREATE TABLE `wlyy_door_comment` (
  20. `id` int(11) NOT NULL AUTO_INCREMENT,
  21. `order_id` varchar(50) NOT NULL COMMENT '工单id',
  22. `code` varchar(50) DEFAULT NULL COMMENT '评分标识',
  23. `professional_skill` int(3) DEFAULT NULL COMMENT '专业能力',
  24. `serve_attitude` int(3) DEFAULT NULL COMMENT '服务态度',
  25. `serve_efficiency` int(3) DEFAULT NULL COMMENT '服务效率',
  26. `evaluate_split` double(5,2) DEFAULT NULL COMMENT '评价均分',
  27. `description` varchar(50) DEFAULT NULL COMMENT '服务描述和建议',
  28. `is_anonymous` int(1) DEFAULT '0' COMMENT '是否匿名:0-否,1-是',
  29. `patient` varchar(50) DEFAULT NULL COMMENT '评价的居民id',
  30. `create_user` varchar(50) DEFAULT NULL COMMENT '创建者id',
  31. `create_user_name` varchar(50) DEFAULT NULL COMMENT '创建者称名',
  32. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '转接时间',
  33. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  34. `update_user` varchar(50) DEFAULT NULL,
  35. `update_user_name` varchar(50) DEFAULT NULL,
  36. PRIMARY KEY (`id`)
  37. ) ENGINE=InnoDB AUTO_INCREMENT=253 DEFAULT CHARSET=utf8 COMMENT='服务工单评价';
  38. -- ----------------------------
  39. -- Table structure for wlyy_door_comment_doctor
  40. -- ----------------------------
  41. DROP TABLE IF EXISTS `wlyy_door_comment_doctor`;
  42. CREATE TABLE `wlyy_door_comment_doctor` (
  43. `id` int(11) NOT NULL AUTO_INCREMENT,
  44. `order_id` varchar(50) NOT NULL COMMENT '工单id',
  45. `code` varchar(50) DEFAULT NULL COMMENT '医生评分标识',
  46. `doctor_code` varchar(50) NOT NULL COMMENT '医生code',
  47. `professional_skill` int(3) DEFAULT NULL COMMENT '专业能力',
  48. `serve_attitude` int(3) DEFAULT NULL COMMENT '服务态度',
  49. `serve_efficiency` int(3) DEFAULT NULL COMMENT '服务效率',
  50. `evaluate_split` double(5,2) DEFAULT NULL COMMENT '评价均分',
  51. `description` varchar(50) DEFAULT NULL COMMENT '服务描述和建议',
  52. `is_anonymous` int(1) DEFAULT NULL COMMENT '是否匿名:0-否,1-是',
  53. `patient` varchar(50) DEFAULT NULL COMMENT '评价的居民id',
  54. `create_user` varchar(50) DEFAULT NULL COMMENT '创建者id',
  55. `create_user_name` varchar(50) DEFAULT NULL COMMENT '创建者称名',
  56. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '转接时间',
  57. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  58. `update_user` varchar(50) DEFAULT NULL,
  59. `update_user_name` varchar(50) DEFAULT NULL,
  60. PRIMARY KEY (`id`)
  61. ) ENGINE=InnoDB AUTO_INCREMENT=292 DEFAULT CHARSET=utf8 COMMENT='服务工单中的医生评价';
  62. -- ----------------------------
  63. -- Table structure for wlyy_door_conclusion
  64. -- ----------------------------
  65. DROP TABLE IF EXISTS `wlyy_door_conclusion`;
  66. CREATE TABLE `wlyy_door_conclusion` (
  67. `id` varchar(50) NOT NULL,
  68. `order_id` varchar(50) NOT NULL COMMENT '工单id',
  69. `patient` varchar(50) DEFAULT NULL COMMENT '工单服务的居民',
  70. `patient_name` varchar(50) DEFAULT NULL COMMENT '居民姓名',
  71. `idcard` varchar(20) DEFAULT NULL COMMENT '居民姓名',
  72. `sex` varchar(2) DEFAULT NULL COMMENT '性别',
  73. `age` int(3) DEFAULT NULL COMMENT '年龄',
  74. `marriage` varchar(2) DEFAULT NULL COMMENT '婚姻',
  75. `profession` varchar(20) DEFAULT NULL COMMENT '职业',
  76. `nationa` varchar(10) DEFAULT NULL COMMENT '民族',
  77. `birth_place` varchar(50) DEFAULT NULL COMMENT '籍贯',
  78. `company` varchar(100) DEFAULT NULL COMMENT '工作单位',
  79. `address` varchar(50) DEFAULT NULL COMMENT '家庭地址',
  80. `patient_phone` varchar(50) DEFAULT NULL COMMENT '联系电话',
  81. `proxy_patient_name` varchar(10) DEFAULT NULL COMMENT '供史者,病患代理人',
  82. `proxy_patient_phone` varchar(12) DEFAULT NULL COMMENT '供史者联系电话',
  83. `proxy_patient_relation` varchar(5) DEFAULT NULL COMMENT '供史者与患者关系:父女,夫妻,父子等',
  84. `before_record` varchar(500) DEFAULT NULL COMMENT '诊前记录',
  85. `presen_illness` varchar(500) DEFAULT NULL COMMENT '现病史',
  86. `family_ill_history` varchar(500) DEFAULT NULL COMMENT '既往史、个人史、家族史',
  87. `physical_record` varchar(500) DEFAULT NULL COMMENT '体格记录',
  88. `assistant_exam_record` varchar(500) DEFAULT NULL COMMENT '既往辅助检查',
  89. `diagnostic_record` varchar(500) DEFAULT NULL COMMENT '诊断记录',
  90. `exam_result` varchar(500) DEFAULT NULL COMMENT '治疗结果情况',
  91. `imgs` varchar(3000) DEFAULT NULL COMMENT '现场照片,最多9张',
  92. `service_time` datetime DEFAULT NULL COMMENT '服务时间',
  93. `service_count` int(2) DEFAULT NULL COMMENT '服务次数',
  94. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  95. `create_user` varchar(50) DEFAULT NULL COMMENT '创建者id',
  96. `create_user_name` varchar(50) DEFAULT NULL COMMENT '创建者称名',
  97. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  98. `update_user` varchar(50) DEFAULT NULL,
  99. `update_user_name` varchar(50) DEFAULT NULL,
  100. `presen_illness2` varchar(500) DEFAULT NULL COMMENT '现病史2',
  101. `family_ill_history2` varchar(500) DEFAULT NULL COMMENT '既往史、个人史、家族史2',
  102. `temperature` varchar(10) DEFAULT NULL COMMENT '体温',
  103. `respiratory_rate` varchar(10) DEFAULT NULL COMMENT '呼吸频率',
  104. `pulse` varchar(10) DEFAULT NULL COMMENT '脉搏',
  105. `heart_rate` varchar(10) DEFAULT NULL COMMENT '心率',
  106. `systolic` varchar(10) DEFAULT NULL COMMENT '收缩压',
  107. `diastolic` varchar(10) DEFAULT NULL COMMENT '舒张压',
  108. `blood_sugar` varchar(10) DEFAULT NULL COMMENT '血糖',
  109. `blood_sugar_type` varchar(10) DEFAULT NULL COMMENT '血糖类型(1 空腹,2餐后,3随机)',
  110. PRIMARY KEY (`id`),
  111. UNIQUE KEY `orderId` (`order_id`)
  112. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工单服务小结';
  113. -- ----------------------------
  114. -- Table structure for wlyy_door_doctor
  115. -- ----------------------------
  116. DROP TABLE IF EXISTS `wlyy_door_doctor`;
  117. CREATE TABLE `wlyy_door_doctor` (
  118. `id` varchar(50) NOT NULL,
  119. `order_id` varchar(50) NOT NULL COMMENT '工单id',
  120. `doctor` varchar(50) NOT NULL COMMENT '医生code',
  121. `doctor_name` varchar(50) DEFAULT NULL COMMENT '服务医生名称',
  122. `hospital_level` int(2) NOT NULL COMMENT '医生所在的医院级别',
  123. `doctor_job_code` varchar(50) DEFAULT NULL COMMENT '医生职称(dm_job表的code)',
  124. `doctor_job_name` varchar(50) DEFAULT NULL COMMENT '医生职称名称',
  125. `job_fee_cost` double(11,2) DEFAULT NULL COMMENT '出诊费用',
  126. PRIMARY KEY (`id`),
  127. KEY `idx_orderId` (`order_id`)
  128. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='服务工单关联的医护人员';
  129. -- ----------------------------
  130. -- Table structure for wlyy_door_doctor_fee_dict
  131. -- ----------------------------
  132. DROP TABLE IF EXISTS `wlyy_door_doctor_fee_dict`;
  133. CREATE TABLE `wlyy_door_doctor_fee_dict` (
  134. `id` varchar(50) NOT NULL,
  135. `doctor` varchar(50) NOT NULL COMMENT '医生code',
  136. `standard_fee` decimal(5,2) NOT NULL COMMENT '医生单次出诊标准费用',
  137. `medical_aid_fee` decimal(5,2) NOT NULL COMMENT '单次出诊医保补助津贴',
  138. PRIMARY KEY (`id`)
  139. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='医生出诊费用字典';
  140. -- ----------------------------
  141. -- Table structure for wlyy_door_doctor_status
  142. -- ----------------------------
  143. DROP TABLE IF EXISTS `wlyy_door_doctor_status`;
  144. CREATE TABLE `wlyy_door_doctor_status` (
  145. `id` varchar(50) NOT NULL,
  146. `doctor` varchar(50) NOT NULL COMMENT '医生code',
  147. `status` int(1) NOT NULL DEFAULT '1' COMMENT '医生状态:1-待派单,2-待接单,3-待服务,4-服务中,5-停止接单',
  148. `create_user` varchar(50) DEFAULT NULL COMMENT '创建者id',
  149. `create_user_name` varchar(50) DEFAULT NULL COMMENT '创建者称名',
  150. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '转接时间',
  151. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  152. `update_user` varchar(50) DEFAULT NULL,
  153. `update_user_name` varchar(50) DEFAULT NULL,
  154. PRIMARY KEY (`id`)
  155. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='医生上门服务工单状态情况';
  156. -- ----------------------------
  157. -- Table structure for wlyy_door_fee_detail
  158. -- ----------------------------
  159. DROP TABLE IF EXISTS `wlyy_door_fee_detail`;
  160. CREATE TABLE `wlyy_door_fee_detail` (
  161. `id` varchar(50) NOT NULL,
  162. `order_id` varchar(50) DEFAULT NULL COMMENT '工单id',
  163. `type` int(1) NOT NULL COMMENT '费用类型,1-服务项费用,2-医生出诊费用',
  164. `code` varchar(50) DEFAULT NULL COMMENT '居民请求的服务项code,医生出诊费用code',
  165. `name` varchar(50) DEFAULT NULL COMMENT '居民请求的服务项名称,医生出诊费用名称',
  166. `fee` decimal(10,2) DEFAULT NULL COMMENT '费用',
  167. `fee_discount` decimal(10,2) DEFAULT NULL COMMENT '折扣费用',
  168. `number` int(1) DEFAULT NULL COMMENT '数量',
  169. `status` int(1) NOT NULL COMMENT '状态,1-居民新增(预约),2-医生新增,3-医生删除',
  170. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  171. `create_user` varchar(50) DEFAULT NULL COMMENT '创建者id',
  172. `create_user_name` varchar(50) DEFAULT NULL COMMENT '创建者名称',
  173. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  174. `update_user` varchar(50) DEFAULT NULL,
  175. `update_user_name` varchar(50) DEFAULT NULL,
  176. PRIMARY KEY (`id`)
  177. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='服务工单价格明细(服务项价格,医生出诊费用)';
  178. -- ----------------------------
  179. -- Table structure for wlyy_door_order_item
  180. -- ----------------------------
  181. DROP TABLE IF EXISTS `wlyy_door_order_item`;
  182. CREATE TABLE `wlyy_door_order_item` (
  183. `id` int(11) NOT NULL AUTO_INCREMENT,
  184. `doctor` varchar(50) DEFAULT NULL,
  185. `patient` varchar(50) DEFAULT NULL,
  186. `code` varchar(50) DEFAULT NULL COMMENT 'zy_iv_clinic_dict的clinic_code',
  187. `create_time` timestamp NULL DEFAULT NULL,
  188. PRIMARY KEY (`id`)
  189. ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COMMENT='上门服务待预约服务项';
  190. -- ----------------------------
  191. -- Table structure for wlyy_door_patient_confirm_log
  192. -- ----------------------------
  193. DROP TABLE IF EXISTS `wlyy_door_patient_confirm_log`;
  194. CREATE TABLE `wlyy_door_patient_confirm_log` (
  195. `id` varchar(50) NOT NULL,
  196. `order_id` varchar(50) NOT NULL COMMENT '工单id',
  197. `patient` varchar(50) NOT NULL COMMENT '居民',
  198. `patient_name` varchar(50) NOT NULL COMMENT '居民姓名',
  199. `type` int(1) NOT NULL COMMENT '确认操作类型:1-确认基础信息无误或变更,2-确认上门医生变更上门信息,3-同意工单转接',
  200. `description` varchar(200) DEFAULT NULL COMMENT '操作描述',
  201. `create_user` varchar(50) DEFAULT NULL COMMENT '创建者id',
  202. `create_user_name` varchar(50) DEFAULT NULL COMMENT '创建者称名',
  203. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '转接时间',
  204. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  205. `update_user` varchar(50) DEFAULT NULL,
  206. `update_user_name` varchar(50) DEFAULT NULL,
  207. PRIMARY KEY (`id`)
  208. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='服务工单居民确认操作日志记录';
  209. -- ----------------------------
  210. -- Table structure for wlyy_door_prescription
  211. -- ----------------------------
  212. DROP TABLE IF EXISTS `wlyy_door_prescription`;
  213. CREATE TABLE `wlyy_door_prescription` (
  214. `id` int(11) NOT NULL AUTO_INCREMENT,
  215. `code` varchar(50) NOT NULL COMMENT '唯一标识',
  216. `visit_no` varchar(50) DEFAULT NULL COMMENT '就诊号',
  217. `recipe_no` varchar(50) DEFAULT NULL COMMENT '医嘱号',
  218. `order_id` varchar(50) DEFAULT NULL COMMENT '工单id',
  219. `patient` varchar(50) DEFAULT NULL COMMENT '居民code',
  220. `patient_name` varchar(100) DEFAULT NULL COMMENT '居民名称',
  221. `ssc` varchar(50) DEFAULT NULL COMMENT '居民社保卡',
  222. `admin_team_id` int(11) DEFAULT NULL COMMENT '患者签约的行政团队',
  223. `diagnosis_code` varchar(50) DEFAULT NULL COMMENT '诊断的病种code',
  224. `diagnosis_name` varchar(50) DEFAULT NULL COMMENT '诊断名称',
  225. `diagnosis_sub_code` varchar(50) DEFAULT NULL COMMENT '次诊断编码',
  226. `diagnosis_sub_name` varchar(200) DEFAULT NULL COMMENT '次诊断名称',
  227. `remark` varchar(200) DEFAULT NULL COMMENT '处方备注',
  228. `doctor_code` varchar(50) DEFAULT NULL COMMENT '开方医生的编码',
  229. `doctor_name` varchar(255) DEFAULT NULL,
  230. `hospital` varchar(50) DEFAULT NULL COMMENT '基卫-医院编码',
  231. `hospital_name` varchar(255) DEFAULT NULL,
  232. `visit_dept` varchar(50) DEFAULT NULL COMMENT '挂号科室编码',
  233. `visit_dept_name` varchar(200) DEFAULT NULL COMMENT '挂号科室名称',
  234. `status` int(3) DEFAULT NULL COMMENT '(-3 支付过期 -2 患者自己取消 )续方取消,-1 审核不通过 ,(0 待审核, 2调整中,3调整成功, 4调整失败 ,10 医生审核(CA)通过)审核中,20药师审核中,21.药师审核失败,30 开方中/药师审核成功,31.开方失败/预结算失败,(40开方完成/待支付 ,41 支付失败 )待支付, 50 支付成功/待配药,(60配药成功/待配送)等待领药,(61配送失败62分配健管师 65配送中,69配送到服务站)配送中,(100配送到患者手中/已完成)已完成',
  235. `reason` varchar(255) DEFAULT NULL COMMENT '取消处方原因',
  236. `dispensary_type` int(2) DEFAULT NULL COMMENT '取药类型:1 自取 2快递配送 3健管师配送',
  237. `is_after_door` int(2) DEFAULT '1' COMMENT '创建处方状态(1上门前开方 2上门后开方)',
  238. `visit_time` timestamp NULL DEFAULT NULL COMMENT '开单时间',
  239. `pay_time` timestamp NULL DEFAULT NULL COMMENT '同步智业支付状态的时间',
  240. `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  241. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  242. `register_type` varchar(50) DEFAULT NULL COMMENT '基卫-挂号类型编码',
  243. `register_type_name` varchar(200) DEFAULT NULL COMMENT '挂号类别名称',
  244. `rate_type` varchar(50) DEFAULT NULL COMMENT '基卫-挂号费别编码',
  245. `rate_type_name` varchar(200) DEFAULT NULL COMMENT '基卫-挂号费别名称',
  246. `original_data_abstract` varchar(100) DEFAULT NULL COMMENT '原文的MD5摘要',
  247. `str_original_data` varchar(8000) DEFAULT NULL COMMENT 'CA原文数据',
  248. `digital_sign_no` varchar(100) DEFAULT NULL COMMENT 'CA数字签名唯一流水号',
  249. `ca_cert_data` varchar(2000) DEFAULT NULL COMMENT 'ca加密信息',
  250. `ca_message` varchar(2000) DEFAULT NULL COMMENT 'ca指纹信息',
  251. `jw_pay_status` int(11) DEFAULT '0' COMMENT '处方结算状态,0为未结算,1为结算成功,默认为0',
  252. `jw_register_fee` decimal(10,2) DEFAULT NULL COMMENT '结算费用',
  253. `jw_dept_code` varchar(50) DEFAULT NULL COMMENT '基卫--开处方的科室编码',
  254. `jw_doctor_code` varchar(50) DEFAULT NULL COMMENT '基卫-开方医生的编码',
  255. `jw_hospital` varchar(50) DEFAULT NULL COMMENT '基卫-医院编码',
  256. PRIMARY KEY (`id`)
  257. ) ENGINE=InnoDB AUTO_INCREMENT=6233 DEFAULT CHARSET=utf8mb4 COMMENT='上门服务开方表';
  258. -- ----------------------------
  259. -- Table structure for wlyy_door_prescription_detail
  260. -- ----------------------------
  261. DROP TABLE IF EXISTS `wlyy_door_prescription_detail`;
  262. CREATE TABLE `wlyy_door_prescription_detail` (
  263. `id` int(11) NOT NULL AUTO_INCREMENT,
  264. `code` varchar(50) DEFAULT NULL,
  265. `prescription_code` varchar(50) DEFAULT NULL COMMENT '关联wlyy_door_prescription number',
  266. `type` int(1) DEFAULT NULL COMMENT '费用类型,1-上门前开方,2-上门后开方',
  267. `item_code` varchar(50) DEFAULT NULL COMMENT '开方服务项code',
  268. `item_name` varchar(100) DEFAULT NULL COMMENT '开方服务项名称',
  269. `fee` decimal(10,2) DEFAULT NULL COMMENT '总费用',
  270. `num` int(1) DEFAULT NULL COMMENT '数量',
  271. `status` int(1) DEFAULT NULL COMMENT '状态,1有效 0删除',
  272. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  273. PRIMARY KEY (`id`)
  274. ) ENGINE=InnoDB AUTO_INCREMENT=143 DEFAULT CHARSET=utf8 COMMENT='上门服务开方服务工单价格明细';
  275. -- ----------------------------
  276. -- Table structure for wlyy_door_prescription_drug
  277. -- ----------------------------
  278. DROP TABLE IF EXISTS `wlyy_door_prescription_drug`;
  279. CREATE TABLE `wlyy_door_prescription_drug` (
  280. `id` int(11) NOT NULL AUTO_INCREMENT,
  281. `code` varchar(100) NOT NULL COMMENT '业务主键',
  282. `prescription_code` varchar(100) DEFAULT NULL COMMENT '处方code 关联表wlyy_door_prescription code',
  283. `jw_sub_code` varchar(50) DEFAULT NULL COMMENT '智业子处方号',
  284. `drug_code` varchar(50) DEFAULT NULL COMMENT '药品code',
  285. `drug_name` varchar(50) DEFAULT NULL COMMENT '药品名称',
  286. `subject_class` varchar(8) DEFAULT NULL COMMENT '科目类别(0101西成药 0103中草药)',
  287. `drug_rate` varchar(20) DEFAULT NULL COMMENT '吃药频率',
  288. `drug_rate_name` varchar(50) DEFAULT NULL COMMENT '用药频次名称',
  289. `drug_format` varchar(255) DEFAULT NULL COMMENT '药品规格',
  290. `num` int(5) DEFAULT NULL COMMENT '药品数目',
  291. `is_refrigerate` int(1) DEFAULT NULL COMMENT '是否冷藏 1是 0否',
  292. `direction` varchar(255) DEFAULT NULL COMMENT '药品用法',
  293. `price` decimal(10,2) DEFAULT NULL COMMENT '药品价格 单位是分',
  294. `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  295. `day_count` int(8) DEFAULT NULL COMMENT '用药天数',
  296. `bind_flag` varchar(1) DEFAULT NULL COMMENT '成组标志, 0.非成组,1.成组',
  297. `charge` decimal(10,2) DEFAULT NULL COMMENT '自付',
  298. `cost` decimal(10,2) DEFAULT NULL COMMENT '金额',
  299. `drug_num_unit_name` varchar(50) DEFAULT NULL COMMENT '数量单位名称',
  300. `drug_num_unit` varchar(50) DEFAULT NULL COMMENT '数量单位编码',
  301. `drug_usage` varchar(50) DEFAULT NULL COMMENT '用药方法编码',
  302. `usage_name` varchar(50) DEFAULT NULL COMMENT '用药方法名称',
  303. `create_time` datetime DEFAULT NULL COMMENT '药品创建时间',
  304. `del` int(1) DEFAULT '1' COMMENT '1可用 0删除',
  305. `physic_skin_test_name` varchar(50) DEFAULT NULL COMMENT '皮试类型名称',
  306. `physic_skin_test` varchar(50) DEFAULT NULL COMMENT '注射地点名称',
  307. `physic_inject_place_name` varchar(50) DEFAULT NULL COMMENT '注射地点名称',
  308. `physic_inject_place` varchar(50) DEFAULT NULL COMMENT '注射地点编码',
  309. `physic_amount_unit_name` varchar(50) DEFAULT NULL COMMENT '总量单位名称',
  310. `physic_amount_unit` varchar(50) DEFAULT NULL COMMENT '总量单位编码',
  311. `physic_amount` varchar(50) DEFAULT NULL COMMENT '用药总量',
  312. `physic_dose_unit_name` varchar(50) DEFAULT NULL COMMENT '剂量单位名称',
  313. `physic_dose_unit` varchar(50) DEFAULT NULL COMMENT '剂量单位编码',
  314. `physic_dose` varchar(50) DEFAULT NULL COMMENT '用药剂量',
  315. PRIMARY KEY (`id`),
  316. UNIQUE KEY `code` (`code`) USING BTREE,
  317. KEY `idx_wpi_prescription_code` (`prescription_code`) USING BTREE
  318. ) ENGINE=InnoDB AUTO_INCREMENT=14784 DEFAULT CHARSET=utf8mb4 COMMENT='上门服务处方药品表';
  319. -- ----------------------------
  320. -- Table structure for wlyy_door_process_log
  321. -- ----------------------------
  322. DROP TABLE IF EXISTS `wlyy_door_process_log`;
  323. CREATE TABLE `wlyy_door_process_log` (
  324. `id` varchar(50) NOT NULL,
  325. `order_id` varchar(50) NOT NULL COMMENT '工单id',
  326. `status` int(1) NOT NULL COMMENT '工单处理状态',
  327. `dispatcher` varchar(50) DEFAULT NULL COMMENT '变更状态的调度员',
  328. `dispatcher_name` varchar(50) DEFAULT NULL COMMENT '变更状态的调度员姓名',
  329. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  330. PRIMARY KEY (`id`)
  331. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工单状态变更记录(调度员操作记录)';
  332. -- ----------------------------
  333. -- Table structure for wlyy_door_service_application
  334. -- ----------------------------
  335. DROP TABLE IF EXISTS `wlyy_door_service_application`;
  336. CREATE TABLE `wlyy_door_service_application` (
  337. `id` int(11) NOT NULL AUTO_INCREMENT,
  338. `patient` varchar(50) DEFAULT NULL COMMENT '实际申请居民code',
  339. `patient_name` varchar(50) DEFAULT NULL COMMENT '实际申请居民姓名',
  340. `patient_idcard` varchar(20) DEFAULT NULL COMMENT '身份证号码',
  341. `patient_addr` varchar(100) DEFAULT NULL COMMENT '居民地址',
  342. `patient_phone` varchar(20) DEFAULT NULL COMMENT '联系方式',
  343. `application_describe` varchar(1000) DEFAULT NULL COMMENT '补充描述',
  344. `proxy_patient` varchar(50) DEFAULT NULL COMMENT '代理申请居民',
  345. `proxy_patient_name` varchar(50) DEFAULT NULL COMMENT '代理申请居民姓名',
  346. `start_time` datetime DEFAULT NULL COMMENT '有效开始时间',
  347. `end_time` datetime DEFAULT NULL COMMENT '有效截止时间',
  348. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  349. `auditor_type` tinyint(2) DEFAULT NULL COMMENT '审核人类型:1调度员、2家医',
  350. `auditor_code` varchar(50) DEFAULT NULL COMMENT '审核人code',
  351. `auditor_name` varchar(50) DEFAULT NULL COMMENT '审核人姓名',
  352. `audit_time` datetime DEFAULT NULL COMMENT '审核时间',
  353. `failure_reasons` varchar(500) DEFAULT NULL COMMENT '审核未通过原因',
  354. `last_update_time` datetime DEFAULT NULL COMMENT '最后更新时间',
  355. `status` int(2) DEFAULT NULL COMMENT '是否有效 -1删除,0审核中,1未通过,2审核通过,3已过期',
  356. `update_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  357. `update_user_name` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  358. PRIMARY KEY (`id`)
  359. ) ENGINE=InnoDB AUTO_INCREMENT=224 DEFAULT CHARSET=utf8mb4 COMMENT='居民开通上门服务资质申请审核记录表';
  360. -- ----------------------------
  361. -- Table structure for wlyy_door_service_configure
  362. -- ----------------------------
  363. DROP TABLE IF EXISTS `wlyy_door_service_configure`;
  364. CREATE TABLE `wlyy_door_service_configure` (
  365. `id` int(11) NOT NULL AUTO_INCREMENT,
  366. `content_type` varchar(2) DEFAULT NULL COMMENT '内容类型:1上门服务资质限制',
  367. `type` varchar(2) DEFAULT NULL COMMENT '类型:1区、2机构',
  368. `hospital` varchar(100) DEFAULT NULL COMMENT '区、机构编码',
  369. `hospital_name` varchar(100) DEFAULT NULL COMMENT '区、机构名称',
  370. `status` int(2) DEFAULT NULL COMMENT '是否有效 0失效、1有效',
  371. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  372. `last_update_time` datetime DEFAULT NULL COMMENT '最后更新时间',
  373. PRIMARY KEY (`id`)
  374. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='上门服务权限配置表';
  375. -- ----------------------------
  376. -- Table structure for wlyy_door_service_order
  377. -- ----------------------------
  378. DROP TABLE IF EXISTS `wlyy_door_service_order`;
  379. CREATE TABLE `wlyy_door_service_order` (
  380. `id` varchar(50) NOT NULL DEFAULT '',
  381. `number` varchar(50) DEFAULT NULL COMMENT '服务编号',
  382. `proxy_patient` varchar(50) DEFAULT NULL COMMENT '代理发起工单的居民code,替父母,孩子等发起工单',
  383. `proxy_patient_name` varchar(10) DEFAULT NULL COMMENT '代理发起工单的居民code,替父母,孩子等发起工单',
  384. `proxy_patient_phone` varchar(15) DEFAULT NULL COMMENT '代理发起工单的居民联系电话',
  385. `patient` varchar(50) DEFAULT NULL COMMENT '被服务的居民code,发起工单的居民的亲属',
  386. `patient_name` varchar(10) DEFAULT NULL COMMENT '被服务的居民姓名,发起工单的居民的亲属',
  387. `patient_phone` varchar(15) DEFAULT NULL COMMENT '被服务的居民联系电话',
  388. `patient_relation` varchar(10) DEFAULT NULL COMMENT '发起人与被服务人的关系:自己,父亲,母亲,儿子等',
  389. `dispatcher` varchar(50) DEFAULT NULL COMMENT '调度员code',
  390. `dispatcher_name` varchar(50) DEFAULT NULL COMMENT '调度员name',
  391. `patient_expected_serve_time` varchar(200) DEFAULT NULL COMMENT '居民期望服务时间',
  392. `serve_desc` varchar(200) DEFAULT NULL COMMENT '居民自己服务描述',
  393. `serve_town` varchar(100) DEFAULT NULL COMMENT '上门服务的区',
  394. `serve_address` varchar(100) DEFAULT NULL COMMENT '上门服务详细地址',
  395. `serve_lat` varchar(100) DEFAULT NULL COMMENT '上门服务地址纬度',
  396. `serve_lon` varchar(100) DEFAULT NULL COMMENT '上门服务地址经度',
  397. `remark` varchar(200) DEFAULT NULL COMMENT '调度员备注',
  398. `is_patient_confirm` int(1) DEFAULT NULL COMMENT '居民对工单需要服务情况是否已确认,0-未确认,1-已确认 2-不同意',
  399. `patient_confirm_time` timestamp NULL DEFAULT NULL COMMENT '居民对工单需要服务情况确认时间',
  400. `is_trans_other_org` int(1) DEFAULT NULL COMMENT '工单是否转给其他机构,0-不转,1-已转',
  401. `transed_org_code` varchar(50) DEFAULT NULL COMMENT '最后转接的机构code',
  402. `transed_dispatcher` varchar(50) DEFAULT NULL COMMENT '最后转接的机构调度员code',
  403. `transed_dispatcher_name` varchar(50) DEFAULT NULL COMMENT '最后转接的机构调度员name',
  404. `total_fee` decimal(10,2) DEFAULT NULL COMMENT '服务总的支付费用',
  405. `doctor` varchar(50) DEFAULT NULL COMMENT '接单的医生code',
  406. `doctor_name` varchar(50) DEFAULT NULL COMMENT '接单的医生name',
  407. `doctor_type` varchar(50) DEFAULT NULL COMMENT '接单的医生类型:医生,健管师,护士等',
  408. `doctor_arriving_time` varchar(200) DEFAULT NULL COMMENT '医生预计到达时间',
  409. `doctor_sign_time` timestamp NULL DEFAULT NULL COMMENT '医生签到时间',
  410. `doctor_sign_way` int(1) DEFAULT NULL COMMENT '医生签到方式:1-定位,2-扫码,3-拍照',
  411. `doctor_sign_location` varchar(50) DEFAULT NULL COMMENT '医生签到位置,记录详细地址',
  412. `doctor_sign_img` varchar(3000) DEFAULT NULL COMMENT '医生签到照片',
  413. `patient_confirm_finish_way` int(1) DEFAULT NULL COMMENT '居民确认结束服务方式:1-电子签名,2-手持身份证拍照',
  414. `patient_confirm_finish_img` varchar(200) DEFAULT NULL COMMENT '居民确认结束服务照片',
  415. `patient_confirm_finish_time` timestamp NULL DEFAULT NULL COMMENT '居民确认医生结束服务时间',
  416. `present_imgs` varchar(3000) DEFAULT NULL COMMENT '医生诊疗现场照片,最多9张,逗号分隔',
  417. `exam_paper_status` int(1) DEFAULT NULL COMMENT '是否需要上传补录报告:0-不需要,1-需要,待补录;2-需要,已补录',
  418. `exam_paper_imgs` varchar(3000) DEFAULT NULL COMMENT '医生上传居民的化验检查报告照片',
  419. `exam_paper_upload_time` timestamp NULL DEFAULT NULL COMMENT '化验检查报告补录时间',
  420. `exam_paper_upload_way` int(1) DEFAULT NULL COMMENT '化验检查报告补录方式,1-拍照补录,2-接口数据',
  421. `status` int(1) DEFAULT NULL COMMENT '工单状态:-1-已取消,1-待(调度员)派单,2-待(医生)接单,3-已接单,4-待服务,5-待评价,6-已完成',
  422. `complete_time` timestamp NULL DEFAULT NULL COMMENT '工单完成时间(对工单评价完即工单完成)',
  423. `cancel_type` int(1) DEFAULT NULL COMMENT '取消类型:1-调度员取消,2-居民取消,3-医生取消',
  424. `cancel_reason` varchar(200) DEFAULT NULL COMMENT '取消理由',
  425. `cancel_time` timestamp NULL DEFAULT NULL COMMENT '取消时间',
  426. `pay_way` int(1) DEFAULT NULL COMMENT '付款方式:1-微信支付,2-线下支付(居民自己向医院支付,具体怎么支付由医院来定)',
  427. `pay_number` varchar(100) DEFAULT NULL COMMENT '支付流水号',
  428. `pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间',
  429. `dispatcher_response_time` timestamp NULL DEFAULT NULL COMMENT '调度员响应时间(派单时间或取消时间)',
  430. `service_response_time` timestamp NULL DEFAULT NULL COMMENT '服务医生响应时间(第一条咨询或者接单时间)',
  431. `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  432. `create_user` varchar(50) DEFAULT NULL COMMENT '创建者id',
  433. `create_user_name` varchar(50) DEFAULT NULL COMMENT '创建者名称',
  434. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  435. `update_user` varchar(50) DEFAULT NULL,
  436. `update_user_name` varchar(50) DEFAULT NULL,
  437. `expected_doctor_name` varchar(10) DEFAULT '' COMMENT '居民期望服务的医生姓名',
  438. `hospital` varchar(50) DEFAULT NULL COMMENT '服务机构',
  439. `conclusion_status` int(1) DEFAULT NULL COMMENT '服务小结登记状态:1待补录;2-已补录',
  440. `prescription_status` int(1) DEFAULT NULL COMMENT '开方状态:1已完成,0未开方',
  441. `prescription_code` varchar(100) DEFAULT NULL COMMENT '处方单号,多个用逗号隔开',
  442. `prescription_time` timestamp NULL DEFAULT NULL COMMENT '开方完成时间',
  443. `outpatient_id` varchar(50) DEFAULT NULL COMMENT '关联门诊记录',
  444. `type` tinyint(2) DEFAULT '1' COMMENT '发起类型(1本人发起 2家人待预约 3医生代预约)',
  445. `authorize_image` varchar(500) DEFAULT NULL COMMENT '电子健康卡授权图片',
  446. `relation_code` varchar(50) DEFAULT NULL COMMENT '业务关联',
  447. `service_status` varchar(15) DEFAULT NULL COMMENT '服务类型 1-预约项目 2-即时项目',
  448. `order_info` varchar(15) DEFAULT NULL COMMENT '工单详情 0-未推送 1-未确认 2-已确认',
  449. `shortcut_type` char(1) DEFAULT NULL COMMENT '快捷类型,1是快捷类型,其他值不是',
  450. PRIMARY KEY (`id`)
  451. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='上门服务工单';
  452. -- ----------------------------
  453. -- Table structure for wlyy_door_service_voucher
  454. -- ----------------------------
  455. DROP TABLE IF EXISTS `wlyy_door_service_voucher`;
  456. CREATE TABLE `wlyy_door_service_voucher` (
  457. `id` int(11) NOT NULL AUTO_INCREMENT,
  458. `service_id` int(11) NOT NULL COMMENT '上门服务资质申请审核id',
  459. `patient_code` varchar(50) DEFAULT NULL COMMENT '居民code',
  460. `patient_name` varchar(50) DEFAULT NULL COMMENT '居民姓名',
  461. `type` varchar(8) DEFAULT NULL COMMENT '人群类型:1残疾人,2肺结核患者,3计生特殊家庭,4重性精神病,5失能/半失能老人,6其他',
  462. `type_value` varchar(50) DEFAULT NULL COMMENT '人群类型名称',
  463. `image` varchar(1000) DEFAULT NULL COMMENT '凭证地址',
  464. `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  465. `last_update_time` datetime DEFAULT NULL COMMENT '最后更新时间',
  466. `status` int(2) DEFAULT NULL COMMENT '是否有效 0失效、1有效',
  467. `sort` int(2) DEFAULT NULL COMMENT '排序',
  468. PRIMARY KEY (`id`)
  469. ) ENGINE=InnoDB AUTO_INCREMENT=313 DEFAULT CHARSET=utf8mb4 COMMENT='上门服务凭证表';
  470. -- ----------------------------
  471. -- Table structure for wlyy_sign_family
  472. -- ----------------------------
  473. DROP TABLE IF EXISTS `wlyy_sign_family`;
  474. CREATE TABLE `wlyy_sign_family` (
  475. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '业务无关主键',
  476. `code` varchar(50) NOT NULL COMMENT '签约code',
  477. `lw_code` varchar(50) DEFAULT NULL COMMENT '两网编码',
  478. `type` int(11) NOT NULL COMMENT '签约类型:1三师签约,2家庭签约',
  479. `patient` varchar(50) DEFAULT NULL COMMENT '患者标识',
  480. `openid` varchar(50) DEFAULT NULL COMMENT '患者微信公众号openid',
  481. `name` varchar(50) NOT NULL COMMENT '患者姓名',
  482. `idcard` varchar(50) NOT NULL COMMENT '身份证号',
  483. `ssc` varchar(20) NULL COMMENT '社保卡号',
  484. `mobile` varchar(100) DEFAULT NULL COMMENT '手机号',
  485. `emer_mobile` varchar(15) DEFAULT NULL COMMENT '紧急联系人手机号',
  486. `hospital` varchar(50) NOT NULL COMMENT '签约医院标识',
  487. `hospital_name` varchar(100) NOT NULL COMMENT '签约医院名称',
  488. `doctor` varchar(50) DEFAULT NULL COMMENT '全科医生code',
  489. `doctor_name` varchar(50) DEFAULT NULL COMMENT '全科医生姓名',
  490. `begin` date DEFAULT NULL COMMENT '签约开始日期',
  491. `end` date DEFAULT NULL COMMENT '签约结束日期',
  492. `images` varchar(3000) DEFAULT NULL COMMENT '签约图片附件URL,多图以逗号分隔',
  493. `group_code` varchar(100) DEFAULT NULL COMMENT '分组标识',
  494. `status` int(11) NOT NULL COMMENT '签约状态(-1患者已取消,-2已拒绝,-3已解约,-4已到期,0待签约,1已签约,2患者申请取消签约,3医生申请取消签约',
  495. `reason` varchar(500) DEFAULT NULL COMMENT '解决原因',
  496. `czrq` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '操作时间',
  497. `team_code` varchar(100) DEFAULT NULL COMMENT '所属团队code 关联wlyy_doctor_team',
  498. `sign_type` varchar(10) DEFAULT NULL COMMENT '1 用户自己申请 2医生手工带签',
  499. `apply_date` datetime DEFAULT NULL COMMENT '签约时间',
  500. `refuse_speak` varchar(1000) DEFAULT NULL COMMENT '医生拒签说明',
  501. `release_speak` varchar(1000) DEFAULT NULL COMMENT '解约说明',
  502. `doctor_health_name` varchar(200) DEFAULT NULL COMMENT '健康管理师的名字',
  503. `doctor_health` varchar(50) DEFAULT NULL COMMENT '健康管理师code',
  504. `family_code` varchar(200) DEFAULT NULL COMMENT '家庭签约标识(年份(两位:例如2016就填写 16)+街道编码(行政区代码)+中心/站(2位)+人数(6位))',
  505. `patient_apply_date` datetime DEFAULT NULL COMMENT '患者发起的签约时间',
  506. `expenses` double(10,2) DEFAULT NULL COMMENT '签约费用',
  507. `expenses_status` varchar(1) DEFAULT NULL COMMENT '扣费状态 【0未扣费 1已扣费 2已退费】',
  508. `sign_pay_source` int(11) DEFAULT '1' COMMENT '签约支付渠道: 1线下 2线上',
  509. `sign_source` varchar(1) DEFAULT NULL COMMENT '签约来源【1 社区签约 2 移动签约】',
  510. `sign_doctor_code` varchar(50) DEFAULT NULL COMMENT '签约人code',
  511. `sign_doctor_name` varchar(200) DEFAULT NULL COMMENT '签约人名',
  512. `sign_doctor_level` varchar(1) DEFAULT NULL COMMENT '1专科 2全科 3健康管理师',
  513. `patient_apply_unsgin_date` datetime DEFAULT NULL COMMENT '患者发起的解约时间',
  514. `apply_unsign_date` datetime DEFAULT NULL COMMENT '解约同意时间',
  515. `expenses_type` varchar(10) DEFAULT NULL COMMENT '补贴类型',
  516. `sign_year` varchar(10) DEFAULT NULL COMMENT '签约年度',
  517. `medical_insurance_num` varchar(100) DEFAULT NULL COMMENT '医保流水号',
  518. `agent_doctor_code` varchar(50) DEFAULT NULL COMMENT '代签的健康管理师',
  519. `agent_doctor_name` varchar(500) DEFAULT NULL COMMENT '代签的健康管理师',
  520. `agent_doctor_level` varchar(1) DEFAULT NULL COMMENT '代签的健康管理师',
  521. `admin_team_code` int(11) DEFAULT NULL COMMENT '行政团队Id',
  522. `expenses_time` datetime DEFAULT NULL COMMENT '缴费时间',
  523. `server_type` varchar(50) DEFAULT NULL COMMENT '基卫服务类型【必填1 普通服务 2 老年人服务 9 高血压 10 糖尿病 6 孕产妇 8 儿童(0-6岁) 11 贫困人口 12 计生特殊家庭 13 特殊人群(选择时 SPECIAL_POPULATION必填) 】',
  524. `server_type_name` varchar(50) DEFAULT NULL COMMENT '基卫服务类型名称',
  525. `special_population` varchar(50) DEFAULT NULL COMMENT '基卫特殊人群类别 【1 重性精神疾病 2 残疾人 3 结核病】',
  526. `special_population_name` varchar(50) DEFAULT NULL COMMENT '基卫特殊人群类别名称',
  527. `renew_flag` varchar(1) DEFAULT NULL COMMENT '续签标志 1 医生续签 2 医生改签续签',
  528. `renew_change_reason` varchar(2) DEFAULT NULL,
  529. `sick_village` varchar(50) DEFAULT NULL COMMENT '居委会代码',
  530. `sick_village_name` varchar(100) DEFAULT NULL,
  531. `specialist` varchar(50) DEFAULT NULL COMMENT '专科医生code',
  532. `specialist_name` varchar(200) DEFAULT NULL COMMENT '专科医生名字',
  533. PRIMARY KEY (`id`) USING BTREE,
  534. UNIQUE KEY `IDX_UNIQUE_CODE` (`code`) USING BTREE,
  535. KEY `idx_wlyy_sign_family_2` (`patient`) USING BTREE,
  536. KEY `idx_wlyy_sign_family_3` (`doctor`) USING BTREE,
  537. KEY `idx_wlyy_sign_family_1` (`idcard`) USING BTREE,
  538. KEY `idx_doctor_health` (`doctor_health`) USING BTREE,
  539. KEY `idx_team_code` (`team_code`) USING BTREE,
  540. KEY `idx_apply_unsign_date` (`apply_unsign_date`) USING BTREE,
  541. KEY `idx_patient_apply_date` (`patient_apply_date`) USING BTREE,
  542. KEY `idx_mobile` (`mobile`) USING BTREE,
  543. KEY `idx_name` (`name`) USING BTREE,
  544. KEY `idx_adminteamcodestatus` (`admin_team_code`,`status`) USING BTREE,
  545. KEY `idx_end_status` (`end`,`status`) USING BTREE,
  546. KEY `idx_hospital` (`hospital`,`sign_year`,`status`,`expenses_status`) USING BTREE,
  547. KEY `idx_apply_date` (`apply_date`) USING BTREE,
  548. KEY `idx_expenses_time` (`status`,`expenses_time`,`expenses_status`,`sign_year`,`type`,`id`,`code`,`idcard`,`hospital`,`admin_team_code`,`patient`,`server_type`) USING BTREE,
  549. KEY `idx_type` (`type`,`status`,`expenses_status`,`apply_date`,`sign_year`) USING BTREE
  550. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='家庭签约/三师签约';
  551. CREATE TABLE `wlyy_doctor_registration_temp` (
  552. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '业务无关主键',
  553. `code` varchar(50) NOT NULL COMMENT '二级模板标识',
  554. `doctor` varchar(50) DEFAULT NULL COMMENT '医生标识',
  555. `registration` varchar(50) DEFAULT NULL COMMENT '一级模板标识',
  556. `content` text COMMENT '服务登记内容',
  557. `send_times` int(11) DEFAULT NULL COMMENT '发送次数',
  558. `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  559. `last_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '最后一次发送时间',
  560. PRIMARY KEY (`id`),
  561. KEY `idx_code` (`code`) USING BTREE,
  562. KEY `idx_owner` (`doctor`) USING BTREE
  563. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='医生登记服务模板表';
  564. CREATE TABLE `wlyy_doctor_registration` (
  565. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  566. `code` varchar(50) NOT NULL COMMENT '登记服务一级模板编码',
  567. `model_name` varchar(50) DEFAULT NULL COMMENT '模板名称',
  568. `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  569. `is_hide` int(2) NOT NULL DEFAULT '0' COMMENT '是否隐藏 0 隐藏 1不隐藏',
  570. PRIMARY KEY (`id`)
  571. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
  572. INSERT INTO `wlyy_doctor_registration` (`id`, `code`, `model_name`, `create_time`, `is_hide`) VALUES ('1', '1', '主诉记录', '2019-03-14 10:14:07', '0');
  573. INSERT INTO `wlyy_doctor_registration` (`id`, `code`, `model_name`, `create_time`, `is_hide`) VALUES ('2', '2', '现病史', '2019-03-14 10:14:24', '0');
  574. INSERT INTO `wlyy_doctor_registration` (`id`, `code`, `model_name`, `create_time`, `is_hide`) VALUES ('3', '3', '既往史、个人史、家族史', '2019-03-14 10:15:25', '0');
  575. INSERT INTO `wlyy_doctor_registration` (`id`, `code`, `model_name`, `create_time`, `is_hide`) VALUES ('4', '4', '体格检查', '2019-03-14 10:15:49', '0');
  576. INSERT INTO `wlyy_doctor_registration` (`id`, `code`, `model_name`, `create_time`, `is_hide`) VALUES ('5', '5', '既往辅助检查', '2019-03-14 10:16:09', '0');
  577. INSERT INTO `wlyy_doctor_registration` (`id`, `code`, `model_name`, `create_time`, `is_hide`) VALUES ('6', '6', '诊断记录', '2019-03-14 10:16:23', '0');
  578. INSERT INTO `wlyy_doctor_registration` (`id`, `code`, `model_name`, `create_time`, `is_hide`) VALUES ('7', '7', '治疗情况', '2019-03-14 10:16:38', '0');
  579. INSERT INTO `base`.`base_doctor_role_dict` ( `code`, `name`, `del`, `create_user`, `create_user_name`, `create_time`, `update_user`, `update_user_name`, `update_time`) VALUES ( 'dispatcher', '调度员', '1', 'admin', '系统默认', '2020-12-29 11:38:31', NULL, NULL, '2020-12-29 11:38:26');
  580. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('1', NULL, 'PROFESSIONAL_STATE', '0', '工单--患者职业', '国家机关、党群组织、企业、事业单位负责人', '1', NULL);
  581. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('2', NULL, 'PROFESSIONAL_STATE', '1', '1', '专业技术人员', '2', NULL);
  582. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('3', NULL, 'PROFESSIONAL_STATE', '2', '1', '办事人员和有关人员', '3', NULL);
  583. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('4', NULL, 'PROFESSIONAL_STATE', '3', '1', '商业、服务业人员', '4', NULL);
  584. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('5', NULL, 'PROFESSIONAL_STATE', '4', '1', '农、林、牧、渔、水利业生产人员', '5', '');
  585. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('6', NULL, 'PROFESSIONAL_STATE', '5', '1', '生产、运输设备操作人员及有关人员', '6', NULL);
  586. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('7', NULL, 'PROFESSIONAL_STATE', '6', '1', '军人', '7', NULL);
  587. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('8', NULL, 'PROFESSIONAL_STATE', '7', '1', '不便分类的其他从业人员', '8', NULL);
  588. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('9', NULL, 'PROFESSIONAL_STATE', '8', '1', '无职业', '9', NULL);
  589. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('10', NULL, 'door_service_subject_class_dict', '4', '4', '检验费', '2', '上门服务项类型');
  590. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('11', NULL, 'door_service_subject_class_dict', '28', '28', '检查费', '3', NULL);
  591. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('12', NULL, 'door_service_subject_class_dict', '89', '89', '护理费', '4', NULL);
  592. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('13', NULL, 'door_service_subject_class_dict', '148', '148', '推拿', '5', NULL);
  593. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('14', NULL, 'door_service_subject_class_dict', '149', '149', '针灸', '6', NULL);
  594. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('15', NULL, 'door_service_subject_class_dict', 'door', 'door', '上门护理', '1', NULL);
  595. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('16', NULL, 'door_service_door_dict', 'door_1', '0', '置/安插胃管', '1', '上门护理');
  596. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('17', NULL, 'door_service_door_dict', 'door_2', '0', '更换尿管', '2', NULL);
  597. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('18', NULL, 'door_service_door_dict', 'door_3', '0', '黄体酮注射', '3', NULL);
  598. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('19', NULL, 'door_service_door_dict', 'door_4', '0', '采血', '4', NULL);
  599. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('20', NULL, 'door_service_door_dict', 'door_5', '0', '压疮护理', '5', NULL);
  600. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('21', NULL, 'door_service_door_dict', 'door_6', '0', '开奶/催乳/积奶/发汗', '6', NULL);
  601. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('22', NULL, 'door_service_door_dict', 'door_7', '0', '肌肉皮下注射/皮内注射', '7', NULL);
  602. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('23', NULL, 'door_service_door_dict', 'door_8', '0', '膀胱冲洗', '8', NULL);
  603. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('24', NULL, 'door_service_door_dict', 'door_9', '0', 'PICC护理', '9', NULL);
  604. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('25', NULL, 'door_service_door_dict', 'door_10', '0', '外科拆线', '10', NULL);
  605. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('26', NULL, 'door_service_door_dict', 'door_11', '0', '口腔护理', '11', NULL);
  606. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('27', NULL, 'door_service_door_dict', 'door_12', '0', '伤口换药', '12', NULL);
  607. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('28', NULL, 'door_service_door_dict', 'door_13', '0', '陪诊/陪检', '13', NULL);
  608. CREATE TABLE `wlyy_doctor_quick_reply` (
  609. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  610. `doctor` varchar(50) NOT NULL COMMENT '医生',
  611. `content` varchar(255) DEFAULT NULL COMMENT '快捷回复内容',
  612. `sort` int(11) DEFAULT NULL COMMENT '排序',
  613. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  614. `status` int(11) DEFAULT NULL COMMENT '状态 1:有效 0:无效',
  615. `type` int(11) DEFAULT NULL COMMENT '0为健康咨询,1为续方咨询',
  616. `systag` int(11) DEFAULT NULL COMMENT '1为默认消息,0为自定义消息',
  617. PRIMARY KEY (`id`) USING BTREE,
  618. KEY `idx_doctor` (`doctor`) USING BTREE
  619. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='医生快捷回复表';
  620. INSERT INTO `wlyy_doctor_quick_reply` ( `doctor`, `content`, `sort`, `update_time`, `status`, `type`, `systag`) VALUES ( 'default', '请填写您近期体征及生活方式调查问卷', '1', '2017-11-23 14:27:22', '1', '1', '1');
  621. INSERT INTO `wlyy_doctor_quick_reply` ( `doctor`, `content`, `sort`, `update_time`, `status`, `type`, `systag`) VALUES ( 'default', '请填写您近期身体异常症状问卷', '2', '2017-11-23 15:46:46', '1', '1', '2');
  622. INSERT INTO `wlyy_doctor_quick_reply` ( `doctor`, `content`, `sort`, `update_time`, `status`, `type`, `systag`) VALUES ( 'default', '请提供您最近一次的血糖检测数值及检测时间', '3', '2017-11-23 15:46:45', '1', '1', '3');
  623. INSERT INTO `wlyy_doctor_quick_reply` ( `doctor`, `content`, `sort`, `update_time`, `status`, `type`, `systag`) VALUES ( 'default', '请提供您最近一次的血压检测数值及检测时间', '4', '2017-11-23 15:46:46', '1', '1', '4');
  624. DROP TABLE IF EXISTS `zy_nation_dict`;
  625. CREATE TABLE `zy_nation_dict` (
  626. `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  627. `ORG_ID` int(11) DEFAULT NULL,
  628. `NATION_CODE` varchar(3) DEFAULT NULL COMMENT '民族编码',
  629. `NATION_NAME` varchar(50) DEFAULT NULL COMMENT '民族名称',
  630. `VALID_FLAG` varchar(2) DEFAULT NULL,
  631. `USER_CODE` varchar(50) DEFAULT NULL,
  632. `CUSTOM_CODE` varchar(50) DEFAULT NULL,
  633. `SPELL_CODE` varchar(50) DEFAULT NULL,
  634. `WBZX_CODE` varchar(50) DEFAULT NULL,
  635. `SORT_NO` varchar(50) DEFAULT NULL,
  636. `CREATE_TIME` datetime DEFAULT NULL,
  637. `CREATE_OPERATOR` varchar(50) DEFAULT NULL,
  638. `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  639. `MODIFY_OPERATOR` varchar(50) DEFAULT NULL,
  640. `REMARK` varchar(50) DEFAULT NULL COMMENT '备注',
  641. PRIMARY KEY (`ID`) USING BTREE
  642. ) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4;
  643. -- ----------------------------
  644. -- Records of zy_nation_dict
  645. -- ----------------------------
  646. INSERT INTO `zy_nation_dict` VALUES ('1', '0', '1', '汉族', '1', '', '', 'HZ', 'IY', '', null, '', null, '', '');
  647. INSERT INTO `zy_nation_dict` VALUES ('2', '0', '2', '蒙古族', '1', '', '', 'MGZ', 'ADY', '', null, '', null, '', '');
  648. INSERT INTO `zy_nation_dict` VALUES ('3', '0', '3', '回族', '1', '', '', 'HZ', 'LY', '', null, '', null, '', '');
  649. INSERT INTO `zy_nation_dict` VALUES ('4', '0', '4', '藏族', '1', '', '', 'CZ', 'AY', '', null, '', null, '', '');
  650. INSERT INTO `zy_nation_dict` VALUES ('5', '0', '5', '维吾尔族', '1', '', '', 'WWEZ', 'XGQY', '', null, '', null, '', '');
  651. INSERT INTO `zy_nation_dict` VALUES ('6', '0', '6', '苗族', '1', '', '', 'MZ', 'AY', '', null, '', null, '', '');
  652. INSERT INTO `zy_nation_dict` VALUES ('7', '0', '7', '彝族', '1', '', '', 'YZ', 'XY', '', null, '', null, '', '');
  653. INSERT INTO `zy_nation_dict` VALUES ('8', '0', '8', '壮族', '1', '', '', 'ZZ', 'UY', '', null, '', null, '', '');
  654. INSERT INTO `zy_nation_dict` VALUES ('9', '0', '9', '布依族', '1', '', '', 'BYZ', 'DWY', '', null, '', null, '', '');
  655. INSERT INTO `zy_nation_dict` VALUES ('10', '0', '10', '朝鲜族', '1', '', '', 'CXZ', 'FQY', '', null, '', null, '', '');
  656. INSERT INTO `zy_nation_dict` VALUES ('11', '0', '11', '满族', '1', '', '', 'MZ', 'IY', '', null, '', null, '', '');
  657. INSERT INTO `zy_nation_dict` VALUES ('12', '0', '12', '侗族', '1', '', '', 'DZ', 'WY', '', null, '', null, '', '');
  658. INSERT INTO `zy_nation_dict` VALUES ('13', '0', '13', '瑶族', '1', '', '', 'YZ', 'GY', '', null, '', null, '', '');
  659. INSERT INTO `zy_nation_dict` VALUES ('14', '0', '14', '白族', '1', '', '', 'BZ', 'RY', '', null, '', null, '', '');
  660. INSERT INTO `zy_nation_dict` VALUES ('15', '0', '15', '土家族', '1', '', '', 'TJZ', 'FPY', '', null, '', null, '', '');
  661. INSERT INTO `zy_nation_dict` VALUES ('16', '0', '16', '哈尼族', '1', '', '', 'HNZ', 'KNY', '', null, '', null, '', '');
  662. INSERT INTO `zy_nation_dict` VALUES ('17', '0', '17', '哈萨克族', '1', '', '', 'HSKZ', 'KADY', '', null, '', null, '', '');
  663. INSERT INTO `zy_nation_dict` VALUES ('18', '0', '18', '傣族', '1', '', '', 'DZ', 'WY', '', null, '', null, '', '');
  664. INSERT INTO `zy_nation_dict` VALUES ('19', '0', '19', '黎族', '1', '', '', 'LZ', 'TY', '', null, '', null, '', '');
  665. INSERT INTO `zy_nation_dict` VALUES ('20', '0', '20', '傈僳族', '1', '', '', 'LSZ', 'WWY', '', null, '', null, '', '');
  666. INSERT INTO `zy_nation_dict` VALUES ('21', '0', '21', '佤族', '1', '', '', 'WZ', 'WY', '', null, '', null, '', '');
  667. INSERT INTO `zy_nation_dict` VALUES ('22', '0', '22', '畲族', '1', '', '', 'SZ', 'WY', '', null, '', null, '', '');
  668. INSERT INTO `zy_nation_dict` VALUES ('23', '0', '23', '高山族', '1', '', '', 'GSZ', 'YMY', '', null, '', null, '', '');
  669. INSERT INTO `zy_nation_dict` VALUES ('24', '0', '24', '拉祜族', '1', '', '', 'LBZ', 'RPY', '', null, '', null, '', '');
  670. INSERT INTO `zy_nation_dict` VALUES ('25', '0', '25', '水族', '1', '', '', 'SZ', 'IY', '', null, '', null, '', '');
  671. INSERT INTO `zy_nation_dict` VALUES ('26', '0', '26', '东乡族', '1', '', '', 'DXZ', 'AXY', '', null, '', null, '', '');
  672. INSERT INTO `zy_nation_dict` VALUES ('27', '0', '27', '纳西族', '1', '', '', 'NXZ', 'XSY', '', null, '', null, '', '');
  673. INSERT INTO `zy_nation_dict` VALUES ('28', '0', '28', '景颇族', '1', '', '', 'JPZ', 'JHY', '', null, '', null, '', '');
  674. INSERT INTO `zy_nation_dict` VALUES ('29', '0', '29', '柯尔克孜族', '1', '', '', 'KEKZZ', 'SQDBY', '', null, '', null, '', '');
  675. INSERT INTO `zy_nation_dict` VALUES ('30', '0', '30', '土族', '1', '', '', 'TZ', 'FY', '', null, '', null, '', '');
  676. INSERT INTO `zy_nation_dict` VALUES ('31', '0', '31', '达斡尔族', '1', '', '', 'DHEZ', 'DFQY', '', null, '', null, '', '');
  677. INSERT INTO `zy_nation_dict` VALUES ('32', '0', '32', '仫佬族', '1', '', '', 'MLZ', 'WWY', '', null, '', null, '', '');
  678. INSERT INTO `zy_nation_dict` VALUES ('33', '0', '33', '羌族', '1', '', '', 'QZ', 'UY', '', null, '', null, '', '');
  679. INSERT INTO `zy_nation_dict` VALUES ('34', '0', '34', '布朗族', '1', '', '', 'BLZ', 'DYY', '', null, '', null, '', '');
  680. INSERT INTO `zy_nation_dict` VALUES ('35', '0', '35', '撒拉族', '1', '', '', 'SLZ', 'RRY', '', null, '', null, '', '');
  681. INSERT INTO `zy_nation_dict` VALUES ('36', '0', '36', '毛南族', '1', '', '', 'MNZ', 'TFY', '', null, '', null, '', '');
  682. INSERT INTO `zy_nation_dict` VALUES ('37', '0', '37', '仡佬族', '1', '', '', 'GLZ', 'WWY', '', null, '', null, '', '');
  683. INSERT INTO `zy_nation_dict` VALUES ('38', '0', '38', '锡伯族', '1', '', '', 'XBZ', 'QWY', '', null, '', null, '', '');
  684. INSERT INTO `zy_nation_dict` VALUES ('39', '0', '39', '阿昌族', '1', '', '', 'ACZ', 'BJY', '', null, '', null, '', '');
  685. INSERT INTO `zy_nation_dict` VALUES ('40', '0', '40', '普米族', '1', '', '', 'PMZ', 'UOY', '', null, '', null, '', '');
  686. INSERT INTO `zy_nation_dict` VALUES ('41', '0', '41', '塔吉克族', '1', '', '', 'TJKZ', 'FFDY', '', null, '', null, '', '');
  687. INSERT INTO `zy_nation_dict` VALUES ('42', '0', '42', '怒族', '1', '', '', 'NZ', 'VY', '', null, '', null, '', '');
  688. INSERT INTO `zy_nation_dict` VALUES ('43', '0', '43', '乌孜别克族', '1', '', '', 'WZBKZ', 'QBKDY', '', null, '', null, '', '');
  689. INSERT INTO `zy_nation_dict` VALUES ('44', '0', '44', '俄罗斯族', '1', '', '', 'ELSZ', 'WLAY', '', null, '', null, '', '');
  690. INSERT INTO `zy_nation_dict` VALUES ('45', '0', '45', '鄂温克族', '1', '', '', 'EWKZ', 'KIDY', '', null, '', null, '', '');
  691. INSERT INTO `zy_nation_dict` VALUES ('46', '0', '46', '德昂族', '1', '', '', 'DAZ', 'TJY', '', null, '', null, '', '');
  692. INSERT INTO `zy_nation_dict` VALUES ('47', '0', '47', '保安族', '1', '', '', 'BAZ', 'WPY', '', null, '', null, '', '');
  693. INSERT INTO `zy_nation_dict` VALUES ('48', '0', '48', '裕固族', '1', '', '', 'YGZ', 'PLY', '', null, '', null, '', '');
  694. INSERT INTO `zy_nation_dict` VALUES ('49', '0', '49', '京族', '1', '', '', 'JZ', 'YY', '', null, '', null, '', '');
  695. INSERT INTO `zy_nation_dict` VALUES ('50', '0', '50', '塔塔尔族', '1', '', '', 'TTEZ', 'FFQY', '', null, '', null, '', '');
  696. INSERT INTO `zy_nation_dict` VALUES ('51', '0', '51', '独龙族', '1', '', '', 'DLZ', 'QDY', '', null, '', null, '', '');
  697. INSERT INTO `zy_nation_dict` VALUES ('52', '0', '52', '鄂伦春族', '1', '', '', 'ELCZ', 'KWDY', '', null, '', null, '', '');
  698. INSERT INTO `zy_nation_dict` VALUES ('53', '0', '53', '赫哲族', '1', '', '', 'HZZ', 'FRY', '', null, '', null, '', '');
  699. INSERT INTO `zy_nation_dict` VALUES ('54', '0', '54', '门巴族', '1', '', '', 'MBZ', 'UCY', '', null, '', null, '', '');
  700. INSERT INTO `zy_nation_dict` VALUES ('55', '0', '55', '珞巴族', '1', '', '', 'LBZ', 'CY', '', null, '', null, '', '');
  701. INSERT INTO `zy_nation_dict` VALUES ('56', '0', '56', '基诺族', '1', '', '', 'JNZ', 'AYY', '', null, '', null, '', '');
  702. INSERT INTO `zy_nation_dict` VALUES ('57', '0', '99', '其他', '1', '', '', 'QT', 'AW', '', null, '', null, '', '');
  703. INSERT INTO `zy_nation_dict` VALUES ('58', '0', '57', '穿青人', '1', '', '57', 'CQZ', 'CQZ', '', null, '', null, '', '');
  704. INSERT INTO `zy_nation_dict` VALUES ('59', '0', '58', 'Turkish', '1', '', '', 'teq', 'Turkish', '', null, '', null, '', '');
  705. INSERT INTO `zy_nation_dict` VALUES ('60', '0', '59', 'BRITAIN', '1', '', '', 'BRITISH', 'BRITAIN', '', null, '', null, '', '');
  706. INSERT INTO `zy_nation_dict` VALUES ('61', '0', '60', 'AUSTRALIAN', '1', '', '', 'AUSTRALIAN', 'AUSTRALIAN', '', null, '', null, '', '');
  707. INSERT INTO `zy_nation_dict` VALUES ('62', '0', '61', '/', '1', '', '', '/', '/', '0', null, '', null, '', '');
  708. INSERT INTO `zy_nation_dict` VALUES ('63', '0', '63', 'Ukrainian', '1', '', '', 'Ukrainian', 'Ukrainian', '', null, '', null, '', '');
  709. INSERT INTO `zy_nation_dict` VALUES ('64', '0', '101', '亻革家人', '1', '', '', 'RGJR', '', '', null, '', null, '', '');
  710. INSERT INTO `zy_nation_dict` VALUES ('65', '0', '62', '山由族', '1', '', '', 'SYZ', 'MMY', '', null, '', null, '', '');
  711. DROP TABLE IF EXISTS `wlyy_followup`;
  712. CREATE TABLE `wlyy_followup` (
  713. `id` int(11) NOT NULL AUTO_INCREMENT,
  714. `followup_no` varchar(50) DEFAULT NULL,
  715. `followup_date` datetime NULL COMMENT '随访时间',
  716. `followup_plan_date` datetime DEFAULT NULL COMMENT '计划随访时间',
  717. `followup_next_date` datetime DEFAULT NULL COMMENT '计划下次随访时间',
  718. `followup_type` varchar(50) DEFAULT NULL COMMENT '随访方式【字典FOLLOWUP_WAY_DICT】',
  719. `followup_class` varchar(50) DEFAULT NULL COMMENT '随访类别,多类别“,”分割【1.高血压 2.糖尿病 3.肿瘤 4.精神分裂症 5.产后 6.新生儿 7.严重精神病 8.80岁以上老人 9.肺结核 11.冠心病日常随访 12.慢性妇科炎症 13.慢性前列腺疾病日常随访 14.慢性乳腺疾病日常随访 15慢性肾病日常随访 16慢性阻塞性肺病17脑卒中日常随访 18脂肪肝日常随访 ',
  720. `followup_manager_status` varchar(50) DEFAULT NULL COMMENT '随访管理状态【字典FOLLOWUP_MANAGER_STATUS】',
  721. `doctor_code` varchar(50) DEFAULT NULL COMMENT '随访医生code',
  722. `doctor_name` varchar(50) DEFAULT NULL COMMENT '随访医生name',
  723. `jwdoctor_code` varchar(50) DEFAULT NULL,
  724. `org_code` varchar(50) DEFAULT NULL COMMENT '随访机构code',
  725. `org_name` varchar(50) DEFAULT NULL COMMENT '随访机构名称',
  726. `jworg_code` varchar(20) DEFAULT NULL COMMENT '基卫机构编码',
  727. `patient_code` varchar(50) DEFAULT NULL,
  728. `patient_name` varchar(50) DEFAULT NULL,
  729. `idcard` varchar(50) DEFAULT NULL,
  730. `data_from` varchar(1) NOT NULL COMMENT '数据来源 1基卫 2APP',
  731. `status` varchar(1) NOT NULL COMMENT '状态 0取消 1已完成 2未开始 3进行中 4未审核',
  732. `followup_content_phone` varchar(1000) DEFAULT NULL COMMENT '电话随访内容',
  733. `creater` varchar(50) DEFAULT NULL COMMENT '创建者',
  734. `sign_type` int(11) DEFAULT NULL COMMENT '签约类型',
  735. `admin_team_code` int(11) DEFAULT NULL COMMENT '行政团队',
  736. `create_time` timestamp NULL DEFAULT NULL,
  737. `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  738. `sign_code` varchar(200) DEFAULT NULL COMMENT '签约code',
  739. `prescription_code` varchar(50) DEFAULT NULL COMMENT '续方CODE或者康复计划ID',
  740. `age` varchar(100) DEFAULT NULL COMMENT '婴儿年龄',
  741. `sex` int(11) DEFAULT NULL COMMENT '性别',
  742. `mobile` varchar(255) DEFAULT NULL COMMENT '手机号',
  743. `idcard_encrypt` varchar(255) DEFAULT NULL COMMENT '妊娠编号',
  744. `type` int(2) DEFAULT NULL COMMENT '1新增随访2临时随访3入户访视',
  745. `jw_doctor_work_type` varchar(10) DEFAULT NULL COMMENT '随访角色【FAMILY_WORK_TYPE_DICT】【1. 专科医生 2. 全科医生 3. 健康管理师】',
  746. `jw_doctor_health` varchar(50) DEFAULT NULL COMMENT '基卫系统的随访健管师ID',
  747. `health_followup_type` varchar(50) DEFAULT NULL COMMENT '健管师随访方式【FOLLOWUP_WAY_DICT】',
  748. `health_followup_next_date` datetime DEFAULT NULL COMMENT '健管师下次随访日期',
  749. `rural_doctors_flag` varchar(10) DEFAULT NULL COMMENT '是否乡医【0.否;1.是;】',
  750. `patient_read_status` int(11) DEFAULT '0' COMMENT '专病档案功能是否未读,0-未读 1-已读',
  751. `doctor_read_status` int(11) DEFAULT '0' COMMENT '专病档案功能是否未读,0-未读 1-已读',
  752. PRIMARY KEY (`id`),
  753. KEY `idx_patient` (`patient_code`) USING BTREE,
  754. KEY `idx_doctorcode_followup_date` (`doctor_code`,`followup_date`) USING BTREE,
  755. KEY `idx_prescription_code` (`prescription_code`) USING BTREE
  756. ) ENGINE=InnoDB AUTO_INCREMENT=1889415 DEFAULT CHARSET=utf8mb4 COMMENT='随访计划表';
  757. ALTER TABLE wlyy_door_service_order ADD followup_date varchar(50) COMMENT '随访时间' ;
  758. ALTER TABLE wlyy_door_fee_detail ADD pay_status TINYINT(1) COMMENT '付款状态:0未付款 1已付款' ;
  759. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('29', NULL, 'FOLLOWUP_PROJECT', '1', '1', '症状', NULL, NULL);
  760. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('30', NULL, 'FOLLOWUP_PROJECT', '2', '1', '体征', NULL, NULL);
  761. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('31', NULL, 'FOLLOWUP_PROJECT', '3', '1', '实验室检查', NULL, NULL);
  762. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('32', NULL, 'FOLLOWUP_PROJECT', '4', '1', '生活方式指导', NULL, NULL);
  763. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('33', NULL, 'FOLLOWUP_PROJECT', '5', '1', '评价', NULL, NULL);
  764. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('34', NULL, 'FOLLOWUP_PROJECT', '6', '1', '用药情况', NULL, NULL);
  765. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('35', NULL, 'FOLLOWUP_PROJECT', '7', '1', '控制目标', NULL, NULL);
  766. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('36', NULL, 'FOLLOWUP_PROJECT', '8', '1', '健康教育', NULL, NULL);
  767. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('37', NULL, 'FOLLOWUP_PROJECT', '9', '1', '转诊', NULL, NULL);
  768. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('38', NULL, 'FOLLOWUP_WAY_DICT', '25', '1', '上门随访', NULL, NULL);
  769. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('39', NULL, 'FOLLOWUP_CLASS_DICT', '1', '1', '高血压', '1', NULL);
  770. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('40', NULL, 'FOLLOWUP_CLASS_DICT', '2', '1', '糖尿病', '2', NULL);
  771. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('41', NULL, 'FOLLOWUP_MANAGER_STATUS', '1', '1', '已管', '1', NULL);
  772. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('42', NULL, 'FOLLOWUP_MANAGER_STATUS', '2', '1', '失管', '2', NULL);
  773. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('43', NULL, 'FOLLOWUP_MANAGER_STATUS', '2', '1', '拒管', '3', NULL);
  774. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('44', NULL, '350211A1002_org_work_time', 'startAm', '1', '08:00', '1', NULL);
  775. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('45', NULL, '350211A1002_org_work_time', 'stopAm', '2', '12:00', '2', NULL);
  776. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('46', NULL, '350211A1002_org_work_time', 'startPm', '3', '14:00', '3', NULL);
  777. INSERT INTO `base`.`base_system_dict_entry` (`id`, `saas_id`, `dict_code`, `code`, `py_code`, `value`, `sort`, `remark`) VALUES ('47', NULL, '350211A1002_org_work_time', 'stopPm', '4', '20:00', '4', NULL);
  778. CREATE TABLE `wlyy_followup_drugs` (
  779. `id` int(11) NOT NULL AUTO_INCREMENT,
  780. `followup_id` int(11) DEFAULT NULL COMMENT '随访ID',
  781. `drugs_code` varchar(50) DEFAULT NULL COMMENT '药品代码',
  782. `drugs_name` varchar(50) DEFAULT NULL COMMENT '药品名称',
  783. `drugs_group` varchar(50) DEFAULT NULL COMMENT '药品分组(糖尿病--胰岛特殊处理)',
  784. `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  785. `dose` varchar(200) DEFAULT NULL COMMENT '次剂量',
  786. `unit` varchar(50) DEFAULT NULL COMMENT '用药单位【字典MEASURE_UNIT_DICT】',
  787. `frequency` varchar(50) DEFAULT NULL COMMENT '用药频率【字典RECIPE_FREQUENCY_DICT】',
  788. PRIMARY KEY (`id`),
  789. KEY `wlyy_followup_drugs_followup_id_index` (`followup_id`)
  790. ) ENGINE=InnoDB AUTO_INCREMENT=436 DEFAULT CHARSET=utf8mb4 COMMENT='随访用药记录';
  791. -- 统计