RecipeAuditD.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. <template>
  2. <div class="recipeAuditD">
  3. <div class="btn flex flex-row-between">
  4. <el-button size="small" type="primary" @click="$router.back()">返回</el-button>
  5. <el-button size="small" type="primary" @click="submit">提交</el-button>
  6. </div>
  7. <div class="container-detail flex flex-row-left flex-col-top">
  8. <div class="recipe-left" v-if="msg.patient">
  9. <div class="title flex flex-row-left flex-col-center">
  10. <img src="../../assets/new-icon/people.png" alt />
  11. <span>患者信息</span>
  12. </div>
  13. <div class="msg">
  14. <div class="msg-row flex flex-row-left flex-col-cneter">
  15. <div class="msg-item flex-plane-center-l">
  16. <span>姓名:</span>
  17. <div>{{msg.patient.name}}</div>
  18. </div>
  19. <div class="msg-item flex-plane-center-l">
  20. <span>性别:</span>
  21. <div>{{msg.patient.sex}}</div>
  22. </div>
  23. <div class="msg-item flex-plane-center-l">
  24. <span>年龄:</span>
  25. <div>{{msg.patient.age}}岁</div>
  26. </div>
  27. </div>
  28. <div class="msg-row flex flex-row-left flex-col-cneter">
  29. <div class="msg-item flex-plane-center-l">
  30. <span>备注:</span>
  31. <div>{{msg.patient.pregnancy==2?'妊娠期':msg.patient.breastfeeding==1?'哺乳期':'无'}}</div>
  32. </div>
  33. <div class="msg-item flex-plane-center-l">
  34. <span>电话:</span>
  35. <div>{{msg.patient.phone}}</div>
  36. </div>
  37. </div>
  38. <div class="msg-item flex-plane-center-l">
  39. <span>身份证:</span>
  40. <div>{{msg.patient.idcard}}</div>
  41. </div>
  42. <div class="msg-item flex-plane-center-l">
  43. <span>地址:</span>
  44. <div>{{msg.patient.province}}{{msg.patient.city}}{{msg.patient.district}}{{msg.patient.detailadress}}</div>
  45. </div>
  46. </div>
  47. <div class="title flex flex-row-left flex-col-center">
  48. <img src="../../assets/new-icon/book.png" alt />
  49. <span>就诊信息</span>
  50. </div>
  51. <div class="msg">
  52. <div class="msg-row flex flex-row-left flex-col-center">
  53. <div class="msg-item flex-plane-center-l">
  54. <span>就诊日期:</span>
  55. <div>{{caseItem.treatmentTime}}</div>
  56. </div>
  57. <div class="msg-item flex-plane-center-l">
  58. <span>就诊科室:</span>
  59. <div>{{caseItem.clinic}}</div>
  60. </div>
  61. </div>
  62. <div class="msg-row flex flex-row-left flex-col-center">
  63. <div class="msg-item flex-plane-center-l">
  64. <span>就诊医生:</span>
  65. <div>{{msg.outpatientRecords.doctor}}</div>
  66. </div>
  67. <div class="msg-item flex-plane-center-l" v-if="false">
  68. <span>开方时间:</span>
  69. <div>{{msg.outpatientRecords.createTime}}</div>
  70. </div>
  71. </div>
  72. <div class="msg-row flex flex-row-left flex-col-center">
  73. <div class="msg-item flex-plane-center-l">
  74. <span>中医诊断:</span>
  75. <div>{{caseItem.tcmDiagnosis}}</div>
  76. </div>
  77. <div class="msg-item flex-plane-center-l">
  78. <span>治法:</span>
  79. <div>{{caseItem.treatment}}</div>
  80. </div>
  81. </div>
  82. <div class="msg-item flex flex-col-top">
  83. <span>其他诊断:</span>
  84. <div>
  85. <div
  86. v-for="(item,index) in msg.secondDiagnosis"
  87. :key="index"
  88. >{{item.namemedicine?item.namemedicine-item.syndrometypes:item.diagnosis}}</div>
  89. </div>
  90. </div>
  91. <div class="msg-item flex-plane-center-l">
  92. <span>主诉:</span>
  93. <div>{{msg.electronicmedicalrecord?msg.electronicmedicalrecord.chiefcomplaint:''}}</div>
  94. </div>
  95. <div class="msg-item flex-plane-center-l">
  96. <span>现病史:</span>
  97. <div>{{msg.electronicmedicalrecord?msg.electronicmedicalrecord.historypresent:''}}</div>
  98. </div>
  99. <div class="msg-item flex-plane-center-l">
  100. <span>既往史:</span>
  101. <div>{{msg.electronicmedicalrecord?msg.electronicmedicalrecord.pasthistory:''}}</div>
  102. </div>
  103. <div class="msg-item flex-plane-center-l">
  104. <span>体格检查:</span>
  105. <div>{{msg.electronicmedicalrecord?msg.electronicmedicalrecord.physicalexamination:''}}</div>
  106. </div>
  107. <div class="msg-item flex-plane-center-l">
  108. <span>辅助检查:</span>
  109. <div>{{msg.electronicmedicalrecord?msg.electronicmedicalrecord.supplementaryexamination:''}}</div>
  110. </div>
  111. <!-- <div class="msg-item flex-plane-center-l">
  112. <span>诊断:</span>
  113. <div>{{msg.mainDiagnosis.diagnosis?msg.mainDiagnosis.diagnosis:msg.mainDiagnosis.namemedicine}}
  114. </div>
  115. </div>
  116. <div class="msg-item flex-plane-center-l" v-if="!msg.mainDiagnosis.diagnosis">
  117. <span>治法:</span>
  118. <div>{{msg.mainDiagnosis.namemedicine}}</div>
  119. </div>-->
  120. <!-- <div class="msg-item flex-plane-center-l">
  121. <span>处方类型:</span>
  122. <div>中药处方</div>
  123. </div>-->
  124. <div class="msg-item flex flex-col-top">
  125. <span>报告图片:</span>
  126. <div>
  127. <el-image
  128. :preview-src-list="msg.electronicmedicalrecord.image1"
  129. style="width:100px;height:100px;margin-right:20px;"
  130. :src="item1"
  131. alt
  132. v-for="(item1,index1) in msg.electronicmedicalrecord.image1"
  133. :key="index1"
  134. />
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="recipe-right" v-if="msg.patientprescription">
  140. <div class="title flex flex-row-left flex-col-center">
  141. <img src="../../assets/new-icon/people.png" alt />
  142. <span>处置方案</span>
  143. </div>
  144. <div class="recipe-tabs">
  145. <div
  146. class="recipe-tabs-item"
  147. v-for="(item,index) in msg.patientprescription"
  148. :key="index"
  149. @click="changeTab(item,index)"
  150. >
  151. <div
  152. class="name"
  153. :style="current==index?'color:#5386F6':''"
  154. >{{item.type==0?'中药处方'+(item.seqn):item.type==1?'中药制剂处方':'适宜技术处方'}}</div>
  155. <img src="../../assets/new-icon/pass.png" alt v-if="item.shState==0" />
  156. <img src="../../assets/new-icon/no-pass.png" alt v-if="item.shState==1" />
  157. </div>
  158. </div>
  159. <div class v-if="msg.patientprescription[current].type==0">
  160. <chinesepad :recipeData="chineseData"></chinesepad>
  161. </div>
  162. <div class v-if="msg.patientprescription[current].type==1">
  163. <chineseMadepad :recipeData="chineseMadeData"></chineseMadepad>
  164. </div>
  165. <div class v-if="msg.patientprescription[current].type==2">
  166. <suitPad :recipeData="suitData"></suitPad>
  167. </div>
  168. <!-- 审核不通过原因 -->
  169. <div
  170. v-if="msg.patientprescription[current].revierwstate<2?true:false"
  171. style="color:red;margin:15px 0;font-size: 14px;padding-left: 10px;"
  172. >不通过原因:{{msg.patientprescription[current].cause}}</div>
  173. <!-- 审核 -->
  174. <!-- -->
  175. <div class="review" v-if="msg.patientprescription[current].revierwstate>=2?true:false">
  176. <div class="flex flex-row-right">
  177. <el-button type="primary" size="mini" style="width:80px;" @click="pass">通过</el-button>
  178. </div>
  179. <div class="flex flex-row-right" style="margin-top:10px;">
  180. <input v-model="reason" class="reason-input" type="text" placeholder="请输入不通过原因" />
  181. <el-button type="danger" size="mini" style="width:80px;" @click="noPass">不通过</el-button>
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. </template>
  188. <script>
  189. import {
  190. getRecipeAuditD,
  191. auditRecipe,
  192. getMedForRecipeA
  193. } from "@/api/business.js";
  194. import {
  195. getChinesePadDetail,
  196. getChineseMadePad,
  197. getSuitMadePad
  198. } from "@/api/standard";
  199. import chinesepad from "@/components/ui/chineseMedicinePad.vue";
  200. import chineseMadepad from "@/components/ui/chineseMadePad.vue";
  201. import suitPad from "@/components/ui/suitMadePad.vue";
  202. import { getRecordDetail } from "@/api/diagnosis";
  203. import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
  204. import {formatPicture} from "@/utils/picture";
  205. export default {
  206. components: {
  207. chinesepad,
  208. chineseMadepad,
  209. suitPad
  210. },
  211. data() {
  212. return {
  213. type: "edit",
  214. caseItem: null,
  215. radio: 0,
  216. current: 0,
  217. suitData: {},
  218. chineseData: {},
  219. chineseMadeData: {},
  220. ops: {
  221. vuescroll: {},
  222. scrollPanel: {},
  223. rail: {
  224. keepShow: true
  225. },
  226. bar: {
  227. hoverStyle: true,
  228. onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
  229. background: "#C1C1C1", //滚动条颜色
  230. opacity: 0.5, //滚动条透明度
  231. "overflow-x": "hidden"
  232. }
  233. },
  234. msg: {},
  235. reason: ""
  236. };
  237. },
  238. created() {
  239. if (this.$route.query.type) {
  240. this.type = this.$route.query.type;
  241. }
  242. this.getRecipeAuditD();
  243. },
  244. methods: {
  245. // 切换药方
  246. changeTab(item, index) {
  247. if (item.type == 0) {
  248. this._getChinesePadDetail(item.pid);
  249. }
  250. if (item.type == 1) {
  251. this._getChineseMadePad(item.pid);
  252. }
  253. if (item.type == 2) {
  254. this._getSuitMadePad(item.pid);
  255. }
  256. this.current = index;
  257. this.reason = item.reason;
  258. },
  259. // 审核通过
  260. pass() {
  261. this.msg.patientprescription[this.current].shState = 0;
  262. },
  263. noPass() {
  264. if (!this.reason) {
  265. this.$message.error("请输入不通过原因");
  266. return;
  267. }
  268. this.msg.patientprescription[this.current].reason = this.reason;
  269. this.msg.patientprescription[this.current].shState = 1;
  270. if (this.current != this.msg.patientprescription.length - 1) {
  271. let item = this.msg.patientprescription[this.current + 1];
  272. if (item.type == 0) {
  273. this._getChinesePadDetail(item.pid);
  274. }
  275. if (item.type == 1) {
  276. this._getChineseMadePad(item.pid);
  277. }
  278. if (item.type == 2) {
  279. this._getSuitMadePad(item.pid);
  280. }
  281. this.current += 1;
  282. this.reason = "";
  283. }
  284. },
  285. submit() {
  286. let reviewNum = 0;
  287. this.msg.patientprescription.forEach(item => {
  288. if (item.shState === 0 || item.shState === 1) {
  289. reviewNum += 1;
  290. }
  291. });
  292. if (reviewNum != this.msg.patientprescription.length) {
  293. this.$message.warning("当前有处方尚未审核");
  294. return;
  295. }
  296. this.auditRecipe();
  297. },
  298. stateC(e, index) {
  299. this.msg.patientprescription[index].revierwstate = e;
  300. },
  301. async auditRecipe() {
  302. let reviewParam = [];
  303. this.msg.patientprescription.forEach(item => {
  304. let obj = {
  305. reviewState: item.shState,
  306. pid: item.pid,
  307. cause: item.reason
  308. };
  309. if (item.revierwstate >= 2) {
  310. reviewParam.push(obj);
  311. }
  312. });
  313. let params = {
  314. reviewParam
  315. };
  316. const loading = this.$loading({
  317. lock: true,
  318. text: "正在保存",
  319. spinner: "el-icon-loading",
  320. background: "rgba(0, 0, 0, 0.7)"
  321. });
  322. let res = await auditRecipe(params).catch(err => {
  323. loading.close();
  324. });
  325. if (res.ResultCode == 0) {
  326. loading.close();
  327. this.$message.success("保存成功");
  328. setTimeout(() => {
  329. this.$router.back();
  330. }, 3000);
  331. } else {
  332. }
  333. },
  334. async getRecipeAuditD() {
  335. let res = await getRecipeAuditD(this.$route.query.pid);
  336. if (res.ResultCode == 0) {
  337. res.Data.electronicmedicalrecord.image1 = formatPicture(res.Data.electronicmedicalrecord.image1);
  338. res.Data.patientprescription.forEach(item => {
  339. item.reason = "";
  340. if (item.revierwstate == 2) {
  341. item.shState = 2;
  342. } else {
  343. item.shState = item.revierwstate;
  344. }
  345. });
  346. this.msg = res.Data;
  347. this._getRecordDetail(res.Data.patientprescription[0].recordid);
  348. // 加载处方笺数据
  349. if (res.Data.patientprescription[0].type == 0) {
  350. this._getChinesePadDetail(res.Data.patientprescription[0].pid);
  351. }
  352. if (res.Data.patientprescription[0].type == 1) {
  353. this._getChineseMadePad(res.Data.patientprescription[0].pid);
  354. }
  355. if (res.Data.patientprescription[0].type == 2) {
  356. this._getSuitMadePad(res.Data.patientprescription[0].pid);
  357. }
  358. res.Data.patientprescription.forEach((item, index) => {
  359. let arr = [];
  360. item.detail.forEach(item1 => {
  361. arr.push(item1.platformdrugid);
  362. });
  363. this.getMedForRecipeA(arr.join(","), item.pid);
  364. });
  365. // this.msg.patientprescription.filter(item => {
  366. // return item.revierwstate = '0'
  367. // })
  368. }
  369. },
  370. // 获取就诊详情
  371. async _getRecordDetail(id) {
  372. let res = await getRecordDetail({
  373. id: id
  374. // id: 'e68d293d-f1b7-4f6d-bed4-42b1aba6973e'
  375. });
  376. if (res.ResultCode == 0) {
  377. this.caseItem = res.Data;
  378. } else {
  379. this.$message.error(res.ResultInfo);
  380. }
  381. },
  382. // 获取合理用药信息
  383. async getMedForRecipeA(matids, recipeid) {
  384. let res = await getMedForRecipeA({
  385. matId: matids,
  386. // orgId: this.getuserinfo.organizationid
  387. preId: recipeid
  388. });
  389. if (res.ResultCode == 0) {
  390. this.msg.patientprescription.forEach((item, index) => {
  391. item.byty = "";
  392. item.bzjj = "";
  393. item.chao = [];
  394. if (item.pid == recipeid) {
  395. res.Data.forEach(item1 => {
  396. item1.matby = item1.matby.split(",");
  397. item.byty +=
  398. item1.matname + "不宜与" + item1.matby.join(",") + "同用。";
  399. item.bzjj += item1.matbzjj ? item1.matbzjj : "无" + "。";
  400. if (item1.matid == item.detail[index].platformdrugid) {
  401. if (item1.matmaxdosage < item.detail[index].dose) {
  402. itme.chao.push(
  403. `${item.detail[index].matname}${item.detail[index].dose}${
  404. item.detail[index].unit
  405. }(${item1.matmindosage - item1.matmaxdosage})`
  406. );
  407. }
  408. }
  409. });
  410. }
  411. this.$set(this.msg.patientprescription, index, item);
  412. });
  413. }
  414. },
  415. // 中药处方笺数据
  416. async _getChinesePadDetail(id) {
  417. const loading = this.$loading({
  418. lock: true,
  419. text: "正在加载处方笺数据,请稍后",
  420. spinner: "el-icon-loading",
  421. background: "rgba(0, 0, 0, 0.7)"
  422. });
  423. let res = await getChinesePadDetail({
  424. pid: id
  425. }).catch(err => {
  426. loading.close();
  427. });
  428. if (res.ResultCode == 0) {
  429. loading.close();
  430. this.chineseData = res.Data;
  431. }
  432. },
  433. // 中药制剂处方笺
  434. async _getChineseMadePad(id) {
  435. const loading = this.$loading({
  436. lock: true,
  437. text: "正在加载处方笺数据,请稍后",
  438. spinner: "el-icon-loading",
  439. background: "rgba(0, 0, 0, 0.7)"
  440. });
  441. let res = await getChineseMadePad({
  442. pid: id
  443. }).catch(err => {
  444. loading.close();
  445. });
  446. if (res.ResultCode == 0) {
  447. loading.close();
  448. this.chineseMadeData = res.Data;
  449. }
  450. },
  451. // 适宜技术处方笺
  452. async _getSuitMadePad(id) {
  453. const loading = this.$loading({
  454. lock: true,
  455. text: "正在加载处方笺数据,请稍后",
  456. spinner: "el-icon-loading",
  457. background: "rgba(0, 0, 0, 0.7)"
  458. });
  459. let res = await getSuitMadePad({
  460. pid: id
  461. }).catch(err => {
  462. loading.close();
  463. });
  464. if (res.ResultCode == 0) {
  465. loading.close();
  466. this.suitData = res.Data;
  467. }
  468. }
  469. },
  470. computed: {
  471. ...mapGetters(["getuserinfo"])
  472. }
  473. };
  474. </script>
  475. <style lang="scss" scoped>
  476. @import "../../style/common.scss";
  477. .recipeAuditD {
  478. // height: 100%;
  479. // height: 70vh;
  480. .container-detail {
  481. margin-top: 5px;
  482. height: 76vh;
  483. overflow: hidden;
  484. }
  485. .recipe-left {
  486. height: 100%;
  487. overflow: auto;
  488. padding: 5px 5px;
  489. background: #ffffff;
  490. border-radius: 5px;
  491. // width: 575px;
  492. flex: 1;
  493. margin-right: 8px;
  494. // box-sizing: border-box;
  495. height: 100%;
  496. .title {
  497. margin-bottom: 10px;
  498. img {
  499. width: 24px;
  500. margin-right: 5px;
  501. }
  502. span {
  503. font-size: 16px;
  504. font-weight: 600;
  505. }
  506. }
  507. .back-btn {
  508. width: 74px;
  509. height: 36px;
  510. background: #5386f6;
  511. border-radius: 4px;
  512. font-size: 14px;
  513. font-family: PingFang SC;
  514. font-weight: 400;
  515. color: #ffffff;
  516. margin-bottom: 34px;
  517. cursor: pointer;
  518. }
  519. .msg {
  520. font-size: 14px;
  521. font-family: PingFang SC;
  522. font-weight: 400;
  523. color: #333333;
  524. .msg-item {
  525. margin-bottom: 15px;
  526. flex: 1;
  527. }
  528. .msg-row {
  529. .msg-item {
  530. max-width: 300px;
  531. }
  532. }
  533. span {
  534. text-align-last: justify;
  535. width: 80px;
  536. text-align: justify;
  537. }
  538. div {
  539. flex: 1;
  540. overflow: hidden;
  541. }
  542. }
  543. }
  544. .recipe-right {
  545. width: 450px;
  546. height: 100%;
  547. box-sizing: border-box;
  548. padding: 5px 5px 20px;
  549. background: #ffffff;
  550. border-radius: 5px;
  551. // flex: 1;
  552. overflow: auto;
  553. .title {
  554. margin-bottom: 10px;
  555. img {
  556. width: 24px;
  557. margin-right: 5px;
  558. }
  559. span {
  560. font-size: 16px;
  561. font-weight: 600;
  562. }
  563. }
  564. .recipe-tabs {
  565. // border: 1px solid #000;
  566. overflow: auto;
  567. width: 100%;
  568. white-space: nowrap;
  569. border-bottom: 0;
  570. border-left: 0;
  571. border-right: 0;
  572. &-item {
  573. // flex: 1;
  574. display: inline-block;
  575. width: 89px;
  576. font-size: 14px;
  577. // color: #5386F6;
  578. padding: 5px 0px;
  579. box-sizing: border-box;
  580. border-top: 1px solid #000;
  581. border-right: 0px solid #000;
  582. border-bottom: 1px solid #000;
  583. border-left: 1px solid #000;
  584. text-align: center;
  585. cursor: pointer;
  586. position: relative;
  587. overflow: hidden;
  588. img {
  589. width: 35px;
  590. z-index: 1;
  591. position: absolute;
  592. bottom: 0px;
  593. right: 5px;
  594. }
  595. .name {
  596. z-index: 9;
  597. }
  598. }
  599. &-item:last-child {
  600. border-right: 1px solid #000;
  601. }
  602. }
  603. }
  604. .reason-input {
  605. flex: 1;
  606. margin-right: 10px;
  607. padding-left: 10px;
  608. outline: none;
  609. }
  610. }
  611. // 滚动条位置
  612. .recipeAuditD ::v-deep .__bar-is-vertical {
  613. right: -1px !important;
  614. }
  615. // 隐藏横向滚动条
  616. .recipeAuditD ::v-deep .__bar-is-horizontal {
  617. display: none !important;
  618. }
  619. </style>
  620. <style lang="scss" scoped>
  621. @media screen and (min-width: 1681px) and (max-width: 1920px) {
  622. .recipeAuditD {
  623. .container-detail {
  624. height: 84vh;
  625. }
  626. }
  627. }
  628. @media screen and (min-width: 1601px) and (max-width: 1680px) {
  629. .recipeAuditD {
  630. .container-detail {
  631. height: 84vh;
  632. }
  633. }
  634. }
  635. @media screen and (min-width: 1361px) and (max-width: 1600px) {
  636. .recipeAuditD {
  637. .container-detail {
  638. height: 77vh;
  639. }
  640. }
  641. }
  642. @media screen and(min-width:1281px) and (max-width: 1360px) {
  643. .recipeAuditD {
  644. .container-detail {
  645. height: 78vh;
  646. }
  647. }
  648. }
  649. </style>