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