/* * @Author: fuyu * @Date: 2021-03-22 19:10:00 * @LastEditors: fuyu * @LastEditTime: 2021-03-23 10:37:43 * @FilePath: /202103/code/test/tmp/Studies.js */ const Sequelize = require('sequelize'); import sequelize from './db/sequelize'; /** * 患者信息 */ // primaryKey: true // defaultValue: null const Studies = sequelize.define('studies', { id: {type: Sequelize.STRING(32), allowNull: false, primaryKey: true}, // id, studyuid: {type: Sequelize.STRING(200), allowNull: false, defaultValue: ''}, // studyuid, patient_id: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // patient_id, 患者id studyid: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // studyid, accession_num: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // accession_num, 科室检查号 studydate: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // studydate, modality: {type: Sequelize.STRING(255), allowNull: true, defaultValue: null}, // modality, status: {type: Sequelize.INTEGER(11), allowNull: true, defaultValue: null}, // status, patient_age: {type: Sequelize.STRING(20), allowNull: true, defaultValue: null}, // patient_age, institution_name: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // institution_name, 机构名称 institution_id: {type: Sequelize.STRING(200), allowNull: true, defaultValue: null}, // institution_id, ext: {type: Sequelize.JSON, allowNull: true, defaultValue: null}, // ext, exam_id: {type: Sequelize.STRING(32), allowNull: true, defaultValue: null}, // exam_id, weight: {type: Sequelize.STRING(20), allowNull: true, defaultValue: null}, // weight, pregnancy: {type: Sequelize.STRING(100), allowNull: true, defaultValue: ''}, // pregnancy, partExamined: {type: Sequelize.STRING(50), allowNull: true, defaultValue: null}, // partExamined, studyDescribe: {type: Sequelize.STRING(100), allowNull: true, defaultValue: null}, // studyDescribe, flag: {type: Sequelize.INTEGER(11), allowNull: false, defaultValue: 0}, // flag 是否请求成功 0默认 1请求成功 2 请求中 3 第一次失败 4第2次失败 9失败 }, { freezeTableName: true, charset: 'utf8', }); Studies.sync({ force: false }).then(function() {}); export default Studies;