|
@@ -722,6 +722,34 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
722
|
722
|
"yyyy-MM-dd HH:mm:ss"
|
723
|
723
|
);
|
724
|
724
|
}
|
|
725
|
+ //是否需要医护陪同检查
|
|
726
|
+ let isAccompany = false;
|
|
727
|
+ if (this.patientMsg.careLevel && !isAccompany) {
|
|
728
|
+ //特级护理或一级护理
|
|
729
|
+ if (
|
|
730
|
+ this.patientMsg.careLevel.value === "0" ||
|
|
731
|
+ this.patientMsg.careLevel.value === "1"
|
|
732
|
+ ) {
|
|
733
|
+ isAccompany = true;
|
|
734
|
+ this.btnLoading = false;
|
|
735
|
+ this.btnLoading1 = false;
|
|
736
|
+ this.accompany(this.confirmPostData, this.confirmYuyue, "patient-yy");
|
|
737
|
+ return;
|
|
738
|
+ }
|
|
739
|
+ }
|
|
740
|
+ if (this.patientMsg.illnessState && !isAccompany) {
|
|
741
|
+ //病危或病重
|
|
742
|
+ if (
|
|
743
|
+ this.patientMsg.illnessState.value === "2" ||
|
|
744
|
+ this.patientMsg.illnessState.value === "3"
|
|
745
|
+ ) {
|
|
746
|
+ this.btnLoading = false;
|
|
747
|
+ this.btnLoading1 = false;
|
|
748
|
+ this.accompany(this.confirmPostData, this.confirmYuyue, "patient-yy");
|
|
749
|
+ return;
|
|
750
|
+ }
|
|
751
|
+ }
|
|
752
|
+ this.confirmPostData.workOrder.isAccompany = 0; //是否需要医护陪同检查
|
725
|
753
|
this.mainService
|
726
|
754
|
.postCustom(
|
727
|
755
|
"api",
|
|
@@ -963,9 +991,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
963
|
991
|
{ id: that.checkedShowMsg.end.end.list[0].id },
|
964
|
992
|
];
|
965
|
993
|
}
|
966
|
|
- // if (that.checkedShowMsg.status == 100013 || that.checkedShowMsg.status == 100012 || that.checkedShowMsg.status == 200) {
|
967
|
|
- // delete postData.workOrder['endDepts'];
|
968
|
|
- // }
|
969
|
994
|
let checkedArr = [];
|
970
|
995
|
let yy = false; //是否有预约时间
|
971
|
996
|
if (
|
|
@@ -998,8 +1023,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
998
|
1023
|
urgentReason: that.urgentReason,
|
999
|
1024
|
};
|
1000
|
1025
|
}
|
1001
|
|
- console.log(postData);
|
1002
|
|
- // return
|
1003
|
1026
|
if (
|
1004
|
1027
|
yy &&
|
1005
|
1028
|
that.checkedShowMsg.status == 200 &&
|
|
@@ -1028,6 +1051,34 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1028
|
1051
|
if (that.checkedShowMsg.status != 200) {
|
1029
|
1052
|
postData.workOrder["isRemand"] = this.isRemand ? 1 : 0;
|
1030
|
1053
|
}
|
|
1054
|
+ //是否需要医护陪同检查
|
|
1055
|
+ let isAccompany = false;
|
|
1056
|
+ if (this.patientMsg.careLevel && !isAccompany) {
|
|
1057
|
+ //特级护理或一级护理
|
|
1058
|
+ if (
|
|
1059
|
+ this.patientMsg.careLevel.value === "0" ||
|
|
1060
|
+ this.patientMsg.careLevel.value === "1"
|
|
1061
|
+ ) {
|
|
1062
|
+ isAccompany = true;
|
|
1063
|
+ this.btnLoading = false;
|
|
1064
|
+ this.btnLoading1 = false;
|
|
1065
|
+ this.accompany(postData, yuyue, "patient");
|
|
1066
|
+ return;
|
|
1067
|
+ }
|
|
1068
|
+ }
|
|
1069
|
+ if (this.patientMsg.illnessState && !isAccompany) {
|
|
1070
|
+ //病危或病重
|
|
1071
|
+ if (
|
|
1072
|
+ this.patientMsg.illnessState.value === "2" ||
|
|
1073
|
+ this.patientMsg.illnessState.value === "3"
|
|
1074
|
+ ) {
|
|
1075
|
+ this.btnLoading = false;
|
|
1076
|
+ this.btnLoading1 = false;
|
|
1077
|
+ this.accompany(postData, yuyue, "patient");
|
|
1078
|
+ return;
|
|
1079
|
+ }
|
|
1080
|
+ }
|
|
1081
|
+ postData.workOrder.isAccompany = 0; //是否需要医护陪同检查
|
1031
|
1082
|
that.mainService
|
1032
|
1083
|
.postCustom("api", yuyue ? "appointmentOrder" : "startOrder", postData)
|
1033
|
1084
|
.subscribe((data) => {
|
|
@@ -1045,7 +1096,169 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1045
|
1096
|
});
|
1046
|
1097
|
}
|
1047
|
1098
|
}
|
1048
|
|
-
|
|
1099
|
+ // 是否需要护士医生陪同模态框baba
|
|
1100
|
+ accompanyModal: boolean = false;
|
|
1101
|
+ accompanyLoading: boolean = false;
|
|
1102
|
+ cancenlLoading: boolean = false;
|
|
1103
|
+ accompanyPostData = null;
|
|
1104
|
+ accompanyYuyue;
|
|
1105
|
+ accompanyType = "";
|
|
1106
|
+ accompany(postData, yuyue, type) {
|
|
1107
|
+ this.accompanyModal = true;
|
|
1108
|
+ this.accompanyPostData = postData;
|
|
1109
|
+ this.accompanyYuyue = yuyue;
|
|
1110
|
+ this.accompanyType = type;
|
|
1111
|
+ }
|
|
1112
|
+ confirmAccompany() {
|
|
1113
|
+ this.accompanyPostData.workOrder.isAccompany = 1;
|
|
1114
|
+ this.accompanyLoading = true;
|
|
1115
|
+ if (this.accompanyType == "patient") {
|
|
1116
|
+ //患者列表直接建单
|
|
1117
|
+ this.mainService
|
|
1118
|
+ .postCustom(
|
|
1119
|
+ "api",
|
|
1120
|
+ this.accompanyYuyue ? "appointmentOrder" : "startOrder",
|
|
1121
|
+ this.accompanyPostData
|
|
1122
|
+ )
|
|
1123
|
+ .subscribe((data) => {
|
|
1124
|
+ this.hidePatientOrder();
|
|
1125
|
+ this.accompanyModal = false;
|
|
1126
|
+ this.accompanyLoading = false;
|
|
1127
|
+ if (data.status == 200) {
|
|
1128
|
+ this.showPromptModal("创建", true, "");
|
|
1129
|
+ this.goodsLis = [];
|
|
1130
|
+ this.getOrderList();
|
|
1131
|
+ this.getDeptTaskType();
|
|
1132
|
+ } else if (data.status == 100042) {
|
|
1133
|
+ this.showPromptModal("创建", true, data.msg);
|
|
1134
|
+ } else {
|
|
1135
|
+ this.showPromptModal("创建", false, data.msg);
|
|
1136
|
+ }
|
|
1137
|
+ });
|
|
1138
|
+ } else if (this.accompanyType == "patient-yy") {
|
|
1139
|
+ //患者列表预约建单
|
|
1140
|
+ this.mainService
|
|
1141
|
+ .postCustom(
|
|
1142
|
+ "api",
|
|
1143
|
+ this.accompanyYuyue ? "appointmentOrder" : "startOrder",
|
|
1144
|
+ this.accompanyPostData
|
|
1145
|
+ )
|
|
1146
|
+ .subscribe((data) => {
|
|
1147
|
+ this.btnLoading3 = false;
|
|
1148
|
+ this.accompanyModal = false;
|
|
1149
|
+ this.accompanyLoading = false;
|
|
1150
|
+ this.cancel();
|
|
1151
|
+ if (data.status == 200) {
|
|
1152
|
+ this.showPromptModal("创建", true, "");
|
|
1153
|
+ this.goodsLis = [];
|
|
1154
|
+ this.getOrderList();
|
|
1155
|
+ this.getDeptTaskType();
|
|
1156
|
+ } else {
|
|
1157
|
+ this.showPromptModal("创建", false, data.msg);
|
|
1158
|
+ }
|
|
1159
|
+ });
|
|
1160
|
+ } else if (this.accompanyType == "inspect") {
|
|
1161
|
+ this.mainService
|
|
1162
|
+ .postCustom(
|
|
1163
|
+ "api",
|
|
1164
|
+ this.accompanyYuyue ? "appointmentOrder" : "startOrder",
|
|
1165
|
+ this.accompanyPostData
|
|
1166
|
+ )
|
|
1167
|
+ .subscribe((data) => {
|
|
1168
|
+ this.hideInspectionOrder();
|
|
1169
|
+ this.accompanyModal = false;
|
|
1170
|
+ this.accompanyLoading = false;
|
|
1171
|
+ if (data.status == 200) {
|
|
1172
|
+ this.showPromptModal("创建", true, "");
|
|
1173
|
+ this.goodsLis = [];
|
|
1174
|
+ this.getOrderList();
|
|
1175
|
+ this.getDeptTaskType();
|
|
1176
|
+ } else if (data.status == 100042) {
|
|
1177
|
+ this.showPromptModal("创建", true, data.msg);
|
|
1178
|
+ this.goodsLis = [];
|
|
1179
|
+ this.getOrderList();
|
|
1180
|
+ this.getDeptTaskType();
|
|
1181
|
+ } else {
|
|
1182
|
+ this.showPromptModal("创建", false, data.msg);
|
|
1183
|
+ }
|
|
1184
|
+ });
|
|
1185
|
+ }
|
|
1186
|
+ }
|
|
1187
|
+ hideAccompanyModal() {
|
|
1188
|
+ this.accompanyPostData.workOrder.isAccompany = 0;
|
|
1189
|
+ this.cancenlLoading = true;
|
|
1190
|
+ if (this.accompanyType == "patient") {
|
|
1191
|
+ //患者列表直接建单
|
|
1192
|
+ this.mainService
|
|
1193
|
+ .postCustom(
|
|
1194
|
+ "api",
|
|
1195
|
+ this.accompanyYuyue ? "appointmentOrder" : "startOrder",
|
|
1196
|
+ this.accompanyPostData
|
|
1197
|
+ )
|
|
1198
|
+ .subscribe((data) => {
|
|
1199
|
+ this.hidePatientOrder();
|
|
1200
|
+ this.accompanyModal = false;
|
|
1201
|
+ this.cancenlLoading = false;
|
|
1202
|
+ if (data.status == 200) {
|
|
1203
|
+ this.showPromptModal("创建", true, "");
|
|
1204
|
+ this.goodsLis = [];
|
|
1205
|
+ this.getOrderList();
|
|
1206
|
+ this.getDeptTaskType();
|
|
1207
|
+ } else if (data.status == 100042) {
|
|
1208
|
+ this.showPromptModal("创建", true, data.msg);
|
|
1209
|
+ } else {
|
|
1210
|
+ this.showPromptModal("创建", false, data.msg);
|
|
1211
|
+ }
|
|
1212
|
+ });
|
|
1213
|
+ } else if (this.accompanyType == "patient-yy") {
|
|
1214
|
+ //患者列表预约建单
|
|
1215
|
+ this.mainService
|
|
1216
|
+ .postCustom(
|
|
1217
|
+ "api",
|
|
1218
|
+ this.accompanyYuyue ? "appointmentOrder" : "startOrder",
|
|
1219
|
+ this.accompanyPostData
|
|
1220
|
+ )
|
|
1221
|
+ .subscribe((data) => {
|
|
1222
|
+ this.btnLoading3 = false;
|
|
1223
|
+ this.accompanyModal = false;
|
|
1224
|
+ this.cancenlLoading = false;
|
|
1225
|
+ this.cancel();
|
|
1226
|
+ if (data.status == 200) {
|
|
1227
|
+ this.showPromptModal("创建", true, "");
|
|
1228
|
+ this.goodsLis = [];
|
|
1229
|
+ this.getOrderList();
|
|
1230
|
+ this.getDeptTaskType();
|
|
1231
|
+ } else {
|
|
1232
|
+ this.showPromptModal("创建", false, data.msg);
|
|
1233
|
+ }
|
|
1234
|
+ });
|
|
1235
|
+ } else if (this.accompanyType == "inspect") {
|
|
1236
|
+ this.mainService
|
|
1237
|
+ .postCustom(
|
|
1238
|
+ "api",
|
|
1239
|
+ this.accompanyYuyue ? "appointmentOrder" : "startOrder",
|
|
1240
|
+ this.accompanyPostData
|
|
1241
|
+ )
|
|
1242
|
+ .subscribe((data) => {
|
|
1243
|
+ this.hideInspectionOrder();
|
|
1244
|
+ this.accompanyModal = false;
|
|
1245
|
+ this.cancenlLoading = false;
|
|
1246
|
+ if (data.status == 200) {
|
|
1247
|
+ this.showPromptModal("创建", true, "");
|
|
1248
|
+ this.goodsLis = [];
|
|
1249
|
+ this.getOrderList();
|
|
1250
|
+ this.getDeptTaskType();
|
|
1251
|
+ } else if (data.status == 100042) {
|
|
1252
|
+ this.showPromptModal("创建", true, data.msg);
|
|
1253
|
+ this.goodsLis = [];
|
|
1254
|
+ this.getOrderList();
|
|
1255
|
+ this.getDeptTaskType();
|
|
1256
|
+ } else {
|
|
1257
|
+ this.showPromptModal("创建", false, data.msg);
|
|
1258
|
+ }
|
|
1259
|
+ });
|
|
1260
|
+ }
|
|
1261
|
+ }
|
1049
|
1262
|
// 切换患者送检检查项目
|
1050
|
1263
|
checkedShowMsg: any = {}; //患者送检检查项目对应展示信息
|
1051
|
1264
|
// checkedShowFlag: any;//切换到患者检查
|
|
@@ -1268,7 +1481,7 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1268
|
1481
|
.slice(0, 2); //[时,分]
|
1269
|
1482
|
let nTimeArr = nowTime[1]
|
1270
|
1483
|
.split(":")
|
1271
|
|
- .map((item):any => parseInt(item))
|
|
1484
|
+ .map((item): any => parseInt(item))
|
1272
|
1485
|
.slice(0, 2); //[时,分]
|
1273
|
1486
|
if (dTimeArr[0] !== nTimeArr[0]) {
|
1274
|
1487
|
//时,不相同
|
|
@@ -1461,8 +1674,35 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1461
|
1674
|
"yyyy-MM-dd HH:mm:ss"
|
1462
|
1675
|
);
|
1463
|
1676
|
}
|
1464
|
|
- console.log(postData);
|
1465
|
|
- // return
|
|
1677
|
+ console.log(this.inspectionInfo);
|
|
1678
|
+ //是否需要医护陪同检查
|
|
1679
|
+ let isAccompany = false;
|
|
1680
|
+ if (this.inspectionInfo.careLevel && !isAccompany) {
|
|
1681
|
+ //特级护理或一级护理
|
|
1682
|
+ if (
|
|
1683
|
+ this.inspectionInfo.careLevel.value === "0" ||
|
|
1684
|
+ this.inspectionInfo.careLevel.value === "1"
|
|
1685
|
+ ) {
|
|
1686
|
+ isAccompany = true;
|
|
1687
|
+ this.btnLoading = false;
|
|
1688
|
+ this.btnLoading2 = false;
|
|
1689
|
+ this.accompany(postData, yuyue, "inspect");
|
|
1690
|
+ return;
|
|
1691
|
+ }
|
|
1692
|
+ }
|
|
1693
|
+ if (this.inspectionInfo.illnessState && !isAccompany) {
|
|
1694
|
+ //病危或病重
|
|
1695
|
+ if (
|
|
1696
|
+ this.inspectionInfo.illnessState.value === "2" ||
|
|
1697
|
+ this.inspectionInfo.illnessState.value === "3"
|
|
1698
|
+ ) {
|
|
1699
|
+ this.btnLoading = false;
|
|
1700
|
+ this.btnLoading2 = false;
|
|
1701
|
+ this.accompany(postData, yuyue, "inspect");
|
|
1702
|
+ return;
|
|
1703
|
+ }
|
|
1704
|
+ }
|
|
1705
|
+ postData.workOrder.isAccompany = 0; //是否需要医护陪同检查
|
1466
|
1706
|
that.mainService
|
1467
|
1707
|
.postCustom("api", yuyue ? "appointmentOrder" : "startOrder", postData)
|
1468
|
1708
|
.subscribe((data) => {
|