You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

663 lines
28 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. using Microsoft.EntityFrameworkCore;
  2. using Shentun.Peis.Enums;
  3. using Shentun.Peis.Models;
  4. using Shentun.Peis.PatientRegisters;
  5. using Shentun.Peis.RegisterAsbitems;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Xml.Linq;
  12. using Volo.Abp.Domain.Repositories;
  13. using Volo.Abp.Uow;
  14. using Xunit;
  15. using Xunit.Abstractions;
  16. namespace Shentun.Peis
  17. {
  18. public class PatientRegisterAppServiceTest : PeisApplicationTestBase
  19. {
  20. private readonly IRepository<PatientRegister> _repository;
  21. private readonly IRepository<MedicalPackageDetail> _medicalPackageDetailRepository;
  22. private readonly PatientRegisterAppService _appService;
  23. private readonly ITestOutputHelper _output;
  24. private readonly IUnitOfWorkManager _unitOfWorkManager;
  25. public PatientRegisterAppServiceTest(ITestOutputHelper testOutputHelper)
  26. {
  27. _output = testOutputHelper;
  28. _unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
  29. _repository = GetRequiredService<IRepository<PatientRegister>>();
  30. _medicalPackageDetailRepository = GetRequiredService<IRepository<MedicalPackageDetail>>();
  31. _appService = GetRequiredService<PatientRegisterAppService>();
  32. }
  33. [Fact]
  34. public async Task CreatePatientRegisterAsync()
  35. {
  36. for (var i = 0; i < 3; i++)
  37. {
  38. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  39. {
  40. var entity = new CreatePatientRegisterDto()
  41. {
  42. MedicalCenterId = new Guid("0de5b78a-731d-4f80-b262-655ebbf04581"),
  43. //PatientId = new Guid("3a119be6-d9aa-2e13-a764-0b363c60169d"),
  44. CustomerOrgId = new Guid("00000000-0000-0000-0000-000000000001"),
  45. CustomerOrgRegisterId = new Guid("00000000-0000-0000-0000-000000000001"),
  46. PatientName = "test",
  47. SexId = SexFlag.UnKnown,
  48. BirthDate = null,
  49. Age = 38,
  50. Telephone = "010-0000001",
  51. MobileTelephone = "18911254911",
  52. JobCardNo = "jobCardNo",
  53. MedicalCardNo = "MedicalCardNo",
  54. MaritalStatusId = MaritalStatusFlag.Married,
  55. //MedicalTypeId = new Guid("3a0c5093-6dbf-d29b-cfbc-b1f742ee59d3"),
  56. //PersonnelTypeId = new Guid("3a0c5099-a5f3-e41a-dfab-caeae79e0dfe"),
  57. NationId = "001",
  58. JobPost = "JobPost",
  59. JobTitle = "JobTitle",
  60. Salesman = "Salesman",
  61. //SexHormoneTermId = new Guid("3a0d38cf-8b3c-95db-1a69-5119f28dc468"),
  62. //MedicalConclusionId = new Guid("3a0c50fe-cacf-d3c8-8c3c-9d3495d8bd76"),
  63. IsUpload = 'N',
  64. CompleteFlag = PatientRegisterCompleteFlag.PreRegistration,
  65. IsMedicalStart = 'N',
  66. MedicalStartDate = null,
  67. IsRecoverGuide = 'N',
  68. SummaryDate = null,
  69. IsAudit = 'N',
  70. IsLock = 'N',
  71. IsNameHide = 'N',
  72. IsPhoneFollow = 'N',
  73. IsVip = 'N',
  74. Remark = "Remark",
  75. Address = "Address1",
  76. Email = "83986010@qq.com"
  77. };
  78. //entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  79. //{
  80. // AsbitemId = new Guid("3a0c657d-4e73-9bab-68da-56ab2f088bb1"),
  81. // StandardPrice = 10,
  82. // ChargePrice = 10,
  83. // Amount = 1,
  84. // PayTypeFlag = PayTypeFlag.PersonPay,
  85. // IsCharge = 'N'
  86. //});
  87. //entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  88. //{
  89. // AsbitemId = new Guid("3a0c5616-dab2-c209-f099-a6231ef57ac3"),
  90. // StandardPrice = 10,
  91. // ChargePrice = 10,
  92. // Amount = 1,
  93. // PayTypeFlag = PayTypeFlag.PersonPay,
  94. // IsCharge = 'N'
  95. //});
  96. //entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  97. //{
  98. // AsbitemId = new Guid("3a0c55f0-92b7-caa6-3fc3-f9f04ca45ad3"),
  99. // StandardPrice = 10,
  100. // ChargePrice = 10,
  101. // Amount = 1,
  102. // PayTypeFlag = PayTypeFlag.PersonPay,
  103. // IsCharge = 'N'
  104. //});
  105. //entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  106. //{
  107. // AsbitemId = new Guid("3a0c55fa-63b9-1510-3e81-20750c496d44"),
  108. // StandardPrice = 10,
  109. // ChargePrice = 10,
  110. // Amount = 1,
  111. // PayTypeFlag = PayTypeFlag.PersonPay,
  112. // IsCharge = 'N'
  113. //});
  114. //entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  115. //{
  116. // AsbitemId = new Guid("3a0c55fe-559e-d6e7-7f74-221edeeaf817"),
  117. // StandardPrice = 10,
  118. // ChargePrice = 10,
  119. // Amount = 1,
  120. // PayTypeFlag = PayTypeFlag.PersonPay,
  121. // IsCharge = 'N'
  122. //});
  123. var newEntity = await _appService.CreatePatientRegisterAsync(entity);
  124. await unitOfWork.CompleteAsync();
  125. }
  126. }
  127. }
  128. [Fact]
  129. public async Task CreatePatientRegisterByMedicalPackageAsync()
  130. {
  131. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  132. {
  133. var entity = new CreatePatientRegisterDto()
  134. {
  135. //PatientRegisterId = new Guid("3a11abec-a6aa-e656-16db-cb0bccf8de46"),
  136. MedicalCenterId = new Guid("68f2d834-2bf0-4978-ad54-d2133c12a333"),
  137. PatientId = new Guid("3a119be6-d9aa-2e13-a764-0b363c60169d"),
  138. CustomerOrgId = new Guid("00000000-0000-0000-0000-000000000001"),
  139. CustomerOrgRegisterId = new Guid("00000000-0000-0000-0000-000000000001"),
  140. PatientName = "test",
  141. SexId = SexFlag.UnKnown,
  142. BirthDate = null,
  143. Age = 38,
  144. Telephone = "010-0000001",
  145. MobileTelephone = "18911254911",
  146. JobCardNo = "jobCardNo",
  147. MedicalCardNo = "MedicalCardNo",
  148. MaritalStatusId = MaritalStatusFlag.Married,
  149. MedicalTypeId = new Guid("3a0c5093-6dbf-d29b-cfbc-b1f742ee59d3"),
  150. PersonnelTypeId = new Guid("3a0c5099-a5f3-e41a-dfab-caeae79e0dfe"),
  151. NationId = "001",
  152. JobPost = "JobPost",
  153. JobTitle = "JobTitle",
  154. Salesman = "Salesman",
  155. SexHormoneTermId = new Guid("3a0d38cf-8b3c-95db-1a69-5119f28dc468"),
  156. MedicalConclusionId = new Guid("3a0c50fe-cacf-d3c8-8c3c-9d3495d8bd76"),
  157. IsUpload = 'N',
  158. CompleteFlag = PatientRegisterCompleteFlag.PreRegistration,
  159. IsMedicalStart = 'N',
  160. MedicalStartDate = null,
  161. IsRecoverGuide = 'N',
  162. SummaryDate = null,
  163. IsAudit = 'N',
  164. IsLock = 'N',
  165. IsNameHide = 'N',
  166. IsPhoneFollow = 'N',
  167. IsVip = 'N',
  168. Remark = "Remark",
  169. Address = "Address1",
  170. Email = "83986010@qq.com"
  171. };
  172. var medicalPackageId = new Guid("3a0c51d4-2c5a-2a05-e4c4-e335012617be");
  173. entity.MedicalPackageId = medicalPackageId;
  174. var medicalPackageDetails = (await _medicalPackageDetailRepository.GetQueryableAsync()).Include(o => o.Asbitem).Where(o => o.MedicalPackageId == medicalPackageId).ToList();
  175. foreach (var medicalPackageDetail in medicalPackageDetails)
  176. {
  177. var registerCheckAsbitem = new CreatePatientRegisterRegisterCheckAsbitem()
  178. {
  179. AsbitemId = medicalPackageDetail.AsbitemId,
  180. StandardPrice = medicalPackageDetail.Asbitem.Price,
  181. ChargePrice = medicalPackageDetail.Asbitem.Price,
  182. Amount = 1,
  183. PayTypeFlag = PayTypeFlag.PersonPay,
  184. IsCharge = 'N'
  185. };
  186. entity.RegisterCheckAsbitems.Add(registerCheckAsbitem);
  187. }
  188. var newEntity = await _appService.CreatePatientRegisterAsync(entity);
  189. await unitOfWork.CompleteAsync();
  190. }
  191. }
  192. [Fact]
  193. public async Task UpdatePatientRegisterAsync()
  194. {
  195. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  196. {
  197. var entity = new CreatePatientRegisterDto()
  198. {
  199. PatientRegisterId = new Guid("3a11abec-a6aa-e656-16db-cb0bccf8de46"),
  200. MedicalCenterId = new Guid("68f2d834-2bf0-4978-ad54-d2133c12a333"),
  201. PatientId = new Guid("3a119be6-d9aa-2e13-a764-0b363c60169d"),
  202. CustomerOrgId = new Guid("00000000-0000-0000-0000-000000000001"),
  203. CustomerOrgRegisterId = new Guid("00000000-0000-0000-0000-000000000001"),
  204. PatientName = "test",
  205. SexId = SexFlag.UnKnown,
  206. BirthDate = null,
  207. Age = 38,
  208. Telephone = "010-0000001",
  209. MobileTelephone = "18911254911",
  210. JobCardNo = "jobCardNo",
  211. MedicalCardNo = "MedicalCardNo",
  212. MaritalStatusId = MaritalStatusFlag.Married,
  213. MedicalTypeId = new Guid("3a0c5093-6dbf-d29b-cfbc-b1f742ee59d3"),
  214. PersonnelTypeId = new Guid("3a0c5099-a5f3-e41a-dfab-caeae79e0dfe"),
  215. NationId = "001",
  216. JobPost = "JobPost",
  217. JobTitle = "JobTitle",
  218. Salesman = "Salesman",
  219. SexHormoneTermId = new Guid("3a0d38cf-8b3c-95db-1a69-5119f28dc468"),
  220. MedicalConclusionId = new Guid("3a0c50fe-cacf-d3c8-8c3c-9d3495d8bd76"),
  221. IsUpload = 'N',
  222. CompleteFlag = PatientRegisterCompleteFlag.PreRegistration,
  223. IsMedicalStart = 'N',
  224. MedicalStartDate = null,
  225. IsRecoverGuide = 'N',
  226. SummaryDate = null,
  227. IsAudit = 'N',
  228. IsLock = 'N',
  229. IsNameHide = 'N',
  230. IsPhoneFollow = 'N',
  231. IsVip = 'N',
  232. Remark = "Remark",
  233. Address = "Address1",
  234. Email = "83986010@qq.com"
  235. };
  236. entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  237. {
  238. Id = new Guid("3a11caa1-9fb2-27f8-22f9-ec1e272567e0"),
  239. AsbitemId = new Guid("3a0c54c8-7a9b-3603-ce81-40f3b97b7637"),
  240. StandardPrice = (decimal)10.85,
  241. ChargePrice = (decimal)10.51,
  242. Amount = 2,
  243. PayTypeFlag = PayTypeFlag.PersonPay,
  244. IsCharge = 'N'
  245. });
  246. entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  247. {
  248. Id = new Guid("3a11caa1-9fb2-38dd-03f1-bb9cd995961c"),
  249. AsbitemId = new Guid("3a0c55fa-63b9-1510-3e81-20750c496d44"),
  250. StandardPrice = 20,
  251. ChargePrice = 20,
  252. Amount = 1,
  253. PayTypeFlag = PayTypeFlag.PersonPay,
  254. IsCharge = 'N'
  255. });
  256. entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  257. {
  258. Id = new Guid("3a11caa1-9fb2-5a05-ec0c-ed3c6c0f37c0"),
  259. AsbitemId = new Guid("3a0c55fe-559e-d6e7-7f74-221edeeaf817"),
  260. StandardPrice = 30,
  261. ChargePrice = 30,
  262. Amount = 1,
  263. PayTypeFlag = PayTypeFlag.PersonPay,
  264. IsCharge = 'N'
  265. });
  266. entity.RegisterCheckAsbitems.Add(new CreatePatientRegisterRegisterCheckAsbitem()
  267. {
  268. //Id = new Guid("3a11c048-242a-028d-fa94-8103a3648a46"),
  269. AsbitemId = new Guid("3a11abbc-b19e-3549-e639-acc0e9aa6fbc"),
  270. StandardPrice = 40,
  271. ChargePrice = 40,
  272. Amount = 1,
  273. PayTypeFlag = PayTypeFlag.PersonPay,
  274. IsCharge = 'N'
  275. });
  276. var newEntity = await _appService.CreatePatientRegisterAsync(entity);
  277. await unitOfWork.CompleteAsync();
  278. }
  279. }
  280. [Fact]
  281. public async Task BatchAddAsbitems()
  282. {
  283. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  284. {
  285. var entity = new PatientRegisterBatchAddAsbitemsDto()
  286. {
  287. PatientRegisterId = new Guid("3a11abec-a6aa-e656-16db-cb0bccf8de46")
  288. };
  289. entity.RegisterCheckAsbitems.Add(new BatchCreateRegisterCheckAsbitem()
  290. {
  291. AsbitemId = new Guid("3a0c55fe-559e-d6e7-7f74-221edeeaf817"),
  292. ChargePrice = (decimal)10.51,
  293. Amount = 2,
  294. PayTypeFlag = PayTypeFlag.OrgPay,
  295. });
  296. entity.RegisterCheckAsbitems.Add(new BatchCreateRegisterCheckAsbitem()
  297. {
  298. AsbitemId = new Guid("3a0c55ff-e111-0551-1381-6bd2a894c158"),
  299. ChargePrice = 20,
  300. Amount = 1,
  301. PayTypeFlag = PayTypeFlag.PersonPay,
  302. });
  303. await _appService.BatchAddAsbitems(entity);
  304. await unitOfWork.CompleteAsync();
  305. }
  306. }
  307. [Fact]
  308. public async Task BatchDeleteAsbitems()
  309. {
  310. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  311. {
  312. var entity = new PatientRegisterBatchDeleteAsbitemsDto()
  313. {
  314. PatientRegisterId = new Guid("3a11abec-a6aa-e656-16db-cb0bccf8de46"),
  315. IsDeleteGroup = 'Y'
  316. };
  317. entity.RegisterCheckAsbitems.Add(new BatchDeleteRegisterCheckAsbitem()
  318. {
  319. AsbitemId = new Guid("3a0c55fe-559e-d6e7-7f74-221edeeaf817"),
  320. });
  321. entity.RegisterCheckAsbitems.Add(new BatchDeleteRegisterCheckAsbitem()
  322. {
  323. AsbitemId = new Guid("3a0c55ff-e111-0551-1381-6bd2a894c158"),
  324. });
  325. await _appService.BatchDeleteAsbitems(entity);
  326. await unitOfWork.CompleteAsync();
  327. }
  328. }
  329. [Fact]
  330. public async Task BatchUpdateCustomerOrgGroupAsync()
  331. {
  332. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  333. {
  334. var entity = new UpdatePatientRegisterCustomerOrgGroupDto()
  335. {
  336. PatientRegisterId = new Guid("3a0ea160-5051-9c6a-d863-28a2ee9e0ad2"),
  337. CustomerOrgGroupId = new Guid("3a11cb78-7d85-6a7d-d0f1-b522b491bd75"),
  338. PayTypeFlag = PayTypeFlag.OrgPay,
  339. IsReserveAddAsbitem = 'N'
  340. };
  341. await _appService.BatchUpdateCustomerOrgGroupAsync(entity);
  342. await unitOfWork.CompleteAsync();
  343. }
  344. }
  345. [Fact]
  346. public async Task CreatePatientRegisterFromExcelAsync()
  347. {
  348. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  349. {
  350. var entity = new CreatePatientRegisterExcelRequestDto()
  351. {
  352. MedicalCenterId = new Guid("68f2d834-2bf0-4978-ad54-d2133c12a333"),
  353. CustomerOrgId = new Guid("3a0c5101-a6a6-e48a-36ec-33e7567a99e6"),
  354. CustomerOrgRegisterId = new Guid("3a114e09-3bd2-82f3-f73e-f2de4bead094"),
  355. PatientNo = "T4629",
  356. PatientName = "彭军",
  357. SexName = "未知",
  358. BirthDate = "2000-01-01",
  359. JobCardNo = "JobCardNo",
  360. MedicalCardNo = "MedicalCardNo",
  361. MaritalStatusName = "",
  362. MedicalTypeName = "调干",
  363. PersonnelTypeName = "普通员工",
  364. JobPost = "JobPost",
  365. JobTitle = "JobTitle",
  366. Salesman = "Salesman",
  367. IsAutoCreateDepartment = 'N',
  368. DepartmentName = "长沙神豚F",
  369. CustomerOrgGroupName = "男子组",
  370. };
  371. await _appService.CreatePatientRegisterFromExcelAsync(entity);
  372. await unitOfWork.CompleteAsync();
  373. }
  374. }
  375. [Fact]
  376. public async Task CreatePatientRegisterFromHistoryAsync()
  377. {
  378. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  379. {
  380. var entity = new CreatePatientRegisterHistoryRequestDto()
  381. {
  382. MedicalCenterId = new Guid("68f2d834-2bf0-4978-ad54-d2133c12a333"),
  383. CustomerOrgId = new Guid("3a0c5101-a6a6-e48a-36ec-33e7567a99e6"),
  384. CustomerOrgRegisterId = new Guid("3a114e09-3bd2-82f3-f73e-f2de4bead094"),
  385. PatientRegisterId = new Guid("3a11d557-12ec-dc6b-b99f-0c135796fe6a"),
  386. CustomerOrgGroupId = new Guid("3a11b42f-8c01-c46d-4378-0b5c20414e42"),
  387. CompleteFlag = PatientRegisterCompleteFlag.PreRegistration,
  388. PayTypeFlag = PayTypeFlag.OrgPay
  389. };
  390. await _appService.CreatePatientRegisterFromHistoryAsync(entity);
  391. await unitOfWork.CompleteAsync();
  392. }
  393. }
  394. [Fact]
  395. public async Task GetSameNamePatientAsync()
  396. {
  397. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  398. {
  399. var items = await _appService.GetSameNamePatientAsync(new GetSameNamePatientInputDto() { Name = "李九" });
  400. _output.WriteLine(items.Count().ToString());
  401. foreach (var item in items)
  402. {
  403. _output.WriteLine(item.PatientName + "," + item.CustomerOrgName + "," + item.DepartmentName);
  404. }
  405. await unitOfWork.CompleteAsync();
  406. }
  407. }
  408. [Fact]
  409. public async Task GetCustomerOrgSameNamePatientAsync()
  410. {
  411. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  412. {
  413. var items = await _appService.GetCustomerOrgSameNamePatientAsync(
  414. new GetCustomerOrgSameNamePatientInputDto()
  415. {
  416. CustomerOrgId = new Guid("3a0c5101-a6a6-e48a-36ec-33e7567a99e6"),
  417. Name = "李九"
  418. });
  419. _output.WriteLine(items.Count().ToString());
  420. foreach (var item in items)
  421. {
  422. _output.WriteLine(item.PatientName + "," + item.CustomerOrgName + "," + item.DepartmentName);
  423. }
  424. await unitOfWork.CompleteAsync();
  425. }
  426. }
  427. [Fact]
  428. public async Task GetAlreadyRegisterPatientRegisterByNoAsync()
  429. {
  430. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  431. {
  432. var item = await _appService.GetAlreadyRegisterPatientRegisterByNoAsync(new PatientRegisterNoInputDto()
  433. {
  434. PatientRegisterNo = "T4830",
  435. PatientNo = ""
  436. });
  437. _output.WriteLine(item.PatientName + "," + item.CustomerOrgName + "," + item.CustomerOrgParentName);
  438. await unitOfWork.CompleteAsync();
  439. }
  440. }
  441. [Fact]
  442. public async Task UpdatePatientRegisterSummarySuggestionAsync()
  443. {
  444. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  445. {
  446. var entity = new UpdatePatientRegisterSummarySuggestionDto()
  447. {
  448. PatientRegisterId = new Guid("3a11ee70-02cb-c5e6-a087-79ecdd0356b6"),
  449. SumSummarys = new List<UpdateSumSummaryDto>()
  450. {
  451. new UpdateSumSummaryDto()
  452. {
  453. SummaryTitle ="111",
  454. Details = new List<UpdateSumSummaryContentDto>()
  455. {
  456. new UpdateSumSummaryContentDto()
  457. {
  458. SummaryContent = "aaa"
  459. },
  460. new UpdateSumSummaryContentDto()
  461. {
  462. SummaryContent = "bbb"
  463. }
  464. }
  465. },
  466. new UpdateSumSummaryDto()
  467. {
  468. SummaryTitle ="222",
  469. Details = new List<UpdateSumSummaryContentDto>()
  470. {
  471. new UpdateSumSummaryContentDto()
  472. {
  473. SummaryContent = "ccc"
  474. },
  475. new UpdateSumSummaryContentDto()
  476. {
  477. SummaryContent = "ddd"
  478. }
  479. }
  480. }
  481. },
  482. SumSuggestions = new List<UpdateSumSuggestionDto>()
  483. {
  484. new UpdateSumSuggestionDto()
  485. {
  486. DiagnosisIds = new List<Guid>()
  487. {
  488. new Guid("3a0ec93f-bc7c-bc6b-d8b2-9a1eaeef398d"),
  489. new Guid("3a0ecab2-ee3a-4b32-997b-5979a672cf62")
  490. },
  491. SuggestionTitle = "ssss",
  492. MedicalInterpretations= new List<UpdateSumSuggestionContentDto>()
  493. {
  494. new UpdateSumSuggestionContentDto()
  495. {
  496. SuggestionContent = "mmm"
  497. },
  498. new UpdateSumSuggestionContentDto()
  499. {
  500. SuggestionContent = "mmm"
  501. }
  502. },
  503. CommonReasons = new List<UpdateSumSuggestionContentDto>()
  504. {
  505. new UpdateSumSuggestionContentDto()
  506. {
  507. SuggestionContent = "ccc"
  508. },
  509. new UpdateSumSuggestionContentDto()
  510. {
  511. SuggestionContent = "ccc"
  512. }
  513. },
  514. HealthGuidances = new List<UpdateSumSuggestionContentDto>()
  515. {
  516. new UpdateSumSuggestionContentDto()
  517. {
  518. SuggestionContent = "hhh"
  519. },
  520. new UpdateSumSuggestionContentDto()
  521. {
  522. SuggestionContent = "hhh"
  523. }
  524. },
  525. },
  526. new UpdateSumSuggestionDto()
  527. {
  528. DiagnosisIds = new List<Guid>()
  529. {
  530. new Guid("3a0ed8a2-8e4b-c66f-292f-afffc76d3fd6"),
  531. new Guid("3a0ed8e0-6e1a-4b6a-55ec-a2e87ccdf6a9")
  532. },
  533. SuggestionTitle = "ttt",
  534. MedicalInterpretations= new List<UpdateSumSuggestionContentDto>()
  535. {
  536. new UpdateSumSuggestionContentDto()
  537. {
  538. SuggestionContent = "mmm"
  539. },
  540. new UpdateSumSuggestionContentDto()
  541. {
  542. SuggestionContent = "mmm"
  543. }
  544. },
  545. CommonReasons = new List<UpdateSumSuggestionContentDto>()
  546. {
  547. new UpdateSumSuggestionContentDto()
  548. {
  549. SuggestionContent = "ccc"
  550. },
  551. new UpdateSumSuggestionContentDto()
  552. {
  553. SuggestionContent = "ccc"
  554. }
  555. },
  556. HealthGuidances = new List<UpdateSumSuggestionContentDto>()
  557. {
  558. new UpdateSumSuggestionContentDto()
  559. {
  560. SuggestionContent = "hhh"
  561. },
  562. new UpdateSumSuggestionContentDto()
  563. {
  564. SuggestionContent = "hhh"
  565. }
  566. },
  567. }
  568. }
  569. };
  570. var newEntity = await _appService.UpdatePatientRegisterSummarySuggestionAsync(entity);
  571. await unitOfWork.CompleteAsync();
  572. }
  573. }
  574. [Fact]
  575. public async Task GetInfoOrPatientAsync()
  576. {
  577. using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
  578. {
  579. var items = await _appService.GetInfoOrPatientAsync(
  580. new PatientRegisterIdInputDto()
  581. {
  582. PatientRegisterId = new Guid("3a1216d1-4bd1-5f3b-6a40-903589b570b8"),
  583. });
  584. await unitOfWork.CompleteAsync();
  585. }
  586. }
  587. }
  588. }