recordInfo.m.dart 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393
  1. import 'liveConsultation.m.dart';
  2. import 'patient.m.dart';
  3. import 'notification.m.dart';
  4. import 'package:fis_jsonrpc/utils.dart';
  5. class PatientInfoExt {
  6. String? patientScanType;
  7. List<DataItemDTO>? content;
  8. PatientInfoExt({
  9. this.patientScanType,
  10. this.content,
  11. });
  12. factory PatientInfoExt.fromJson(Map<String, dynamic> map) {
  13. return PatientInfoExt(
  14. patientScanType: map['PatientScanType'],
  15. content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  16. );
  17. }
  18. Map<String, dynamic> toJson() {
  19. final map = Map<String, dynamic>();
  20. if (patientScanType != null) {
  21. map['PatientScanType'] = patientScanType;
  22. }
  23. if (content != null) {
  24. map['Content'] = content;
  25. }
  26. return map;
  27. }
  28. }
  29. class CreateRecordRequest extends TokenRequest{
  30. String? patientCode;
  31. String? deviceCode;
  32. List<DataItemDTO>? patientDatas;
  33. List<PatientInfoExt>? patientInfoExtList;
  34. CreateRecordRequest({
  35. this.patientCode,
  36. this.deviceCode,
  37. this.patientDatas,
  38. this.patientInfoExtList,
  39. String? token,
  40. }) : super(
  41. token: token,
  42. );
  43. factory CreateRecordRequest.fromJson(Map<String, dynamic> map) {
  44. return CreateRecordRequest(
  45. patientCode: map['PatientCode'],
  46. deviceCode: map['DeviceCode'],
  47. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  48. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  49. token: map['Token'],
  50. );
  51. }
  52. Map<String, dynamic> toJson() {
  53. final map = super.toJson();
  54. if (patientCode != null)
  55. map['PatientCode'] = patientCode;
  56. if (deviceCode != null)
  57. map['DeviceCode'] = deviceCode;
  58. if (patientDatas != null)
  59. map['PatientDatas'] = patientDatas;
  60. if (patientInfoExtList != null)
  61. map['PatientInfoExtList'] = patientInfoExtList;
  62. return map;
  63. }
  64. }
  65. class CreateExamDataRequest extends TokenRequest{
  66. String? recordCode;
  67. String? fileToken;
  68. int fileSize;
  69. RemedicalFileDataTypeEnum fileDataType;
  70. String? previewFileToken;
  71. String? coverImageToken;
  72. CreateExamDataRequest({
  73. this.recordCode,
  74. this.fileToken,
  75. this.fileSize = 0,
  76. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  77. this.previewFileToken,
  78. this.coverImageToken,
  79. String? token,
  80. }) : super(
  81. token: token,
  82. );
  83. factory CreateExamDataRequest.fromJson(Map<String, dynamic> map) {
  84. return CreateExamDataRequest(
  85. recordCode: map['RecordCode'],
  86. fileToken: map['FileToken'],
  87. fileSize: map['FileSize'],
  88. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  89. previewFileToken: map['PreviewFileToken'],
  90. coverImageToken: map['CoverImageToken'],
  91. token: map['Token'],
  92. );
  93. }
  94. Map<String, dynamic> toJson() {
  95. final map = super.toJson();
  96. if (recordCode != null)
  97. map['RecordCode'] = recordCode;
  98. if (fileToken != null)
  99. map['FileToken'] = fileToken;
  100. map['FileSize'] = fileSize;
  101. map['FileDataType'] = fileDataType.index;
  102. if (previewFileToken != null)
  103. map['PreviewFileToken'] = previewFileToken;
  104. if (coverImageToken != null)
  105. map['CoverImageToken'] = coverImageToken;
  106. return map;
  107. }
  108. }
  109. enum QueryRecordStatusEnum {
  110. All,
  111. NotScanned,
  112. Uploaded,
  113. NotReport,
  114. Completed,
  115. NotCompleted,
  116. }
  117. enum QueryRecordCreateTypeEnum {
  118. All,
  119. Reservation,
  120. Normal,
  121. }
  122. class GetRecordsPageRequest extends PageRequest{
  123. String? patientCode;
  124. QueryRecordStatusEnum queryRecordStatus;
  125. QueryRecordCreateTypeEnum queryRecordCreateType;
  126. GetRecordsPageRequest({
  127. this.patientCode,
  128. this.queryRecordStatus = QueryRecordStatusEnum.All,
  129. this.queryRecordCreateType = QueryRecordCreateTypeEnum.All,
  130. int pageIndex = 0,
  131. int pageSize = 0,
  132. String? token,
  133. }) : super(
  134. pageIndex: pageIndex,
  135. pageSize: pageSize,
  136. token: token,
  137. );
  138. factory GetRecordsPageRequest.fromJson(Map<String, dynamic> map) {
  139. return GetRecordsPageRequest(
  140. patientCode: map['PatientCode'],
  141. queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
  142. queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
  143. pageIndex: map['PageIndex'],
  144. pageSize: map['PageSize'],
  145. token: map['Token'],
  146. );
  147. }
  148. Map<String, dynamic> toJson() {
  149. final map = super.toJson();
  150. if (patientCode != null)
  151. map['PatientCode'] = patientCode;
  152. map['QueryRecordStatus'] = queryRecordStatus.index;
  153. map['QueryRecordCreateType'] = queryRecordCreateType.index;
  154. return map;
  155. }
  156. }
  157. enum ReferralTypeEnum {
  158. Normal,
  159. ReferralIn,
  160. ReferralOut,
  161. }
  162. class QueryRecordResult {
  163. DateTime? createTime;
  164. String? deptName;
  165. String? patientName;
  166. String? patientAge;
  167. List<DataItemDTO>? patientAgeInfo;
  168. int patientSex;
  169. String? creatorName;
  170. String? deviceName;
  171. String? displayName;
  172. RecordStatusEnum recordStatus;
  173. List<PatientInfoExt>? patientInfoExtList;
  174. DiagnosisStatusEnum diagnosisStatus;
  175. List<DiagnosisInfoDTO>? diagnosisInfos;
  176. bool isCollecting;
  177. DateTime? startCollectingTime;
  178. String? customDoctor;
  179. String? customOrganzation;
  180. String? equipmentSN;
  181. String? deviceOrganzationName;
  182. bool isReferral;
  183. ReferralTypeEnum referralType;
  184. String? patientCode;
  185. bool canCreateReport;
  186. DateTime? examTime;
  187. bool isQualityControlled;
  188. double score;
  189. QueryRecordResult({
  190. this.createTime,
  191. this.deptName,
  192. this.patientName,
  193. this.patientAge,
  194. this.patientAgeInfo,
  195. this.patientSex = 0,
  196. this.creatorName,
  197. this.deviceName,
  198. this.displayName,
  199. this.recordStatus = RecordStatusEnum.NotScanned,
  200. this.patientInfoExtList,
  201. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  202. this.diagnosisInfos,
  203. this.isCollecting = false,
  204. this.startCollectingTime,
  205. this.customDoctor,
  206. this.customOrganzation,
  207. this.equipmentSN,
  208. this.deviceOrganzationName,
  209. this.isReferral = false,
  210. this.referralType = ReferralTypeEnum.Normal,
  211. this.patientCode,
  212. this.canCreateReport = false,
  213. this.examTime,
  214. this.isQualityControlled = false,
  215. this.score = 0,
  216. });
  217. factory QueryRecordResult.fromJson(Map<String, dynamic> map) {
  218. return QueryRecordResult(
  219. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  220. deptName: map['DeptName'],
  221. patientName: map['PatientName'],
  222. patientAge: map['PatientAge'],
  223. patientAgeInfo: map['PatientAgeInfo'] != null ? (map['PatientAgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  224. patientSex: map['PatientSex'],
  225. creatorName: map['CreatorName'],
  226. deviceName: map['DeviceName'],
  227. displayName: map['DisplayName'],
  228. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  229. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  230. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  231. diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  232. isCollecting: map['IsCollecting'],
  233. startCollectingTime: map['StartCollectingTime'] != null ? DateTime.parse(map['StartCollectingTime']) : null,
  234. customDoctor: map['CustomDoctor'],
  235. customOrganzation: map['CustomOrganzation'],
  236. equipmentSN: map['EquipmentSN'],
  237. deviceOrganzationName: map['DeviceOrganzationName'],
  238. isReferral: map['IsReferral'],
  239. referralType: ReferralTypeEnum.values.firstWhere((e) => e.index == map['ReferralType']),
  240. patientCode: map['PatientCode'],
  241. canCreateReport: map['CanCreateReport'],
  242. examTime: map['ExamTime'] != null ? DateTime.parse(map['ExamTime']) : null,
  243. isQualityControlled: map['IsQualityControlled'],
  244. score: double.parse(map['Score'].toString()),
  245. );
  246. }
  247. Map<String, dynamic> toJson() {
  248. final map = Map<String, dynamic>();
  249. if (createTime != null) {
  250. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  251. }
  252. if (deptName != null) {
  253. map['DeptName'] = deptName;
  254. }
  255. if (patientName != null) {
  256. map['PatientName'] = patientName;
  257. }
  258. if (patientAge != null) {
  259. map['PatientAge'] = patientAge;
  260. }
  261. if (patientAgeInfo != null) {
  262. map['PatientAgeInfo'] = patientAgeInfo;
  263. }
  264. map['PatientSex'] = patientSex;
  265. if (creatorName != null) {
  266. map['CreatorName'] = creatorName;
  267. }
  268. if (deviceName != null) {
  269. map['DeviceName'] = deviceName;
  270. }
  271. if (displayName != null) {
  272. map['DisplayName'] = displayName;
  273. }
  274. map['RecordStatus'] = recordStatus.index;
  275. if (patientInfoExtList != null) {
  276. map['PatientInfoExtList'] = patientInfoExtList;
  277. }
  278. map['DiagnosisStatus'] = diagnosisStatus.index;
  279. if (diagnosisInfos != null) {
  280. map['DiagnosisInfos'] = diagnosisInfos;
  281. }
  282. map['IsCollecting'] = isCollecting;
  283. if (startCollectingTime != null) {
  284. map['StartCollectingTime'] = JsonRpcUtils.dateFormat(startCollectingTime!);
  285. }
  286. if (customDoctor != null) {
  287. map['CustomDoctor'] = customDoctor;
  288. }
  289. if (customOrganzation != null) {
  290. map['CustomOrganzation'] = customOrganzation;
  291. }
  292. if (equipmentSN != null) {
  293. map['EquipmentSN'] = equipmentSN;
  294. }
  295. if (deviceOrganzationName != null) {
  296. map['DeviceOrganzationName'] = deviceOrganzationName;
  297. }
  298. map['IsReferral'] = isReferral;
  299. map['ReferralType'] = referralType.index;
  300. if (patientCode != null) {
  301. map['PatientCode'] = patientCode;
  302. }
  303. map['CanCreateReport'] = canCreateReport;
  304. if (examTime != null) {
  305. map['ExamTime'] = JsonRpcUtils.dateFormat(examTime!);
  306. }
  307. map['IsQualityControlled'] = isQualityControlled;
  308. map['Score'] = score;
  309. return map;
  310. }
  311. }
  312. class QueryRecordRequest extends TokenRequest{
  313. String? recordCode;
  314. QueryRecordRequest({
  315. this.recordCode,
  316. String? token,
  317. }) : super(
  318. token: token,
  319. );
  320. factory QueryRecordRequest.fromJson(Map<String, dynamic> map) {
  321. return QueryRecordRequest(
  322. recordCode: map['RecordCode'],
  323. token: map['Token'],
  324. );
  325. }
  326. Map<String, dynamic> toJson() {
  327. final map = super.toJson();
  328. if (recordCode != null)
  329. map['RecordCode'] = recordCode;
  330. return map;
  331. }
  332. }
  333. class ProcessRecordDataResult {
  334. List<DataItemDTO>? content;
  335. ProcessRecordDataResult({
  336. this.content,
  337. });
  338. factory ProcessRecordDataResult.fromJson(Map<String, dynamic> map) {
  339. return ProcessRecordDataResult(
  340. content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  341. );
  342. }
  343. Map<String, dynamic> toJson() {
  344. final map = Map<String, dynamic>();
  345. if (content != null) {
  346. map['Content'] = content;
  347. }
  348. return map;
  349. }
  350. }
  351. enum AnimalSpeciesEnum {
  352. Bovine,
  353. Canidae,
  354. Equidae,
  355. Felidae,
  356. Caprinae,
  357. Suidae,
  358. }
  359. class ProcessRecordDataRequest extends TokenRequest{
  360. String? methodName;
  361. List<DataItemDTO>? content;
  362. OrganizationPatientTypeEnum patientType;
  363. AnimalSpeciesEnum speciesEnum;
  364. ProcessRecordDataRequest({
  365. this.methodName,
  366. this.content,
  367. this.patientType = OrganizationPatientTypeEnum.Person,
  368. this.speciesEnum = AnimalSpeciesEnum.Bovine,
  369. String? token,
  370. }) : super(
  371. token: token,
  372. );
  373. factory ProcessRecordDataRequest.fromJson(Map<String, dynamic> map) {
  374. return ProcessRecordDataRequest(
  375. methodName: map['MethodName'],
  376. content: map['Content'] != null ? (map['Content'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  377. patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
  378. speciesEnum: AnimalSpeciesEnum.values.firstWhere((e) => e.index == map['SpeciesEnum']),
  379. token: map['Token'],
  380. );
  381. }
  382. Map<String, dynamic> toJson() {
  383. final map = super.toJson();
  384. if (methodName != null)
  385. map['MethodName'] = methodName;
  386. if (content != null)
  387. map['Content'] = content;
  388. map['PatientType'] = patientType.index;
  389. map['SpeciesEnum'] = speciesEnum.index;
  390. return map;
  391. }
  392. }
  393. class RelevanceRecordRequest extends TokenRequest{
  394. String? examCode;
  395. String? rservationCode;
  396. RelevanceRecordRequest({
  397. this.examCode,
  398. this.rservationCode,
  399. String? token,
  400. }) : super(
  401. token: token,
  402. );
  403. factory RelevanceRecordRequest.fromJson(Map<String, dynamic> map) {
  404. return RelevanceRecordRequest(
  405. examCode: map['ExamCode'],
  406. rservationCode: map['RservationCode'],
  407. token: map['Token'],
  408. );
  409. }
  410. Map<String, dynamic> toJson() {
  411. final map = super.toJson();
  412. if (examCode != null)
  413. map['ExamCode'] = examCode;
  414. if (rservationCode != null)
  415. map['RservationCode'] = rservationCode;
  416. return map;
  417. }
  418. }
  419. class DeleteRecordRequest extends TokenRequest{
  420. String? recordCode;
  421. DeleteRecordRequest({
  422. this.recordCode,
  423. String? token,
  424. }) : super(
  425. token: token,
  426. );
  427. factory DeleteRecordRequest.fromJson(Map<String, dynamic> map) {
  428. return DeleteRecordRequest(
  429. recordCode: map['RecordCode'],
  430. token: map['Token'],
  431. );
  432. }
  433. Map<String, dynamic> toJson() {
  434. final map = super.toJson();
  435. if (recordCode != null)
  436. map['RecordCode'] = recordCode;
  437. return map;
  438. }
  439. }
  440. class FinishRecordRequest extends TokenRequest{
  441. String? recordCode;
  442. FinishRecordRequest({
  443. this.recordCode,
  444. String? token,
  445. }) : super(
  446. token: token,
  447. );
  448. factory FinishRecordRequest.fromJson(Map<String, dynamic> map) {
  449. return FinishRecordRequest(
  450. recordCode: map['RecordCode'],
  451. token: map['Token'],
  452. );
  453. }
  454. Map<String, dynamic> toJson() {
  455. final map = super.toJson();
  456. if (recordCode != null)
  457. map['RecordCode'] = recordCode;
  458. return map;
  459. }
  460. }
  461. class AddRemedicalMeasuredInfoDTO {
  462. String? remedicalCode;
  463. int frameIndex;
  464. String? measuredFileToken;
  465. String? previewFileToken;
  466. String? measuredData;
  467. AddRemedicalMeasuredInfoDTO({
  468. this.remedicalCode,
  469. this.frameIndex = 0,
  470. this.measuredFileToken,
  471. this.previewFileToken,
  472. this.measuredData,
  473. });
  474. factory AddRemedicalMeasuredInfoDTO.fromJson(Map<String, dynamic> map) {
  475. return AddRemedicalMeasuredInfoDTO(
  476. remedicalCode: map['RemedicalCode'],
  477. frameIndex: map['FrameIndex'],
  478. measuredFileToken: map['MeasuredFileToken'],
  479. previewFileToken: map['PreviewFileToken'],
  480. measuredData: map['MeasuredData'],
  481. );
  482. }
  483. Map<String, dynamic> toJson() {
  484. final map = Map<String, dynamic>();
  485. if (remedicalCode != null) {
  486. map['RemedicalCode'] = remedicalCode;
  487. }
  488. map['FrameIndex'] = frameIndex;
  489. if (measuredFileToken != null) {
  490. map['MeasuredFileToken'] = measuredFileToken;
  491. }
  492. if (previewFileToken != null) {
  493. map['PreviewFileToken'] = previewFileToken;
  494. }
  495. if (measuredData != null) {
  496. map['MeasuredData'] = measuredData;
  497. }
  498. return map;
  499. }
  500. }
  501. class AddRemedicalMeasuredInfoRequest extends TokenRequest{
  502. BusinessTypeEnum businessType;
  503. String? recordCode;
  504. List<AddRemedicalMeasuredInfoDTO>? remedicalMeasuredInfos;
  505. AddRemedicalMeasuredInfoRequest({
  506. this.businessType = BusinessTypeEnum.RemoteDiagnosis,
  507. this.recordCode,
  508. this.remedicalMeasuredInfos,
  509. String? token,
  510. }) : super(
  511. token: token,
  512. );
  513. factory AddRemedicalMeasuredInfoRequest.fromJson(Map<String, dynamic> map) {
  514. return AddRemedicalMeasuredInfoRequest(
  515. businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
  516. recordCode: map['RecordCode'],
  517. remedicalMeasuredInfos: map['RemedicalMeasuredInfos'] != null ? (map['RemedicalMeasuredInfos'] as List).map((e)=>AddRemedicalMeasuredInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  518. token: map['Token'],
  519. );
  520. }
  521. Map<String, dynamic> toJson() {
  522. final map = super.toJson();
  523. map['BusinessType'] = businessType.index;
  524. if (recordCode != null)
  525. map['RecordCode'] = recordCode;
  526. if (remedicalMeasuredInfos != null)
  527. map['RemedicalMeasuredInfos'] = remedicalMeasuredInfos;
  528. return map;
  529. }
  530. }
  531. class FindRemedicalMeasuredInfoRequest extends TokenRequest{
  532. BusinessTypeEnum businessType;
  533. String? recordCode;
  534. FindRemedicalMeasuredInfoRequest({
  535. this.businessType = BusinessTypeEnum.RemoteDiagnosis,
  536. this.recordCode,
  537. String? token,
  538. }) : super(
  539. token: token,
  540. );
  541. factory FindRemedicalMeasuredInfoRequest.fromJson(Map<String, dynamic> map) {
  542. return FindRemedicalMeasuredInfoRequest(
  543. businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
  544. recordCode: map['RecordCode'],
  545. token: map['Token'],
  546. );
  547. }
  548. Map<String, dynamic> toJson() {
  549. final map = super.toJson();
  550. map['BusinessType'] = businessType.index;
  551. if (recordCode != null)
  552. map['RecordCode'] = recordCode;
  553. return map;
  554. }
  555. }
  556. class CheckCollectingImgRequest extends TokenRequest{
  557. String? deviceCode;
  558. CheckCollectingImgRequest({
  559. this.deviceCode,
  560. String? token,
  561. }) : super(
  562. token: token,
  563. );
  564. factory CheckCollectingImgRequest.fromJson(Map<String, dynamic> map) {
  565. return CheckCollectingImgRequest(
  566. deviceCode: map['DeviceCode'],
  567. token: map['Token'],
  568. );
  569. }
  570. Map<String, dynamic> toJson() {
  571. final map = super.toJson();
  572. if (deviceCode != null)
  573. map['DeviceCode'] = deviceCode;
  574. return map;
  575. }
  576. }
  577. class StartCollectingImgRequest extends TokenRequest{
  578. String? recordCode;
  579. StartCollectingImgRequest({
  580. this.recordCode,
  581. String? token,
  582. }) : super(
  583. token: token,
  584. );
  585. factory StartCollectingImgRequest.fromJson(Map<String, dynamic> map) {
  586. return StartCollectingImgRequest(
  587. recordCode: map['RecordCode'],
  588. token: map['Token'],
  589. );
  590. }
  591. Map<String, dynamic> toJson() {
  592. final map = super.toJson();
  593. if (recordCode != null)
  594. map['RecordCode'] = recordCode;
  595. return map;
  596. }
  597. }
  598. class SimpleRecordInfoDTO extends BaseDTO{
  599. String? recordCode;
  600. RecordStatusEnum recordStatus;
  601. ReferralTypeEnum referralType;
  602. String? patientCode;
  603. String? patientName;
  604. String? age;
  605. String? sex;
  606. String? devicePatientID;
  607. String? deviceCode;
  608. String? deviceName;
  609. String? deviceHeadPicUrl;
  610. String? rootOrganizationCode;
  611. String? rootOrganizationName;
  612. String? languge;
  613. bool canCreateReport;
  614. bool isCollecting;
  615. bool canCollcetImg;
  616. String? customDoctor;
  617. String? customOrganzation;
  618. String? equipmentSN;
  619. List<DiagnosisInfoDTO>? diagnosisInfos;
  620. bool isQualityControlled;
  621. double score;
  622. bool canScreenshot;
  623. SimpleRecordInfoDTO({
  624. this.recordCode,
  625. this.recordStatus = RecordStatusEnum.NotScanned,
  626. this.referralType = ReferralTypeEnum.Normal,
  627. this.patientCode,
  628. this.patientName,
  629. this.age,
  630. this.sex,
  631. this.devicePatientID,
  632. this.deviceCode,
  633. this.deviceName,
  634. this.deviceHeadPicUrl,
  635. this.rootOrganizationCode,
  636. this.rootOrganizationName,
  637. this.languge,
  638. this.canCreateReport = false,
  639. this.isCollecting = false,
  640. this.canCollcetImg = false,
  641. this.customDoctor,
  642. this.customOrganzation,
  643. this.equipmentSN,
  644. this.diagnosisInfos,
  645. this.isQualityControlled = false,
  646. this.score = 0,
  647. this.canScreenshot = false,
  648. DateTime? createTime,
  649. DateTime? updateTime,
  650. }) : super(
  651. createTime: createTime,
  652. updateTime: updateTime,
  653. );
  654. factory SimpleRecordInfoDTO.fromJson(Map<String, dynamic> map) {
  655. return SimpleRecordInfoDTO(
  656. recordCode: map['RecordCode'],
  657. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  658. referralType: ReferralTypeEnum.values.firstWhere((e) => e.index == map['ReferralType']),
  659. patientCode: map['PatientCode'],
  660. patientName: map['PatientName'],
  661. age: map['Age'],
  662. sex: map['Sex'],
  663. devicePatientID: map['DevicePatientID'],
  664. deviceCode: map['DeviceCode'],
  665. deviceName: map['DeviceName'],
  666. deviceHeadPicUrl: map['DeviceHeadPicUrl'],
  667. rootOrganizationCode: map['RootOrganizationCode'],
  668. rootOrganizationName: map['RootOrganizationName'],
  669. languge: map['Languge'],
  670. canCreateReport: map['CanCreateReport'],
  671. isCollecting: map['IsCollecting'],
  672. canCollcetImg: map['CanCollcetImg'],
  673. customDoctor: map['CustomDoctor'],
  674. customOrganzation: map['CustomOrganzation'],
  675. equipmentSN: map['EquipmentSN'],
  676. diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  677. isQualityControlled: map['IsQualityControlled'],
  678. score: double.parse(map['Score'].toString()),
  679. canScreenshot: map['CanScreenshot'],
  680. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  681. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  682. );
  683. }
  684. Map<String, dynamic> toJson() {
  685. final map = super.toJson();
  686. if (recordCode != null)
  687. map['RecordCode'] = recordCode;
  688. map['RecordStatus'] = recordStatus.index;
  689. map['ReferralType'] = referralType.index;
  690. if (patientCode != null)
  691. map['PatientCode'] = patientCode;
  692. if (patientName != null)
  693. map['PatientName'] = patientName;
  694. if (age != null)
  695. map['Age'] = age;
  696. if (sex != null)
  697. map['Sex'] = sex;
  698. if (devicePatientID != null)
  699. map['DevicePatientID'] = devicePatientID;
  700. if (deviceCode != null)
  701. map['DeviceCode'] = deviceCode;
  702. if (deviceName != null)
  703. map['DeviceName'] = deviceName;
  704. if (deviceHeadPicUrl != null)
  705. map['DeviceHeadPicUrl'] = deviceHeadPicUrl;
  706. if (rootOrganizationCode != null)
  707. map['RootOrganizationCode'] = rootOrganizationCode;
  708. if (rootOrganizationName != null)
  709. map['RootOrganizationName'] = rootOrganizationName;
  710. if (languge != null)
  711. map['Languge'] = languge;
  712. map['CanCreateReport'] = canCreateReport;
  713. map['IsCollecting'] = isCollecting;
  714. map['CanCollcetImg'] = canCollcetImg;
  715. if (customDoctor != null)
  716. map['CustomDoctor'] = customDoctor;
  717. if (customOrganzation != null)
  718. map['CustomOrganzation'] = customOrganzation;
  719. if (equipmentSN != null)
  720. map['EquipmentSN'] = equipmentSN;
  721. if (diagnosisInfos != null)
  722. map['DiagnosisInfos'] = diagnosisInfos;
  723. map['IsQualityControlled'] = isQualityControlled;
  724. map['Score'] = score;
  725. map['CanScreenshot'] = canScreenshot;
  726. return map;
  727. }
  728. }
  729. enum RecordQueryStateEnum {
  730. All,
  731. NotScanned,
  732. Uploaded,
  733. NotReport,
  734. Completed,
  735. }
  736. enum RecordProcessStateEnum {
  737. All,
  738. Wait,
  739. Done,
  740. ReferralOut,
  741. }
  742. class FindRecordPagesRequest extends PageRequest{
  743. List<String>? organizationCodes;
  744. List<String>? deviceCodes;
  745. RecordQueryStateEnum recordQueryState;
  746. RecordProcessStateEnum recordProcessState;
  747. String? language;
  748. String? keyWord;
  749. DateTime? startTime;
  750. DateTime? endTime;
  751. String? patientCode;
  752. FindRecordPagesRequest({
  753. this.organizationCodes,
  754. this.deviceCodes,
  755. this.recordQueryState = RecordQueryStateEnum.All,
  756. this.recordProcessState = RecordProcessStateEnum.All,
  757. this.language,
  758. this.keyWord,
  759. this.startTime,
  760. this.endTime,
  761. this.patientCode,
  762. int pageIndex = 0,
  763. int pageSize = 0,
  764. String? token,
  765. }) : super(
  766. pageIndex: pageIndex,
  767. pageSize: pageSize,
  768. token: token,
  769. );
  770. factory FindRecordPagesRequest.fromJson(Map<String, dynamic> map) {
  771. return FindRecordPagesRequest(
  772. organizationCodes: map['OrganizationCodes']?.cast<String>().toList(),
  773. deviceCodes: map['DeviceCodes']?.cast<String>().toList(),
  774. recordQueryState: RecordQueryStateEnum.values.firstWhere((e) => e.index == map['RecordQueryState']),
  775. recordProcessState: RecordProcessStateEnum.values.firstWhere((e) => e.index == map['RecordProcessState']),
  776. language: map['Language'],
  777. keyWord: map['KeyWord'],
  778. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  779. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  780. patientCode: map['PatientCode'],
  781. pageIndex: map['PageIndex'],
  782. pageSize: map['PageSize'],
  783. token: map['Token'],
  784. );
  785. }
  786. Map<String, dynamic> toJson() {
  787. final map = super.toJson();
  788. if (organizationCodes != null)
  789. map['OrganizationCodes'] = organizationCodes;
  790. if (deviceCodes != null)
  791. map['DeviceCodes'] = deviceCodes;
  792. map['RecordQueryState'] = recordQueryState.index;
  793. map['RecordProcessState'] = recordProcessState.index;
  794. if (language != null)
  795. map['Language'] = language;
  796. if (keyWord != null)
  797. map['KeyWord'] = keyWord;
  798. if (startTime != null)
  799. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  800. if (endTime != null)
  801. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  802. if (patientCode != null)
  803. map['PatientCode'] = patientCode;
  804. return map;
  805. }
  806. }
  807. class CreateRecordNewRequest extends TokenRequest{
  808. String? patientCode;
  809. List<DataItemDTO>? patientDatas;
  810. String? deviceCode;
  811. List<PatientInfoExt>? patientInfoExtList;
  812. CreateRecordNewRequest({
  813. this.patientCode,
  814. this.patientDatas,
  815. this.deviceCode,
  816. this.patientInfoExtList,
  817. String? token,
  818. }) : super(
  819. token: token,
  820. );
  821. factory CreateRecordNewRequest.fromJson(Map<String, dynamic> map) {
  822. return CreateRecordNewRequest(
  823. patientCode: map['PatientCode'],
  824. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  825. deviceCode: map['DeviceCode'],
  826. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  827. token: map['Token'],
  828. );
  829. }
  830. Map<String, dynamic> toJson() {
  831. final map = super.toJson();
  832. if (patientCode != null)
  833. map['PatientCode'] = patientCode;
  834. if (patientDatas != null)
  835. map['PatientDatas'] = patientDatas;
  836. if (deviceCode != null)
  837. map['DeviceCode'] = deviceCode;
  838. if (patientInfoExtList != null)
  839. map['PatientInfoExtList'] = patientInfoExtList;
  840. return map;
  841. }
  842. }
  843. class CreateReferralRecordNewRequest extends TokenRequest{
  844. String? recordCode;
  845. String? referralOrganizationCode;
  846. String? referralUserCode;
  847. String? subjectMatter;
  848. CreateReferralRecordNewRequest({
  849. this.recordCode,
  850. this.referralOrganizationCode,
  851. this.referralUserCode,
  852. this.subjectMatter,
  853. String? token,
  854. }) : super(
  855. token: token,
  856. );
  857. factory CreateReferralRecordNewRequest.fromJson(Map<String, dynamic> map) {
  858. return CreateReferralRecordNewRequest(
  859. recordCode: map['RecordCode'],
  860. referralOrganizationCode: map['ReferralOrganizationCode'],
  861. referralUserCode: map['ReferralUserCode'],
  862. subjectMatter: map['SubjectMatter'],
  863. token: map['Token'],
  864. );
  865. }
  866. Map<String, dynamic> toJson() {
  867. final map = super.toJson();
  868. if (recordCode != null)
  869. map['RecordCode'] = recordCode;
  870. if (referralOrganizationCode != null)
  871. map['ReferralOrganizationCode'] = referralOrganizationCode;
  872. if (referralUserCode != null)
  873. map['ReferralUserCode'] = referralUserCode;
  874. if (subjectMatter != null)
  875. map['SubjectMatter'] = subjectMatter;
  876. return map;
  877. }
  878. }
  879. class WithdrawReferralForRecordListRequest extends TokenRequest{
  880. String? recordCode;
  881. WithdrawReferralForRecordListRequest({
  882. this.recordCode,
  883. String? token,
  884. }) : super(
  885. token: token,
  886. );
  887. factory WithdrawReferralForRecordListRequest.fromJson(Map<String, dynamic> map) {
  888. return WithdrawReferralForRecordListRequest(
  889. recordCode: map['RecordCode'],
  890. token: map['Token'],
  891. );
  892. }
  893. Map<String, dynamic> toJson() {
  894. final map = super.toJson();
  895. if (recordCode != null)
  896. map['RecordCode'] = recordCode;
  897. return map;
  898. }
  899. }
  900. enum RecordReferralStatusEnum {
  901. ReferralIn,
  902. Processed,
  903. Withdrawn,
  904. }
  905. class ReferralData extends BaseDTO{
  906. String? patientName;
  907. String? code;
  908. String? recordCode;
  909. String? referralOutUserCode;
  910. String? referralOutOrganizationCode;
  911. String? referralInUserCode;
  912. String? referralInOrganizationCode;
  913. RecordReferralStatusEnum referralStatus;
  914. DateTime? referralTime;
  915. String? subjectMatter;
  916. ReferralData({
  917. this.patientName,
  918. this.code,
  919. this.recordCode,
  920. this.referralOutUserCode,
  921. this.referralOutOrganizationCode,
  922. this.referralInUserCode,
  923. this.referralInOrganizationCode,
  924. this.referralStatus = RecordReferralStatusEnum.ReferralIn,
  925. this.referralTime,
  926. this.subjectMatter,
  927. DateTime? createTime,
  928. DateTime? updateTime,
  929. }) : super(
  930. createTime: createTime,
  931. updateTime: updateTime,
  932. );
  933. factory ReferralData.fromJson(Map<String, dynamic> map) {
  934. return ReferralData(
  935. patientName: map['PatientName'],
  936. code: map['Code'],
  937. recordCode: map['RecordCode'],
  938. referralOutUserCode: map['ReferralOutUserCode'],
  939. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  940. referralInUserCode: map['ReferralInUserCode'],
  941. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  942. referralStatus: RecordReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  943. referralTime: map['ReferralTime'] != null ? DateTime.parse(map['ReferralTime']) : null,
  944. subjectMatter: map['SubjectMatter'],
  945. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  946. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  947. );
  948. }
  949. Map<String, dynamic> toJson() {
  950. final map = super.toJson();
  951. if (patientName != null)
  952. map['PatientName'] = patientName;
  953. if (code != null)
  954. map['Code'] = code;
  955. if (recordCode != null)
  956. map['RecordCode'] = recordCode;
  957. if (referralOutUserCode != null)
  958. map['ReferralOutUserCode'] = referralOutUserCode;
  959. if (referralOutOrganizationCode != null)
  960. map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
  961. if (referralInUserCode != null)
  962. map['ReferralInUserCode'] = referralInUserCode;
  963. if (referralInOrganizationCode != null)
  964. map['ReferralInOrganizationCode'] = referralInOrganizationCode;
  965. map['ReferralStatus'] = referralStatus.index;
  966. if (referralTime != null)
  967. map['ReferralTime'] = JsonRpcUtils.dateFormat(referralTime!);
  968. if (subjectMatter != null)
  969. map['SubjectMatter'] = subjectMatter;
  970. return map;
  971. }
  972. }
  973. class ReferralHistoryDetail extends ReferralData{
  974. String? referralOutOrganizationName;
  975. String? referralOutUserName;
  976. String? referralInOrganizationName;
  977. String? referralInUserName;
  978. ReferralHistoryDetail({
  979. this.referralOutOrganizationName,
  980. this.referralOutUserName,
  981. this.referralInOrganizationName,
  982. this.referralInUserName,
  983. String? patientName,
  984. String? code,
  985. String? recordCode,
  986. String? referralOutUserCode,
  987. String? referralOutOrganizationCode,
  988. String? referralInUserCode,
  989. String? referralInOrganizationCode,
  990. RecordReferralStatusEnum referralStatus = RecordReferralStatusEnum.ReferralIn,
  991. DateTime? referralTime,
  992. String? subjectMatter,
  993. DateTime? createTime,
  994. DateTime? updateTime,
  995. }) : super(
  996. patientName: patientName,
  997. code: code,
  998. recordCode: recordCode,
  999. referralOutUserCode: referralOutUserCode,
  1000. referralOutOrganizationCode: referralOutOrganizationCode,
  1001. referralInUserCode: referralInUserCode,
  1002. referralInOrganizationCode: referralInOrganizationCode,
  1003. referralStatus: referralStatus,
  1004. referralTime: referralTime,
  1005. subjectMatter: subjectMatter,
  1006. createTime: createTime,
  1007. updateTime: updateTime,
  1008. );
  1009. factory ReferralHistoryDetail.fromJson(Map<String, dynamic> map) {
  1010. return ReferralHistoryDetail(
  1011. referralOutOrganizationName: map['ReferralOutOrganizationName'],
  1012. referralOutUserName: map['ReferralOutUserName'],
  1013. referralInOrganizationName: map['ReferralInOrganizationName'],
  1014. referralInUserName: map['ReferralInUserName'],
  1015. patientName: map['PatientName'],
  1016. code: map['Code'],
  1017. recordCode: map['RecordCode'],
  1018. referralOutUserCode: map['ReferralOutUserCode'],
  1019. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  1020. referralInUserCode: map['ReferralInUserCode'],
  1021. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  1022. referralStatus: RecordReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  1023. referralTime: map['ReferralTime'] != null ? DateTime.parse(map['ReferralTime']) : null,
  1024. subjectMatter: map['SubjectMatter'],
  1025. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1026. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1027. );
  1028. }
  1029. Map<String, dynamic> toJson() {
  1030. final map = super.toJson();
  1031. if (referralOutOrganizationName != null)
  1032. map['ReferralOutOrganizationName'] = referralOutOrganizationName;
  1033. if (referralOutUserName != null)
  1034. map['ReferralOutUserName'] = referralOutUserName;
  1035. if (referralInOrganizationName != null)
  1036. map['ReferralInOrganizationName'] = referralInOrganizationName;
  1037. if (referralInUserName != null)
  1038. map['ReferralInUserName'] = referralInUserName;
  1039. return map;
  1040. }
  1041. }
  1042. class FindReferralHistoryRequest extends TokenRequest{
  1043. String? recordCode;
  1044. String? languageCode;
  1045. FindReferralHistoryRequest({
  1046. this.recordCode,
  1047. this.languageCode,
  1048. String? token,
  1049. }) : super(
  1050. token: token,
  1051. );
  1052. factory FindReferralHistoryRequest.fromJson(Map<String, dynamic> map) {
  1053. return FindReferralHistoryRequest(
  1054. recordCode: map['RecordCode'],
  1055. languageCode: map['LanguageCode'],
  1056. token: map['Token'],
  1057. );
  1058. }
  1059. Map<String, dynamic> toJson() {
  1060. final map = super.toJson();
  1061. if (recordCode != null)
  1062. map['RecordCode'] = recordCode;
  1063. if (languageCode != null)
  1064. map['LanguageCode'] = languageCode;
  1065. return map;
  1066. }
  1067. }
  1068. class AddRemedicalQualityRequest extends TokenRequest{
  1069. String? recordCode;
  1070. String? remedicalCode;
  1071. List<QualityControlScoreItem>? qualityControlScoreList;
  1072. String? opinion;
  1073. AddRemedicalQualityRequest({
  1074. this.recordCode,
  1075. this.remedicalCode,
  1076. this.qualityControlScoreList,
  1077. this.opinion,
  1078. String? token,
  1079. }) : super(
  1080. token: token,
  1081. );
  1082. factory AddRemedicalQualityRequest.fromJson(Map<String, dynamic> map) {
  1083. return AddRemedicalQualityRequest(
  1084. recordCode: map['RecordCode'],
  1085. remedicalCode: map['RemedicalCode'],
  1086. qualityControlScoreList: map['QualityControlScoreList'] != null ? (map['QualityControlScoreList'] as List).map((e)=>QualityControlScoreItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1087. opinion: map['Opinion'],
  1088. token: map['Token'],
  1089. );
  1090. }
  1091. Map<String, dynamic> toJson() {
  1092. final map = super.toJson();
  1093. if (recordCode != null)
  1094. map['RecordCode'] = recordCode;
  1095. if (remedicalCode != null)
  1096. map['RemedicalCode'] = remedicalCode;
  1097. if (qualityControlScoreList != null)
  1098. map['QualityControlScoreList'] = qualityControlScoreList;
  1099. if (opinion != null)
  1100. map['Opinion'] = opinion;
  1101. return map;
  1102. }
  1103. }
  1104. class ModifyRemedicalQualityRequest extends TokenRequest{
  1105. String? recordCode;
  1106. String? remedicalCode;
  1107. List<QualityControlScoreItem>? qualityControlScoreList;
  1108. String? opinion;
  1109. ModifyRemedicalQualityRequest({
  1110. this.recordCode,
  1111. this.remedicalCode,
  1112. this.qualityControlScoreList,
  1113. this.opinion,
  1114. String? token,
  1115. }) : super(
  1116. token: token,
  1117. );
  1118. factory ModifyRemedicalQualityRequest.fromJson(Map<String, dynamic> map) {
  1119. return ModifyRemedicalQualityRequest(
  1120. recordCode: map['RecordCode'],
  1121. remedicalCode: map['RemedicalCode'],
  1122. qualityControlScoreList: map['QualityControlScoreList'] != null ? (map['QualityControlScoreList'] as List).map((e)=>QualityControlScoreItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1123. opinion: map['Opinion'],
  1124. token: map['Token'],
  1125. );
  1126. }
  1127. Map<String, dynamic> toJson() {
  1128. final map = super.toJson();
  1129. if (recordCode != null)
  1130. map['RecordCode'] = recordCode;
  1131. if (remedicalCode != null)
  1132. map['RemedicalCode'] = remedicalCode;
  1133. if (qualityControlScoreList != null)
  1134. map['QualityControlScoreList'] = qualityControlScoreList;
  1135. if (opinion != null)
  1136. map['Opinion'] = opinion;
  1137. return map;
  1138. }
  1139. }
  1140. class DeleteRemedicalQualityRequest extends TokenRequest{
  1141. String? recordCode;
  1142. String? remedicalCode;
  1143. DeleteRemedicalQualityRequest({
  1144. this.recordCode,
  1145. this.remedicalCode,
  1146. String? token,
  1147. }) : super(
  1148. token: token,
  1149. );
  1150. factory DeleteRemedicalQualityRequest.fromJson(Map<String, dynamic> map) {
  1151. return DeleteRemedicalQualityRequest(
  1152. recordCode: map['RecordCode'],
  1153. remedicalCode: map['RemedicalCode'],
  1154. token: map['Token'],
  1155. );
  1156. }
  1157. Map<String, dynamic> toJson() {
  1158. final map = super.toJson();
  1159. if (recordCode != null)
  1160. map['RecordCode'] = recordCode;
  1161. if (remedicalCode != null)
  1162. map['RemedicalCode'] = remedicalCode;
  1163. return map;
  1164. }
  1165. }
  1166. class AddRecordReportQualityRequest extends TokenRequest{
  1167. String? recordCode;
  1168. String? reportCode;
  1169. List<QualityControlScoreItem>? qualityControlScoreList;
  1170. String? opinion;
  1171. AddRecordReportQualityRequest({
  1172. this.recordCode,
  1173. this.reportCode,
  1174. this.qualityControlScoreList,
  1175. this.opinion,
  1176. String? token,
  1177. }) : super(
  1178. token: token,
  1179. );
  1180. factory AddRecordReportQualityRequest.fromJson(Map<String, dynamic> map) {
  1181. return AddRecordReportQualityRequest(
  1182. recordCode: map['RecordCode'],
  1183. reportCode: map['ReportCode'],
  1184. qualityControlScoreList: map['QualityControlScoreList'] != null ? (map['QualityControlScoreList'] as List).map((e)=>QualityControlScoreItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1185. opinion: map['Opinion'],
  1186. token: map['Token'],
  1187. );
  1188. }
  1189. Map<String, dynamic> toJson() {
  1190. final map = super.toJson();
  1191. if (recordCode != null)
  1192. map['RecordCode'] = recordCode;
  1193. if (reportCode != null)
  1194. map['ReportCode'] = reportCode;
  1195. if (qualityControlScoreList != null)
  1196. map['QualityControlScoreList'] = qualityControlScoreList;
  1197. if (opinion != null)
  1198. map['Opinion'] = opinion;
  1199. return map;
  1200. }
  1201. }
  1202. class ModifyRecordReportQualityRequest extends TokenRequest{
  1203. String? recordCode;
  1204. String? reportCode;
  1205. List<QualityControlScoreItem>? qualityControlScoreList;
  1206. String? opinion;
  1207. ModifyRecordReportQualityRequest({
  1208. this.recordCode,
  1209. this.reportCode,
  1210. this.qualityControlScoreList,
  1211. this.opinion,
  1212. String? token,
  1213. }) : super(
  1214. token: token,
  1215. );
  1216. factory ModifyRecordReportQualityRequest.fromJson(Map<String, dynamic> map) {
  1217. return ModifyRecordReportQualityRequest(
  1218. recordCode: map['RecordCode'],
  1219. reportCode: map['ReportCode'],
  1220. qualityControlScoreList: map['QualityControlScoreList'] != null ? (map['QualityControlScoreList'] as List).map((e)=>QualityControlScoreItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1221. opinion: map['Opinion'],
  1222. token: map['Token'],
  1223. );
  1224. }
  1225. Map<String, dynamic> toJson() {
  1226. final map = super.toJson();
  1227. if (recordCode != null)
  1228. map['RecordCode'] = recordCode;
  1229. if (reportCode != null)
  1230. map['ReportCode'] = reportCode;
  1231. if (qualityControlScoreList != null)
  1232. map['QualityControlScoreList'] = qualityControlScoreList;
  1233. if (opinion != null)
  1234. map['Opinion'] = opinion;
  1235. return map;
  1236. }
  1237. }
  1238. class DeleteRecordReportQualityRequest extends TokenRequest{
  1239. String? recordCode;
  1240. String? reportCode;
  1241. DeleteRecordReportQualityRequest({
  1242. this.recordCode,
  1243. this.reportCode,
  1244. String? token,
  1245. }) : super(
  1246. token: token,
  1247. );
  1248. factory DeleteRecordReportQualityRequest.fromJson(Map<String, dynamic> map) {
  1249. return DeleteRecordReportQualityRequest(
  1250. recordCode: map['RecordCode'],
  1251. reportCode: map['ReportCode'],
  1252. token: map['Token'],
  1253. );
  1254. }
  1255. Map<String, dynamic> toJson() {
  1256. final map = super.toJson();
  1257. if (recordCode != null)
  1258. map['RecordCode'] = recordCode;
  1259. if (reportCode != null)
  1260. map['ReportCode'] = reportCode;
  1261. return map;
  1262. }
  1263. }