123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- /*
- * @Author: fuyu
- * @Date: 2021-03-22 19:10:00
- * @LastEditors: fuyu
- * @LastEditTime: 2021-03-25 13:05:31
- * @FilePath: /202103/code/sql_merge/src/dao_old/Exams.js
- */
- const Sequelize = require('sequelize');
- import sequelize from './db/sequelize';
- /**
- * 患者信息
- */
- // primaryKey: true
- // defaultValue: null
- const Exams = sequelize.define('exams', {
- id: {type: Sequelize.STRING(255), allowNull: false, primaryKey: true}, // id,
- institution_id: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // institution_id, 医院id
- name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // name, 患者姓名
- phone: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // phone, 患者手机号
- card_num: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // card_num, 患者身份证
- patient_num: {type: Sequelize.STRING(100), allowNull: true, defaultValue: null}, // patient_num, 病历号
- patient_id: {type: Sequelize.STRING(32), allowNull: true, defaultValue: null}, // patient_id, 患者key
- accession_num: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // accession_num, 检查号
- hopitalized_no: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // hopitalized_no, 住院号
- bed_no: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // bed_no, 病床号
- studyid: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // studyid, 检查id
- studyuid: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // studyuid, studyuid
- study_id: {type: Sequelize.STRING(100), allowNull: true, defaultValue: null}, // study_id, 检查key
- exam_class: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // exam_class, 检查类别
- exam_project: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // exam_project, 检查项目
- exam_datetime: {type: Sequelize.STRING(100), allowNull: true, defaultValue: null}, // exam_datetime, 检查时间
- exam_status: {type: Sequelize.INTEGER(10), allowNull: true, defaultValue: 1}, // exam_status, 检查状态\r\n1 登记\r\n2 登记完成\r\n3 影像到达\r\n7 写报告\r\n8 审核报告\r\n9 确认报告
- report_result: {type: Sequelize.STRING(10), allowNull: true, defaultValue: null}, // report_result, 检查结果 1阴性 2阳性
- report_status: {type: Sequelize.STRING(50), 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 确认报告
- pay_status: {type: Sequelize.STRING(10), allowNull: true, defaultValue: '0'}, // pay_status, 支付状态 0未支付 1已支付
- status: {type: Sequelize.STRING(255), allowNull: true, defaultValue: '1'}, // status, 删除状态 0 禁用 1 正常
- urgent: {type: Sequelize.STRING(255), allowNull: true, defaultValue: '0'}, // urgent, 是否急诊 0 否 1是
- severe: {type: Sequelize.STRING(255), allowNull: true, defaultValue: '0'}, // severe, 重症标识 0 否 1 是
- film_type: {type: Sequelize.STRING(255), allowNull: true, defaultValue: '2'}, // film_type, 胶片属性:0 未定义 1传统胶片 2电子胶片
- clin_symp: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // clin_symp, 症状
- del_datetime: {type: Sequelize.DATE, allowNull: true, defaultValue: null}, // del_datetime, 删除时间
- del_doctor_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // del_doctor_id, 删除医师ID
- del_doctor_name: {type: Sequelize.STRING(100), allowNull: true, defaultValue: null}, // del_doctor_name, 删除医师姓名
- patient_area: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // patient_area, 病区
- sex: {type: Sequelize.STRING(32), allowNull: true, defaultValue: null}, // sex, 患者性别
- age: {type: Sequelize.STRING(32), allowNull: true, defaultValue: null}, // age, 患者年龄
- birthday: {type: Sequelize.STRING(32), allowNull: true, defaultValue: null}, // birthday, 患者生日
- exam_sub_class: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // exam_sub_class, 检查子类
- body_part: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // body_part, 检查部位
- device_name: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // device_name, 设备名称
- application_department: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // application_department, 申请科室
- application_doctor: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // application_doctor, 申请医生
- clin_diag: {type: Sequelize.STRING(1000), allowNull: true, defaultValue: null}, // clin_diag, 临床诊断
- out_patient: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // out_patient, 门诊号
- ext: {type: Sequelize.JSON, allowNull: true, defaultValue: null}, // ext,
- delivery_doctor: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // delivery_doctor, 送诊医生
- push_api: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // push_api, 0 推送失败 1推送成功
- api_message: {type: Sequelize.STRING(500), allowNull: true, defaultValue: null}, // api_message 失败返回信息
- flag: {type: Sequelize.INTEGER(11), allowNull: false, defaultValue: 0}, // flag 标识
- }, {
- freezeTableName: true,
- charset: 'utf8',
- indexes:[
- {fields : ['institution_id', 'flag']},
- {fields : ['createdAt']}
- ],
- });
- Exams.sync({ force: false }).then(function() {});
- export default Exams;
|