Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

doctorDesk.vue 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. <template>
  2. <div class="main-contain new-main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
  7. <div class="mainLeft">
  8. <div class="mainCell" style="justify-content: space-between;">
  9. <p>未就诊:<span>{{cal_one}}</span>人</p>
  10. <p>已就诊:<span>{{cal_two}}</span>人</p>
  11. </div>
  12. <div class="mainCell">
  13. <el-radio-group v-model="radio" @change="change">
  14. <el-radio :label="1">未就诊</el-radio>
  15. <el-radio :label="2">已就诊</el-radio>
  16. <el-radio :label="0">全部</el-radio>
  17. </el-radio-group>
  18. </div>
  19. <div class="mainCell" style="margin-bottom:10px;">
  20. <el-input size="small" placeholder="请输入姓名或就诊号" @input="searchAction" @keyup.enter.native='searchAction' v-model="search_input" class="filter-item"/>
  21. <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
  22. 搜索
  23. </el-button>
  24. </div>
  25. <div>
  26. <el-table :data="patientTableData" :height="tableHeight" @row-click='choosePatient' border style="width: 100%;"
  27. :row-style="{ color: '#303133' }"
  28. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  29. highlight-current-row
  30. ref="tab"
  31. >
  32. <el-table-column prop="name" label="姓名" width='89'>
  33. <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
  34. </el-table-column>
  35. <el-table-column prop="name" label="就诊号" width="110">
  36. <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
  37. </el-table-column>
  38. </el-table>
  39. </div>
  40. </div>
  41. <div class="mainRight">
  42. <div class="mainHeader">
  43. <el-radio-group class="titleBox" v-model="titleType" @change="changeTab">
  44. <el-radio-button label="电子处方"></el-radio-button>
  45. <el-radio-button label="电子病历"></el-radio-button>
  46. </el-radio-group>
  47. <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子处方'">
  48. <el-button size="small" ref="button_one" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
  49. <el-popover
  50. placement="bottom"
  51. width="200"
  52. trigger="click">
  53. <el-button size="small" ref="button_two" @click="open(2)" type="primary">处方单</el-button>
  54. <el-button size="small" ref="button_six" @click="open(6)" type="primary">治疗单</el-button>
  55. <el-button slot="reference" style="margin:0 10px;" type="primary" size="small">打印</el-button>
  56. </el-popover>
  57. <el-button size="small" ref="button_three" @click="open(4)" type="primary">选择模板</el-button>
  58. <el-button size="small" ref="button_four" @click="open(5)" type="primary">存模板</el-button>
  59. </div>
  60. <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子病历'">
  61. <el-button size="small" @click="opentwo(1)" type="primary" style="margin-left:10px;">保存</el-button>
  62. <el-button size="small" @click="opentwo(2)" type="primary">打印</el-button>
  63. <el-button size="small" @click="opentwo(3)" type="primary">病历调用</el-button>
  64. <el-button size="small" @click="opentwo(4)" type="primary">存模板</el-button>
  65. </div>
  66. </div>
  67. <!--<desk-prescription ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
  68. <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
  69. <desk-prescription :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
  70. ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
  71. :hisPatientInfo="hisPatientInfo"
  72. v-show="titleType == '电子处方'" style="flex:1;"></desk-prescription>
  73. <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
  74. :hisPatientInfo="hisPatientInfo" v-show="titleType == '电子病历'" :detalid="detalid" ref="child"></desk-record>
  75. <medicalRecord ref='medicalRecord' @func="getMsgFormSon" ></medicalRecord>
  76. <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
  77. </div>
  78. </div>
  79. </div>
  80. </template>
  81. <script>
  82. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  83. import deskPrescription from './components/deskPrescription'
  84. import deskRecord from './components/deskRecord'
  85. import { getPatientInfo, getSchedulePatientList,createCaseHistory } from '@/api/his/his'
  86. import { getDictionaryDataConfig } from '@/utils/data'
  87. import medicalRecord from './components/medicalRecord'
  88. import saveRecordTemplate from './components/saveRecordTemplate'
  89. import { uParseTime } from '@/utils/tools'
  90. export default {
  91. components: {
  92. BreadCrumb,
  93. deskPrescription,
  94. deskRecord,
  95. medicalRecord,
  96. saveRecordTemplate
  97. },
  98. data() {
  99. return {
  100. tableHeight:'',
  101. fullHeight: document.documentElement.clientHeight,
  102. prescriptions: [
  103. {
  104. name: '处方1',
  105. advice: [],
  106. project: []
  107. }
  108. ],
  109. search_input: '',
  110. cal_one: 0,
  111. cal_two: 0,
  112. radio: 1,
  113. record_date: '',
  114. crumbs: [
  115. { path: false, name: '门诊医生站' },
  116. { path: false, name: '医生工作台' }
  117. ],
  118. titleType: '电子处方',
  119. patientTableData: [{}],
  120. patientTableDataTwo:[{}],
  121. patientInfo: {},
  122. hisPatientInfo: {},
  123. case_history: {},
  124. patient_id: 0,
  125. diagnoses: [],
  126. other_sick: [],
  127. info:{},
  128. templatedetail:{},
  129. detalid:0,
  130. }
  131. },
  132. methods: {
  133. getDictionaryDataConfig(module, filed_name) {
  134. console.log(getDictionaryDataConfig(module, filed_name))
  135. return getDictionaryDataConfig(module, filed_name)
  136. },
  137. changeTab(val) {
  138. },
  139. searchAction() {
  140. if(this.search_input.length == 0){
  141. this.patientTableData = this.patientTableDataTwo
  142. }else{
  143. let arr = []
  144. for (let i = 0; i < this.patientTableData.length; i++){
  145. if(this.patientTableData[i].patients.name.indexOf(this.search_input) != -1 || this.patientTableData[i].his_patient.number.indexOf(this.search_input) != -1){
  146. arr = arr.concat(this.patientTableData[i])
  147. }
  148. }
  149. this.patientTableData = arr
  150. }
  151. },
  152. change(val) {
  153. this.getList()
  154. },
  155. getList() {
  156. let params = {
  157. 'record_date': this.record_date,
  158. 'type': this.radio
  159. }
  160. getSchedulePatientList(params).then(response => {
  161. if (response.data.state == 0) {
  162. this.$message.error(response.data.msg)
  163. return false
  164. } else {
  165. this.patientTableData = response.data.data.list
  166. this.patientTableDataTwo = response.data.data.list
  167. console.log('222', this.patientTableData)
  168. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  169. let cal_one = 0
  170. let cal_two = 0
  171. for (let i = 0; i < response.data.data.list.length; i++) {
  172. if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
  173. cal_one = cal_one + 1
  174. }
  175. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  176. cal_two = cal_two + 1
  177. }
  178. }
  179. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  180. console.log(this.patientTableData[0])
  181. this.choosePatient(this.patientTableData[0])
  182. this.cal_one = cal_one
  183. this.cal_two = cal_two
  184. }
  185. })
  186. },
  187. choosePatient(val) {
  188. let params = {
  189. 'record_date': this.record_date,
  190. 'patient_id': val.patients.id
  191. }
  192. getPatientInfo(params).then(response => {
  193. if (response.data.state == 0) {
  194. this.$message.error(response.data.msg)
  195. return false
  196. } else {
  197. this.prescriptions = []
  198. this.patientInfo = response.data.data.xt_info
  199. this.hisPatientInfo = response.data.data.his_info
  200. this.case_history = response.data.data.case_history
  201. this.info = response.data.data.info
  202. this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
  203. if (this.case_history.temperature <= 0) {
  204. this.case_history.temperature = ''
  205. }
  206. if (this.case_history.blood_sugar <= 0) {
  207. this.case_history.blood_sugar = ''
  208. }
  209. if (this.case_history.pulse <= 0) {
  210. this.case_history.pulse = ''
  211. }
  212. if (this.case_history.sbp <= 0) {
  213. this.case_history.sbp = ''
  214. }
  215. if (this.case_history.dbp <= 0) {
  216. this.case_history.dbp = ''
  217. }
  218. if (this.case_history.height <= 0) {
  219. this.case_history.height = ''
  220. }
  221. if (this.case_history.blood_fat <= 0) {
  222. this.case_history.blood_fat = ''
  223. }
  224. if (this.case_history.sick_type <= 0) {
  225. this.case_history.sick_type = ''
  226. }
  227. this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
  228. if (this.case_history.is_infect == 1) {
  229. this.case_history.is_infect = true
  230. } else {
  231. this.case_history.is_infect = false
  232. }
  233. if (response.data.data.prescription.length > 0) {
  234. for (let i = 0; i < response.data.data.prescription.length; i++) {
  235. var prescription = response.data.data.prescription[i]
  236. let tempAdvice = []
  237. let tempProject = []
  238. for (let b = 0; b < prescription.advices.length; b++) {
  239. let obj = {
  240. advice_id: prescription.advices[b].id,
  241. drug_name: prescription.advices[b].advice_name,
  242. single_dose: prescription.advices[b].single_dose,
  243. delivery_way: prescription.advices[b].delivery_way,
  244. execution_frequency: prescription.advices[b].execution_frequency,
  245. retail_price: prescription.advices[b].price.toString(),
  246. remark: prescription.advices[b].remark,
  247. prescribing_number:prescription.advices[b].prescribing_number.toString(),
  248. single_dose_unit:prescription.advices[b].single_dose_unit,
  249. prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
  250. min_unit:prescription.advices[b].single_dose_unit,
  251. medical_insurance_number:prescription.advices[b].med_list_codg,
  252. id:prescription.advices[b].drug_id
  253. }
  254. tempAdvice.push(obj)
  255. }
  256. for (let b = 0; b < prescription.project.length; b++) {
  257. console.log(prescription.project[b])
  258. console.log(prescription.project[b].project)
  259. let obj = {
  260. id: prescription.project[b].id,
  261. project_id: prescription.project[b].project.id,
  262. project_name: prescription.project[b].project.project_name,
  263. statistical_classification: prescription.project[b].project.statistical_classification,
  264. single_dose: prescription.project[b].single_dose,
  265. delivery_way: prescription.project[b].delivery_way,
  266. execution_frequency: prescription.project[b].execution_frequency,
  267. number_days: prescription.project[b].day,
  268. total:prescription.project[b].count.toString(),
  269. price:prescription.project[b].price,
  270. remark:prescription.project[b].remark,
  271. medical_code:prescription.project[b].project.medical_code,
  272. }
  273. tempProject.push(obj)
  274. }
  275. let index = i + 1
  276. let obj = {
  277. id: prescription.id,
  278. name: '处方' + index,
  279. advices: tempAdvice,
  280. project: tempProject,
  281. order_status:prescription.order_status
  282. }
  283. this.prescriptions.push(obj)
  284. }
  285. } else {
  286. let obj = {
  287. id:0,
  288. name: '处方' + 1,
  289. advices: [],
  290. project: [],
  291. orderStatus:0,
  292. }
  293. this.prescriptions.push(obj)
  294. }
  295. console.log(this.prescriptions)
  296. this.$refs.prescriptions.setData(this.prescriptions,this.info)
  297. }
  298. })
  299. },
  300. open(index) {
  301. if (index == 1) {
  302. this.$refs.prescriptions.open(1)
  303. } else if (index == 2) {
  304. this.$router.push("/outpatientDoctorStation/print?record="+this.record_date)
  305. } else if (index == 3) {
  306. this.$refs.prescriptions.open(3)
  307. } else if (index == 4) {
  308. this.$refs.prescriptions.open(4)
  309. }else if(index == 6){
  310. this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date)
  311. }
  312. },
  313. opentwo(index) {
  314. console.log("index",index)
  315. if (index == 1) {
  316. if(this.patientInfo.id == undefined){
  317. this.$message.error("请先选择病人")
  318. return
  319. }
  320. this.$refs.child.createCaseHistory()
  321. } else if (index == 2) {
  322. this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date)
  323. } else if (index == 3) {
  324. this.$refs.medicalRecord.show()
  325. } else if (index == 4) {
  326. this.$refs.saveRecordTemplate.show(this.case_history)
  327. }
  328. },
  329. // changePatient(val){
  330. // console.log("患者val",val)
  331. // this.hisPatientInfo = val.hisPatientInfo
  332. // console.log("333333",this.hisPatientInfo)
  333. // }
  334. getMsgFormSon(id){
  335. console.log("id----------",id)
  336. this.detalid = id
  337. },
  338. // getTemplateDetail(id){
  339. // getTemplateDetail(id).then(response=>{
  340. // if(response.data.state == 1){
  341. // var templatedetail = response.data.data.templateDetail
  342. // console.log("templatedetail",templatedetail)
  343. // templatedetail =
  344. // }
  345. // })
  346. // },
  347. },
  348. created() {
  349. var nowDate = new Date()
  350. var nowYear = nowDate.getFullYear()
  351. var nowMonth = nowDate.getMonth() + 1
  352. var nowDay = nowDate.getDate()
  353. this.record_date =
  354. nowYear +
  355. '-' +
  356. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  357. '-' +
  358. (nowDay < 10 ? '0' + nowDay : nowDay)
  359. this.getList()
  360. this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
  361. this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
  362. console.log('1222232434234',document.documentElement.clientHeight)
  363. let tableHeight = document.body.clientHeight - 263
  364. this.tableHeight = tableHeight
  365. },
  366. mounted(){
  367. const that = this
  368. window.onresize = () => {
  369. return (() => {
  370. window.fullHeight = document.documentElement.clientHeight
  371. that.fullHeight = window.fullHeight
  372. })()
  373. }
  374. },
  375. watch: {
  376. fullHeight (val) {
  377. if(!this.timer) {
  378. this.fullHeight = val
  379. let tableHeight = val - 263
  380. this.tableHeight = tableHeight
  381. this.timer = true
  382. let that = this
  383. setTimeout(function (){
  384. that.timer = false
  385. },400)
  386. }
  387. }
  388. }
  389. }
  390. </script>
  391. <style lang="scss" scoped>
  392. .new-main-contain {
  393. height: 100%;
  394. display: flex;
  395. flex-direction: column;
  396. }
  397. .app-container {
  398. height: 100%;
  399. }
  400. .mainCell {
  401. height: 36px;
  402. display: flex;
  403. align-items: center;
  404. }
  405. .mainLeft {
  406. width: 200px;
  407. height: 100%;
  408. display: flex;
  409. flex-direction: column;
  410. .el-radio {
  411. margin-right: 5px;
  412. }
  413. }
  414. .mainRight {
  415. margin-left: 20px;
  416. flex: 1;
  417. height: 100%;
  418. display: flex;
  419. flex-direction: column;
  420. overflow-y: auto;
  421. .cellSpan {
  422. min-width: 80px;
  423. display: inline-block;
  424. margin-right: 10px;
  425. }
  426. }
  427. .mainCenter {
  428. display: flex;
  429. flex: 1;
  430. }
  431. .centerLeft {
  432. flex: 1;
  433. display: flex;
  434. flex-direction: column;
  435. position: relative;
  436. .el-form-item {
  437. width: 32%;
  438. margin-right: 1%;
  439. float: left;
  440. }
  441. .el-form-item__label {
  442. text-align: left;
  443. }
  444. }
  445. .backColor {
  446. background: #f6f8f9;
  447. height: 5px;
  448. margin-bottom: 5px;
  449. }
  450. .tabsBox {
  451. position: relative;
  452. height: 76%;
  453. overflow-y: auto;
  454. margin-bottom: 60px;
  455. .el-tabs__item {
  456. padding: 0 10px;
  457. }
  458. }
  459. .preTabs {
  460. height: 100%;
  461. }
  462. .costBox {
  463. width: 100%;
  464. height: 60px;
  465. background: #fff;
  466. position: absolute;
  467. bottom: 0;
  468. display: flex;
  469. align-items: center;
  470. }
  471. .addTab {
  472. position: absolute;
  473. right: 0;
  474. top: 14px;
  475. z-index: 20;
  476. }
  477. .centerRight {
  478. width: 300px;
  479. margin-left: 5px;
  480. display: flex;
  481. flex-direction: column;
  482. position: relative;
  483. }
  484. .rightTab {
  485. height: 40px;
  486. width: 100%;
  487. border: 1px solid #d2d2d2;
  488. box-sizing: border-box;
  489. p {
  490. width: 50%;
  491. height: 40px;
  492. line-height: 40px;
  493. text-align: center;
  494. background: #eee;
  495. float: left;
  496. }
  497. > p:last-child {
  498. border-left: 1px solid #d2d2d2;
  499. float: right;
  500. }
  501. .activeP {
  502. background: #409EFF;
  503. color: #fff;
  504. }
  505. }
  506. .comfirmBox {
  507. width: 100%;
  508. height: 60px;
  509. background: #fff;
  510. position: absolute;
  511. bottom: 0;
  512. display: flex;
  513. align-items: center;
  514. justify-content: space-between;
  515. }
  516. .mainHeader{
  517. width:100%;
  518. background: #fff;
  519. position: fixed;
  520. z-index: 100;
  521. height: 36px;
  522. }
  523. .titleBox{
  524. position: fixed;
  525. z-index: 99;
  526. background: #fff;
  527. }
  528. .fixedCell{
  529. position: fixed;
  530. z-index: 99;
  531. right: 30px;
  532. background: #fff;
  533. }
  534. </style>
  535. <style lang="scss">
  536. .centerLeft {
  537. .el-form-item__label {
  538. text-align: left;
  539. }
  540. }
  541. .tabsBox {
  542. .el-tabs__item {
  543. padding: 0 10px;
  544. }
  545. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
  546. padding: 0 10px;
  547. }
  548. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
  549. padding: 0 10px;
  550. }
  551. .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
  552. padding: 0 10px;
  553. }
  554. }
  555. .centerRight {
  556. .el-tabs__nav-scroll {
  557. display: flex;
  558. }
  559. .el-tabs__nav {
  560. margin: 0 auto;
  561. }
  562. .el-table th .cell, .el-table td .cell {
  563. padding: 0 2px;
  564. }
  565. }
  566. .preTabs {
  567. .el-tabs__content {
  568. }
  569. }
  570. .rightTabs {
  571. height: 100%;
  572. .el-tabs__content {
  573. }
  574. }
  575. </style>