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.

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