瀏覽代碼

护士端患者信息修改

seimin 3 年之前
父節點
當前提交
32f4857131
共有 1 個文件被更改,包括 37 次插入16 次删除
  1. 37 16
      src/app/views/hushijiandan/hushijiandan.component.ts

+ 37 - 16
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -125,10 +125,13 @@ export class HushijiandanComponent implements OnInit {
125 125
   timerCloseTime = null;
126 126
   changeShow = true;
127 127
   currentHospital; //当前院区
128
+  currentUser; //当前用户
128 129
   logTimer = null; //综合日志定时器
129 130
   logTime = 0; //综合日志自动刷新秒数
130 131
   logTimeConst = 30; //综合日志自动刷新秒数
131 132
   ngOnInit() {
133
+    this.currentUser = this.tool.getCurrentUserDept();
134
+    console.log(this.currentUser, this.tabSearchCont);
132 135
     //防抖
133 136
     this.searchTabInpSubject.pipe(debounceTime(500)).subscribe((v) => {
134 137
       this.getPatient(v);
@@ -614,13 +617,13 @@ export class HushijiandanComponent implements OnInit {
614 617
           that.othersList = [];
615 618
           that.patientMsgList = [];
616 619
           data.data.allTaskTypes.forEach((e) => {
617
-            if (e.associationType.value=='other') {
620
+            if (e.associationType.value == "other") {
618 621
               that.othersList.push(e);
619
-            } else if (e.associationType.value=='specimen') {
622
+            } else if (e.associationType.value == "specimen") {
620 623
               that.bbMsg = e;
621 624
             } else if (
622
-              e.associationType.value=='patientTransport' ||
623
-              e.associationType.value=='inspect'
625
+              e.associationType.value == "patientTransport" ||
626
+              e.associationType.value == "inspect"
624 627
             ) {
625 628
               that.patientMsgList.push(e);
626 629
             }
@@ -709,19 +712,37 @@ export class HushijiandanComponent implements OnInit {
709 712
   // 获取患者信息
710 713
   snum = 0;
711 714
   getPatient(e?) {
712
-    let that = this;
713
-    that.pLoading = true;
715
+    if (
716
+      (this.currentUser.typeValue == "checkRoom2" ||
717
+        this.currentUser.typeValue == "outpatientDept" ||
718
+        this.currentUser.typeValue == "checkRoom") &&
719
+      !this.tabSearchCont
720
+    ) {
721
+      this.pLoading = false;
722
+      this.patientList = [];
723
+      this.infoLength = 0;
724
+      return; //护士端如果登录后如果科室类型为“检查科室”、“门诊科室”、“检验科室”,默认不显示患者信息
725
+    }
726
+    this.pLoading = true;
714 727
     let postData = {
715
-      idx: that.infoPageIdx - 1,
716
-      sum: 9999,
728
+      idx: this.infoPageIdx - 1,
729
+      sum: 10,
717 730
     };
718 731
     // 患者信息
719 732
     postData["patient"] = {
720
-      keyWord: e ? e : that.tabSearchCont,
733
+      keyWord: e ? e : this.tabSearchCont,
721 734
     };
722
-    postData["patient"]["department"] = { id: that.loginUserDeptId };
735
+    if (
736
+      this.currentUser.typeValue == "checkRoom2" ||
737
+      this.currentUser.typeValue == "outpatientDept" ||
738
+      this.currentUser.typeValue == "checkRoom"
739
+    ) {
740
+      delete postData["patient"]["department"];//搜索范围为全院在院患者
741
+    } else {
742
+      postData["patient"]["department"] = { id: this.loginUserDeptId };
743
+    }
723 744
     this.snum++;
724
-    that.mainService
745
+    this.mainService
725 746
       .getFetchDataList("nurse", "patient", postData)
726 747
       .subscribe((data) => {
727 748
         this.snum--;
@@ -732,11 +753,11 @@ export class HushijiandanComponent implements OnInit {
732 753
             }
733 754
           });
734 755
         }
735
-        that.patientList = data.list || [];
756
+        this.patientList = data.list || [];
736 757
         if (this.snum === 0) {
737
-          that.pLoading = false;
758
+          this.pLoading = false;
738 759
         }
739
-        that.infoLength = data.totalNum || 0;
760
+        this.infoLength = data.totalNum || 0;
740 761
       });
741 762
   }
742 763
 
@@ -997,7 +1018,7 @@ export class HushijiandanComponent implements OnInit {
997 1018
     let flag = this.checkTypeLis.some((item) => {
998 1019
       return (
999 1020
         item.id == this.patientForm.controls.checkedType.value &&
1000
-        item.associationType.value=='patientTransport'
1021
+        item.associationType.value == "patientTransport"
1001 1022
       );
1002 1023
     });
1003 1024
     //预约时间-患者陪检不能为空
@@ -1319,7 +1340,7 @@ export class HushijiandanComponent implements OnInit {
1319 1340
     let appointmentZyBuildFlag = this.checkTypeLis.filter(
1320 1341
       (item) =>
1321 1342
         item.id == this.patientForm.controls.checkedType.value &&
1322
-        item.associationType.value=='patientTransport'
1343
+        item.associationType.value == "patientTransport"
1323 1344
     );
1324 1345
     if (appointmentZyBuildFlag.length) {
1325 1346
       this.appointmentZyBuildFlag =