|
|
@@ -2164,16 +2164,16 @@ namespace TestUserTypeApi.Controllers
|
|
2164
|
2164
|
#endregion
|
|
2165
|
2165
|
#region 双向转诊模块
|
|
2166
|
2166
|
[HttpGet("gethzinflists")]
|
|
2167
|
|
- public async Task<IActionResult> Gethzinflists(string id)
|
|
|
2167
|
+ public async Task<IActionResult> Gethzinflists(string id,string name )
|
|
2168
|
2168
|
{
|
|
2169
|
2169
|
if (id != null)
|
|
2170
|
2170
|
{
|
|
2171
|
|
- var model = await _IWjzqjsRepository.Get(p => p.id == id);
|
|
|
2171
|
+ var model = await _IHzjbxxRepository.Get(p => p.id == id&& p.isdelete == 0);
|
|
2172
|
2172
|
return Success("成功", model);
|
|
2173
|
2173
|
}
|
|
2174
|
2174
|
else
|
|
2175
|
2175
|
{
|
|
2176
|
|
- var model = await _IWjzqjsRepository.Get(p => p.isdelete == 0);
|
|
|
2176
|
+ var model = await _IHzjbxxRepository.Get(p => p.isdelete == 0&&p.Hzname.Contains(name));
|
|
2177
|
2177
|
return Success("成功", model);
|
|
2178
|
2178
|
}
|
|
2179
|
2179
|
}
|
|
|
@@ -2245,7 +2245,7 @@ namespace TestUserTypeApi.Controllers
|
|
2245
|
2245
|
[HttpGet("upszzy")]
|
|
2246
|
2246
|
public async Task<IActionResult> upSzzy(Model.Dto.Szzys tps)
|
|
2247
|
2247
|
{
|
|
2248
|
|
- Szzys tp = new Szzys();
|
|
|
2248
|
+ Szzys tp =await _ISzzysRepository.GetSingle(p=>p.id==tps.id);
|
|
2249
|
2249
|
tp.id = tps.id;
|
|
2250
|
2250
|
//tp.Szzydjsj = tps.Szzydjsj;//登记时间
|
|
2251
|
2251
|
tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
|
|
|
@@ -2266,7 +2266,7 @@ namespace TestUserTypeApi.Controllers
|
|
2266
|
2266
|
tp.Syzzzrrs = tps.Syzzzrrs;//责任人
|
|
2267
|
2267
|
tp.Syzzzrrss = tps.Syzzzrrss;//责任人
|
|
2268
|
2268
|
tp.isdelete = 0;
|
|
2269
|
|
- var resua = _ISzzysRepository.Update(tp);
|
|
|
2269
|
+ var resua = _ISzzysRepository.UpdateOne(tp);
|
|
2270
|
2270
|
if (resua.Result)
|
|
2271
|
2271
|
{
|
|
2272
|
2272
|
var szzysmode = await _ISzzysRepository.GetSingle(p=>p.id==tps.id);
|
|
|
@@ -2342,16 +2342,23 @@ namespace TestUserTypeApi.Controllers
|
|
2342
|
2342
|
listApp.Add(Builders<Szzys>.Filter.Eq("isdelete", 0));
|
|
2343
|
2343
|
if (!string.IsNullOrWhiteSpace(stardate))
|
|
2344
|
2344
|
{
|
|
2345
|
|
- listApp.Add(Builders<Szzys>.Filter.Gt("Szzydjsj", DateTime.Parse(stardate.Trim() + " 00:00:00")));
|
|
|
2345
|
+ //listApp.Add(Builders<Szzys>.Filter.Gt("Syzysj", DateTime.Parse(stardate.Trim() + " 00:00:00")));
|
|
|
2346
|
+ listApp.Add(Builders<Szzys>.Filter.Where(p=>p.Syzysj >= DateTime.Parse(stardate.Trim() + " 00:00:00")));
|
|
2346
|
2347
|
}
|
|
2347
|
2348
|
if (!string.IsNullOrWhiteSpace(endtime))
|
|
2348
|
2349
|
{
|
|
2349
|
|
- listApp.Add(Builders<Szzys>.Filter.Lt("Szzydjsj", DateTime.Parse(endtime.Trim() + " 23:59:59")));
|
|
|
2350
|
+ //listApp.Add(Builders<Szzys>.Filter.Lt("Syzysj", DateTime.Parse(endtime.Trim() + " 23:59:59")));
|
|
|
2351
|
+ listApp.Add(Builders<Szzys>.Filter.Where(p=>p.Syzysj<= DateTime.Parse(endtime.Trim() + " 23:59:59")));
|
|
2350
|
2352
|
}
|
|
2351
|
2353
|
if (zzdwname != null)
|
|
2352
|
2354
|
{
|
|
|
2355
|
+ var normallistAppor = new List<FilterDefinition<Szzys>>();
|
|
|
2356
|
+
|
|
|
2357
|
+ normallistAppor.Add(Builders<Szzys>.Filter.Where(p => p.Szzyzzdw.Contains(zzdwname)));
|
|
|
2358
|
+ normallistAppor.Add(Builders<Szzys>.Filter.Where(p => p.Hzzyh.Contains(zzdwname)));
|
|
|
2359
|
+ normallistAppor.Add(Builders<Szzys>.Filter.Where(p => p.Hzname.Contains(zzdwname)));
|
|
|
2360
|
+ listApp.Add(Builders<Szzys>.Filter.Or(normallistAppor));
|
|
2353
|
2361
|
//listApp.Add(Builders<Szzys>.Filter.Eq("Szzyzzdw", zzdwname));
|
|
2354
|
|
- listApp.Add(Builders<Szzys>.Filter.Where(p=>p.Szzyzzdw.Contains(zzdwname)));
|
|
2355
|
2362
|
}
|
|
2356
|
2363
|
var filter = Builders<Szzys>.Filter.And(listApp);
|
|
2357
|
2364
|
|
|
|
@@ -2404,7 +2411,95 @@ namespace TestUserTypeApi.Controllers
|
|
2404
|
2411
|
};
|
|
2405
|
2412
|
return Success("成功", obj);
|
|
2406
|
2413
|
}
|
|
|
2414
|
+ /// <summary>
|
|
|
2415
|
+ /// 导出上转住院信息
|
|
|
2416
|
+ /// </summary>
|
|
|
2417
|
+ /// <param name="stardate"></param>
|
|
|
2418
|
+ /// <param name="endtime"></param>
|
|
|
2419
|
+ /// <param name="zzdwname"></param>
|
|
|
2420
|
+ /// <returns></returns>
|
|
|
2421
|
+ [HttpGet("exportexcelszzy")]
|
|
|
2422
|
+ [AllowAnonymous]
|
|
|
2423
|
+ public async Task<IActionResult> ExportExcelAsyncwcode(string stardate, string endtime, string zzdwname)
|
|
|
2424
|
+ {
|
|
|
2425
|
+
|
|
|
2426
|
+ try
|
|
|
2427
|
+ {
|
|
|
2428
|
+ //排序字段
|
|
|
2429
|
+ var sort = Builders<Szzys>.Sort.Descending("Szzydjsj");
|
|
|
2430
|
+ //根据条件查询集合
|
|
|
2431
|
+ var listApp = new List<FilterDefinition<Szzys>>();
|
|
|
2432
|
+ listApp.Add(Builders<Szzys>.Filter.Eq("isdelete", 0));
|
|
|
2433
|
+ if (!string.IsNullOrWhiteSpace(stardate))
|
|
|
2434
|
+ {
|
|
|
2435
|
+ listApp.Add(Builders<Szzys>.Filter.Gt("Syzysj", DateTime.Parse(stardate.Trim() + " 00:00:00")));
|
|
|
2436
|
+ }
|
|
|
2437
|
+ if (!string.IsNullOrWhiteSpace(endtime))
|
|
|
2438
|
+ {
|
|
|
2439
|
+ listApp.Add(Builders<Szzys>.Filter.Lt("Syzysj", DateTime.Parse(endtime.Trim() + " 23:59:59")));
|
|
|
2440
|
+ }
|
|
|
2441
|
+ if (zzdwname != null)
|
|
|
2442
|
+ {
|
|
|
2443
|
+ var normallistAppor = new List<FilterDefinition<Szzys>>();
|
|
2407
|
2444
|
|
|
|
2445
|
+ normallistAppor.Add(Builders<Szzys>.Filter.Where(p => p.Szzyzzdw.Contains(zzdwname)));
|
|
|
2446
|
+ normallistAppor.Add(Builders<Szzys>.Filter.Where(p => p.Hzzyh.Contains(zzdwname)));
|
|
|
2447
|
+ normallistAppor.Add(Builders<Szzys>.Filter.Where(p => p.Hzname.Contains(zzdwname)));
|
|
|
2448
|
+ listApp.Add(Builders<Szzys>.Filter.Or(normallistAppor));
|
|
|
2449
|
+ //listApp.Add(Builders<Szzys>.Filter.Eq("Szzyzzdw", zzdwname));
|
|
|
2450
|
+ }
|
|
|
2451
|
+ var filter = Builders<Szzys>.Filter.And(listApp);
|
|
|
2452
|
+
|
|
|
2453
|
+ var lists = await _ISzzysRepository.Get(filter);
|
|
|
2454
|
+
|
|
|
2455
|
+ List<Model.Dto.exportexcelszzy> list = new List<Model.Dto.exportexcelszzy>();
|
|
|
2456
|
+ foreach (var item in lists)
|
|
|
2457
|
+ {
|
|
|
2458
|
+ Model.Dto.exportexcelszzy model = new Model.Dto.exportexcelszzy();
|
|
|
2459
|
+ model.Szzydjsj = item.Szzydjsj!=null ? item.Szzydjsj : null;//DateTime.ParseExact("2013-11-17T11:59:22+08:00","yyyy-MM-ddTHH:mm:ss+08:00",null)
|
|
|
2460
|
+ model.Szzyzzdw =item.Szzyzzdw != null ? item.Szzyzzdw.ToString() : "";
|
|
|
2461
|
+ model.Szzyzzys =item.Szzyzzys != null ? item.Szzyzzys.ToString() : "";
|
|
|
2462
|
+ model.Yslxfs =item.Yslxfs != null ? item.Yslxfs.ToString() : "";
|
|
|
2463
|
+ model.Hzname =item.Hzname != null ? item.Hzname.ToString() : "";
|
|
|
2464
|
+ model.HzGender =item.HzGender != null ? item.HzGender.ToString() : "";
|
|
|
2465
|
+ model.Hzage =item.Hzage != null ? item.Hzage.ToString() : "";
|
|
|
2466
|
+ model.Hzzd =item.Hzzd != null ? item.Hzzd.ToString() : "";
|
|
|
2467
|
+ model.Hzzyks =item.Hzzyks != null ? item.Hzzyks.ToString() : "";
|
|
|
2468
|
+ model.Hzzyh =item.Hzzyh != null ? item.Hzzyh.ToString() : "";
|
|
|
2469
|
+ model.Hzlxfs =item.Hzlxfs != null ? item.Hzlxfs.ToString() : "";
|
|
|
2470
|
+ model.Syzzzzmd =item.Syzzzzmd != null ? item.Syzzzzmd.ToString() : "";
|
|
|
2471
|
+ model.Syzysj =item.Syzysj != null ? item.Syzysj : null;
|
|
|
2472
|
+ model.Syzyfy =item.Syzyfy != null ? item.Syzyfy.ToString() : "";
|
|
|
2473
|
+ model.Syzzzrr =item.Syzzzrr != null ? item.Syzzzrr.ToString() : "";
|
|
|
2474
|
+ model.Syzzzzfw =item.Syzzzzfw != null ? item.Syzzzzfw.ToString() : "";
|
|
|
2475
|
+ model.Syzzzrrs = item.Syzzzrrs != null ? item.Syzzzrrs.ToString() : "";
|
|
|
2476
|
+ list.Add(model);
|
|
|
2477
|
+ }
|
|
|
2478
|
+ NPOIHelper npoi = new NPOIHelper();
|
|
|
2479
|
+ var tb = ModelConvertHelper<Szzys>.ListToTable(list,null);
|
|
|
2480
|
+ if (tb != null)
|
|
|
2481
|
+ {
|
|
|
2482
|
+ //导出dtnew
|
|
|
2483
|
+ string[] cols = { "登记时间","转诊单位","转诊医师","联系方式","患者姓名","患者性别","患者年龄","患者诊断","住院科室","住院号","联系方式","转诊目的","住院时间","住院费用","责任人","诊中服务","责任人" };
|
|
|
2484
|
+
|
|
|
2485
|
+ byte[] sm = npoi.ExportToExcel1(tb, cols);
|
|
|
2486
|
+ if (sm != null)
|
|
|
2487
|
+ {
|
|
|
2488
|
+ return File(sm, "application/vnd.ms-excel", "上转住院.xlsx");
|
|
|
2489
|
+ }
|
|
|
2490
|
+ else
|
|
|
2491
|
+ {
|
|
|
2492
|
+ return Error("导出失败");
|
|
|
2493
|
+ }
|
|
|
2494
|
+ }
|
|
|
2495
|
+ return Error("没有数据");
|
|
|
2496
|
+ }
|
|
|
2497
|
+ catch (Exception ex)
|
|
|
2498
|
+ {
|
|
|
2499
|
+ _logger.LogError(ex, "导出异常");
|
|
|
2500
|
+ return Error("导出失败");
|
|
|
2501
|
+ }
|
|
|
2502
|
+ }
|
|
2408
|
2503
|
|
|
2409
|
2504
|
#endregion
|
|
2410
|
2505
|
#region 上转门诊
|
|
|
@@ -2472,7 +2567,7 @@ namespace TestUserTypeApi.Controllers
|
|
2472
|
2567
|
[HttpGet("upszmzs")]
|
|
2473
|
2568
|
public async Task<IActionResult> upSzmzs(Model.Dto.Szmzs tps)
|
|
2474
|
2569
|
{
|
|
2475
|
|
- Szmzs tp = new Szmzs();
|
|
|
2570
|
+ Szmzs tp =await _ISzmzsRepository.GetSingle(p=>p.id==tps.id);
|
|
2476
|
2571
|
tp.id = tps.id;
|
|
2477
|
2572
|
//tp.Szzydjsj = tps.Szzydjsj;//登记时间
|
|
2478
|
2573
|
tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
|
|
|
@@ -2496,7 +2591,7 @@ namespace TestUserTypeApi.Controllers
|
|
2496
|
2591
|
var resua = _ISzmzsRepository.Update(tp);
|
|
2497
|
2592
|
if (resua.Result)
|
|
2498
|
2593
|
{
|
|
2499
|
|
- var szzysmode = await _ISzzysRepository.GetSingle(p => p.id == tps.id);
|
|
|
2594
|
+ var szzysmode = await _ISzmzsRepository.GetSingle(p => p.id == tps.id);
|
|
2500
|
2595
|
var hzinfomodel = await _IHzjbxxRepository.GetSingle(p => p.Hzname == szzysmode.Hzname && p.HzGender == szzysmode.HzGender && p.Hzage == szzysmode.Hzage && p.Hzzd == szzysmode.Hzzd && p.Hzlxfs == szzysmode.Hzlxfs);
|
|
2501
|
2596
|
if (hzinfomodel != null)
|
|
2502
|
2597
|
{
|
|
|
@@ -2565,17 +2660,22 @@ namespace TestUserTypeApi.Controllers
|
|
2565
|
2660
|
//根据条件查询集合
|
|
2566
|
2661
|
var listApp = new List<FilterDefinition<Szmzs>>();
|
|
2567
|
2662
|
listApp.Add(Builders<Szmzs>.Filter.Eq("isdelete", 0));
|
|
|
2663
|
+
|
|
2568
|
2664
|
if (!string.IsNullOrWhiteSpace(stardate))
|
|
2569
|
2665
|
{
|
|
2570
|
|
- listApp.Add(Builders<Szmzs>.Filter.Gt("Szzydjsj", DateTime.Parse(stardate.Trim() + " 00:00:00")));
|
|
|
2666
|
+ listApp.Add(Builders<Szmzs>.Filter.Where(p => p.Szzydjsj >= DateTime.Parse(stardate.Trim() + " 00:00:00")));
|
|
2571
|
2667
|
}
|
|
2572
|
2668
|
if (!string.IsNullOrWhiteSpace(endtime))
|
|
2573
|
2669
|
{
|
|
2574
|
|
- listApp.Add(Builders<Szmzs>.Filter.Lt("Szzydjsj", DateTime.Parse(endtime.Trim() + " 23:59:59")));
|
|
|
2670
|
+ listApp.Add(Builders<Szmzs>.Filter.Where(p => p.Szzydjsj <= DateTime.Parse(endtime.Trim() + " 23:59:59")));
|
|
2575
|
2671
|
}
|
|
2576
|
2672
|
if (zzdwname != null)
|
|
2577
|
2673
|
{
|
|
2578
|
|
- listApp.Add(Builders<Szmzs>.Filter.Eq("Szzyzzdw", zzdwname));
|
|
|
2674
|
+ var normallistAppor = new List<FilterDefinition<Szmzs>>();
|
|
|
2675
|
+
|
|
|
2676
|
+ normallistAppor.Add(Builders<Szmzs>.Filter.Where(p => p.Szzyzzdw.Contains(zzdwname)));
|
|
|
2677
|
+ normallistAppor.Add(Builders<Szmzs>.Filter.Where(p => p.Hzname.Contains(zzdwname)));
|
|
|
2678
|
+ listApp.Add(Builders<Szmzs>.Filter.Or(normallistAppor));
|
|
2579
|
2679
|
}
|
|
2580
|
2680
|
var filter = Builders<Szmzs>.Filter.And(listApp);
|
|
2581
|
2681
|
|
|
|
@@ -2586,7 +2686,7 @@ namespace TestUserTypeApi.Controllers
|
|
2586
|
2686
|
{
|
|
2587
|
2687
|
var countlis = 0;
|
|
2588
|
2688
|
//根据患者名称查找条数
|
|
2589
|
|
- var listcounts = _ISzzysRepository.Get(p => p.Hzname == item.Hzname);
|
|
|
2689
|
+ var listcounts = _ISzmzsRepository.Get(p => p.Hzname == item.Hzname);
|
|
2590
|
2690
|
if (listcounts != null)
|
|
2591
|
2691
|
{
|
|
2592
|
2692
|
if (listcounts.Result.Count() > 1)
|
|
|
@@ -2689,7 +2789,7 @@ namespace TestUserTypeApi.Controllers
|
|
2689
|
2789
|
[HttpGet("upszjcs")]
|
|
2690
|
2790
|
public async Task<IActionResult> upSzjcs(Model.Dto.Szjcs tps)
|
|
2691
|
2791
|
{
|
|
2692
|
|
- Szjcs tp = new Szjcs();
|
|
|
2792
|
+ Szjcs tp = await _ISzjcsRepository.GetSingle(p => p.id == tps.id);
|
|
2693
|
2793
|
tp.id = tps.id;
|
|
2694
|
2794
|
//tp.Szzydjsj = tps.Szzydjsj;//登记时间
|
|
2695
|
2795
|
tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
|
|
|
@@ -2706,8 +2806,8 @@ namespace TestUserTypeApi.Controllers
|
|
2706
|
2806
|
var resua = _ISzjcsRepository.Update(tp);
|
|
2707
|
2807
|
if (resua.Result)
|
|
2708
|
2808
|
{
|
|
2709
|
|
- var szzysmode = await _ISzzysRepository.GetSingle(p => p.id == tps.id);
|
|
2710
|
|
- var hzinfomodel = await _IHzjbxxRepository.GetSingle(p => p.Hzname == szzysmode.Hzname && p.HzGender == szzysmode.HzGender && p.Hzage == szzysmode.Hzage && p.Hzzd == szzysmode.Hzzd && p.Hzlxfs == szzysmode.Hzlxfs);
|
|
|
2809
|
+ var szzysmode = await _ISzjcsRepository.GetSingle(p => p.id == tps.id);
|
|
|
2810
|
+ var hzinfomodel = await _IHzjbxxRepository.GetSingle(p => p.Hzname == szzysmode.Hzname && p.HzGender == szzysmode.HzGender && p.Hzage == szzysmode.Hzage && p.Hzzd == "" && p.Hzlxfs == szzysmode.Hzlxfs);
|
|
2711
|
2811
|
if (hzinfomodel != null)
|
|
2712
|
2812
|
{
|
|
2713
|
2813
|
//患者信息
|
|
|
@@ -2777,15 +2877,19 @@ namespace TestUserTypeApi.Controllers
|
|
2777
|
2877
|
listApp.Add(Builders<Szjcs>.Filter.Eq("isdelete", 0));
|
|
2778
|
2878
|
if (!string.IsNullOrWhiteSpace(stardate))
|
|
2779
|
2879
|
{
|
|
2780
|
|
- listApp.Add(Builders<Szjcs>.Filter.Gt("Szzydjsj", DateTime.Parse(stardate.Trim() + " 00:00:00")));
|
|
|
2880
|
+ listApp.Add(Builders<Szjcs>.Filter.Where(p => p.Szzydjsj >= DateTime.Parse(stardate.Trim() + " 00:00:00")));
|
|
2781
|
2881
|
}
|
|
2782
|
2882
|
if (!string.IsNullOrWhiteSpace(endtime))
|
|
2783
|
2883
|
{
|
|
2784
|
|
- listApp.Add(Builders<Szjcs>.Filter.Lt("Szzydjsj", DateTime.Parse(endtime.Trim() + " 23:59:59")));
|
|
|
2884
|
+ listApp.Add(Builders<Szjcs>.Filter.Where(p => p.Szzydjsj <= DateTime.Parse(endtime.Trim() + " 23:59:59")));
|
|
2785
|
2885
|
}
|
|
2786
|
2886
|
if (zzdwname != null)
|
|
2787
|
2887
|
{
|
|
2788
|
|
- listApp.Add(Builders<Szjcs>.Filter.Eq("Szzyzzdw", zzdwname));
|
|
|
2888
|
+ var normallistAppor = new List<FilterDefinition<Szjcs>>();
|
|
|
2889
|
+
|
|
|
2890
|
+ normallistAppor.Add(Builders<Szjcs>.Filter.Where(p => p.Szzyzzdw.Contains(zzdwname)));
|
|
|
2891
|
+ normallistAppor.Add(Builders<Szjcs>.Filter.Where(p => p.Hzname.Contains(zzdwname)));
|
|
|
2892
|
+ listApp.Add(Builders<Szjcs>.Filter.Or(normallistAppor));
|
|
2789
|
2893
|
}
|
|
2790
|
2894
|
var filter = Builders<Szjcs>.Filter.And(listApp);
|
|
2791
|
2895
|
|
|
|
@@ -2796,7 +2900,7 @@ namespace TestUserTypeApi.Controllers
|
|
2796
|
2900
|
{
|
|
2797
|
2901
|
var countlis = 0;
|
|
2798
|
2902
|
//根据患者名称查找条数
|
|
2799
|
|
- var listcounts = _ISzzysRepository.Get(p => p.Hzname == item.Hzname);
|
|
|
2903
|
+ var listcounts = _ISzjcsRepository.Get(p => p.Hzname == item.Hzname);
|
|
2800
|
2904
|
if (listcounts != null)
|
|
2801
|
2905
|
{
|
|
2802
|
2906
|
if (listcounts.Result.Count() > 1)
|
|
|
@@ -2889,7 +2993,7 @@ namespace TestUserTypeApi.Controllers
|
|
2889
|
2993
|
[HttpGet("upxzzls")]
|
|
2890
|
2994
|
public async Task<IActionResult> upXzzls(Model.Dto.Xzzls tps)
|
|
2891
|
2995
|
{
|
|
2892
|
|
- Xzzls tp = new Xzzls();
|
|
|
2996
|
+ Xzzls tp = await _IXzzlsRepository.GetSingle(p=>p.id==tps.id);
|
|
2893
|
2997
|
tp.id = tps.id;
|
|
2894
|
2998
|
//tp.Szzydjsj = tps.Szzydjsj;//登记时间
|
|
2895
|
2999
|
tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
|
|
|
@@ -2987,7 +3091,11 @@ namespace TestUserTypeApi.Controllers
|
|
2987
|
3091
|
}
|
|
2988
|
3092
|
if (zzdwname != null)
|
|
2989
|
3093
|
{
|
|
2990
|
|
- listApp.Add(Builders<Xzzls>.Filter.Eq("Szzyzzdw", zzdwname));
|
|
|
3094
|
+ var normallistAppor = new List<FilterDefinition<Xzzls>>();
|
|
|
3095
|
+
|
|
|
3096
|
+ normallistAppor.Add(Builders<Xzzls>.Filter.Where(p => p.Szzyzzdw.Contains(zzdwname)));
|
|
|
3097
|
+ normallistAppor.Add(Builders<Xzzls>.Filter.Where(p => p.Hzname.Contains(zzdwname)));
|
|
|
3098
|
+ listApp.Add(Builders<Xzzls>.Filter.Or(normallistAppor));
|
|
2991
|
3099
|
}
|
|
2992
|
3100
|
var filter = Builders<Xzzls>.Filter.And(listApp);
|
|
2993
|
3101
|
|
|
|
@@ -2998,7 +3106,7 @@ namespace TestUserTypeApi.Controllers
|
|
2998
|
3106
|
{
|
|
2999
|
3107
|
var countlis = 0;
|
|
3000
|
3108
|
//根据患者名称查找条数
|
|
3001
|
|
- var listcounts = _ISzzysRepository.Get(p => p.Hzname == item.Hzname);
|
|
|
3109
|
+ var listcounts = _IXzzlsRepository.Get(p => p.Hzname == item.Hzname);
|
|
3002
|
3110
|
if (listcounts != null)
|
|
3003
|
3111
|
{
|
|
3004
|
3112
|
if (listcounts.Result.Count() > 1)
|
|
|
@@ -3099,7 +3207,7 @@ namespace TestUserTypeApi.Controllers
|
|
3099
|
3207
|
[HttpGet("upxzzys")]
|
|
3100
|
3208
|
public async Task<IActionResult> upXzzys(Model.Dto.Xzzys tps)
|
|
3101
|
3209
|
{
|
|
3102
|
|
- Xzzys tp = new Xzzys();
|
|
|
3210
|
+ Xzzys tp = await _IXzzysRepository.GetSingle(p=>p.id==tps.id);
|
|
3103
|
3211
|
tp.id = tps.id;
|
|
3104
|
3212
|
//tp.Szzydjsj = tps.Szzydjsj;//登记时间
|
|
3105
|
3213
|
tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
|
|
|
@@ -3203,7 +3311,11 @@ namespace TestUserTypeApi.Controllers
|
|
3203
|
3311
|
}
|
|
3204
|
3312
|
if (zzdwname != null)
|
|
3205
|
3313
|
{
|
|
3206
|
|
- listApp.Add(Builders<Xzzys>.Filter.Eq("Szzyzzdw", zzdwname));
|
|
|
3314
|
+ var normallistAppor = new List<FilterDefinition<Xzzys>>();
|
|
|
3315
|
+
|
|
|
3316
|
+ normallistAppor.Add(Builders<Xzzys>.Filter.Where(p => p.Szzyzzdw.Contains(zzdwname)));
|
|
|
3317
|
+ normallistAppor.Add(Builders<Xzzys>.Filter.Where(p => p.Hzname.Contains(zzdwname)));
|
|
|
3318
|
+ listApp.Add(Builders<Xzzys>.Filter.Or(normallistAppor));
|
|
3207
|
3319
|
}
|
|
3208
|
3320
|
var filter = Builders<Xzzys>.Filter.And(listApp);
|
|
3209
|
3321
|
|
|
|
@@ -3320,7 +3432,7 @@ namespace TestUserTypeApi.Controllers
|
|
3320
|
3432
|
[HttpGet("upwjzqjs")]
|
|
3321
|
3433
|
public async Task<IActionResult> upWjzqjs(Model.Dto.Wjzqjs tps)
|
|
3322
|
3434
|
{
|
|
3323
|
|
- Wjzqjs tp = new Wjzqjs();
|
|
|
3435
|
+ Wjzqjs tp = await _IWjzqjsRepository.GetSingle(p=>p.id==tps.id);
|
|
3324
|
3436
|
tp.id = tps.id;
|
|
3325
|
3437
|
//tp.Szzydjsj = tps.Szzydjsj;//登记时间
|
|
3326
|
3438
|
tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
|
|
|
@@ -3423,7 +3535,12 @@ namespace TestUserTypeApi.Controllers
|
|
3423
|
3535
|
}
|
|
3424
|
3536
|
if (zzdwname != null)
|
|
3425
|
3537
|
{
|
|
3426
|
|
- listApp.Add(Builders<Wjzqjs>.Filter.Eq("Szzyzzdw", zzdwname));
|
|
|
3538
|
+ var normallistAppor = new List<FilterDefinition<Wjzqjs>>();
|
|
|
3539
|
+
|
|
|
3540
|
+ normallistAppor.Add(Builders<Wjzqjs>.Filter.Where(p => p.Szzyzzdw.Contains(zzdwname)));
|
|
|
3541
|
+ normallistAppor.Add(Builders<Wjzqjs>.Filter.Where(p => p.Hzzyh.Contains(zzdwname)));
|
|
|
3542
|
+ normallistAppor.Add(Builders<Wjzqjs>.Filter.Where(p => p.Hzname.Contains(zzdwname)));
|
|
|
3543
|
+ listApp.Add(Builders<Wjzqjs>.Filter.Or(normallistAppor));
|
|
3427
|
3544
|
}
|
|
3428
|
3545
|
var filter = Builders<Wjzqjs>.Filter.And(listApp);
|
|
3429
|
3546
|
|
|
|
@@ -3434,7 +3551,7 @@ namespace TestUserTypeApi.Controllers
|
|
3434
|
3551
|
{
|
|
3435
|
3552
|
var countlis = 0;
|
|
3436
|
3553
|
//根据患者名称查找条数
|
|
3437
|
|
- var listcounts = _ISzzysRepository.Get(p => p.Hzname == item.Hzname);
|
|
|
3554
|
+ var listcounts = _IWjzqjsRepository.Get(p => p.Hzname == item.Hzname);
|
|
3438
|
3555
|
if (listcounts != null)
|
|
3439
|
3556
|
{
|
|
3440
|
3557
|
if (listcounts.Result.Count() > 1)
|
|
|
@@ -3514,7 +3631,7 @@ namespace TestUserTypeApi.Controllers
|
|
3514
|
3631
|
[HttpGet("upbbsqs")]
|
|
3515
|
3632
|
public async Task<IActionResult> upBbsqs(Model.Dto.Bbsqs tps)
|
|
3516
|
3633
|
{
|
|
3517
|
|
- Bbsqs tp = new Bbsqs();
|
|
|
3634
|
+ Bbsqs tp = await _IBbsqsRepository.GetSingle(p => p.id == tps.id); ;
|
|
3518
|
3635
|
tp.id = tps.id;
|
|
3519
|
3636
|
//tp.Szzydjsj = tps.Szzydjsj;//登记时间
|
|
3520
|
3637
|
tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
|
|
|
@@ -3591,7 +3708,11 @@ namespace TestUserTypeApi.Controllers
|
|
3591
|
3708
|
}
|
|
3592
|
3709
|
if (zzdwname != null)
|
|
3593
|
3710
|
{
|
|
3594
|
|
- listApp.Add(Builders<Bbsqs>.Filter.Eq("Szzyzzdw", zzdwname));
|
|
|
3711
|
+ var normallistAppor = new List<FilterDefinition<Bbsqs>>();
|
|
|
3712
|
+
|
|
|
3713
|
+ normallistAppor.Add(Builders<Bbsqs>.Filter.Where(p => p.Szzyzzdw.Contains(zzdwname)));
|
|
|
3714
|
+ normallistAppor.Add(Builders<Bbsqs>.Filter.Where(p => p.Hzname.Contains(zzdwname)));
|
|
|
3715
|
+ listApp.Add(Builders<Bbsqs>.Filter.Or(normallistAppor));
|
|
3595
|
3716
|
}
|
|
3596
|
3717
|
var filter = Builders<Bbsqs>.Filter.And(listApp);
|
|
3597
|
3718
|
|
|
|
@@ -3661,7 +3782,7 @@ namespace TestUserTypeApi.Controllers
|
|
3661
|
3782
|
[HttpGet("uphzaps")]
|
|
3662
|
3783
|
public async Task<IActionResult> upHzaps(Model.Dto.Hzaps tps)
|
|
3663
|
3784
|
{
|
|
3664
|
|
- Hzaps tp = new Hzaps();
|
|
|
3785
|
+ Hzaps tp =await _IHzapsRepository.GetSingle(p=>p.id==tps.id);
|
|
3665
|
3786
|
tp.id = tps.id;
|
|
3666
|
3787
|
tp.Hzsj = tps.Hzsj;//会诊时间
|
|
3667
|
3788
|
tp.Sqhzjg = tps.Sqhzjg;//申请会诊机构
|
|
|
@@ -3934,7 +4055,7 @@ namespace TestUserTypeApi.Controllers
|
|
3934
|
4055
|
[HttpGet("upyyzls")]
|
|
3935
|
4056
|
public async Task<IActionResult> upYyzls(Model.Dto.Yyzls tps)
|
|
3936
|
4057
|
{
|
|
3937
|
|
- Yyzls tp = new Yyzls();
|
|
|
4058
|
+ Yyzls tp = await _IYyzlsRepository.GetSingle(p=>p.id==tps.id);
|
|
3938
|
4059
|
tp.id = tps.id;
|
|
3939
|
4060
|
// tp.Szzydjsj = tps.Szzydjsj;//登记日期
|
|
3940
|
4061
|
tp.Szzyyydw = tps.Szzyyydw;//预约单位
|