瀏覽代碼

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

seimin 1 年之前
父節點
當前提交
2b60c317ff

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://192.168.4.240",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 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 638
                         nzSpan="8"
639 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 643
                       </div>
644 644
                       <div nz-col nzSpan="16" class="h100p">
645 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 160
     this.getCloseTimeFlag();
161 161
     this.currentDept = this.tool.getCurrentUserDept();
162 162
     console.log(this.currentDept, this.tabSearchCont);
163
+    this.currentDept.typeValue == 'surgery' && this.getSurgeryConfig();
163 164
     this.getSpecimenButton();
164 165
     //防抖
165 166
     this.searchTabInpSubject.pipe(debounceTime(500)).subscribe((v) => {
@@ -748,7 +749,6 @@ export class HushijiandanComponent implements OnInit {
748 749
     if(this.currentDept.typeValue != 'surgery'){
749 750
       return;
750 751
     }
751
-    let that = this;
752 752
     let postData = {
753 753
       idx: 0,
754 754
       sum: 1,
@@ -764,7 +764,7 @@ export class HushijiandanComponent implements OnInit {
764 764
       }
765 765
     }
766 766
     this.surgeryLoading = true;
767
-    that.mainService
767
+    this.mainService
768 768
       .getFetchDataList("simple/data", "surgery", postData)
769 769
       .subscribe((data) => {
770 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 804
   drugJpLoading = false;
777 805
   getJpDrugsWKOMsg() {
@@ -1498,19 +1526,15 @@ export class HushijiandanComponent implements OnInit {
1498 1526
   // 确认
1499 1527
   sLoading1 = false;
1500 1528
   confirmSendWard() {
1501
-    alert('暂无接口');
1502
-    return;
1503 1529
     console.log(this.sendWardItem);
1504 1530
     this.sLoading1 = true;
1505 1531
     this.mainService
1506
-      .createOrTakeOrder({
1532
+      .createRemandOrder({
1507 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 1539
       .subscribe((result:any) => {
1516 1540
         this.sLoading1 = false;
@@ -1541,19 +1565,15 @@ export class HushijiandanComponent implements OnInit {
1541 1565
   // 确认
1542 1566
   sLoading2 = false;
1543 1567
   confirmSendAwakeningRoom() {
1544
-    alert('暂无接口');
1545
-    return;
1546 1568
     console.log(this.sendAwakeningRoomItem);
1547 1569
     this.sLoading2 = true;
1548 1570
     this.mainService
1549
-      .createOrTakeOrder({
1571
+      .createRemandOrder({
1550 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 1578
       .subscribe((result:any) => {
1559 1579
         this.sLoading2 = false;

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

@@ -12,7 +12,7 @@
12 12
       <!-- 特性配置 -->
13 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 16
           <nz-form-label class="label" nzRequired>接手术关联任务类型</nz-form-label>
17 17
           <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
18 18
             (nzOnSearch)="changeTasktype($event)" nzPlaceHolder="请选择接手术关联任务类型" [(ngModel)]="tasktypeId">
@@ -24,6 +24,32 @@
24 24
             </nz-option>
25 25
           </nz-select>
26 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 53
       </div>
28 54
       <!-- 自动建单配置 -->
29 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 24
   autoCreateOrders:any[] = [
25 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 36
   autoTime:Date | null = null;
37
+  tasktype1Id:any;
38
+  tasktype2Id:any;
29 39
   // 配置
30 40
   configs:any = {};
31 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 85
   submitForm() {
58 86
     if(!this.tasktypeId){
@@ -63,12 +91,24 @@ export class OperationConfigComponent implements OnInit {
63 91
       this.msg.create("warning", "请选择建单时间!");
64 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 102
     let editData:any = {
67 103
       hosId: this.hosId,
68
-      autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
69 104
       taskType: this.tasktypeId || undefined,
105
+      ordinaryField: this.surgeryField,
106
+      autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
70 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 113
     let postData = Object.assign({}, this.configs, editData);
74 114
     console.log(postData);
@@ -149,6 +189,10 @@ export class OperationConfigComponent implements OnInit {
149 189
                 this.tasktypeId = this.configs.taskTypeDTO ? this.configs.taskTypeDTO.id : null;
150 190
                 this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
151 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 198
         }else{