소스 검색

护士端手术清洁

seimin 1 년 전
부모
커밋
89ae234949

+ 3 - 0
src/app/share/dialog-delete/dialog-delete.component.html

@@ -6,6 +6,9 @@
6 6
       <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
7 7
       <div class="defeat" [innerHTML]="content | htmlTransform"></div>
8 8
       <div class="tips red" *ngIf="tips">({{tips}})</div>
9
+      <div *ngIf="isChecked">
10
+        <label nz-checkbox [(ngModel)]="isRemandClean" [ngModelOptions]="{ standalone: true }">是否同步建立手术清洁任务工单</label>
11
+      </div>
9 12
     </div>
10 13
     <div class="operate">
11 14
       <button nz-button nzType="primary" (click)="confirmDel()" [nzLoading]="btnLoading">{{confirmTxt}}</button>

+ 4 - 1
src/app/share/dialog-delete/dialog-delete.component.ts

@@ -16,8 +16,11 @@ export class DialogDeleteComponent implements OnInit {
16 16
   @Input() tips: string = "";
17 17
   @Input() confirmTxt: string = "确定";
18 18
   @Input() cancelTxt: string = "取消";
19
+  @Input() isChecked: boolean = false;
19 20
   constructor() {}
20 21
 
22
+  isRemandClean:boolean = true;
23
+
21 24
   ngOnInit() {}
22 25
   // 隐藏
23 26
   hideDelModal(e: string) {
@@ -25,7 +28,7 @@ export class DialogDeleteComponent implements OnInit {
25 28
   }
26 29
   // 确认删除
27 30
   confirmDel() {
28
-    this.confirmDelEvent.emit();
31
+    this.confirmDelEvent.emit(this.isChecked ? this.isRemandClean : false);
29 32
   }
30 33
   cancel(type: string) {
31 34
     if (type == "cancel") {

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

@@ -3700,8 +3700,8 @@
3700 3700
 
3701 3701
 <!-- 手术中患者-送回病房 -->
3702 3702
 <app-dialog-delete [delModal]="sendWardModal" (hideDelModalEvent)="hideSendWardModal()" [btnLoading]="sLoading1"
3703
-(confirmDelEvent)="confirmSendWard()" [content]="sendWardInfo"></app-dialog-delete>
3703
+(confirmDelEvent)="confirmSendWard($event)" [content]="sendWardInfo" [isChecked]="true"></app-dialog-delete>
3704 3704
 
3705 3705
 <!-- 手术中患者-送回苏醒区 -->
3706 3706
 <app-dialog-delete [delModal]="sendAwakeningRoomModal" (hideDelModalEvent)="hideSendAwakeningRoomModal()" [btnLoading]="sLoading2"
3707
-(confirmDelEvent)="confirmSendAwakeningRoom()" [content]="sendAwakeningRoomInfo"></app-dialog-delete>
3707
+(confirmDelEvent)="confirmSendAwakeningRoom($event)" [content]="sendAwakeningRoomInfo" [isChecked]="true"></app-dialog-delete>

+ 8 - 6
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1525,7 +1525,7 @@ export class HushijiandanComponent implements OnInit {
1525 1525
   }
1526 1526
   // 确认
1527 1527
   sLoading1 = false;
1528
-  confirmSendWard() {
1528
+  confirmSendWard(isRemandClean) {
1529 1529
     console.log(this.sendWardItem);
1530 1530
     this.sLoading1 = true;
1531 1531
     this.mainService
@@ -1534,7 +1534,8 @@ export class HushijiandanComponent implements OnInit {
1534 1534
         surgeryId: this.sendWardItem.id,
1535 1535
         orderId: this.sendWardItem.gdid,
1536 1536
         configId: this.surgeryConfigs.id,
1537
-        remandType: 'clinical'
1537
+        remandType: 'clinical',
1538
+        remandClean: isRemandClean ? 1 : 0,
1538 1539
       })
1539 1540
       .subscribe((result:any) => {
1540 1541
         this.sLoading1 = false;
@@ -1554,7 +1555,7 @@ export class HushijiandanComponent implements OnInit {
1554 1555
     e.stopPropagation();
1555 1556
     this.sendWardModal = true;
1556 1557
     this.sendWardItem = item;
1557
-    this.sendWardInfo = `您确认送回病房吗?`
1558
+    this.sendWardInfo = `您是否确认将<span style="color:red;">${item.patientDTO ? item.patientDTO.patientName : ''}</span>患者送往<span style="color:red;">${item.areaDeptDTO ? (this.deptDisplay == 2 ? item.areaDeptDTO.deptalias : item.areaDeptDTO.dept) : ''}</span>科室吗?`
1558 1559
   }
1559 1560
   sendAwakeningRoomModal: boolean = false; //模态框
1560 1561
   sendAwakeningRoomInfo:string = '';
@@ -1564,7 +1565,7 @@ export class HushijiandanComponent implements OnInit {
1564 1565
   }
1565 1566
   // 确认
1566 1567
   sLoading2 = false;
1567
-  confirmSendAwakeningRoom() {
1568
+  confirmSendAwakeningRoom(isRemandClean) {
1568 1569
     console.log(this.sendAwakeningRoomItem);
1569 1570
     this.sLoading2 = true;
1570 1571
     this.mainService
@@ -1573,7 +1574,8 @@ export class HushijiandanComponent implements OnInit {
1573 1574
         surgeryId: this.sendAwakeningRoomItem.id,
1574 1575
         orderId: this.sendAwakeningRoomItem.gdid,
1575 1576
         configId: this.surgeryConfigs.id,
1576
-        remandType: 'recovery'
1577
+        remandType: 'recovery',
1578
+        remandClean: isRemandClean ? 1 : 0,
1577 1579
       })
1578 1580
       .subscribe((result:any) => {
1579 1581
         this.sLoading2 = false;
@@ -1593,7 +1595,7 @@ export class HushijiandanComponent implements OnInit {
1593 1595
     e.stopPropagation();
1594 1596
     this.sendAwakeningRoomModal = true;
1595 1597
     this.sendAwakeningRoomItem = item;
1596
-    this.sendAwakeningRoomInfo = `您确认送回苏醒区吗?`
1598
+    this.sendAwakeningRoomInfo = `您是否确定将<span style="color:red;">${item.patientDTO ? item.patientDTO.patientName : ''}</span>患者送往<span style="color:red;">${this.surgeryConfigs.recoveryDeptDTO ? (this.deptDisplay == 2 ? this.surgeryConfigs.recoveryDeptDTO.deptalias : this.surgeryConfigs.recoveryDeptDTO.dept) : ''}</span>科室吗?`
1597 1599
   }
1598 1600
 
1599 1601
   // 患者信息一键建单

+ 32 - 6
src/app/views/operation-config/operation-config.component.html

@@ -15,8 +15,8 @@
15 15
         <div class="display_flex align-items_center mb8">
16 16
           <nz-form-label class="label" nzRequired>接手术关联任务类型</nz-form-label>
17 17
           <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
18
-            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择接手术关联任务类型" [(ngModel)]="tasktypeId">
19
-            <ng-container *ngFor="let option of taskTypes">
18
+            (nzOnSearch)="changeTasktype($event, 1)" nzPlaceHolder="请选择接手术关联任务类型" [(ngModel)]="tasktypeId">
19
+            <ng-container *ngFor="let option of taskTypes1">
20 20
               <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
21 21
             </ng-container>
22 22
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
@@ -24,12 +24,25 @@
24 24
             </nz-option>
25 25
           </nz-select>
26 26
         </div>
27
+        <!-- 苏醒室科室 -->
28
+        <div class="display_flex align-items_center mb8">
29
+          <nz-form-label class="label" nzRequired>苏醒室科室</nz-form-label>
30
+          <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
31
+            (nzOnSearch)="changeRecoveryDepts($event)" nzPlaceHolder="请选择接苏醒室科室" [(ngModel)]="recoveryDeptId">
32
+            <ng-container *ngFor="let option of recoveryDepts">
33
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
34
+            </ng-container>
35
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
36
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
37
+            </nz-option>
38
+          </nz-select>
39
+        </div>
27 40
         <div class="display_flex align-items_center mb8">
28 41
           <nz-form-label class="label">是否开通送回病房</nz-form-label>
29 42
           <nz-checkbox-group [(ngModel)]="autoSendWard" (ngModelChange)="changeAutoSendWard($event)"></nz-checkbox-group>
30 43
           <nz-select *ngIf="autoSendWard[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
31
-            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择送回病房任务类型" [(ngModel)]="tasktype1Id">
32
-            <ng-container *ngFor="let option of taskTypes">
44
+            (nzOnSearch)="changeTasktype($event, 1)" nzPlaceHolder="请选择送回病房任务类型" [(ngModel)]="tasktype1Id">
45
+            <ng-container *ngFor="let option of taskTypes1">
33 46
               <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
34 47
             </ng-container>
35 48
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
@@ -41,8 +54,21 @@
41 54
           <nz-form-label class="label">是否开通送回苏醒室</nz-form-label>
42 55
           <nz-checkbox-group [(ngModel)]="autoSendAwakeningRoom" (ngModelChange)="changeAutoSendAwakeningRoom($event)"></nz-checkbox-group>
43 56
           <nz-select *ngIf="autoSendAwakeningRoom[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
44
-            (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择送回苏醒室任务类型" [(ngModel)]="tasktype2Id">
45
-            <ng-container *ngFor="let option of taskTypes">
57
+            (nzOnSearch)="changeTasktype($event, 1)" nzPlaceHolder="请选择送回苏醒室任务类型" [(ngModel)]="tasktype2Id">
58
+            <ng-container *ngFor="let option of taskTypes1">
59
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
60
+            </ng-container>
61
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
62
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
63
+            </nz-option>
64
+          </nz-select>
65
+        </div>
66
+        <div class="display_flex align-items_center mb8">
67
+          <nz-form-label class="label">是否开通关联手术清洁建单</nz-form-label>
68
+          <nz-checkbox-group [(ngModel)]="autoRemandClean" (ngModelChange)="changeAutoRemandClean($event)"></nz-checkbox-group>
69
+          <nz-select *ngIf="autoRemandClean[0].checked" class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
70
+            (nzOnSearch)="changeTasktype($event, 2)" nzPlaceHolder="请选择送回苏醒室任务类型" [(ngModel)]="cleanTypeId">
71
+            <ng-container *ngFor="let option of taskTypes2">
46 72
               <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
47 73
             </ng-container>
48 74
             <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 98 - 17
src/app/views/operation-config/operation-config.component.ts

@@ -19,7 +19,11 @@ export class OperationConfigComponent implements OnInit {
19 19
   hosId = this.tool.getCurrentHospital().id; //当前院区
20 20
   // 接手术关联任务类型
21 21
   tasktypeId:any;
22
-  taskTypes:any[] = [];
22
+  taskTypes1:any[] = [];
23
+  taskTypes2:any[] = [];
24
+  // 苏醒室科室
25
+  recoveryDeptId:any;
26
+  recoveryDepts:any[] = [];
23 27
   // 自动建单
24 28
   autoCreateOrders:any[] = [
25 29
     {label:'是否开启',value: 0}
@@ -32,10 +36,15 @@ export class OperationConfigComponent implements OnInit {
32 36
   autoSendAwakeningRoom:any[] = [
33 37
     {label:'是否开启',value: 0}
34 38
   ];
39
+  // 是否开通关联手术清洁建单
40
+  autoRemandClean:any[] = [
41
+    {label:'是否开启',value: 0}
42
+  ];
35 43
   // 建单时间
36 44
   autoTime:Date | null = null;
37 45
   tasktype1Id:any;
38 46
   tasktype2Id:any;
47
+  cleanTypeId:any;
39 48
   // 配置
40 49
   configs:any = {};
41 50
   searchTimerSubject = new Subject();
@@ -45,9 +54,10 @@ export class OperationConfigComponent implements OnInit {
45 54
     // todo
46 55
     this.searchTimerSubject.pipe(debounceTime(500)).subscribe((v) => {
47 56
       let fun = v[0];
48
-      fun.call(this, v[1]);
57
+      fun.call(this, v[1], v[2], v[3]);
49 58
     });
50
-    this.getTaskTypes('', true);
59
+    this.getTaskTypes('', true, 1);
60
+    this.getTaskTypes('', false, 2);
51 61
   }
52 62
 
53 63
   // 切换tab
@@ -72,7 +82,7 @@ export class OperationConfigComponent implements OnInit {
72 82
     }
73 83
   }
74 84
 
75
-  // 修改是否是否开通送回苏醒室
85
+  // 修改是否开通送回苏醒室
76 86
   changeAutoSendAwakeningRoom(e){
77 87
     console.log(e);
78 88
     if(!e[0].checked){
@@ -81,12 +91,25 @@ export class OperationConfigComponent implements OnInit {
81 91
     }
82 92
   }
83 93
 
94
+  // 修改是否开通关联手术清洁建单
95
+  changeAutoRemandClean(e){
96
+    console.log(e);
97
+    if(!e[0].checked){
98
+      // todo
99
+      this.cleanTypeId = null;
100
+    }
101
+  }
102
+
84 103
   // 保存
85 104
   submitForm() {
86 105
     if(!this.tasktypeId){
87 106
       this.msg.create("warning", "请选择接手术关联任务类型!");
88 107
       return;
89 108
     }
109
+    if(!this.recoveryDeptId){
110
+      this.msg.create("warning", "请选择苏醒室科室!");
111
+      return;
112
+    }
90 113
     if(this.autoCreateOrders[0].checked && !this.autoTime){
91 114
       this.msg.create("warning", "请选择建单时间!");
92 115
       return;
@@ -99,9 +122,14 @@ export class OperationConfigComponent implements OnInit {
99 122
       this.msg.create("warning", "请选择送回苏醒室任务类型!");
100 123
       return;
101 124
     }
125
+    if(this.autoRemandClean[0].checked && !this.cleanTypeId){
126
+      this.msg.create("warning", "请选择手术清洁任务类型!");
127
+      return;
128
+    }
102 129
     let editData:any = {
103 130
       hosId: this.hosId,
104 131
       taskType: this.tasktypeId || undefined,
132
+      recoveryDeptId: this.recoveryDeptId || undefined,
105 133
       ordinaryField: this.surgeryField,
106 134
       autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
107 135
       createTime: this.autoTime ? format(startOfMinute(this.autoTime), "yyyy-MM-dd HH:mm:ss") : undefined,
@@ -109,6 +137,8 @@ export class OperationConfigComponent implements OnInit {
109 137
       clinicalTypeId: this.tasktype1Id || undefined,
110 138
       remandRecovery: this.autoSendAwakeningRoom[0].checked ? 1 : 0,
111 139
       recoveryTypeId: this.tasktype2Id || undefined,
140
+      remandClean: this.autoRemandClean[0].checked ? 1 : 0,
141
+      cleanTypeId: this.cleanTypeId || undefined,
112 142
     };
113 143
     let postData = Object.assign({}, this.configs, editData);
114 144
     console.log(postData);
@@ -125,41 +155,83 @@ export class OperationConfigComponent implements OnInit {
125 155
 
126 156
   // 用户输入搜索任务类型
127 157
   isLoading: boolean = false;
128
-  changeTasktype(e) {
129
-    this.searchTimer(this.getTaskTypes, e);
158
+  changeTasktype(e, type) {
159
+    this.searchTimer(this.getTaskTypes, e, false, type);
160
+  }
161
+
162
+  changeRecoveryDepts(e) {
163
+    this.searchTimer(this.getRecoveryDepts, e, false);
130 164
   }
131 165
 
132 166
   // 边输入边搜索节流阀
133
-  searchTimer(fun, e) {
167
+  searchTimer(fun, e, isFirst, type?) {
134 168
     this.isLoading = true;
135
-    this.searchTimerSubject.next([fun, e]);
169
+    this.searchTimerSubject.next([fun, e, isFirst, type]);
136 170
   }
137 171
 
138 172
   //获取接手术关联任务类型
139
-  getTaskTypes(e:string = '', isFirst:boolean = false) {
140
-    this.loading = true;
141
-    let postData = {
173
+  // 1 患者其他服务
174
+  // 2 其他临床服务
175
+  getTaskTypes(e:string = '', isFirst:boolean = false, type:number = 1) {
176
+    isFirst && (this.loading = true);
177
+    let postData:any = {
142 178
       idx: 0,
143
-      sum: 1000,
179
+      sum: 9999,
144 180
       taskType: {
145 181
         taskName: e,
146 182
         simpleQuery: true,
147 183
         hosId: {
148 184
           id: this.hosId
149
-        },
150
-        associationType: {
151
-          key: 'association_types',
152
-          value: 'patientTransport'
153 185
         }
154 186
       }
155 187
     };
188
+    if(type === 1){
189
+      postData.taskType.associationType = {
190
+        key: 'association_types',
191
+        value: 'patientTransport'
192
+      }
193
+    }else if(type === 2){
194
+      postData.taskType.associationType = {
195
+        key: 'association_types',
196
+        value: 'other'
197
+      }
198
+    }
156 199
     this.isLoading = true;
157 200
     this.mainService
158 201
       .getFetchDataList("simple/data", "taskType", postData)
159 202
       .subscribe((result) => {
160 203
         this.isLoading = false;
161 204
         if (result.status == 200) {
162
-          this.taskTypes = result.list || [];
205
+          if(type === 1){
206
+            this.taskTypes1 = result.list || [];
207
+          }else if(type === 2){
208
+            this.taskTypes2 = result.list || [];
209
+          }
210
+          isFirst && this.getRecoveryDepts('', true);
211
+        }
212
+      });
213
+  }
214
+
215
+  //获取所有科室
216
+  getRecoveryDepts(e:string = '', isFirst:boolean = false) {
217
+    isFirst && (this.loading = true);
218
+    let postData = {
219
+      idx: 0,
220
+      sum: 10,
221
+      department: {
222
+        dept: e,
223
+        hospital: {
224
+          id: this.hosId
225
+        },
226
+      }
227
+    };
228
+    this.isLoading = true;
229
+    this.mainService
230
+      .getFetchDataList("data", "department", postData)
231
+      .subscribe((result) => {
232
+        this.isLoading = false;
233
+        if (result.status == 200) {
234
+          this.recoveryDepts = result.list || [];
163 235
           isFirst && this.getConfig();
164 236
         }
165 237
       });
@@ -187,12 +259,21 @@ export class OperationConfigComponent implements OnInit {
187 259
               if (result.status == 200) {
188 260
                 this.configs = result.list[0] || {};
189 261
                 this.tasktypeId = this.configs.taskTypeDTO ? this.configs.taskTypeDTO.id : null;
262
+                this.recoveryDeptId = this.configs.recoveryDeptId || null;
263
+                if(this.recoveryDeptId && this.configs.recoveryDeptDTO){
264
+                  let isInRecoveryDepts = this.recoveryDepts.some(v => v.id == this.recoveryDeptId);
265
+                  if(!isInRecoveryDepts){
266
+                    this.recoveryDepts.unshift(this.configs.recoveryDeptDTO);
267
+                  }
268
+                }
190 269
                 this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
191 270
                 this.autoTime = this.configs.createTime ? new Date(this.configs.createTime) : null;
192 271
                 this.autoSendWard[0].checked = this.configs.remandClinical == 1;
193 272
                 this.tasktype1Id = this.configs.clinicalTypeId || null;
194 273
                 this.autoSendAwakeningRoom[0].checked = this.configs.remandRecovery == 1;
195 274
                 this.tasktype2Id = this.configs.recoveryTypeId || null;
275
+                this.autoRemandClean[0].checked = this.configs.remandClean == 1;
276
+                this.cleanTypeId = this.configs.cleanTypeId || null;
196 277
               }
197 278
             });
198 279
         }else{