Studies.js 2.2 KB

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