Sfoglia il codice sorgente

手术送回病房和送回急救间

seimin 2 anni fa
parent
commit
2b60c317ff

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1
 {
1
 {
2
   "/service": {
2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://192.168.4.240",
4
     "logLevel": "debug",
4
     "logLevel": "debug",
5
     "changeOrigin": true,
5
     "changeOrigin": true,
6
     "pathRewrite": {
6
     "pathRewrite": {

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

@@ -684,4 +684,14 @@ export class MainService {
684
       }
684
       }
685
     );
685
     );
686
   }
686
   }
687
+  //手动创建手术工单-送回病房
688
+  createRemandOrder(data) {
689
+    return this.http.post(
690
+      host.host + "/transflow/createRemandOrder",
691
+      data,
692
+      {
693
+        headers: this.headers,
694
+      }
695
+    );
696
+  }
687
 }
697
 }

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

@@ -638,8 +638,8 @@
638
                         nzSpan="8"
638
                         nzSpan="8"
639
                         class="borderR alignC display_flex justify-content_flex-center align-items_center h100p"
639
                         class="borderR alignC display_flex justify-content_flex-center align-items_center h100p"
640
                       >
640
                       >
641
-                        <button *ngIf="surgeryWKOMsg.patientDTO" [nzLoading]="sLoading1" nz-button nzType="primary" class="btn txtC mr8" (click)="sendWard($event, surgeryWKOMsg)">送回病房</button>
642
-                        <button *ngIf="surgeryWKOMsg.patientDTO" [nzLoading]="sLoading2" nz-button nzType="primary" class="btn txtC" (click)="sendAwakeningRoom($event, surgeryWKOMsg)">送回苏醒间</button>
641
+                        <button *ngIf="surgeryWKOMsg.patientDTO && surgeryConfigs && surgeryConfigs.remandClinical == 1" nz-button nzType="primary" class="btn txtC mr8" (click)="sendWard($event, surgeryWKOMsg)">送回病房</button>
642
+                        <button *ngIf="surgeryWKOMsg.patientDTO && surgeryConfigs && surgeryConfigs.remandRecovery == 1" nz-button nzType="primary" class="btn txtC" (click)="sendAwakeningRoom($event, surgeryWKOMsg)">送回苏醒间</button>
643
                       </div>
643
                       </div>
644
                       <div nz-col nzSpan="16" class="h100p">
644
                       <div nz-col nzSpan="16" class="h100p">
645
                         <div class="txtC h50p borderB">
645
                         <div class="txtC h50p borderB">

+ 40 - 20
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -160,6 +160,7 @@ export class HushijiandanComponent implements OnInit {
160
     this.getCloseTimeFlag();
160
     this.getCloseTimeFlag();
161
     this.currentDept = this.tool.getCurrentUserDept();
161
     this.currentDept = this.tool.getCurrentUserDept();
162
     console.log(this.currentDept, this.tabSearchCont);
162
     console.log(this.currentDept, this.tabSearchCont);
163
+    this.currentDept.typeValue == 'surgery' && this.getSurgeryConfig();
163
     this.getSpecimenButton();
164
     this.getSpecimenButton();
164
     //防抖
165
     //防抖
165
     this.searchTabInpSubject.pipe(debounceTime(500)).subscribe((v) => {
166
     this.searchTabInpSubject.pipe(debounceTime(500)).subscribe((v) => {
@@ -748,7 +749,6 @@ export class HushijiandanComponent implements OnInit {
748
     if(this.currentDept.typeValue != 'surgery'){
749
     if(this.currentDept.typeValue != 'surgery'){
749
       return;
750
       return;
750
     }
751
     }
751
-    let that = this;
752
     let postData = {
752
     let postData = {
753
       idx: 0,
753
       idx: 0,
754
       sum: 1,
754
       sum: 1,
@@ -764,7 +764,7 @@ export class HushijiandanComponent implements OnInit {
764
       }
764
       }
765
     }
765
     }
766
     this.surgeryLoading = true;
766
     this.surgeryLoading = true;
767
-    that.mainService
767
+    this.mainService
768
       .getFetchDataList("simple/data", "surgery", postData)
768
       .getFetchDataList("simple/data", "surgery", postData)
769
       .subscribe((data) => {
769
       .subscribe((data) => {
770
         this.surgeryLoading = false;
770
         this.surgeryLoading = false;
@@ -772,6 +772,34 @@ export class HushijiandanComponent implements OnInit {
772
       });
772
       });
773
   }
773
   }
774
 
774
 
775
+  // 获取手术配置信息
776
+  surgeryField = null; //手术关联业务
777
+  surgeryConfigs:any = {};
778
+  getSurgeryConfig() {
779
+    this.mainService
780
+      .getDictionary("list", "ordinary_field")
781
+      .subscribe((data) => {
782
+        this.surgeryField = data.find(v => v.value == 'surgery');
783
+        if(this.surgeryField){
784
+          let postData = {
785
+            idx: 0,
786
+            sum: 10,
787
+            taskTypeConfig: {
788
+              hosId: this.currentHospital.id,
789
+              ordinaryField: this.surgeryField
790
+            }
791
+          };
792
+          this.mainService
793
+            .getFetchDataList("simple/data", "taskTypeConfig", postData)
794
+            .subscribe((result) => {
795
+              if (result.status == 200) {
796
+                this.surgeryConfigs = result.list[0] || {};
797
+              }
798
+            });
799
+        }
800
+      });
801
+  }
802
+
775
   // 药品静配提示信息
803
   // 药品静配提示信息
776
   drugJpLoading = false;
804
   drugJpLoading = false;
777
   getJpDrugsWKOMsg() {
805
   getJpDrugsWKOMsg() {
@@ -1498,19 +1526,15 @@ export class HushijiandanComponent implements OnInit {
1498
   // 确认
1526
   // 确认
1499
   sLoading1 = false;
1527
   sLoading1 = false;
1500
   confirmSendWard() {
1528
   confirmSendWard() {
1501
-    alert('暂无接口');
1502
-    return;
1503
     console.log(this.sendWardItem);
1529
     console.log(this.sendWardItem);
1504
     this.sLoading1 = true;
1530
     this.sLoading1 = true;
1505
     this.mainService
1531
     this.mainService
1506
-      .createOrTakeOrder({
1532
+      .createRemandOrder({
1507
         type: 'surgery',
1533
         type: 'surgery',
1508
-        id: this.sendWardItem.id,
1509
-        workOrder: {
1510
-          sourceld: 2,
1511
-          createDept: this.loginUser.dept.id,
1512
-          platform: 2
1513
-        }
1534
+        surgeryId: this.sendWardItem.id,
1535
+        orderId: this.sendWardItem.gdid,
1536
+        configId: this.surgeryConfigs.id,
1537
+        remandType: 'clinical'
1514
       })
1538
       })
1515
       .subscribe((result:any) => {
1539
       .subscribe((result:any) => {
1516
         this.sLoading1 = false;
1540
         this.sLoading1 = false;
@@ -1541,19 +1565,15 @@ export class HushijiandanComponent implements OnInit {
1541
   // 确认
1565
   // 确认
1542
   sLoading2 = false;
1566
   sLoading2 = false;
1543
   confirmSendAwakeningRoom() {
1567
   confirmSendAwakeningRoom() {
1544
-    alert('暂无接口');
1545
-    return;
1546
     console.log(this.sendAwakeningRoomItem);
1568
     console.log(this.sendAwakeningRoomItem);
1547
     this.sLoading2 = true;
1569
     this.sLoading2 = true;
1548
     this.mainService
1570
     this.mainService
1549
-      .createOrTakeOrder({
1571
+      .createRemandOrder({
1550
         type: 'surgery',
1572
         type: 'surgery',
1551
-        id: this.sendAwakeningRoomItem.id,
1552
-        workOrder: {
1553
-          sourceld: 2,
1554
-          createDept: this.loginUser.dept.id,
1555
-          platform: 2
1556
-        }
1573
+        surgeryId: this.sendAwakeningRoomItem.id,
1574
+        orderId: this.sendAwakeningRoomItem.gdid,
1575
+        configId: this.surgeryConfigs.id,
1576
+        remandType: 'recovery'
1557
       })
1577
       })
1558
       .subscribe((result:any) => {
1578
       .subscribe((result:any) => {
1559
         this.sLoading2 = false;
1579
         this.sLoading2 = false;

+ 27 - 1
src/app/views/operation-config/operation-config.component.html

@@ -12,7 +12,7 @@
12
       <!-- 特性配置 -->
12
       <!-- 特性配置 -->
13
       <div *ngIf="tabModalName=='characteristics'">
13
       <div *ngIf="tabModalName=='characteristics'">
14
         <!-- 接手术关联任务类型 -->
14
         <!-- 接手术关联任务类型 -->
15
-        <div class="display_flex align-items_center">
15
+        <div class="display_flex align-items_center mb8">
16
           <nz-form-label class="label" nzRequired>接手术关联任务类型</nz-form-label>
16
           <nz-form-label class="label" nzRequired>接手术关联任务类型</nz-form-label>
17
           <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
17
           <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
18
             (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择接手术关联任务类型" [(ngModel)]="tasktypeId">
18
             (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择接手术关联任务类型" [(ngModel)]="tasktypeId">
@@ -24,6 +24,32 @@
24
             </nz-option>
24
             </nz-option>
25
           </nz-select>
25
           </nz-select>
26
         </div>
26
         </div>
27
+        <div class="display_flex align-items_center mb8">
28
+          <nz-form-label class="label">是否开通送回病房</nz-form-label>
29
+          <nz-checkbox-group [(ngModel)]="autoSendWard" (ngModelChange)="changeAutoSendWard($event)"></nz-checkbox-group>
30
+          <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">
33
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [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>
40
+        <div class="display_flex align-items_center mb8">
41
+          <nz-form-label class="label">是否开通送回苏醒室</nz-form-label>
42
+          <nz-checkbox-group [(ngModel)]="autoSendAwakeningRoom" (ngModelChange)="changeAutoSendAwakeningRoom($event)"></nz-checkbox-group>
43
+          <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">
46
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
47
+            </ng-container>
48
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
49
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
50
+            </nz-option>
51
+          </nz-select>
52
+        </div>
27
       </div>
53
       </div>
28
       <!-- 自动建单配置 -->
54
       <!-- 自动建单配置 -->
29
       <div *ngIf="tabModalName=='automaticOrderCreation'">
55
       <div *ngIf="tabModalName=='automaticOrderCreation'">

+ 46 - 2
src/app/views/operation-config/operation-config.component.ts

@@ -24,8 +24,18 @@ export class OperationConfigComponent implements OnInit {
24
   autoCreateOrders:any[] = [
24
   autoCreateOrders:any[] = [
25
     {label:'是否开启',value: 0}
25
     {label:'是否开启',value: 0}
26
   ];
26
   ];
27
+  // 是否开通送回病房
28
+  autoSendWard:any[] = [
29
+    {label:'是否开启',value: 0}
30
+  ];
31
+  // 是否开通送回苏醒室
32
+  autoSendAwakeningRoom:any[] = [
33
+    {label:'是否开启',value: 0}
34
+  ];
27
   // 建单时间
35
   // 建单时间
28
   autoTime:Date | null = null;
36
   autoTime:Date | null = null;
37
+  tasktype1Id:any;
38
+  tasktype2Id:any;
29
   // 配置
39
   // 配置
30
   configs:any = {};
40
   configs:any = {};
31
   searchTimerSubject = new Subject();
41
   searchTimerSubject = new Subject();
@@ -53,6 +63,24 @@ export class OperationConfigComponent implements OnInit {
53
     }
63
     }
54
   }
64
   }
55
 
65
 
66
+  // 修改是否开通送回病房
67
+  changeAutoSendWard(e){
68
+    console.log(e);
69
+    if(!e[0].checked){
70
+      // todo
71
+      this.tasktype1Id = null;
72
+    }
73
+  }
74
+
75
+  // 修改是否是否开通送回苏醒室
76
+  changeAutoSendAwakeningRoom(e){
77
+    console.log(e);
78
+    if(!e[0].checked){
79
+      // todo
80
+      this.tasktype2Id = null;
81
+    }
82
+  }
83
+
56
   // 保存
84
   // 保存
57
   submitForm() {
85
   submitForm() {
58
     if(!this.tasktypeId){
86
     if(!this.tasktypeId){
@@ -63,12 +91,24 @@ export class OperationConfigComponent implements OnInit {
63
       this.msg.create("warning", "请选择建单时间!");
91
       this.msg.create("warning", "请选择建单时间!");
64
       return;
92
       return;
65
     }
93
     }
94
+    if(this.autoSendWard[0].checked && !this.tasktype1Id){
95
+      this.msg.create("warning", "请选择送回病房任务类型!");
96
+      return;
97
+    }
98
+    if(this.autoSendAwakeningRoom[0].checked && !this.tasktype2Id){
99
+      this.msg.create("warning", "请选择送回苏醒室任务类型!");
100
+      return;
101
+    }
66
     let editData:any = {
102
     let editData:any = {
67
       hosId: this.hosId,
103
       hosId: this.hosId,
68
-      autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
69
       taskType: this.tasktypeId || undefined,
104
       taskType: this.tasktypeId || undefined,
105
+      ordinaryField: this.surgeryField,
106
+      autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
70
       createTime: this.autoTime ? format(startOfMinute(this.autoTime), "yyyy-MM-dd HH:mm:ss") : undefined,
107
       createTime: this.autoTime ? format(startOfMinute(this.autoTime), "yyyy-MM-dd HH:mm:ss") : undefined,
71
-      ordinaryField: this.surgeryField
108
+      remandClinical: this.autoSendWard[0].checked ? 1 : 0,
109
+      clinicalTypeId: this.tasktype1Id || undefined,
110
+      remandRecovery: this.autoSendAwakeningRoom[0].checked ? 1 : 0,
111
+      recoveryTypeId: this.tasktype2Id || undefined,
72
     };
112
     };
73
     let postData = Object.assign({}, this.configs, editData);
113
     let postData = Object.assign({}, this.configs, editData);
74
     console.log(postData);
114
     console.log(postData);
@@ -149,6 +189,10 @@ export class OperationConfigComponent implements OnInit {
149
                 this.tasktypeId = this.configs.taskTypeDTO ? this.configs.taskTypeDTO.id : null;
189
                 this.tasktypeId = this.configs.taskTypeDTO ? this.configs.taskTypeDTO.id : null;
150
                 this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
190
                 this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
151
                 this.autoTime = this.configs.createTime ? new Date(this.configs.createTime) : null;
191
                 this.autoTime = this.configs.createTime ? new Date(this.configs.createTime) : null;
192
+                this.autoSendWard[0].checked = this.configs.remandClinical == 1;
193
+                this.tasktype1Id = this.configs.clinicalTypeId || null;
194
+                this.autoSendAwakeningRoom[0].checked = this.configs.remandRecovery == 1;
195
+                this.tasktype2Id = this.configs.recoveryTypeId || null;
152
               }
196
               }
153
             });
197
             });
154
         }else{
198
         }else{