Compare commits

..

448 Commits

Author SHA1 Message Date
hang 79ffa3e29a 修改国际化批量提交触发 更新json 以及内存字典 2023-06-28 17:59:25 +08:00
hang db0319bfba 修改批量添加接口 2023-06-28 17:34:07 +08:00
hang 747ad313e6 批量添加国际化接口 2023-06-28 17:29:03 +08:00
hang 4f5b7be7b8 增加 国际化修改,触发更新json文件 2023-06-28 16:22:28 +08:00
hang e3b9576a2d Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-28 16:04:31 +08:00
hang 0dcd74388f 增加前端国际化刷新查询接口 2023-06-28 16:04:24 +08:00
he 302f99172f 修改 2023-06-28 14:54:03 +08:00
he 05adb5ee84 修改 2023-06-28 14:51:29 +08:00
he 013f63b52f 修改 2023-06-28 14:27:25 +08:00
he 640c28a260 修改 2023-06-28 14:27:03 +08:00
he 2c06dfb553 修改 2023-06-28 14:26:40 +08:00
he 63ae52d99c Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-28 14:14:19 +08:00
he 03026a84c7 修改 2023-06-28 14:14:07 +08:00
hang fd33e4c3d4 漏提交 2023-06-28 14:12:07 +08:00
hang 4606b3980c Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-28 14:10:39 +08:00
hang be6affb2c6 修改国际化查询 2023-06-28 14:10:31 +08:00
he b75fc89011 修改 2023-06-28 14:00:44 +08:00
he 5849309dad Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-28 13:56:41 +08:00
he 02dd9aca32 修改 2023-06-28 13:56:11 +08:00
hang 4c4905e60b 修改hospital 2023-06-28 11:59:23 +08:00
hang c63251b832 修改国际化 2023-06-28 10:03:29 +08:00
hang 808ade6e8d 编译错误提交 2023-06-28 09:35:00 +08:00
hang 73fb523b3d Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-28 09:24:06 +08:00
hang 0c56b55c2a 修改统计列表错误 2023-06-28 09:23:58 +08:00
he e66b56af58 修改一般 2023-06-28 09:20:38 +08:00
he a718aa9c69 修改 2023-06-28 09:14:08 +08:00
he 49749b3f59 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-27 18:05:21 +08:00
he 045c6bfc9f 修改 2023-06-27 18:05:00 +08:00
hang 91a6f20dba 去掉hangfire 增加quartZ 方便部署,免得需要两个数据库 2023-06-27 17:04:14 +08:00
hang 4eb5c97725 修改国际化表 2023-06-27 16:38:20 +08:00
hang 978b230f00 修改请求方式 2023-06-27 16:08:08 +08:00
hang 9d2632106c Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-27 16:05:11 +08:00
hang dd73415c00 增加版本号限制 2023-06-27 16:05:07 +08:00
he f0635ba323 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-27 16:03:41 +08:00
he 38205b3b97 修改 2023-06-27 16:03:16 +08:00
hang ae7306a3ef 发布日志遗漏 2023-06-27 16:00:47 +08:00
hang 5448216e7a 系统发布日志功能 2023-06-27 16:00:20 +08:00
hang 4f111a710d Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-27 15:22:18 +08:00
hang f5df39a971 修改统计查询 2023-06-27 15:22:11 +08:00
he 1866257ff5 修改 2023-06-26 17:55:43 +08:00
he 8d9fbbf7e9 修改 2023-06-26 17:02:03 +08:00
he bcd87dfa6d 修改 2023-06-26 16:33:27 +08:00
he 653aca500f Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-26 16:31:33 +08:00
he ca36fd35a6 修改 2023-06-26 16:30:58 +08:00
hang 260b2ad5c9 修改 swagger 提示 2023-06-26 10:48:47 +08:00
hang 230413a5cc 修改命名 2023-06-26 10:33:38 +08:00
hang d9618472cb Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-26 10:28:39 +08:00
hang 9d96789302 修改统计 2023-06-26 10:28:29 +08:00
he 0a69979417 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-26 09:31:30 +08:00
he ce21c72f37 代码修改 2023-06-26 09:31:14 +08:00
hang b4ade5e956 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-25 09:22:43 +08:00
hang c79f387af2 同步 2023-06-25 09:22:27 +08:00
he 9171a62979 修改 2023-06-21 15:49:40 +08:00
he 793704c111 修改 2023-06-21 15:44:10 +08:00
he 0cb5c8ca94 修改 2023-06-21 15:41:55 +08:00
he ca5f50586b 修改 2023-06-21 15:25:23 +08:00
he 6f09c10bd7 修改 2023-06-21 15:06:03 +08:00
he 8205f33ec6 修改 2023-06-21 14:51:15 +08:00
he 5360c577af 修改 2023-06-21 14:01:49 +08:00
he ea48fcac64 修改 2023-06-20 17:09:59 +08:00
he fbc639030a 修改 2023-06-20 15:46:48 +08:00
he eef042b469 修改 2023-06-20 13:17:36 +08:00
he d34bf1ee7d 修改 2023-06-20 10:13:34 +08:00
he 6987f4be83 修改 2023-06-19 16:24:47 +08:00
he 1b443af123 修改 2023-06-19 16:19:15 +08:00
he aa100c2383 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-19 15:45:35 +08:00
he e3541d78ce 修改 2023-06-19 15:45:29 +08:00
hang c0b973370c Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-19 15:35:20 +08:00
hang 129419df9d 修改排序 2023-06-19 15:35:16 +08:00
he ac635c4b38 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-19 14:39:35 +08:00
he f05f7168ac 代码修改 2023-06-19 14:39:17 +08:00
hang 21a5c25760 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-19 10:59:42 +08:00
hang 756b44db5e 修改机构名字查询 2023-06-19 10:59:37 +08:00
he 38538ca358 修改 2023-06-16 17:19:53 +08:00
he e22b019147 代码修改 2023-06-16 17:18:47 +08:00
hang 39fab36541 修改查询接口 2023-06-16 16:38:17 +08:00
hang b96a1dcefc 修改列表展示 2023-06-16 15:34:44 +08:00
hang 4ab56202f0 修改返回列表信息 2023-06-16 14:30:21 +08:00
hang 9baa6e3c85 放开登录限制 2023-06-16 13:35:39 +08:00
hang 300b4582ec x 2023-06-16 11:16:25 +08:00
hang 3cdd9b6af2 修改列sql 2023-06-16 11:16:02 +08:00
hang 355d71769a 国际化导致挤账号功能失败 2023-06-15 12:03:55 +08:00
hang 851f785f50 修改统计 2023-06-14 18:20:08 +08:00
hang c462dbb745 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-14 14:38:31 +08:00
hang 5706fea2eb 修改reviewer 2023-06-14 14:38:23 +08:00
he c403951050 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-14 13:48:06 +08:00
he 214e425796 代码修改 2023-06-14 13:47:47 +08:00
hang 2ea2c037e8 数据库异常处理 2023-06-14 13:35:46 +08:00
hang a20ed9c876 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-14 09:54:01 +08:00
hang d995cc01bc 增加异常处理 2023-06-14 09:52:30 +08:00
he 3643693bde Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-14 09:45:47 +08:00
he 928c3ea3c2 修改 2023-06-14 09:45:20 +08:00
hang 779b07b1b5 修改限制用户中间件发布 2023-06-13 16:56:13 +08:00
hang 2aea40d26f 测试html修改 2023-06-13 11:56:07 +08:00
hang 7a2a05063b 修改邮件模板 2023-06-13 11:43:14 +08:00
hang fa58ac7419 重阅申请表 增加TrialId 字段冗余 方便查询 2023-06-13 11:11:47 +08:00
hang 44ad83790d 修改邮件模板和统计 2023-06-12 17:12:28 +08:00
hang 48ede05926 重新发布 2023-06-12 15:23:27 +08:00
hang 50ef2e83ce 优化未阅片数字统计查询 2023-06-12 14:45:12 +08:00
hang 1be72c87f2 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-12 13:34:22 +08:00
hang 961b76fd1e 修改邮件国际化提示语 2023-06-12 13:34:13 +08:00
he bc6a82a7fe Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-12 11:48:18 +08:00
he 1ac81b8f17 代码修改 2023-06-12 11:47:51 +08:00
hang 79e556ac80 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-12 11:07:50 +08:00
hang 50fdea4095 修改项目文档角色过滤 完成邮件url语言 2023-06-12 11:07:39 +08:00
he f77c1f0256 修改 2023-06-09 15:25:16 +08:00
he 9775d3b93f Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-09 15:20:18 +08:00
he 4fb431f3bd 修改 2023-06-09 15:19:21 +08:00
hang e66edbf2c7 删除sql 2023-06-08 11:28:43 +08:00
hang 8828de9456 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-08 10:36:05 +08:00
hang 484ad67152 修改之前的导出国际化 2023-06-08 10:35:57 +08:00
he 97e8ec44cb 修改 2023-06-08 10:29:42 +08:00
he 3454e330f5 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-08 10:10:45 +08:00
he e91af9cea4 代码修改 2023-06-08 10:10:11 +08:00
hang 8e1d2855c6 修改国际化 2023-06-08 09:13:03 +08:00
hang 0e01bd167e 修改项目删除 2023-06-07 18:08:00 +08:00
hang ec4952766e 标准自动生成初始化默认值修改 2023-06-07 17:53:15 +08:00
hang e976de18e0 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-07 11:31:23 +08:00
hang 81f5b47918 修改服务存储切换bug 2023-06-07 11:31:15 +08:00
he 5e7ddc07db Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-07 10:28:50 +08:00
he 11a8e6e565 修改 2023-06-07 10:27:59 +08:00
hang b9f78c5f0b 修改uat 2023-06-07 08:57:27 +08:00
hang af4aec6a69 修改bm重阅影响列表逻辑 2023-06-06 17:18:39 +08:00
hang f8c3064b07 处理生成任务脏数据 2023-06-06 16:08:32 +08:00
hang d3c0e5979a 修改枚举值 2023-06-06 15:11:55 +08:00
hang 43a720e09e 修改枚举值变化 2023-06-06 14:54:05 +08:00
hang 8a232be59f 修改 2023-06-06 14:30:37 +08:00
hang 01018737fd 修改参与类型 2023-06-06 11:54:20 +08:00
hang 0c228fab1f 修改确认 2023-06-06 11:34:11 +08:00
hang 0d0e795faf Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-06 10:10:57 +08:00
hang 76965111fe 修改项目属性 单选变为多选 2023-06-06 10:10:49 +08:00
he 67d2067a28 修改 2023-06-05 18:15:07 +08:00
he 4e63395a35 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-05 16:59:46 +08:00
he 1d85f49a97 修改 2023-06-05 16:59:27 +08:00
hang bcad91dc18 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-05 16:48:31 +08:00
hang d516b8a4dc 修改国际化内容 2023-06-05 16:48:12 +08:00
he 2d651ca51d 修改 2023-06-05 14:57:49 +08:00
he f9b52f9433 修改 2023-06-05 14:38:39 +08:00
he f6f3fcf1d3 修改 2023-06-05 14:35:56 +08:00
he 1d3e324b9a 修改 2023-06-05 14:33:58 +08:00
he 350101091a Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-05 13:37:42 +08:00
he 343360cdbe 修改 2023-06-05 13:37:12 +08:00
hang 739c3ad4cb Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-02 15:35:05 +08:00
hang ed38a863d4 维护sql修改 2023-06-02 15:34:46 +08:00
he 5d797959e3 修改 2023-06-02 14:23:59 +08:00
he 3626d2e1bf 修改 2023-06-02 14:22:44 +08:00
he 7b272a0b21 修改 2023-06-02 12:08:30 +08:00
he cdd0c52182 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-02 10:50:16 +08:00
he 8b490dd4f9 修改 2023-06-02 10:49:37 +08:00
hang f30494ad30 修改国际化 2023-06-02 08:48:14 +08:00
hang 6e6b456115 2023-06-01 17:06:06 +08:00
hang ebc56e5eb7 修改国际化 2023-06-01 16:54:11 +08:00
hang 2b5fb427df 修改国际化 2023-06-01 16:53:38 +08:00
hang 8f62b8cd5f 修改导出模板国际化 2023-06-01 15:51:36 +08:00
hang de673afb9e Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-01 15:38:29 +08:00
hang 8bd4ef169c 上传一致性核查国际化文件 2023-06-01 15:38:22 +08:00
he 59ff0f2ad0 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-01 14:56:02 +08:00
he fd478715f3 修改 2023-06-01 14:55:40 +08:00
hang 8b21f29978 增加字段 2023-06-01 14:21:47 +08:00
hang 367f698348 增加国际化修改 2023-06-01 14:20:46 +08:00
hang bda31f2ba7 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-01 13:23:40 +08:00
hang f9d48272ef 修改入组状态显示问题 2023-06-01 13:23:35 +08:00
he 865412a551 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-06-01 13:20:34 +08:00
he c033ef2d28 修改 2023-06-01 13:19:04 +08:00
hang e1ddb5920f 修改稽查国际化 2023-06-01 10:15:23 +08:00
hang 4f6225047e 删除TNM分期 2023-05-31 18:02:04 +08:00
hang 107e3ec360 修改sql 2023-05-31 17:34:45 +08:00
he 2b766e216c 修改 2023-05-31 16:33:33 +08:00
he 419453a8c5 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-31 16:27:17 +08:00
he 862128abf0 修改 2023-05-31 16:26:51 +08:00
hang 491b0522ab 修改维护sql 2023-05-31 15:54:48 +08:00
hang 5d61780b7c Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-31 14:55:07 +08:00
hang 6bd3956e2e 修改导出国际化 2023-05-31 14:54:27 +08:00
he 3a7963d0f9 修改 2023-05-31 10:45:32 +08:00
he 9cd2c684b5 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-31 10:44:12 +08:00
hang b9a5881333 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-31 10:43:30 +08:00
hang 9bbf81875f 国际化 2023-05-31 10:43:26 +08:00
hang 09a1d06c8d Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-31 10:39:40 +08:00
hang 1e8daafba4 x 2023-05-31 10:38:26 +08:00
he a726021ea9 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-31 10:36:42 +08:00
he 189ed2a22d 提交 2023-05-31 10:36:02 +08:00
he b03397ca87 修改 2023-05-31 10:30:26 +08:00
hang d9bf39acb0 稽查新增编辑 接口修改 2023-05-31 10:22:00 +08:00
hang 21b68e6bb9 修改稽查 2023-05-31 10:09:29 +08:00
hang aa15145765 修改重阅申请 不符合条件,以异常的方式抛出 2023-05-30 11:21:31 +08:00
hang c6b7902eca Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-30 09:40:38 +08:00
hang 72d60bea62 修改退回影响列表 2023-05-30 09:40:20 +08:00
he 1239b1e542 修改 2023-05-29 17:06:13 +08:00
he 420e730003 修改 2023-05-29 09:11:30 +08:00
he 56e682314f 修改 2023-05-26 18:00:03 +08:00
he 8e8fb1cc8c 修改 2023-05-26 17:42:58 +08:00
he cf00e51559 修改 2023-05-26 17:29:35 +08:00
he 8a9b61185e Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-26 17:22:43 +08:00
he ac406ac6f3 修改 2023-05-26 17:22:31 +08:00
hang 9f43bd5294 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-26 16:18:42 +08:00
hang 7b853c74f3 修改bm退回 2023-05-26 16:18:35 +08:00
he 83bd026c4e Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-26 15:08:49 +08:00
he 3fce40b4c9 修改 2023-05-26 15:08:27 +08:00
hang 75056923dc Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-26 14:03:29 +08:00
hang 597d4b7469 去掉临床数据核查状态,签名哪里取消限制 2023-05-26 14:03:18 +08:00
he e7ddec4329 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-26 11:26:19 +08:00
he 5f1a25c2ec 修改 2023-05-26 11:25:58 +08:00
hang 5b8f08f3a3 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-26 11:24:31 +08:00
hang 544ceefef7 修改重阅申请bug 2023-05-26 11:24:14 +08:00
he 33c55db206 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-25 17:14:52 +08:00
he ce12fa0d22 修改 2023-05-25 17:14:40 +08:00
hang 2f50c17320 稽查修改 2023-05-25 16:15:50 +08:00
hang 83b6fe7cb2 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-25 14:18:57 +08:00
hang 63eeb88066 稽查修改代码 2023-05-25 14:18:39 +08:00
he dfeb4204e7 修改 2023-05-25 13:28:16 +08:00
he 2a8f66f360 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-25 10:59:38 +08:00
he d34f047418 修改 2023-05-25 10:59:06 +08:00
hang 56331ea150 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-24 16:10:23 +08:00
hang 482d789870 临床数据接口合并 2023-05-24 16:10:19 +08:00
he 0e6055881a Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-24 15:45:17 +08:00
he f10d1b0a9e 修改 2023-05-24 15:44:59 +08:00
hang a2ef29e75d Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-24 15:44:04 +08:00
hang 6468a6505b 修改稽查 2023-05-24 15:43:56 +08:00
he 0e1655004a 修改 2023-05-24 15:15:31 +08:00
he 26421f78e2 修改 2023-05-24 14:25:58 +08:00
he 22d3d542ae 修改 2023-05-24 11:38:57 +08:00
he 714f48deb7 修改 2023-05-24 11:03:28 +08:00
he dda82466c9 修改 2023-05-24 09:26:55 +08:00
he 1678f9a021 修改 2023-05-23 17:47:03 +08:00
he fc9969570d 修改 2023-05-23 15:20:34 +08:00
he 5c760a83d6 修改 2023-05-23 15:00:46 +08:00
he bed0b41789 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-23 14:55:27 +08:00
he 4859fd301a 修改 2023-05-23 14:55:07 +08:00
hang 957c85d641 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-23 11:27:30 +08:00
hang a1c4c00d1c 阅片标准配置附加评估稽查测试 2023-05-23 11:27:20 +08:00
he 2cd8e25466 修改 2023-05-23 10:58:09 +08:00
he d7829c371f 修改 2023-05-23 10:40:38 +08:00
he 36f236f69f 修改 2023-05-23 10:35:21 +08:00
he 80b877879c 修改 2023-05-23 09:33:17 +08:00
he f698d77719 修改 2023-05-22 18:07:02 +08:00
he bebb76e51a Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-22 17:43:30 +08:00
he af86dd92c5 修改 2023-05-22 17:43:23 +08:00
hang 3ed4d29af3 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-22 17:41:27 +08:00
hang 14f4f66f84 修改 2023-05-22 17:41:17 +08:00
he d4ffe2eadf 修改 2023-05-22 17:09:15 +08:00
he b0c3ba2a11 修改 2023-05-22 16:34:08 +08:00
he 0adf7a5c84 修改 2023-05-22 16:18:02 +08:00
he 2e9a252910 修改 2023-05-22 16:08:35 +08:00
he ecb4854c78 修改 2023-05-22 16:07:07 +08:00
he b8ecc5e591 修改 2023-05-22 16:04:03 +08:00
he 9dc272fd17 修改 2023-05-22 15:39:47 +08:00
he 763430099b 修改 2023-05-22 15:06:34 +08:00
he 28d28cffd7 修改 2023-05-22 14:57:44 +08:00
he 78e9d430bd 修改 2023-05-22 14:37:37 +08:00
he 499fa59b92 修改 2023-05-22 14:19:41 +08:00
he 817164c4f3 修改 2023-05-22 14:15:39 +08:00
he e0ad618d1a 修改 2023-05-22 14:12:20 +08:00
he 9329ef34e2 修改 2023-05-22 14:02:40 +08:00
he 2c7444c15b 修改 2023-05-22 13:56:58 +08:00
he a586b267db 修改 2023-05-22 13:56:08 +08:00
he f665b1f623 修改 2023-05-22 11:56:11 +08:00
he c34425b231 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-22 11:50:34 +08:00
he 7e47e07747 修改 2023-05-22 11:49:54 +08:00
hang 90e1f87fb4 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-22 10:39:28 +08:00
hang 05a9ef9410 修改indication 2023-05-22 10:39:12 +08:00
he c41b6b2eb3 修改 2023-05-19 15:00:18 +08:00
he c8ce49a383 修改 2023-05-19 14:32:18 +08:00
he 919a6c7028 修改 2023-05-19 13:59:42 +08:00
he 8a1a07980d Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-19 11:14:49 +08:00
he 8556f7cdf6 修改 2023-05-19 11:14:40 +08:00
hang 0d82e3e72b Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-19 10:59:45 +08:00
hang 8bbdbc6cf5 修改通用返回 2023-05-19 10:59:41 +08:00
he ac10d4ca70 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-19 10:40:36 +08:00
he 1355688a36 修改 2023-05-19 10:40:29 +08:00
hang 88c8d5e34c Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-19 10:39:20 +08:00
hang b54ebcb0d1 修改附加评估判断 2023-05-19 10:39:16 +08:00
he 3532a8c5c0 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-19 10:28:33 +08:00
he fe28fd355b 修改 2023-05-19 10:28:04 +08:00
hang 9a976022e5 存在附加评估,手动生成任务 2023-05-19 09:31:06 +08:00
hang 240a577361 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-18 15:56:41 +08:00
hang 3851eb0c29 修改影像归档最终提交 2023-05-18 15:56:36 +08:00
he 976f6d8224 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-18 15:46:44 +08:00
he 1461240f27 修改 2023-05-18 15:46:13 +08:00
hang 0c29fcb9bd x 2023-05-18 15:39:05 +08:00
hang a754a4fcc6 允许缩略图为空 2023-05-18 15:27:05 +08:00
hang 0e165a196c 修改路径 2023-05-18 15:09:46 +08:00
hang 53d29fe79d Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-18 14:32:35 +08:00
hang 2854acf146 修改文档上传后不能查看 2023-05-18 14:32:27 +08:00
he 73035a4369 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-18 14:07:55 +08:00
he 1da0435b4e 修改 2023-05-18 14:07:16 +08:00
hang 84ccbe3ac0 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-18 11:35:48 +08:00
hang 4a86ae0bfd 修改重阅申请 2023-05-18 11:35:33 +08:00
he ceb1337cde Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-18 09:49:09 +08:00
he 6013555139 修改 2023-05-18 09:48:49 +08:00
hang 1e533706aa Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-18 09:47:04 +08:00
hang 2fe9e88c52 dicom 影像返回路径 2023-05-18 09:46:50 +08:00
he 2a0b21c8b1 修改 2023-05-17 18:11:49 +08:00
he f8a5e753da 修改 2023-05-17 15:19:26 +08:00
he 559b18ff5a 修改 2023-05-17 14:47:57 +08:00
he b95592db96 修改 2023-05-17 14:18:54 +08:00
he a3c471de38 修改 2023-05-17 13:56:56 +08:00
he 36576d1936 修改 2023-05-17 13:40:10 +08:00
hang e000b7ea6d 动态切换存储中间件修改结束 2023-05-17 11:48:27 +08:00
he 74c3b2c180 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 18:05:25 +08:00
he 0b7878b1c6 修改 2023-05-16 18:05:02 +08:00
hang 8cffbd9901 动态切换存储修改路径 2023-05-16 17:26:47 +08:00
hang d32eae030e Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 17:09:20 +08:00
hang b991e9950f 修改缩略图切换路径 2023-05-16 17:09:15 +08:00
he 683abe0035 修改 2023-05-16 17:02:43 +08:00
he a77eabd379 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 16:56:32 +08:00
he c58913062a Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 16:56:08 +08:00
hang e736fe6557 修改缩略图切换存储 2023-05-16 16:55:55 +08:00
he 43464ee4aa 修改一版 2023-05-16 16:55:40 +08:00
hang 26e246e71a 修改文件路径 2023-05-16 16:38:06 +08:00
hang 98a9a62b2d Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 16:31:34 +08:00
hang 5210684c50 切换存储 2023-05-16 16:31:25 +08:00
he 7ea2dc7176 修改 2023-05-16 15:12:12 +08:00
he a8c5bf8e34 修改一版 2023-05-16 15:03:11 +08:00
he ff3b0db3ea 修改 2023-05-16 14:52:41 +08:00
he e7917d5ee7 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 14:39:27 +08:00
he 2cd3cdaf38 修改 2023-05-16 14:39:12 +08:00
hang d5639a26d6 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 14:26:32 +08:00
hang a13cdae4d2 修改导表裁判标志 2023-05-16 14:26:22 +08:00
he 2d53a9e82c Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 13:55:19 +08:00
he 57c860a643 修改 2023-05-16 13:54:52 +08:00
hang 744230d7ec Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 13:23:11 +08:00
hang 8f4cd8a447 修改数据表导出逻辑 2023-05-16 13:22:24 +08:00
he 9e2d1289c9 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 10:58:48 +08:00
he d05e5ed2c0 修改 2023-05-16 10:58:27 +08:00
hang 070b99d6ef 修改请求方法 2023-05-16 10:37:34 +08:00
hang eae1040695 修改名字 2023-05-16 10:34:18 +08:00
hang 06dde739c3 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-16 10:33:08 +08:00
hang 8875595012 上传 心跳包处理 2023-05-16 10:32:53 +08:00
he 1bb95bd1b5 修改 2023-05-16 10:03:12 +08:00
he 40599918ba 修改 2023-05-15 17:29:05 +08:00
he 1b4483dfa5 修改 2023-05-15 16:53:11 +08:00
he e18987f235 修改 2023-05-15 16:39:54 +08:00
he 817089d81b 修改 2023-05-15 16:35:28 +08:00
he 41883ca5da Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-15 16:17:37 +08:00
he 4d71478d50 修改 2023-05-15 16:17:16 +08:00
hang 43ef5bcdd9 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-15 14:48:13 +08:00
hang 55bd30c24d 修改默认值 2023-05-15 14:48:02 +08:00
he 7447b30892 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-15 10:47:18 +08:00
he 18d4ee0dfa 修改 2023-05-15 10:47:02 +08:00
hang f0be7d2e9e Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-15 10:08:45 +08:00
hang a0747230ac 修改序列 2023-05-15 10:08:33 +08:00
he 1df06fc0ee 修改一版 2023-05-15 09:13:45 +08:00
hang cde58ace66 删除废弃代码 2023-05-11 15:22:42 +08:00
he ece6bb6e0a 修改 2023-05-10 17:07:42 +08:00
he 0d5810a8fb 修改 2023-05-10 16:07:06 +08:00
he 2bae90e339 修改 2023-05-10 15:18:55 +08:00
he 0a994573cd 修改 2023-05-10 14:35:34 +08:00
he e941bd8266 修改 2023-05-10 14:02:13 +08:00
he b167ec794a 修改 2023-05-10 13:56:02 +08:00
he fb3647fc99 修改 2023-05-10 13:45:11 +08:00
he fbe94c0f57 修改 2023-05-09 16:39:22 +08:00
he d87aa2620e 修改 2023-05-09 16:34:32 +08:00
he 83b006c615 修改一版 2023-05-09 15:16:00 +08:00
he 9feba1c570 修改 2023-05-09 09:59:00 +08:00
he 57c4b198f7 修改 2023-05-09 09:33:42 +08:00
he 127b643e44 修改 2023-05-08 17:11:04 +08:00
he 2fbd0b09f6 修改 2023-05-08 17:04:36 +08:00
he 520aa26a11 修改 2023-05-08 15:56:11 +08:00
he d09dae8378 修改 2023-05-08 15:33:45 +08:00
he 8689ac9139 修改 2023-05-08 14:24:22 +08:00
he 212a7ed2b8 修改 2023-05-08 14:23:58 +08:00
he d9b3e56930 修改 2023-05-08 14:23:04 +08:00
he 7fae8de733 修改 2023-05-08 11:23:05 +08:00
he be8af75e61 修改 2023-05-08 11:00:55 +08:00
he b4cf5cd2a3 修改 2023-05-08 09:56:50 +08:00
he 7649e60d28 修改 2023-05-08 09:23:23 +08:00
he 0aa981eea5 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-06 16:11:47 +08:00
he 122b50e114 修改国际化 2023-05-06 16:11:31 +08:00
he 9b6e8feabf Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-06 15:06:23 +08:00
he 73862c10c5 修改 2023-05-06 15:06:06 +08:00
he 63572942ea 修改 2023-05-06 14:05:07 +08:00
he ea6c6c8490 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-06 14:02:53 +08:00
he 11455e6c78 修改 2023-05-06 14:02:38 +08:00
hang f7ed595f7c 修改 2023-05-06 13:39:43 +08:00
he 8b481aaae2 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-06 12:05:31 +08:00
hang a8cff18985 x 2023-05-06 09:54:20 +08:00
hang 39f14c8d11 修改 2023-05-06 09:30:37 +08:00
hang f9a46561e8 修改modality 2023-05-05 17:50:55 +08:00
hang 5a55fea38a Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-05 17:44:04 +08:00
hang 884e03fab5 修改锁 2023-05-05 17:44:00 +08:00
he 584ad2a7c4 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-05 16:12:10 +08:00
he 4abad486d2 修改 2023-05-05 16:11:59 +08:00
hang 1958dca2be 修改bug 2023-05-05 15:53:28 +08:00
hang ba121827ac Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-05 15:41:48 +08:00
hang b946672e9e x 2023-05-05 15:41:44 +08:00
he e21e1488e7 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-05 15:22:31 +08:00
he 3a03eec1ab 修改 2023-05-05 15:22:07 +08:00
hang f9277de9ef IR 申请重阅,仅仅生效的访视任务,PM同意的时候,才生成任务 2023-05-05 14:18:48 +08:00
hang 3b37cec42d 修改 2023-05-05 10:18:50 +08:00
hang 514a8a2d0f Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-05 10:08:49 +08:00
hang 80ad4be4cb 修改bug 2023-05-05 10:08:45 +08:00
he 6da34061da 修改 2023-05-05 10:05:11 +08:00
he 97d5010f0c 国际化修改 2023-05-05 10:04:15 +08:00
he 18dfc3ca37 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-04 16:50:27 +08:00
he 9f27d4ff11 修改 2023-05-04 16:50:04 +08:00
hang f828a7d1e2 修改上传 2023-05-04 15:37:21 +08:00
hang f19febaa6e Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-04 14:52:44 +08:00
hang e344392450 邮件模板国际化 2023-05-04 14:52:33 +08:00
he f9c61cabcc Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-04 13:51:37 +08:00
hang 7ce98a8c81 修改 2023-05-04 13:50:57 +08:00
hang c4860cdb74 修改上传接口 2023-05-04 13:30:09 +08:00
hang 989511ad68 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-05-03 16:09:11 +08:00
hang 5b92110f43 修改锁 2023-05-03 16:09:07 +08:00
hang 431375946b Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-28 17:24:46 +08:00
hang 1a6ffa5d84 修改国际化准备 2023-04-28 17:24:38 +08:00
he bb6744dc6f 修改 2023-04-28 16:18:43 +08:00
he 84973bb441 修改 2023-04-28 16:14:48 +08:00
he 4e8c228b92 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-28 15:15:08 +08:00
he 505ebd2d41 修改 2023-04-28 15:14:57 +08:00
hang 0fd1b52036 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-28 15:01:42 +08:00
hang df4493e5af 修改脑转移统计数字 2023-04-28 15:01:37 +08:00
he 38629114b6 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-28 14:43:02 +08:00
he f43c384a27 修改 2023-04-28 14:42:33 +08:00
hang 5f119d6f0e 登录限制提交 2023-04-28 14:33:39 +08:00
hang 2eecca60f0 修复是否参与评估bug 2023-04-28 14:09:12 +08:00
hang bca9993e68 修改代码 2023-04-28 13:45:08 +08:00
hang 466ac5e03e Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-28 09:43:57 +08:00
hang 9901eb83ad 附加评估判断忽略过滤器 2023-04-28 09:43:53 +08:00
he 9b73522a8e Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-28 09:43:18 +08:00
he d1b5d5fadc 自动计算修改 2023-04-28 09:43:07 +08:00
hang 8c267ec6f4 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-28 09:23:22 +08:00
hang 46c4416434 修改bug 2023-04-28 09:23:12 +08:00
hang c0bd5c9d88 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-27 17:20:46 +08:00
hang df8d4e3afc 修改 2023-04-27 17:20:41 +08:00
he 32deb59df4 修改 2023-04-27 16:36:15 +08:00
he fa92144439 代码修改 2023-04-27 15:44:57 +08:00
he 04cfb2b977 修改提示语 2023-04-27 14:23:04 +08:00
he 7760d85721 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-27 14:07:01 +08:00
he 23cbf79474 修改 2023-04-27 14:06:36 +08:00
hang a86c43d8d9 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-26 18:27:10 +08:00
hang 8c43bcf030 修改影响上传 切换磁盘预提交 2023-04-26 18:27:00 +08:00
he 482a91a08c 修改一版 2023-04-26 16:06:50 +08:00
he d495d03619 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-26 15:52:29 +08:00
he c223244f10 修改 2023-04-26 15:52:00 +08:00
hang 6a7971f314 调整 CriterionNidus ReadingCriterionDictionary 维护sql 修改稽查表配置提交 2023-04-26 09:45:56 +08:00
he 19ebce1c98 修改 2023-04-25 17:16:17 +08:00
he 1f04bdb57a Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-25 16:53:40 +08:00
he 6e1feebc11 修改 2023-04-25 16:53:30 +08:00
hang 43174b37cf 修改 2023-04-25 16:50:51 +08:00
hang a0fe1db962 修改附加评估类型 2023-04-25 16:48:36 +08:00
he 4309ee627a 修改 2023-04-25 15:52:21 +08:00
he 371cc24520 修改 2023-04-25 15:11:08 +08:00
he ac2fbc07dd 国际化修改 2023-04-25 14:37:10 +08:00
he 79133ccde8 代码修改 2023-04-25 14:06:33 +08:00
hang 1d4a2eb1b0 影像存储预提交 2023-04-24 16:09:51 +08:00
he 62a1200cf3 代码修改 2023-04-24 11:27:50 +08:00
he eac6fe52a6 Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api 2023-04-24 10:19:38 +08:00
he bd6a11b77a 维护CriterionNidusTrial 2023-04-24 10:19:00 +08:00
234 changed files with 13818 additions and 2977 deletions
+15 -1
View File
@@ -93,6 +93,7 @@ namespace IRaCIS.Api.Controllers
[FromServices] ITokenService _tokenService, [FromServices] IConfiguration configuration)
{
var returnModel = await _userService.Login(loginUser.UserName, loginUser.Password);
if (returnModel.IsSuccess)
@@ -160,6 +161,17 @@ namespace IRaCIS.Api.Controllers
returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
// 创建一个 CookieOptions 对象,用于设置 Cookie 的属性
var option = new CookieOptions
{
Expires = DateTime.Now.AddMonths(1), // 设置过期时间为 30 分钟之后
HttpOnly = false, // 确保 cookie 只能通过 HTTP 访问
SameSite = Microsoft.AspNetCore.Http.SameSiteMode.None, // 设置 SameSite 属性
Secure = false // 确保 cookie 只能通过 HTTPS 访问
};
HttpContext.Response.Cookies.Append("access_token", returnModel.Data.JWTStr, option);
}
var userId = returnModel.Data.BasicInfo.Id.ToString();
@@ -205,6 +217,8 @@ namespace IRaCIS.Api.Controllers
var token = decodeUrl.Substring(decodeUrl.IndexOf("access_token=") + "access_token=".Length);
var lang = decodeUrl.Substring(decodeUrl.IndexOf("lang=") + "lang=".Length, 2);
var domainStrList = decodeUrl.Split("/").ToList().Take(3).ToList();
var errorUrl = domainStrList[0]+"//"+ domainStrList[2]+ "/error";
@@ -212,7 +226,7 @@ namespace IRaCIS.Api.Controllers
if (!await _userRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd))
{
decodeUrl = errorUrl+ $"?ErrorMessage={System.Web.HttpUtility.UrlEncode("")} ";
decodeUrl = errorUrl+ $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang=="zh"? "": "ErrorThe initialization link has expired. Return")} ";
}
return Redirect(decodeUrl);
@@ -12,6 +12,7 @@ using IRaCIS.Core.Application.Service.Inspection.DTO;
using IRaCIS.Core.Infra.EFCore;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Application.Auth;
using Microsoft.Extensions.Localization;
namespace IRaCIS.Core.API.Controllers.Special
{
@@ -22,11 +23,12 @@ namespace IRaCIS.Core.API.Controllers.Special
{
private readonly ITrialService _trialService;
private readonly ICalculateService _calculateService;
public FinancialChangeController(ITrialService trialService, ICalculateService calculateService
)
private IStringLocalizer _localizer { get; set; }
public FinancialChangeController(ITrialService trialService, ICalculateService calculateService, IStringLocalizer localizer
)
{
_trialService = trialService;
_localizer = localizer;
_trialService = trialService;
_calculateService = calculateService;
}
@@ -124,7 +126,8 @@ namespace IRaCIS.Core.API.Controllers.Special
if (isLock)
{
return ResponseOutput.NotOk("Expenses have been settled and workload can not be reset.");
//---Expenses have been settled and workload can not be reset.
return ResponseOutput.NotOk(_localizer["Financial_ChargeSettled"]);
}
var deleteResult = await _trialWorkloadService.DeleteWorkload(id);
@@ -300,7 +303,8 @@ namespace IRaCIS.Core.API.Controllers.Special
{
if (!ModelState.IsValid)
{
return ResponseOutput.NotOk("Invalid parameter.");
//---Invalid parameter.
return ResponseOutput.NotOk(_localizer["Financial_InvalidParameter"]);
}
return await _calculateService.CalculateMonthlyPayment(param, User.FindFirst("id").Value);
}
@@ -286,7 +286,8 @@ namespace IRaCIS.Core.API.Controllers
!MediaTypeHeaderValue.TryParse(HttpContext.Request.ContentType, out var mediaTypeHeader) ||
string.IsNullOrEmpty(mediaTypeHeader.Boundary.Value))
{
return ResponseOutput.NotOk("不支持的MediaType");
//---不支持的MediaType
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_UnsupportedMedia"));
}
var archiveStudyCommand = new ArchiveStudyCommand() { AbandonStudyId = abandonStudyId, StudyInstanceUid = studyInstanceUid, SubjectVisitId = subjectVisitId };
@@ -295,14 +296,23 @@ namespace IRaCIS.Core.API.Controllers
var startTime = DateTime.Now;
if (_provider.Exists($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}"))
{
return ResponseOutput.NotOk("当前已有人正在上传和归档该检查!");
}
else
if (_provider.Exists($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}") && _provider.Get<Guid>($"StudyUid_{trialId}_{studyInstanceUid}").Value == _userInfo.Id)
{
_provider.Set($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}", _userInfo.Id, TimeSpan.FromMinutes(30));
}
//if (_provider.Exists($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}"))
//{
// //---当前已有人正在上传和归档该检查!
// return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_ArchiveInProgress"));
//}
//else
//{
// _provider.Set($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}", _userInfo.Id, TimeSpan.FromMinutes(30));
//}
//到了接口,代表上传结束了
@@ -370,7 +380,8 @@ namespace IRaCIS.Core.API.Controllers
{
_provider.Remove($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}");
throw new BusinessValidationFailedException("请求异常,请重试!");
//---请求异常,请重试!
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_RequestError"));
}
studyMonitor.FileSize = (decimal)HttpContext.Request.ContentLength;
@@ -741,7 +752,8 @@ namespace IRaCIS.Core.API.Controllers
if (!fileName.EndsWith(".xlsx") && !fileName.EndsWith(".csv") && !fileName.EndsWith(".xls"))
{
throw new BusinessValidationFailedException("支持.xlsx、.xls、.csv格式的文件上传。");
//---支持.xlsx、.xls、.csv格式的文件上传。
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_SupportedFormats"));
}
(serverFilePath, relativePath) = FileStoreHelper.GetTrialCheckFilePath(_hostEnvironment, fileName, trialId);
@@ -881,7 +893,8 @@ namespace IRaCIS.Core.API.Controllers
if (etcCheckList == null || etcCheckList.Count == 0)
{
return ResponseOutput.NotOk("请保证上传数据符合模板文件中的样式,且存在有效数据。");
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_InvalidData"));
}
else
{
@@ -901,7 +914,8 @@ namespace IRaCIS.Core.API.Controllers
if (etcCheckList.Count == 0)
{
return ResponseOutput.NotOk("请保证上传数据符合模板文件中的样式,且存在有效数据。");
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_InvalidData"));
}
}
+28 -2
View File
@@ -86,6 +86,8 @@
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.10" />
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.6.2" />
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.6.2" />
<PackageReference Include="Serilog.AspNetCore" Version="6.0.1" />
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="1.2.0" />
<PackageReference Include="Serilog.Sinks.Email" Version="2.4.0" />
@@ -106,30 +108,54 @@
<Content Update="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\AdminAddUser_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\AdminResetUser_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\AdminResetUser.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\EmailConfigTest.html">
<Content Update="wwwroot\EmailTemplate\SubjectEnrollConfirmOrPDProgress_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialDoctorExistJoin_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialDoctorFirstJoin.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialSiteSurveyReject.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialSiteSurveyReject_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialDoctorExistJoin.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialUserExistJoin_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialUserExistJoin.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\AdminAddUser.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialDoctorFirstJoin.html">
<Content Update="wwwroot\EmailTemplate\TrialDoctorFirstJoin_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\SubjectEnrollConfirmOrPDProgress.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\TrialUserFirstJoin_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\UserOptCommon_US.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="wwwroot\EmailTemplate\UserOptCommon.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
+25 -56
View File
@@ -9,6 +9,10 @@ using IRaCIS.Core.Application.MediatR.Handlers;
using System.Threading.Tasks;
using MassTransit;
using MassTransit.NewIdProviders;
using System.IO;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore;
using IRaCIS.Core.Application.Helper;
namespace IRaCIS.Core.API
{
@@ -50,23 +54,25 @@ namespace IRaCIS.Core.API
.Build();
//// Serilog
SerilogExtension.AddSerilogSetup(enviromentName, host.Services);
Log.Logger.Warning($"当前环境:{enviromentName}");
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
//// Serilog
SerilogExtension.AddSerilogSetup(enviromentName, host.Services);
//缓存项目的状态 匿名化数据
await InitCache(host);
host.Run();
Log.Logger.Warning($"当前环境:{enviromentName}");
}
catch (Exception e)
@@ -75,46 +81,6 @@ namespace IRaCIS.Core.API
Log.Logger.Error(e.InnerException is null ? e.Message + e.StackTrace : e.InnerException?.Message + e.InnerException?.StackTrace);
}
#region Nlog
//var logger = NLog.Web.NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger();
//try
//{
// var ihostBuilder = CreateHostBuilder(args);
// ihostBuilder.UseEnvironment(environment);
// ihostBuilder.ConfigureAppConfiguration((hostContext, config) =>
// {
// //Console.WriteLine(hostContext.HostingEnvironment.EnvironmentName);
// config.AddJsonFile("appsettings.json", false, true)
// .AddJsonFile($"appsettings.{environment}.json", false, true);
// });
// var host = ihostBuilder.Build();
// CacheTrialStatus(host);
// host.Run();
//}
//catch (Exception exception)
//{
// //NLog: catch setup errors
// logger.Error(exception, "Stopped program because of exception");
//}
//finally
//{
// // Ensure to flush and stop internal timers/threads before application-exit (Avoid segmentation fault on Linux)
// NLog.LogManager.Shutdown();
//}
#endregion
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
@@ -133,26 +99,29 @@ namespace IRaCIS.Core.API
//webBuilder.UseSerilog();//在宿主机启动的时候配置serilog,与微软ILogger进行整合
webBuilder.UseStartup<Startup>();
}).UseSerilog()
.UseServiceProviderFactory(new AutofacServiceProviderFactory());//使用Autofac替代本身容器
//ConfigureLogging(logging =>
//{
// logging.ClearProviders();
// logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
//})
//.UseNLog()
// NLog: Setup NLog for Dependency injection;
.UseServiceProviderFactory(new AutofacServiceProviderFactory());
private static async Task InitCache(IHost host)
{
var _repository = host.Services.GetService(typeof(IRepository)) as IRepository;
//初始化 国际化数据,并且监测国际化文件变更
await InternationalizationHelper.InitInternationlizationDataAndWatchJsonFileAsync(_repository);
var _mediator = host.Services.GetService(typeof(IMediator)) as IMediator;
await _mediator.Send(new AnonymizeCacheRequest());
await _mediator.Send(new TrialStateCacheRequest());
}
}
}
+4 -6
View File
@@ -83,12 +83,10 @@ namespace IRaCIS.Core.API
if (_configuration.GetSection("BasicSystemConfig").GetValue<bool>("OpenLoginLimit"))
{
options.Filters.Add<LimitUserRequestAuthorization>();
}
})
.AddNewtonsoftJsonSetup(); // NewtonsoftJson 序列化 处理
services.AddOptions().Configure<SystemEmailSendConfig>( _configuration.GetSection("SystemEmailSendConfig"));
@@ -116,7 +114,7 @@ namespace IRaCIS.Core.API
//services.AddDistributedMemoryCache();
// hangfire 定时任务框架 有界面,更友好~
services.AddhangfireSetup(_configuration);
//services.AddhangfireSetup(_configuration);
// QuartZ 定时任务框架 使用了hangfire 暂时不用,后续需要可以打开,已经配好
services.AddQuartZSetup(_configuration);
@@ -183,7 +181,7 @@ namespace IRaCIS.Core.API
app.UseLogDashboard("/LogDashboard");
//hangfire
app.UseHangfireConfig(env);
//app.UseHangfireConfig(env);
////暂时废弃
//app.UseHttpReports();
@@ -219,8 +217,8 @@ namespace IRaCIS.Core.API
app.UseCors(t => t.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
app.UseIRacisHostStaticFileStore(env);
//app.UseIRacisHostStaticFileStore(env);
app.UseMiddleware<MultiDiskStaticFilesMiddleware>();
app.UseAuthentication();
@@ -14,7 +14,8 @@ namespace IRaCIS.Core.API.Utility
if (string.IsNullOrWhiteSpace(boundary))
{
throw new InvalidDataException("Missing content-type boundary.");
throw new InvalidDataException(
"Missing content-type boundary.");
}
if (boundary.Length > lengthLimit)
@@ -12,8 +12,8 @@ namespace IRaCIS.Core.API
public static void UseIRacisHostStaticFileStore(this IApplicationBuilder app, IWebHostEnvironment _hostEnvironment)
{
var iRaCISDataFolder = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
var iRaCISDataFolder = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
if (!Directory.Exists(iRaCISDataFolder))
{
@@ -26,13 +26,7 @@ namespace IRaCIS.Core.API
RequestPath = $"/{StaticData.Folder.IRaCISDataFolder}",
ServeUnknownFileTypes = true,
DefaultContentType = "application/octet-stream"
// // Set up custom content types - associating file extension to MIME type
//var provider = new FileExtensionContentTypeProvider();
// // Add new mappings
// provider.Mappings[".myapp"] = "application/x-msdownload";
});
});
}
}
}
@@ -1,14 +1,17 @@
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Domain.Share;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.FileProviders.Physical;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Hosting.Internal;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Microsoft.VisualBasic;
using SharpCompress.Common;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
@@ -21,15 +24,22 @@ namespace IRaCIS.Core.API
{
private readonly RequestDelegate _next;
private readonly IWebHostEnvironment _hostingEnv;
private readonly StaticFileOptions _options;
private readonly ILoggerFactory _loggerFactory;
public MultiDiskStaticFilesMiddleware(RequestDelegate next, IWebHostEnvironment hostingEnv, StaticFileOptions options, ILoggerFactory loggerFactory)
private string iRaCISDefaultDataFolder = string.Empty;
public MultiDiskStaticFilesMiddleware(RequestDelegate next, IWebHostEnvironment hostingEnv, ILoggerFactory loggerFactory)
{
_next = next;
_hostingEnv = hostingEnv;
_options = options;
_loggerFactory = loggerFactory;
iRaCISDefaultDataFolder = FileStoreHelper.GetIRaCISRootDataFolder(_hostingEnv);
if (!Directory.Exists(iRaCISDefaultDataFolder))
{
Directory.CreateDirectory(iRaCISDefaultDataFolder);
}
}
public async Task Invoke(HttpContext context)
@@ -39,52 +49,137 @@ namespace IRaCIS.Core.API
var isDicomFile = path.Contains($"{StaticData.Folder.DicomFolder}");
var isFind = false;
//先从默认里面去找
if (isIRacisFile)
{
#region
//var defaultFileProvider = new PhysicalFileProvider(iRaCISDefaultDataFolder);
//var staticFileOptions = new StaticFileOptions
//{
// FileProvider = defaultFileProvider,
// RequestPath = $"/{StaticData.Folder.IRaCISDataFolder}",
// ServeUnknownFileTypes = true,
// DefaultContentType = "application/octet-stream"
//};
//var a = defaultFileProvider.GetFileInfo(context.Request.Path).Exists;
//var staticFileMiddleware = new StaticFileMiddleware(_next, _hostingEnv, Options.Create(staticFileOptions), _loggerFactory);
//await staticFileMiddleware.Invoke(context);
#endregion
#region wwwroot ...
var defaultFileProvider = new PhysicalFileProvider(FileStoreHelper.GetIRaCISRootPath(_hostingEnv));
if (defaultFileProvider.GetFileInfo(path).Exists)
{
var actrualPath = defaultFileProvider.GetFileInfo(path).PhysicalPath;
await context.Response.SendFileAsync(new PhysicalFileInfo(new FileInfo(actrualPath)));
return;
}
#endregion
}
//没找到
//dicom影像,从多个文件夹尝试,因为会存在切换磁盘
if (isDicomFile)
{
var defaultRoot = Path.GetPathRoot(iRaCISDefaultDataFolder);
//除默认部署路径的其他路径
var disks = DriveInfo.GetDrives()
.Where(d => d.IsReady && d.DriveType == DriveType.Fixed)/*.Where(t => !t.Name.Contains("C") && !t.Name.Contains("c"))*/
.OrderBy(d => d.AvailableFreeSpace)
.Select(d => d.RootDirectory.FullName)
.ToArray().Where(t=>!t.Contains(defaultRoot));
foreach (var item in disks)
{
var otherFileStoreFolder = Path.Combine(item, _hostingEnv.EnvironmentName);
if (!Directory.Exists(otherFileStoreFolder))
{
continue;
}
var otherFileProvider= new PhysicalFileProvider(otherFileStoreFolder);
if (otherFileProvider.GetFileInfo(path).Exists)
{
var actrualPath = otherFileProvider.GetFileInfo(path).PhysicalPath;
//方式一
await context.Response.SendFileAsync( new PhysicalFileInfo(new FileInfo(actrualPath)));
#region otherFileProvider /{StaticData.Folder.IRaCISDataFolder}
//var otherStaticFileOptions = new StaticFileOptions
//{
// FileProvider = otherFileProvider,
// RequestPath = $"/{StaticData.Folder.IRaCISDataFolder}",
// ServeUnknownFileTypes = true,
// DefaultContentType = "application/octet-stream"
//};
//var staticFileMiddleware = new StaticFileMiddleware(_next, _hostingEnv, Options.Create(otherStaticFileOptions), _loggerFactory);
//await staticFileMiddleware.Invoke(context);
#endregion
return;
}
}
}
// 如果所有磁盘都不存在所请求的文件,则将请求传递给下一个中间件组件。
await _next.Invoke(context);
}
private async Task ServeFileAsync(HttpContext context, IFileInfo fileInfo)
{
var response = context.Response;
response.ContentType = GetContentType(fileInfo.PhysicalPath);
using (var fileStream = fileInfo.CreateReadStream())
{
await fileStream.CopyToAsync(response.Body);
}
}
private string[] GetDisks()
{
// 获取系统中所有可用的磁盘
return DriveInfo.GetDrives()
.Where(d => d.IsReady && d.DriveType == DriveType.Fixed)
.Select(d => d.RootDirectory.FullName)
.ToArray();
}
private static string GetContentType(string path)
{
var provider = new FileExtensionContentTypeProvider();
if (!provider.TryGetContentType(path, out var contentType))
{
contentType = "application/octet-stream";
}
return contentType;
}
//private static string GetContentType(string path)
//{
// var provider = new FileExtensionContentTypeProvider();
// if (!provider.TryGetContentType(path, out var contentType))
// {
// contentType = "application/octet-stream";
// }
// return contentType;
//}
//private async Task ServeFileAsync(HttpContext context, IFileInfo fileInfo)
//{
// var response = context.Response;
// response.ContentType = GetContentType(fileInfo.PhysicalPath);
// using (var fileStream = fileInfo.CreateReadStream())
// {
// await fileStream.CopyToAsync(response.Body);
// }
//}
}
@@ -1,6 +1,7 @@
using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
@@ -12,9 +13,14 @@ namespace IRaCIS.Core.API
{
public class ApiResponseHandler : AuthenticationHandler<AuthenticationSchemeOptions>
{
public ApiResponseHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
public IStringLocalizer _localizer;
public ApiResponseHandler(IOptionsMonitor<AuthenticationSchemeOptions> options,
IStringLocalizer localizer,
ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
{
}
_localizer = localizer;
}
protected override Task<AuthenticateResult> HandleAuthenticateAsync()
{
@@ -24,14 +30,16 @@ namespace IRaCIS.Core.API
{
Response.ContentType = "application/json";
Response.StatusCode = StatusCodes.Status401Unauthorized;
await Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("您无权访问该接口", ApiResponseCodeEnum.NoToken)));
//---您无权访问该接口
await Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk(_localizer["ApiResponse_NoAccess"], ApiResponseCodeEnum.NoToken)));
}
protected override async Task HandleForbiddenAsync(AuthenticationProperties properties)
{
Response.ContentType = "application/json";
Response.StatusCode = StatusCodes.Status403Forbidden;
await Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("您的权限不允许进行该操作",ApiResponseCodeEnum.HaveTokenNotAccess)));
//---您的权限不允许进行该操作
await Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk(_localizer["ApiResponse_Permission"],ApiResponseCodeEnum.HaveTokenNotAccess)));
}
}
@@ -1,6 +1,8 @@
using IRaCIS.Application.Services.BackGroundJob;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Quartz;
namespace IRaCIS.Core.API
{
@@ -8,37 +10,35 @@ namespace IRaCIS.Core.API
{
public static void AddQuartZSetup(this IServiceCollection services, IConfiguration configuration)
{
//services.AddTransient<CacheTrialStatusQuartZJob>();
services.AddTransient<CacheTrialStatusQuartZJob>();
//services.AddQuartz(q =>
//{
// // base quartz scheduler, job and trigger configuration
services.AddQuartz(q =>
{
// base quartz scheduler, job and trigger configuration
// // as of 3.3.2 this also injects scoped services (like EF DbContext) without problems
// q.UseMicrosoftDependencyInjectionJobFactory();
// as of 3.3.2 this also injects scoped services (like EF DbContext) without problems
q.UseMicrosoftDependencyInjectionJobFactory();
// // 基本Quartz调度器、作业和触发器配置
// var jobKey = new JobKey("RegularTrialWork", "regularWorkGroup");
// q.AddJob<CacheTrialStatusQuartZJob>(jobKey, j => j
// .WithDescription("Trial regular work")
// );
// q.AddTrigger(t => t
// .WithIdentity("TrialStatusTrigger")
// .ForJob(jobKey)
// //.StartNow()
// //.WithSimpleSchedule(x => x.WithInterval(TimeSpan.FromSeconds(15))//开始秒数 15s
// // .RepeatForever())//持续工作
// .WithCronSchedule("0 0 0/2 * * ?")//每小时执行一次
// .WithDescription("My regular trial work trigger")
// );
//});
// 基本Quartz调度器、作业和触发器配置
var jobKey = new JobKey("RegularTrialWork", "regularWorkGroup");
q.AddJob<CacheTrialStatusQuartZJob>(jobKey, j => j
.WithDescription("Trial regular work")
);
q.AddTrigger(t => t
.WithIdentity("TrialStatusTrigger")
.ForJob(jobKey)
.WithCronSchedule("0 0 * * * ?")
.WithDescription("My regular trial work trigger")
);
});
//// ASP.NET Core hosting
//services.AddQuartzServer(options =>
//{
// // when shutting down we want jobs to complete gracefully
// options.WaitForJobsToComplete = true;
//});
// ASP.NET Core hosting
services.AddQuartzHostedService(options =>
{
// when shutting down we want jobs to complete gracefully
options.WaitForJobsToComplete = true;
});
}
}
@@ -36,10 +36,10 @@ namespace IRaCIS.Core.API
config.WriteTo.Email(new EmailConnectionInfo()
{
EmailSubject = "系统警告,请速速查看!",//邮件标题
FromEmail = "iracis_grr@163.com",//发件人邮箱
MailServer = "smtp.163.com",//smtp服务器地址
NetworkCredentials = new NetworkCredential("iracis_grr@163.com", "XLWVQKZAEKLDWOAH"),//两个参数分别是发件人邮箱与客户端授权码
Port = 25,//端口号
FromEmail = "test@extimaging.com",//发件人邮箱
MailServer = "smtp.qiye.aliyun.com",//smtp服务器地址
NetworkCredentials = new NetworkCredential("test@extimaging.com", "SHzyyl2021"),//两个参数分别是发件人邮箱与客户端授权码
Port = 465,//端口号
ToEmail = "872297557@qq.com"//收件人
}, restrictedToMinimumLevel: LogEventLevel.Error,
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [ {Level} {ClientIp} {ClientAgent} {TokenUserRealName} {TokenUserType} ] || [path: {RequestPath} arguments: {RequestBody}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine})");
+4 -3
View File
@@ -57,9 +57,10 @@
}
}
},
"UpdateConfig": {
"test": "123456",
"test1": "12345678"
"IRaCISImageStore": {
"SwitchingMode": "RemainingDiskCapacity",
"SwitchingRatio": 80,
"NotificationEmail": "872297557@qq.com"
},
"IRaCISBasicConfig": {
"DoctorCodePrefix": "RE",
@@ -32,7 +32,7 @@
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6;font-size: 16px'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 16px'>
Dear {0} ,
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
Extensive Imaging has generated a user account for you. <br>The account information is as follows:
</div>
<span style="color: #00D1B2"></span>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;font-size: 16px'>
<div>
User ID: {1}
</div>
<div>
Role: {2}
</div>
<div>
Before logging in for the first time, please initialize your account information through this link:
<a href='{3}' style='margin-left:30px;font-size:12px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;font-size: 16px'>
Initialize Account Information
</a>
</div>
</div>
<div style='line-height: 24px;font-size: 16px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -29,7 +29,7 @@
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6;font-size: 16px'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 16px'>
Dear {0} ,
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
Extensive Imaging has reset your password.<br>The account information is as follows:
</div>
<span style="color: #00D1B2"></span>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 12px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;font-size: 16px'>
<div>
User ID: {1}
</div>
<div>
Role: {2}
</div>
<div>
Password: {3}
</div>
</div>
<div style='line-height: 24px;font-size: 16px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -1,27 +0,0 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 18px'>
您好:
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
感谢您使用展影云平台。
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
{0}。
</div>
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
</div>
</div>
</div>
</body>
</html>
@@ -19,7 +19,7 @@
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;font-size: 16px'>
<div style='padding-left: 40px;background: #f6f6f6;font-size: 16px'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 16px'>
Dear Sir or Madam:
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
Thank you for using our IRC imaging system.
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
{0}。
</div>
<div style='line-height: 24px;font-size: 16px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -11,7 +11,7 @@
尊敬的 {0} ,您好:
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
展影医疗作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC阅片相关工作,欢迎您提供指导和建议,非常感谢!
展影医疗作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC阅片相关工作
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
该项目采用电子化工作流,系统及您的账号信息如下:
@@ -41,7 +41,7 @@
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 16px'>
Dear {0},
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
As the IRC service provider of {1} trialProtocol ID is {2}, Extensive Imaging invites you to participate in the independent assessment work of this trial.
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
Digital workflow is implemented for this trial, and your account information is as follows:
</div>
<span style="color: #00D1B2"></span>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;font-size: 16px'>
<div>
Trial ID: {3}
</div>
<div>
Protocol ID: {2}
</div>
<div>
Study Name: {1}
</div>
<div>
User Name: {4}
</div>
<div>
Role: {5}
</div>
<div>
Login URL: {6}
</div>
</div>
<div style='line-height: 24px;font-size: 16px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -44,7 +44,7 @@
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 16px'>
Dear {0},
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
As the IRC service provider of {1}trial (Protocol ID is {2}), Extensive Imaging invites you to participate in the independent assessment work of this trial.
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
Digital workflow is implemented for this trial, and your account information is as follows:
</div>
<span style="color: #00D1B2"></span>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;font-size: 16px'>
<div>
Trial ID: {3}
</div>
<div>
Protocol ID: {2}
</div>
<div>
Study Name: {1}
</div>
<div>
User ID: {4}
</div>
<div>
Role: {5}
</div>
<div>
Before logging in for the first time, please modify your account information through this link:
<a href='{6}' style='margin-left:30px;font-size:16px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
Initialize Account Information
</a>
</div>
</div>
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;font-size: 16px'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -41,7 +41,7 @@
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;font-size: 16px'>
<div style='padding-left: 40px;background: #f6f6f6;font-size: 16px'>
<div style='padding-top: 20px;font-size: 16px'>
<div style='line-height: 40px;font-size: 16px'>
Dear {0} ,
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
The site survey questionnaire you filled in has been rejected. Details are as follows:
</div>
<span style="color: #00D1B2"></span>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;font-size: 16px'>
<div>
Trial ID: {1}
</div>
<div>
Protocol ID: {2}
</div>
<div>
Study Name: {3}
</div>
<div>
Site ID: {4}
</div>
<div>
Site Name: {5}
</div>
<div>
Reason for rejection: {6}
</div>
</div>
<a href='{7}' style='margin-left:60px;font-size:16px;padding: 10px;text-decoration: none;display:{8} ;height: 40px;width: 140px;background: #00D1B2;color:#fff;border-radius: 5px;line-height: 40px;text-align: center;margin-bottom: 100px;font-size: 16px'>
Login & View
</a>
<div style='line-height: 24px;font-size: 16px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -41,7 +41,7 @@
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;font-size: 16px'>
<div style='padding-left: 40px;background: #f6f6f6;font-size: 16px'>
<div style='padding-top: 20px;font-size: 16px'>
<div style='line-height: 40px;font-size: 16px'>
Dear {0},
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
As the IRC service provider of {1} trial (Protocol ID is {2}), Extensive Imaging invites you to participate in IRC-related work of this trial.
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
Digital workflow is implemented for this trial, and your account information is as follows:
</div>
<span style="color: #00D1B2"></span>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;font-size: 16px'>
<div>
Trial ID: {3}
</div>
<div>
Protocol ID: {2}
</div>
<div>
Study Name: {1}
</div>
<div>
User Name: {4}
</div>
<div>
Role: {5}
</div>
<div>
Login URL: {6}
</div>
</div>
<div style='line-height: 24px;font-size: 16px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -11,7 +11,7 @@
尊敬的 {0} ,您好:
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
展影医疗作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC相关工作,欢迎您提供指导和建议,非常感谢!
展影医疗作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC相关工作
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
该项目采用电子化工作流,系统及您的账号信息如下:
@@ -44,7 +44,7 @@
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;font-size: 16px'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 16px'>
Dear {0},
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
As the IRC service provider of {1} trial (Protocol ID is {2}), Extensive Imaging invites you to participate in IRC-related work of this trial.
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
Digital workflow is implemented for this trial, and your account information is as follows:
</div>
<span style="color: #00D1B2"></span>
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;font-size: 16px'>
<div>
Trial ID: {3}
</div>
<div>
Protocol ID: {2}
</div>
<div>
Study Name: {1}
</div>
<div>
User Name: {4}
</div>
<div>
Role: {5}
</div>
<div>
Before logging in for the first time, please modify your account information through this link:
<a href='{6}' style='margin-left:30px;font-size:16px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
Initialize Account Information
</a>
</div>
</div>
<div style='line-height: 24px;font-size: 16px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -8,18 +8,18 @@
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 18px'>
{0}您好:
亲爱的用户 ,
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
感谢您使用展影云平台。
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
{1},验证码是: {2},请在3分钟内输入该验证码,进行后续操作。如非本人操作,请忽略该邮件。
{0},验证码是: {1},请在3分钟内输入该验证码,进行后续操作。如非本人操作,请忽略该邮件。
</div>
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
<div>祝您顺利!/Best Regards</div>
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
<div style="font-size: 14px;">展影医疗</div>
</div>
</div>
</div>
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Title</title>
</head>
<body style='font-family: Times New Roman;padding: 0;margin: 0;'>
<div style='padding-left: 40px;background: #f6f6f6'>
<div style='padding-top: 20px;'>
<div style='line-height: 40px;font-size: 16px'>
Dear Sir or Madam:
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
Thank you for using our IRC imaging system.
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
{0}, the verification code is {1}. Please enter this code within 3 minutes for follow-up operations.
</div>
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
If you are not the intended person, please ignore this email.
</div>
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;font-size: 16px'>
<div>Best regards,</div>
<div style="font-size: 16px;">Extensive Imaging</div>
</div>
</div>
</div>
</body>
</html>
@@ -7,6 +7,7 @@ using IRaCIS.Core.Infra.EFCore;
using IRaCIS.Core.Domain.Models;
using Microsoft.Extensions.Logging;
using Quartz;
using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Application.Services.BackGroundJob
{
@@ -17,36 +18,55 @@ namespace IRaCIS.Application.Services.BackGroundJob
private readonly IRepository<Trial> _trialRepository;
private readonly IEasyCachingProvider _provider;
private readonly ILogger<CacheTrialStatusQuartZJob> _logger;
private readonly IRepository<SystemAnonymization> _systemAnonymizationRepository;
public CacheTrialStatusQuartZJob(IRepository<Trial> trialRepository, IEasyCachingProvider provider,ILogger<CacheTrialStatusQuartZJob> logger)
public CacheTrialStatusQuartZJob(IRepository<Trial> trialRepository, IEasyCachingProvider provider,ILogger<CacheTrialStatusQuartZJob> logger, IRepository<SystemAnonymization> systemAnonymizationRepository)
{
_trialRepository = trialRepository;
_provider = provider;
_logger = logger;
_systemAnonymizationRepository = systemAnonymizationRepository;
}
public Task Execute(IJobExecutionContext context)
public async Task Execute(IJobExecutionContext context)
{
_logger.LogInformation($"开始执行QuartZ定时任务作业");
try
{
var list = _trialRepository.Select(t => new { TrialId = t.Id, TrialStatusStr = t.TrialStatusStr })
.ToList();
await MemoryCacheTrialStatus();
await MemoryCacheAnonymizeData();
list.ForEach(t => _provider.Set(t.TrialId.ToString(), t.TrialStatusStr, TimeSpan.FromDays(1)));
}
catch (Exception e)
{
_logger.LogError($" 查询和缓存过程出现异常"+e.Message);
}
_logger.LogInformation("QuartZ定时任务作业结束");
return Task.CompletedTask;
}
public async Task MemoryCacheTrialStatus()
{
var list = await _trialRepository.Select(t => new { TrialId = t.Id, TrialStatusStr = t.TrialStatusStr })
.ToListAsync();
list.ForEach(t => _provider.Set(t.TrialId.ToString(), t.TrialStatusStr, TimeSpan.FromDays(7)));
}
public async Task MemoryCacheAnonymizeData()
{
var systemAnonymizationList = await _systemAnonymizationRepository.Where(t => t.IsEnable).ToListAsync();
_provider.Set(StaticData.Anonymize.Anonymize_AddFixedFiled, systemAnonymizationList.Where(t => t.IsAdd && t.IsFixed).ToList(), TimeSpan.FromDays(7));
_provider.Set(StaticData.Anonymize.Anonymize_AddIRCInfoFiled, systemAnonymizationList.Where(t => t.IsAdd && t.IsFixed == false).ToList(), TimeSpan.FromDays(7));
_provider.Set(StaticData.Anonymize.Anonymize_FixedField, systemAnonymizationList.Where(t => t.IsAdd == false && t.IsFixed).ToList(), TimeSpan.FromDays(7));
_provider.Set(StaticData.Anonymize.Anonymize_IRCInfoField, systemAnonymizationList.Where(t => t.IsAdd == false && t.IsFixed == false).ToList(), TimeSpan.FromDays(7));
}
}
}
@@ -1,8 +1,11 @@
using EasyCaching.Core;
using IRaCIS.Core.Domain.Share;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
@@ -13,7 +16,7 @@ namespace IRaCIS.Core.Application.Filter;
public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
{
public IStringLocalizer _localizer { get; set; }
private readonly IEasyCachingProvider _provider;
@@ -21,11 +24,12 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
public LimitUserRequestAuthorization(IEasyCachingProvider provider, IUserInfo userInfo, IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig)
public LimitUserRequestAuthorization(IEasyCachingProvider provider, IUserInfo userInfo, IStringLocalizer localizer ,IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig)
{
_provider = provider;
_userInfo = userInfo;
_verifyConfig = verifyConfig;
_localizer = localizer;
}
@@ -43,14 +47,15 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
{
//1、用户登陆的时候,设置缓存
//没有从请求中取到token
if (string.IsNullOrWhiteSpace(_userInfo.UserToken))
{
context.HttpContext.Response.ContentType = "application/json";
context.HttpContext.Response.StatusCode = StatusCodes.Status200OK;
await context.HttpContext.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("当前请求未从Header/Url取到用户Token,请联系开发者")));
//---当前请求未从Header/Url取到用户Token,请联系开发者
//await context.HttpContext.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk(_localizer["LimitUser_AuthTokenMissing"])));
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["LimitUser_AuthTokenMissing"]));
}
//2、在这里取缓存 进行比较 看是否有其他人进行了登陆,如果其他人登陆了,就把之前用户挤掉
@@ -76,7 +81,13 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
context.HttpContext.Response.ContentType = "application/json";
context.HttpContext.Response.StatusCode = StatusCodes.Status403Forbidden;
await context.HttpContext.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk("您的账户在其他地方已登陆,您被迫下线。", ApiResponseCodeEnum.LoginInOtherPlace)));
//---您的账户在其他地方已登陆,您被迫下线。
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["LimitUser_AccountLoggedInElsewhere"], ApiResponseCodeEnum.LoginInOtherPlace));
//await context.HttpContext.Response.WriteAsync(JsonConvert.SerializeObject(ResponseOutput.NotOk(_localizer["LimitUser_AccountLoggedInElsewhere"], ApiResponseCodeEnum.LoginInOtherPlace)));
}
@@ -1,15 +1,24 @@
using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Localization;
using Newtonsoft.Json;
namespace IRaCIS.Core.Application.Filter
{
public class ModelActionFilter : ActionFilterAttribute, IActionFilter
{
public override void OnActionExecuting(ActionExecutingContext context)
public IStringLocalizer _localizer;
public ModelActionFilter(IStringLocalizer localizer)
{
_localizer = localizer;
}
public override void OnActionExecuting(ActionExecutingContext context)
{
if (!context.ModelState.IsValid)
{
@@ -19,7 +28,8 @@ namespace IRaCIS.Core.Application.Filter
.Select(e => e.ErrorMessage)
.ToArray();
context.Result = new JsonResult(ResponseOutput.NotOk("提供给接口的参数无效。" +JsonConvert.SerializeObject( validationErrors)));
//---提供给接口的参数无效。
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["ModelAction_InvalidAPIParameter"] + JsonConvert.SerializeObject( validationErrors)));
}
}
}
@@ -2,6 +2,7 @@
using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
namespace IRaCIS.Core.Application.Filter
@@ -10,10 +11,13 @@ namespace IRaCIS.Core.Application.Filter
{
private readonly ILogger<ProjectExceptionFilter> _logger;
public ProjectExceptionFilter(ILogger<ProjectExceptionFilter> logger)
public IStringLocalizer _localizer;
public ProjectExceptionFilter(IStringLocalizer localizer, ILogger<ProjectExceptionFilter> logger)
{
_logger = logger;
}
_localizer = localizer;
}
public void OnException(ExceptionContext context)
{
//context.ExceptionHandled;//记录当前这个异常是否已经被处理过了
@@ -22,7 +26,8 @@ namespace IRaCIS.Core.Application.Filter
{
if (context.Exception.GetType().Name == "DbUpdateConcurrencyException")
{
context.Result = new JsonResult(ResponseOutput.NotOk("并发更新,当前不允许该操作" + context.Exception.Message));
//---并发更新,当前不允许该操作
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["ProjectException_ConcurrentUpdateNotAllowed"] + context.Exception.Message));
}
if (context.Exception.GetType() == typeof(BusinessValidationFailedException))
@@ -35,7 +40,7 @@ namespace IRaCIS.Core.Application.Filter
}
else
{
context.Result = new JsonResult(ResponseOutput.NotOk(" 程序异常,请联系开发人员。 " + (context.Exception.InnerException is null ? (context.Exception.Message /*+ context.Exception.StackTrace*/)
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["Project_ExceptionContactDeveloper"] + (context.Exception.InnerException is null ? (context.Exception.Message /*+ context.Exception.StackTrace*/)
: (context.Exception.InnerException?.Message /*+ context.Exception.InnerException?.StackTrace*/)), ApiResponseCodeEnum.ProgramException));
}
@@ -3,6 +3,7 @@ using IRaCIS.Core.Domain.Share;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Localization;
using System.Text.RegularExpressions;
using static IRaCIS.Core.Domain.Share.StaticData;
@@ -16,17 +17,18 @@ namespace IRaCIS.Core.Application.Filter
private readonly IEasyCachingProvider _provider;
private readonly IUserInfo _userInfo;
private readonly List<string> _trialOptList=new List<string>();
public IStringLocalizer _localizer;
private readonly List<string> _trialOptList=new List<string>();
public TrialResourceFilter(IEasyCachingProvider provider, IUserInfo userInfo, string trialOpt = null, string trialOpt2 = null, string trialOpt3 = null)
public TrialResourceFilter(IEasyCachingProvider provider, IStringLocalizer localizer , IUserInfo userInfo, string trialOpt = null, string trialOpt2 = null, string trialOpt3 = null)
{
_provider = provider;
_userInfo = userInfo;
//_trialOpt = trialOpt;
_localizer = localizer;
//_trialOpt = trialOpt;
if (!string.IsNullOrWhiteSpace(trialOpt)) _trialOptList.Add(trialOpt.Trim());
if (!string.IsNullOrWhiteSpace(trialOpt)) _trialOptList.Add(trialOpt.Trim());
if (!string.IsNullOrWhiteSpace(trialOpt2)) _trialOptList.Add(trialOpt2.Trim());
if (!string.IsNullOrWhiteSpace(trialOpt3)) _trialOptList.Add(trialOpt3.Trim());
@@ -56,7 +58,8 @@ namespace IRaCIS.Core.Application.Filter
// 后期列举出具体的类型,其他任何用户类型,都不允许操作
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA)
{
context.Result = new JsonResult(ResponseOutput.NotOk("对不起,您的账户没有操作权限。"));
//---对不起,您的账户没有操作权限。
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_NoAccessPermission"]));
return;
}
@@ -94,7 +97,8 @@ namespace IRaCIS.Core.Application.Filter
}
else
{
context.Result = new JsonResult(ResponseOutput.NotOk("正则取请求Refer 中trialId 失败,请联系开发人员核查"));
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
}
}
@@ -137,7 +141,8 @@ namespace IRaCIS.Core.Application.Filter
}
else
{
context.Result = new JsonResult(ResponseOutput.NotOk("正则取请求Refer 中trialId 失败,请联系开发人员核查"));
//---正则取请求Refer 中trialId 失败,请联系开发人员核查
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_ReferTrialIdFailed"]));
}
//使用字符串取 如果是swagger 可能有时取的不对 因为空格的原因
@@ -184,7 +189,8 @@ namespace IRaCIS.Core.Application.Filter
// 项目停止、或者完成 不允许操作
else
{
context.Result = new JsonResult(ResponseOutput.NotOk("本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改"));
//---本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_InterceptedProjectStatusRule"]));
}
@@ -199,10 +205,11 @@ namespace IRaCIS.Core.Application.Filter
{
//如果项目相关接口没有传递trialId 会来到这里,提醒,以便修改
context.Result = new JsonResult(ResponseOutput.NotOk("该接口参数中,没有传递项目编号,请核对。"));
//---该接口参数中,没有传递项目编号,请核对。
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["TrialResource_MissingProjectNumber"]));
}
}
}
}
}
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Application.Services.BusinessFilter
{
@@ -74,7 +75,8 @@ namespace IRaCIS.Application.Services.BusinessFilter
else if(statusCode != 200&&!(objectResult.Value is IResponseOutput))
{
var apiResponse = ResponseOutput.NotOk("程序错误,请联系开发人员。");
//---程序错误,请联系开发人员。
var apiResponse = ResponseOutput.NotOk(StaticData.International("UnifiedAPI_ProgramError"));
objectResult.Value = apiResponse;
objectResult.DeclaredType = apiResponse.GetType();
@@ -114,4 +116,4 @@ namespace IRaCIS.Application.Services.BusinessFilter
return false;
}
}
}
}
@@ -1,7 +1,11 @@
using DocumentFormat.OpenXml.Drawing.Diagrams;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml.Wordprocessing;
using IRaCIS.Application.Contracts;
using IRaCIS.Application.Interfaces;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Domain.Share;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using MiniExcelLibs;
@@ -9,17 +13,22 @@ using MiniExcelLibs.OpenXml;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NPOI.HSSF.UserModel;
using NPOI.XSSF.UserModel;
using SkiaSharp;
using System.IO;
namespace IRaCIS.Core.Application.Service;
public static class ExcelExportHelper
{
//MiniExcel_Export
public static async Task<IActionResult> DataExportAsync(string code, object data, string exportFileNamePrefix, IRepository<CommonDocument> _commonDocumentRepository, IWebHostEnvironment _hostEnvironment, IDictionaryService? _dictionaryService = null, Type? translateType = null, CriterionType? criterionType = null)
public static async Task<IActionResult> DataExportAsync(string code, ExcelExportInfo data, string exportFileNamePrefix, IRepository<CommonDocument> _commonDocumentRepository, IWebHostEnvironment _hostEnvironment, IDictionaryService? _dictionaryService = null, Type? translateType = null, CriterionType? criterionType = null)
{
//判断是否有字典翻译
object translateData = data;
if (_dictionaryService != null && translateType != null)
{
@@ -32,7 +41,7 @@ public static class ExcelExportHelper
var needTranslatePropertyList = translateType.GetProperties().Where(t => t.IsDefined(typeof(DictionaryTranslateAttribute), true))
.SelectMany(c =>
c.GetCustomAttributes(typeof(DictionaryTranslateAttribute), false).Select(f => (DictionaryTranslateAttribute?)f).Where(t => t?.CriterionType == criterionType || t?.CriterionType == null)
.Select(k => new { c.Name, k.DicParentCode ,k.IsTranslateDenpendOtherProperty, k.DependPropertyName,k.DependPropertyValueStr})
.Select(k => new { c.Name, k.DicParentCode, k.IsTranslateDenpendOtherProperty, k.DependPropertyName, k.DependPropertyValueStr })
).ToList();
@@ -61,13 +70,13 @@ public static class ExcelExportHelper
foreach (var needTranslateProperty in needTranslatePropertyList)
{
//翻译的属性依赖其他属性
if(needTranslateProperty.IsTranslateDenpendOtherProperty)
if (needTranslateProperty.IsTranslateDenpendOtherProperty)
{
if (item[needTranslateProperty.DependPropertyName]?.ToString().ToLower() == needTranslateProperty.DependPropertyValueStr.ToLower())
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).FirstOrDefault()?.ValueCN ?? String.Empty;
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t=>data.IsEn_US?t.Value:t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
//普通翻译 或者某一标准翻译
@@ -76,9 +85,9 @@ public static class ExcelExportHelper
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).FirstOrDefault()?.ValueCN ?? String.Empty;
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => data.IsEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
@@ -89,14 +98,15 @@ public static class ExcelExportHelper
newObjList.Add(itemDic);
}
dic[key] = newObjList ;
dic[key] = newObjList;
}
}
data = dic;
//data = dic;
translateData = dic;
}
@@ -110,22 +120,65 @@ public static class ExcelExportHelper
//模板路径
var tplPath = physicalPath;
#region sheet
// 打开模板文件
var templateFile = new FileStream(tplPath, FileMode.Open, FileAccess.Read);
// 获取文件流
var templateStream = new MemoryStream();
templateFile.CopyTo(templateStream);
templateStream.Seek(0, SeekOrigin.Begin);
var workbook = new XSSFWorkbook(templateStream);
int sheetCount = workbook.NumberOfSheets;
if (sheetCount == 2)
{
if (data.IsEn_US)
{
workbook.RemoveSheetAt(0);
}
else
{
workbook.RemoveSheetAt(1);
}
var memoryStream2 = new MemoryStream();
workbook.Write(memoryStream2);
memoryStream2.Seek(0, SeekOrigin.Begin);
templateStream = memoryStream2;
}
// 文件名称 从sheet里面取
fileNmae = workbook.GetSheetName(0);
#endregion
#region MiniExcel
var memoryStream = new MemoryStream();
var memoryStream = new MemoryStream();
var config = new OpenXmlConfiguration()
{
IgnoreTemplateParameterMissing = true,
};
await MiniExcel.SaveAsByTemplateAsync(memoryStream, tplPath, data, config);
await MiniExcel.SaveAsByTemplateAsync(memoryStream, templateStream.ToArray(), translateData, config);
memoryStream.Seek(0, SeekOrigin.Begin);
return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
{
FileDownloadName = $"{exportFileNamePrefix}_{fileNmae.Substring(0, fileNmae.LastIndexOf('.'))}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"
FileDownloadName = $"{exportFileNamePrefix}_{fileNmae/*.Substring(0, fileNmae.LastIndexOf('.'))*/}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"
};
#endregion
@@ -146,10 +199,12 @@ public static class ExcelExportHelper
public static async Task<(MemoryStream,string)> DataExport_NpoiTestAsync(string code, object data, IRepository<CommonDocument> _commonDocumentRepository, IWebHostEnvironment _hostEnvironment, IDictionaryService? _dictionaryService = null, Type? translateType = null, CriterionType? criterionType = null)
public static async Task<(MemoryStream, string)> DataExport_NpoiTestAsync(string code, ExcelExportInfo data, IRepository<CommonDocument> _commonDocumentRepository, IWebHostEnvironment _hostEnvironment, IDictionaryService? _dictionaryService = null, Type? translateType = null, CriterionType? criterionType = null)
{
//判断是否有字典翻译
object translateData = data;
if (_dictionaryService != null && translateType != null)
{
@@ -197,7 +252,7 @@ public static class ExcelExportHelper
{
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).FirstOrDefault()?.ValueCN ?? String.Empty;
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => data.IsEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
}
//普通翻译 或者某一标准翻译
@@ -206,7 +261,7 @@ public static class ExcelExportHelper
var beforeValue = itemDic[needTranslateProperty.Name]?.ToString();
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).FirstOrDefault()?.ValueCN ?? String.Empty;
itemDic[needTranslateProperty.Name] = translateDataList[needTranslateProperty.DicParentCode].Where(t => t.Code.ToLower() == beforeValue?.ToLower()).Select(t => data.IsEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
@@ -223,18 +278,55 @@ public static class ExcelExportHelper
}
data = dic;
//data = dic;
translateData = dic;
}
var (physicalPath, fileName) = await FileStoreHelper.GetCommonDocPhysicalFilePathAsync(_hostEnvironment, _commonDocumentRepository, code);
//模板路径
var tplPath = physicalPath;
#region sheet
// 打开模板文件
var templateFile = new FileStream(tplPath, FileMode.Open, FileAccess.Read);
// 获取文件流
var templateStream = new MemoryStream();
templateFile.CopyTo(templateStream);
templateStream.Seek(0, SeekOrigin.Begin);
var workbook = new XSSFWorkbook(templateStream);
int sheetCount = workbook.NumberOfSheets;
if (sheetCount == 2)
{
if (data.IsEn_US)
{
workbook.RemoveSheetAt(0);
}
else
{
workbook.RemoveSheetAt(1);
}
var memoryStream2 = new MemoryStream();
workbook.Write(memoryStream2);
memoryStream2.Seek(0, SeekOrigin.Begin);
templateStream = memoryStream2;
}
// 文件名称 从sheet里面取
fileName = workbook.GetSheetName(0);
#endregion
#region MiniExcel
var memoryStream = new MemoryStream();
@@ -244,7 +336,7 @@ public static class ExcelExportHelper
IgnoreTemplateParameterMissing = true,
};
await MiniExcel.SaveAsByTemplateAsync(memoryStream, tplPath, data, config);
await MiniExcel.SaveAsByTemplateAsync(memoryStream, tplPath, translateData, config);
memoryStream.Seek(0, SeekOrigin.Begin);
@@ -3,6 +3,8 @@
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infrastructure;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Newtonsoft.Json.Linq;
using System.Text.RegularExpressions;
namespace IRaCIS.Core.Application.Helper;
@@ -93,14 +95,16 @@ public static class FileStoreHelper
if (systemClinicalData == null || systemClinicalData.Path == string.Empty)
{
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, systemClinicalData.Path);
if (!System.IO.File.Exists(filePath))
{
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, systemClinicalData.FileName);
@@ -121,14 +125,16 @@ public static class FileStoreHelper
if (trialClinicalData == null|| trialClinicalData.Path==string.Empty)
{
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, trialClinicalData.Path);
if (!System.IO.File.Exists(filePath))
{
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, trialClinicalData.FileName);
@@ -143,14 +149,16 @@ public static class FileStoreHelper
if (doc == null)
{
throw new BusinessValidationFailedException("数据库没有找到对应的数据模板文件,请联系系统运维人员。");
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileNotFound"));
}
var filePath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, doc.Path);
if (!System.IO.File.Exists(filePath))
{
throw new BusinessValidationFailedException("数据模板文件存储路径上未找对应文件,请联系系统运维人员。");
//---数据模板文件存储路径上未找对应文件,请联系系统运维人员。
throw new BusinessValidationFailedException(StaticData.International("FileStore_TemplateFileStoragePathInvalid"));
}
return (filePath, doc.Name.Trim('/'));
@@ -489,7 +497,12 @@ public static class FileStoreHelper
public static (string PhysicalPath, string RelativePath) GetDicomInstanceFilePath(IWebHostEnvironment _hostEnvironment, Guid trialId, Guid siteId, Guid subjectId, Guid subjectVisitId, Guid studyId, Guid instanceId)
{
var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
#region
//var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
#endregion
var rootPath = Path.Combine(FileStoreHelper.GetBestStoreDisk(_hostEnvironment), StaticData.Folder.IRaCISDataFolder) ;
//加入访视层级 和Data
var path = Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(),
@@ -511,8 +524,64 @@ public static class FileStoreHelper
return (physicalPath, relativePath);
}
public static string GetBestStoreDisk(IWebHostEnvironment _hostEnvironment)
{
var json = File.ReadAllText( Path.Combine(_hostEnvironment.ContentRootPath, "appsettings.json"));
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
int switchingRatio = 80;
try
{
switchingRatio = (int)jsonObject["IRaCISImageStore"]["SwitchingRatio"];
}
catch (Exception e)
{
//---解析Json文件配置出现问题
throw new BusinessValidationFailedException(StaticData.International("SysMon_JsonConfig") + e.Message);
}
//默认存储的路径
var defaultStoreRootFolder = FileStoreHelper.GetIRaCISRootPath(_hostEnvironment);
DriveInfo defaultDrive = new DriveInfo(Path.GetPathRoot(defaultStoreRootFolder));
var drives = DriveInfo.GetDrives().Where(t => !t.Name.Contains("C") && !t.Name.Contains("c"))
.Where(d => d.DriveType == DriveType.Fixed && d.IsReady)
//剩余空间最多的
.OrderByDescending(d => d.AvailableFreeSpace)
//存储空间相同,则按照按照总空间从大到小排序
.ThenByDescending(d => d.TotalSize - d.TotalFreeSpace);
var bestDrive = drives.FirstOrDefault();
var bestStoreRootFolder = string.Empty;
//仅仅只有C 盘
if (bestDrive == null || ((double)(defaultDrive.TotalSize - defaultDrive.TotalFreeSpace) / defaultDrive.TotalSize) * 100 < switchingRatio)
{
bestStoreRootFolder = defaultStoreRootFolder;
}
else
{
bestStoreRootFolder = Path.Combine(bestDrive?.RootDirectory.FullName, _hostEnvironment.EnvironmentName);
}
if (!Directory.Exists(bestStoreRootFolder))
{
Directory.CreateDirectory(bestStoreRootFolder);
}
return bestStoreRootFolder;
}
// 获取医生通用文件存放路径
@@ -0,0 +1,179 @@
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infrastructure;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static BeetleX.Redis.Commands.HSCAN;
using static IRaCIS.Core.Application.Service.Common.SystemMonitor;
namespace IRaCIS.Core.Application.Helper
{
public static class InternationalizationHelper
{
public static string JsonFileFolder = Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources);
private static void VerifyFolder()
{
if (!Directory.Exists(JsonFileFolder) ||
Directory.GetFiles(JsonFileFolder).Any(filePath => Path.GetExtension(filePath).Equals(".json", StringComparison.OrdinalIgnoreCase)))
{
throw new BusinessValidationFailedException("国际化Json文件目录有误");
}
}
public static async Task BatchAddJsonKeyValueAsync(List<BatchAddInternationalizationDto> batchAddDtos)
{
VerifyFolder();
var usJsonPath = Path.Combine(JsonFileFolder, StaticData.En_US_Json);
var cnJsonPath = Path.Combine(JsonFileFolder, StaticData.Zh_CN_Json);
//更新json 文件 同时更新内存缓存的数据
foreach (var filePath in new string[] { usJsonPath, cnJsonPath })
{
var json = await File.ReadAllTextAsync(filePath);
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
// 添加或更新指定的键值对
if (filePath.Contains(StaticData.En_US_Json))
{
foreach (var item in batchAddDtos)
{
jsonObject[item.Code] = item.Value;
StaticData.En_US_Dic[item.Code] = item.Value;
}
}
else
{
foreach (var item in batchAddDtos)
{
jsonObject[item.Code] = item.Value;
StaticData.Zh_CN_Dic[item.Code] = item.Value;
}
}
await File.WriteAllTextAsync(filePath, jsonObject.ToString());
}
}
public static async Task AddOrUpdateJsonKeyValueAsync(string key, string value, string valueCN)
{
VerifyFolder();
var usJsonPath = Path.Combine(JsonFileFolder, StaticData.En_US_Json);
var cnJsonPath = Path.Combine(JsonFileFolder, StaticData.Zh_CN_Json);
//更新json 文件 同时更新内存缓存的数据
foreach (var filePath in new string[] { usJsonPath, cnJsonPath })
{
var json = await File.ReadAllTextAsync(filePath);
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
// 添加或更新指定的键值对
if (filePath.Contains(StaticData.En_US_Json))
{
jsonObject[key] = value;
StaticData.En_US_Dic[key] = value;
}
else
{
jsonObject[key] = valueCN;
StaticData.Zh_CN_Dic[key] = valueCN;
}
await File.WriteAllTextAsync(filePath, jsonObject.ToString());
}
}
public static async Task InitInternationlizationDataAndWatchJsonFileAsync(IRepository _repository)
{
//查询数据库的数据
var toJsonList = await _repository.Where<Internationalization>(t => t.InternationalizationType == 1).Select(t => new
{
t.Code,
t.Value,
t.ValueCN
}).ToListAsync();
//组织成json 文件
var usJsonPath = Path.Combine(JsonFileFolder, StaticData.En_US_Json);
var cnJsonPath = Path.Combine(JsonFileFolder, StaticData.Zh_CN_Json);
//本地静态文件国际化需要
foreach (var tojsonItem in toJsonList)
{
StaticData.En_US_Dic[tojsonItem.Code] = tojsonItem.Value;
StaticData.Zh_CN_Dic[tojsonItem.Code] = tojsonItem.ValueCN;
}
File.WriteAllText(usJsonPath, JsonConvert.SerializeObject(StaticData.En_US_Dic));
File.WriteAllText(cnJsonPath, JsonConvert.SerializeObject(StaticData.Zh_CN_Dic));
//监测Json文件变更 实时刷新数据
WatchJsonFile(usJsonPath);
WatchJsonFile(cnJsonPath);
}
public static void WatchJsonFile(string filePath)
{
if (!File.Exists(filePath))
{
throw new BusinessValidationFailedException("国际化Json文件不存在");
}
FileSystemWatcher watcher = new FileSystemWatcher(Path.GetDirectoryName(filePath), Path.GetFileName(filePath));
watcher.Changed += (sender, e) => LoadJsonFile(filePath);
watcher.EnableRaisingEvents = true;
}
private static void LoadJsonFile(string filePath)
{
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath);
IConfigurationRoot enConfiguration = builder.Build();
foreach (IConfigurationSection section in enConfiguration.GetChildren())
{
if (filePath.Contains(StaticData.En_US_Json))
{
StaticData.En_US_Dic[section.Key] = section.Value;
}
else
{
StaticData.Zh_CN_Dic[section.Key] = section.Value;
}
}
}
}
}
@@ -33,6 +33,7 @@ public static class SendEmailHelper
await smtp.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
await smtp.SendAsync(messageToSend);
await smtp.DisconnectAsync(true);
@@ -42,12 +43,28 @@ public static class SendEmailHelper
catch (Exception ex)
{
throw new Exception("邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员");
//---邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员
throw new Exception(StaticData.International("SendEmail_SendFail"));
}
}
public static async Task<bool> TestEmailConfigAsync(SystemEmailSendConfig _systemEmailConfig)
{
using (var client = new MailKit.Net.Smtp.SmtpClient())
{
await client.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.SslOnConnect);
await client.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
await client.DisconnectAsync(true);
}
return true;
}
public static async Task SendEmailAsync(SMTPEmailConfig sMTPEmailConfig, EventHandler<MessageSentEventArgs>? messageSentSuccess = null)
{
var messageToSend = new MimeMessage();
@@ -62,7 +79,8 @@ public static class SendEmailHelper
if (sMTPEmailConfig.ToMailAddressList.Count == 0)
{
throw new ArgumentException("没有收件人");
//---没有收件人
throw new ArgumentException(StaticData.International("SendEmail_NoRecipient"));
}
else
{
File diff suppressed because it is too large Load Diff
+325 -230
View File
@@ -2,23 +2,65 @@
"test{0}{1}": "英文本地化{0}{1}",
"RequiredAttribute": "{0} is required",
//-------------------------------------------------------------------------------------Reading-----------------------------------------------------------------
// ------------------------------------------------------------_ServiceExtensions--------------------------------------------------------------------
//ApiResponseHandler
"ApiResponse_NoAccess": "You do not have access to this API",
"ApiResponse_Permission": "You do not have permission to do this",
// ------------------------------------------------------------Controllers--------------------------------------------------------------------
//FinancialChangeController
"Financial_ChargeSettled": "Expenses have been settled and workload can not be reset.",
"Financial_InvalidParameter": "Invalid parameter.",
//UploadDownLoadController
"UploadDownLoad_UnsupportedMedia": "Unsupported media type.",
"UploadDownLoad_ArchiveInProgress": "Another user is uploading or archiving this study.",
"UploadDownLoad_InvalidData": "Please ensure that the uploaded data conforms to the style of the template file and contains valid data.",
"UploadDownLoad_RequestError": "Request error, please try again!",
"UploadDownLoad_SupportedFormats": "Supports upload of .xlsx, .xls, and .csv formats.",
// ------------------------------------------------------------_MediatR--------------------------------------------------------------------
//ConsistencyVerificationRequest
"ConsistencyVerification_Tech": "Study Type",
"ConsistencyVerification_Time": "Incorrect time format",
//ConsistencyVerificationHandler
"ConsistencyVerification_Img": "Hello, according to the automatic recognition of this system, the imaging study submitted by the subject in the current visit in the IRC system is as follows:",
"ConsistencyVerification_Of": "Of",
"ConsistencyVerification_ImgC": "Imaging study",
"ConsistencyVerification_EDCA": "Check EDC data, completely consistent, approved",
"ConsistencyVerification_EDCB": "Check EDC data, completely consistent",
"ConsistencyVerification_Auto": "Automatically verified pass",
"ConsistencyVerification_Prob": "The following problems exist:",
"ConsistencyVerification_EdcL": "Image study (EDC missing)",
"ConsistencyVerification_IrcL": "Image study (IRC missing)",
"ConsistencyVerification_Desc": "Description: In order to efficiently solve all the above doubts, please verify the actual image study accurately. Please note that the image date may not be consistent with the actual study date, and multiple modalities of image studys (such as PET-CT) may exist at the same time. After accurate verification, please reply with the correct image study for this visit.",
"ConsistencyVerification_Conf": "According to the imported consistency check data, please confirm the following inconsistent inspection item information of this visit:",
"ConsistencyVerification_Edc": "EDC is lack of:",
"ConsistencyVerification_IrcLi": "IRC is lack of:",
//-------------------------------------------------------------------------------------Reading-----------------------------------------------------------------
//ClinicalDataSetService
"ClinicalDataSet_Apply": "",
"ClinicalDataSet_DupTypeFail": "The same type of clinical data exists. The operation failed.",
//ClinicalQuestionService
"ClinicalQuestion_Repeat": "",
//ReadingClinicalDataService
"ReadingClinicalData_DupTypeFail": "The same type of clinical data exists. The operation failed.",
"ReadingClinicalData_Unchecked": "The current clinical data status is not verified and signing is not allowed!",
//ReadingGlobalTaskService
"ReadingGlobal_NotGlobal": "System call error. The current read is not a global review read.",
//ReadingImageTaskService
"ReadingImage_NotVisit": "System call error. The current read is not a timepoint read.",
"ReadingImage_CantSplit": "The current read is a baseline read, and lesion split is not allowed.",
"ReadingImage_BeSigned": "The current read has already been signed off. Please do not submit it again.",
"ReadingImage_BeSigned": "The current read has already been signed. Please do not submit it again.",
"ReadingImage_Beinvalid": "The current read has already been invalidated, and reading is not allowed anymore.",
"ReadingImage_PresenceReview": "The current subject has a review request that has not been processed and is not allowed to operate",
"ReadingImage_NotaTask": "The coalesced lesions are not from the same timepoint. ",
"ReadingImage_PresenceReview": "The current subject has a re-read request that has not been processed and is not allowed to operate",
"ReadingImage_NotaTask": "The coalesced lesions are not from the same timepoint.",
"ReadingImage_DeleteError": "Other lesions have split from or coalesced into the current lesion. Deletion failed.",
"ReadingImage_Idnotcorrespond": "Failed to add the lesion mark. The Instance ID and Series ID of the image do not match.",
"ReadingImage_IsLymphNotbigger": "The short diameter of this nodal non-target lesion on the current visit is smaller than the value on the previous visit, and the state cannot be set to 'Unequivocal progression'.",
"ReadingImage_NotLymphNotbigger": "The long diameter of this non-nodal non-target lesion on the current visit is smaller than the value on the previous visit, and the state cannot be set to 'Unequivocal progression'.",
"ReadingImage_Twice": "System call error. Questions & answers submitted are duplicated.",
"ReadingImage_MaxQuestion": "According to the imaging charter, the number of the current type of lesion cannot exceed {0}.",
"ReadingImage_MaxQuestion": "According to the imaging charter, the number of {0} cannot exceed {1}.",
"ReadingImage_Maxlesion": "According to the imaging charter, the number of target lesions in the same organ cannot exceed {0}. Please confirm.",
"ReadingImage_Maximum": "{0} can only be repeated {1} times, and it has been repeated {2} times so far.",
"ReadingImage_PCWGMaximum": "According to the imaging charter, the number of baseline lesions at the same location should enter only {0} time. Please confirm.",
@@ -29,7 +71,7 @@
"ReadingImage_TaskFinish": "Please note that all reads of the current subject have been completed.",
"ReadingImage_NeedRest": "You have been continuously reading for {0} hours. Please take a break of {1} minutes before resumption.",
//ReadingJudgeTaskService
"ReadingJudge_SouceIdNull": "System call failed. The Source ID of the global review which is being adjudicated currently is 'null'. ",
"ReadingJudge_SouceIdNull": "System call failed. The Source ID of the global review which is being adjudicated currently is 'null'.",
//ReadingOncologyTaskService
"ReadingOncology_TaskError": "System call error. The current read is not an oncology read.",
"ReadingOncology_Abnormal": "System call exception. The result of adjudication is null",
@@ -44,25 +86,64 @@
"MedicalReview_invalid": "This medical review read has already been invalidated, and the operation failed.",
"MedicalReview_SaveQuestion": "Unable to perform the current operation. Please save the medical review questions first.",
"MedicalReview_NeedSave": "Unable to perform the current operation. Please save the medical review questions and conclusions first.",
"MedicalReview_NotClosed": "Unable to perform the current operation. The current medical inquiry conversation has not been closed.",
"MedicalReview_NotClosed": "Unable to perform the current operation. The current medical query conversation has not been closed.",
"MedicalReview_Finish": "The current medical review is the last one.",
//ReadingMedicineQuestionService
"ReadingMed_QNumDup": "Current question number is repeated",
"ReadingMed_HasSubQ": "This question has sub-question, please delete it first",
"ReadingMed_NoMedQ": "Medical review question has not been added yet. Please add it first before confirming",
"ReadingMed_MedQNumDup": "The display number of the medical imaging review question cannot be duplicated.",
"ReadingMed_ParentNumSmall": "The display number of the parent question should be smaller than that of the child question, please confirm.",
"ReadingMed_VisitQNotConfig": "This review criteria has no medical review questions for 'visit'",
"ReadingMed_GlobalQNotConfig": "The global review read is enabled in the current criterion, but has not configured with medical review questions",
"ReadingMed_ArbitrateQNotConfig": "Adjudication review reading is enabled in the current criterion, but has not configured with medical review questions",
"ReadingMed_TumorQNotConfig": "Oncology reading is enabled in the current criterion, but the oncology medical review question has not been configured",
//UserService
"User_CheckNameOrPw": "Please check the username or password.",
//Repository
"Repository_UpdateError": "Updated data does not exist in the database. ",
"Repository_DeleteError": "Deleted data does not exist in the database.",
//OrganInfoService
"OrganInfo_DuplicateData": "There are duplicate data, operation failed.",
//ReadingCriterionService
"ReadingCriterion_Referenced": "The current criterion has been referenced and cannot be deleted.",
"ReadingCriterion_InUse": "This criterion has been used in the project and cannot be deleted.",
"ReadingCriterion_ArbitratorWithoutJudgment": "There is no referee problem but there is an arbitration object, operation failed.",
//ReadingQuestionService
"ReadingQuestion_IdDup": "Duplicate problem ID.",
"ReadingQuestion_ChildrenExist": "This problem has sub-problems, please delete the sub-problems first.",
"ReadingQuestion_GroupReferenced": "This grouping has been referenced, please delete the referenced problems first.",
"ReadingQuestion_JudgmentSet": "The current question already has a referee criterion set, modification failed.",
"ReadingQuestion_ExcludeWithDependency": "The displayed dependent parent question and the required dependent question are the same, but the answers are mutually exclusive, operation failed.",
"ReadingQuestion_CircularDependency": "Calculation dependency has looped!",
//ReadingPeriodSetService
"ReadingPeriodSet_NameDup": "Review period name duplicate, operation failed",
"ReadingPeriodSet_Global": "Review period name cannot be Global",
"ReadingPeriodSet_AlreadyAdded": "{0} has already added the review period, cannot set it effective.",
"ReadingPeriodSet_TaskCompletedCannotRevoke": "The current criterion has generated reads and the reads have been completed, revoke failed.",
"ReadingPeriodSet_LastVisit": "Last visit.",
//ReadModuleService
"ReadModule_AlreadyAdded": "The current visit has already added a review period.",
"ReadModule_AddGlobalFirst": "Please add global review first.",
"ReadModule_VisitNotFound": "No qualified visit was found.",
"ReadModule_SignedDataCannotDelete": "Clinical data has been signed and cannot be deleted.",
"ReadModule_TumorExists": "The current visit has a tumor review, please delete it first.",
"ReadModule_TaskGenerated": "The current review has generated reads, operation failed.",
//UserWLTemplateService
"UserWLTS_MaxTemplate": "The same user can add a maximum of 10 templates.",
"UserWLTS_NameRepeated": "The template name is repeated",
"UserWLTS_ContentRepeated": "The template content is repeated",
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
//TaskAllocationRuleService
"TaskAllocation_DoctorIdNotFound": "Error, the doctor is account Id was not found in the enrollment table.",
"TaskAllocation_DoctorIdNotFound": "Error, the doctor's account Id was not found in the enrollment table.",
"TaskAllocation_DoctorConfigExists": "The doctor configuration is already available, and continued additions cannot be allowed.",
"TaskAllocation_TaskAssigned": "A task has been assigned to the doctor and it cannot be deleted.",
"TaskAllocation_TaskAssigned": "A read has been assigned to the doctor and it cannot be deleted.",
//TaskConsistentRuleService
"TaskConsistent_ConsistencyConfigExists": "Please configure the doctor for consistency analysis.",
"TaskConsistent_TaskGenerated": "The trial configuration is already available, and no continued additions are allowed.",
"TaskConsistent_MedicalAuditTaskExists": "The standard already has tasks generated by the Subject, and configuration modification is not allowed.",
"TaskConsistent_SignedTaskCannotBeInvalidated": "This standard has generated a consistency analysis task and cannot be deleted.",
"TaskConsistent_MedicalAuditTaskExists": "The criterion already has reads generated by the Subject, and configuration modification is not allowed.",
"TaskConsistent_SignedTaskCannotBeInvalidated": "This criterion has generated a consistency analysis task and cannot be deleted.",
//TaskMedicalReviewRuleService
"TaskMedicalRule_TaskAlreadyAssigned": "The doctor configuration is already available, and continued additions cannot be allowed.",
"TaskMedicalRule_TaskStarted": "A medical review task has been generated.",
@@ -70,133 +151,127 @@
"TaskMedical_DirtyData": "Signed files cannot be set to invalid.",
"TaskMedical_SubjectInOtherArm": "A task is currently assigned to someone else,and it cannot be assigned. Please refresh the list.",
//VisitTaskService
"VisitTask_VisitTask_TaskAlreadyApplied": "The project has not confirmed any of the reading criteria.",
"VisitTask_VisitTask_TaskAlreadyApplied": "The trial has not confirmed any of the review criteria.",
"VisitTask_DoctorConfigNotFound": "The current doctor has begun to do the task of this standard of subject, so assignment cannot be canceled.",
"VisitTask_BackendDataError": "One of the tasks has been assigned to the doctor and is not allowed to be assigned.",
"VisitTask_BackendDataError": "One of the reeads has been assigned to the doctor and is not allowed to be assigned.",
"VisitTask_DirtyData": "Dirty data appears, and the task source field has no value.",
"VisitTask_MissingTaskSource": "The subject had a visit and entered the return process, which has not been verified for consistency and is not allowed to be assigned.",
"VisitTask_InconsistentSubjectStatus": "There is a subject that already has the doctor in another Arm group, it is not allowed to add the doctor to a new group.",
"VisitTask_InconsistentSubjectStatus": "There is a subject that already has the doctor in another Arm group. It is not allowed to add the doctor to a new group.",
"VisitTask_DuplicateDoctorInArm": "There is a subject that already has the doctor in another Arm group, so the futher assignment is not allowed. Please refresh the page to confirm whether the data on the page is expired.",
"VisitTask_DoctorAlreadyInArm": "The assignment of a Subject task cannot be canceled because it has been applied.",
"VisitTask_TaskAlreadyApplied": "The configured doctor cannot be found in the configuration table, and the binding cannot be applied. Please check the data.",
"VisitTask_DoctorConfiguration": "",
"VisitTask_BackendData": "Tasks that have not been completed or have not taken effect are not allowed to request re-reading.",
"VisitTask_UnreadTask": "Tasks that re-read has been applied or approved are not allowed to apply for re-read.",
"VisitTask_NoPMRecheck": "",
"VisitTask_Reapply": "PM does not allow apply for re-read of consistency analysis tasks.",
"VisitTask_ConsistencyAnalysis": "PM only allows apply for re-read that the view type is visit.",
"VisitTask_VisitTypeRestriction": "It is currently an ordered read type, and the subject has visit that has applied for re-read, but has not been processed (project team apply for), so it cannot been applied for continuing re-read at this time.",
"VisitTask_SequentialReading": "It is currently an ordered read type, and the subject has visit that has applied for re-read, but has not been processed, so it cannot been applied for re-read for now.",
"VisitTask_ImageProblem": "It is currently an ordered read type that there is something wrong with the image. The trial team has applied for returning, so it cannot been applied for re-read for now.",
"VisitTask_LastReading": "It is an ordered read type, and only the request for re-readinng by the subject reader after completing the global task for the last time is allowed.",
"VisitTask_LastOncologistRecheck": "",
"VisitTask_LastAdjudicatorRecheck": "",
"VisitTask_IRGlobalRecheck": "",
"VisitTask_IRReapply": "It is an disordered read type, only tasks that IR applies for global and visit read type to re-read are allowed.",
"VisitTask_InvalidReapplyStatus": "The current re-read task state is not in the requested state and cannot be processed. Please refresh the page.",
"VisitTask_ReapplyStatusConflict": "The status of the current task requested to be re-read has been affected by another re-read task. The re-read yes/no operation is not allowed for the task in this state",
"VisitTask_ReReadTaskNotApplied": "Only tasks the read type is visit are allowed to be approved of re-read.",
"VisitTask_ReReadTaskAlreadyAffected": "Do not conform to the PM request and SPM / CPM approve | IR request and PM approve.",
"VisitTask_TaskTypeNotApproved": "The current re-read task state is not in the requested state and cannot be processed. Please refresh the page.",
"VisitTask_NoImageReturn": "",
"VisitTask_NonEffectiveTaskCannotBeReturned": "Only effective and unfinished visit tasks can be returned. Please refresh the page data.",
"VisitTask_NoFurtherReturn": "",
"VisitTask_ConsistencyTaskCannotBeReturned": "The consistency analysis task is not allowed to be set return back.",
"VisitTask_PMOnlyAllowedForReturn": "Only the PM can perform the rollback.",
"VisitTask_UnsupportedTaskType": "Re-read task types are not supported.",
"VisitTask_DoctorConfiguration": "Background data error",
"VisitTask_BackendData": "Reads that have not been completed or have not been effective are not allowed to request re-reading.",
"VisitTask_UnreadTask": "Reads that re-read has been applied or approved are not allowed to apply for re-reading.",
"VisitTask_NoPMRecheck": "Additional review reads do not allow the PM to apply for re-reading",
"VisitTask_Reapply": "PM is not allowed to apply for re-reading of consistency analysis reads.",
"VisitTask_ConsistencyAnalysis": "PM is only allowed to apply for re-reading that the view type is visit.",
"VisitTask_VisitTypeRestriction": "This is chronological read, and the subject has visit that has applied for re-read by PM, but has not been processed, so it cannot been applied for continuing re-read at this time.",
"VisitTask_SequentialReading": "This is chronological read, and the subject has visit that has applied for re-read, but has not been processed, so it cannot been applied for re-read for now.",
"VisitTask_ImageProblem": "This is chronological read, and there is something wrong with the image. PM has applied for returning, so it cannot been applied for re-reading now.",
"VisitTask_LastReading": "This is chronological read, and only the request for re-readinng by the subject reader after completing the global task for the last time is allowed.",
"VisitTask_LastOncologistRecheck": "This is chronological read, and the subject will only be allowed to re-read after IR completing the last oncology read ",
"VisitTask_LastAdjudicatorRecheck": "This is chronological read, and the subject will only be allowed to re-read after IR completing the last adjudication read ",
"VisitTask_IRGlobalRecheck": "This is random read, IR is only allowed to apply for re-reading global and visit reads",
"VisitTask_IRReapply": "This is random read, IR is only allowed to apply for re-reading global and visit reads ",
"VisitTask_InvalidReapplyStatus": "The current re-read status is not requested and cannot be processed. Please refresh the page.",
"VisitTask_ReapplyStatusConflict": "The current re-read status has been affected by another re-read reads. The re-read review operation is not allowed for reads in this state",
"VisitTask_ReReadTaskNotApplied": "Only reads with visit type are allowed to approve of re-read.",
"VisitTask_ReReadTaskAlreadyAffected": "Do not conform to the PM request and SPM / CPM approve , or IR request and PM approve.",
"VisitTask_TaskTypeNotApproved": "The current re-read status is not requested and cannot be processed. Please refresh the page.",
"VisitTask_NoImageReturn": "Additional review reads do not allow PM to apply for re-reading",
"VisitTask_NonEffectiveTaskCannotBeReturned": "Only effective and unfinished visit read can be returned. Please refresh the page data.",
"VisitTask_NoFurtherReturn": "The current visit has been returned to image upload, so continuing to return is not allowed!",
"VisitTask_ConsistencyTaskCannotBeReturned": "The consistency analysis read is not allowed to be set return back.",
"VisitTask_PMOnlyAllowedForReturn": "Only PM can perform the return back.",
"VisitTask_UnsupportedTaskType": "Re-read types are not supported.",
"VisitTask_UndefinedList": "The current user view list is not defined.",
"VisitTask_NoConsistencyReturn": "",
"VisitTask_VisitTypeTaskAllowedForPMOnly": "Only visit task type can be returned by PM.",
"VisitTask_NoConsistencyReturn": "The conformance analysis read cannot be returned back",
"VisitTask_VisitTypeTaskAllowedForPMOnly": "Only read with visit type can be returned by PM.",
// ------------------------------------------------------------Common--------------------------------------------------------------------
//CommonDocumentService
"Document_CodeDuplication": "The Code of the document cannot be repeated.",
"Document_SingleTemplate": "Only one template document is allowed per scenario and standard.",
"Document_SingleTemplate": "Only one template file is allowed per scenario and standard.",
"Document_ TemplateRead": "Failed to read the template content, please try saving the file as docx format!",
//DictionaryService
"Dictionary_DictionaryName": "There is already a dictionary with the name {0}.",
"Dictionary_DictionaryDeletion": "The current dictionary is referenced in the standard and cannot be deleted!",
"Dictionary_SubitemDeletion": "There is child data, direct deletion is not allowed!",
"Dictionary_ResumeReference": "The current entry has been referenced in the reader resume.",
"Dictionary_ProjectReference": "The current entry has been referenced in the project information.",
"Dictionary_StandardReference": "The current entry has been referenced in the reading standard.",
"Dictionary_ProjectReference": "The current entry has been referenced in the trial information.",
"Dictionary_StandardReference": "The current entry has been referenced in the review criteria.",
//ExcelExportService
"ExcelExport_UnsupportedExport": "Currently the standard export is not supported.",
"ExcelExport_UnsupportedExport": "Currently the criterion export is not supported.",
//MailService
"Mail_EmailResetReminder": "[from Extensive Imaging IRC] A reminder about resetting email.",
"Mail_EmailResetReminder": "[From Extensive Imaging IRC] A reminder about resetting the email.",
"Mail_Dear": "Dear {0},",
"Mail_ResettingEmail": "You are resetting an email address.",
"Mail_IRCResettingPassword ": "[from Extensive Imaging IRC] A reminder about resetting your password",
"Mail_ResettingPassword ": "You are resetting the email password ",
"Mail_ImagingIRCReminder": "[from Extensive Imaging IRC] A reminder",
"Mail_IRCProject": "You are participating in the Extensive Imaging IRC project",
"Mail_ProjectParticipationReminder": "[from Extensive Imaging IRC] [{0}] A reminder of the site info collection",
"Mail_CenterResearchReminder": "You are participating in the Site information collection of the IRC Program for Extensive Imaging.",
"Mail_AccountCreationReminder": "[from Extensive Imaging IRC] A reminder about creating an account",
"Mail_AccountPasswordResetReminder": "[from Film IRC] A reminder about resetting account passwords",
"Mail_InvitationEmail": "[from Extensive Imaging IRC][{0}]Invitation",
"Mail_IRCResettingPassword ": "[From Extensive Imaging IRC] A reminder about resetting your password",
"Mail_ResettingPassword ": "You are resetting the email password",
"Mail_ImagingIRCReminder": "[From Extensive Imaging IRC] A reminder",
"Mail_IRCProject": "You are participating in the Extensive Imaging IRC trial",
"Mail_ProjectParticipationReminder": "[From Extensive Imaging IRC] [{0}] A reminder of the Site Survey",
"Mail_CenterResearchReminder": "You are participating in the Site Survey of the Extensive Imaging IRC trial.",
"Mail_AccountCreationReminder": "[From Extensive Imaging IRC] A reminder about creating an account",
"Mail_AccountPasswordResetReminder": "[From Extensive Imaging IRC] A reminder about resetting account passwords",
"Mail_InvitationEmail": "[From Extensive Imaging IRC][{0}]Invitation",
//SystemMonitor
"SysMon_JsonConfig": "Parsing the Json file configuration failed",
// ------------------------------------------------------------Doctor--------------------------------------------------------------------
//DoctorService
"Doctor_DupPhoneOrEmail": "current phone or email number already existed",
"Doctor_DupPhone": "The current phone number already existed!",
"Doctor_DupPhoneOrEmail": "The current tel or email number already existed",
"Doctor_DupPhone": "The current tel number already existed!",
"Doctor_DupEmail": "The current email already existed!",
"Doctor_StandardDuplicateFileTypeError": "This type of file has already been added to the current criterion.",
"Doctor_RequiredDocumentsError": "Resume & Consultant Agreement must be upload ",
"Doctor_RequiredDocumentsError": "Resume & Consultant Agreement must be upload",
// ------------------------------------------------------------Document--------------------------------------------------------------------
//SystemDocumentService
"SystemD_DuplicateFile": "A file of the same type and name already exists in the system.",
"SystemD_CannotDeleteSignedFile": "The document has already been read and signed by a user, and not allowed to be deleted.",
"SystemD_DuplicateFile": "A file with the same type and same name already exists in the system.",
"SystemD_CannotDeleteSignedFile": "The file has already been read and signed by a user, and not allowed to be deleted.",
//TrialDocumentService
"TrialD_DuplicateFileInProject": "A file of the same type with the same name already exists in the trial project .",
"TrialD_DocumentHasAlready": "The document has already been read and signed by a user, and not allowed to be deleted.",
"TrialD_DuplicateFileInProject": "A file with the same type and same name already exists in this trial .",
"TrialD_DocumentHasAlready": "The file has already been read and signed by a user, and not allowed to be deleted.",
"TrialD_FileAlreadySigned": "The file has been signed.",
"TrialD_ObsoleteFile": "Document has been annulled. Signature failed!",
"TrialD_ObsoleteFile": "The file has been revoked. Signature failed!",
//TrialEmailNoticeConfigService
"TrialEmailN_TaskNotSigned": "Before sending the email, the task must have been signed and triggered to complete the corresponding task generation.",
"TrialEmailN_NoRecipient": "The message cannot be sent without the recipient.",
"TrialEmailN_InvalidEmailConfig": "The configuration of the sender mailbox of the trial is wrong, please check it.",
"TrialEmailN_EmailTemplateNotFound": "The email template in the standard scenario of this project cannot be found.",
"TrialEmailN_InvalidEmailConfig": "The configuration of the sender mail of the trial is wrong, please check.",
"TrialEmailN_EmailTemplateNotFound": "The email template in the standard scenario of this trial cannot be found.",
"TrialEmailN_EnrollmentConfirmation": "[Enrollment Confirmation Report] About {0} item {1}Subject",
"TrialEmailN_Enrollment": "The attachment is the enrollment confirmation report, please check it.",
"TrialEmailN_PDReport": "[PD Report] About {0} item {1}Subject",
"TrialEmailN_SubjectDiseaseProgression": "The attachment is the confirmation report of disease progress, please check it.",
"TrialEmailN_SingleBlindedSet": "The configuration of the single and ordered reading is incorrect (there should be no adjudicator configuration), please check!",
"TrialEmailN_SingleBlindedSequenced": "The single and ordered reading, this type of task should not enter the logic here, please contact the background developers to check!",
"TrialEmailN_Enrollment": "The attachment is the Enrollment Confirmation Report, please check.",
"TrialEmailN_PDReport": "[PD Confirmation Report] About {0} item {1}Subject",
"TrialEmailN_SubjectDiseaseProgression": "The attachment is the PD Confirmation Report, please check.",
"TrialEmailN_SingleBlindedSet": "The configuration of the single and chronological read is incorrect (there should be no adjudicator configuration), please check!",
"TrialEmailN_SingleBlindedSequenced": "The single and chronological read, should not enter the logic here, please contact the background developers to check!",
"TrialEmailN_PDProgressEmailTask": "Send PD progress email found problem with the task data!",
"TrialEmailN_DoubleBlindedError": "The adjudication rule processing logic for double and ordered reading is not defined, please contact the business and background developers to check!",
"TrialEmailN_InCons": "",
"TrialEmailN_NoBaseLine": "",
"TrialEmailN_IncompBase": "",
"TrialEmailN_EmailFail": "",
"TrialEmailN_NoReader": "",
"TrialEmailN_NoPDConfig": "",
"TrialEmailN_NoPDTasks": "",
"TrialEmailN_PDNotFinished": "",
"TrialEmailN_PDNoImaging": "",
"TrialEmailN_PDPhaseNotFinished": "",
"TrialEmailN_NoRuleDefined": "",
"TrialEmailN_NoDoubleOrder": "",
"TrialEmailN_NoSendLogicDefined": "",
"TrialEmailN_BlindedSequencedReading": "The configuration of the ordered reading is wrong (should be single or double reading), please check!",
"TrialEmailN_UnblindedSequencedReading": "The configuration of unordered reading is wrong (should be single reading without adjudication, or double reading with adjudication for visiting ), please check!",
"TrialEmailN_InvalidTaskTypeForEmailSending": "Do not send emails for other types of tasks except visit, adjudication and global read. Please check the business logic.",
"TrialEmailN_PDLogicNotDefined": "The standard task has not yet defined the PD acquisition logic, please supplement it after consultation with the business and background developer.",
"TrialEmailN_DoubleBlindedError": "The double and chronological read does not defined the adjudication rule logic, please contact the developers to check!",
"TrialEmailN_InCons": "The trial is not configured with the Enrollment Confirmation!",
"TrialEmailN_NoBaseLine": "There is no baseline visit configured with Enrollment Confirmation and IR readedso email failed to send",
"TrialEmailN_IncompBase": "The baseline reads for enrollment confirmation has not been finished for IR!",
"TrialEmailN_EmailFail": "Email failed to generate manuallyplease contact developer to verify the failure cause",
"TrialEmailN_NoReader": "No IR has finished the baseline read at present!",
"TrialEmailN_NoPDConfig": "The trial is not configured with PD Confirmation!",
"TrialEmailN_NoPDTasks": "There is no baseline visit configured with “PD Confirmation” and IR readedso email failed to send",
"TrialEmailN_PDNotFinished": "The completion status of the latest PD interview and film reading task of the current subject does not meet the sending conditions",
"TrialEmailN_PDNoImaging": "The trial is configured with review period adjudication, but the current subject' s latest visit marked 'PD' have no review period",
"TrialEmailN_PDPhaseNotFinished": "The review period status of the current subject's latest PD visit does not meet the sending conditions",
"TrialEmailN_NoRuleDefined": "The sending logic for adjudication rule is not defined! ",
"TrialEmailN_NoDoubleOrder": "The current trial is not double and chronological read, so the sending condition is not met",
"TrialEmailN_NoSendLogicDefined": "The current trial is not defined sending logic",
"TrialEmailN_BlindedSequencedReading": "The configuration of the chronological read is wrong (should be single or double reading), please check!",
"TrialEmailN_UnblindedSequencedReading": "The configuration of random read is wrong (should be single read without adjudication, or double read with adjudication for visiting ), please check!",
"TrialEmailN_InvalidTaskTypeForEmailSending": "Do not send emails for other type except visit, adjudication and global read. Please check the logic.",
"TrialEmailN_PDLogicNotDefined": "Reads for this criterion has not yet defined the PD logic, please supplement it after consultation with the developer.",
"TrialEmailN_MailboxWrong": "The configuration of the sender mailbox of the trial is wrong, please check it.",
"TrialEmailN_InvalidRecipient": "The trial does not have a valid recipient and the message cannot be sent.",
"TrialEmailN_InvalidRecipient": "The trial does not have a valid recipient, so the message cannot be sent.",
"TrialEmailN_EmailTestMessage": "Trial mail test",
"TrialEmailN_ConfigurationCorrect": "If this email is received, the email configuration is correct.",
"TrialEmailN_InvalidSenderEmailConfig": "The sender configuration is incorrect. Please check whether the server address or authorization code is correct or not.",
// ------------------------------------------------------------Financial--------------------------------------------------------------------
//CalculateService
"Cal_VolDataErr": "Volume reward data error.",
@@ -210,15 +285,14 @@
//TrialRevenuesPriceService
"TRP_AddMeaningful": "Please add meaningful data",
// ------------------------------------------------------------ImageAndDoc--------------------------------------------------------------------
//DicomArchiveService
"DAS_NoAnonCacheData": "The cache data for anonymous config is not obtained, and the upload stops. Please contact the developer for verification.",
"DAS_NoAnonCacheData": "The cache data for anonymous config is not obtained, and the upload stops. Please contact the developer to verify.",
//ImageShareService
"ISS_NoImgToShare": "There are no images to share for the current check.",
"ISS_ResNotExists": " The request resource wasnt found.",
"ISS_SharePwdError": "The shared password is incorrect",
"ISS_ShareExpiration": "Resource sharing expires",
"ISS_NoImgToShare": "There are no images to share for the current study.",
"ISS_ResNotExists": "The request resource wasnt found.",
"ISS_SharePwdError": "The shared password is incorrect.",
"ISS_ShareExpiration": "Resource sharing expires.",
//StudyService
"Study_VisitBeforePrevError": "The current visit check time {0} cannot be earlier than the previous visit check time {1}. Please check whether the check data is correct.",
"Study_VisitAfterSubseqError": "The current visit check time {0} cannot be later than the visit check time {1} .Please check whether the check data is correct.",
@@ -226,197 +300,186 @@
"Study_VisitEndedNotAllowed": "Subject visit is over, and uploading is not allowed!",
"Study_ImgAlreadyUploaded": "Uploading is not allowed above here.The current image check has been uploaded to {1} of subject {0}",
// ------------------------------------------------------------Inspection--------------------------------------------------------------------
//FrontAuditConfigService
"FrontAudit_IdDup": "The identifier is duplicated.",
"FrontAudit_NameDup": "The name is duplicated .",
"FrontAudit_CannotDelSub": "Subclasses existdo not delete.",
"FrontAudit_CannotDelSub": "Subclasses exist, cannot delete.",
//InspectionService
"Inspection_UserDisabled": "The current user has been disabled.",
// ------------------------------------------------------------Institution--------------------------------------------------------------------
//CROService
"CRO_DupName": "CRO with the same name already exists.Please confirm",
"CRO_InProject": "The CRO has participated in the project and cannot be deleted.",
"CRO_DupName": "CRO with the same name already exists. Please confirm.",
"CRO_InProject": "The CRO has participated in the trial and cannot be deleted.",
//HospitalService
"Hospital_DupName": "Hospital with the same name already exists.Please confirm",
"Hospital_SiteAdded": "The current Site has been added to another Hospital",
"Hospital_DupName": "Hospital with the same name already exists. Please confirm.",
"Hospital_SiteAdded": "The current Site has been added to another Hospital.",
"Hospital_HasDoctors": "There are already doctors registered under the hospital's account and cannot be deleted.",
//SiteService
"Site_DupName": "Site with the same name already exists.Please confirm",
"Site_DupName": "Site with the same name already exists. Please confirm.",
"Site_InProject": "This site has been added to the project and cannot be deleted.",
//SponsorService
"Sponsor_DupName": "Sponsor with the same name already exists.Please confirm.",
"Sponsor_InProject": "The sponsor has been added to the project and it is not allowed to delete.",
"Sponsor_DupName": "Sponsor with the same name already exists. Please confirm.",
"Sponsor_InProject": "The sponsor has been added to the trial and it is not allowed to delete.",
// ------------------------------------------------------------Management--------------------------------------------------------------------
//MenuService
"Menu_ParentDupChild": "A child node with the same name already exists under the parent node.",
"Menu_ChildExist": " Child nodes already exists under this node . Delete the child nodes before deleting the node.",
"Menu_ChildExist": "Child nodes already exists under this node . Delete the child nodes before deleting the node.",
//UserService
"User_UsernameExist": "The user name already exists.",
"User_PhoneDup": "A user with the same phone number already exists in this user type.",
"User_EmailDup": "A user with the same email already exists in this user type.",
"User_NewOldPwdSame": "The new password is the same as the old one.",
"User_OldPwdInvalid": "Failed to verify the old password. ",
"User_LegalEmail": "Please input a legal email",
"User_OldPwdInvalid": "Failed to verify the old password.",
"User_LegalEmail": "Please input a legal email.",
"User_VerificationCodeError": "The verification code is wrong.",
"User_VerificationCodeExpired": "The verification code has expired.",
"User_CreateFailed": "Check the email address or contact maintainers. The email fails to be sent and the account cannot be created",
"User_CreateFailed": "Check the email address or contact maintainers. The email fails to be sent and the account cannot be created.",
"User_InvalidEmail": "Please enter a correct E-mail address.",
"User_EmailError": "The email adress is wrong.",
"User_InProject": "The user has participated in the project and cannot be deleted.",
"User_InProject": "The user has participated in the trial and cannot be deleted.",
"User_Disabled": "The user has been disabled.",
//UserTypeService
"UserType_InUse": "User already exists in that user type, and it cannot be deleted.",
// ------------------------------------------------------------QC--------------------------------------------------------------------
//QCCommon
"QCCommon_CannotOperate": "CRC has submitted the image and it cannot be operated.",
"QCCommon_NoPermission": "You are not the current recipient of the quality control task, so no operation authority!",
"QCCommon_CheckTimeEarly": "The current visit check time {0} cannot be earlier than the previous visit check time {1}. Please check whether the check data is correct.",
"QCCommon_CheckTimeLate": "The current visit check time {0} cannot be later than the visit check time {1} .Please check whether the check data is correct.",
"QCCommon_CannotOperate": "CRC has submitted the image. Operation is not allowed.",
"QCCommon_NoPermission": "You are not the current recipient of the image QC. No operation authority!",
"QCCommon_CheckTimeEarly": "The current visit study time {0} cannot be earlier than the previous visit study time {1}. Please check whether the study data is correct.",
"QCCommon_CheckTimeLate": "The current visit study time {0} cannot be later than the visit study time {1} .Please check whether the study data is correct.",
//QCOperationService
"QCOperation_CheckFirst": "Please check the image first and save review questions before inquiry.",
"QCOperation_QuestionExist": "The current visit with unclosed inquiry has been set to allow CRC to reupload the image. After CRC has reuploaded image, please close the original inquiry first and then add a new inquiry.",
"QCOperation_QuestionCannotClose": "CRC has applied for reuploading or QC has agreed to reuploading and to close the inquiry is not allowed. Please do not close the inquiry until the QC rejects the reuploading request or the CRC reuploads the image.",
"QCOperation_CheckFirst": "Please check the image first and save review questions before query.",
"QCOperation_QuestionExist": "The unclosed query of the current visit has been set to approve CRC reupload. After CRC has reuploaded image, please close the original query first and then add a new query.",
"QCOperation_QuestionCannotClose": "CRC has applied for reuploading or QC has agreed to reupload. To close the query is not allowed. Please do not close the query until the QC rejects or the CRC reuploads the image.",
"QCOperation_CloseReason": "Reason for closing:",
"QCOperation_QuestionReplied": "The QC inquiry has been answered.",
"QCOperation_QuestionReplied": "The QC query has been answered.",
"QCOperation_NoPermissionReply": "You do not have permission to reply to the data reconciliation conversation.",
"QCOperation_CannotClose": "The current visit is in the request fallback state, and the inquiry is not allowed to be closed.",
"QCOperation_Reason": "Reason:",
"QCOperation_CannotPass": "The current visit is in the rollback state, and the data reconciliation cannot be set.",
"QCOperation_PassAfterClose": "Please close the data reconciliation inquiry first, and then set the data reconciliation pass.",
"QCOperation_Cannotback": "The current visit has passed the consistency check and cannot be applied for rollback.",
"QCOperation_CRCRollback": "CRC Apples for rollback.",
"QCOperation_CannotClose": "The current visit status is CRC request re-upload. The query is not allowed to be closed.",
"QCOperation_Reason": "Notes:",
"QCOperation_CannotPass": "The current visit is in the return status, and the data reconciliation cannot be set.",
"QCOperation_PassAfterClose": "Please close the data reconciliation query first, and then set the data reconciliation pass.",
"QCOperation_Cannotback": "The current visit has passed the consistency check and cannot be applied for re-upload.",
"QCOperation_CRCRollback": "CRC apples for re-upload.",
"QCOperation_OtherCRC": "Other CRCs have applied for processing. Please refresh the page.",
"QCOperation_PMReject": "PM/APM rejected the data reconciliation rollback.",
"QCOperation_PMReject": "PM/APM rejected the data reconciliation return.",
"QCOperation_NoPermission": "You do not have operation permission.",
"QCOperation_CannotRollback": "If the current visit has not been studied or study has passed, setbacks are not allowed.",
"QCOperation_CannotRollback": "If the current visit has not do reconciliation or has passed, setbacks are not allowed.",
"QCOperation_PMAPMConsistency": "PM/APM agrees to the data reconciliation rollback.",
"QCOperation_NoModifyAfterSubmit": "Once submitted, no modifications are allowed.",
"QCOperation_UnresolvedQCQuery": "This operation is not allowed, because the inquiry of the current visitis is not closed. ",
"QCOperation_UnresolvedQCQuery": "Image query of the current visit is not closed. This operation is not allowed.",
"QCOperation_CrcNoDelete": "The CRC has been committed and cannot be deleted.",
"QCOperation_NoRecipient": "You are not the current recipient of the quality control task, no operation authority!",
"QCOperation_QCImageTaskAlreadyReleased": "The image quality control task of the current visit has been released by the original recipient. You can get it by ",
"pick",
"up\".\"",
"QCOperation_QCTaskNoAccess": "The image quality control task of the current visit has been claimed by other QC, so it is not allowed to pick up.",
"QCOperation_QCConfigFirst": "Please configure the image quality control review question before receiving the image quality control task.",
"QCOperation_NoQC": "The project configuration of image QC process was not check, and the QC Task was not picked up.",
"QCOperation_QCImageTaskAlreadyReleased": "The image QC of the current visit has been released by the original recipient. You can get it by 'claime'.",
"QCOperation_QCTaskNoAccess": "The image quality control task of the current visit has been claimed by other QC, so it is not allowed to claim.",
"QCOperation_QCConfigFirst": "Please configure the image QC questions before claiming any image QC work.",
"QCOperation_NoQC": "The trial configuration of image QC was not check, and the QC Task was not be claimed.",
"QCOperation_InitialAuditPassed": "The first review has passed, continue to receive can not be allowed.",
"QCOperation_NoSingleAudit": "The project is configured for single check, does not meet Submmit State: Submitted or Audit State: pending review/ in review, not allowed to collect.Please refresh the page.",
"QCOperation_NoSingleAudit": "The trial is configured with single image QC , does not meet Submmit State: Submitted or Audit State: pending QC/ in QC, not allowed to collect.Please refresh the page.",
"QCOperation_NoSameReviewer": "The secondary QC cannot be the same person as the primary QC.",
"QCOperation_NoSecondaryAudit": "The project is configured for double check, does not meet Submmit State: Submitted or Audit State: pending review/ in QC review, not allowed to collect.Please refresh the page.",
"QCOperation_NoSecondaryAudit": "The trial is configured withr double image QC , does not meet Submmit State: Submitted or Audit State: pending review/ in QC, not allowed to collect.Please refresh the page.",
"QCOperation_NoTaskAccess": "You are not the current recipient of the quality control task, no operation authority!",
"QCOperation_NoQCFunction": "The project configuration of image QC process was not check, so there is no need to cancel the task function.",
"QCOperation_NoTaskOwner": "The current visiting image QC task has not been claimed by anyoneand cannot been released.",
"QCOperation_DiseaseProgressConfirmation": "Current visit required confirmation of PD. Please process the unsubmitted prior visit before submitting the current visit: {0}.",
"QCOperation_UnsubmittedVisits": " After submitting the current visit, please as soon as possible process any prior visits that have not been submitted: {0}.",
"QCOperation_NoBaselineData": "No clinical data at baseline, confirm submission?",
"QCOperation_NoImageData": "Dicom/ non-dicom image data has not been uploaded. Submission is not allowed.",
"QCOperation_ImagesSubmitted": "The image data for the current visit has been submitted by another CRC.",
"QCOperation_BatchImagesSubmitted": "The image data for visiting is currently submitted in batches, part of which has been submitted by other CRCS.",
"QCOperation_MissingBaselineDate": "The project is configured with the visit base time. However, the subject did not fill in the visit base time, which is not allowed to submit.",
"QCOperation_RemoveItem": "You have been removed from the project and have no operation rights.",
"QCOperation_QCNotClosed": "This operation cannot be performed because the image quality control inquiry has not been closed for the current visit.",
"QCOperation_NoQCNeeded": "The project configuration of image QC process was not check, and no need to set to image quality control pass.",
"QCOperation_QCNotSaved": "Image quality control review question is not saved, and cannot be performed.",
"QCOperation_NotChangePass": "The project configuration of image QC process was double check, so the current image QC task cannot change from the current state to pass.",
"QCOperation_CannotChangeToPass": "The project configuration of image QC process was double check. The current audit state is {0}, which cannot be changed to approved.",
"QCOperation_NoQCNeededNotEnd": "The project configuration of image QC process was not check, and setting image quality control termination is not allowed.",
"QCOperation_CannotChangeToStop": "The project configuration of image QC process was single check, and the current review state is not In Primary QC and cannot be changed to the QC termination.",
"QCOperation_CannotChangeStop": "The project configuration of image QC process was double check, and the current review state is {0} and cannot be changed to the QC termination.",
"QCOperation_NoTaskOwner": "The current visiting image QC has not been claimed by anyone, and cannot been released.",
"QCOperation_DiseaseProgressConfirmation": "Current visit required PD Confirmation. Please process the unsubmitted prior visit before submitting the current visit: {0}.",
"QCOperation_UnsubmittedVisits": "After submitting the current visit, please submit any prior visits which have not been submitted as soon as possible. ({0})",
"QCOperation_NoBaselineData": "No clinical data at baseline. Confirm to submit?",
"QCOperation_NoImageData": "Dicom/ Non-dicom image data has not been uploaded. Submission is not allowed.",
"QCOperation_ImagesSubmitted": "The image data of the current visit has been submitted by another CRC.",
"QCOperation_BatchImagesSubmitted": "The visit image data is currently submitted in batches, part of which has been submitted by other CRCs.",
"QCOperation_MissingBaselineDate": "The trial is configured with the visit start date, but the visit start date for the subject is not filled. Submittion is not allowed.",
"QCOperation_RemoveItem": "You have been removed from the trial and have no operation rights.",
"QCOperation_QCNotClosed": "The QC query has not been closed for the current visit. This operation cannot be performed.",
"QCOperation_NoQCNeeded": "The trial configuration of image QC was no. No need to set image QC as pass.",
"QCOperation_QCNotSaved": "Image QC question is not saved. This operation is not allowed.",
"QCOperation_NotChangePass": "The trial configuration of image QC process was double check, so the current image QC task cannot change from the current state to pass.",
"QCOperation_CannotChangeToPass": "The trial configuration of image QC process was double check. The current audit state is {0}, which cannot be changed to approved.",
"QCOperation_NoQCNeededNotEnd": "The trial configuration of image QC process was not check, and setting image quality control termination is not allowed.",
"QCOperation_CannotChangeToStop": "The trial configuration of image QC process was single check, and the current review state is not In Primary QC and cannot be changed to the QC termination.",
"QCOperation_CannotChangeStop": "The trial configuration of image QC process was double check, and the current review state is {0} and cannot be changed to the QC termination.",
"QCOperation_InvalidResend": "The current reupload state is not QC agree, so reuploading is not allowed.",
"QCOperation_NoResendNeeded": "No check operation, there will be no need to reupload!",
"QCOperation_InvalidAgreeResend": "The current reuploading state is not CRC requested and the approve of reuploading cannot be set.",
"QCOperation_CannotAgreeResend": "At the current visit, there is an unclosed inquiry that QC set to agree to reupload, CRC has not completed the upload, currently is not allowed to set again.",
"QCOperation_AgreeResend": "QC agrees to reupload.",
"QCOperation_InvalidCompleteResend": "The current reupload state is not QC agree, setting reuploading completion is not allowed.",
"QCOperation_NoImageNotAllowed": "No image is currently available, setting reuploading completion is not allowed.",
"QCOperation_InvalidAgreeResend": "The current re-upload- status is not CRC requested and the approve of reuploading cannot be set.",
"QCOperation_CannotAgreeResend": "At the current visit, there is an unclosed query that QC set to agree to reupload, CRC has not uploaded, currently is not allowed to set again.",
"QCOperation_AgreeResend": "QC agrees to re-upload.",
"QCOperation_InvalidCompleteResend": "The current reupload status is not QC approved, setting reuploading completion is not allowed.",
"QCOperation_NoImageNotAllowed": "No image is currently available. Setting reuploaded is not allowed.",
"QCOperation_CRCTransferCompleted": "CRC reuploading has been completed. ",
"QCOperation_InvalidTransferStatus": "The current inquiry reupload state is not the initial state| CRC reupload completed state, and requests for reuploading are not allowed",
"QCOperation_InvalidTransferStatus": "The current query re-upload status is not the initial| CRC re-uploaded. Application for re-uploading is not allowed",
"QCOperation_CRCTransfer": "CRC requests to reupload/upload images.",
"QCOperation_CannotModifyConfirmation": "The visit has been submitted, and the enrollment confirmation state cannot be modified.",
"QCOperation_CannotModifyPDStatus": "This visit is regarded as a rollback visit, and modification of PD confirmation status is not allowed.",
"QCOperation_CannotModifyPDStatus": "This visit status is return back. Modification of PD Confirmation status is not allowed.",
"QCOperation_ForwardingFailed": "Failed to forward the image:",
//QCQuestionService
"QCQuestion_DuplicateIndexFailed": "Operation failed because the serial number is repeated.",
"QCQuestion_HasChildQuestion": "The current task has a sub-question and the deletion fails.",
"QCQuestion_HasChildQuestion": "The current task has a sub-question. Deletion failed.",
//TrialQCQuestionService
"TrialQCQuestion_TemplateConfirmed": "Image quality control review question template has been confirmed, and no operation is allowed.",
"TrialQCQuestion_TemplateConfirmed": "Image QC question template has been confirmed. No operation is allowed.",
"TrialQCQuestion_DuplicateIndexFailed": "Operation failed because the serial number is repeated.",
"TrialQCQuestion_DeleteChildFirst": "Before deleting the parent question, delete the child question that references the parent question.",
"TrialQCQuestion_ReferencedByQCProcess": "This review question has been cited by the image quality control process and is not allowed to be deleted.",
"TrialQCQuestion_ReferencedByQCProcess": "This review question has been cited by the image QC. Deletion is not allowed.",
// ------------------------------------------------------------QC--------------------------------------------------------------------
// ------------------------------------------------------------SiteSurvey--------------------------------------------------------------------
//TrialSiteEquipmentSurveyService
"TrialSiteEquipment_Locked": "Locked and not allowed to operate.",
"TrialSiteEquipment_Locked": "Locked and operation is not allowed.",
//TrialSiteSurveyService
"TrialSiteSurvey_InvalidEmail": "Please enter the correct email address.",
"TrialSiteSurvey_WrongVerificationCode": "The verification code is incorrect.",
"TrialSiteSurvey_ExpiredVerificationCode": "The verification code has expired.",
"TrialSiteSurvey_NoRecordToUpdate": "The site does not have a site survey record for the transferor , so it is not allowed to choose to update.",
"TrialSiteSurvey_RecordUnderReview": "Your site survey record is in review and cannot be updated. If you need to update, please do so after rejection.",
"TrialSiteSurvey_LockedByCurrentUser": "In the current site, the survey record form you submitted has been locked, and it is not allowed to update other people's email survey records.",
"TrialSiteSurvey_LockedByOtherUsers": "In the current site, the survey record you submitted has been locked, Currently, the survey record form submitted by other personnel is not locked, so it is not allowed to update the survey record submitted by you before.",
"TrialSiteSurvey_LockedByCurrentUser": "In the current site, the submitted survey record has been locked. Updation of other people's email survey records is not allowed.",
"TrialSiteSurvey_LockedByOtherUsers": "The submitted survey record of the current site has been locked. Currently, the survey record submitted by other personnel is not locked. Updation of the survey submitted before is not allowed.",
"TrialSiteSurvey_UnlockedRecordsExist": "The current site has unlocked survey records. Locked survey records cannot be updated.",
"TrialSiteSurvey_NonLatestLockedRecord": "The site survey corresponding to the mailbox {0} is not the latest locked record and is not allowed to be updated!",
"TrialSiteSurvey_AlreadyFilledByOtherUsers": "There are already survey forms filled out by other users under this site, and you are not allowed to fill them out",
"TrialSiteSurvey_NonLatestLockedRecord": "The site survey corresponding to the mailbox {0} is not the latest. Updation is not allowed",
"TrialSiteSurvey_AlreadyFilledByOtherUsers": "There are already survey filled out by other users under this site. You are not allowed to fill them out",
"TrialSiteSurvey_Locked": "The site survey has been locked, and no operation is allowed.",
"TrialSiteSurvey_IRCNotification": "[from Extensive Imaging IRC] A reminder about the site survey approval.",
"TrialSiteSurvey_CancelUnsubmittedRecord": "Only unsubmitted records are allowed to be repealed.",
"TrialSiteSurvey_NoAdminAcces": "The operation is not allowed by the administrator.",
"TrialSiteSurvey_FailedToGenerateAccountId": "If no value is obtained for the generated account Id, please check.",
"TrialSiteSurvey_FailedToGenerateAccountId": "If no value is obtained for the generated account Id. Please check.",
"TrialSiteSurvey_IRCInvitation": "[from Extensive Imaging IRC][{0}] Invitation letter",
"TrialSiteSurvey_IRCInvitationContent": "Hello, as the IRC supplier of experiment plan No. {0} project, Extensive Imaging sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.",
"TrialSiteSurvey_IRCInvitationContent": "Hello, as the IRC supplier of experiment plan No. {0} trial, Extensive Imaging sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.",
"TrialSiteSurvey_ViewAndConfirm": "Check and confirm",
//TrialSiteUserSurveyService
"TrialSiteUser_Locked": "Locked and not allowed to operate.",
"TrialSiteUser_InconsistentInfo": "The user's account name in the system is{0}, and there are inconsistent items with the information filled in. Now modify the interface information to be consistent with the system and save it.",
"TrialSiteUser_NoTestUserForFormal": "It is Formal and training projects that are not allowed to add test users.",
"TrialSiteUser_InconsistentInfo": "The corresponding user of this email address is {0}, and the phone number is {1}. Please modify the inputted information and make it consistent with that already in the system, and then save.",
"TrialSiteUser_NoTestUserForFormal": "Formal and training triala are not allowed to add test users.",
"TrialSiteUser_NoFormalUserForTest": "It is the test project that regular users are not allowed in.",
// ------------------------------------------------------------Stat--------------------------------------------------------------------
// ------------------------------------------------------------TrialSiteUser--------------------------------------------------------------------
//TrialConfigService
"TrialConfig_JudgeTaskFail": "There are judge questions that the conditions for generating judge reading task are not configured, and the operation has failed!",
"TrialConfig_StdConfigMissing": "Questions are not configured under the current standard.",
"TrialConfig_JudgeTaskFail": "There are adjudication questions that the conditions for generating adjudication review read are not configured. Operation failed!",
"TrialConfig_StdConfigMissing": "Questions are not configured under the current criterion.",
"TrialConfig_AddEvalReq": "Selected additional assessment, must check additional assessment type",
"TrialConfig_SignTemplateMissing": "This operation requires electronic signature confirmation, but the signature template for this scenario is not found in the system.",
"TrialConfig_ProjectEnded": "The trial project has ended or stopped, and configuration changes are not allowed.",
"TrialConfig_NoImageAuditQuestion": "No image quality control review question is currently added. Please add the image quality control review question first, and then confirm.",
"TrialConfig_DuplicateAuditQuestionId": "Image quality control review question display number cannot be repeated.",
"TrialConfig_InvalidParentQuestionId": "Make sure that the display sequence number of the parent question is smaller than that of the child question.",
"TrialConfig_AuditQuestionConfirmed": "The question of image quality control review has been confirmed by other personnel, and it is not allowed to be confirmed again.",
"TrialConfig_ProjectNotInitialized": "This operation is not allowed because the current state of the project is not initialized.",
"TrialConfig_UnconfirmedConfiguration": "There are unconfirmed items in the project configuration (logical configuration, process configuration, expedite configuration) and visit management, so the project state cannot be set to start.",
"TrialConfig_UnconfirmedUNACKD": "Unable to change project status. There are unconfirmed items in the project configuration and visit management.",
"TrialConfig_ProjectNotStarted": "The project is not in the start state and cannot be set to stop or complete.",
"TrialConfig_ProjectEnded": "The trial has ended or stopped. Configuration changes are not allowed.",
"TrialConfig_NoImageAuditQuestion": "No image QC question is currently added. Please add the image QC questions first, and then confirm.",
"TrialConfig_DuplicateAuditQuestionId": "Image QC question display number cannot be repeated.",
"TrialConfig_InvalidParentQuestionId": "Make sure that the display sequence number of the parent question is smaller than that of the child.",
"TrialConfig_AuditQuestionConfirmed": "The image QC questions have been confirmed by other personnel. Cofirmation again is not allowed. ",
"TrialConfig_ProjectNotInitialized": "The current trial status is not initialized. This operation is not allowed.",
"TrialConfig_UnconfirmedConfiguration": "This trials project configuration, & visit management have not been finished, and its status cannot be changed to “Ongoing”.",
"TrialConfig_UnconfirmedUNACKD": "This trials project configuration, & visit management have not been all confirmed, and its status cannot be changed",
"TrialConfig_ProjectNotStarted": "This trial status is not “Ongoing”, and cannot be set to Stoped or Completed.",
//TrialExternalUserService
"TrialExternalUser_Inconsistency": "The user's account name in the system is{0}, and there are inconsistent items with the information filled in. Now modify the interface information to be consistent with the system and save it.",
"TrialExternalUser_Inconsistency": "The corresponding user of this email address is {0}, and the phone number is {1}. Please modify the inputted information and make it consistent with that already in the system, and then save.",
"TrialExternalUser_EmailTypeDuplicate": "Please confirm that the system already has an account with the same email address and user type as the one entered in the list.",
"TrialExternalUser_TestUserNotAllowed": "It is Formal and training projects that are not allowed to add test users.",
"TrialExternalUser_FormalUserNotAllowed": "It is the test project that regular users are not allowed in.",
"TrialExternalUser_NotEditable": "Personnel information cannot be edited. Please delete it and add it again.",
"TrialExternalUser_CannotDelete": "The current user has participated in the project and cannot be deleted.",
"TrialExternalUser_IRCInvitation": "Hello, as the IRC supplier of experiment plan No. {0} project, Extensive Imaging sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.",
"TrialExternalUser_TestUserNotAllowed": "Formal and training trials are not allowed to add test users.",
"TrialExternalUser_FormalUserNotAllowed": "It is a training trial that regular users are not allowed in.",
"TrialExternalUser_NotEditable": "Staff information cannot be edited. Please delete it and add it again.",
"TrialExternalUser_CannotDelete": "The current user has participated in the trial and cannot be deleted.",
"TrialExternalUser_IRCInvitation": "Hello, as the IRC supplier of experiment plan No. {0} trial, Extensive Imaging sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.",
"TrialExternalUser_ViewAndConfirm": "Check and confirm",
"TrialExternalUser_InvitationExpired": "The invitation time has expired. You can only confirm it after you are invited again.",
"TrialExternalUser_AccountInfo": "[from Extensive Imaging IRC][{0}] account information",
"TrialExternalUser_Welcome": "Hello, welcome to participate in the relevant work of trial scheme No. {0}IRC of the project. This project adopts electronic workflow. The system and your account information are as follows:",
"TrialExternalUser_Welcome": "Hello, welcome to participate in the relevant work of trial scheme No. {0}IRC of the project. This trial adopts electronic workflow. The system and your account information are as follows:",
"TrialExternalUser_ProjectNumber": "Trial ID: {0}",
"TrialExternalUser_ExperimentPlanNumber": "Protocol ID: {0}",
"TrialExternalUser_ExperimentName": "Study Name: {0}",
@@ -439,42 +502,39 @@
"TrialSite_ParticipantJoined": "The subjects has been added to this site, and couldn't be disable.",
"TrialSite_CodeDuplicate": "Code is not allowed to be repeated",
"TrialSite_CannotDeleteAssociatedCRC": "The site has been associated with CRC, and couldn't be deleted.",
"TrialSite_CannotDeleteAssociatedSubject": "The subjects has been added to this site, and couldn't be deleted.",
"TrialSite_CannotDeleteUploadedData": "The site has been uploaded study, and couldn't be deleted.",
"TrialSite_CannotDeleteAssociatedSubject": "The subjects has been added, and couldn't be deleted.",
"TrialSite_CannotDeleteUploadedData": "The site has been uploaded survey, and couldn't be deleted.",
// ------------------------------------------------------------Visit--------------------------------------------------------------------
//SubjectService
"Subject_NoConfirmedPlan": "The visit plan of the project is not confirmed. Please contact the program Manager to confirm the visit plan before adding subjects.",
"Subject_NoConfirmedPlan": "The visit plan of the trial is not confirmed. Please contact PM to confirm the visit plan before adding subjects.",
"Subject_DuplicateSubjectNum": "Subjects with the relevant subject ID already exists.",
"Subject_UploadedVisitNoDelete": "The subject has visit that has uploaded the image, so deletion is not allowed.",
"Subject_UploadedVisitNoDelete": "The subject has visit that has uploaded the image. Deletion is not allowed.",
//SubjectVisitService
"Visit_DuplicateVisitNo": "The subject's visit schedule already includes a visit with the same visit ID.",
"Visit_LastVisitNoChange": "The subject has already had a visit set as the last visit, and the current visit is not allowed to be set as the last visit.",
"Visit_LastVisitNoChange": "The subject has already had a visit set as the last, and the current visit cannot be set as the last visit.",
"Visit_DuplicateVisitName": "The subject's visit schedule already includes a visit with the same visit name.",
"Visit_NoExtraVisitAfterLast": "Unplanned visits are not allowed after the last evaluation is set.",
"Visit_FinishedTasksNoAdd": "The subject has already completed the task of reading ( ordered reading standard ) in follow-up visit, which is not allowed to be added here. If necessary, please return.",
"Visit_NoPDStatusChangeAfterSubmission": "The PD confirmation status cannot be modified after the current visit image is submitted.",
"Visit_NoExtraVisitAfterLast": "Unplanned visits cannot be added after the last assessment is set.",
"Visit_FinishedTasksNoAdd": "The subject has reads completed in follow-up visit ( chronological read ) , which is not allowed to be added here. If necessary, please return.",
"Visit_NoPDStatusChangeAfterSubmission": "The PD Confirmation status cannot be modified after the current visit image is submitted.",
"Visit_UploadedNoLost": "The current visit has already uploaded images and cannot be set as visit lost to follow-up.",
"Visit_UploadedNoDelete": "The current visit has already uploaded images and deletion is not allowed.",
"Visit_PlanVisitNoDelete": "Planned visits are not allowed to be deleted.",
"Visit_PreviousVisitNoDelete": "The current visit has been set to the previous visit of another visit and cannot be deleted.",
//VisitPlanService
"VisitPlan_OnlyInitOrOngoing": "Can be operated only when the project state is: Initialization or ongoing.",
"VisitPlan_OnlyInitOrOngoing": "Can be operated only when the trial state is: Initialized or ongoing.",
"VisitPlan_LargerVisitNumLargerInterval": "In the visit plan, the interval between visits with a large number should also be larger than that of a visit with a smaller number.",
"VisitPlan_LargerPlanNumLargerInterval": "In the visit plan, the planned visit with a large number should also have a larger interval than the planned visit with a smaller event number.",
"VisitPlan_ExistNameOrNumTemplate": "A plan visit template with visit name or visit ID of project already exists in the visit plan.",
"VisitPlan_ExistNameOrNumTemplate": "A plan visit template with visit name or visit ID of trial already exists in the visit plan.",
"VisitPlan_ExistBaseline": "A baseline already exists in the visit plan.",
"VisitPlan_ExistBaselineImgNoModify": "Subjects baseline image data has been uploaded, so modification of baseline visits is not allowed.",
"VisitPlan_OnlyInitOrOngoingModifyConfirm": "Modification validation is allowed only when the project is initialized or ongoing.",
"VisitPlan_NoBaselineNotConfirm": "No baseline, no validation allowed.",
"VisitPlan_ConfigNotConfirmNotConfirm": "If the project configuration is not confirmed, the visit plan cannot be confirmed.",
"VisitPlan_BaselineNotMinDayNotConfirm": "Baseline VisitDay is not minimal and does not allow validation.",
"VisitPlan_CheckExport": "Check and export _{0}.xlsx",
"VisitPlan_ExistBaselineImgNoModify": "The subjects baseline image data has been uploaded, so modification of baseline visits is not allowed.",
"VisitPlan_OnlyInitOrOngoingModifyConfirm": "Modification confirmation is allowed only when the trial is initialized or ongoing.",
"VisitPlan_NoBaselineNotConfirm": "No baseline, no confirmation allowed.",
"VisitPlan_ConfigNotConfirmNotConfirm": "If the trial configuration is not confirmed, the visit plan cannot be confirmed.",
"VisitPlan_BaselineNotMinDayNotConfirm": "Baseline's VisitDay is not minimal. Confirmation is not allowed.",
"VisitPlan_CheckExport": "Study export _{0}.xlsx",
"VisitPlan_Assigned": "The visit plan has been assigned to the subjects and executed.",
// ------------------------------------------------------------WorkLoad--------------------------------------------------------------------
//DoctorWorkloadService
"DoctorWorkload_AssignType": "A task has been assigned and does not allow you to reduce the reading type.",
@@ -485,14 +545,49 @@
"Enroll_EmailFormat": "The {0} mailbox format is faulty.",
"Enroll_CannotRollback": "Reviewers with workload cannot go back",
// ------------------------------------------------------------Triggers--------------------------------------------------------------------
//AddlTrialUserTrigger
"AddlTrialUser_NoTestUser": "It is Formal and training projects that are not allowed to add test users.",
"AddlTrialUser_NoFormalUser": "It is the test project that regular users are not allowed in.",
"AddlTrialUser_NoTestUser": "Formal and training trials are not allowed to be added test users.",
"AddlTrialUser_NoFormalUser": "It is a training trial that regular users are not allowed in.",
//SubjectStateTrigger
"SubjectState_CannotSetCurrentAsLastVisit": "The subject has already had a visit set as the last visit, and the current visit is not allowed to be set as the last visit.",
"SubjectState_CannotSetCurrentAsLastVisit": "The subject has already had a visit set as the last, and the current visit cannot be set as the last.",
"SubjectState_CannotSetAsLastVisitWithImage": "The image of the subject's visit after the current visit has been uploaded, and the current visit is not allowed to be set as the last visit.",
//SubjectVisitFinalVisitTrigger
"SubjectVisit_CannotSetAsLastVisit": "The subject's follow-up visits has uploaded images or submitted , and the current visit is not allowed to be set as the last visit."
"SubjectVisit_CannotSetAsLastVisit": "The subject's follow-up visits has uploaded images or submitted , and the current visit is not allowed to be set as the last visit.",
// ------------------------------------------------------------BusinessFilter--------------------------------------------------------------------
//LimitUserRequestAuthorization
"LimitUser_AuthTokenMissing": "User token was not retrieved from Header/URL, please contact developer",
"LimitUser_AccountLoggedInElsewhere": "User token was not retrieved from Header/URL, please contact developer",
//ModelActionFilter
"ModelAction_InvalidAPIParameter": "Invalid parameters provided for the API.",
//ProjectExceptionFilter
"ProjectException_ConcurrentUpdateNotAllowed": "Concurrent update, operation not allowed at this time.",
"Project_ExceptionContactDeveloper": "Program exception, please contact developer.",
//TrialResourceFilter
"TrialResource_NoAccessPermission": "Sorry, your account does not have operation permissions.",
"TrialResource_ReferTrialIdFailed": "Regular expression failed to fetch trialId from request Refer, please contact developer to check",
"TrialResource_InterceptedProjectStatusRule": "This request was blocked by configured rules: only operations allowed when project status is in progress, please contact developer if this logic is incorrect and needs to be modified",
"TrialResource_MissingProjectNumber": "Project number not passed in the API parameters, please verify.",
//UnifiedApiResultFilter
"UnifiedAPI_ProgramError": "Program error, please contact developer.",
// ------------------------------------------------------------Helper--------------------------------------------------------------------
//FileStoreHelper
"FileStore_TemplateFileNotFound": "Database did not find the corresponding data template file for FileStoreHelper, please contact system maintenance personnel.",
"FileStore_TemplateFileStoragePathInvalid": "File doesnt exist. Please contact the system administrator!",
//SendEmailHelper
"SendEmail_SendFail": "Failed to send email in SendEmailHelper. Your operation was unsuccessful, please check your email or contact maintenance personnel.",
"SendEmail_NoRecipient": "No recipient in SendEmailHelper.",
// ------------------------------------------------------------IRaCIS.Core.Domain--------------------------------------------------------------------
//Trial
"Trial_number": "Subject ID is composed of 5 digits. The first 2 are the Site ID, and the following 3 are the order number. Please ensure it is identical to the ID from the EDC system. ",
// ------------------------------------------------------------IRaCIS.Core.Infrastructure--------------------------------------------------------------------
//ResponseOutput
"RO_BizObjNotExistsOrParamIncorrect": "The business object{0} does not exist in the database, or was deleted by someone else, or an incorrect parameter query caused",
"RO_ExpectChangeButNoEffect": "Expect a change, but the database data has not changed",
"RO_SaveFailed": "Saved failed"
}
+145 -28
View File
@@ -2,7 +2,50 @@
"test{0}{1}": "中文本地化{0}{1}",
"RequiredAttribute": "{0} 字段是必须的",
// ------------------------------------------------------------_ServiceExtensions--------------------------------------------------------------------
//ApiResponseHandler
"ApiResponse_NoAccess": "您无权访问该接口",
"ApiResponse_Permission": "您的权限不允许进行该操作",
// ------------------------------------------------------------Controllers--------------------------------------------------------------------
//FinancialChangeController
"Financial_ChargeSettled": "费用已经结算,无法重置工作量",
"Financial_InvalidParameter": "无效的参数。",
//UploadDownLoadController
"UploadDownLoad_UnsupportedMedia": "不支持的MediaType",
"UploadDownLoad_ArchiveInProgress": "当前已有人正在上传和归档该检查!",
"UploadDownLoad_InvalidData": "请保证上传数据符合模板文件中的样式,且存在有效数据。",
"UploadDownLoad_RequestError": "请求异常,请重试!",
"UploadDownLoad_SupportedFormats": "支持.xlsx、.xls、.csv格式的文件上传。",
// ------------------------------------------------------------_MediatR--------------------------------------------------------------------
//ConsistencyVerificationRequest
"ConsistencyVerification_Tech": "检查技术",
"ConsistencyVerification_Time": "时间格式不对",
//ConsistencyVerificationHandler
"ConsistencyVerification_Img": "您好,根据本系统自动识别,该受试者当前访视在IRC系统中已提交的影像检查情况如下:",
"ConsistencyVerification_Of": "的",
"ConsistencyVerification_ImgC": "影像检查",
"ConsistencyVerification_EDCA": "核对EDC数据,完全一致, 审核通过",
"ConsistencyVerification_EDCB": "核对EDC数据,完全一致",
"ConsistencyVerification_Auto": "自动核查通过",
"ConsistencyVerification_Prob": "存在问题如下:",
"ConsistencyVerification_EdcL": "影像检查(EDC 缺少)",
"ConsistencyVerification_IrcL": "影像检查(IRC 缺少)",
"ConsistencyVerification_Desc": "说明:为高效解决/处理以上全部质疑问题,麻烦您准确核实实际影像检查情况。请注意影像日期与实际检查的日期可能会不一致,部分检查(如PET -CT)可能同时存在多种模态影像。准确核实后,请回复该访视正确的影像检查情况。",
"ConsistencyVerification_Conf": "根据导入的一致性核查数据,请确认本访视以下不一致检查项信息:",
"ConsistencyVerification_Edc": "EDC 缺少:",
"ConsistencyVerification_IrcLi": "IRC 缺少:",
// ------------------------------------------------------------Reading--------------------------------------------------------------------
//ClinicalDataSetService
"ClinicalDataSet_Apply": "当前临床数据需要配置一个检查日期才能应用",
"ClinicalDataSet_DupTypeFail": "存在同类型的临床数据,操作失败",
//ClinicalQuestionService
"ClinicalQuestion_Repeat": "存在相同的问题名称!",
//ReadingClinicalDataService
"ReadingClinicalData_DupTypeFail": "存在同类型的临床数据,操作失败",
"ReadingClinicalData_Unchecked": "当前临床数据状态不是已核查状态,不允许签名!",
//ReadingGlobalTaskService
"ReadingGlobal_NotGlobal": "系统调用错误,当前任务不是全局阅片任务。",
//ReadingImageTaskService
@@ -17,8 +60,8 @@
"ReadingImage_IsLymphNotbigger": "当前访视该淋巴结非靶病灶的短径小于上一访视的值,不能设置为显著增大。",
"ReadingImage_NotLymphNotbigger": "当前访视该非淋巴结非靶病灶的长径小于上一访视的值,不能设置为显著增大。",
"ReadingImage_Twice": "系统调用错误,提交的问题及答案重复。",
"ReadingImage_MaxQuestion": "按照《独立影像评估章程》的相关规则,当前病灶类型的病灶数量不超过{0}个。",
"ReadingImage_Maxlesion": "按照《独立影像评估章程》的相关规则,同一器官的靶病灶数量不超过{0}个,请确认",
"ReadingImage_MaxQuestion": "按照《独立影像评估章程》的相关规则,当前{0}的病灶数量不超过{1}个。",
"ReadingImage_Maxlesion": "按照《独立影像评估章程》的相关规则,同一器官的靶病灶数量不超过{0}个,请确认",
"ReadingImage_Maximum": "{0}的重复次数限制为{1},目前已重复{2}次。",
"ReadingImage_PCWGMaximum": "按照《独立影像评估章程》的相关规则,同一部位的基线病灶只需录入{0}次,请确认。",
"ReadingImage_NotNewFocus": "转换后的任务不应该存在新病灶",
@@ -45,12 +88,51 @@
"MedicalReview_NeedSave": "无法执行当前操作,请先保存医学审核问题和结论。",
"MedicalReview_NotClosed": "无法执行当前操作,当前医学质询对话未关闭。",
"MedicalReview_Finish": "当前医学审核任务为最后一个任务。",
//ReadingMedicineQuestionService
"ReadingMed_QNumDup": "当前问题序号存在重复",
"ReadingMed_HasSubQ": "此问题存在子问题,请先删除子问题",
"ReadingMed_NoMedQ": "当前未添加医学审核问题。请先添加医学审核问题,再进行确认。",
"ReadingMed_MedQNumDup": "影像医学审核问题显示序号不能重复。",
"ReadingMed_ParentNumSmall": "父问题的显示序号要比子问题的显示序号小,请确认。",
"ReadingMed_VisitQNotConfig": "当前标准未配置访视医学审核问题。",
"ReadingMed_GlobalQNotConfig": "当前标准启用了全局阅片,但未配置全局医学审核问题",
"ReadingMed_ArbitrateQNotConfig": "当前标准启用了仲裁阅片,但未配置仲裁医学审核问题",
"ReadingMed_TumorQNotConfig": "当前标准启用了肿瘤学阅片,但未配置肿瘤学医学审核问题",
//UserService
"User_CheckNameOrPw": "请检查用户名或者密码。",
//Repository
"Repository_UpdateError": "修改的数据在数据库不存在。",
"Repository_DeleteError": "删除的数据在数据库不存在。",
//OrganInfoService
"OrganInfo_DuplicateData": "存在相同的数据,操作失败",
//ReadingCriterionService
"ReadingCriterion_Referenced": "当前标准被引用过了,不可以删除",
"ReadingCriterion_InUse": "此标准在项目里面已被使用,操作失败",
"ReadingCriterion_ArbitratorWithoutJudgment": "无裁判问题却有仲裁对象,操作失败",
//ReadingQuestionService
"ReadingQuestion_IdDup": "问题编号重复",
"ReadingQuestion_ChildrenExist": "此问题存在子问题,请先删除子问题",
"ReadingQuestion_GroupReferenced": "此分组已被引用,请先删除被引用的问题",
"ReadingQuestion_JudgmentSet": "当前问题已经设置了裁判标准了,修改失败",
"ReadingQuestion_ExcludeWithDependency": "显示依赖父问题和必填依赖的问题为同一个,但答案互斥,操作失败",
"ReadingQuestion_CircularDependency": "计算依赖循环了!",
//ReadingPeriodSetService
"ReadingPeriodSet_NameDup": "阅片期名称重复,操作失败",
"ReadingPeriodSet_Global": "阅片期名称不能为Global",
"ReadingPeriodSet_AlreadyAdded": "{0}已经添加过阅片期,无法设置生效",
"ReadingPeriodSet_TaskCompletedCannotRevoke": "当前标准阅片已生成任务并且阅片完成,撤销失败。",
"ReadingPeriodSet_LastVisit": "末次访视",
//ReadModuleService
"ReadModule_AlreadyAdded": "当前访视已经添加过阅片期",
"ReadModule_AddGlobalFirst": "请先添加全局阅片",
"ReadModule_VisitNotFound": "未找到符合要求的访视",
"ReadModule_SignedDataCannotDelete": "临床资料已签名,不允许删除",
"ReadModule_TumorExists": "当前访视存在肿瘤学阅片,请先删除肿瘤学阅片",
"ReadModule_TaskGenerated": "当前阅片已生成任务,操作失败。",
//UserWLTemplateService
"UserWLTS_MaxTemplate": "同一个用户最多只能添加10个模板",
"UserWLTS_NameRepeated": "模板名称存在重复",
"UserWLTS_ContentRepeated": "模板内容存在重复",
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
//TaskAllocationRuleService
@@ -81,7 +163,7 @@
"VisitTask_DoctorConfiguration": "后台数据有错误",
"VisitTask_BackendData": "未阅片完成,或者未生效的任务不允许申请重阅",
"VisitTask_UnreadTask": "重阅已申请,或者重阅已同意状态下不允许申请重阅",
"VisitTask_NoPMRecheck": "手动生成任务不允许PM 申请影像重阅",
"VisitTask_NoPMRecheck": "附加评估标准任务不允许PM 申请影像重阅",
"VisitTask_Reapply": "PM 不允许对一致性分析任务进行申请重阅",
"VisitTask_ConsistencyAnalysis": "PM 仅仅允许对访视类型的任务申请重阅",
"VisitTask_VisitTypeRestriction": "当前为有序阅片,该受试者已有访视已申请重阅还未处理(项目组申请),暂不能继续申请重阅",
@@ -90,14 +172,14 @@
"VisitTask_LastReading": "有序阅片,只允许申请该受试者阅片人最后一次完成全局任务重阅",
"VisitTask_LastOncologistRecheck": "有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅",
"VisitTask_LastAdjudicatorRecheck": "有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅",
"VisitTask_IRGlobalRecheck": "无序阅片,仅仅允许IR 申请 全局和访视类型类别的任务进行重阅",
"VisitTask_IRGlobalRecheck": "无序阅片,仅仅允许IR 申请 全局和访视类型类别的任务进行重阅",
"VisitTask_IRReapply": "无序阅片,仅仅允许IR申请全局和访视类型类别的任务进行重阅",
"VisitTask_InvalidReapplyStatus": "当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面",
"VisitTask_ReapplyStatusConflict": "当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作",
"VisitTask_ReReadTaskNotApplied": "仅允许同意访视类型的任务重阅",
"VisitTask_ReReadTaskAlreadyAffected": "不符合 PM申请 SPM / CPM审批 | IR申请 PM 审批 ",
"VisitTask_TaskTypeNotApproved": "当前重阅任务状态不为已申请状态,不允许进行处理,请刷新页面",
"VisitTask_NoImageReturn": "手动生成任务不允许在此入口影像退回",
"VisitTask_NoImageReturn": "附加评估标准任务不允许在此入口影像退回",
"VisitTask_NonEffectiveTaskCannotBeReturned": "仅仅允许针对生效、未完成的访视任务进行退回操作,请刷新页面数据",
"VisitTask_NoFurtherReturn": "当前访视已回退到影像上传,不允许继续回退!",
"VisitTask_ConsistencyTaskCannotBeReturned": "一致性分析的任务,不允许设置退回",
@@ -107,7 +189,6 @@
"VisitTask_NoConsistencyReturn": "不允许退回一致性分析任务",
"VisitTask_VisitTypeTaskAllowedForPMOnly": "仅仅访视类型的任务支持PM退回",
// ------------------------------------------------------------Common--------------------------------------------------------------------
//CommonDocumentService
"Document_CodeDuplication": "文档的Code不能够重复。",
@@ -135,14 +216,17 @@
"Mail_AccountCreationReminder": "[来自展影IRC] 关于创建账户的提醒",
"Mail_AccountPasswordResetReminder": "[来自展影IRC] 关于重置账户密码的提醒",
"Mail_InvitationEmail": "[来自展影IRC] [{0}]邀请信",
//SystemMonitor
"SysMon_JsonConfig": "解析Json文件配置出现问题",
// ------------------------------------------------------------Doctor--------------------------------------------------------------------
//DoctorService
"Doctor_DupPhoneOrEmail": "当前的电话或电子邮件号码已经存在",
"Doctor_DupPhone": "当前的电话号码已经存在!",
"Doctor_DupEmail": "当前的邮箱已经存在!",
"Doctor_StandardDuplicateFileTypeError": "当前标准已添加过此类型文件",
"Doctor_RequiredDocumentsError": "简历及顾问协议必须上传",
// ------------------------------------------------------------Document--------------------------------------------------------------------
//SystemDocumentService
"SystemD_DuplicateFile": "系统中已存在同类型的同名文件。",
@@ -166,12 +250,12 @@
"TrialEmailN_PDProgressEmailTask": "发送PD 进展邮件中发现任务数据有问题!",
"TrialEmailN_DoubleBlindedError": "双重有序阅片 没有定义该仲裁规则处理逻辑,请联系业务和后台开发核查!",
"TrialEmailN_InCons": "项目未配置入组确认!",
"TrialEmailN_NoBaseLine": "不存在配置了入组确认的并且生成任务的基线访视",
"TrialEmailN_NoBaseLine": "不存在配置了入组确认的并且已阅的基线访视",
"TrialEmailN_IncompBase": "做入组确认的阅片人基线任务没有阅片完!",
"TrialEmailN_EmailFail": "邮件手动生成失败,请联系开发核实该场景失败原因",
"TrialEmailN_NoReader": "当前未有阅片人读完基线任务!",
"TrialEmailN_NoPDConfig": "项目未配置PD进展!",
"TrialEmailN_NoPDTasks": "不存在配置了PD进展的并且生成任务的访视",
"TrialEmailN_NoPDTasks": "不存在配置了PD进展的并且已阅的访视",
"TrialEmailN_PDNotFinished": "当前受试者最新PD访视阅片任务完成状态不符合发送条件",
"TrialEmailN_PDNoImaging": "项目配置了阅片期仲裁,但是当前受试者最新PD访视没有影像学阅片期",
"TrialEmailN_PDPhaseNotFinished": "当前受试者最新PD访视阅片期任务完成状态不符合发送条件",
@@ -180,7 +264,7 @@
"TrialEmailN_NoSendLogicDefined": "当前项目配置,未定义发送业务逻辑!",
"TrialEmailN_BlindedSequencedReading": "有序阅片配置有误(应为单重或者双重阅片),请核查!",
"TrialEmailN_UnblindedSequencedReading": "无序阅片配置有误(应为单重无仲裁对象,双重针对访视仲裁),请核查!",
"TrialEmailN_InvalidTaskTypeForEmailSending": "不应有 除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑",
"TrialEmailN_InvalidTaskTypeForEmailSending": "不应有除访视、裁判、全局其他类型的任务进行发送邮件,请核查业务逻辑",
"TrialEmailN_PDLogicNotDefined": "该标准任务还未定义PD获取逻辑,联系业务和后台开发协商后补充",
"TrialEmailN_MailboxWrong": "项目发件邮箱配置有误,请核实",
"TrialEmailN_InvalidRecipient": "项目没有有效的收件人,无法发送邮件",
@@ -201,7 +285,6 @@
//TrialRevenuesPriceService
"TRP_AddMeaningful": "请添加有意义的数据",
// ------------------------------------------------------------ImageAndDoc--------------------------------------------------------------------
//DicomArchiveService
"DAS_NoAnonCacheData": "未取到缓存匿名化配置数据,上传停止,请联系开发人员核实",
@@ -231,7 +314,7 @@
"CRO_InProject": "该CRO已经参与项目,不能被删除。",
//HospitalService
"Hospital_DupName": "已经存在同名的医院,请确认。",
"Hospital_SiteAdded": "当前Site已经添加到其他Hospital了",
"Hospital_SiteAdded": "当前Site已经添加到其他Hospital了",
"Hospital_HasDoctors": "该医院下已经注册有医生,不可以删除。",
//SiteService
"Site_DupName": "已经存在同名的中心,请确认。",
@@ -250,10 +333,10 @@
"User_EmailDup": "该用户类型中已存在具有相同邮箱的用户。",
"User_NewOldPwdSame": "新密码与旧密码相同。",
"User_OldPwdInvalid": "旧密码验证失败。",
"User_LegalEmail": "请输入合法的电子邮件",
"User_LegalEmail": "请输入合法的电子邮件",
"User_VerificationCodeError": "验证码错误。",
"User_VerificationCodeExpired": "验证码已经过期。",
"User_CreateFailed": "请检查邮箱地址或者联系维护人员, 邮件发送失败, 未能创建账户成功",
"User_CreateFailed": "请检查邮箱地址或者联系维护人员, 邮件发送失败, 未能创建账户成功",
"User_InvalidEmail": "请输入一个正确的邮箱。",
"User_EmailError": "邮箱错误。",
"User_InProject": "该用户已经参加项目,不能够删除。",
@@ -261,10 +344,9 @@
//UserTypeService
"UserType_InUse": "该用户类型中已存在用户,不能删除。",
// ------------------------------------------------------------QC--------------------------------------------------------------------
//QCCommon
"QCCommon_CannotOperate": "CRC 已提交影像,不能进行操作。",
"QCCommon_CannotOperate": "CRC已提交影像,不能进行操作。",
"QCCommon_NoPermission": "您不是该质控任务当前领取人,没有操作权限!",
"QCCommon_CheckTimeEarly": "当前访视检查时间{0}不能早于前序访视检查时间{1},请核对检查数据是否有误",
"QCCommon_CheckTimeLate": "当前访视检查时间{0}不能晚于该访视之后的检查时间{1},请核对检查数据是否有误",
@@ -275,12 +357,12 @@
"QCOperation_CloseReason": "关闭原因: ",
"QCOperation_QuestionReplied": "当前QC质疑已经回复。",
"QCOperation_NoPermissionReply": "您没有权限回复一致性核查对话。",
"QCOperation_CannotClose": "当前访视处于申请回退状态, 不允许关闭质疑。",
"QCOperation_CannotClose": "当前访视处于申请重传状态, 不允许关闭质疑。",
"QCOperation_Reason": "原因:",
"QCOperation_CannotPass": "当前访视处于回退状态,不允许设置一致性核查通过",
"QCOperation_PassAfterClose": "请先关闭一致性核查质疑后,再设置一致性核查通过。",
"QCOperation_Cannotback": "当前访视已通过一致性核查,不允许申请回退",
"QCOperation_CRCRollback": "CRC申请回退",
"QCOperation_Cannotback": "当前访视已通过一致性核查,不允许申请重传",
"QCOperation_CRCRollback": "CRC申请重传",
"QCOperation_OtherCRC": "其他CRC已申请处理,请刷新页面",
"QCOperation_PMReject": "PM/APM拒绝一致性核查回退",
"QCOperation_NoPermission": "您不具备操作权限。",
@@ -297,7 +379,7 @@
"QCOperation_InitialAuditPassed": "初审已通过,不能继续领取",
"QCOperation_NoSingleAudit": "项目配置为单审,不满足Submmit State:已提交 或者 Audit State:待审核/审核中, 不允许领取,请刷新界面",
"QCOperation_NoSameReviewer": "复审不能和初审是同一个人",
"QCOperation_NoSecondaryAudit": "项目配置为复审,不满足提交状态:已提交 或者 审核状态:待审核/QC中, 不允许领取,请刷新界面",
"QCOperation_NoSecondaryAudit": "项目配置为复审,不满足提交状态:已提交或者审核状态:待审核/QC中, 不允许领取,请刷新界面",
"QCOperation_NoTaskAccess": "您不是该质控任务当前领取人,没有操作权限!",
"QCOperation_NoQCFunction": "项目配置影像质控为不审,不需要取消任务功能",
"QCOperation_NoTaskOwner": "当前访视影像质控任务没有当前领取人,不能释放。",
@@ -365,7 +447,7 @@
"TrialSiteSurvey_ViewAndConfirm": "查看并确认",
//TrialSiteUserSurveyService
"TrialSiteUser_Locked": "已锁定,不允许操作",
"TrialSiteUser_InconsistentInfo": "该用户在系统中账户名为:{0} ,与填写信息存在不一致项, 现将界面信息修改为与系统一致,可进行保存",
"TrialSiteUser_InconsistentInfo": "该邮件地址在系统中所对应的用户为 {0}, 电话号码是 {1}。请将所输入的信息修改为与系统一致后,再保存",
"TrialSiteUser_NoTestUserForFormal": "正式类型 、培训类型的项目 不允许加入测试用户",
"TrialSiteUser_NoFormalUserForTest": "测试项目 不允许加入正式用户",
@@ -375,6 +457,7 @@
//TrialConfigService
"TrialConfig_JudgeTaskFail": "有裁判问题未配置产生裁判阅片任务的条件,操作失败!",
"TrialConfig_StdConfigMissing": "当前标准下未配置问题",
"TrialConfig_AddEvalReq": "选择了附加评估,必须勾选附加评估类型",
"TrialConfig_SignTemplateMissing": "该操作需要电子签名确认,但未在系统中找到该场景的签名模板。",
"TrialConfig_ProjectEnded": "该项目已结束或停止,不允许修改配置。",
"TrialConfig_NoImageAuditQuestion": "当前未添加影像质控审核问题。请先添加影像质控审核问题,再进行确认。",
@@ -382,11 +465,11 @@
"TrialConfig_InvalidParentQuestionId": "父问题的显示序号要比子问题的显示序号小,请确认。",
"TrialConfig_AuditQuestionConfirmed": "影像质控审核问题已被其他人员确认,不允许再次确认。",
"TrialConfig_ProjectNotInitialized": "该项目当前状态不是初始化,不允许进行该操作。",
"TrialConfig_UnconfirmedConfiguration": "该项目的项目配置(基础配置、流程配置、加急配置) 、访视管理,有配置未确认,不能设置项目状态启动。",
"TrialConfig_UnconfirmedUNACKD": "无法变更项目状态。该项目的项目配置、访视管理中,有未确认项",
"TrialConfig_UnconfirmedConfiguration": "该项目的项目配置、访视管理尚未完成,无法将项目状态设为”启动。",
"TrialConfig_UnconfirmedUNACKD": "该项目的项目配置、访视管理中,有未确认项,无法变更项目状态。",
"TrialConfig_ProjectNotStarted": "项目没有进入启动状态,不能设置为停止或完成状态",
//TrialExternalUserService
"TrialExternalUser_Inconsistency": "该用户在系统中的用户名为:{0} 电话:{1},与填写信息存在不一致项, 请将界面信息修改为与系统一致,再进行保存",
"TrialExternalUser_Inconsistency": "该邮件地址在系统中所对应的用户为 {0}, 电话号码是 {1}。请将所输入的信息修改为与系统一致,再保存",
"TrialExternalUser_EmailTypeDuplicate": "系统已经存在与列表中填写的邮箱和用户类型相同的账户,请确认。",
"TrialExternalUser_TestUserNotAllowed": "正式类型 、培训类型的项目 不允许加入测试用户 ",
"TrialExternalUser_FormalUserNotAllowed": "测试项目 不允许加入正式用户 ",
@@ -422,7 +505,6 @@
"TrialSite_CannotDeleteAssociatedSubject": "受试者已经添加,不能删除",
"TrialSite_CannotDeleteUploadedData": "中心已经上传调研,无法删除",
// ------------------------------------------------------------Visit--------------------------------------------------------------------
//SubjectService
"Subject_NoConfirmedPlan": "项目访视计划没有确认。请联系项目经理确认项目访视计划后,再添加受试者。",
@@ -466,11 +548,46 @@
// ------------------------------------------------------------Triggers--------------------------------------------------------------------
//AddlTrialUserTrigger
"AddlTrialUser_NoTestUser": "正式类型 、培训类型的项目 不允许加入测试用户",
"AddlTrialUser_NoFormalUser": "测试项目 不允许加入正式用户",
"AddlTrialUser_NoFormalUser": "测试项目不允许加入正式用户",
//SubjectStateTrigger
"SubjectState_CannotSetCurrentAsLastVisit": "该受试者已经有访视被设置为末次访视,不允许将当前访视设置为末次访视。",
"SubjectState_CannotSetAsLastVisitWithImage": "该受试者当前访视后有访视的影像已上传,当前访视不允许设置为末次访视。",
//SubjectVisitFinalVisitTrigger
"SubjectVisit_CannotSetAsLastVisit": "该受试者已有后续访视已上传影像或已提交,当前访视不允许设置为末次访视。"
"SubjectVisit_CannotSetAsLastVisit": "该受试者已有后续访视已上传影像或已提交,当前访视不允许设置为末次访视。",
// ------------------------------------------------------------BusinessFilter--------------------------------------------------------------------
//LimitUserRequestAuthorization
"LimitUser_AuthTokenMissing": "当前请求未从Header/Url取到用户Token,请联系开发者",
"LimitUser_AccountLoggedInElsewhere": "您的账户在其他地方已登陆,您被迫下线。",
//ModelActionFilter
"ModelAction_InvalidAPIParameter": "提供给接口的参数无效。",
//ProjectExceptionFilter
"ProjectException_ConcurrentUpdateNotAllowed": "并发更新,当前不允许该操作",
"Project_ExceptionContactDeveloper": "程序异常,请联系开发人员。 ",
//TrialResourceFilter
"TrialResource_NoAccessPermission": "对不起,您的账户没有操作权限。",
"TrialResource_ReferTrialIdFailed": "正则取请求Refer 中trialId 失败,请联系开发人员核查",
"TrialResource_InterceptedProjectStatusRule": "本次请求被配置规则拦截:项目状态处于进行中时,才允许操作,若此处逻辑有误,请联系开发人员修改",
"TrialResource_MissingProjectNumber": "该接口参数中,没有传递项目编号,请核对。",
//UnifiedApiResultFilter
"UnifiedAPI_ProgramError": "程序错误,请联系开发人员。",
// ------------------------------------------------------------Helper--------------------------------------------------------------------
//FileStoreHelper
"FileStore_TemplateFileNotFound": "数据库没有找到对应的数据模板文件,请联系系统运维人员。",
"FileStore_TemplateFileStoragePathInvalid": "文件不存在,请联系系统管理员!",
//SendEmailHelper
"SendEmail_SendFail": "邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员",
"SendEmail_NoRecipient": "没有收件人",
// ------------------------------------------------------------IRaCIS.Core.Domain--------------------------------------------------------------------
//Trial
"Trial_number": "编号由5位数字组成,前2位为中心编号,后3位为顺序号,请与EDC录入的编号保持一致",
// ------------------------------------------------------------IRaCIS.Core.Infrastructure--------------------------------------------------------------------
//ResponseOutput
"RO_BizObjNotExistsOrParamIncorrect": "业务对象{0}在数据库中不存在,或被他人删除,或参数查询不正确导致",
"RO_ExpectChangeButNoEffect": "期望发生更改,但数据库数据没有更改",
"RO_SaveFailed": "保存失败"
}
@@ -71,7 +71,7 @@ namespace IRaCIS.Core.Application.ViewModel
{
if (!ReadingDurationTimeSpan.HasValue)
return "";
else return string.Format("{0}{1}小时{2}分钟", (SignTime - FirstReadingTime)?.Days, (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes)
else return string.Format("{0}d {1}h {2}min", (SignTime - FirstReadingTime)?.Days, (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes)
/*string.Format("{0}分钟", (ReadingDurationTimeSpan)?.TotalMinutes)*/;
}
}
@@ -17,7 +17,7 @@ namespace IRaCIS.Core.Application.Interfaces
//Task<PageOutput<TaskMedicalReviewView>> GetTaskMedicalReviewList(TaskMedicalReviewQuery queryTaskMedicalReview);
Task<TaskMedicalReviewView> GetNextMedicalReviewTask(GetNextMedicalReviewTaskInDto inDto);
Task<IResponseOutput<PageOutput<TaskMedicalReviewView>>> GetMIMMedicalReviewTaskList(TaskMedicalReviewQuery inQuery);
}
}
@@ -138,7 +138,7 @@ namespace IRaCIS.Core.Application.Service
{
var medicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.MedicalReviewId).Include(x=>x.VisitTask).FirstNotNullAsync();
var subjectReview = await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
var subjectReview = (await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
{
TrialId = medicalReview.TrialId,
@@ -148,14 +148,14 @@ namespace IRaCIS.Core.Application.Service
TrialReadingCriterionId = medicalReview.VisitTask.TrialReadingCriterionId,
PageIndex=1,
PageSize=1,
});
})).Data;
if (subjectReview.Item1.CurrentPageData.Count == 1)
if (subjectReview.CurrentPageData.Count == 1)
{
return subjectReview.Item1.CurrentPageData[0];
return subjectReview.CurrentPageData[0];
}
var data = await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
var data = (await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
{
TrialId = medicalReview.TrialId,
@@ -164,11 +164,11 @@ namespace IRaCIS.Core.Application.Service
TrialReadingCriterionId = medicalReview.VisitTask.TrialReadingCriterionId,
PageIndex = 1,
PageSize = 1,
});
})).Data;
if (data.Item1.CurrentPageData.Count == 1)
if (data.CurrentPageData.Count == 1)
{
return data.Item1.CurrentPageData[0];
return data.CurrentPageData[0];
}
else
{
@@ -186,7 +186,7 @@ namespace IRaCIS.Core.Application.Service
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<(PageOutput<TaskMedicalReviewView>, object)> GetMIMMedicalReviewTaskList(TaskMedicalReviewQuery inQuery)
public async Task<IResponseOutput< PageOutput<TaskMedicalReviewView>>> GetMIMMedicalReviewTaskList(TaskMedicalReviewQuery inQuery)
{
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id&&t.VisitTask.TrialReadingCriterionId==inQuery.TrialReadingCriterionId)
@@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Service
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TaskMedicalReviewView.Id) : inQuery.SortField, inQuery.Asc);
return (pageList, new
return ResponseOutput.Ok(pageList, new
{
IsConfirmMedicineQuestion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inQuery.TrialReadingCriterionId).Select(x => x.IsConfirmMedicineQuestion).FirstOrDefaultAsync()
@@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Service
public async Task AddConvertedTask(Guid taskId)
{
var taskInfo = await _visitTaskRepository.Where(x => x.Id == taskId).IgnoreAutoIncludes().AsNoTracking().FirstNotNullAsync();
taskInfo.ReadingTaskState = ReadingTaskState.WaitReading;
@@ -148,7 +148,7 @@ namespace IRaCIS.Core.Application.Service
});
await _visitTaskRepository.SaveChangesAsync();
}
@@ -237,7 +237,7 @@ namespace IRaCIS.Core.Application.Service
//为防止脏数据 这里也多判断一次
var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId
&& t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.TaskState == TaskState.Effect
&& t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.SourceSubjectVisitId == subjectVisit.Id).ToList();
&& t.SourceSubjectVisitId == subjectVisit.Id).ToList();
if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double)
{
@@ -1287,6 +1287,14 @@ namespace IRaCIS.Core.Application.Service
taskUrgent = TaskUrgentType.VisitUrgent;
}
bool isCanEditUrgent = taskUrgent == TaskUrgentType.EnrollmentConfirm || taskUrgent == TaskUrgentType.PDProgress ? false : true;
//加一个去重的判断 IR 申请重阅的时候,有脏数据 (例如多个follow 2 ),但是生成时候不生成
//var existTask = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == reReadingVisitTask.SubjectId
//&& t.TrialReadingCriterionId == reReadingVisitTask.TrialReadingCriterionId && t.TaskState == TaskState.Effect
// && t.SourceSubjectVisitId == reReadingVisitTask.SourceSubjectVisitId && t.ArmEnum == reReadingVisitTask.ArmEnum && t.DoctorUserId == reReadingVisitTask.DoctorUserId).FirstOrDefault();
var newTask = await _visitTaskRepository.AddAsync(new VisitTask()
{
@@ -1319,7 +1327,7 @@ namespace IRaCIS.Core.Application.Service
IsNeedClinicalDataSign = reReadingVisitTask.IsNeedClinicalDataSign,
IsClinicalDataSign = reReadingVisitTask.IsClinicalDataSign,
BeforeConvertedTaskId = reReadingVisitTask.BeforeConvertedTaskId,
ReReadingApplyState= ReReadingApplyState.Default,
ReReadingApplyState = ReReadingApplyState.Default,
// TaskAllocationState = reReadingVisitTask.TaskAllocationState,
// AllocateTime = DateTime.Now,
//DoctorUserId = reReadingVisitTask.DoctorUserId,
@@ -107,14 +107,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
.Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, IsAutoCreate = t.IsAutoCreate, IsAdditionalAssessment = t.IsAdditionalAssessment, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType, ReadingInfoSignTime = t.ReadingInfoSignTime })
.ToListAsync();
if (list.Count == 0)
{
//---该项目还未确认任何一个阅片标准
throw new BusinessValidationFailedException(_localizer["VisitTask_VisitTask_TaskAlreadyApplied"]);
}
//if (list.Count == 0)
//{
// //---该项目还未确认任何一个阅片标准
// throw new BusinessValidationFailedException(_localizer["VisitTask_VisitTask_TaskAlreadyApplied"]);
//}
return list.AsQueryable().WhereIf(isHaveSigned == true, t => t.ReadingInfoSignTime != null)
@@ -122,6 +120,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
/// <summary>
/// Subject 任务类型 统计 +分配情况
/// </summary>
@@ -1081,18 +1081,22 @@ namespace IRaCIS.Core.Application.Service.Allocation
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.DoctorUserId == _userInfo.Id
&& x.TaskState == TaskState.Effect /*&& x.TrialReadingCriterionId== inDto.TrialReadingCriterionId*/)
.WhereIf(critrion.IsAutoCreate == false, t => t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(t => t.ImageFilterState != ImageFilterState.Finished) ?
t.VisitTaskNum <= t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Min(t => t.SubjectVisit.VisitNum) : true)
//前序 不存在 未生成任务的访视
.WhereIf(critrion.IsAutoCreate == false, t => !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum) )
.Where(t => t.Subject.SubjectVisitList.Any(t => t.CheckState != CheckStateEnum.CVPassed) ? t.VisitTaskNum <= t.Subject.SubjectVisitList.Where(t => t.CheckState != CheckStateEnum.CVPassed).Min(t => t.VisitNum) : true)
// 前序 不存在 未一致性核查未通过的
.Where( t=>! t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
//.WhereIf(critrion.IsAutoCreate == false, t => t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(t => t.IsGeneratedTask == false) ?
//t.VisitTaskNum <= t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsGeneratedTask == false).Min(t => t.SubjectVisit.VisitNum) : true)
//.Where(t => t.Subject.SubjectVisitList.Any(t => t.CheckState != CheckStateEnum.CVPassed) ? t.VisitTaskNum <= t.Subject.SubjectVisitList.Where(t => t.CheckState != CheckStateEnum.CVPassed).Min(t => t.VisitNum) : true)
//满足前序访视不存在 需要签署但是未签署 sql 相当复杂 同时想查询所有未读的统计数字 就无法统计 byzhouhang
//但是加字段 IsFrontTaskNeedSignButNotSign 那么签名临床数据的时候,要对该subject 该标准的有效的任务 这个字段需要在签名的时候维护 采取这种方式 统计数字灵活
//.Where(t => t.Subject.SubjectVisitTaskList.AsQueryable().Where(visitTaskLambda).Any(c => c.IsNeedClinicalDataSign == true && c.IsClinicalDataSign == false && c.VisitTaskNum < t.VisitTaskNum))
.WhereIf(!string.IsNullOrEmpty(inDto.SubjectCode), t => (t.Subject.Code.Contains(inDto.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inDto.SubjectCode) && t.IsAnalysisCreate));
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
{
@@ -1141,7 +1145,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
// 不这样写会有问题
var count = visitQuery.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned && y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode }).Count();
.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode }).Count();
var result = new List<IRUnReadSubjectView>();
@@ -1269,7 +1273,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == trialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsAutoCreate, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException();
foreach (var task in taskList)
{
@@ -1334,13 +1337,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
// 有序
if (criterionConfig.IsReadingTaskViewInOrder)
{
// 针对同一个subject 不同阅片人 针对同一个访视申请重阅,是允许的,所以同一阅片人,针对同一suject 有访视申请重阅还未处理,不允许申请重阅
if (await _visitTaskReReadingRepository.AnyAsync(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect
&& t.OriginalReReadingTask.TrialReadingCriterionId == task.TrialReadingCriterionId
&& t.OriginalReReadingTask.TrialReadingCriterionId == task.TrialReadingCriterionId && t.OriginalReReadingTask.DoctorUserId == task.DoctorUserId
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.DocotorApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default))
{
//---当前为有序阅片,该受试者已有访视已申请重阅还未处理,暂不能继续申请重阅
return ResponseOutput.NotOk(_localizer["VisitTask_SequentialReading"]);
throw new BusinessValidationFailedException(_localizer["VisitTask_SequentialReading"]);
}
@@ -1354,10 +1357,11 @@ namespace IRaCIS.Core.Application.Service.Allocation
var originalTask = pmApply.OriginalReReadingTask;
//PM 有序影响列表
if (await _visitTaskRepository.Where(t => t.TrialId == originalTask.TrialId && t.SubjectId == originalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.TrialReadingCriterionId == originalTask.TrialReadingCriterionId && t.VisitTaskNum > originalTask.VisitTaskNum).AnyAsync(t => t.VisitTaskNum == task.VisitTaskNum))
if (await _visitTaskRepository.Where(t => t.TrialId == originalTask.TrialId && t.SubjectId == originalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.TrialReadingCriterionId == originalTask.TrialReadingCriterionId && t.VisitTaskNum >= originalTask.VisitTaskNum)
.AnyAsync(t => t.VisitTaskNum == task.VisitTaskNum))
{
//---当前为有序阅片,影像存在问题,项目组已申请回退,暂不能申请重阅
return ResponseOutput.NotOk(_localizer["VisitTask_ImageProblem"]);
throw new BusinessValidationFailedException(_localizer["VisitTask_ImageProblem"]);
}
}
@@ -1412,7 +1416,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
//添加申请记录
var visitTaskReReading = await _visitTaskReReadingRepository.AddAsync(new VisitTaskReReading()
{
TrialId=applyReReadingCommand.TrialId,
RootReReadingTaskId = rootReReadingTaskId == Guid.Empty ? task.Id : rootReReadingTaskId,
OriginalReReadingTaskId = task.Id,
RequestReReadingTime = DateTime.Now,
@@ -1526,7 +1530,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == origenalTask.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAdditionalAssessment, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync();
//更新申请信息
var visitTaskReReadingAppply = await _visitTaskReReadingRepository.FirstOrDefaultAsync(t => t.Id == item.Id);
visitTaskReReadingAppply.RequestReReadingConfirmUserId = _userInfo.Id;
@@ -1539,6 +1542,44 @@ namespace IRaCIS.Core.Application.Service.Allocation
//是否是一致性分析任务 正常申请 会影响一致性分析任务
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate);
//IR 申请1.1 基线重阅,影响附加评估两个IR所有的任务
var isIR1Point1AdditionalAssessmentBaseline = false;
//附加评估 IR 和PM 看到的影响列表不一样
//1.1 有附加评估,会影响其他标准的任务
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
{
// PM申请 SPM / CPM审批
if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM))
{
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
}
//IR 申请 PM审批
else
{
// 1.1 基线任务影响BM任务
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && _subjectVisitRepository.Any(t => t.Id == origenalTask.SourceSubjectVisitId && t.IsBaseLine == true))
{
isIR1Point1AdditionalAssessmentBaseline = true;
//filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
}
// 1.1 非基线任务不影响BM任务
else
{
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId);
}
}
}
else
{
//默认影响的都是该标准的任务
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId);
}
if (agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree)
{
@@ -1735,43 +1776,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
//IR申请 PM 审批 注意这里有一致性分析的申请同意 不会回退访视,在此要生成影响的访视任务
else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR))
{
#region IR 访,
await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.OriginalReReadingTask.SubjectId == origenalTask.SubjectId &&
t.OriginalReReadingTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed &&
t.RequestReReadingType == RequestReReadingType.DocotorApply &&
t.OriginalReReadingTask.VisitTaskNum == origenalTask.VisitTaskNum &&
t.Id != item.Id, u => new VisitTaskReReading()
{
RequestReReadingConfirmUserId = _userInfo.Id,
RequestReReadingResultEnum = RequestReReadingResult.Agree,
});
#endregion
//有序阅片
if (criterionConfig.IsReadingTaskViewInOrder)
{
//1.1 有附加评估,会影响其他标准的任务
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment == true)
{
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
}
else
{
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId);
}
#region IR 访
@@ -1795,6 +1805,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
)) || t.Id == origenalTask.Id)
;
}
else if (isIR1Point1AdditionalAssessmentBaseline)
{
filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum &&
(((
((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId)
// 裁判 肿瘤学是另外的医生做
|| t.ReadingCategory == ReadingCategory.Judge
|| t.ReadingCategory == ReadingCategory.Oncology
) && t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId) || (t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB))
);
}
else
{
filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum &&
@@ -1852,8 +1873,12 @@ namespace IRaCIS.Core.Application.Service.Allocation
var trakingOrigenalTask = influenceTaskList.Where(t => t.Id == origenalTask.Id).FirstOrDefault();
foreach (var influenceTask in influenceTaskList)
{
var beforeTaskState = influenceTask.TaskState;
//已签名的任务 设置转变后的标志
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
@@ -1879,7 +1904,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
var beforeTaskState = influenceTask.TaskState;
if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned)
{
@@ -1907,10 +1932,21 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
//当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && influenceTask.BeforeConvertedTaskId != null && influenceTaskList.Any(t => t.Id == influenceTask.BeforeConvertedTaskId))
// i1.1标准 当前任务是转变任务,并且影响列表里有转变之前的任务 那么该访视任务就不生成
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1)
{
continue;
//申请的任务是冻结的任务(该任务发生转变) 影响自己 以及转变后的 以及后续任务 但是生成的时候,仅仅生成转变之前的
//申请的是转变之后的任务 (转变生成的任务) 影响自己以及后续任务 生成转变后的任务
if (influenceTask.BeforeConvertedTaskId != null && influenceTaskList.Any(t => t.Id == influenceTask.BeforeConvertedTaskId))
{
//有转化的任务 和转化之前的任务时,转化后的任务时不生成的
continue;
}
//var canGenerateTaskIdList = influenceTaskList.GroupBy(t => new { t.VisitTaskNum, t.DoctorUserId, t.TrialReadingCriterionId, t.SubjectId })
// .Select(g => g.First().Id);
}
#region
@@ -1936,7 +1972,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id==origenalTask.Id)
if (visitTaskReReadingAppply.IsCopyOrigenalForms && influenceTask.Id == origenalTask.Id)
{
if (origenalTask.ReadingCategory == ReadingCategory.Visit)
{
@@ -2020,7 +2056,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
else
{
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId);
//1.当前任务及裁判任务
//2.影响当前阅片人的任务
filterExpression = filterExpression.And(t => t.Id == origenalTask.Id || t.Id == origenalTask.JudgeVisitTaskId);
@@ -2098,7 +2134,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
_ = _readingTaskQuestionAnswerRepository.AddRangeAsync(list).Result;
}
}
//拷贝后续表单
@@ -2190,7 +2226,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
var task = (await _visitTaskRepository.Where(t => t.Id == taskId).FirstOrDefaultAsync()).IfNullThrowException();
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == task.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAutoCreate, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException();
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == task.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.CriterionType, x.IsAutoCreate, x.IsAdditionalAssessment, x.IsReadingTaskViewInOrder }).FirstOrDefaultAsync()).IfNullThrowException();
if (criterionConfig.IsAutoCreate == false)
{
@@ -2219,6 +2255,21 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated;
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
{
//影像退回,必定影响两个标准的任务
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == task.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
}
else
{
//默认影响的都是该标准的任务
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == task.TrialReadingCriterionId);
}
//PM 才允许操作
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
{
@@ -2443,7 +2494,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
//BM后续访视 ,筛选状态不变,任务生成状态重置(实际该访视任务状态 可能是重阅重置了或者失效了,需要后续生成,或者取消分配了,需要后续重新分配)
await _subjectCriteriaEvaluationVisitFilterRepository.BatchUpdateNoTrackingAsync(t => t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB && t.SubjectVisit.SubjectId == task.SubjectId && otherVisitIdList.Contains(t.SubjectVisitId),
await _subjectCriteriaEvaluationVisitFilterRepository.UpdatePartialFromQueryAsync(t => t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB && t.SubjectVisit.SubjectId == task.SubjectId && otherVisitIdList.Contains(t.SubjectVisitId),
t => new SubjectCriteriaEvaluationVisitFilter()
{
IsGeneratedTask = false
@@ -2549,6 +2600,49 @@ namespace IRaCIS.Core.Application.Service.Allocation
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == filterObj.IsAnalysisCreate);
//IR 申请1.1 基线重阅,影响附加评估所有的任务
var isIR1Point1AdditionalAssessmentBaseline = false;
//附加评估 IR 和PM 看到的影响列表不一样
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
{
// IR 申请 PM 同意
if (((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.IndependentReviewer))
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null)))
{
// 1.1 基线任务影响BM任务
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && _subjectVisitRepository.Any(t=>t.Id==filterObj.SourceSubjectVisitId && t.IsBaseLine==true))
{
isIR1Point1AdditionalAssessmentBaseline=true;
//filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
}
// 1.1 非基线任务不影响BM任务
else
{
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId);
}
}
//(1、PM回退,PM申请重阅,SPM同意回退)
else
{
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
}
}
else
{
//默认影响的都是该标准的任务
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId);
}
//重阅影响
if (isReReading)
{
@@ -2561,30 +2655,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null))
{
//附加评估 IR 和PM 看到的影响列表不一样
if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment)
{
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
{
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB);
}
else
{
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId);
}
}
else
{
//默认影响的都是该标准的任务
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId);
}
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
//有序
if (criterionConfig.IsReadingTaskViewInOrder)
//有序
if (criterionConfig.IsReadingTaskViewInOrder)
{
switch (filterObj.ReadingCategory)
@@ -2593,11 +2667,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
//影响当前医生 以及当前医生之后的 1、访视任务 已经读完的
//2、后续任务如果是全局、肿瘤学阅片任务,状态为阅片完成标记为重阅重置;若在阅片中,则标记为失效;若为待阅片,则标记为失效;
//3、当前任务、后续访视任务或者全局任务触发了裁判任务,若裁判任务状态为阅片完成,则标记为重阅重置;若在阅片中或待阅片,则标记为失效
// filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
//((t.DoctorUserId == filterObj.DoctorUserId && ((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned) || t.ReadingCategory == ReadingCategory.Global))
// ||
// t.ReadingCategory == ReadingCategory.Judge || t.ReadingCategory == ReadingCategory.Oncology)
// );
//申请的是转化的,那么影响列表要排除转化之前的
if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && filterObj.BeforeConvertedTaskId != null)
@@ -2613,6 +2682,18 @@ namespace IRaCIS.Core.Application.Service.Allocation
)) || t.Id == filterObj.Id)
;
}
// IR 申请1.1 基线重阅,影响附加评估所有的任务
else if (isIR1Point1AdditionalAssessmentBaseline)
{
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
(((
((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == filterObj.DoctorUserId)
// 裁判 肿瘤学是另外的医生做
|| t.ReadingCategory == ReadingCategory.Judge
|| t.ReadingCategory == ReadingCategory.Oncology
)&& t.TrialReadingCriterionId==filterObj.TrialReadingCriterionId )||( t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB))
);
}
else
{
filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum &&
@@ -2691,6 +2772,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
else if (((_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM) && applyId != null && await _visitTaskReReadingRepository.AnyAsync(t => t.Id == applyId && t.CreateUser.UserTypeEnum == UserTypeEnum.ProjectManager) && filterObj.IsAnalysisCreate == false && filterObj.ReadingCategory == ReadingCategory.Visit)
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId == null))
{
//有序
if (criterionConfig.IsReadingTaskViewInOrder)
{
@@ -144,6 +144,7 @@ namespace IRaCIS.Core.Application.ViewModel
public string Value { get; set; } = string.Empty;
public string ValueCN { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public string DescriptionCN { get; set; } = string.Empty;
public DateTime CreateTime { get; set; }
public Guid CreateUserId { get; set; }
public DateTime UpdateTime { get; set; }
@@ -0,0 +1,75 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-06-01 13:38:20
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
namespace IRaCIS.Core.Application.ViewModel
{
/// <summary> InternationalizationView 列表视图模型 </summary>
public class InternationalizationView : InternationalizationAddOrEdit
{
public int ShowOrder { get; set; }
public Guid CreateUserId { get; set; }
public DateTime CreateTime { get; set; }
public DateTime UpdateTime { get; set; }
public Guid UpdateUserId { get; set; }
}
///<summary>InternationalizationQuery 列表查询参数模型</summary>
public class InternationalizationQuery : PageInput
{
public int? InternationalizationType { get; set; }
public int? State { get; set; }
public string? Description { get; set; }
public string? Code { get; set; }
public string? Value { get; set; }
public string? ValueCN { get; set; }
}
///<summary> InternationalizationAddOrEdit 列表查询参数模型</summary>
public class InternationalizationAddOrEdit
{
public Guid? Id { get; set; }
public int State { get; set; }
public string Description { get; set; } = string.Empty;
public string Code { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public string ValueCN { get; set; } = string.Empty;
public int InternationalizationType { get; set; }
}
public class BatchAddInternationalization
{
public int InternationalizationType { get; set; }
public int State { get; set; }
public List<BatchAddInternationalizationDto> AddList { get; set; }
}
public class BatchAddInternationalizationDto
{
public string Description { get; set; } = string.Empty;
public string Code { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public string ValueCN { get; set; } = string.Empty;
}
public class InternationalizationSimpleDto
{
public string Code { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public string ValueCN { get; set; } = string.Empty;
}
}
@@ -0,0 +1,44 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-06-27 15:47:02
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using System;
using IRaCIS.Core.Domain.Share;
using System.Collections.Generic;
namespace IRaCIS.Core.Application.ViewModel
{
/// <summary> PublishLogView 列表视图模型 </summary>
public class PublishLogView : PublishLogAddOrEdit
{
public DateTime CreateTime { get; set; }
public Guid CreateUserId { get; set; }
public Guid UpdateUserId { get; set; }
public DateTime UpdateTime { get; set; }
}
///<summary>PublishLogQuery 列表查询参数模型</summary>
public class PublishLogQuery:PageInput
{
public string? Version { get; set; }
public string? UpdateContent { get; set; }
}
///<summary> PublishLogAddOrEdit 列表查询参数模型</summary>
public class PublishLogAddOrEdit
{
public Guid? Id { get; set; }
public string Version { get; set; }
public DateTime PublishTime { get; set; }
public string UpdateContent { get; set; }
}
}
@@ -22,8 +22,10 @@ namespace IRaCIS.Application.Services
private readonly IRepository<Trial> _trialRepository;
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
private readonly IReadingQuestionService _readingQuestionService;
@@ -32,7 +34,8 @@ namespace IRaCIS.Application.Services
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial,
IReadingQuestionService readingQuestionService
@@ -47,7 +50,8 @@ namespace IRaCIS.Application.Services
_trialRepository = trialRepository;
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
this._readingQuestionService = readingQuestionService;
@@ -179,7 +183,14 @@ namespace IRaCIS.Application.Services
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
}
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
if (await _readingTrialCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
{
await _readingTrialCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
//---当前字典在标准中被引用,不允许删除!
//return ResponseOutput.NotOk(_localizer["Dictionary_DictionaryDeletion"]);
}
if (await _dicRepository.AnyAsync(t => t.ParentId == id))
{
//---有子项数据,不允许直接删除!
return ResponseOutput.NotOk(_localizer["Dictionary_SubitemDeletion"]);
@@ -201,12 +212,6 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk(_localizer["Dictionary_ProjectReference"]);
}
if (await _readingCriterionDictionaryRepository.AnyAsync(x => x.DictionaryId == id))
{
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DictionaryId == id);
//---当前条目已经在阅片标准中被引用。
//return ResponseOutput.NotOk(_localizer["Dictionary_StandardReference"]);
}
var success = await _dicRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
return ResponseOutput.Result(success);
@@ -293,7 +298,7 @@ namespace IRaCIS.Application.Services
{
var criterionCodes = await _trialCriterionDictionaryCodeRepository.Where(x => x.TrialCriterionId == inDto.TrialCriterionId).ToListAsync();
var parentCodes = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialCriterionId).Select(x => x.ParentCode).ToListAsync();
var parentCodes = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialCriterionId).Select(x => x.ParentCode).ToListAsync();
var codes = criterionCodes.Select(x => x.Code).ToList();
@@ -337,16 +342,49 @@ namespace IRaCIS.Application.Services
else
{
List<string> selectCode = new List<string>();
List<BasicDicSelect> criterionDictionList = new List<BasicDicSelect>();
var isSystemCriterion = await _readingQuestionCriterionSystem.AnyAsync(x => x.Id == inDto.ReadingCriterionId);
var isSystemCriterion = await _readingQuestionCriterionSystem.AnyAsync(x => x.Id == inDto.ReadingCriterionId);
if (isSystemCriterion)
{
selectCode = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.ReadingCriterionId).Select(x => x.Code).ToListAsync();
}
criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
{
ChildGroup = x.Dictionary.ChildGroup,
Code = x.Dictionary.Code,
DataTypeEnum = x.Dictionary.DataTypeEnum,
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
ShowOrder = x.Dictionary.ShowOrder,
ParentCode = x.ParentCode,
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
Id = x.DictionaryId,
ParentId = x.Dictionary.ParentId,
Value = x.Dictionary.Value,
ValueCN = x.Dictionary.ValueCN
}).ToListAsync();
}
else
{
selectCode = await _trialCriterionDictionaryCodeRepository.Where(x => x.TrialCriterionId == inDto.ReadingCriterionId).Select(x => x.Code).ToListAsync();
}
criterionDictionList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
{
ChildGroup = x.Dictionary.ChildGroup,
Code = x.Dictionary.Code,
DataTypeEnum = x.Dictionary.DataTypeEnum,
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
ShowOrder = x.Dictionary.ShowOrder,
ParentCode = x.ParentCode,
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
Id = x.DictionaryId,
ParentId = x.Dictionary.ParentId,
Value = x.Dictionary.Value,
ValueCN = x.Dictionary.ValueCN
}).ToListAsync();
}
var criterionCode = await _dicRepository.Where(x => x.ConfigDictionary.Code == "Reading_eCRF_Criterion").Select(x => x.Code).ToListAsync();
@@ -361,21 +399,7 @@ namespace IRaCIS.Application.Services
}
var criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.ReadingCriterionId).Select(x => new BasicDicSelect()
{
ChildGroup = x.Dictionary.ChildGroup,
Code = x.Dictionary.Code,
DataTypeEnum = x.Dictionary.DataTypeEnum,
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
ShowOrder = x.Dictionary.ShowOrder,
ParentCode = x.ParentCode,
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
Id = x.DictionaryId,
ParentId = x.Dictionary.ParentId,
Value = x.Dictionary.Value,
ValueCN = x.Dictionary.ValueCN
}).ToListAsync();
criterionDictionList = criterionDictionList.Where(x => selectCode.Contains(x.ParentCode)).ToList();
@@ -438,7 +462,7 @@ namespace IRaCIS.Application.Services
var criterionDictionList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId).Select(x => new BasicDicSelect()
var criterionDictionList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialReadingCriterionId).Select(x => new BasicDicSelect()
{
ChildGroup = x.Dictionary.ChildGroup,
Code = x.Dictionary.Code,
@@ -1,8 +1,10 @@
using DocumentFormat.OpenXml.Office2010.ExcelAc;
using DocumentFormat.OpenXml.Presentation;
using DocumentFormat.OpenXml.Spreadsheet;
using IRaCIS.Application.Contracts;
using IRaCIS.Application.Interfaces;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Contracts.DTO;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Share;
@@ -28,9 +30,167 @@ namespace IRaCIS.Core.Application.Service.Common
public class ExcelExportService : BaseService
{
#region
/// <summary>
/// 项目参与人员导出
/// </summary>
/// <param name="param"></param>
/// <param name="_commonDocumentRepository"></param>
/// <param name="_dictionaryService"></param>
/// <param name="_trialRepository"></param>
/// <param name="_trialUseRepository"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
[HttpPost]
[AllowAnonymous]
public async Task<IActionResult> TrialUserListExport(TrialMaintenanceExportQuery param,
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
[FromServices] IDictionaryService _dictionaryService,
[FromServices] IRepository<Trial> _trialRepository,
[FromServices] IRepository<TrialUser> _trialUseRepository
)
{
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = await _trialUseRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
.WhereIf(param.UserTypeId != null, t => t.User.UserTypeId == param.UserTypeId)
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.User.UserName.Contains(param.UserName))
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
.WhereIf(!string.IsNullOrWhiteSpace(param.OrganizationName),
t => t.User.OrganizationName.Contains(param.OrganizationName))
.WhereIf(!string.IsNullOrWhiteSpace(param.UserRealName),
t => (t.User.FullName).Contains(param.UserRealName))
.ProjectTo<TrialMaintenanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialUserList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialMaintenanceDTO));
}
/// <summary>
/// Site用户列表导出
/// </summary>
/// <param name="param"></param>
/// <param name="_commonDocumentRepository"></param>
/// <param name="_dictionaryService"></param>
/// <param name="_trialRepository"></param>
/// <param name="_trialSiteUserRepository"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
[HttpPost]
[AllowAnonymous]
public async Task<IActionResult> TrialSiteUserListExport(SiteCRCExportQueryDTO param,
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
[FromServices] IDictionaryService _dictionaryService,
[FromServices] IRepository<Trial> _trialRepository,
[FromServices] IRepository<TrialSiteUser> _trialSiteUserRepository
)
{
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = await _trialSiteUserRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName))
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName),
t => t.TrialSite.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode),
t => t.TrialSite.TrialSiteCode.Contains(param.TrialSiteCode))
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator,
t => t.UserId == _userInfo.Id)
.WhereIf(!string.IsNullOrWhiteSpace(param.UserKeyInfo), t => (t.User.FullName).Contains(param.UserKeyInfo)
|| t.User.UserName.Contains(param.UserKeyInfo) || t.User.EMail.Contains(param.UserKeyInfo))
.ProjectTo<SiteUserExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SiteUserExportDTO));
}
/// <summary>
/// Site用户汇总表导出
/// </summary>
/// <param name="queryParam"></param>
/// <param name="_commonDocumentRepository"></param>
/// <param name="_trialSiteSurveyRepository"></param>
/// <param name="_trialSiteUserSurveyRepository"></param>
/// <param name="_trialRepository"></param>
/// <param name="_dictionaryService"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
[HttpPost]
[AllowAnonymous]
public async Task<IActionResult> TrialSiteUserSummaryListExport(TrialSiteUserSurveyExportQueryDto queryParam,
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
[FromServices] IRepository<TrialSiteSurvey> _trialSiteSurveyRepository,
[FromServices] IRepository<TrialSiteUserSurvey> _trialSiteUserSurveyRepository,
[FromServices] IRepository<Trial> _trialRepository,
[FromServices] IDictionaryService _dictionaryService
)
{
var data = (await _trialRepository.Where(t => t.Id == queryParam.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
var groupSelectIdQuery =
_trialSiteSurveyRepository.Where(t => t.TrialId == queryParam.TrialId)
.WhereIf(queryParam.SiteId != null, t => t.SiteId == queryParam.SiteId)
.WhereIf(!string.IsNullOrEmpty(queryParam.FormWriterKeyInfo), t => (t.UserName).Contains(queryParam.FormWriterKeyInfo) || t.Email.Contains(queryParam.FormWriterKeyInfo) || t.Phone.Contains(queryParam.FormWriterKeyInfo))
.GroupBy(t => t.SiteId)
.Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First());
var query = _trialSiteUserSurveyRepository
.Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId))
.WhereIf(queryParam.UserTypeId != null, t => t.UserTypeId == queryParam.UserTypeId)
.WhereIf(queryParam.IsGenerateAccount != null, t => t.IsGenerateAccount == queryParam.IsGenerateAccount)
.WhereIf(queryParam.TrialRoleNameId != null, t => t.TrialRoleNameId == queryParam.TrialRoleNameId)
.WhereIf(queryParam.State != null && queryParam.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == queryParam.State)
.WhereIf(queryParam.State != null && queryParam.State == TrialSiteUserStateEnum.OverTime, t => t.InviteState == TrialSiteUserStateEnum.HasSend && t.ExpireTime < DateTime.Now)
.WhereIf(!string.IsNullOrEmpty(queryParam.UserName), t => (t.LastName + " / " + t.FirstName).Contains(queryParam.UserName))
.WhereIf(!string.IsNullOrEmpty(queryParam.OrganizationName), t => t.OrganizationName.Contains(queryParam.OrganizationName))
.ProjectTo<TrialSiteUserSummaryDto>(_mapper.ConfigurationProvider);
data.List = await query.ToListAsync();
var exportInfo = data;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserSummary_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialSiteUserSummaryDto));
}
#endregion
#region
/// <summary>
/// 影像上传列表 只导出已上传状态的访视记录
/// </summary>
@@ -72,7 +232,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == visitSearchDTO.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialCRCUploadImageList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
@@ -122,6 +282,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == challengeQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialQCImageChanllengeList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(QCChanllengeExportDto));
}
@@ -158,8 +319,9 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository , _hostEnvironment, _dictionaryService, typeof(SubjectExportDTO));
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectExportDTO));
}
@@ -235,15 +397,15 @@ namespace IRaCIS.Core.Application.Service.Common
IsFinalVisit = t.IsFinalVisit,
IsLostVisit = t.IsLostVisit,
ReadingStatus =
t.VisitTaskList.Where(t => t.TaskState == TaskState.Effect && t.TrialReadingCriterionId==dto.TrialReadingCriterionId && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() == (int)trialReadingCriterion.ReadingType ?
t.VisitTaskList.Where(t => t.TaskState == TaskState.Effect && t.TrialReadingCriterionId == dto.TrialReadingCriterionId && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() == (int)trialReadingCriterion.ReadingType ?
ReadingStatusEnum.ReadCompleted : t.VisitTaskList.Where(t => t.TaskState == TaskState.Effect && t.TrialReadingCriterionId == dto.TrialReadingCriterionId && t.IsAnalysisCreate == false && t.ReadingCategory == ReadingCategory.Visit && t.TaskAllocationState == TaskAllocationState.Allocated).Count() == (int)trialReadingCriterion.ReadingType ? ReadingStatusEnum.ImageReading :
t.ReadingStatus
}).ToList(),
ModuleList = subject.ReadModuleList.Where(t=>t.TrialReadingCriterionId==dto.TrialReadingCriterionId).Select(t => new SubjectProgressDto.MouduleProgress()
ModuleList = subject.ReadModuleList.Where(t => t.TrialReadingCriterionId == dto.TrialReadingCriterionId).Select(t => new SubjectProgressDto.MouduleProgress()
{
TaskName = t.ModuleName,
VisitTaskNum = (t.ReadingSetType == ReadingSetType.ImageReading ? ReadingCommon.TaskNumDic[ReadingCategory.Global] : ReadingCommon.TaskNumDic[ReadingCategory.Oncology]) + t.SubjectVisit.VisitNum,
VisitTaskNum = (t.ReadingSetType == ReadingSetType.ImageReading ? ReadingCommon.TaskNumDic[ReadingCategory.Global] : ReadingCommon.TaskNumDic[ReadingCategory.Oncology]) + t.SubjectVisit.VisitNum,
ReadingSetType = t.ReadingSetType,
ReadingStatus = t.ModuleTaskList.Where(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && (t.ReadingCategory == ReadingCategory.Oncology || t.ReadingCategory == ReadingCategory.Global) && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count() == (int)trialReadingCriterion.ReadingType ?
ReadingStatusEnum.ReadCompleted : t.ModuleTaskList.Where(t => t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && (t.ReadingCategory == ReadingCategory.Oncology || t.ReadingCategory == ReadingCategory.Global) && t.TaskAllocationState == TaskAllocationState.Allocated).Count() == (int)trialReadingCriterion.ReadingType ?
@@ -262,9 +424,10 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == dto.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == dto.TrialId && u.IsConfirm && u.Id == dto.TrialReadingCriterionId).Select(t=>t.CriterionName).FirstOrDefaultAsync();
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == dto.TrialId && u.IsConfirm && u.Id == dto.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(StaticData.Export.TrialSubjectProgressList_Export, exportInfo, /*"", */_commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectProgressDto));
@@ -334,7 +497,7 @@ namespace IRaCIS.Core.Application.Service.Common
return new FileStreamResult(memoryStream2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
{
FileDownloadName = $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}_{fileName.Substring(startIndex: 0, fileName.LastIndexOf('.'))}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"
FileDownloadName = $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}_{fileName/*.Substring(startIndex: 0, fileName.LastIndexOf('.'))*/}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.xlsx"
};
}
@@ -385,7 +548,7 @@ namespace IRaCIS.Core.Application.Service.Common
UploadFinishedTime = t.UploadFinishedTime,
ArchiveFinishedTime=t.ArchiveFinishedTime,
ArchiveFinishedTime = t.ArchiveFinishedTime,
UploadTime = t.CreateTime,
@@ -404,6 +567,8 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyUploadMonitor_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyMonitorExportDto));
@@ -438,6 +603,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectReadingPeriodList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadPeriodExportDto));
@@ -526,6 +692,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyExportDTO));
}
@@ -564,6 +731,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == checkQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectVisitCheckList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PMKCheckEXportDTO));
}
@@ -614,6 +782,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadingTaskExportDto));
}
@@ -664,6 +833,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReReadingTaskExportDto));
}
@@ -705,6 +875,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialMedicalReviewList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TaskMedicalReviewExportDto));
}
@@ -738,7 +909,7 @@ namespace IRaCIS.Core.Application.Service.Common
var subjectQuerybal = _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.TaskState == TaskState.Effect && t.IsSelfAnalysis == true).Select(t => t.SubjectId).Distinct();
var allList = await _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.TaskState == TaskState.Effect && subjectQuerybal.Contains(t.SubjectId) && t.ReadingCategory == ReadingCategory.Visit)
.Where(t => (t.IsSelfAnalysis == true || t.IsSelfAnalysis == null)&& t.VisitTaskNum>0) //一致性分析的结果 + 正常任务的结果 + 仅仅访视的结果 +去除基线
.Where(t => (t.IsSelfAnalysis == true || t.IsSelfAnalysis == null) && t.VisitTaskNum > 0) //一致性分析的结果 + 正常任务的结果 + 仅仅访视的结果 +去除基线
//.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
//.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
@@ -788,6 +959,7 @@ namespace IRaCIS.Core.Application.Service.Common
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == queryVisitTask.TrialId && u.IsConfirm && u.Id == queryVisitTask.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSelfAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SelftAnalysisExport));
}
@@ -812,7 +984,7 @@ namespace IRaCIS.Core.Application.Service.Common
if (criterion.CriterionType != CriterionType.RECIST1Point1)
{
//---当前标准导出还未支持
//---当前标准导出还未支持
throw new Exception(_localizer["ExcelExport_UnsupportedExport"]);
}
@@ -891,6 +1063,7 @@ namespace IRaCIS.Core.Application.Service.Common
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == queryVisitTask.TrialId && u.IsConfirm && u.Id == queryVisitTask.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
exportInfo.List = newList;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialGroupAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(GroupAnalysisExport));
}
@@ -938,7 +1111,7 @@ namespace IRaCIS.Core.Application.Service.Common
list.Add(new ExportDocumentDes() { Code = StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion });
}
if(criterion.CriterionType == CriterionType.PCWG3)
if (criterion.CriterionType == CriterionType.PCWG3)
{
list.Add(new ExportDocumentDes() { Code = StaticData.Export.OverallTumorEvaluation_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation });
list.Add(new ExportDocumentDes() { Code = StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, ExportCatogory = ExportCatogory.DetailedOfEvaluatedLesion });
@@ -950,9 +1123,37 @@ namespace IRaCIS.Core.Application.Service.Common
{
item.FileName = result.Where(t => t.Code == item.Code).FirstOrDefault()?.FileName;
}
return list;
}
public List<T> DealJudgeMark<T>(ArbitrationRule arbitrationRule, IEnumerable<T> list) where T : OverallTumorEvaluationExport
{
//处理裁判标记
{
var resultList = list.Where(t => t.ReadingCategory != ReadingCategory.Judge).ToList();
if (arbitrationRule == ArbitrationRule.Visit)
{
foreach (var item in resultList)
{
item.IsGenerateJudge = list.FirstOrDefault(t => t.ReadingCategory == ReadingCategory.Judge && t.SubjectCode == item.SubjectCode
&& (t.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Judge]) == item.VisitTaskNum)?.JudgeArmEnum == item.ArmEnum ? true : false;
}
}
if (arbitrationRule == ArbitrationRule.Reading)
{
foreach (var item in resultList)
{
item.IsGenerateJudge = list.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.SubjectCode == item.SubjectCode && t.VisitTaskNum>item.VisitTaskNum
).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault()?.JudgeArmEnum == item.ArmEnum ? true : false;
}
}
return resultList;
}
}
@@ -976,11 +1177,11 @@ namespace IRaCIS.Core.Application.Service.Common
//每次查询必须是单标准的
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName }).FirstNotNullAsync();
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync();
if (criterion.CriterionType != CriterionType.RECIST1Point1 && criterion.CriterionType != CriterionType.PCWG3)
{
//---当前标准导出还未支持
//---当前标准导出还未支持
throw new Exception(_localizer["ExcelExport_UnsupportedExport"]);
}
@@ -1006,12 +1207,16 @@ namespace IRaCIS.Core.Application.Service.Common
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
.ProjectTo<OverallTumorEvaluationExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType }).ToListAsync();
list= list.OrderBy(t=>t.SubjectCode).ThenBy(t=>t.VisitTaskNum).ToList();
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
exportInfo.CriterionName = criterion.CriterionName;
//处理裁判标记
list = DealJudgeMark(criterion.ArbitrationRule, list);
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.OverallTumorEvaluation_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(OverallTumorEvaluationExport), criterion.CriterionType);
@@ -1034,7 +1239,7 @@ namespace IRaCIS.Core.Application.Service.Common
{
//每次查询必须是单标准的
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName} ).FirstOrDefaultAsync();
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName, t.ArbitrationRule }).FirstOrDefaultAsync();
var query = _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingTaskState == ReadingTaskState.HaveSigned)
@@ -1064,14 +1269,21 @@ namespace IRaCIS.Core.Application.Service.Common
{
var list = await query.ProjectTo<RECIST1Point1EvaluationOfTumorEfficacyExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType }).ToListAsync();
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
//处理裁判标记
list = DealJudgeMark(criterion.ArbitrationRule, list);
exportInfo.List = list;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1EvaluationOfTumorEfficacyExport), criterion.CriterionType);
}
else
{
//---当前标准导出还未支持
//---当前标准导出还未支持
throw new Exception(_localizer["ExcelExport_UnsupportedExport"]);
}
@@ -1095,7 +1307,7 @@ namespace IRaCIS.Core.Application.Service.Common
{
//每次查询必须是单标准的
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName }).FirstOrDefaultAsync();
var criterion = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName,t.ArbitrationRule }).FirstOrDefaultAsync();
var query = _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingTaskState == ReadingTaskState.HaveSigned)
@@ -1125,6 +1337,7 @@ namespace IRaCIS.Core.Application.Service.Common
{
var list = await query.ProjectTo<RECIST1Point1DetailedOfEvaluatedLesionExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType, isEn_Us = _userInfo.IsEn_Us }).ToListAsync();
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
var exportList = list.SelectMany(c =>
{
@@ -1150,7 +1363,10 @@ namespace IRaCIS.Core.Application.Service.Common
});
}).ToList();
//处理裁判标记
list = DealJudgeMark(criterion.ArbitrationRule, list);
exportInfo.List = exportList;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1DetailedOfEvaluatedLesionExport), criterion.CriterionType);
@@ -1180,7 +1396,10 @@ namespace IRaCIS.Core.Application.Service.Common
});
}).ToList();
//处理裁判标记
list = DealJudgeMark(criterion.ArbitrationRule, list);
exportInfo.List = exportList;
exportInfo.IsEn_US = _userInfo.IsEn_Us;
return await ExcelExportHelper.DataExportAsync(StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PCWG3DetailedOfEvaluatedLesionExport), criterion.CriterionType);
@@ -1188,7 +1407,7 @@ namespace IRaCIS.Core.Application.Service.Common
else
{
//---当前标准导出还未支持
//---当前标准导出还未支持
throw new Exception(_localizer["ExcelExport_UnsupportedExport"]);
}
@@ -0,0 +1,24 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-06-01 13:38:06
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Application.ViewModel;
namespace IRaCIS.Core.Application.Interfaces
{
/// <summary>
/// IInternationalizationService
/// </summary>
public interface IInternationalizationService
{
Task<PageOutput<InternationalizationView>> GetInternationalizationList(InternationalizationQuery inQuery);
Task<IResponseOutput> AddOrUpdateInternationalization(InternationalizationAddOrEdit addOrEditInternationalization);
Task<IResponseOutput> DeleteInternationalization(Guid internationalizationId);
}
}
@@ -0,0 +1,24 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-06-27 15:47:10
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Application.ViewModel;
namespace IRaCIS.Core.Application.Interfaces
{
/// <summary>
/// IPublishLogService
/// </summary>
public interface IPublishLogService
{
Task<PageOutput<PublishLogView>> GetPublishLogList(PublishLogQuery inQuery);
Task<IResponseOutput> AddOrUpdatePublishLog(PublishLogAddOrEdit addOrEditPublishLog);
Task<IResponseOutput> DeletePublishLog(Guid publishLogId);
}
}
@@ -0,0 +1,127 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-06-01 13:42:25
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Domain.Models;
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using Microsoft.AspNetCore.Authorization;
using IRaCIS.Core.Application.Helper;
namespace IRaCIS.Core.Application.Service
{
/// <summary>
/// InternationalizationService
/// </summary>
[ApiExplorerSettings(GroupName = "Common")]
public class InternationalizationService : BaseService, IInternationalizationService
{
private readonly IRepository<Internationalization> _internationalizationRepository;
public InternationalizationService(IRepository<Internationalization> internationalizationRepository)
{
_internationalizationRepository = internationalizationRepository;
}
[AllowAnonymous]
public async Task<List<InternationalizationSimpleDto>> GetFrontInternationalizationList()
{
var list = await _internationalizationRepository.Where(t => t.InternationalizationType == 0).Select(t => new InternationalizationSimpleDto()
{
Code = t.Code,
Value = t.Value,
ValueCN = t.ValueCN
}).ToListAsync();
return list;
}
[HttpPost]
public async Task<PageOutput<InternationalizationView>> GetInternationalizationList(InternationalizationQuery inQuery)
{
var internationalizationQueryable = _internationalizationRepository
.WhereIf(inQuery.Description != null, t => t.Description.Contains(inQuery.Description))
.WhereIf(inQuery.Code != null, t => t.Code.Contains(inQuery.Code))
.WhereIf(inQuery.State != null, t => t.State == inQuery.State)
.WhereIf(inQuery.InternationalizationType != null, t => t.InternationalizationType == inQuery.InternationalizationType)
.WhereIf(inQuery.Value != null, t => t.Value.Contains(inQuery.Value))
.WhereIf(inQuery.ValueCN != null, t => t.ValueCN.Contains(inQuery.ValueCN))
.ProjectTo<InternationalizationView>(_mapper.ConfigurationProvider);
var pageList = await internationalizationQueryable
.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(InternationalizationView.State) : inQuery.SortField,
inQuery.Asc);
return pageList;
}
[HttpPost]
public async Task<IResponseOutput> BatchAddInternationalization(BatchAddInternationalization batchAdd)
{
foreach (var item in batchAdd.AddList)
{
var mapItem = _mapper.Map<InternationalizationAddOrEdit>(item);
mapItem.InternationalizationType = batchAdd.InternationalizationType;
mapItem.State = batchAdd.State;
var verifyExp1 = new EntityVerifyExp<Internationalization>()
{
VerifyExp = t => t.Code == mapItem.Code && t.InternationalizationType == mapItem.InternationalizationType,
VerifyMsg = $"该类型已有{item.Code}名称的国际化标识",
IsVerify = true
};
var entity = await _internationalizationRepository.InsertOrUpdateAsync(mapItem, false, verifyExp1);
}
await _internationalizationRepository.SaveChangesAsync();
return ResponseOutput.Ok();
}
public async Task<IResponseOutput> AddOrUpdateInternationalization(InternationalizationAddOrEdit addOrEditInternationalization)
{
var verifyExp1 = new EntityVerifyExp<Internationalization>()
{
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType,
VerifyMsg = $"该类型已有{addOrEditInternationalization.Code}名称的国际化标识",
IsVerify = true
};
var entity = await _internationalizationRepository.InsertOrUpdateAsync(addOrEditInternationalization, true, verifyExp1);
if (addOrEditInternationalization.InternationalizationType == 1)
{
await InternationalizationHelper.AddOrUpdateJsonKeyValueAsync(entity.Code, entity.Value, entity.ValueCN);
}
return ResponseOutput.Ok(entity.Id.ToString());
}
[HttpDelete("{internationalizationId:guid}")]
public async Task<IResponseOutput> DeleteInternationalization(Guid internationalizationId)
{
var success = await _internationalizationRepository.DeleteFromQueryAsync(t => t.Id == internationalizationId, true);
return ResponseOutput.Ok();
}
}
}
@@ -110,7 +110,8 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ "UserOptCommon.html";
//+ "UserOptCommon.html";
+(_userInfo.IsEn_Us ? "UserOptCommon_US.html" : "UserOptCommon.html");
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
@@ -176,7 +177,8 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ "UserOptCommon.html";
//+ "UserOptCommon.html";
+ (_userInfo.IsEn_Us ? "UserOptCommon_US.html" : "UserOptCommon.html");
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
@@ -184,7 +186,6 @@ namespace IRaCIS.Application.Services
builder.HtmlBody = string.Format(templateInfo,
"",
//---您正在进行邮箱重置密码操作
_localizer["Mail_ResettingPassword "],
verificationCode
@@ -244,7 +245,7 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ "UserOptCommon.html";
+ (_userInfo.IsEn_Us ? "UserOptCommon_US.html": "UserOptCommon.html" );
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
@@ -252,7 +253,6 @@ namespace IRaCIS.Application.Services
builder.HtmlBody = string.Format(templateInfo,
"",
//---您正在参与展影医疗IRC项目
_localizer["Mail_IRCProject"],
verificationCode
@@ -310,7 +310,8 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ "UserOptCommon.html";
//+ "UserOptCommon.html";
+ (_userInfo.IsEn_Us ? "UserOptCommon_US.html" : "UserOptCommon.html");
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
@@ -318,7 +319,6 @@ namespace IRaCIS.Application.Services
builder.HtmlBody = string.Format(templateInfo,
"",
//---您正在参与展影医疗IRC项目中心调研工作
_localizer["Mail_CenterResearchReminder"],
verificationCode
@@ -388,13 +388,14 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ "AdminAddUser.html";
//+ "AdminAddUser.html";
+ (_userInfo.IsEn_Us ? "AdminAddUser_US.html" : "AdminAddUser.html");
var token = _tokenService.GetToken(IRaCISClaims.Create(_mapper.Map<UserBasicInfo>(sysUserInfo)));
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id, u => new User() { EmailToken = token });
routeUrl = routeUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&access_token=" + token;
routeUrl = routeUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us?"en":"zh") + "&access_token=" + token;
var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login"));
@@ -443,7 +444,8 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ "AdminResetUser.html";
//+ "AdminResetUser.html";
+ (_userInfo.IsEn_Us ? "AdminResetUser_US.html" : "AdminResetUser.html");
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
@@ -501,13 +503,13 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ (sysUserInfo.IsFirstAdd ? "TrialUserFirstJoin.html" : "TrialUserExistJoin.html");
+ (sysUserInfo.IsFirstAdd ? (_userInfo.IsEn_Us ? "TrialUserFirstJoin_US.html" : "TrialUserFirstJoin.html") : (_userInfo.IsEn_Us ? "TrialUserExistJoin_US.html" : "TrialUserExistJoin.html"));
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
var templateInfo = SourceReader.ReadToEnd();
var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&access_token=" + token;
var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token;
var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login"));
@@ -563,7 +565,7 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ (sysUserInfo.IsFirstAdd ? "TrialUserFirstJoin.html" : "TrialUserExistJoin.html");
+ (sysUserInfo.IsFirstAdd ? (_userInfo.IsEn_Us ? "TrialUserFirstJoin_US.html" : "TrialUserFirstJoin.html") : (_userInfo.IsEn_Us ? "TrialUserExistJoin_US.html" : "TrialUserExistJoin.html") );
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
@@ -571,7 +573,7 @@ namespace IRaCIS.Application.Services
var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login"));
var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&access_token=" + token;
var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + sysUserInfo.UserTypeRole.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token;
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
@@ -683,13 +685,13 @@ namespace IRaCIS.Application.Services
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ (sysUserInfo.IsFirstAdd ? "TrialDoctorFirstJoin.html" : "TrialDoctorExistJoin.html");
+ (sysUserInfo.IsFirstAdd ? (_userInfo.IsEn_Us ? "TrialDoctorFirstJoin_US.html" : "TrialDoctorFirstJoin.html") : (_userInfo.IsEn_Us ? "TrialDoctorExistJoin_US.html" : "TrialDoctorExistJoin.html") );
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
var templateInfo = SourceReader.ReadToEnd();
var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + userType.UserTypeShortName + "&access_token=" + token;
var routeUrl = rootUrl + "?UserId=" + sysUserInfo.Id + "&Email=" + sysUserInfo.EMail + "&UserName=" + sysUserInfo.UserName + "&UserType=" + userType.UserTypeShortName + "&lang=" + (_userInfo.IsEn_Us ? "en" : "zh") + "&access_token=" + token;
var domain = baseUrl.Substring(0, baseUrl.IndexOf("/login"));
@@ -0,0 +1,79 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-06-27 15:47:06
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Domain.Models;
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Application.Contracts;
namespace IRaCIS.Core.Application.Service
{
/// <summary>
/// PublishLogService
/// </summary>
[ApiExplorerSettings(GroupName = "Common")]
public class PublishLogService : BaseService, IPublishLogService
{
private readonly IRepository<PublishLog> _publishLogRepository;
public PublishLogService(IRepository<PublishLog> publishLogRepository)
{
_publishLogRepository = publishLogRepository;
}
[HttpPost]
public async Task<PageOutput<PublishLogView>> GetPublishLogList(PublishLogQuery inQuery)
{
var publishLogQueryable = _publishLogRepository
.WhereIf(!string.IsNullOrEmpty(inQuery.Version) , t => t.Version.Contains(inQuery.Version))
.WhereIf(!string.IsNullOrEmpty(inQuery.UpdateContent), t => t.UpdateContent.Contains(inQuery.UpdateContent))
.ProjectTo<PublishLogView>(_mapper.ConfigurationProvider);
var pageList = await publishLogQueryable
.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc);
return pageList;
}
public async Task<IResponseOutput> AddOrUpdatePublishLog(PublishLogAddOrEdit addOrEditPublishLog)
{
Version version;
if (!Version.TryParse(addOrEditPublishLog.Version, out version))
{
return ResponseOutput.NotOk("版本号不符合要求");
}
var verifyExp1 = new EntityVerifyExp<PublishLog>()
{
VerifyExp = u => u.Version == addOrEditPublishLog.Version ,
VerifyMsg = "发布编号不能重复"
};
var entity = await _publishLogRepository.InsertOrUpdateAsync(addOrEditPublishLog, true, verifyExp1);
return ResponseOutput.Ok(entity.Id.ToString());
}
[HttpDelete("{publishLogId:guid}")]
public async Task<IResponseOutput> DeletePublishLog(Guid publishLogId)
{
var success = await _publishLogRepository.DeleteFromQueryAsync(t => t.Id == publishLogId, true);
return ResponseOutput.Ok();
}
}
}
@@ -16,6 +16,8 @@ using System.Text.Json.Nodes;
using System.Text.Encodings.Web;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using IRaCIS.Core.Infrastructure;
using IRaCIS.Core.Application.Helper;
namespace IRaCIS.Core.Application.Service.Common
{
@@ -47,133 +49,91 @@ namespace IRaCIS.Core.Application.Service.Common
public string GetBestStoreDisk()
{
var json = File.ReadAllText("appsettings.json");
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
int switchingRatio = 80;
try
{
switchingRatio = (int)jsonObject["IRaCISImageStore"]["SwitchingRatio"];
}
catch (Exception e)
{
//---解析Json文件配置出现问题
throw new BusinessValidationFailedException(_localizer["SysMon_JsonConfig"]+e.Message);
}
//默认存储的路径
var defaultStoreRootFolder = Path.Combine((Directory.GetParent(_hostEnvironment.ContentRootPath.TrimEnd('\\'))).IfNullThrowException().FullName, StaticData.Folder.IRaCISDataFolder);
var defaultStoreRootFolder = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
DriveInfo defaultDrive = new DriveInfo(Path.GetPathRoot(defaultStoreRootFolder));
var drives = DriveInfo.GetDrives().Where(t => !t.Name.Contains("C") && !t.Name.Contains("c"))
.Where(d => d.DriveType == DriveType.Fixed && d.IsReady)
//剩余空间最多的
.OrderByDescending(d => d.AvailableFreeSpace)
//存储空间相同,则按照按照总空间从大到小排序
.ThenByDescending(d => d.TotalSize - d.TotalFreeSpace);
var bestDrive = drives.FirstOrDefault();
var bestStoreRootFolder = string.Empty;
//仅仅只有C 盘
if (bestDrive == null)
if (bestDrive == null || ((double)(defaultDrive.TotalSize - defaultDrive.TotalFreeSpace) / defaultDrive.TotalSize) * 100 < switchingRatio)
{
bestStoreRootFolder = defaultStoreRootFolder;
}
else
{
bestStoreRootFolder = drives.FirstOrDefault()?.Name + _hostEnvironment.EnvironmentName;
bestStoreRootFolder = Path.Combine(bestDrive?.RootDirectory.FullName, _hostEnvironment.EnvironmentName);
}
DriveInfo drive = new DriveInfo(Path.GetPathRoot(defaultStoreRootFolder));
//最优盘符使用率超过百分之80
if (((double)(drive.TotalSize - drive.TotalFreeSpace) / drive.TotalSize) * 100 > 80)
////找到最优驱动器
//DriveInfo drive = new DriveInfo(Path.GetPathRoot(bestStoreRootFolder));
////最优盘符使用率超过百分之80
//if (((double)(drive.TotalSize - drive.TotalFreeSpace) / drive.TotalSize) * 100 > switchingRatio)
//{
//}
if (!Directory.Exists(bestStoreRootFolder))
{
Directory.CreateDirectory(bestStoreRootFolder);
}
return bestStoreRootFolder;
}
public class GeneralRule
{
public string Endpoint { get; set; }
public string Period { get; set; }
public int Limit { get; set; }
}
public void UpdateAppSettings(string key, string newValue)
{
#region NewtonSoftJson
//// 读取 JSON 文件
//string jsonFilePath = "appsettings.json";
//string jsonString = File.ReadAllText(jsonFilePath);
//// 解析 JSON 文件
//var jObject = JsonConvert.DeserializeObject<JObject>(jsonString);
//// 更新或添加配置项
//jObject[key] = newValue;
//// 将更新后的 JSON 字符串写入文件
//using var streamWriter = new StreamWriter(jsonFilePath);
//using var jsonTextWriter = new JsonTextWriter(streamWriter);
//jsonTextWriter.Formatting = Formatting.Indented;
//jObject.WriteTo(jsonTextWriter);
#endregion
#region test
//var json = File.ReadAllText("appsettings.json");
//var jObject = JToken.Parse(json, new JsonLoadSettings { CommentHandling = CommentHandling.Load,DuplicatePropertyNameHandling=DuplicatePropertyNameHandling.Ignore });
//// Update or add the property
//jObject[key] = newValue;
//// Preserve comments
//var settings = new JsonSerializerSettings
//{
// PreserveReferencesHandling = PreserveReferencesHandling.Objects,
// Formatting = Formatting.Indented,
// StringEscapeHandling = StringEscapeHandling.Default,
//};
//var updatedJson = JsonConvert.SerializeObject(jObject, settings);
//File.WriteAllText("appsettings.json", updatedJson);
//var json = File.ReadAllText("appsettings.json");
//var jToken = JToken.Parse(json);
//// Update or add the property
//jToken[key] = newValue;
//// Preserve comments
//var settings = new JsonSerializerSettings
//{
// TypeNameHandling = TypeNameHandling.All,
// PreserveReferencesHandling = PreserveReferencesHandling.Objects,
// Formatting = Formatting.Indented,
// StringEscapeHandling = StringEscapeHandling.Default
//};
//var updatedJson = JsonConvert.SerializeObject(jToken, settings);
//File.WriteAllText("appsettings.json", updatedJson);
//string json = @"{
// // This is a comment
// ""Name"": ""John Smith"",
// ""Age"": 30,
// ""Address"": {
// // This is another comment
// ""Street"": ""123 Main St"",
// ""City"": ""Anytown"",
// ""State"": ""CA"",
// ""Zip"": ""12345""
// }
//}";
//// 使用 Json.NET 库解析 JSON 字符串
//JObject jObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
//// 修改属性
//jObject["Name"] = "Jane Smith";
//// 将修改后的 JObject 对象序列化为 JSON 字符串并保留注释
//string newJson = jObject.ToString(Newtonsoft.Json.Formatting.Indented);
//// 打印修改后的 JSON 字符串
//Console.WriteLine(newJson);
#endregion
List<GeneralRule> generalRules = new List<GeneralRule>()
{
new GeneralRule() { Endpoint = "*", Period = "1s", Limit = 3 },
new GeneralRule() { Endpoint = "*", Period = "15m", Limit = 100 },
new GeneralRule() { Endpoint = "*", Period = "12h", Limit = 1000 },
new GeneralRule() { Endpoint = "*", Period = "7d", Limit = 10000 }
};
// 读取 Json 文件
string jsonFilePath = "appsettings.json";
@@ -181,37 +141,17 @@ namespace IRaCIS.Core.Application.Service.Common
var json = File.ReadAllText("appsettings.json");
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
// 获取 UpdateConfig 属性所在的节点
JToken updateConfigNode = jsonObject.SelectToken("UpdateConfig");
JProperty updateConfigProperty = (JProperty)updateConfigNode.Parent;
JObject updateConfigParent = (JObject)updateConfigProperty.Value;
// 向 updateConfigParent 添加或者属性
updateConfigParent[key] = newValue;
// 操作UpdateConfig对象
jsonObject["UpdateConfig"][key] = newValue;
jsonObject["UpdateConfig"]["testArray"] = JArray.FromObject(generalRules);
// 将更改保存回 Json 文件
File.WriteAllText(jsonFilePath, jsonObject.ToString());
//using (var reader = new JsonTextReader(new StringReader(json)))
//using (var writer = new JsonTextWriter(new StreamWriter("appsettings.json")))
//{
// while (reader.Read())
// {
// if (reader.TokenType == JsonToken.PropertyName && (string)reader.Value == key)
// {
// // Write the updated property value
// writer.WritePropertyName(key);
// writer.WriteValue(newValue);
// reader.Read();
// continue;
// }
// // Write all other tokens
// writer.WriteToken(reader.TokenType, reader.Value);
// }
//}
@@ -54,7 +54,16 @@ namespace IRaCIS.Core.Application.Service
CreateMap<CommonDocument, CommonDocumentAddOrEdit>().ReverseMap();
CreateMap<Internationalization, InternationalizationView>();
CreateMap<Internationalization, InternationalizationAddOrEdit>().ReverseMap();
CreateMap<BatchAddInternationalizationDto, InternationalizationAddOrEdit>();
CreateMap<PublishLog, PublishLogView>();
CreateMap<PublishLog, PublishLogAddOrEdit>().ReverseMap();
}
}
@@ -17,8 +17,5 @@ namespace IRaCIS.Application.Contracts
public string AwardsHonorsCN { get; set; } = String.Empty;
public string BlindPublications { get; set; }
}
}
@@ -67,9 +67,9 @@ namespace IRaCIS.Application.Services
ReviewerSelectionQueryDTO selectionQuery)
{
//项目配置需要的医生过滤 2表示混合
var trialConfig = await _repository.Where<Trial>(s => s.Id == selectionQuery.TrialId).Select(t=>new { t.AttendedReviewerType ,t.TrialType} ).FirstOrDefaultAsync().IfNullThrowException();
var trialConfig = await _repository.Where<Trial>(s => s.Id == selectionQuery.TrialId).Select(t=>new { t.AttendedReviewerTypeEnumList ,t.TrialType} ).FirstOrDefaultAsync().IfNullThrowException();
var nation = trialConfig.AttendedReviewerType;
//var nation = trialConfig.AttendedReviewerType;
// 临床项目经验 多选
var evaluationCriteriaCount = selectionQuery.EvaluationCriteriaIdList.Count();
@@ -78,7 +78,8 @@ namespace IRaCIS.Application.Services
var guidList = selectionQuery.ReadingTypeIdList.Concat(selectionQuery.SubspecialityIdList).Concat(selectionQuery.TitleIdList);
var query = _doctorRepository.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)
var query = _doctorRepository/*.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)*/
.WhereIf(selectionQuery.DepartmentId != null, t => t.DepartmentId == selectionQuery.DepartmentId)
.WhereIf(selectionQuery.SpecialityId != null, t => t.SpecialityId == selectionQuery.SpecialityId)
.WhereIf(trialConfig.TrialType == TrialType.NoneOfficial, t => t.IsVirtual ==true)
@@ -92,7 +93,7 @@ namespace IRaCIS.Application.Services
.WhereIf(!string.IsNullOrWhiteSpace(selectionQuery.Name), t => t.ChineseName.Contains(selectionQuery.Name) || (t.LastName + t.FirstName).Contains(selectionQuery.Name))
.WhereIf(evaluationCriteriaCount > 0, t => t.TrialExperienceCriteriaList.Count(t => selectionQuery.EvaluationCriteriaIdList.Contains(t.EvaluationCriteriaId)) == evaluationCriteriaCount)
//用户类型 看到简历的范围这里需要确认
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ReviewerCoordinator, t => t.UserList.Any(u => u.UserId == _userInfo.Id))
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ReviewerCoordinator, t => t.UserList.Any(u => u.UserId == _userInfo.Id))
.WhereIf(count > 0, t => t.DoctorDicRelationList.Count(u => guidList.Contains(u.DictionaryId)) == count)
.WhereIf(selectionQuery.EnrollStatus != null && selectionQuery.EnrollStatus == (int)ReviewerEnrollStatus.Yes, t => t.EnrollList.Any(u => u.EnrollStatus == EnrollStatus.DoctorReading))
@@ -161,6 +162,10 @@ namespace IRaCIS.Application.Services
u.OptTime = opt.OptTime;
u.OptUserName = opt.OptUserName;
}
else
{
u.DoctorTrialState = param.IntoGroupSearchState == 1 ? (int)EnrollStatus.HasDownloadResume : (int)EnrollStatus.HasCommittedToCRO;
}
});
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM)
@@ -94,7 +94,7 @@ namespace IRaCIS.Application.Services
await _doctorRepository.AddAsync(doctor);
//_doctorRepository.Add(doctor);
await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
//await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
//_userDoctorRepository.Add(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
var success = await _repository.SaveChangesAsync();
@@ -155,8 +155,6 @@ namespace IRaCIS.Application.Services
await _repository.BatchDeleteAsync<Attachment>(a => a.Id == updateGCPExperienceParam.GCPId);
}
return ResponseOutput.Result(successs, updateGCPExperienceParam.GCPId.ToString());
}
@@ -19,7 +19,7 @@ namespace IRaCIS.Core.Application.Contracts
Task<(PageOutput<UnionDocumentWithConfirmInfoView>, object)> GetDocumentConfirmList(DocumentTrialUnionQuery querySystemDocument);
Task<PageOutput<TrialDocumentView>> GetTrialDocumentList(TrialDocumentQuery queryTrialDocument);
Task<(PageOutput<UnionDocumentWithConfirmInfoView>, object)> GetUserDocumentList(TrialUserDocUnionQuery querySystemDocument);
Task<IResponseOutput<PageOutput<UnionDocumentWithConfirmInfoView>> > GetUserDocumentList(TrialUserDocUnionQuery querySystemDocument);
Task<IResponseOutput> SetFirstViewDocumentTime(Guid documentId, bool isSystemDoc);
Task<IResponseOutput> UserConfirm(UserConfirmCommand userConfirmCommand);
Task<List<TrialUserDto>> GetTrialUserSelect(Guid trialId);
@@ -27,11 +27,16 @@ namespace IRaCIS.Core.Application.Services
private readonly IRepository<Trial> _trialRepository;
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
private readonly IRepository<SystemDocument> _systemDocumentRepository;
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
public TrialDocumentService(IRepository<TrialDocument> trialDocumentRepository,
IRepository<TrialDocConfirmedUser> trialDocUserTypeConfirmedUserRepository,
IRepository<Trial> trialRepository,
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository,
IRepository<TrialCriterionAdditionalAssessmentType> trialCriterionAdditionalAssessmentTypeRepository,
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository
, IRepository<SystemDocument> systemDocumentRepository)
{
_trialDocumentRepository = trialDocumentRepository;
@@ -39,6 +44,8 @@ namespace IRaCIS.Core.Application.Services
this._trialRepository = trialRepository;
this._systemDocConfirmedUserRepository = systemDocConfirmedUserRepository;
_systemDocumentRepository = systemDocumentRepository;
_readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
_trialCriterionAdditionalAssessmentTypeRepository = trialCriterionAdditionalAssessmentTypeRepository;
}
/// <summary>
@@ -66,7 +73,7 @@ namespace IRaCIS.Core.Application.Services
/// <param name="querySystemDocument"></param>
/// <returns></returns>
[HttpPost]
public async Task<(PageOutput<UnionDocumentWithConfirmInfoView>,object)> GetUserDocumentList(TrialUserDocUnionQuery querySystemDocument)
public async Task< IResponseOutput<PageOutput<UnionDocumentWithConfirmInfoView>> > GetUserDocumentList(TrialUserDocUnionQuery querySystemDocument)
{
#region https://github.com/dotnet/efcore/issues/16243 操作不行
////系统文档查询
@@ -128,6 +135,8 @@ namespace IRaCIS.Core.Application.Services
#endregion
var trialId = querySystemDocument.TrialId;
var trialInfo = await (_repository.Where<Trial>(t => t.Id == querySystemDocument.TrialId).Select(t => new { t.TrialFinishedTime,t.TrialStatusStr } ).FirstOrDefaultAsync());
//系统文档查询
@@ -218,7 +227,15 @@ namespace IRaCIS.Core.Application.Services
var trialTaskConfig = _trialRepository.Where(t => t.Id == querySystemDocument.TrialId).ProjectTo<TrialProcessConfigDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
return (result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, TrialStatusStr= trialInfo.TrialStatusStr,TrialConfig= trialTaskConfig });
//var trialCriterionAdditionalAssessmentTypeList = _trialCriterionAdditionalAssessmentTypeRepository
// .Where(t => t.TrialReadingCriterion.TrialId == trialId && t.IsSelected == true && t.TrialReadingCriterion.IsSigned).Select(t=>new { t.CriterionType,t.AdditionalAssessmentType}).ToList();
var isManualGenerateTask= _readingQuestionCriterionTrialRepository.Where(t=>t.TrialId==trialId && t.IsSigned && t.IsAutoCreate==false).Any();
var isAdditionalAssessment = _readingQuestionCriterionTrialRepository.Where(t => t.TrialId == trialId && t.IsSigned && t.IsAdditionalAssessment == true
&&t.TrialCriterionAdditionalAssessmentTypeList.Any(c=>/*c.AdditionalAssessmentType==Domain.Share.Reading.AdditionalAssessmentType.BrainMetastasis &&*/ c.IsSelected==true)).Any();
return ResponseOutput.Ok<PageOutput<UnionDocumentWithConfirmInfoView>>( result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, IsAdditionalAssessment = isAdditionalAssessment && isManualGenerateTask, TrialStatusStr = trialInfo.TrialStatusStr,TrialConfig= trialTaskConfig });
}
@@ -382,8 +399,8 @@ namespace IRaCIS.Core.Application.Services
[HttpGet("{trialId:guid}")]
public async Task<IResponseOutput> GetTrialDocAndSystemDocType(Guid trialId)
{
var result = await _trialDocumentRepository.Where(t => t.TrialId == trialId).Select(t => new { FileType = t.FileType.Value, t.FileTypeId })
.Union(_systemDocumentRepository.Select(t => new { FileType = t.FileType.Value, t.FileTypeId }))
var result = await _trialDocumentRepository.Where(t => t.TrialId == trialId).Select(t => new { FileType = _userInfo.IsEn_Us? t.FileType.Value :t.FileType.ValueCN, t.FileTypeId })
.Union(_systemDocumentRepository.Select(t => new { FileType = _userInfo.IsEn_Us ? t.FileType.Value : t.FileType.ValueCN, t.FileTypeId }))
.ToListAsync();
return ResponseOutput.Ok(result);
@@ -431,7 +431,8 @@ namespace IRaCIS.Core.Application.Service
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ "SubjectEnrollConfirmOrPDProgress.html";
//+ "SubjectEnrollConfirmOrPDProgress.html";
+ (_userInfo.IsEn_Us ? "SubjectEnrollConfirmOrPDProgress_US.html" : "SubjectEnrollConfirmOrPDProgress.html");
#endregion
@@ -1383,8 +1384,6 @@ namespace IRaCIS.Core.Application.Service
return ResponseOutput.Ok(entity.Id.ToString());
}
else
{
@@ -1423,10 +1422,7 @@ namespace IRaCIS.Core.Application.Service
private async Task TestEmailConfigAsync(TrialEmailNoticeConfigAddOrEdit config)
{
var toUserList = await _repository.Where<TrialUser>(t => t.TrialId == config.TrialId)
.WhereIf(config.ToUserTypeList != null, t => config.ToUserTypeList.Contains(t.User.UserTypeEnum))
.Select(t => new { t.User.EMail, t.User.FullName }).ToListAsync();
if (!config.FromEmail.Contains("@") || string.IsNullOrEmpty(config.FromEmail))
{
@@ -1434,50 +1430,16 @@ namespace IRaCIS.Core.Application.Service
throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidEmailConfig"]);
}
if (toUserList.Count() == 0 || toUserList.Where(t => t.EMail.Contains("@")).Count() == 0)
{
//---项目没有有效的收件人,无法发送邮件
throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidRecipient"]);
}
var sendEmailConfig = new SMTPEmailConfig();
sendEmailConfig.FromEmailAddress = new MimeKit.MailboxAddress(config.FromName, config.FromEmail);
sendEmailConfig.AuthorizationCode = config.AuthorizationCode;
sendEmailConfig.UserName = config.FromEmail;
sendEmailConfig.Host = config.SMTPServerAddress;
sendEmailConfig.Port = config.SMTPServerPort;
sendEmailConfig.ToMailAddressList.Add(new MimeKit.MailboxAddress(config.FromName, config.FromEmail));
var pathToFile = _hostEnvironment.WebRootPath
+ Path.DirectorySeparatorChar.ToString()
+ "EmailTemplate"
+ Path.DirectorySeparatorChar.ToString()
+ "EmailConfigTest.html";
//---项目邮件测试
sendEmailConfig.TopicDescription = _localizer["TrialEmailN_EmailTestMessage"];
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
var templateInfo = SourceReader.ReadToEnd();
sendEmailConfig.HtmlBodyStr = string.Format(templateInfo,
//--- 收到此邮件,代表邮件配置正确
_localizer["TrialEmailN_ConfigurationCorrect"]
);
}
try
{
await SendEmailHelper.SendEmailAsync(sendEmailConfig);
await SendEmailHelper.TestEmailConfigAsync(new SystemEmailSendConfig()
{
AuthorizationCode = config.AuthorizationCode,
FromEmail = config.FromEmail,
FromName = config.FromName,
Host = config.SMTPServerAddress,
Port = config.SMTPServerPort
});
}
catch (Exception ex)
@@ -1487,6 +1449,72 @@ namespace IRaCIS.Core.Application.Service
throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidSenderEmailConfig"] + ex.Message);
}
#region
//var toUserList = await _repository.Where<TrialUser>(t => t.TrialId == config.TrialId)
// .WhereIf(config.ToUserTypeList != null, t => config.ToUserTypeList.Contains(t.User.UserTypeEnum))
// .Select(t => new { t.User.EMail, t.User.FullName }).ToListAsync();
//if (toUserList.Count() == 0 || toUserList.Where(t => t.EMail.Contains("@")).Count() == 0)
//{
// //---项目没有有效的收件人,无法发送邮件
// throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidRecipient"]);
//}
//var sendEmailConfig = new SMTPEmailConfig();
//sendEmailConfig.FromEmailAddress = new MimeKit.MailboxAddress(config.FromName, config.FromEmail);
//sendEmailConfig.AuthorizationCode = config.AuthorizationCode;
//sendEmailConfig.UserName = config.FromEmail;
//sendEmailConfig.Host = config.SMTPServerAddress;
//sendEmailConfig.Port = config.SMTPServerPort;
//sendEmailConfig.ToMailAddressList.Add(new MimeKit.MailboxAddress(config.FromName, config.FromEmail));
//var pathToFile = _hostEnvironment.WebRootPath
// + Path.DirectorySeparatorChar.ToString()
// + "EmailTemplate"
// + Path.DirectorySeparatorChar.ToString()
// //+ "EmailConfigTest.html";
// + (_userInfo.IsEn_Us ? "EmailConfigTest_US.html" : "EmailConfigTest.html");
////---项目邮件测试
//sendEmailConfig.TopicDescription = _localizer["TrialEmailN_EmailTestMessage"];
//using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
//{
// var templateInfo = SourceReader.ReadToEnd();
// sendEmailConfig.HtmlBodyStr = string.Format(templateInfo,
// //--- 收到此邮件,代表邮件配置正确
// _localizer["TrialEmailN_ConfigurationCorrect"]
// );
//}
//try
//{
// await SendEmailHelper.SendEmailAsync(sendEmailConfig);
//}
//catch (Exception ex)
//{
// //---发件人配置错误,请核对服务器地址或者授权码是否填写有误
// throw new BusinessValidationFailedException(_localizer["TrialEmailN_InvalidSenderEmailConfig"] + ex.Message);
//}
#endregion
}
@@ -174,6 +174,6 @@ namespace IRaCIS.Application.Contracts
public DateTime BeginDate { get; set; }
public DateTime EndDate { get; set; }
public AttendedReviewerType? AttendedReviewerType { get; set; }
//public AttendedReviewerType? AttendedReviewerType { get; set; }
}
}
@@ -552,10 +552,12 @@ namespace IRaCIS.Application.Services
trialLambda = trialLambda.And(u => u.TrialCode.Contains(trialCode));
}
if (queryParam.AttendedReviewerType != null)
{
trialLambda = trialLambda.And(u => u.AttendedReviewerType == queryParam.AttendedReviewerType);
}
//if (queryParam.AttendedReviewerType != null)
//{
// trialLambda = trialLambda.And(u => u.AttendedReviewerType == queryParam.AttendedReviewerType);
//}
Expression<Func<Doctor, bool>> doctorLambda = x => true;
@@ -936,15 +938,17 @@ namespace IRaCIS.Application.Services
{
trialLambda = trialLambda.And(u => u.CROId == param.CroId);
}
if (!string.IsNullOrWhiteSpace(param.TrialCode))
{
var trialCode = param.TrialCode.Trim();
trialLambda = trialLambda.And(u => u.TrialCode.Contains(trialCode));
}
if (param.AttendedReviewerType != null)
{
trialLambda = trialLambda.And(u => u.AttendedReviewerType == param.AttendedReviewerType);
}
//if (param.AttendedReviewerType != null)
//{
// trialLambda = trialLambda.And(u => u.AttendedReviewerType == param.AttendedReviewerType);
//}
var lockedPaymentIdAndYearMonth = _paymentRepository.Where(t => t.IsLock && t.YearMonthDate >= bDate && t.YearMonthDate <= eDate).Select(t => new { PaymentId = t.Id, t.YearMonth, t.DoctorId });
@@ -20,25 +20,26 @@ namespace IRaCIS.Core.Application.Service
public AdditionalAssessmentType AdditionalAssessmentType { get; set; }
//附加评估问题
public List<ReadingQuestionTrial> AdditionalQuestionList { get; set; }=new List<ReadingQuestionTrial>();
public List<ReadingQuestionTrial> AdditionalQuestionList { get; set; } = new List<ReadingQuestionTrial>();
}
public class AdditionalAssessment
public class AdditionalAssessment
{
public List<CriterionAdditionalAssessment> SystemDefeaultAdditionalAssessmentList { get; set; } = new List<CriterionAdditionalAssessment>();
public List<CriterionAdditionalAssessment> SystemDefeaultAdditionalAssessmentList { get; set; } = new List<CriterionAdditionalAssessment>();
public AdditionalAssessment()
{
var gropId = NewId.NextGuid();
//Resist1.1 脑转移 默认评估问题
SystemDefeaultAdditionalAssessmentList.Add(new CriterionAdditionalAssessment()
{
CriterionType = CriterionType.RECIST1Point1,
AdditionalAssessmentType = AdditionalAssessmentType.BrainMetastasis,
AdditionalQuestionList = new List<ReadingQuestionTrial>(){
var gropId = NewId.NextGuid();
SystemDefeaultAdditionalAssessmentList.Add(new CriterionAdditionalAssessment()
{
CriterionType = CriterionType.RECIST1Point1,
AdditionalAssessmentType = AdditionalAssessmentType.BrainMetastasis,
AdditionalQuestionList = new List<ReadingQuestionTrial>(){
new ReadingQuestionTrial()
{
@@ -47,7 +48,7 @@ namespace IRaCIS.Core.Application.Service
IsJudgeQuestion=false,
IsShowInDicom=false,
GlobalReadingShowType=GlobalReadingShowType.NotShow,
QuestionName="脑转移评估",
QuestionEnName="Brain Metastasis Assessment",
GroupName="脑转移评估",
@@ -69,27 +70,87 @@ namespace IRaCIS.Core.Application.Service
IsJudgeQuestion=false,
IsShowInDicom=false,
GlobalReadingShowType=GlobalReadingShowType.NotShow,
QuestionEnName="Brain metastases present",
QuestionEnName="Brain Metastasis Present",
QuestionName="存在脑转移",
Type="radio",
QuestionGenre=TableQuestionType.Dictionary,
DataSource=DataSources.ManualEntry,
ShowQuestion=ShowQuestion.Show,
IsAdditional=true
} ,
}
});
});
}
//Resist1.1 TNM分期
{
//var gropId = NewId.NextGuid();
//SystemDefeaultAdditionalAssessmentList.Add(new CriterionAdditionalAssessment()
//{
// CriterionType = CriterionType.RECIST1Point1,
// AdditionalAssessmentType = AdditionalAssessmentType.TNMStage,
// AdditionalQuestionList = new List<ReadingQuestionTrial>(){
// new ReadingQuestionTrial()
//{
// LimitEdit=LimitEdit.OnlyBaseLine,
// Id=gropId,
// IsJudgeQuestion=false,
// IsShowInDicom=false,
// GlobalReadingShowType=GlobalReadingShowType.NotShow,
// QuestionName="TNM分期评估",
// QuestionEnName="TNM Stage Assessment",
// GroupName="TNM分期评估",
// GroupEnName="TNM Stage Assessment",
// Type="group",
// QuestionGenre=TableQuestionType.Customize,
// DataSource=DataSources.ManualEntry,
// ShowQuestion=ShowQuestion.Show,
// IsAdditional=true
//} ,
// new ReadingQuestionTrial()
//{
// GroupId=gropId,
// LimitEdit=LimitEdit.OnlyBaseLine,
// DictionaryCode="YesOrNoOrNa",
// IsJudgeQuestion=false,
// IsShowInDicom=false,
// GlobalReadingShowType=GlobalReadingShowType.NotShow,
// QuestionEnName="Brain metastases present",
// QuestionName="存在脑转移",
// Type="radio",
// QuestionGenre=TableQuestionType.Dictionary,
// DataSource=DataSources.ManualEntry,
// ShowQuestion=ShowQuestion.Show,
// IsAdditional=true
//} ,
//}
//});
}
}
public List<CriterionAdditionalAssessment> GetSystemDefeaultAdditionalAssessmentList(CriterionType criterionType, AdditionalAssessmentType? additionalAssessmentType=null)
public List<CriterionAdditionalAssessment> GetSystemDefeaultAdditionalAssessmentList(CriterionType criterionType, AdditionalAssessmentType? additionalAssessmentType = null)
{
return SystemDefeaultAdditionalAssessmentList.Where(t => t.CriterionType == criterionType)
.WhereIf(additionalAssessmentType!=null,t=>t.AdditionalAssessmentType==additionalAssessmentType).ToList();
.WhereIf(additionalAssessmentType != null, t => t.AdditionalAssessmentType == additionalAssessmentType).ToList();
}
}
@@ -45,11 +45,9 @@ namespace IRaCIS.Core.Application.Contracts
public string ResearchProgramNo { get; set; } = string.Empty;
public string TrialIndication { get; set; } = string.Empty;
public CheckStateEnum CheckState { get; set; }
public decimal VisitNum { get; set; }
public string SVUPDES { get; set; } = string.Empty;
public string VisitName { get; set; } = string.Empty;
public string Sponsor { get; set; } = string.Empty;
public Guid TrialId { get; set; }
@@ -57,10 +55,15 @@ namespace IRaCIS.Core.Application.Contracts
public Guid SubjectId { get; set; }
public Guid SubjectVisitId { get; set; }
public SubmitStateEnum SubmitState { get; set; }
public AuditStateEnum AuditState { get; set; }
public ForwardStateEnum ForwardState { get; set; }
//public string SVUPDES { get; set; } = string.Empty;
//public CheckStateEnum CheckState { get; set; }
//public SubmitStateEnum SubmitState { get; set; }
//public AuditStateEnum AuditState { get; set; }
//public ForwardStateEnum ForwardState { get; set; }
//public string SubjectName => LastName + " / " + FirstName;
//public string FirstName { get; set; } = string.Empty;
@@ -40,6 +40,8 @@
//存放在instance 上面
public string WindowCenter { get; set; } = string.Empty;
public string WindowWidth { get; set; } = string.Empty;
public string IamgeResizePath { get; set; }
}
public class DicomSeriesWithLabelDTO : DicomSeriesDTO
@@ -34,7 +34,7 @@ namespace IRaCIS.Core.Application.Contracts
public DateTime UploadTime { get; set; }
public string StudyCode { get; set; }
public string StudyCode { get; set; }
//[JsonIgnore]
@@ -69,7 +69,7 @@ namespace IRaCIS.Core.Application.Contracts
}
}
public string ArchiveIntervalStr
public string ArchiveIntervalStr
{
get
{
@@ -137,12 +137,12 @@ namespace IRaCIS.Core.Application.Contracts
}
public class UnionStudyViewModel:UnionStudyBaseModel
public class UnionStudyViewModel : UnionStudyBaseModel
{
public Guid Id { get; set; }
public int? Count { get; set; }
@@ -153,12 +153,12 @@ namespace IRaCIS.Core.Application.Contracts
public DateTime? StudyTime { get; set; }
}
public class StudyQuery:PageInput
public class StudyQuery : PageInput
{
[NotDefault]
public Guid TrialId { get; set; }
@@ -174,4 +174,142 @@ namespace IRaCIS.Core.Application.Contracts
public string[]? VisitPlanArray { get; set; }
}
public class PreArchiveDicomStudyCommand
{
//public string StudyInstanceUid { get; set; }
[NotDefault]
public Guid TrialId { get; set; }
[NotDefault]
public Guid SiteId { get; set; }
[NotDefault]
public Guid SubjectId { get; set; }
[NotDefault]
public Guid SubjectVisitId { get; set; }
public decimal FileSize { get; set; }
public bool IsDicomReUpload { get; set; }
public int FileCount { get; set; }
}
public class NewArchiveStudyCommand
{
[NotDefault]
public Guid TrialId { get; set; }
[NotDefault]
public Guid SiteId { get; set; }
[NotDefault]
public Guid SubjectId { get; set; }
[NotDefault]
public Guid SubjectVisitId { get; set; }
[NotDefault]
public Guid StudyMonitorId { get; set; }
public int FailedFileCount { get; set; }
public AddOrUpdateStudyDto Study { get; set; }
}
public class AddOrUpdateStudyDto
{
public string StudyId { get; set; } = string.Empty;
//public int Code { get; set; } = 0;
//public string StudyCode { get; set; } = string.Empty;
public string StudyInstanceUid { get; set; } = string.Empty;
public DateTime? StudyTime { get; set; }
public string Modalities { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public int SeriesCount { get; set; } = 0;
public int InstanceCount { get; set; } = 0;
public string InstitutionName { get; set; } = string.Empty;
public string PatientId { get; set; } = string.Empty;
public string PatientName { get; set; } = string.Empty;
public string PatientAge { get; set; } = string.Empty;
public string PatientSex { get; set; } = string.Empty;
public string AccessionNumber { get; set; } = string.Empty;
public string PatientBirthDate { get; set; } = string.Empty;
public string AcquisitionTime { get; set; } = string.Empty;
public string AcquisitionNumber { get; set; } = string.Empty;
public string TriggerTime { get; set; } = string.Empty;
public string BodyPartExamined { get; set; } = string.Empty;
public List<AddOrUpdateSeriesDto> SeriesList { get; set; }
}
public class AddOrUpdateSeriesDto
{
public string StudyInstanceUid { get; set; }
public string SeriesInstanceUid { get; set; }
public int SeriesNumber { get; set; }
public DateTime? SeriesTime { get; set; }
public string Modality { get; set; }
public string Description { get; set; }
public int InstanceCount { get; set; }
public string SliceThickness { get; set; }
public string ImagePositionPatient { get; set; }
public string ImageOrientationPatient { get; set; }
public string BodyPartExamined { get; set; }
public string SequenceName { get; set; }
public string ProtocolName { get; set; }
public string ImagerPixelSpacing { get; set; }
public string AcquisitionTime { get; set; } = string.Empty;
public string AcquisitionNumber { get; set; } = string.Empty;
public string TriggerTime { get; set; } = string.Empty;
public string IamgeResizePath { get; set; }=string.Empty;
public List<AddInstanceDto> InstanceList { get; set; }
}
public class AddInstanceDto
{
public string StudyInstanceUid { get; set; }
public string SeriesInstanceUid { get; set; }
public string SopInstanceUid { get; set; }
public int InstanceNumber { get; set; }
public DateTime? InstanceTime { get; set; }
public bool CPIStatus { get; set; }
public int ImageRows { get; set; }
public int ImageColumns { get; set; }
public int SliceLocation { get; set; }
public string SliceThickness { get; set; }
public int NumberOfFrames { get; set; }
public string PixelSpacing { get; set; }
public string ImagerPixelSpacing { get; set; }
public string FrameOfReferenceUID { get; set; }
public string WindowCenter { get; set; }
public string WindowWidth { get; set; }
public bool Anonymize { get; set; }
public string Path { get; set; }
}
}
@@ -393,9 +393,9 @@ namespace IRaCIS.Core.Application.Services
ProtocolName = dataset.GetSingleValueOrDefault(DicomTag.ProtocolName, string.Empty),
ImagerPixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionTime, string.Empty),
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty),
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
SiteId = dicomStudy.SiteId,
TrialId = dicomStudy.TrialId,
@@ -12,6 +12,6 @@ namespace IRaCIS.Core.Application.Contracts
DicomTrialSiteSubjectInfo GetSaveToDicomInfo(Guid subjectVisitId);
IResponseOutput<DicomStudyDTO> Item(Guid studyId);
Task<FileContentResult> Preview(Guid studyId);
IResponseOutput<List<VerifyStudyUploadResult>> VerifyStudyAllowUpload(VerifyUploadOrReupload verifyInfo);
//IResponseOutput<List<VerifyStudyUploadResult>> VerifyStudyAllowUpload(VerifyUploadOrReupload verifyInfo);
}
}
@@ -140,13 +140,46 @@ namespace IRaCIS.Core.Application.Services
path = (await _instanceRepository.Where(s => s.SeriesId == seriesId).Select(t => t.Path).FirstOrDefaultAsync()).IfNullThrowException();
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
#region
//var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
//DicomInstance dicomInstance = await _instanceRepository.FirstOrDefaultAsync(s => s.SeriesId == seriesId).IfNullThrowException();
#endregion
#region
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
//不存在,去其他路径找
if (!File.Exists(physicalPath))
{
//找到所有磁盘
var drives = DriveInfo.GetDrives()
.Where(d => d.DriveType == DriveType.Fixed && d.IsReady)
//剩余空间最多的
.OrderByDescending(d => d.AvailableFreeSpace)
//存储空间相同,则按照按照总空间从大到小排序
.ThenByDescending(d => d.TotalSize - d.TotalFreeSpace)
.Select(d => d.RootDirectory.FullName)
.ToList();
foreach (var drive in drives)
{
physicalPath = Path.Combine(drive, _hostEnvironment.EnvironmentName, path.Trim('/'));
if (File.Exists(physicalPath))
{
break;
}
}
}
#endregion
//DicomStudy dicomStudy = await _studyRepository.FirstOrDefaultAsync(s => s.Id == dicomInstance.StudyId).IfNullThrowException();
//var (physicalPath, relativePath) = FileStoreHelper.GetDicomInstanceFilePath(_hostEnvironment, dicomStudy.TrialId, dicomStudy.SiteId, dicomStudy.SubjectId, dicomStudy.SubjectVisitId, dicomStudy.Id, dicomInstance.Id);
using (var sw = ImageHelper.RenderPreviewJpeg(physicalPath))
{
@@ -7,12 +7,23 @@ using EasyCaching.Core;
using System.Linq.Expressions;
using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Infrastructure;
using DocumentFormat.OpenXml.Presentation;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Application.Filter;
using IRaCIS.Core.Application.MediatR.Handlers;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using System.Threading;
using Nito.AsyncEx;
namespace IRaCIS.Core.Application.Service.ImageAndDoc
{
[ApiExplorerSettings(GroupName = "Image")]
public class StudyService : BaseService, IStudyService
{
private static object lockObj = new object();
private static readonly AsyncLock _mutex = new AsyncLock();
private static readonly AsyncLock _mutex2 = new AsyncLock();
private readonly IEasyCachingProvider _provider;
@@ -20,19 +31,303 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
private readonly IRepository<DicomSeries> _dicomSeriesRepository;
private readonly IRepository<DicomStudy> _dicomstudyRepository;
private readonly IRepository<Dictionary> _dictionaryRepository;
public StudyService( IEasyCachingProvider provider
private readonly IRepository<StudyMonitor> _studyMonitorRepository;
public StudyService(IEasyCachingProvider provider
, IRepository<SubjectVisit> subjectVisitRepository,
IRepository<DicomInstance> dicomInstanceRepository,
IRepository<DicomSeries> dicomSeriesRepository)
IRepository<DicomSeries> dicomSeriesRepository, IRepository<DicomStudy> dicomstudyRepository, IRepository<Dictionary> dictionaryRepository, IRepository<StudyMonitor> studyMonitorRepository)
{
_provider = provider;
_subjectVisitRepository = subjectVisitRepository;
_dicomInstanceRepository = dicomInstanceRepository;
_dicomSeriesRepository = dicomSeriesRepository;
_dicomstudyRepository = dicomstudyRepository;
_dictionaryRepository = dictionaryRepository;
_studyMonitorRepository = studyMonitorRepository;
}
private void SpecialArchiveStudyDeal(DicomStudy study)
{
#region
if (study.PatientBirthDate.Length == 8)
{
study.PatientBirthDate = $"{study.PatientBirthDate[0]}{study.PatientBirthDate[1]}{study.PatientBirthDate[2]}{study.PatientBirthDate[3]}-{study.PatientBirthDate[4]}{study.PatientBirthDate[5]}-{study.PatientBirthDate[6]}{study.PatientBirthDate[7]}";
}
var dicModalityList = _dictionaryRepository.Where(t => t.Code == "Modality").SelectMany(t => t.ChildList.Select(c => c.Value)).ToList();
var modality = study.Modalities;
var modalityForEdit = dicModalityList.Contains(modality) ? modality : String.Empty;
if (modality == "MR")
{
modalityForEdit = "MRI";
}
if (modality == "PT")
{
modalityForEdit = "PET";
}
if (modality == "PT、CT")
{
modalityForEdit = "PET-CT";
}
study.ModalityForEdit = modalityForEdit;
#endregion
}
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> PreArchiveDicomStudy(PreArchiveDicomStudyCommand preArchiveStudyCommand)
{
//lock (lockObj)
//{
// if (_provider.Exists($"StudyUid_{preArchiveStudyCommand.TrialId}_{preArchiveStudyCommand.StudyInstanceUid}"))
// {
// //---当前已有人正在上传和归档该检查!
// return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_ArchiveInProgress"));
// }
// else
// {
// _provider.Set($"StudyUid_{preArchiveStudyCommand.TrialId}_{preArchiveStudyCommand.StudyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
// }
//}
var studyMonitor = new StudyMonitor()
{
TrialId = preArchiveStudyCommand.TrialId,
SiteId = preArchiveStudyCommand.SiteId,
SubjectId = preArchiveStudyCommand.SubjectId,
SubjectVisitId = preArchiveStudyCommand.SubjectVisitId,
IsSuccess = false,
UploadStartTime = DateTime.Now,
IsDicom = true,
IP = _userInfo.IP,
IsDicomReUpload = preArchiveStudyCommand.IsDicomReUpload,
FileSize = preArchiveStudyCommand.FileSize,
FileCount = preArchiveStudyCommand.FileCount,
};
var addEntity = await _studyMonitorRepository.AddAsync(studyMonitor, true);
return ResponseOutput.Ok(addEntity.Id);
}
[HttpGet]
public IResponseOutput DicomUploadInProgress(Guid trialId, string studyInstanceUid)
{
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
return ResponseOutput.Ok();
}
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> AddOrUpdateArchiveStudy(NewArchiveStudyCommand incommand)
{
try
{
var trialId = incommand.TrialId;
var studyMonitor = await _studyMonitorRepository.FirstOrDefaultAsync(t => t.Id == incommand.StudyMonitorId);
studyMonitor.UploadFinishedTime = DateTime.Now;
studyMonitor.ArchiveFinishedTime = DateTime.Now;
studyMonitor.FailedFileCount = incommand.FailedFileCount;
studyMonitor.IsSuccess = true;
//上传
if (studyMonitor.IsDicomReUpload == false)
{
var study = _mapper.Map<DicomStudy>(incommand.Study);
using (await _mutex.LockAsync())
{
//查询数据库获取最大的Code 没有记录则为0
var dbStudyCodeIntMax = _dicomstudyRepository.Where(s => s.TrialId == trialId).Select(t => t.Code).DefaultIfEmpty().Max();
//获取缓存中的值 并发的时候,需要记录,已被占用的值 这样其他线程在此占用的最大的值上递增
var cacheMaxCodeInt = _provider.Get<int>($"{trialId}_{StaticData.CacheKey.StudyMaxCode}").Value;
int currentNextCodeInt = cacheMaxCodeInt > dbStudyCodeIntMax ? cacheMaxCodeInt + 1 : dbStudyCodeIntMax + 1;
study.Code = currentNextCodeInt;
study.StudyCode = AppSettings.GetCodeStr(currentNextCodeInt, nameof(DicomStudy));
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.StudyMaxCode}", study.Code, TimeSpan.FromMinutes(30));
}
study.Id = IdentifierHelper.CreateGuid(incommand.Study.StudyInstanceUid, incommand.TrialId.ToString());
study.TrialId = incommand.TrialId;
study.SiteId = incommand.SiteId;
study.SubjectId = incommand.SubjectId;
study.SubjectVisitId = incommand.SubjectVisitId;
//特殊处理逻辑
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
SpecialArchiveStudyDeal(study);
await _dicomstudyRepository.AddAsync(study);
studyMonitor.StudyId = study.Id;
studyMonitor.StudyCode = study.StudyCode;
foreach (var seriesItem in incommand.Study.SeriesList)
{
var series = _mapper.Map<DicomSeries>(seriesItem);
series.Id = IdentifierHelper.CreateGuid(seriesItem.StudyInstanceUid, seriesItem.SeriesInstanceUid, incommand.TrialId.ToString());
series.StudyId = study.Id;
series.TrialId = incommand.TrialId;
series.SiteId = incommand.SiteId;
series.SubjectId = incommand.SubjectId;
series.SubjectVisitId = incommand.SubjectVisitId;
await _dicomSeriesRepository.AddAsync(series);
foreach (var instanceItem in seriesItem.InstanceList)
{
var isntance = _mapper.Map<DicomInstance>(instanceItem);
isntance.StudyId = study.Id;
isntance.SeriesId = series.Id;
isntance.TrialId = incommand.TrialId;
isntance.SiteId = incommand.SiteId;
isntance.SubjectId = incommand.SubjectId;
isntance.SubjectVisitId = incommand.SubjectVisitId;
await _dicomInstanceRepository.AddAsync(isntance);
}
}
}
else
{
var studyId = IdentifierHelper.CreateGuid(incommand.Study.StudyInstanceUid, incommand.TrialId.ToString()); ;
var study = await _dicomstudyRepository.FirstOrDefaultAsync(t => t.Id == studyId);
//_mapper.Map(incommand.Study, study);
//特殊处理逻辑
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
SpecialArchiveStudyDeal(study);
// 少了整个序列
//某个序列下少了instance
foreach (var seriesItem in incommand.Study.SeriesList)
{
var seriesId = IdentifierHelper.CreateGuid(seriesItem.StudyInstanceUid, seriesItem.SeriesInstanceUid, trialId.ToString());
DicomSeries dicomSeries = await _dicomSeriesRepository.FirstOrDefaultAsync(t => t.Id == seriesId);
//判断重复
if (dicomSeries == null)
{
var series = _mapper.Map<DicomSeries>(seriesItem);
series.Id = seriesId;
series.StudyId = study.Id;
series.TrialId = incommand.TrialId;
series.SiteId = incommand.SiteId;
series.SubjectId = incommand.SubjectId;
series.SubjectVisitId = incommand.SubjectVisitId;
dicomSeries = await _dicomSeriesRepository.AddAsync(series);
//新的序列 那么 检查的序列数量+1
study.SeriesCount += 1;
}
else
{
//该序列掉了instance
dicomSeries.InstanceCount += seriesItem.InstanceList.Count;
}
foreach (var instanceItem in seriesItem.InstanceList)
{
var insntance = _mapper.Map<DicomInstance>(instanceItem);
insntance.Id = IdentifierHelper.CreateGuid(insntance.StudyInstanceUid, insntance.SeriesInstanceUid, insntance.SopInstanceUid, trialId.ToString());
insntance.StudyId = study.Id;
insntance.SeriesId = dicomSeries.Id;
insntance.TrialId = incommand.TrialId;
insntance.SiteId = incommand.SiteId;
insntance.SubjectId = incommand.SubjectId;
insntance.SubjectVisitId = incommand.SubjectVisitId;
await _dicomInstanceRepository.AddAsync(insntance);
}
// 不管是新的序列 还是 该序列 掉了Instance 重传的时候 检查的instance 数量都会增加
study.InstanceCount += seriesItem.InstanceList.Count;
}
}
using (await _mutex2.LockAsync())
{
await _dicomInstanceRepository.SaveChangesAsync();
}
}
catch (Exception ex)
{
return ResponseOutput.NotOk(ex.Message);
}
finally
{
_provider.Remove($"StudyUid_{incommand.TrialId}_{incommand.Study.StudyInstanceUid}");
}
return ResponseOutput.Ok();
}
@@ -151,7 +446,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
public async Task<PageOutput<UnionStudyMonitorModel>> GetDicomAndNoneDicomStudyMonitorList(StudyQuery studyQuery)
{
var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(studyQuery.VisitPlanArray);
var StudyMonitorQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId,ignoreQueryFilters:true)
var StudyMonitorQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId, ignoreQueryFilters: true)
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
//.WhereIf(!string.IsNullOrEmpty(studyQuery.VisitPlanInfo), studyQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.VisitNum.ToString().Contains(".") : t => t.SubjectVisit.VisitNum == decimal.Parse(studyQuery.VisitPlanInfo))
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
@@ -181,14 +476,14 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
UploadTime = t.CreateTime,
IsSuccess=t.IsSuccess,
Note=t.Note,
IsSuccess = t.IsSuccess,
Note = t.Note,
IP = t.IP,
FileCount = t.FileCount,
FileSize = t.FileSize,
UploadFinishedTime = t.UploadFinishedTime,
UploadStartTime = t.UploadStartTime,
ArchiveFinishedTime=t.ArchiveFinishedTime,
ArchiveFinishedTime = t.ArchiveFinishedTime,
@@ -428,7 +723,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
result.Add(new VerifyStudyUploadResult() { ErrorMesseage = _localizer["Study_VisitBeforePrevError", waitUploadItem.StudyDate?.ToString("yyyy-MM-dd"), before?.ToString("yyyy-MM-dd")], StudyInstanceUid = waitUploadItem.StudyInstanceUid });
return;
}
//大于当前访视 最近的最早拍片日期
var after = visitList.Where(u => u.VisitNum > verifyInfo.VisitNum).Min(k => k.EarliestScanDate);
@@ -445,7 +740,18 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
result.Add(temp);
});
return ResponseOutput.Ok(result);
// 写入dicom 固定的信息,以及组织路径的信息 以及匿名化的信息
var otherData = GetSaveToDicomInfo(verifyInfo.SubjectVisitId);
var systemAnonymizationList = _repository.Where<SystemAnonymization>(t => t.IsEnable).ToList();
return ResponseOutput.Ok<List<VerifyStudyUploadResult>>(result, new
{
DicomStoreInfo = otherData,
AnonymizeFixedList = systemAnonymizationList.Where(t => t.IsFixed).ToList(),
AnonymizeNotFixedList = systemAnonymizationList.Where(t => t.IsFixed == false).ToList()
});
}
@@ -454,8 +760,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
var result = new VerifyStudyUploadResult();
if (_provider.Exists("StudyUid_" + studyInstanceUid))
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}"))
{
result.AllowUpload = false;
result.AllowReUpload = false;
@@ -498,6 +805,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
if (verifyStudyInfo.SubjectId == SubjectId && verifyStudyInfo.SubjectVisitId == currentSubjectVisitId)
{
result.AllowReUpload = true;
result.UploadedSeriesList = _repository.Where<DicomSeries>(t => t.StudyId == verifyStudyInfo.Id).Select(t => new UploadedSeries()
{ SeriesId = t.Id, SeriesInstanceUid = t.SeriesInstanceUid, SOPInstanceUIDList = t.DicomInstanceList.Select(c => c.SopInstanceUid).ToList() }).ToList();
}
//不是同一个受试者
else
@@ -512,6 +822,16 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
}
}
result.StudyInstanceUid = studyInstanceUid;
if (result.AllowReUpload || result.AllowUpload)
{
lock (lockObj)
{
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
}
}
return result;
}
@@ -12,6 +12,10 @@ namespace IRaCIS.Core.Application.Service
{
public ImageAndDocConfig()
{
CreateMap<AddOrUpdateStudyDto, DicomStudy>();
CreateMap<AddOrUpdateSeriesDto, DicomSeries>();
CreateMap<AddInstanceDto, DicomInstance>();
CreateMap<Report, ReportDTO>();
CreateMap<ImageLabel, ImageLabelDTO>();
CreateMap<DicomSeries, DicomSeriesWithLabelDTO>();
@@ -31,7 +35,6 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.Uploader.FirstName))
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.Uploader.LastName))
.ForMember(d => d.StudyStatus, u => u.MapFrom(s => s.Status))
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime))
.ForMember(d => d.DTFCount, u => u.MapFrom(s => s.StudyDTFList.Count()));
@@ -275,6 +275,16 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
[NotDefault]
public Guid TrialReadingCriterionId { get; set; }
/// <summary>
/// 是否盲化
/// </summary>
public bool? IsBlind { get; set; }
/// <summary>
/// 是否完整
/// </summary>
public bool? IsComplete { get; set; }
}
/// <summary>
@@ -365,8 +375,10 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public string CreateUserRealName { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public string DescriptionCN { get; set; } = string.Empty;
public string ModuleTypeName { get; set; } = string.Empty;
public string ModuleTypeNameCN { get; set; } = string.Empty;
public string SignText { get; set; } = string.Empty;
@@ -376,6 +388,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public bool? InPlan { get; set; }
public string OptType { get; set; } = string.Empty;
public string OptTypeCN { get; set; } = string.Empty;
public Guid? FrontAuditConfigId { get; set; }
@@ -17,6 +17,8 @@ using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Domain.Share.Management;
using System.Text.Json.Nodes;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Infrastructure.Extention;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
namespace IRaCIS.Core.Application.Service
{
@@ -387,15 +389,6 @@ namespace IRaCIS.Core.Application.Service
Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
// //CommonData 仅仅存放关联对象的 Data里面的数据
//if (jsonDic.ContainsKey(nameof(InspectionJsonDetail.CommonData)))
//{
// var commonDataDicObj = jsonDic[nameof(InspectionJsonDetail.CommonData)];
// objectLsit.Add(commonDataDicObj);
//}
//避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
var dataDicObj = jsonDic[nameof(InspectionJsonDetail.Data)];
@@ -449,112 +442,6 @@ namespace IRaCIS.Core.Application.Service
await AddJsonObjectToDic(id, objectRelationParentId3, createTime, batchId, objectLsit);
#region
//if (objectRelationParentId != null)
//{
// //父子层级的数据可能在同一个批次 进行更新 但是后插入的是父层级的数据 找父层级的稽查应该优先同一批次的
// var relationParentInspection = await _dataInspectionRepository.Where(t => t.GeneralId == objectRelationParentId && (t.CreateTime <= createTime || t.BatchId == batchId)).OrderByDescending(x => x.CreateTime).Select(t => new { t.ObjectRelationParentId, t.CreateTime, t.JsonDetail, t.BatchId, t.ObjectRelationParentId2, t.EntityName }).FirstOrDefaultAsync();
// if (relationParentInspection != null)
// {
// Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
// var commonDataDicObj = jsonDic[nameof(InspectionJsonDetail.CommonData)];
// objectLsit.Add(commonDataDicObj);
// //避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
// var dataDicObj = jsonDic[nameof(InspectionJsonDetail.Data)];
// if (dataDicObj != null)
// {
// var entityName = relationParentInspection.EntityName;
// IDictionary<string, object> newNamepDic = new Dictionary<string, object>();
// var tempDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(dataDicObj.ToJsonStr());
// foreach (var valuePair in tempDic)
// {
// newNamepDic.Add(entityName + "_" + valuePair.Key, valuePair.Value);
// }
// objectLsit.Add(newNamepDic);
// }
// await GetRelationParentData(relationParentInspection.ObjectRelationParentId, relationParentInspection.ObjectRelationParentId2, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit);
// }
//}
//if (objectRelationParentId2 != null)
//{
// //父子层级的数据可能在同一个批次 进行更新 但是后插入的是父层级的数据 找父层级的稽查应该优先同一批次的
// var relationParentInspection = await _dataInspectionRepository.Where(t => t.GeneralId == objectRelationParentId2 && (t.CreateTime <= createTime || t.BatchId == batchId)).OrderByDescending(x => x.CreateTime).Select(t => new { t.ObjectRelationParentId, t.CreateTime, t.JsonDetail, t.BatchId, t.ObjectRelationParentId2, t.EntityName }).FirstOrDefaultAsync();
// if (relationParentInspection != null)
// {
// Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
// var commonDataDicObj = jsonDic[nameof(InspectionJsonDetail.CommonData)];
// objectLsit.Add(commonDataDicObj);
// //避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
// var dataDicObj = jsonDic[nameof(InspectionJsonDetail.Data)];
// if (dataDicObj != null)
// {
// var entityName = relationParentInspection.EntityName;
// IDictionary<string, object> newNamepDic = new Dictionary<string, object>();
// var tempDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(dataDicObj.ToJsonStr());
// foreach (var valuePair in tempDic)
// {
// newNamepDic.Add(entityName + "_" + valuePair.Key, valuePair.Value);
// }
// objectLsit.Add(newNamepDic);
// }
// await GetRelationParentData(relationParentInspection.ObjectRelationParentId, relationParentInspection.ObjectRelationParentId2, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit);
// }
// else
// {
// //用户的数据稽查没有 临时处理
// var userObj = await _repository.Where<User>(t => t.Id == objectRelationParentId2).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync();
// objectLsit.Add(userObj);
// }
//}
#endregion
return objectLsit;
}
@@ -754,7 +641,7 @@ namespace IRaCIS.Core.Application.Service
{
JArray arrays = (JArray)value;
//动态配置表翻译
if (item.DataType == "Table")
{
var tableConfigList = JsonConvert.DeserializeObject<List<TableConfig>>(item.TableConfigJsonStr) ?? new List<TableConfig>();
@@ -767,7 +654,7 @@ namespace IRaCIS.Core.Application.Service
//处理动态翻译 会在数组中提供 一个属性 “DictionaryCode” 这个是默认约束,做稽查的时候记得注意,免得配置麻烦
var dynamicTranslateInfoList = tableConfigList.Where(t => t.IsDynamicTranslate && t.IsList).Select(t => new { t.ListName, t.ColumnValue }).Distinct().ToList();
var dynamicTranslateInfoList = tableConfigList.Where(t => t.IsDynamicTranslate && t.IsList).Select(t => new { t.ListName, t.ColumnValue }).Distinct().ToList();
var dynamicDictionaryNameList = new List<string>();
@@ -780,6 +667,19 @@ namespace IRaCIS.Core.Application.Service
dynamicDictionaryNameList = dynamicDictionaryNameList.Distinct().ToList();
}
var specialDynamicColumnValueList = new List<string>();
if (tableConfigList.Any(t => t.IsDynamicTranslate && t.IsList == false))
{
// 兼容之前数组的那种方式 实际配置只会配置一条
specialDynamicColumnValueList = tableConfigList.Where(t => t.IsDynamicTranslate && t.IsList == false)
.Select(t => t.ColumnValue ).Distinct().ToList();
var dicNames= arrays.Where(t=>!string.IsNullOrEmpty( t["DictionaryCode"].ToString()) ).Select(t => t["DictionaryCode"].ToString()).Distinct().ToList();
dictionaryNameList.AddRange(dicNames);
}
var allDictionaryNameList = dictionaryNameList.Union(dynamicDictionaryNameList).Distinct();
@@ -798,7 +698,13 @@ namespace IRaCIS.Core.Application.Service
foreach (var translateInfo in translateInfoList)
{
//Json 解析后 true 变为了True
jsonObject[translateInfo.ColumnValue] = translateDataList[translateInfo.TranslateDictionaryName].Where(t => t.Code.ToLower() == jsonObject[translateInfo.ColumnValue]?.ToString().ToLower()).Select(t => t.ValueCN).FirstOrDefault();
jsonObject[translateInfo.ColumnValue] = translateDataList[translateInfo.TranslateDictionaryName].Where(t => t.Code.ToLower() == jsonObject[translateInfo.ColumnValue]?.ToString().ToLower()).Select(t => _userInfo.IsEn_Us?t.Value: t.ValueCN).FirstOrDefault();
}
foreach (var specialDynamicColumnValue in specialDynamicColumnValueList)
{
jsonObject[specialDynamicColumnValue] =
translateDataList[jsonObject["DictionaryCode"].ToString()].Where(t => t.Code.ToLower() == jsonObject[specialDynamicColumnValue]?.ToString().ToLower()).Select(t => _userInfo.IsEn_Us ? t.Value : t.ValueCN).FirstOrDefault();
}
//处理动态翻译
@@ -818,16 +724,16 @@ namespace IRaCIS.Core.Application.Service
var dicName = innerObject["DictionaryCode"]?.ToString();
if(dicName!=null && !string.IsNullOrEmpty(dicName))
if (dicName != null && !string.IsNullOrEmpty(dicName))
{
innerObject[dynamicTranslateInfo.ColumnValue] = translateDataList[dicName].Where(t => t.Code.ToLower() == innerObject[dynamicTranslateInfo.ColumnValue].ToString().ToLower()).Select(t => t.ValueCN).FirstOrDefault();
innerObject[dynamicTranslateInfo.ColumnValue] = translateDataList[dicName].Where(t => t.Code.ToLower() == innerObject[dynamicTranslateInfo.ColumnValue].ToString().ToLower()).Select(t => _userInfo.IsEn_Us ? t.Value : t.ValueCN).FirstOrDefault();
}
innberJsonList.Add(innerObject);
}
jsonObject[dynamicTranslateInfo.ListName] = JToken.FromObject(innberJsonList) ;
jsonObject[dynamicTranslateInfo.ListName] = JToken.FromObject(innberJsonList);
}
@@ -849,7 +755,7 @@ namespace IRaCIS.Core.Application.Service
{
guids.Add(Guid.Parse(x.ToString()));
});
jsonDataDic[item.Key] = string.Join(',', await _dictionaryRepository.Where(x => guids.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync());
jsonDataDic[item.Key] = string.Join(',', await _dictionaryRepository.Where(x => guids.Contains(x.Id)).Select(x => _userInfo.IsEn_Us ? x.Value : x.ValueCN).ToListAsync());
}
else if (item.Type.ToLower() == FrontAudit.ChildGroup.GetDescription().ToLower())
{
@@ -865,7 +771,7 @@ namespace IRaCIS.Core.Application.Service
parent = b
}).SelectMany(a => a.parent, (m, n) => new
{
value = n.ValueCN
value = _userInfo.IsEn_Us ? n.Value : n.ValueCN
}).Select(x => x.value).ToListAsync()
);
}
@@ -886,7 +792,7 @@ namespace IRaCIS.Core.Application.Service
jsonObject[item.Code] = await _dictionaryRepository.Where(x => x.Code == jsonObject["DictionaryCode"].ToString()).Join(_dictionaryRepository.Where(x => x.Code == jsonObject[item.Code].ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{
value = b.ValueCN
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync();
}
@@ -931,13 +837,13 @@ namespace IRaCIS.Core.Application.Service
if (item.Type.ToLower() == FrontAudit.Id.GetDescription().ToLower())
{
Guid guid = Guid.Parse(value.ToString());
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Id == guid).Select(x => x.ValueCN).FirstOrDefaultAsync();
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Id == guid).Select(x => _userInfo.IsEn_Us ? x.Value : x.ValueCN).FirstOrDefaultAsync();
}
else if (item.Type.ToLower() == FrontAudit.ChildGroup.GetDescription().ToLower())
{
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.ChildGroup == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{
value = b.ValueCN
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync();
}
//通过字典项的code 翻译 枚举或者 bool
@@ -945,7 +851,7 @@ namespace IRaCIS.Core.Application.Service
{
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.Code == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{
value = b.ValueCN
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync();
}
}
@@ -1170,8 +1076,8 @@ namespace IRaCIS.Core.Application.Service
[HttpGet]
public async Task<List<string>> GetModuleTypeDescriptionList(Guid moduleTypeId)
{
var result = await _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0).Select(x => new { x.Description, x.Sort }).OrderBy(t => t.Sort).ToListAsync();
return result.Select(t => t.Description).Distinct().ToList();
var result = await _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0).Select(x => new { x.Description, x.DescriptionCN, x.Sort }).OrderBy(t => t.Sort).Select(t => _userInfo.IsEn_Us? t.Description:t.DescriptionCN).Distinct().ToListAsync();
return result;
}
/// <summary>
@@ -1200,6 +1106,7 @@ namespace IRaCIS.Core.Application.Service
CreateTime = data.CreateTime,
CreateUserId = data.CreateUserId,
Description = data.Description,
DescriptionCN=data.DescriptionCN,
IsConfig = data.IsConfig,
IsEnable = data.IsEnable,
ModuleTypeId = data.ModuleTypeId,
@@ -138,7 +138,11 @@ namespace IRaCIS.Core.Application.Service.Inspection
ResearchProgramNo = leftrial.ResearchProgramNo,
ObjectTypeId = data.ObjectTypeId,
Description = leftfrontAuditConfig.Description,
ModuleTypeName = leftmoduleTypec.ValueCN,
DescriptionCN=leftfrontAuditConfig.DescriptionCN,
ModuleTypeName = leftmoduleTypec.Value,
ModuleTypeNameCN=leftmoduleTypec.ValueCN,
SignText = lefttrialSign.SignText,
Identification = leftfrontAuditConfig.Identification,
FrontAuditConfigId = leftfrontAuditConfig.Id,
@@ -149,6 +153,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
//IsFrontAdd=data.IsFrontAdd,
BatchId = data.BatchId,
OptType = leftOptType.Value,
OptTypeCN = leftOptType.ValueCN,
ObjectRelationParentId = data.ObjectRelationParentId,
GeneralId = data.GeneralId,
@@ -35,13 +35,15 @@ namespace IRaCIS.Application.Services
VerifyMsg = _localizer["Hospital_DupName"]
};
if (await _hospitalRepository.AnyAsync(x => x.SiteId == hospitalCommand.SiteId && hospitalCommand.SiteId != null))
var exp1 = new EntityVerifyExp<Hospital>()
{
//---当前Site已经添加到其他Hospital了
throw new BusinessValidationFailedException(_localizer["Hospital_SiteAdded"]);
}
VerifyExp = x => x.SiteId == hospitalCommand.SiteId && hospitalCommand.SiteId != null,
//---已经存在同名的医院,请确认。
VerifyMsg = _localizer["Hospital_SiteAdded"]
};
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp);
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp,exp1);
return ResponseOutput.Ok(hospital.Id.ToString());
@@ -8,6 +8,9 @@ using Panda.DynamicWebApi.Attributes;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Caching.Memory;
using IRaCIS.Core.Infra.Common.Cache;
using Microsoft.Identity.Client;
using static IRaCIS.Core.Domain.Share.StaticData;
namespace IRaCIS.Application.Services
{
@@ -82,7 +85,7 @@ namespace IRaCIS.Application.Services
if (oldPwd != null && oldPwd == newPwd)
{
//---新密码与旧密码相同。
//---新密码与旧密码相同。
throw new BusinessValidationFailedException(_localizer["User_NewOldPwdSame"]);
}
@@ -91,13 +94,13 @@ namespace IRaCIS.Application.Services
if (oldPwd != null && dbUser.Password != oldPwd)
{
//---旧密码验证失败。
//---旧密码验证失败。
throw new BusinessValidationFailedException(_localizer["User_OldPwdInvalid"]);
}
if (dbUser.Password == newPwd)
{
//---新密码与旧密码相同。
//---新密码与旧密码相同。
throw new BusinessValidationFailedException(_localizer["User_NewOldPwdSame"]);
}
@@ -156,7 +159,7 @@ namespace IRaCIS.Application.Services
//检查验证码是否失效
if (verificationRecord.ExpirationTime < DateTime.Now)
{
//---验证码已经过期。
//---验证码已经过期。
return ResponseOutput.NotOk(_localizer["User_VerificationCodeExpired"]);
}
@@ -358,7 +361,7 @@ namespace IRaCIS.Application.Services
if (verificationRecord.ExpirationTime < DateTime.Now)
{
//---验证码已经过期。
//---验证码已经过期。
throw new BusinessValidationFailedException(_localizer["User_VerificationCodeExpired"]);
}
else //验证码正确 并且 没有超时
@@ -462,7 +465,7 @@ namespace IRaCIS.Application.Services
public async Task<PageOutput<UserListDTO>> GetUserList(UserListQueryDTO param)
{
var userQueryable = _userRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.UserName.Contains(param.UserName) )
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.UserName.Contains(param.UserName))
.WhereIf(!string.IsNullOrWhiteSpace(param.RealName), t => t.FullName.Contains(param.RealName))
.WhereIf(!string.IsNullOrWhiteSpace(param.Phone), t => t.Phone.Contains(param.Phone))
.WhereIf(!string.IsNullOrWhiteSpace(param.OrganizationName), t => t.OrganizationName.Contains(param.OrganizationName))
@@ -474,7 +477,6 @@ namespace IRaCIS.Application.Services
return await userQueryable.ToPagedListAsync(param.PageIndex, param.PageSize, param.SortField == string.Empty ? "UserName" : param.SortField, param.Asc);
}
/// <summary>
@@ -613,6 +615,31 @@ namespace IRaCIS.Application.Services
[NonDynamicMethod]
public async Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password)
{
const string cachePrefix = "login-failures:";
const int maxFailures = 3;
const int lockoutMinutes = 1;
// 生成缓存键
string cacheKey = $"{cachePrefix}{userName}";
// 从缓存中获取登录失败次数
int? failCount = _cache.Get<int?>(cacheKey);
if (failCount == null)
{
failCount = 0;
}
//每次登录 都重置缓存时间
_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
if (failCount >= maxFailures)
{
throw new BusinessValidationFailedException($"密码连续错误3次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。");
}
var userLoginReturnModel = new LoginReturnDTO();
@@ -620,21 +647,32 @@ namespace IRaCIS.Application.Services
if (loginUser == null)
{
//此处下面 代码 为了支持医生也能登录 而且前端不加选择到底是管理用户 还是医生用户 奇怪的需求 无法理解
var loginDoctor = await _doctorRepository.Where(u => u.Phone == userName && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
#region
////此处下面 代码 为了支持医生也能登录 而且前端不加选择到底是管理用户 还是医生用户 奇怪的需求 无法理解
if (loginDoctor == null)
{
return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
//var loginDoctor = await _doctorRepository.Where(u => u.Phone == userName && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
}
//if (loginDoctor == null)
//{
// return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
//}
//userLoginReturnModel.BasicInfo = loginDoctor;
//登录 清除缓存
//_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
//return ResponseOutput.Ok(userLoginReturnModel);
#endregion
//错误次数累加
failCount++;
_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
userLoginReturnModel.BasicInfo = loginDoctor;
// 登录 清除缓存
_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
return ResponseOutput.Ok(userLoginReturnModel);
}
@@ -644,6 +682,12 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk(_localizer["User_Disabled"], new LoginReturnDTO());
}
//登录成功 清除缓存
_cache.Set(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes));
userLoginReturnModel.BasicInfo = loginUser;
// 登录 清除缓存
@@ -652,5 +696,35 @@ namespace IRaCIS.Application.Services
}
//private bool loginIsLocked(string userName)
//{
// //if (failCount == null)
// //{
// // failCount = 0;
// //}
// //else
// //{
// // failCount++;
// //}
// //// 更新缓存中的登录失败次数
// //_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
// //if (failCount >= maxFailures)
// //{
// // // 如果登录失败次数达到了 3 次,则锁定用户
// // _cache.Set(cacheKey + ":locked", true, TimeSpan.FromMinutes(lockoutMinutes));
// //}
// //return isLocked;
//}
}
}
@@ -157,7 +157,7 @@ namespace IRaCIS.Core.Application.Contracts
public async Task<List<TrialUserType>> GetTrialUserTypeList()
{
var query = userTypeServiceRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
//.Where(t => t.Type == UserTypeGroup.TrialUser)
.Where(t => !t.UserTypeGroupList.Any(t=> t.Group.Code=="3"))
.OrderBy(t => t.Order).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
return await query.ToListAsync();
@@ -235,7 +235,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
{
if (!ClosedTime.HasValue)
return "";
else return string.Format("{0}天{1}小时{2}分钟", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
else return string.Format("{0}Days{1}Hours{2}Minutes", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
}
}
@@ -255,7 +255,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
public class TrialVisitQADTO
{
public bool ExistsManual { get; set; }
public SubjectClinicalDataDto SubjectClinicalData { get; set; } = new SubjectClinicalDataDto();
public List<NoneDicomStudyView> NoneDicomStudyList { get; set; } = new List<NoneDicomStudyView>();
@@ -204,7 +204,7 @@ namespace IRaCIS.Core.Application.Contracts
{
if (!ClosedTime.HasValue)
return "";
else return string.Format("{0}{1}小时{2}分钟", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
else return string.Format("{0}d {1}h {2}min", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
}
}
@@ -836,6 +836,7 @@ namespace IRaCIS.Core.Application.Contracts
public Arm ArmEnum { get; set; }
public string UserName { get; set; }
public ReadingCategory ReadingCategory { get; set; }
[DictionaryTranslateAttribute("ExistDisease", CriterionType.RECIST1Point1, nameof(OverallTumorEvaluationExport.IsBaseline), "true")]
[DictionaryTranslateAttribute("OverallAssessment", CriterionType.RECIST1Point1, nameof(OverallTumorEvaluationExport.IsBaseline), "false")]
@@ -844,11 +845,22 @@ namespace IRaCIS.Core.Application.Contracts
//整体肿瘤评估结果 需要翻译
public string OverallTumorEvaluationResult { get; set; }
public Guid? JudgeResultTaskId { get; set; }
#region old
//public Guid? JudgeResultTaskId { get; set; }
//[DictionaryTranslateAttribute("YesOrNo")]
//public bool IsGenerateJudge => JudgeResultTaskId != null;
#endregion
public Arm? JudgeArmEnum { get; set; }
//根据裁判的任务结果 设置访视任务的这个字段 该字段表示 裁判认同该任务的结果
[DictionaryTranslateAttribute("YesOrNo")]
public bool IsGenerateJudge => JudgeResultTaskId != null;
public bool IsGenerateJudge { get; set; }
}
@@ -1180,7 +1192,7 @@ namespace IRaCIS.Core.Application.Contracts
{
if (!ClosedTime.HasValue)
return "";
else return string.Format("{0}{1}小时{2}分钟", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
else return string.Format("{0}d {1}h {2}min", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
}
}
@@ -3,6 +3,7 @@
// 生成时间 2021-11-11 11:48:52
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Domain.Share;
using System;
using System.Collections.Generic;
namespace IRaCIS.Core.Application.Contracts
@@ -20,7 +21,12 @@ namespace IRaCIS.Core.Application.Contracts
{
public Guid Id { get; set; }
public string QuestionName { get; set; } = String.Empty;
public bool IsRequired { get; set; }
/// <summary>
/// 语言类型
/// </summary>
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = String.Empty;
public string ParentTriggerValue { get; set; }
@@ -43,7 +49,12 @@ namespace IRaCIS.Core.Application.Contracts
{
public Guid Id { get; set; }
public string QuestionName { get; set; } = String.Empty;
public bool IsRequired { get; set; }
/// <summary>
/// 语言类型
/// </summary>
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = String.Empty;
public string ParentTriggerValue { get; set; }
@@ -62,13 +73,18 @@ namespace IRaCIS.Core.Application.Contracts
}
///<summary>QCQuestionQuery 列表查询参数模型</summary>
public class QCQuestionQuery
public class QCQuestionQuery:PageInput
{
///<summary> QuestionName</summary>
public string QuestionName { get; set; } = String.Empty;
///<summary> TypeValue</summary>
public string Type { get; set; } = String.Empty;
/// <summary>
/// 语言类型
/// </summary>
public LanguageType? LanguageType { get; set; }
///<summary> TypeValue</summary>
public string Type { get; set; } = String.Empty;
public bool? IsEnable { get; set; }
@@ -84,7 +100,12 @@ namespace IRaCIS.Core.Application.Contracts
{
public Guid? Id { get; set; }
public string QuestionName { get; set; } = String.Empty;
public bool IsRequired { get; set; }
/// <summary>
/// 语言类型
/// </summary>
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = String.Empty;
@@ -3,6 +3,7 @@
// 生成时间 2021-11-11 11:48:52
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Core.Application.Contracts
@@ -13,7 +14,12 @@ namespace IRaCIS.Core.Application.Contracts
public Guid Id { get; set; }
public Guid TrialId { get; set; }
public string QuestionName { get; set; } = string.Empty;
public bool IsRequired { get; set; }
/// <summary>
/// 语言类型
/// </summary>
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = string.Empty;
public string TypeValue { get; set; } = string.Empty;
@@ -54,7 +60,12 @@ namespace IRaCIS.Core.Application.Contracts
public Guid Id { get; set; }
public string QuestionName { get; set; } = string.Empty;
public Guid? ParentId { get; set; }
/// <summary>
/// 语言类型
/// </summary>
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public Guid? ParentId { get; set; }
public int ShowOrder { get; set; }
public string TypeValue { get; set; }
@@ -68,8 +79,13 @@ namespace IRaCIS.Core.Application.Contracts
///<summary> QuestionName</summary>
public string QuestionName { get; set; } = string.Empty;
///<summary> TypeValue</summary>
public string Type { get; set; }=String.Empty;
/// <summary>
/// 语言类型
/// </summary>
public LanguageType? LanguageType { get; set; }
///<summary> TypeValue</summary>
public string Type { get; set; }=String.Empty;
public bool? IsEnable { get; set; }
@@ -90,7 +106,12 @@ namespace IRaCIS.Core.Application.Contracts
public Guid? Id { get; set; }
public string QuestionName { get; set; } = string.Empty;
public bool IsRequired { get; set; }
/// <summary>
/// 语言类型
/// </summary>
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
public bool IsRequired { get; set; }
public bool IsEnable { get; set; }
public string Type { get; set; } = string.Empty;
public Guid? ParentId { get; set; }
@@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Contracts
{
Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure);
Task<IResponseOutput> DeleteQCQuestionConfigure(Guid qCQuestionConfigureId);
Task<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
Task<PageOutput<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure);
}
@@ -21,15 +21,19 @@ namespace IRaCIS.Core.Application.Image.QA
private readonly IRepository<TrialQCQuestion> _trialQCQuestionRepository;
private readonly IRepository<ConsistencyCheckFile> _consistencyCheckFileRepository;
private IReadingImageTaskService _IReadingImageTaskService;
public QCListService(
IRepository<SubjectVisit> subjectVisitRepository,
IRepository<Trial> trialRepository,
IRepository<ClinicalDataTrialSet> clinicalDataTrialSet,
IRepository<TrialQCQuestionAnswer> trialQCQuestionAnswerRepository,
IRepository<TrialQCQuestion> trialQCQuestionRepository,
IReadingImageTaskService IReadingImageTaskService,
IRepository<ConsistencyCheckFile> consistencyCheckFileRepository
)
{
this._IReadingImageTaskService = IReadingImageTaskService;
_subjectVisitRepository = subjectVisitRepository;
this._trialQCQuestionAnswerRepository = trialQCQuestionAnswerRepository;
this._trialQCQuestionRepository = trialQCQuestionRepository;
@@ -606,6 +610,7 @@ namespace IRaCIS.Core.Application.Image.QA
{
QCQuestionAnswerList = qacheckList,
StudyList = temp.StudyList,
ExistsManual= (await _IReadingImageTaskService.GetManualList(new GetManualListInDto() { TrialId = sv.TrialId })).Count() > 0,
SeriesList = temp.SeriesList,
RelationInfo = await GetVisitQCSubjectInfo(subjectVisitId),
NoneDicomStudyList = await _repository.Where<NoneDicomStudy>(t => t.SubjectVisitId == subjectVisitId).ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider).ToListAsync(),
@@ -716,9 +716,10 @@ namespace IRaCIS.Core.Application.Image.QA
study.BodyPartForEdit = updateModalityCommand.BodyPart;
//study.Modalities = updateModalityCommand.Modality;
study.ModalityForEdit = updateModalityCommand.Modality;
await _repository.BatchUpdateAsync<DicomSeries>(t => t.StudyId == studyId, r => new DicomSeries() { BodyPartForEdit = updateModalityCommand.BodyPart, Modality = updateModalityCommand.Modality });
await _repository.BatchUpdateAsync<DicomSeries>(t => t.StudyId == studyId, r => new DicomSeries() { BodyPartForEdit = updateModalityCommand.BodyPart });
}
else if (updateModalityCommand.Type == 2)
{
@@ -790,24 +791,7 @@ namespace IRaCIS.Core.Application.Image.QA
await _dicomStudyRepository.DeleteAsync(study);
//var DicomSeriess = await _repository.GetQueryable<DicomSeries>().Where(t => t.StudyId == id).Select(x => new
//{
// x.StudyId,
// x.SubjectId,
// x.SiteId,
// x.TrialId,
// x.Id,
// x.SubjectVisitId,
// x.SeriesTime,
// x.IsReading,
// x.InstanceCount,
// x.SeriesNumber,
// StudyCode = x.DicomStudy.StudyCode,
// Modalities = x.DicomStudy.Modalities,
//}).ToListAsync();
var succeess2 = await _repository.BatchDeleteAsync<DicomInstance>(t => t.StudyId == id);
var success3 = await _dicomSeriesrepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id);
@@ -830,21 +814,7 @@ namespace IRaCIS.Core.Application.Image.QA
}
});
//var instanceIdList = await _repository.Where<DicomInstance>(t => t.StudyId == id)
// .Select(t => new { InstanceId = t.Id, t.SeriesId, t.StudyId, t.SubjectId, t.SiteId }).ToListAsync();
//instanceIdList.ForEach(t =>
//{
// var dicomStudy = new DicomStudy() { Id = t.StudyId, SubjectId = t.SubjectId, TrialId = trialId, SiteId = t.SiteId, SubjectVisitId = subjectVisitId };
// var (physicalPath, relativePath) =
// FileStoreHelper.GetDicomInstanceFilePath(_hostEnvironment, dicomStudy.TrialId, dicomStudy.SiteId, dicomStudy.SubjectId, dicomStudy.SubjectVisitId, dicomStudy.Id, t.InstanceId);
// if (System.IO.File.Exists(physicalPath))
// {
// File.Delete(physicalPath);
// }
//});
}
await _subjectVisitRepository.SaveChangesAsync();
@@ -985,7 +955,8 @@ namespace IRaCIS.Core.Application.Image.QA
}
else
{
return ResponseOutput.NotOk("项目配置为单审,不满足SubmmitState:已提交 或者 AuditState:待审核/审核中, 不允许领取,请刷新界面");
// ---项目配置为单审,不满足Submmit State:已提交 或者 Audit State:待审核/审核中, 不允许领取,请刷新界面
return ResponseOutput.NotOk(_localizer["QCOperation_NoSingleAudit"]);
}
}
else if (trialConfig.QCProcessEnum == TrialQCProcess.DoubleAudit)
@@ -2075,8 +2046,8 @@ namespace IRaCIS.Core.Application.Image.QA
await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.Id == subjectVisitId,
u => new SubjectVisit() { ForwardState = ForwardStateEnum.ForwardFailed });
return ResponseOutput.NotOk("转发影像失败: " + e.Message);
// --转发影像失败
return ResponseOutput.NotOk(_localizer["QCOperation_ForwardingFailed"] + e.Message);
}
@@ -4,6 +4,8 @@
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Infrastructure;
using Microsoft.AspNetCore.Mvc;
@@ -47,6 +49,7 @@ namespace IRaCIS.Core.Application.Contracts
Id = x.Id,
ParentId = x.ParentId,
QuestionName = x.QuestionName,
LanguageType=x.LanguageType,
TypeValue = x.TypeValue,
}).ToListAsync();
@@ -88,18 +91,20 @@ namespace IRaCIS.Core.Application.Contracts
[HttpPost]
public async Task<List<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure)
public async Task<PageOutput<QCQuestionConfigureView>> GetQCQuestionConfigureList(QCQuestionQuery queryQCQuestionConfigure)
{
var QCQuestionQueryable = _qcQuestionRepository
.WhereIf(queryQCQuestionConfigure.IsEnable != null,x=>x.IsEnable== queryQCQuestionConfigure.IsEnable)
.WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.QuestionName), t => t.QuestionName.Contains(queryQCQuestionConfigure.QuestionName))
.WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.Type), t => t.Type.Contains(queryQCQuestionConfigure.Type))
.WhereIf(queryQCQuestionConfigure.IsDefeaultViewParent==true,t=>t.ParentId==null)
.OrderBy(t=>t.ShowOrder)
.WhereIf(queryQCQuestionConfigure.LanguageType!=null, t =>t.LanguageType== queryQCQuestionConfigure.LanguageType)
.WhereIf(queryQCQuestionConfigure.IsDefeaultViewParent==true,t=>t.ParentId==null)
.OrderByDescending(x=>x.LanguageType)
.ThenBy(t=>t.ShowOrder)
.ProjectTo<QCQuestionConfigureView>(_mapper.ConfigurationProvider);
return await QCQuestionQueryable.ToListAsync();
return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" });
}
public async Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure)
@@ -145,11 +150,20 @@ namespace IRaCIS.Core.Application.Contracts
var question = new List<QCQuestionView>();
if (inDto.TrialId!= null)
{
question = await _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider).ToListAsync();
question = await _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>
(_mapper.ConfigurationProvider, new
{
isEn_Us = _userInfo.IsEn_Us
}).ToListAsync();
}
else
{
question=await _qcQuestionRepository.Where(x=>x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider).ToListAsync();
question=await _qcQuestionRepository.Where(x=>x.IsEnable).OrderBy(x => x.ShowOrder).ProjectTo<QCQuestionView>(_mapper.ConfigurationProvider, new
{
isEn_Us = _userInfo.IsEn_Us
}).ToListAsync();
}
@@ -43,11 +43,12 @@ namespace IRaCIS.Core.Application.Contracts
.WhereIf(!string.IsNullOrWhiteSpace(queryTrialQCQuestionConfigure.Type), t => t.Type.Contains(queryTrialQCQuestionConfigure.Type))
.WhereIf(queryTrialQCQuestionConfigure.IsEnable != null, t => t.IsEnable == queryTrialQCQuestionConfigure.IsEnable)
.WhereIf(queryTrialQCQuestionConfigure.IsRequired != null, t => t.IsRequired == queryTrialQCQuestionConfigure.IsRequired)
.WhereIf(queryTrialQCQuestionConfigure.LanguageType != null, t => t.LanguageType == queryTrialQCQuestionConfigure.LanguageType)
.ProjectTo<TrialQCQuestionConfigureView>(_mapper.ConfigurationProvider);
.ProjectTo<TrialQCQuestionConfigureView>(_mapper.ConfigurationProvider);
var list = await trialQCQuestionQueryable.OrderBy(t => t.ShowOrder).ToListAsync();
var list = await trialQCQuestionQueryable.OrderByDescending(x=>x.LanguageType).ThenBy(t => t.ShowOrder).ToListAsync();
var isHaveQCQuestion = _repository.Where<TrialQCQuestion>(t => t.TrialId == queryTrialQCQuestionConfigure.TrialId).Any();
@@ -81,7 +82,11 @@ namespace IRaCIS.Core.Application.Contracts
var initList = await _trialQcQuestionRepository.Where(t => t.TrialId == trialQCQuestionFilterSelect.TrialId)
.WhereIf(trialQCQuestionFilterSelect.TypeArray.Count() > 0, t => trialQCQuestionFilterSelect.TypeArray.Contains(t.Type))
.WhereIf(trialQCQuestionFilterSelect.Id != null, t => t.Id != trialQCQuestionFilterSelect.Id && t.ParentId != trialQCQuestionFilterSelect.Id)
.OrderBy(t => t.ShowOrder).ProjectTo<TrialQCQuestionSelect>(_mapper.ConfigurationProvider).ToListAsync();
.OrderBy(t => t.ShowOrder).ProjectTo<TrialQCQuestionSelect>(_mapper.ConfigurationProvider, new
{
isEn_Us = _userInfo.IsEn_Us
}).ToListAsync();
//父亲的序号肯定要比自己小
if (trialQCQuestionFilterSelect.Id != null)
@@ -172,6 +172,8 @@ namespace IRaCIS.Core.Application.Service
// .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName))
.ForMember(o => o.IsBaseline, t => t.MapFrom(u => u.SourceSubjectVisit.IsBaseLine))
.ForMember(o => o.JudgeArmEnum, t => t.MapFrom(u => u.JudgeResultTask.ArmEnum))
.ForMember(o => o.OverallTumorEvaluationResult, t => t.MapFrom(u =>
criterionType == CriterionType.RECIST1Point1 ?( u.SourceSubjectVisit.IsBaseLine==true ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).FirstOrDefault().Answer:
u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).FirstOrDefault().Answer)
@@ -251,8 +253,9 @@ namespace IRaCIS.Core.Application.Service
#endregion
string token = string.Empty;
string token = string.Empty;
//一致性核查
CreateMap<CheckDBModel, CheckViewModel>();
@@ -304,8 +307,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap<TrialQCQuestion, TrialQCQuestionSelect>();
CreateMap<TrialQCQuestion, QCQuestionView>();
CreateMap<QCQuestion, QCQuestionView>();
CreateMap<TrialQCQuestion, QCQuestionView>();
CreateMap<QCQuestion, QCQuestionView>();
CreateMap<QCQuestion, QCQuestionConfigureView>()
@@ -19,6 +19,7 @@ using IRaCIS.Core.Domain.Share.Reading;
using System.Runtime.InteropServices;
using DocumentFormat.OpenXml.Bibliography;
using System.Linq.Expressions;
using MathNet.Numerics.Statistics.Mcmc;
namespace IRaCIS.Core.Application.Service
{
@@ -72,7 +73,7 @@ namespace IRaCIS.Core.Application.Service
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<(PageOutput<SubjectCriteriaEvaluationView>, object)> GetSubjectCriteriaEvaluationList(SubjectCriteriaEvaluationQuery inQuery)
public async Task<IResponseOutput<PageOutput<SubjectCriteriaEvaluationView>> > GetSubjectCriteriaEvaluationList(SubjectCriteriaEvaluationQuery inQuery)
{
var trialReadingCritionList = _trialReadingCriterionRepository.Where(t => t.TrialId == inQuery.TrialId).ToList();
@@ -125,7 +126,8 @@ namespace IRaCIS.Core.Application.Service
Id = subjectCriteriaEvaluation.Id,
TrialReadingCriterionId = inQuery.TrialReadingCriterionId,
IsImageFiltering = subjectCriteriaEvaluation.SubjectCriteriaEvaluationVisitFilterList.Any(t => t.ImageFilterState == ImageFilterState.None),
IsImageFiltering = subject.SubjectCriteriaEvaluationVisitFilterList.Any(t => t.TrialReadingCriterionId== inQuery.TrialReadingCriterionId
&& t.ImageFilterState == ImageFilterState.None),
IsJoinEvaluation = subjectCriteriaEvaluation.IsJoinEvaluation,
@@ -234,7 +236,7 @@ namespace IRaCIS.Core.Application.Service
return (pageList, addtionalQustionInfoList);
return ResponseOutput.Ok (pageList, addtionalQustionInfoList);
}
@@ -256,17 +258,24 @@ namespace IRaCIS.Core.Application.Service
{
var entity = await _subjectCriteriaEvaluationRepository.InsertFromDTOAsync(addOrEditSubjectCriteriaEvaluation);
//找到一致性核查通过的访视 并且没有 自动影像筛选的数据
var subjectVisitIdList = await _subjectVisitRepository.Where(t => t.SubjectId == addOrEditSubjectCriteriaEvaluation.SubjectId && t.CheckState == CheckStateEnum.CVPassed
&& !t.SubjectCriteriaEvaluationVisitFilterList.Any(t => t.TrialReadingCriterionId == addOrEditSubjectCriteriaEvaluation.TrialReadingCriterionId && t.SubjectId == addOrEditSubjectCriteriaEvaluation.SubjectId)).Select(t => t.Id)
.ToListAsync();
foreach (var subjectVisitId in subjectVisitIdList)
if (addOrEditSubjectCriteriaEvaluation.IsJoinEvaluation)
{
await AutoSubjectCriteriaEvaluationVisitFilter(addOrEditSubjectCriteriaEvaluation.SubjectId, subjectVisitId, addOrEditSubjectCriteriaEvaluation.TrialReadingCriterionId);
//找到一致性核查通过的访视 并且没有 自动影像筛选的数据
var subjectVisitIdList = await _subjectVisitRepository.Where(t => t.SubjectId == addOrEditSubjectCriteriaEvaluation.SubjectId && t.CheckState == CheckStateEnum.CVPassed
&& !t.SubjectCriteriaEvaluationVisitFilterList.Any(t => t.TrialReadingCriterionId == addOrEditSubjectCriteriaEvaluation.TrialReadingCriterionId && t.SubjectId == addOrEditSubjectCriteriaEvaluation.SubjectId)).Select(t => t.Id)
.ToListAsync();
foreach (var subjectVisitId in subjectVisitIdList)
{
await AutoSubjectCriteriaEvaluationVisitFilter(addOrEditSubjectCriteriaEvaluation.SubjectId, subjectVisitId, addOrEditSubjectCriteriaEvaluation.TrialReadingCriterionId);
}
}
}
//编辑
@@ -487,12 +496,21 @@ namespace IRaCIS.Core.Application.Service
/// </summary>
/// <returns></returns>
[UnitOfWork]
public async Task BatchGenerateTask(BatchGenerateTaskCommand batchGenerateTaskCommand)
public async Task<IResponseOutput> BatchGenerateTask(BatchGenerateTaskCommand batchGenerateTaskCommand)
{
await _subjectCriteriaEvaluationVisitFilterRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == batchGenerateTaskCommand.SubjectId
var trakingList= await _subjectCriteriaEvaluationVisitFilterRepository.Where(t => t.SubjectId == batchGenerateTaskCommand.SubjectId
&& t.TrialReadingCriterionId == batchGenerateTaskCommand.TrialReadingCriterionId
&& batchGenerateTaskCommand.SubjectVisitIdList.Contains(t.SubjectVisitId), u => new SubjectCriteriaEvaluationVisitFilter { IsGeneratedTask = true });
&& batchGenerateTaskCommand.SubjectVisitIdList.Contains(t.SubjectVisitId),true).ToListAsync();
foreach (var item in trakingList)
{
item.IsGeneratedTask = true;
}
//await _subjectCriteriaEvaluationVisitFilterRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == batchGenerateTaskCommand.SubjectId
//&& t.TrialReadingCriterionId == batchGenerateTaskCommand.TrialReadingCriterionId
//&& batchGenerateTaskCommand.SubjectVisitIdList.Contains(t.SubjectVisitId), u => new SubjectCriteriaEvaluationVisitFilter { IsGeneratedTask = true });
//自动生成任务
@@ -505,6 +523,10 @@ namespace IRaCIS.Core.Application.Service
var generateVisitIdList = idList.Except(haveGenerateVisitIdList);
await _IVisitTaskHelpeService.BaseCritrionGenerateVisitTask(batchGenerateTaskCommand.TrialId, batchGenerateTaskCommand.TrialReadingCriterionId, true, generateVisitIdList.Select(t => (Guid)t).ToList());
await _subjectCriteriaEvaluationVisitFilterRepository.SaveChangesAsync();
return ResponseOutput.Ok();
}
@@ -565,10 +587,35 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns>
public async Task<IResponseOutput> BatchAddSubjectCriteriaEvaluationVisitStudyFilter(List<SubjectCriteriaEvaluationVisitStudyFilterAddOrEdit> batchList)
{
var ids = batchList.Select(t => t.Id).ToList();
await _subjectCriteriaEvaluationVisitStudyFilterRepository.BatchDeleteNoTrackingAsync(t => ids.Contains(t.Id));
await _subjectCriteriaEvaluationVisitStudyFilterRepository.AddRangeAsync(_mapper.Map<List<SubjectCriteriaEvaluationVisitStudyFilter>>(batchList));
var ids = batchList.Where(t => t.Id != null).Select(t => t.Id).ToList();
#region
//await _subjectCriteriaEvaluationVisitStudyFilterRepository.BatchDeleteNoTrackingAsync(t => ids.Contains(t.Id));
//await _subjectCriteriaEvaluationVisitStudyFilterRepository.AddRangeAsync(_mapper.Map<List<SubjectCriteriaEvaluationVisitStudyFilter>>(batchList));
#endregion
#region
if (ids.Count > 0)
{
var list = await _subjectCriteriaEvaluationVisitStudyFilterRepository.Where(t => ids.Contains(t.Id), true).ToListAsync();
foreach (var item in list)
{
item.IsReading = batchList.FirstOrDefault(t => t.Id == item.Id)?.IsReading ?? item.IsReading;
item.IsConfirmed = batchList.FirstOrDefault(t => t.Id == item.Id)?.IsConfirmed ?? item.IsConfirmed;
}
}
else
{
await _subjectCriteriaEvaluationVisitStudyFilterRepository.AddRangeAsync(_mapper.Map<List<SubjectCriteriaEvaluationVisitStudyFilter>>(batchList));
}
#endregion
var first = batchList.First();
@@ -0,0 +1,397 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-06-15 15:06:06
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Domain.Share;
using MassTransit;
using IRaCIS.Core.Infrastructure;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Infrastructure.Extention;
namespace IRaCIS.Core.Application.Service
{
/// <summary>
/// 临床答案
/// </summary>
[ApiExplorerSettings(GroupName = "Reading")]
public class ClinicalAnswerService : BaseService
{
private readonly IRepository<TrialClinicalQuestion> _trialClinicalQuestionRepository;
private readonly IRepository<SystemClinicalQuestion> _systemClinicalQuestionRepository;
private readonly IRepository<SystemClinicalTableQuestion> _systemClinicalTableQuestionRepository;
private readonly IRepository<TrialClinicalTableQuestion> _trialClinicalTableQuestionRepository;
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
private readonly IRepository<ClinicalForm> _clinicalFormRepository;
private readonly IRepository<Subject> _subjectRepository;
private readonly IRepository<ClinicalQuestionAnswer> _clinicalQuestionAnswerRepository;
private readonly IRepository<ClinicalTableAnswer> _clinicalTableAnswerRepository;
private readonly IRepository<ClinicalAnswerRowInfo> _clinicalAnswerRowInfoRepository;
private readonly IRepository<ReadingClinicalData> _readingClinicalDataRepository;
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
private readonly IClinicalQuestionService _iClinicalQuestionService;
public ClinicalAnswerService(IRepository<TrialClinicalQuestion> trialClinicalQuestionRepository,
IRepository<SystemClinicalTableQuestion> systemClinicalTableQuestionRepository,
IRepository<TrialClinicalTableQuestion> trialClinicalTableQuestionRepository,
IRepository<ReadingClinicalData> readingClinicalDataRepository,
IRepository<ClinicalForm> clinicalFormRepository,
IRepository<Subject> subjectRepository,
IRepository<SubjectVisit> subjectVisitRepository,
IRepository<ClinicalTableAnswer> clinicalTableAnswerRepository,
IRepository<ClinicalQuestionAnswer> clinicalQuestionAnswerRepository,
IClinicalQuestionService iClinicalQuestionService,
IRepository<ClinicalAnswerRowInfo> clinicalAnswerRowInfoRepository,
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
IRepository<SystemClinicalQuestion> systemClinicalQuestionRepository
)
{
_subjectVisitRepository = subjectVisitRepository;
_readingClinicalDataRepository = readingClinicalDataRepository;
_clinicalAnswerRowInfoRepository = clinicalAnswerRowInfoRepository;
_clinicalQuestionAnswerRepository = clinicalQuestionAnswerRepository;
_systemClinicalTableQuestionRepository = systemClinicalTableQuestionRepository;
_trialClinicalQuestionRepository = trialClinicalQuestionRepository;
_trialClinicalTableQuestionRepository = trialClinicalTableQuestionRepository;
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
_clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
_clinicalFormRepository = clinicalFormRepository;
this._subjectRepository = subjectRepository;
_clinicalTableAnswerRepository = clinicalTableAnswerRepository;
_iClinicalQuestionService = iClinicalQuestionService;
}
/// <summary>
/// 自动添加CRC临床数据
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
public async Task AutoAddCRCClinical(AutoAddClinicalInDto inDto)
{
var dataTrialSetList = await _clinicalDataTrialSetRepository.Where(x =>x.TrialId == inDto.TrialId && x.UploadRole == UploadRole.CRC && x.IsConfirm)
.IgnoreAutoIncludes().ToListAsync();
var baseLine = await _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId)
.WhereIf(inDto.SubjectId!=null,x=>x.SubjectId==inDto.SubjectId)
.Select(x => new
{
x.SubjectId,
VisitId = x.Id,
x.IsBaseLine,
}).ToListAsync();
var clinicalDataList =await _readingClinicalDataRepository.Where(x =>x.TrialId==inDto.TrialId&&x.ClinicalDataTrialSet.UploadRole== UploadRole.CRC).IgnoreAutoIncludes().ToListAsync();
List<ReadingClinicalData> readingClinicalDatas = new List<ReadingClinicalData>();
baseLine.Select(x => x.SubjectId).Distinct().ForEach(n =>
{
var baseLineVisitId = baseLine.Where(x => x.IsBaseLine && x.SubjectId == n).Select(x => x.VisitId).First();
readingClinicalDatas.AddRange(
dataTrialSetList.Where(x => x.ClinicalDataLevel == ClinicalLevel.Subject).Where(x => clinicalDataList.Where(y => y.ClinicalDataTrialSetId == x.Id && y.SubjectId == n).Count() == 0)
.Select(x => new ReadingClinicalData()
{
ClinicalDataTrialSetId = x.Id,
IsVisit = true,
SubjectId = n,
ReadingId = baseLineVisitId,
TrialId = inDto.TrialId
}).ToList());
readingClinicalDatas.AddRange(
dataTrialSetList.Where(x => x.ClinicalDataLevel == ClinicalLevel.ImageRead).Where(x => clinicalDataList.Where(y => y.ClinicalDataTrialSetId == x.Id && y.SubjectId == n).Count() == 0)
.Select(x => new ReadingClinicalData()
{
ClinicalDataTrialSetId = x.Id,
IsVisit = false,
SubjectId = n,
ReadingId = default(Guid),
TrialId = inDto.TrialId
}).ToList());
readingClinicalDatas.AddRange(
dataTrialSetList.Where(x => x.ClinicalDataLevel == ClinicalLevel.OncologyRead).Where(x => clinicalDataList.Where(y => y.ClinicalDataTrialSetId == x.Id && y.SubjectId == n).Count() == 0)
.Select(x => new ReadingClinicalData()
{
ClinicalDataTrialSetId = x.Id,
IsVisit = false,
SubjectId = n,
ReadingId = default(Guid),
TrialId = inDto.TrialId
}).ToList());
});
baseLine.ForEach(n =>
{
readingClinicalDatas.AddRange(
dataTrialSetList.Where(x => x.ClinicalDataLevel == ClinicalLevel.SubjectVisit).Where(x => clinicalDataList.Where(y => y.ClinicalDataTrialSetId == x.Id && y.ReadingId == n.VisitId).Count() == 0)
.Select(x => new ReadingClinicalData()
{
ClinicalDataTrialSetId = x.Id,
IsVisit = true,
SubjectId = n.SubjectId,
ReadingId = n.VisitId,
TrialId = inDto.TrialId
}).ToList());
});
await _readingClinicalDataRepository.AddRangeAsync(readingClinicalDatas);
await _readingClinicalDataRepository.SaveChangesAsync();
}
/// <summary>
/// 获取CRC受试者临床数据
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<GetCRCSubjectClinicalOutDto>> GetCRCSubjectClinicalList(GetCRCSubjectClinicalInDto inDto)
{
await AutoAddCRCClinical(new AutoAddClinicalInDto()
{
TrialId = inDto.TrialId
}) ;
var subjects = await _subjectRepository.Where(x => x.TrialId == inDto.TrialId).Select(x => new GetCRCSubjectClinicalResultDto()
{
SubjectId = x.Id,
SubjectCode = x.Code
}).ToListAsync();
var clinicalData=await _readingClinicalDataRepository.Where(x=>x.TrialId == inDto.TrialId&&x.ClinicalDataTrialSet.UploadRole==UploadRole.CRC&&x.ClinicalDataTrialSet.ClinicalDataLevel!= ClinicalLevel.SubjectVisit)
.Where(x=>!x.IsSign)
.Include(x=>x.ClinicalDataTrialSet).Select(x=>new GetCRCSubjectClinicalOutDto() {
SubjectId=x.SubjectId,
SubjectCode=x.Subject.Code,
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
ClinicalDataSetEnName= x.ClinicalDataTrialSet.ClinicalDataSetEnName,
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
}).OrderBy(x=>x.SubjectCode).ToListAsync();
// 一次查询报错 分两次写
clinicalData.ForEach(x =>
{
x.ClinicalDataSetEnName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us);
});
var clinicalFormData = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
clinicalData.ForEach(n =>
{
n.ClinicalCount = clinicalFormData.Where(y => y.ClinicalDataTrialSetId == n.ClinicalDataTrialSetId && y.SubjectId == n.SubjectId).Count();
});
return clinicalData;
}
/// <summary>
/// 获取表单列表
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<GetClinicalQuestionAnswerListOutDto> GetClinicalQuestionFormList(GetClinicalQuestionAnswerListInDto inDto)
{
var result = new GetClinicalQuestionAnswerListOutDto();
result.AnswerList = new List<Dictionary<string, string>>();
result.QuestionList=await _trialClinicalQuestionRepository.Where(x=>x.TrialClinicalId==inDto.ClinicalDataTrialSetId
&&x.ClinicalQuestionType!= ReadingQestionType.Group
&& x.ClinicalQuestionType != ReadingQestionType.Table).OrderBy(x=>x.ShowOrder)
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
var answers = await _clinicalQuestionAnswerRepository.Where(x => x.SubjectId == inDto.SubjectId && x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
.Select(x => new
{
x.ClinicalFormId,
x.ClinicalForm.CheckDate,
x.QuestionId,
x.Answer
})
.ToListAsync();
var ClinicalFormIds = answers.OrderBy(x=>x.CheckDate).Select(x => x.ClinicalFormId).Distinct().ToList();
ClinicalFormIds.ForEach(x =>
{
var dic = answers.Where(y => y.ClinicalFormId == x).ToDictionary(x => x.QuestionId.ToString(), x => x.Answer);
dic.Add("clinicalFormId", x.ToString());
result.AnswerList.Add(dic);
});
return result;
}
/// <summary>
/// 获取临床数据表单问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<GetClinicalFormInfoOutDto> GetClinicalFormInfo(GetClinicalFormInfoInDto inDto)
{
var formInfo = await _clinicalFormRepository.Where(x => x.Id == inDto.ClinicalFormId).FirstNotNullAsync();
var questionAnswer = await _clinicalQuestionAnswerRepository.Where(x => x.ClinicalFormId == inDto.ClinicalFormId).Select(x => new ClinicalFormQuestionAnswer
{
QuestionId = x.QuestionId,
Answer = x.Answer
}).ToListAsync();
var tableAnswer = await _clinicalTableAnswerRepository.Where(x => x.ClinicalFormId == inDto.ClinicalFormId).Select(x => new ClinicalFormTableQuestionAnswer
{
TableQuestionId = x.TableQuestionId,
Answer = x.Answer,
QuestionId = x.QuestionId,
RowIndex = x.ClinicalAnswerRowInfo.RowIndex
}).ToListAsync();
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
var tableQuestions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
result.ForEach(x =>
{
_iClinicalQuestionService.FindChildQuestion(x, questions, tableQuestions, questionAnswer, tableAnswer);
});
return new GetClinicalFormInfoOutDto()
{
Question = result
};
}
/// <summary>
/// 提交临床数据表单
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> SubmitClinicalForm(SubmitClinicalFormInDto inDto)
{
ClinicalForm clinicalForm = new ClinicalForm() { };
clinicalForm = new ClinicalForm()
{
ClinicalDataTrialSetId = inDto.ClinicalDataTrialSetId,
SubjectId = inDto.SubjectId,
TrialId= inDto.TrialId,
Id = inDto.ClinicalFormId ?? NewId.NextGuid(),
ReadingId = inDto.ReadingId,
VisitId = inDto.VisitId,
};
try
{
var checkDateQuestionId = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.ClinicalDataTrialSetId && x.IsCheckDate).Select(x => x.Id).FirstNotNullAsync();
clinicalForm.CheckDate = DateTime.Parse(inDto.QuestionAnswers.Where(x => x.QuestionId == checkDateQuestionId).Select(x => x.Answer).First());
}
catch (Exception)
{
}
List<ClinicalQuestionAnswer> clinicalQuestionAnswers = inDto.QuestionAnswers.Select(x => new ClinicalQuestionAnswer()
{
Answer=x.Answer,
ClinicalDataTrialSetId=inDto.ClinicalDataTrialSetId,
SubjectId=inDto.SubjectId,
ClinicalFormId= clinicalForm.Id,
QuestionId=x.QuestionId,
}).ToList();
List<ClinicalAnswerRowInfo> clinicalAnswerRowInfos = new List<ClinicalAnswerRowInfo>();
List<ClinicalTableAnswer> clinicalTableAnswers = new List<ClinicalTableAnswer>();
inDto.TableQuestionAnswerList.ForEach(x => {
var questionid = x.QuestionId;
for (int i = 0; i < x.TableQuestionAnswers.Count(); i++)
{
var rowInfo = new ClinicalAnswerRowInfo()
{
Id = NewId.NextGuid(),
SubjectId = inDto.SubjectId,
ClinicalFormId = clinicalForm.Id,
QuestionId = questionid,
RowIndex = i+1,
};
clinicalAnswerRowInfos.Add(rowInfo);
x.TableQuestionAnswers[i].ForEach(y => {
clinicalTableAnswers.Add(new ClinicalTableAnswer()
{
Answer=y.Answer,
ClinicalFormId= clinicalForm.Id,
QuestionId= questionid,
RowId= rowInfo.Id,
TableQuestionId=y.TableQuestionId,
SubjectId= inDto.SubjectId,
});
});
}
});
if (inDto.ClinicalFormId != null)
{
await _clinicalFormRepository.BatchDeleteNoTrackingAsync(x => x.Id == inDto.ClinicalFormId);
await _clinicalQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
await _clinicalAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
await _clinicalTableAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
}
await _clinicalFormRepository.AddAsync(clinicalForm);
await _clinicalQuestionAnswerRepository.AddRangeAsync(clinicalQuestionAnswers);
await _clinicalAnswerRowInfoRepository.AddRangeAsync(clinicalAnswerRowInfos);
await _clinicalTableAnswerRepository.AddRangeAsync(clinicalTableAnswers);
await _clinicalTableAnswerRepository.SaveChangesAsync();
return ResponseOutput.Ok(true);
}
}
}
@@ -2,6 +2,9 @@
using IRaCIS.Core.Application.Service.Reading.Dto;
using MassTransit;
using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infrastructure;
namespace IRaCIS.Application.Services
{
@@ -11,35 +14,107 @@ namespace IRaCIS.Application.Services
[ApiExplorerSettings(GroupName = "Reading")]
public class ClinicalDataSetService : BaseService
{
public IClinicalQuestionService _iClinicalQuestionService;
public IRepository<SubjectVisit> _subjectVisitRepository;
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
private readonly IRepository<PreviousPDF> _previousPDFRepository;
private readonly IRepository<Trial> _trialRepository;
private readonly IRepository<Dictionary> _dictionaryRepository;
private readonly IRepository<Trial> _trialRepository;
private readonly IRepository<TrialClinicalQuestion> _trialClinicalQuestionRepository;
private readonly IRepository<SystemClinicalQuestion> _systemClinicalQuestionRepository;
public ClinicalDataSetService(IRepository<SubjectVisit> subjectVisitRepository,
IClinicalQuestionService iClinicalQuestionService,
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
IRepository<PreviousPDF> previousPDFRepository,
IRepository<Dictionary> dictionaryRepository,
IRepository<TrialClinicalQuestion> trialClinicalQuestionRepository,
IRepository<SystemClinicalQuestion> systemClinicalQuestionRepository,
IRepository<Trial> trialRepository
)
{
_iClinicalQuestionService = iClinicalQuestionService;
_subjectVisitRepository = subjectVisitRepository;
_trialClinicalQuestionRepository = trialClinicalQuestionRepository;
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
_clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
_clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
this._previousPDFRepository = previousPDFRepository;
this._trialRepository = trialRepository;
this._dictionaryRepository = dictionaryRepository;
this._trialRepository = trialRepository;
}
/// <summary>
/// 应用系统临床数据
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
/// <exception cref="BusinessValidationFailedException"></exception>
[HttpPost]
public async Task<IResponseOutput> ApplySystemClinical(ApplySystemClinicalInDto inDto)
{
var isNeedVerify = await _clinicalDataSystemSetRepository.AnyAsync(x => x.Id == inDto.SystemClinicalId && (x.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataLevel == ClinicalLevel.OncologyRead)
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
);
if (_systemClinicalQuestionRepository.Where(x => isNeedVerify&& x.SystemClinicalId == inDto.SystemClinicalId && x.IsCheckDate).Count() != 1)
{
throw new BusinessValidationFailedException(_localizer["ClinicalDataSet_Apply"]);
}
await _clinicalDataSystemSetRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.SystemClinicalId, x => new ClinicalDataSystemSet()
{
IsApply = true
});
await _clinicalDataSystemSetRepository.SaveChangesAsync();
return ResponseOutput.Ok(true);
}
/// <summary>
/// 应用项目临床数据
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
/// <exception cref="BusinessValidationFailedException"></exception>
[HttpPost]
public async Task<IResponseOutput> ApplyTrialClinical(ApplyTrialClinicalInDto inDto)
{
var isNeedVerify = await _clinicalDataTrialSetRepository.AnyAsync(x => x.Id == inDto.TrialClinicalId && (x.ClinicalDataLevel == ClinicalLevel.ImageRead|| x.ClinicalDataLevel==ClinicalLevel.OncologyRead)
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
);
if (_trialClinicalQuestionRepository.Where(x => isNeedVerify&& x.TrialClinicalId == inDto.TrialClinicalId && x.IsCheckDate).Count() != 1)
{
throw new BusinessValidationFailedException(_localizer["ClinicalDataSet_Apply"]);
}
await _clinicalDataTrialSetRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.TrialClinicalId, x => new ClinicalDataTrialSet()
{
IsApply = true
});
await _clinicalDataTrialSetRepository.SaveChangesAsync();
return ResponseOutput.Ok(true);
}
#region
/// <summary>
@@ -50,14 +125,21 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateClinicalDataSystemSet(ClinicalDataSystemSetAddOrEdit indto)
{
var existsQuery = _clinicalDataSystemSetRepository
if (indto.ClinicalUploadType == ClinicalUploadType.Table || indto.ClinicalUploadType == ClinicalUploadType.PDF)
{
indto.IsApply = true;
}
var dictionary = await _dictionaryRepository.Where(x => x.Parent.Code == "ClinicalDataType" && x.Code == indto.ClinicalDataSetEnum.ToString()).FirstNotNullAsync();
indto.ClinicalDataSetName = dictionary.ValueCN;
indto.ClinicalDataSetEnName = dictionary.Value;
var existsQuery = _clinicalDataSystemSetRepository
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName);
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName||x.ClinicalDataSetEnName==indto.ClinicalDataSetEnName);
if (await existsQuery.AnyAsync())
{
return ResponseOutput.NotOk("存在同类型的临床数据,操作失败");
//---存在同类型的临床数据,操作失败
return ResponseOutput.NotOk(_localizer["ClinicalDataSet_DupTypeFail"]);
}
indto.CriterionEnumListStr= $"|{String.Join('|', indto.CriterionEnumList)}|";
@@ -122,13 +204,20 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateClinicalDataTrialSet(ClinicalDataTrialSetAddOrEdit indto)
{
if (indto.ClinicalUploadType == ClinicalUploadType.Table || indto.ClinicalUploadType == ClinicalUploadType.PDF)
{
indto.IsApply = true;
}
var existsQuery = _clinicalDataTrialSetRepository
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName && x.TrialId == indto.TrialId);
.Where(x => (x.ClinicalDataSetName == indto.ClinicalDataSetName||x.ClinicalDataSetEnName==indto.ClinicalDataSetEnName) && x.TrialId == indto.TrialId);
if (await existsQuery.AnyAsync())
{
return ResponseOutput.NotOk("存在同类型的临床数据,操作失败");
//---存在同类型的临床数据,操作失败
return ResponseOutput.NotOk(_localizer["ClinicalDataSet_DupTypeFail"]);
}
//indto.CriterionEnumListStr = $"|{String.Join('|', indto.CriterionEnumList)}|";
@@ -252,7 +341,7 @@ namespace IRaCIS.Application.Services
//不存在的时候,就将系统数据同步到项目临床数据配置
if (!await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == trialId && x.SystemClinicalDataSetId != null))
{
var systemClinicalDataList = await _clinicalDataSystemSetRepository.AsQueryable().ToListAsync();
var systemClinicalDataList = await _clinicalDataSystemSetRepository.Where(x=>x.IsApply).AsQueryable().ToListAsync();
var systemIds = systemClinicalDataList.Select(x => x.Id).ToList();
var trialSystemClinicalDataSetIds = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == trialId && x.SystemClinicalDataSetId != null).Select(x => x.SystemClinicalDataSetId.Value).ToListAsync();
@@ -272,10 +361,12 @@ namespace IRaCIS.Application.Services
ClinicalDataSetName = x.ClinicalDataSetName,
ClinicalDataLevel = x.ClinicalDataLevel,
ClinicalUploadType = x.ClinicalUploadType,
ClinicalDataSetEnName=x.ClinicalDataSetEnName,
UploadRole = x.UploadRole,
FileName = x.FileName,
Path = x.Path,
TrialId = trialId,
IsApply = x.IsApply,
//项目不采用 标准枚举字符串的方式
//CriterionEnumListStr=x.CriterionEnumListStr
@@ -290,6 +381,13 @@ namespace IRaCIS.Application.Services
var result = await _clinicalDataTrialSetRepository.SaveChangesAsync();
await _iClinicalQuestionService.SynchronizationQuestion(dataSets.Select(x => new SynchronizationQuestionDto()
{
SystemClinicalId = x.SystemClinicalDataSetId.Value,
TrialClinicalId = x.Id,
}).ToList());
}
#endregion
@@ -0,0 +1,527 @@
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2023-06-15 15:06:06
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
using Microsoft.AspNetCore.Mvc;
using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Domain.Share;
using MassTransit;
namespace IRaCIS.Core.Application.Service
{
/// <summary>
/// 临床数据问题
/// </summary>
[ApiExplorerSettings(GroupName = "Reading")]
public class ClinicalQuestionService : BaseService, IClinicalQuestionService
{
private readonly IRepository<TrialClinicalQuestion> _trialClinicalQuestionRepository;
private readonly IRepository<SystemClinicalQuestion> _systemClinicalQuestionRepository;
private readonly IRepository<SystemClinicalTableQuestion> _systemClinicalTableQuestionRepository;
private readonly IRepository<TrialClinicalTableQuestion> _trialClinicalTableQuestionRepository;
public ClinicalQuestionService(IRepository<TrialClinicalQuestion> trialClinicalQuestionRepository,
IRepository<SystemClinicalTableQuestion> systemClinicalTableQuestionRepository,
IRepository<TrialClinicalTableQuestion> trialClinicalTableQuestionRepository,
IRepository<SystemClinicalQuestion> systemClinicalQuestionRepository
)
{
_systemClinicalTableQuestionRepository = systemClinicalTableQuestionRepository;
_trialClinicalQuestionRepository = trialClinicalQuestionRepository;
_trialClinicalTableQuestionRepository = trialClinicalTableQuestionRepository;
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
}
/// <summary>
/// 获取系统临床数据预览
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<(List<ClinicalQuestionPreviewDto>, bool)> GetSystemClinicalQuestionPreview(GetSystemClinicalQuestionPreviewDto inDto)
{
var questions = await _systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
var tableQuestions= await _systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
result.ForEach(x =>
{
this.FindChildQuestion(x, questions, tableQuestions, new List<ClinicalFormQuestionAnswer>(), new List<ClinicalFormTableQuestionAnswer>());
});
return (result, true);
}
/// <summary>
/// 获取项目临床数据预览
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<(List<ClinicalQuestionPreviewDto>, bool)> GetTrialClinicalQuestionPreview(GetTrialClinicalQuestionPreviewDto inDto)
{
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
var tableQuestions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
result.ForEach(x =>
{
this.FindChildQuestion(x, questions, tableQuestions,new List<ClinicalFormQuestionAnswer> (),new List<ClinicalFormTableQuestionAnswer>());
});
return (result, true);
}
/// <summary>
/// 获取子元素
/// </summary>
/// <param name="item"></param>
/// <param name="questions"></param>
/// <param name="tableQuestions"></param>
public void FindChildQuestion(ClinicalQuestionPreviewDto item, List<ClinicalQuestionPreviewDto> questions, List<ClinicalTablePreviewDto> tableQuestions,List<ClinicalFormQuestionAnswer> answers, List<ClinicalFormTableQuestionAnswer> tableAnswers)
{
item.Childrens = questions.Where(x => (x.ParentId == item.Id)||(x.GroupId== item.Id&&x.ParentId==null)).ToList();
item.Answer = answers.Where(x => x.QuestionId == item.Id).Select(x => x.Answer).FirstOrDefault()??string.Empty;
var tableIndexs = tableAnswers.Where(x => x.QuestionId == item.Id).Select(x => x.RowIndex).Distinct().OrderBy(x=>x).ToList();
item.TableAnswer = new List<Dictionary<Guid, string>>();
tableIndexs.ForEach(x =>
{
item.TableAnswer.Add(tableAnswers.Where(y => y.RowIndex == x).ToDictionary(y => y.TableQuestionId, y => y.Answer));
});
item.TableQuestions = tableQuestions.Where(x => x.QuestionId == item.Id).OrderBy(x=>x.ShowOrder).ToList();
item.Childrens.ForEach(x => {
this.FindChildQuestion(x, questions, tableQuestions, answers, tableAnswers);
});
}
#region
/// <summary>
/// 获取项目临床问题
/// </summary>
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<TrialClinicalQuestionDto>> GetTrialClinicalQuestionList(TrialClinicalQuestionQuery inQuery)
{
var trialClinicalQuestionQueryable = _trialClinicalQuestionRepository.Where(x=>x.TrialClinicalId==inQuery.TrialClinicalId)
.WhereIf(!inQuery.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inQuery.QuestionName) || x.QuestionEnName.Contains(inQuery.QuestionName))
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider);
var pageList = await trialClinicalQuestionQueryable
.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialClinicalQuestion.ShowOrder) : inQuery.SortField,
inQuery.Asc);
return pageList;
}
/// <summary>
/// 新增或者修改项目临床问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateTrialClinicalQuestion(TrialClinicalQuestionDto inDto)
{
if (await _trialClinicalQuestionRepository.AnyAsync(x =>x.TrialClinicalId==inDto.TrialClinicalId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
{
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"]);
}
var entity = await _trialClinicalQuestionRepository.InsertOrUpdateAsync(inDto, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 删除项目临床数据问题
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("{id:guid}")]
public async Task<IResponseOutput> DeleteTrialClinicalQuestion(Guid id)
{
var success = await _trialClinicalQuestionRepository.DeleteFromQueryAsync(t => t.Id == id, true);
return ResponseOutput.Ok();
}
/// <summary>
/// 获取项目问题分组
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<TrialClinicalQuestionDto>> GetTrialClinicalGroupQuestionList(GetTrialGroupDto inDto)
{
return await this._trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId&&x.ClinicalQuestionType== "group")
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
}
/// <summary>
/// 获取项目标准其他问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<TrialClinicalQuestionDto>> GetTrialClinicalOtherQuestionList(GetTrialGroupDto inDto)
{
var types = new List<string>()
{
"select","radio"
};
return await this._trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId && types.Contains( x.ClinicalQuestionType))
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
}
#endregion
#region
/// <summary>
/// 获取系统临床问题
/// </summary>
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<SystemClinicalQuestionDto>> GetSystemClinicalQuestionList(SystemClinicalQuestionQuery inQuery)
{
var systemClinicalQuestionQueryable = _systemClinicalQuestionRepository
.WhereIf(!inQuery.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inQuery.QuestionName) || x.QuestionEnName.Contains(inQuery.QuestionName))
.ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider);
var pageList = await systemClinicalQuestionQueryable
.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(SystemClinicalQuestion.ShowOrder) : inQuery.SortField,
inQuery.Asc);
return pageList;
}
/// <summary>
/// 新增或者修改系统临床问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateSystemClinicalQuestion(SystemClinicalQuestionDto inDto)
{
if (await _systemClinicalQuestionRepository.AnyAsync(x => x.SystemClinicalId == inDto.SystemClinicalId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
{
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"]);
}
var entity = await _systemClinicalQuestionRepository.InsertOrUpdateAsync(inDto, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 删除系统临床数据问题
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("{id:guid}")]
public async Task<IResponseOutput> DeleteSystemClinicalQuestion(Guid id)
{
var success = await _systemClinicalQuestionRepository.DeleteFromQueryAsync(t => t.Id == id, true);
return ResponseOutput.Ok();
}
/// <summary>
/// 获取系统问题分组
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<SystemClinicalQuestionDto>> GetSystemClinicalGroupQuestionList(GetSystemGroupDto inDto)
{
return await this._systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && x.ClinicalQuestionType =="group")
.ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
}
/// <summary>
/// 获取系统其他问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<SystemClinicalQuestionDto>> GetSystemClinicalOtherQuestionList(GetSystemGroupDto inDto)
{
var types = new List<string>()
{
"select","radio"
};
return await this._systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && types.Contains(x.ClinicalQuestionType))
.ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
}
#endregion
#region
/// <summary>
/// 获取系统表格问题
/// </summary>
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<SystemClinicalTableQuestionDto>> GetSystemClinicalTableQuestionList(SystemClinicalTableQuestionQuery inQuery)
{
var systemClinicalTableQuestionQueryable = this._systemClinicalTableQuestionRepository
.Where(x => x.QuestionId == inQuery.QuestionId)
.ProjectTo<SystemClinicalTableQuestionDto>(_mapper.ConfigurationProvider);
var pageList = await systemClinicalTableQuestionQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(SystemClinicalTableQuestion.ShowOrder) : inQuery.SortField,
inQuery.Asc);
return pageList;
}
/// <summary>
/// 新增或修改系统表格问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateSystemClinicalTableQuestion(SystemClinicalTableQuestionDto inDto)
{
if (await _systemClinicalTableQuestionRepository.AnyAsync(x => x.QuestionId == inDto.QuestionId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
{
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"]);
}
var entity = await _systemClinicalTableQuestionRepository.InsertOrUpdateAsync(inDto, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 删除系统表格问题
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("{id:guid}")]
public async Task<IResponseOutput> DeleteSystemClinicalTableQuestion(Guid id)
{
var success = await _systemClinicalTableQuestionRepository.DeleteFromQueryAsync(t => t.Id == id, true);
return ResponseOutput.Ok();
}
#endregion
#region
/// <summary>
/// 获取项目表格问题
/// </summary>
/// <param name="inQuery"></param>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<TrialClinicalTableQuestionDto>> GetTrialClinicalTableQuestionList(TrialClinicalTableQuestionQuery inQuery)
{
var trialClinicalTableQuestionQueryable = this._trialClinicalTableQuestionRepository
.Where(x => x.QuestionId == inQuery.QuestionId)
.ProjectTo<TrialClinicalTableQuestionDto>(_mapper.ConfigurationProvider);
var pageList = await trialClinicalTableQuestionQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialClinicalTableQuestion.ShowOrder) : inQuery.SortField,
inQuery.Asc);
return pageList;
}
/// <summary>
/// 新增或修改项目表格问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateTrialClinicalTableQuestion(TrialClinicalTableQuestionDto inDto)
{
if (await _trialClinicalTableQuestionRepository.AnyAsync(x => x.QuestionId == inDto.QuestionId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
{
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"]);
}
var entity = await _trialClinicalTableQuestionRepository.InsertOrUpdateAsync(inDto, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 删除项目表格问题
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("{id:guid}")]
public async Task<IResponseOutput> DeleteTrialClinicalTableQuestion(Guid id)
{
var success = await _trialClinicalTableQuestionRepository.DeleteFromQueryAsync(t => t.Id == id, true);
return ResponseOutput.Ok();
}
#endregion
#region
/// <summary>
/// 同步系统问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
public async Task SynchronizationQuestion(List<SynchronizationQuestionDto> inDto)
{
var trialClinicalId = inDto.Select(x => x.TrialClinicalId).ToList();
var systemClinicalId = inDto.Select(x => x.SystemClinicalId).ToList();
var questionRelationList =await _trialClinicalQuestionRepository.Where(x => trialClinicalId.Contains(x.TrialClinicalId)).Select(x => new QuestionDic()
{
SystemQuestionId=x.SystemClinicalQuestionId?? default(Guid),
TrialQuestionId=x.Id,
TrialClinicalId=x.TrialClinicalId,
}).ToListAsync();
var tableQuestionRelationList = await _trialClinicalTableQuestionRepository.Where(x => trialClinicalId.Contains(x.TrialClinicalId)).Select(x => new QuestionDic()
{
SystemQuestionId = x.SystemTableQuestionId ?? default(Guid),
TrialQuestionId = x.Id,
TrialClinicalId = x.TrialClinicalId,
}).ToListAsync();
var newTrialQuestionAll = await _systemClinicalQuestionRepository.Where(x => systemClinicalId.Contains(x.SystemClinicalId))
.ProjectTo<TrialClinicalQuestionSynchronize>(_mapper.ConfigurationProvider).ToListAsync();
var newTrialTableQuestionAll = await _systemClinicalTableQuestionRepository.Where(x => systemClinicalId.Contains(x.SystemClinicalId))
.ProjectTo<TrialClinicalTableQuestionSynchronize>(_mapper.ConfigurationProvider).ToListAsync();
List<TrialClinicalQuestion> addTrialDataList = new List<TrialClinicalQuestion>();
List<TrialClinicalTableQuestion> addTrialTableList = new List<TrialClinicalTableQuestion>();
foreach (var item in inDto)
{
var questionRelation = questionRelationList.Where(x=>x.TrialClinicalId==item.TrialClinicalId).ToDictionary(
x => x.SystemQuestionId,
x => x.TrialQuestionId
);
var newTrialQuestionList = newTrialQuestionAll.Where(x => x.SystemClinicalId == item.SystemClinicalId).ToList();
newTrialQuestionList.ForEach(x =>
{
if (questionRelation.ContainsKey(x.Id))
{
x.Id = questionRelation[x.Id];
}
else
{
var newid = NewId.NextGuid();
questionRelation.Add(x.Id, newid);
x.Id = newid;
}
x.TrialClinicalId = item.TrialClinicalId;
});
var copyNewQuestionList = newTrialQuestionList.Clone();
foreach (var x in newTrialQuestionList)
{
var question = x.Clone();
if (question.ParentId != null)
{
question.ParentId = questionRelation[question.ParentId ?? default(Guid)];
}
if (question.GroupId != null)
{
question.GroupId = questionRelation[question.GroupId ?? default(Guid)];
}
addTrialDataList.Add(question);
};
var tableQuestionRelation = tableQuestionRelationList.Where(x => x.TrialClinicalId == item.TrialClinicalId).ToDictionary(
x => x.SystemQuestionId,
x => x.TrialQuestionId
);
var newTrialTableQuestionList = newTrialTableQuestionAll.Where(x => x.SystemClinicalId == item.SystemClinicalId)
.ToList();
newTrialTableQuestionList.ForEach(x =>
{
if (tableQuestionRelation.ContainsKey(x.Id))
{
x.Id = tableQuestionRelation[x.Id];
}
else
{
var newid = NewId.NextGuid();
tableQuestionRelation.Add(x.Id, newid);
x.Id = newid;
}
});
foreach (var x in newTrialTableQuestionList)
{
var tableQuestion = x.Clone();
tableQuestion.TrialClinicalId = item.TrialClinicalId;
tableQuestion.QuestionId = copyNewQuestionList.Where(y => y.SystemClinicalQuestionId == x.QuestionId).Select(y => y.Id).FirstOrDefault();
addTrialTableList.Add(tableQuestion);
}
}
await _trialClinicalQuestionRepository.BatchDeleteNoTrackingAsync(x => trialClinicalId.Contains(x.TrialClinicalId));
await _trialClinicalQuestionRepository.AddRangeAsync(addTrialDataList);
await _trialClinicalTableQuestionRepository.BatchDeleteNoTrackingAsync(x => trialClinicalId.Contains(x.TrialClinicalId) );
await _trialClinicalTableQuestionRepository.AddRangeAsync(addTrialTableList);
await _trialClinicalQuestionRepository.SaveChangesAsync();
}
#endregion
}
}

Some files were not shown because too many files have changed in this diff Show More