|
@@ -137,6 +137,7 @@ export class FuwutaiComponent implements OnInit {
|
137
|
137
|
workTypesFlag = false; //任务类型是否显示操作项
|
138
|
138
|
currentTabIndex = ""; //获取任务类型的key
|
139
|
139
|
radioValueZy: any = ""; //转运->类型
|
|
140
|
+ radioValueZyPre: any = ""; //转运->类型
|
140
|
141
|
deptZyList: any = {}; //转运->请求结果
|
141
|
142
|
startDeptZy = ""; //转运->选中起点科室
|
142
|
143
|
endDeptZy = ""; //转运->选中终点科室
|
|
@@ -154,6 +155,7 @@ export class FuwutaiComponent implements OnInit {
|
154
|
155
|
applyDept; //申请科室
|
155
|
156
|
applyDeptMiddle; //申请科室(中间传递)
|
156
|
157
|
taskBuild; //任务类型选择
|
|
158
|
+ residenceNo; //住院号
|
157
|
159
|
targetDept; //目标科室
|
158
|
160
|
noArrives = []; //未到达列表
|
159
|
161
|
newLoading = false; //loading
|
|
@@ -382,8 +384,8 @@ export class FuwutaiComponent implements OnInit {
|
382
|
384
|
this.validateFormZy.controls[i].markAsDirty();
|
383
|
385
|
this.validateFormZy.controls[i].updateValueAndValidity();
|
384
|
386
|
if (this.validateFormZy.controls[i].valid === false && i !== "goods") {
|
385
|
|
- //携带物品非必填ca
|
386
|
|
- // if (this.validateFormZy.controls[i].valid === false && i !== 'goods' && i !== 'patient') {//携带物品非必填
|
|
387
|
+ //携带设备非必填
|
|
388
|
+ // if (this.validateFormZy.controls[i].valid === false && i !== 'goods' && i !== 'patient') {//携带设备非必填
|
387
|
389
|
newOrderShowFlag = false;
|
388
|
390
|
}
|
389
|
391
|
if (!this.validateFormZy.controls[i].valid) {
|
|
@@ -456,10 +458,97 @@ export class FuwutaiComponent implements OnInit {
|
456
|
458
|
});
|
457
|
459
|
}
|
458
|
460
|
}
|
|
461
|
+ // 患者陪检表单提交
|
|
462
|
+ submitFormInspect(go?): void {
|
|
463
|
+ let newOrderShowFlag = true; //是否可以关闭弹窗
|
|
464
|
+ for (const i in this.validateFormZy.controls) {
|
|
465
|
+ this.validateFormZy.controls[i].markAsDirty();
|
|
466
|
+ this.validateFormZy.controls[i].updateValueAndValidity();
|
|
467
|
+ if (this.validateFormZy.controls[i].valid === false && i !== "goods") {
|
|
468
|
+ //携带设备非必填
|
|
469
|
+ // if (this.validateFormZy.controls[i].valid === false && i !== 'goods' && i !== 'patient') {//携带设备非必填
|
|
470
|
+ newOrderShowFlag = false;
|
|
471
|
+ }
|
|
472
|
+ if (!this.validateFormZy.controls[i].valid) {
|
|
473
|
+ this.isOkLoading = false;
|
|
474
|
+ this.isGoLoading = false;
|
|
475
|
+ }
|
|
476
|
+ }
|
|
477
|
+ if (newOrderShowFlag) {
|
|
478
|
+ let goods = this.validateFormZy.controls.goods.value ? this.validateFormZy.controls.goods.value.filter((item) => item.checked === true) : [];
|
|
479
|
+ goods = goods.map((current) => current.value).join();
|
|
480
|
+
|
|
481
|
+ // 预约日期
|
|
482
|
+ let yyTime1;
|
|
483
|
+ if(this.isYyInspect && this.currentTabIndex == '患者转运'){
|
|
484
|
+ let yyDateZy = (typeof this.yyDateZy === 'object') ? new Date(this.yyDateZy) : parse(this.yyDateZy, 'yyyy-MM-dd HH:mm:ss', new Date());
|
|
485
|
+ let yyTimeZy = (typeof this.yyTimeZy === 'object') ? new Date(this.yyTimeZy) : parse(this.yyTimeZy, 'yyyy-MM-dd HH:mm:ss', new Date());
|
|
486
|
+ yyTime1 = format(yyDateZy, "yyyy-MM-dd") + " " + format(yyTimeZy, "HH:mm") + ":00";
|
|
487
|
+ }
|
|
488
|
+
|
|
489
|
+ let postData: any = {
|
|
490
|
+ workOrder: {
|
|
491
|
+ yyTime: yyTime1,
|
|
492
|
+ sourceId: SourceId.fuwutai,
|
|
493
|
+ taskType: { id: this.validateFormZy.controls.taskType.value },
|
|
494
|
+ startDept: { id: this.deptZyList.data.startDept },
|
|
495
|
+ endDepts: [{ id: this.deptZyList.data.endDept }],
|
|
496
|
+ createDept: this.applyDept,
|
|
497
|
+ patient: {
|
|
498
|
+ patientCode: this.validateFormZy.controls.patient.value,
|
|
499
|
+ },
|
|
500
|
+ goods,
|
|
501
|
+ workOrderRemark: this.validateFormZy.controls.workOrderRemarkZy.value,
|
|
502
|
+ },
|
|
503
|
+ };
|
|
504
|
+ postData.workOrder.taskType.isHalfInspect = this.currentTasktype.isHalfInspect === 1 ? 1 : 0; //半程陪检
|
|
505
|
+
|
|
506
|
+ let checkedArr = [];
|
|
507
|
+ if (this.linkCheckLis && this.linkCheckLis.length) {
|
|
508
|
+ this.linkCheckLis.forEach((e) => {
|
|
509
|
+ if (e.checked) {
|
|
510
|
+ checkedArr.push({ id: e.value });
|
|
511
|
+ }
|
|
512
|
+ });
|
|
513
|
+ }
|
|
514
|
+
|
|
515
|
+ postData.workOrder["checkList"] = checkedArr;
|
|
516
|
+ postData.workOrder.isAccompany = 0; //是否需要医护陪同检查
|
|
517
|
+
|
|
518
|
+ if (!this.noWorkerPhone) {
|
|
519
|
+ postData.workOrder["workOrderPhone"] = this.callNumber;
|
|
520
|
+ }
|
|
521
|
+ this.mainService.buildOrder(postData).subscribe((data) => {
|
|
522
|
+ console.log(data);
|
|
523
|
+ this.isOkLoading = false;
|
|
524
|
+ this.isGoLoading = false;
|
|
525
|
+ if (data["status"] == 200) {
|
|
526
|
+ this.newOrderShow = false; //关闭弹窗
|
|
527
|
+ if (go === "&go&") {
|
|
528
|
+ this.applyDept = data["startDept"].id;
|
|
529
|
+ this.applyStartDept = data["startDept"];
|
|
530
|
+ this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data["phone"];
|
|
531
|
+ this.showPromptModal("建单", true, "", "closeGo");
|
|
532
|
+ } else {
|
|
533
|
+ if(this.incomingService.getSign() === 'callCenter' && this.incomingService.getPhoneNumber()){
|
|
534
|
+ this.jry_shixian();
|
|
535
|
+ }
|
|
536
|
+ this.showPromptModal("建单", true, "", "close");
|
|
537
|
+ }
|
|
538
|
+ } else if(data["status"] == 100042){
|
|
539
|
+ this.newOrderShow = false; //关闭弹窗
|
|
540
|
+ this.showPromptModal("建单", false, data["msg"]);
|
|
541
|
+ } else {
|
|
542
|
+ this.showPromptModal("建单", false, data["msg"]);
|
|
543
|
+ }
|
|
544
|
+ });
|
|
545
|
+ }
|
|
546
|
+ }
|
459
|
547
|
// 标本配送表单提交
|
460
|
548
|
submitFormBbps(go?) {
|
461
|
549
|
let postData = {
|
462
|
550
|
workOrder: {
|
|
551
|
+ workOrderRemark: this.validateFormQt.controls.workOrderRemark.value,
|
463
|
552
|
sourceId: SourceId.fuwutai,
|
464
|
553
|
taskType: {
|
465
|
554
|
id: this.validateFormQt.controls.taskTypeQt.value,
|
|
@@ -729,6 +818,8 @@ export class FuwutaiComponent implements OnInit {
|
729
|
818
|
this.searchApplicationGroup(v[1]);
|
730
|
819
|
}else if(v[0] === 'user'){
|
731
|
820
|
this.searchApplicationUser(v[1]);
|
|
821
|
+ }else if(v[0] === 'patient'){
|
|
822
|
+ this.getPatientByResidenceNo(v[1]);
|
732
|
823
|
}
|
733
|
824
|
});
|
734
|
825
|
this.onSearchTaskBuildSubject.pipe(debounceTime(500)).subscribe((v) => {
|
|
@@ -746,11 +837,12 @@ export class FuwutaiComponent implements OnInit {
|
746
|
837
|
//患者转运
|
747
|
838
|
this.validateFormZy = this.fb.group({
|
748
|
839
|
taskType: [null, [Validators.required]], //类型
|
|
840
|
+ linkCheck: [null, []],
|
749
|
841
|
startDept: [null, [Validators.required]], //起点科室
|
750
|
842
|
endDepts: [null, [Validators.required]], //终点科室
|
751
|
843
|
patient: [null, [Validators.required]], //患者信息
|
752
|
844
|
// patient: [null],//患者信息ca
|
753
|
|
- goods: [null], //携带物品
|
|
845
|
+ goods: [null], //携带设备
|
754
|
846
|
workOrderRemarkZy: [null], //工单备注
|
755
|
847
|
});
|
756
|
848
|
//其他
|
|
@@ -796,6 +888,17 @@ export class FuwutaiComponent implements OnInit {
|
796
|
888
|
document.addEventListener("keydown", this.quickShowNewOrder.bind(this));
|
797
|
889
|
}
|
798
|
890
|
|
|
891
|
+ requiredConfigChange(form: string, name: string, required: boolean): void {
|
|
892
|
+ if (!required) {
|
|
893
|
+ this[form].get(name)!.clearValidators();
|
|
894
|
+ this[form].get(name)!.markAsPristine();
|
|
895
|
+ } else {
|
|
896
|
+ this[form].get(name)!.setValidators(Validators.required);
|
|
897
|
+ this[form].get(name)!.markAsDirty();
|
|
898
|
+ }
|
|
899
|
+ this[form].get(name)!.updateValueAndValidity();
|
|
900
|
+ }
|
|
901
|
+
|
799
|
902
|
// 初始化呼叫中心方法
|
800
|
903
|
initCallCenter(){
|
801
|
904
|
let _this = this;
|
|
@@ -2425,6 +2528,7 @@ export class FuwutaiComponent implements OnInit {
|
2425
|
2528
|
isInit && this.incidentModel.area && this.searchApplicationFloor();
|
2426
|
2529
|
if(!this.hsmsData.hsmsSwitch){
|
2427
|
2530
|
this.taskBuild = null;
|
|
2531
|
+ this.residenceNo = null;
|
2428
|
2532
|
this.newOrderShow = true;
|
2429
|
2533
|
this.newOrderShowOpen = true;
|
2430
|
2534
|
this.fixedTab = "newOrder";
|
|
@@ -2467,6 +2571,7 @@ export class FuwutaiComponent implements OnInit {
|
2467
|
2571
|
}
|
2468
|
2572
|
|
2469
|
2573
|
this.taskBuild = null;
|
|
2574
|
+ this.residenceNo = null;
|
2470
|
2575
|
this.newOrderShow = true;
|
2471
|
2576
|
this.newOrderShowOpen = true;
|
2472
|
2577
|
this.fixedTab = "newOrder";
|
|
@@ -2546,6 +2651,7 @@ export class FuwutaiComponent implements OnInit {
|
2546
|
2651
|
this.startDeptQt = null;
|
2547
|
2652
|
this.endDeptQt = null;
|
2548
|
2653
|
this.radioValueZy = null;
|
|
2654
|
+ this.radioValueZyPre = null;
|
2549
|
2655
|
this.startDeptZy = null;
|
2550
|
2656
|
this.endDeptZy = null;
|
2551
|
2657
|
this.patientZy = null;
|
|
@@ -2613,6 +2719,36 @@ export class FuwutaiComponent implements OnInit {
|
2613
|
2719
|
});
|
2614
|
2720
|
}
|
2615
|
2721
|
|
|
2722
|
+ // 根据住院号获取患者信息
|
|
2723
|
+ getPatientByResidenceNo(residenceNo) {
|
|
2724
|
+ let postData = {
|
|
2725
|
+ residenceNo,
|
|
2726
|
+ hosId: this.checkedHos,
|
|
2727
|
+ idx: 0,
|
|
2728
|
+ sum: 2,
|
|
2729
|
+ };
|
|
2730
|
+ this.mainService.listMsgByMain('listPatient',postData).subscribe((result) => {
|
|
2731
|
+ if (result["status"] == 200) {
|
|
2732
|
+ let patientList = result["list"];
|
|
2733
|
+ if (patientList.length) {
|
|
2734
|
+ patientList = patientList.filter((item) => !!item.bedNum);
|
|
2735
|
+ }
|
|
2736
|
+ if(patientList.length === 1){
|
|
2737
|
+ let patient = patientList[0];
|
|
2738
|
+ patient.bednum = patient.bedNum;
|
|
2739
|
+ patient.patientname = patient.patientName;
|
|
2740
|
+ patient.department && (this.applicationDepartmentList = [patient.department]);
|
|
2741
|
+ patient.department && (this.applyDept = patient.department.id);
|
|
2742
|
+ patient.department && this.tabClick('患者转运');
|
|
2743
|
+ patient.department && (this.patientList = [patient]);
|
|
2744
|
+ patient.department && (this.patientZy = patient.patientCode);
|
|
2745
|
+ }else{
|
|
2746
|
+ this.msg.warning('未查询到患者');
|
|
2747
|
+ }
|
|
2748
|
+ }
|
|
2749
|
+ });
|
|
2750
|
+ }
|
|
2751
|
+
|
2616
|
2752
|
// tab任务类型向左移动
|
2617
|
2753
|
toLeft() {
|
2618
|
2754
|
let maxStep = this.workTypesArrange.length - 5;
|
|
@@ -3273,7 +3409,7 @@ export class FuwutaiComponent implements OnInit {
|
3273
|
3409
|
deptId && this.changeApply(deptId);
|
3274
|
3410
|
if (e === undefined) {
|
3275
|
3411
|
//初始化
|
3276
|
|
- this.changeApplicationDepartment("");
|
|
3412
|
+ this.changeApplicationDepartment();
|
3277
|
3413
|
} else if (e === "&ks&") {
|
3278
|
3414
|
//绑定了科室
|
3279
|
3415
|
// 配送--start
|
|
@@ -3444,6 +3580,7 @@ export class FuwutaiComponent implements OnInit {
|
3444
|
3580
|
this.startDeptQt = null;
|
3445
|
3581
|
this.endDeptQt = null;
|
3446
|
3582
|
this.radioValueZy = null;
|
|
3583
|
+ this.radioValueZyPre = null;
|
3447
|
3584
|
this.startDeptZy = null;
|
3448
|
3585
|
this.endDeptZy = null;
|
3449
|
3586
|
this.patientZy = null;
|
|
@@ -3899,21 +4036,23 @@ export class FuwutaiComponent implements OnInit {
|
3899
|
4036
|
this.getSearchTaskList('', this.countRemarkIndex > -1 ? countRemark : '').subscribe((result) => {
|
3900
|
4037
|
if (result.status == 200) {
|
3901
|
4038
|
this.searchTaskLoading = false;
|
3902
|
|
- // this.workTypesArrange[index].value = result.data || [];
|
3903
|
4039
|
this.workTypes = result['data'] || [];
|
3904
|
4040
|
// 整理后的任务类型
|
3905
|
|
- for (const value of this.workTypesArrange) {
|
3906
|
|
- value.value = [];
|
3907
|
|
- }
|
|
4041
|
+ this.isShowResidenceNo = false;
|
|
4042
|
+ this.workTypesArrange[index].value = [];
|
|
4043
|
+ // for (const value of this.workTypesArrange) {
|
|
4044
|
+ // value.value = [];
|
|
4045
|
+ // }
|
3908
|
4046
|
this.workTypes.forEach((item) => {
|
3909
|
|
- if(item.associationTypeValue === 'patientTransport'){
|
3910
|
|
- // 患者其他服务
|
3911
|
|
- let obj = this.workTypesArrange.find(v => v.key === '患者转运');
|
3912
|
|
- if(obj){
|
3913
|
|
- obj.value.push(item);
|
3914
|
|
- }else{
|
3915
|
|
- this.workTypesArrange.unshift({ key: '患者转运', value: [item] });
|
3916
|
|
- }
|
|
4047
|
+ if(item.associationTypeValue === 'patientTransport' || item.associationTypeValue === 'inspect'){
|
|
4048
|
+ // // 患者其他服务
|
|
4049
|
+ // let obj = this.workTypesArrange.find(v => v.key === '患者转运');
|
|
4050
|
+ // if(obj){
|
|
4051
|
+ // obj.value.push(item);
|
|
4052
|
+ // }else{
|
|
4053
|
+ // this.workTypesArrange.unshift({ key: '患者转运', value: [item] });
|
|
4054
|
+ // this.isShowResidenceNo = true;
|
|
4055
|
+ // }
|
3917
|
4056
|
}else if(item.associationTypeValue === 'other' || item.associationTypeValue === 'specimen' || item.associationTypeValue === 'ordinary'){
|
3918
|
4057
|
// 物品配送
|
3919
|
4058
|
let obj = this.workTypesArrange.find(v => v.key === '物品配送');
|
|
@@ -3934,6 +4073,7 @@ export class FuwutaiComponent implements OnInit {
|
3934
|
4073
|
|
3935
|
4074
|
// 新建工单->获取新建类型
|
3936
|
4075
|
countRemarkList:any[] = [];
|
|
4076
|
+ isShowResidenceNo = false;
|
3937
|
4077
|
getAutoWorkTypes(isFirst, isInit) {
|
3938
|
4078
|
this.workTypesArrange = [];
|
3939
|
4079
|
// 运维
|
|
@@ -3959,14 +4099,16 @@ export class FuwutaiComponent implements OnInit {
|
3959
|
4099
|
if (data["status"] == 200) {
|
3960
|
4100
|
this.workTypes = data["data"];
|
3961
|
4101
|
// 整理后的任务类型
|
|
4102
|
+ this.isShowResidenceNo = false;
|
3962
|
4103
|
this.workTypes.forEach((item) => {
|
3963
|
|
- if(item.associationTypeValue === 'patientTransport'){
|
|
4104
|
+ if(item.associationTypeValue === 'patientTransport' || item.associationTypeValue === 'inspect'){
|
3964
|
4105
|
// 患者其他服务
|
3965
|
4106
|
let obj = this.workTypesArrange.find(v => v.key === '患者转运');
|
3966
|
4107
|
if(obj){
|
3967
|
4108
|
obj.value.push(item);
|
3968
|
4109
|
}else{
|
3969
|
4110
|
this.workTypesArrange.unshift({ key: '患者转运', value: [item] });
|
|
4111
|
+ this.isShowResidenceNo = true;
|
3970
|
4112
|
}
|
3971
|
4113
|
}else if(item.associationTypeValue === 'other' || item.associationTypeValue === 'specimen' || item.associationTypeValue === 'ordinary'){
|
3972
|
4114
|
// 物品配送
|
|
@@ -4007,21 +4149,11 @@ export class FuwutaiComponent implements OnInit {
|
4007
|
4149
|
if (!this.applyDept || !this.endDeptZy) {
|
4008
|
4150
|
return;
|
4009
|
4151
|
}
|
4010
|
|
- // 终点科室患者信息列表,id是送病人回病房的任务类型,写死了
|
|
4152
|
+ // 终点科室患者信息列表,id是送病人回病房的任务类型
|
4011
|
4153
|
if (this.radioValueZy == this.deathTasktypeId) {
|
4012
|
4154
|
//获取患者信息
|
4013
|
4155
|
this.patientZy = null;
|
4014
|
4156
|
this.getPatientList(this.endDeptZy, "");
|
4015
|
|
- } else {
|
4016
|
|
- //获取患者信息
|
4017
|
|
- console.log(this.deptZyList);
|
4018
|
|
- if (
|
4019
|
|
- this.deptZyList.startStatus != 206 &&
|
4020
|
|
- this.deptZyList.endStatus != 206
|
4021
|
|
- ) {
|
4022
|
|
- this.patientZy = null;
|
4023
|
|
- }
|
4024
|
|
- this.getPatientList(this.applyDept, "");
|
4025
|
4157
|
}
|
4026
|
4158
|
}
|
4027
|
4159
|
//搜索院区下面的科室(患者转运)
|
|
@@ -4269,8 +4401,95 @@ export class FuwutaiComponent implements OnInit {
|
4269
|
4401
|
//患者其他服务
|
4270
|
4402
|
this.yyTimeZy = null;
|
4271
|
4403
|
this.yyDateZy = new Date();
|
|
4404
|
+ }else if (this.currentTasktype.associationType.value === "inspect") {
|
|
4405
|
+ //陪检
|
|
4406
|
+ let obj = this.filterLinkCheckLis.find((item) => {
|
|
4407
|
+ return (parse(item.yyTime, 'yyyy-MM-dd HH:mm:ss', new Date()).getTime() - new Date().getTime() > 0);
|
|
4408
|
+ });
|
|
4409
|
+ if (obj) {
|
|
4410
|
+ this.showDateTime();
|
|
4411
|
+ } else {
|
|
4412
|
+ this.yyTimeZy = null;
|
|
4413
|
+ this.yyDateZy = new Date();
|
|
4414
|
+ console.log(this.isYyInspect);
|
|
4415
|
+ }
|
4272
|
4416
|
}
|
4273
|
4417
|
}
|
|
4418
|
+ //回显时间日期
|
|
4419
|
+ showDateTime() {
|
|
4420
|
+ //当前时间要大于生效时间
|
|
4421
|
+ let isYyInspect = this.filterLinkCheckLis.every((item) => {
|
|
4422
|
+ return (parse(item.yyTime, 'yyyy-MM-dd HH:mm:ss', new Date()).getTime() - new Date().getTime() > 0);
|
|
4423
|
+ });
|
|
4424
|
+ //如果勾选需要预约检查
|
|
4425
|
+ if (isYyInspect) {
|
|
4426
|
+ //筛选离当前时间最近的
|
|
4427
|
+ let timeList = this.filterLinkCheckLis
|
|
4428
|
+ .map((item) => parse(item.yyTime, 'yyyy-MM-dd HH:mm:ss', new Date()).getTime())
|
|
4429
|
+ .sort();
|
|
4430
|
+ this.yyTimeZy = new Date(timeList[0] - 0); //回显预约时间,需要减去生效时间
|
|
4431
|
+ this.yyDateZy = new Date(timeList[0] - 0); //回显预约日期,需要减去生效时间
|
|
4432
|
+ this.yyDateChange(this.yyTimeZy);
|
|
4433
|
+ } else {
|
|
4434
|
+ this.yyTimeZy = null;
|
|
4435
|
+ this.yyDateZy = null;
|
|
4436
|
+ }
|
|
4437
|
+ }
|
|
4438
|
+ // 患者送检检查项目-选择检查项目
|
|
4439
|
+ linkCheckLisTrue = false; //是否有已选择(患者)
|
|
4440
|
+ filterLinkCheckLis = []; //有预约时间并且选中的
|
|
4441
|
+ isInspects = false; //勾选检车的时候是否多个检查多个检查科室
|
|
4442
|
+ linkCheckLisChange(e) {
|
|
4443
|
+ let flag = false; //检查是否紧急
|
|
4444
|
+ let arr = []; //选中的索引
|
|
4445
|
+ // 是否检查生成工单允许多个科室,1是,0否
|
|
4446
|
+ if (this.currentTasktype.isMoreDept === 0) {
|
|
4447
|
+ let arr = e.map((item) => item.execDeptId);
|
|
4448
|
+ arr = Array.from(new Set(arr));
|
|
4449
|
+ this.isInspects = arr.length > 1;
|
|
4450
|
+ }
|
|
4451
|
+ this.linkCheckLis.forEach((item, index) => {
|
|
4452
|
+ if (e.length) {
|
|
4453
|
+ //有选中的检查
|
|
4454
|
+ e.forEach((v) => {
|
|
4455
|
+ //检查是否有紧急度
|
|
4456
|
+ if (v.priority == 1) {
|
|
4457
|
+ flag = true;
|
|
4458
|
+ }
|
|
4459
|
+ //选中的检查设置checked
|
|
4460
|
+ if (v.value == item.value) {
|
|
4461
|
+ arr.push(index);
|
|
4462
|
+ }
|
|
4463
|
+ });
|
|
4464
|
+ } else {
|
|
4465
|
+ item.checked = false;
|
|
4466
|
+ }
|
|
4467
|
+ });
|
|
4468
|
+ this.linkCheckLis.forEach((item, index) => {
|
|
4469
|
+ item.checked = arr.includes(index);
|
|
4470
|
+ });
|
|
4471
|
+ console.log(e, this.linkCheckLis);
|
|
4472
|
+ this.clickYYFlag = false;
|
|
4473
|
+ // 有预约时间并且选中的
|
|
4474
|
+ this.filterLinkCheckLis = this.linkCheckLis.filter(
|
|
4475
|
+ (item) => Boolean(item.yyTime) && item.checked
|
|
4476
|
+ );
|
|
4477
|
+ //有预约时间并且选中的检查数组不为空
|
|
4478
|
+ if (this.filterLinkCheckLis.length) {
|
|
4479
|
+ //当前时间要大于生效时间
|
|
4480
|
+ this.isYyInspect = this.filterLinkCheckLis.every((item) => {
|
|
4481
|
+ return (parse(item.yyTime, 'yyyy-MM-dd HH:mm:ss', new Date()).getTime() - new Date().getTime() > 0);
|
|
4482
|
+ });
|
|
4483
|
+ //不加急状态下,回显时间
|
|
4484
|
+ this.showDateTime();
|
|
4485
|
+ } else {
|
|
4486
|
+ //有预约时间并且选中的检查数组为空
|
|
4487
|
+ this.isYyInspect = false;
|
|
4488
|
+ this.yyTimeZy = null;
|
|
4489
|
+ this.yyDateZy = null;
|
|
4490
|
+ }
|
|
4491
|
+ this.linkCheckLisTrue = e.length > 0;
|
|
4492
|
+ }
|
4274
|
4493
|
// 转运类型选中类型(单选)触发
|
4275
|
4494
|
goodsNow; //携带的物品列表
|
4276
|
4495
|
yyDateZy = null; //预约日期-患者其他服务
|
|
@@ -4282,21 +4501,43 @@ export class FuwutaiComponent implements OnInit {
|
4282
|
4501
|
clickYYZyFlag = false; //是否点击预约建单-患者其他服务
|
4283
|
4502
|
clickYYFlag = false; //是否点击预约建单-其他临床服务
|
4284
|
4503
|
currentTasktype = null; //当前选中的任务类型对象
|
4285
|
|
- radioChangeZy(value) {
|
|
4504
|
+ isTaskTypeInspect:boolean = false;//是否是患者陪检
|
|
4505
|
+ linkCheckLis:any[] = [];//检查列表
|
|
4506
|
+ tabIndex;
|
|
4507
|
+ radioChangeZy(value, index) {
|
|
4508
|
+ this.radioValueZyPre = this.radioValueZy;
|
|
4509
|
+ this.radioValueZy = value;
|
|
4510
|
+
|
|
4511
|
+ this.tabIndex = index;
|
4286
|
4512
|
//任务类型id
|
4287
|
4513
|
if (value === "" || value === null) {
|
4288
|
4514
|
return;
|
4289
|
4515
|
}
|
|
4516
|
+ this.linkCheckLisTrue = false;
|
4290
|
4517
|
this.startDeptZy = null;
|
4291
|
4518
|
this.endDeptZy = null;
|
4292
|
|
- this.patientZy = null;
|
|
4519
|
+ // 患者陪检-则参数增加patientCode
|
|
4520
|
+ console.log(this.workTypesArrange[index].value);
|
|
4521
|
+ let taskType = this.workTypesArrange[index].value.find(v => v.id == value);
|
|
4522
|
+ let patientCode;
|
|
4523
|
+ if(taskType.associationTypeValue === 'inspect'){
|
|
4524
|
+ patientCode = this.patientZy;
|
|
4525
|
+ this.requiredConfigChange('validateFormZy', 'startDept', false);
|
|
4526
|
+ this.requiredConfigChange('validateFormZy', 'endDepts', false);
|
|
4527
|
+ this.isTaskTypeInspect = true;
|
|
4528
|
+ }else{
|
|
4529
|
+ patientCode = undefined;
|
|
4530
|
+ this.requiredConfigChange('validateFormZy', 'startDept', true);
|
|
4531
|
+ this.requiredConfigChange('validateFormZy', 'endDepts', true);
|
|
4532
|
+ this.isTaskTypeInspect = false;
|
|
4533
|
+ }
|
4293
|
4534
|
// 返回值的status是201 则是默认发起科室,把申请科室作为值
|
4294
|
4535
|
// 返回值的status是202 则是固定科室范围,会返回科室列表
|
4295
|
4536
|
// 返回值的status是203 则是固定科室,会返回单个科室
|
4296
|
4537
|
// 返回值的status是204 则让前端自己调用科室搜索接口
|
4297
|
4538
|
// 返回值的status是205 则是固定科室类型,会返回科室列表
|
4298
|
4539
|
// 返回值的status是206 则是默认患者所在科室,把患者所在科室作为值
|
4299
|
|
- this.mainService.getdeptList(value).subscribe((data:any) => {
|
|
4540
|
+ this.mainService.getdeptList(value, patientCode).subscribe((data:any) => {
|
4300
|
4541
|
this.deptZyList = data;
|
4301
|
4542
|
// 预约start
|
4302
|
4543
|
this.currentTasktype = data.taskType;
|
|
@@ -4306,6 +4547,25 @@ export class FuwutaiComponent implements OnInit {
|
4306
|
4547
|
this.yyTimeZy = null;
|
4307
|
4548
|
// 预约end
|
4308
|
4549
|
console.log(this.deptZyList);
|
|
4550
|
+ // 如果是患者陪检,则没有起点科室,终点科室
|
|
4551
|
+ if(taskType.associationTypeValue === 'inspect'){
|
|
4552
|
+ this.linkCheckLis = [];
|
|
4553
|
+ if (data.data && Array.isArray(data.data.data) && data.data.data.length) {
|
|
4554
|
+ let arr = [];
|
|
4555
|
+ data.data.data.forEach((e) => {
|
|
4556
|
+ arr.push({
|
|
4557
|
+ execDeptId: e.execDept.id,
|
|
4558
|
+ yyTime: e.yyTime,
|
|
4559
|
+ priority: e.priority,
|
|
4560
|
+ label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
|
|
4561
|
+ value: e["id"],
|
|
4562
|
+ checked: false,
|
|
4563
|
+ });
|
|
4564
|
+ });
|
|
4565
|
+ this.linkCheckLis = arr;
|
|
4566
|
+ }
|
|
4567
|
+ return;
|
|
4568
|
+ }
|
4309
|
4569
|
// 起点科室
|
4310
|
4570
|
if (data["startStatus"] == 201 || data["startStatus"] == 206) {
|
4311
|
4571
|
if (this.applyDept) {
|
|
@@ -4334,19 +4594,20 @@ export class FuwutaiComponent implements OnInit {
|
4334
|
4594
|
} else if (data["endStatus"] == 204 || data["endStatus"] == 205) {
|
4335
|
4595
|
this.getHosDepartment(this.checkedHos, "end", "");
|
4336
|
4596
|
}
|
4337
|
|
- // 终点科室患者信息列表,id是送病人回病房的任务类型
|
4338
|
|
- if (
|
4339
|
|
- (data["endStatus"] == 201 || data["endStatus"] == 203) &&
|
4340
|
|
- this.radioValueZy == this.deathTasktypeId
|
4341
|
|
- ) {
|
4342
|
|
- if (this.currentTabIndex == "患者转运") {
|
4343
|
|
- //患者转运
|
|
4597
|
+ if (this.currentTabIndex == "患者转运") {
|
|
4598
|
+ // 终点科室患者信息列表,id是送病人回病房的任务类型
|
|
4599
|
+ if (this.endDeptZy && this.radioValueZy == this.deathTasktypeId) {
|
4344
|
4600
|
//获取患者信息
|
|
4601
|
+ this.patientZy = null;
|
4345
|
4602
|
this.getPatientList(this.endDeptZy, "");
|
|
4603
|
+ } else if(this.applyDept && this.radioValueZyPre == this.deathTasktypeId) {
|
|
4604
|
+ //获取患者信息
|
|
4605
|
+ this.patientZy = null;
|
|
4606
|
+ this.getPatientList(this.applyDept, "");
|
4346
|
4607
|
}
|
4347
|
4608
|
}
|
4348
|
4609
|
});
|
4349
|
|
- // 获取携带物品
|
|
4610
|
+ // 获取携带设备
|
4350
|
4611
|
let arrObj = this.workTypesArrange.find(v => v.key === this.currentTabIndex);
|
4351
|
4612
|
let arr = arrObj.value;
|
4352
|
4613
|
this.goodsNow = arr.filter(
|
|
@@ -4429,7 +4690,7 @@ export class FuwutaiComponent implements OnInit {
|
4429
|
4690
|
} else {
|
4430
|
4691
|
this.clickYYFlag = false;
|
4431
|
4692
|
}
|
4432
|
|
- if (this.isYyInspect && objZy && objZy.associationTypeValue === 'patientTransport') {
|
|
4693
|
+ if (this.isYyInspect && objZy && (objZy.associationTypeValue === 'patientTransport' || objZy.associationTypeValue === 'inspect')) {
|
4433
|
4694
|
this.clickYYZyFlag = true;
|
4434
|
4695
|
} else {
|
4435
|
4696
|
this.clickYYZyFlag = false;
|
|
@@ -4437,7 +4698,7 @@ export class FuwutaiComponent implements OnInit {
|
4437
|
4698
|
|
4438
|
4699
|
if (
|
4439
|
4700
|
(!this.yyTime && objQt && objQt.associationTypeValue === 'other' && this.isYyInspect) ||
|
4440
|
|
- (!this.yyTimeZy && objZy && objZy.associationTypeValue === 'patientTransport' && this.isYyInspect)
|
|
4701
|
+ (!this.yyTimeZy && objZy && (objZy.associationTypeValue === 'patientTransport' || objZy.associationTypeValue === 'inspect') && this.isYyInspect)
|
4441
|
4702
|
) {
|
4442
|
4703
|
return;
|
4443
|
4704
|
}
|
|
@@ -4450,6 +4711,9 @@ export class FuwutaiComponent implements OnInit {
|
4450
|
4711
|
if (objZy && objZy.associationTypeValue === 'patientTransport') {
|
4451
|
4712
|
//患者转运
|
4452
|
4713
|
go === "&go&" ? this.submitFormZy(go) : this.submitFormZy();
|
|
4714
|
+ }if (objZy && objZy.associationTypeValue === 'inspect') {
|
|
4715
|
+ //患者陪检
|
|
4716
|
+ go === "&go&" ? this.submitFormInspect(go) : this.submitFormInspect();
|
4453
|
4717
|
} else if (objQt && objQt.associationTypeValue === 'specimen') {
|
4454
|
4718
|
//标本配送
|
4455
|
4719
|
go === "&go&" ? this.submitFormBbps(go) : this.submitFormBbps();
|
|
@@ -4480,6 +4744,7 @@ export class FuwutaiComponent implements OnInit {
|
4480
|
4744
|
this.startDeptQt = null;
|
4481
|
4745
|
this.endDeptQt = null;
|
4482
|
4746
|
this.radioValueZy = null;
|
|
4747
|
+ this.radioValueZyPre = null;
|
4483
|
4748
|
this.startDeptZy = null;
|
4484
|
4749
|
this.endDeptZy = null;
|
4485
|
4750
|
this.patientZy = null;
|
|
@@ -4497,7 +4762,7 @@ export class FuwutaiComponent implements OnInit {
|
4497
|
4762
|
this.deptQtList["endStatus"] = 0;
|
4498
|
4763
|
}
|
4499
|
4764
|
|
4500
|
|
- // 携带物品
|
|
4765
|
+ // 携带设备
|
4501
|
4766
|
changeGoods(value: object[]): void {
|
4502
|
4767
|
console.log(value);
|
4503
|
4768
|
}
|
|
@@ -4915,6 +5180,12 @@ export class FuwutaiComponent implements OnInit {
|
4915
|
5180
|
}
|
4916
|
5181
|
}
|
4917
|
5182
|
|
|
5183
|
+ // 服务台建单输入住院号,查到有且仅有一个患者,则自动选中【患者转运】,自动带出【申请科室】,自动带出【患者信息】
|
|
5184
|
+ changeResidenceNo(e){
|
|
5185
|
+ console.log(e);
|
|
5186
|
+ this.changeCommonInpSubject.next(['patient', e]);
|
|
5187
|
+ }
|
|
5188
|
+
|
4918
|
5189
|
// 运维、配送工单切换
|
4919
|
5190
|
filterOrderList(type, state){
|
4920
|
5191
|
if(!this.itsmData.mdv2Switch && this.hsmsData.hsmsSwitch){
|
|
@@ -5414,6 +5685,36 @@ export class FuwutaiComponent implements OnInit {
|
5414
|
5685
|
}else{
|
5415
|
5686
|
this.workOrderRemarkZy = '';
|
5416
|
5687
|
}
|
|
5688
|
+
|
|
5689
|
+ if(this.tabIndex !== undefined && this.currentTasktype && this.currentTasktype.associationType.value === 'inspect'){
|
|
5690
|
+ let index = this.tabIndex;
|
|
5691
|
+ let value = this.currentTasktype.id;
|
|
5692
|
+ let taskType = this.workTypesArrange[index].value.find(v => v.id == value);
|
|
5693
|
+ let patientCode;
|
|
5694
|
+ if(taskType.associationTypeValue === 'inspect'){
|
|
5695
|
+ patientCode = this.patientZy;
|
|
5696
|
+ }else{
|
|
5697
|
+ patientCode = undefined;
|
|
5698
|
+ }
|
|
5699
|
+
|
|
5700
|
+ this.mainService.getdeptList(value, patientCode).subscribe((data:any) => {
|
|
5701
|
+ this.linkCheckLis = [];
|
|
5702
|
+ if(data.data && Array.isArray(data.data.data) && data.data.data.length) {
|
|
5703
|
+ let arr = [];
|
|
5704
|
+ data.data.data.forEach((e) => {
|
|
5705
|
+ arr.push({
|
|
5706
|
+ execDeptId: e.execDept.id,
|
|
5707
|
+ yyTime: e.yyTime,
|
|
5708
|
+ priority: e.priority,
|
|
5709
|
+ label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
|
|
5710
|
+ value: e["id"],
|
|
5711
|
+ checked: false,
|
|
5712
|
+ });
|
|
5713
|
+ });
|
|
5714
|
+ this.linkCheckLis = arr;
|
|
5715
|
+ }
|
|
5716
|
+ })
|
|
5717
|
+ }
|
5417
|
5718
|
}
|
5418
|
5719
|
|
5419
|
5720
|
// 注意事项获取焦点
|