Browse Source

HIS 系统提交

XMLWAN 4 years ago
parent
commit
5e105cf2e3

+ 10 - 1
src/api/project/project.js View File

@@ -452,4 +452,13 @@ export function changePatient(id,params){
452 452
       method:"Get",
453 453
       params:params
454 454
     })
455
-  } 
455
+  } 
456
+
457
+  export function getPrescriptionList(id,params){
458
+     
459
+    return request({
460
+      url:"/api/hispatient/getprescription?patient_id="+id,
461
+      method:"Get",
462
+      params:params
463
+    })
464
+  }

+ 10 - 1
src/router/modules/outpatientDoctorStation.js View File

@@ -61,6 +61,15 @@ export default {
61 61
       is_menu: false,
62 62
       name: 'outpatientDoctorStationTreatPrint',
63 63
       meta: { title: 'outpatientDoctorStationTreatPrint', noCache: true }
64
-  },
64
+   },
65
+
66
+   {
67
+    path: '/outpatientDoctorStation/printone',
68
+    component: () => import('@/xt_pages/outpatientDoctorStation/template/printOne'),
69
+    hidden: true,
70
+    is_menu: false,
71
+    name: 'outpatientDoctorStationPrint',
72
+    meta: { title: 'outpatientDoctorStationPrint', noCache: true }
73
+   },
65 74
   ]
66 75
 }

+ 97 - 5
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -78,6 +78,46 @@
78 78
       </div>
79 79
 
80 80
     </div>
81
+    
82
+     <el-dialog
83
+      title="处方打印"
84
+      :visible.sync="centerDialogVisible"
85
+      width="600px"
86
+      center>
87
+     <el-table
88
+      ref="multipleTable"
89
+      :data="tableData"
90
+      tooltip-effect="dark"
91
+      style="width: 600px"
92
+      
93
+      @selection-change="handleSelectionChange">
94
+      <el-table-column
95
+        type="selection"
96
+        width="50">
97
+      </el-table-column>
98
+      <el-table-column
99
+        label="处方编号"
100
+        width="120">
101
+        <template  slot-scope="scope">
102
+          <span>处方编号</span>
103
+        </template>
104
+      </el-table-column> 
105
+      <el-table-column
106
+        label="处方号"
107
+        width="200">
108
+        <template slot-scope="scope">
109
+          <span>
110
+           <el-input v-model="scope.row.id"></el-input>
111
+          </span>
112
+        </template>
113
+      </el-table-column> 
114
+    </el-table>
115
+      <span slot="footer" class="dialog-footer">
116
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
117
+        <el-button type="primary" @click="savePrint">确 定</el-button>
118
+      </span>
119
+    </el-dialog>
120
+
81 121
   </div>
82 122
 </template>
83 123
 
@@ -90,6 +130,7 @@
90 130
   import medicalRecord from './components/medicalRecord'
91 131
   import saveRecordTemplate from './components/saveRecordTemplate'
92 132
   import { uParseTime } from '@/utils/tools'
133
+  import { getPrescriptionList } from "@/api/project/project"
93 134
   export default {
94 135
     components: {
95 136
       BreadCrumb,
@@ -131,6 +172,12 @@
131 172
         templatedetail:{},
132 173
         detalid:0,
133 174
         prescription_id:0,
175
+        patientid:0,
176
+        prescriptionList:[],
177
+        centerDialogVisible:false,
178
+        tableData:[],
179
+        selecting_schs: [],
180
+        index:0
134 181
       }
135 182
     },
136 183
     methods: {
@@ -190,12 +237,16 @@
190 237
             this.$refs.tab.setCurrentRow(this.patientTableData[0])
191 238
             console.log(this.patientTableData[0])
192 239
             this.choosePatient(this.patientTableData[0])
240
+            console.log("9999099999",this.patientTableData[0])
241
+            this.prescriptionList = response.data.data.list.prescription
242
+            this.patientid = this.patientTableData[0].patient_id
193 243
             this.cal_one = cal_one
194 244
             this.cal_two = cal_two
195 245
           }
196 246
         })
197 247
       },
198 248
       choosePatient(val) {
249
+        this.patientid = val.patients.id
199 250
         let params = {
200 251
           'record_date': this.record_date,
201 252
           'patient_id': val.patients.id
@@ -246,6 +297,7 @@
246 297
             } else {
247 298
               this.case_history.is_infect = false
248 299
             }
300
+            this.prescriptionList =response.data.data.prescription
249 301
             if (response.data.data.prescription.length > 0) {
250 302
               for (let i = 0; i < response.data.data.prescription.length; i++) {
251 303
                 var prescription = response.data.data.prescription[i]
@@ -321,17 +373,24 @@
321 373
         })
322 374
       },
323 375
       open(index) {
324
-        console.log("index",index)
376
+        if(this.prescriptionList.length == 0){
377
+           this.$message.error("请先开处方")
378
+           return
379
+        }
380
+        this.index = index
325 381
         if (index == 1) {
326 382
           this.$refs.prescriptions.open(1)
327 383
         } else if (index == 2) {
328
-          this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
384
+         
385
+          this.getPrescriptionList(this.patientid)
386
+          // this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id)
329 387
         } else if (index == 3) {
330 388
           this.$refs.prescriptions.open(3)
331 389
         } else if (index == 4) {
332 390
           this.$refs.prescriptions.open(4)
333 391
         }else if(index == 6){
334
-          this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
392
+          this.getPrescriptionList(this.patientid)
393
+          // this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id)
335 394
           
336 395
         }
337 396
         
@@ -361,13 +420,13 @@
361 420
       // }
362 421
 
363 422
       getMsgFormSon(id){
364
-        console.log("id----------",id)
423
+       
365 424
         this.detalid = id
366 425
       },
367 426
       changetwo(data){
368 427
         console.log("data000000",data)
369 428
         this.prescription_id = data
370
-      }
429
+      },
371 430
       //  getTemplateDetail(id){
372 431
       //     getTemplateDetail(id).then(response=>{
373 432
       //         if(response.data.state == 1){
@@ -379,6 +438,38 @@
379 438
       //         }
380 439
       //     })
381 440
       //   },
441
+      getPrescriptionList(id){   
442
+        getPrescriptionList(id).then(response=>{
443
+           if(response.data.state == 1){
444
+             this.centerDialogVisible = true
445
+             var list = response.data.data.list
446
+             console.log("list9999999",list)
447
+             this.tableData = list
448
+           }
449
+        })
450
+      },
451
+      handleSelectionChange(val){
452
+       this.selecting_schs = val
453
+       console.log("99999",this.selecting_schs)
454
+      },
455
+      handleClick(){
456
+
457
+      },
458
+      savePrint(){
459
+        var arr = []
460
+        for(let i=0;i<this.selecting_schs.length;i++){
461
+             arr.push(this.selecting_schs[i].id)
462
+          }
463
+          console.log("arr",arr)
464
+         var ids = arr.join(",")
465
+         console.log("ids",ids)
466
+         if(this.index == 2){
467
+           this.$router.push("/outpatientDoctorStation/print?record="+this.record_date+"&prescription_id="+this.prescription_id+"&ids="+ids+"&patient_id="+this.patientid)
468
+         }
469
+         if(this.index == 6){
470
+            this.$router.push("/outpatientDoctorStation/treatPrint?record="+this.record_date+"&prescription_id="+this.prescription_id+"&ids="+ids+"&patient_id="+this.patientid)
471
+         }
472
+      }
382 473
     },
383 474
     created() {
384 475
       var nowDate = new Date()
@@ -401,6 +492,7 @@
401 492
       this.tableHeight = tableHeight
402 493
 
403 494
     },
495
+
404 496
     mounted(){
405 497
       const that = this
406 498
       window.onresize = () => {

+ 3 - 3
src/xt_pages/outpatientDoctorStation/print.vue View File

@@ -15,7 +15,7 @@
15 15
     </div>
16 16
     <div class="app-container" style="min-height:0;">
17 17
         <el-container class="newContainer">
18
-            <div style="width:270px;margin-right:20px;">
18
+            <!-- <div style="width:270px;margin-right:20px;">
19 19
                 <div class="cell clearfix" style="margin-bottom:10px;">
20 20
                     <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
21 21
                     <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
@@ -29,9 +29,9 @@
29 29
                         <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
30 30
                     </el-table-column>
31 31
                 </el-table>
32
-            </div>
32
+            </div> -->
33 33
             
34
-            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
34
+            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px;margin:0 auto;width:960px;">
35 35
               <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient" :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
36 36
             </div>
37 37
         </el-container>

+ 17 - 12
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

@@ -2,12 +2,12 @@
2 2
     <div id='prescription-print' class="prescription-print">
3 3
         <div class="printTitle">血液透析中心处方笺</div>
4 4
         <div class="infoTitle">
5
-            <p>姓名:{{patient.name}}</p>
5
+            <p>姓名:{{patient.name?patient.name:""}}</p>
6 6
             <p>性别:
7 7
                <span v-if="patient.gender == 1">男</span>
8 8
                <span v-if="patient.gender == 2">女</span>
9 9
             </p>
10
-            <p>年龄:{{patient.age}}岁</p>
10
+            <p>年龄:{{patient.age?patient.age:""}}岁</p>
11 11
         </div>
12 12
         <div class="infoMain">
13 13
             <div style="margin-bottom: 10px;">门诊号:{{this.hisPatient.number?this.hisPatient.number:""}}</div>
@@ -87,9 +87,12 @@ export default {
87 87
      },
88 88
        getPrescriptionPrint(){
89 89
          var params = {
90
-          patient_id:this.patient_id,
91
-          record_date:this.record_date,
92
-          prescription_id:this.prescription_id,
90
+          // patient_id:this.patient_id,
91
+          // record_date:this.record_date,
92
+          // prescription_id:this.prescription_id,
93
+          patient_id:this.$route.query.patient_id,
94
+          record_date:this.$route.query.record,
95
+          prescription_id:this.$route.query.prescription_id 
93 96
         }
94 97
         console.log("params---",params)
95 98
        getPrescriptionPrint(params).then(response=>{
@@ -148,14 +151,16 @@ export default {
148 151
    created(){
149 152
       this.getAllDoctorList()
150 153
       this.getInitData()
154
+      this.getPrescriptionPrint()
155
+      this.getHisPatientDetail()
151 156
    },
152
-   watch:{
153
-     patient_id:function(val){
154
-       console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
155
-       this.getPrescriptionPrint()
156
-       this.getHisPatientDetail()
157
-     }
158
-   }
157
+  //  watch:{
158
+  //    patient_id:function(val){
159
+  //      console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
160
+  //      this.getPrescriptionPrint()
161
+  //      this.getHisPatientDetail()
162
+  //    }
163
+  //  }
159 164
 }
160 165
 </script>
161 166
 

+ 3 - 3
src/xt_pages/outpatientDoctorStation/treatPrint.vue View File

@@ -15,7 +15,7 @@
15 15
     </div>
16 16
     <div class="app-container" style="min-height:0;">
17 17
         <el-container class="newContainer">
18
-            <div style="width:270px;margin-right:20px;">
18
+            <!-- <div style="width:270px;margin-right:20px;">
19 19
                 <div class="cell clearfix" style="margin-bottom:10px;">
20 20
                     <el-input size="small"  v-model.trim="search_input" class="filter-item"/>
21 21
                     <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
@@ -29,9 +29,9 @@
29 29
                         <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
30 30
                     </el-table-column>
31 31
                 </el-table>
32
-            </div>
32
+            </div> -->
33 33
             
34
-            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
34
+            <div class='dialysisPage' style="flex: 1;height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px;margin:0 auto;width:960px;">
35 35
               <printOne v-bind:childResponse="childResponse" :advicePrint="advicePrint" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
36 36
             </div>
37 37
         </el-container>

+ 16 - 11
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue View File

@@ -150,11 +150,14 @@ export default {
150 150
      },
151 151
      getPrescriptionPrint(){
152 152
          var params = {
153
-          patient_id:this.patient_id,
154
-          record_date:this.record_date,
155
-          prescription_id:this.prescription_id,
153
+        //   patient_id:this.patient_id,
154
+        //   record_date:this.record_date,
155
+        //   prescription_id:this.prescription_id,
156
+          patient_id:this.$route.query.patient_id,
157
+          record_date:this.$route.query.record,
158
+          prescription_id:this.$route.query.prescription_id 
156 159
         }
157
-        console.log("params---",params)
160
+        console.log("999999",params)
158 161
        getPrescriptionPrint(params).then(response=>{
159 162
          if(response.data.state == 1){
160 163
             var advicePrint =  response.data.data.advicePrint
@@ -163,29 +166,31 @@ export default {
163 166
             var patient =  response.data.data.patient
164 167
             console.log("patient",patient)
165 168
             this.patient = patient
169
+            this.tableData = arr
170
+            console.log("3333",this.tableData)
171
+            var prescriptioninfo = response.data.data.prescriptionInfo
172
+            console.log("prescriptioninfo",prescriptioninfo)
173
+            this.prescriptionInfo = prescriptioninfo
174
+
166 175
             var doctorPorject = response.data.data.doctorPorject
167 176
           
168 177
             var arr = doctorPorject.project
169
-              console.log("我的中谷歌",arr)
178
+              console.log("治疗单",arr)
170 179
             for(let i=0;i<arr.length;i++){
171 180
               console.log("arr",arr[i].project_name)
172 181
             }
173
-            this.tableData = arr
174
-            console.log("3333",this.tableData)
175
-            var prescriptioninfo = response.data.data.prescriptionInfo
176
-            console.log("prescriptioninfo",prescriptioninfo)
177
-            this.prescriptionInfo = prescriptioninfo
178 182
           }
179 183
        })
180 184
      }
181 185
    },
182 186
    created(){
183 187
       this.getAllDoctorList()
188
+      this.getPrescriptionPrint()
184 189
    },
185 190
    watch:{
186 191
      patient_id:function(val){
187 192
        console.log("101000010101010",this.patient_id,this.record_date,this.prescription_id)
188
-       this.getPrescriptionPrint()
193
+    //    this.getPrescriptionPrint()
189 194
      }
190 195
    }
191 196
 }