|
@@ -0,0 +1,70 @@
|
|
|
+/*
|
|
|
+ * @Author: fuyu
|
|
|
+ * @Date: 2021-03-22 19:10:00
|
|
|
+ * @LastEditors: fuyu
|
|
|
+ * @LastEditTime: 2021-03-23 10:19:30
|
|
|
+ * @FilePath: /202103/code/test/tmp/RemoteApplication.js
|
|
|
+ */
|
|
|
+
|
|
|
+const Sequelize = require('sequelize');
|
|
|
+import sequelize from './db/sequelize';
|
|
|
+/**
|
|
|
+* 患者信息
|
|
|
+*/
|
|
|
+// primaryKey: true
|
|
|
+// defaultValue: null
|
|
|
+const RemoteApplication = sequelize.define('remote_application', {
|
|
|
+ id: {type: Sequelize.STRING(255), allowNull: false, primaryKey: true}, // id,
|
|
|
+ name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // name, 姓名
|
|
|
+ sex: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // sex, 性别
|
|
|
+ age: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // age, 年龄
|
|
|
+ report_result: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // report_result, 检查结果
|
|
|
+ patient_num: {type: Sequelize.STRING(200), allowNull: true, defaultValue: null}, // patient_num, 病历号
|
|
|
+ accession_num: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // accession_num, 检查号
|
|
|
+ exam_datetime: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // exam_datetime, 检查时间
|
|
|
+ exam_class: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // exam_class, 检查类型
|
|
|
+ exam_project: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // exam_project, 检查项目
|
|
|
+ report_status: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // report_status, 远程诊断状态\r\n2 保存完善病例资料\r\n3 完善病例资料保存继续\r\n4 选择医院发起申请\r\n5 驳回申请\r\n6 接收申请\r\n7 写报告\r\n8 审核报告\r\n9 最终完成报告\r\n11 撤回报告\r\n10 确认报告
|
|
|
+ req_date_time: {type: Sequelize.DATE, allowNull: true, defaultValue: null}, // req_date_time, 邀请时间
|
|
|
+ local_institution_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // local_institution_id, 邀请方医院
|
|
|
+ local_institution_name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // local_institution_name, 邀请方医院名称
|
|
|
+ req_doctor_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // req_doctor_id, 邀请方医生id
|
|
|
+ req_doctor_name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // req_doctor_name, 邀请方医生姓名
|
|
|
+ remote_institution_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // remote_institution_id, 受邀方医院
|
|
|
+ remote_institution_name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // remote_institution_name, 受邀方医院名称
|
|
|
+ remote_doctor_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // remote_doctor_id,
|
|
|
+ remote_doctor_name: {type: Sequelize.STRING(200), allowNull: true, defaultValue: null}, // remote_doctor_name,
|
|
|
+ illness_desc: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // illness_desc, 患者主诉
|
|
|
+ clin_symp: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // clin_symp, 临床症状
|
|
|
+ phys_sign: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // phys_sign, 体征
|
|
|
+ clin_diag: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // clin_diag, 临床诊断
|
|
|
+ anamnesis: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // anamnesis, 既往史
|
|
|
+ family_ill: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // family_ill, 家族史
|
|
|
+ remark: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // remark, 备注
|
|
|
+ exam_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // exam_id, 检查表id
|
|
|
+ is_urgent: {type: Sequelize.STRING(20), allowNull: true, defaultValue: '0'}, // is_urgent, 是否急诊 0 否 1 是
|
|
|
+ status: {type: Sequelize.STRING(20), allowNull: false, defaultValue: '0'}, // status, 删除状态 0 否 1 是
|
|
|
+ application_desc: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // application_desc, 申请描述
|
|
|
+ attachment: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // attachment, 附件
|
|
|
+ remote_department: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // remote_department, 申请科室
|
|
|
+ more: {type: Sequelize.TEXT, allowNull: true, defaultValue: null}, // more, 补充说明
|
|
|
+ odd_number: {type: Sequelize.STRING(200), allowNull: true, defaultValue: null}, // odd_number, 申请单单号
|
|
|
+ pay_status: {type: Sequelize.STRING(255), allowNull: true, defaultValue: '0'}, // pay_status, 付款状态 0未付款 1已付款
|
|
|
+ birthday: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // birthday, 生日
|
|
|
+ card_num: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // card_num, 身份证号
|
|
|
+ body_part: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // body_part, 检查部位
|
|
|
+ exam_sub_class: {type: Sequelize.STRING(200), allowNull: true, defaultValue: null}, // exam_sub_class, 检查子类
|
|
|
+ study_id: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // study_id,
|
|
|
+ phone: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // phone,
|
|
|
+ sid: {type: Sequelize.BIGINT(20), allowNull: true, defaultValue: null}, // sid, 特殊机构id
|
|
|
+ scid: {type: Sequelize.BIGINT(20), allowNull: true, defaultValue: null}, // scid, 特殊机构关联id
|
|
|
+ hopitalized_no: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // hopitalized_no 住院号
|
|
|
+}, {
|
|
|
+ freezeTableName: true,
|
|
|
+ charset: 'utf8',
|
|
|
+ indexes:[
|
|
|
+ {fields : ['exam_id']}
|
|
|
+ ],
|
|
|
+});
|
|
|
+RemoteApplication.sync({ force: false }).then(function() {});
|
|
|
+export default RemoteApplication;
|