JyResult.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <template>
  2. <div
  3. style="position: relative; padding: 0 12px; height: 96%; font-size: 12px"
  4. >
  5. <h3
  6. style="
  7. width: 100%;
  8. text-align: center;
  9. font-weight: bold;
  10. height: 30px;
  11. line-height: 35px;
  12. "
  13. >
  14. {{ env.VITE_HOSPITAL_NAME }}检验报告单
  15. </h3>
  16. <div style="display: flex">
  17. <div style="width: 25%">
  18. 姓名:{{data.base.pname}}
  19. </div>
  20. <div style="width: 25%">
  21. 性别:{{data.base.sex}}
  22. </div>
  23. <div style="width: 25%">
  24. 年龄:{{data.base.age}}
  25. </div>
  26. <div style="width: 25%">
  27. {{data.base.patientId}}
  28. </div>
  29. </div>
  30. <div style="display: flex">
  31. <div style="width: 25%">
  32. 科室:{{data.base.reqWardName}}
  33. </div>
  34. <div style="width: 25%">
  35. 床号:床号
  36. </div>
  37. <div style="width: 25%">
  38. 标本类型:{{data.base.inspectStuffName}}
  39. </div>
  40. <div style="width: 25%">
  41. <div>
  42. 申请项目:{{data.base.orderName}}
  43. </div>
  44. </div>
  45. </div>
  46. <div style="margin: 5px 0; border-top: 1px solid gray"></div>
  47. <div v-if="true">
  48. <div style="display: inline-block; width: 49.7%; vertical-align: top">
  49. <div style="display: flex">
  50. <div style="width: 30%">检验项目</div>
  51. <div style="width: 16.66%">结果</div>
  52. <div style="width: 16.66%">单位</div>
  53. <div style="width: 16.66%">说明</div>
  54. <div style="width: 20%">参考值</div>
  55. </div>
  56. <div style="margin: 5px 0; border-top: 1px solid gray"></div>
  57. <div
  58. v-for="(item, index) in data.rptList.slice(
  59. 0,
  60. data.halfBacSize
  61. )"
  62. :key="index"
  63. style="display: flex"
  64. >
  65. <div style="width: 30%">
  66. <div>{{item.rptItemname}}</div>
  67. </div>
  68. <div style="width: 16.66%">
  69. {{item.resultStr}}
  70. </div>
  71. <div style="width: 16.66%">{{item.resultUnit}}</div>
  72. <div style="width: 16.66%">
  73. <span
  74. v-html="
  75. getItemAlert(item.resultFlag)
  76. "
  77. ></span>
  78. </div>
  79. <div style="width: 20%">{{item.resultRef}}</div>
  80. </div>
  81. </div>
  82. <div style="display: inline-block; width: 49.7%; vertical-align: top">
  83. <div style="display: flex">
  84. <div style="width: 30%">检验项目</div>
  85. <div style="width: 16.66%">结果</div>
  86. <div style="width: 16.66%">单位</div>
  87. <div style="width: 16.66%">说明</div>
  88. <div style="width: 20%">参考值</div>
  89. </div>
  90. <div style="margin: 5px 0; border-top: 1px solid gray"></div>
  91. <div
  92. v-for="(item, index) in data.rptList.slice(
  93. data.halfBacSize
  94. )"
  95. :key="index"
  96. style="display: flex"
  97. >
  98. <div style="width: 30%">
  99. <div>{{item.rptItemname}}</div>
  100. </div>
  101. <div style="width: 16.66%">
  102. {{item.resultStr}}
  103. </div>
  104. <div style="width: 16.66%">{{item.resultUnit}}</div>
  105. <div style="width: 16.66%">
  106. <span
  107. v-html="
  108. getItemAlert(item.resultFlag)
  109. "
  110. ></span>
  111. </div>
  112. <div style="width: 20%">{{item.resultRef}}</div>
  113. </div>
  114. </div>
  115. </div>
  116. <!-- <div v-if="data.reportType === '细菌'">
  117. <div style="display: flex">
  118. <div style="width: 25%">检验项目</div>
  119. <div style="width: 75%">结果</div>
  120. </div>
  121. <div style="margin: 5px 0; border-top: 1px solid gray"></div>
  122. <div
  123. v-if="data.inspectionDetail?.items.length > 0"
  124. style="margin: 0 30px"
  125. v-for="item in data.inspectionDetail.items"
  126. >
  127. <div style="display: flex; width: 70%; margin: 2px 0">
  128. <div style="width: 32%">{{ item.itmName }}</div>
  129. <div style="width: 66%">{{ item.rsltStrs }}</div>
  130. </div>
  131. </div>
  132. <div
  133. v-if="data.bacterias.length > 0"
  134. style="margin: 0 30px; padding-bottom: 5px"
  135. v-for="(antibioticItem, index) in data.bacterias"
  136. :style="index > 0 ? { borderTop: '1px dashed gray' } : {}"
  137. >
  138. <div style="display: flex; width: 70%; margin: 8px 0 4px 0">
  139. <div style="width: 32%">{{ antibioticItem.type }}</div>
  140. <div style="width: 66%">{{ antibioticItem.germName }}</div>
  141. </div>
  142. <div style="display: inline-block; width: 49.7%; vertical-align: top">
  143. <div style="display: flex">
  144. <div style="width: 33.33%">抗菌药物</div>
  145. <div style="width: 33.33%">抗菌药物编码</div>
  146. <div style="width: 16.66%">MIC值</div>
  147. <div style="width: 16.66%">敏感性</div>
  148. </div>
  149. <div style="margin: 5px 0; border-top: 1px solid gray"></div>
  150. <div
  151. v-if="antibioticItem.antiList"
  152. style="display: flex"
  153. v-for="(bac, index) in antibioticItem.antiList.slice(
  154. 0,
  155. antibioticItem.halfBacSize
  156. )"
  157. :key="index"
  158. >
  159. <div style="width: 33.33%">
  160. <div>{{ bac.antiNameCn.substring(0, 8) }}</div>
  161. <div>{{ bac.antiNameCn.substring(8) }}</div>
  162. </div>
  163. <div style="width: 33.33%">{{ bac.antiAbb }}</div>
  164. <div style="width: 16.66%">{{ bac.antiMic }}</div>
  165. <div style="width: 16.66%">{{ bac.antiValue }}</div>
  166. </div>
  167. </div>
  168. <div style="display: inline-block; width: 47%; vertical-align: top">
  169. <div style="display: flex">
  170. <div style="width: 33.33%">抗菌药物</div>
  171. <div style="width: 33.33%">抗菌药物编码</div>
  172. <div style="width: 16.66%">MIC值</div>
  173. <div style="width: 16.66%">敏感性</div>
  174. </div>
  175. <div style="margin: 5px 0; border-top: 1px solid gray"></div>
  176. <div
  177. v-if="antibioticItem.halfBacSize > 1"
  178. style="display: flex"
  179. v-for="(bac, index) in antibioticItem.antiList.slice(
  180. antibioticItem.halfBacSize
  181. )"
  182. :key="index"
  183. >
  184. <div style="width: 33.33%">
  185. <div>{{ bac.antiNameCn.substring(0, 8) }}</div>
  186. <div>{{ bac.antiNameCn.substring(8) }}</div>
  187. </div>
  188. <div style="width: 33.33%">{{ bac.antiAbb }}</div>
  189. <div style="width: 16.66%">{{ bac.antiMic }}</div>
  190. <div style="width: 16.66%">{{ bac.antiValue }}</div>
  191. </div>
  192. </div>
  193. </div>
  194. <div v-else>
  195. <div v-for="item in data.inspectionDetail.items" style="display: flex">
  196. <div style="width: 25%">{{ item.itmName }}</div>
  197. <div style="width: 75%">{{ item.itmStrValue || item.rsltStrs }}</div>
  198. </div>
  199. </div>
  200. </div>-->
  201. <div style="position: absolute; bottom: 10px; left: 0; right: 0">
  202. <span style="margin-left: 20px"
  203. >{{data.base.reqComment}}</span
  204. >
  205. <div style="margin: 5px 0; border-top: 1px solid gray"></div>
  206. <div style="display: flex">
  207. <div style="width: 8%"></div>
  208. <div style="width: 25%">
  209. 接收时间:{{data.base.reqDate}}
  210. </div>
  211. <div style="width: 33.33%">
  212. 检验时间:{{data.base.chargeDate}}
  213. </div>
  214. <div style="width: 33.33%">
  215. 报告时间:{{data.base.transDt}}
  216. </div>
  217. </div>
  218. <div style="display: flex">
  219. <div style="width: 8%"></div>
  220. <div style="width: 25%">
  221. 送检医生:{{data.base.doctorName}}
  222. </div>
  223. <div style="width: 33.33%">
  224. 检验者:{{data.base.transUser}}
  225. </div>
  226. <div style="width: 33.33%">
  227. 审核者:
  228. </div>
  229. </div>
  230. <div style="margin: 5px 0; border-top: 1px solid gray"></div>
  231. <div
  232. style="
  233. width: 100%;
  234. text-align: center;
  235. font-weight: bold;
  236. height: 30px;
  237. font-size: 12px;
  238. "
  239. >
  240. ***此结果仅对所检测的标本负责***
  241. <span style="margin-left: 10px; font-size: 12px"
  242. >备注:升高(↑),降低(↓),阳性(+),阴性(-)</span
  243. >
  244. </div>
  245. <el-divider class="el-divider_shorter" />
  246. </div>
  247. </div>
  248. </template>
  249. <script setup>
  250. import env from "../../../utils/setting";
  251. const props = defineProps({
  252. data: {
  253. type: Object,
  254. required: true,
  255. },
  256. });
  257. function filterSex(val) {
  258. switch (val) {
  259. case 0:
  260. return "未填";
  261. case 1:
  262. return "男";
  263. case 2:
  264. return "女";
  265. case 3:
  266. return "未知";
  267. }
  268. return "";
  269. }
  270. function filterAgeUnit(val) {
  271. switch (val) {
  272. case 0:
  273. return "岁";
  274. case 1:
  275. return "月";
  276. case 2:
  277. return "天";
  278. case 3:
  279. return "时";
  280. }
  281. return "";
  282. }
  283. function getItemAlert(val, strValue, value) {
  284. console.log(val, strValue, value)
  285. // if (strValue !== "" || value === "") return "";
  286. switch (val) {
  287. case "L":
  288. return '<span style="color:#F56C6C;font-weight:bold">偏低↓</span>';
  289. case "H":
  290. return '<span style="color:#F56C6C;font-weight:bold">偏高↑</span>';
  291. case "LL":
  292. return '<span style="color:#F56C6C;font-weight:bold">偏低报警↓</span>';
  293. case "HH":
  294. return '<span style="color:#F56C6C;font-weight:bold">偏高报警↑</span>';
  295. case "P":
  296. return '<span style="color:#F56C6C;font-weight:bold">阳性+</span>';
  297. case "Q":
  298. return '<span style="color:#F56C6C;font-weight:bold">弱阳性+</span>';
  299. }
  300. return "";
  301. }
  302. </script>