seimin 3 tygodni temu
rodzic
commit
4024528c00

+ 7 - 0
src/app/services/main.service.ts

@@ -1155,4 +1155,11 @@ export class MainService {
1155 1155
 		});
1156 1156
 	}
1157 1157
 
1158
+  // 护士端-批量陪检图标下两个数字
1159
+	getPatientInspectCount(data = {}){
1160
+		return this.http.post(host.host + `/nurse/patientInspect/getPatientInspectCount`, data, {
1161
+		  headers: this.headers,
1162
+		});
1163
+	}
1164
+
1158 1165
 }

+ 6 - 10
src/app/share/add-inspect-modal/add-inspect-modal.component.ts

@@ -65,21 +65,17 @@ export class AddInspectModalComponent implements OnInit {
65 65
   }
66 66
 
67 67
   refreshData1Status(): void {
68
-    this.isAllDisplayData1Checked = this.listOfDisplayData1.every(
68
+    this.isAllDisplayData1Checked = this.listOfDisplayData1.length ? this.listOfDisplayData1.every(
69 69
       (item) => this.mapOfCheckedData1Id[item.id]
70
-    );
71
-    this.isIndeterminateData1 =
72
-      this.listOfDisplayData1.some((item) => this.mapOfCheckedData1Id[item.id]) &&
73
-      !this.isAllDisplayData1Checked;
70
+    ) : false;
71
+    this.isIndeterminateData1 = this.listOfDisplayData1.some((item) => this.mapOfCheckedData1Id[item.id]) && !this.isAllDisplayData1Checked;
74 72
   }
75 73
 
76 74
   refreshData2Status(): void {
77
-    this.isAllDisplayData2Checked = this.listOfDisplayData2.every(
75
+    this.isAllDisplayData2Checked = this.listOfDisplayData2.length ? this.listOfDisplayData2.every(
78 76
       (item) => this.mapOfCheckedData2Id[item.id]
79
-    );
80
-    this.isIndeterminateData2 =
81
-      this.listOfDisplayData2.some((item) => this.mapOfCheckedData2Id[item.id]) &&
82
-      !this.isAllDisplayData2Checked;
77
+    ) : false;
78
+    this.isIndeterminateData2 = this.listOfDisplayData2.some((item) => this.mapOfCheckedData2Id[item.id]) && !this.isAllDisplayData2Checked;
83 79
   }
84 80
 
85 81
   // 开通科室选择整行

+ 1 - 0
src/app/share/select-date-yytime/select-date-yytime.component.html

@@ -3,6 +3,7 @@
3 3
     <div class="title">修改预约时间<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
4 4
     </div>
5 5
     <div class="content">
6
+      <div class="tips">是否需要预约执行,如需预约请您选择时间</div>
6 7
       <div class="addForm">
7 8
         <div class="display_flex align-items_center">
8 9
           <div>

+ 2 - 0
src/app/share/select-date-yytime/select-date-yytime.component.ts

@@ -23,6 +23,8 @@ export class SelectDateYytimeComponent implements OnInit {
23 23
     if(this.date){
24 24
       this.yyDate = new Date(this.date);
25 25
       this.yyTime = new Date(this.date);
26
+    }else{
27
+      this.yyDate = new Date();
26 28
     }
27 29
   }
28 30
 

Plik diff jest za duży
+ 1 - 1
src/app/views/batch-inspection/batch-inspection.component.html


+ 6 - 6
src/app/views/batch-inspection/batch-inspection.component.ts

@@ -365,15 +365,15 @@ export class BatchInspectionComponent implements OnInit {
365 365
   // 批量发起陪检
366 366
   isShowSelectDateYytime:boolean = false;
367 367
   addYytime(){
368
-    let obj1 = this.listOfData.find(v => v.tripType);
369
-    if(!obj1){
370
-      this.message.warning(`【${obj1.patientName}】请填写出行方式!`)
368
+    let obj1 = this.listOfData.find(v => !v.tripType);
369
+    if(obj1){
370
+      this.message.warning(`${obj1.patientName}患者没有选择出行方式,请调整后提交申请!`)
371 371
       return;
372 372
     }
373 373
 
374
-    let obj2 = this.listOfData.find(v => v.tripType);
375
-    if(!obj2){
376
-      this.message.warning(`【${obj2.patientName}】请追加项目!`)
374
+    let obj2 = this.listOfData.find(v => !v.inspectList || v.inspectList.length == 0);
375
+    if(obj2){
376
+      this.message.warning(`${obj2.patientName}患者没有检验项目,请调整后提交申请!`)
377 377
       return;
378 378
     }
379 379
     this.isShowSelectDateYytime = true;

+ 3 - 3
src/app/views/hushijiandan/hushijiandan.component.html

@@ -358,8 +358,8 @@
358 358
                           <span *ngIf="item.ordinaryFlag" (click)="changeSpeDetail($event, 0)">普:{{ specimenWorkOrderMsg.specimenCount ? specimenWorkOrderMsg.specimenCount.noUrgent : 0 }}</span>
359 359
                         </div>
360 360
                         <div class="navSpecimen" *ngIf="item.bussType.value === 'inspect'">
361
-                          <span>预:0</span>
362
-                          <span>检:0</span>
361
+                          <span (click)="changeInspectClosedLoopView($event, '2')">预:{{patientInspectCountMsg.data ? patientInspectCountMsg.data[0].yyCount : 0}}</span>
362
+                          <span (click)="changeInspectClosedLoopView($event, '3,4')">检:{{patientInspectCountMsg.data ? patientInspectCountMsg.data[0].workingCount : 0}}</span>
363 363
                         </div>
364 364
                       </div>
365 365
                     </div>
@@ -968,7 +968,7 @@
968 968
                       </thead>
969 969
                       <tbody>
970 970
                         <tr *ngFor="let item of outpatientHelpAppointmentList;let i = index">
971
-                          <td>{{ item.patientName }}<br>{{ item.sex?.name }}<ng-container *ngIf="item.age !== undefined"> {{item.age}}岁</ng-container></td>
971
+                          <td>{{ item.patientName }}<br>{{ item.sex?.name }}<ng-container *ngIf="item && item.age !== undefined"> {{item.age}}岁</ng-container></td>
972 972
                           <td>{{ item.applyType?.name }}<br>{{ item.equipment?.name }}</td>
973 973
                           <td>患者:{{ item.patientPhone }}<br>代表:{{ item.agent_phone }}</td>
974 974
                           <td>{{ item.escortTime | date:'yyyy-MM-dd HH:mm' }}<br>{{ item.status?.name }}</td>

+ 29 - 0
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1241,6 +1241,7 @@ export class HushijiandanComponent implements OnInit {
1241 1241
   refreshSpecimenWorkOrderMsg() {
1242 1242
     this.msgTimerId = setInterval(() => {
1243 1243
       this.getSpecimenWorkOrderMsg();
1244
+      this.getPatientInspectCountMsg();
1244 1245
     }, 60000);
1245 1246
   }
1246 1247
 
@@ -1270,6 +1271,23 @@ export class HushijiandanComponent implements OnInit {
1270 1271
       });
1271 1272
   }
1272 1273
 
1274
+  // 护士端-批量陪检图标下两个数字
1275
+  patientInspectCountMsg: any = {};
1276
+  getPatientInspectCountMsg() {
1277
+    if(this.currentDept.typeValue == 'surgery' && !this.tabSearchCont){
1278
+      return;
1279
+    }
1280
+    let that = this;
1281
+
1282
+    that.mainService
1283
+      .getPatientInspectCount({
1284
+        deptId: JSON.parse(localStorage.getItem("user")).user.dept.id,
1285
+      })
1286
+      .subscribe((data) => {
1287
+        that.patientInspectCountMsg = data;
1288
+      });
1289
+  }
1290
+
1273 1291
   // 手术提示信息
1274 1292
   surgeryLoading = false;
1275 1293
 	now:any = new Date();
@@ -1744,6 +1762,7 @@ export class HushijiandanComponent implements OnInit {
1744 1762
             that.deptTaskTypeRules.openInspection ||
1745 1763
             that.deptTaskTypeRules.openPatientTransport
1746 1764
           ) {
1765
+            this.getPatientInspectCountMsg();
1747 1766
             // 陪检权限或转科权限
1748 1767
             if (this.tabFlag) {
1749 1768
               this.tabFlag = false;
@@ -4469,6 +4488,16 @@ export class HushijiandanComponent implements OnInit {
4469 4488
         }
4470 4489
       });
4471 4490
   }
4491
+
4492
+  // 跳转患者陪检闭环视图
4493
+  changeInspectClosedLoopView(e, stateValue){
4494
+    e.stopPropagation();
4495
+    let queryParams = {
4496
+      department: { id: this.currentDept.id, dept: this.currentDept.dept },
4497
+      stateValue,
4498
+    }
4499
+    this.router.navigateByUrl(`/inspectClosedLoopView?queryParams=${JSON.stringify(queryParams)}`);
4500
+  }
4472 4501
   // 隐藏查看标本详情弹层
4473 4502
   hideSpeDetailModel() {
4474 4503
     this.detailModel = false;

Plik diff jest za duży
+ 24 - 16
src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.html


+ 12 - 5
src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.less

@@ -8,15 +8,15 @@
8 8
   display: flex;
9 9
   flex-direction: column;
10 10
   .header{
11
-    height: 64px;
12 11
     background-color: #fff;
13 12
     display: flex;
14 13
     align-items: center;
15 14
     justify-content: space-between;
16
-    padding: 0 24px;
15
+    padding: 16px 24px 0;
17 16
     font-size: 16px;
18 17
     .dept{
19
-      margin-right: 48px;
18
+      margin-right: 24px;
19
+      margin-bottom: 16px;
20 20
       i{
21 21
         font-size: 24px;
22 22
         color: #8A8A8A;
@@ -24,18 +24,25 @@
24 24
       }
25 25
     }
26 26
     .patient{
27
-      margin-left: 24px;
27
+      margin-right: 16px;
28
+      display: flex;
29
+      align-items: center;
30
+      margin-bottom: 16px;
28 31
     }
29 32
     .label{
30 33
       padding-right: 16px;
31 34
       font-size: 14px;
35
+      flex-shrink: 0;
32 36
     }
33 37
     .formItem{
34
-      width: 173px;
38
+      min-width: 120px;
35 39
     }
36 40
     .info{
37 41
       margin-left: 48px;
38 42
     }
43
+    .btn{
44
+      margin-bottom: 16px;
45
+    }
39 46
   }
40 47
   .table{
41 48
     flex: 1;

+ 73 - 13
src/app/views/inspect-closed-loop-view/inspect-closed-loop-view.component.ts

@@ -1,4 +1,4 @@
1
-import { Component, OnInit } from '@angular/core';
1
+import { Component, OnInit, OnDestroy } from '@angular/core';
2 2
 import { ToolService } from 'src/app/services/tool.service';
3 3
 import { MainService } from 'src/app/services/main.service';
4 4
 import { NzMessageService } from 'ng-zorro-antd';
@@ -7,18 +7,20 @@ import { Subject } from 'rxjs';
7 7
 import { debounceTime } from 'rxjs/operators';
8 8
 import { Location } from '@angular/common';
9 9
 import cloneDeep from 'lodash-es/cloneDeep'
10
+import { ActivatedRoute } from '@angular/router';
10 11
 @Component({
11 12
   selector: 'app-inspect-closed-loop-view',
12 13
   templateUrl: './inspect-closed-loop-view.component.html',
13 14
   styleUrls: ['./inspect-closed-loop-view.component.less']
14 15
 })
15
-export class InspectClosedLoopViewComponent implements OnInit {
16
+export class InspectClosedLoopViewComponent implements OnInit, OnDestroy {
16 17
 
17 18
   constructor(
18 19
     private mainService: MainService,
19 20
     private tool: ToolService,
20 21
     private message: NzMessageService,
21 22
     private _location: Location,
23
+    private route: ActivatedRoute,
22 24
   ) { }
23 25
 
24 26
   hosId:any = this.tool.getCurrentHospital().id; //当前院区
@@ -28,6 +30,13 @@ export class InspectClosedLoopViewComponent implements OnInit {
28 30
   pageSize: number = 10; //表格每页展示条数
29 31
   listLength: number = 10; //表格总数据量
30 32
   searchDto: any = {};
33
+  autoRefresh:boolean = false;
34
+  autoRefreshSecond: number = 15;
35
+
36
+  dateRange: any = []; //预约时间
37
+
38
+  formatterPercent = (value: number) => `${value} 秒`;
39
+  parserPercent = (value: string) => value.replace(' 秒', '');
31 40
 
32 41
 
33 42
   searchTimerSubject = new Subject(); //防抖
@@ -42,6 +51,38 @@ export class InspectClosedLoopViewComponent implements OnInit {
42 51
     this.init();
43 52
   }
44 53
 
54
+  ngOnDestroy() {
55
+    clearInterval(this.timer);
56
+  }
57
+
58
+  // 日期选择
59
+  onCalendarChangeDate(dateArr){
60
+    if(dateArr.length == 2){
61
+      this.dateRange = [startOfDay(dateArr[0]), endOfDay(dateArr[1])];
62
+    }
63
+  }
64
+
65
+  // 修改自动刷新时间
66
+  timer;
67
+  time: number = 15;
68
+  changeAutoRefresh(flag){
69
+    if(flag){
70
+      this.time = this.autoRefreshSecond;
71
+      console.log('this.time:', this.time)
72
+      clearInterval(this.timer);
73
+      this.timer = setInterval(() => {
74
+        this.time--;
75
+        console.log('this.time:', this.time)
76
+        if(this.time === 0){
77
+          this.time = this.autoRefreshSecond;
78
+          this.search();
79
+        }
80
+      }, 1000);
81
+    }else{
82
+      clearInterval(this.timer);
83
+    }
84
+  }
85
+
45 86
   // 搜索
46 87
   search() {
47 88
     this.getList(1);
@@ -49,11 +90,30 @@ export class InspectClosedLoopViewComponent implements OnInit {
49 90
 
50 91
   // 重置
51 92
   reset() {
52
-    this.searchDto = {};
93
+    if(this.disableDept){
94
+      this.searchDto = { deptId: this.searchDto.deptId };
95
+    }else{
96
+      this.searchDto = {};
97
+    }
98
+    this.dateRange = [];
53 99
     this.getList(1);
54 100
   }
55 101
 
102
+  disableDept:boolean = false;
56 103
   init(){
104
+    const queryParams = this.route.snapshot.queryParams.queryParams ? JSON.parse(this.route.snapshot.queryParams.queryParams) : undefined;
105
+    if(queryParams){
106
+      if(queryParams.department){
107
+        this.searchDto.deptId = queryParams.department.id;
108
+        this.departmentList = [queryParams.department];
109
+        this.disableDept = true;
110
+      }
111
+
112
+      if(queryParams.stateValue){
113
+        this.searchDto.stateValue = queryParams.stateValue.split(',');
114
+      }
115
+    }
116
+    this.getStatusList();
57 117
     this.search();
58 118
   }
59 119
 
@@ -135,11 +195,6 @@ export class InspectClosedLoopViewComponent implements OnInit {
135 195
       });
136 196
   }
137 197
 
138
-  openChangeStatus(flag){
139
-    flag && this.setIsSelecting(false);
140
-    flag && this.getStatusList();
141
-  }
142
-
143 198
   // 获取状态
144 199
   statusList: any = [];
145 200
   getStatusList() {
@@ -151,7 +206,6 @@ export class InspectClosedLoopViewComponent implements OnInit {
151 206
   loading1:boolean = false;
152 207
 
153 208
   // 表格数据
154
-  searchDto: any = {};
155 209
   getList(type) {
156 210
     if (type == 1) {
157 211
       this.pageIndex = 1;
@@ -160,10 +214,12 @@ export class InspectClosedLoopViewComponent implements OnInit {
160 214
       idx: this.pageIndex - 1,
161 215
       sum: this.pageSize,
162 216
       patientInspectLog: {
163
-        hosId: this.currentHospital.id,
217
+        startTime: this.dateRange.length ? format(this.dateRange[0], 'yyyy-MM-dd HH:mm:ss') : undefined,
218
+        endTime: this.dateRange.length ? format(this.dateRange[1], 'yyyy-MM-dd HH:mm:ss') : undefined,
219
+        hosId: this.hosId,
164 220
         deptId: this.searchDto.deptId || undefined,
165
-        batchId: this.searchDto.patientId || undefined,
166
-        state: this.searchDto.stateId ? { id: this.searchDto.stateId } : undefined,
221
+        patientId: this.searchDto.patientId || undefined,
222
+        state: this.searchDto.stateValue ? { value: this.searchDto.stateValue.toString() } : undefined,
167 223
       },
168 224
     };
169 225
     this.loading1 = true;
@@ -172,7 +228,11 @@ export class InspectClosedLoopViewComponent implements OnInit {
172 228
       .subscribe((data) => {
173 229
         this.loading1 = false;
174 230
         if (data.status == 200) {
175
-          this.listOfData = data.list;
231
+          let list = data.list || [];
232
+          list.forEach(v => {
233
+            v.inspectNames = v.inspectList ? v.inspectList.map(v => v.inspectName).join(',') : '';
234
+          })
235
+          this.listOfData = list;
176 236
           this.listLength = data.totalNum;
177 237
         }else{
178 238
           this.message.error(data.msg || "请求数据失败");

Plik diff jest za duży
+ 42 - 42
src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.component.html


+ 83 - 26
src/app/views/patient-inspect-log-detail/patient-inspect-log-detail.component.ts

@@ -3,6 +3,7 @@ import { MainService } from "../../services/main.service";
3 3
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
4 4
 import { NzMessageService } from "ng-zorro-antd";
5 5
 import { ActivatedRoute, Router } from '@angular/router';
6
+import { ToolService } from 'src/app/services/tool.service';
6 7
 @Component({
7 8
   selector: "app-patient-inspect-log-detail",
8 9
   templateUrl: "./patient-inspect-log-detail.component.html",
@@ -34,60 +35,117 @@ export class PatientInspectLogDetailComponent implements OnInit {
34 35
     private mainService: MainService,
35 36
     private route: ActivatedRoute,
36 37
     private router: Router,
38
+    private tool: ToolService,
37 39
   ) {}
38 40
   maskFlag: any = false;
39 41
   id: number; //工单id
40
-  orderInfo: any; //工单详情信息
42
+  orderInfo: any; //详情信息
41 43
   promptContent: string; //操作提示框提示信息
42 44
   ifSuccess: boolean; //操作成功/失败
43 45
   promptInfo: string; //操作结果提示信息
44 46
   promptModalShow: boolean; //是否展示提示框
45 47
 
48
+  loading1:boolean = false;
49
+
46 50
   ngOnInit() {
47 51
     this.id = +this.route.snapshot.paramMap.get("id");
48 52
     this.checkTab(1);
49 53
   }
50 54
 
51
-  // 获取工单详情
52
-  getInfo() {
53
-    this.maskFlag = this.message.loading("正在加载中..", {
54
-      nzDuration: 0,
55
-    }).messageId;
55
+  // 获取详情
56
+  getInfo(isInit = false) {
57
+    if(isInit){
58
+      this.maskFlag = this.message.loading("正在加载中..", {
59
+        nzDuration: 0,
60
+      }).messageId;
61
+    }
56 62
     this.mainService
57
-      .getFetchData("simple/data", "workOrder", this.id)
63
+      .getFetchData("simple/data", "patientInspectLog", this.id)
58 64
       .subscribe((data) => {
59
-        this.message.remove(this.maskFlag);
60
-        this.maskFlag = false;
65
+        if(isInit){
66
+          this.message.remove(this.maskFlag);
67
+          this.maskFlag = false;
68
+        }
61 69
         this.orderInfo = data.data;
62 70
       });
63 71
   }
64 72
 
65
-  // 获取历史记录
66
-  workOrderRecord: any = [];
73
+  // 获取日志
74
+  logList: any = [];
67 75
   getWorkOrderRecord() {
68
-    this.maskFlag = this.message.loading("正在加载中..", {
69
-      nzDuration: 0,
70
-    }).messageId;
71
-    this.mainService.getWorkOrderRecord({ gdid: this.id }).subscribe((res) => {
72
-      this.message.remove(this.maskFlag);
73
-        this.maskFlag = false;
74
-      if (res.status == 200) {
75
-        this.workOrderRecord = res.data || [];
76
-      }
77
-    })
76
+    this.loading1 = true;
77
+    let postData = {
78
+      idx: 0,
79
+      sum: 9999,
80
+      patientInspectLogLog: {
81
+        pilId: this.id,
82
+      },
83
+    };
84
+    this.mainService
85
+      .getFetchDataList("simple/data", "patientInspectLogLog", postData)
86
+      .subscribe((data) => {
87
+        this.loading1 = false;
88
+        if (data.status == 200) {
89
+          this.logList = data.list || [];
90
+        }else{
91
+          this.message.error(data.msg || "请求数据失败");
92
+        }
93
+      });
94
+  }
95
+  // 获取检查项目
96
+  inspectList: any = [];
97
+  getInspectList() {
98
+    this.loading1 = true;
99
+    let postData = {
100
+      pilId: this.id,
101
+    };
102
+    this.mainService
103
+      .getPatientInspectList(postData)
104
+      .subscribe((data:any) => {
105
+        this.loading1 = false;
106
+        if (data.status == 200) {
107
+          this.inspectList = data.list || [];
108
+        }else{
109
+          this.message.error(data.msg || "请求数据失败");
110
+        }
111
+      });
112
+  }
113
+
114
+  // 获取工单
115
+  orderList: any = [];
116
+  getOrderList() {
117
+    this.loading1 = true;
118
+    let postData = {
119
+      idx: 0,
120
+      sum: 9999,
121
+      workOrder: {
122
+        pilId: this.id,
123
+        simpleQuery: true,
124
+      },
125
+    };
126
+    this.mainService
127
+      .getFetchDataList("data", "workOrder", postData)
128
+      .subscribe((data) => {
129
+        this.loading1 = false;
130
+        if (data.status == 200) {
131
+          this.orderList = data.list.map(v => ({...v, endDeptsName: v.endDepts ? v.endDepts.map(v => v.dept).toString() : ''}));
132
+        }else{
133
+          this.message.error(data.msg || "请求数据失败");
134
+        }
135
+      });
78 136
   }
79 137
   // 切换tab栏
80 138
   tabType: number = 1; //tab栏
81
-  checkTab(type) {
139
+  checkTab(type, isInit = false) {
82 140
     this.tabType = type;
83 141
     if(type == 1){
84
-      this.getInfo();
142
+      this.getInfo(isInit);
85 143
     }else if(type == 2){
86 144
       this.getWorkOrderRecord();
87 145
     }else if(type == 3){
88
-      this.getWorkOrderRecord();
146
+      this.getInspectList();
89 147
     }else if(type == 4){
90
-      this.getWorkOrderRecord();
148
+      this.getOrderList();
91 149
     }
92 150
   }
93 151
 
@@ -109,7 +167,6 @@ export class PatientInspectLogDetailComponent implements OnInit {
109 167
 
110 168
   // 查看
111 169
   detail(e, id) {
112
-    id = 2803260;
113 170
     e.stopPropagation();
114 171
     this.router.navigateByUrl(`/main/patientInspectLog/patientInspectLogDetail/${this.id}/orderDetail/${id}`);
115 172
   }

Plik diff jest za duży
+ 8 - 8
src/app/views/patient-inspect-log/patient-inspect-log.component.html