Compare commits
786 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b0ef2dc8ab | |||
| ccf4bbdff9 | |||
| c3e36991b8 | |||
| 81f6c10f23 | |||
| 719ca071e1 | |||
| dad420a7e8 | |||
| d84aedf135 | |||
| 34f3b1607e | |||
| 7fa73e0054 | |||
| c146c2bfd2 | |||
| 2a1220899e | |||
| 874d36de28 | |||
| 0283052555 | |||
| effef5ad65 | |||
| 43d260e036 | |||
| 19708240b2 | |||
| 0999bae749 | |||
| e6bd35ae04 | |||
| 102e193ae8 | |||
| 20d557e795 | |||
| 593ab42882 | |||
| b56d256e10 | |||
| 614a3bd70e | |||
| 2eb3b04365 | |||
| 1fa3a5a181 | |||
| cd2007c4fd | |||
| 67e710eac0 | |||
| ef451d82ec | |||
| 899ebf2a30 | |||
| f233d27f96 | |||
| 9e8ab8acca | |||
| 2265387f47 | |||
| baf8f39bc6 | |||
| 3fa14d92ae | |||
| e6c577e68b | |||
| bb111dbbeb | |||
| 0df0b10a72 | |||
| 0a7ba9f0f5 | |||
| cd88990c32 | |||
| d53a1300fc | |||
| 07332ff3e1 | |||
| 8195a1cf3e | |||
| f5e5a47624 | |||
| 28608f3ecb | |||
| bb2da7ca81 | |||
| 713518a68c | |||
| bc448da297 | |||
| 8447878cb2 | |||
| 1b5a9673f6 | |||
| 27711f4184 | |||
| bb9bac1edf | |||
| 41ae2febc7 | |||
| c072c526e2 | |||
| d6bb98b84f | |||
| 42587ee59f | |||
| 62a964a3ea | |||
| 72447eb82f | |||
| 2f83c27fde | |||
| b219593f61 | |||
| 8521b0c28c | |||
| 26a62426f0 | |||
| 1246413e30 | |||
| f50b5819c0 | |||
| 6db8d61b7c | |||
| 58250fe993 | |||
| 6cae7a1ae4 | |||
| 73541efbf4 | |||
| f4bd891deb | |||
| a9831657cc | |||
| 500a9fbaca | |||
| 5f11c3a602 | |||
| 7680e90d65 | |||
| 06a57cd056 | |||
| 7626d17540 | |||
| 344b92c427 | |||
| 4719177009 | |||
| c1461633ce | |||
| 6be7aa1ad9 | |||
| 4da7c2f960 | |||
| 47a45df610 | |||
| 1a44e48b2d | |||
| c566a703eb | |||
| 001c248cb8 | |||
| 654462fe6b | |||
| ab6642ce33 | |||
| 946386ad43 | |||
| cf9c79a928 | |||
| 493e4e8dca | |||
| ecbe8434f3 | |||
| 644fe1bd3c | |||
| 870fca2e93 | |||
| 6207fb5006 | |||
| ae913d8213 | |||
| ce969822a0 | |||
| 4fc311d4a5 | |||
| 2b424ff45c | |||
| e5d9cfc50e | |||
| ac3552818b | |||
| c004741f95 | |||
| 2bdc0c7704 | |||
| 35d90d56dd | |||
| f14525ea95 | |||
| c2350f1418 | |||
| 4b8b02fa55 | |||
| 62102b8b03 | |||
| 0655318d2d | |||
| 0bd2a10091 | |||
| ce11788878 | |||
| 0cb74296c3 | |||
| def08b72ca | |||
| 1ef8d2913b | |||
| 7e18b1287e | |||
| fdcb6ad12f | |||
| 988bf0e92c | |||
| f6612286d9 | |||
| c21845c60d | |||
| 867ef0ef97 | |||
| f27bee83b7 | |||
| e3b6feb4da | |||
| d727703075 | |||
| c49cf0ed12 | |||
| f324d207dd | |||
| c9bda275f5 | |||
| 62ed1a408d | |||
| 25efb34f1f | |||
| eb0f13c075 | |||
| 7ca92a7675 | |||
| e313f88bca | |||
| 4823eb29d5 | |||
| 43ec332f61 | |||
| cac0652120 | |||
| cc088900b6 | |||
| 824b165723 | |||
| 443b94b332 | |||
| dc116d3a6f | |||
| bbc8859a16 | |||
| 09e388b01a | |||
| e5fcb75b9f | |||
| 8e104e133f | |||
| e2a77537f0 | |||
| a73a79b627 | |||
| e79c3a8f37 | |||
| ca9a2dad18 | |||
| cd03f5f31d | |||
| 33e25de801 | |||
| 9cd60e9575 | |||
| 4da4a4de89 | |||
| ec0a88a5ec | |||
| a52a00e58c | |||
| 0a6ffbba07 | |||
| 8cb5423b0b | |||
| 5a6411c6c3 | |||
| b97a8b5a68 | |||
| 91794266e7 | |||
| 2f86e2dae1 | |||
| fb76c5af6c | |||
| 3f6ec5b7ea | |||
| c95ea8c547 | |||
| facd9e0e5f | |||
| 9d0c3d3fc5 | |||
| 907d0d39a1 | |||
| 4d689100ee | |||
| 818d9d6f62 | |||
| 9a2059726f | |||
| 8bcac405e5 | |||
| 19661c5e82 | |||
| 9875d9622d | |||
| 7573ffe941 | |||
| 47166ab2eb | |||
| 0295b7d919 | |||
| 3653072497 | |||
| 0e7f203a1b | |||
| ab99265c88 | |||
| f774d95f5c | |||
| 9e1e32f16d | |||
| 0accb453e5 | |||
| e2b285c792 | |||
| 935f95fa3b | |||
| a4d20d9f08 | |||
| 0e23719c7b | |||
| eb1f06658d | |||
| 1e177a2530 | |||
| 49031b0e48 | |||
| ca5bbb3064 | |||
| b338188c5f | |||
| 9cbe4cc36e | |||
| 6f5f521803 | |||
| a6db30280b | |||
| 4db3860ade | |||
| 57837cfe1d | |||
| b51fdc5769 | |||
| 5038d7ad53 | |||
| c1d618326b | |||
| db1a0195fe | |||
| 238def8089 | |||
| 59e969c2a8 | |||
| 029a288be2 | |||
| 11e5448acf | |||
| 71577d0346 | |||
| 681e559cb4 | |||
| 862390ae78 | |||
| f210799c4d | |||
| d7700c3c77 | |||
| 44fa4d3fc4 | |||
| f0c57c643b | |||
| 5e48ed1e23 | |||
| a3f12b2a53 | |||
| cc00cce704 | |||
| 9c244c6750 | |||
| ffb5d46ca3 | |||
| 7376732b1a | |||
| 1caf4ff8e6 | |||
| 22147483c1 | |||
| c7dbf7ba92 | |||
| fd3f76d35c | |||
| e10bca6892 | |||
| 4a01960426 | |||
| 318364e70b | |||
| 383064a7b7 | |||
| 78bbfb5f41 | |||
| 9aec1f5f50 | |||
| 66beb43daf | |||
| b02589a957 | |||
| d4a1d83851 | |||
| 53aee1020d | |||
| 010c106879 | |||
| fb43e38c7d | |||
| ca96c67e96 | |||
| 1fbf635582 | |||
| 44d62b187f | |||
| 57600cbad1 | |||
| 311d6507ce | |||
| 8e520ce579 | |||
| 5a97e15885 | |||
| bb36c67159 | |||
| 7a33edc7a6 | |||
| a7d6303da4 | |||
| 704c201c33 | |||
| c69d3eec36 | |||
| 6e5a3a0078 | |||
| ed62de9135 | |||
| a8b218ce95 | |||
| f6d2b1e7f1 | |||
| 85439213b2 | |||
| 2933d100f7 | |||
| ac799688d3 | |||
| a4b9c44cfa | |||
| af282d2bb8 | |||
| a93bbebb61 | |||
| 4552a24caa | |||
| fc22ec0672 | |||
| 963fbcb5e8 | |||
| 3da3b9de45 | |||
| a055d1c668 | |||
| 0b130bbc01 | |||
| 9f9bc9c747 | |||
| 75367ae727 | |||
| bd9d78622f | |||
| 6b807f419b | |||
| f58ee6f63a | |||
| 7510d86a52 | |||
| 65fba6ca41 | |||
| 3e2198b7ba | |||
| 535c0fc419 | |||
| 1c5d30b673 | |||
| 3bf26dbbef | |||
| 329437411d | |||
| 090cdaf2e4 | |||
| 7c257f261c | |||
| 477bc7baf7 | |||
| 32d6ebef9c | |||
| 51e0676ce5 | |||
| 53156e210f | |||
| 84f76c09f7 | |||
| 74e0765d7a | |||
| 51cfadbc77 | |||
| 01e047f639 | |||
| 4050d7e4a3 | |||
| adab66172d | |||
| 7c850c969e | |||
| f55fa98dec | |||
| 7f28c984e1 | |||
| 6220e53d8f | |||
| 5bb0231354 | |||
| 58eec48af7 | |||
| 65545dd3e5 | |||
| 5b92015c98 | |||
| 64c97b22d5 | |||
| 87adbe9bed | |||
| c6ed8b8318 | |||
| 4d2890976a | |||
| 9cfddf1327 | |||
| 84203d5aa2 | |||
| 4d19fffc5f | |||
| 18683390b7 | |||
| fb137ae840 | |||
| c8bc0c4a32 | |||
| 8ded82fa81 | |||
| acd1f47f4a | |||
| 054827bbae | |||
| a5ebe97dc5 | |||
| 02b2d8f754 | |||
| cf5da8f55a | |||
| 40947de05a | |||
| 662648691d | |||
| 29836a9c62 | |||
| a2b1a0d64b | |||
| 87fbd2cb59 | |||
| c91e21c23a | |||
| 0f25c7db0e | |||
| e5b5cbb8d8 | |||
| 9c1af1b8dc | |||
| 0da09da45e | |||
| 87aaefadf6 | |||
| b5b739a5cb | |||
| 1315d5dc29 | |||
| 72b70f5311 | |||
| fd15a62148 | |||
| e9bd625195 | |||
| c37fcf588c | |||
| 3f8d5027c8 | |||
| 972fc32eeb | |||
| 1ba9efe894 | |||
| f85ac8a813 | |||
| 7bf097c127 | |||
| fc579d9cf4 | |||
| b1c0933428 | |||
| bd7dd906fb | |||
| 3a8e400f33 | |||
| c6dd323b80 | |||
| dfb45d8391 | |||
| 0b0df00525 | |||
| 96fc5ae78c | |||
| a4b2d68995 | |||
| 70ababc2d9 | |||
| e57887eba5 | |||
| aef7fded18 | |||
| e0613c1f2d | |||
| f6d323cc31 | |||
| aa85562076 | |||
| 0165688799 | |||
| c2aefebedc | |||
| 1c5e4454da | |||
| 65e2a45d74 | |||
| 99026d6483 | |||
| 9190783ac4 | |||
| ae8f50dc14 | |||
| 2a51de03b7 | |||
| 2be9daa443 | |||
| 2778b3ea7b | |||
| 4cedb9dbcb | |||
| ed6a6fb844 | |||
| 8daf02246e | |||
| b3178e6f8d | |||
| 00cbde90c7 | |||
| 938175c49f | |||
| 146fc916d1 | |||
| 87776513fb | |||
| 60d462e5f9 | |||
| b39d8dd546 | |||
| b65635c41c | |||
| fe2539afba | |||
| d2ff216396 | |||
| 4c05da8335 | |||
| 6061cf5d93 | |||
| d313b7d8a6 | |||
| 71c21ccc00 | |||
| f415c03daa | |||
| 2bfef364ec | |||
| c822d20d0d | |||
| 3a996212ed | |||
| 5a3b6a5f93 | |||
| 3f7227ce32 | |||
| af0df80874 | |||
| a163d8a785 | |||
| 70fbf8d352 | |||
| d9a8692be8 | |||
| 56fb9c14d1 | |||
| 8bc0cee81f | |||
| dc86767184 | |||
| e1383445e2 | |||
| 0a30107859 | |||
| ba27925409 | |||
| 3a52021cdc | |||
| aba4fc70c2 | |||
| 5b89343192 | |||
| 20f9e90a69 | |||
| 5c58171ac3 | |||
| e98d80eea6 | |||
| c14d5be4ac | |||
| fea108371f | |||
| dd47bf05f8 | |||
| 3a160c1913 | |||
| c42c26d76a | |||
| f7117563f7 | |||
| 39968194b1 | |||
| 0d5f7e5673 | |||
| 7f4e111f7d | |||
| 0c92fcb011 | |||
| 2f4418e3ed | |||
| 75a3d7c80f | |||
| 4605053e50 | |||
| a8da0c0b55 | |||
| ba984f9263 | |||
| 451a311142 | |||
| f86bc219cf | |||
| 06bd63b6d1 | |||
| be088d8ba2 | |||
| c718ec8446 | |||
| 668e1019f0 | |||
| e2f5a7fae1 | |||
| f1a141c018 | |||
| 30a0f428bc | |||
| 7a8346621d | |||
| 6d93054d3d | |||
| 5c53e78aca | |||
| 1eeb832b0e | |||
| c8db9431b2 | |||
| ce8e0e3972 | |||
| ed4192838d | |||
| d900c368e2 | |||
| 6926bb877c | |||
| cb9b54a089 | |||
| 57c5d14f5a | |||
| 4f19d1638d | |||
| ace39a7f94 | |||
| e8e0540cc2 | |||
| a98799daaf | |||
| f2b53cd359 | |||
| 960f479b91 | |||
| d6dacb93dd | |||
| 8823656231 | |||
| 2c859e7186 | |||
| 99828dd82e | |||
| 855242e6fe | |||
| 90a1a920fa | |||
| c73968f490 | |||
| 282368b9e0 | |||
| 726a2be71e | |||
| 510104d0ff | |||
| 12318937f4 | |||
| 8f17d4b110 | |||
| 18496246b2 | |||
| 55f60e897a | |||
| dd2d142340 | |||
| 49a0cf3ece | |||
| f0d4a1c075 | |||
| 5e6db93250 | |||
| 12adf2f3a9 | |||
| b08908b1dc | |||
| 8f08746377 | |||
| 045e9346ad | |||
| 864ab17ff3 | |||
| 700d111011 | |||
| 7168d68997 | |||
| 40ec535e8a | |||
| 4dfaf29f3d | |||
| 702cd361fe | |||
| b776103328 | |||
| 381e7b5046 | |||
| ebdec8dd62 | |||
| 6677f2a01e | |||
| 5aaa9043ff | |||
| 48874adda3 | |||
| 0cf5a88d63 | |||
| 4b92874ca6 | |||
| 2d81b05fba | |||
| 78756aa2f4 | |||
| a15c91ebcb | |||
| 4b389c8293 | |||
| 2313b5e907 | |||
| e22941d947 | |||
| 3efc173056 | |||
| 6389919cfd | |||
| 984b840fa7 | |||
| 2bf01fbf0c | |||
| 116eeb753d | |||
| 82a6237323 | |||
| 6220a96666 | |||
| 259ab2c569 | |||
| efda4e0fdd | |||
| 968264fe9a | |||
| 57911cf567 | |||
| a61d9ae4d1 | |||
| 5735383cd7 | |||
| e3607895b4 | |||
| 16a2e0b53f | |||
| 41e5f9fd78 | |||
| 64b750b06e | |||
| ca90736366 | |||
| 664b308e31 | |||
| 8de0671d31 | |||
| 19d7192842 | |||
| c3ed54f05f | |||
| ef6655a014 | |||
| 234e549b22 | |||
| 903f72989a | |||
| 3e9900cc45 | |||
| 78d0cffd3d | |||
| 658e8d983c | |||
| 8174237a82 | |||
| 39a5e8eade | |||
| 54dea66f5f | |||
| 86fd9ddc0e | |||
| b071d1126b | |||
| 139e9daec0 | |||
| 4eeda2b3e7 | |||
| fa64b42a84 | |||
| ce67f4828f | |||
| 87e3d953d3 | |||
| 5d4668eaee | |||
| cfce8dba1f | |||
| c11e319472 | |||
| 7c7a0cd20b | |||
| a66bb42126 | |||
| 7d63f3f5cb | |||
| b102d23477 | |||
| e19c03412d | |||
| 56cba570bf | |||
| c7abcc153e | |||
| 967a77f371 | |||
| 2060f2c62e | |||
| 193c107539 | |||
| 2fe0851786 | |||
| 46b68ca2c9 | |||
| 396797dc0c | |||
| 5579f543de | |||
| ce31ab3097 | |||
| daa4764aac | |||
| a24c6775e8 | |||
| eb9de1769e | |||
| d675cc50b3 | |||
| 350d089c39 | |||
| 116969f4f2 | |||
| 112d9f9a63 | |||
| 5dae9c5d06 | |||
| c0a63ecfed | |||
| 881a5320a8 | |||
| 22a254890e | |||
| 0912909b68 | |||
| cd7318dd63 | |||
| 21cc610095 | |||
| cc8151caf8 | |||
| 8cce399430 | |||
| 99688df446 | |||
| de0a278cac | |||
| 7031ea1a04 | |||
| 541455a08b | |||
| 814efc4e35 | |||
| f85bbc41c4 | |||
| c00e8eb809 | |||
| 9dd00170af | |||
| fdba16de86 | |||
| 38f319b425 | |||
| d35046b277 | |||
| bdcaf2f2be | |||
| bba622da0e | |||
| 0d4f694fcf | |||
| a41824414e | |||
| c54b0abbd7 | |||
| d772ea527a | |||
| 62b76220d4 | |||
| 6aa8628c0c | |||
| 7d9f4864d0 | |||
| d149d5a5d5 | |||
| 7572bf9fb0 | |||
| 40ab925a4e | |||
| 75a989b4f1 | |||
| f98f89a51d | |||
| 423ea4bc6f | |||
| 3c60dd9ae8 | |||
| f9006be79b | |||
| 0492563838 | |||
| d58089b9ee | |||
| e17a33a16f | |||
| c935599fcf | |||
| efafdc50b8 | |||
| 8846c1d728 | |||
| 9bfd89cb9b | |||
| 35f01818dd | |||
| 875af7e9f7 | |||
| 7dfce2db55 | |||
| cab5772068 | |||
| 6319f1e82d | |||
| d42c8477aa | |||
| b559a7882b | |||
| 30e1d70099 | |||
| 84a8d18519 | |||
| 1fc20e5640 | |||
| d8f0fba8e2 | |||
| 2921404540 | |||
| df79b7b57b | |||
| 0a45638bac | |||
| 4f725af6cd | |||
| 44ae7bde56 | |||
| cd5e0405de | |||
| 5bbf2d3c82 | |||
| 09743f7153 | |||
| f88ef2f3fc | |||
| ef032b548e | |||
| db2f3cc85a | |||
| 7584f4a5b4 | |||
| aac559e221 | |||
| aee5c17591 | |||
| d8248a7973 | |||
| b68d060f85 | |||
| 74399df5eb | |||
| c3b62137d8 | |||
| 352bd23766 | |||
| 398344854b | |||
| e181c3cc82 | |||
| 24e4008b72 | |||
| 50d9ed7e3c | |||
| 9fd113c95f | |||
| 5683ced93d | |||
| 4360f4b2cb | |||
| 43a873defd | |||
| e5d08cdb3e | |||
| c78b80c679 | |||
| 9cd3ba1c67 | |||
| dd22b206dc | |||
| 12b668642c | |||
| 77fa881d69 | |||
| 05dcbfed2e | |||
| 6471041fad | |||
| 69ab56f878 | |||
| 97538333c0 | |||
| a094e1a2b7 | |||
| d0c8df1452 | |||
| 1b6a31e626 | |||
| 2c1cde9f69 | |||
| 1aa5e45694 | |||
| 9fc04193c7 | |||
| b685b9fa13 | |||
| 59f97d0c2d | |||
| 8f94460537 | |||
| 26fe947991 | |||
| 16829f9075 | |||
| 246314561b | |||
| 331a3c4178 | |||
| 35ba7861d1 | |||
| 59cb66331e | |||
| 782bfaa6c4 | |||
| 830af4a164 | |||
| 994cb73104 | |||
| 8e3dc73408 | |||
| 6792f9e916 | |||
| a350c35f49 | |||
| fb498b3723 | |||
| 7b9c90b77c | |||
| f4fd16d8fd | |||
| 5656e66c28 | |||
| 39882e43ce | |||
| e5f2d1cde9 | |||
| 4f978863e4 | |||
| f26aafa8cb | |||
| e444354cf7 | |||
| 0e4ae72016 | |||
| c1121a2d3f | |||
| 1737825506 | |||
| 437c569617 | |||
| 9580d77512 | |||
| f7fb89313c | |||
| 721a7d2341 | |||
| 3529ab6cb6 | |||
| 484bb3ca5b | |||
| 121b2d5df1 | |||
| 472887d627 | |||
| 03f514d5fe | |||
| 36d2203e4c | |||
| 4e11cc7db3 | |||
| f23963896d | |||
| fd2b13b391 | |||
| b90743ded1 | |||
| ee499d9352 | |||
| d12f0bddad | |||
| 9eabd9031b | |||
| 552e7a430d | |||
| b97f9f8f12 | |||
| 8be0cea193 | |||
| bce088bcdf | |||
| 6955c42c8b | |||
| 07b36279cf | |||
| 5c1dc0754b | |||
| 7eaa644028 | |||
| 1b29312bef | |||
| 930412bf21 | |||
| 0e1f4931eb | |||
| 2e2c4b4397 | |||
| 7665cc7f73 | |||
| c743335d13 | |||
| e9aeb1c918 | |||
| c092e9a8d0 | |||
| a55ec01992 | |||
| 302e503e02 | |||
| f82639cdf3 | |||
| 9172d8c5f8 | |||
| 69fd8ec123 | |||
| d9c7a512e9 | |||
| 38383f34ff | |||
| b7585fe022 | |||
| b7d9009ff4 | |||
| 9c26745c2a | |||
| 67f8e57ab6 | |||
| b2ef603729 | |||
| 110ea953c4 | |||
| cef07a5bff | |||
| a5899023b9 | |||
| 61530be208 | |||
| 292bcd7100 | |||
| 8f4a6fcf80 | |||
| dfdb3b5951 | |||
| 0cc7b373b7 | |||
| 7e5cbd92b4 | |||
| 2594ecd27e | |||
| edf8af3e4d | |||
| 5a76275571 | |||
| b147ee1c99 | |||
| 8b7cc8a220 | |||
| 88931a4a56 | |||
| df187bed58 | |||
| 8b86bc6b3f | |||
| f9ac64023a | |||
| 3a710e1e50 | |||
| 1d4f58f362 | |||
| abfd0a0a2e | |||
| 98839b15dc | |||
| 5b885e98cc | |||
| 58e29608e5 | |||
| db71cfd396 | |||
| 0de9cfb240 | |||
| 2a8efb246d | |||
| 071cf4eed8 | |||
| 87a8d8d490 | |||
| d3caa1dda9 | |||
| f832d44f3a | |||
| 103ab700fc | |||
| 6419fa6e61 | |||
| 98cf2adf92 | |||
| 5660d2e83b | |||
| 5e3e242981 | |||
| 65c31fb457 | |||
| 0f891075cc | |||
| 6d898367e4 | |||
| 003e63b7fb | |||
| 73c9e15976 | |||
| 1dc1d673dd | |||
| 46818d9a02 | |||
| d6a585c6cc | |||
| c54fcf920c | |||
| 467c7f77f5 | |||
| 3c51287178 | |||
| 9d8fdcfa12 | |||
| fadd8a7f79 | |||
| f2afb7ab1a | |||
| b52d8785bb | |||
| 70846525bf | |||
| abe77916a3 | |||
| 660846a0d8 | |||
| 8dec77f30a | |||
| 5812c8f939 | |||
| 1c673e11ac | |||
| bf54bcfd9b | |||
| 33a0b8f11f | |||
| 61ffdabc51 | |||
| 2f224047bc | |||
| 2747fa82e3 | |||
| 5dd80c91cf | |||
| 495e602599 | |||
| 545ddd4ec9 | |||
| 9fff53f137 | |||
| 1d38fc0879 | |||
| 48f44b8920 | |||
| e365818ef5 | |||
| c2bb3010cc | |||
| 4ca8003d24 | |||
| 6a212926e0 | |||
| dae5c0440f | |||
| 6b1d083faa | |||
| c8510bea2a | |||
| a00e84018a | |||
| 3435806020 | |||
| 27f0a0fcfa | |||
| 1f4bb0128a | |||
| e686b6b7d4 | |||
| b74d46b425 |
@@ -0,0 +1,30 @@
|
|||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
|
!**/.gitignore
|
||||||
|
!.git/HEAD
|
||||||
|
!.git/config
|
||||||
|
!.git/packed-refs
|
||||||
|
!.git/refs/heads/**
|
||||||
@@ -30,6 +30,9 @@ using IRaCIS.Core.Application.Helper;
|
|||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||||
|
using DocumentFormat.OpenXml.Spreadsheet;
|
||||||
|
using AutoMapper.QueryableExtensions;
|
||||||
|
using NetTopologySuite.Algorithm;
|
||||||
|
|
||||||
namespace IRaCIS.Api.Controllers
|
namespace IRaCIS.Api.Controllers
|
||||||
{
|
{
|
||||||
@@ -53,8 +56,8 @@ namespace IRaCIS.Api.Controllers
|
|||||||
/// <param name="doctorId"></param>
|
/// <param name="doctorId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet, Route("doctor/getDetail/{doctorId:guid}")]
|
[HttpGet, Route("doctor/getDetail/{doctorId:guid}")]
|
||||||
|
|
||||||
public async Task<IResponseOutput<DoctorDetailDTO>> GetDoctorDetail([FromServices] IAttachmentService attachmentService, [FromServices] IDoctorService _doctorService,
|
public async Task<IResponseOutput<DoctorDetailDTO>> GetDoctorDetail([FromServices] IAttachmentService attachmentService, [FromServices] IDoctorService _doctorService,
|
||||||
[FromServices] IEducationService _educationService, [FromServices] ITrialExperienceService _trialExperienceService,
|
[FromServices] IEducationService _educationService, [FromServices] ITrialExperienceService _trialExperienceService,
|
||||||
|
|
||||||
[FromServices] IResearchPublicationService _researchPublicationService, [FromServices] IVacationService _vacationService, Guid doctorId)
|
[FromServices] IResearchPublicationService _researchPublicationService, [FromServices] IVacationService _vacationService, Guid doctorId)
|
||||||
@@ -66,7 +69,7 @@ namespace IRaCIS.Api.Controllers
|
|||||||
|
|
||||||
var doctorDetail = new DoctorDetailDTO
|
var doctorDetail = new DoctorDetailDTO
|
||||||
{
|
{
|
||||||
AuditView =await _doctorService.GetAuditState(doctorId),
|
AuditView = await _doctorService.GetAuditState(doctorId),
|
||||||
BasicInfoView = await _doctorService.GetBasicInfo(doctorId),
|
BasicInfoView = await _doctorService.GetBasicInfo(doctorId),
|
||||||
EmploymentView = await _doctorService.GetEmploymentInfo(doctorId),
|
EmploymentView = await _doctorService.GetEmploymentInfo(doctorId),
|
||||||
AttachmentList = await attachmentService.GetAttachments(doctorId),
|
AttachmentList = await attachmentService.GetAttachments(doctorId),
|
||||||
@@ -77,7 +80,7 @@ namespace IRaCIS.Api.Controllers
|
|||||||
TrialExperienceView = await _trialExperienceService.GetTrialExperience(doctorId),
|
TrialExperienceView = await _trialExperienceService.GetTrialExperience(doctorId),
|
||||||
ResearchPublicationView = await _researchPublicationService.GetResearchPublication(doctorId),
|
ResearchPublicationView = await _researchPublicationService.GetResearchPublication(doctorId),
|
||||||
|
|
||||||
SpecialtyView =await _doctorService.GetSpecialtyInfo(doctorId),
|
SpecialtyView = await _doctorService.GetSpecialtyInfo(doctorId),
|
||||||
InHoliday = (await _vacationService.OnVacation(doctorId)).IsSuccess,
|
InHoliday = (await _vacationService.OnVacation(doctorId)).IsSuccess,
|
||||||
IntoGroupInfo = _doctorService.GetDoctorIntoGroupInfo(doctorId),
|
IntoGroupInfo = _doctorService.GetDoctorIntoGroupInfo(doctorId),
|
||||||
SowList = sowList,
|
SowList = sowList,
|
||||||
@@ -96,80 +99,31 @@ namespace IRaCIS.Api.Controllers
|
|||||||
/// <summary> 系统用户登录接口[New] </summary>
|
/// <summary> 系统用户登录接口[New] </summary>
|
||||||
[HttpPost, Route("user/login")]
|
[HttpPost, Route("user/login")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IResponseOutput<LoginReturnDTO>> Login(UserLoginDTO loginUser, [FromServices] IEasyCachingProvider provider, [FromServices] IUserService _userService,
|
public async Task<IResponseOutput> Login(UserLoginDTO loginUser,
|
||||||
[FromServices] ITokenService _tokenService,
|
[FromServices] IEasyCachingProvider provider,
|
||||||
|
[FromServices] IUserService _userService,
|
||||||
[FromServices] IReadingImageTaskService readingImageTaskService,
|
[FromServices] ITokenService _tokenService,
|
||||||
[FromServices] IConfiguration configuration)
|
[FromServices] IReadingImageTaskService readingImageTaskService,
|
||||||
|
IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig,
|
||||||
|
IMailVerificationService _mailVerificationService)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//MFA 邮箱验证 前端传递用户Id 和MFACode
|
||||||
var returnModel = await _userService.Login(loginUser.UserName, loginUser.Password);
|
if (loginUser.UserId != null && _verifyConfig.CurrentValue.OpenLoginMFA)
|
||||||
|
|
||||||
if (returnModel.IsSuccess)
|
|
||||||
{
|
{
|
||||||
#region GRPC 调用鉴权中心,因为服务器IIS问题 http/2 故而没法使用
|
Guid userId = (Guid)loginUser.UserId;
|
||||||
|
|
||||||
////重试策略
|
//验证MFA 编码是否有问题 ,前端要拆开,自己调用验证的逻辑
|
||||||
//var defaultMethodConfig = new MethodConfig
|
//await _userService.VerifyMFACodeAsync(userId, loginUser.MFACode);
|
||||||
//{
|
|
||||||
// Names = { MethodName.Default },
|
|
||||||
// RetryPolicy = new RetryPolicy
|
|
||||||
// {
|
|
||||||
// MaxAttempts = 3,
|
|
||||||
// InitialBackoff = TimeSpan.FromSeconds(1),
|
|
||||||
// MaxBackoff = TimeSpan.FromSeconds(5),
|
|
||||||
// BackoffMultiplier = 1.5,
|
|
||||||
// RetryableStatusCodes = { Grpc.Core.StatusCode.Unavailable }
|
|
||||||
// }
|
|
||||||
//};
|
|
||||||
|
|
||||||
//#region unable to trust the certificate then the gRPC client can be configured to ignore the invalid certificate
|
//var loginUser = await _userRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||||
|
|
||||||
//var httpHandler = new HttpClientHandler();
|
var basicInfo = await _userService.GetUserBasicInfo(userId, loginUser.Password);
|
||||||
//// Return `true` to allow certificates that are untrusted/invalid
|
|
||||||
//httpHandler.ServerCertificateCustomValidationCallback =
|
|
||||||
// HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
|
|
||||||
|
|
||||||
|
var loginReturn = new LoginReturnDTO() { BasicInfo = basicInfo };
|
||||||
|
|
||||||
//////这一句是让grpc支持本地 http 如果本地访问部署在服务器上,那么是访问不成功的
|
loginReturn.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(loginReturn.BasicInfo));
|
||||||
//AppContext.SetSwitch(
|
|
||||||
// "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
|
|
||||||
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//var grpcAdress = configuration.GetValue<string>("GrpcAddress");
|
|
||||||
////var grpcAdress = "http://localhost:7200";
|
|
||||||
|
|
||||||
//var channel = GrpcChannel.ForAddress(grpcAdress, new GrpcChannelOptions
|
|
||||||
//{
|
|
||||||
// HttpHandler = httpHandler,
|
|
||||||
// ServiceConfig = new ServiceConfig { MethodConfigs = { defaultMethodConfig } }
|
|
||||||
|
|
||||||
//});
|
|
||||||
////var channel = GrpcChannel.ForAddress(grpcAdress);
|
|
||||||
//var grpcClient = new TokenGrpcService.TokenGrpcServiceClient(channel);
|
|
||||||
|
|
||||||
//var userInfo = returnModel.Data.BasicInfo;
|
|
||||||
|
|
||||||
//var tokenResponse = grpcClient.GetUserToken(new GetTokenReuqest()
|
|
||||||
//{
|
|
||||||
// Id = userInfo.Id.ToString(),
|
|
||||||
// ReviewerCode = userInfo.ReviewerCode,
|
|
||||||
// IsAdmin = userInfo.IsAdmin,
|
|
||||||
// RealName = userInfo.RealName,
|
|
||||||
// UserTypeEnumInt = (int)userInfo.UserTypeEnum,
|
|
||||||
// UserTypeShortName = userInfo.UserTypeShortName,
|
|
||||||
// UserName = userInfo.UserName
|
|
||||||
//});
|
|
||||||
|
|
||||||
//returnModel.Data.JWTStr = tokenResponse.Token;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
|
|
||||||
|
|
||||||
// 创建一个 CookieOptions 对象,用于设置 Cookie 的属性
|
// 创建一个 CookieOptions 对象,用于设置 Cookie 的属性
|
||||||
var option = new CookieOptions
|
var option = new CookieOptions
|
||||||
@@ -180,20 +134,145 @@ namespace IRaCIS.Api.Controllers
|
|||||||
Secure = false // 确保 cookie 只能通过 HTTPS 访问
|
Secure = false // 确保 cookie 只能通过 HTTPS 访问
|
||||||
};
|
};
|
||||||
|
|
||||||
HttpContext.Response.Cookies.Append("access_token", returnModel.Data.JWTStr, option);
|
HttpContext.Response.Cookies.Append("access_token", loginReturn.JWTStr, option);
|
||||||
|
|
||||||
|
// 验证阅片休息时间
|
||||||
|
await readingImageTaskService.ResetReadingRestTime(userId);
|
||||||
|
|
||||||
|
await provider.SetAsync(userId.ToString(), loginReturn.JWTStr, TimeSpan.FromDays(7));
|
||||||
|
|
||||||
|
await provider.SetAsync($"{userId.ToString()}_Online", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes));
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(loginReturn);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var returnModel = await _userService.Login(loginUser.UserName, loginUser.Password);
|
||||||
|
|
||||||
|
if (returnModel.IsSuccess)
|
||||||
|
{
|
||||||
|
#region GRPC 调用鉴权中心,因为服务器IIS问题 http/2 故而没法使用
|
||||||
|
|
||||||
|
////重试策略
|
||||||
|
//var defaultMethodConfig = new MethodConfig
|
||||||
|
//{
|
||||||
|
// Names = { MethodName.Default },
|
||||||
|
// RetryPolicy = new RetryPolicy
|
||||||
|
// {
|
||||||
|
// MaxAttempts = 3,
|
||||||
|
// InitialBackoff = TimeSpan.FromSeconds(1),
|
||||||
|
// MaxBackoff = TimeSpan.FromSeconds(5),
|
||||||
|
// BackoffMultiplier = 1.5,
|
||||||
|
// RetryableStatusCodes = { Grpc.Core.StatusCode.Unavailable }
|
||||||
|
// }
|
||||||
|
//};
|
||||||
|
|
||||||
|
//#region unable to trust the certificate then the gRPC client can be configured to ignore the invalid certificate
|
||||||
|
|
||||||
|
//var httpHandler = new HttpClientHandler();
|
||||||
|
//// Return `true` to allow certificates that are untrusted/invalid
|
||||||
|
//httpHandler.ServerCertificateCustomValidationCallback =
|
||||||
|
// HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
|
||||||
|
|
||||||
|
|
||||||
|
//////这一句是让grpc支持本地 http 如果本地访问部署在服务器上,那么是访问不成功的
|
||||||
|
//AppContext.SetSwitch(
|
||||||
|
// "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//var grpcAdress = configuration.GetValue<string>("GrpcAddress");
|
||||||
|
////var grpcAdress = "http://localhost:7200";
|
||||||
|
|
||||||
|
//var channel = GrpcChannel.ForAddress(grpcAdress, new GrpcChannelOptions
|
||||||
|
//{
|
||||||
|
// HttpHandler = httpHandler,
|
||||||
|
// ServiceConfig = new ServiceConfig { MethodConfigs = { defaultMethodConfig } }
|
||||||
|
|
||||||
|
//});
|
||||||
|
////var channel = GrpcChannel.ForAddress(grpcAdress);
|
||||||
|
//var grpcClient = new TokenGrpcService.TokenGrpcServiceClient(channel);
|
||||||
|
|
||||||
|
//var userInfo = returnModel.Data.BasicInfo;
|
||||||
|
|
||||||
|
//var tokenResponse = grpcClient.GetUserToken(new GetTokenReuqest()
|
||||||
|
//{
|
||||||
|
// Id = userInfo.Id.ToString(),
|
||||||
|
// ReviewerCode = userInfo.ReviewerCode,
|
||||||
|
// IsAdmin = userInfo.IsAdmin,
|
||||||
|
// RealName = userInfo.RealName,
|
||||||
|
// UserTypeEnumInt = (int)userInfo.UserTypeEnum,
|
||||||
|
// UserTypeShortName = userInfo.UserTypeShortName,
|
||||||
|
// UserName = userInfo.UserName
|
||||||
|
//});
|
||||||
|
|
||||||
|
//returnModel.Data.JWTStr = tokenResponse.Token;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
var userId = returnModel.Data.BasicInfo.Id;
|
||||||
|
|
||||||
|
if (_verifyConfig.CurrentValue.OpenLoginMFA)
|
||||||
|
{
|
||||||
|
//发版屏蔽
|
||||||
|
|
||||||
|
//returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
|
||||||
|
|
||||||
|
//MFA 发送邮件
|
||||||
|
|
||||||
|
returnModel.Data.IsMFA = true;
|
||||||
|
|
||||||
|
var email = returnModel.Data.BasicInfo.EMail;
|
||||||
|
|
||||||
|
var hiddenEmail = EmailMaskHelper.MaskEmail(email);
|
||||||
|
|
||||||
|
returnModel.Data.BasicInfo.EMail = hiddenEmail;
|
||||||
|
|
||||||
|
await _userService.SendMFAEmail(userId);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 验证阅片休息时间
|
||||||
|
await readingImageTaskService.ResetReadingRestTime(returnModel.Data.BasicInfo.Id);
|
||||||
|
|
||||||
|
await provider.SetAsync(userId.ToString(), returnModel.Data.JWTStr, TimeSpan.FromDays(7));
|
||||||
|
|
||||||
|
await provider.SetAsync($"{userId.ToString()}_Online", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return returnModel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var userId = returnModel.Data.BasicInfo.Id.ToString();
|
|
||||||
//provider.Set(userId, userId, TimeSpan.FromMinutes(AppSettings.LoginExpiredTimeSpan));
|
|
||||||
// 验证阅片休息时间
|
|
||||||
await readingImageTaskService.ResetReadingRestTime(returnModel.Data.BasicInfo.Id);
|
|
||||||
await provider.SetAsync(userId.ToString(), returnModel.Data.JWTStr, TimeSpan.FromDays(7));
|
|
||||||
return returnModel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[HttpGet, Route("imageShare/ShareImage")]
|
[HttpGet, Route("imageShare/ShareImage")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public IResponseOutput ShareImage([FromServices] ITokenService _tokenService)
|
public IResponseOutput ShareImage([FromServices] ITokenService _tokenService)
|
||||||
@@ -223,7 +302,7 @@ namespace IRaCIS.Api.Controllers
|
|||||||
|
|
||||||
var ossOptions = serviceOption.AliyunOSS;
|
var ossOptions = serviceOption.AliyunOSS;
|
||||||
|
|
||||||
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO ,AliyunOSS= serviceOption.AliyunOSS,AWS=serviceOption.AWS });
|
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO, AliyunOSS = serviceOption.AliyunOSS, AWS = serviceOption.AWS });
|
||||||
|
|
||||||
#region 临时token 屏蔽
|
#region 临时token 屏蔽
|
||||||
//IClientProfile profile = DefaultProfile.GetProfile(ossOptions.RegionId, ossOptions.AccessKeyId, ossOptions.AccessKeySecret);
|
//IClientProfile profile = DefaultProfile.GetProfile(ossOptions.RegionId, ossOptions.AccessKeyId, ossOptions.AccessKeySecret);
|
||||||
@@ -264,19 +343,19 @@ namespace IRaCIS.Api.Controllers
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(Enum.TryParse<ObjectStoreUse>(serviceOption.ObjectStoreUse, out var parsedValue) && parsedValue == ObjectStoreUse.MinIO)
|
else if (Enum.TryParse<ObjectStoreUse>(serviceOption.ObjectStoreUse, out var parsedValue) && parsedValue == ObjectStoreUse.MinIO)
|
||||||
{
|
{
|
||||||
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse=serviceOption.ObjectStoreUse,MinIO=serviceOption.MinIO, AWS = serviceOption.AWS });
|
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO, AWS = serviceOption.AWS });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO, AWS = serviceOption.AWS });
|
return ResponseOutput.Ok(new ObjectStoreDTO() { ObjectStoreUse = serviceOption.ObjectStoreUse, MinIO = serviceOption.MinIO, AWS = serviceOption.AWS });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("user/GenerateSTS")]
|
[HttpGet("user/GenerateSTS")]
|
||||||
public IResponseOutput GenerateSTS([FromServices]IOptionsMonitor<AliyunOSSOptions> options )
|
public IResponseOutput GenerateSTS([FromServices] IOptionsMonitor<AliyunOSSOptions> options)
|
||||||
{
|
{
|
||||||
var ossOptions = options.CurrentValue;
|
var ossOptions = options.CurrentValue;
|
||||||
|
|
||||||
@@ -304,9 +383,9 @@ namespace IRaCIS.Api.Controllers
|
|||||||
SecurityToken = response.Credentials.SecurityToken,
|
SecurityToken = response.Credentials.SecurityToken,
|
||||||
Expiration = response.Credentials.Expiration,
|
Expiration = response.Credentials.Expiration,
|
||||||
|
|
||||||
Region = ossOptions.region ,
|
Region = ossOptions.region,
|
||||||
BucketName = ossOptions.bucketName ,
|
BucketName = ossOptions.bucketName,
|
||||||
ViewEndpoint = ossOptions.viewEndpoint ,
|
ViewEndpoint = ossOptions.viewEndpoint,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -318,12 +397,12 @@ namespace IRaCIS.Api.Controllers
|
|||||||
|
|
||||||
[HttpGet("User/UserRedirect")]
|
[HttpGet("User/UserRedirect")]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IActionResult> UserRedirect([FromServices] IRepository<User> _userRepository, string url ,[FromServices]ILogger<ExtraController> _logger)
|
public async Task<IActionResult> UserRedirect([FromServices] IRepository<User> _userRepository, string url, [FromServices] ILogger<ExtraController> _logger)
|
||||||
{
|
{
|
||||||
|
|
||||||
var decodeUrl = System.Web.HttpUtility.UrlDecode(url);
|
var decodeUrl = System.Web.HttpUtility.UrlDecode(url);
|
||||||
|
|
||||||
var userId = decodeUrl.Substring(decodeUrl.IndexOf("UserId=") + "UserId=".Length , 36) ;
|
var userId = decodeUrl.Substring(decodeUrl.IndexOf("UserId=") + "UserId=".Length, 36);
|
||||||
|
|
||||||
var token = decodeUrl.Substring(decodeUrl.IndexOf("access_token=") + "access_token=".Length);
|
var token = decodeUrl.Substring(decodeUrl.IndexOf("access_token=") + "access_token=".Length);
|
||||||
|
|
||||||
@@ -331,12 +410,12 @@ namespace IRaCIS.Api.Controllers
|
|||||||
|
|
||||||
var domainStrList = decodeUrl.Split("/").ToList().Take(3).ToList();
|
var domainStrList = decodeUrl.Split("/").ToList().Take(3).ToList();
|
||||||
|
|
||||||
var errorUrl = domainStrList[0]+"//"+ domainStrList[2]+ "/error";
|
var errorUrl = domainStrList[0] + "//" + domainStrList[2] + "/error";
|
||||||
|
|
||||||
|
|
||||||
if (!await _userRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd))
|
if (!await _userRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd))
|
||||||
{
|
{
|
||||||
decodeUrl = errorUrl+ $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang=="zh"? "您的初始化链接已过期": "Error!The initialization link has expired. Return")} ";
|
decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang == "zh" ? "您的初始化链接已过期" : "Error!The initialization link has expired. Return")} ";
|
||||||
}
|
}
|
||||||
|
|
||||||
return Redirect(decodeUrl);
|
return Redirect(decodeUrl);
|
||||||
|
|||||||
@@ -419,13 +419,30 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重置并同步项目阅片标准
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Inspection/ReadingCriterion/ResetAndAsyncCriterion")]
|
||||||
|
[UnitOfWork]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
|
||||||
/// <summary>
|
public async Task<IResponseOutput> ResetAndAsyncCriterion(DataInspectionDto<ResetAndAsyncCriterionInDto> opt)
|
||||||
/// CRC RequestToQC 批量提交
|
{
|
||||||
/// </summary>
|
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||||
/// <param name="opt"></param>
|
var result = await _trialConfigService.ResetAndAsyncCriterion(opt.Data);
|
||||||
/// <returns></returns>
|
await _inspectionService.CompletedSign(singid, result);
|
||||||
[HttpPost, Route("Inspection/QCOperation/CRCRequestToQC")]
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC RequestToQC 批量提交
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="opt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Inspection/QCOperation/CRCRequestToQC")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> CRCRequestToQC(DataInspectionDto<CRCRequestToQCCommand> opt)
|
public async Task<IResponseOutput> CRCRequestToQC(DataInspectionDto<CRCRequestToQCCommand> opt)
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ using IRaCIS.Core.Domain.Share;
|
|||||||
using IRaCIS.Core.Infra.EFCore;
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using Magicodes.ExporterAndImporter.Excel;
|
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
@@ -33,12 +32,12 @@ using Microsoft.AspNetCore.SignalR;
|
|||||||
using Microsoft.AspNetCore.StaticFiles;
|
using Microsoft.AspNetCore.StaticFiles;
|
||||||
using Microsoft.AspNetCore.WebUtilities;
|
using Microsoft.AspNetCore.WebUtilities;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Net.Http.Headers;
|
using Microsoft.Net.Http.Headers;
|
||||||
using MiniExcelLibs;
|
using MiniExcelLibs;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using SharpCompress.Archives;
|
using SharpCompress.Archives;
|
||||||
using SkiaSharp;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -235,13 +234,17 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
public IUserInfo _userInfo { get; set; }
|
public IUserInfo _userInfo { get; set; }
|
||||||
private readonly IMediator _mediator;
|
private readonly IMediator _mediator;
|
||||||
|
|
||||||
|
|
||||||
|
public IStringLocalizer _localizer { get; set; }
|
||||||
|
|
||||||
|
|
||||||
private readonly IWebHostEnvironment _hostEnvironment;
|
private readonly IWebHostEnvironment _hostEnvironment;
|
||||||
|
|
||||||
private readonly IRepository _repository;
|
private readonly IRepository _repository;
|
||||||
|
|
||||||
private readonly IEasyCachingProvider _provider;
|
private readonly IEasyCachingProvider _provider;
|
||||||
private readonly QCCommon _qCCommon;
|
private readonly QCCommon _qCCommon;
|
||||||
public StudyController(IMapper mapper, IUserInfo userInfo, IWebHostEnvironment hostEnvironment, IMediator mediator, IEasyCachingProvider provider,
|
public StudyController(IMapper mapper, IStringLocalizer localizer, IUserInfo userInfo, IWebHostEnvironment hostEnvironment, IMediator mediator, IEasyCachingProvider provider,
|
||||||
QCCommon qCCommon,
|
QCCommon qCCommon,
|
||||||
IRepository repository)
|
IRepository repository)
|
||||||
{
|
{
|
||||||
@@ -249,7 +252,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
_provider = provider;
|
_provider = provider;
|
||||||
_hostEnvironment = hostEnvironment;
|
_hostEnvironment = hostEnvironment;
|
||||||
_mediator = mediator;
|
_mediator = mediator;
|
||||||
|
_localizer = localizer;
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
_userInfo = userInfo;
|
_userInfo = userInfo;
|
||||||
_repository = repository;
|
_repository = repository;
|
||||||
@@ -273,7 +276,6 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
var studyMonitor = new StudyMonitor()
|
var studyMonitor = new StudyMonitor()
|
||||||
{
|
{
|
||||||
TrialId = savedInfo.TrialId,
|
TrialId = savedInfo.TrialId,
|
||||||
SiteId = savedInfo.SiteId,
|
|
||||||
SubjectId = savedInfo.SubjectId,
|
SubjectId = savedInfo.SubjectId,
|
||||||
SubjectVisitId = savedInfo.SubjectVisitId,
|
SubjectVisitId = savedInfo.SubjectVisitId,
|
||||||
|
|
||||||
@@ -313,7 +315,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
string.IsNullOrEmpty(mediaTypeHeader.Boundary.Value))
|
string.IsNullOrEmpty(mediaTypeHeader.Boundary.Value))
|
||||||
{
|
{
|
||||||
//---不支持的MediaType
|
//---不支持的MediaType
|
||||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_UnsupportedMedia"));
|
return ResponseOutput.NotOk(_localizer["UploadDownLoad_UnsupportedMedia"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var archiveStudyCommand = new ArchiveStudyCommand() { AbandonStudyId = abandonStudyId, StudyInstanceUid = studyInstanceUid, SubjectVisitId = subjectVisitId };
|
var archiveStudyCommand = new ArchiveStudyCommand() { AbandonStudyId = abandonStudyId, StudyInstanceUid = studyInstanceUid, SubjectVisitId = subjectVisitId };
|
||||||
@@ -402,12 +404,12 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception )
|
catch (Exception)
|
||||||
{
|
{
|
||||||
_provider.Remove($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}");
|
_provider.Remove($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}");
|
||||||
|
|
||||||
//---请求异常,请重试!
|
//---请求异常,请重试!
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_RequestError"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_RequestError"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
studyMonitor.FileSize = (decimal)HttpContext.Request.ContentLength;
|
studyMonitor.FileSize = (decimal)HttpContext.Request.ContentLength;
|
||||||
@@ -477,6 +479,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
public string FilePath { get; set; }
|
public string FilePath { get; set; }
|
||||||
public string FileName { get; set; }
|
public string FileName { get; set; }
|
||||||
public int FileFize { get; set; }
|
public int FileFize { get; set; }
|
||||||
|
|
||||||
|
public string FileType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -501,7 +505,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
|
|
||||||
await _qCCommon.VerifyIsCRCSubmmitAsync(_repository, _userInfo, subjectVisitId);
|
await _qCCommon.VerifyIsCRCSubmmitAsync(_repository, _userInfo, subjectVisitId);
|
||||||
|
|
||||||
var sv = (await _repository.Where<SubjectVisit>(t => t.Id == subjectVisitId).Select(t => new { t.TrialId, t.SiteId, t.SubjectId }).FirstOrDefaultAsync()).IfNullThrowConvertException();
|
var sv = (await _repository.Where<SubjectVisit>(t => t.Id == subjectVisitId).Select(t => new { t.TrialId, t.TrialSiteId, t.SubjectId }).FirstOrDefaultAsync()).IfNullThrowConvertException();
|
||||||
|
|
||||||
var studyMonitor = await _studyMonitorRepository.FirstOrDefaultAsync(t => t.Id == studyMonitorId);
|
var studyMonitor = await _studyMonitorRepository.FirstOrDefaultAsync(t => t.Id == studyMonitorId);
|
||||||
|
|
||||||
@@ -509,7 +513,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
|
|
||||||
foreach (var item in incommand.UploadedFileList)
|
foreach (var item in incommand.UploadedFileList)
|
||||||
{
|
{
|
||||||
await _repository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, NoneDicomStudyId = noneDicomStudyId });
|
await _repository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, NoneDicomStudyId = noneDicomStudyId,FileType=item.FileType });
|
||||||
|
|
||||||
}
|
}
|
||||||
var uploadFinishedTime = DateTime.Now;
|
var uploadFinishedTime = DateTime.Now;
|
||||||
@@ -526,6 +530,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
studyMonitor.StudyCode = noneDicomStudy.StudyCode;
|
studyMonitor.StudyCode = noneDicomStudy.StudyCode;
|
||||||
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
||||||
studyMonitor.IP = _userInfo.IP;
|
studyMonitor.IP = _userInfo.IP;
|
||||||
|
studyMonitor.IsSuccess = true;
|
||||||
|
|
||||||
await _repository.SaveChangesAsync();
|
await _repository.SaveChangesAsync();
|
||||||
|
|
||||||
@@ -559,7 +564,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
if (!fileName.EndsWith(".xlsx") && !fileName.EndsWith(".csv") && !fileName.EndsWith(".xls"))
|
if (!fileName.EndsWith(".xlsx") && !fileName.EndsWith(".csv") && !fileName.EndsWith(".xls"))
|
||||||
{
|
{
|
||||||
//---支持.xlsx、.xls、.csv格式的文件上传。
|
//---支持.xlsx、.xls、.csv格式的文件上传。
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_SupportedFormats"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_SupportedFormats"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fileStream.CopyTo(templateFileStream);
|
fileStream.CopyTo(templateFileStream);
|
||||||
@@ -580,9 +585,22 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
var etcCheckList = new List<CheckViewModel>();
|
var etcCheckList = new List<CheckViewModel>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region MiniExcel 需要自己验证数据格式规范
|
#region MiniExcel 需要自己验证数据格式规范
|
||||||
|
|
||||||
|
|
||||||
|
if (fileName.EndsWith(".xlsx"))
|
||||||
|
{
|
||||||
|
etcCheckList = MiniExcel.Query<CheckViewModel>(templateFileStream, excelType: ExcelType.XLSX).ToList();
|
||||||
|
}
|
||||||
|
else if (fileName.EndsWith(".csv"))
|
||||||
|
{
|
||||||
|
//因为csv 需要加配置文件 不然都是null
|
||||||
|
etcCheckList = MiniExcel.Query<CheckViewModel>(templateFileStream, null, configuration: new MiniExcelLibs.Csv.CsvConfiguration()
|
||||||
|
{
|
||||||
|
StreamReaderFunc = (stream) => new StreamReader(stream, Encoding.GetEncoding("gb2312"))
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
//if (fileName.EndsWith(".csv"))
|
//if (fileName.EndsWith(".csv"))
|
||||||
//{
|
//{
|
||||||
// //因为csv 需要加配置文件 不然都是null
|
// //因为csv 需要加配置文件 不然都是null
|
||||||
@@ -598,67 +616,72 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 升级net8 导入有问题
|
||||||
|
|
||||||
|
|
||||||
//Magicodes 支持自定义特性验证
|
//Magicodes 支持自定义特性验证
|
||||||
if (fileName.EndsWith(".xlsx"))
|
// if (fileName.EndsWith(".xlsx"))
|
||||||
{
|
//{
|
||||||
var Importer = new ExcelImporter();
|
// var Importer = new ExcelImporter();
|
||||||
|
|
||||||
var import = await Importer.Import<CheckViewModel>(templateFileStream);
|
// var import = await Importer.Import<CheckViewModel>(templateFileStream);
|
||||||
|
|
||||||
if (import.Exception != null) return ResponseOutput.NotOk(import.Exception.ToString());
|
// if (import.Exception != null) return ResponseOutput.NotOk(import.Exception.ToString());
|
||||||
|
|
||||||
//if (import.RowErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.RowErrors));
|
// //if (import.RowErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.RowErrors));
|
||||||
|
|
||||||
if (import.TemplateErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.TemplateErrors));
|
// if (import.TemplateErrors.Count > 0) return ResponseOutput.NotOk(_localizer["UploadDownLoad_TemplateErrors"]);
|
||||||
|
|
||||||
etcCheckList = import.Data.ToList();
|
// etcCheckList = import.Data.ToList();
|
||||||
}
|
//}
|
||||||
else if (fileName.EndsWith(".csv"))
|
//else if (fileName.EndsWith(".csv"))
|
||||||
{
|
//{
|
||||||
#region 临时方案 MiniExcel读取 然后保存为xlsx 再用 Magicodes验证数据
|
// #region 临时方案 MiniExcel读取 然后保存为xlsx 再用 Magicodes验证数据
|
||||||
|
|
||||||
//因为csv 需要加配置文件 不然都是null
|
// //因为csv 需要加配置文件 不然都是null
|
||||||
etcCheckList = MiniExcel.Query<CheckViewModel>(templateFileStream, null, configuration: new MiniExcelLibs.Csv.CsvConfiguration()
|
// etcCheckList = MiniExcel.Query<CheckViewModel>(templateFileStream, null, configuration: new MiniExcelLibs.Csv.CsvConfiguration()
|
||||||
{
|
// {
|
||||||
StreamReaderFunc = (stream) => new StreamReader(stream, Encoding.GetEncoding("gb2312"))
|
// StreamReaderFunc = (stream) => new StreamReader(stream, Encoding.GetEncoding("gb2312"))
|
||||||
}).ToList();
|
// }).ToList();
|
||||||
|
|
||||||
var (csVToXlsxPath, csVToXlsxRelativePath) = FileStoreHelper.GetTrialCheckFilePath(_hostEnvironment, Path.GetFileNameWithoutExtension(fileName) + ".xlsx", trialId);
|
// var (csVToXlsxPath, csVToXlsxRelativePath) = FileStoreHelper.GetTrialCheckFilePath(_hostEnvironment, Path.GetFileNameWithoutExtension(fileName) + ".xlsx", trialId);
|
||||||
|
|
||||||
|
|
||||||
await MiniExcel.SaveAsAsync(csVToXlsxPath, etcCheckList, excelType: ExcelType.XLSX);
|
// await MiniExcel.SaveAsAsync(csVToXlsxPath, etcCheckList, excelType: ExcelType.XLSX);
|
||||||
|
|
||||||
|
|
||||||
var Importer = new ExcelImporter();
|
// var Importer = new ExcelImporter();
|
||||||
|
|
||||||
var import = await Importer.Import<CheckViewModel>(System.IO.File.OpenRead(csVToXlsxPath));
|
// var import = await Importer.Import<CheckViewModel>(System.IO.File.OpenRead(csVToXlsxPath));
|
||||||
|
|
||||||
if (import.Exception != null) return ResponseOutput.NotOk(import.Exception.ToString());
|
// if (import.Exception != null) return ResponseOutput.NotOk(import.Exception.ToString());
|
||||||
|
|
||||||
//if (import.RowErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.RowErrors));
|
// //if (import.RowErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.RowErrors));
|
||||||
|
|
||||||
if (import.TemplateErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.TemplateErrors));
|
// if (import.TemplateErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.TemplateErrors));
|
||||||
|
|
||||||
etcCheckList = import.Data.ToList();
|
// etcCheckList = import.Data.ToList();
|
||||||
|
|
||||||
#endregion
|
// #endregion
|
||||||
|
|
||||||
|
|
||||||
#region 导入组件有问题 excel编码格式
|
// #region 导入组件有问题 excel编码格式
|
||||||
//var Importer = new CsvImporter();
|
// //var Importer = new CsvImporter();
|
||||||
|
|
||||||
//var import = await Importer.Import<CheckViewModel>(File.OpenRead(filePath));
|
// //var import = await Importer.Import<CheckViewModel>(File.OpenRead(filePath));
|
||||||
|
|
||||||
//if (import.Exception != null) return ResponseOutput.NotOk(import.Exception.ToString());
|
// //if (import.Exception != null) return ResponseOutput.NotOk(import.Exception.ToString());
|
||||||
|
|
||||||
//if (import.RowErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.RowErrors));
|
// //if (import.RowErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.RowErrors));
|
||||||
|
|
||||||
//if (import.TemplateErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.TemplateErrors));
|
// //if (import.TemplateErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.TemplateErrors));
|
||||||
|
|
||||||
//etcCheckList = import.Data.ToList();
|
// //etcCheckList = import.Data.ToList();
|
||||||
#endregion
|
// #endregion
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
#endregion
|
||||||
//ExcelReaderFactory 需要自己验证数据 并且从固定列取数据
|
//ExcelReaderFactory 需要自己验证数据 并且从固定列取数据
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -697,7 +720,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
if (etcCheckList == null || etcCheckList.Count == 0)
|
if (etcCheckList == null || etcCheckList.Count == 0)
|
||||||
{
|
{
|
||||||
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
|
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
|
||||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_InvalidData"));
|
return ResponseOutput.NotOk(_localizer["UploadDownLoad_InvalidData"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -718,7 +741,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
if (etcCheckList.Count == 0)
|
if (etcCheckList.Count == 0)
|
||||||
{
|
{
|
||||||
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
|
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
|
||||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_InvalidData"));
|
return ResponseOutput.NotOk(_localizer["UploadDownLoad_InvalidData"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -962,12 +985,13 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
public IMapper _mapper { get; set; }
|
public IMapper _mapper { get; set; }
|
||||||
public IUserInfo _userInfo { get; set; }
|
public IUserInfo _userInfo { get; set; }
|
||||||
private readonly IMediator _mediator;
|
private readonly IMediator _mediator;
|
||||||
|
public IStringLocalizer _localizer { get; set; }
|
||||||
private readonly IWebHostEnvironment _hostEnvironment;
|
private readonly IWebHostEnvironment _hostEnvironment;
|
||||||
|
|
||||||
public UploadDownLoadController(IMapper mapper, IUserInfo userInfo, IMediator mediator, IWebHostEnvironment hostEnvironment)
|
public UploadDownLoadController(IMapper mapper, IUserInfo userInfo, IStringLocalizer localizer, IMediator mediator, IWebHostEnvironment hostEnvironment)
|
||||||
{
|
{
|
||||||
_hostEnvironment = hostEnvironment;
|
_hostEnvironment = hostEnvironment;
|
||||||
|
_localizer = localizer;
|
||||||
_mediator = mediator;
|
_mediator = mediator;
|
||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
_userInfo = userInfo;
|
_userInfo = userInfo;
|
||||||
@@ -994,7 +1018,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
if (!realFileName.EndsWith(".xlsx", StringComparison.OrdinalIgnoreCase))
|
if (!realFileName.EndsWith(".xlsx", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
// 请用提供格式的模板excel上传需要处理的数据
|
// 请用提供格式的模板excel上传需要处理的数据
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_TemplateUploadData"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_TemplateUploadData"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/SiteSurvey", realFileName);
|
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/SiteSurvey", realFileName);
|
||||||
@@ -1015,7 +1039,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
if (excelList.Any(t => string.IsNullOrWhiteSpace(t.TrialSiteCode) || string.IsNullOrWhiteSpace(t.FirstName) || string.IsNullOrWhiteSpace(t.LastName) || string.IsNullOrWhiteSpace(t.Email) || string.IsNullOrWhiteSpace(t.UserTypeStr)))
|
if (excelList.Any(t => string.IsNullOrWhiteSpace(t.TrialSiteCode) || string.IsNullOrWhiteSpace(t.FirstName) || string.IsNullOrWhiteSpace(t.LastName) || string.IsNullOrWhiteSpace(t.Email) || string.IsNullOrWhiteSpace(t.UserTypeStr)))
|
||||||
{
|
{
|
||||||
//请确保Excel中 每一行的 中心编号,姓名,邮箱,用户类型数据记录完整再进行上传
|
//请确保Excel中 每一行的 中心编号,姓名,邮箱,用户类型数据记录完整再进行上传
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_EnsureCompleteData"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_EnsureCompleteData"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var siteCodeList = excelList.Select(t => t.TrialSiteCode.Trim().ToUpper()).Distinct().ToList();
|
var siteCodeList = excelList.Select(t => t.TrialSiteCode.Trim().ToUpper()).Distinct().ToList();
|
||||||
@@ -1023,35 +1047,35 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
if (_trialSiteRepository.Where(t => t.TrialId == trialId && siteCodeList.Contains(t.TrialSiteCode.ToUpper())).Count() != siteCodeList.Count)
|
if (_trialSiteRepository.Where(t => t.TrialId == trialId && siteCodeList.Contains(t.TrialSiteCode.ToUpper())).Count() != siteCodeList.Count)
|
||||||
{
|
{
|
||||||
//在项目中未找到该Excel中部分或全部中心
|
//在项目中未找到该Excel中部分或全部中心
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidCenters"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_InvalidCenters"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (excelList.GroupBy(t => new { t.TrialSiteCode, t.UserTypeStr, t.Email }).Any(g => g.Count() > 1))
|
if (excelList.GroupBy(t => new { t.TrialSiteCode, t.UserTypeStr, t.Email }).Any(g => g.Count() > 1))
|
||||||
{
|
{
|
||||||
// 同一邮箱,同一用户类型,只能生成一个账户,请核查Excel数据
|
// 同一邮箱,同一用户类型,只能生成一个账户,请核查Excel数据
|
||||||
|
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_CheckDuplicateAccounts"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_CheckDuplicateAccounts"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (excelList.Any(t => !t.Email.Contains("@")))
|
if (excelList.Any(t => !t.Email.Contains("@")))
|
||||||
{
|
{
|
||||||
//有邮箱不符合邮箱格式,请核查Excel数据
|
//有邮箱不符合邮箱格式,请核查Excel数据
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidEmail"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_InvalidEmail"]);
|
||||||
}
|
}
|
||||||
var generateUserTypeList = new List<string>() { "CRC", "CRA" };
|
var generateUserTypeList = new List<string>() { "CRC", "CRA" };
|
||||||
|
|
||||||
if (excelList.Any(t => !generateUserTypeList.Contains(t.UserTypeStr.ToUpper())))
|
if (excelList.Any(t => !generateUserTypeList.Contains(t.UserTypeStr.ToUpper())))
|
||||||
{
|
{
|
||||||
//用户类型仅能为 CRC,SR,CRA 请核查Excel数据
|
//用户类型仅能为 CRC,SR,CRA 请核查Excel数据
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidUserType"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_InvalidUserType"]);
|
||||||
}
|
}
|
||||||
if (excelList.Count == 0)
|
if (excelList.Count == 0)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_NoValiddata"));
|
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_NoValiddata"]);
|
||||||
}
|
}
|
||||||
//处理好 用户类型 和用户类型枚举
|
//处理好 用户类型 和用户类型枚举
|
||||||
var sysUserTypeList = _usertypeRepository.Where(t => t.UserTypeEnum == UserTypeEnum.CRA || t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Select(t => new { UserTypeId = t.Id, t.UserTypeEnum }).ToList();
|
var sysUserTypeList = _usertypeRepository.Where(t => t.UserTypeEnum == UserTypeEnum.CRA || t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Select(t => new { UserTypeId = t.Id, t.UserTypeEnum }).ToList();
|
||||||
var siteList = _trialSiteRepository.Where(t => t.TrialId == trialId && siteCodeList.Contains(t.TrialSiteCode)).Select(t => new { t.TrialSiteCode, t.SiteId }).ToList();
|
var siteList = _trialSiteRepository.Where(t => t.TrialId == trialId && siteCodeList.Contains(t.TrialSiteCode)).Select(t => new { t.TrialSiteCode, TrialSiteId= t.Id }).ToList();
|
||||||
|
|
||||||
foreach (var item in excelList)
|
foreach (var item in excelList)
|
||||||
{
|
{
|
||||||
@@ -1072,7 +1096,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
item.SiteId = siteList.FirstOrDefault(t => t.TrialSiteCode.ToUpper() == item.TrialSiteCode.ToUpper()).SiteId;
|
item.TrialSiteId = siteList.FirstOrDefault(t => t.TrialSiteCode.ToUpper() == item.TrialSiteCode.ToUpper()).TrialSiteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -63,25 +63,24 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="aliyun-net-sdk-sts" Version="3.1.2" />
|
<PackageReference Include="aliyun-net-sdk-sts" Version="3.1.2" />
|
||||||
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
||||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
|
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
|
||||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
|
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
|
||||||
<PackageReference Include="EasyCaching.Interceptor.Castle" Version="1.9.2" />
|
<PackageReference Include="EasyCaching.Interceptor.Castle" Version="1.9.2" />
|
||||||
<PackageReference Include="EasyCaching.Serialization.MessagePack" Version="1.9.2">
|
<PackageReference Include="EasyCaching.Serialization.MessagePack" Version="1.9.2">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.7" />
|
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.12" />
|
||||||
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
||||||
<PackageReference Include="Hangfire.SqlServer" Version="1.8.7" />
|
<PackageReference Include="Hangfire.SqlServer" Version="1.8.12" />
|
||||||
<PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
|
<PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
|
||||||
<PackageReference Include="LogDashboard" Version="1.4.8" />
|
<PackageReference Include="LogDashboard" Version="1.4.8" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.5" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
|
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.0.3" />
|
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.0.3" />
|
||||||
<PackageReference Include="Serilog.Sinks.Email" Version="2.4.0" />
|
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.6.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<param name="doctorId"></param>
|
<param name="doctorId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Api.Controllers.ExtraController.Login(IRaCIS.Application.Contracts.UserLoginDTO,EasyCaching.Core.IEasyCachingProvider,IRaCIS.Application.Services.IUserService,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Application.Contracts.IReadingImageTaskService,Microsoft.Extensions.Configuration.IConfiguration)">
|
<member name="M:IRaCIS.Api.Controllers.ExtraController.Login(IRaCIS.Application.Contracts.UserLoginDTO,EasyCaching.Core.IEasyCachingProvider,IRaCIS.Application.Services.IUserService,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Application.Contracts.IReadingImageTaskService,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},IRaCIS.Application.Services.IMailVerificationService)">
|
||||||
<summary> 系统用户登录接口[New] </summary>
|
<summary> 系统用户登录接口[New] </summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.Special.FinancialChangeController.AddOrUpdateTrialInspection(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Application.Contracts.TrialCommand})">
|
<member name="M:IRaCIS.Core.API.Controllers.Special.FinancialChangeController.AddOrUpdateTrialInspection(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Application.Contracts.TrialCommand})">
|
||||||
@@ -208,6 +208,12 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.ResetAndAsyncCriterion(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.ResetAndAsyncCriterionInDto})">
|
||||||
|
<summary>
|
||||||
|
重置并同步项目阅片标准
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.CRCRequestToQC(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.CRCRequestToQCCommand})">
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.CRCRequestToQC(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.CRCRequestToQCCommand})">
|
||||||
<summary>
|
<summary>
|
||||||
CRC RequestToQC 批量提交
|
CRC RequestToQC 批量提交
|
||||||
@@ -365,6 +371,11 @@
|
|||||||
IPLimit限流 启动服务
|
IPLimit限流 启动服务
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.API.JSONTimeZoneConverter">
|
||||||
|
<summary>
|
||||||
|
序列化,反序列化的时候,处理时间 时区转换
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.NullToEmptyStringResolver.CreateProperties(System.Type,Newtonsoft.Json.MemberSerialization)">
|
<member name="M:IRaCIS.Core.API.NullToEmptyStringResolver.CreateProperties(System.Type,Newtonsoft.Json.MemberSerialization)">
|
||||||
<summary>
|
<summary>
|
||||||
创建属性
|
创建属性
|
||||||
@@ -380,6 +391,11 @@
|
|||||||
<param name="httpContext"></param>
|
<param name="httpContext"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:TimeZoneAdjustmentMiddleware">
|
||||||
|
<summary>
|
||||||
|
废弃,没用
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:ZhaoXi._001.NET5Demo.Practice.WebApi.Utility.Jwt.CustomHSJWTService">
|
<member name="T:ZhaoXi._001.NET5Demo.Practice.WebApi.Utility.Jwt.CustomHSJWTService">
|
||||||
<summary>
|
<summary>
|
||||||
对称可逆加密
|
对称可逆加密
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.Extensions.Primitives;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 废弃,没用
|
||||||
|
/// </summary>
|
||||||
|
public class TimeZoneAdjustmentMiddleware
|
||||||
|
{
|
||||||
|
private readonly RequestDelegate _next;
|
||||||
|
|
||||||
|
public TimeZoneAdjustmentMiddleware(RequestDelegate next)
|
||||||
|
{
|
||||||
|
_next = next;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task Invoke(HttpContext context)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(context.Request.ContentType))
|
||||||
|
{
|
||||||
|
// 请求没有内容体,可能是一个没有请求体的请求,比如 GET 请求
|
||||||
|
await _next(context);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var timeZoneId = "Asia/Shanghai"; // 客户端默认时区
|
||||||
|
|
||||||
|
var timeZoneIdHeaderValue = context.Request.Headers["TimeZoneId"];
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(timeZoneIdHeaderValue))
|
||||||
|
{
|
||||||
|
timeZoneId = timeZoneIdHeaderValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var timeZone = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 处理 JSON 请求体中的时间字段
|
||||||
|
if (context.Request.ContentType.StartsWith("application/json"))
|
||||||
|
{
|
||||||
|
var requestBody = await new StreamReader(context.Request.Body).ReadToEndAsync();
|
||||||
|
|
||||||
|
// 使用 JSON.NET 或 System.Text.Json 解析 JSON 请求体
|
||||||
|
// 假设请求体中有一个名为 "dateTime" 的时间字段
|
||||||
|
dynamic jsonData = JsonConvert.DeserializeObject(requestBody);
|
||||||
|
|
||||||
|
if (jsonData.dateTime != null)
|
||||||
|
{
|
||||||
|
if (DateTime.TryParse((string)jsonData.dateTime, out DateTime dateTime))
|
||||||
|
{
|
||||||
|
// 将 JSON 请求体中的时间字段转换为服务器时区的时间
|
||||||
|
var serverTime = TimeZoneInfo.ConvertTime(dateTime, timeZone);
|
||||||
|
jsonData.dateTime = serverTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将修改后的 JSON 请求体重新写入请求流中
|
||||||
|
var jsonBytes = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(jsonData));
|
||||||
|
context.Request.Body = new MemoryStream(jsonBytes);
|
||||||
|
context.Request.ContentLength = jsonBytes.Length;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 处理 URL 表单参数
|
||||||
|
var modifiedQuery = new Dictionary<string, StringValues>();
|
||||||
|
|
||||||
|
foreach (var key in context.Request.Query.Keys)
|
||||||
|
{
|
||||||
|
if (DateTime.TryParse(context.Request.Query[key], out DateTime dateTime))
|
||||||
|
{
|
||||||
|
// 将 URL 表单参数中的时间转换为服务器时区的时间
|
||||||
|
var serverTime = TimeZoneInfo.ConvertTime(dateTime, timeZone);
|
||||||
|
modifiedQuery[key] = new StringValues(serverTime.ToString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modifiedQuery[key] = context.Request.Query[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
context.Request.Query = new QueryCollection(modifiedQuery);
|
||||||
|
|
||||||
|
// 处理Form请求体中的参数
|
||||||
|
if (context.Request.HasFormContentType)
|
||||||
|
{
|
||||||
|
var modifiedForm = new Dictionary<string, StringValues>();
|
||||||
|
|
||||||
|
foreach (var key in context.Request.Form.Keys)
|
||||||
|
{
|
||||||
|
if (DateTime.TryParse(context.Request.Form[key], out DateTime dateTime))
|
||||||
|
{
|
||||||
|
// 将请求体中的时间转换为服务器时区的时间
|
||||||
|
var serverTime = TimeZoneInfo.ConvertTime(dateTime, timeZone);
|
||||||
|
modifiedForm[key] = new StringValues(serverTime.ToString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modifiedForm[key] = context.Request.Form[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var newFormCollection = new FormCollection(modifiedForm);
|
||||||
|
|
||||||
|
// 将新的表单集合设置回请求对象
|
||||||
|
context.Request.Form = newFormCollection;
|
||||||
|
}
|
||||||
|
|
||||||
|
await _next(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -24,8 +24,10 @@ using IRaCIS.Core.Application.Filter;
|
|||||||
using Microsoft.AspNetCore.HttpOverrides;
|
using Microsoft.AspNetCore.HttpOverrides;
|
||||||
using IRaCIS.Application.Services.BackGroundJob;
|
using IRaCIS.Application.Services.BackGroundJob;
|
||||||
using LogDashboard;
|
using LogDashboard;
|
||||||
using OfficeOpenXml.Utils;
|
using FellowOakDicom.Network;
|
||||||
|
using IRaCIS.Core.Application.Service.ImageAndDoc;
|
||||||
|
using IP2Region.Net.Abstractions;
|
||||||
|
using IP2Region.Net.XDB;
|
||||||
|
|
||||||
|
|
||||||
#region 获取环境变量
|
#region 获取环境变量
|
||||||
@@ -109,7 +111,7 @@ builder.Services.AddControllers(options =>
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.AddNewtonsoftJsonSetup(); // NewtonsoftJson 序列化 处理
|
.AddNewtonsoftJsonSetup(builder.Services); // NewtonsoftJson 序列化 处理
|
||||||
|
|
||||||
builder.Services.AddOptions().Configure<SystemEmailSendConfig>(_configuration.GetSection("SystemEmailSendConfig"));
|
builder.Services.AddOptions().Configure<SystemEmailSendConfig>(_configuration.GetSection("SystemEmailSendConfig"));
|
||||||
builder.Services.AddOptions().Configure<ServiceVerifyConfigOption>(_configuration.GetSection("BasicSystemConfig"));
|
builder.Services.AddOptions().Configure<ServiceVerifyConfigOption>(_configuration.GetSection("BasicSystemConfig"));
|
||||||
@@ -159,7 +161,7 @@ builder.Services.AddSignalR();
|
|||||||
builder.Services.AddSingleton<IUserIdProvider, IRaCISUserIdProvider>();
|
builder.Services.AddSingleton<IUserIdProvider, IRaCISUserIdProvider>();
|
||||||
|
|
||||||
|
|
||||||
|
builder.Services.AddSingleton<ISearcher>(new Searcher(CachePolicy.Content, Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources, "ip2region.xdb")));
|
||||||
|
|
||||||
|
|
||||||
#region 历史废弃配置
|
#region 历史废弃配置
|
||||||
@@ -256,6 +258,7 @@ var hangfireJobService = app.Services.GetRequiredService<IIRaCISHangfireJob>();
|
|||||||
await hangfireJobService.InitHangfireJobTaskAsync();
|
await hangfireJobService.InitHangfireJobTaskAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -291,6 +294,11 @@ try
|
|||||||
//Log.Logger.Warning($"ContentRootPath——GetParent:{Directory.GetParent(env.ContentRootPath).Parent.FullName}");
|
//Log.Logger.Warning($"ContentRootPath——GetParent:{Directory.GetParent(env.ContentRootPath).Parent.FullName}");
|
||||||
//Log.Logger.Warning($"ContentRootPath——xx:{Path.GetDirectoryName(Path.GetDirectoryName(env.ContentRootPath))}");
|
//Log.Logger.Warning($"ContentRootPath——xx:{Path.GetDirectoryName(Path.GetDirectoryName(env.ContentRootPath))}");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var server = DicomServerFactory.Create<CStoreSCPService>(11112,userState: app.Services);
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Event_IRC"
|
"ASPNETCORE_ENVIRONMENT": "Event_IRC"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:6101"
|
"applicationUrl": "http://localhost:6100"
|
||||||
},
|
},
|
||||||
"Docker": {
|
"Docker": {
|
||||||
"commandName": "Docker",
|
"commandName": "Docker",
|
||||||
@@ -54,11 +54,11 @@
|
|||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:6100"
|
"applicationUrl": "http://localhost:6100"
|
||||||
},
|
},
|
||||||
"IRaCIS.US_IRC": {
|
"IRaCIS.US_Uat_IRC": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "US_IRC"
|
"ASPNETCORE_ENVIRONMENT": "US_Uat_IRC"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:6100"
|
"applicationUrl": "http://localhost:6100"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ namespace IRaCIS.Core.API
|
|||||||
//triggerOptions.AddTrigger<AddlTrialUserTrigger>();
|
//triggerOptions.AddTrigger<AddlTrialUserTrigger>();
|
||||||
triggerOptions.AddTrigger<VisitTaskIsFrontTaskNeedSignButNotSignTrigger>();
|
triggerOptions.AddTrigger<VisitTaskIsFrontTaskNeedSignButNotSignTrigger>();
|
||||||
triggerOptions.AddTrigger<VisitTaskIbeforeTrigger>();
|
triggerOptions.AddTrigger<VisitTaskIbeforeTrigger>();
|
||||||
|
|
||||||
|
|
||||||
|
triggerOptions.AddTrigger<UserLogTrigger>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
using IRaCIS.Core.Domain.Share;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Newtonsoft.Json.Converters;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.API
|
|
||||||
{
|
|
||||||
public class JSONCustomDateConverter : DateTimeConverterBase
|
|
||||||
{
|
|
||||||
private TimeZoneInfo _timeZoneInfo;
|
|
||||||
private string _dateFormat;
|
|
||||||
|
|
||||||
private IUserInfo _userInfo;
|
|
||||||
public JSONCustomDateConverter(string dateFormat, TimeZoneInfo timeZoneInfo, IUserInfo userInfo)
|
|
||||||
{
|
|
||||||
_dateFormat = dateFormat;
|
|
||||||
_timeZoneInfo = timeZoneInfo;
|
|
||||||
|
|
||||||
_userInfo = userInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
|
||||||
{
|
|
||||||
var timeZoneId = _userInfo.TimeZoneId;
|
|
||||||
|
|
||||||
var needConvertUtcDateTime = Convert.ToDateTime(value);
|
|
||||||
|
|
||||||
|
|
||||||
var tz = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
|
||||||
|
|
||||||
|
|
||||||
var dateTimeOffset = new DateTimeOffset(needConvertUtcDateTime);
|
|
||||||
|
|
||||||
var time = TimeZoneInfo.ConvertTimeFromUtc(needConvertUtcDateTime, tz).ToString(_dateFormat);
|
|
||||||
|
|
||||||
writer.WriteValue(time);
|
|
||||||
writer.Flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using StackExchange.Redis;
|
||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.API
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 序列化,反序列化的时候,处理时间 时区转换
|
||||||
|
/// </summary>
|
||||||
|
public class JSONTimeZoneConverter : DateTimeConverterBase
|
||||||
|
{
|
||||||
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
|
|
||||||
|
private readonly TimeZoneInfo _clientTimeZone;
|
||||||
|
public JSONTimeZoneConverter(IHttpContextAccessor httpContextAccessor)
|
||||||
|
{
|
||||||
|
_httpContextAccessor = httpContextAccessor;
|
||||||
|
|
||||||
|
//默认是UTC
|
||||||
|
//var timeZoneId = "Etc/UTC";
|
||||||
|
var timeZoneId = "Asia/Shanghai";
|
||||||
|
|
||||||
|
var timeZoneIdHeader = _httpContextAccessor?.HttpContext?.Request?.Headers["TimeZoneId"];
|
||||||
|
|
||||||
|
if (timeZoneIdHeader is not null && !string.IsNullOrEmpty(timeZoneIdHeader.Value))
|
||||||
|
{
|
||||||
|
timeZoneId = timeZoneIdHeader.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
_clientTimeZone = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CanConvert(Type objectType)
|
||||||
|
{
|
||||||
|
// 仅支持 DateTime 类型的转换
|
||||||
|
return objectType == typeof(DateTime)|| objectType == typeof(DateTime?);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
if (reader.Value == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime dateTime;
|
||||||
|
|
||||||
|
if (reader.ValueType == typeof(DateTime) || reader.ValueType == typeof(DateTime?))
|
||||||
|
{
|
||||||
|
DateTime? nullableDateTime = reader.Value as DateTime?;
|
||||||
|
|
||||||
|
|
||||||
|
if (nullableDateTime != null && nullableDateTime.HasValue)
|
||||||
|
{
|
||||||
|
dateTime = nullableDateTime.Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (DateTime.TryParse((string)reader.Value, out dateTime) == false)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 将客户端时间转换为服务器时区的时间
|
||||||
|
var serverZoneTime = TimeZoneInfo.ConvertTime(dateTime, _clientTimeZone, TimeZoneInfo.Local);
|
||||||
|
|
||||||
|
return serverZoneTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
DateTime? nullableDateTime = value as DateTime?;
|
||||||
|
|
||||||
|
if (nullableDateTime != null && nullableDateTime.HasValue)
|
||||||
|
{
|
||||||
|
//第一个参数默认使用系统本地时区 也就是应用服务器的时区
|
||||||
|
DateTime clientZoneTime = TimeZoneInfo.ConvertTime(nullableDateTime.Value, _clientTimeZone);
|
||||||
|
writer.WriteValue(clientZoneTime);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writer.WriteNull();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||||
|
using IRaCIS.Core.Application.Helper;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
@@ -8,8 +10,12 @@ namespace IRaCIS.Core.API
|
|||||||
{
|
{
|
||||||
public static class NewtonsoftJsonSetup
|
public static class NewtonsoftJsonSetup
|
||||||
{
|
{
|
||||||
public static void AddNewtonsoftJsonSetup(this IMvcBuilder builder)
|
public static void AddNewtonsoftJsonSetup(this IMvcBuilder builder, IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
services.AddHttpContextAccessor();
|
||||||
|
services.AddScoped<JSONTimeZoneConverter>();
|
||||||
|
services.AddScoped<CustomStringConverter>();
|
||||||
|
services.AddScoped<IOSSService,OSSService>();
|
||||||
|
|
||||||
builder.AddNewtonsoftJson(options =>
|
builder.AddNewtonsoftJson(options =>
|
||||||
{
|
{
|
||||||
@@ -23,8 +29,15 @@ namespace IRaCIS.Core.API
|
|||||||
// 设置时间格式
|
// 设置时间格式
|
||||||
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
|
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
|
||||||
|
|
||||||
|
options.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.RoundtripKind;
|
||||||
|
|
||||||
//options.SerializerSettings.Converters.Add(new JSONCustomDateConverter()) ;
|
//options.SerializerSettings.Converters.Add(new JSONCustomDateConverter()) ;
|
||||||
|
|
||||||
|
options.SerializerSettings.Converters.Add(services.BuildServiceProvider().GetService<JSONTimeZoneConverter>());
|
||||||
|
|
||||||
|
//options.SerializerSettings.Converters.Add(services.BuildServiceProvider().GetService<CustomStringConverter>());
|
||||||
|
|
||||||
|
|
||||||
//IsoDateTimeConverter
|
//IsoDateTimeConverter
|
||||||
//options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
|
//options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
using IRaCIS.Core.Application.Helper;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
using Newtonsoft.Json.Serialization;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson
|
||||||
|
{
|
||||||
|
public class CustomStringConverter : JsonConverter<string>
|
||||||
|
{
|
||||||
|
//private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
|
private readonly IOSSService _oSSService;
|
||||||
|
|
||||||
|
// 构造函数
|
||||||
|
public CustomStringConverter(/*IHttpContextAccessor httpContextAccessor*/ IOSSService oSSService)
|
||||||
|
{
|
||||||
|
//_httpContextAccessor = httpContextAccessor;
|
||||||
|
_oSSService = oSSService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ReadJson(JsonReader reader, Type objectType, string existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
if (reader.TokenType == JsonToken.String)
|
||||||
|
{
|
||||||
|
return (string)reader.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(JsonWriter writer, string value, JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
// 在这里对字符串进行处理,例如转换大小写、去除空格等
|
||||||
|
// 这里只是一个示例,您可以根据实际需求进行更改
|
||||||
|
|
||||||
|
// 获取当前正在序列化的属性名
|
||||||
|
string propertyName = writer.Path.Split('.').Last();
|
||||||
|
|
||||||
|
Regex guidRegex = new Regex(@"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
|
||||||
|
|
||||||
|
if (propertyName.IndexOf("Path") > -1 && value.IndexOf('.')>-1 && guidRegex.IsMatch(value))
|
||||||
|
{
|
||||||
|
var tt= _oSSService.GetSignedUrl(value);
|
||||||
|
writer.WriteValue(tt);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 将处理后的字符串写入到 JsonWriter 中
|
||||||
|
writer.WriteValue(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writer.WriteNull();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
using Serilog.Sinks.Email;
|
//using Serilog.Sinks.Email;
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
@@ -29,8 +29,7 @@ namespace IRaCIS.Core.API
|
|||||||
outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine}")
|
outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine}")
|
||||||
|
|
||||||
.WriteTo.File($"{AppContext.BaseDirectory}Serilogs/.log", rollingInterval: RollingInterval.Day,
|
.WriteTo.File($"{AppContext.BaseDirectory}Serilogs/.log", rollingInterval: RollingInterval.Day,
|
||||||
outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine}")
|
outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {SourceContext:l} || {Message} || {Exception} ||end {NewLine}");
|
||||||
.Filter.ByExcluding(logEvent => logEvent.Properties.ContainsKey("SourceContext") && logEvent.Properties["SourceContext"].ToString().Contains("health"));
|
|
||||||
|
|
||||||
//.WriteTo.MSSqlServer("Data Source=DESKTOP-4TU9A6M;Initial Catalog=CoreFrame;User ID=sa;Password=123456", "logs", autoCreateSqlTable: true, restrictedToMinimumLevel: LogEventLevel.Information)//从左至右四个参数分别是数据库连接字符串、表名、如果表不存在是否创建、最低等级。Serilog会默认创建一些列。
|
//.WriteTo.MSSqlServer("Data Source=DESKTOP-4TU9A6M;Initial Catalog=CoreFrame;User ID=sa;Password=123456", "logs", autoCreateSqlTable: true, restrictedToMinimumLevel: LogEventLevel.Information)//从左至右四个参数分别是数据库连接字符串、表名、如果表不存在是否创建、最低等级。Serilog会默认创建一些列。
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"ObjectStoreUse": "AliyunOSS",
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
@@ -41,8 +42,12 @@
|
|||||||
"OpenLoginLimit": true,
|
"OpenLoginLimit": true,
|
||||||
"LoginMaxFailCount": 5,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30
|
"LoginFailLockMinutes": 30,
|
||||||
|
"AutoLoginOutMinutes": 60,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
},
|
},
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
"Port": 465,
|
"Port": 465,
|
||||||
@@ -50,7 +55,11 @@
|
|||||||
"FromEmail": "uat@extimaging.com",
|
"FromEmail": "uat@extimaging.com",
|
||||||
"FromName": "UAT_IRC",
|
"FromName": "UAT_IRC",
|
||||||
"AuthorizationCode": "SHzyyl2021",
|
"AuthorizationCode": "SHzyyl2021",
|
||||||
"SiteUrl": "http://irc.event.extimaging.com/login"
|
"SiteUrl": "http://irc.event.extimaging.com/login",
|
||||||
|
"CompanyName": "Extensive Imaging",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Extensive Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=101.132.193.237,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
//"RemoteNew": "Server=101.132.193.237,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||||
"Hangfire": "Server=101.132.193.237,1434;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
//"Hangfire": "Server=101.132.193.237,1434;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||||
|
"RemoteNew": "Server=prod_mssql_standard,1433;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||||
},
|
},
|
||||||
"ObjectStoreService": {
|
"ObjectStoreService": {
|
||||||
"ObjectStoreUse": "AliyunOSS",
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
@@ -34,13 +37,20 @@
|
|||||||
"BasicSystemConfig": {
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
"OpenUserComplexPassword": true,
|
"OpenUserComplexPassword": true,
|
||||||
|
|
||||||
"OpenSignDocumentBeforeWork": true,
|
"OpenSignDocumentBeforeWork": true,
|
||||||
|
|
||||||
"OpenLoginLimit": true,
|
"OpenLoginLimit": true,
|
||||||
"LoginMaxFailCount": 5,
|
"LoginMaxFailCount": 5,
|
||||||
|
"LoginFailLockMinutes": 30,
|
||||||
|
|
||||||
|
"AutoLoginOutMinutes": 360,
|
||||||
|
|
||||||
|
"OpenLoginMFA": false,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
@@ -49,6 +59,12 @@
|
|||||||
"FromEmail": "IRC@extimaging.com",
|
"FromEmail": "IRC@extimaging.com",
|
||||||
"FromName": "IRC",
|
"FromName": "IRC",
|
||||||
"AuthorizationCode": "ExtImg@2022",
|
"AuthorizationCode": "ExtImg@2022",
|
||||||
"SiteUrl": "http://irc.extimaging.com/login"
|
"SiteUrl": "http://irc.extimaging.com/login",
|
||||||
|
"OrganizationName": "Extlmaging",
|
||||||
|
"OrganizationNameCN": "Extlmaging",
|
||||||
|
"CompanyName": "Extensive Imaging",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Extensive Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=123.56.94.154,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
"Hangfire": "Server=123.56.94.154,1435;Database=Test_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
"Hangfire": "Server=106.14.89.110,1435;Database=Test_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
@@ -26,15 +27,14 @@
|
|||||||
"viewEndpoint": "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
"viewEndpoint": "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||||
"region": "oss-cn-shanghai"
|
"region": "oss-cn-shanghai"
|
||||||
},
|
},
|
||||||
|
|
||||||
"MinIO": {
|
"MinIO": {
|
||||||
"endPoint": "192.168.3.68",
|
"endPoint": "hir-oss.test.extimaging.com",
|
||||||
"port": "8001",
|
"port": "443",
|
||||||
"useSSL": false,
|
"useSSL": true,
|
||||||
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
"accessKey": "fbStsVYCIPKHQneeqMwD",
|
||||||
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
|
"secretKey": "TzgvyA3zGXMUnpilJNUlyMYHfosl1hBMl6lxPmjy",
|
||||||
"bucketName": "test",
|
"bucketName": "irc-test",
|
||||||
"viewEndpoint": "http://192.168.3.68:8001/test/"
|
"viewEndpoint": "https://hir-oss.test.extimaging.com/irc-test"
|
||||||
},
|
},
|
||||||
|
|
||||||
"AWS": {
|
"AWS": {
|
||||||
@@ -59,7 +59,15 @@
|
|||||||
|
|
||||||
"LoginMaxFailCount": 5,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 1
|
"LoginFailLockMinutes": 1,
|
||||||
|
|
||||||
|
"AutoLoginOutMinutes": 1,
|
||||||
|
|
||||||
|
"OpenLoginMFA": false,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
},
|
},
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
@@ -69,7 +77,14 @@
|
|||||||
"FromName": "Test_IRC",
|
"FromName": "Test_IRC",
|
||||||
"AuthorizationCode": "SHzyyl2021",
|
"AuthorizationCode": "SHzyyl2021",
|
||||||
|
|
||||||
"SiteUrl": "http://irc.test.extimaging.com/login"
|
"SiteUrl": "http://irc.test.extimaging.com/login",
|
||||||
|
|
||||||
|
"OrganizationName": "Extlmaging",
|
||||||
|
"OrganizationNameCN": "Extlmaging",
|
||||||
|
"CompanyName": "Extensive Imaging",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Extensive Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft": "Warning",
|
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"RemoteNew": "Server=us-mssql-service,1433;Database=Prod_US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
|
||||||
"Hangfire": "Server=us-mssql-service,1433;Database=Prod_US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
|
||||||
|
|
||||||
//"RemoteNew": "Server=44.218.11.19,1435;Database=Prod_US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
|
||||||
//"Hangfire": "Server=44.218.11.19,1435;Database=Prod_US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
|
||||||
},
|
|
||||||
|
|
||||||
"ObjectStoreService": {
|
|
||||||
|
|
||||||
"ObjectStoreUse": "AWS",
|
|
||||||
|
|
||||||
"AliyunOSS": {
|
|
||||||
"regionId": "cn-shanghai",
|
|
||||||
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
|
||||||
"bucketName": "zy-irc-test-store",
|
|
||||||
"roleArn": "acs:ram::1899121822495495:role/oss-upload",
|
|
||||||
"viewEndpoint": "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
|
||||||
"region": "oss-cn-shanghai"
|
|
||||||
},
|
|
||||||
|
|
||||||
"MinIO": {
|
|
||||||
"endPoint": "192.168.3.68",
|
|
||||||
"port": "8001",
|
|
||||||
"useSSL": false,
|
|
||||||
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
|
||||||
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
|
|
||||||
"bucketName": "test",
|
|
||||||
"viewEndpoint": "http://192.168.3.68:8001/test/"
|
|
||||||
},
|
|
||||||
|
|
||||||
"AWS": {
|
|
||||||
"endPoint": "s3.us-east-1.amazonaws.com",
|
|
||||||
"useSSL": true,
|
|
||||||
"accessKey": "AKIAZQ3DRSOHFPJJ6FEU",
|
|
||||||
"secretKey": "l+yjtvV7Z4jiwm/7xCYv30UeUj/SvuqqYzAwjJHf",
|
|
||||||
"bucketName": "ei-irc-test-store",
|
|
||||||
"viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"BasicSystemConfig": {
|
|
||||||
|
|
||||||
"OpenUserComplexPassword": false,
|
|
||||||
|
|
||||||
"OpenSignDocumentBeforeWork": false,
|
|
||||||
|
|
||||||
"OpenTrialRelationDelete": true,
|
|
||||||
|
|
||||||
"OpenLoginLimit": false,
|
|
||||||
|
|
||||||
"LoginMaxFailCount": 5,
|
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30
|
|
||||||
},
|
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
|
||||||
"Port": 465,
|
|
||||||
"Host": "smtp.qiye.aliyun.com",
|
|
||||||
"FromEmail": "test@extimaging.com",
|
|
||||||
"FromName": "Test_IRC",
|
|
||||||
"AuthorizationCode": "SHzyyl2021"
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"RemoteNew": "Server=us-prod-mssql-service,1433;Database=US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=us-prod-mssql-service,1433;Database=US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
//"RemoteNew": "Server=44.210.231.169,1435;Database=US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
//"Hangfire": "Server=44.210.231.169,1435;Database=US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
},
|
||||||
|
|
||||||
|
"ObjectStoreService": {
|
||||||
|
"ObjectStoreUse": "AWS",
|
||||||
|
"MinIO": {
|
||||||
|
"endPoint": "44.210.231.169",
|
||||||
|
"port": "9001",
|
||||||
|
"useSSL": false,
|
||||||
|
"accessKey": "e9bT1isTOqSAUxb6wd4n",
|
||||||
|
"secretKey": "b5TaDzNdQCBtCvfm8eZ3dR6yY7tfZu2JYze2Po1i",
|
||||||
|
"bucketName": "prod-irc-us",
|
||||||
|
"viewEndpoint": "http://44.210.231.169:9001/prod-irc-us/"
|
||||||
|
},
|
||||||
|
|
||||||
|
"AWS": {
|
||||||
|
"endPoint": "s3.us-east-1.amazonaws.com",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "AKIAW3MEAFJX5P32P6NA",
|
||||||
|
"secretKey": "soKfYlzZE11Zi4RyTjXp0myXN0U3U+ka8rT49+B/",
|
||||||
|
"bucketName": "ei-med-s3-lili-store",
|
||||||
|
"viewEndpoint": "https://ei-med-s3-lili-store.s3.amazonaws.com/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
|
"OpenUserComplexPassword": false,
|
||||||
|
|
||||||
|
"OpenSignDocumentBeforeWork": false,
|
||||||
|
|
||||||
|
"OpenTrialRelationDelete": true,
|
||||||
|
|
||||||
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
|
"LoginFailLockMinutes": 30,
|
||||||
|
|
||||||
|
"AutoLoginOutMinutes": 60,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10,
|
||||||
|
|
||||||
|
"OpenLoginMFA": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"SystemEmailSendConfig": {
|
||||||
|
"Port": 587,
|
||||||
|
"Host": "smtp-mail.outlook.com",
|
||||||
|
"FromEmail": "donotreply@elevateimaging.ai",
|
||||||
|
"FromName": "LiLi",
|
||||||
|
"AuthorizationCode": "Q#669869497420ul",
|
||||||
|
|
||||||
|
"OrganizationName": "Elevate Imaging",
|
||||||
|
"OrganizationNameCN": "Elevate Imaging",
|
||||||
|
"CompanyName": "Elevate Imaging Inc.",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Elevate Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗",
|
||||||
|
"SiteUrl": "https://lili.elevateimaging.ai/login"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=106.14.89.110,1435;Database=Test_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ObjectStoreService": {
|
||||||
|
|
||||||
|
"ObjectStoreUse": "MinIO",
|
||||||
|
"AliyunOSS": {
|
||||||
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
|
"endPoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
|
"bucketName": "zy-irc-test-store",
|
||||||
|
"roleArn": "acs:ram::1899121822495495:role/oss-upload",
|
||||||
|
"viewEndpoint": "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"region": "oss-cn-shanghai"
|
||||||
|
},
|
||||||
|
|
||||||
|
"MinIO": {
|
||||||
|
//"endPoint": "hir-oss.uat.extimaging.com",
|
||||||
|
//"port": "443",
|
||||||
|
//"useSSL": true,
|
||||||
|
//"viewEndpoint": "https://hir-oss.uat.extimaging.com/hir-uat",
|
||||||
|
|
||||||
|
"endPoint": "47.117.164.182",
|
||||||
|
"port": "9001",
|
||||||
|
"useSSL": false,
|
||||||
|
"viewEndpoint": "http://47.117.164.182:9001/test-irc-us",
|
||||||
|
|
||||||
|
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
||||||
|
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
||||||
|
"bucketName": "test-irc-us"
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"AWS": {
|
||||||
|
"endPoint": "s3.us-east-1.amazonaws.com",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "AKIAZQ3DRSOHFPJJ6FEU",
|
||||||
|
"secretKey": "l+yjtvV7Z4jiwm/7xCYv30UeUj/SvuqqYzAwjJHf",
|
||||||
|
"bucketName": "ei-irc-test-store",
|
||||||
|
"viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
|
"OpenUserComplexPassword": false,
|
||||||
|
|
||||||
|
"OpenSignDocumentBeforeWork": false,
|
||||||
|
|
||||||
|
"OpenTrialRelationDelete": true,
|
||||||
|
|
||||||
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
|
"LoginFailLockMinutes": 30,
|
||||||
|
"AutoLoginOutMinutes": 60,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"SystemEmailSendConfig": {
|
||||||
|
"Port": 587,
|
||||||
|
"Host": "smtp-mail.outlook.com",
|
||||||
|
"FromEmail": "donotreply@elevateimaging.ai",
|
||||||
|
"FromName": "LiLi",
|
||||||
|
"AuthorizationCode": "Q#669869497420ul",
|
||||||
|
|
||||||
|
"OrganizationName": "Elevate Imaging",
|
||||||
|
"OrganizationNameCN": "Elevate Imaging",
|
||||||
|
"CompanyName": "Elevate Imaging Inc.",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Elevate Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗",
|
||||||
|
"SiteUrl": "https://lili.test.elevateimaging.ai/login"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"RemoteNew": "Server=us-mssql-service,1433;Database=US_Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
"Hangfire": "Server=us-mssql-service,1433;Database=US_Uat_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
|
||||||
|
//"RemoteNew": "Server=3.226.182.187,1435;Database=US_Uat_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
|
||||||
|
//"Hangfire": "Server=3.226.182.187,1435;Database=US_Uat_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
||||||
|
},
|
||||||
|
|
||||||
|
"ObjectStoreService": {
|
||||||
|
|
||||||
|
"ObjectStoreUse": "AWS",
|
||||||
|
|
||||||
|
"MinIO": {
|
||||||
|
//"endPoint": "hir-minio.uat.elevateimaging.ai",
|
||||||
|
//"port": "443",
|
||||||
|
//"useSSL": true,
|
||||||
|
//"viewEndpoint": "https://hir-minio.uat.elevateimaging.ai/uat-irc-us",
|
||||||
|
|
||||||
|
"endPoint": "3.226.182.187",
|
||||||
|
"port": "9001",
|
||||||
|
"useSSL": false,
|
||||||
|
"viewEndpoint": "http://44.218.11.19:9001/uat-irc-us",
|
||||||
|
|
||||||
|
"accessKey": "lH8DkKskLuDqPaiubuSQ",
|
||||||
|
"secretKey": "pdPdicvvLeH7xAC5yFUrI7odMyBfOXxvVWMvKYV4",
|
||||||
|
"bucketName": "uat-irc-us"
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"AWS": {
|
||||||
|
"endPoint": "s3.us-east-1.amazonaws.com",
|
||||||
|
"useSSL": true,
|
||||||
|
"accessKey": "AKIAW3MEAFJXUO6XYFYN",
|
||||||
|
"secretKey": "AeX5r4xHQH7tNJlTTFVv5/zBXie1Kj+mAayKrukp",
|
||||||
|
"bucketName": "ei-med-s3-lili-uat-store",
|
||||||
|
"viewEndpoint": "https://ei-med-s3-lili-uat-store.s3.amazonaws.com/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
|
"OpenUserComplexPassword": false,
|
||||||
|
|
||||||
|
"OpenSignDocumentBeforeWork": false,
|
||||||
|
|
||||||
|
"OpenTrialRelationDelete": true,
|
||||||
|
|
||||||
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
|
"LoginFailLockMinutes": 30,
|
||||||
|
"AutoLoginOutMinutes": 60,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10,
|
||||||
|
|
||||||
|
"OpenLoginMFA": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"SystemEmailSendConfig": {
|
||||||
|
"Port": 587,
|
||||||
|
"Host": "smtp-mail.outlook.com",
|
||||||
|
"FromEmail": "donotreply@elevateimaging.ai",
|
||||||
|
"FromName": "LiLi",
|
||||||
|
"AuthorizationCode": "Q#669869497420ul",
|
||||||
|
|
||||||
|
"OrganizationName": "Elevate Imaging",
|
||||||
|
"OrganizationNameCN": "Elevate Imaging",
|
||||||
|
"CompanyName": "Elevate Imaging Inc.",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Elevate Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗",
|
||||||
|
"SiteUrl": "https://lili.test.elevateimaging.ai/login"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
"AliyunOSS": {
|
"AliyunOSS": {
|
||||||
"regionId": "cn-shanghai",
|
"regionId": "cn-shanghai",
|
||||||
|
"internalEndpoint": "https://oss-cn-shanghai-internal.aliyuncs.com",
|
||||||
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
"endpoint": "https://oss-cn-shanghai.aliyuncs.com",
|
||||||
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
"accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
|
||||||
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
"accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
|
||||||
@@ -26,12 +27,17 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"MinIO": {
|
"MinIO": {
|
||||||
"endpoint": "http://192.168.3.68",
|
"endPoint": "hir-oss.uat.extimaging.com",
|
||||||
"port": "8001",
|
//"port": "80",
|
||||||
"useSSL": false,
|
//"useSSL": false,
|
||||||
"accessKey": "IDFkwEpWej0b4DtiuThL",
|
//"viewEndpoint": "http://hir-oss.uat.extimaging.com/irc-uat",
|
||||||
"secretKey": "Lhuu83yMhVwu7c1SnjvGY6lq74jzpYqifK6Qtj4h",
|
"port": "443",
|
||||||
"bucketName": "test"
|
"useSSL": true,
|
||||||
|
"viewEndpoint": "https://hir-oss.uat.extimaging.com/irc-uat",
|
||||||
|
"accessKey": "b9Ul0e98xPzt6PwRXA1Q",
|
||||||
|
"secretKey": "DzMaU2L4OXl90uytwOmDXF2encN0Jf4Nxu2XkYqQ",
|
||||||
|
"bucketName": "irc-uat"
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -44,7 +50,13 @@
|
|||||||
"OpenLoginLimit": true,
|
"OpenLoginLimit": true,
|
||||||
"LoginMaxFailCount": 5,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 30
|
"LoginFailLockMinutes": 30,
|
||||||
|
"AutoLoginOutMinutes": 60,
|
||||||
|
"OpenLoginMFA": false,
|
||||||
|
|
||||||
|
"ContinuousReadingTimeMin": 120,
|
||||||
|
|
||||||
|
"ReadingRestTimeMin": 10
|
||||||
|
|
||||||
},
|
},
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
@@ -53,7 +65,13 @@
|
|||||||
"FromEmail": "uat@extimaging.com",
|
"FromEmail": "uat@extimaging.com",
|
||||||
"FromName": "UAT_IRC",
|
"FromName": "UAT_IRC",
|
||||||
"AuthorizationCode": "SHzyyl2021",
|
"AuthorizationCode": "SHzyyl2021",
|
||||||
"SiteUrl": "http://irc.uat.extimaging.com/login"
|
"SiteUrl": "http://irc.uat.extimaging.com/login",
|
||||||
|
"OrganizationName": "Extlmaging",
|
||||||
|
"OrganizationNameCN": "Extlmaging",
|
||||||
|
"CompanyName": "Extensive Imaging",
|
||||||
|
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||||
|
"CompanyShortName": "Extensive Imaging",
|
||||||
|
"CompanyShortNameCN": "展影医疗"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"JwtSetting": {
|
"JwtSetting": {
|
||||||
"SecurityKey": "SecurityKey_SHzyyl@2021",
|
"SecurityKey": "ShangHaiZhanYing_SecurityKey_SHzyyl@2021",
|
||||||
"Issuer": "Extimaging",
|
"Issuer": "Extimaging",
|
||||||
"Audience": "EICS",
|
"Audience": "EICS",
|
||||||
"TokenExpireDays": "7"
|
"TokenExpireDays": "7"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
尊敬的 {0} ,您好:
|
尊敬的 {0} ,您好:
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
展影医疗为您添加了账户,账户信息如下:
|
{company abbreviation}为您添加了账户,账户信息如下:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
首次登陆前,请通过该链接修改您的账户信息:
|
首次登陆前,请通过该链接修改您的账户信息:
|
||||||
<a href='{3}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
<a href='{3}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
初始化账号信息
|
初始化账号信息
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,20 +11,20 @@
|
|||||||
Dear {0} ,
|
Dear {0} ,
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
Extimaging has added an account for you. The account information is as follows:
|
{company abbreviation} has created an account for you. The account information is as follows:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
<div>
|
<div>
|
||||||
User name: {1}
|
User ID: {1}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Role: {2}
|
Role: {2}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Before logging in for the first time, please modify your account information by this link:
|
Before logging in for the first time, please modify the account information through this link:
|
||||||
<a href='{3}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
<a href='{3}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
Initialize the account information
|
Initialize account information
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
尊敬的 {0} ,您好:
|
尊敬的 {0} ,您好:
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
展影医疗将您的账户密码已重置,账户信息如下:
|
{company abbreviation}将您的账户密码已重置,账户信息如下:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
Dear {0} ,
|
Dear {0} ,
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
Extimaging has reset your account password, and the account information is as follows:
|
{company abbreviation} has reset your account password, and the account information is as follows:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
<div>
|
<div>
|
||||||
User name: {1}
|
User ID: {1}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Role: {2}
|
Role: {2}
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
Dear:
|
Dear:
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
Thank you for using Extensive Imaging Cloud System.
|
Thank you for using {company abbreviation} Cloud System.
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
{0}。
|
{0}。
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
尊敬的 {0} ,您好:
|
尊敬的 {0} ,您好:
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
展影医疗作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目阅片相关工作。
|
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目阅片相关工作。
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
该项目采用电子化工作流,系统及您的账号信息如下:
|
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
系统登录地址:
|
系统登录地址:
|
||||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
点击跳转
|
点击跳转
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
Dear {0},
|
Dear {0},
|
||||||
</div>
|
</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'>
|
||||||
As the service provider of {1} trial(Protocol ID is {2}), Extensive Imaging invites you to participate in the independent assessment work of this trial.
|
{company abbreviation} invites you to participate in the IRC work of a trial ({1} , {2}).
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
This project adopts electronic workflow. The system and your account information are as follows:
|
Your account information is as follows:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
@@ -25,23 +25,26 @@
|
|||||||
Protocol ID: {2}
|
Protocol ID: {2}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Study name: {1}
|
Study Name: {1}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
User name: {4}
|
User ID: {4}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Role: {5}
|
Role: {5}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Login URL: {6}
|
Login URL:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
Click to login
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
尊敬的 {0} ,您好:
|
尊敬的 {0} ,您好:
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
展影医疗作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC阅片相关工作,欢迎您提供指导和建议,非常感谢!
|
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC阅片相关工作,欢迎您提供指导和建议,非常感谢!
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
该项目采用电子化工作流,系统及您的账号信息如下:
|
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
首次登陆前,请通过该链接修改您的账户信息:
|
首次登陆前,请通过该链接修改您的账户信息:
|
||||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
初始化账号信息
|
初始化账号信息
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
Dear {0},
|
Dear {0},
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
|
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
This project adopts electronic workflow. The system and your account information are as follows:
|
Your account information is as follows:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
@@ -25,18 +25,18 @@
|
|||||||
Protocol ID: {2}
|
Protocol ID: {2}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Study name: {1}
|
Study Name: {1}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
User name: {4}
|
User ID: {4}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Role: {5}
|
Role: {5}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Before logging in for the first time, please modify your account information by this link:
|
Before logging in for the first time, please modify the account information through this link:
|
||||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
Initialize the account information
|
Initialize account information
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
尊敬的 {0} ,您好:
|
尊敬的 {0} ,您好:
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
您好, 您填写的中心调研表被驳回,详细信息如下:
|
您填写的中心调研表被驳回,详细信息如下:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
Dear {0} ,
|
Dear {0} ,
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
Hello, the center survey form you filled in has been rejected. The details are as follows:
|
The site survey form you filled in has been rejected. The details are as follows:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
Protocol ID: {2}
|
Protocol ID: {2}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Study name: {3}
|
Study Name: {3}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Site ID: {4}
|
Site ID: {4}
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
尊敬的 {0} ,您好:
|
尊敬的 {0} ,您好:
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
展影医疗作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目相关工作,欢迎您提供指导和建议,非常感谢!
|
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目相关工作,欢迎您提供指导和建议,非常感谢!
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
该项目采用电子化工作流,系统及您的账号信息如下:
|
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
系统登录地址:
|
系统登录地址:
|
||||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
<a href='{6}' style='margin-left:5px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
点击跳转
|
点击跳转
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
Dear {0},
|
Dear {0},
|
||||||
</div>
|
</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'>
|
||||||
As the service provider of {1} trial (Protocol ID is {2}), Extensive Imaging invites you to participate in related work of this trial.
|
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
This project adopts electronic workflow. The system and your account information are as follows:
|
Your account information is as follows:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
@@ -25,23 +25,26 @@
|
|||||||
Protocol ID: {2}
|
Protocol ID: {2}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Study name: {1}
|
Study Name: {1}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
User name: {4}
|
User ID: {4}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Role: {5}
|
Role: {5}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Login URL: {6}
|
Login URL:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
Click to login
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
尊敬的 {0} ,您好:
|
尊敬的 {0} ,您好:
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
展影医疗作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC相关工作,欢迎您提供指导和建议,非常感谢!
|
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC相关工作,欢迎您提供指导和建议,非常感谢!
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
该项目采用电子化工作流,系统及您的账号信息如下:
|
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
首次登陆前,请通过该链接修改您的账户信息:
|
首次登陆前,请通过该链接修改您的账户信息:
|
||||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
初始化账号信息
|
初始化账号信息
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
Dear {0},
|
Dear {0},
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
|
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
This project adopts electronic workflow. The system and your account information are as follows:
|
Your account information is as follows:
|
||||||
</div>
|
</div>
|
||||||
<span style="color: #00D1B2"></span>
|
<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;'>
|
<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;'>
|
||||||
@@ -25,18 +25,18 @@
|
|||||||
Protocol ID: {2}
|
Protocol ID: {2}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Study name: {1}
|
Study Name: {1}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
User name: {4}
|
User ID: {4}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Role: {5}
|
Role: {5}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Before logging in for the first time, please modify your account information by this link:
|
Before logging in for the first time, please modify the account information through this link:
|
||||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
Initialize the account information
|
Initialize the account information
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
<div style='padding-top: 20px;'>
|
<div style='padding-top: 20px;'>
|
||||||
<div style='line-height: 40px;font-size: 18px'>
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
Hello {0},
|
{0}您好,
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
感谢您使用展影云平台。
|
感谢您使用展影云平台。
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>祝您顺利!</div>
|
<div>祝您顺利!</div>
|
||||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,21 +8,21 @@
|
|||||||
<div style='padding-left: 40px;background: #f6f6f6'>
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
<div style='padding-top: 20px;'>
|
<div style='padding-top: 20px;'>
|
||||||
<div style='line-height: 40px;font-size: 18px'>
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
Hello {0},
|
Dear {0},
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
Thank you for using Extensive Imaging’s cloud system!
|
{1}
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
{1}, and the verification code is <span style="font-weight:bold">{2}</span>.
|
The verification code is <span style="font-weight:bold">{2}</span>.
|
||||||
</div>
|
</div>
|
||||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
Please enter this verification code within 3 minutes for subsequent operations.
|
This code will expire in 3 minutes.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
<div>Best regards,</div>
|
<div>Best regards,</div>
|
||||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
<div style="font-size: 14px;">{company}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Binary file not shown.
@@ -8,6 +8,7 @@ using IRaCIS.Core.Infrastructure;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using SharpCompress.Common;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services.BackGroundJob
|
namespace IRaCIS.Application.Services.BackGroundJob
|
||||||
{
|
{
|
||||||
@@ -24,6 +25,8 @@ namespace IRaCIS.Application.Services.BackGroundJob
|
|||||||
{
|
{
|
||||||
public static string JsonFileFolder = Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources);
|
public static string JsonFileFolder = Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources);
|
||||||
|
|
||||||
|
public static FileSystemWatcher FileSystemWatcher_US { get; set; }
|
||||||
|
public static FileSystemWatcher FileSystemWatcher_CN { get; set; }
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
private readonly IEasyCachingProvider _provider;
|
private readonly IEasyCachingProvider _provider;
|
||||||
private readonly ILogger<IRaCISCHangfireJob> _logger;
|
private readonly ILogger<IRaCISCHangfireJob> _logger;
|
||||||
@@ -124,29 +127,43 @@ namespace IRaCIS.Application.Services.BackGroundJob
|
|||||||
|
|
||||||
|
|
||||||
//监测Json文件变更 实时刷新数据
|
//监测Json文件变更 实时刷新数据
|
||||||
WatchJsonFile(usJsonPath);
|
|
||||||
WatchJsonFile(cnJsonPath);
|
|
||||||
|
|
||||||
}
|
if (!File.Exists(usJsonPath)|| !File.Exists(cnJsonPath))
|
||||||
|
|
||||||
public void WatchJsonFile(string filePath)
|
|
||||||
{
|
|
||||||
if (!File.Exists(filePath))
|
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(StaticData.International("IRaCISCHangfireJob_FileNotFound"));
|
throw new BusinessValidationFailedException(StaticData.International("IRaCISCHangfireJob_FileNotFound"));
|
||||||
}
|
}
|
||||||
|
|
||||||
FileSystemWatcher watcher = new FileSystemWatcher(Path.GetDirectoryName(filePath), Path.GetFileName(filePath));
|
FileSystemWatcher_US = new FileSystemWatcher
|
||||||
watcher.Changed += (sender, e) => LoadJsonFile(filePath);
|
{
|
||||||
watcher.EnableRaisingEvents = true;
|
Path = Path.GetDirectoryName(usJsonPath)!,
|
||||||
|
NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size,
|
||||||
|
Filter = Path.GetFileName(usJsonPath),
|
||||||
|
EnableRaisingEvents = true,
|
||||||
|
|
||||||
|
};
|
||||||
|
// 添加文件更改事件的处理程序
|
||||||
|
FileSystemWatcher_US.Changed += (sender, e) => LoadJsonFile(usJsonPath);
|
||||||
|
|
||||||
|
|
||||||
|
FileSystemWatcher_CN = new FileSystemWatcher
|
||||||
|
{
|
||||||
|
Path = Path.GetDirectoryName(cnJsonPath)!,
|
||||||
|
NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size,
|
||||||
|
Filter = Path.GetFileName(cnJsonPath),
|
||||||
|
EnableRaisingEvents = true,
|
||||||
|
|
||||||
|
};
|
||||||
|
FileSystemWatcher_CN.Changed += (sender, e) => LoadJsonFile(cnJsonPath);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void LoadJsonFile(string filePath)
|
private void LoadJsonFile(string filePath)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("刷新json内存数据");
|
||||||
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath);
|
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath,false,true);
|
||||||
|
|
||||||
IConfigurationRoot enConfiguration = builder.Build();
|
IConfigurationRoot enConfiguration = builder.Build();
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
|
|||||||
|
|
||||||
public async Task OnAuthorizationAsync(AuthorizationFilterContext context)
|
public async Task OnAuthorizationAsync(AuthorizationFilterContext context)
|
||||||
{
|
{
|
||||||
|
var minutes = _verifyConfig.CurrentValue.AutoLoginOutMinutes;
|
||||||
|
|
||||||
if (_verifyConfig.CurrentValue.OpenLoginLimit)
|
if (_verifyConfig.CurrentValue.OpenLoginLimit)
|
||||||
{
|
{
|
||||||
if (context.ActionDescriptor.EndpointMetadata.Any(item => item is IAllowAnonymous))
|
if (context.ActionDescriptor.EndpointMetadata.Any(item => item is IAllowAnonymous))
|
||||||
@@ -58,22 +60,45 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
|
|||||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["LimitUser_AuthTokenMissing"]));
|
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["LimitUser_AuthTokenMissing"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//2、在这里取缓存 进行比较 看是否有其他人进行了登陆,如果其他人登陆了,就把之前用户挤掉
|
//2、在这里取缓存 进行比较 看是否有其他人进行了登陆,如果其他人登陆了,就把之前用户挤掉
|
||||||
var cacheUserToken = (await _provider.GetAsync<string>(_userInfo.Id.ToString())).Value;
|
var cacheUserToken = (await _provider.GetAsync<string>(_userInfo.Id.ToString())).Value;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//缓存中没有取到Token
|
//缓存中没有取到Token
|
||||||
if (string.IsNullOrWhiteSpace(cacheUserToken))
|
if (string.IsNullOrWhiteSpace(cacheUserToken))
|
||||||
{
|
{
|
||||||
|
cacheUserToken = _userInfo.UserToken;
|
||||||
|
|
||||||
//设置当前用户最新Token
|
//设置当前用户最新Token
|
||||||
await _provider.SetAsync(_userInfo.Id.ToString(), _userInfo.UserToken, TimeSpan.FromDays(7));
|
await _provider.SetAsync(_userInfo.Id.ToString(), _userInfo.UserToken, TimeSpan.FromDays(7));
|
||||||
|
|
||||||
cacheUserToken = _userInfo.UserToken;
|
//重启应用程序,所有人续期,不一下子踢出所有人
|
||||||
|
await _provider.SetAsync($"{_userInfo.Id.ToString()}_Online", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes));
|
||||||
|
|
||||||
}
|
}
|
||||||
//是同一个人
|
//是同一个人
|
||||||
else if (cacheUserToken == _userInfo.UserToken)
|
else if (cacheUserToken == _userInfo.UserToken)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var cacheTime = (await _provider.GetAsync<string>($"{_userInfo.Id.ToString()}_Online")).Value;
|
||||||
|
|
||||||
|
//过期了 需要自动退出
|
||||||
|
if (string.IsNullOrEmpty(cacheTime))
|
||||||
|
{
|
||||||
|
context.HttpContext.Response.ContentType = "application/json";
|
||||||
|
context.HttpContext.Response.StatusCode = StatusCodes.Status403Forbidden;
|
||||||
|
|
||||||
|
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["LimitUser_AccountAuto_LoginOut"], ApiResponseCodeEnum.AutoLoginOut));
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _provider.SetAsync($"{_userInfo.Id.ToString()}_Online", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ namespace IRaCIS.Core.Application.Filter
|
|||||||
|
|
||||||
if (context.Exception.GetType() == typeof(BusinessValidationFailedException))
|
if (context.Exception.GetType() == typeof(BusinessValidationFailedException))
|
||||||
{
|
{
|
||||||
context.Result = new JsonResult(ResponseOutput.NotOk(context.Exception.Message,ApiResponseCodeEnum.BusinessValidationFailed));
|
var error = context.Exception as BusinessValidationFailedException;
|
||||||
|
|
||||||
|
context.Result = new JsonResult(ResponseOutput.NotOk(context.Exception.Message, error!.Code));
|
||||||
}
|
}
|
||||||
else if(context.Exception.GetType() == typeof(QueryBusinessObjectNotExistException))
|
else if(context.Exception.GetType() == typeof(QueryBusinessObjectNotExistException))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Helper
|
||||||
|
{
|
||||||
|
public static class EmailMaskHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
//显示位数:3分之2的位数,向上取整
|
||||||
|
//取哪几个个值:最后一位和前面几位
|
||||||
|
//其他:3个***。
|
||||||
|
//比如:hlj23@126.com
|
||||||
|
//为:hlj***3@126.com
|
||||||
|
|
||||||
|
//he@126.com
|
||||||
|
//为:h*** e@126.com
|
||||||
|
|
||||||
|
public static string MaskEmail(string email)
|
||||||
|
{
|
||||||
|
|
||||||
|
// 找到 "@" 符号的位置
|
||||||
|
int atIndex = email.IndexOf('@');
|
||||||
|
|
||||||
|
string visiblePartBefore = email.Substring(0, atIndex);
|
||||||
|
|
||||||
|
string afterAt = email.Substring(atIndex + 1);
|
||||||
|
|
||||||
|
int visibleLength = (int)Math.Ceiling((double)visiblePartBefore.Length * 2 / 3);
|
||||||
|
|
||||||
|
// 替换中间两位字符为星号
|
||||||
|
string hiddenPartBeforeAt = visiblePartBefore.Substring(0, visibleLength - 1) + "***" + visiblePartBefore.Last();
|
||||||
|
|
||||||
|
|
||||||
|
// 组合隐藏和可见部分
|
||||||
|
string hiddenEmail = hiddenPartBeforeAt + "@" + afterAt;
|
||||||
|
|
||||||
|
return hiddenEmail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,6 @@ using IRaCIS.Application.Contracts;
|
|||||||
using IRaCIS.Application.Interfaces;
|
using IRaCIS.Application.Interfaces;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using Magicodes.ExporterAndImporter.Excel;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using MiniExcelLibs;
|
using MiniExcelLibs;
|
||||||
@@ -14,7 +13,6 @@ using Newtonsoft.Json;
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NPOI.HSSF.UserModel;
|
using NPOI.HSSF.UserModel;
|
||||||
using NPOI.XSSF.UserModel;
|
using NPOI.XSSF.UserModel;
|
||||||
using SkiaSharp;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
@@ -342,7 +340,7 @@ public static class ExcelExportHelper
|
|||||||
IgnoreTemplateParameterMissing = true,
|
IgnoreTemplateParameterMissing = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
await MiniExcel.SaveAsByTemplateAsync(memoryStream, tplPath, translateData, config);
|
await MiniExcel.SaveAsByTemplateAsync(memoryStream, templateStream.ToArray(), translateData, config);
|
||||||
|
|
||||||
memoryStream.Seek(0, SeekOrigin.Begin);
|
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
|
|||||||
@@ -515,18 +515,18 @@ public static class FileStoreHelper
|
|||||||
|
|
||||||
// 获取 入组确认 PD 进展发送邮件Word|PDF 存放路径
|
// 获取 入组确认 PD 进展发送邮件Word|PDF 存放路径
|
||||||
|
|
||||||
public static (string PhysicalPath, string RelativePath, string FileRealName) GetSubjectEnrollConfirmOrPDEmailPath(IWebHostEnvironment _hostEnvironment, string fileName, Guid trialId, Guid siteId, Guid subjectId,bool isChangeToPdfFormat=false)
|
public static (string PhysicalPath, string RelativePath, string FileRealName) GetSubjectEnrollConfirmOrPDEmailPath(IWebHostEnvironment _hostEnvironment, string fileName, Guid trialId, Guid trialSiteId, Guid subjectId,bool isChangeToPdfFormat=false)
|
||||||
{
|
{
|
||||||
var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||||
|
|
||||||
string uploadFolderPath = Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(), siteId.ToString(), subjectId.ToString());
|
string uploadFolderPath = Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(), trialSiteId.ToString(), subjectId.ToString());
|
||||||
|
|
||||||
if (!Directory.Exists(uploadFolderPath)) Directory.CreateDirectory(uploadFolderPath);
|
if (!Directory.Exists(uploadFolderPath)) Directory.CreateDirectory(uploadFolderPath);
|
||||||
|
|
||||||
var (trustedFileNameForFileStorage, fileRealName) = FileStoreHelper.GetStoreFileName(fileName, isChangeToPdfFormat);
|
var (trustedFileNameForFileStorage, fileRealName) = FileStoreHelper.GetStoreFileName(fileName, isChangeToPdfFormat);
|
||||||
|
|
||||||
|
|
||||||
var relativePath = $"/{StaticData.Folder.IRaCISDataFolder}/{StaticData.Folder.TrialDataFolder}/{trialId}/{siteId}/{subjectId}/{trustedFileNameForFileStorage}";
|
var relativePath = $"/{StaticData.Folder.IRaCISDataFolder}/{StaticData.Folder.TrialDataFolder}/{trialId}/{trialSiteId}/{subjectId}/{trustedFileNameForFileStorage}";
|
||||||
|
|
||||||
var serverFilePath = Path.Combine(uploadFolderPath, trustedFileNameForFileStorage);
|
var serverFilePath = Path.Combine(uploadFolderPath, trustedFileNameForFileStorage);
|
||||||
|
|
||||||
@@ -541,7 +541,7 @@ public static class FileStoreHelper
|
|||||||
return Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(), siteId.ToString(), subjectId.ToString(), subjectVisitId.ToString(), StaticData.Folder.DicomFolder);
|
return Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(), siteId.ToString(), subjectId.ToString(), subjectVisitId.ToString(), StaticData.Folder.DicomFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static (string PhysicalPath, string RelativePath) GetDicomInstanceFilePath(IWebHostEnvironment _hostEnvironment, Guid trialId, Guid siteId, Guid subjectId, Guid subjectVisitId, Guid studyId, Guid instanceId)
|
public static (string PhysicalPath, string RelativePath) GetDicomInstanceFilePath(IWebHostEnvironment _hostEnvironment, Guid trialId, Guid subjectId, Guid subjectVisitId, Guid studyId, Guid instanceId)
|
||||||
{
|
{
|
||||||
#region 切换存储前
|
#region 切换存储前
|
||||||
//var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
//var rootPath = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||||
@@ -552,7 +552,7 @@ public static class FileStoreHelper
|
|||||||
|
|
||||||
//加入访视层级 和Data
|
//加入访视层级 和Data
|
||||||
var path = Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(),
|
var path = Path.Combine(rootPath, StaticData.Folder.TrialDataFolder, trialId.ToString(),
|
||||||
siteId.ToString(), subjectId.ToString(), subjectVisitId.ToString(), StaticData.Folder.DicomFolder, studyId.ToString());
|
subjectId.ToString(), subjectVisitId.ToString(), StaticData.Folder.DicomFolder, studyId.ToString());
|
||||||
|
|
||||||
if (!Directory.Exists(path))
|
if (!Directory.Exists(path))
|
||||||
{
|
{
|
||||||
@@ -561,7 +561,7 @@ public static class FileStoreHelper
|
|||||||
|
|
||||||
var physicalPath = Path.Combine(path, instanceId.ToString() );
|
var physicalPath = Path.Combine(path, instanceId.ToString() );
|
||||||
|
|
||||||
var relativePath = $"/{StaticData.Folder.IRaCISDataFolder}/{StaticData.Folder.TrialDataFolder}/{trialId}/{siteId}/{subjectId}/{subjectVisitId}/{StaticData.Folder.DicomFolder}/{studyId}/{instanceId}";
|
var relativePath = $"/{StaticData.Folder.IRaCISDataFolder}/{StaticData.Folder.TrialDataFolder}/{trialId}/{subjectId}/{subjectVisitId}/{StaticData.Folder.DicomFolder}/{studyId}/{instanceId}";
|
||||||
|
|
||||||
//var physicalPath = Path.Combine(path, instanceId.ToString() + ".dcm");
|
//var physicalPath = Path.Combine(path, instanceId.ToString() + ".dcm");
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ using System.Linq;
|
|||||||
using System.Security.AccessControl;
|
using System.Security.AccessControl;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using SkiaSharp;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper
|
||||||
{
|
{
|
||||||
@@ -40,6 +39,9 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
public string regionId { get; set; }
|
public string regionId { get; set; }
|
||||||
public string accessKeyId { get; set; }
|
public string accessKeyId { get; set; }
|
||||||
public string accessKeySecret { get; set; }
|
public string accessKeySecret { get; set; }
|
||||||
|
|
||||||
|
public string internalEndpoint { get; set; }
|
||||||
|
|
||||||
public string endPoint { get; set; }
|
public string endPoint { get; set; }
|
||||||
public string bucketName { get; set; }
|
public string bucketName { get; set; }
|
||||||
|
|
||||||
@@ -96,13 +98,15 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
|
|
||||||
public interface IOSSService
|
public interface IOSSService
|
||||||
{
|
{
|
||||||
public Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName);
|
public Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName, bool isFileNameAddGuid = true);
|
||||||
public Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath);
|
public Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath, bool isFileNameAddGuid = true);
|
||||||
|
|
||||||
public Task DownLoadFromOSSAsync(string ossRelativePath, string localFilePath);
|
public Task DownLoadFromOSSAsync(string ossRelativePath, string localFilePath);
|
||||||
|
|
||||||
public ObjectStoreServiceOptions ObjectStoreServiceOptions { get; set; }
|
public ObjectStoreServiceOptions ObjectStoreServiceOptions { get; set; }
|
||||||
|
|
||||||
|
public Task<string> GetSignedUrl(string ossRelativePath);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -122,12 +126,12 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
/// <param name="fileStream"></param>
|
/// <param name="fileStream"></param>
|
||||||
/// <param name="oosFolderPath"></param>
|
/// <param name="oosFolderPath"></param>
|
||||||
/// <param name="fileRealName"></param>
|
/// <param name="fileRealName"></param>
|
||||||
|
/// <param name="isFileNameAddGuid"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName)
|
public async Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName, bool isFileNameAddGuid = true)
|
||||||
{
|
{
|
||||||
|
var ossRelativePath = isFileNameAddGuid ? $"{oosFolderPath}/{Guid.NewGuid()}_{fileRealName}" : $"{oosFolderPath}/{fileRealName}";
|
||||||
|
//var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{fileRealName}";
|
||||||
var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{fileRealName}";
|
|
||||||
//var ossRelativePath = oosFolderPath + "/" + fileRealName;
|
//var ossRelativePath = oosFolderPath + "/" + fileRealName;
|
||||||
|
|
||||||
using (var memoryStream = new MemoryStream())
|
using (var memoryStream = new MemoryStream())
|
||||||
@@ -143,7 +147,7 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
{
|
{
|
||||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
var _ossClient = new OssClient(aliConfig.internalEndpoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -205,11 +209,12 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
/// <param name="oosFolderPath"></param>
|
/// <param name="oosFolderPath"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
public async Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath)
|
public async Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath, bool isFileNameAddGuid = true)
|
||||||
{
|
{
|
||||||
var localFileName = Path.GetFileName(localFilePath);
|
var localFileName = Path.GetFileName(localFilePath);
|
||||||
|
|
||||||
var ossRelativePath = $"{oosFolderPath}/{Guid.NewGuid()}_{localFileName}";
|
var ossRelativePath = isFileNameAddGuid ? $"{oosFolderPath}/{Guid.NewGuid()}_{localFileName}" : $"{oosFolderPath}/{localFileName}";
|
||||||
|
|
||||||
|
|
||||||
//var ossRelativePath = oosFolderPath + "/" + localFileName;
|
//var ossRelativePath = oosFolderPath + "/" + localFileName;
|
||||||
|
|
||||||
@@ -218,7 +223,7 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
{
|
{
|
||||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
var _ossClient = new OssClient(aliConfig.internalEndpoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
var result = _ossClient.PutObject(aliConfig.bucketName, ossRelativePath, localFilePath);
|
var result = _ossClient.PutObject(aliConfig.bucketName, ossRelativePath, localFilePath);
|
||||||
@@ -264,6 +269,7 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task DownLoadFromOSSAsync(string ossRelativePath, string localFilePath)
|
public async Task DownLoadFromOSSAsync(string ossRelativePath, string localFilePath)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -276,7 +282,7 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
{
|
{
|
||||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
var _ossClient = new OssClient(aliConfig.internalEndpoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
// 上传文件
|
// 上传文件
|
||||||
var result = _ossClient.GetObject(aliConfig.bucketName, ossRelativePath);
|
var result = _ossClient.GetObject(aliConfig.bucketName, ossRelativePath);
|
||||||
@@ -337,9 +343,81 @@ namespace IRaCIS.Core.Application.Helper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<string> GetSignedUrl(string ossRelativePath)
|
||||||
|
{
|
||||||
|
ossRelativePath = ossRelativePath.TrimStart('/');
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||||
|
{
|
||||||
|
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||||
|
|
||||||
|
var _ossClient = new OssClient(aliConfig.internalEndpoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||||
|
|
||||||
|
// 生成签名URL。
|
||||||
|
var req = new GeneratePresignedUriRequest(aliConfig.bucketName, ossRelativePath, SignHttpMethod.Get)
|
||||||
|
{
|
||||||
|
// 设置签名URL过期时间,默认值为3600秒。
|
||||||
|
Expiration = DateTime.Now.AddHours(1),
|
||||||
|
};
|
||||||
|
var uri = _ossClient.GeneratePresignedUri(req);
|
||||||
|
|
||||||
|
return uri.PathAndQuery;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
|
||||||
|
{
|
||||||
|
var minIOConfig = ObjectStoreServiceOptions.MinIO;
|
||||||
|
|
||||||
|
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}:{minIOConfig.port}")
|
||||||
|
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
//var reqParams = new Dictionary<string, string>(StringComparer.Ordinal)
|
||||||
|
// {
|
||||||
|
// { "response-content-type", "application/json" }
|
||||||
|
// };
|
||||||
|
|
||||||
|
var args = new PresignedGetObjectArgs()
|
||||||
|
.WithBucket(minIOConfig.bucketName)
|
||||||
|
.WithObject(ossRelativePath)
|
||||||
|
.WithExpiry(3600)
|
||||||
|
/*.WithHeaders(reqParams)*/;
|
||||||
|
|
||||||
|
var presignedUrl = await minioClient.PresignedGetObjectAsync(args);
|
||||||
|
|
||||||
|
Uri uri = new Uri(presignedUrl);
|
||||||
|
|
||||||
|
string relativePath = uri.PathAndQuery;
|
||||||
|
|
||||||
|
|
||||||
|
return relativePath;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||||
|
{
|
||||||
|
var minIOConfig = ObjectStoreServiceOptions.AWS;
|
||||||
|
|
||||||
|
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}")
|
||||||
|
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("未定义的存储介质类型");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
throw new BusinessValidationFailedException("oss授权url失败!" + ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public static class SendEmailHelper
|
|||||||
|
|
||||||
//await smtp.AuthenticateAsync("zhou941003@qq.com", "sqfhlpfdvnexbcab");
|
//await smtp.AuthenticateAsync("zhou941003@qq.com", "sqfhlpfdvnexbcab");
|
||||||
|
|
||||||
await smtp.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.SslOnConnect);
|
await smtp.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.Auto);
|
||||||
|
|
||||||
await smtp.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
|
await smtp.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
|
||||||
|
|
||||||
@@ -40,11 +40,11 @@ public static class SendEmailHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception )
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
||||||
//---邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员
|
//---邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员
|
||||||
throw new Exception(StaticData.International("SendEmail_SendFail"));
|
throw new Exception(StaticData.International("SendEmail_SendFail"),new Exception(ex.Message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ public static class SendEmailHelper
|
|||||||
using (var client = new MailKit.Net.Smtp.SmtpClient())
|
using (var client = new MailKit.Net.Smtp.SmtpClient())
|
||||||
{
|
{
|
||||||
|
|
||||||
await client.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.SslOnConnect);
|
await client.ConnectAsync(_systemEmailConfig.Host, _systemEmailConfig.Port, SecureSocketOptions.Auto);
|
||||||
|
|
||||||
await client.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
|
await client.AuthenticateAsync(_systemEmailConfig.FromEmail, _systemEmailConfig.AuthorizationCode);
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ public static class SendEmailHelper
|
|||||||
|
|
||||||
smtp.ServerCertificateValidationCallback = (s, c, h, e) => true;
|
smtp.ServerCertificateValidationCallback = (s, c, h, e) => true;
|
||||||
|
|
||||||
await smtp.ConnectAsync(sMTPEmailConfig.Host, sMTPEmailConfig.Port, SecureSocketOptions.SslOnConnect);
|
await smtp.ConnectAsync(sMTPEmailConfig.Host, sMTPEmailConfig.Port, SecureSocketOptions.Auto);
|
||||||
|
|
||||||
await smtp.AuthenticateAsync(sMTPEmailConfig.UserName, sMTPEmailConfig.AuthorizationCode);
|
await smtp.AuthenticateAsync(sMTPEmailConfig.UserName, sMTPEmailConfig.AuthorizationCode);
|
||||||
|
|
||||||
|
|||||||
@@ -64,45 +64,44 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||||
<PackageReference Include="FreeSpire.Doc" Version="11.6.0" />
|
<PackageReference Include="FreeSpire.Doc" Version="12.2.0" />
|
||||||
<PackageReference Include="Hangfire.Core" Version="1.8.7" />
|
<PackageReference Include="Hangfire.Core" Version="1.8.12" />
|
||||||
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
||||||
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
||||||
<PackageReference Include="EasyCaching.Redis" Version="1.9.2" />
|
<PackageReference Include="EasyCaching.Redis" Version="1.9.2" />
|
||||||
<PackageReference Include="EasyCaching.InMemory" Version="1.9.2" />
|
<PackageReference Include="EasyCaching.InMemory" Version="1.9.2" />
|
||||||
<PackageReference Include="ExcelDataReader" Version="3.6.0" />
|
<PackageReference Include="ExcelDataReader" Version="3.6.0" />
|
||||||
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
|
<PackageReference Include="ExcelDataReader.DataSet" Version="3.6.0" />
|
||||||
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
|
<PackageReference Include="DistributedLock.Redis" Version="1.0.3" />
|
||||||
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.3" />
|
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.4" />
|
||||||
<PackageReference Include="fo-dicom" Version="5.1.2" />
|
<PackageReference Include="fo-dicom" Version="5.1.2" />
|
||||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.2" />
|
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.2" />
|
||||||
<PackageReference Include="fo-dicom.Codecs" Version="5.11.0" />
|
<PackageReference Include="fo-dicom.Codecs" Version="5.12.0" />
|
||||||
<PackageReference Include="Magicodes.IE.Core" Version="2.7.4.5" />
|
<PackageReference Include="IP2Region.Net" Version="2.0.2" />
|
||||||
<PackageReference Include="Magicodes.IE.Csv" Version="2.7.4.5">
|
<PackageReference Include="MailKit" Version="4.2.0" />
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.5">
|
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Magicodes.IE.Excel.AspNetCore" Version="2.7.4.5" />
|
|
||||||
<PackageReference Include="MailKit" Version="4.3.0" />
|
|
||||||
<PackageReference Include="MediatR" Version="12.2.0" />
|
<PackageReference Include="MediatR" Version="12.2.0" />
|
||||||
<PackageReference Include="MimeKit" Version="4.3.0" />
|
<PackageReference Include="MimeKit" Version="4.2.0" />
|
||||||
<PackageReference Include="MiniExcel" Version="1.31.3" />
|
<PackageReference Include="MiniExcel" Version="1.32.0" />
|
||||||
<PackageReference Include="Minio" Version="6.0.1" />
|
<PackageReference Include="Minio" Version="6.0.2" />
|
||||||
<PackageReference Include="MiniWord" Version="0.7.0" />
|
<PackageReference Include="MiniWord" Version="0.8.0" />
|
||||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.2.0">
|
<PackageReference Include="My.Extensions.Localization.Json" Version="3.3.0">
|
||||||
<TreatAsUsed>true</TreatAsUsed>
|
<TreatAsUsed>true</TreatAsUsed>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NPOI" Version="2.6.2" />
|
<PackageReference Include="NPOI" Version="2.7.0" />
|
||||||
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.1" />
|
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.2" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.2" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.12" />
|
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.2" />
|
||||||
<PackageReference Include="WinSCP" Version="6.1.2" />
|
<PackageReference Include="WinSCP" Version="6.3.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
|
<ProjectReference Include="..\IRaCIS.Core.Infra.EFCore\IRaCIS.Core.Infra.EFCore.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="Resources\ip2region.xdb">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,37 +0,0 @@
|
|||||||
using IRaCIS.Core.Domain.Share;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.ViewModel
|
|
||||||
{
|
|
||||||
public class AllocationVisitViewModel
|
|
||||||
{
|
|
||||||
|
|
||||||
public Guid SubjectVisitId { get; set; }
|
|
||||||
public Guid SubjectId { get; set; }
|
|
||||||
|
|
||||||
public string BlindName { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
public decimal VisitNum { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public Guid SiteId { get; set; }
|
|
||||||
public String TrialSiteCode { get; set; } = String.Empty;
|
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
|
||||||
|
|
||||||
public string VisitName { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
public DateTime? CheckPassedTime { get; set; }
|
|
||||||
|
|
||||||
public bool IsUrgent { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public ReadingCategory ReadingCategoryEnum { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -24,7 +24,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public int? GeneratedSubjectCount { get; set; }
|
public int? GeneratedSubjectCount { get; set; }
|
||||||
|
|
||||||
|
public int? MatchSubejctCount { get; set; }
|
||||||
|
|
||||||
|
public int? CanGeneratedSubejctCount => MatchSubejctCount - GeneratedSubjectCount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,6 +36,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SubjectGeneratedTask
|
||||||
|
{
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
public bool IsHaveGeneratedTask { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class ConsistentQuery : PageInput
|
public class ConsistentQuery : PageInput
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
@@ -46,6 +55,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GroupConsistentSimpleQuery
|
||||||
|
{
|
||||||
|
[NotDefault]
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
[NotDefault]
|
||||||
|
|
||||||
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
|
}
|
||||||
public class GroupConsistentQuery : PageInput
|
public class GroupConsistentQuery : PageInput
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
@@ -56,13 +74,21 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public Guid TrialReadingCriterionId { get; set; }
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ConsistentConfirmGenerateCommand
|
public class SelfConsistentSimpleQuery
|
||||||
{
|
{
|
||||||
|
[NotDefault]
|
||||||
public Guid TaskConsistentRuleId { get; set; }
|
public Guid TaskConsistentRuleId { get; set; }
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid DoctorUserId { get; set; }
|
public Guid DoctorUserId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ConsistentConfirmGenerateCommand: SelfConsistentSimpleQuery
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
public List<Guid> SubejctIdList { get; set; }
|
public List<Guid> SubejctIdList { get; set; }
|
||||||
|
|
||||||
|
public bool IsAutoAllocateGenerateTask { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -70,7 +96,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
[NotDefault]
|
||||||
|
|
||||||
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
public List<Guid> SubejctIdList { get; set; }
|
public List<Guid> SubejctIdList { get; set; }
|
||||||
|
|
||||||
|
public bool IsAutoAllocateGenerateTask { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DoctorSelfConsistentSubjectView: ConsistentCommonView
|
public class DoctorSelfConsistentSubjectView: ConsistentCommonView
|
||||||
@@ -86,7 +118,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public class ConsistentCommonView
|
public class ConsistentCommonView
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public String TrialSiteCode { get; set; }
|
public String TrialSiteCode { get; set; }
|
||||||
public string SubjectCode { get; set; }
|
public string SubjectCode { get; set; }
|
||||||
@@ -105,6 +137,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public List<VisitTaskGroupSimpleDTO> SubjectTaskVisitList => VisitTaskList.GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).Select(g => g.First()).OrderBy(t=>t.VisitTaskNum).ToList();
|
public List<VisitTaskGroupSimpleDTO> SubjectTaskVisitList => VisitTaskList.GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).Select(g => g.First()).OrderBy(t=>t.VisitTaskNum).ToList();
|
||||||
|
|
||||||
public List<VisitTaskGroupSimpleDTO> VisitTaskList { get; set; } = new List<VisitTaskGroupSimpleDTO>();
|
public List<VisitTaskGroupSimpleDTO> VisitTaskList { get; set; } = new List<VisitTaskGroupSimpleDTO>();
|
||||||
|
|
||||||
|
public List<UserSimpleInfo> DoctorUserList { get; set; }=new List<UserSimpleInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class VisitTaskGroupSimpleDTO
|
public class VisitTaskGroupSimpleDTO
|
||||||
@@ -166,31 +200,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//public class DoctorConsistentRuleSubjectView
|
|
||||||
//{
|
|
||||||
// public Guid TrialId => VisitTaskList.Select(t => t.TrialId).First();
|
|
||||||
// public Guid SiteId => VisitTaskList.Select(t => t.SiteId).First();
|
|
||||||
|
|
||||||
// public String TrialSiteCode => VisitTaskList.Select(t => t.TrialSiteCode).First();
|
|
||||||
// public string SubjectCode => VisitTaskList.Select(t => t.SubjectCode).First();
|
|
||||||
|
|
||||||
// public Guid SubjectId { get; set; }
|
|
||||||
|
|
||||||
// public bool IsHaveGeneratedTask { get; set; }
|
|
||||||
// public int? ValidTaskCount { get; set; }
|
|
||||||
|
|
||||||
// public int? ValidVisitCount => VisitTaskList.Select(t => t.TaskName).Distinct().Count();
|
|
||||||
|
|
||||||
// public List<VisitTaskSimpleView> VisitTaskList { get; set; }
|
|
||||||
|
|
||||||
// //public List<UserSimpleInfo> HistoryDoctorUserList => VisitTaskList.SelectMany(t => t.RelationDoctorUserList).DistinctBy(t=>t.UserId).ToList();
|
|
||||||
//}
|
|
||||||
|
|
||||||
public class InfluenceTaskInfo
|
public class InfluenceTaskInfo
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
@@ -233,7 +248,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
@@ -287,6 +302,17 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public class UpdateTrialSiteCodeCommand
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public string VirtualSiteCode { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UpdateTrialSiteCodeCommandView: UpdateTrialSiteCodeCommand
|
||||||
|
{
|
||||||
|
public DateTime Creatime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
///<summary> TaskConsistentRuleAddOrEdit 列表查询参数模型</summary>
|
///<summary> TaskConsistentRuleAddOrEdit 列表查询参数模型</summary>
|
||||||
public class TaskConsistentRuleAddOrEdit
|
public class TaskConsistentRuleAddOrEdit
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
{
|
{
|
||||||
|
|
||||||
public Guid VisitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
public string MedicalNo { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
public int AuditState { get; set; }
|
public int AuditState { get; set; }
|
||||||
public DateTime? AuditSignTime { get; set; }
|
public DateTime? AuditSignTime { get; set; }
|
||||||
@@ -54,7 +53,6 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
//开始读片时间
|
//开始读片时间
|
||||||
public DateTime? FirstReadingTime { get; set; }
|
public DateTime? FirstReadingTime { get; set; }
|
||||||
|
|
||||||
public string MedicalNo { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
//读片时间差
|
//读片时间差
|
||||||
public TimeSpan? ReadingDurationTimeSpan { get; set; }
|
public TimeSpan? ReadingDurationTimeSpan { get; set; }
|
||||||
@@ -71,7 +69,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
{
|
{
|
||||||
if (!ReadingDurationTimeSpan.HasValue)
|
if (!ReadingDurationTimeSpan.HasValue)
|
||||||
return "";
|
return "";
|
||||||
else return string.Format("{0}d {1}h {2}min", (SignTime - FirstReadingTime)?.Days, (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes)
|
else return string.Format("{0}h:{1}m:{2}s", (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes, (SignTime - FirstReadingTime)?.Seconds)
|
||||||
/*string.Format("{0}分钟", (ReadingDurationTimeSpan)?.TotalMinutes)*/;
|
/*string.Format("{0}分钟", (ReadingDurationTimeSpan)?.TotalMinutes)*/;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,10 +93,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public class TaskMedicalReviewQuery : PageInput
|
public class TaskMedicalReviewQuery : PageInput
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? TrialSiteId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 传了Id 就不查询这条数据
|
/// 传了Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
@@ -113,7 +111,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public bool IsGetBeRead { get; set; } = false;
|
public bool IsGetBeRead { get; set; } = false;
|
||||||
|
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
public bool IsGetNextMedicalReviewTask { get; set; } = false;
|
||||||
|
|
||||||
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
public string TrialSiteCode { get; set; } = String.Empty;
|
public string TrialSiteCode { get; set; } = String.Empty;
|
||||||
public string TaskName { get; set; } = String.Empty;
|
public string TaskName { get; set; } = String.Empty;
|
||||||
@@ -134,7 +134,19 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public Guid? TrialReadingCriterionId { get; set; }
|
public Guid? TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
public MedicalReviewDoctorUserIdea? DoctorUserIdeaEnum { get; set; }
|
public MedicalReviewDoctorUserIdea? DoctorUserIdeaEnum { get; set; }
|
||||||
}
|
|
||||||
|
public Arm? ArmEnum { get; set; }
|
||||||
|
|
||||||
|
public DateTime? BeginAuditSignTime { get; set; }
|
||||||
|
public DateTime? EndAuditSignTime { get; set; }
|
||||||
|
|
||||||
|
public bool? IsEffect { get; set; }
|
||||||
|
public bool? IsHaveQuestion { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime? BeginAllocateDate { get; set; }
|
||||||
|
public DateTime? EndAllocateDate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class SetMedicalReviewInvalidCommand
|
public class SetMedicalReviewInvalidCommand
|
||||||
|
|||||||
@@ -54,10 +54,16 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public Guid UpdateUserId { get; set; }
|
public Guid UpdateUserId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
|
public string BlindTrialSiteCode { get; set; }
|
||||||
public String TrialSiteCode { get; set; } = String.Empty;
|
public String TrialSiteCode { get; set; } = String.Empty;
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public string MedicalNo { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string BlindSubjectCode { get; set; } = string.Empty;
|
||||||
|
|
||||||
public bool IsPMSetBack { get; set; }
|
public bool IsPMSetBack { get; set; }
|
||||||
|
|
||||||
#region 标准配置
|
#region 标准配置
|
||||||
@@ -86,7 +92,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 任务展示访视 读片任务显示是否顺序
|
/// 任务展示访视 读片任务显示是否顺序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsReadingTaskViewInOrder { get; set; } = true;
|
public ReadingOrder IsReadingTaskViewInOrder { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -150,7 +156,18 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public bool IsCanEditUrgentState { get; set; }
|
public bool IsCanEditUrgentState { get; set; }
|
||||||
|
|
||||||
|
public DateTime? FirstReadingTime { get;set; }
|
||||||
|
|
||||||
|
public string ReadingDuration
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!SignTime.HasValue)
|
||||||
|
return "";
|
||||||
|
else return string.Format("{0}h:{1}m:{2}s", (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes, (SignTime - FirstReadingTime)?.Seconds)
|
||||||
|
/*string.Format("{0}分钟", (ReadingDurationTimeSpan)?.TotalMinutes)*/;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UserSimpleInfo
|
public class UserSimpleInfo
|
||||||
@@ -353,16 +370,16 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class GetOrderReadingIQueryableInDto
|
public class GetReadingIQueryableInDto:PageInput
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public Guid TrialReadingCriterionId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
public string? SubjectCode { get; set; } = null;
|
public string? SubjectCode { get; set; } = null;
|
||||||
|
|
||||||
public PageInput? Page { get; set; } = null;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class VisitTaskQuery : PageInput
|
public class VisitTaskQuery : PageInput
|
||||||
@@ -371,7 +388,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
@@ -393,11 +410,16 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public DateTime? EndAllocateDate { get; set; }
|
public DateTime? EndAllocateDate { get; set; }
|
||||||
|
|
||||||
public DateTime? BeginSignTime { get; set; }
|
|
||||||
|
|
||||||
|
public DateTime? BeginSignTime { get; set; }
|
||||||
|
|
||||||
public DateTime? EndSignTime { get; set; }
|
public DateTime? EndSignTime { get; set; }
|
||||||
|
|
||||||
public Guid? RootReReadingTaskId { get; set; }
|
public DateTime? BeginRequestReReadingTime { get; set; }
|
||||||
|
public DateTime? EndRequestReReadingTime { get; set; }
|
||||||
|
|
||||||
|
public Guid? RootReReadingTaskId { get; set; }
|
||||||
|
|
||||||
public string? TaskCode { get; set; }
|
public string? TaskCode { get; set; }
|
||||||
|
|
||||||
@@ -418,6 +440,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public RequestReReadingResult? RequestReReadingResultEnum { get; set; }
|
public RequestReReadingResult? RequestReReadingResultEnum { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public bool? IsEffect { get; set; }
|
||||||
|
|
||||||
|
public string? RequestReReadingReason { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -473,7 +499,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
@@ -495,7 +521,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
@@ -504,6 +530,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
public int? SubjectAllocateState { get; set; }
|
||||||
|
|
||||||
|
public List<Arm> ArmList { get; set; }=new List<Arm>() { };
|
||||||
|
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialReadingCriterionId { get; set; }
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
@@ -535,7 +564,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public class SubjectAssignStat
|
public class SubjectAssignStat
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
@@ -615,7 +644,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public class SubjectAssignView
|
public class SubjectAssignView
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
Task<IResponseOutput> ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService);
|
Task<IResponseOutput> ConfirmReReading(ConfirmReReadingCommand agreeReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService);
|
||||||
|
|
||||||
Task<(int, List<IRUnReadSubjectView>)> GetOrderReadingIQueryable(GetOrderReadingIQueryableInDto inDto);
|
Task<PageOutput<IRUnReadSubjectView>> GetSubjectReadingIQueryable(GetReadingIQueryableInDto inDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,9 +116,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
// return ResponseOutput.Ok();
|
// return ResponseOutput.Ok();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public async Task<List<SubjectCancelDoctorView>> GetSubjectCancelDoctorHistoryList(Guid subjectId)
|
public async Task<List<SubjectCancelDoctorView>> GetSubjectCancelDoctorHistoryList(Guid subjectId,Guid trialReadingCriterionId)
|
||||||
{
|
{
|
||||||
var list = await _subjectCanceDoctorRepository.Where(t => t.SubjectId == subjectId).ProjectTo<SubjectCancelDoctorView>(_mapper.ConfigurationProvider).ToListAsync();
|
var list = await _subjectCanceDoctorRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId==trialReadingCriterionId).ProjectTo<SubjectCancelDoctorView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ using System.Linq;
|
|||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
@@ -32,9 +35,16 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
private readonly IRepository<Subject> _subjectRepository;
|
private readonly IRepository<Subject> _subjectRepository;
|
||||||
private readonly IRepository<Enroll> _enrollRepository;
|
private readonly IRepository<Enroll> _enrollRepository;
|
||||||
private readonly IDistributedLockProvider _distributedLockProvider;
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
|
private readonly IRepository<TrialSite> _trialSiteRepository;
|
||||||
|
|
||||||
|
private readonly IRepository<TrialVirtualSiteCodeUpdate> _trialVirtualSiteCodeUpdateRepository;
|
||||||
|
|
||||||
|
private readonly IVisitTaskHelpeService _visitTaskCommonService;
|
||||||
|
|
||||||
|
|
||||||
public TaskConsistentRuleService(IRepository<VisitTask> visitTaskRepository, IRepository<Enroll> enrollRepository, IRepository<TaskConsistentRule> taskConsistentRuleRepository, IRepository<SubjectUser> subjectUserRepository, IRepository<Subject> subjectRepository, IDistributedLockProvider distributedLockProvider)
|
public TaskConsistentRuleService(IRepository<VisitTask> visitTaskRepository, IRepository<Enroll> enrollRepository, IRepository<TaskConsistentRule> taskConsistentRuleRepository, IRepository<SubjectUser> subjectUserRepository, IRepository<Subject> subjectRepository, IDistributedLockProvider distributedLockProvider,
|
||||||
|
IRepository<Trial> trialRepository, IRepository<TrialSite> trialSiteRepository, IRepository<TrialVirtualSiteCodeUpdate> trialVirtualSiteCodeUpdateRepository, IVisitTaskHelpeService visitTaskCommonService)
|
||||||
{
|
{
|
||||||
_taskConsistentRuleRepository = taskConsistentRuleRepository;
|
_taskConsistentRuleRepository = taskConsistentRuleRepository;
|
||||||
_visitTaskRepository = visitTaskRepository;
|
_visitTaskRepository = visitTaskRepository;
|
||||||
@@ -42,6 +52,14 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
_subjectRepository = subjectRepository;
|
_subjectRepository = subjectRepository;
|
||||||
_enrollRepository = enrollRepository;
|
_enrollRepository = enrollRepository;
|
||||||
_distributedLockProvider = distributedLockProvider;
|
_distributedLockProvider = distributedLockProvider;
|
||||||
|
|
||||||
|
_trialRepository = trialRepository;
|
||||||
|
|
||||||
|
_trialSiteRepository = trialSiteRepository;
|
||||||
|
|
||||||
|
_trialVirtualSiteCodeUpdateRepository = trialVirtualSiteCodeUpdateRepository;
|
||||||
|
|
||||||
|
_visitTaskCommonService = visitTaskCommonService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -54,7 +72,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.Id), u => new VisitTask() { TaskState = TaskState.NotEffect },true);
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.Id), u => new VisitTask() { TaskState = TaskState.Adbandon }, true);
|
||||||
|
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
|
||||||
@@ -69,14 +87,14 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="queryVisitTask"></param>
|
/// <param name="queryVisitTask"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<AnalysisTaskView>> GetAnalysisTaskList(VisitTaskQuery queryVisitTask)
|
public async Task<IResponseOutput<PageOutput<AnalysisTaskView>>> GetAnalysisTaskList(VisitTaskQuery queryVisitTask )
|
||||||
{
|
{
|
||||||
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId)
|
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId)
|
||||||
.Where(t => t.IsAnalysisCreate)
|
.Where(t => t.IsAnalysisCreate)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
@@ -86,19 +104,22 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState)
|
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState)
|
||||||
.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
||||||
.WhereIf(queryVisitTask.ArmEnum != null, t => t.ArmEnum == queryVisitTask.ArmEnum)
|
.WhereIf(queryVisitTask.ArmEnum != null, t => t.ArmEnum == queryVisitTask.ArmEnum)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => (t.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.IsAnalysisCreate) || (t.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.IsAnalysisCreate == false))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => /*(t.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.IsAnalysisCreate) ||*/ (t.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) /*&& t.IsAnalysisCreate == false*/))
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => ((t.Subject.Code.Contains(queryVisitTask.SubjectCode)||t.Subject.MedicalNo.Contains(queryVisitTask.SubjectCode)) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
|
||||||
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
|
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime >= queryVisitTask.BeginAllocateDate)
|
||||||
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime <= queryVisitTask.EndAllocateDate)
|
||||||
|
.WhereIf(queryVisitTask.BeginSignTime != null, t => t.SignTime >= queryVisitTask.BeginSignTime)
|
||||||
|
.WhereIf(queryVisitTask.EndSignTime != null, t => t.SignTime <= queryVisitTask.EndSignTime)
|
||||||
.ProjectTo<AnalysisTaskView>(_mapper.ConfigurationProvider);
|
.ProjectTo<AnalysisTaskView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) };
|
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) };
|
||||||
|
|
||||||
var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray);
|
var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray);
|
||||||
|
|
||||||
//var trialTaskConfig = _repository.Where<Trial>(t => t.Id == queryVisitTask.TrialId).ProjectTo<TrialTaskConfigView>(_mapper.ConfigurationProvider).FirstOrDefault();
|
var trialTaskConfig = _repository.Where<Trial>(t => t.Id == queryVisitTask.TrialId).Select(t => new { IsHaveDoubleReadCriterion=t.TrialReadingCriterionList.Any(t=>t.IsSigned && t.IsConfirm && t.ReadingType==ReadingMethod.Double), t.VitrualSiteCode }).FirstOrDefault();
|
||||||
return pageList;
|
|
||||||
|
return ResponseOutput.Ok(pageList, trialTaskConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -123,13 +144,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// 确认生成自身一致性分析任务
|
/// 确认生成自身一致性分析任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inCommand"></param>
|
/// <param name="inCommand"></param>
|
||||||
/// <param name="_visitTaskCommonService"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
|
||||||
public async Task<IResponseOutput> ConfirmGenerateSelfConsistentTask(ConsistentConfirmGenerateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
public async Task<IResponseOutput> ConfirmGenerateSelfConsistentTask(ConsistentConfirmGenerateCommand inCommand)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -137,6 +157,25 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var doctorUserId = inCommand.DoctorUserId;
|
var doctorUserId = inCommand.DoctorUserId;
|
||||||
var trialReadingCriterionId = filterObj.TrialReadingCriterionId;
|
var trialReadingCriterionId = filterObj.TrialReadingCriterionId;
|
||||||
|
|
||||||
|
//随机分配
|
||||||
|
if (inCommand.IsAutoAllocateGenerateTask)
|
||||||
|
{
|
||||||
|
var subjectList = (await GetSelfConsistentRuleMatchSubjectIdListAsync(new SelfConsistentSimpleQuery() { TaskConsistentRuleId = inCommand.TaskConsistentRuleId, DoctorUserId = inCommand.DoctorUserId })).ToList();
|
||||||
|
|
||||||
|
if (subjectList.Any(t => t.IsHaveGeneratedTask))
|
||||||
|
{
|
||||||
|
//已手动分配,不允许自动分配
|
||||||
|
throw new BusinessValidationFailedException(_localizer["TaskConsistent_NotAllowedGenerate"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subjectList.Count<2 * filterObj.PlanSubjectCount)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["TaskConsistent_NotAllowedGenerate1"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
inCommand.SubejctIdList = GetRandomSubjectIdList(subjectList.Select(t => t.SubjectId).ToList(), filterObj.PlanSubjectCount);
|
||||||
|
}
|
||||||
|
|
||||||
var list = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj, doctorUserId, inCommand.SubejctIdList).ToListAsync();
|
var list = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj, doctorUserId, inCommand.SubejctIdList).ToListAsync();
|
||||||
|
|
||||||
//var (group, query) = GetIQueryableDoctorSelfConsistentRuleSubjectView(filterObj, inCommand.SubejctIdList);
|
//var (group, query) = GetIQueryableDoctorSelfConsistentRuleSubjectView(filterObj, inCommand.SubejctIdList);
|
||||||
@@ -155,9 +194,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var blindSubjectCode = string.Empty;
|
var blindSubjectCode = string.Empty;
|
||||||
|
|
||||||
var subjectTask = _visitTaskRepository.Where(t => t.SubjectId == subject.SubjectId && t.TrialReadingCriterionId==trialReadingCriterionId && t.IsSelfAnalysis == true).OrderByDescending(t => t.BlindSubjectCode).FirstOrDefault();
|
var subjectTask = _visitTaskRepository.Where(t => t.SubjectId == subject.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsSelfAnalysis == true).OrderByDescending(t => t.BlindSubjectCode).FirstOrDefault();
|
||||||
|
|
||||||
if (subjectTask!=null && subjectTask.BlindSubjectCode != String.Empty)
|
if (subjectTask != null && subjectTask.BlindSubjectCode != String.Empty)
|
||||||
{
|
{
|
||||||
blindSubjectCode = subjectTask.BlindSubjectCode;
|
blindSubjectCode = subjectTask.BlindSubjectCode;
|
||||||
}
|
}
|
||||||
@@ -165,11 +204,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
var maxCodeStr = _visitTaskRepository.Where(t => t.TrialId == subject.TrialId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsSelfAnalysis == true).OrderByDescending(t => t.BlindSubjectCode).Select(t => t.BlindSubjectCode).FirstOrDefault();
|
var maxCodeStr = _visitTaskRepository.Where(t => t.TrialId == subject.TrialId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsSelfAnalysis == true).OrderByDescending(t => t.BlindSubjectCode).Select(t => t.BlindSubjectCode).FirstOrDefault();
|
||||||
|
|
||||||
if ( !string.IsNullOrEmpty(maxCodeStr))
|
if (!string.IsNullOrEmpty(maxCodeStr))
|
||||||
{
|
{
|
||||||
int.TryParse(maxCodeStr.Substring(maxCodeStr.Length - filterObj.BlindSubjectNumberOfPlaces), out maxCodeInt);
|
int.TryParse(maxCodeStr.Substring(maxCodeStr.Length - filterObj.BlindSubjectNumberOfPlaces), out maxCodeInt);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blindSubjectCode = filterObj.BlindTrialSiteCode + (maxCodeInt + 1).ToString($"D{filterObj.BlindSubjectNumberOfPlaces}");
|
blindSubjectCode = filterObj.BlindTrialSiteCode + (maxCodeInt + 1).ToString($"D{filterObj.BlindSubjectNumberOfPlaces}");
|
||||||
}
|
}
|
||||||
@@ -190,7 +229,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
var lastTask = (subject.VisitTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
|
var lastTask = (subject.VisitTaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
|
||||||
|
|
||||||
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId &&t.TrialReadingCriterionId==trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
|
var existGlobal = _visitTaskRepository.Where(t => t.SubjectId == lastTask.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum == lastTask.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).ProjectTo<VisitTaskSimpleDTO>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
if (existGlobal == null)
|
if (existGlobal == null)
|
||||||
@@ -203,7 +242,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
ReadingCategory = ReadingCategory.Global,
|
ReadingCategory = ReadingCategory.Global,
|
||||||
TaskName = lastTask.TaskName + "_Global",
|
TaskName = lastTask.TaskName + "_Global",
|
||||||
TaskBlindName = lastTask.TaskBlindName + "_Global",
|
TaskBlindName = lastTask.TaskBlindName + "_Global",
|
||||||
TrialReadingCriterionId=trialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionId,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,16 +284,17 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="inQuery"></param>
|
/// <param name="inQuery"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<DoctorGroupConsistentSubjectView>> GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery)
|
public async Task<IResponseOutput<PageOutput<DoctorGroupConsistentSubjectView>> > GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery)
|
||||||
{
|
{
|
||||||
var trialId = inQuery.TrialId;
|
var trialId = inQuery.TrialId;
|
||||||
|
|
||||||
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.TrialReadingCriterionId==inQuery.TrialReadingCriterionId && t.IsSelfAnalysis == false);
|
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis == false);
|
||||||
|
|
||||||
|
|
||||||
if (filterObj == null)
|
if (filterObj == null)
|
||||||
{
|
{
|
||||||
return new PageOutput<DoctorGroupConsistentSubjectView>();
|
object tt = null;
|
||||||
|
return ResponseOutput.Ok(new PageOutput<DoctorGroupConsistentSubjectView>(), new { Rule = tt, IsAllowAutoAllocate = false }) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
var query = await GetGroupConsistentQueryAsync(filterObj);
|
var query = await GetGroupConsistentQueryAsync(filterObj);
|
||||||
@@ -262,7 +302,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var pagedList = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc);
|
var pagedList = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
return pagedList;
|
var rule = await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == false && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo<TaskConsistentRuleBasic>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
var list = await GetGroupConsistentRuleMatchSubjectIdListAsync(new GroupConsistentSimpleQuery() { TrialId = inQuery.TrialId, TrialReadingCriterionId = inQuery.TrialReadingCriterionId });
|
||||||
|
|
||||||
|
var isAllowAutoAllocate = !list.Any(t => t.IsHaveGeneratedTask) && list.Count() > 2*(rule?.PlanSubjectCount??0);
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(pagedList, new {Rule=rule, IsAllowAutoAllocate = isAllowAutoAllocate });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -271,26 +317,46 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// 确认生成组间一致性分析任务
|
/// 确认生成组间一致性分析任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inCommand"></param>
|
/// <param name="inCommand"></param>
|
||||||
/// <param name="_visitTaskCommonService"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
|
||||||
public async Task<IResponseOutput> ConfirmGenerateGroupConsistentTask(GroupConsistentConfirmGenrateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
public async Task<IResponseOutput> ConfirmGenerateGroupConsistentTask(GroupConsistentConfirmGenrateCommand inCommand)
|
||||||
{
|
{
|
||||||
var trialId = inCommand.TrialId;
|
var trialId = inCommand.TrialId;
|
||||||
|
|
||||||
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.IsSelfAnalysis == false);
|
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.TrialReadingCriterionId == inCommand.TrialReadingCriterionId && t.IsSelfAnalysis == false);
|
||||||
|
|
||||||
var trialReadingCriterionId = filterObj.TrialReadingCriterionId;
|
var trialReadingCriterionId = filterObj.TrialReadingCriterionId;
|
||||||
|
|
||||||
|
//随机分配
|
||||||
|
if (inCommand.IsAutoAllocateGenerateTask)
|
||||||
|
{
|
||||||
|
var subjectSelectList = (await GetGroupConsistentRuleMatchSubjectIdListAsync(new GroupConsistentSimpleQuery() { TrialId = inCommand.TrialId, TrialReadingCriterionId = inCommand.TrialReadingCriterionId })).ToList();
|
||||||
|
|
||||||
|
if (subjectSelectList.Any(t => t.IsHaveGeneratedTask))
|
||||||
|
{
|
||||||
|
//已手动分配过,不允许自动分配
|
||||||
|
throw new BusinessValidationFailedException(_localizer["TaskConsistent_NotAllowedGenerate"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subjectSelectList.Count< 2 * filterObj.PlanSubjectCount)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["TaskConsistent_NotAllowedGenerate1"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
inCommand.SubejctIdList = GetRandomSubjectIdList(subjectSelectList.Select(t => t.SubjectId).ToList(), filterObj.PlanSubjectCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var query = await GetGroupConsistentQueryAsync(filterObj, inCommand.SubejctIdList);
|
var query = await GetGroupConsistentQueryAsync(filterObj, inCommand.SubejctIdList);
|
||||||
|
|
||||||
var subjectList = query.ToList();
|
var subjectList = query.ToList();
|
||||||
|
|
||||||
var doctorUserIdQuery = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId).Where(t => t.EnrollReadingCategoryList.Where(t=>t.TrialReadingCriterionId==trialReadingCriterionId).Any(c => c.ReadingCategory == ReadingCategory.Global || c.ReadingCategory == ReadingCategory.Visit))
|
var doctorUserIdQuery = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId).Where(t => t.EnrollReadingCategoryList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(c => c.ReadingCategory == ReadingCategory.Global || c.ReadingCategory == ReadingCategory.Visit))
|
||||||
|
.Where(t => t.EnrollReadingCriteriaList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsJoinAnalysis == true))
|
||||||
join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
||||||
select user.Id;
|
select user.Id;
|
||||||
|
|
||||||
@@ -310,7 +376,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var blindSubjectCode = string.Empty;
|
var blindSubjectCode = string.Empty;
|
||||||
|
|
||||||
var subjectTask = _visitTaskRepository.Where(t => t.SubjectId == subject.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsSelfAnalysis==false).OrderByDescending(t => t.BlindSubjectCode).FirstOrDefault();
|
var subjectTask = _visitTaskRepository.Where(t => t.SubjectId == subject.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsSelfAnalysis == false).OrderByDescending(t => t.BlindSubjectCode).FirstOrDefault();
|
||||||
if (subjectTask != null && subjectTask.BlindSubjectCode != String.Empty)
|
if (subjectTask != null && subjectTask.BlindSubjectCode != String.Empty)
|
||||||
{
|
{
|
||||||
blindSubjectCode = subjectTask.BlindSubjectCode;
|
blindSubjectCode = subjectTask.BlindSubjectCode;
|
||||||
@@ -371,10 +437,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
TrialReadingCriterionId = task.TrialReadingCriterionId,
|
TrialReadingCriterionId = task.TrialReadingCriterionId,
|
||||||
|
|
||||||
BlindSubjectCode=blindSubjectCode,
|
BlindSubjectCode = blindSubjectCode,
|
||||||
BlindTrialSiteCode=filterObj.BlindTrialSiteCode
|
BlindTrialSiteCode = filterObj.BlindTrialSiteCode
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -460,7 +526,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
#region Subejct 维度
|
#region Subejct 维度
|
||||||
|
|
||||||
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && u.TrialReadingCriterionId== trialReadingCriterionId &&
|
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && u.TrialReadingCriterionId == trialReadingCriterionId &&
|
||||||
u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject) && u.DoctorUserId == doctorUserId;
|
u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject) && u.DoctorUserId == doctorUserId;
|
||||||
|
|
||||||
|
|
||||||
@@ -494,16 +560,16 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var query = subjectQuery.Select(t => new DoctorSelfConsistentSubjectView()
|
var query = subjectQuery.Select(t => new DoctorSelfConsistentSubjectView()
|
||||||
{
|
{
|
||||||
TrialId = t.TrialId,
|
TrialId = t.TrialId,
|
||||||
SiteId = t.SiteId,
|
TrialSiteId = t.TrialSiteId,
|
||||||
SubjectCode = t.Code,
|
SubjectCode = t.Code,
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
||||||
SubjectId = t.Id,
|
SubjectId = t.Id,
|
||||||
|
|
||||||
IsReReadingOrBackInfluenceAnalysis=t.IsReReadingOrBackInfluenceAnalysis,
|
IsReReadingOrBackInfluenceAnalysis = t.IsReReadingOrBackInfluenceAnalysis,
|
||||||
|
|
||||||
BlindSubjectCode = t.SubjectVisitTaskList.Where(t => t.IsAnalysisCreate && t.TrialReadingCriterionId == trialReadingCriterionId).OrderByDescending(t => t.BlindSubjectCode).Select(t => t.BlindSubjectCode).FirstOrDefault(),
|
BlindSubjectCode = t.SubjectVisitTaskList.Where(t => t.IsAnalysisCreate && t.TrialReadingCriterionId == trialReadingCriterionId).OrderByDescending(t => t.BlindSubjectCode).Select(t => t.BlindSubjectCode).FirstOrDefault(),
|
||||||
|
|
||||||
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.DoctorUserId == doctorUserId && c.IsSelfAnalysis == true && c.TrialReadingCriterionId==trialReadingCriterionId),
|
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.DoctorUserId == doctorUserId && c.IsSelfAnalysis == true && c.TrialReadingCriterionId == trialReadingCriterionId),
|
||||||
|
|
||||||
|
|
||||||
ValidVisitCount = t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).Count(),
|
ValidVisitCount = t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).Count(),
|
||||||
@@ -526,7 +592,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
TrialReadingCriterionId=c.TrialReadingCriterionId,
|
TrialReadingCriterionId = c.TrialReadingCriterionId,
|
||||||
IsClinicalDataSign = c.IsClinicalDataSign,
|
IsClinicalDataSign = c.IsClinicalDataSign,
|
||||||
IsNeedClinicalDataSign = c.IsNeedClinicalDataSign,
|
IsNeedClinicalDataSign = c.IsNeedClinicalDataSign,
|
||||||
|
|
||||||
@@ -564,7 +630,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组间一致性分析 满足条件的subject 筛选
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filterObj"></param>
|
||||||
|
/// <param name="subejctIdList"></param>
|
||||||
|
/// <returns></returns>
|
||||||
private async Task<IQueryable<DoctorGroupConsistentSubjectView>> GetGroupConsistentQueryAsync(TaskConsistentRule filterObj, List<Guid>? subejctIdList = null)
|
private async Task<IQueryable<DoctorGroupConsistentSubjectView>> GetGroupConsistentQueryAsync(TaskConsistentRule filterObj, List<Guid>? subejctIdList = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -575,7 +646,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && u.TrialReadingCriterionId == trialReadingCriterionId
|
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && u.TrialReadingCriterionId == trialReadingCriterionId
|
||||||
&& (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject);
|
&& (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject);
|
||||||
|
|
||||||
|
|
||||||
@@ -616,14 +687,21 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var query = subjectQuery.Select(t => new DoctorGroupConsistentSubjectView()
|
var query = subjectQuery.Select(t => new DoctorGroupConsistentSubjectView()
|
||||||
{
|
{
|
||||||
TrialId = t.TrialId,
|
TrialId = t.TrialId,
|
||||||
SiteId = t.SiteId,
|
TrialSiteId = t.TrialSiteId,
|
||||||
SubjectCode = t.Code,
|
SubjectCode = t.Code,
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
||||||
SubjectId = t.Id,
|
SubjectId = t.Id,
|
||||||
IsReReadingOrBackInfluenceAnalysis = t.IsReReadingOrBackInfluenceAnalysis,
|
IsReReadingOrBackInfluenceAnalysis = t.IsReReadingOrBackInfluenceAnalysis,
|
||||||
|
|
||||||
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.IsSelfAnalysis == false && c.TrialReadingCriterionId==trialReadingCriterionId),
|
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.IsSelfAnalysis == false && c.TrialReadingCriterionId == trialReadingCriterionId),
|
||||||
|
|
||||||
|
DoctorUserList = t.SubjectDoctorList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsConfirmed).Select(t => new UserSimpleInfo()
|
||||||
|
{
|
||||||
|
UserId = t.Id,
|
||||||
|
FullName = t.DoctorUser.FullName,
|
||||||
|
UserCode = t.DoctorUser.UserCode,
|
||||||
|
UserName = t.DoctorUser.UserName
|
||||||
|
}).ToList(),
|
||||||
|
|
||||||
ValidVisitCount = t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).Count(),
|
ValidVisitCount = t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).Count(),
|
||||||
|
|
||||||
@@ -663,7 +741,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<TaskConsistentRuleBasic?> GetConsistentRule(TaskConsistentRuleQuery inQuery)
|
public async Task<TaskConsistentRuleBasic?> GetConsistentRule(TaskConsistentRuleQuery inQuery)
|
||||||
{
|
{
|
||||||
return await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == inQuery.IsSelfAnalysis && t.TrialReadingCriterionId==inQuery.TrialReadingCriterionId).ProjectTo<TaskConsistentRuleBasic>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
return await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == inQuery.IsSelfAnalysis && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo<TaskConsistentRuleBasic>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -672,13 +750,23 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="inQuery"></param>
|
/// <param name="inQuery"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<TaskConsistentRuleView>> GetSelfConsistentDoctorStatList(TaskConsistentRuleQuery inQuery)
|
public async Task<IResponseOutput<List<TaskConsistentRuleView>>> GetSelfConsistentDoctorStatList(TaskConsistentRuleQuery inQuery)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var trialId = inQuery.TrialId;
|
var trialId = inQuery.TrialId;
|
||||||
|
|
||||||
var taskConsistentRuleQueryable = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId && t.EnrollStatus==EnrollStatus.ConfirmIntoGroup)
|
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject);
|
||||||
join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
|
||||||
join taskConsistentRule in _repository.Where<TaskConsistentRule>(t => t.TrialId == trialId &&t.TrialReadingCriterionId==inQuery.TrialReadingCriterionId && t.IsSelfAnalysis) on enroll.TrialId equals taskConsistentRule.TrialId
|
//&& u.TrialReadingCriterionId == trialReadingCriterionId &&u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && u.DoctorUserId == doctorUserId;
|
||||||
|
|
||||||
|
Expression<Func<VisitTask, bool>> visitTaskFilter = comonTaskFilter.And(t => t.ReadingCategory == ReadingCategory.Visit);
|
||||||
|
|
||||||
|
|
||||||
|
var taskConsistentRuleQueryable = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId && t.EnrollStatus == EnrollStatus.ConfirmIntoGroup
|
||||||
|
&& t.EnrollReadingCriteriaList.Any(c => c.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && c.IsJoinAnalysis))
|
||||||
|
join user in _repository.Where<User>() on enroll.DoctorUserId equals user.Id
|
||||||
|
join taskConsistentRule in _repository.Where<TaskConsistentRule>(t => t.TrialId == trialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis) on enroll.TrialId equals taskConsistentRule.TrialId
|
||||||
select new TaskConsistentRuleView()
|
select new TaskConsistentRuleView()
|
||||||
{
|
{
|
||||||
Id = taskConsistentRule.Id,
|
Id = taskConsistentRule.Id,
|
||||||
@@ -697,7 +785,20 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
IsHaveReadingPeriod = taskConsistentRule.IsHaveReadingPeriod,
|
IsHaveReadingPeriod = taskConsistentRule.IsHaveReadingPeriod,
|
||||||
PlanVisitCount = taskConsistentRule.PlanVisitCount,
|
PlanVisitCount = taskConsistentRule.PlanVisitCount,
|
||||||
|
|
||||||
GeneratedSubjectCount = taskConsistentRule.Trial.VisitTaskList.Where(t => t.IsAnalysisCreate && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis == true && t.DoctorUserId == user.Id).Select(t => t.SubjectId).Distinct().Count(),
|
GeneratedSubjectCount = taskConsistentRule.TrialReadingCriterion.VisitTaskList.Where(t => t.IsAnalysisCreate && t.IsSelfAnalysis == true && t.DoctorUserId == user.Id).Select(t => t.SubjectId).Distinct().Count(),
|
||||||
|
|
||||||
|
|
||||||
|
MatchSubejctCount = taskConsistentRule.Trial.SubjectList.AsQueryable()
|
||||||
|
.Where(t => taskConsistentRule.IsHaveReadingPeriod == false ? t.SubjectVisitTaskList.AsQueryable()
|
||||||
|
.Where(visitTaskFilter).Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id)
|
||||||
|
.Count() >= taskConsistentRule.PlanVisitCount :
|
||||||
|
|
||||||
|
t.SubjectVisitTaskList.AsQueryable().Where(comonTaskFilter)
|
||||||
|
.Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id)
|
||||||
|
.Where(t => t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global).OrderBy(t => t.VisitTaskNum).Take(taskConsistentRule.PlanVisitCount + 1).Any(t => t.ReadingCategory == ReadingCategory.Global))
|
||||||
|
.Count(),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AnalysisDoctorUser = new UserSimpleInfo()
|
AnalysisDoctorUser = new UserSimpleInfo()
|
||||||
{
|
{
|
||||||
@@ -724,10 +825,48 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
//var taskConsistentRuleQueryable = _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId)
|
//var taskConsistentRuleQueryable = _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||||
// .ProjectTo<TaskConsistentRuleView>(_mapper.ConfigurationProvider);
|
// .ProjectTo<TaskConsistentRuleView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
return await taskConsistentRuleQueryable.ToListAsync();
|
var list= await taskConsistentRuleQueryable.ToListAsync();
|
||||||
|
|
||||||
|
var rule= await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == true && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo<TaskConsistentRuleBasic>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||||
|
return ResponseOutput.Ok(list, rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[UnitOfWork]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
public async Task<IResponseOutput> UpdateTrialVirtualSiteCode(UpdateTrialSiteCodeCommand inCommand)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_trialSiteRepository.Where(t => t.TrialId == inCommand.TrialId, false, true).Any(t => t.TrialSiteCode == inCommand.VirtualSiteCode))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(_localizer["TaskConsistent_SiteCodeExists"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == inCommand.TrialId);
|
||||||
|
|
||||||
|
var oldCode = trial.VitrualSiteCode;
|
||||||
|
|
||||||
|
trial.VitrualSiteCode = inCommand.VirtualSiteCode;
|
||||||
|
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trial.Id, u => new VisitTask() { BlindTrialSiteCode = inCommand.VirtualSiteCode });
|
||||||
|
|
||||||
|
await _taskConsistentRuleRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trial.Id, u => new TaskConsistentRule() { BlindTrialSiteCode = inCommand.VirtualSiteCode });
|
||||||
|
|
||||||
|
|
||||||
|
await _visitTaskRepository.ExecuteUpdateAsync(t => t.TrialId == trial.Id, s => s.SetProperty(e => e.BlindSubjectCode, u => u.BlindSubjectCode.Replace(oldCode, inCommand.VirtualSiteCode)));
|
||||||
|
|
||||||
|
await _trialVirtualSiteCodeUpdateRepository.AddAsync(new TrialVirtualSiteCodeUpdate() { VirturalSiteCode = inCommand.VirtualSiteCode, TrialId = inCommand.TrialId });
|
||||||
|
|
||||||
|
await _trialRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<List<UpdateTrialSiteCodeCommandView>> GetUpdateVirtualSiteCodeList(Guid trialId)
|
||||||
|
{
|
||||||
|
var list = await _trialVirtualSiteCodeUpdateRepository.Where(t => t.TrialId == trialId).Select(t => new UpdateTrialSiteCodeCommandView() { TrialId = trialId, VirtualSiteCode = t.VirturalSiteCode, Creatime = t.CreateTime }).OrderByDescending(t=>t.Creatime).ToListAsync();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
@@ -737,7 +876,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var verifyExp1 = new EntityVerifyExp<TaskConsistentRule>()
|
var verifyExp1 = new EntityVerifyExp<TaskConsistentRule>()
|
||||||
{
|
{
|
||||||
VerifyExp = t => t.TrialId == addOrEditTaskConsistentRule.TrialId && t.IsSelfAnalysis == addOrEditTaskConsistentRule.IsSelfAnalysis && t.TrialReadingCriterionId==addOrEditTaskConsistentRule.TrialReadingCriterionId,
|
VerifyExp = t => t.TrialId == addOrEditTaskConsistentRule.TrialId && t.IsSelfAnalysis == addOrEditTaskConsistentRule.IsSelfAnalysis && t.TrialReadingCriterionId == addOrEditTaskConsistentRule.TrialReadingCriterionId,
|
||||||
//"已有该项目配置,不允许继续增加"
|
//"已有该项目配置,不允许继续增加"
|
||||||
VerifyMsg = _localizer["TaskConsistent_TaskGenerated"]
|
VerifyMsg = _localizer["TaskConsistent_TaskGenerated"]
|
||||||
};
|
};
|
||||||
@@ -748,6 +887,22 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
return ResponseOutput.NotOk(_localizer["TaskConsistent_MedicalAuditTaskExists"]);
|
return ResponseOutput.NotOk(_localizer["TaskConsistent_MedicalAuditTaskExists"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (_trialSiteRepository.Where(t => t.TrialId == addOrEditTaskConsistentRule.TrialId, false, true).Any(t => t.TrialSiteCode == addOrEditTaskConsistentRule.BlindTrialSiteCode))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(_localizer["TaskConsistent_SiteCodeExists"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == addOrEditTaskConsistentRule.TrialId);
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(trial.VitrualSiteCode))
|
||||||
|
{
|
||||||
|
await _trialVirtualSiteCodeUpdateRepository.AddAsync(new TrialVirtualSiteCodeUpdate() { VirturalSiteCode = addOrEditTaskConsistentRule.BlindTrialSiteCode, TrialId = addOrEditTaskConsistentRule.TrialId });
|
||||||
|
}
|
||||||
|
|
||||||
|
trial.VitrualSiteCode = addOrEditTaskConsistentRule.BlindTrialSiteCode;
|
||||||
|
|
||||||
|
|
||||||
var entity = await _taskConsistentRuleRepository.InsertOrUpdateAsync(addOrEditTaskConsistentRule, true, verifyExp1);
|
var entity = await _taskConsistentRuleRepository.InsertOrUpdateAsync(addOrEditTaskConsistentRule, true, verifyExp1);
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
@@ -762,7 +917,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var config = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.Id == taskConsistentRuleId);
|
var config = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.Id == taskConsistentRuleId);
|
||||||
|
|
||||||
|
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.IsAnalysisCreate && t.TrialId == config.TrialId && t.IsSelfAnalysis == config.IsSelfAnalysis && t.TrialReadingCriterionId==config.TrialReadingCriterionId))
|
if (await _visitTaskRepository.AnyAsync(t => t.IsAnalysisCreate && t.TrialId == config.TrialId && t.IsSelfAnalysis == config.IsSelfAnalysis && t.TrialReadingCriterionId == config.TrialReadingCriterionId))
|
||||||
{
|
{
|
||||||
//"该标准已产生一致性分析任务,不允许删除"
|
//"该标准已产生一致性分析任务,不允许删除"
|
||||||
throw new BusinessValidationFailedException(_localizer["TaskConsistent_SignedTaskCannotBeInvalidated"]);
|
throw new BusinessValidationFailedException(_localizer["TaskConsistent_SignedTaskCannotBeInvalidated"]);
|
||||||
@@ -775,8 +930,65 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取自身一致性分析 符合条件的subject 数组
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inQuery"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<SubjectGeneratedTask>> GetSelfConsistentRuleMatchSubjectIdListAsync(SelfConsistentSimpleQuery inQuery)
|
||||||
|
{
|
||||||
|
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.Id == inQuery.TaskConsistentRuleId);
|
||||||
|
|
||||||
|
var subjectList = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj, inQuery.DoctorUserId).Select(t => new SubjectGeneratedTask() { SubjectId = t.SubjectId, IsHaveGeneratedTask = t.IsHaveGeneratedTask }).ToListAsync();
|
||||||
|
|
||||||
|
return subjectList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取组件一致性分析符合条件的subject 数组
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inQuery"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<SubjectGeneratedTask>> GetGroupConsistentRuleMatchSubjectIdListAsync(GroupConsistentSimpleQuery inQuery)
|
||||||
|
{
|
||||||
|
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == inQuery.TrialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis == false);
|
||||||
|
|
||||||
|
var subjectList = await (await GetGroupConsistentQueryAsync(filterObj)).Select(t => new SubjectGeneratedTask() { SubjectId = t.SubjectId, IsHaveGeneratedTask = t.IsHaveGeneratedTask }).ToListAsync();
|
||||||
|
|
||||||
|
return subjectList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 随机算法,选择指定数量的 subject
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="matchSubjectIdList"></param>
|
||||||
|
/// <param name="countToSelect"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<Guid> GetRandomSubjectIdList(List<Guid> matchSubjectIdList, int countToSelect)
|
||||||
|
{
|
||||||
|
|
||||||
|
// 使用 Fisher-Yates 随机置换算法来选择指定数量的 GUID
|
||||||
|
Random random = new Random();
|
||||||
|
|
||||||
|
for (int i = 0; i < countToSelect; i++)
|
||||||
|
{
|
||||||
|
// 生成一个随机索引
|
||||||
|
int randomIndex = random.Next(i, matchSubjectIdList.Count);
|
||||||
|
|
||||||
|
// 将选中的元素与当前元素交换位置
|
||||||
|
Guid temp = matchSubjectIdList[randomIndex];
|
||||||
|
matchSubjectIdList[randomIndex] = matchSubjectIdList[i];
|
||||||
|
matchSubjectIdList[i] = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
return matchSubjectIdList.Take(countToSelect).ToList();
|
||||||
|
|
||||||
|
// 使用洗牌算法来随机选择指定数量的GUID
|
||||||
|
//Random random = new Random();
|
||||||
|
//return matchSubjectIdList.OrderBy(g => random.Next()).Take(countToSelect).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,11 +67,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
public async Task<IResponseOutput> DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId)
|
public async Task<IResponseOutput> DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(await _taskMedicalReviewRuleRepository.Where(t=>t.Id== taskMedicalReviewRuleId).AnyAsync(t => t.TaskMedicalReviewList.Any()))
|
//if(await _taskMedicalReviewRuleRepository.Where(t=>t.Id== taskMedicalReviewRuleId).AnyAsync(t => t.TaskMedicalReviewList.Any()))
|
||||||
{
|
//{
|
||||||
//"已产生医学审核任务"
|
// //"已产生医学审核任务"
|
||||||
return ResponseOutput.NotOk(_localizer["TaskMedicalRule_TaskStarted"]);
|
// return ResponseOutput.NotOk(_localizer["TaskMedicalRule_TaskStarted"]);
|
||||||
}
|
//}
|
||||||
|
|
||||||
var success = await _taskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskMedicalReviewRuleId,true);
|
var success = await _taskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskMedicalReviewRuleId,true);
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using IRaCIS.Core.Application.ViewModel;
|
|||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
@@ -54,27 +55,39 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
|
|
||||||
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId)
|
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId)
|
||||||
.WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId)
|
|
||||||
|
.WhereIf(inQuery.IsEffect == true, t => t.VisitTask.TaskState == TaskState.Effect || t.VisitTask.TaskState == TaskState.Freeze)
|
||||||
|
.WhereIf(inQuery.IsEffect == false, t => t.VisitTask.TaskState == TaskState.Adbandon || t.VisitTask.TaskState == TaskState.HaveReturned)
|
||||||
|
|
||||||
|
.WhereIf(inQuery.TrialSiteId != null, t => t.VisitTask.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||||
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
||||||
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode) || t.VisitTask.Subject.MedicalNo.Contains(inQuery.SubjectCode))
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode))
|
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
||||||
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
||||||
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
|
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => (t.VisitTask.BlindTrialSiteCode.Contains(inQuery.TrialSiteCode) && t.VisitTask.IsAnalysisCreate) || (t.VisitTask.Subject.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode) && t.VisitTask.IsAnalysisCreate == false))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteCode), t => (t.VisitTask.BlindTrialSiteCode.Contains(inQuery.TrialSiteCode) && t.VisitTask.IsAnalysisCreate) || (t.VisitTask.Subject.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode) && t.VisitTask.IsAnalysisCreate == false))
|
||||||
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
||||||
.WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState)
|
.WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState)
|
||||||
|
.WhereIf(inQuery.ArmEnum != null, t => t.VisitTask.ArmEnum == inQuery.ArmEnum)
|
||||||
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
||||||
.WhereIf(inQuery.MedicalManagerUserId != null, t => t.MedicalManagerUserId == inQuery.MedicalManagerUserId)
|
.WhereIf(inQuery.MedicalManagerUserId != null, t => t.MedicalManagerUserId == inQuery.MedicalManagerUserId)
|
||||||
.WhereIf(inQuery.BeginSignTime != null, t => t.VisitTask.SignTime > inQuery.BeginSignTime)
|
.WhereIf(inQuery.BeginSignTime != null, t => t.VisitTask.SignTime > inQuery.BeginSignTime)
|
||||||
.WhereIf(inQuery.EndSignTime != null, t => t.VisitTask.SignTime < inQuery.EndSignTime!.Value.AddDays(1))
|
.WhereIf(inQuery.EndSignTime != null, t => t.VisitTask.SignTime < inQuery.EndSignTime)
|
||||||
.WhereIf(inQuery.AuditAdviceEnum != null, t => t.AuditAdviceEnum == inQuery.AuditAdviceEnum)
|
.WhereIf(inQuery.AuditAdviceEnum != null, t => t.AuditAdviceEnum == inQuery.AuditAdviceEnum)
|
||||||
|
|
||||||
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
|
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
|
||||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||||
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
.WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid)
|
||||||
|
.WhereIf(inQuery.IsHaveQuestion != null, t => t.IsHaveQuestion == inQuery.IsHaveQuestion)
|
||||||
|
|
||||||
|
.WhereIf(inQuery.BeginAllocateDate != null, t => t.AllocateTime >= inQuery.BeginAllocateDate)
|
||||||
|
.WhereIf(inQuery.EndAllocateDate != null, t => t.AllocateTime <= inQuery.EndAllocateDate)
|
||||||
|
.WhereIf(inQuery.BeginAuditSignTime != null, t => t.AuditSignTime >= inQuery.BeginAuditSignTime)
|
||||||
|
.WhereIf(inQuery.EndAuditSignTime != null, t => t.AuditSignTime <= inQuery.EndAuditSignTime)
|
||||||
|
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TaskMedicalReviewView.Id) : inQuery.SortField, inQuery.Asc);
|
var defalutSortArray = new string[] { nameof(TaskMedicalReviewView.AuditState), nameof(TaskMedicalReviewView.SubjectId), nameof(TaskMedicalReviewView.ArmEnum) , nameof(TaskMedicalReviewView.VisitTaskNum) };
|
||||||
|
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
||||||
|
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
@@ -91,22 +104,25 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId)
|
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||||
.Where(t => t.IsAnalysisCreate == false && (t.TaskState == TaskState.Effect||t.TaskState==TaskState.Freeze) && t.ReadingTaskState == ReadingTaskState.HaveSigned)
|
.Where(t => t.IsAnalysisCreate == false && (t.TaskState == TaskState.Effect||t.TaskState==TaskState.Freeze) && t.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||||
|
|
||||||
.WhereIf(inQuery.SiteId != null, t => t.Subject.SiteId == inQuery.SiteId)
|
.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||||
.WhereIf(inQuery.SubjectId != null, t => t.SubjectId == inQuery.SubjectId)
|
.WhereIf(inQuery.SubjectId != null, t => t.SubjectId == inQuery.SubjectId)
|
||||||
.WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent)
|
.WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent)
|
||||||
.WhereIf(inQuery.DoctorUserId != null, t => t.DoctorUserId == inQuery.DoctorUserId)
|
.WhereIf(inQuery.DoctorUserId != null, t => t.DoctorUserId == inQuery.DoctorUserId)
|
||||||
.WhereIf(inQuery.ReadingCategory != null, t => t.ReadingCategory == inQuery.ReadingCategory)
|
.WhereIf(inQuery.ReadingCategory != null, t => t.ReadingCategory == inQuery.ReadingCategory)
|
||||||
.WhereIf(inQuery.ReadingTaskState != null, t => t.ReadingTaskState == inQuery.ReadingTaskState)
|
.WhereIf(inQuery.ReadingTaskState != null, t => t.ReadingTaskState == inQuery.ReadingTaskState)
|
||||||
.WhereIf(inQuery.IsGeneratedJudge != null, t => t.JudgeVisitTaskId != null)
|
.WhereIf(inQuery.IsGeneratedJudge != null, t => t.JudgeVisitTaskId != null)
|
||||||
.WhereIf(inQuery.IsGlobalHaveUpdate != null, t => t.IsGlobalHaveUpdate == inQuery.IsGlobalHaveUpdate)
|
.WhereIf(inQuery.IsGlobalHaveUpdate != null, t => t.IsGlobalHaveUpdate == inQuery.IsGlobalHaveUpdate)
|
||||||
|
.WhereIf(inQuery.ArmEnum != null, t => t.ArmEnum == inQuery.ArmEnum)
|
||||||
|
|
||||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.TaskName.Contains(inQuery.TaskName) || t.TaskBlindName.Contains(inQuery.TaskName))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.TaskName.Contains(inQuery.TaskName) || t.TaskBlindName.Contains(inQuery.TaskName))
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.Subject.Code.Contains(inQuery.SubjectCode))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.Subject.Code.Contains(inQuery.SubjectCode))
|
||||||
|
|
||||||
|
.WhereIf(inQuery.BeginSignTime != null, t => t.SignTime > inQuery.BeginSignTime)
|
||||||
|
.WhereIf(inQuery.EndSignTime != null, t => t.SignTime < inQuery.EndSignTime)
|
||||||
.ProjectTo<GenerateMedicalReviewTaskView>(_mapper.ConfigurationProvider);
|
.ProjectTo<GenerateMedicalReviewTaskView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var defalutSortArray = new string[] { nameof(TaskMedicalReviewView.IsUrgent) + " desc", nameof(TaskMedicalReviewView.SubjectId) };
|
var defalutSortArray = new string[] { nameof(GenerateMedicalReviewTaskView.IsUrgent) + " desc", nameof(GenerateMedicalReviewTaskView.SubjectId) };
|
||||||
var pageList = await visitTaskQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
var pageList = await visitTaskQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
||||||
|
|
||||||
|
|
||||||
@@ -142,45 +158,53 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<TaskMedicalReviewView> GetNextMedicalReviewTask(GetNextMedicalReviewTaskInDto inDto)
|
public async Task<TaskMedicalReviewView> GetNextMedicalReviewTask(GetNextMedicalReviewTaskInDto inDto)
|
||||||
{
|
{
|
||||||
var medicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.MedicalReviewId).Include(x=>x.VisitTask).FirstNotNullAsync();
|
var medicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.MedicalReviewId).Include(x => x.VisitTask).FirstNotNullAsync();
|
||||||
|
|
||||||
var subjectReview = (await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
|
|
||||||
{
|
|
||||||
|
|
||||||
TrialId = medicalReview.TrialId,
|
|
||||||
IsGetBeRead = true,
|
|
||||||
Id=inDto.MedicalReviewId,
|
|
||||||
SubjectId= medicalReview.VisitTask.SubjectId,
|
|
||||||
TrialReadingCriterionId = medicalReview.VisitTask.TrialReadingCriterionId,
|
|
||||||
PageIndex=1,
|
|
||||||
PageSize=1,
|
|
||||||
})).Data;
|
|
||||||
|
|
||||||
if (subjectReview.CurrentPageData.Count == 1)
|
|
||||||
{
|
|
||||||
return subjectReview.CurrentPageData[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = (await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
|
var data = (await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
|
||||||
{
|
{
|
||||||
|
|
||||||
TrialId = medicalReview.TrialId,
|
TrialId = medicalReview.TrialId,
|
||||||
IsGetBeRead = true,
|
|
||||||
Id = inDto.MedicalReviewId,
|
Id = inDto.MedicalReviewId,
|
||||||
TrialReadingCriterionId = medicalReview.VisitTask.TrialReadingCriterionId,
|
TrialReadingCriterionId = medicalReview.VisitTask.TrialReadingCriterionId,
|
||||||
|
IsGetNextMedicalReviewTask = true,
|
||||||
PageIndex = 1,
|
PageIndex = 1,
|
||||||
PageSize = 1,
|
PageSize = 99999,
|
||||||
})).Data;
|
})).Data;
|
||||||
|
|
||||||
if (data.CurrentPageData.Count == 1)
|
|
||||||
|
if (data.CurrentPageData.Count > 0)
|
||||||
{
|
{
|
||||||
return data.CurrentPageData[0];
|
|
||||||
|
var index = data.CurrentPageData.ToList().FindIndex(x => x.Id == inDto.MedicalReviewId);
|
||||||
|
|
||||||
|
var result = new TaskMedicalReviewView() { };
|
||||||
|
|
||||||
|
if (index+1 == data.CurrentPageData.Count()) // 最后一个
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["MedicalReview_Finish"]);
|
||||||
|
}
|
||||||
|
else if (index == -1 || data.CurrentPageData.Count == 1) // 第一个或者只有一个
|
||||||
|
{
|
||||||
|
if (data.CurrentPageData[0].Id == inDto.MedicalReviewId)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["MedicalReview_Finish"]);
|
||||||
|
}
|
||||||
|
result = data.CurrentPageData[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = data.CurrentPageData.Skip(index + 1).Take(1).First();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_Finish"]);
|
throw new BusinessValidationFailedException(_localizer["MedicalReview_Finish"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,23 +220,47 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
|
|
||||||
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id&&t.VisitTask.TrialReadingCriterionId==inQuery.TrialReadingCriterionId)
|
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id&&t.VisitTask.TrialReadingCriterionId==inQuery.TrialReadingCriterionId)
|
||||||
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
|
||||||
.WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId)
|
.WhereIf(inQuery.IsGetNextMedicalReviewTask,
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode))
|
x=>(
|
||||||
.WhereIf(inQuery.Id != null, t => t.Id != inQuery.Id)
|
!x.IsInvalid&& x.AuditState== MedicalReviewAuditState.Auditing &
|
||||||
|
( x.ReadingMedicalReviewDialogList.Count()!=0&&
|
||||||
|
x.ReadingMedicalReviewDialogList.Count()>0&&
|
||||||
|
x.ReadingMedicalReviewDialogList.OrderByDescending(x=>x.CreateTime).FirstOrDefault().UserTypeEnumInt==(int)UserTypeEnum.IndependentReviewer)
|
||||||
|
) // 审核中最新回复为IR的
|
||||||
|
|| (!x.IsInvalid&& x.AuditState==MedicalReviewAuditState.WaitAudit)
|
||||||
|
||x.Id == inQuery.Id // 这里必须找传入id 因为要找到这条的索引 获取下一条
|
||||||
|
)
|
||||||
|
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
||||||
|
.WhereIf(inQuery.TrialSiteId != null, t => t.VisitTask.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||||
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
||||||
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
||||||
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
|
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
|
||||||
.WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState)
|
.WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState)
|
||||||
|
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode) || t.VisitTask.Subject.MedicalNo.Contains(inQuery.SubjectCode))
|
||||||
|
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
||||||
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
|
.WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId)
|
||||||
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
||||||
.WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState)
|
.WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState)
|
||||||
.WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid)
|
.WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid)
|
||||||
.WhereIf(inQuery.IsGetBeRead,x=>!x.IsInvalid&&x.AuditState!= MedicalReviewAuditState.HaveSigned)
|
.WhereIf(inQuery.IsGetBeRead,x=>!x.IsInvalid&&x.AuditState!= MedicalReviewAuditState.HaveSigned)
|
||||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||||
|
.WhereIf(inQuery.BeginAuditSignTime != null, t => t.AuditSignTime >= inQuery.BeginAuditSignTime)
|
||||||
|
.WhereIf(inQuery.EndAuditSignTime != null, t => t.AuditSignTime <= inQuery.EndAuditSignTime)
|
||||||
|
.WhereIf(inQuery.BeginAllocateDate != null, t => t.AllocateTime >= inQuery.BeginAllocateDate)
|
||||||
|
.WhereIf(inQuery.EndAllocateDate != null, t => t.AllocateTime <= inQuery.EndAllocateDate)
|
||||||
|
|
||||||
|
.WhereIf(inQuery.ArmEnum != null, t => t.VisitTask.ArmEnum == inQuery.ArmEnum)
|
||||||
|
.WhereIf(inQuery.MedicalManagerUserId != null, t => t.MedicalManagerUserId == inQuery.MedicalManagerUserId)
|
||||||
|
.WhereIf(inQuery.BeginSignTime != null, t => t.VisitTask.SignTime > inQuery.BeginSignTime)
|
||||||
|
.WhereIf(inQuery.EndSignTime != null, t => t.VisitTask.SignTime < inQuery.EndSignTime)
|
||||||
|
.WhereIf(inQuery.AuditAdviceEnum != null, t => t.AuditAdviceEnum == inQuery.AuditAdviceEnum)
|
||||||
|
.WhereIf(inQuery.IsHaveQuestion != null, t => t.IsHaveQuestion == inQuery.IsHaveQuestion)
|
||||||
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TaskMedicalReviewView.Id) : inQuery.SortField, inQuery.Asc);
|
|
||||||
|
var defalutSortArray = new string[] { nameof(TaskMedicalReviewView.SubjectId), nameof(TaskMedicalReviewView.ArmEnum), nameof(TaskMedicalReviewView.VisitTaskNum) };
|
||||||
|
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
||||||
|
|
||||||
return ResponseOutput.Ok(pageList, new
|
return ResponseOutput.Ok(pageList, new
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository;
|
||||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||||
private readonly IRepository<ReadingOncologyTaskInfo> _readingOncologyTaskInfoRepository;
|
private readonly IRepository<ReadingOncologyTaskInfo> _readingOncologyTaskInfoRepository;
|
||||||
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
||||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||||
private readonly IMapper _mapper;
|
private readonly IMapper _mapper;
|
||||||
private readonly IUserInfo _userInfo;
|
private readonly IUserInfo _userInfo;
|
||||||
@@ -61,8 +61,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
||||||
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
|
||||||
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
|
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
|
||||||
IRepository<ReadingOncologyTaskInfo> ReadingOncologyTaskInfoRepository,
|
IRepository<ReadingOncologyTaskInfo> ReadingOncologyTaskInfoRepository,
|
||||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||||
IRepository<ReadingJudgeInfo> readingJudgeInfoRepository,
|
IRepository<ReadingJudgeInfo> readingJudgeInfoRepository,
|
||||||
IRepository<TaskAllocationRule> taskAllocationRuleRepository, IMapper mapper, IUserInfo userInfo, IRepository<VisitTaskReReading> visitTaskReReadingRepository,
|
IRepository<TaskAllocationRule> taskAllocationRuleRepository, IMapper mapper, IUserInfo userInfo, IRepository<VisitTaskReReading> visitTaskReReadingRepository,
|
||||||
@@ -78,8 +78,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
this._readingTaskQuestionAnswerRepository = readingTaskQuestionAnswerRepository;
|
||||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||||
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
||||||
_readingOncologyTaskInfoRepository = ReadingOncologyTaskInfoRepository;
|
_readingOncologyTaskInfoRepository = ReadingOncologyTaskInfoRepository;
|
||||||
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
_provider = provider;
|
_provider = provider;
|
||||||
_subjectVisitRepository = subjectVisitRepository;
|
_subjectVisitRepository = subjectVisitRepository;
|
||||||
@@ -155,6 +155,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//基于标准签名 产生任务 (或者手动选择某些访视生成该标准的任务)
|
//基于标准签名 产生任务 (或者手动选择某些访视生成该标准的任务)
|
||||||
public async Task BaseCritrionGenerateVisitTask(Guid trialId, Guid confirmedTrialReadingCriterionId, bool? isManualSelectVisit = null, List<Guid>? subjectVisitIdList = null)
|
public async Task BaseCritrionGenerateVisitTask(Guid trialId, Guid confirmedTrialReadingCriterionId, bool? isManualSelectVisit = null, List<Guid>? subjectVisitIdList = null)
|
||||||
{
|
{
|
||||||
@@ -197,26 +199,29 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
foreach (var subjectVisit in subjectGroup.SubjectVisitList)
|
foreach (var subjectVisit in subjectGroup.SubjectVisitList)
|
||||||
{
|
{
|
||||||
var blindTaskName = string.Empty;
|
|
||||||
|
|
||||||
var isNeedClinicalDataSign = IsNeedClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList);
|
var isNeedClinicalDataSign = IsNeedClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList);
|
||||||
var isClinicalDataSign = IsClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList, subjectVisit.Id, trialId);
|
var isClinicalDataSign = IsClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList, subjectVisit.Id, trialId);
|
||||||
|
|
||||||
if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0)
|
var blindTaskName = string.Empty;
|
||||||
|
|
||||||
|
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
blindTaskName = visitBlindConfig.BlindBaseLineName;
|
if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0 && subjectVisit.VisitNum==0)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder)
|
|
||||||
{
|
{
|
||||||
blindTaskName = visitBlindConfig.BlindFollowUpPrefix + " " + visitNumList.IndexOf(subjectVisit.VisitNum);
|
blindTaskName = visitBlindConfig.BlindBaseLineName;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
blindTaskName = visitBlindConfig.BlindFollowUpPrefix;
|
blindTaskName = visitBlindConfig.BlindFollowUpPrefix + " " + visitNumList.IndexOf(subjectVisit.VisitNum);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
blindTaskName ="Timepoint";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//每个访视 根据项目配置生成任务 双审生成两个
|
//每个访视 根据项目配置生成任务 双审生成两个
|
||||||
|
|
||||||
@@ -392,13 +397,14 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -463,11 +469,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.Where(t => t.TrialId == trialId && t.IsSign && t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count();
|
.Where(t => t.TrialId == trialId && t.IsSign && t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count();
|
||||||
|
|
||||||
|
|
||||||
var readModule = _readModuleRepository.Where(t => t.Id == readingId).FirstOrDefault();
|
var readModule = _readModuleRepository.Where(t => t.Id == readingId).FirstOrDefault();
|
||||||
//CRC 阅片期自定义结构化录入是否签名
|
//CRC 阅片期自定义结构化录入是否签名
|
||||||
bool crcReadModuleSign = true;
|
bool crcReadModuleSign = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//访视
|
//访视
|
||||||
if (readingCategory == ReadingCategory.Visit)
|
if (readingCategory == ReadingCategory.Visit)
|
||||||
@@ -508,7 +514,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
// 肿瘤学
|
// 肿瘤学
|
||||||
else if (readingCategory == ReadingCategory.Oncology)
|
else if (readingCategory == ReadingCategory.Oncology)
|
||||||
{
|
{
|
||||||
needSignCount= trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId) && t.ClinicalDataLevel == ClinicalLevel.OncologyRead && t.UploadRole == UploadRole.PM).Count();
|
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId) && t.ClinicalDataLevel == ClinicalLevel.OncologyRead && t.UploadRole == UploadRole.PM).Count();
|
||||||
if (readModule != null)
|
if (readModule != null)
|
||||||
{
|
{
|
||||||
// 不存在需要CRC上传的临床数据 或者 PM已确认
|
// 不存在需要CRC上传的临床数据 或者 PM已确认
|
||||||
@@ -526,7 +532,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
//可能仅仅CRC 基线 没有PM
|
//可能仅仅CRC 基线 没有PM
|
||||||
if (needSignCount == haveSignedCount && crcReadModuleSign )
|
if (needSignCount == haveSignedCount && crcReadModuleSign)
|
||||||
{
|
{
|
||||||
isClinicalDataSign = true;
|
isClinicalDataSign = true;
|
||||||
|
|
||||||
@@ -660,29 +666,29 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var assignConfigList = await _subjectUserRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.OrignalSubjectUserId == null && t.IsConfirmed).Select(u => new { u.DoctorUserId, u.ArmEnum }).ToListAsync();
|
var assignConfigList = await _subjectUserRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.OrignalSubjectUserId == null && t.IsConfirmed).Select(u => new { u.DoctorUserId, u.ArmEnum }).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
var blindTaskName = string.Empty;
|
|
||||||
|
|
||||||
var isNeedClinicalDataSign = IsNeedClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList);
|
var isNeedClinicalDataSign = IsNeedClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList);
|
||||||
var isClinicalDataSign = IsClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList, subjectVisit.Id, trialId);
|
var isClinicalDataSign = IsClinicalDataSign(ReadingCategory.Visit, subjectVisit.IsBaseLine, trialReadingCriterionConfig.TrialReadingCriterionId, clinicalDataConfirmList, subjectVisit.Id, trialId);
|
||||||
|
|
||||||
var isFrontTaskNeedSignButNotSign = await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.VisitTaskNum < subjectVisit.VisitNum && t.IsNeedClinicalDataSign == true && t.IsClinicalDataSign == false);
|
var isFrontTaskNeedSignButNotSign = await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.VisitTaskNum < subjectVisit.VisitNum && t.IsNeedClinicalDataSign == true && t.IsClinicalDataSign == false);
|
||||||
|
|
||||||
if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0)
|
var blindTaskName = string.Empty;
|
||||||
|
|
||||||
|
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
blindTaskName = visitBlindConfig.BlindBaseLineName;
|
if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0 && subjectVisit.VisitNum == 0)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder)
|
|
||||||
{
|
{
|
||||||
blindTaskName = visitBlindConfig.BlindFollowUpPrefix + " " + visitNumList.IndexOf(subjectVisit.VisitNum);
|
blindTaskName = visitBlindConfig.BlindBaseLineName;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
blindTaskName = visitBlindConfig.BlindFollowUpPrefix;
|
blindTaskName = visitBlindConfig.BlindFollowUpPrefix + " " + visitNumList.IndexOf(subjectVisit.VisitNum);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
blindTaskName = "Timepoint";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//每个访视 根据项目配置生成任务 双审生成两个
|
//每个访视 根据项目配置生成任务 双审生成两个
|
||||||
@@ -693,7 +699,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId
|
var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId
|
||||||
&& t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect
|
&& t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect
|
||||||
&& t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.SourceSubjectVisitId == subjectVisit.Id).ToList();
|
/* && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null*/ && t.SourceSubjectVisitId == subjectVisit.Id).ToList();
|
||||||
|
|
||||||
VisitTask? task1 = null;
|
VisitTask? task1 = null;
|
||||||
VisitTask? task2 = null;
|
VisitTask? task2 = null;
|
||||||
@@ -784,7 +790,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
#region 后续访视 未分配的进行再次分配,重置的或者失效的 需要重新生成新的任务 (PM 有序退回 或者PM 有序 申请重阅)
|
#region 后续访视 未分配的进行再次分配,重置的或者失效的 需要重新生成新的任务 (PM 有序退回 或者PM 有序 申请重阅)
|
||||||
|
|
||||||
|
|
||||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder)
|
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
//之前有回退到影像上传的访视 那么当前访视一致性核查通过的时候,当前访视生成但是不分配出去(排除失访的)
|
//之前有回退到影像上传的访视 那么当前访视一致性核查通过的时候,当前访视生成但是不分配出去(排除失访的)
|
||||||
|
|
||||||
@@ -1075,7 +1081,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
||||||
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
||||||
IsClinicalDataSign = isClinicalDataSign,
|
IsClinicalDataSign = isClinicalDataSign,
|
||||||
IsFrontTaskNeedSignButNotSign= isFrontTaskNeedSignButNotSign
|
IsFrontTaskNeedSignButNotSign = isFrontTaskNeedSignButNotSign
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1114,7 +1120,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
#region 重阅/退回的时候,需要将取消分配的访视类型的 任务重新分配
|
#region 重阅/退回的时候,需要将取消分配的访视类型的 任务重新分配
|
||||||
|
|
||||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder)
|
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
//之前有回退到影像上传的访视 那么当前访视一致性核查通过的时候,当前访视生成但是不分配出去(排除失访的)
|
//之前有回退到影像上传的访视 那么当前访视一致性核查通过的时候,当前访视生成但是不分配出去(排除失访的)
|
||||||
var beforeBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.VisitTaskNum < subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed && t.SourceSubjectVisit.IsLostVisit == false).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
var beforeBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.VisitTaskNum < subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed && t.SourceSubjectVisit.IsLostVisit == false).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
||||||
@@ -1609,18 +1615,18 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var oncologySubjectUser = await _subjectUserRepository.Where(x => x.SubjectId == item.SubjectId && x.ArmEnum == Arm.TumorArm && x.IsConfirmed && x.TrialReadingCriterionId == originalTaskInfo.TrialReadingCriterionId).FirstOrDefaultAsync();
|
var oncologySubjectUser = await _subjectUserRepository.Where(x => x.SubjectId == item.SubjectId && x.ArmEnum == Arm.TumorArm && x.IsConfirmed && x.TrialReadingCriterionId == originalTaskInfo.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
item.VisitNum = await _readModuleRepository.Where(x => x.Id == item.ReadModuleId).Select(x => x.SubjectVisit.VisitNum).FirstOrDefaultAsync();
|
item.VisitNum = await _readModuleRepository.Where(x => x.Id == item.ReadModuleId).Select(x => x.SubjectVisit.VisitNum).FirstOrDefaultAsync();
|
||||||
var id= NewId.NextGuid();
|
var id = NewId.NextGuid();
|
||||||
|
|
||||||
var singleTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
var singleTask = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||||
{
|
{
|
||||||
Id= id,
|
Id = id,
|
||||||
TrialId = trialId,
|
TrialId = trialId,
|
||||||
SubjectId = item.SubjectId,
|
SubjectId = item.SubjectId,
|
||||||
IsUrgent = originalTaskInfo.IsUrgent,
|
IsUrgent = originalTaskInfo.IsUrgent,
|
||||||
TaskName = item.ReadingName,
|
TaskName = item.ReadingName,
|
||||||
//IsConvertedTask = originalTaskInfo.IsConvertedTask,
|
//IsConvertedTask = originalTaskInfo.IsConvertedTask,
|
||||||
// 原任务是全局任务 加0.03 就好
|
// 这里可能是
|
||||||
VisitTaskNum = originalTaskInfo.VisitTaskNum + 0.03m,
|
VisitTaskNum = originalTaskInfo.VisitTaskNum - ReadingCommon.TaskNumDic[originalTaskInfo.ReadingCategory] + ReadingCommon.TaskNumDic[ReadingCategory.Oncology],
|
||||||
ArmEnum = Arm.TumorArm, //特殊
|
ArmEnum = Arm.TumorArm, //特殊
|
||||||
Code = currentMaxCodeInt + 1,
|
Code = currentMaxCodeInt + 1,
|
||||||
SouceReadModuleId = item.ReadModuleId,
|
SouceReadModuleId = item.ReadModuleId,
|
||||||
@@ -1648,20 +1654,20 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
// 生成肿瘤学需要 肿瘤学阅片结果中基线,统一显示为NA
|
// 生成肿瘤学需要 肿瘤学阅片结果中基线,统一显示为NA
|
||||||
// 找到基线任务ID
|
// 找到基线任务ID
|
||||||
var baseLineTaskId = await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect
|
var baseLineTaskId = await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect
|
||||||
&& x.ArmEnum == originalTaskInfo.ArmEnum && x.VisitTaskNum == 0
|
&& x.ArmEnum == originalTaskInfo.ArmEnum && x.VisitTaskNum == 0
|
||||||
&& x.SubjectId== originalTaskInfo.SubjectId
|
&& x.SubjectId == originalTaskInfo.SubjectId
|
||||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && x.TrialReadingCriterionId == originalTaskInfo.TrialReadingCriterionId).Select(x => x.Id).FirstNotNullAsync();
|
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && x.TrialReadingCriterionId == originalTaskInfo.TrialReadingCriterionId).Select(x => x.Id).FirstNotNullAsync();
|
||||||
await _readingOncologyTaskInfoRepository.AddAsync(new ReadingOncologyTaskInfo()
|
await _readingOncologyTaskInfoRepository.AddAsync(new ReadingOncologyTaskInfo()
|
||||||
{
|
{
|
||||||
EvaluationResult = "-1",
|
EvaluationResult = "-1",
|
||||||
EvaluationReason=string.Empty,
|
EvaluationReason = string.Empty,
|
||||||
OncologyTaskId = id,
|
OncologyTaskId = id,
|
||||||
VisitTaskId = baseLineTaskId,
|
VisitTaskId = baseLineTaskId,
|
||||||
SubjectId = originalTaskInfo.SubjectId,
|
SubjectId = originalTaskInfo.SubjectId,
|
||||||
TrialId = originalTaskInfo.TrialId
|
TrialId = originalTaskInfo.TrialId
|
||||||
});
|
});
|
||||||
|
|
||||||
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ using DocumentFormat.OpenXml.Bibliography;
|
|||||||
using Org.BouncyCastle.Crypto;
|
using Org.BouncyCastle.Crypto;
|
||||||
using IRaCIS.Core.Domain.Share.Reading;
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
|
using System.Reactive.Subjects;
|
||||||
|
using Subject = IRaCIS.Core.Domain.Models.Subject;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.Allocation
|
namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
{
|
{
|
||||||
@@ -105,7 +107,23 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
var list = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.TrialId == trialId && t.IsConfirm)
|
var list = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.TrialId == trialId && t.IsConfirm)
|
||||||
|
|
||||||
.OrderBy(t => t.ShowOrder)
|
.OrderBy(t => t.ShowOrder)
|
||||||
.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 })
|
.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,
|
||||||
|
IsReadingPeriod = t.IsReadingPeriod,
|
||||||
|
IsArbitrationReading = t.IsArbitrationReading,
|
||||||
|
IsGlobalReading = t.IsGlobalReading,
|
||||||
|
IsOncologyReading = t.IsOncologyReading,
|
||||||
|
ImageDownloadEnum = t.ImageDownloadEnum,
|
||||||
|
ImageUploadEnum = t.ImageUploadEnum,
|
||||||
|
IsReadingTaskViewInOrder = t.IsReadingTaskViewInOrder
|
||||||
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
//if (list.Count == 0)
|
//if (list.Count == 0)
|
||||||
@@ -128,16 +146,24 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(PageOutput<SubjectAssignStat>, object?)> GetSubjectAssignAndTaskStatList(SubjectAssignStatQuery querySubjectAssign)
|
public async Task<IResponseOutput<PageOutput<SubjectAssignStat>>> GetSubjectAssignAndTaskStatList(SubjectAssignStatQuery querySubjectAssign)
|
||||||
{
|
{
|
||||||
|
|
||||||
var isAddtinoarlCriterion = await _trialReadingCriterionRepository.AnyAsync(t => t.Id == querySubjectAssign.TrialReadingCriterionId && t.IsAutoCreate == false);
|
var isAddtinoarlCriterion = await _trialReadingCriterionRepository.AnyAsync(t => t.Id == querySubjectAssign.TrialReadingCriterionId && t.IsAutoCreate == false);
|
||||||
|
|
||||||
var subjectQuery = _subjectRepository.Where(t => t.TrialId == querySubjectAssign.TrialId && t.SubjectVisitTaskList.Any())
|
var subjectQuery = _subjectRepository.Where(t => t.TrialId == querySubjectAssign.TrialId && t.SubjectVisitTaskList.Any())
|
||||||
.WhereIf(querySubjectAssign.SiteId != null, t => t.SiteId == querySubjectAssign.SiteId)
|
.WhereIf(querySubjectAssign.TrialSiteId != null, t => t.TrialSiteId == querySubjectAssign.TrialSiteId)
|
||||||
.WhereIf(querySubjectAssign.SubjectId != null, t => t.Id == querySubjectAssign.SubjectId)
|
.WhereIf(querySubjectAssign.SubjectId != null, t => t.Id == querySubjectAssign.SubjectId)
|
||||||
.WhereIf(querySubjectAssign.DoctorUserId != null, t => t.SubjectDoctorList.Any(t => t.DoctorUserId == querySubjectAssign.DoctorUserId && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId))
|
.WhereIf(querySubjectAssign.DoctorUserId != null, t => t.SubjectDoctorList.Any(t => t.DoctorUserId == querySubjectAssign.DoctorUserId && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId))
|
||||||
.WhereIf(!string.IsNullOrEmpty(querySubjectAssign.SubjectCode), t => t.Code.Contains(querySubjectAssign.SubjectCode))
|
.WhereIf(!string.IsNullOrEmpty(querySubjectAssign.SubjectCode), t => t.Code.Contains(querySubjectAssign.SubjectCode))
|
||||||
|
//未分配
|
||||||
|
.WhereIf(querySubjectAssign.SubjectAllocateState == 0, t => !t.SubjectDoctorList.Any(t => t.AssignTime != null && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId))
|
||||||
|
//已分配
|
||||||
|
.WhereIf(querySubjectAssign.SubjectAllocateState == 1, t => t.SubjectDoctorList.Any(t => t.AssignTime != null && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId))
|
||||||
|
|
||||||
|
.WhereIf(querySubjectAssign.ArmList.Count > 0, t => !querySubjectAssign.ArmList.Except(t.SubjectDoctorList.Where(t => t.AssignTime != null && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId).Select(c => c.ArmEnum)).Any())
|
||||||
|
|
||||||
|
|
||||||
.WhereIf(isAddtinoarlCriterion, t => t.SubjectCriteriaEvaluationList.Where(t => t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId).Any(t => t.IsJoinEvaluation))
|
.WhereIf(isAddtinoarlCriterion, t => t.SubjectCriteriaEvaluationList.Where(t => t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId).Any(t => t.IsJoinEvaluation))
|
||||||
|
|
||||||
|
|
||||||
@@ -150,7 +176,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == querySubjectAssign.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType, x.IsArbitrationReading, x.IsOncologyReading, x.IsGlobalReading }).FirstOrDefaultAsync()).IfNullThrowException();
|
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == querySubjectAssign.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType, x.IsArbitrationReading, x.IsOncologyReading, x.IsGlobalReading }).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
return (pageList, criterionConfig);
|
return ResponseOutput.Ok(pageList, criterionConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -284,7 +310,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
var subjectId = cancelCommand.CancelList.First().SubjectId;
|
var subjectId = cancelCommand.CancelList.First().SubjectId;
|
||||||
|
|
||||||
await _repository.AddAsync(new SubjectCanceDoctor() { SubjectId = subjectId, Note = cancelCommand.Note });
|
await _repository.AddAsync(new SubjectCanceDoctor() { SubjectId = subjectId, Note = cancelCommand.Note, TrialReadingCriterionId = cancelCommand.TrialReadingCriterionId });
|
||||||
|
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
|
||||||
@@ -399,7 +425,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.WhereIf(querySubjectAssign.IsJudgeDoctor == false, t => t.SubjectVisitTaskList.Where(t => t.ArmEnum != Arm.JudgeArm).Any())
|
.WhereIf(querySubjectAssign.IsJudgeDoctor == false, t => t.SubjectVisitTaskList.Where(t => t.ArmEnum != Arm.JudgeArm).Any())
|
||||||
.WhereIf(querySubjectAssign.IsJudgeDoctor, t => t.SubjectVisitTaskList.Where(t => t.ArmEnum == Arm.JudgeArm).Any())
|
.WhereIf(querySubjectAssign.IsJudgeDoctor, t => t.SubjectVisitTaskList.Where(t => t.ArmEnum == Arm.JudgeArm).Any())
|
||||||
|
|
||||||
.WhereIf(querySubjectAssign.SiteId != null, t => t.SiteId == querySubjectAssign.SiteId)
|
.WhereIf(querySubjectAssign.TrialSiteId != null, t => t.TrialSiteId == querySubjectAssign.TrialSiteId)
|
||||||
.WhereIf(querySubjectAssign.SubjectId != null, t => t.Id == querySubjectAssign.SubjectId)
|
.WhereIf(querySubjectAssign.SubjectId != null, t => t.Id == querySubjectAssign.SubjectId)
|
||||||
|
|
||||||
.WhereIf(querySubjectAssign.IsHaveAssigned != null && querySubjectAssign.IsHaveAssigned == true && querySubjectAssign.IsJudgeDoctor == false, t => t.SubjectDoctorList.Where(t => t.ArmEnum != Arm.JudgeArm).Any())
|
.WhereIf(querySubjectAssign.IsHaveAssigned != null && querySubjectAssign.IsHaveAssigned == true && querySubjectAssign.IsJudgeDoctor == false, t => t.SubjectDoctorList.Where(t => t.ArmEnum != Arm.JudgeArm).Any())
|
||||||
@@ -662,7 +688,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.WhereIf(queryVisitTask.ReadingCategory == null, t => t.ReadingCategory != ReadingCategory.Judge)
|
.WhereIf(queryVisitTask.ReadingCategory == null, t => t.ReadingCategory != ReadingCategory.Judge)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -702,7 +728,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory)
|
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -734,13 +760,16 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
/// <param name="queryVisitTask"></param>
|
/// <param name="queryVisitTask"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(PageOutput<ReadingTaskView>, object?)> GetReadingTaskList(VisitTaskQuery queryVisitTask)
|
public async Task<IResponseOutput<PageOutput<ReadingTaskView>>> GetReadingTaskList(VisitTaskQuery queryVisitTask)
|
||||||
{
|
{
|
||||||
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId && t.IsAnalysisCreate == false)
|
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId && t.IsAnalysisCreate == false)
|
||||||
//.Where(t => t.IsAnalysisCreate == false && t.DoctorUserId != null)
|
//.Where(t => t.IsAnalysisCreate == false && t.DoctorUserId != null)
|
||||||
|
|
||||||
|
.WhereIf(queryVisitTask.IsEffect == true, t => t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)
|
||||||
|
.WhereIf(queryVisitTask.IsEffect == false, t => t.TaskState == TaskState.Adbandon || t.TaskState == TaskState.HaveReturned)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -757,10 +786,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
|
||||||
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
|
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
|
||||||
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate)
|
||||||
.WhereIf(queryVisitTask.BeginSignTime != null, t => t.SignTime > queryVisitTask.BeginSignTime)
|
.WhereIf(queryVisitTask.BeginSignTime != null, t => t.SignTime > queryVisitTask.BeginSignTime)
|
||||||
.WhereIf(queryVisitTask.EndSignTime != null, t => t.SignTime < queryVisitTask.EndSignTime!.Value.AddDays(1))
|
.WhereIf(queryVisitTask.EndSignTime != null, t => t.SignTime < queryVisitTask.EndSignTime)
|
||||||
.ProjectTo<ReadingTaskView>(_mapper.ConfigurationProvider);
|
.ProjectTo<ReadingTaskView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) };
|
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId), nameof(VisitTask.VisitTaskNum) };
|
||||||
|
|
||||||
@@ -768,7 +797,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
var trialTaskConfig = _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).ProjectTo<TrialUrgentConfig>(_mapper.ConfigurationProvider).FirstOrDefault();
|
var trialTaskConfig = _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).ProjectTo<TrialUrgentConfig>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||||
|
|
||||||
return (pageList, trialTaskConfig);
|
return ResponseOutput.Ok(pageList, trialTaskConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -786,26 +815,33 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.Where(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId /*&& t.OriginalReReadingTask.IsAnalysisCreate == false*/)
|
.Where(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId /*&& t.OriginalReReadingTask.IsAnalysisCreate == false*/)
|
||||||
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.OriginalReReadingTask.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.OriginalReReadingTask.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.OriginalReReadingTask.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.OriginalReReadingTask.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
||||||
.WhereIf(queryVisitTask.RequestReReadingType != null, t => t.RequestReReadingType == queryVisitTask.RequestReReadingType)
|
.WhereIf(queryVisitTask.RequestReReadingType != null, t => t.RequestReReadingType == queryVisitTask.RequestReReadingType)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.OriginalReReadingTask.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.OriginalReReadingTask.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
|
.WhereIf(queryVisitTask.ArmEnum != null, t => t.OriginalReReadingTask.ArmEnum == queryVisitTask.ArmEnum)
|
||||||
.WhereIf(queryVisitTask.ReadingTaskState != null, t => t.OriginalReReadingTask.ReadingTaskState == queryVisitTask.ReadingTaskState)
|
.WhereIf(queryVisitTask.ReadingTaskState != null, t => t.OriginalReReadingTask.ReadingTaskState == queryVisitTask.ReadingTaskState)
|
||||||
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.OriginalReReadingTask.TaskAllocationState == queryVisitTask.TaskAllocationState)
|
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.OriginalReReadingTask.TaskAllocationState == queryVisitTask.TaskAllocationState)
|
||||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.OriginalReReadingTask.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.OriginalReReadingTask.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||||
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.OriginalReReadingTask.ReadingCategory == queryVisitTask.ReadingCategory)
|
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.OriginalReReadingTask.ReadingCategory == queryVisitTask.ReadingCategory)
|
||||||
|
|
||||||
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.RequestReReadingReason), t => t.RequestReReadingReason.Contains(queryVisitTask.RequestReReadingReason))
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.RequestReReadingResultEnum != null, t => t.RequestReReadingResultEnum == queryVisitTask.RequestReReadingResultEnum)
|
.WhereIf(queryVisitTask.RequestReReadingResultEnum != null, t => t.RequestReReadingResultEnum == queryVisitTask.RequestReReadingResultEnum)
|
||||||
|
|
||||||
|
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => (t.OriginalReReadingTask.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.OriginalReReadingTask.IsAnalysisCreate) || (t.OriginalReReadingTask.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.OriginalReReadingTask.IsAnalysisCreate == false))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => (t.OriginalReReadingTask.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.OriginalReReadingTask.IsAnalysisCreate) || (t.OriginalReReadingTask.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.OriginalReReadingTask.IsAnalysisCreate == false))
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(queryVisitTask.TaskName) || t.OriginalReReadingTask.TaskBlindName.Contains(queryVisitTask.TaskName))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.OriginalReReadingTask.TaskName.Contains(queryVisitTask.TaskName) || t.OriginalReReadingTask.TaskBlindName.Contains(queryVisitTask.TaskName))
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.OriginalReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.OriginalReReadingTask.IsAnalysisCreate == false) || (t.OriginalReReadingTask.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.OriginalReReadingTask.IsAnalysisCreate))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => ((t.OriginalReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode) || t.OriginalReReadingTask.Subject.MedicalNo.Contains(queryVisitTask.SubjectCode)) && t.OriginalReReadingTask.IsAnalysisCreate == false) || (t.OriginalReReadingTask.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.OriginalReReadingTask.IsAnalysisCreate))
|
||||||
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate)
|
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate)
|
||||||
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.OriginalReReadingTask.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
||||||
|
|
||||||
|
.WhereIf(queryVisitTask.BeginRequestReReadingTime != null, t => t.RequestReReadingTime >= queryVisitTask.BeginRequestReReadingTime)
|
||||||
|
.WhereIf(queryVisitTask.EndRequestReReadingTime != null, t => t.RequestReReadingTime <= queryVisitTask.EndRequestReReadingTime!.Value.AddDays(1))
|
||||||
|
|
||||||
.ProjectTo<ReReadingTaskView>(_mapper.ConfigurationProvider);
|
.ProjectTo<ReReadingTaskView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
//var defalutSortArray = new string[] { nameof(ReReadingTaskView.OriginalReReadingTask) + "." + nameof(ReReadingTaskView.OriginalReReadingTask.IsUrgent) + " desc", nameof(ReReadingTaskView.OriginalReReadingTask) + "." + nameof(ReReadingTaskView.OriginalReReadingTask.SubjectId), nameof(ReReadingTaskView.OriginalReReadingTask) + "." + nameof(ReReadingTaskView.OriginalReReadingTask.VisitTaskNum) };
|
//var defalutSortArray = new string[] { nameof(ReReadingTaskView.OriginalReReadingTask) + "." + nameof(ReReadingTaskView.OriginalReReadingTask.IsUrgent) + " desc", nameof(ReReadingTaskView.OriginalReReadingTask) + "." + nameof(ReReadingTaskView.OriginalReReadingTask.SubjectId), nameof(ReReadingTaskView.OriginalReReadingTask) + "." + nameof(ReReadingTaskView.OriginalReReadingTask.VisitTaskNum) };
|
||||||
@@ -837,13 +873,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.Where(t => t.RequestReReadingType == RequestReReadingType.DocotorApply)
|
.Where(t => t.RequestReReadingType == RequestReReadingType.DocotorApply)
|
||||||
.Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.Id)
|
.Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.Id)
|
||||||
.Where(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId)
|
.Where(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId)
|
||||||
.WhereIf(queryVisitTask.RequestReReadingResultEnum != null, t => t.RequestReReadingResultEnum == queryVisitTask.RequestReReadingResultEnum)
|
.WhereIf(queryVisitTask.RequestReReadingResultEnum != null, t => t.RequestReReadingResultEnum == queryVisitTask.RequestReReadingResultEnum)
|
||||||
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.OriginalReReadingTask.ReadingCategory == queryVisitTask.ReadingCategory)
|
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.OriginalReReadingTask.ReadingCategory == queryVisitTask.ReadingCategory)
|
||||||
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.OriginalReReadingTask.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.OriginalReReadingTask.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.OriginalReReadingTask.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.OriginalReReadingTask.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.OriginalReReadingTask.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.OriginalReReadingTask.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -878,7 +914,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.OriginalReReadingTask.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.OriginalReReadingTask.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.OriginalReReadingTask.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.OriginalReReadingTask.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.OriginalReReadingTask.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -910,74 +946,54 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(PageOutput<IRUnReadSubjectView>, object)> GetIRUnReadSubjectTaskList(IRUnReadSubjectQuery iRUnReadSubjectQuery)
|
public async Task<IResponseOutput<PageOutput<IRUnReadSubjectView>>> GetIRUnReadSubjectTaskList(IRUnReadSubjectQuery inQuery)
|
||||||
{
|
{
|
||||||
|
|
||||||
var trialId = iRUnReadSubjectQuery.TrialId;
|
var trialId = inQuery.TrialId;
|
||||||
|
var subjectCode = inQuery.SubjectCode;
|
||||||
|
|
||||||
var trialReadingCriterionId = iRUnReadSubjectQuery.TrialReadingCriterionId;
|
var trialReadingCriterionId = inQuery.TrialReadingCriterionId;
|
||||||
|
|
||||||
var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == iRUnReadSubjectQuery.TrialReadingCriterionId).FirstNotNullAsync();
|
var criterionConfig = await _trialReadingCriterionRepository.Where(x => x.Id == inQuery.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
var readingTool = criterionConfig.ReadingTool;
|
var readingTool = criterionConfig.ReadingTool;
|
||||||
var isReadingTaskViewInOrder = criterionConfig.IsReadingTaskViewInOrder;
|
var isReadingTaskViewInOrder = criterionConfig.IsReadingTaskViewInOrder;
|
||||||
|
|
||||||
#region 按照Subject 维度
|
|
||||||
if (isReadingTaskViewInOrder)
|
var result = new PageOutput<IRUnReadSubjectView>()
|
||||||
{
|
{
|
||||||
|
PageSize = inQuery.PageSize,
|
||||||
|
PageIndex = inQuery.PageIndex,
|
||||||
|
TotalCount = 0,
|
||||||
|
CurrentPageData = null,
|
||||||
|
};
|
||||||
|
|
||||||
|
IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto();
|
||||||
|
|
||||||
var visitTaskListInfo = await GetOrderReadingIQueryable(new GetOrderReadingIQueryableInDto()
|
//subject 级别 有序 无序查询
|
||||||
|
if (isReadingTaskViewInOrder == ReadingOrder.InOrder || isReadingTaskViewInOrder == ReadingOrder.SubjectRandom)
|
||||||
|
{
|
||||||
|
result = await GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
||||||
{
|
{
|
||||||
TrialId = trialId,
|
TrialId = trialId,
|
||||||
TrialReadingCriterionId = trialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionId,
|
||||||
SubjectCode = iRUnReadSubjectQuery.SubjectCode,
|
SubjectCode = inQuery.SubjectCode,
|
||||||
Page = new PageInput()
|
|
||||||
{
|
|
||||||
PageIndex = iRUnReadSubjectQuery.PageIndex,
|
|
||||||
PageSize = iRUnReadSubjectQuery.PageSize,
|
|
||||||
Asc = iRUnReadSubjectQuery.Asc,
|
|
||||||
SortField = iRUnReadSubjectQuery.SortField,
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
PageIndex = inQuery.PageIndex,
|
||||||
|
PageSize = inQuery.PageSize,
|
||||||
|
Asc = inQuery.Asc,
|
||||||
|
SortField = inQuery.SortField,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var totalCount = visitTaskListInfo.Item1;
|
|
||||||
var currentPageData = visitTaskListInfo.Item2;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var result = new PageOutput<IRUnReadSubjectView>()
|
|
||||||
{
|
|
||||||
PageSize = iRUnReadSubjectQuery.PageSize,
|
|
||||||
PageIndex = iRUnReadSubjectQuery.PageIndex,
|
|
||||||
TotalCount = totalCount,
|
|
||||||
CurrentPageData = currentPageData,
|
|
||||||
};
|
|
||||||
|
|
||||||
// 封装的方法有问题
|
|
||||||
//var result = await visitQuery.ToPagedListAsync(iRUnReadSubjectQuery.PageIndex, iRUnReadSubjectQuery.PageSize, String.IsNullOrEmpty(iRUnReadSubjectQuery.SortField) ? nameof(IRUnReadSubjectView.SubjectId) : iRUnReadSubjectQuery.SortField, iRUnReadSubjectQuery.Asc);
|
|
||||||
return (result, new
|
|
||||||
{
|
|
||||||
RandomReadInfo = new IRUnReadOutDto(),
|
|
||||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
|
||||||
ReadingTool = readingTool,
|
|
||||||
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
|
||||||
IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
|
|
||||||
IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
|
|
||||||
DigitPlaces = criterionConfig.DigitPlaces,
|
|
||||||
CriterionType = criterionConfig.CriterionType,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
//随机阅片
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var taskQuery = _visitTaskRepository.Where(x => x.TrialId == iRUnReadSubjectQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId)
|
var taskQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId)
|
||||||
// .Where(x=>x.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == x.SouceReadModuleId || c.ReadingId == x.SourceSubjectVisitId)))
|
// .Where(x=>x.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == x.SouceReadModuleId || c.ReadingId == x.SourceSubjectVisitId)))
|
||||||
.Where(x => !x.Subject.IsDeleted).Where(x => (x.IsNeedClinicalDataSign && x.IsClinicalDataSign) || !x.IsNeedClinicalDataSign);
|
.Where(x => !x.Subject.IsDeleted).Where(x => (x.IsNeedClinicalDataSign && x.IsClinicalDataSign) || !x.IsNeedClinicalDataSign);
|
||||||
|
|
||||||
IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto()
|
iRUnReadOut = new IRUnReadOutDto()
|
||||||
{
|
{
|
||||||
FinishJudgeTaskCount = await taskQuery.Where(x => x.ReadingCategory == ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
FinishJudgeTaskCount = await taskQuery.Where(x => x.ReadingCategory == ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
||||||
FinishTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
FinishTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
||||||
@@ -985,12 +1001,57 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
UnReadJudgeTaskCount = await taskQuery.Where(x => x.ReadingCategory == ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
UnReadJudgeTaskCount = await taskQuery.Where(x => x.ReadingCategory == ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
||||||
UnReadTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
UnReadTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(result, new
|
||||||
|
{
|
||||||
|
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
||||||
|
RandomReadInfo = iRUnReadOut,
|
||||||
|
ReadingTool = readingTool,
|
||||||
|
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
||||||
|
IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
|
||||||
|
IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
|
||||||
|
DigitPlaces = criterionConfig.DigitPlaces,
|
||||||
|
CriterionType = criterionConfig.CriterionType,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var visitGroupQuery = taskQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
/// <summary>
|
||||||
|
/// 获取subject有序 或者无序阅片IQuery对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inQuery"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<PageOutput<IRUnReadSubjectView>> GetSubjectReadingIQueryable(GetReadingIQueryableInDto inQuery)
|
||||||
|
{
|
||||||
|
var trialReadingCriterionId = inQuery.TrialReadingCriterionId;
|
||||||
|
var subjectCode = inQuery.SubjectCode;
|
||||||
|
var trialId = inQuery.TrialId;
|
||||||
|
var subjectId = inQuery.SubjectId;
|
||||||
|
|
||||||
|
var critrion = await _trialReadingCriterionRepository.FindAsync(trialReadingCriterionId);
|
||||||
|
|
||||||
|
if (critrion.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
|
{
|
||||||
|
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect)
|
||||||
|
|
||||||
|
.WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId)
|
||||||
|
//前序 不存在 未生成任务的访视
|
||||||
|
.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(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(inQuery.SubjectCode), t => (t.Subject.Code.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate));
|
||||||
|
|
||||||
|
|
||||||
|
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
||||||
|
|
||||||
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
||||||
{
|
{
|
||||||
@@ -1009,6 +1070,32 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
).Count(),
|
).Count(),
|
||||||
|
|
||||||
|
|
||||||
|
UnReadCanReadTaskList = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||||
|
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
|
||||||
|
.OrderBy(x => x.VisitTaskNum)
|
||||||
|
.Select(u => new IRUnreadTaskView()
|
||||||
|
{
|
||||||
|
Id = u.Id,
|
||||||
|
IsUrgent = u.IsUrgent,
|
||||||
|
VisitNum = u.VisitTaskNum,
|
||||||
|
TaskBlindName = u.TaskBlindName,
|
||||||
|
VisistId = u.SourceSubjectVisitId,
|
||||||
|
SuggesteFinishedTime = u.SuggesteFinishedTime,
|
||||||
|
ReadingCategory = u.ReadingCategory,
|
||||||
|
IsAnalysisCreate = u.IsAnalysisCreate,
|
||||||
|
ArmEnum = u.ArmEnum,
|
||||||
|
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
||||||
|
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
||||||
|
IsClinicalDataSign = u.IsClinicalDataSign,
|
||||||
|
IsFrontTaskNeedSignButNotSign = u.IsFrontTaskNeedSignButNotSign
|
||||||
|
})
|
||||||
|
.ToList(),
|
||||||
|
|
||||||
|
|
||||||
|
UrgentCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||||
|
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
|
||||||
|
.Where(x => x.IsUrgent).Count(),
|
||||||
|
|
||||||
//已读任务量
|
//已读任务量
|
||||||
HaveReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
HaveReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
||||||
|
|
||||||
@@ -1033,166 +1120,122 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
IsFrontTaskNeedSignButNotSign = u.IsFrontTaskNeedSignButNotSign
|
IsFrontTaskNeedSignButNotSign = u.IsFrontTaskNeedSignButNotSign
|
||||||
})
|
})
|
||||||
.ToList(),
|
.ToList(),
|
||||||
}).Where(x => x.UnReadCanReadTaskCount > 0);
|
}).Where(x => x.UnReadCanReadTaskCount > 0)/*.OrderBy(x => x.UnReadCanReadTaskCount)*/;
|
||||||
|
// 有序阅片需要找到最小需要
|
||||||
|
|
||||||
|
|
||||||
var totalCount = await visitGroupQuery.CountAsync();
|
// 不这样写会有问题
|
||||||
var currentPageData = await visitTaskQuery.ToListAsync();
|
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();
|
||||||
|
|
||||||
var result = new PageOutput<IRUnReadSubjectView>()
|
var result = new List<IRUnReadSubjectView>();
|
||||||
{
|
|
||||||
PageSize = iRUnReadSubjectQuery.PageSize,
|
|
||||||
PageIndex = iRUnReadSubjectQuery.PageIndex,
|
|
||||||
TotalCount = totalCount,
|
|
||||||
CurrentPageData = currentPageData,
|
|
||||||
};
|
|
||||||
|
|
||||||
return (result, new
|
var propName = string.IsNullOrWhiteSpace(inQuery!.SortField) ? nameof(IRUnReadSubjectView.UnReadCanReadTaskCount) : inQuery.SortField;
|
||||||
{
|
|
||||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
|
||||||
RandomReadInfo = iRUnReadOut,
|
|
||||||
ReadingTool = readingTool,
|
|
||||||
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
|
||||||
IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
|
|
||||||
IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
|
|
||||||
DigitPlaces = criterionConfig.DigitPlaces,
|
|
||||||
CriterionType = criterionConfig.CriterionType,
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
var visitTaskOrderQuery = inQuery.Asc ? visitTaskQuery.OrderBy(propName) : visitTaskQuery.OrderBy(propName + " desc");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取有序阅片IQuery对象
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<(int, List<IRUnReadSubjectView>)> GetOrderReadingIQueryable(GetOrderReadingIQueryableInDto inDto)
|
|
||||||
{
|
|
||||||
var trialReadingCriterionId = inDto.TrialReadingCriterionId;
|
|
||||||
|
|
||||||
|
|
||||||
var critrion = await _trialReadingCriterionRepository.FindAsync(trialReadingCriterionId);
|
|
||||||
|
|
||||||
|
|
||||||
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(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum))
|
|
||||||
|
|
||||||
// 前序 不存在 未一致性核查未通过的
|
|
||||||
.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 visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
|
||||||
{
|
|
||||||
SubjectId = x.Key.SubjectId,
|
|
||||||
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
|
|
||||||
|
|
||||||
SuggesteFinishedTime = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Min(x => x.SuggesteFinishedTime),
|
|
||||||
|
|
||||||
//未读任务量
|
|
||||||
UnReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Count(),
|
|
||||||
|
|
||||||
//未读 里可读任务量
|
|
||||||
UnReadCanReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned && y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)
|
|
||||||
//不能对包含聚合或子查询的表达式执行聚合函数
|
|
||||||
//&& !x.Any(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.IsNeedClinicalDataSign == true && t.IsClinicalDataSign == false && t.VisitTaskNum<y.VisitTaskNum )
|
|
||||||
).Count(),
|
|
||||||
|
|
||||||
|
|
||||||
UnReadCanReadTaskList= x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned)
|
|
||||||
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
|
|
||||||
.OrderBy(x => x.VisitTaskNum)
|
|
||||||
.Select(u => new IRUnreadTaskView()
|
|
||||||
{
|
|
||||||
Id = u.Id,
|
|
||||||
IsUrgent = u.IsUrgent,
|
|
||||||
VisitNum = u.VisitTaskNum,
|
|
||||||
TaskBlindName = u.TaskBlindName,
|
|
||||||
VisistId = u.SourceSubjectVisitId,
|
|
||||||
SuggesteFinishedTime = u.SuggesteFinishedTime,
|
|
||||||
ReadingCategory = u.ReadingCategory,
|
|
||||||
IsAnalysisCreate = u.IsAnalysisCreate,
|
|
||||||
ArmEnum = u.ArmEnum,
|
|
||||||
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
|
||||||
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
|
||||||
IsClinicalDataSign = u.IsClinicalDataSign,
|
|
||||||
IsFrontTaskNeedSignButNotSign = u.IsFrontTaskNeedSignButNotSign
|
|
||||||
})
|
|
||||||
.ToList(),
|
|
||||||
|
|
||||||
|
|
||||||
UrgentCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned)
|
|
||||||
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
|
|
||||||
.Where(x=>x.IsUrgent).Count(),
|
|
||||||
|
|
||||||
//已读任务量
|
|
||||||
HaveReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
|
||||||
|
|
||||||
ExistReadingApply = x.Any(y => (y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed && y.TrialReadingCriterionId == trialReadingCriterionId) || y.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed),
|
|
||||||
|
|
||||||
//查出所有未读的 未读的可读的 在这个列表基础上 过滤下 y.IsFrontTaskNeedSignButNotSign==false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true) 这样容易排错 确认这三个字段是否维护有误
|
|
||||||
UnReadTaskList = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).OrderBy(x => x.VisitTaskNum)
|
|
||||||
.Select(u => new IRUnreadTaskView()
|
|
||||||
{
|
|
||||||
Id = u.Id,
|
|
||||||
IsUrgent = u.IsUrgent,
|
|
||||||
VisitNum = u.VisitTaskNum,
|
|
||||||
TaskBlindName = u.TaskBlindName,
|
|
||||||
VisistId = u.SourceSubjectVisitId,
|
|
||||||
SuggesteFinishedTime = u.SuggesteFinishedTime,
|
|
||||||
ReadingCategory = u.ReadingCategory,
|
|
||||||
IsAnalysisCreate = u.IsAnalysisCreate,
|
|
||||||
ArmEnum = u.ArmEnum,
|
|
||||||
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
|
||||||
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
|
||||||
IsClinicalDataSign = u.IsClinicalDataSign,
|
|
||||||
IsFrontTaskNeedSignButNotSign = u.IsFrontTaskNeedSignButNotSign
|
|
||||||
})
|
|
||||||
.ToList(),
|
|
||||||
}).Where(x => x.UnReadCanReadTaskCount > 0)/*.OrderBy(x => x.UnReadCanReadTaskCount)*/;
|
|
||||||
// 有序阅片需要找到最小需要
|
|
||||||
|
|
||||||
|
|
||||||
// 不这样写会有问题
|
|
||||||
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();
|
|
||||||
|
|
||||||
var result = new List<IRUnReadSubjectView>();
|
|
||||||
|
|
||||||
var propName = string.IsNullOrWhiteSpace(inDto.Page!.SortField) ? "UnReadCanReadTaskCount" : inDto.Page.SortField;
|
|
||||||
|
|
||||||
var visitTaskOrderQuery = inDto.Page.Asc ? visitTaskQuery.OrderBy(propName) : visitTaskQuery.OrderBy(propName + " desc");
|
|
||||||
if (inDto.Page != null)
|
|
||||||
{
|
|
||||||
result = await visitTaskOrderQuery
|
result = await visitTaskOrderQuery
|
||||||
.Skip((inDto.Page.PageIndex - 1) * inDto.Page.PageSize)
|
.Skip((inQuery.PageIndex - 1) * inQuery.PageSize)
|
||||||
.Take(inDto.Page.PageSize).ToListAsync();
|
.Take(inQuery.PageSize).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
return new PageOutput<IRUnReadSubjectView>()
|
||||||
|
{
|
||||||
|
PageSize = inQuery.PageSize,
|
||||||
|
PageIndex = inQuery.PageIndex,
|
||||||
|
TotalCount = count,
|
||||||
|
CurrentPageData = result,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = await visitTaskOrderQuery.ToListAsync();
|
|
||||||
|
if (subjectId != null)
|
||||||
|
{
|
||||||
|
//找到 非一致性分析,未签名,状态正常的 并且任务名称是TimePoint的 任务
|
||||||
|
var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||||
|
&& t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskBlindName == "Timepoint" && t.ReadingCategory == ReadingCategory.Visit
|
||||||
|
&& (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze), true).ToListAsync();
|
||||||
|
|
||||||
|
if (needDealTaskList.Count > 0)
|
||||||
|
{
|
||||||
|
//已完成的访视任务数量(包含重阅的)
|
||||||
|
var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||||
|
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit);
|
||||||
|
|
||||||
|
//已经处理过的任务名称的数量
|
||||||
|
|
||||||
|
var haveDealedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||||
|
&& t.ReadingTaskState != ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit && t.TaskBlindName != "Timepoint");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//随机赋值编号 比如要处理5个任务,实例化一个包含1-5的数组,每次随机取出一个
|
||||||
|
List<int> availableNumbers = Enumerable.Range(haveDealedTaskCount + haveFinishedTaskCount + 1, needDealTaskList.Count).ToList();
|
||||||
|
Random rng = new Random();
|
||||||
|
foreach (var visitTask in needDealTaskList)
|
||||||
|
{
|
||||||
|
int randomIndex = rng.Next(availableNumbers.Count);
|
||||||
|
|
||||||
|
visitTask.TaskBlindName = $"Timepoint Ran {availableNumbers[randomIndex]}";
|
||||||
|
|
||||||
|
availableNumbers.RemoveAt(randomIndex);
|
||||||
|
}
|
||||||
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect)
|
||||||
|
.WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId)
|
||||||
|
.WhereIf(!string.IsNullOrEmpty(subjectCode), t => (t.Subject.Code.Contains(subjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(subjectCode!) && t.IsAnalysisCreate));
|
||||||
|
|
||||||
|
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
||||||
|
|
||||||
|
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
||||||
|
{
|
||||||
|
SubjectId = x.Key.SubjectId,
|
||||||
|
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
|
||||||
|
|
||||||
|
SuggesteFinishedTime = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Min(x => x.SuggesteFinishedTime),
|
||||||
|
|
||||||
|
//未读任务量
|
||||||
|
UnReadCanReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Count(),
|
||||||
|
|
||||||
|
UrgentCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Where(x => x.IsUrgent).Count(),
|
||||||
|
|
||||||
|
//已读任务量
|
||||||
|
HaveReadTaskCount = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
||||||
|
|
||||||
|
ExistReadingApply = x.Any(y => (y.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed && y.TrialReadingCriterionId == trialReadingCriterionId) || y.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed),
|
||||||
|
|
||||||
|
UnReadCanReadTaskList = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||||
|
.OrderBy(x => x.VisitTaskNum)
|
||||||
|
.Select(u => new IRUnreadTaskView()
|
||||||
|
{
|
||||||
|
Id = u.Id,
|
||||||
|
IsUrgent = u.IsUrgent,
|
||||||
|
VisitNum = u.VisitTaskNum,
|
||||||
|
TaskBlindName = u.TaskBlindName,
|
||||||
|
VisistId = u.SourceSubjectVisitId,
|
||||||
|
SuggesteFinishedTime = u.SuggesteFinishedTime,
|
||||||
|
ReadingCategory = u.ReadingCategory,
|
||||||
|
IsAnalysisCreate = u.IsAnalysisCreate,
|
||||||
|
ArmEnum = u.ArmEnum,
|
||||||
|
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
||||||
|
IsNeedClinicalDataSign = u.IsNeedClinicalDataSign,
|
||||||
|
IsClinicalDataSign = u.IsClinicalDataSign,
|
||||||
|
IsFrontTaskNeedSignButNotSign = u.IsFrontTaskNeedSignButNotSign
|
||||||
|
})
|
||||||
|
.ToList()
|
||||||
|
}).Where(x => x.UnReadCanReadTaskCount > 0);
|
||||||
|
|
||||||
|
var pageList = await visitTaskQuery.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(IRUnReadSubjectView.UnReadCanReadTaskCount) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return (count, result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1210,7 +1253,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据
|
.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据
|
||||||
|
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory)
|
.WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory)
|
||||||
@@ -1242,14 +1285,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
|
var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
|
||||||
&& t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.SourceSubjectVisit.IsBaseLine == true).ToListAsync();
|
&& t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.SourceSubjectVisit.IsBaseLine == true).ToListAsync();
|
||||||
|
|
||||||
var judegeList= await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
|
var judegeList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
|
||||||
&& t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned).ToListAsync();
|
&& t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned).ToListAsync();
|
||||||
|
|
||||||
foreach (var item in judegeList)
|
foreach (var item in judegeList)
|
||||||
{
|
{
|
||||||
if (!baseLineTaskList.Any(t => t.SubjectId == item.SubjectId))
|
if (!baseLineTaskList.Any(t => t.SubjectId == item.SubjectId))
|
||||||
{
|
{
|
||||||
baseLineTaskList.Add(item);
|
baseLineTaskList.Add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1353,7 +1396,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
|
|
||||||
// 有序 一个受试者访视重阅未处理完,不能申请其他的
|
// 有序 一个受试者访视重阅未处理完,不能申请其他的
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect
|
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
|
||||||
@@ -1373,8 +1416,15 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
{
|
{
|
||||||
task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
|
task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
|
||||||
|
|
||||||
|
|
||||||
|
//在PM 的申请重阅的影响列表里也不能申请重阅
|
||||||
|
|
||||||
|
var pmApply = await _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit
|
||||||
|
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default).Include(t => t.OriginalReReadingTask).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
// 有序
|
// 有序
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
// 针对同一个subject 不同阅片人 针对同一个访视申请重阅,是允许的,所以同一阅片人,针对同一suject 有访视申请重阅还未处理,不允许申请重阅
|
// 针对同一个subject 不同阅片人 针对同一个访视申请重阅,是允许的,所以同一阅片人,针对同一suject 有访视申请重阅还未处理,不允许申请重阅
|
||||||
if (await _visitTaskReReadingRepository.AnyAsync(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect
|
if (await _visitTaskReReadingRepository.AnyAsync(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect
|
||||||
@@ -1386,10 +1436,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//在PM 的申请重阅的影响列表里也不能申请重阅
|
|
||||||
|
|
||||||
var pmApply = await _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit
|
|
||||||
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default).Include(t => t.OriginalReReadingTask).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
if (pmApply != null)
|
if (pmApply != null)
|
||||||
{
|
{
|
||||||
@@ -1418,13 +1464,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
throw new BusinessValidationFailedException(_localizer["VisitTask_LastReading"]);
|
throw new BusinessValidationFailedException(_localizer["VisitTask_LastReading"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology)))
|
if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology && t.ReadingTaskState==ReadingTaskState.HaveSigned)))
|
||||||
{
|
{
|
||||||
//---有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅
|
//---有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅
|
||||||
throw new BusinessValidationFailedException(_localizer["VisitTask_LastOncologistRecheck"]);
|
throw new BusinessValidationFailedException(_localizer["VisitTask_LastOncologistRecheck"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge)))
|
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned)))
|
||||||
{
|
{
|
||||||
//---有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅
|
//---有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅
|
||||||
throw new BusinessValidationFailedException(_localizer["VisitTask_LastAdjudicatorRecheck"]);
|
throw new BusinessValidationFailedException(_localizer["VisitTask_LastAdjudicatorRecheck"]);
|
||||||
@@ -1433,9 +1479,27 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Global)
|
|
||||||
|
if (pmApply != null)
|
||||||
{
|
{
|
||||||
//---无序阅片,仅仅允许IR 申请 全局和访视类型类别的任务进行重阅
|
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 )
|
||||||
|
.Where(t=>t.Id==originalTask.Id||t.Id==originalTask.JudgeVisitTaskId)
|
||||||
|
.AnyAsync(t => t.VisitTaskNum == task.VisitTaskNum))
|
||||||
|
{
|
||||||
|
//---当前为无序阅片,影像存在问题,项目组已申请回退,暂不能申请重阅
|
||||||
|
throw new BusinessValidationFailedException(_localizer["VisitTask_RandomInvalidRereading"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//也要支持裁判重阅240701
|
||||||
|
|
||||||
|
if (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Judge)
|
||||||
|
{
|
||||||
|
//---无序阅片,仅仅允许IR 申请 访视、裁判类型类别的任务进行重阅
|
||||||
throw new BusinessValidationFailedException(_localizer["VisitTask_IRGlobalRecheck"]);
|
throw new BusinessValidationFailedException(_localizer["VisitTask_IRGlobalRecheck"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1563,8 +1627,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze))
|
if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze))
|
||||||
{
|
{
|
||||||
|
await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.Id, RequestReReadingResultEnum = RequestReReadingResult.Invalid });
|
||||||
|
|
||||||
//---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作
|
//---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作
|
||||||
return ResponseOutput.NotOk(_localizer["VisitTask_ReapplyStatusConflict"]);
|
return ResponseOutput.Ok(string.Empty, msg:_localizer["VisitTask_ReapplyStatusConflict"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1640,7 +1706,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
}
|
}
|
||||||
|
|
||||||
//有序阅片
|
//有序阅片
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -1749,7 +1815,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
|
|
||||||
//有序阅片
|
//有序阅片
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
#region 有序 IR 申请 重阅 影响的其他访视查询
|
#region 有序 IR 申请 重阅 影响的其他访视查询
|
||||||
|
|
||||||
@@ -2157,8 +2223,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
foreach (var item in readingTableAnswerRowInfoList)
|
foreach (var item in readingTableAnswerRowInfoList)
|
||||||
{
|
{
|
||||||
|
|
||||||
var originalVisitTaskId= item.VisitTaskId;
|
var originalVisitTaskId = item.VisitTaskId;
|
||||||
var originalFristAddTaskId= item.FristAddTaskId;
|
var originalFristAddTaskId = item.FristAddTaskId;
|
||||||
|
|
||||||
item.Id = NewId.NextSequentialGuid();
|
item.Id = NewId.NextSequentialGuid();
|
||||||
item.VisitTaskId = newTask.Id;
|
item.VisitTaskId = newTask.Id;
|
||||||
@@ -2262,7 +2328,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
|
|
||||||
//有序
|
//有序
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.TaskAllocationState == TaskAllocationState.Allocated;
|
//Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == task.SubjectId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.TaskAllocationState == TaskAllocationState.Allocated;
|
||||||
@@ -2281,7 +2347,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
#region 方式二
|
#region 方式二
|
||||||
|
|
||||||
var origenalTask = influenceTaskList.Where(t => t.Id == task.Id).FirstOrDefault();
|
|
||||||
|
//pm退回的时候,影响的任务里不一定有该任务id 双重 分配了一个人,退回的时候,选择的是未分配的
|
||||||
|
|
||||||
|
//var origenalTask = influenceTaskList.Where(t => t.Id == task.Id).FirstOrDefault();
|
||||||
|
|
||||||
|
var origenalTask = await _visitTaskRepository.FindAsync(task.Id);
|
||||||
|
|
||||||
|
|
||||||
foreach (var influenceTask in influenceTaskList)
|
foreach (var influenceTask in influenceTaskList)
|
||||||
{
|
{
|
||||||
@@ -2340,7 +2412,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
await SetMedicalReviewInvalidAsync(currentVisitList);
|
await SetMedicalReviewInvalidAsync(currentVisitList);
|
||||||
|
|
||||||
var origenalTask = currentVisitList.Where(t => t.Id == task.Id).First();
|
//var origenalTask = currentVisitList.Where(t => t.Id == task.Id).First();
|
||||||
|
|
||||||
|
var origenalTask = await _visitTaskRepository.FindAsync(task.Id);
|
||||||
|
|
||||||
foreach (var influenceTask in currentVisitList)
|
foreach (var influenceTask in currentVisitList)
|
||||||
{
|
{
|
||||||
@@ -2586,7 +2660,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
//当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务
|
||||||
|
|
||||||
//有序
|
//有序
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (filterObj.ReadingCategory)
|
switch (filterObj.ReadingCategory)
|
||||||
@@ -2695,7 +2769,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
//throw new BusinessValidationFailedException("仅允许PM 同意 IR 申请的任务");
|
//throw new BusinessValidationFailedException("仅允许PM 同意 IR 申请的任务");
|
||||||
}
|
}
|
||||||
//PM 影响所有阅片人 仅仅针对访视 SPM CPM 掉用
|
//PM 影响所有阅片人 仅仅针对访视 SPM CPM 调用
|
||||||
|
|
||||||
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)
|
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))
|
|| (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && applyId == null))
|
||||||
@@ -2705,7 +2779,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
|
|
||||||
|
|
||||||
//有序
|
//有序
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
switch (filterObj.ReadingCategory)
|
switch (filterObj.ReadingCategory)
|
||||||
{
|
{
|
||||||
@@ -2764,7 +2838,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||||||
if (filterObj.ReadingCategory == ReadingCategory.Visit && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
if (filterObj.ReadingCategory == ReadingCategory.Visit && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
|
||||||
{
|
{
|
||||||
//有序
|
//有序
|
||||||
if (criterionConfig.IsReadingTaskViewInOrder)
|
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
// 当前任务及其之后的所有访视任务 两个阅片人的
|
// 当前任务及其之后的所有访视任务 两个阅片人的
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<TaskAllocationRule, TaskAllocationRuleDTO>()
|
CreateMap<TaskAllocationRule, TaskAllocationRuleDTO>()
|
||||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.Enroll.DoctorUser))
|
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.Enroll.DoctorUser))
|
||||||
.ForMember(o => o.CriterionReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Select(t => new TrialCriterionReadingCategory() { EnrollId = t.EnrollId, ReadingCategory = t.ReadingCategory, TrialReadingCriterionId = t.TrialReadingCriterionId })))
|
.ForMember(o => o.CriterionReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Select(t => new TrialCriterionReadingCategory() { EnrollId = t.EnrollId, ReadingCategory = t.ReadingCategory, TrialReadingCriterionId = t.TrialReadingCriterionId })))
|
||||||
.ForMember(o => o.TrialReadingCriterionList, t => t.MapFrom(u => u.Trial.ReadingQuestionCriterionTrialList.Where(t => t.IsConfirm)))
|
.ForMember(o => o.TrialReadingCriterionList, t => t.MapFrom(u => u.Trial.TrialReadingCriterionList.Where(t => t.IsConfirm)))
|
||||||
.ForMember(o => o.ReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Where(t=>t.TrialReadingCriterionId== trialReadingCriterionId).OrderBy(t => t.ReadingCategory).Select(t => t.ReadingCategory).ToList()))
|
.ForMember(o => o.ReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Where(t=>t.TrialReadingCriterionId== trialReadingCriterionId).OrderBy(t => t.ReadingCategory).Select(t => t.ReadingCategory).ToList()))
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -124,9 +124,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<VisitTask, VisitTaskView>().IncludeBase<VisitTask, VisitTaskViewBasic>()
|
CreateMap<VisitTask, VisitTaskView>().IncludeBase<VisitTask, VisitTaskViewBasic>()
|
||||||
|
|
||||||
|
|
||||||
.ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId))
|
.ForMember(o => o.TrialSiteId, t => t.MapFrom(u => u.Subject.TrialSiteId))
|
||||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
|
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindTrialSiteCode :*/ u.Subject.TrialSite.TrialSiteCode))
|
||||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code))
|
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindSubjectCode :*/ u.Subject.Code))
|
||||||
|
.ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.Subject.MedicalNo))
|
||||||
|
|
||||||
.ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode))
|
.ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode))
|
||||||
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
||||||
.ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
|
.ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
|
||||||
@@ -167,7 +169,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
CreateMap<VisitTask, IRHaveReadView>().IncludeBase<VisitTask, VisitTaskViewBasic>()
|
CreateMap<VisitTask, IRHaveReadView>().IncludeBase<VisitTask, VisitTaskViewBasic>()
|
||||||
.ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId))
|
.ForMember(o => o.TrialSiteId, t => t.MapFrom(u => u.Subject.TrialSiteId))
|
||||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
|
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
|
||||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code));
|
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code));
|
||||||
|
|
||||||
@@ -223,17 +225,19 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(o => o.Id, t => t.MapFrom(u => u.Id))
|
.ForMember(o => o.Id, t => t.MapFrom(u => u.Id))
|
||||||
.ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.VisitTask.Subject.MedicalNo))
|
.ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.VisitTask.Subject.MedicalNo))
|
||||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.VisitTask.DoctorUser))
|
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.VisitTask.DoctorUser))
|
||||||
.ForMember(o => o.MedicalManagerUser, t => t.MapFrom(u => u.MedicalManagerUser));
|
.ForMember(o => o.MedicalManagerUser, t => t.MapFrom(u => u.MedicalManagerUser))
|
||||||
|
.ForMember(o => o.AllocateTime, t => t.MapFrom(u => u.AllocateTime))
|
||||||
|
;
|
||||||
|
|
||||||
CreateMap<VisitTask, TaskMedicalReviewView>()
|
CreateMap<VisitTask, TaskMedicalReviewView>()
|
||||||
.ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName))
|
.ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName))
|
||||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
|
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u =>/* u.IsAnalysisCreate == true ? u.BlindTrialSiteCode :*/ u.Subject.TrialSite.TrialSiteCode))
|
||||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code));
|
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindSubjectCode :*/ u.Subject.Code));
|
||||||
|
|
||||||
CreateMap<VisitTask, GenerateMedicalReviewTaskView>()
|
CreateMap<VisitTask, GenerateMedicalReviewTaskView>()
|
||||||
.ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName))
|
.ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName))
|
||||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
|
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindTrialSiteCode :*/ u.Subject.TrialSite.TrialSiteCode))
|
||||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code))
|
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindSubjectCode :*/ u.Subject.Code))
|
||||||
.ForMember(o => o.GeneratedMedicalReviewCount, t => t.MapFrom(u => u.TaskMedicalReviewList.Count()))
|
.ForMember(o => o.GeneratedMedicalReviewCount, t => t.MapFrom(u => u.TaskMedicalReviewList.Count()))
|
||||||
.ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.Subject.MedicalNo))
|
.ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.Subject.MedicalNo))
|
||||||
.ForMember(o => o.IsGeneratedJudge, t => t.MapFrom(u => u.JudgeVisitTaskId != null))
|
.ForMember(o => o.IsGeneratedJudge, t => t.MapFrom(u => u.JudgeVisitTaskId != null))
|
||||||
@@ -257,27 +261,27 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
CreateMap<TaskMedicalReviewRule, TaskMedicalReviewRuleView>()
|
//CreateMap<TaskMedicalReviewRule, TaskMedicalReviewRuleView>()
|
||||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser))
|
// .ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser))
|
||||||
.ForMember(o => o.ActualVisitTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Visit && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect
|
// .ForMember(o => o.ActualVisitTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Visit && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect
|
||||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
// && t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||||
|
|
||||||
.ForMember(o => o.ActualJudgeTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
// .ForMember(o => o.ActualJudgeTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||||
|
|
||||||
.ForMember(o => o.ActualGlobalTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
// .ForMember(o => o.ActualGlobalTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||||
|
|
||||||
.ForMember(o => o.ActualTumorTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Oncology && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
// .ForMember(o => o.ActualTumorTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Oncology && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||||
|
|
||||||
.ForMember(o => o.GeneratedGlobalTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Global && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
// .ForMember(o => o.GeneratedGlobalTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Global && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||||
|
|
||||||
.ForMember(o => o.GeneratedJudgeTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Judge && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
// .ForMember(o => o.GeneratedJudgeTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Judge && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||||
|
|
||||||
.ForMember(o => o.GeneratedTumorTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Oncology && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
// .ForMember(o => o.GeneratedTumorTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Oncology && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||||
|
|
||||||
.ForMember(o => o.GeneratedVisitTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Visit && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })));
|
// .ForMember(o => o.GeneratedVisitTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Visit && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })));
|
||||||
|
|
||||||
CreateMap<TaskMedicalReviewRuleAddOrEdit, TaskMedicalReviewRule>();
|
CreateMap<TaskMedicalReviewRuleAddOrEdit, TaskMedicalReviewRule>();
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,9 @@ namespace IRaCIS.Application.Contracts
|
|||||||
public class GetBasicDataAllSelectInDto
|
public class GetBasicDataAllSelectInDto
|
||||||
{
|
{
|
||||||
public Guid? TrialReadingCriterionId { get; set; }
|
public Guid? TrialReadingCriterionId { get; set; }
|
||||||
}
|
|
||||||
|
public Guid? SystemReadingCriterionId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class GetTrialCriterionDictionaryListInDto
|
public class GetTrialCriterionDictionaryListInDto
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace IRaCIS.Application.Services
|
|||||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||||
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
||||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||||
|
private readonly IRepository<ReadingSystemCriterionDictionary> _readingSystemCriterionDictionaryRepository;
|
||||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||||
@@ -34,6 +34,7 @@ namespace IRaCIS.Application.Services
|
|||||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||||
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
||||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||||
|
IRepository<ReadingSystemCriterionDictionary> readingSystemCriterionDictionaryRepository,
|
||||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial
|
||||||
@@ -49,6 +50,7 @@ namespace IRaCIS.Application.Services
|
|||||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||||
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
||||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||||
|
this._readingSystemCriterionDictionaryRepository = readingSystemCriterionDictionaryRepository;
|
||||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||||
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
||||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||||
@@ -85,6 +87,18 @@ namespace IRaCIS.Application.Services
|
|||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取所有字典的Key
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<string>> GetAllDictionaryKey()
|
||||||
|
{
|
||||||
|
var result =await _dicRepository.Where(t => t.ParentId == null).OrderBy(x=>x.Code).Select(x => x.Code).ToListAsync();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加字典 的同时 一起添加子项 --New
|
/// 添加字典 的同时 一起添加子项 --New
|
||||||
@@ -462,11 +476,11 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
var result = searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
var result = searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||||
|
|
||||||
if (inDto.TrialReadingCriterionId == null)
|
if (inDto.TrialReadingCriterionId == null && inDto.SystemReadingCriterionId == null)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else
|
else if (inDto.TrialReadingCriterionId != null)
|
||||||
{
|
{
|
||||||
var trialCriterionType = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
var trialCriterionType = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
||||||
if (trialCriterionType == CriterionType.SelfDefine)
|
if (trialCriterionType == CriterionType.SelfDefine)
|
||||||
@@ -520,8 +534,52 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<string> selectCode = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemReadingCriterionId).Select(x => x.Code).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var criterionCode = await _dicRepository.Where(x => x.ConfigDictionary.Code == "Reading_eCRF_Criterion").Select(x => x.Code).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var item in criterionCode)
|
||||||
|
{
|
||||||
|
if (result.ContainsKey(item))
|
||||||
|
{
|
||||||
|
result[item] = new List<BasicDicSelect>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var criterionDictionList = await _readingSystemCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SystemReadingCriterionId).Select(x => new BasicDicSelect()
|
||||||
|
{
|
||||||
|
ChildGroup = x.Dictionary.ChildGroup,
|
||||||
|
Code = x.Dictionary.Code,
|
||||||
|
Description = x.Dictionary.Description,
|
||||||
|
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
||||||
|
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||||
|
ShowOrder = x.Dictionary.ShowOrder,
|
||||||
|
ParentCode = x.ParentCode,
|
||||||
|
Id = x.DictionaryId,
|
||||||
|
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
||||||
|
ParentId = x.Dictionary.ParentId,
|
||||||
|
Value = x.Dictionary.Value,
|
||||||
|
ValueCN = x.Dictionary.ValueCN
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
criterionDictionList = criterionDictionList.Where(x => selectCode.Contains(x.ParentCode)).ToList();
|
||||||
|
|
||||||
|
var criterionDic = criterionDictionList.GroupBy(x => x.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||||
|
|
||||||
|
foreach (var item in criterionDic)
|
||||||
|
{
|
||||||
|
result[item.Key] = item.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 稽查相关
|
#region 稽查相关
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using DocumentFormat.OpenXml.Presentation;
|
|||||||
using DocumentFormat.OpenXml.Spreadsheet;
|
using DocumentFormat.OpenXml.Spreadsheet;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Application.Interfaces;
|
using IRaCIS.Application.Interfaces;
|
||||||
|
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Contracts.DTO;
|
using IRaCIS.Core.Application.Contracts.DTO;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
@@ -59,7 +60,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
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()
|
var list = await _trialUseRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||||
.WhereIf(param.UserTypeId != null, t => t.User.UserTypeId == param.UserTypeId)
|
.WhereIf(param.UserTypeId != null, t => t.User.UserTypeId == param.UserTypeId)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.User.UserName.Contains(param.UserName))
|
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.User.UserName.Contains(param.UserName))
|
||||||
|
|
||||||
@@ -70,8 +71,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
t => (t.User.FullName).Contains(param.UserRealName))
|
t => (t.User.FullName).Contains(param.UserRealName))
|
||||||
.ProjectTo<TrialMaintenanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<TrialMaintenanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialUserList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialMaintenanceDTO));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialUserList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialMaintenanceDTO));
|
||||||
|
|
||||||
@@ -90,7 +93,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IActionResult> TrialSiteUserListExport(SiteCRCExportQueryDTO param,
|
public async Task<IActionResult> TrialSiteUserListExport(SiteCRCExportQueryDTO param,
|
||||||
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
|
[FromServices] IRepository<CommonDocument> _commonDocumentRepository,
|
||||||
[FromServices] IDictionaryService _dictionaryService,
|
[FromServices] IDictionaryService _dictionaryService,
|
||||||
[FromServices] IRepository<Trial> _trialRepository,
|
[FromServices] IRepository<Trial> _trialRepository,
|
||||||
[FromServices] IRepository<TrialSiteUser> _trialSiteUserRepository
|
[FromServices] IRepository<TrialSiteUser> _trialSiteUserRepository
|
||||||
@@ -100,21 +103,26 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
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()
|
var list = await _trialSiteUserRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||||
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
|
.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.SiteName), t => t.TrialSite.TrialSiteName.Contains(param.SiteName) || t.TrialSite.TrialSiteAliasName.Contains(param.SiteName))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName),
|
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName),
|
||||||
t => t.TrialSite.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
|
t => t.TrialSite.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode),
|
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode),
|
||||||
t => t.TrialSite.TrialSiteCode.Contains(param.TrialSiteCode))
|
t => t.TrialSite.TrialSiteCode.Contains(param.TrialSiteCode))
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator,
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator,
|
||||||
t => t.UserId == _userInfo.Id)
|
t => t.UserId == _userInfo.Id)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserKeyInfo), t => (t.User.FullName).Contains(param.UserKeyInfo)
|
.WhereIf(!string.IsNullOrWhiteSpace(param.UserKeyInfo), t => (t.User.FullName).Contains(param.UserKeyInfo)
|
||||||
|| t.User.UserName.Contains(param.UserKeyInfo) || t.User.EMail.Contains(param.UserKeyInfo))
|
|| t.User.UserName.Contains(param.UserKeyInfo) || t.User.EMail.Contains(param.UserKeyInfo))
|
||||||
|
|
||||||
.ProjectTo<SiteUserExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<SiteUserExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SiteUserExportDTO));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SiteUserExportDTO));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -145,9 +153,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var groupSelectIdQuery =
|
var groupSelectIdQuery =
|
||||||
_trialSiteSurveyRepository.Where(t => t.TrialId == queryParam.TrialId)
|
_trialSiteSurveyRepository.Where(t => t.TrialId == queryParam.TrialId)
|
||||||
.WhereIf(queryParam.SiteId != null, t => t.SiteId == queryParam.SiteId)
|
.WhereIf(queryParam.TrialSiteId != null, t => t.TrialSiteId == queryParam.TrialSiteId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryParam.FormWriterKeyInfo), t => (t.UserName).Contains(queryParam.FormWriterKeyInfo) || t.Email.Contains(queryParam.FormWriterKeyInfo) || t.Phone.Contains(queryParam.FormWriterKeyInfo))
|
.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)
|
.GroupBy(t => t.TrialSiteId)
|
||||||
.Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First());
|
.Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First());
|
||||||
|
|
||||||
|
|
||||||
@@ -161,13 +169,14 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
.WhereIf(!string.IsNullOrEmpty(queryParam.OrganizationName), t => t.OrganizationName.Contains(queryParam.OrganizationName))
|
.WhereIf(!string.IsNullOrEmpty(queryParam.OrganizationName), t => t.OrganizationName.Contains(queryParam.OrganizationName))
|
||||||
.ProjectTo<TrialSiteUserSummaryDto>(_mapper.ConfigurationProvider);
|
.ProjectTo<TrialSiteUserSummaryDto>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
data.List = await query.ToListAsync();
|
var list = await query.ToListAsync();
|
||||||
|
data.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
|
|
||||||
|
|
||||||
var exportInfo = data;
|
var exportInfo = data;
|
||||||
|
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserSummary_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialSiteUserSummaryDto));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserSummary_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialSiteUserSummaryDto));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -213,7 +222,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var list = await _subjectVisitRepository.Where(x => x.TrialId == visitSearchDTO.TrialId)
|
var list = await _subjectVisitRepository.Where(x => x.TrialId == visitSearchDTO.TrialId)
|
||||||
.Where(t => t.Subject.FinalSubjectVisitId != null ? t.VisitNum <= t.Subject.FinalSubjectVisit.VisitNum : true)
|
.Where(t => t.Subject.FinalSubjectVisitId != null ? t.VisitNum <= t.Subject.FinalSubjectVisit.VisitNum : true)
|
||||||
.WhereIf(visitSearchDTO.SiteId != null, t => t.SiteId == visitSearchDTO.SiteId)
|
.WhereIf(visitSearchDTO.TrialSiteId != null, t => t.TrialSiteId == visitSearchDTO.TrialSiteId)
|
||||||
.WhereIf(visitSearchDTO.SubjectId != null, t => t.Subject.Id == visitSearchDTO.SubjectId)
|
.WhereIf(visitSearchDTO.SubjectId != null, t => t.Subject.Id == visitSearchDTO.SubjectId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(visitSearchDTO.SubjectInfo), t => t.Subject.Code.Contains(visitSearchDTO.SubjectInfo))
|
.WhereIf(!string.IsNullOrEmpty(visitSearchDTO.SubjectInfo), t => t.Subject.Code.Contains(visitSearchDTO.SubjectInfo))
|
||||||
|
|
||||||
@@ -230,8 +239,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == visitSearchDTO.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == visitSearchDTO.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialCRCUploadImageList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialCRCUploadImageList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
|
||||||
@@ -265,7 +275,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
//.WhereIf(challengeQuery.ChallengeState != null, t => t.SubjectVisit.ChallengeState == challengeQuery.ChallengeState)
|
//.WhereIf(challengeQuery.ChallengeState != null, t => t.SubjectVisit.ChallengeState == challengeQuery.ChallengeState)
|
||||||
.WhereIf(challengeQuery.ReuploadEnum != null, t => t.ReuploadEnum == challengeQuery.ReuploadEnum)
|
.WhereIf(challengeQuery.ReuploadEnum != null, t => t.ReuploadEnum == challengeQuery.ReuploadEnum)
|
||||||
.WhereIf(challengeQuery.IsClosed != null, t => t.IsClosed == challengeQuery.IsClosed)
|
.WhereIf(challengeQuery.IsClosed != null, t => t.IsClosed == challengeQuery.IsClosed)
|
||||||
.WhereIf(challengeQuery.SiteId != null, t => t.SubjectVisit.SiteId == challengeQuery.SiteId)
|
.WhereIf(challengeQuery.TrialSiteId != null, t => t.SubjectVisit.TrialSiteId == challengeQuery.TrialSiteId)
|
||||||
.WhereIf(challengeQuery.SubjectId != null, t => t.SubjectVisit.SubjectId == challengeQuery.SubjectId)
|
.WhereIf(challengeQuery.SubjectId != null, t => t.SubjectVisit.SubjectId == challengeQuery.SubjectId)
|
||||||
.WhereIf(challengeQuery.CreateUserId != null, t => t.CreateUserId == challengeQuery.CreateUserId)
|
.WhereIf(challengeQuery.CreateUserId != null, t => t.CreateUserId == challengeQuery.CreateUserId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(challengeQuery.SubjectCode), t => t.SubjectVisit.Subject.Code.Contains(challengeQuery.SubjectCode))
|
.WhereIf(!string.IsNullOrEmpty(challengeQuery.SubjectCode), t => t.SubjectVisit.Subject.Code.Contains(challengeQuery.SubjectCode))
|
||||||
@@ -280,8 +290,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == challengeQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == challengeQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialQCImageChanllengeList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(QCChanllengeExportDto));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialQCImageChanllengeList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(QCChanllengeExportDto));
|
||||||
}
|
}
|
||||||
@@ -307,7 +318,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.Name), t => t.ShortName.Contains(param.Name))
|
.WhereIf(!string.IsNullOrWhiteSpace(param.Name), t => t.ShortName.Contains(param.Name))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(param.Sex), t => t.Sex.Contains(param.Sex))
|
.WhereIf(!string.IsNullOrWhiteSpace(param.Sex), t => t.Sex.Contains(param.Sex))
|
||||||
.WhereIf(param.Status != null, t => t.Status == param.Status)
|
.WhereIf(param.Status != null, t => t.Status == param.Status)
|
||||||
.WhereIf(param.SiteId != null, t => t.SiteId == param.SiteId)
|
.WhereIf(param.TrialSiteId != null, t => t.TrialSiteId == param.TrialSiteId)
|
||||||
// CRC 只负责他管理site的受试者
|
// CRC 只负责他管理site的受试者
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
.ProjectTo<SubjectExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<SubjectExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
@@ -317,8 +328,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
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));
|
||||||
|
|
||||||
@@ -425,8 +437,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
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.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(StaticData.Export.TrialSubjectProgressList_Export, exportInfo, /*"", */_commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectProgressDto));
|
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(StaticData.Export.TrialSubjectProgressList_Export, exportInfo, /*"", */_commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectProgressDto));
|
||||||
|
|
||||||
@@ -491,7 +504,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
}
|
}
|
||||||
|
|
||||||
var memoryStream2 = new MemoryStream();
|
var memoryStream2 = new MemoryStream();
|
||||||
wb.Write(memoryStream2,true);
|
wb.Write(memoryStream2, true);
|
||||||
memoryStream2.Seek(0, SeekOrigin.Begin);
|
memoryStream2.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
return new FileStreamResult(memoryStream2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
return new FileStreamResult(memoryStream2, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||||
@@ -519,16 +532,16 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(studyQuery.VisitPlanArray);
|
var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(studyQuery.VisitPlanArray);
|
||||||
var StudyMonitorQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId)
|
var StudyMonitorQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId)
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
|
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
||||||
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
||||||
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
||||||
.WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId)
|
.WhereIf(studyQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == studyQuery.TrialSiteId)
|
||||||
.Select(t => new UnionStudyMonitorExportDto()
|
.Select(t => new UnionStudyMonitorExportDto()
|
||||||
{
|
{
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||||
TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
|
TrialSiteAliasName = t.Subject.TrialSite.TrialSiteAliasName,
|
||||||
|
|
||||||
SubjectCode = t.Subject.Code,
|
SubjectCode = t.Subject.Code,
|
||||||
|
|
||||||
@@ -565,8 +578,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyUploadMonitor_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyMonitorExportDto));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyUploadMonitor_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyMonitorExportDto));
|
||||||
@@ -601,8 +615,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectReadingPeriodList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadPeriodExportDto));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectReadingPeriodList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadPeriodExportDto));
|
||||||
|
|
||||||
@@ -627,7 +642,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
var svExpression = QCCommon.GetDicomStudySubjectVisitFilter(studyQuery.VisitPlanArray);
|
var svExpression = QCCommon.GetDicomStudySubjectVisitFilter(studyQuery.VisitPlanArray);
|
||||||
|
|
||||||
var dicomStudyQuery = _repository.Where<DicomStudy>(t => t.TrialId == studyQuery.TrialId)
|
var dicomStudyQuery = _repository.Where<DicomStudy>(t => t.TrialId == studyQuery.TrialId)
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
|
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
||||||
.Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed)
|
.Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed)
|
||||||
@@ -641,9 +656,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
StudyCode = t.StudyCode,
|
StudyCode = t.StudyCode,
|
||||||
StudyTime = t.StudyTime,
|
StudyTime = t.StudyTime,
|
||||||
|
|
||||||
TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
|
TrialSiteAliasName = t.Subject.TrialSite.TrialSiteAliasName,
|
||||||
|
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||||
|
|
||||||
CheckState = t.SubjectVisit.CheckState,
|
CheckState = t.SubjectVisit.CheckState,
|
||||||
//Uploader = t.Uploader.UserName,
|
//Uploader = t.Uploader.UserName,
|
||||||
@@ -655,7 +670,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
|
|
||||||
var nodeDicomStudyQuery = _repository.Where<NoneDicomStudy>(t => t.TrialId == studyQuery.TrialId)
|
var nodeDicomStudyQuery = _repository.Where<NoneDicomStudy>(t => t.TrialId == studyQuery.TrialId)
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression2)
|
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression2)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
||||||
.Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed)
|
.Where(x => x.SubjectVisit.AuditState == AuditStateEnum.QCPassed)
|
||||||
@@ -670,9 +685,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
StudyCode = t.StudyCode,
|
StudyCode = t.StudyCode,
|
||||||
StudyTime = t.ImageDate,
|
StudyTime = t.ImageDate,
|
||||||
|
|
||||||
TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
|
TrialSiteAliasName = t.Subject.TrialSite.TrialSiteAliasName,
|
||||||
|
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||||
|
|
||||||
CheckState = t.SubjectVisit.CheckState,
|
CheckState = t.SubjectVisit.CheckState,
|
||||||
|
|
||||||
@@ -690,8 +705,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyExportDTO));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyExportDTO));
|
||||||
}
|
}
|
||||||
@@ -719,7 +735,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
var list = await _subjectVisitRepository.Where(x => x.TrialId == checkQuery.TrialId)
|
var list = await _subjectVisitRepository.Where(x => x.TrialId == checkQuery.TrialId)
|
||||||
.Where(x => x.AuditState == AuditStateEnum.QCPassed) //一致性核查中的,或者还没一致性核查的
|
.Where(x => x.AuditState == AuditStateEnum.QCPassed) //一致性核查中的,或者还没一致性核查的
|
||||||
.WhereIf(checkQuery.CheckState != null, t => t.CheckState == checkQuery.CheckState)
|
.WhereIf(checkQuery.CheckState != null, t => t.CheckState == checkQuery.CheckState)
|
||||||
.WhereIf(checkQuery.SiteId != null, t => t.SiteId == checkQuery.SiteId)
|
.WhereIf(checkQuery.TrialSiteId != null, t => t.TrialSiteId == checkQuery.TrialSiteId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(checkQuery.SubjectInfo), t => t.Subject.Code.Contains(checkQuery.SubjectInfo))
|
.WhereIf(!string.IsNullOrEmpty(checkQuery.SubjectInfo), t => t.Subject.Code.Contains(checkQuery.SubjectInfo))
|
||||||
.WhereIf(checkQuery.VisitPlanArray != null && checkQuery.VisitPlanArray?.Length > 0, svExpression)
|
.WhereIf(checkQuery.VisitPlanArray != null && checkQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site
|
||||||
@@ -729,8 +745,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == checkQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == checkQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectVisitCheckList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PMKCheckEXportDTO));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectVisitCheckList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PMKCheckEXportDTO));
|
||||||
}
|
}
|
||||||
@@ -756,7 +773,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
//.Where(t => t.IsAnalysisCreate == false && t.DoctorUserId != null)
|
//.Where(t => t.IsAnalysisCreate == false && t.DoctorUserId != null)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.ArmEnum != null, t => t.ArmEnum == queryVisitTask.ArmEnum)
|
||||||
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -780,8 +798,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadingTaskExportDto));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadingTaskExportDto));
|
||||||
}
|
}
|
||||||
@@ -808,7 +827,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
var list = await _repository.Where<VisitTaskReReading>(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId /*&& t.OriginalReReadingTask.IsAnalysisCreate == false*/)
|
var list = await _repository.Where<VisitTaskReReading>(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId /*&& t.OriginalReReadingTask.IsAnalysisCreate == false*/)
|
||||||
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskCode), t => t.OriginalReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!) || t.RootReReadingTask.TaskCode.Contains(queryVisitTask.TaskCode!))
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.OriginalReReadingTask.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.OriginalReReadingTask.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
.WhereIf(queryVisitTask.TaskState != null, t => t.OriginalReReadingTask.TaskState == queryVisitTask.TaskState)
|
||||||
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.OriginalReReadingTask.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
.WhereIf(queryVisitTask.ReReadingApplyState != null, t => t.OriginalReReadingTask.ReReadingApplyState == queryVisitTask.ReReadingApplyState)
|
||||||
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
.WhereIf(queryVisitTask.SubjectId != null, t => t.OriginalReReadingTask.SubjectId == queryVisitTask.SubjectId)
|
||||||
@@ -831,8 +850,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReReadingTaskExportDto));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReReadingTaskExportDto));
|
||||||
}
|
}
|
||||||
@@ -855,7 +875,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
{
|
{
|
||||||
|
|
||||||
var list = await _repository.Where<TaskMedicalReview>(t => t.VisitTask.TrialId == inQuery.TrialId)
|
var list = await _repository.Where<TaskMedicalReview>(t => t.VisitTask.TrialId == inQuery.TrialId)
|
||||||
.WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId)
|
.WhereIf(inQuery.TrialSiteId != null, t => t.VisitTask.Subject.TrialSiteId == inQuery.TrialSiteId)
|
||||||
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode))
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName))
|
||||||
@@ -865,7 +885,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
.WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory)
|
||||||
.WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState)
|
.WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState)
|
||||||
|
|
||||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||||
.ProjectTo<TaskMedicalReviewExportDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<TaskMedicalReviewExportDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
list = list.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
|
list = list.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
|
||||||
@@ -873,8 +893,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialMedicalReviewList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TaskMedicalReviewExportDto));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialMedicalReviewList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TaskMedicalReviewExportDto));
|
||||||
}
|
}
|
||||||
@@ -915,7 +936,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -941,7 +962,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
{
|
{
|
||||||
//找到一致性分析的结果
|
//找到一致性分析的结果
|
||||||
var selfAnalysisTask = allList.Where(t => t.IsSelfAnalysis == true && t.SubjectCode == item.SubjectCode && t.VisitTaskNum == item.VisitTaskNum && t.TaskName == t.TaskName).FirstOrDefault();
|
var selfAnalysisTask = allList.Where(t => t.IsSelfAnalysis == true && t.SubjectCode == item.SubjectCode && t.VisitTaskNum == item.VisitTaskNum && t.TaskName == t.TaskName && t.UserName == item.UserName).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
//因为基线的评估结果是 是否存在疾病 而 其他访视的结果是 整体肿瘤评估结果 是用不同的枚举翻译的 所以这里手动翻译 不把翻译逻辑耦合到通用的翻译代码里面 在此特殊处理
|
//因为基线的评估结果是 是否存在疾病 而 其他访视的结果是 整体肿瘤评估结果 是用不同的枚举翻译的 所以这里手动翻译 不把翻译逻辑耦合到通用的翻译代码里面 在此特殊处理
|
||||||
@@ -957,8 +978,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
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.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.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSelfAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SelftAnalysisExport));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSelfAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SelftAnalysisExport));
|
||||||
}
|
}
|
||||||
@@ -998,7 +1020,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -1014,7 +1036,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
.ProjectTo<GroupAnalysisExport>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<GroupAnalysisExport>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
//找到原任务(非组间一致性分析的)
|
||||||
var list = allList.Where(t => t.IsSelfAnalysis == null).OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
|
var list = allList.Where(t => t.IsSelfAnalysis == null).OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
|
||||||
|
|
||||||
|
|
||||||
@@ -1060,8 +1082,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
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.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.List = ExportExcelConverterDate.ConvertToClientTimeInObject(newList, _userInfo.TimeZoneId); ;
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialGroupAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(GroupAnalysisExport));
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialGroupAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(GroupAnalysisExport));
|
||||||
}
|
}
|
||||||
@@ -1128,30 +1151,41 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
{
|
{
|
||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
|
|
||||||
|
var resultList = list.Where(t => t.ReadingCategory != ReadingCategory.Judge).ToList();
|
||||||
|
|
||||||
|
if (arbitrationRule == ArbitrationRule.Visit)
|
||||||
{
|
{
|
||||||
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
|
||||||
foreach (var item in resultList)
|
&& (t.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Judge]) == item.VisitTaskNum)?.JudgeArmEnum == item.ArmEnum ? true : false;
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果没有产生裁判,默认选择R1
|
||||||
|
|
||||||
|
//找到没有裁判的访视任务
|
||||||
|
var notJudgeList = resultList.GroupBy(t => new { t.SubjectCode, t.VisitTaskNum }).Where(g => g.All(t => t.IsGenerateJudge == false)).Select(g => new { g.Key.SubjectCode, g.Key.VisitTaskNum }).ToList();
|
||||||
|
|
||||||
|
foreach (var item in resultList)
|
||||||
|
{
|
||||||
|
if (notJudgeList.Any(t => t.SubjectCode == item.SubjectCode && t.VisitTaskNum == item.VisitTaskNum) && item.ArmEnum == Arm.DoubleReadingArm1)
|
||||||
|
{
|
||||||
|
item.IsGenerateJudge = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1190,7 +1224,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -1205,7 +1239,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
||||||
.ProjectTo<OverallTumorEvaluationExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType }).ToListAsync();
|
.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.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList();
|
||||||
|
|
||||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
exportInfo.CriterionName = criterion.CriterionName;
|
exportInfo.CriterionName = criterion.CriterionName;
|
||||||
@@ -1213,8 +1247,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.OverallTumorEvaluation_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(OverallTumorEvaluationExport), criterion.CriterionType);
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.OverallTumorEvaluation_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(OverallTumorEvaluationExport), criterion.CriterionType);
|
||||||
@@ -1246,7 +1281,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -1267,13 +1302,14 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
{
|
{
|
||||||
var list = await query.ProjectTo<RECIST1Point1EvaluationOfTumorEfficacyExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType }).ToListAsync();
|
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 = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList();
|
||||||
|
|
||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||||
|
|
||||||
exportInfo.List = list;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1EvaluationOfTumorEfficacyExport), criterion.CriterionType);
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1EvaluationOfTumorEfficacyExport), criterion.CriterionType);
|
||||||
@@ -1305,7 +1341,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,t.ArbitrationRule }).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)
|
var query = _repository.Where<VisitTask>(t => t.TrialId == queryVisitTask.TrialId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false && t.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||||
|
|
||||||
@@ -1314,7 +1350,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
//.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
.WhereIf(queryVisitTask.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == queryVisitTask.TrialReadingCriterionId)
|
||||||
.WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
|
.WhereIf(queryVisitTask.TrialSiteId != null, t => t.Subject.TrialSiteId == queryVisitTask.TrialSiteId)
|
||||||
|
|
||||||
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
.WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
|
||||||
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
.WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
|
||||||
@@ -1335,7 +1371,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();
|
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();
|
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList();
|
||||||
|
|
||||||
var exportList = list.SelectMany(c =>
|
var exportList = list.SelectMany(c =>
|
||||||
{
|
{
|
||||||
@@ -1345,6 +1381,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
var clone = c.Clone();
|
var clone = c.Clone();
|
||||||
clone.LessionCode = u.LessionCode;
|
clone.LessionCode = u.LessionCode;
|
||||||
clone.LessionType = u.LessionType;
|
clone.LessionType = u.LessionType;
|
||||||
|
clone.BeforeTranslateLessionTypeValue = u.LessionType;
|
||||||
|
|
||||||
clone.IsLymph = u.IsLymph;
|
clone.IsLymph = u.IsLymph;
|
||||||
|
|
||||||
@@ -1363,8 +1400,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||||
exportInfo.List = exportList;
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(exportList, _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1DetailedOfEvaluatedLesionExport), criterion.CriterionType);
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1DetailedOfEvaluatedLesionExport), criterion.CriterionType);
|
||||||
|
|
||||||
@@ -1396,8 +1434,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||||||
|
|
||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||||
exportInfo.List = exportList;
|
|
||||||
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(exportList, _userInfo.TimeZoneId); ;
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PCWG3DetailedOfEvaluatedLesionExport), criterion.CriterionType);
|
return await ExcelExportHelper.DataExportAsync(StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PCWG3DetailedOfEvaluatedLesionExport), criterion.CriterionType);
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using EasyCaching.Core;
|
using EasyCaching.Core;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using OfficeOpenXml.FormulaParsing.Utilities;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
@@ -41,11 +40,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
var cacheList= _provider.Get<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front).Value;
|
var cacheList= _provider.Get<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front).Value;
|
||||||
|
|
||||||
if(cacheList != null && cacheList.Count!=0)
|
//if(cacheList != null && cacheList.Count!=0)
|
||||||
{
|
//{
|
||||||
return cacheList;
|
// return cacheList;
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
{
|
||||||
var list = await _internationalizationRepository.Where(t => t.InternationalizationType == 0).Select(t => new InternationalizationSimpleDto()
|
var list = await _internationalizationRepository.Where(t => t.InternationalizationType == 0).Select(t => new InternationalizationSimpleDto()
|
||||||
{
|
{
|
||||||
@@ -144,7 +143,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
await _internationalizationRepository.SaveChangesAsync();
|
await _internationalizationRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
//清理缓存
|
||||||
|
_provider.Set<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front, new List<InternationalizationSimpleDto>(), TimeSpan.FromDays(1));
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
@@ -164,26 +164,29 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType,
|
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType,
|
||||||
|
|
||||||
VerifyMsg = $"该类型已有{addOrEditInternationalization.Code}名称的国际化标识",
|
VerifyMsg = $"该类型已有{addOrEditInternationalization.Code}名称的国际化标识",
|
||||||
IsVerify = internationalizationType == 1
|
IsVerify = true /*internationalizationType == 1*/
|
||||||
};
|
};
|
||||||
|
|
||||||
//前端验证标识重复与否
|
//前端验证标识重复与否
|
||||||
var verifyExp2 = new EntityVerifyExp<Internationalization>()
|
//var verifyExp2 = new EntityVerifyExp<Internationalization>()
|
||||||
{
|
//{
|
||||||
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType && t.Description == addOrEditInternationalization.Description,
|
// VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType && t.Description == addOrEditInternationalization.Description,
|
||||||
|
|
||||||
VerifyMsg = $"该类型已有{addOrEditInternationalization.Description}下的{addOrEditInternationalization.Code}名称的国际化标识",
|
// VerifyMsg = $"该类型已有{addOrEditInternationalization.Description}下的{addOrEditInternationalization.Code}名称的国际化标识",
|
||||||
IsVerify = internationalizationType == 0
|
// IsVerify = internationalizationType == 0
|
||||||
};
|
//};
|
||||||
|
|
||||||
var entity = await _internationalizationRepository.InsertOrUpdateAsync(addOrEditInternationalization, true, verifyExp1, verifyExp2);
|
var entity = await _internationalizationRepository.InsertOrUpdateAsync(addOrEditInternationalization, true, verifyExp1/*, verifyExp2*/);
|
||||||
|
|
||||||
if (addOrEditInternationalization.InternationalizationType == 1)
|
if (addOrEditInternationalization.InternationalizationType == 1)
|
||||||
{
|
{
|
||||||
await InternationalizationHelper.AddOrUpdateJsonKeyValueAsync(entity.Code, addOrEditInternationalization.Value, addOrEditInternationalization.ValueCN);
|
await InternationalizationHelper.AddOrUpdateJsonKeyValueAsync(entity.Code, addOrEditInternationalization.Value, addOrEditInternationalization.ValueCN);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//清理缓存
|
||||||
|
_provider.Set<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front, new List<InternationalizationSimpleDto>(), TimeSpan.FromDays(1));
|
||||||
|
}
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -193,6 +196,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
public async Task<IResponseOutput> DeleteInternationalization(Guid internationalizationId)
|
public async Task<IResponseOutput> DeleteInternationalization(Guid internationalizationId)
|
||||||
{
|
{
|
||||||
var success = await _internationalizationRepository.DeleteFromQueryAsync(t => t.Id == internationalizationId, true);
|
var success = await _internationalizationRepository.DeleteFromQueryAsync(t => t.Id == internationalizationId, true);
|
||||||
|
|
||||||
|
//清理缓存
|
||||||
|
_provider.Set<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front, new List<InternationalizationSimpleDto>(), TimeSpan.FromDays(1));
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using AutoMapper;
|
|||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
@@ -20,6 +21,8 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
Task SiteSurveyRejectEmail(MimeMessage messageToSend);
|
Task SiteSurveyRejectEmail(MimeMessage messageToSend);
|
||||||
|
|
||||||
|
Task SenMFAVerifyEmail(Guid userId, string userName, string emailAddress, int verificationCode, UserMFAType mfaType = UserMFAType.Login);
|
||||||
|
|
||||||
Task SendMailEditEmail(Guid userId, string userName, string emailAddress, int verificationCode);
|
Task SendMailEditEmail(Guid userId, string userName, string emailAddress, int verificationCode);
|
||||||
|
|
||||||
Task AnolymousSendEmailForResetAccount(string emailAddress, int verificationCode);
|
Task AnolymousSendEmailForResetAccount(string emailAddress, int verificationCode);
|
||||||
@@ -58,7 +61,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MailVerificationService(IRepository<VerificationCode> verificationCodeRepository,
|
public MailVerificationService(IRepository<VerificationCode> verificationCodeRepository,
|
||||||
IRepository<SystemBasicData> systemBasicDatarepository,
|
IRepository<SystemBasicData> systemBasicDatarepository,
|
||||||
IRepository<User> userRepository,
|
IRepository<User> userRepository,
|
||||||
ITokenService tokenService,
|
ITokenService tokenService,
|
||||||
@@ -70,9 +73,6 @@ namespace IRaCIS.Application.Services
|
|||||||
_systemEmailConfig = systemEmailConfig.CurrentValue;
|
_systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||||
_verificationCodeRepository = verificationCodeRepository;
|
_verificationCodeRepository = verificationCodeRepository;
|
||||||
_systemBasicDatarepository = systemBasicDatarepository;
|
_systemBasicDatarepository = systemBasicDatarepository;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_tokenService = tokenService;
|
_tokenService = tokenService;
|
||||||
_userRepository = userRepository;
|
_userRepository = userRepository;
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
@@ -80,6 +80,77 @@ namespace IRaCIS.Application.Services
|
|||||||
_userTypeRepository = userTypeRepository;
|
_userTypeRepository = userTypeRepository;
|
||||||
_doctorTypeRepository = doctorTypeRepository;
|
_doctorTypeRepository = doctorTypeRepository;
|
||||||
_distributedLockProvider = distributedLockProvider;
|
_distributedLockProvider = distributedLockProvider;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private string ReplaceCompanyName(string needDealtxt)
|
||||||
|
{
|
||||||
|
var str= needDealtxt.Replace("{company}", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyName : _systemEmailConfig.CompanyNameCN)
|
||||||
|
.Replace("{company abbreviation}", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN);
|
||||||
|
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
//MFA
|
||||||
|
public async Task SenMFAVerifyEmail(Guid userId, string userName, string emailAddress, int verificationCode, UserMFAType mfaType = UserMFAType.Login)
|
||||||
|
{
|
||||||
|
var messageToSend = new MimeMessage();
|
||||||
|
//发件地址
|
||||||
|
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
|
//收件地址
|
||||||
|
messageToSend.To.Add(new MailboxAddress(userName, emailAddress));
|
||||||
|
//主题
|
||||||
|
//---[来自{0}] 关于MFA邮箱验证的提醒
|
||||||
|
messageToSend.Subject = _localizer[mfaType == UserMFAType.Login? "Mail_EmailMFALoginTopic":"Mail_EmailMFAUnlockTopic", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||||
|
|
||||||
|
var builder = new BodyBuilder();
|
||||||
|
|
||||||
|
|
||||||
|
var pathToFile = _hostEnvironment.WebRootPath
|
||||||
|
+ 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))
|
||||||
|
{
|
||||||
|
var templateInfo = SourceReader.ReadToEnd();
|
||||||
|
|
||||||
|
|
||||||
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
|
|
||||||
|
userName,
|
||||||
|
_localizer[mfaType == UserMFAType.Login ? "Mail_EmailMFALoginEmail": "Mail_EmailMFAUnlockEmail"],
|
||||||
|
verificationCode
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
messageToSend.Body = builder.ToMessageBody();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EventHandler<MessageSentEventArgs> sucessHandle = (sender, args) =>
|
||||||
|
{
|
||||||
|
// args.Response
|
||||||
|
var code = verificationCode.ToString();
|
||||||
|
_ = _verificationCodeRepository.AddAsync(new VerificationCode()
|
||||||
|
{
|
||||||
|
CodeType = 0,
|
||||||
|
HasSend = true,
|
||||||
|
Code = code,
|
||||||
|
UserId = userId,
|
||||||
|
ExpirationTime = DateTime.Now.AddMinutes(3)
|
||||||
|
}).Result;
|
||||||
|
_ = _verificationCodeRepository.SaveChangesAsync().Result;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig, sucessHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
//重置邮箱
|
//重置邮箱
|
||||||
@@ -95,7 +166,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(userName, emailAddress));
|
messageToSend.To.Add(new MailboxAddress(userName, emailAddress));
|
||||||
//主题
|
//主题
|
||||||
//---[来自展影IRC] 关于重置邮箱的提醒
|
//---[来自展影IRC] 关于重置邮箱的提醒
|
||||||
messageToSend.Subject = _localizer["Mail_EmailResetReminder"];
|
messageToSend.Subject = _localizer["Mail_EmailResetReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||||
|
|
||||||
var builder = new BodyBuilder();
|
var builder = new BodyBuilder();
|
||||||
|
|
||||||
@@ -112,11 +183,12 @@ namespace IRaCIS.Application.Services
|
|||||||
var templateInfo = SourceReader.ReadToEnd();
|
var templateInfo = SourceReader.ReadToEnd();
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
|
|
||||||
|
userName,
|
||||||
//---尊敬的
|
//---尊敬的
|
||||||
_localizer["Mail_Dear", userName],
|
//_localizer["Mail_Dear", userName],
|
||||||
//---您正在进行邮箱重置操作
|
//---您正在进行邮箱重置操作
|
||||||
_localizer["Mail_ResettingEmail"],
|
_localizer["Mail_ResettingEmail"],
|
||||||
verificationCode
|
verificationCode
|
||||||
);
|
);
|
||||||
@@ -161,7 +233,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
||||||
//主题
|
//主题
|
||||||
//---[来自展影IRC] 关于重置密码的提醒
|
//---[来自展影IRC] 关于重置密码的提醒
|
||||||
messageToSend.Subject = _localizer["Mail_IRCResettingPassword"];
|
messageToSend.Subject = _localizer["Mail_IRCResettingPassword", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -179,8 +251,8 @@ namespace IRaCIS.Application.Services
|
|||||||
var templateInfo = SourceReader.ReadToEnd();
|
var templateInfo = SourceReader.ReadToEnd();
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
"",
|
"Sir/Madam",
|
||||||
//---您正在进行邮箱重置密码操作
|
//---您正在进行邮箱重置密码操作
|
||||||
_localizer["Mail_ResettingPassword"],
|
_localizer["Mail_ResettingPassword"],
|
||||||
verificationCode
|
verificationCode
|
||||||
@@ -229,7 +301,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
||||||
//主题
|
//主题
|
||||||
//---[来自展影IRC]的提醒
|
//---[来自展影IRC]的提醒
|
||||||
messageToSend.Subject = _localizer["Mail_ImagingIRCReminder"];
|
messageToSend.Subject = _localizer["Mail_ImagingIRCReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -247,9 +319,10 @@ namespace IRaCIS.Application.Services
|
|||||||
var templateInfo = SourceReader.ReadToEnd();
|
var templateInfo = SourceReader.ReadToEnd();
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
|
"Sir/Madam",
|
||||||
//---您正在参与展影医疗IRC项目
|
//---您正在参与展影医疗IRC项目
|
||||||
_localizer["Mail_IRCProject"],
|
_localizer["Mail_IRCProject", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN],
|
||||||
verificationCode
|
verificationCode
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -294,7 +367,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
||||||
//主题
|
//主题
|
||||||
//$"[来自展影IRC] [{researchProgramNo}] 关于中心调研的提醒";
|
//$"[来自展影IRC] [{researchProgramNo}] 关于中心调研的提醒";
|
||||||
messageToSend.Subject = _localizer["Mail_ProjectParticipationReminder", researchProgramNo];
|
messageToSend.Subject = _localizer["Mail_ProjectParticipationReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN, researchProgramNo];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -313,10 +386,10 @@ namespace IRaCIS.Application.Services
|
|||||||
var templateInfo = SourceReader.ReadToEnd();
|
var templateInfo = SourceReader.ReadToEnd();
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
"",
|
"Sir/Madam",
|
||||||
//---您正在参与展影医疗IRC项目中心调研工作
|
//---您正在参与展影医疗IRC项目中心调研工作
|
||||||
_localizer["Mail_CenterResearchReminder"],
|
_localizer["Mail_CenterResearchReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN],
|
||||||
verificationCode
|
verificationCode
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -374,7 +447,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
||||||
//主题
|
//主题
|
||||||
//---[来自展影IRC] 关于创建账户的提醒
|
//---[来自展影IRC] 关于创建账户的提醒
|
||||||
messageToSend.Subject = _localizer["Mail_AccountCreationReminder"];
|
messageToSend.Subject = _localizer["Mail_AccountCreationReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -402,7 +475,7 @@ namespace IRaCIS.Application.Services
|
|||||||
var templateInfo = SourceReader.ReadToEnd();
|
var templateInfo = SourceReader.ReadToEnd();
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
sysUserInfo.FullName,
|
sysUserInfo.FullName,
|
||||||
sysUserInfo.UserName,
|
sysUserInfo.UserName,
|
||||||
sysUserInfo.UserTypeRole.UserTypeShortName,
|
sysUserInfo.UserTypeRole.UserTypeShortName,
|
||||||
@@ -430,7 +503,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
||||||
//主题
|
//主题
|
||||||
//---[来自展影IRC] 关于重置账户密码的提醒
|
//---[来自展影IRC] 关于重置账户密码的提醒
|
||||||
messageToSend.Subject = _localizer["Mail_AccountPasswordResetReminder"];
|
messageToSend.Subject = _localizer["Mail_AccountPasswordResetReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -449,7 +522,7 @@ namespace IRaCIS.Application.Services
|
|||||||
var templateInfo = SourceReader.ReadToEnd();
|
var templateInfo = SourceReader.ReadToEnd();
|
||||||
|
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
sysUserInfo.FullName,
|
sysUserInfo.FullName,
|
||||||
sysUserInfo.UserName,
|
sysUserInfo.UserName,
|
||||||
sysUserInfo.UserTypeRole.UserTypeShortName,
|
sysUserInfo.UserTypeRole.UserTypeShortName,
|
||||||
@@ -480,7 +553,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
||||||
//主题
|
//主题
|
||||||
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
||||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", trialInfo.ResearchProgramNo];
|
messageToSend.Subject = _localizer["Mail_InvitationEmail", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN, trialInfo.ResearchProgramNo];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -511,7 +584,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
sysUserInfo.FullName,
|
sysUserInfo.FullName,
|
||||||
trialInfo.ExperimentName,
|
trialInfo.ExperimentName,
|
||||||
trialInfo.ResearchProgramNo,
|
trialInfo.ResearchProgramNo,
|
||||||
@@ -544,7 +617,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(String.Empty, sysUserInfo.EMail));
|
messageToSend.To.Add(new MailboxAddress(String.Empty, sysUserInfo.EMail));
|
||||||
//主题
|
//主题
|
||||||
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
||||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", trialInfo.ResearchProgramNo];
|
messageToSend.Subject = _localizer["Mail_InvitationEmail", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN,trialInfo.ResearchProgramNo];
|
||||||
|
|
||||||
|
|
||||||
var builder = new BodyBuilder();
|
var builder = new BodyBuilder();
|
||||||
@@ -573,7 +646,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
sysUserInfo.FullName,
|
sysUserInfo.FullName,
|
||||||
trialInfo.ExperimentName,
|
trialInfo.ExperimentName,
|
||||||
trialInfo.ResearchProgramNo,
|
trialInfo.ResearchProgramNo,
|
||||||
@@ -659,7 +732,7 @@ namespace IRaCIS.Application.Services
|
|||||||
messageToSend.To.Add(new MailboxAddress(doctor.FullName, doctor.EMail));
|
messageToSend.To.Add(new MailboxAddress(doctor.FullName, doctor.EMail));
|
||||||
//主题
|
//主题
|
||||||
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
||||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", trialInfo.ResearchProgramNo];
|
messageToSend.Subject = _localizer["Mail_InvitationEmail", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN, trialInfo.ResearchProgramNo];
|
||||||
|
|
||||||
|
|
||||||
var builder = new BodyBuilder();
|
var builder = new BodyBuilder();
|
||||||
@@ -695,7 +768,7 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
||||||
|
|
||||||
builder.HtmlBody = string.Format(templateInfo,
|
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||||
sysUserInfo.FullName,
|
sysUserInfo.FullName,
|
||||||
trialInfo.ExperimentName,
|
trialInfo.ExperimentName,
|
||||||
trialInfo.ResearchProgramNo,
|
trialInfo.ResearchProgramNo,
|
||||||
|
|||||||
@@ -182,6 +182,9 @@ namespace IRaCIS.Application.Contracts
|
|||||||
public string OptUserName { get; set; } = string.Empty;
|
public string OptUserName { get; set; } = string.Empty;
|
||||||
public DateTime? OptTime { get; set; }
|
public DateTime? OptTime { get; set; }
|
||||||
public string? OptTimeStr => OptTime?.ToString("yyyy-MM-dd HH:mm:ss");
|
public string? OptTimeStr => OptTime?.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
|
|
||||||
|
public string DoctorUserName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DoctorOptDTO
|
public class DoctorOptDTO
|
||||||
|
|||||||
@@ -432,11 +432,11 @@ namespace IRaCIS.Application.Services
|
|||||||
//判断 合作协议、正式简历 是否有。如果没有,显示提示信息,并且不能保存
|
//判断 合作协议、正式简历 是否有。如果没有,显示提示信息,并且不能保存
|
||||||
var attachmentList = await _attachmentRepository.Where(u => u.DoctorId == auditResumeParam.Id)
|
var attachmentList = await _attachmentRepository.Where(u => u.DoctorId == auditResumeParam.Id)
|
||||||
.Select(u => u.Type).ToListAsync();
|
.Select(u => u.Type).ToListAsync();
|
||||||
if (auditResumeParam.ResumeStatus == ResumeStatusEnum.Pass && ((!attachmentList.Contains("Resume")) || (!attachmentList.Contains("Consultant Agreement"))))
|
//if (auditResumeParam.ResumeStatus == ResumeStatusEnum.Pass && ((!attachmentList.Contains("Resume")) || (!attachmentList.Contains("Consultant Agreement"))))
|
||||||
{
|
//{
|
||||||
//---Resume & Consultant Agreement must be upload
|
// //---Resume & Consultant Agreement must be upload
|
||||||
return ResponseOutput.NotOk(_localizer["Doctor_RequiredDocumentsError"]);
|
// return ResponseOutput.NotOk(_localizer["Doctor_RequiredDocumentsError"]);
|
||||||
}
|
//}
|
||||||
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == auditResumeParam.Id, u => new Doctor()
|
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == auditResumeParam.Id, u => new Doctor()
|
||||||
{
|
{
|
||||||
CooperateStatus = auditResumeParam.CooperateStatus,
|
CooperateStatus = auditResumeParam.CooperateStatus,
|
||||||
|
|||||||
@@ -147,12 +147,12 @@ namespace IRaCIS.Application.Services
|
|||||||
var successs = await _repository.BatchUpdateAsync<Doctor>(o => o.Id == updateGCPExperienceParam.Id, u => new Doctor()
|
var successs = await _repository.BatchUpdateAsync<Doctor>(o => o.Id == updateGCPExperienceParam.Id, u => new Doctor()
|
||||||
{
|
{
|
||||||
GCP = updateGCPExperienceParam.GCP,
|
GCP = updateGCPExperienceParam.GCP,
|
||||||
GCPId = updateGCPExperienceParam.GCP==0&&updateGCPExperienceParam.GCPId==null?Guid.Empty: updateGCPExperienceParam.GCPId!.Value
|
GCPId = (updateGCPExperienceParam.GCP==0||updateGCPExperienceParam.GCPId==null)?Guid.Empty: updateGCPExperienceParam.GCPId!.Value
|
||||||
});
|
});
|
||||||
|
|
||||||
if (updateGCPExperienceParam.GCP == 0 && updateGCPExperienceParam.GCPId != null)
|
if (updateGCPExperienceParam.GCP == 0 )
|
||||||
{
|
{
|
||||||
await _repository.BatchDeleteAsync<Attachment>(a => a.Id == updateGCPExperienceParam.GCPId);
|
await _repository.BatchDeleteAsync<Attachment>(a => a.DoctorId == updateGCPExperienceParam.Id && a.Type=="GCP");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResponseOutput.Result(successs, updateGCPExperienceParam.GCPId.ToString());
|
return ResponseOutput.Result(successs, updateGCPExperienceParam.GCPId.ToString());
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<AddOrUpdateDicDTO, Dictionary>().ReverseMap();
|
CreateMap<AddOrUpdateDicDTO, Dictionary>().ReverseMap();
|
||||||
|
|
||||||
//医生列表、项目显示列表模型转换
|
//医生列表、项目显示列表模型转换
|
||||||
CreateMap<DoctorDTO, SelectionReviewerDTO>();
|
CreateMap<DoctorDTO, SelectionReviewerDTO>()
|
||||||
|
;
|
||||||
|
|
||||||
CreateMap<User, UserBasicInfo>()
|
CreateMap<User, UserBasicInfo>()
|
||||||
.ForMember(d => d.UserTypeShortName, u => u.MapFrom(t => t.UserTypeRole.UserTypeShortName))
|
.ForMember(d => d.UserTypeShortName, u => u.MapFrom(t => t.UserTypeRole.UserTypeShortName))
|
||||||
@@ -80,7 +81,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.UserName, u => u.MapFrom(doctor => doctor.LastName + " / " + doctor.FirstName));
|
.ForMember(d => d.UserName, u => u.MapFrom(doctor => doctor.LastName + " / " + doctor.FirstName));
|
||||||
|
|
||||||
#region 医生基本信息
|
#region 医生基本信息
|
||||||
CreateMap<Doctor, SelectionReviewerDTO>();
|
CreateMap<Doctor, SelectionReviewerDTO>()
|
||||||
|
.ForMember(d => d.DoctorUserName, u => u.MapFrom(t => t.User.UserName));
|
||||||
CreateMap<Doctor, DoctorDTO>().IncludeMembers(t => t.Hospital).Include<Doctor, SelectionReviewerDTO>()
|
CreateMap<Doctor, DoctorDTO>().IncludeMembers(t => t.Hospital).Include<Doctor, SelectionReviewerDTO>()
|
||||||
.ForMember(d => d.AccountUserName, u => u.MapFrom(s => s.EnrollList.Where(t=>t.DoctorUserId!=null).Select(c=>c.DoctorUser.UserName).FirstOrDefault()))
|
.ForMember(d => d.AccountUserName, u => u.MapFrom(s => s.EnrollList.Where(t=>t.DoctorUserId!=null).Select(c=>c.DoctorUser.UserName).FirstOrDefault()))
|
||||||
.ForMember(d => d.Department, u => u.MapFrom(s => s.Department.Value))
|
.ForMember(d => d.Department, u => u.MapFrom(s => s.Department.Value))
|
||||||
@@ -121,6 +123,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<Doctor, SpecialtyDTO>()
|
CreateMap<Doctor, SpecialtyDTO>()
|
||||||
.ForMember(o => o.Speciality, t => t.MapFrom(u => u.Speciality.Value))
|
.ForMember(o => o.Speciality, t => t.MapFrom(u => u.Speciality.Value))
|
||||||
|
.ForMember(o => o.SpecialityCN, t => t.MapFrom(u => u.Speciality.ValueCN))
|
||||||
.ForMember(o => o.DictionaryList, t => t.MapFrom(u => u.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)));
|
.ForMember(o => o.DictionaryList, t => t.MapFrom(u => u.DoctorDicRelationList.Where(t => t.KeyName == StaticData.ReadingType || t.KeyName == StaticData.Subspeciality).Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)));
|
||||||
CreateMap<SpecialtyCommand, Doctor>();
|
CreateMap<SpecialtyCommand, Doctor>();
|
||||||
|
|
||||||
|
|||||||
@@ -35,16 +35,27 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class TrialSignDocView:UnionDocumentWithConfirmInfoView
|
||||||
|
{
|
||||||
|
public string TrialCode { get; set; }
|
||||||
|
public string ResearchProgramNo { get; set; }
|
||||||
|
|
||||||
|
public string ExperimentName { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class UnionDocumentWithConfirmInfoView: UnionDocumentView
|
public class UnionDocumentWithConfirmInfoView: UnionDocumentView
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public DateTime? ConfirmTime { get; set; }
|
public DateTime? ConfirmTime { get; set; }
|
||||||
|
|
||||||
public Guid? ConfirmUserId { get; set; }
|
public Guid? ConfirmUserId { get; set; }
|
||||||
|
|
||||||
public bool IsConfirmed { get; set; }
|
public bool IsConfirmed => ConfirmTime != null;
|
||||||
|
|
||||||
public string UserName { get; set; } = string.Empty;
|
public string UserName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string RealName { get; set; } = string.Empty;
|
public string RealName { get; set; } = string.Empty;
|
||||||
|
|
||||||
@@ -101,18 +112,34 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool IsSigned { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetNextUnSignDocumentInDto
|
public class GetNextUnSignDocumentInDto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
public Guid? TrialId { get; set; }
|
||||||
public Guid TrialId { get; set; }
|
|
||||||
|
|
||||||
public bool Asc { get; set; } = true;
|
public bool Asc { get; set; } = true;
|
||||||
public string SortField { get; set; } = "";
|
public string SortField { get; set; } = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class TrialDocQuery : PageInput
|
||||||
|
{
|
||||||
|
public Guid? TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid? FileTypeId { get; set; }
|
||||||
|
|
||||||
|
public string TrialCode { get; set;} = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool IsSigned { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class TrialUserDocUnionQuery: PageInput
|
public class TrialUserDocUnionQuery: PageInput
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public bool? IsDeleted { get; set; }
|
public bool? IsDeleted { get; set; }
|
||||||
public Guid? FileTypeId { get; set; }
|
public Guid? FileTypeId { get; set; }
|
||||||
|
|
||||||
|
public Guid? UserTypeId { get; set; }
|
||||||
|
|
||||||
public string Name { get; set; } = String.Empty;
|
public string Name { get; set; } = String.Empty;
|
||||||
|
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
|
|||||||
@@ -108,6 +108,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public bool IsDistinguishCriteria { get; set; }
|
public bool IsDistinguishCriteria { get; set; }
|
||||||
|
|
||||||
|
public string SortField { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool Asc { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var taskInfo = await _repository.Where<VisitTask>(t => t.Id == visitTaskId).Select(t => new
|
var taskInfo = await _repository.Where<VisitTask>(t => t.Id == visitTaskId).Select(t => new
|
||||||
{
|
{
|
||||||
t.Subject.SiteId,
|
t.Subject.TrialSiteId,
|
||||||
t.Trial.ResearchProgramNo,
|
t.Trial.ResearchProgramNo,
|
||||||
t.Subject.TrialSite.TrialSiteCode,
|
t.Subject.TrialSite.TrialSiteCode,
|
||||||
SubjectCode = t.Subject.Code,
|
SubjectCode = t.Subject.Code,
|
||||||
@@ -102,7 +102,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
return (topicStr, htmlBodyStr, isEn_us, null);
|
return (topicStr, htmlBodyStr, isEn_us, null);
|
||||||
};
|
};
|
||||||
|
|
||||||
await SendTrialEmailAsync(taskInfo.TrialId, businessScenarioEnum, topicAndHtmlFunc, taskInfo.SiteId);
|
await SendTrialEmailAsync(taskInfo.TrialId, businessScenarioEnum, topicAndHtmlFunc, taskInfo.TrialSiteId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
return (topicStr, htmlBodyStr, isEn_us, null);
|
return (topicStr, htmlBodyStr, isEn_us, null);
|
||||||
};
|
};
|
||||||
|
|
||||||
await SendTrialEmailAsync(taskInfo.TrialId, businessScenarioEnum, topicAndHtmlFunc, taskInfo.SiteId);
|
await SendTrialEmailAsync(taskInfo.TrialId, businessScenarioEnum, topicAndHtmlFunc, taskInfo.TrialSiteId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -283,9 +283,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async Task SendTrialEmailAsync(Guid trialId, EmailBusinessScenario businessScenario, Func<TrialEmailNoticeConfig, (string topicStr, string htmlBodyStr, bool isEn_us, Guid? onlyToUserId)> topicAndHtmlFunc, Guid? siteId = null, Guid? trialReadingCriterionId = null, Func<TrialEmailNoticeConfig, SMTPEmailConfig, SMTPEmailConfig> emailAttachFunc=null)
|
public async Task SendTrialEmailAsync(Guid trialId, EmailBusinessScenario businessScenario, Func<TrialEmailNoticeConfig, (string topicStr, string htmlBodyStr, bool isEn_us, Guid? onlyToUserId)> topicAndHtmlFunc, Guid? trialSiteId = null, Guid? trialReadingCriterionId = null, Func<TrialEmailNoticeConfig, SMTPEmailConfig, SMTPEmailConfig> emailAttachFunc=null)
|
||||||
{
|
{
|
||||||
var (trialEmailConfig, sendEmailConfig) = await BuildEmailConfig(trialId, businessScenario, topicAndHtmlFunc, siteId, trialReadingCriterionId);
|
var (trialEmailConfig, sendEmailConfig) = await BuildEmailConfig(trialId, businessScenario, topicAndHtmlFunc, trialSiteId, trialReadingCriterionId);
|
||||||
|
|
||||||
if (sendEmailConfig != null)
|
if (sendEmailConfig != null)
|
||||||
{
|
{
|
||||||
@@ -295,14 +295,14 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task<(TrialEmailNoticeConfig?, SMTPEmailConfig?)> BuildEmailConfig(Guid trialId, EmailBusinessScenario businessScenario, Func<TrialEmailNoticeConfig, (string topicStr, string htmlBodyStr, bool isEn_us, Guid? onlyToUserId)> topicAndHtmlFunc, Guid? siteId = null, Guid? trialReadingCriterionId = null)
|
public async Task<(TrialEmailNoticeConfig?, SMTPEmailConfig?)> BuildEmailConfig(Guid trialId, EmailBusinessScenario businessScenario, Func<TrialEmailNoticeConfig, (string topicStr, string htmlBodyStr, bool isEn_us, Guid? onlyToUserId)> topicAndHtmlFunc, Guid? trialSiteId = null, Guid? trialReadingCriterionId = null)
|
||||||
{
|
{
|
||||||
//找到配置
|
//找到配置
|
||||||
var trialEmailConfig = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == trialReadingCriterionId && t.BusinessScenarioEnum == businessScenario, ignoreQueryFilters: true)
|
var trialEmailConfig = await _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == trialReadingCriterionId && t.BusinessScenarioEnum == businessScenario, ignoreQueryFilters: true)
|
||||||
.Include(t => t.TrialEmailNoticeUserList).Include(t => t.TrialEmailBlackUserList).FirstOrDefaultAsync();
|
.Include(t => t.TrialEmailNoticeUserList).Include(t => t.TrialEmailBlackUserList).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
if (trialEmailConfig == null || trialEmailConfig.IsAutoSend == false)
|
if (trialEmailConfig == null || trialEmailConfig.IsAutoSend == false || trialEmailConfig.IsEnable==false)
|
||||||
{
|
{
|
||||||
return (null,null);
|
return (null,null);
|
||||||
}
|
}
|
||||||
@@ -333,13 +333,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
//收件人 有CRC CRA , CRC CRA的账户要按照中心发送
|
//收件人 有CRC CRA , CRC CRA的账户要按照中心发送
|
||||||
if (siteId == null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA) && onlyToUserId == null)
|
if (trialSiteId == null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA) && onlyToUserId == null)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前场景收件人包含CRC CRA,但是没有siteId,请联系后端开发");
|
throw new BusinessValidationFailedException("当前场景收件人包含CRC CRA,但是没有siteId,请联系后端开发");
|
||||||
}
|
}
|
||||||
if (siteId != null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA))
|
if (trialSiteId != null && toUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA))
|
||||||
{
|
{
|
||||||
var curentSiteUserIdList = _repository.Where<TrialSiteUser>(t => t.TrialId == trialId && t.SiteId == siteId).Select(t => t.UserId).ToList();
|
var curentSiteUserIdList = _repository.Where<TrialSiteUser>(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList();
|
||||||
|
|
||||||
toUserList = toUserList.Where(t => (t.UserTypeEnum != UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator) || curentSiteUserIdList.Contains(t.UserId)).ToList();
|
toUserList = toUserList.Where(t => (t.UserTypeEnum != UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator) || curentSiteUserIdList.Contains(t.UserId)).ToList();
|
||||||
}
|
}
|
||||||
@@ -351,9 +351,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var copyUserList = allUserList.Where(t => copyUserTypeEnumList.Contains(t.UserTypeEnum))
|
var copyUserList = allUserList.Where(t => copyUserTypeEnumList.Contains(t.UserTypeEnum))
|
||||||
.Where(t => !blackUserIdList.Contains(t.UserId)).ToList();
|
.Where(t => !blackUserIdList.Contains(t.UserId)).ToList();
|
||||||
|
|
||||||
if (siteId != null && copyUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA))
|
if (trialSiteId != null && copyUserTypeEnumList.Any(t => t == UserTypeEnum.ClinicalResearchCoordinator || t == UserTypeEnum.CRA))
|
||||||
{
|
{
|
||||||
var curentSiteUserIdList = _repository.Where<TrialSiteUser>(t => t.TrialId == trialId && t.SiteId == siteId).Select(t => t.UserId).ToList();
|
var curentSiteUserIdList = _repository.Where<TrialSiteUser>(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId).Select(t => t.UserId).ToList();
|
||||||
|
|
||||||
copyUserList = copyUserList.Where(t => (t.UserTypeEnum != UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator) || curentSiteUserIdList.Contains(t.UserId)).ToList();
|
copyUserList = copyUserList.Where(t => (t.UserTypeEnum != UserTypeEnum.CRA && t.UserTypeEnum != UserTypeEnum.ClinicalResearchCoordinator) || curentSiteUserIdList.Contains(t.UserId)).ToList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
Task<IResponseOutput> DeleteSystemDocumentAsync(Guid systemDocumentId);
|
Task<IResponseOutput> DeleteSystemDocumentAsync(Guid systemDocumentId);
|
||||||
|
|
||||||
|
Task<PageOutput<UnionDocumentWithConfirmInfoView>> getWaitSignSysDocList(SystemDocumentQuery querySystemDocument);
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
||||||
|
|
||||||
public SystemDocumentService( IRepository<SystemDocument> systemDocumentRepository,
|
public SystemDocumentService( IRepository<SystemDocument> systemDocumentRepository,
|
||||||
|
|
||||||
IRepository<SystemDocNeedConfirmedUserType> systemDocNeedConfirmedUserTypeRepository,
|
IRepository<SystemDocNeedConfirmedUserType> systemDocNeedConfirmedUserTypeRepository,
|
||||||
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository)
|
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository)
|
||||||
{
|
{
|
||||||
@@ -183,7 +184,9 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
UserTypeShortName = user.UserTypeRole.UserTypeShortName
|
UserTypeShortName = user.UserTypeRole.UserTypeShortName
|
||||||
};
|
};
|
||||||
|
|
||||||
return await query.Where(t=>t.ConfirmTime==null).ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
return await query.WhereIf(querySystemDocument.IsSigned==true,t=>t.ConfirmTime!=null)
|
||||||
|
.WhereIf(querySystemDocument.IsSigned == false, t => t.ConfirmTime == null)
|
||||||
|
.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Services
|
namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
@@ -25,7 +26,8 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
||||||
private readonly IRepository<TrialDocConfirmedUser> _trialDocUserTypeConfirmedUserRepository;
|
private readonly IRepository<TrialDocConfirmedUser> _trialDocUserTypeConfirmedUserRepository;
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
private readonly ISystemDocumentService _systemDocumentService;
|
||||||
|
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
||||||
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
||||||
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
|
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||||
@@ -34,7 +36,8 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
public TrialDocumentService(IRepository<TrialDocument> trialDocumentRepository,
|
public TrialDocumentService(IRepository<TrialDocument> trialDocumentRepository,
|
||||||
IRepository<TrialDocConfirmedUser> trialDocUserTypeConfirmedUserRepository,
|
IRepository<TrialDocConfirmedUser> trialDocUserTypeConfirmedUserRepository,
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository,
|
ISystemDocumentService systemDocumentService,
|
||||||
|
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository,
|
||||||
IRepository<TrialCriterionAdditionalAssessmentType> trialCriterionAdditionalAssessmentTypeRepository,
|
IRepository<TrialCriterionAdditionalAssessmentType> trialCriterionAdditionalAssessmentTypeRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository
|
||||||
, IRepository<SystemDocument> systemDocumentRepository)
|
, IRepository<SystemDocument> systemDocumentRepository)
|
||||||
@@ -42,7 +45,8 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
_trialDocumentRepository = trialDocumentRepository;
|
_trialDocumentRepository = trialDocumentRepository;
|
||||||
this._trialDocUserTypeConfirmedUserRepository = trialDocUserTypeConfirmedUserRepository;
|
this._trialDocUserTypeConfirmedUserRepository = trialDocUserTypeConfirmedUserRepository;
|
||||||
this._trialRepository = trialRepository;
|
this._trialRepository = trialRepository;
|
||||||
this._systemDocConfirmedUserRepository = systemDocConfirmedUserRepository;
|
this._systemDocumentService = systemDocumentService;
|
||||||
|
this._systemDocConfirmedUserRepository = systemDocConfirmedUserRepository;
|
||||||
_systemDocumentRepository = systemDocumentRepository;
|
_systemDocumentRepository = systemDocumentRepository;
|
||||||
_readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
_readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
_trialCriterionAdditionalAssessmentTypeRepository = trialCriterionAdditionalAssessmentTypeRepository;
|
_trialCriterionAdditionalAssessmentTypeRepository = trialCriterionAdditionalAssessmentTypeRepository;
|
||||||
@@ -60,12 +64,61 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
var trialDocumentQueryable = _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == queryTrialDocument.TrialId)
|
var trialDocumentQueryable = _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == queryTrialDocument.TrialId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(queryTrialDocument.Name), t => t.Name.Contains(queryTrialDocument.Name))
|
.WhereIf(!string.IsNullOrEmpty(queryTrialDocument.Name), t => t.Name.Contains(queryTrialDocument.Name))
|
||||||
.WhereIf(queryTrialDocument.FileTypeId != null, t => t.FileTypeId == queryTrialDocument.FileTypeId)
|
.WhereIf(queryTrialDocument.FileTypeId != null, t => t.FileTypeId == queryTrialDocument.FileTypeId)
|
||||||
.WhereIf(queryTrialDocument.IsDeleted != null, t => t.IsDeleted == queryTrialDocument.IsDeleted)
|
.WhereIf(queryTrialDocument.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t=>t.NeedConfirmUserTypeId== queryTrialDocument.UserTypeId) )
|
||||||
.ProjectTo<TrialDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us });
|
.WhereIf(queryTrialDocument.IsDeleted != null, t => t.IsDeleted == queryTrialDocument.IsDeleted)
|
||||||
|
.ProjectTo<TrialDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us });
|
||||||
|
|
||||||
return await trialDocumentQueryable.ToPagedListAsync(queryTrialDocument.PageIndex, queryTrialDocument.PageSize, queryTrialDocument.SortField, queryTrialDocument.Asc);
|
return await trialDocumentQueryable.ToPagedListAsync(queryTrialDocument.PageIndex, queryTrialDocument.PageSize, queryTrialDocument.SortField, queryTrialDocument.Asc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<PageOutput<TrialSignDocView>> GetTrialSignDocumentList(TrialDocQuery querySystemDocument)
|
||||||
|
{
|
||||||
|
var trialDocQueryable = from trialDoc in _trialDocumentRepository.AsQueryable(true)
|
||||||
|
.WhereIf(querySystemDocument.TrialId!=null,t=>t.TrialId==querySystemDocument.TrialId)
|
||||||
|
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) )
|
||||||
|
|
||||||
|
join trialUser in _repository.Where<TrialUser>(t=>t.UserId==_userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||||
|
join confirm in _repository.Where<TrialDocConfirmedUser>() on
|
||||||
|
new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||||
|
|
||||||
|
from confirm in cc.DefaultIfEmpty()
|
||||||
|
select new TrialSignDocView()
|
||||||
|
{
|
||||||
|
TrialCode=trialDoc.Trial.TrialCode,
|
||||||
|
ResearchProgramNo = trialDoc.Trial.ResearchProgramNo,
|
||||||
|
ExperimentName = trialDoc.Trial.ExperimentName,
|
||||||
|
Id = trialDoc.Id,
|
||||||
|
IsSystemDoc = false,
|
||||||
|
CreateTime = trialDoc.CreateTime,
|
||||||
|
FullFilePath = trialDoc.Path,
|
||||||
|
IsDeleted = trialDoc.IsDeleted,
|
||||||
|
Name = trialDoc.Name,
|
||||||
|
Path = trialDoc.Path,
|
||||||
|
FileTypeId = trialDoc.FileTypeId,
|
||||||
|
FileType = _userInfo.IsEn_Us ? trialDoc.FileType.Value : trialDoc.FileType.ValueCN,
|
||||||
|
UpdateTime = trialDoc.UpdateTime,
|
||||||
|
SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes,
|
||||||
|
|
||||||
|
//IsConfirmed = confirm.ConfirmTime != null,
|
||||||
|
ConfirmUserId = confirm.ConfirmUserId,
|
||||||
|
ConfirmTime = confirm.ConfirmTime,
|
||||||
|
RealName = trialUser.User.FullName,
|
||||||
|
UserName = trialUser.User.UserName,
|
||||||
|
UserTypeId = trialUser.User.UserTypeId,
|
||||||
|
UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
trialDocQueryable = trialDocQueryable.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
||||||
|
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
||||||
|
.WhereIf(querySystemDocument.IsSigned == true, t => t.ConfirmTime != null)
|
||||||
|
.WhereIf(querySystemDocument.IsSigned == false, t => t.ConfirmTime == null);
|
||||||
|
|
||||||
|
|
||||||
|
return await trialDocQueryable.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取下一个未签名的文件
|
/// 获取下一个未签名的文件
|
||||||
@@ -75,19 +128,37 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<UnionDocumentWithConfirmInfoView?> GetNextUnSignDocument(GetNextUnSignDocumentInDto inDto)
|
public async Task<UnionDocumentWithConfirmInfoView?> GetNextUnSignDocument(GetNextUnSignDocumentInDto inDto)
|
||||||
{
|
{
|
||||||
var result = await this.GetUserDocumentList(new TrialUserDocUnionQuery()
|
var result = new PageOutput<UnionDocumentWithConfirmInfoView>() { };
|
||||||
{
|
|
||||||
Asc = inDto.Asc,
|
|
||||||
IsSign = false,
|
|
||||||
SortField = inDto.SortField,
|
|
||||||
TrialId = inDto.TrialId,
|
|
||||||
PageIndex = 1,
|
|
||||||
PageSize = 1,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (result.Data.CurrentPageData.Count > 0)
|
if (inDto.TrialId != null)
|
||||||
{
|
{
|
||||||
return result.Data.CurrentPageData.First();
|
result = (await this.GetUserDocumentList(new TrialUserDocUnionQuery()
|
||||||
|
{
|
||||||
|
Asc = inDto.Asc,
|
||||||
|
IsSign = false,
|
||||||
|
SortField = inDto.SortField,
|
||||||
|
TrialId = inDto.TrialId.Value,
|
||||||
|
PageIndex = 1,
|
||||||
|
PageSize = 1,
|
||||||
|
})).Data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = await _systemDocumentService.getWaitSignSysDocList(new SystemDocumentQuery()
|
||||||
|
{
|
||||||
|
PageIndex=1,
|
||||||
|
IsSigned = false,
|
||||||
|
PageSize=1,
|
||||||
|
Asc=false,
|
||||||
|
SortField="UpdateTime",
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (result.CurrentPageData.Count > 0)
|
||||||
|
{
|
||||||
|
return result.CurrentPageData.First();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -166,7 +237,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
|
|
||||||
var trialId = querySystemDocument.TrialId;
|
var trialId = querySystemDocument.TrialId;
|
||||||
|
|
||||||
var trialInfo = await (_repository.Where<Trial>(t => t.Id == querySystemDocument.TrialId,ignoreQueryFilters:true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync());
|
var trialInfo = await (_repository.Where<Trial>(t => t.Id == querySystemDocument.TrialId, ignoreQueryFilters: true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync());
|
||||||
|
|
||||||
//系统文档查询
|
//系统文档查询
|
||||||
var systemDocumentQueryable = from needConfirmedUserType in _repository.Where<SystemDocNeedConfirmedUserType>(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)
|
var systemDocumentQueryable = from needConfirmedUserType in _repository.Where<SystemDocNeedConfirmedUserType>(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)
|
||||||
@@ -194,6 +265,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
|
|
||||||
FullFilePath = needConfirmedUserType.SystemDocument.Path,
|
FullFilePath = needConfirmedUserType.SystemDocument.Path,
|
||||||
|
|
||||||
|
//IsConfirmed = confirm.ConfirmTime != null,
|
||||||
ConfirmUserId = confirm.ConfirmUserId,
|
ConfirmUserId = confirm.ConfirmUserId,
|
||||||
ConfirmTime = confirm.ConfirmTime,
|
ConfirmTime = confirm.ConfirmTime,
|
||||||
RealName = trialUser.User.FullName,
|
RealName = trialUser.User.FullName,
|
||||||
@@ -225,6 +297,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
UpdateTime = trialDoc.UpdateTime,
|
UpdateTime = trialDoc.UpdateTime,
|
||||||
SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes,
|
SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes,
|
||||||
|
|
||||||
|
//IsConfirmed = confirm.ConfirmTime != null,
|
||||||
ConfirmUserId = confirm.ConfirmUserId,
|
ConfirmUserId = confirm.ConfirmUserId,
|
||||||
ConfirmTime = confirm.ConfirmTime,
|
ConfirmTime = confirm.ConfirmTime,
|
||||||
RealName = trialUser.User.FullName,
|
RealName = trialUser.User.FullName,
|
||||||
@@ -360,11 +433,11 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId,
|
FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId,
|
||||||
FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN,
|
FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN,
|
||||||
UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime,
|
UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime,
|
||||||
IsConfirmed= confirm.ConfirmTime!=null,
|
//IsConfirmed= confirm.ConfirmTime!=null,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ConfirmUserId = confirm.ConfirmUserId,
|
ConfirmUserId = confirm.ConfirmUserId,
|
||||||
ConfirmTime = confirm.ConfirmTime,
|
ConfirmTime = confirm.ConfirmTime,
|
||||||
RealName = trialUser.User.FullName,
|
RealName = trialUser.User.FullName,
|
||||||
UserName = trialUser.User.UserName,
|
UserName = trialUser.User.UserName,
|
||||||
@@ -396,9 +469,9 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN,
|
FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN,
|
||||||
FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId,
|
FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId,
|
||||||
UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime,
|
UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime,
|
||||||
IsConfirmed = confirm.ConfirmTime != null,
|
//IsConfirmed = confirm.ConfirmTime != null,
|
||||||
|
|
||||||
ConfirmUserId = confirm.ConfirmUserId,
|
ConfirmUserId = confirm.ConfirmUserId,
|
||||||
ConfirmTime = confirm.ConfirmTime,
|
ConfirmTime = confirm.ConfirmTime,
|
||||||
RealName = trialUser.User.FullName,
|
RealName = trialUser.User.FullName,
|
||||||
UserName = trialUser.User.UserName,
|
UserName = trialUser.User.UserName,
|
||||||
@@ -411,9 +484,10 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
var unionQuery = trialDocQuery.Union(systemDocQuery)
|
var unionQuery = trialDocQuery.Union(systemDocQuery)
|
||||||
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
||||||
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
||||||
.WhereIf(querySystemDocument.IsConfirmed != null, t => t.IsConfirmed == querySystemDocument.IsConfirmed)
|
.WhereIf(querySystemDocument.IsConfirmed == true, t => t.ConfirmTime != null)
|
||||||
.WhereIf(querySystemDocument.IsDeleted != null, t => t.IsDeleted == querySystemDocument.IsDeleted)
|
.WhereIf(querySystemDocument.IsConfirmed == false, t => t.ConfirmTime == null)
|
||||||
.WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId);
|
.WhereIf(querySystemDocument.IsDeleted != null, t => t.IsDeleted == querySystemDocument.IsDeleted)
|
||||||
|
.WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId);
|
||||||
|
|
||||||
var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ using Microsoft.AspNetCore.Http;
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using SharpCompress.Common;
|
using SharpCompress.Common;
|
||||||
using SkiaSharp;
|
using DocumentFormat.OpenXml.Bibliography;
|
||||||
|
using System.Linq.Dynamic.Core;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
@@ -235,7 +236,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
t.SourceSubjectVisitId,
|
t.SourceSubjectVisitId,
|
||||||
t.SouceReadModuleId,
|
t.SouceReadModuleId,
|
||||||
t.SubjectId,
|
t.SubjectId,
|
||||||
t.Subject.SiteId,
|
t.Subject.TrialSiteId,
|
||||||
|
|
||||||
t.DoctorUserId,
|
t.DoctorUserId,
|
||||||
t.ReadingTaskState,
|
t.ReadingTaskState,
|
||||||
@@ -316,13 +317,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var (trialEmailConfig, sendEmailConfig) = await _emailSendService.BuildEmailConfig(taskInfo.TrialId, businessScenarioEnum, topicAndHtmlFunc, taskInfo.SiteId,taskInfo.TrialReadingCriterionId);
|
var (trialEmailConfig, sendEmailConfig) = await _emailSendService.BuildEmailConfig(taskInfo.TrialId, businessScenarioEnum, topicAndHtmlFunc, taskInfo.TrialSiteId, taskInfo.TrialReadingCriterionId);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
//自动发送
|
//自动发送
|
||||||
if (sendEmailConfig != null && trialEmailConfig !=null)
|
if (sendEmailConfig != null && trialEmailConfig != null)
|
||||||
{
|
{
|
||||||
#region 不同标准 不同项目配置 发送邮件的时机 处理具体逻辑
|
#region 不同标准 不同项目配置 发送邮件的时机 处理具体逻辑
|
||||||
|
|
||||||
@@ -380,7 +381,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
//有序
|
//有序
|
||||||
|
|
||||||
if (taskInfo.IsReadingTaskViewInOrder)
|
if (taskInfo.IsReadingTaskViewInOrder==ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -658,7 +659,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
var path = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, _userInfo.IsEn_Us ? trialEmailConfig.AttachPath : trialEmailConfig.AttachCNPath);
|
var path = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, _userInfo.IsEn_Us ? trialEmailConfig.AttachPath : trialEmailConfig.AttachCNPath);
|
||||||
|
|
||||||
var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetSubjectEnrollConfirmOrPDEmailPath(_hostEnvironment, Path.GetFileName(path), taskInfo.TrialId, taskInfo.SiteId, taskInfo.SubjectId, true);
|
var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetSubjectEnrollConfirmOrPDEmailPath(_hostEnvironment, Path.GetFileName(path), taskInfo.TrialId, taskInfo.TrialSiteId, taskInfo.SubjectId, true);
|
||||||
|
|
||||||
if (emailStoreMode == EmailStoreSendMode.StoreLocalSend || emailStoreMode == EmailStoreSendMode.OnlyStoreLocalNotSentEmail)
|
if (emailStoreMode == EmailStoreSendMode.StoreLocalSend || emailStoreMode == EmailStoreSendMode.OnlyStoreLocalNotSentEmail)
|
||||||
{
|
{
|
||||||
@@ -679,8 +680,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var wordStoreServerPath = Path.Combine(Path.GetDirectoryName(serverFilePath), Path.GetFileNameWithoutExtension(serverFilePath)+".docx");
|
var wordStoreServerPath = Path.Combine(Path.GetDirectoryName(serverFilePath), Path.GetFileNameWithoutExtension(serverFilePath) + ".docx");
|
||||||
|
|
||||||
using (FileStream fileStream = new FileStream(wordStoreServerPath, FileMode.Create, FileAccess.Write))
|
using (FileStream fileStream = new FileStream(wordStoreServerPath, FileMode.Create, FileAccess.Write))
|
||||||
{
|
{
|
||||||
wordMemoryStream.WriteTo(fileStream);
|
wordMemoryStream.WriteTo(fileStream);
|
||||||
@@ -718,7 +719,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
Document document = new Document();
|
Document document = new Document();
|
||||||
document.LoadFromStream(wordMemoryStream, FileFormat.Docx);
|
document.LoadFromStream(wordMemoryStream, FileFormat.Docx);
|
||||||
document.SaveToStream(pdfMemoryStream, FileFormat.PDF);
|
document.SaveToStream(pdfMemoryStream, FileFormat.PDF);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -887,7 +888,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{ TrialReadingCriterionId = t.Id, t.ReadingType, t.IsReadingTaskViewInOrder, t.CriterionType, t.ArbitrationRule }).FirstNotNullAsync();
|
{ TrialReadingCriterionId = t.Id, t.ReadingType, t.IsReadingTaskViewInOrder, t.CriterionType, t.ArbitrationRule }).FirstNotNullAsync();
|
||||||
|
|
||||||
// 项目双重
|
// 项目双重
|
||||||
if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double && trialReadingCriterionConfig.IsReadingTaskViewInOrder)
|
if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double && trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
//仲裁在访视上面
|
//仲裁在访视上面
|
||||||
if (trialReadingCriterionConfig.ArbitrationRule == ArbitrationRule.Visit)
|
if (trialReadingCriterionConfig.ArbitrationRule == ArbitrationRule.Visit)
|
||||||
@@ -1355,7 +1356,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||||
.ProjectTo<TrialEmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TrialEmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
return await trialEmailNoticeConfigQueryable.ToListAsync();
|
var sortField = string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialEmailNoticeConfigView.Code) : inQuery.SortField;
|
||||||
|
var orderQuery = inQuery.Asc ? trialEmailNoticeConfigQueryable.OrderBy(sortField) : trialEmailNoticeConfigQueryable.OrderBy(sortField + " desc");
|
||||||
|
return await orderQuery.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,175 @@
|
|||||||
|
using FellowOakDicom.Network;
|
||||||
|
using FellowOakDicom;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using IRaCIS.Core.Application.Contracts.Dicom;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 后台托管服务的方式运行
|
||||||
|
/// </summary>
|
||||||
|
//public class CStoreSCPHostedService : IHostedService
|
||||||
|
//{
|
||||||
|
// private readonly ILogger<CStoreSCPHostedService> _logger;
|
||||||
|
// private readonly IDicomServerFactory _dicomServerFactory;
|
||||||
|
// private IDicomServer? _server;
|
||||||
|
|
||||||
|
// public CStoreSCPHostedService(ILogger<CStoreSCPHostedService> logger, IDicomServerFactory dicomServerFactory)
|
||||||
|
// {
|
||||||
|
// _logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||||
|
// _dicomServerFactory = dicomServerFactory ?? throw new ArgumentNullException(nameof(dicomServerFactory));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public async Task StartAsync(CancellationToken cancellationToken)
|
||||||
|
// {
|
||||||
|
// _logger.LogInformation("Starting DICOM server");
|
||||||
|
// _server = _dicomServerFactory.Create<CStoreSCPService>(104);
|
||||||
|
// _logger.LogInformation("DICOM server is running");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public Task StopAsync(CancellationToken cancellationToken)
|
||||||
|
// {
|
||||||
|
// if (_server != null)
|
||||||
|
// {
|
||||||
|
// _server.Stop();
|
||||||
|
// _server.Dispose();
|
||||||
|
// _server = null;
|
||||||
|
// }
|
||||||
|
// return Task.CompletedTask;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
public class CStoreSCPService : DicomService, IDicomServiceProvider, IDicomCStoreProvider, IDicomCEchoProvider
|
||||||
|
{
|
||||||
|
private IServiceProvider _serviceProvider { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
private static readonly DicomTransferSyntax[] _acceptedTransferSyntaxes = new DicomTransferSyntax[]
|
||||||
|
{
|
||||||
|
DicomTransferSyntax.ExplicitVRLittleEndian,
|
||||||
|
DicomTransferSyntax.ExplicitVRBigEndian,
|
||||||
|
DicomTransferSyntax.ImplicitVRLittleEndian
|
||||||
|
};
|
||||||
|
|
||||||
|
private static readonly DicomTransferSyntax[] _acceptedImageTransferSyntaxes = new DicomTransferSyntax[]
|
||||||
|
{
|
||||||
|
// Lossless
|
||||||
|
DicomTransferSyntax.JPEGLSLossless,
|
||||||
|
DicomTransferSyntax.JPEG2000Lossless,
|
||||||
|
DicomTransferSyntax.JPEGProcess14SV1,
|
||||||
|
DicomTransferSyntax.JPEGProcess14,
|
||||||
|
DicomTransferSyntax.RLELossless,
|
||||||
|
// Lossy
|
||||||
|
DicomTransferSyntax.JPEGLSNearLossless,
|
||||||
|
DicomTransferSyntax.JPEG2000Lossy,
|
||||||
|
DicomTransferSyntax.JPEGProcess1,
|
||||||
|
DicomTransferSyntax.JPEGProcess2_4,
|
||||||
|
// Uncompressed
|
||||||
|
DicomTransferSyntax.ExplicitVRLittleEndian,
|
||||||
|
DicomTransferSyntax.ExplicitVRBigEndian,
|
||||||
|
DicomTransferSyntax.ImplicitVRLittleEndian
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
public CStoreSCPService(INetworkStream stream, Encoding fallbackEncoding, ILogger log, DicomServiceDependencies dependencies)
|
||||||
|
: base(stream, fallbackEncoding, log, dependencies)
|
||||||
|
{
|
||||||
|
var tt = base.UserState;
|
||||||
|
//_dicomArchiveService = dicomArchiveService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Task OnReceiveAssociationRequestAsync(DicomAssociation association)
|
||||||
|
{
|
||||||
|
_serviceProvider =(IServiceProvider) this.UserState;
|
||||||
|
|
||||||
|
if (association.CalledAE != "STORESCP")
|
||||||
|
{
|
||||||
|
return SendAssociationRejectAsync(
|
||||||
|
DicomRejectResult.Permanent,
|
||||||
|
DicomRejectSource.ServiceUser,
|
||||||
|
DicomRejectReason.CalledAENotRecognized);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var pc in association.PresentationContexts)
|
||||||
|
{
|
||||||
|
if (pc.AbstractSyntax == DicomUID.Verification)
|
||||||
|
{
|
||||||
|
pc.AcceptTransferSyntaxes(_acceptedTransferSyntaxes);
|
||||||
|
}
|
||||||
|
else if (pc.AbstractSyntax.StorageCategory != DicomStorageCategory.None)
|
||||||
|
{
|
||||||
|
pc.AcceptTransferSyntaxes(_acceptedImageTransferSyntaxes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SendAssociationAcceptAsync(association);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Task OnReceiveAssociationReleaseRequestAsync()
|
||||||
|
{
|
||||||
|
return SendAssociationReleaseResponseAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void OnReceiveAbort(DicomAbortSource source, DicomAbortReason reason)
|
||||||
|
{
|
||||||
|
/* nothing to do here */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void OnConnectionClosed(Exception exception)
|
||||||
|
{
|
||||||
|
/* nothing to do here */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<DicomCStoreResponse> OnCStoreRequestAsync(DicomCStoreRequest request)
|
||||||
|
{
|
||||||
|
var tt= _serviceProvider.GetService<IDicomArchiveService>();
|
||||||
|
|
||||||
|
var studyUid = request.Dataset.GetSingleValue<string>(DicomTag.StudyInstanceUID).Trim();
|
||||||
|
var instUid = request.SOPInstanceUID.UID;
|
||||||
|
|
||||||
|
var path = Path.GetFullPath(@".\DICOM-Store");
|
||||||
|
|
||||||
|
path = Path.Combine(path, studyUid);
|
||||||
|
|
||||||
|
if (!Directory.Exists(path))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
path = Path.Combine(path, instUid) + ".dcm";
|
||||||
|
|
||||||
|
await request.File.SaveAsync(path);
|
||||||
|
|
||||||
|
return new DicomCStoreResponse(request, DicomStatus.Success);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Task OnCStoreRequestExceptionAsync(string tempFileName, Exception e)
|
||||||
|
{
|
||||||
|
// let library handle logging and error response
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Task<DicomCEchoResponse> OnCEchoRequestAsync(DicomCEchoRequest request)
|
||||||
|
{
|
||||||
|
return Task.FromResult(new DicomCEchoResponse(request, DicomStatus.Success));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,7 +20,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public int SliceLocation { get; set; }
|
public int SliceLocation { get; set; }
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
@@ -30,14 +29,16 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public bool IsDeleted { get; set; }
|
public bool IsDeleted { get; set; }
|
||||||
public bool IsReading { get; set; } = true;
|
public bool IsReading { get; set; } = true;
|
||||||
|
|
||||||
|
public string SliceThickness { get; set; } = String.Empty;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class DicomTrialSiteSubjectInfo
|
public class DicomTrialSiteSubjectInfo
|
||||||
{
|
{
|
||||||
public string TrialSiteCode { get; set; } = string.Empty;
|
public string TrialSiteCode { get; set; } = string.Empty;
|
||||||
public string SiteCode { get; set; } = string.Empty;
|
public string TrialSiteAliasName { get; set; } = string.Empty;
|
||||||
public string SiteName { get; set; } = string.Empty;
|
|
||||||
public string SubjectCode { get; set; } = string.Empty;
|
public string SubjectCode { get; set; } = string.Empty;
|
||||||
public int? SubjectAge { get; set; }
|
public int? SubjectAge { get; set; }
|
||||||
public string SubjectSex { get; set; } = string.Empty;
|
public string SubjectSex { get; set; } = string.Empty;
|
||||||
@@ -51,7 +52,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public string VisitName { get; set; } = string.Empty;
|
public string VisitName { get; set; } = string.Empty;
|
||||||
public string Sponsor { get; set; } = string.Empty;
|
public string Sponsor { get; set; } = string.Empty;
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
|
||||||
{
|
{
|
||||||
public class DicomSeriesDTO
|
public class DicomSeriesDTO
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public bool IsDicom { get; set; } = true;
|
public bool IsDicom { get; set; } = true;
|
||||||
|
|
||||||
public bool IsBeMark { get; set; } = false;
|
public bool IsBeMark { get; set; } = false;
|
||||||
@@ -21,7 +27,7 @@
|
|||||||
public string SliceThickness { get; set; } = String.Empty;
|
public string SliceThickness { get; set; } = String.Empty;
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
@@ -33,19 +39,54 @@
|
|||||||
public bool IsDeleted { get; set; }
|
public bool IsDeleted { get; set; }
|
||||||
public bool IsReading { get; set; } = true;
|
public bool IsReading { get; set; } = true;
|
||||||
|
|
||||||
public List<Guid> InstanceList { get; set; } = new List<Guid>();
|
|
||||||
|
|
||||||
public List<string> InstancePathList { get; set; } = new List<string>();
|
public List<InstanceBasicInfo> InstanceInfoList { get; set; }=new List<InstanceBasicInfo>();
|
||||||
|
|
||||||
|
public bool IsExistMutiFrames => InstanceInfoList.Any(t => t.NumberOfFrames > 1);
|
||||||
|
|
||||||
public List<string> InstanceHtmlPathList { get; set; }
|
|
||||||
|
|
||||||
//存放在instance 上面
|
//存放在instance 上面
|
||||||
public string WindowCenter { get; set; } = string.Empty;
|
public string? WindowCenter => InstanceInfoList.FirstOrDefault()?.WindowCenter;
|
||||||
public string WindowWidth { get; set; } = string.Empty;
|
public string? WindowWidth => InstanceInfoList.FirstOrDefault()?.WindowWidth;
|
||||||
|
|
||||||
public string ImageResizePath { get; set; }
|
public string ImageResizePath { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class StudyInstanceInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public decimal RowIndex { get; set; }
|
||||||
|
|
||||||
|
public Guid? SeriesId { get; set; }
|
||||||
|
|
||||||
|
public Guid? StudyId { get; set; }
|
||||||
|
public Guid? InstanceId { get; set; }
|
||||||
|
}
|
||||||
|
public class InstanceBasicInfo
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
public string Path { get; set; }
|
||||||
|
|
||||||
|
public string HtmlPath { get; set; }
|
||||||
|
|
||||||
|
public int NumberOfFrames { get; set; }
|
||||||
|
|
||||||
|
public int InstanceNumber { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public decimal RowIndex { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public string WindowCenter { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public string WindowWidth { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class DicomSeriesWithLabelDTO : DicomSeriesDTO
|
public class DicomSeriesWithLabelDTO : DicomSeriesDTO
|
||||||
{
|
{
|
||||||
public bool HasLabel { get; set; } = false;
|
public bool HasLabel { get; set; } = false;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
//public string SubjectName { get; set; }
|
//public string SubjectName { get; set; }
|
||||||
|
|
||||||
public string SubjectCode { get; set; } = string.Empty;
|
public string SubjectCode { get; set; } = string.Empty;
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
||||||
|
{
|
||||||
|
public class SubjectImageUploadDTO
|
||||||
|
{
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
|
public Guid SubejctId { get; set; }
|
||||||
|
|
||||||
|
public string SubjectCode { get; set; }
|
||||||
|
|
||||||
|
public string TaskBlindName { get; set; }
|
||||||
|
|
||||||
|
public string TaskName { get; set; }
|
||||||
|
|
||||||
|
public bool IsImageFilter { get; set; }
|
||||||
|
public string CriterionModalitys { get; set; }
|
||||||
|
|
||||||
|
public Guid? SourceSubjectVisitId { get; set; }
|
||||||
|
public PackState PackState { get; set; }
|
||||||
|
|
||||||
|
public List<StudyBasicInfo> OrginalStudyList { get; set; }
|
||||||
|
|
||||||
|
public List<StudyBasicInfo> UploadStudyList { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class StudyBasicInfo
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string StudyInstanceUid { get; set; }
|
||||||
|
|
||||||
|
public string StudyCode { get; set; }
|
||||||
|
|
||||||
|
public string ModalityForEdit { get; set; }
|
||||||
|
|
||||||
|
public string BodyPartExamined { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string BodyPartForEdit { get; set; }
|
||||||
|
|
||||||
|
public DateTime? StudyTime { get; set; }
|
||||||
|
|
||||||
|
public string Modalities { get; set; }
|
||||||
|
|
||||||
|
public string Description { get; set; }
|
||||||
|
public int SeriesCount { get; set; }
|
||||||
|
public int InstanceCount { get; set; }
|
||||||
|
|
||||||
|
public List<string> SopInstanceUidList { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -5,7 +5,6 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
|
|||||||
public class ImageShareCommand
|
public class ImageShareCommand
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public Guid SiteId { get; set; }
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public Guid? StudyId { get; set; }
|
public Guid? StudyId { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
@@ -91,25 +91,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
|
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
|
||||||
|
|
||||||
#region 废弃
|
|
||||||
//if (uploadTimeSpan.Seconds == 0 && uploadTimeSpan.Minutes==0 && uploadTimeSpan.Hours == 0)
|
|
||||||
//{
|
|
||||||
// return $"{uploadTimeSpan.Milliseconds}毫秒";
|
|
||||||
//}
|
|
||||||
//else if (uploadTimeSpan.Minutes == 0 && uploadTimeSpan.Hours == 0)
|
|
||||||
//{
|
|
||||||
// return $"{uploadTimeSpan.Seconds}秒";
|
|
||||||
//}
|
|
||||||
//else if (uploadTimeSpan.Hours == 0)
|
|
||||||
//{
|
|
||||||
// return $"{uploadTimeSpan.Minutes} 分钟 {uploadTimeSpan.Seconds} 秒";
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// return $" {uploadTimeSpan.Hours} 小时 {uploadTimeSpan.Minutes} 分钟 {uploadTimeSpan.Seconds} 秒 {uploadTimeSpan.Milliseconds}毫秒";
|
|
||||||
//}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +147,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? TrialSiteId { get; set; }
|
||||||
public Guid? SubjectVisitId { get; set; }
|
public Guid? SubjectVisitId { get; set; }
|
||||||
|
|
||||||
public string SubjectInfo { get; set; } = String.Empty;
|
public string SubjectInfo { get; set; } = String.Empty;
|
||||||
@@ -176,30 +157,28 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public Guid? VisitTaskId { get; set; }
|
public Guid? VisitTaskId { get; set; }
|
||||||
|
|
||||||
public bool? IsDicom { get; set; }
|
public bool? IsDicom { get; set; }
|
||||||
|
|
||||||
public string? Uploader { get; set; }
|
public string? Uploader { get; set; }
|
||||||
|
|
||||||
public bool? IsSuccess { get; set; }
|
public bool? IsSuccess { get; set; }
|
||||||
|
|
||||||
public string? StudyCode { get; set; }
|
public string? StudyCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class PreArchiveDicomStudyCommand
|
public class PriArchiveTaskStudyCommand
|
||||||
{
|
{
|
||||||
//public string StudyInstanceUid { get; set; }
|
|
||||||
|
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
[NotDefault]
|
|
||||||
public Guid SiteId { get; set; }
|
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public decimal FileSize { get; set; }
|
public decimal FileSize { get; set; }
|
||||||
|
|
||||||
public bool IsDicomReUpload { get; set; }
|
public bool IsDicomReUpload { get; set; }
|
||||||
@@ -208,34 +187,73 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public int FileCount { get; set; }
|
public int FileCount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NewArchiveStudyCommand
|
public class PreArchiveDicomStudyCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public decimal FileSize { get; set; }
|
||||||
|
|
||||||
|
public bool IsDicomReUpload { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public int FileCount { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TaskArchiveStudyCommand
|
||||||
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid StudyMonitorId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
[NotDefault]
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
[NotDefault]
|
||||||
|
public Guid StudyMonitorId { get; set; }
|
||||||
|
|
||||||
public int FailedFileCount { get; set; }
|
public int FailedFileCount { get; set; }
|
||||||
|
|
||||||
public string RecordPath { get; set; } = string.Empty;
|
public string RecordPath { get; set; } = string.Empty;
|
||||||
|
|
||||||
public AddOrUpdateStudyDto Study { get; set; }
|
public AddOrUpdateStudyDto Study { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public class NewArchiveStudyCommand
|
||||||
|
{
|
||||||
|
[NotDefault]
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
[NotDefault]
|
||||||
|
public Guid TrialSiteId { 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 string RecordPath { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public AddOrUpdateStudyDto Study { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class AddOrUpdateStudyDto
|
public class AddOrUpdateStudyDto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public string StudyId { get; set; } = string.Empty;
|
public string StudyId { get; set; } = string.Empty;
|
||||||
|
|
||||||
//public int Code { get; set; } = 0;
|
//public int Code { get; set; } = 0;
|
||||||
|
|
||||||
//public string StudyCode { get; set; } = string.Empty;
|
//public string StudyCode { get; set; } = string.Empty;
|
||||||
@@ -290,7 +308,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public string AcquisitionNumber { get; set; } = string.Empty;
|
public string AcquisitionNumber { get; set; } = string.Empty;
|
||||||
public string TriggerTime { get; set; } = string.Empty;
|
public string TriggerTime { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string ImageResizePath { get; set; }=string.Empty;
|
public string ImageResizePath { get; set; } = string.Empty;
|
||||||
public List<AddInstanceDto> InstanceList { get; set; }
|
public List<AddInstanceDto> InstanceList { get; set; }
|
||||||
|
|
||||||
public Guid? VisitTaskId { get; set; }
|
public Guid? VisitTaskId { get; set; }
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ using IRaCIS.Core.Infrastructure;
|
|||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
using FellowOakDicom;
|
using FellowOakDicom;
|
||||||
using FellowOakDicom.Imaging.Codec;
|
using FellowOakDicom.Imaging.Codec;
|
||||||
|
using System.Data;
|
||||||
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using FellowOakDicom.Network;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Services
|
namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
@@ -149,7 +152,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var (physicalPath, relativePath) = FileStoreHelper.GetDicomInstanceFilePath(_hostEnvironment, dicomStudy.TrialId, dicomStudy.SiteId, dicomStudy.SubjectId, dicomStudy.SubjectVisitId, dicomStudy.Id, dicomInstance.Id);
|
var (physicalPath, relativePath) = FileStoreHelper.GetDicomInstanceFilePath(_hostEnvironment, dicomStudy.TrialId, dicomStudy.SubjectId, dicomStudy.SubjectVisitId, dicomStudy.Id, dicomInstance.Id);
|
||||||
|
|
||||||
dicomInstance.Path = relativePath;
|
dicomInstance.Path = relativePath;
|
||||||
|
|
||||||
@@ -267,7 +270,6 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
||||||
|
|
||||||
|
|
||||||
SiteId = addtionalInfo.SiteId,
|
|
||||||
TrialId = addtionalInfo.TrialId,
|
TrialId = addtionalInfo.TrialId,
|
||||||
SubjectId = addtionalInfo.SubjectId,
|
SubjectId = addtionalInfo.SubjectId,
|
||||||
SubjectVisitId = addtionalInfo.SubjectVisitId,
|
SubjectVisitId = addtionalInfo.SubjectVisitId,
|
||||||
@@ -397,7 +399,6 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty),
|
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty),
|
||||||
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
||||||
|
|
||||||
SiteId = dicomStudy.SiteId,
|
|
||||||
TrialId = dicomStudy.TrialId,
|
TrialId = dicomStudy.TrialId,
|
||||||
SubjectId = dicomStudy.SubjectId,
|
SubjectId = dicomStudy.SubjectId,
|
||||||
SubjectVisitId = dicomStudy.SubjectVisitId,
|
SubjectVisitId = dicomStudy.SubjectVisitId,
|
||||||
@@ -430,7 +431,6 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
StudyId = dicomStudy.Id,
|
StudyId = dicomStudy.Id,
|
||||||
SeriesId = dicomSeries.Id,
|
SeriesId = dicomSeries.Id,
|
||||||
|
|
||||||
SiteId = dicomStudy.SiteId,
|
|
||||||
TrialId = dicomStudy.TrialId,
|
TrialId = dicomStudy.TrialId,
|
||||||
SubjectId = dicomStudy.SubjectId,
|
SubjectId = dicomStudy.SubjectId,
|
||||||
SubjectVisitId = dicomStudy.SubjectVisitId,
|
SubjectVisitId = dicomStudy.SubjectVisitId,
|
||||||
@@ -474,11 +474,202 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单个文件接收 归档
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dataset"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="NotImplementedException"></exception>
|
||||||
|
public async Task ArchiveDicomFileAsync(DicomDataset dataset)
|
||||||
|
{
|
||||||
|
string studyInstanceUid = dataset.GetString(DicomTag.StudyInstanceUID);
|
||||||
|
string seriesInstanceUid = dataset.GetString(DicomTag.SeriesInstanceUID);
|
||||||
|
string sopInstanceUid = dataset.GetString(DicomTag.SOPInstanceUID);
|
||||||
|
|
||||||
|
Guid studyId = IdentifierHelper.CreateGuid(studyInstanceUid);
|
||||||
|
Guid seriesId = IdentifierHelper.CreateGuid(studyInstanceUid, seriesInstanceUid);
|
||||||
|
Guid instanceId = IdentifierHelper.CreateGuid(studyInstanceUid, seriesInstanceUid, sopInstanceUid);
|
||||||
|
|
||||||
|
var isStudyNeedAdd = false;
|
||||||
|
var isSeriesNeedAdd = false;
|
||||||
|
var isInstanceNeedAdd = false;
|
||||||
|
|
||||||
|
var @lock = _distributedLockProvider.CreateLock($"StudyInstanceUid");
|
||||||
|
|
||||||
|
using (@lock.Acquire())
|
||||||
|
{
|
||||||
|
var findStudy = await _studyRepository.FirstOrDefaultAsync(t => t.Id == studyId);
|
||||||
|
var findSerice = await _seriesRepository.FirstOrDefaultAsync(t => t.Id == seriesId);
|
||||||
|
var findInstance = await _instanceRepository.FirstOrDefaultAsync(t => t.Id == instanceId);
|
||||||
|
|
||||||
|
|
||||||
|
if (findStudy == null)
|
||||||
|
{
|
||||||
|
isStudyNeedAdd = true;
|
||||||
|
findStudy = new DicomStudy
|
||||||
|
{
|
||||||
|
Id = studyId,
|
||||||
|
StudyInstanceUid = studyInstanceUid,
|
||||||
|
StudyTime = dataset.GetSingleValueOrDefault(DicomTag.StudyDate, string.Empty) == string.Empty ? null : dataset.GetSingleValue<DateTime>(DicomTag.StudyDate).Add(dataset.GetSingleValueOrDefault(DicomTag.StudyTime, string.Empty) == string.Empty ? TimeSpan.Zero : dataset.GetSingleValue<DateTime>(DicomTag.StudyTime).TimeOfDay),
|
||||||
|
//Modalities = modality,
|
||||||
|
//ModalityForEdit = modalityForEdit,
|
||||||
|
Description = dataset.GetSingleValueOrDefault(DicomTag.StudyDescription, string.Empty),
|
||||||
|
InstitutionName = dataset.GetSingleValueOrDefault(DicomTag.InstitutionName, string.Empty),
|
||||||
|
PatientId = dataset.GetSingleValueOrDefault(DicomTag.PatientID, string.Empty),
|
||||||
|
PatientName = dataset.GetSingleValueOrDefault(DicomTag.PatientName, string.Empty),
|
||||||
|
PatientAge = dataset.GetSingleValueOrDefault(DicomTag.PatientAge, string.Empty),
|
||||||
|
PatientSex = dataset.GetSingleValueOrDefault(DicomTag.PatientSex, string.Empty),
|
||||||
|
BodyPartExamined = dataset.GetSingleValueOrDefault(DicomTag.BodyPartExamined, string.Empty),
|
||||||
|
|
||||||
|
StudyId = dataset.GetSingleValueOrDefault(DicomTag.StudyID, string.Empty),
|
||||||
|
AccessionNumber = dataset.GetSingleValueOrDefault(DicomTag.AccessionNumber, string.Empty),
|
||||||
|
|
||||||
|
//需要特殊处理
|
||||||
|
PatientBirthDate = dataset.GetSingleValueOrDefault(DicomTag.PatientBirthDate, string.Empty),
|
||||||
|
|
||||||
|
|
||||||
|
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionTime, string.Empty),
|
||||||
|
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty),
|
||||||
|
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
||||||
|
|
||||||
|
|
||||||
|
TrialId = Guid.Empty,
|
||||||
|
SubjectId = Guid.Empty,
|
||||||
|
SubjectVisitId = Guid.Empty,
|
||||||
|
//IsDoubleReview = addtionalInfo.IsDoubleReview,
|
||||||
|
SeriesCount = 0,
|
||||||
|
InstanceCount = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
//特殊逻辑
|
||||||
|
|
||||||
|
var modality = dataset.GetSingleValueOrDefault(DicomTag.Modality, string.Empty);
|
||||||
|
|
||||||
|
var dicModalityList = _dictionaryRepository.Where(t => t.Code == "Modality").SelectMany(t => t.ChildList.Select(c => c.Value)).ToList();
|
||||||
|
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
|
||||||
|
findStudy.Modalities = modality;
|
||||||
|
findStudy.ModalityForEdit= modalityForEdit;
|
||||||
|
|
||||||
|
if (findStudy.PatientBirthDate.Length == 8)
|
||||||
|
{
|
||||||
|
findStudy.PatientBirthDate = $"{findStudy.PatientBirthDate[0]}{findStudy.PatientBirthDate[1]}{findStudy.PatientBirthDate[2]}{findStudy.PatientBirthDate[3]}-{findStudy.PatientBirthDate[4]}{findStudy.PatientBirthDate[5]}-{findStudy.PatientBirthDate[6]}{findStudy.PatientBirthDate[7]}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (findSerice == null)
|
||||||
|
{
|
||||||
|
isSeriesNeedAdd = true;
|
||||||
|
|
||||||
|
findSerice = new DicomSeries
|
||||||
|
{
|
||||||
|
Id = seriesId,
|
||||||
|
StudyId = findStudy.Id,
|
||||||
|
|
||||||
|
StudyInstanceUid = findStudy.StudyInstanceUid,
|
||||||
|
SeriesInstanceUid = seriesInstanceUid,
|
||||||
|
SeriesNumber = dataset.GetSingleValueOrDefault(DicomTag.SeriesNumber, 1),
|
||||||
|
//SeriesTime = dataset.GetSingleValueOrDefault(DicomTag.SeriesDate, DateTime.Now).Add(dataset.GetSingleValueOrDefault(DicomTag.SeriesTime, DateTime.Now).TimeOfDay),
|
||||||
|
//SeriesTime = DateTime.TryParse(dataset.GetSingleValue<string>(DicomTag.SeriesDate) + dataset.GetSingleValue<string>(DicomTag.SeriesTime), out DateTime dt) ? dt : null,
|
||||||
|
SeriesTime = dataset.GetSingleValueOrDefault(DicomTag.SeriesDate, string.Empty) == string.Empty ? null : dataset.GetSingleValue<DateTime>(DicomTag.SeriesDate).Add(dataset.GetSingleValueOrDefault(DicomTag.SeriesTime, string.Empty) == string.Empty ? TimeSpan.Zero : dataset.GetSingleValue<DateTime>(DicomTag.SeriesTime).TimeOfDay),
|
||||||
|
Modality = dataset.GetSingleValueOrDefault(DicomTag.Modality, string.Empty),
|
||||||
|
Description = dataset.GetSingleValueOrDefault(DicomTag.SeriesDescription, string.Empty),
|
||||||
|
SliceThickness = dataset.GetSingleValueOrDefault(DicomTag.SliceThickness, string.Empty),
|
||||||
|
|
||||||
|
ImagePositionPatient = dataset.GetSingleValueOrDefault(DicomTag.ImagePositionPatient, string.Empty),
|
||||||
|
ImageOrientationPatient = dataset.GetSingleValueOrDefault(DicomTag.ImageOrientationPatient, string.Empty),
|
||||||
|
BodyPartExamined = dataset.GetSingleValueOrDefault(DicomTag.BodyPartExamined, string.Empty),
|
||||||
|
SequenceName = dataset.GetSingleValueOrDefault(DicomTag.SequenceName, string.Empty),
|
||||||
|
ProtocolName = dataset.GetSingleValueOrDefault(DicomTag.ProtocolName, string.Empty),
|
||||||
|
ImagerPixelSpacing = 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),
|
||||||
|
|
||||||
|
TrialId = Guid.Empty,
|
||||||
|
SubjectId = Guid.Empty,
|
||||||
|
SubjectVisitId = Guid.Empty,
|
||||||
|
|
||||||
|
InstanceCount = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
++findStudy.SeriesCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (findInstance == null)
|
||||||
|
{
|
||||||
|
isInstanceNeedAdd = true;
|
||||||
|
findInstance = new DicomInstance
|
||||||
|
{
|
||||||
|
Id = instanceId,
|
||||||
|
StudyId = findStudy.Id,
|
||||||
|
SeriesId = findSerice.Id,
|
||||||
|
StudyInstanceUid = findStudy.StudyInstanceUid,
|
||||||
|
SeriesInstanceUid = findSerice.SeriesInstanceUid,
|
||||||
|
|
||||||
|
TrialId = Guid.Empty,
|
||||||
|
SubjectId = Guid.Empty,
|
||||||
|
SubjectVisitId = Guid.Empty,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SopInstanceUid = sopInstanceUid,
|
||||||
|
InstanceNumber = dataset.GetSingleValueOrDefault(DicomTag.InstanceNumber, 1),
|
||||||
|
InstanceTime = dataset.GetSingleValueOrDefault(DicomTag.ContentDate, string.Empty) == string.Empty ? null : dataset.GetSingleValue<DateTime>(DicomTag.ContentDate).Add(dataset.GetSingleValueOrDefault(DicomTag.ContentTime, string.Empty) == string.Empty ? TimeSpan.Zero : dataset.GetSingleValue<DateTime>(DicomTag.ContentTime).TimeOfDay),
|
||||||
|
//InstanceTime = DateTime.TryParse(dataset.GetSingleValue<string>(DicomTag.ContentDate) + dataset.GetSingleValue<string>(DicomTag.ContentTime), out DateTime dt) ? dt : null,
|
||||||
|
//InstanceTime = dataset.GetSingleValueOrDefault(DicomTag.ContentDate,(DateTime?)null)?.Add(dataset.GetSingleValueOrDefault(DicomTag.ContentTime, TimeSpan.Zero)),
|
||||||
|
//dataset.GetSingleValueOrDefault(DicomTag.ContentDate,DateTime.Now);//, DicomTag.ContentTime)
|
||||||
|
CPIStatus = false,
|
||||||
|
ImageRows = dataset.GetSingleValueOrDefault(DicomTag.Rows, 0),
|
||||||
|
ImageColumns = dataset.GetSingleValueOrDefault(DicomTag.Columns, 0),
|
||||||
|
SliceLocation = dataset.GetSingleValueOrDefault(DicomTag.SliceLocation, 0),
|
||||||
|
|
||||||
|
SliceThickness = dataset.GetSingleValueOrDefault(DicomTag.SliceThickness, string.Empty),
|
||||||
|
NumberOfFrames = dataset.GetSingleValueOrDefault(DicomTag.NumberOfFrames, 0),
|
||||||
|
PixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.PixelSpacing, string.Empty),
|
||||||
|
ImagerPixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||||
|
FrameOfReferenceUID = dataset.GetSingleValueOrDefault(DicomTag.FrameOfReferenceUID, string.Empty),
|
||||||
|
WindowCenter = dataset.GetSingleValueOrDefault(DicomTag.WindowCenter, string.Empty),
|
||||||
|
WindowWidth = dataset.GetSingleValueOrDefault(DicomTag.WindowWidth, string.Empty),
|
||||||
|
};
|
||||||
|
|
||||||
|
++findStudy.InstanceCount;
|
||||||
|
++findSerice.InstanceCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isStudyNeedAdd)
|
||||||
|
{
|
||||||
|
await _studyRepository.AddAsync(findStudy);
|
||||||
|
}
|
||||||
|
if(isSeriesNeedAdd)
|
||||||
|
{
|
||||||
|
await _seriesRepository.AddAsync(findSerice);
|
||||||
|
}
|
||||||
|
if(isInstanceNeedAdd)
|
||||||
|
{
|
||||||
|
await _instanceRepository.AddAsync(findInstance);
|
||||||
|
}
|
||||||
|
await _studyRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,771 @@
|
|||||||
|
using EasyCaching.Core;
|
||||||
|
using FellowOakDicom;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
using IRaCIS.Core.Application.Helper;
|
||||||
|
using IRaCIS.Core.Application.Service.ImageAndDoc.DTO;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
|
using MassTransit;
|
||||||
|
using MathNet.Numerics;
|
||||||
|
using Medallion.Threading;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
|
{
|
||||||
|
public interface IDownloadAndUploadService
|
||||||
|
{
|
||||||
|
Task PackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isDicom, bool isAnonymize = true);
|
||||||
|
}
|
||||||
|
[ApiExplorerSettings(GroupName = "Trial")]
|
||||||
|
public class DownloadAndUploadService : BaseService, IDownloadAndUploadService
|
||||||
|
{
|
||||||
|
private readonly IEasyCachingProvider _provider;
|
||||||
|
private readonly IRepository<SystemAnonymization> _systemAnonymizationRepository;
|
||||||
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||||
|
private readonly IOSSService _oSSService;
|
||||||
|
private readonly IRepository<StudyMonitor> _studyMonitorRepository;
|
||||||
|
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||||
|
public DownloadAndUploadService(IEasyCachingProvider provider, IRepository<SystemAnonymization> systemAnonymizationRepository, IRepository<SubjectVisit> subjectVisitRepository, IOSSService oSSService,
|
||||||
|
IRepository<StudyMonitor> studyMonitorRepository, IDistributedLockProvider distributedLockProvider, IRepository<VisitTask> visitTaskRepository)
|
||||||
|
{
|
||||||
|
_systemAnonymizationRepository = systemAnonymizationRepository;
|
||||||
|
|
||||||
|
_subjectVisitRepository = subjectVisitRepository;
|
||||||
|
|
||||||
|
_oSSService = oSSService;
|
||||||
|
_studyMonitorRepository = studyMonitorRepository;
|
||||||
|
_distributedLockProvider = distributedLockProvider;
|
||||||
|
_provider = provider;
|
||||||
|
_visitTaskRepository = visitTaskRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 受试者随机阅片,任务进行随机编号
|
||||||
|
/// 进入阅片任务前,随机挑选出该受试者的一个任务,然后给该任务一个编号,编号给的逻辑是:TimePoint Ran+ 已阅任务数量+1
|
||||||
|
/// 根据当前受试者该标准已阅任务数量(生效失效的任务都算,考虑重阅,最后编号不重复) 第一个就是TimePoint Ran1,后面依次随机挑选出来的阅片序号依次递增
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="subjectId"></param>
|
||||||
|
/// <param name="trialReadingCriterionId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> SubejctRandomReadingTaskNameDeal(Guid subjectId, Guid trialReadingCriterionId)
|
||||||
|
{
|
||||||
|
//subject 随机阅片 才处理任务编号
|
||||||
|
if (_visitTaskRepository.Any(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.SubjectRandom))
|
||||||
|
{
|
||||||
|
//找到 非一致性分析,未签名,状态正常的 并且任务名称是TimePoint的 任务
|
||||||
|
var needDealTaskList = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||||
|
&& t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskBlindName == "Timepoint" && t.ReadingCategory == ReadingCategory.Visit
|
||||||
|
&& (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze), true).ToListAsync();
|
||||||
|
|
||||||
|
if (needDealTaskList.Count > 0)
|
||||||
|
{
|
||||||
|
//已完成的访视任务数量(包含重阅的)
|
||||||
|
var haveFinishedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||||
|
&& t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit);
|
||||||
|
|
||||||
|
//已经处理过的任务名称的数量
|
||||||
|
|
||||||
|
var haveDealedTaskCount = await _visitTaskRepository.CountAsync(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.DoctorUserId == _userInfo.Id
|
||||||
|
&& t.ReadingTaskState != ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit && t.TaskBlindName != "Timepoint");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//随机赋值编号 比如要处理5个任务,实例化一个包含1-5的数组,每次随机取出一个
|
||||||
|
List<int> availableNumbers = Enumerable.Range(haveDealedTaskCount + haveFinishedTaskCount + 1, needDealTaskList.Count).ToList();
|
||||||
|
Random rng = new Random();
|
||||||
|
foreach (var visitTask in needDealTaskList)
|
||||||
|
{
|
||||||
|
int randomIndex = rng.Next(availableNumbers.Count);
|
||||||
|
|
||||||
|
visitTask.TaskBlindName = $"Timepoint Ran {availableNumbers[randomIndex]}";
|
||||||
|
|
||||||
|
availableNumbers.RemoveAt(randomIndex);
|
||||||
|
}
|
||||||
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取该受试者任务上传列表(展示已上传情况)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="subjectId"></param>
|
||||||
|
/// <param name="trialReadingCriterionId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput<List<SubjectImageUploadDTO>>> GetSubjectImageUploadList(Guid subjectId, Guid trialReadingCriterionId)
|
||||||
|
{
|
||||||
|
await SubejctRandomReadingTaskNameDeal(subjectId, trialReadingCriterionId);
|
||||||
|
|
||||||
|
var query = _repository.Where<VisitTask>(t => t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.SourceSubjectVisitId != null
|
||||||
|
&& t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect)
|
||||||
|
.Select(u => new SubjectImageUploadDTO()
|
||||||
|
{
|
||||||
|
VisitTaskId = u.Id,
|
||||||
|
|
||||||
|
SubejctId = u.SubjectId,
|
||||||
|
|
||||||
|
TrialSiteId = u.Subject.TrialSiteId,
|
||||||
|
|
||||||
|
IsImageFilter = u.TrialReadingCriterion.IsImageFilter,
|
||||||
|
|
||||||
|
CriterionModalitys = u.TrialReadingCriterion.CriterionModalitys,
|
||||||
|
|
||||||
|
SubjectCode = u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code,
|
||||||
|
TaskBlindName = u.TaskBlindName,
|
||||||
|
TaskName = u.TaskName,
|
||||||
|
|
||||||
|
SourceSubjectVisitId = u.SourceSubjectVisitId,
|
||||||
|
PackState = u.SourceSubjectVisit.PackState,
|
||||||
|
|
||||||
|
OrginalStudyList = u.SourceSubjectVisit.StudyList
|
||||||
|
.Where(t => u.TrialReadingCriterion.IsImageFilter ? ("|" + u.TrialReadingCriterion.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|") : true)
|
||||||
|
.Select(t => new StudyBasicInfo()
|
||||||
|
{
|
||||||
|
Id = t.Id,
|
||||||
|
StudyInstanceUid = t.StudyInstanceUid,
|
||||||
|
ModalityForEdit = t.ModalityForEdit,
|
||||||
|
BodyPartExamined = t.BodyPartExamined,
|
||||||
|
BodyPartForEdit = t.BodyPartForEdit,
|
||||||
|
|
||||||
|
StudyCode = t.StudyCode,
|
||||||
|
StudyTime = t.StudyTime,
|
||||||
|
Description = t.Description,
|
||||||
|
InstanceCount = t.InstanceCount,
|
||||||
|
Modalities = t.Modalities,
|
||||||
|
SeriesCount = t.SeriesCount,
|
||||||
|
}).ToList(),
|
||||||
|
|
||||||
|
UploadStudyList = u.TaskStudyList.Select(t => new StudyBasicInfo()
|
||||||
|
{
|
||||||
|
Id = t.Id,
|
||||||
|
StudyInstanceUid = t.StudyInstanceUid,
|
||||||
|
ModalityForEdit = t.ModalityForEdit,
|
||||||
|
BodyPartExamined = t.BodyPartExamined,
|
||||||
|
BodyPartForEdit = t.BodyPartForEdit,
|
||||||
|
|
||||||
|
StudyCode = t.StudyCode,
|
||||||
|
StudyTime = t.StudyTime,
|
||||||
|
Description = t.Description,
|
||||||
|
InstanceCount = t.InstanceCount,
|
||||||
|
Modalities = t.Modalities,
|
||||||
|
SeriesCount = t.SeriesCount,
|
||||||
|
|
||||||
|
SopInstanceUidList = t.InstanceList.Select(t => t.SopInstanceUid).ToList(),
|
||||||
|
|
||||||
|
}).ToList()
|
||||||
|
})
|
||||||
|
;
|
||||||
|
|
||||||
|
var list = await query.ToListAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SpecialArchiveStudyDeal(TaskStudy 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 = _repository.Where<Dictionary>(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(PriArchiveTaskStudyCommand preArchiveStudyCommand)
|
||||||
|
{
|
||||||
|
|
||||||
|
var studyMonitor = new StudyMonitor()
|
||||||
|
{
|
||||||
|
TrialId = preArchiveStudyCommand.TrialId,
|
||||||
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
public async Task<IResponseOutput> AddOrUpdateArchiveTaskStudy(TaskArchiveStudyCommand incommand)
|
||||||
|
{
|
||||||
|
#region 获取该subject 已生成任务的访视的检查
|
||||||
|
|
||||||
|
var queryStudy = _repository.Where<VisitTask>(t => t.SubjectId == incommand.SubjectId && t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.Id).Select(u => new
|
||||||
|
{
|
||||||
|
VisitTaskId = u.Id,
|
||||||
|
SourceSubjectVisitId = u.SourceSubjectVisitId,
|
||||||
|
OrginalStudyList = u.SourceSubjectVisit.StudyList.Select(t => new StudyBasicInfo()
|
||||||
|
{
|
||||||
|
Id = t.Id,
|
||||||
|
StudyInstanceUid = t.StudyInstanceUid
|
||||||
|
}).ToList(),
|
||||||
|
});
|
||||||
|
|
||||||
|
var studyList = await queryStudy.ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var findOriginStudy = studyList.FirstOrDefault(c => c.OrginalStudyList.Any(t => t.StudyInstanceUid == incommand.Study.StudyInstanceUid));
|
||||||
|
|
||||||
|
if (findOriginStudy == null)
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("该检查不属于该受试者,请核查");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var modalitys = string.Empty;
|
||||||
|
|
||||||
|
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 = incommand.FailedFileCount == 0;
|
||||||
|
studyMonitor.RecordPath = incommand.RecordPath;
|
||||||
|
|
||||||
|
//上传
|
||||||
|
if (studyMonitor.IsDicomReUpload == false)
|
||||||
|
{
|
||||||
|
var study = _mapper.Map<TaskStudy>(incommand.Study);
|
||||||
|
|
||||||
|
var @lock = _distributedLockProvider.CreateLock($"StudyCode");
|
||||||
|
|
||||||
|
using (await @lock.AcquireAsync())
|
||||||
|
{
|
||||||
|
//查询数据库获取最大的Code 没有记录则为0
|
||||||
|
var dbStudyCodeIntMax = _repository.Where<TaskStudy>(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(), findOriginStudy.VisitTaskId.ToString());
|
||||||
|
study.TrialId = incommand.TrialId;
|
||||||
|
study.SubjectId = incommand.SubjectId;
|
||||||
|
study.VisitTaskId = findOriginStudy.VisitTaskId;
|
||||||
|
//study.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
|
||||||
|
|
||||||
|
//特殊处理逻辑
|
||||||
|
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
|
||||||
|
SpecialArchiveStudyDeal(study);
|
||||||
|
modalitys = study.Modalities;
|
||||||
|
|
||||||
|
await _repository.AddAsync(study);
|
||||||
|
|
||||||
|
|
||||||
|
studyMonitor.StudyId = study.Id;
|
||||||
|
studyMonitor.StudyCode = study.StudyCode;
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var seriesItem in incommand.Study.SeriesList)
|
||||||
|
{
|
||||||
|
var series = _mapper.Map<TaskSeries>(seriesItem);
|
||||||
|
|
||||||
|
series.Id = IdentifierHelper.CreateGuid(seriesItem.StudyInstanceUid, seriesItem.SeriesInstanceUid, incommand.TrialId.ToString(), findOriginStudy.VisitTaskId.ToString());
|
||||||
|
series.StudyId = study.Id;
|
||||||
|
|
||||||
|
series.TrialId = incommand.TrialId;
|
||||||
|
series.SubjectId = incommand.SubjectId;
|
||||||
|
//series.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
series.VisitTaskId = findOriginStudy.VisitTaskId;
|
||||||
|
|
||||||
|
//前端传递的数量不准,上传的时候,把失败的也加进来了,以实际数组的数字为准
|
||||||
|
series.InstanceCount = seriesItem.InstanceList.Count;
|
||||||
|
|
||||||
|
await _repository.AddAsync(series);
|
||||||
|
|
||||||
|
foreach (var instanceItem in seriesItem.InstanceList)
|
||||||
|
{
|
||||||
|
var isntance = _mapper.Map<TaskInstance>(instanceItem);
|
||||||
|
|
||||||
|
Guid instanceId = IdentifierHelper.CreateGuid(study.StudyInstanceUid, series.SeriesInstanceUid, isntance.SopInstanceUid, study.TrialId.ToString(), findOriginStudy.VisitTaskId.ToString());
|
||||||
|
|
||||||
|
isntance.Id = instanceId;
|
||||||
|
isntance.StudyId = study.Id;
|
||||||
|
isntance.SeriesId = series.Id;
|
||||||
|
|
||||||
|
isntance.TrialId = incommand.TrialId;
|
||||||
|
isntance.SubjectId = incommand.SubjectId;
|
||||||
|
//isntance.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
isntance.VisitTaskId = findOriginStudy.VisitTaskId;
|
||||||
|
|
||||||
|
await _repository.AddAsync(isntance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
var studyId = IdentifierHelper.CreateGuid(incommand.Study.StudyInstanceUid, incommand.TrialId.ToString(), findOriginStudy.VisitTaskId.ToString());
|
||||||
|
|
||||||
|
var study = await _repository.FirstOrDefaultAsync<TaskStudy>(t => t.Id == studyId);
|
||||||
|
|
||||||
|
//重传的时候也要赋值检查Id
|
||||||
|
studyMonitor.StudyId = study.Id;
|
||||||
|
studyMonitor.StudyCode = study.StudyCode;
|
||||||
|
|
||||||
|
//特殊处理逻辑
|
||||||
|
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
|
||||||
|
SpecialArchiveStudyDeal(study);
|
||||||
|
modalitys = study.Modalities;
|
||||||
|
|
||||||
|
|
||||||
|
// 少了整个序列
|
||||||
|
|
||||||
|
//某个序列下少了instance
|
||||||
|
foreach (var seriesItem in incommand.Study.SeriesList)
|
||||||
|
{
|
||||||
|
var seriesId = IdentifierHelper.CreateGuid(seriesItem.StudyInstanceUid, seriesItem.SeriesInstanceUid, trialId.ToString(), findOriginStudy.VisitTaskId.ToString());
|
||||||
|
|
||||||
|
TaskSeries dicomSeries = await _repository.FirstOrDefaultAsync<TaskSeries>(t => t.Id == seriesId);
|
||||||
|
|
||||||
|
//判断重复
|
||||||
|
if (dicomSeries == null)
|
||||||
|
{
|
||||||
|
var series = _mapper.Map<TaskSeries>(seriesItem);
|
||||||
|
|
||||||
|
series.Id = seriesId;
|
||||||
|
series.StudyId = study.Id;
|
||||||
|
|
||||||
|
series.TrialId = incommand.TrialId;
|
||||||
|
series.SubjectId = incommand.SubjectId;
|
||||||
|
series.VisitTaskId = findOriginStudy.VisitTaskId;
|
||||||
|
//series.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
|
||||||
|
|
||||||
|
dicomSeries = await _repository.AddAsync(series);
|
||||||
|
|
||||||
|
//新的序列 那么 检查的序列数量+1
|
||||||
|
study.SeriesCount += 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//该序列掉了instance
|
||||||
|
dicomSeries.InstanceCount += seriesItem.InstanceList.Count;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var instanceItem in seriesItem.InstanceList)
|
||||||
|
{
|
||||||
|
var insntance = _mapper.Map<TaskInstance>(instanceItem);
|
||||||
|
insntance.Id = IdentifierHelper.CreateGuid(insntance.StudyInstanceUid, insntance.SeriesInstanceUid, insntance.SopInstanceUid, trialId.ToString(), findOriginStudy.VisitTaskId.ToString());
|
||||||
|
insntance.StudyId = study.Id;
|
||||||
|
insntance.SeriesId = dicomSeries.Id;
|
||||||
|
|
||||||
|
insntance.TrialId = incommand.TrialId;
|
||||||
|
insntance.SubjectId = incommand.SubjectId;
|
||||||
|
insntance.VisitTaskId = findOriginStudy.VisitTaskId;
|
||||||
|
|
||||||
|
await _repository.AddAsync(insntance);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 不管是新的序列 还是 该序列 掉了Instance 重传的时候 检查的instance 数量都会增加
|
||||||
|
study.InstanceCount += seriesItem.InstanceList.Count;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var @lock2 = _distributedLockProvider.CreateLock($"StudyCommit");
|
||||||
|
|
||||||
|
using (await @lock2.AcquireAsync())
|
||||||
|
{
|
||||||
|
await _repository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
return ResponseOutput.NotOk(ex.Message);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
_provider.Remove($"StudyUid_{incommand.TrialId}_{incommand.Study.StudyInstanceUid}");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(modalitys);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[HttpDelete]
|
||||||
|
public async Task<IResponseOutput> DeleteTaskStudy(Guid visitTaskId)
|
||||||
|
{
|
||||||
|
|
||||||
|
await _repository.BatchDeleteAsync<TaskStudy>(t => t.VisitTaskId == visitTaskId);
|
||||||
|
await _repository.BatchDeleteAsync<TaskSeries>(t => t.VisitTaskId == visitTaskId);
|
||||||
|
await _repository.BatchDeleteAsync<TaskInstance>(t => t.VisitTaskId == visitTaskId);
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 打包和匿名化影像 默认是匿名化打包,也可以不匿名化打包
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trialId"></param>
|
||||||
|
/// <param name="subjectVisitId"></param>
|
||||||
|
/// <param name="isDicom"></param>
|
||||||
|
/// <param name="isAnonymize"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
|
||||||
|
public async Task<IResponseOutput> RequestPackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isDicom, bool isAnonymize = true)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
var extralConfig = _repository.Where<Trial>(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||||
|
|
||||||
|
var config = JsonConvert.DeserializeObject<TrialExtraConfig>(extralConfig) ?? new TrialExtraConfig();
|
||||||
|
|
||||||
|
if (config.IsSupportQCDownloadImage == false)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("该项目不支持QC下载影像");
|
||||||
|
}
|
||||||
|
|
||||||
|
var subjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
||||||
|
|
||||||
|
var sujectCode = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => t.Subject.Code).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
var packState = isDicom ? subjectVisit.PackState : subjectVisit.NoDicomPackState;
|
||||||
|
|
||||||
|
if (packState == PackState.WaitPack)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (isDicom)
|
||||||
|
{
|
||||||
|
subjectVisit.PackState = PackState.Packing;
|
||||||
|
HangfireJobHelper.NotImmediatelyOnceOnlyJob<IDownloadAndUploadService>(t => t.PackageAndAnonymizImage(trialId, subjectVisitId, true, isAnonymize), TimeSpan.FromSeconds(1));
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
subjectVisit.NoDicomPackState = PackState.Packing;
|
||||||
|
|
||||||
|
HangfireJobHelper.NotImmediatelyOnceOnlyJob<IDownloadAndUploadService>(t => t.PackageAndAnonymizImage(trialId, subjectVisitId, false, isAnonymize), TimeSpan.FromSeconds(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
await _subjectVisitRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(isDicom ? subjectVisit.VisitImageZipPath : subjectVisit.VisitNoDicomImageZipPath,
|
||||||
|
new { FileName = $"{sujectCode}_{subjectVisit.VisitName}_ImageStudy_{(isDicom ? "Dicom" : "NoneDicom")}.zip" });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 后台任务调用,前端忽略该接口
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trialId"></param>
|
||||||
|
/// <param name="subjectVisitId"></param>
|
||||||
|
/// <param name="isDicom"></param>
|
||||||
|
/// <param name="isAnonymize"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task PackageAndAnonymizImage(Guid trialId, Guid subjectVisitId, bool isDicom, bool isAnonymize = true)
|
||||||
|
{
|
||||||
|
|
||||||
|
var subjectVisit = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var addOrUpdateFixedFieldList = new List<SystemAnonymization>();
|
||||||
|
|
||||||
|
var ircFieldList = new List<SystemAnonymization>();
|
||||||
|
|
||||||
|
if (isAnonymize)
|
||||||
|
{
|
||||||
|
var systemAnonymizationList = _systemAnonymizationRepository.Where(t => t.IsEnable).ToList();
|
||||||
|
|
||||||
|
addOrUpdateFixedFieldList = systemAnonymizationList.Where(t => t.IsFixed).ToList();
|
||||||
|
|
||||||
|
ircFieldList = systemAnonymizationList.Where(t => t.IsFixed == false).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
var subjectAndVisitInfo = _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => new { SubjectCode = t.Subject.Code, t.Trial.TrialCode, t.VisitNum }).FirstOrDefault();
|
||||||
|
|
||||||
|
var query = from sv in _subjectVisitRepository.Where(t => t.Id == subjectVisitId)
|
||||||
|
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
SubjectCode = sv.Subject.Code,
|
||||||
|
VisitName = sv.VisitName,
|
||||||
|
StudyList = sv.StudyList.Select(u => new
|
||||||
|
{
|
||||||
|
u.PatientId,
|
||||||
|
u.StudyTime,
|
||||||
|
u.StudyCode,
|
||||||
|
|
||||||
|
SeriesList = u.SeriesList.Select(z => new
|
||||||
|
{
|
||||||
|
z.Modality,
|
||||||
|
|
||||||
|
InstancePathList = z.DicomInstanceList.Select(k => new
|
||||||
|
{
|
||||||
|
k.Path
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}),
|
||||||
|
|
||||||
|
NoneDicomStudyList = sv.NoneDicomStudyList.Select(nd => new
|
||||||
|
{
|
||||||
|
nd.Modality,
|
||||||
|
nd.StudyCode,
|
||||||
|
nd.ImageDate,
|
||||||
|
|
||||||
|
FileList = nd.NoneDicomFileList.Select(file => new
|
||||||
|
{
|
||||||
|
file.FileName,
|
||||||
|
file.Path,
|
||||||
|
file.FileType
|
||||||
|
})
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
var info = query.FirstOrDefault();
|
||||||
|
|
||||||
|
if (info != null)
|
||||||
|
{
|
||||||
|
// 创建一个临时文件夹来存放文件
|
||||||
|
string tempFolderPath = Path.Combine(Directory.GetCurrentDirectory(), $"DownloadTemp_{NewId.NextGuid()}");
|
||||||
|
Directory.CreateDirectory(tempFolderPath);
|
||||||
|
|
||||||
|
//dicom 处理
|
||||||
|
|
||||||
|
if (isDicom)
|
||||||
|
{
|
||||||
|
// 遍历查询结果
|
||||||
|
foreach (var studyInfo in info.StudyList)
|
||||||
|
{
|
||||||
|
// 遍历 Series
|
||||||
|
foreach (var seriesInfo in studyInfo.SeriesList)
|
||||||
|
{
|
||||||
|
string studyDicomFolderPath = Path.Combine(tempFolderPath, "Dicom",/* $"{info.SubjectCode}_{info.VisitName}",*/ $"{studyInfo.StudyCode}_{studyInfo.StudyTime?.ToString("yyyy-MM-dd")}_{seriesInfo.Modality}");
|
||||||
|
|
||||||
|
// 创建 影像 文件夹
|
||||||
|
Directory.CreateDirectory(studyDicomFolderPath);
|
||||||
|
|
||||||
|
// 遍历 InstancePathList
|
||||||
|
foreach (var instanceInfo in seriesInfo.InstancePathList)
|
||||||
|
{
|
||||||
|
// 复制文件到相应的文件夹
|
||||||
|
string destinationPath = Path.Combine(studyDicomFolderPath, Path.GetFileName(instanceInfo.Path));
|
||||||
|
|
||||||
|
//下载到当前目录
|
||||||
|
await _oSSService.DownLoadFromOSSAsync(instanceInfo.Path, destinationPath);
|
||||||
|
|
||||||
|
#region 匿名化逻辑
|
||||||
|
|
||||||
|
|
||||||
|
if (isAnonymize)
|
||||||
|
{
|
||||||
|
//受试者随机阅片,需要匿名化检查时间
|
||||||
|
DicomFile dicomFile = await DicomFile.OpenAsync(destinationPath, Encoding.Default);
|
||||||
|
DicomDataset dataset = dicomFile.Dataset;
|
||||||
|
dataset.AddOrUpdate(DicomTag.StudyDate, string.Empty);
|
||||||
|
dataset.AddOrUpdate(DicomTag.StudyTime, string.Empty);
|
||||||
|
|
||||||
|
#region 前端已经匿名化,不需要做相关tag匿名化
|
||||||
|
//DicomFile dicomFile = await DicomFile.OpenAsync(destinationPath, Encoding.Default);
|
||||||
|
|
||||||
|
//DicomDataset dataset = dicomFile.Dataset;
|
||||||
|
|
||||||
|
//foreach (var item in addOrUpdateFixedFieldList)
|
||||||
|
//{
|
||||||
|
|
||||||
|
// var dicomTag = new DicomTag(Convert.ToUInt16(item.Group, 16), Convert.ToUInt16(item.Element, 16));
|
||||||
|
|
||||||
|
// dataset.AddOrUpdate(dicomTag, item.ReplaceValue);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//foreach (var item in ircFieldList)
|
||||||
|
//{
|
||||||
|
|
||||||
|
// var dicomTag = new DicomTag(Convert.ToUInt16(item.Group, 16), Convert.ToUInt16(item.Element, 16));
|
||||||
|
|
||||||
|
// if (dicomTag == DicomTag.ClinicalTrialProtocolID)
|
||||||
|
// {
|
||||||
|
// dataset.AddOrUpdate(dicomTag, subjectAndVisitInfo.TrialCode);
|
||||||
|
|
||||||
|
// }
|
||||||
|
// if (dicomTag == DicomTag.ClinicalTrialSiteID)
|
||||||
|
// {
|
||||||
|
// //dataset.AddOrUpdate(dicomTag, subjectAndVisitInfo.TrialSiteCode);
|
||||||
|
|
||||||
|
// }
|
||||||
|
// if (dicomTag == DicomTag.ClinicalTrialSubjectID)
|
||||||
|
// {
|
||||||
|
// dataset.AddOrUpdate(dicomTag, subjectAndVisitInfo.SubjectCode);
|
||||||
|
|
||||||
|
// }
|
||||||
|
// if (dicomTag == DicomTag.ClinicalTrialTimePointID)
|
||||||
|
// {
|
||||||
|
// dataset.AddOrUpdate(dicomTag, subjectAndVisitInfo.VisitNum.ToString());
|
||||||
|
|
||||||
|
// }
|
||||||
|
// if (dicomTag == DicomTag.PatientID)
|
||||||
|
// {
|
||||||
|
// dataset.AddOrUpdate(dicomTag, subjectAndVisitInfo.TrialCode + "_" + subjectAndVisitInfo.SubjectCode);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var zipDicomPath = Path.Combine(Directory.GetCurrentDirectory(), $"{info.SubjectCode}_{info.VisitName}_ImageStudy_Dicom.zip");
|
||||||
|
ZipFile.CreateFromDirectory(Path.Combine(tempFolderPath, "Dicom"), zipDicomPath);
|
||||||
|
//上传到Oss
|
||||||
|
var relativeDicomPath = await _oSSService.UploadToOSSAsync(zipDicomPath, $"download_zip", false);
|
||||||
|
|
||||||
|
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { PackState = PackState.Packed, VisitImageZipPath = relativeDicomPath });
|
||||||
|
|
||||||
|
|
||||||
|
File.Delete(zipDicomPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var relativeNoneDicomPath = string.Empty;
|
||||||
|
|
||||||
|
if (info.NoneDicomStudyList.Count() == 1 && info.NoneDicomStudyList.SelectMany(t => t.FileList).Count() == 1)
|
||||||
|
{
|
||||||
|
relativeNoneDicomPath = info.NoneDicomStudyList.First().FileList.First().Path;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//非dicom 处理
|
||||||
|
|
||||||
|
foreach (var noneDicomStudy in info.NoneDicomStudyList)
|
||||||
|
{
|
||||||
|
string studyNoneDicomFolderPath = Path.Combine(tempFolderPath, "NoneDicom", /*$"{info.SubjectCode}_{info.VisitName}",*/ $"{noneDicomStudy.StudyCode}_{noneDicomStudy.ImageDate.ToString("yyyy-MM-dd")}_{noneDicomStudy.Modality}");
|
||||||
|
|
||||||
|
Directory.CreateDirectory(studyNoneDicomFolderPath);
|
||||||
|
|
||||||
|
foreach (var file in noneDicomStudy.FileList)
|
||||||
|
{
|
||||||
|
string destinationPath = Path.Combine(studyNoneDicomFolderPath, Path.GetFileName(file.FileName));
|
||||||
|
|
||||||
|
//下载到当前目录
|
||||||
|
await _oSSService.DownLoadFromOSSAsync(HttpUtility.UrlDecode(file.Path) , destinationPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var zipNoneDicomPath = Path.Combine(Directory.GetCurrentDirectory(), $"{info.SubjectCode}_{info.VisitName}_ImageStudy_NoneDicom.zip");
|
||||||
|
ZipFile.CreateFromDirectory(Path.Combine(tempFolderPath, "NoneDicom"), zipNoneDicomPath);
|
||||||
|
relativeNoneDicomPath = await _oSSService.UploadToOSSAsync(zipNoneDicomPath, $"download_zip", false);
|
||||||
|
|
||||||
|
File.Delete(zipNoneDicomPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { PackState = PackState.Packed, VisitNoDicomImageZipPath = relativeNoneDicomPath });
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//清理文件夹
|
||||||
|
Directory.Delete(tempFolderPath, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == subjectVisitId, u => new SubjectVisit() { PackState = PackState.WaitPack });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,8 +49,8 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
var studyIds = await _studyRepository.AsQueryable()
|
var studyIds = await _studyRepository.AsQueryable()
|
||||||
.Where(t => t.TrialId == imageShareCommand.TrialId && t.SubjectId == imageShareCommand.SubjectId &&
|
.Where(t => t.TrialId == imageShareCommand.TrialId && t.SubjectId == imageShareCommand.SubjectId
|
||||||
t.SiteId == imageShareCommand.SiteId)
|
)
|
||||||
.Select(u => u.Id).ToListAsync();
|
.Select(u => u.Id).ToListAsync();
|
||||||
|
|
||||||
if (!studyIds.Any())
|
if (!studyIds.Any())
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
|
using System.Linq.Dynamic.Core;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Services
|
namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
@@ -26,7 +27,7 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
[HttpGet("{seriesId:guid}")]
|
[HttpGet("{seriesId:guid}")]
|
||||||
public async Task<IResponseOutput<List<DicomInstanceDTO>>> List(Guid seriesId)
|
public async Task<IResponseOutput<List<DicomInstanceDTO>>> List(Guid seriesId)
|
||||||
{
|
{
|
||||||
var list = await _instanceRepository.Where(s => s.SeriesId == seriesId).OrderBy(s => s.InstanceNumber).
|
var list = await _instanceRepository.Where(s => s.SeriesId == seriesId)/*.OrderBy(s => s.SliceLocation)*/.OrderBy(s => s.InstanceNumber).
|
||||||
ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||||
.ProjectTo<DicomInstanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<DicomInstanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
@@ -59,12 +60,6 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
|
|
||||||
path = (await _instanceRepository.Where(s => s.Id == instanceId).Select(t => t.Path).FirstOrDefaultAsync()).IfNullThrowException();
|
path = (await _instanceRepository.Where(s => s.Id == instanceId).Select(t => t.Path).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
//DicomInstance dicomInstance = await _instanceRepository.FirstOrDefaultAsync(s => s.Id == instanceId).IfNullThrowException();
|
|
||||||
|
|
||||||
//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);
|
|
||||||
|
|
||||||
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
|
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
|
||||||
|
|
||||||
using (var sw = ImageHelper.RenderPreviewJpeg(physicalPath))
|
using (var sw = ImageHelper.RenderPreviewJpeg(physicalPath))
|
||||||
@@ -85,16 +80,6 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
var filePath = string.Empty;
|
var filePath = string.Empty;
|
||||||
var path = (await _instanceRepository.Where(s => s.Id == instanceId).Select(t=>t.Path).FirstOrDefaultAsync()).IfNullThrowException();
|
var path = (await _instanceRepository.Where(s => s.Id == instanceId).Select(t=>t.Path).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
//DicomStudy dicomStudy = await _studyRepository.FirstOrDefaultAsync(s => s.Id == dicomInstance.StudyId).IfNullThrowException();
|
|
||||||
|
|
||||||
////if (dicomInstance.Anonymize) //被匿名化
|
|
||||||
////{
|
|
||||||
//// filePath = _dicomFileStoreHelper.GetInstanceFilePath(dicomStudy, dicomInstance.SeriesId, dicomInstance.Id + ".Anonymize");
|
|
||||||
////}
|
|
||||||
|
|
||||||
////else
|
|
||||||
//var (physicalPath, relativePath) = FileStoreHelper.GetDicomInstanceFilePath(_hostEnvironment, dicomStudy.TrialId, dicomStudy.SiteId, dicomStudy.SubjectId, dicomStudy.SubjectVisitId, dicomStudy.Id, dicomInstance.Id);
|
|
||||||
|
|
||||||
|
|
||||||
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
|
var physicalPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, path);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace IRaCIS.Core.Application.Contracts.Dicom
|
using FellowOakDicom;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Contracts.Dicom
|
||||||
{
|
{
|
||||||
public interface IDicomArchiveService
|
public interface IDicomArchiveService
|
||||||
{
|
{
|
||||||
@@ -18,7 +20,7 @@
|
|||||||
////[EasyCachingAble(Expiration = 6000)]
|
////[EasyCachingAble(Expiration = 6000)]
|
||||||
//string GetSeriesPreview(Guid seriesId);
|
//string GetSeriesPreview(Guid seriesId);
|
||||||
|
|
||||||
|
Task ArchiveDicomFileAsync(DicomDataset dicomDataset);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,36 +39,23 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime)
|
ThenBy(s => s.SeriesTime).ThenBy(s => s.CreateTime)
|
||||||
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
var idList = await _instanceRepository.Where(s => s.StudyId == studyId).OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber)
|
var instanceList = await _instanceRepository.Where(s => s.StudyId == studyId).OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber)
|
||||||
.ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
.ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||||
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames,t.InstanceNumber }).ToListAsync();//.GroupBy(u => u.SeriesId);
|
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames,t.InstanceNumber,t.HtmlPath }).ToListAsync();//.GroupBy(u => u.SeriesId);
|
||||||
|
|
||||||
foreach (var item in seriesList)
|
foreach (var series in seriesList)
|
||||||
{
|
{
|
||||||
item.InstanceList = idList.Where(s => s.SeriesId == item.Id).Select(u => u.Id).ToList();
|
|
||||||
|
|
||||||
//处理多帧
|
series.InstanceInfoList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k =>
|
||||||
item.InstancePathList = idList.Where(s => s.SeriesId == item.Id).OrderBy(t => t.InstanceNumber)
|
new InstanceBasicInfo()
|
||||||
.SelectMany(u =>
|
{
|
||||||
{
|
Id = k.Id,
|
||||||
|
NumberOfFrames = k.NumberOfFrames,
|
||||||
|
HtmlPath = k.HtmlPath,
|
||||||
|
Path = k.Path,
|
||||||
|
InstanceNumber = k.InstanceNumber,
|
||||||
|
|
||||||
if (u.NumberOfFrames > 1)
|
}).ToList();
|
||||||
{
|
|
||||||
var pathList = new List<string>();
|
|
||||||
|
|
||||||
for (int i = 1; i <= u.NumberOfFrames; i++)
|
|
||||||
{
|
|
||||||
pathList.Add(u.Path + "?frame=" + (i - 1));
|
|
||||||
}
|
|
||||||
return pathList;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return new List<string> { u.Path };
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.ToList();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 暂时废弃
|
#region 暂时废弃
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ using Microsoft.AspNetCore.Http;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Medallion.Threading;
|
using Medallion.Threading;
|
||||||
|
using System.Reactive.Subjects;
|
||||||
|
using DocumentFormat.OpenXml.Drawing.Diagrams;
|
||||||
|
using IRaCIS.Core.Application.Service.ImageAndDoc.DTO;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
{
|
{
|
||||||
@@ -107,7 +110,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
var studyMonitor = new StudyMonitor()
|
var studyMonitor = new StudyMonitor()
|
||||||
{
|
{
|
||||||
TrialId = preArchiveStudyCommand.TrialId,
|
TrialId = preArchiveStudyCommand.TrialId,
|
||||||
SiteId = preArchiveStudyCommand.SiteId,
|
|
||||||
SubjectId = preArchiveStudyCommand.SubjectId,
|
SubjectId = preArchiveStudyCommand.SubjectId,
|
||||||
SubjectVisitId = preArchiveStudyCommand.SubjectVisitId,
|
SubjectVisitId = preArchiveStudyCommand.SubjectVisitId,
|
||||||
|
|
||||||
@@ -132,7 +134,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IResponseOutput DicomUploadInProgress(Guid trialId, string studyInstanceUid)
|
public IResponseOutput DicomUploadInProgress(Guid trialId, string studyInstanceUid)
|
||||||
{
|
{
|
||||||
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
|
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(15));
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
@@ -143,16 +145,19 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
public async Task<IResponseOutput> AddOrUpdateArchiveStudy(NewArchiveStudyCommand incommand)
|
public async Task<IResponseOutput> AddOrUpdateArchiveStudy(NewArchiveStudyCommand incommand)
|
||||||
{
|
{
|
||||||
|
var modalitys = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var trialId = incommand.TrialId;
|
var trialId = incommand.TrialId;
|
||||||
|
|
||||||
|
|
||||||
var studyMonitor = await _studyMonitorRepository.FirstOrDefaultAsync(t => t.Id == incommand.StudyMonitorId);
|
var studyMonitor = await _studyMonitorRepository.FirstOrDefaultAsync(t => t.Id == incommand.StudyMonitorId);
|
||||||
studyMonitor.UploadFinishedTime = DateTime.Now;
|
studyMonitor.UploadFinishedTime = DateTime.Now;
|
||||||
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
||||||
studyMonitor.FailedFileCount = incommand.FailedFileCount;
|
studyMonitor.FailedFileCount = incommand.FailedFileCount;
|
||||||
studyMonitor.IsSuccess = incommand.FailedFileCount==0;
|
studyMonitor.IsSuccess = incommand.FailedFileCount == 0;
|
||||||
studyMonitor.RecordPath=incommand.RecordPath;
|
studyMonitor.RecordPath = incommand.RecordPath;
|
||||||
|
|
||||||
//上传
|
//上传
|
||||||
if (studyMonitor.IsDicomReUpload == false)
|
if (studyMonitor.IsDicomReUpload == false)
|
||||||
@@ -182,14 +187,24 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
study.Id = IdentifierHelper.CreateGuid(incommand.Study.StudyInstanceUid, incommand.TrialId.ToString());
|
study.Id = IdentifierHelper.CreateGuid(incommand.Study.StudyInstanceUid, incommand.TrialId.ToString());
|
||||||
study.TrialId = incommand.TrialId;
|
study.TrialId = incommand.TrialId;
|
||||||
study.SiteId = incommand.SiteId;
|
|
||||||
study.SubjectId = incommand.SubjectId;
|
study.SubjectId = incommand.SubjectId;
|
||||||
study.SubjectVisitId = incommand.SubjectVisitId;
|
study.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
|
||||||
|
//如果因为意外情况,连续点击两次,导致第一次插入了,第二次进来也会插入,在此判断一下
|
||||||
|
var findStudy = await _dicomstudyRepository.FirstOrDefaultAsync(t => t.Id == study.Id);
|
||||||
|
|
||||||
|
if (findStudy != null)
|
||||||
|
{
|
||||||
|
//直接返回
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//特殊处理逻辑
|
//特殊处理逻辑
|
||||||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
|
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
|
||||||
SpecialArchiveStudyDeal(study);
|
SpecialArchiveStudyDeal(study);
|
||||||
|
modalitys = study.Modalities;
|
||||||
|
|
||||||
await _dicomstudyRepository.AddAsync(study);
|
await _dicomstudyRepository.AddAsync(study);
|
||||||
|
|
||||||
@@ -206,7 +221,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
series.StudyId = study.Id;
|
series.StudyId = study.Id;
|
||||||
|
|
||||||
series.TrialId = incommand.TrialId;
|
series.TrialId = incommand.TrialId;
|
||||||
series.SiteId = incommand.SiteId;
|
|
||||||
series.SubjectId = incommand.SubjectId;
|
series.SubjectId = incommand.SubjectId;
|
||||||
series.SubjectVisitId = incommand.SubjectVisitId;
|
series.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
|
||||||
@@ -226,7 +240,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
isntance.SeriesId = series.Id;
|
isntance.SeriesId = series.Id;
|
||||||
|
|
||||||
isntance.TrialId = incommand.TrialId;
|
isntance.TrialId = incommand.TrialId;
|
||||||
isntance.SiteId = incommand.SiteId;
|
|
||||||
isntance.SubjectId = incommand.SubjectId;
|
isntance.SubjectId = incommand.SubjectId;
|
||||||
isntance.SubjectVisitId = incommand.SubjectVisitId;
|
isntance.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
|
||||||
@@ -247,11 +260,12 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
//重传的时候也要赋值检查Id
|
//重传的时候也要赋值检查Id
|
||||||
studyMonitor.StudyId = study.Id;
|
studyMonitor.StudyId = study.Id;
|
||||||
|
studyMonitor.StudyCode = study.StudyCode;
|
||||||
|
|
||||||
//特殊处理逻辑
|
//特殊处理逻辑
|
||||||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
|
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
|
||||||
SpecialArchiveStudyDeal(study);
|
SpecialArchiveStudyDeal(study);
|
||||||
|
modalitys = study.Modalities;
|
||||||
|
|
||||||
|
|
||||||
// 少了整个序列
|
// 少了整个序列
|
||||||
@@ -272,7 +286,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
series.StudyId = study.Id;
|
series.StudyId = study.Id;
|
||||||
|
|
||||||
series.TrialId = incommand.TrialId;
|
series.TrialId = incommand.TrialId;
|
||||||
series.SiteId = incommand.SiteId;
|
|
||||||
series.SubjectId = incommand.SubjectId;
|
series.SubjectId = incommand.SubjectId;
|
||||||
series.SubjectVisitId = incommand.SubjectVisitId;
|
series.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
|
||||||
@@ -296,7 +309,6 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
insntance.SeriesId = dicomSeries.Id;
|
insntance.SeriesId = dicomSeries.Id;
|
||||||
|
|
||||||
insntance.TrialId = incommand.TrialId;
|
insntance.TrialId = incommand.TrialId;
|
||||||
insntance.SiteId = incommand.SiteId;
|
|
||||||
insntance.SubjectId = incommand.SubjectId;
|
insntance.SubjectId = incommand.SubjectId;
|
||||||
insntance.SubjectVisitId = incommand.SubjectVisitId;
|
insntance.SubjectVisitId = incommand.SubjectVisitId;
|
||||||
|
|
||||||
@@ -335,12 +347,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok(modalitys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<UnionStudyViewModel>> GetDicomAndNoneDicomStudyList(StudyQuery studyQuery)
|
public async Task<PageOutput<UnionStudyViewModel>> GetDicomAndNoneDicomStudyList(StudyQuery studyQuery)
|
||||||
{
|
{
|
||||||
@@ -348,14 +358,14 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
var svExpression = QCCommon.GetDicomStudySubjectVisitFilter(studyQuery.VisitPlanArray);
|
var svExpression = QCCommon.GetDicomStudySubjectVisitFilter(studyQuery.VisitPlanArray);
|
||||||
|
|
||||||
var dicomStudyQuery = _repository.Where<DicomStudy>(t => t.TrialId == studyQuery.TrialId)
|
var dicomStudyQuery = _repository.Where<DicomStudy>(t => t.TrialId == studyQuery.TrialId)
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.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(!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)
|
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
||||||
.Select(t => new UnionStudyViewModel()
|
.Select(t => new UnionStudyViewModel()
|
||||||
{
|
{
|
||||||
TrialId = t.TrialId,
|
TrialId = t.TrialId,
|
||||||
SiteId = t.SiteId,
|
TrialSiteId = t.Subject.TrialSiteId,
|
||||||
SubjectId = t.SubjectId,
|
SubjectId = t.SubjectId,
|
||||||
SubjectVisitId = t.SubjectVisitId,
|
SubjectVisitId = t.SubjectVisitId,
|
||||||
VisitName = t.SubjectVisit.VisitName,
|
VisitName = t.SubjectVisit.VisitName,
|
||||||
@@ -380,9 +390,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
StudyTime = t.StudyTime,
|
StudyTime = t.StudyTime,
|
||||||
|
|
||||||
TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
|
TrialSiteAliasName = t.Subject.TrialSite.TrialSiteAliasName,
|
||||||
|
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||||
|
|
||||||
Uploader = t.Uploader.UserName,
|
Uploader = t.Uploader.UserName,
|
||||||
|
|
||||||
@@ -396,7 +406,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
|
|
||||||
var nodeDicomStudyQuery = _repository.Where<NoneDicomStudy>(t => t.TrialId == studyQuery.TrialId)
|
var nodeDicomStudyQuery = _repository.Where<NoneDicomStudy>(t => t.TrialId == studyQuery.TrialId)
|
||||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.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(!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, svExpression2)
|
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression2)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
||||||
@@ -404,7 +414,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
.Select(t => new UnionStudyViewModel()
|
.Select(t => new UnionStudyViewModel()
|
||||||
{
|
{
|
||||||
TrialId = t.TrialId,
|
TrialId = t.TrialId,
|
||||||
SiteId = t.SiteId,
|
TrialSiteId = t.Subject.TrialSiteId,
|
||||||
SubjectId = t.SubjectId,
|
SubjectId = t.SubjectId,
|
||||||
SubjectVisitId = t.SubjectVisitId,
|
SubjectVisitId = t.SubjectVisitId,
|
||||||
VisitName = t.SubjectVisit.VisitName,
|
VisitName = t.SubjectVisit.VisitName,
|
||||||
@@ -429,9 +439,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
StudyTime = t.ImageDate,
|
StudyTime = t.ImageDate,
|
||||||
|
|
||||||
TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
|
TrialSiteAliasName = t.Subject.TrialSite.TrialSiteAliasName,
|
||||||
|
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||||
|
|
||||||
Uploader = t.CreateUser.UserName,
|
Uploader = t.CreateUser.UserName,
|
||||||
|
|
||||||
@@ -445,7 +455,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
var unionQuery = dicomStudyQuery.Union(nodeDicomStudyQuery)
|
var unionQuery = dicomStudyQuery.Union(nodeDicomStudyQuery)
|
||||||
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
||||||
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
||||||
.WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId);
|
.WhereIf(studyQuery.TrialSiteId != null, t => t.TrialSiteId == studyQuery.TrialSiteId);
|
||||||
|
|
||||||
return await unionQuery.ToPagedListAsync(studyQuery.PageIndex, studyQuery.PageSize, studyQuery.SortField, studyQuery.Asc);
|
return await unionQuery.ToPagedListAsync(studyQuery.PageIndex, studyQuery.PageSize, studyQuery.SortField, studyQuery.Asc);
|
||||||
}
|
}
|
||||||
@@ -456,21 +466,21 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
{
|
{
|
||||||
var svExpression = QCCommon.GetStudyMonitorSubjectVisitFilter(studyQuery.VisitPlanArray);
|
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(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.Subject.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(!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)
|
.WhereIf(studyQuery.VisitPlanArray != null && studyQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
||||||
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
.WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
||||||
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
.WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
||||||
.WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId)
|
.WhereIf(studyQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == studyQuery.TrialSiteId)
|
||||||
.WhereIf(studyQuery.IsDicom != null, t => t.IsDicom == studyQuery.IsDicom )
|
.WhereIf(studyQuery.IsDicom != null, t => t.IsDicom == studyQuery.IsDicom)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.Uploader), t => t.Uploader.UserName.Contains(studyQuery.Uploader))
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.Uploader), t => t.Uploader.UserName.Contains(studyQuery.Uploader))
|
||||||
.WhereIf(studyQuery.IsSuccess != null, t => t.IsSuccess == studyQuery.IsSuccess)
|
.WhereIf(studyQuery.IsSuccess != null, t => t.IsSuccess == studyQuery.IsSuccess)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.StudyCode), t => t.StudyCode.Contains(studyQuery.StudyCode))
|
.WhereIf(!string.IsNullOrWhiteSpace(studyQuery.StudyCode), t => t.StudyCode.Contains(studyQuery.StudyCode))
|
||||||
.Select(t => new UnionStudyMonitorModel()
|
.Select(t => new UnionStudyMonitorModel()
|
||||||
{
|
{
|
||||||
TrialId = t.TrialId,
|
TrialId = t.TrialId,
|
||||||
SiteId = t.SiteId,
|
TrialSiteId = t.Subject.TrialSiteId,
|
||||||
SubjectId = t.SubjectId,
|
SubjectId = t.SubjectId,
|
||||||
SubjectVisitId = t.SubjectVisitId,
|
SubjectVisitId = t.SubjectVisitId,
|
||||||
VisitName = t.SubjectVisit.VisitName,
|
VisitName = t.SubjectVisit.VisitName,
|
||||||
@@ -481,9 +491,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
SubjectCode = t.Subject.Code,
|
SubjectCode = t.Subject.Code,
|
||||||
|
|
||||||
|
|
||||||
TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
|
TrialSiteAliasName = t.Subject.TrialSite.TrialSiteAliasName,
|
||||||
|
|
||||||
TrialSiteCode = t.TrialSite.TrialSiteCode,
|
TrialSiteCode = t.Subject.TrialSite.TrialSiteCode,
|
||||||
|
|
||||||
Uploader = t.Uploader.UserName,
|
Uploader = t.Uploader.UserName,
|
||||||
|
|
||||||
@@ -499,7 +509,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
ArchiveFinishedTime = t.ArchiveFinishedTime,
|
ArchiveFinishedTime = t.ArchiveFinishedTime,
|
||||||
|
|
||||||
|
|
||||||
RecordPath=t.RecordPath,
|
RecordPath = t.RecordPath,
|
||||||
|
|
||||||
IsDicomReUpload = t.IsDicomReUpload,
|
IsDicomReUpload = t.IsDicomReUpload,
|
||||||
StudyId = t.Id,
|
StudyId = t.Id,
|
||||||
@@ -514,108 +524,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 冗余查询
|
|
||||||
//var dicomStudyQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId && t.IsDicom)
|
|
||||||
// .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, 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(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
|
||||||
// .Select(t => new UnionStudyMonitorModel()
|
|
||||||
// {
|
|
||||||
// TrialId = t.TrialId,
|
|
||||||
// SiteId = t.SiteId,
|
|
||||||
// SubjectId = t.SubjectId,
|
|
||||||
// SubjectVisitId = t.SubjectVisitId,
|
|
||||||
// VisitName = t.SubjectVisit.VisitName,
|
|
||||||
// VisitNum = t.SubjectVisit.VisitNum,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// SubjectCode = t.Subject.Code,
|
|
||||||
|
|
||||||
|
|
||||||
// TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
|
|
||||||
|
|
||||||
// TrialSiteCode = t.TrialSite.TrialSiteCode,
|
|
||||||
|
|
||||||
// Uploader = t.Uploader.FullName,
|
|
||||||
|
|
||||||
// UploadTime = t.CreateTime,
|
|
||||||
|
|
||||||
|
|
||||||
// IP = t.IP,
|
|
||||||
// FileCount = t.FileCount,
|
|
||||||
// FileSize = t.FileSize,
|
|
||||||
// UploadFinishedTime = t.UploadFinishedTime,
|
|
||||||
// UploadStartTime = t.UploadStartTime,
|
|
||||||
|
|
||||||
// TotalMillisecondsInterval = t.TotalMillisecondsInterval,
|
|
||||||
|
|
||||||
// IsDicomReUpload = t.IsDicomReUpload,
|
|
||||||
// StudyId = t.Id,
|
|
||||||
// IsDicom = t.IsDicom,
|
|
||||||
|
|
||||||
// StudyCode = t.DicomStudy.StudyCode
|
|
||||||
// //DicomStudyCode = t.DicomStudy.StudyCode,
|
|
||||||
// //NoneDicomCode = 0,
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
////.ProjectTo<UnionStudyViewDodel>(_mapper.ConfigurationProvider);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//var nodeDicomStudyQuery = _repository.Where<StudyMonitor>(t => t.TrialId == studyQuery.TrialId && t.IsDicom == false)
|
|
||||||
// .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, 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(!string.IsNullOrWhiteSpace(studyQuery.SubjectInfo), t => t.Subject.Code.Contains(studyQuery.SubjectInfo))
|
|
||||||
|
|
||||||
// .Select(t => new UnionStudyMonitorModel()
|
|
||||||
// {
|
|
||||||
|
|
||||||
// TrialId = t.TrialId,
|
|
||||||
// SiteId = t.SiteId,
|
|
||||||
// SubjectId = t.SubjectId,
|
|
||||||
// SubjectVisitId = t.SubjectVisitId,
|
|
||||||
// VisitName = t.SubjectVisit.VisitName,
|
|
||||||
// VisitNum = t.SubjectVisit.VisitNum,
|
|
||||||
// SubjectCode = t.Subject.Code,
|
|
||||||
// TrialSiteAliasName = t.TrialSite.TrialSiteAliasName,
|
|
||||||
// TrialSiteCode = t.TrialSite.TrialSiteCode,
|
|
||||||
// Uploader = t.Uploader.FullName,
|
|
||||||
// UploadTime = t.CreateTime,
|
|
||||||
|
|
||||||
// IP = t.IP,
|
|
||||||
// FileCount = t.FileCount,
|
|
||||||
// FileSize = t.FileSize,
|
|
||||||
// UploadFinishedTime = t.UploadFinishedTime,
|
|
||||||
// UploadStartTime = t.UploadStartTime,
|
|
||||||
|
|
||||||
// TotalMillisecondsInterval = t.TotalMillisecondsInterval,
|
|
||||||
|
|
||||||
// IsDicomReUpload = t.IsDicomReUpload,
|
|
||||||
// StudyId = t.Id,
|
|
||||||
// IsDicom = t.IsDicom,
|
|
||||||
|
|
||||||
// StudyCode = t.NoneDicomStudy.StudyCode
|
|
||||||
|
|
||||||
// //DicomStudyCode = string.Empty,
|
|
||||||
// //NoneDicomCode = t.NoneDicomStudy.Code,
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
////.ProjectTo<UnionStudyViewDodel>(_mapper.ConfigurationProvider);
|
|
||||||
|
|
||||||
|
|
||||||
//var unionQuery = dicomStudyQuery.Union(nodeDicomStudyQuery)
|
|
||||||
// .WhereIf(studyQuery.SubjectId != null, t => t.SubjectId == studyQuery.SubjectId)
|
|
||||||
// .WhereIf(studyQuery.SubjectVisitId != null, t => t.SubjectId == studyQuery.SubjectVisitId)
|
|
||||||
// .WhereIf(studyQuery.SiteId != null, t => t.SiteId == studyQuery.SiteId);
|
|
||||||
|
|
||||||
//return await unionQuery.ToPagedListAsync(studyQuery.PageIndex, studyQuery.PageSize, string.IsNullOrEmpty(studyQuery.SortField) ? "UploadTime" : studyQuery.SortField, studyQuery.Asc);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -629,18 +540,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
path = (await _dicomInstanceRepository.Where(s => s.StudyId == studyId).Select(t => t.Path).FirstOrDefaultAsync()).IfNullThrowException();
|
path = (await _dicomInstanceRepository.Where(s => s.StudyId == studyId).Select(t => t.Path).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
|
||||||
//DicomInstance dicomInstance = await _repository.FirstOrDefaultAsync<DicomInstance>(s => s.StudyId == studyId);
|
|
||||||
|
|
||||||
//if (dicomInstance != null)
|
|
||||||
//{
|
|
||||||
// DicomStudy dicomStudy = await _repository.FirstOrDefaultAsync<DicomStudy>(s => s.Id == dicomInstance.StudyId);
|
|
||||||
// if (dicomStudy != null)
|
|
||||||
// {
|
|
||||||
// var( physicalPath ,relativePath )= FileStoreHelper.GetDicomInstanceFilePath(_hostEnvironment, dicomStudy.TrialId, dicomStudy.SiteId, dicomStudy.SubjectId, dicomStudy.SubjectVisitId, dicomStudy.Id, dicomInstance.Id);
|
|
||||||
|
|
||||||
// path = physicalPath;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
using (var sw = ImageHelper.RenderPreviewJpeg(path))
|
using (var sw = ImageHelper.RenderPreviewJpeg(path))
|
||||||
{
|
{
|
||||||
@@ -707,6 +607,124 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput<List<VerifyStudyUploadResult>>> VerifyTaskStudyAllowUploadAsync(VerifyTaskUploadOrReupload verifyInfo)
|
||||||
|
{
|
||||||
|
|
||||||
|
var queryStudy = _repository.Where<VisitTask>(t => t.SubjectId == verifyInfo.SubjectId && t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.Id).Select(u => new
|
||||||
|
{
|
||||||
|
VisitTaskId = u.Id,
|
||||||
|
SourceSubjectVisitId = u.SourceSubjectVisitId,
|
||||||
|
OrginalStudyList = u.SourceSubjectVisit.StudyList.Select(t => new StudyBasicInfo()
|
||||||
|
{
|
||||||
|
Id = t.Id,
|
||||||
|
StudyInstanceUid = t.StudyInstanceUid
|
||||||
|
}).ToList(),
|
||||||
|
|
||||||
|
UploadStudyList = u.TaskStudyList.Select(t => new
|
||||||
|
{
|
||||||
|
Id = t.Id,
|
||||||
|
StudyInstanceUid = t.StudyInstanceUid,
|
||||||
|
|
||||||
|
SeriesList = t.SeriesList.Select(t => new UploadedSeries()
|
||||||
|
{ SeriesId = t.Id, SeriesInstanceUid = t.SeriesInstanceUid, SOPInstanceUIDList = t.InstanceList.Select(c => c.SopInstanceUid).ToList() }).ToList()
|
||||||
|
|
||||||
|
|
||||||
|
}).ToList()
|
||||||
|
});
|
||||||
|
|
||||||
|
var studyList = await queryStudy.ToListAsync();
|
||||||
|
|
||||||
|
var resultList = new List<VerifyStudyUploadResult>();
|
||||||
|
|
||||||
|
var trialId = verifyInfo.TrialId;
|
||||||
|
|
||||||
|
var subjectId = verifyInfo.SubjectId;
|
||||||
|
|
||||||
|
var visitList = _repository.Where<SubjectVisit>(t => t.SubjectId == verifyInfo.SubjectId).Select(t => new { t.VisitNum, t.EarliestScanDate, t.LatestScanDate, t.Id }).ToList();
|
||||||
|
|
||||||
|
foreach (var waitUploadItem in verifyInfo.StudyInstanceUidList)
|
||||||
|
{
|
||||||
|
|
||||||
|
var studyInstanceUid = waitUploadItem.StudyInstanceUid;
|
||||||
|
|
||||||
|
var result = new VerifyStudyUploadResult();
|
||||||
|
|
||||||
|
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}") && _provider.Get<Guid>($"StudyUid_{trialId}_{studyInstanceUid}").Value != _userInfo.Id)
|
||||||
|
{
|
||||||
|
|
||||||
|
result.AllowUpload = false;
|
||||||
|
|
||||||
|
result.AllowReUpload = false;
|
||||||
|
result.StudyInstanceUid = studyInstanceUid;
|
||||||
|
//---当前有人正在上传归档该检查!
|
||||||
|
result.ErrorMesseage = _localizer["Study_UploadArchiving"];
|
||||||
|
|
||||||
|
resultList.Add(result);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var findOriginStudy = studyList.FirstOrDefault(c => c.OrginalStudyList.Any(t => t.StudyInstanceUid == studyInstanceUid));
|
||||||
|
|
||||||
|
|
||||||
|
if (findOriginStudy == null)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("该检查不属于该受试者,请核查");
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (findOriginStudy.UploadStudyList.Any(t => t.StudyInstanceUid == studyInstanceUid))
|
||||||
|
{
|
||||||
|
result.AllowReUpload = true;
|
||||||
|
result.AllowUpload = false;
|
||||||
|
|
||||||
|
result.UploadedSeriesList = findOriginStudy.UploadStudyList.Where(t => t.StudyInstanceUid == studyInstanceUid).SelectMany(t => t.SeriesList).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.AllowUpload = true;
|
||||||
|
|
||||||
|
result.AllowReUpload = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result.StudyInstanceUid = studyInstanceUid;
|
||||||
|
|
||||||
|
var @lock = _distributedLockProvider.CreateLock($"StudyUpload");
|
||||||
|
|
||||||
|
using (@lock.Acquire())
|
||||||
|
{
|
||||||
|
if (result.AllowReUpload || result.AllowUpload)
|
||||||
|
{
|
||||||
|
_provider.Set($"StudyUid_{trialId}_{studyInstanceUid}", _userInfo.Id, TimeSpan.FromSeconds(30));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_provider.Remove($"StudyUid_{trialId}_{studyInstanceUid}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultList.Add(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var systemAnonymizationList = _repository.Where<SystemAnonymization>(t => t.IsEnable).ToList();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok<List<VerifyStudyUploadResult>>(resultList, new
|
||||||
|
{
|
||||||
|
AnonymizeFixedList = systemAnonymizationList.Where(t => t.IsFixed).ToList(),
|
||||||
|
AnonymizeNotFixedList = systemAnonymizationList.Where(t => t.IsFixed == false).ToList()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批量验证 检查是否可以上传 并告知原因
|
/// 批量验证 检查是否可以上传 并告知原因
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -773,7 +791,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
|
|
||||||
var result = new VerifyStudyUploadResult();
|
var result = new VerifyStudyUploadResult();
|
||||||
|
|
||||||
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}"))
|
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}") && _provider.Get<Guid>($"StudyUid_{trialId}_{studyInstanceUid}").Value != _userInfo.Id)
|
||||||
{
|
{
|
||||||
|
|
||||||
result.AllowUpload = false;
|
result.AllowUpload = false;
|
||||||
@@ -786,7 +804,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_repository.Where<Subject>(t => t.Id == SubjectId).Select(t => t.Status).FirstOrDefault() == SubjectStatus.EndOfVisit)
|
if (_repository.Where<Domain.Models.Subject>(t => t.Id == SubjectId).Select(t => t.Status).FirstOrDefault() == SubjectStatus.EndOfVisit)
|
||||||
{
|
{
|
||||||
result.AllowUpload = false;
|
result.AllowUpload = false;
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,15 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<AddOrUpdateSeriesDto, DicomSeries>()
|
CreateMap<AddOrUpdateSeriesDto, DicomSeries>()
|
||||||
.ForMember(d => d.DicomInstanceList, u => u.Ignore());
|
.ForMember(d => d.DicomInstanceList, u => u.Ignore());
|
||||||
|
|
||||||
|
CreateMap<AddOrUpdateStudyDto, TaskStudy>()
|
||||||
|
.ForMember(d => d.SeriesList, u => u.Ignore());
|
||||||
|
CreateMap<AddOrUpdateSeriesDto, TaskSeries>()
|
||||||
|
.ForMember(d => d.InstanceList, u => u.Ignore());
|
||||||
|
|
||||||
CreateMap<AddInstanceDto, DicomInstance>();
|
CreateMap<AddInstanceDto, DicomInstance>();
|
||||||
|
|
||||||
|
CreateMap<AddInstanceDto, TaskInstance>();
|
||||||
|
|
||||||
|
|
||||||
CreateMap<DicomSeries, DicomSeriesWithLabelDTO>();
|
CreateMap<DicomSeries, DicomSeriesWithLabelDTO>();
|
||||||
|
|
||||||
@@ -33,8 +40,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
CreateMap<DicomStudy, StudyDTO>().IncludeMembers(t => t.Subject, u => u.SubjectVisit)
|
CreateMap<DicomStudy, StudyDTO>().IncludeMembers(t => t.Subject, u => u.SubjectVisit)
|
||||||
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.Site.SiteName))
|
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteName))
|
||||||
.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.UploaderFirstName, u => u.MapFrom(s => s.Uploader.FirstName))
|
||||||
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.Uploader.LastName))
|
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.Uploader.LastName))
|
||||||
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime));
|
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime));
|
||||||
@@ -59,7 +65,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
;
|
;
|
||||||
|
|
||||||
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
||||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
.ForMember(o => o.IsCompleteClinicalData, t => t.MapFrom(u => !u.ReadingClinicalDataList.Any(x=>x.ReadingClinicalDataPDFList.Count()==0)))
|
||||||
|
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
||||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
||||||
.ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t=>t.FailedFileCount>0)))
|
.ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t=>t.FailedFileCount>0)))
|
||||||
@@ -79,6 +86,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<DicomInstance, DicomInstanceDTO>()
|
CreateMap<DicomInstance, DicomInstanceDTO>()
|
||||||
.ForMember(o => o.IsDeleted, t => t.MapFrom(u => u.DicomSerie.IsDeleted))
|
.ForMember(o => o.IsDeleted, t => t.MapFrom(u => u.DicomSerie.IsDeleted))
|
||||||
|
.ForMember(o => o.SliceThickness, t => t.MapFrom(u => u.DicomSerie.SliceThickness))
|
||||||
.ForMember(o => o.IsReading, t => t.MapFrom(u => u.DicomSerie.IsReading));
|
.ForMember(o => o.IsReading, t => t.MapFrom(u => u.DicomSerie.IsReading));
|
||||||
CreateMap<DicomStudy, DicomStudyDTO>();
|
CreateMap<DicomStudy, DicomStudyDTO>();
|
||||||
CreateMap<DicomSeries, DicomSeriesDTO>();
|
CreateMap<DicomSeries, DicomSeriesDTO>();
|
||||||
@@ -96,8 +104,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
//.ForMember(d => d.Modality, u => u.MapFrom(s => s.Modalities))
|
//.ForMember(d => d.Modality, u => u.MapFrom(s => s.Modalities))
|
||||||
.ForMember(d => d.Bodypart, u => u.MapFrom(s => s.BodyPartExamined))
|
.ForMember(d => d.Bodypart, u => u.MapFrom(s => s.BodyPartExamined))
|
||||||
.ForMember(d => d.StudyTime, u => u.MapFrom(s => s.StudyTime))
|
.ForMember(d => d.StudyTime, u => u.MapFrom(s => s.StudyTime))
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode))
|
||||||
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.TrialSite.TrialSiteAliasName))
|
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteAliasName))
|
||||||
.ForMember(d => d.IsDicom, u => u.MapFrom(s => true))
|
.ForMember(d => d.IsDicom, u => u.MapFrom(s => true))
|
||||||
.ForMember(d => d.Count, u => u.MapFrom(s => s.SeriesCount))
|
.ForMember(d => d.Count, u => u.MapFrom(s => s.SeriesCount))
|
||||||
.ForMember(d => d.VisitNum, u => u.MapFrom(s => s.SubjectVisit.VisitNum))
|
.ForMember(d => d.VisitNum, u => u.MapFrom(s => s.SubjectVisit.VisitNum))
|
||||||
@@ -108,8 +116,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
//.ForMember(d => d.Modality, u => u.MapFrom(s => s.Modalities))
|
//.ForMember(d => d.Modality, u => u.MapFrom(s => s.Modalities))
|
||||||
.ForMember(d => d.Bodypart, u => u.MapFrom(s => s.BodyPart))
|
.ForMember(d => d.Bodypart, u => u.MapFrom(s => s.BodyPart))
|
||||||
.ForMember(d => d.StudyTime, u => u.MapFrom(s => s.ImageDate))
|
.ForMember(d => d.StudyTime, u => u.MapFrom(s => s.ImageDate))
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode))
|
||||||
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.TrialSite.TrialSiteAliasName))
|
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteAliasName))
|
||||||
.ForMember(d => d.IsDicom, u => u.MapFrom(s => false))
|
.ForMember(d => d.IsDicom, u => u.MapFrom(s => false))
|
||||||
.ForMember(d => d.Count, u => u.MapFrom(s => s.NoneDicomFileList.Count()))
|
.ForMember(d => d.Count, u => u.MapFrom(s => s.NoneDicomFileList.Count()))
|
||||||
.ForMember(d => d.VisitNum, u => u.MapFrom(s => s.SubjectVisit.VisitNum))
|
.ForMember(d => d.VisitNum, u => u.MapFrom(s => s.SubjectVisit.VisitNum))
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||||||
{
|
{
|
||||||
|
|
||||||
public Guid? TrialId { get; set; }
|
public Guid? TrialId { get; set; }
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? TrialSiteId { get; set; }
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
public Guid? SubjectVisitId { get; set; }
|
public Guid? SubjectVisitId { get; set; }
|
||||||
|
|
||||||
@@ -336,7 +336,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public Guid SiteId { get; set; }
|
public Guid TrialSiteId { get; set; }
|
||||||
|
|
||||||
public string Code { get; set; } = string.Empty;
|
public string Code { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
@@ -441,7 +441,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 中心
|
/// 中心
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? SiteId { get; set; }
|
public Guid? TrialSiteId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 受试者
|
/// 受试者
|
||||||
@@ -480,6 +480,8 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string OpByUserName { get; set; } = string.Empty;
|
public string OpByUserName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string? CreateUserName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 阅读片人
|
/// 阅读片人
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -509,6 +511,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||||||
public Guid? TrialReadingCriterionId { get; set; }
|
public Guid? TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string? TaskName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InspectionBase
|
public class InspectionBase
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user