浏览代码

护士端患者信息修改

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
   timerCloseTime = null;
125
   timerCloseTime = null;
126
   changeShow = true;
126
   changeShow = true;
127
   currentHospital; //当前院区
127
   currentHospital; //当前院区
128
+  currentUser; //当前用户
128
   logTimer = null; //综合日志定时器
129
   logTimer = null; //综合日志定时器
129
   logTime = 0; //综合日志自动刷新秒数
130
   logTime = 0; //综合日志自动刷新秒数
130
   logTimeConst = 30; //综合日志自动刷新秒数
131
   logTimeConst = 30; //综合日志自动刷新秒数
131
   ngOnInit() {
132
   ngOnInit() {
133
+    this.currentUser = this.tool.getCurrentUserDept();
134
+    console.log(this.currentUser, this.tabSearchCont);
132
     //防抖
135
     //防抖
133
     this.searchTabInpSubject.pipe(debounceTime(500)).subscribe((v) => {
136
     this.searchTabInpSubject.pipe(debounceTime(500)).subscribe((v) => {
134
       this.getPatient(v);
137
       this.getPatient(v);
@@ -614,13 +617,13 @@ export class HushijiandanComponent implements OnInit {
614
           that.othersList = [];
617
           that.othersList = [];
615
           that.patientMsgList = [];
618
           that.patientMsgList = [];
616
           data.data.allTaskTypes.forEach((e) => {
619
           data.data.allTaskTypes.forEach((e) => {
617
-            if (e.associationType.value=='other') {
620
+            if (e.associationType.value == "other") {
618
               that.othersList.push(e);
621
               that.othersList.push(e);
619
-            } else if (e.associationType.value=='specimen') {
622
+            } else if (e.associationType.value == "specimen") {
620
               that.bbMsg = e;
623
               that.bbMsg = e;
621
             } else if (
624
             } else if (
622
-              e.associationType.value=='patientTransport' ||
625
+              e.associationType.value == "patientTransport" ||
623
-              e.associationType.value=='inspect'
626
+              e.associationType.value == "inspect"
624
             ) {
627
             ) {
625
               that.patientMsgList.push(e);
628
               that.patientMsgList.push(e);
626
             }
629
             }
@@ -709,19 +712,37 @@ export class HushijiandanComponent implements OnInit {
709
   // 获取患者信息
712
   // 获取患者信息
710
   snum = 0;
713
   snum = 0;
711
   getPatient(e?) {
714
   getPatient(e?) {
712
-    let that = this;
715
+    if (
713
-    that.pLoading = true;
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
     let postData = {
727
     let postData = {
715
-      idx: that.infoPageIdx - 1,
728
+      idx: this.infoPageIdx - 1,
716
-      sum: 9999,
729
+      sum: 10,
717
     };
730
     };
718
     // 患者信息
731
     // 患者信息
719
     postData["patient"] = {
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
     this.snum++;
744
     this.snum++;
724
-    that.mainService
745
+    this.mainService
725
       .getFetchDataList("nurse", "patient", postData)
746
       .getFetchDataList("nurse", "patient", postData)
726
       .subscribe((data) => {
747
       .subscribe((data) => {
727
         this.snum--;
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
         if (this.snum === 0) {
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
     let flag = this.checkTypeLis.some((item) => {
1018
     let flag = this.checkTypeLis.some((item) => {
998
       return (
1019
       return (
999
         item.id == this.patientForm.controls.checkedType.value &&
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
     let appointmentZyBuildFlag = this.checkTypeLis.filter(
1340
     let appointmentZyBuildFlag = this.checkTypeLis.filter(
1320
       (item) =>
1341
       (item) =>
1321
         item.id == this.patientForm.controls.checkedType.value &&
1342
         item.id == this.patientForm.controls.checkedType.value &&
1322
-        item.associationType.value=='patientTransport'
1343
+        item.associationType.value == "patientTransport"
1323
     );
1344
     );
1324
     if (appointmentZyBuildFlag.length) {
1345
     if (appointmentZyBuildFlag.length) {
1325
       this.appointmentZyBuildFlag =
1346
       this.appointmentZyBuildFlag =