ソースを参照

病理标本类型添加

maotao 4 ヶ月 前
コミット
95c8542b81

+ 1 - 1
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html

@@ -116,7 +116,7 @@
116 116
 								<!--门诊支持离体并固定 -->
117 117
 								<div class="display_flex align-items_center mb8">
118 118
 									<nz-form-label class="label">门诊支持离体并固定</nz-form-label>
119
-									<nz-checkbox-group [(ngModel)]="immobilization"></nz-checkbox-group>
119
+									<nz-checkbox-group [(ngModel)]="outpatientInVitroFixation"></nz-checkbox-group>
120 120
 								</div>
121 121
 							</div>
122 122
 							<div class="bottom">

+ 3 - 3
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts

@@ -32,7 +32,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
32 32
 	];
33 33
 	
34 34
 	// 门诊支持离体并固定
35
-	immobilization:any[] = [
35
+	outpatientInVitroFixation:any[] = [
36 36
 	  {label:'是否开启',value: 0}
37 37
 	];
38 38
 	
@@ -175,7 +175,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
175 175
 		  taskType: this.taskTypeData.id,
176 176
 		  hosId: this.hosId,
177 177
 		  autoCreate: this.autoCreate[0].checked ? 1 : 0,
178
-			immobilization: this.immobilization[0].checked ? 1 : 0,
178
+			outpatientInVitroFixation: this.outpatientInVitroFixation[0].checked ? 1 : 0,
179 179
 		};
180 180
 		this.btnLoading = true;
181 181
 		this.mainService
@@ -297,7 +297,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
297 297
           this.configs = result.list[0] || {};
298 298
 					// 病理标本
299 299
 					this.autoCreate[0].checked = this.configs.autoCreate == 1;
300
-					this.immobilization[0].checked = this.configs.immobilization == 1;
300
+					this.outpatientInVitroFixation[0].checked = this.configs.outpatientInVitroFixation == 1;
301 301
 					// 检查标本
302 302
           this.deptNotAlert[0].checked = this.configs.deptNotAlert == 1;
303 303
           this.arriveScanCode[0].checked = this.configs.arriveScanCode == 1;

+ 6 - 0
src/app/services/main.service.ts

@@ -1038,5 +1038,11 @@ export class MainService {
1038 1038
 	    headers: this.headers,
1039 1039
 	  });
1040 1040
 	}
1041
+	// 获取细胞学标本
1042
+	getCellDictionary(data) {
1043
+	  return this.http.post(host.host + `/common/common/getDictionary`,data, {
1044
+	    headers: this.headers,
1045
+	  });
1046
+	}
1041 1047
 
1042 1048
 }

+ 3 - 3
src/app/share/pathology-add/pathology-add.component.html

@@ -156,7 +156,7 @@
156 156
 		</div>
157 157
 		<div class="content">
158 158
 			<form nz-form [formGroup]="validateSpecimenForm" class="addForm" (ngSubmit)="submitSpecimen()">
159
-				<nz-form-item class="form-item">
159
+				<nz-form-item class="form-item" *ngIf="!selectType">
160 160
 					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">位置来源</nz-form-label>
161 161
 					<div class="specimen-list">
162 162
 						<div>
@@ -166,7 +166,7 @@
166 166
 					</div>
167 167
 				</nz-form-item>
168 168
 				
169
-				<nz-form-item class="form-item">
169
+				<nz-form-item class="form-item" *ngIf="!selectType">
170 170
 					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">系统</nz-form-label>
171 171
 					<div class="specimen-list">
172 172
 						<div *ngFor="let item of systemList;let index=index;" class="select-item"
@@ -176,7 +176,7 @@
176 176
 					</div>
177 177
 				</nz-form-item>
178 178
 				
179
-				<nz-form-item class="form-item">
179
+				<nz-form-item class="form-item" *ngIf="!selectType">
180 180
 					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">器官</nz-form-label>
181 181
 					<div class="specimen-list">
182 182
 						<div *ngFor="let item of apparatusList;let index=index;" class="select-item"

+ 98 - 77
src/app/share/pathology-add/pathology-add.component.ts

@@ -227,6 +227,7 @@ export class PathologyAddComponent implements OnInit {
227 227
 	
228 228
 	// 获取标本-标本名称
229 229
 	getSpNameData(id,item,type){
230
+		this.selectItem = this.specimenData.find(i=>i.id == this.validateForm.value.specimenGenre)
230 231
 		let postData: any = {
231 232
 		  idx: 0,
232 233
 		  sum: 9999,
@@ -235,16 +236,17 @@ export class PathologyAddComponent implements OnInit {
235 236
 				parent:id,
236 237
 		    key: 'pathology_specimen',
237 238
 		    deleted: 0,
239
+				extra1:'',
238 240
 		  },
239 241
 		};
240
-		this.mainService
241
-		  .getFetchDataList("simple/data", "dictionaryTree", postData)
242
-		  .subscribe((data) => {
243
-		    this.specimenNameList = data.list;
244
-				// this.specimenNameList.push({
245
-				// 	name:'其他',
246
-				// 	id:'qita'
247
-				// })
242
+		
243
+		if(this.selectType){
244
+			postData.dictionaryTree.key = 'cell_specimen'
245
+			postData.dictionaryTree.extra1 = this.selectItem.value
246
+			delete postData.dictionaryTree.parent
247
+			delete postData.dictionaryTree.level
248
+			this.mainService.getFetchDataList("simple/data", "dictionaryTree", postData).subscribe((res) => {
249
+				this.specimenNameList = res.list;
248 250
 				if(type=='edit'){
249 251
 					if(item.sample){
250 252
 						this.validateSpecimenForm = this.fb.group({
@@ -258,21 +260,43 @@ export class PathologyAddComponent implements OnInit {
258 260
 							this.specimenNameId = Number(item.sample.id);
259 261
 							this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
260 262
 						},100)
261
-					}else{
262
-						// this.validateSpecimenForm = this.fb.group({
263
-						//   remark: [null, []],
264
-						// 	specimenName: [null, [Validators.required]]
265
-						// });
266
-						// this.specimenNameIndex = this.specimenNameList.length-1
267
-						// // this.specimenNameName = 'qita'
268
-						// this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
269 263
 					}
270 264
 					setTimeout(_=>{
271 265
 						this.validateSpecimenForm.controls.remark.setValue(item.remark);
272 266
 						this.specimenModal = true
273 267
 					},50)
274 268
 				}
275
-		  });
269
+			});
270
+		}else{
271
+			postData.dictionaryTree.key = 'pathology_specimen'
272
+			postData.dictionaryTree.parent = id
273
+			postData.dictionaryTree.level = 3
274
+			delete postData.dictionaryTree.extra1
275
+			this.mainService.getFetchDataList("simple/data", "dictionaryTree", postData)
276
+			  .subscribe((data) => {
277
+			    this.specimenNameList = data.list;
278
+					if(type=='edit'){
279
+						if(item.sample){
280
+							this.validateSpecimenForm = this.fb.group({
281
+							  remark: [null, []],
282
+								specimenName: [null, [Validators.required]]
283
+							});
284
+							setTimeout(_=>{
285
+								let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
286
+								this.specimenNameIndex = index4
287
+								this.specimenNameName = item.sample.name
288
+								this.specimenNameId = Number(item.sample.id);
289
+								this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
290
+							},100)
291
+						}
292
+						setTimeout(_=>{
293
+							this.validateSpecimenForm.controls.remark.setValue(item.remark);
294
+							this.specimenModal = true
295
+						},50)
296
+					}
297
+			  });
298
+		}
299
+
276 300
 	}
277 301
 	
278 302
 	// 删除标本
@@ -311,18 +335,28 @@ export class PathologyAddComponent implements OnInit {
311 335
 	specimenDetailId:any = null;
312 336
 	specimenEdit(e,item,index){
313 337
 		this.specimenDetailId = item.id
314
-		let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
315
-		this.placeIndex = index1
316
-		this.placeId = Number(item.partSource.id)
317
-		let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
318
-		this.systemIndex = index2
319
-		this.systemId = Number(item.system.id)
320
-		this.getApparatusData(item.system.id,item,'edit')
321
-		this.getSpNameData(item.organ.id,item,'edit')
338
+		if(item.system && item.organ){
339
+			this.selectType = false
340
+			let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
341
+			this.placeIndex = index1
342
+			this.placeId = Number(item.partSource.id)
343
+			let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
344
+			this.systemIndex = index2
345
+			this.systemId = Number(item.system.id)
346
+			this.getApparatusData(item.system.id,item,'edit')
347
+			this.getSpNameData(item.organ.id,item,'edit')
348
+		}else{
349
+			this.selectType = true
350
+			this.getSpNameData(item.specimenId,item,'edit')
351
+		}
322 352
 	}
323 353
 	
324 354
 	// 选择标本
355
+	selectItem:any;
356
+	selectType:any = false;
325 357
 	openSpecimen(){
358
+		this.selectItem = this.specimenData.find(i=>i.id == this.validateForm.value.specimenGenre)
359
+		console.log(this.selectItem.value) //20 21 22 24 60 80
326 360
 		this.validateSpecimenForm = this.fb.group({
327 361
 		  remark: [null, []],
328 362
 			specimenName:[null, [Validators.required]],
@@ -340,10 +374,19 @@ export class PathologyAddComponent implements OnInit {
340 374
 		this.systemList=[]; //系统数据
341 375
 		this.apparatusList=[]; //器官数据
342 376
 		this.specimenNameList=[]; //标本名称数据
343
-		this.specimenNameName = null;
344
-		this.getSourceData()
345
-		this.getSysData()
377
+		this.specimenNameName = null
346 378
 		this.specimenModal = true
379
+		if(this.selectItem.value==20 || this.selectItem.value==21 ||
380
+		this.selectItem.value==22 || this.selectItem.value==23 ||
381
+		this.selectItem.value==24 || this.selectItem.value==60 || 
382
+		this.selectItem.value==70 || this.selectItem.value==80){
383
+			this.selectType = true
384
+			this.getSpNameData('',{},'select')
385
+		}else{
386
+			this.selectType = false
387
+			this.getSourceData()
388
+			this.getSysData()
389
+		}
347 390
 	}
348 391
 	
349 392
 	// 选择位置来源
@@ -393,17 +436,6 @@ export class PathologyAddComponent implements OnInit {
393 436
 	specimenNameClick(e,item,index){
394 437
 		this.specimenNameIndex = index
395 438
 		let remark = this.validateSpecimenForm.value.remark
396
-		// if(item.id == 'qita'){
397
-		// 	this.validateSpecimenForm = this.fb.group({
398
-		// 	  remark: [remark?remark:null, []],
399
-		// 		specimenName: [null, [Validators.required]]
400
-		// 	});
401
-		// 	this.specimenNameId = 'null'
402
-		// 	this.specimenNameName = 'qita'
403
-		// }else{
404
-			// this.validateSpecimenForm = this.fb.group({
405
-			//   remark: [remark?remark:null, []],
406
-			// });
407 439
 			this.specimenNameId = item.id
408 440
 			this.specimenNameName = item.name
409 441
 			if(this.validateSpecimenForm.value.specimenName && this.validateSpecimenForm.value.specimenName.length){
@@ -413,10 +445,6 @@ export class PathologyAddComponent implements OnInit {
413 445
 				}
414 446
 			}
415 447
 			
416
-			// if(this.validateSpecimenForm.value.specimenName && this.validateSpecimenForm.value.specimenName.length>15){
417
-			// 	this.message.error('字符长度不能超过15个')
418
-			// 	return
419
-			// }
420 448
 			let namn = null
421 449
 			if(this.validateSpecimenForm.value.specimenName){
422 450
 				namn = this.validateSpecimenForm.value.specimenName + '、'+ item.name
@@ -424,7 +452,6 @@ export class PathologyAddComponent implements OnInit {
424 452
 				namn = item.name
425 453
 			}
426 454
 			this.validateSpecimenForm.controls.specimenName.setValue(namn);
427
-		// }
428 455
 	}
429 456
 	
430 457
 	// 保存标本
@@ -432,19 +459,22 @@ export class PathologyAddComponent implements OnInit {
432 459
 	addSpLoading:boolean = false;
433 460
 	addMadal:boolean = false;
434 461
 	submitSpecimen(type){
435
-		if(this.placeIndex==null){
436
-			this.message.error('请选择位置来源')
437
-			return
438
-		}
439
-		if(this.systemIndex==null){
440
-			this.message.error('请选择系统')
441
-			return
442
-		}
443
-		if(this.apparatusIndex==null){
444
-			this.message.error('请选择器官')
445
-			return
462
+		if(!this.selectType){
463
+			if(this.placeIndex==null){
464
+				this.message.error('请选择位置来源')
465
+				return
466
+			}
467
+			if(this.systemIndex==null){
468
+				this.message.error('请选择系统')
469
+				return
470
+			}
471
+			if(this.apparatusIndex==null){
472
+				this.message.error('请选择器官')
473
+				return
474
+			}
446 475
 		}
447
-		if(this.specimenNameIndex==null){
476
+		
477
+		if(this.specimenNameIndex==null && this.validateSpecimenForm.value.specimenName == ''){
448 478
 			this.message.error('请选择标本名称')
449 479
 			return
450 480
 		}
@@ -480,12 +510,6 @@ export class PathologyAddComponent implements OnInit {
480 510
 			id:'',
481 511
 			remark:this.validateSpecimenForm.value.remark
482 512
 		};
483
-		// if(this.specimenNameName == 'qita'){
484
-		// 	delete data.sample
485
-		// 	data.specimenName = this.validateSpecimenForm.value.specimenName
486
-		// }else{
487
-			// data.specimenName = this.specimenNameName
488
-		// }
489 513
 		let queryType = null
490 514
 		if(this.specimenDetailId){
491 515
 			queryType = 'updData'
@@ -504,10 +528,8 @@ export class PathologyAddComponent implements OnInit {
504 528
 					setTimeout(_=>{
505 529
 						this.closeSpecimenModel()
506 530
 					},200)
507
-		      // this.showSpecimenModal("操作", true, "");
508 531
 		    } else {
509 532
 					this.message.error(res.msg)
510
-		      // this.showSpecimenModal("操作", false, res.msg);
511 533
 		    }
512 534
 		  });
513 535
 	}
@@ -534,12 +556,6 @@ export class PathologyAddComponent implements OnInit {
534 556
 			id:'',
535 557
 			remark:this.validateSpecimenForm.value.remark
536 558
 		};
537
-		// if(this.specimenNameName == 'qita'){
538
-		// 	delete data.sample
539
-		// 	data.specimenName = this.validateSpecimenForm.value.specimenName
540
-		// }else{
541
-		// 	data.specimenName = this.specimenNameName
542
-		// }
543 559
 		let queryType = null
544 560
 		if(this.specimenDetailId){
545 561
 			queryType = 'updData'
@@ -548,11 +564,9 @@ export class PathologyAddComponent implements OnInit {
548 564
 			queryType = 'addData'
549 565
 			delete data.id
550 566
 		}
551
-		// this.btnSpLoading = true;
552 567
 		this.mainService
553 568
 		  .simplePost(queryType, "pathologySpecimen", data)
554 569
 		  .subscribe((res) => {
555
-		    // this.btnSpLoading = false;
556 570
 		    if (res.status == 200) {
557 571
 					this.message.success('操作成功')
558 572
 					this.validateSpecimenForm = this.fb.group({
@@ -565,10 +579,6 @@ export class PathologyAddComponent implements OnInit {
565 579
 					
566 580
 					this.placeIndex = null;
567 581
 					this.placeId = null;
568
-					
569
-					// this.specimenNameList=[]; //标本名称数据
570
-					// this.specimenNameName = null;
571
-					
572 582
 					this.addSpLoading = false;
573 583
 					this.addMadal = false;
574 584
 					
@@ -615,11 +625,22 @@ export class PathologyAddComponent implements OnInit {
615 625
 					let str = []
616 626
 					if(res.list.length>0){
617 627
 						for(let i of res.list){
618
-							str.push(i.system.name + '-' + i.organ.name)
628
+							if(i.system && i.organ){
629
+								str.push(i.system.name + '-' + i.organ.name)
630
+							}else{
631
+								str.push(i.specimenName)
632
+							}
619 633
 						}
620 634
 						const newStr = new Set(str);
621 635
 						const newData = Array.from(newStr);
622 636
 						this.validateForm.controls.takePart.setValue(newData.join('、'));
637
+						// if(this.selectType){
638
+						// 	this.validateForm.controls.takePart.setValue(
639
+						// 	this.validateSpecimenForm.controls.specimenName
640
+						// 	)
641
+						// }else{
642
+							
643
+						// }
623 644
 					}
624 645
 				}
625 646
 				this.validateForm.controls.specimenNum.setValue(this.specimenList.length);

File diff suppressed because it is too large
+ 465 - 606
src/app/views/pathology-sample/pathology-sample.component.html


File diff suppressed because it is too large
+ 545 - 450
src/app/views/pathology-sample/pathology-sample.component.less


File diff suppressed because it is too large
+ 989 - 522
src/app/views/pathology-sample/pathology-sample.component.ts