Parcourir la source

护士端加接口

seimin il y a 1 an
Parent
commit
482126d15e
2 fichiers modifiés avec 208 ajouts et 145 suppressions
  1. 1 1
      proxy.conf.json
  2. 207 144
      src/app/views/hushijiandan/hushijiandan.component.ts

+ 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": {

+ 207 - 144
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1443,7 +1443,15 @@ export class HushijiandanComponent implements OnInit {
1443 1443
     }
1444 1444
     this.btnLoading3 = true;
1445 1445
     this.confirmPostData.workOrder.isAccompany = 0; //是否需要医护陪同检查
1446
-    this.mainService
1446
+    if(this.currentDept.typeValue == 'recovery'){
1447
+      this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.confirmPostData.workOrder.patient.patientCode}).subscribe((data) => {
1448
+        confirmFun();
1449
+      });
1450
+    }else{
1451
+      confirmFun();
1452
+    }
1453
+    function confirmFun(){
1454
+      this.mainService
1447 1455
       .postCustom(
1448 1456
         "api",
1449 1457
         this.confirmYuyue ? "appointmentOrder" : "startOrder",
@@ -1473,6 +1481,7 @@ export class HushijiandanComponent implements OnInit {
1473 1481
           this.showPromptModal("创建", false, data.msg);
1474 1482
         }
1475 1483
       });
1484
+    }
1476 1485
   }
1477 1486
   cancel() {
1478 1487
     this.confirmSub = false;
@@ -1971,29 +1980,38 @@ export class HushijiandanComponent implements OnInit {
1971 1980
         }
1972 1981
       }
1973 1982
       postData.workOrder.isAccompany = 0; //是否需要医护陪同检查
1974
-      that.mainService
1975
-        .postCustom("api", yuyue ? "appointmentOrder" : "startOrder", postData)
1976
-        .subscribe((data) => {
1977
-          that.hidePatientOrder();
1978
-          if (data.status == 200) {
1979
-            that.showPromptModal("创建", true, "");
1980
-            that.goodsLis = [];
1981
-            that.getOrderList();
1982
-            that.getDeptTaskType();
1983
-            that.getTodayNum();
1984
-          } else if (data.status == 100042) {
1985
-            that.showPromptModal("创建", false, data.msg);
1986
-            this.getPatient(this.tabSearchCont);
1987
-          } else if (data.status == 1000033) {
1988
-            //重复建单那策略
1989
-            this.repeatMsg = data.msg;
1990
-            this.showDelModal(postData, "transport", yuyue);
1991
-          } else {
1992
-            that.showPromptModal("创建", false, data.msg);
1993
-          }
1983
+      if(this.currentDept.typeValue == 'recovery'){
1984
+        this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: postData.workOrder.patient.patientCode}).subscribe((data) => {
1985
+          this.confirmPatientFun(yuyue, postData);
1994 1986
         });
1987
+      }else{
1988
+        this.confirmPatientFun(yuyue, postData);
1989
+      }
1995 1990
     }
1996 1991
   }
1992
+  confirmPatientFun(yuyue, postData){
1993
+    this.mainService
1994
+    .postCustom("api", yuyue ? "appointmentOrder" : "startOrder", postData)
1995
+    .subscribe((data) => {
1996
+      this.hidePatientOrder();
1997
+      if (data.status == 200) {
1998
+        this.showPromptModal("创建", true, "");
1999
+        this.goodsLis = [];
2000
+        this.getOrderList();
2001
+        this.getDeptTaskType();
2002
+        this.getTodayNum();
2003
+      } else if (data.status == 100042) {
2004
+        this.showPromptModal("创建", false, data.msg);
2005
+        this.getPatient(this.tabSearchCont);
2006
+      } else if (data.status == 1000033) {
2007
+        //重复建单那策略
2008
+        this.repeatMsg = data.msg;
2009
+        this.showDelModal(postData, "transport", yuyue);
2010
+      } else {
2011
+        this.showPromptModal("创建", false, data.msg);
2012
+      }
2013
+    });
2014
+  }
1997 2015
   // 是否需要护士医生陪同模态框
1998 2016
   accompanyModal: boolean = false;
1999 2017
   accompanyLoading: boolean = false;
@@ -2012,73 +2030,91 @@ export class HushijiandanComponent implements OnInit {
2012 2030
     this.accompanyLoading = true;
2013 2031
     if (this.accompanyType == "patient") {
2014 2032
       //患者列表直接建单
2015
-      this.mainService
2016
-        .postCustom(
2017
-          "api",
2018
-          this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2019
-          this.accompanyPostData
2020
-        )
2021
-        .subscribe((data) => {
2022
-          this.hidePatientOrder();
2023
-          this.accompanyModal = false;
2024
-          this.accompanyLoading = false;
2025
-          if (data.status == 200) {
2026
-            this.showPromptModal("创建", true, "");
2027
-            this.goodsLis = [];
2028
-            this.getOrderList();
2029
-            this.getDeptTaskType();
2030
-            this.getTodayNum();
2031
-          } else if (data.status == 100042) {
2032
-            this.showPromptModal("创建", false, data.msg);
2033
-            this.getPatient(this.tabSearchCont);
2034
-          } else if (data.status == 1000033) {
2035
-            //重复建单那策略
2036
-            this.repeatMsg = data.msg;
2037
-            this.showDelModal(
2038
-              this.accompanyPostData,
2039
-              "accompany1",
2040
-              this.accompanyYuyue
2041
-            );
2042
-          } else {
2043
-            this.showPromptModal("创建", false, data.msg);
2044
-          }
2033
+      if(this.currentDept.typeValue == 'recovery'){
2034
+        this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((data) => {
2035
+          this.confirmAccompanyFun();
2045 2036
         });
2037
+      }else{
2038
+        this.confirmAccompanyFun();
2039
+      }
2046 2040
     } else if (this.accompanyType == "patient-yy") {
2047 2041
       //患者列表预约建单
2048
-      this.mainService
2049
-        .postCustom(
2050
-          "api",
2051
-          this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2052
-          this.accompanyPostData
2053
-        )
2054
-        .subscribe((data) => {
2055
-          this.btnLoading3 = false;
2056
-          this.accompanyModal = false;
2057
-          this.accompanyLoading = false;
2058
-          this.cancel();
2059
-          if (data.status == 200) {
2060
-            this.showPromptModal("创建", true, "");
2061
-            this.goodsLis = [];
2062
-            this.getOrderList();
2063
-            this.getDeptTaskType();
2064
-            this.getTodayNum();
2065
-          } else if (data.status == 100042) {
2066
-            this.showPromptModal("创建", false, data.msg);
2067
-            this.getPatient(this.tabSearchCont);
2068
-          } else if (data.status == 1000033) {
2069
-            //重复建单那策略
2070
-            this.repeatMsg = data.msg;
2071
-            this.showDelModal(
2072
-              this.accompanyPostData,
2073
-              "accompany2",
2074
-              this.accompanyYuyue
2075
-            );
2076
-          } else {
2077
-            this.showPromptModal("创建", false, data.msg);
2078
-          }
2042
+      if(this.currentDept.typeValue == 'recovery'){
2043
+        this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((data) => {
2044
+          this.confirmAccompanyYYFun();
2079 2045
         });
2046
+      }else{
2047
+        this.confirmAccompanyYYFun();
2048
+      }
2080 2049
     }
2081 2050
   }
2051
+  confirmAccompanyFun(){
2052
+    this.mainService
2053
+    .postCustom(
2054
+      "api",
2055
+      this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2056
+      this.accompanyPostData
2057
+    )
2058
+    .subscribe((data) => {
2059
+      this.hidePatientOrder();
2060
+      this.accompanyModal = false;
2061
+      this.accompanyLoading = false;
2062
+      if (data.status == 200) {
2063
+        this.showPromptModal("创建", true, "");
2064
+        this.goodsLis = [];
2065
+        this.getOrderList();
2066
+        this.getDeptTaskType();
2067
+        this.getTodayNum();
2068
+      } else if (data.status == 100042) {
2069
+        this.showPromptModal("创建", false, data.msg);
2070
+        this.getPatient(this.tabSearchCont);
2071
+      } else if (data.status == 1000033) {
2072
+        //重复建单那策略
2073
+        this.repeatMsg = data.msg;
2074
+        this.showDelModal(
2075
+          this.accompanyPostData,
2076
+          "accompany1",
2077
+          this.accompanyYuyue
2078
+        );
2079
+      } else {
2080
+        this.showPromptModal("创建", false, data.msg);
2081
+      }
2082
+    });
2083
+  }
2084
+  confirmAccompanyYYFun(){
2085
+    this.mainService
2086
+    .postCustom(
2087
+      "api",
2088
+      this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2089
+      this.accompanyPostData
2090
+    )
2091
+    .subscribe((data) => {
2092
+      this.btnLoading3 = false;
2093
+      this.accompanyModal = false;
2094
+      this.accompanyLoading = false;
2095
+      this.cancel();
2096
+      if (data.status == 200) {
2097
+        this.showPromptModal("创建", true, "");
2098
+        this.goodsLis = [];
2099
+        this.getOrderList();
2100
+        this.getDeptTaskType();
2101
+        this.getTodayNum();
2102
+      } else if (data.status == 100042) {
2103
+        this.showPromptModal("创建", false, data.msg);
2104
+        this.getPatient(this.tabSearchCont);
2105
+      } else if (data.status == 1000033) {
2106
+        //重复建单那策略
2107
+        this.repeatMsg = data.msg;
2108
+        this.showDelModal(
2109
+          this.accompanyPostData,
2110
+          "accompany2",
2111
+          this.accompanyYuyue
2112
+        );
2113
+      } else {
2114
+        this.showPromptModal("创建", false, data.msg);
2115
+      }
2116
+    });
2117
+  }
2082 2118
   hideAccompanyModal(e) {
2083 2119
     console.log(e);
2084 2120
     if (e === "x") {
@@ -2090,73 +2126,91 @@ export class HushijiandanComponent implements OnInit {
2090 2126
     this.cancenlLoading = true;
2091 2127
     if (this.accompanyType == "patient") {
2092 2128
       //患者列表直接建单
2093
-      this.mainService
2094
-        .postCustom(
2095
-          "api",
2096
-          this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2097
-          this.accompanyPostData
2098
-        )
2099
-        .subscribe((data) => {
2100
-          this.hidePatientOrder();
2101
-          this.accompanyModal = false;
2102
-          this.cancenlLoading = false;
2103
-          if (data.status == 200) {
2104
-            this.showPromptModal("创建", true, "");
2105
-            this.goodsLis = [];
2106
-            this.getOrderList();
2107
-            this.getDeptTaskType();
2108
-            this.getTodayNum();
2109
-          } else if (data.status == 100042) {
2110
-            this.showPromptModal("创建", false, data.msg);
2111
-            this.getPatient(this.tabSearchCont);
2112
-          } else if (data.status == 1000033) {
2113
-            //重复建单那策略
2114
-            this.repeatMsg = data.msg;
2115
-            this.showDelModal(
2116
-              this.accompanyPostData,
2117
-              "accompany3",
2118
-              this.accompanyYuyue
2119
-            );
2120
-          } else {
2121
-            this.showPromptModal("创建", false, data.msg);
2122
-          }
2129
+      if(this.currentDept.typeValue == 'recovery'){
2130
+        this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((data) => {
2131
+          this.hideAccompanyModalFun();
2123 2132
         });
2133
+      }else{
2134
+        this.hideAccompanyModalFun();
2135
+      }
2124 2136
     } else if (this.accompanyType == "patient-yy") {
2125 2137
       //患者列表预约建单
2126
-      this.mainService
2127
-        .postCustom(
2128
-          "api",
2129
-          this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2130
-          this.accompanyPostData
2131
-        )
2132
-        .subscribe((data) => {
2133
-          this.btnLoading3 = false;
2134
-          this.accompanyModal = false;
2135
-          this.cancenlLoading = false;
2136
-          this.cancel();
2137
-          if (data.status == 200) {
2138
-            this.showPromptModal("创建", true, "");
2139
-            this.goodsLis = [];
2140
-            this.getOrderList();
2141
-            this.getDeptTaskType();
2142
-            this.getTodayNum();
2143
-          } else if (data.status == 100042) {
2144
-            this.showPromptModal("创建", false, data.msg);
2145
-            this.getPatient(this.tabSearchCont);
2146
-          } else if (data.status == 1000033) {
2147
-            //重复建单那策略
2148
-            this.repeatMsg = data.msg;
2149
-            this.showDelModal(
2150
-              this.accompanyPostData,
2151
-              "accompany4",
2152
-              this.accompanyYuyue
2153
-            );
2154
-          } else {
2155
-            this.showPromptModal("创建", false, data.msg);
2156
-          }
2138
+      if(this.currentDept.typeValue == 'recovery'){
2139
+        this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.accompanyPostData.workOrder.patient.patientCode}).subscribe((data) => {
2140
+          this.hideAccompanyModalYYFun();
2157 2141
         });
2142
+      }else{
2143
+        this.hideAccompanyModalYYFun();
2144
+      }
2158 2145
     }
2159 2146
   }
2147
+  hideAccompanyModalFun(){
2148
+    this.mainService
2149
+    .postCustom(
2150
+      "api",
2151
+      this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2152
+      this.accompanyPostData
2153
+    )
2154
+    .subscribe((data) => {
2155
+      this.hidePatientOrder();
2156
+      this.accompanyModal = false;
2157
+      this.cancenlLoading = false;
2158
+      if (data.status == 200) {
2159
+        this.showPromptModal("创建", true, "");
2160
+        this.goodsLis = [];
2161
+        this.getOrderList();
2162
+        this.getDeptTaskType();
2163
+        this.getTodayNum();
2164
+      } else if (data.status == 100042) {
2165
+        this.showPromptModal("创建", false, data.msg);
2166
+        this.getPatient(this.tabSearchCont);
2167
+      } else if (data.status == 1000033) {
2168
+        //重复建单那策略
2169
+        this.repeatMsg = data.msg;
2170
+        this.showDelModal(
2171
+          this.accompanyPostData,
2172
+          "accompany3",
2173
+          this.accompanyYuyue
2174
+        );
2175
+      } else {
2176
+        this.showPromptModal("创建", false, data.msg);
2177
+      }
2178
+    });
2179
+  }
2180
+  hideAccompanyModalYYFun(){
2181
+    this.mainService
2182
+    .postCustom(
2183
+      "api",
2184
+      this.accompanyYuyue ? "appointmentOrder" : "startOrder",
2185
+      this.accompanyPostData
2186
+    )
2187
+    .subscribe((data) => {
2188
+      this.btnLoading3 = false;
2189
+      this.accompanyModal = false;
2190
+      this.cancenlLoading = false;
2191
+      this.cancel();
2192
+      if (data.status == 200) {
2193
+        this.showPromptModal("创建", true, "");
2194
+        this.goodsLis = [];
2195
+        this.getOrderList();
2196
+        this.getDeptTaskType();
2197
+        this.getTodayNum();
2198
+      } else if (data.status == 100042) {
2199
+        this.showPromptModal("创建", false, data.msg);
2200
+        this.getPatient(this.tabSearchCont);
2201
+      } else if (data.status == 1000033) {
2202
+        //重复建单那策略
2203
+        this.repeatMsg = data.msg;
2204
+        this.showDelModal(
2205
+          this.accompanyPostData,
2206
+          "accompany4",
2207
+          this.accompanyYuyue
2208
+        );
2209
+      } else {
2210
+        this.showPromptModal("创建", false, data.msg);
2211
+      }
2212
+    });
2213
+  }
2160 2214
   // 切换患者送检检查项目
2161 2215
   checkedShowMsg: any = {}; //患者送检检查项目对应展示信息
2162 2216
   current_allowUrgent = false; //当前任务类型是否允许加急
@@ -2757,7 +2811,15 @@ export class HushijiandanComponent implements OnInit {
2757 2811
   confirmRepeat() {
2758 2812
     this.loadingRepeat = true;
2759 2813
     this.repeatPostData.tipsCreateOder = 1;
2760
-    this.mainService
2814
+    if(this.currentDept.typeValue == 'recovery'){
2815
+      this.mainService.postCustom("api", "clearPatientRecoveryDept", {patientCode: this.repeatPostData.workOrder.patient.patientCode}).subscribe((data) => {
2816
+        confirmRepeatFun();
2817
+      });
2818
+    }else{
2819
+      confirmRepeatFun();
2820
+    }
2821
+    function confirmRepeatFun(){
2822
+      this.mainService
2761 2823
       .postCustom(
2762 2824
         "api",
2763 2825
         this.isYuyue ? "appointmentOrder" : "startOrder",
@@ -2882,6 +2944,7 @@ export class HushijiandanComponent implements OnInit {
2882 2944
           }
2883 2945
         }
2884 2946
       });
2947
+    }
2885 2948
   }
2886 2949
   // =======================end=================================
2887 2950