浏览代码

hah阿凡达

28169 3 周前
父节点
当前提交
1055eb26d9
共有 3 个文件被更改,包括 286 次插入45 次删除
  1. 28 1
      src/api/patient.js
  2. 4 4
      src/xt_pages/user/components/PatientSidebar.vue
  3. 254 40
      src/xt_pages/user/courseOfDisease_new.vue

+ 28 - 1
src/api/patient.js 查看文件

@@ -1448,4 +1448,31 @@ export function getPatientAdviceList(params){
1448 1448
     method:"Get",
1449 1449
     params:params,
1450 1450
   })
1451
-}
1451
+}
1452
+
1453
+export function getPatientInspectionList(params){
1454
+
1455
+  return request({
1456
+    url:"/api/patient/getpatientinspectionlist",
1457
+    method:"get",
1458
+    params:params
1459
+  })
1460
+}
1461
+
1462
+export function getInspectionByProjectId(params){
1463
+ 
1464
+  return request({
1465
+    url:"/api/patient/getinspectionbyprojectid",
1466
+    method:"get",
1467
+    params:params
1468
+  })
1469
+}
1470
+
1471
+// export function getNewInspetingList(params){
1472
+
1473
+//   return request({
1474
+//     url:"/api/patient/getnewinspetionlist",
1475
+//     method:"get",
1476
+//     params:params
1477
+//   })
1478
+// }

+ 4 - 4
src/xt_pages/user/components/PatientSidebar.vue 查看文件

@@ -179,10 +179,10 @@ export default {
179 179
             //   name: '3-3',
180 180
             //   label: '体格检查新'
181 181
             // },
182
-            //  {
183
-            //   name: '3-5',
184
-            //   label: '病程记录新'
185
-            //  },
182
+             {
183
+              name: '3-5',
184
+              label: '病程记录新'
185
+             },
186 186
             {
187 187
               name: '1-11',
188 188
               label: '首次病程记录'

+ 254 - 40
src/xt_pages/user/courseOfDisease_new.vue 查看文件

@@ -724,7 +724,7 @@
724 724
               </el-date-picker>
725 725
             </div>
726 726
             <div style="text-align: right;margin-bottom: 10px;">
727
-              <el-button type="primary" size="small">
727
+              <el-button type="primary" size="small" @click="toInspection">
728 728
                 查询
729 729
               </el-button>
730 730
             </div>
@@ -736,14 +736,14 @@
736 736
                   <div class="Second_title">检验项目</div>
737 737
                 </div>
738 738
                 <div style="flex: 1;text-align: right;">
739
-                  全选<el-checkbox v-model="checked"></el-checkbox>
739
+                  全选<el-checkbox v-model="checked" @change="changeInspetion"></el-checkbox>
740 740
                 </div>
741 741
               </div>
742 742
               <div>
743
-                <el-collapse v-model="activeNames" @change="handleChange" v-for="(item,index) in Inspectlist" :key="item.id">
744
-                  <el-collapse-item :title="item.name" :name="item.id">
743
+                <el-collapse v-model="activeNames" @change="handleChange" v-for="(item,index) in newInspectionList" :key="item.id">
744
+                  <el-collapse-item :title="item.project_name" :name="item.project_id">
745 745
                     <ul>
746
-                      <li v-for="i in item.child" class="inspect" @click="childclick(i.date)">{{ i.date }}</li>
746
+                      <li v-for="i in item.child" class="inspect" @click="childclick(i)">{{getTime(i.inspect_date)}}</li>
747 747
                     </ul>
748 748
                   </el-collapse-item>
749 749
                 </el-collapse>
@@ -752,7 +752,7 @@
752 752
             <div style="width: 72%;margin-left: 10px;">
753 753
               <div class="Second_title">内容</div>
754 754
               <div class="blood_text" style="" >
755
-                <div v-html="weight_context"></div>
755
+                <div v-html="inspect_context"></div>
756 756
                 <!-- {{ blood_context }} -->
757 757
               </div>
758 758
             </div>
@@ -761,7 +761,7 @@
761 761
         <span slot="footer" class="dialog-footer" style="text-align: center;">
762 762
           <!-- <el-button type="danger" @click="template_dele">删除模板</el-button>
763 763
           <el-button type="primary" @click="template_save">保存模板</el-button> -->
764
-          <el-button type="primary" @click="toContentPint">应用</el-button>
764
+          <el-button type="primary" @click="toInpectionContentPint">应用</el-button>
765 765
           <el-button @click="Inspect_dialog = false">取消</el-button>
766 766
         </span>
767 767
       </el-dialog>
@@ -820,7 +820,10 @@
820 820
     getSummarySearchList,
821 821
     getPatientDryWeightList,
822 822
     getDilaysisSystemList,
823
-    getPatientAdviceList
823
+    getPatientAdviceList,
824
+    getPatientInspectionList,
825
+    getInspectionByProjectId,
826
+    
824 827
   } from '@/api/patient'
825 828
   import { fetchMoibleAllDoctorAndNurse } from "@/api/doctor";
826 829
   import { parseTime } from '@/utils'
@@ -965,7 +968,11 @@
965 968
         monitor_blood_context:"",
966 969
         summaryList:[],
967 970
         dryWeightList:[],
968
-        adviceList:[]
971
+        adviceList:[],
972
+        newInspectionList:[],
973
+        newInspectionListOne:[],
974
+        inspect_context:"",
975
+        inspectionList:[]
969 976
       }
970 977
     },
971 978
     created() {
@@ -1627,7 +1634,7 @@
1627 1634
 
1628 1635
       },
1629 1636
 
1630
-      getAutoPatientContent(){
1637
+      autotext_click(){
1631 1638
         if(this.start_date == ""){
1632 1639
           this.$message.error("请选择开始时间")
1633 1640
         }
@@ -2295,6 +2302,7 @@
2295 2302
 
2296 2303
           dialysisIrrigationStr =  JSON.stringify(dialysisIrrigationObj).replace(/^{|}$/g, '')
2297 2304
 
2305
+      
2298 2306
 
2299 2307
         //  医嘱
2300 2308
         if(this.longAdvice!=null && this.longAdvice.length>0){
@@ -2312,6 +2320,95 @@
2312 2320
             }
2313 2321
         }
2314 2322
 
2323
+         
2324
+        //抗凝剂
2325
+
2326
+        var anticoagulant_str =""
2327
+        if(this.groupPrescriptionList!=null && this.groupPrescriptionList.length>0){
2328
+           
2329
+            for(let i=0;i<this.groupPrescriptionList.length;i++){
2330
+               anticoagulant_str += this.getAnticoagulantName(this.groupPrescriptionList[i].anticoagulant) +"," + "剂量:" +this.groupPrescriptionList[i].MinZongLiang +this.getAnticoagulantUnit(this.groupPrescriptionList[i].anticoagulant)+ "~" +this.groupPrescriptionList[i].MaxZongLiang + this.getAnticoagulantUnit(this.groupPrescriptionList[i].anticoagulant)
2331
+            }
2332
+        }
2333
+
2334
+
2335
+          //透前
2336
+          var befor_total =0
2337
+        var cha_weight = 0
2338
+        var pingjun_weight = 0
2339
+        if(this.berforList!=null){
2340
+          befor_total = this.berforList.length
2341
+          for(let i=0;i<this.berforList.length;i++){
2342
+             cha_weight += this.berforList[i].weight_before - this.berforList[i].WeightAfter
2343
+          }
2344
+        }
2345
+        
2346
+        pingjun_weight = (cha_weight/befor_total).toFixed(2)
2347
+       
2348
+        //透后凝血
2349
+        var cruorNewArr = []
2350
+        if(this.afterList!=null && this.afterList.length>0){
2351
+           for(let i=0;i<this.afterList.length;i++){
2352
+            cruorNewArr.push(this.afterList[i].cruor)
2353
+           }
2354
+        }
2355
+      
2356
+       let dialysisCrruorObj = {}
2357
+        let dialysisCrruorStr = ""
2358
+        if(cruorNewArr!=null && cruorNewArr.length>0){
2359
+          cruorNewArr.forEach(item => {
2360
+            dialysisCrruorObj[item] = (dialysisCrruorObj[item] + 1) || 1
2361
+            })
2362
+          }
2363
+      
2364
+
2365
+        dialysisCrruorStr =  JSON.stringify(dialysisCrruorObj).replace(/^{|}$/g, '')
2366
+       
2367
+        //监测
2368
+        var blood_flow_volume_total = 0
2369
+        var ultrafiltration_volume_total = 0
2370
+        var ultrafiltration_rate_total = 0
2371
+        var total_length = 0
2372
+        var pingjun_blood_flow_volume = 0
2373
+        var pingjun_ultrafiltration_volume_total = 0
2374
+        var pingjun_ultrafiltration_rate_total = 0
2375
+        if(this.monitorList!=null && this.monitorList.length>0){
2376
+          for(let i=0;i<this.monitorList.length;i++){
2377
+            blood_flow_volume_total+=this.monitorList[i].blood_flow_volume
2378
+            ultrafiltration_volume_total+=this.monitorList[i].ultrafiltration_volume
2379
+            ultrafiltration_rate_total += this.monitorList[i].ultrafiltration_rate
2380
+            total_length = this.monitorList.length
2381
+          }
2382
+        }
2383
+        pingjun_blood_flow_volume = (blood_flow_volume_total/total_length).toFixed(2)
2384
+        pingjun_ultrafiltration_volume_total = (ultrafiltration_volume_total/total_length).toFixed(2)
2385
+        pingjun_ultrafiltration_rate_total = (ultrafiltration_rate_total/total_length).toFixed(2)
2386
+
2387
+        var dry_weight_str = ""
2388
+        //干体重
2389
+        if(this.dryweightList!=null && this.dryweightList.length>0){
2390
+           for(let i=0;i<this.dryweightList.length;i++){
2391
+            dry_weight_str =  this.getTimeOne(this.dryweightList[i].ctime)+" " +this.dryweightList[i].adjusted_value.slice(4,6)+ this.dryweightList[i].adjusted_value.slice(0,3)+"kg" + "调整到" +" "+ this.dryweightList[i].dry_weight+"kg"+","
2392
+           }
2393
+        } 
2394
+
2395
+        //血管通路
2396
+        var vascularAccess_str = ""
2397
+        var created_time = ""
2398
+      
2399
+        if(this.patientVascularAccess!=undefined){
2400
+          vascularAccess_str  = this.patientVascularAccess.blood_access_part_id + this.patientVascularAccess.blood_access_part_opera_id
2401
+          created_time  = this.getTime(this.patientVascularAccess.first_start_time)
2402
+        }
2403
+
2404
+        //并发症
2405
+        var complication = ""
2406
+        if(this.lastBefor!=undefined){
2407
+            complication = this.lastBefor.complication
2408
+        }
2409
+
2410
+
2411
+
2315 2412
         if(this.inpectionList!=null&& this.inpectionList.length>0){
2316 2413
            for(let i=0;i<this.inpectionList.length;i++){
2317 2414
             this.inpectionList[i].group_no = ""
@@ -2727,8 +2824,9 @@
2727 2824
           }
2728 2825
         })
2729 2826
          this.AuToShow = true
2730
-
2731
-
2827
+      
2828
+       }
2829
+       })
2732 2830
       },
2733 2831
       blood_chang(val){
2734 2832
         if(val == 1){
@@ -3429,14 +3527,14 @@
3429 3527
           <tr><td>1</td><td>高尿酸血症</td></tr>
3430 3528
           <tr><td>2</td><td>继发性甲状旁腺功能亢进</td></tr>
3431 3529
         </table>`
3432
-        this.new_content = text
3433
-        this.$refs.editor.contents = this.new_content
3530
+        // this.$refs.editor.contents = this.new_content
3531
+        this.$refs.editor.contents = this.$refs.editor.contents +text
3434 3532
       },
3435 3533
       hospital_click(){
3436 3534
         const text = `<p style="line-height: 50px;display: flex;"><span style="display: inline-block;flex: 1;">住院日期:</span><span style="display: inline-block;flex: 1;">出院日期:</span></p>
3437 3535
     <p style="line-height: 50px;display: flex;"><span style="display: inline-block;flex: 1;">入院诊断:</span><span style="display: inline-block;flex: 1;">出院诊断:</span></p>`
3438
-        this.new_content = text
3439
-        this.$refs.editor.contents = this.new_content
3536
+       
3537
+        this.$refs.editor.contents =  this.$refs.editor.contents + text
3440 3538
       },
3441 3539
       Inspect_click(){
3442 3540
         this.Inspect_dialog = true
@@ -3449,21 +3547,47 @@
3449 3547
       handleChange(val){
3450 3548
 
3451 3549
       },
3452
-      childclick(eve){
3453
-        console.log('eve',eve);
3454
-        // const inspect_arr = []
3455
-        if(this.InspectRows.length ==0){
3456
-          this.InspectRows.push(eve)
3457
-        }else{
3458
-          let index = this.InspectRows.findIndex((obj) => obj.c_id === eve.c_id && obj.pater_id == eve.pater_id);
3459
-          if (index === -1) {
3460
-            this.InspectRows.push(eve);
3461
-          } else {
3462
-            this.InspectRows.splice(index, 1);
3550
+      childclick(i){
3551
+        console.log('i333333333333333333333333333333',i);
3552
+          var params = {
3553
+            patient_id:i.patient_id,
3554
+            project_id:i.project_id,
3555
+            inspect_date:i.inspect_date,
3556
+
3463 3557
           }
3464
-        }
3465
-        this.getinspect(this.InspectRows)
3466
-        console.log('检查',this.InspectRows.includes(eve));
3558
+        getInspectionByProjectId(params).then(response=>{
3559
+          if(response.data.state == 1){
3560
+            var inspection =  response.data.data.inspection
3561
+            var inspection_str = i.project_name + "-"+"检验日期:"+this.getTime(i.inspect_date)+";"
3562
+            if(inspection!=null && inspection.length>0){
3563
+              for(let i=0;i<inspection.length;i++){
3564
+                if(inspection[i].inspect_value!=""){
3565
+                  inspection_str += inspection[i].item_name+":" + inspection[i].inspect_value+","
3566
+                }
3567
+               
3568
+              }
3569
+            }
3570
+            this.inspect_context = inspection_str
3571
+            
3572
+          }
3573
+        })
3574
+        // // const inspect_arr = []
3575
+        // if(this.InspectRows.length ==0){
3576
+        //   this.InspectRows.push(eve)
3577
+        // }else{
3578
+        //   let index = this.InspectRows.findIndex((obj) => obj.c_id === eve.c_id && obj.pater_id == eve.pater_id);
3579
+        //   if (index === -1) {
3580
+        //     this.InspectRows.push(eve);
3581
+        //   } else {
3582
+        //     this.InspectRows.splice(index, 1);
3583
+        //   }
3584
+        // }
3585
+        // this.getinspect(this.InspectRows)
3586
+        // console.log('检查',this.InspectRows.includes(eve));
3587
+      },
3588
+      toInpectionContentPint(){
3589
+        this.$refs.editor.contents = this.$refs.editor.contents +this.inspect_context
3590
+        this.Inspect_dialog = false
3467 3591
       },
3468 3592
       getinspect(val){
3469 3593
         const arr = []
@@ -3505,15 +3629,7 @@
3505 3629
         }
3506 3630
         this.getinspect(this.InspectRows)
3507 3631
         console.log('this',this.InspectRows);
3508
-      }
3509
-
3510
-        // if(val != ''){
3511
-        //   for(let i in this.Inspectlist){
3512
-        //   }
3513
-        // }
3514 3632
       },
3515
-
3516
-
3517 3633
     //血压
3518 3634
     getMonitorSearchList(){
3519 3635
 
@@ -3603,8 +3719,105 @@
3603 3719
       toMonitorPint(){
3604 3720
         this.$refs.editor.contents = this.$refs.editor.contents+this.monitor_blood_context
3605 3721
         this.blood_dialog = false
3606
-      }
3722
+      },
3723
+      toInspection(){
3724
+          var params = {
3725
+            start_time:this.start_date1,
3726
+            end_time:this.end_date1,
3727
+            patient_id:this.patient_id,
3728
+          }
3729
+        getPatientInspectionList(params).then(response=>{
3730
+           if(response.data.state == 1){
3731
+             
3732
+             var groupList = response.data.data.groupList
3733
+             var inspection = response.data.data.inspection
3734
+             this.inspectionList = inspection
3735
+            
3736
+             if(groupList.length!=null && groupList.length>0){
3737
+                for(let i=0;i<groupList.length;i++){
3738
+                  groupList[i].child = []
3739
+                  for(let j=0;j<inspection.length;j++){
3740
+                    if(groupList[i].project_id == inspection[j].project_id && groupList[i].inspect_date == inspection[j].inspect_date){
3741
+                      groupList[i].child.push(inspection[j])
3742
+                    }
3743
+                  }
3744
+                }
3745
+             }
3607 3746
 
3747
+            //  if(newGroupList.length!=null && newGroupList.length>0){
3748
+            //     for(let i=0;i<newGroupList.length;i++){
3749
+            //       newGroupList[i].child = []
3750
+            //       for(let j=0;j<inspection.length;j++){
3751
+            //         if(newGroupList[i].project_id == inspection[j].project_id && newGroupList[i].inspect_date == inspection[j].inspect_date){
3752
+            //           newGroupList[i].child.push(inspection[j])
3753
+            //         }
3754
+            //       }
3755
+            //     }
3756
+            //  }
3757
+
3758
+            //  this.newInspectionListOne = []
3759
+            //  this.newInspectionListOne = newGroupList
3760
+
3761
+            //  console.log("hhhhhhhhhhhhhhhhhhhh",this.newInspectionListOne)
3762
+
3763
+            
3764
+
3765
+
3766
+             
3767
+
3768
+             for(let i=0;i<groupList.length;i++){
3769
+               for(let j=0;j<groupList[i].child.length;j++){
3770
+                  groupList[i].child =this.getInspection(groupList[i].child) 
3771
+               }
3772
+             }
3773
+      
3774
+             this.newInspectionList = groupList 
3775
+          
3776
+           }
3777
+        })
3778
+      },
3779
+      getInspection(tempArr) {
3780
+          let newArr = [];
3781
+          for (let i = 0; i < tempArr.length; i++) {
3782
+              if (newArr.indexOf(tempArr[i].inspect_date) == -1) {
3783
+                  newArr.push(tempArr[i].inspect_date);
3784
+              } else {
3785
+                  tempArr.splice(i, 1);
3786
+                  i--;
3787
+              };
3788
+          };
3789
+          return tempArr;
3790
+      },
3791
+      changeInspetion(){
3792
+        console.log("newInsption-----------",this.newInspectionList)
3793
+        console.log("inspectionList",this.inspectionList)
3794
+
3795
+        for(let i=0;i<this.newInspectionList.length;i++){
3796
+           this.newInspectionList[i].childOne =[]
3797
+          for(let j=0;j<this.inspectionList.length;j++){
3798
+            if(this.newInspectionList[i].project_id == this.inspectionList[j].project_id &&this.newInspectionList[i].inspect_date== this.inspectionList[j].inspect_date ){
3799
+                this.newInspectionList[i].childOne.push(this.inspectionList[j])
3800
+            }
3801
+          }
3802
+        }
3803
+       
3804
+         var new_inspection_str =""
3805
+        if(this.newInspectionList!=null&& this.newInspectionList.length>0){
3806
+           for(let i=0;i<this.newInspectionList.length;i++){
3807
+            if(this.newInspectionList[i].childOne!=null && this.newInspectionList[i].childOne.length>0){
3808
+              new_inspection_str += "<br/>"+ this.newInspectionList[i].project_name +"-" +"检验日期:"+ this.getTime(this.newInspectionList[i].childOne[0].inspect_date) +" "
3809
+              for(let j=0;j<this.newInspectionList[i].childOne.length;j++){
3810
+                if(this.newInspectionList[i].childOne[j].inspect_value!=""){
3811
+                  new_inspection_str+= this.newInspectionList[i].childOne[j].item_name+":" + this.newInspectionList[i].childOne[j].inspect_value+","+" "
3812
+                }
3813
+                
3814
+              }
3815
+            }
3816
+              
3817
+           } 
3818
+        }
3819
+         this.inspect_context = new_inspection_str
3820
+      }
3608 3821
 
3609 3822
     },
3610 3823
     beforeMount(){
@@ -3612,7 +3825,8 @@
3612 3825
     },
3613 3826
     mounted(){
3614 3827
 
3615
-    }
3828
+    },
3829
+  
3616 3830
 
3617 3831
   }
3618 3832
 </script>