健康报告相关sql

1. health_record_entry

CREATE TABLE `health_record_entry` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '健康报告服务入口id',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '服务名称, 例: item_add_org',
  `display` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '展示名称',
  `display_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '展示名称-英文',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '入口路径',
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图片',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述',
  `status` int DEFAULT '1' COMMENT '状态 1启用 2禁用',
  `org_id` int DEFAULT NULL COMMENT '机构id',
  `tenant_id` int DEFAULT NULL COMMENT '所属租户id',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='健康报告-服务入口';

INSERT INTO `health_record_entry` (`id`, `name`, `display`, `display_en`, `img`, `description`, `status`, `org_id`, `tenant_id`, `create_time`, `update_time`) VALUES (1, 'video_consult', '视频问诊', 'video_consult', NULL, '全国三甲医院名医24小时在线', 1, 1, 1, '2022-08-26 14:47:37', '2022-08-26 14:47:37');
INSERT INTO `health_record_entry` (`id`, `name`, `display`, `display_en`, `img`, `description`, `status`, `org_id`, `tenant_id`, `create_time`, `update_time`) VALUES (2, 'health_fm', '健康FM', 'health_fm', NULL, '名医讲堂听健康', 1, 1, 1, '2022-08-26 14:47:53', '2022-08-26 14:51:42');
INSERT INTO `health_record_entry` (`id`, `name`, `display`, `display_en`, `img`, `description`, `status`, `org_id`, `tenant_id`, `create_time`, `update_time`) VALUES (3, 'medical_services', '就医服务', 'medical_services', NULL, '就医便捷、挂号高效、医生权威', 1, 1, 1, '2022-08-26 14:54:24', '2022-08-26 14:54:24');

2. health_record

CREATE TABLE `health_record` (
  `id` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT COMMENT '自增id',
  `hr_id` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '报告id',
  `customer_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '客户id',
  `team_id` int DEFAULT NULL COMMENT '服务团队id',
  `item_id` int DEFAULT NULL COMMENT '健康报告服务项目的id',
  `push_cycle` int DEFAULT NULL COMMENT '推送周期(0周、1月、2季、3年)',
  `record_time` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '报告时间(时间段)',
  `hr_type` int DEFAULT NULL COMMENT '健康报告类型(0默认,1服务套餐)',
  `push_status` int DEFAULT NULL COMMENT '推送状态(0未推送、1已推送)',
  `push_time` datetime DEFAULT NULL COMMENT '推送时间(服务套餐的推送时间为审核时间)',
  `commodity_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '绑定商品id',
  `service_item_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '绑定预约项目id',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '备注',
  `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '租户id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `suggest` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '建议',
  `org_id` int DEFAULT NULL COMMENT '机构ID',
  `user_id` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '健管师ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='健康报告';


INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000001, '1', '1537620203617812480', 3, 394, 1, '2022-07-01 ~ 2022-07-31', 0, 1, '2022-08-26 10:41:33', NULL, NULL, NULL, '1', '2022-08-01 00:00:00', '2022-08-26 10:39:09', '多吃蔬菜', 1, '1551465673695862784');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000002, '2', '1537620203617812480', 3, 397, 1, '2022-07-01 ~ 2022-07-31', 1, 1, '2022-08-26 10:41:33', '1483359728372289538,1499650958357958657,1499700922295521281,1499743145213038593', '186,187,188,189,190,191,192,193,194,195', NULL, '1', '2022-08-01 00:00:00', '2022-08-25 16:32:32', '多喝热水', 1, '1551465673695862784');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000003, '3', '1537620203617812480', 3, 397, 1, '2022-06-01 ~ 2022-06-30', 1, 1, '2022-08-26 10:41:33', NULL, NULL, NULL, '1', '2022-07-01 00:00:00', '2022-08-26 10:39:13', '多吃蔬菜', 1, '1551465673695862784');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000004, '4', '1537620203617812480', 3, 397, 1, '2022-07-01 ~ 2022-07-31', 1, 1, '2022-08-26 09:55:11', NULL, '186,187,188,189,190,191,192,193,194,195', NULL, '1', '2022-08-01 00:00:00', '2022-08-25 16:32:36', '8888888', 1, '1559015476046802944');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000005, '5', '1537620203617812480', 3, 397, 0, '2022-07-25 ~ 2022-07-31', 1, 1, '2022-08-25 17:15:00', NULL, NULL, NULL, '1', '2022-08-01 00:00:00', '2022-08-26 10:40:22', '多吃蔬菜', 1, '1551465673695862784');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000006, '6', '1410142793407016960', 3, 396, 1, '2021-08-01 ~ 2021-08-31', 1, 0, '2022-08-25 11:52:00', NULL, NULL, NULL, '1', '2021-09-01 00:00:00', '2022-08-25 14:18:25', '适当锻炼666', 1, '1551465673695862784');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000007, NULL, '1410142793407016960', 3, 394, 1, '2021-08-01 ~ 2021-08-31', 0, 1, '2021-09-01 09:00:00', '1483359728372289538,1499650958357958657,1499700922295521281,1499743145213038593,1499743866989842434', NULL, NULL, '1', '2021-09-01 00:00:00', '2022-08-25 14:11:03', NULL, 1, '1405458788283723776');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000008, NULL, '1410142793407016960', 7, 395, 1, '2021-08-09 ~ 2021-08-15', 1, 1, '2021-08-16 10:35:01', '1483359728372289538,1499650958357958657,1499700922295521281,1499743145213038593,1499743866989842434', '186,187,188,189,190,191,192,193,194,195', NULL, '1', '2021-08-16 00:00:00', '2022-08-25 14:11:11', '多喝热水', 1, '1559015476046802944');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000009, NULL, '1410142793407016960', 6, 397, 2, '2021-07-01 ~ 2021-09-30', 1, 0, NULL, NULL, NULL, NULL, '1', '2021-10-01 00:00:00', '2022-08-25 14:18:18', NULL, 1, '1559015476046802944');
INSERT INTO `health_record` (`id`, `hr_id`, `customer_id`, `team_id`, `item_id`, `push_cycle`, `record_time`, `hr_type`, `push_status`, `push_time`, `commodity_ids`, `service_item_ids`, `remark`, `tenant_id`, `create_time`, `update_time`, `suggest`, `org_id`, `user_id`) VALUES (0000000010, NULL, '1410142793407016960', 5, 425, 3, '2021-01-01 ~ 2021-12-31', 1, 0, NULL, NULL, NULL, NULL, '1', '2022-01-01 00:00:00', '2022-08-25 15:43:18', NULL, 1, '1559015476046802944');

3. message_template

INSERT INTO `message_template` (`id`, `name`, `content`, `tenant_id`, `create_time`, `update_time`, `title`) VALUES (71, 'HEALTH_RECORD_PUSH', '您的健康报告已生成,请及时查看', NULL, '2022-08-05 09:29:48', '2022-08-05 09:58:49', '健康报告');

4. service_item

INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (394, '月健康报告-自动推送', 'default-push-month', 101, 2, b'0', NULL, 1, b'0', '默认推送月健康报告', NULL, 1, '2022-08-01 14:19:55', '2022-08-18 17:08:03', b'0', '{\"type\":\"default\",\"cycle\":\"month\",\"times\":15,\"metrics\":\"weight,bloodPressure,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (395, '周健康报告-体重、血压、血糖', 'service-push-week', 101, 2, b'0', NULL, 1, b'0', '周健康报告-体重、血压、血糖', NULL, 1, '2022-08-01 14:20:48', '2022-08-18 13:55:26', b'0', '{\"type\":\"package\",\"cycle\":\"week\",\"times\":0,\"metrics\":\"weight,bloodPressure,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (396, '月健康报告-体重、血压、血糖', 'service-push-month', 101, 2, b'0', NULL, 1, b'0', '月健康报告-体重、血压、血糖', NULL, 1, '2022-08-01 14:20:51', '2022-08-18 13:55:29', b'0', '{\"type\":\"package\",\"cycle\":\"month\",\"times\":0,\"metrics\":\"weight,bloodPressure,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (397, '季健康报告-体重、血压、血糖', 'service-push-quarter', 101, 2, b'0', NULL, 1, b'0', '季健康报告-体重、血压、血糖', NULL, 1, '2022-08-01 14:20:54', '2022-08-18 14:10:48', b'0', '{\"type\":\"package\",\"cycle\":\"quarter\",\"times\":0,\"metrics\":\"weight,bloodPressure,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (398, '年健康报告-体重、血压、血糖', 'service-push-year', 101, 2, b'0', NULL, 1, b'0', '年健康报告-体重、血压、血糖', NULL, 1, '2022-08-01 14:20:57', '2022-08-18 13:55:39', b'0', '{\"type\":\"package\",\"cycle\":\"year\",\"times\":0,\"metrics\":\"weight,bloodPressure,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (400, '血糖测量宣教', NULL, 1, 3, b'0', '', 1, b'0', NULL, NULL, 1, '2022-08-12 16:58:00', '2022-08-12 16:58:00', b'0', NULL, '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (401, '血糖监测随访', NULL, 1, 3, b'0', '', 1, b'0', NULL, NULL, 1, '2022-08-12 16:58:31', '2022-08-12 16:58:31', b'0', NULL, '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (402, '周健康报告-体重', 'service-push-week', 101, 2, b'0', NULL, 1, b'0', '周健康报告-体重', NULL, 1, '2022-08-01 14:20:48', '2022-08-18 14:00:13', b'0', '{\"type\":\"package\",\"cycle\":\"week\",\"times\":0,\"metrics\":\"weight\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (403, '月健康报告-体重', 'service-push-month', 101, 2, NULL, NULL, NULL, b'0', '月健康报告-体重', NULL, 1, '2022-08-18 13:31:54', '2022-08-18 14:10:02', b'0', '{\"type\":\"package\",\"cycle\":\"month\",\"times\":0,\"metrics\":\"weight\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (404, '季健康报告-体重', 'service-push-quarter', 101, 2, NULL, NULL, NULL, b'0', '季健康报告-体重', NULL, 1, '2022-08-18 13:31:59', '2022-08-18 14:10:49', b'0', '{\"type\":\"package\",\"cycle\":\"quarter\",\"times\":0,\"metrics\":\"weight\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (405, '年健康报告-体重', 'service-push-year', 101, 2, NULL, NULL, NULL, b'0', '年健康报告-体重', NULL, 1, '2022-08-18 13:32:25', '2022-08-18 14:11:04', b'0', '{\"type\":\"package\",\"cycle\":\"year\",\"times\":0,\"metrics\":\"weight\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (406, '周健康报告-血压', 'service-push-week', 101, 2, NULL, NULL, NULL, b'0', '周健康报告-血压', NULL, 1, '2022-08-18 13:32:58', '2022-08-18 14:09:46', b'0', '{\"type\":\"package\",\"cycle\":\"week\",\"times\":0,\"metrics\":\"bloodPressure\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (407, '月健康报告-血压', 'service-push-month', 101, 2, NULL, NULL, NULL, b'0', '月健康报告-血压', NULL, 1, '2022-08-18 13:33:03', '2022-08-18 14:10:03', b'0', '{\"type\":\"package\",\"cycle\":\"month\",\"times\":0,\"metrics\":\"bloodPressure\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (408, '季健康报告-血压', 'service-push-quarter', 101, 2, NULL, NULL, NULL, b'0', '季健康报告-血压', NULL, 1, '2022-08-18 13:33:07', '2022-08-18 14:10:50', b'0', '{\"type\":\"package\",\"cycle\":\"quarter\",\"times\":0,\"metrics\":\"bloodPressure\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (409, '年健康报告-血压', 'service-push-year', 101, 2, NULL, NULL, NULL, b'0', '年健康报告-血压', NULL, 1, '2022-08-18 13:33:15', '2022-08-18 14:11:04', b'0', '{\"type\":\"package\",\"cycle\":\"year\",\"times\":0,\"metrics\":\"bloodPressure\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (410, '周健康报告-血糖', 'service-push-week', 101, 2, NULL, NULL, NULL, b'0', '周健康报告-血糖', NULL, 1, '2022-08-18 13:33:39', '2022-08-18 14:09:49', b'0', '{\"type\":\"package\",\"cycle\":\"week\",\"times\":0,\"metrics\":\"bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (411, '月健康报告-血糖', 'service-push-month', 101, 2, NULL, NULL, NULL, b'0', '月健康报告-血糖', NULL, 1, '2022-08-18 13:33:47', '2022-08-18 14:10:04', b'0', '{\"type\":\"package\",\"cycle\":\"month\",\"times\":0,\"metrics\":\"bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (412, '季健康报告-血糖', 'service-push-quarter', 101, 2, NULL, NULL, NULL, b'0', '季健康报告-血糖', NULL, 1, '2022-08-18 13:33:54', '2022-08-18 14:10:51', b'0', '{\"type\":\"package\",\"cycle\":\"quarter\",\"times\":0,\"metrics\":\"bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (413, '年健康报告-血糖', 'service-push-year', 101, 2, NULL, NULL, NULL, b'0', '年健康报告-血糖', NULL, 1, '2022-08-18 13:33:59', '2022-08-18 14:11:05', b'0', '{\"type\":\"package\",\"cycle\":\"year\",\"times\":0,\"metrics\":\"bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (414, '周健康报告-体重、血压', 'service-push-week', 101, 2, NULL, NULL, NULL, b'0', '周健康报告-体重、血压', NULL, 1, '2022-08-18 13:34:24', '2022-08-18 14:09:52', b'0', '{\"type\":\"package\",\"cycle\":\"week\",\"times\":0,\"metrics\":\"weight,bloodPressure\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (415, '月健康报告-体重、血压', 'service-push-month', 101, 2, NULL, NULL, NULL, b'0', '月健康报告-体重、血压', NULL, 1, '2022-08-18 13:34:33', '2022-08-18 14:10:24', b'0', '{\"type\":\"package\",\"cycle\":\"month\",\"times\":0,\"metrics\":\"weight,bloodPressure\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (416, '季健康报告-体重、血压', 'service-push-quarter', 101, 2, NULL, NULL, NULL, b'0', '季健康报告-体重、血压', NULL, 1, '2022-08-18 13:34:39', '2022-08-18 14:10:55', b'0', '{\"type\":\"package\",\"cycle\":\"quarter\",\"times\":0,\"metrics\":\"weight,bloodPressure\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (417, '年健康报告-体重、血压', 'service-push-year', 101, 2, NULL, NULL, NULL, b'0', '年健康报告-体重、血压', NULL, 1, '2022-08-18 13:34:44', '2022-08-18 14:11:06', b'0', '{\"type\":\"package\",\"cycle\":\"year\",\"times\":0,\"metrics\":\"weight,bloodPressure\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (418, '周健康报告-体重、血糖', 'service-push-week', 101, 2, NULL, NULL, NULL, b'0', '周健康报告-体重、血糖', NULL, 1, '2022-08-18 13:35:24', '2022-08-18 14:09:55', b'0', '{\"type\":\"package\",\"cycle\":\"week\",\"times\":0,\"metrics\":\"weight,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (419, '月健康报告-体重、血糖', 'service-push-month', 101, 2, NULL, NULL, NULL, b'0', '月健康报告-体重、血糖', NULL, 1, '2022-08-18 13:35:28', '2022-08-18 14:10:26', b'0', '{\"type\":\"package\",\"cycle\":\"month\",\"times\":0,\"metrics\":\"weight,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (420, '季健康报告-体重、血糖', 'service-push-quarter', 101, 2, NULL, NULL, NULL, b'0', '季健康报告-体重、血糖', NULL, 1, '2022-08-18 13:35:32', '2022-08-18 14:10:56', b'0', '{\"type\":\"package\",\"cycle\":\"quarter\",\"times\":0,\"metrics\":\"weight,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (421, '年健康报告-体重、血糖', 'service-push-year', 101, 2, NULL, NULL, NULL, b'0', '年健康报告-体重、血糖', NULL, 1, '2022-08-18 13:35:37', '2022-08-18 14:11:07', b'0', '{\"type\":\"package\",\"cycle\":\"year\",\"times\":0,\"metrics\":\"weight,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (422, '周健康报告-血压、血糖', 'service-push-week', 101, 2, NULL, NULL, NULL, b'0', '周健康报告-血压、血糖', NULL, 1, '2022-08-18 13:36:14', '2022-08-18 14:09:58', b'0', '{\"type\":\"package\",\"cycle\":\"week\",\"times\":0,\"metrics\":\"bloodPressure,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (423, '月健康报告-血压、血糖', 'service-push-month', 101, 2, NULL, NULL, NULL, b'0', '月健康报告-血压、血糖', NULL, 1, '2022-08-18 13:36:26', '2022-08-18 14:10:28', b'0', '{\"type\":\"package\",\"cycle\":\"month\",\"times\":0,\"metrics\":\"bloodPressure,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (424, '季健康报告-血压、血糖', 'service-push-quarter', 101, 2, NULL, NULL, NULL, b'0', '季健康报告-血压、血糖', NULL, 1, '2022-08-18 13:36:31', '2022-08-18 14:11:00', b'0', '{\"type\":\"package\",\"cycle\":\"quarter\",\"times\":0,\"metrics\":\"bloodPressure,bloodGlucose\"}', '0', NULL);
INSERT INTO `service_item` (`id`, `name`, `code`, `service_type_id`, `method`, `frequency_status`, `frequency`, `status`, `sys`, `description`, `questionnaire_id`, `tenant_id`, `create_time`, `update_time`, `deleted`, `params`, `service_handle_type`, `push_target`) VALUES (425, '年健康报告-血压、血糖', 'service-push-year', 101, 2, NULL, NULL, NULL, b'0', '年健康报告-血压、血糖', NULL, 1, '2022-08-18 13:37:33', '2022-08-18 16:51:12', b'0', '{\"type\":\"package\",\"cycle\":\"year\",\"times\":0,\"metrics\":\"bloodPressure,bloodGlucose\"}', '0', NULL);

5. service_type

INSERT INTO `service_type` (`id`, `name`, `description`, `tenant_id`, `create_time`, `update_time`, `deleted`) VALUES (101, '健康报告', NULL, 1, '2022-08-01 14:12:08', '2022-08-01 14:12:46', b'0');

6.health_record_commodity

CREATE TABLE `health_record_commodity` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '推荐ID',
  `commodity_id` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '商品ID',
  `hr_id` int DEFAULT NULL COMMENT '健康报告ID',
  `name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '名称',
  `description` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '简介',
  `url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '跳转URL',
  `shop_id` int DEFAULT NULL COMMENT '店铺ID',
  `price` decimal(10,2) DEFAULT NULL COMMENT '价格',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `remark` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='健康报告-商品推荐表';

7. health_record_service_item

CREATE TABLE `health_record_service_item` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '推荐ID',
  `service_item_id` int DEFAULT NULL COMMENT '服务项目ID',
  `hr_id` int DEFAULT NULL COMMENT '健康报告ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '名称',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '简介',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '跳转URL',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='健康报告-服务项目推荐表';
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值