Browse Source

医保对接

csx 2 years ago
parent
commit
d0f62edba7
1 changed files with 97 additions and 7 deletions
  1. 97 7
      controllers/role_controller.go

+ 97 - 7
controllers/role_controller.go View File

@@ -221,7 +221,8 @@ func (this *RoleAPIController) EditPurviewInitData() {
221 221
 	purviews_func, _ := service.GetAllGeneralFuncPurviewVMsProcessed()
222 222
 
223 223
 	//门诊
224
-	outpatientRegistration, _, _ := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientRegistration/manage")
224
+	_, _, outpatientRegistration := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientRegistration/manage")
225
+	fmt.Println(outpatientRegistration)
225 226
 	//电子病历
226 227
 	_, _, originEle := service.GetOtherAllGeneralPurviewVMsProcessed("/patinets/ele")
227 228
 	//透析管理
@@ -232,12 +233,14 @@ func (this *RoleAPIController) EditPurviewInitData() {
232 233
 	//_, _, orginConfig := service.GetOtherAllGeneralPurviewVMsProcessed("/config/manage")
233 234
 
234 235
 	//门诊管理
236
+	_, _, YajinPurview := service.GetOtherAllGeneralPurviewVMsProcessed("DepositManagement")
237
+	//_, _, YaofangPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/api/pharmacy")
238
+	_, _, DengjiPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hospitalRecord/index")
239
+	_, _, GongjuPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hisTool")
240
+	_, _, ShoufeiPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/hospitalCharges")
235 241
 	_, _, outpatientRegistrationPurview := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientRegistration/index")
236
-
237 242
 	_, _, outpatientRegistrationPurviewTwo := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientDoctorStation")
238
-
239 243
 	_, _, outpatientRegistrationPurviewThree := service.GetOtherAllGeneralPurviewVMsProcessed("/outpatientCharges")
240
-
241 244
 	_, _, outpatientRegistrationPurviewFour := service.GetOtherAllGeneralPurviewVMsProcessed("/hospitalStation")
242 245
 
243 246
 	//透析管理
@@ -266,13 +269,66 @@ func (this *RoleAPIController) EditPurviewInitData() {
266 269
 
267 270
 	//门诊管理
268 271
 
272
+	subYajinPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
269 273
 	subPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
270
-
271 274
 	subPurviewTreeViewModelTwo := []*service.PurviewTreeViewModel{}
272 275
 	subPurviewTreeViewModelThree := []*service.PurviewTreeViewModel{}
276
+	//subYaoFangPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
277
+	subDengjiPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
273 278
 	subPurviewTreeViewModelFour := []*service.PurviewTreeViewModel{}
274
-
275 279
 	subPurviewTreeViewModelFive := []*service.PurviewTreeViewModel{}
280
+	subGongJuPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
281
+	subShouFeiPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
282
+
283
+	for _, item := range YajinPurview {
284
+		temp := &service.PurviewTreeViewModel{
285
+			ID:     item.Id,
286
+			PID:    item.Parentid,
287
+			Name:   item.Name,
288
+			Number: 1,
289
+		}
290
+		subYajinPurviewTreeViewModel = append(subYajinPurviewTreeViewModel, temp)
291
+	}
292
+
293
+	//for _, item := range YaofangPurview {
294
+	//	temp := &service.PurviewTreeViewModel{
295
+	//		ID:     item.Id,
296
+	//		PID:    item.Parentid,
297
+	//		Name:   item.Name,
298
+	//		Number: 1,
299
+	//	}
300
+	//	subYaoFangPurviewTreeViewModel = append(subYaoFangPurviewTreeViewModel, temp)
301
+	//}
302
+
303
+	for _, item := range DengjiPurview {
304
+		temp := &service.PurviewTreeViewModel{
305
+			ID:     item.Id,
306
+			PID:    item.Parentid,
307
+			Name:   item.Name,
308
+			Number: 1,
309
+		}
310
+		subDengjiPurviewTreeViewModel = append(subDengjiPurviewTreeViewModel, temp)
311
+	}
312
+
313
+	for _, item := range GongjuPurview {
314
+		temp := &service.PurviewTreeViewModel{
315
+			ID:     item.Id,
316
+			PID:    item.Parentid,
317
+			Name:   item.Name,
318
+			Number: 1,
319
+		}
320
+		subGongJuPurviewTreeViewModel = append(subGongJuPurviewTreeViewModel, temp)
321
+	}
322
+
323
+	for _, item := range ShoufeiPurview {
324
+		temp := &service.PurviewTreeViewModel{
325
+			ID:     item.Id,
326
+			PID:    item.Parentid,
327
+			Name:   item.Name,
328
+			Number: 1,
329
+		}
330
+		subShouFeiPurviewTreeViewModel = append(subShouFeiPurviewTreeViewModel, temp)
331
+	}
276 332
 
277 333
 	for _, item := range outpatientRegistrationPurview {
278 334
 		temp := &service.PurviewTreeViewModel{
@@ -325,7 +381,23 @@ func (this *RoleAPIController) EditPurviewInitData() {
325 381
 		subPurviewTreeViewModelFive = append(subPurviewTreeViewModelFive, temp)
326 382
 	}
327 383
 
384
+	//透析管理
385
+	subOutpatientPurviewTreeViewModel := []*service.PurviewTreeViewModel{}
328 386
 	for _, item := range outpatientRegistration {
387
+		temp := &service.PurviewTreeViewModel{
388
+			ID:     item.Id,
389
+			PID:    item.Parentid,
390
+			Name:   item.Name,
391
+			Number: 1,
392
+		}
393
+		subOutpatientPurviewTreeViewModel = append(subOutpatientPurviewTreeViewModel, temp)
394
+	}
395
+
396
+	for _, item := range subOutpatientPurviewTreeViewModel {
397
+		if item.Name == "押金管理" {
398
+			item.Childs = append(item.Childs, subYajinPurviewTreeViewModel...)
399
+		}
400
+
329 401
 		if item.Name == "门诊挂号" {
330 402
 			item.Childs = append(item.Childs, subPurviewTreeViewModel...)
331 403
 		}
@@ -335,12 +407,30 @@ func (this *RoleAPIController) EditPurviewInitData() {
335 407
 		}
336 408
 
337 409
 		if item.Name == "门诊收费" {
410
+
338 411
 			item.Childs = append(item.Childs, subPurviewTreeViewModelThree...)
339 412
 		}
413
+		//if item.Name == "药房管理" {
414
+		//	item.Childs = append(item.Childs, subYaoFangPurviewTreeViewModel...)
415
+		//}
416
+
417
+		if item.Name == "住院登记" {
418
+			item.Childs = append(item.Childs, subDengjiPurviewTreeViewModel...)
419
+		}
340 420
 
341 421
 		if item.Name == "住院工作站" {
422
+
342 423
 			item.Childs = append(item.Childs, subPurviewTreeViewModelFour...)
343 424
 		}
425
+
426
+		if item.Name == "住院收费" {
427
+			item.Childs = append(item.Childs, subShouFeiPurviewTreeViewModel...)
428
+		}
429
+
430
+		if item.Name == "HIS工具" {
431
+
432
+			item.Childs = append(item.Childs, subGongJuPurviewTreeViewModel...)
433
+		}
344 434
 	}
345 435
 
346 436
 	//电子病历
@@ -643,7 +733,7 @@ func (this *RoleAPIController) EditPurviewInitData() {
643 733
 		PID:    0,
644 734
 		Name:   "门诊管理",
645 735
 		Number: 3,
646
-		Childs: outpatientRegistration,
736
+		Childs: subOutpatientPurviewTreeViewModel,
647 737
 	}
648 738
 	purviews = append(purviews, menzhen)
649 739