liveConsultation.m.dart 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290
  1. import 'connect.m.dart';
  2. import 'organization.m.dart';
  3. import 'aIDiagnosis.m.dart';
  4. import 'patient.m.dart';
  5. import 'authentication.m.dart';
  6. import 'package:fis_jsonrpc/utils.dart';
  7. class FindHigherOrganizationsRequest extends TokenRequest{
  8. String? organizationName;
  9. FindHigherOrganizationsRequest({
  10. this.organizationName,
  11. String? token,
  12. }) : super(
  13. token: token,
  14. );
  15. factory FindHigherOrganizationsRequest.fromJson(Map<String, dynamic> map) {
  16. return FindHigherOrganizationsRequest(
  17. organizationName: map['OrganizationName'],
  18. token: map['Token'],
  19. );
  20. }
  21. Map<String, dynamic> toJson() {
  22. final map = super.toJson();
  23. if(organizationName != null)
  24. map['OrganizationName'] = organizationName;
  25. return map;
  26. }
  27. }
  28. class FindGrassRootsOrganizationsRequest extends TokenRequest{
  29. String? organizationName;
  30. FindGrassRootsOrganizationsRequest({
  31. this.organizationName,
  32. String? token,
  33. }) : super(
  34. token: token,
  35. );
  36. factory FindGrassRootsOrganizationsRequest.fromJson(Map<String, dynamic> map) {
  37. return FindGrassRootsOrganizationsRequest(
  38. organizationName: map['OrganizationName'],
  39. token: map['Token'],
  40. );
  41. }
  42. Map<String, dynamic> toJson() {
  43. final map = super.toJson();
  44. if(organizationName != null)
  45. map['OrganizationName'] = organizationName;
  46. return map;
  47. }
  48. }
  49. class OrganizationExpertDTO extends UserBaseDTO{
  50. String? fullName;
  51. List<String >? fieldList;
  52. OrganizationExpertDTO({
  53. this.fullName,
  54. this.fieldList,
  55. String? userCode,
  56. String? userName,
  57. String? headImageUrl,
  58. DateTime? createTime,
  59. DateTime? updateTime,
  60. }) : super(
  61. userCode: userCode,
  62. userName: userName,
  63. headImageUrl: headImageUrl,
  64. createTime: createTime,
  65. updateTime: updateTime,
  66. );
  67. factory OrganizationExpertDTO.fromJson(Map<String, dynamic> map) {
  68. return OrganizationExpertDTO(
  69. fullName: map['FullName'],
  70. fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
  71. userCode: map['UserCode'],
  72. userName: map['UserName'],
  73. headImageUrl: map['HeadImageUrl'],
  74. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  75. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  76. );
  77. }
  78. Map<String, dynamic> toJson() {
  79. final map = super.toJson();
  80. if(fullName != null)
  81. map['FullName'] = fullName;
  82. if(fieldList != null)
  83. map['FieldList'] = fieldList;
  84. return map;
  85. }
  86. }
  87. class FindOrganizationExpertsRequest extends TokenRequest{
  88. String? organizationCode;
  89. String? expertName;
  90. FindOrganizationExpertsRequest({
  91. this.organizationCode,
  92. this.expertName,
  93. String? token,
  94. }) : super(
  95. token: token,
  96. );
  97. factory FindOrganizationExpertsRequest.fromJson(Map<String, dynamic> map) {
  98. return FindOrganizationExpertsRequest(
  99. organizationCode: map['OrganizationCode'],
  100. expertName: map['ExpertName'],
  101. token: map['Token'],
  102. );
  103. }
  104. Map<String, dynamic> toJson() {
  105. final map = super.toJson();
  106. if(organizationCode != null)
  107. map['OrganizationCode'] = organizationCode;
  108. if(expertName != null)
  109. map['ExpertName'] = expertName;
  110. return map;
  111. }
  112. }
  113. enum ConsultationReportMode {
  114. ExpertReport,
  115. ApplicantReport,
  116. }
  117. class ApplyConsultationRequest extends TokenRequest{
  118. String? expertUserCode;
  119. String? deviceCode;
  120. String? scanPosition;
  121. DateTime? consultationTime;
  122. List<DataItemDTO >? patientDatas;
  123. String? patientCode;
  124. ConsultationReportMode reportMode;
  125. String? diseases;
  126. String? scanUserCode;
  127. String? expertOrganizationCode;
  128. String? applyUserCode;
  129. String? primaryDiagnosis;
  130. ApplyConsultationRequest({
  131. this.expertUserCode,
  132. this.deviceCode,
  133. this.scanPosition,
  134. this.consultationTime,
  135. this.patientDatas,
  136. this.patientCode,
  137. this.reportMode = ConsultationReportMode.ExpertReport,
  138. this.diseases,
  139. this.scanUserCode,
  140. this.expertOrganizationCode,
  141. this.applyUserCode,
  142. this.primaryDiagnosis,
  143. String? token,
  144. }) : super(
  145. token: token,
  146. );
  147. factory ApplyConsultationRequest.fromJson(Map<String, dynamic> map) {
  148. return ApplyConsultationRequest(
  149. expertUserCode: map['ExpertUserCode'],
  150. deviceCode: map['DeviceCode'],
  151. scanPosition: map['ScanPosition'],
  152. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  153. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  154. patientCode: map['PatientCode'],
  155. reportMode: ConsultationReportMode.values.firstWhere((e) => e.index == map['ReportMode']),
  156. diseases: map['Diseases'],
  157. scanUserCode: map['ScanUserCode'],
  158. expertOrganizationCode: map['ExpertOrganizationCode'],
  159. applyUserCode: map['ApplyUserCode'],
  160. primaryDiagnosis: map['PrimaryDiagnosis'],
  161. token: map['Token'],
  162. );
  163. }
  164. Map<String, dynamic> toJson() {
  165. final map = super.toJson();
  166. if(expertUserCode != null)
  167. map['ExpertUserCode'] = expertUserCode;
  168. if(deviceCode != null)
  169. map['DeviceCode'] = deviceCode;
  170. if(scanPosition != null)
  171. map['ScanPosition'] = scanPosition;
  172. if(consultationTime != null)
  173. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  174. if(patientDatas != null)
  175. map['PatientDatas'] = patientDatas;
  176. if(patientCode != null)
  177. map['PatientCode'] = patientCode;
  178. map['ReportMode'] = reportMode.index;
  179. if(diseases != null)
  180. map['Diseases'] = diseases;
  181. if(scanUserCode != null)
  182. map['ScanUserCode'] = scanUserCode;
  183. if(expertOrganizationCode != null)
  184. map['ExpertOrganizationCode'] = expertOrganizationCode;
  185. if(applyUserCode != null)
  186. map['ApplyUserCode'] = applyUserCode;
  187. if(primaryDiagnosis != null)
  188. map['PrimaryDiagnosis'] = primaryDiagnosis;
  189. return map;
  190. }
  191. }
  192. class UpdateConsultationRequest extends TokenRequest{
  193. String? consultationCode;
  194. String? expertUserCode;
  195. String? deviceCode;
  196. String? scanPosition;
  197. DateTime? consultationTime;
  198. String? diseases;
  199. String? scanUserCode;
  200. String? expertOrganizationCode;
  201. String? applyUserCode;
  202. String? primaryDiagnosis;
  203. UpdateConsultationRequest({
  204. this.consultationCode,
  205. this.expertUserCode,
  206. this.deviceCode,
  207. this.scanPosition,
  208. this.consultationTime,
  209. this.diseases,
  210. this.scanUserCode,
  211. this.expertOrganizationCode,
  212. this.applyUserCode,
  213. this.primaryDiagnosis,
  214. String? token,
  215. }) : super(
  216. token: token,
  217. );
  218. factory UpdateConsultationRequest.fromJson(Map<String, dynamic> map) {
  219. return UpdateConsultationRequest(
  220. consultationCode: map['ConsultationCode'],
  221. expertUserCode: map['ExpertUserCode'],
  222. deviceCode: map['DeviceCode'],
  223. scanPosition: map['ScanPosition'],
  224. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  225. diseases: map['Diseases'],
  226. scanUserCode: map['ScanUserCode'],
  227. expertOrganizationCode: map['ExpertOrganizationCode'],
  228. applyUserCode: map['ApplyUserCode'],
  229. primaryDiagnosis: map['PrimaryDiagnosis'],
  230. token: map['Token'],
  231. );
  232. }
  233. Map<String, dynamic> toJson() {
  234. final map = super.toJson();
  235. if(consultationCode != null)
  236. map['ConsultationCode'] = consultationCode;
  237. if(expertUserCode != null)
  238. map['ExpertUserCode'] = expertUserCode;
  239. if(deviceCode != null)
  240. map['DeviceCode'] = deviceCode;
  241. if(scanPosition != null)
  242. map['ScanPosition'] = scanPosition;
  243. if(consultationTime != null)
  244. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  245. if(diseases != null)
  246. map['Diseases'] = diseases;
  247. if(scanUserCode != null)
  248. map['ScanUserCode'] = scanUserCode;
  249. if(expertOrganizationCode != null)
  250. map['ExpertOrganizationCode'] = expertOrganizationCode;
  251. if(applyUserCode != null)
  252. map['ApplyUserCode'] = applyUserCode;
  253. if(primaryDiagnosis != null)
  254. map['PrimaryDiagnosis'] = primaryDiagnosis;
  255. return map;
  256. }
  257. }
  258. class FindAssistantExpertsRequest extends TokenRequest{
  259. String? expertName;
  260. FindAssistantExpertsRequest({
  261. this.expertName,
  262. String? token,
  263. }) : super(
  264. token: token,
  265. );
  266. factory FindAssistantExpertsRequest.fromJson(Map<String, dynamic> map) {
  267. return FindAssistantExpertsRequest(
  268. expertName: map['ExpertName'],
  269. token: map['Token'],
  270. );
  271. }
  272. Map<String, dynamic> toJson() {
  273. final map = super.toJson();
  274. if(expertName != null)
  275. map['ExpertName'] = expertName;
  276. return map;
  277. }
  278. }
  279. enum ConsultationStatusEnum {
  280. placeHolder_0,
  281. Applied,
  282. Withdrawn,
  283. Rejected,
  284. ToStart,
  285. InProgress,
  286. PendingReport,
  287. End,
  288. }
  289. class ConsultationFileDTO {
  290. String? sourceUrl;
  291. String? previewImageUrl;
  292. String? coverImageUrl;
  293. DateTime? createTime;
  294. String? creatorCode;
  295. RemedicalFileDataTypeEnum fileDataType;
  296. ConsultationFileDTO({
  297. this.sourceUrl,
  298. this.previewImageUrl,
  299. this.coverImageUrl,
  300. this.createTime,
  301. this.creatorCode,
  302. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  303. });
  304. factory ConsultationFileDTO.fromJson(Map<String, dynamic> map) {
  305. return ConsultationFileDTO(
  306. sourceUrl: map['SourceUrl'],
  307. previewImageUrl: map['PreviewImageUrl'],
  308. coverImageUrl: map['CoverImageUrl'],
  309. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  310. creatorCode: map['CreatorCode'],
  311. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  312. );
  313. }
  314. Map<String, dynamic> toJson() {
  315. final map = Map<String, dynamic>();
  316. if(sourceUrl != null)
  317. map['SourceUrl'] = sourceUrl;
  318. if(previewImageUrl != null)
  319. map['PreviewImageUrl'] = previewImageUrl;
  320. if(coverImageUrl != null)
  321. map['CoverImageUrl'] = coverImageUrl;
  322. if(createTime != null)
  323. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  324. if(creatorCode != null)
  325. map['CreatorCode'] = creatorCode;
  326. map['FileDataType'] = fileDataType.index;
  327. return map;
  328. }
  329. }
  330. enum LiveConsultationMemberStatus {
  331. Default,
  332. Accepted,
  333. Rejected,
  334. Joined,
  335. Left,
  336. }
  337. class ConsultationMemberDTO {
  338. String? memberCode;
  339. String? memberOrganizationCode;
  340. String? memberDepartmentCode;
  341. LiveConsultationMemberStatus memberStatus;
  342. DateTime? memberOperateTime;
  343. ConsultationMemberDTO({
  344. this.memberCode,
  345. this.memberOrganizationCode,
  346. this.memberDepartmentCode,
  347. this.memberStatus = LiveConsultationMemberStatus.Default,
  348. this.memberOperateTime,
  349. });
  350. factory ConsultationMemberDTO.fromJson(Map<String, dynamic> map) {
  351. return ConsultationMemberDTO(
  352. memberCode: map['MemberCode'],
  353. memberOrganizationCode: map['MemberOrganizationCode'],
  354. memberDepartmentCode: map['MemberDepartmentCode'],
  355. memberStatus: LiveConsultationMemberStatus.values.firstWhere((e) => e.index == map['MemberStatus']),
  356. memberOperateTime: map['MemberOperateTime'] != null ? DateTime.parse(map['MemberOperateTime']) : null,
  357. );
  358. }
  359. Map<String, dynamic> toJson() {
  360. final map = Map<String, dynamic>();
  361. if(memberCode != null)
  362. map['MemberCode'] = memberCode;
  363. if(memberOrganizationCode != null)
  364. map['MemberOrganizationCode'] = memberOrganizationCode;
  365. if(memberDepartmentCode != null)
  366. map['MemberDepartmentCode'] = memberDepartmentCode;
  367. map['MemberStatus'] = memberStatus.index;
  368. if(memberOperateTime != null)
  369. map['MemberOperateTime'] = JsonRpcUtils.dateFormat(memberOperateTime!);
  370. return map;
  371. }
  372. }
  373. enum ConsultationReminderTimeEnum {
  374. FifteenMinutes,
  375. ThirtyMinutes,
  376. SixtyMinutes,
  377. OneDay,
  378. }
  379. enum ConsultationReminderMode {
  380. Application,
  381. SMS,
  382. }
  383. class ConsultationReminderDTO {
  384. ConsultationReminderTimeEnum consultationReminderTime;
  385. ConsultationReminderMode consultationReminderMode;
  386. ConsultationReminderDTO({
  387. this.consultationReminderTime = ConsultationReminderTimeEnum.FifteenMinutes,
  388. this.consultationReminderMode = ConsultationReminderMode.Application,
  389. });
  390. factory ConsultationReminderDTO.fromJson(Map<String, dynamic> map) {
  391. return ConsultationReminderDTO(
  392. consultationReminderTime: ConsultationReminderTimeEnum.values.firstWhere((e) => e.index == map['ConsultationReminderTime']),
  393. consultationReminderMode: ConsultationReminderMode.values.firstWhere((e) => e.index == map['ConsultationReminderMode']),
  394. );
  395. }
  396. Map<String, dynamic> toJson() {
  397. final map = Map<String, dynamic>();
  398. map['ConsultationReminderTime'] = consultationReminderTime.index;
  399. map['ConsultationReminderMode'] = consultationReminderMode.index;
  400. return map;
  401. }
  402. }
  403. class ConsultationDetailDTO {
  404. String? consultationCode;
  405. String? applyOrganizationCode;
  406. String? applyDepartmentCode;
  407. String? applyUserCode;
  408. String? expertOrganizationCode;
  409. String? expertDepartmentCode;
  410. String? expertUserCode;
  411. String? deviceCode;
  412. String? operateUserCode;
  413. String? scanUserCode;
  414. String? patientCode;
  415. OrganizationPatientTypeEnum patientType;
  416. String? scanPosition;
  417. DateTime? createTime;
  418. DateTime? consultationTime;
  419. ConsultationStatusEnum consultationStatus;
  420. String? applyOrganizationName;
  421. String? applyUserName;
  422. String? operateUserName;
  423. String? scanUserName;
  424. String? expertOrganizationName;
  425. String? expertUserName;
  426. String? deviceName;
  427. String? patientName;
  428. String? sex;
  429. List<DataItemDTO >? patientDatas;
  430. List<ConsultationFileDTO >? fileInfos;
  431. String? rejectReason;
  432. String? location;
  433. List<ConsultationMemberDTO >? consultationMembers;
  434. String? description;
  435. List<ConsultationReminderDTO >? consultationReminders;
  436. String? approverCode;
  437. ConsultationReportMode reportMode;
  438. String? diseases;
  439. String? primaryDiagnosis;
  440. ConsultationDetailDTO({
  441. this.consultationCode,
  442. this.applyOrganizationCode,
  443. this.applyDepartmentCode,
  444. this.applyUserCode,
  445. this.expertOrganizationCode,
  446. this.expertDepartmentCode,
  447. this.expertUserCode,
  448. this.deviceCode,
  449. this.operateUserCode,
  450. this.scanUserCode,
  451. this.patientCode,
  452. this.patientType = OrganizationPatientTypeEnum.Person,
  453. this.scanPosition,
  454. this.createTime,
  455. this.consultationTime,
  456. this.consultationStatus = ConsultationStatusEnum.Applied,
  457. this.applyOrganizationName,
  458. this.applyUserName,
  459. this.operateUserName,
  460. this.scanUserName,
  461. this.expertOrganizationName,
  462. this.expertUserName,
  463. this.deviceName,
  464. this.patientName,
  465. this.sex,
  466. this.patientDatas,
  467. this.fileInfos,
  468. this.rejectReason,
  469. this.location,
  470. this.consultationMembers,
  471. this.description,
  472. this.consultationReminders,
  473. this.approverCode,
  474. this.reportMode = ConsultationReportMode.ExpertReport,
  475. this.diseases,
  476. this.primaryDiagnosis,
  477. });
  478. factory ConsultationDetailDTO.fromJson(Map<String, dynamic> map) {
  479. return ConsultationDetailDTO(
  480. consultationCode: map['ConsultationCode'],
  481. applyOrganizationCode: map['ApplyOrganizationCode'],
  482. applyDepartmentCode: map['ApplyDepartmentCode'],
  483. applyUserCode: map['ApplyUserCode'],
  484. expertOrganizationCode: map['ExpertOrganizationCode'],
  485. expertDepartmentCode: map['ExpertDepartmentCode'],
  486. expertUserCode: map['ExpertUserCode'],
  487. deviceCode: map['DeviceCode'],
  488. operateUserCode: map['OperateUserCode'],
  489. scanUserCode: map['ScanUserCode'],
  490. patientCode: map['PatientCode'],
  491. patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
  492. scanPosition: map['ScanPosition'],
  493. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  494. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  495. consultationStatus: ConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  496. applyOrganizationName: map['ApplyOrganizationName'],
  497. applyUserName: map['ApplyUserName'],
  498. operateUserName: map['OperateUserName'],
  499. scanUserName: map['ScanUserName'],
  500. expertOrganizationName: map['ExpertOrganizationName'],
  501. expertUserName: map['ExpertUserName'],
  502. deviceName: map['DeviceName'],
  503. patientName: map['PatientName'],
  504. sex: map['Sex'],
  505. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  506. fileInfos: map['FileInfos'] != null ? (map['FileInfos'] as List).map((e)=>ConsultationFileDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  507. rejectReason: map['RejectReason'],
  508. location: map['Location'],
  509. consultationMembers: map['ConsultationMembers'] != null ? (map['ConsultationMembers'] as List).map((e)=>ConsultationMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  510. description: map['Description'],
  511. consultationReminders: map['ConsultationReminders'] != null ? (map['ConsultationReminders'] as List).map((e)=>ConsultationReminderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  512. approverCode: map['ApproverCode'],
  513. reportMode: ConsultationReportMode.values.firstWhere((e) => e.index == map['ReportMode']),
  514. diseases: map['Diseases'],
  515. primaryDiagnosis: map['PrimaryDiagnosis'],
  516. );
  517. }
  518. Map<String, dynamic> toJson() {
  519. final map = Map<String, dynamic>();
  520. if(consultationCode != null)
  521. map['ConsultationCode'] = consultationCode;
  522. if(applyOrganizationCode != null)
  523. map['ApplyOrganizationCode'] = applyOrganizationCode;
  524. if(applyDepartmentCode != null)
  525. map['ApplyDepartmentCode'] = applyDepartmentCode;
  526. if(applyUserCode != null)
  527. map['ApplyUserCode'] = applyUserCode;
  528. if(expertOrganizationCode != null)
  529. map['ExpertOrganizationCode'] = expertOrganizationCode;
  530. if(expertDepartmentCode != null)
  531. map['ExpertDepartmentCode'] = expertDepartmentCode;
  532. if(expertUserCode != null)
  533. map['ExpertUserCode'] = expertUserCode;
  534. if(deviceCode != null)
  535. map['DeviceCode'] = deviceCode;
  536. if(operateUserCode != null)
  537. map['OperateUserCode'] = operateUserCode;
  538. if(scanUserCode != null)
  539. map['ScanUserCode'] = scanUserCode;
  540. if(patientCode != null)
  541. map['PatientCode'] = patientCode;
  542. map['PatientType'] = patientType.index;
  543. if(scanPosition != null)
  544. map['ScanPosition'] = scanPosition;
  545. if(createTime != null)
  546. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  547. if(consultationTime != null)
  548. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  549. map['ConsultationStatus'] = consultationStatus.index;
  550. if(applyOrganizationName != null)
  551. map['ApplyOrganizationName'] = applyOrganizationName;
  552. if(applyUserName != null)
  553. map['ApplyUserName'] = applyUserName;
  554. if(operateUserName != null)
  555. map['OperateUserName'] = operateUserName;
  556. if(scanUserName != null)
  557. map['ScanUserName'] = scanUserName;
  558. if(expertOrganizationName != null)
  559. map['ExpertOrganizationName'] = expertOrganizationName;
  560. if(expertUserName != null)
  561. map['ExpertUserName'] = expertUserName;
  562. if(deviceName != null)
  563. map['DeviceName'] = deviceName;
  564. if(patientName != null)
  565. map['PatientName'] = patientName;
  566. if(sex != null)
  567. map['Sex'] = sex;
  568. if(patientDatas != null)
  569. map['PatientDatas'] = patientDatas;
  570. if(fileInfos != null)
  571. map['FileInfos'] = fileInfos;
  572. if(rejectReason != null)
  573. map['RejectReason'] = rejectReason;
  574. if(location != null)
  575. map['Location'] = location;
  576. if(consultationMembers != null)
  577. map['ConsultationMembers'] = consultationMembers;
  578. if(description != null)
  579. map['Description'] = description;
  580. if(consultationReminders != null)
  581. map['ConsultationReminders'] = consultationReminders;
  582. if(approverCode != null)
  583. map['ApproverCode'] = approverCode;
  584. map['ReportMode'] = reportMode.index;
  585. if(diseases != null)
  586. map['Diseases'] = diseases;
  587. if(primaryDiagnosis != null)
  588. map['PrimaryDiagnosis'] = primaryDiagnosis;
  589. return map;
  590. }
  591. }
  592. enum QueryConsultationStatusEnum {
  593. All,
  594. Applied,
  595. Withdrawn,
  596. Rejected,
  597. ToStart,
  598. InProgress,
  599. PendingReport,
  600. End,
  601. }
  602. enum ConsultationQueryTypeEnum {
  603. MyApply,
  604. MyArrange,
  605. MyJoin,
  606. }
  607. class FindConsultationByPageRequest extends PageRequest{
  608. String? keyword;
  609. String? expertUserName;
  610. DateTime? startDate;
  611. DateTime? endDate;
  612. QueryConsultationStatusEnum? consultationStatus;
  613. ConsultationQueryTypeEnum? consultationQueryType;
  614. FindConsultationByPageRequest({
  615. this.keyword,
  616. this.expertUserName,
  617. this.startDate,
  618. this.endDate,
  619. this.consultationStatus,
  620. this.consultationQueryType,
  621. int pageIndex = 0,
  622. int pageSize = 0,
  623. String? token,
  624. }) : super(
  625. pageIndex: pageIndex,
  626. pageSize: pageSize,
  627. token: token,
  628. );
  629. factory FindConsultationByPageRequest.fromJson(Map<String, dynamic> map) {
  630. return FindConsultationByPageRequest(
  631. keyword: map['Keyword'],
  632. expertUserName: map['ExpertUserName'],
  633. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  634. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  635. consultationStatus: map['ConsultationStatus'] != null ? QueryConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']) : null,
  636. consultationQueryType: map['ConsultationQueryType'] != null ? ConsultationQueryTypeEnum.values.firstWhere((e) => e.index == map['ConsultationQueryType']) : null,
  637. pageIndex: map['PageIndex'],
  638. pageSize: map['PageSize'],
  639. token: map['Token'],
  640. );
  641. }
  642. Map<String, dynamic> toJson() {
  643. final map = super.toJson();
  644. if(keyword != null)
  645. map['Keyword'] = keyword;
  646. if(expertUserName != null)
  647. map['ExpertUserName'] = expertUserName;
  648. if(startDate != null)
  649. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  650. if(endDate != null)
  651. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  652. if(consultationStatus != null)
  653. map['ConsultationStatus'] = consultationStatus;
  654. if(consultationQueryType != null)
  655. map['ConsultationQueryType'] = consultationQueryType;
  656. return map;
  657. }
  658. }
  659. class FindConsultationDetailRequest extends TokenRequest{
  660. String? consultationCode;
  661. FindConsultationDetailRequest({
  662. this.consultationCode,
  663. String? token,
  664. }) : super(
  665. token: token,
  666. );
  667. factory FindConsultationDetailRequest.fromJson(Map<String, dynamic> map) {
  668. return FindConsultationDetailRequest(
  669. consultationCode: map['ConsultationCode'],
  670. token: map['Token'],
  671. );
  672. }
  673. Map<String, dynamic> toJson() {
  674. final map = super.toJson();
  675. if(consultationCode != null)
  676. map['ConsultationCode'] = consultationCode;
  677. return map;
  678. }
  679. }
  680. class ApprovalConsultationRequest extends TokenRequest{
  681. String? consultationCode;
  682. String? expertUserCode;
  683. DateTime? consultationTime;
  684. String? location;
  685. List<String >? consultationMemberCodes;
  686. String? description;
  687. List<ConsultationReminderDTO >? consultationReminders;
  688. ApprovalConsultationRequest({
  689. this.consultationCode,
  690. this.expertUserCode,
  691. this.consultationTime,
  692. this.location,
  693. this.consultationMemberCodes,
  694. this.description,
  695. this.consultationReminders,
  696. String? token,
  697. }) : super(
  698. token: token,
  699. );
  700. factory ApprovalConsultationRequest.fromJson(Map<String, dynamic> map) {
  701. return ApprovalConsultationRequest(
  702. consultationCode: map['ConsultationCode'],
  703. expertUserCode: map['ExpertUserCode'],
  704. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  705. location: map['Location'],
  706. consultationMemberCodes: map['ConsultationMemberCodes'] != null ? map['ConsultationMemberCodes'].cast<String>().toList() : null,
  707. description: map['Description'],
  708. consultationReminders: map['ConsultationReminders'] != null ? (map['ConsultationReminders'] as List).map((e)=>ConsultationReminderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  709. token: map['Token'],
  710. );
  711. }
  712. Map<String, dynamic> toJson() {
  713. final map = super.toJson();
  714. if(consultationCode != null)
  715. map['ConsultationCode'] = consultationCode;
  716. if(expertUserCode != null)
  717. map['ExpertUserCode'] = expertUserCode;
  718. if(consultationTime != null)
  719. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  720. if(location != null)
  721. map['Location'] = location;
  722. if(consultationMemberCodes != null)
  723. map['ConsultationMemberCodes'] = consultationMemberCodes;
  724. if(description != null)
  725. map['Description'] = description;
  726. if(consultationReminders != null)
  727. map['ConsultationReminders'] = consultationReminders;
  728. return map;
  729. }
  730. }
  731. class RejectApplyConsultationRequest extends TokenRequest{
  732. String? consultationCode;
  733. String? reason;
  734. RejectApplyConsultationRequest({
  735. this.consultationCode,
  736. this.reason,
  737. String? token,
  738. }) : super(
  739. token: token,
  740. );
  741. factory RejectApplyConsultationRequest.fromJson(Map<String, dynamic> map) {
  742. return RejectApplyConsultationRequest(
  743. consultationCode: map['ConsultationCode'],
  744. reason: map['Reason'],
  745. token: map['Token'],
  746. );
  747. }
  748. Map<String, dynamic> toJson() {
  749. final map = super.toJson();
  750. if(consultationCode != null)
  751. map['ConsultationCode'] = consultationCode;
  752. if(reason != null)
  753. map['Reason'] = reason;
  754. return map;
  755. }
  756. }
  757. class RevokeConsultationRequest extends TokenRequest{
  758. String? consultationCode;
  759. RevokeConsultationRequest({
  760. this.consultationCode,
  761. String? token,
  762. }) : super(
  763. token: token,
  764. );
  765. factory RevokeConsultationRequest.fromJson(Map<String, dynamic> map) {
  766. return RevokeConsultationRequest(
  767. consultationCode: map['ConsultationCode'],
  768. token: map['Token'],
  769. );
  770. }
  771. Map<String, dynamic> toJson() {
  772. final map = super.toJson();
  773. if(consultationCode != null)
  774. map['ConsultationCode'] = consultationCode;
  775. return map;
  776. }
  777. }
  778. class DeleteConsultationRequest extends TokenRequest{
  779. String? consultationCode;
  780. DeleteConsultationRequest({
  781. this.consultationCode,
  782. String? token,
  783. }) : super(
  784. token: token,
  785. );
  786. factory DeleteConsultationRequest.fromJson(Map<String, dynamic> map) {
  787. return DeleteConsultationRequest(
  788. consultationCode: map['ConsultationCode'],
  789. token: map['Token'],
  790. );
  791. }
  792. Map<String, dynamic> toJson() {
  793. final map = super.toJson();
  794. if(consultationCode != null)
  795. map['ConsultationCode'] = consultationCode;
  796. return map;
  797. }
  798. }
  799. class ConsultationFileBaseDTO {
  800. String? sourceUrl;
  801. String? previewImageUrl;
  802. String? coverImageUrl;
  803. RemedicalFileDataTypeEnum fileDataType;
  804. ConsultationFileBaseDTO({
  805. this.sourceUrl,
  806. this.previewImageUrl,
  807. this.coverImageUrl,
  808. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  809. });
  810. factory ConsultationFileBaseDTO.fromJson(Map<String, dynamic> map) {
  811. return ConsultationFileBaseDTO(
  812. sourceUrl: map['SourceUrl'],
  813. previewImageUrl: map['PreviewImageUrl'],
  814. coverImageUrl: map['CoverImageUrl'],
  815. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  816. );
  817. }
  818. Map<String, dynamic> toJson() {
  819. final map = Map<String, dynamic>();
  820. if(sourceUrl != null)
  821. map['SourceUrl'] = sourceUrl;
  822. if(previewImageUrl != null)
  823. map['PreviewImageUrl'] = previewImageUrl;
  824. if(coverImageUrl != null)
  825. map['CoverImageUrl'] = coverImageUrl;
  826. map['FileDataType'] = fileDataType.index;
  827. return map;
  828. }
  829. }
  830. class UpdateConsultationFilesInfoRequest extends TokenRequest{
  831. String? consultationCode;
  832. List<ConsultationFileBaseDTO >? fileInfos;
  833. UpdateConsultationFilesInfoRequest({
  834. this.consultationCode,
  835. this.fileInfos,
  836. String? token,
  837. }) : super(
  838. token: token,
  839. );
  840. factory UpdateConsultationFilesInfoRequest.fromJson(Map<String, dynamic> map) {
  841. return UpdateConsultationFilesInfoRequest(
  842. consultationCode: map['ConsultationCode'],
  843. fileInfos: map['FileInfos'] != null ? (map['FileInfos'] as List).map((e)=>ConsultationFileBaseDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  844. token: map['Token'],
  845. );
  846. }
  847. Map<String, dynamic> toJson() {
  848. final map = super.toJson();
  849. if(consultationCode != null)
  850. map['ConsultationCode'] = consultationCode;
  851. if(fileInfos != null)
  852. map['FileInfos'] = fileInfos;
  853. return map;
  854. }
  855. }
  856. class ConsultationAssistantDTO extends UserBaseDTO{
  857. String? fullName;
  858. ConsultationAssistantDTO({
  859. this.fullName,
  860. String? userCode,
  861. String? userName,
  862. String? headImageUrl,
  863. DateTime? createTime,
  864. DateTime? updateTime,
  865. }) : super(
  866. userCode: userCode,
  867. userName: userName,
  868. headImageUrl: headImageUrl,
  869. createTime: createTime,
  870. updateTime: updateTime,
  871. );
  872. factory ConsultationAssistantDTO.fromJson(Map<String, dynamic> map) {
  873. return ConsultationAssistantDTO(
  874. fullName: map['FullName'],
  875. userCode: map['UserCode'],
  876. userName: map['UserName'],
  877. headImageUrl: map['HeadImageUrl'],
  878. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  879. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  880. );
  881. }
  882. Map<String, dynamic> toJson() {
  883. final map = super.toJson();
  884. if(fullName != null)
  885. map['FullName'] = fullName;
  886. return map;
  887. }
  888. }
  889. class FindOrganizationAssistantsRequest extends TokenRequest{
  890. String? assistantName;
  891. FindOrganizationAssistantsRequest({
  892. this.assistantName,
  893. String? token,
  894. }) : super(
  895. token: token,
  896. );
  897. factory FindOrganizationAssistantsRequest.fromJson(Map<String, dynamic> map) {
  898. return FindOrganizationAssistantsRequest(
  899. assistantName: map['AssistantName'],
  900. token: map['Token'],
  901. );
  902. }
  903. Map<String, dynamic> toJson() {
  904. final map = super.toJson();
  905. if(assistantName != null)
  906. map['AssistantName'] = assistantName;
  907. return map;
  908. }
  909. }
  910. class UpdateMyOrganizationAssistantRequest extends TokenRequest{
  911. String? userCode;
  912. UpdateMyOrganizationAssistantRequest({
  913. this.userCode,
  914. String? token,
  915. }) : super(
  916. token: token,
  917. );
  918. factory UpdateMyOrganizationAssistantRequest.fromJson(Map<String, dynamic> map) {
  919. return UpdateMyOrganizationAssistantRequest(
  920. userCode: map['UserCode'],
  921. token: map['Token'],
  922. );
  923. }
  924. Map<String, dynamic> toJson() {
  925. final map = super.toJson();
  926. if(userCode != null)
  927. map['UserCode'] = userCode;
  928. return map;
  929. }
  930. }
  931. class FindConsultationPatientPageRequest extends PageRequest{
  932. String? keyword;
  933. DateTime? startDate;
  934. DateTime? endDate;
  935. FindConsultationPatientPageRequest({
  936. this.keyword,
  937. this.startDate,
  938. this.endDate,
  939. int pageIndex = 0,
  940. int pageSize = 0,
  941. String? token,
  942. }) : super(
  943. pageIndex: pageIndex,
  944. pageSize: pageSize,
  945. token: token,
  946. );
  947. factory FindConsultationPatientPageRequest.fromJson(Map<String, dynamic> map) {
  948. return FindConsultationPatientPageRequest(
  949. keyword: map['Keyword'],
  950. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  951. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  952. pageIndex: map['PageIndex'],
  953. pageSize: map['PageSize'],
  954. token: map['Token'],
  955. );
  956. }
  957. Map<String, dynamic> toJson() {
  958. final map = super.toJson();
  959. if(keyword != null)
  960. map['Keyword'] = keyword;
  961. if(startDate != null)
  962. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  963. if(endDate != null)
  964. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  965. return map;
  966. }
  967. }
  968. enum LiveMemberEnum {
  969. placeHolder_0,
  970. User,
  971. Device,
  972. }
  973. class LiveData {
  974. int height;
  975. int width;
  976. String? rtmpPushUrl;
  977. String? rtmpPullUrl;
  978. String? httpPullUrl;
  979. String? hlsPullUrl;
  980. LiveData({
  981. this.height = 0,
  982. this.width = 0,
  983. this.rtmpPushUrl,
  984. this.rtmpPullUrl,
  985. this.httpPullUrl,
  986. this.hlsPullUrl,
  987. });
  988. factory LiveData.fromJson(Map<String, dynamic> map) {
  989. return LiveData(
  990. height: map['Height'],
  991. width: map['Width'],
  992. rtmpPushUrl: map['RtmpPushUrl'],
  993. rtmpPullUrl: map['RtmpPullUrl'],
  994. httpPullUrl: map['HttpPullUrl'],
  995. hlsPullUrl: map['HlsPullUrl'],
  996. );
  997. }
  998. Map<String, dynamic> toJson() {
  999. final map = Map<String, dynamic>();
  1000. map['Height'] = height;
  1001. map['Width'] = width;
  1002. if(rtmpPushUrl != null)
  1003. map['RtmpPushUrl'] = rtmpPushUrl;
  1004. if(rtmpPullUrl != null)
  1005. map['RtmpPullUrl'] = rtmpPullUrl;
  1006. if(httpPullUrl != null)
  1007. map['HttpPullUrl'] = httpPullUrl;
  1008. if(hlsPullUrl != null)
  1009. map['HlsPullUrl'] = hlsPullUrl;
  1010. return map;
  1011. }
  1012. }
  1013. class LiveConsultationMember {
  1014. String? id;
  1015. String? name;
  1016. LiveMemberEnum memberType;
  1017. String? headImageToken;
  1018. bool isOnline;
  1019. bool mute;
  1020. bool videoOpend;
  1021. bool isInitiator;
  1022. bool isBusy;
  1023. LiveConsultationMemberStatus status;
  1024. String? loginServerUrl;
  1025. LoginSource loginSource;
  1026. LiveData? liveData;
  1027. LiveConsultationMember({
  1028. this.id,
  1029. this.name,
  1030. this.memberType = LiveMemberEnum.User,
  1031. this.headImageToken,
  1032. this.isOnline = false,
  1033. this.mute = false,
  1034. this.videoOpend = false,
  1035. this.isInitiator = false,
  1036. this.isBusy = false,
  1037. this.status = LiveConsultationMemberStatus.Default,
  1038. this.loginServerUrl,
  1039. this.loginSource = LoginSource.PC,
  1040. this.liveData,
  1041. });
  1042. factory LiveConsultationMember.fromJson(Map<String, dynamic> map) {
  1043. return LiveConsultationMember(
  1044. id: map['Id'],
  1045. name: map['Name'],
  1046. memberType: LiveMemberEnum.values.firstWhere((e) => e.index == map['MemberType']),
  1047. headImageToken: map['HeadImageToken'],
  1048. isOnline: map['IsOnline'],
  1049. mute: map['Mute'],
  1050. videoOpend: map['VideoOpend'],
  1051. isInitiator: map['IsInitiator'],
  1052. isBusy: map['IsBusy'],
  1053. status: LiveConsultationMemberStatus.values.firstWhere((e) => e.index == map['Status']),
  1054. loginServerUrl: map['LoginServerUrl'],
  1055. loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
  1056. liveData: map['LiveData'] != null ? LiveData.fromJson(map['LiveData']) : null,
  1057. );
  1058. }
  1059. Map<String, dynamic> toJson() {
  1060. final map = Map<String, dynamic>();
  1061. if(id != null)
  1062. map['Id'] = id;
  1063. if(name != null)
  1064. map['Name'] = name;
  1065. map['MemberType'] = memberType.index;
  1066. if(headImageToken != null)
  1067. map['HeadImageToken'] = headImageToken;
  1068. map['IsOnline'] = isOnline;
  1069. map['Mute'] = mute;
  1070. map['VideoOpend'] = videoOpend;
  1071. map['IsInitiator'] = isInitiator;
  1072. map['IsBusy'] = isBusy;
  1073. map['Status'] = status.index;
  1074. if(loginServerUrl != null)
  1075. map['LoginServerUrl'] = loginServerUrl;
  1076. map['LoginSource'] = loginSource.index;
  1077. if(liveData != null)
  1078. map['LiveData'] = liveData;
  1079. return map;
  1080. }
  1081. }
  1082. class InitiateLiveConsultationResult {
  1083. String? consultationCode;
  1084. int roomNo;
  1085. List<LiveConsultationMember >? userLiveDatas;
  1086. List<LiveConsultationMember >? deviceLiveDatas;
  1087. InitiateLiveConsultationResult({
  1088. this.consultationCode,
  1089. this.roomNo = 0,
  1090. this.userLiveDatas,
  1091. this.deviceLiveDatas,
  1092. });
  1093. factory InitiateLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1094. return InitiateLiveConsultationResult(
  1095. consultationCode: map['ConsultationCode'],
  1096. roomNo: map['RoomNo'],
  1097. userLiveDatas: map['UserLiveDatas'] != null ? (map['UserLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  1098. deviceLiveDatas: map['DeviceLiveDatas'] != null ? (map['DeviceLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  1099. );
  1100. }
  1101. Map<String, dynamic> toJson() {
  1102. final map = Map<String, dynamic>();
  1103. if(consultationCode != null)
  1104. map['ConsultationCode'] = consultationCode;
  1105. map['RoomNo'] = roomNo;
  1106. if(userLiveDatas != null)
  1107. map['UserLiveDatas'] = userLiveDatas;
  1108. if(deviceLiveDatas != null)
  1109. map['DeviceLiveDatas'] = deviceLiveDatas;
  1110. return map;
  1111. }
  1112. }
  1113. class InitiateLiveConsultationRequest extends TokenRequest{
  1114. String? consultationCode;
  1115. InitiateLiveConsultationRequest({
  1116. this.consultationCode,
  1117. String? token,
  1118. }) : super(
  1119. token: token,
  1120. );
  1121. factory InitiateLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1122. return InitiateLiveConsultationRequest(
  1123. consultationCode: map['ConsultationCode'],
  1124. token: map['Token'],
  1125. );
  1126. }
  1127. Map<String, dynamic> toJson() {
  1128. final map = super.toJson();
  1129. if(consultationCode != null)
  1130. map['ConsultationCode'] = consultationCode;
  1131. return map;
  1132. }
  1133. }
  1134. class InviteInLiveConsultationResult {
  1135. String? consultationCode;
  1136. InviteInLiveConsultationResult({
  1137. this.consultationCode,
  1138. });
  1139. factory InviteInLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1140. return InviteInLiveConsultationResult(
  1141. consultationCode: map['ConsultationCode'],
  1142. );
  1143. }
  1144. Map<String, dynamic> toJson() {
  1145. final map = Map<String, dynamic>();
  1146. if(consultationCode != null)
  1147. map['ConsultationCode'] = consultationCode;
  1148. return map;
  1149. }
  1150. }
  1151. class InviteInLiveConsultationRequest extends TokenRequest{
  1152. String? consultationCode;
  1153. List<String >? inviteCodes;
  1154. int roomNo;
  1155. InviteInLiveConsultationRequest({
  1156. this.consultationCode,
  1157. this.inviteCodes,
  1158. this.roomNo = 0,
  1159. String? token,
  1160. }) : super(
  1161. token: token,
  1162. );
  1163. factory InviteInLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1164. return InviteInLiveConsultationRequest(
  1165. consultationCode: map['ConsultationCode'],
  1166. inviteCodes: map['InviteCodes'] != null ? map['InviteCodes'].cast<String>().toList() : null,
  1167. roomNo: map['RoomNo'],
  1168. token: map['Token'],
  1169. );
  1170. }
  1171. Map<String, dynamic> toJson() {
  1172. final map = super.toJson();
  1173. if(consultationCode != null)
  1174. map['ConsultationCode'] = consultationCode;
  1175. if(inviteCodes != null)
  1176. map['InviteCodes'] = inviteCodes;
  1177. map['RoomNo'] = roomNo;
  1178. return map;
  1179. }
  1180. }
  1181. class CancelInvitingInLiveConsultationResult {
  1182. String? consultationCode;
  1183. CancelInvitingInLiveConsultationResult({
  1184. this.consultationCode,
  1185. });
  1186. factory CancelInvitingInLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1187. return CancelInvitingInLiveConsultationResult(
  1188. consultationCode: map['ConsultationCode'],
  1189. );
  1190. }
  1191. Map<String, dynamic> toJson() {
  1192. final map = Map<String, dynamic>();
  1193. if(consultationCode != null)
  1194. map['ConsultationCode'] = consultationCode;
  1195. return map;
  1196. }
  1197. }
  1198. class CancelInvitingInLiveConsultationRequest extends TokenRequest{
  1199. String? consultationCode;
  1200. List<String >? inviteCodes;
  1201. int roomNo;
  1202. CancelInvitingInLiveConsultationRequest({
  1203. this.consultationCode,
  1204. this.inviteCodes,
  1205. this.roomNo = 0,
  1206. String? token,
  1207. }) : super(
  1208. token: token,
  1209. );
  1210. factory CancelInvitingInLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1211. return CancelInvitingInLiveConsultationRequest(
  1212. consultationCode: map['ConsultationCode'],
  1213. inviteCodes: map['InviteCodes'] != null ? map['InviteCodes'].cast<String>().toList() : null,
  1214. roomNo: map['RoomNo'],
  1215. token: map['Token'],
  1216. );
  1217. }
  1218. Map<String, dynamic> toJson() {
  1219. final map = super.toJson();
  1220. if(consultationCode != null)
  1221. map['ConsultationCode'] = consultationCode;
  1222. if(inviteCodes != null)
  1223. map['InviteCodes'] = inviteCodes;
  1224. map['RoomNo'] = roomNo;
  1225. return map;
  1226. }
  1227. }
  1228. class CancelLiveConsultationResult {
  1229. String? consultationCode;
  1230. CancelLiveConsultationResult({
  1231. this.consultationCode,
  1232. });
  1233. factory CancelLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1234. return CancelLiveConsultationResult(
  1235. consultationCode: map['ConsultationCode'],
  1236. );
  1237. }
  1238. Map<String, dynamic> toJson() {
  1239. final map = Map<String, dynamic>();
  1240. if(consultationCode != null)
  1241. map['ConsultationCode'] = consultationCode;
  1242. return map;
  1243. }
  1244. }
  1245. class CancelLiveConsultationRequest extends TokenRequest{
  1246. String? consultationCode;
  1247. CancelLiveConsultationRequest({
  1248. this.consultationCode,
  1249. String? token,
  1250. }) : super(
  1251. token: token,
  1252. );
  1253. factory CancelLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1254. return CancelLiveConsultationRequest(
  1255. consultationCode: map['ConsultationCode'],
  1256. token: map['Token'],
  1257. );
  1258. }
  1259. Map<String, dynamic> toJson() {
  1260. final map = super.toJson();
  1261. if(consultationCode != null)
  1262. map['ConsultationCode'] = consultationCode;
  1263. return map;
  1264. }
  1265. }
  1266. class AcceptLiveConsultationResult {
  1267. String? consultationCode;
  1268. AcceptLiveConsultationResult({
  1269. this.consultationCode,
  1270. });
  1271. factory AcceptLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1272. return AcceptLiveConsultationResult(
  1273. consultationCode: map['ConsultationCode'],
  1274. );
  1275. }
  1276. Map<String, dynamic> toJson() {
  1277. final map = Map<String, dynamic>();
  1278. if(consultationCode != null)
  1279. map['ConsultationCode'] = consultationCode;
  1280. return map;
  1281. }
  1282. }
  1283. class AcceptLiveConsultationRequest extends TokenRequest{
  1284. String? roomCode;
  1285. AcceptLiveConsultationRequest({
  1286. this.roomCode,
  1287. String? token,
  1288. }) : super(
  1289. token: token,
  1290. );
  1291. factory AcceptLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1292. return AcceptLiveConsultationRequest(
  1293. roomCode: map['RoomCode'],
  1294. token: map['Token'],
  1295. );
  1296. }
  1297. Map<String, dynamic> toJson() {
  1298. final map = super.toJson();
  1299. if(roomCode != null)
  1300. map['RoomCode'] = roomCode;
  1301. return map;
  1302. }
  1303. }
  1304. class RejectLiveConsultationResult {
  1305. String? consultationCode;
  1306. RejectLiveConsultationResult({
  1307. this.consultationCode,
  1308. });
  1309. factory RejectLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1310. return RejectLiveConsultationResult(
  1311. consultationCode: map['ConsultationCode'],
  1312. );
  1313. }
  1314. Map<String, dynamic> toJson() {
  1315. final map = Map<String, dynamic>();
  1316. if(consultationCode != null)
  1317. map['ConsultationCode'] = consultationCode;
  1318. return map;
  1319. }
  1320. }
  1321. class RejectLiveConsultationRequest extends TokenRequest{
  1322. String? consultationCode;
  1323. String? rejecterId;
  1324. RejectLiveConsultationRequest({
  1325. this.consultationCode,
  1326. this.rejecterId,
  1327. String? token,
  1328. }) : super(
  1329. token: token,
  1330. );
  1331. factory RejectLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1332. return RejectLiveConsultationRequest(
  1333. consultationCode: map['ConsultationCode'],
  1334. rejecterId: map['RejecterId'],
  1335. token: map['Token'],
  1336. );
  1337. }
  1338. Map<String, dynamic> toJson() {
  1339. final map = super.toJson();
  1340. if(consultationCode != null)
  1341. map['ConsultationCode'] = consultationCode;
  1342. if(rejecterId != null)
  1343. map['RejecterId'] = rejecterId;
  1344. return map;
  1345. }
  1346. }
  1347. class JoinLiveConsultationResult {
  1348. String? consultationCode;
  1349. JoinLiveConsultationResult({
  1350. this.consultationCode,
  1351. });
  1352. factory JoinLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1353. return JoinLiveConsultationResult(
  1354. consultationCode: map['ConsultationCode'],
  1355. );
  1356. }
  1357. Map<String, dynamic> toJson() {
  1358. final map = Map<String, dynamic>();
  1359. if(consultationCode != null)
  1360. map['ConsultationCode'] = consultationCode;
  1361. return map;
  1362. }
  1363. }
  1364. class JoinLiveConsultationRequest extends TokenRequest{
  1365. String? consultationCode;
  1366. String? joinerCode;
  1367. JoinLiveConsultationRequest({
  1368. this.consultationCode,
  1369. this.joinerCode,
  1370. String? token,
  1371. }) : super(
  1372. token: token,
  1373. );
  1374. factory JoinLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1375. return JoinLiveConsultationRequest(
  1376. consultationCode: map['ConsultationCode'],
  1377. joinerCode: map['JoinerCode'],
  1378. token: map['Token'],
  1379. );
  1380. }
  1381. Map<String, dynamic> toJson() {
  1382. final map = super.toJson();
  1383. if(consultationCode != null)
  1384. map['ConsultationCode'] = consultationCode;
  1385. if(joinerCode != null)
  1386. map['JoinerCode'] = joinerCode;
  1387. return map;
  1388. }
  1389. }
  1390. class LeaveLiveConsultationResult {
  1391. String? consultationCode;
  1392. LeaveLiveConsultationResult({
  1393. this.consultationCode,
  1394. });
  1395. factory LeaveLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1396. return LeaveLiveConsultationResult(
  1397. consultationCode: map['ConsultationCode'],
  1398. );
  1399. }
  1400. Map<String, dynamic> toJson() {
  1401. final map = Map<String, dynamic>();
  1402. if(consultationCode != null)
  1403. map['ConsultationCode'] = consultationCode;
  1404. return map;
  1405. }
  1406. }
  1407. class LeaveLiveConsultationRequest extends TokenRequest{
  1408. String? consultationCode;
  1409. String? leaverCode;
  1410. LeaveLiveConsultationRequest({
  1411. this.consultationCode,
  1412. this.leaverCode,
  1413. String? token,
  1414. }) : super(
  1415. token: token,
  1416. );
  1417. factory LeaveLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1418. return LeaveLiveConsultationRequest(
  1419. consultationCode: map['ConsultationCode'],
  1420. leaverCode: map['LeaverCode'],
  1421. token: map['Token'],
  1422. );
  1423. }
  1424. Map<String, dynamic> toJson() {
  1425. final map = super.toJson();
  1426. if(consultationCode != null)
  1427. map['ConsultationCode'] = consultationCode;
  1428. if(leaverCode != null)
  1429. map['LeaverCode'] = leaverCode;
  1430. return map;
  1431. }
  1432. }
  1433. class MuteLiveConsultationResult {
  1434. String? consultationCode;
  1435. MuteLiveConsultationResult({
  1436. this.consultationCode,
  1437. });
  1438. factory MuteLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1439. return MuteLiveConsultationResult(
  1440. consultationCode: map['ConsultationCode'],
  1441. );
  1442. }
  1443. Map<String, dynamic> toJson() {
  1444. final map = Map<String, dynamic>();
  1445. if(consultationCode != null)
  1446. map['ConsultationCode'] = consultationCode;
  1447. return map;
  1448. }
  1449. }
  1450. class MuteLiveConsultationRequest extends TokenRequest{
  1451. String? consultationCode;
  1452. String? memberCode;
  1453. bool mute;
  1454. MuteLiveConsultationRequest({
  1455. this.consultationCode,
  1456. this.memberCode,
  1457. this.mute = false,
  1458. String? token,
  1459. }) : super(
  1460. token: token,
  1461. );
  1462. factory MuteLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1463. return MuteLiveConsultationRequest(
  1464. consultationCode: map['ConsultationCode'],
  1465. memberCode: map['MemberCode'],
  1466. mute: map['Mute'],
  1467. token: map['Token'],
  1468. );
  1469. }
  1470. Map<String, dynamic> toJson() {
  1471. final map = super.toJson();
  1472. if(consultationCode != null)
  1473. map['ConsultationCode'] = consultationCode;
  1474. if(memberCode != null)
  1475. map['MemberCode'] = memberCode;
  1476. map['Mute'] = mute;
  1477. return map;
  1478. }
  1479. }
  1480. class SwitchLiveConsultationVideoResult {
  1481. String? consultationCode;
  1482. SwitchLiveConsultationVideoResult({
  1483. this.consultationCode,
  1484. });
  1485. factory SwitchLiveConsultationVideoResult.fromJson(Map<String, dynamic> map) {
  1486. return SwitchLiveConsultationVideoResult(
  1487. consultationCode: map['ConsultationCode'],
  1488. );
  1489. }
  1490. Map<String, dynamic> toJson() {
  1491. final map = Map<String, dynamic>();
  1492. if(consultationCode != null)
  1493. map['ConsultationCode'] = consultationCode;
  1494. return map;
  1495. }
  1496. }
  1497. class SwitchLiveConsultationVideoRequest extends TokenRequest{
  1498. String? consultationCode;
  1499. String? memberCode;
  1500. bool opened;
  1501. SwitchLiveConsultationVideoRequest({
  1502. this.consultationCode,
  1503. this.memberCode,
  1504. this.opened = false,
  1505. String? token,
  1506. }) : super(
  1507. token: token,
  1508. );
  1509. factory SwitchLiveConsultationVideoRequest.fromJson(Map<String, dynamic> map) {
  1510. return SwitchLiveConsultationVideoRequest(
  1511. consultationCode: map['ConsultationCode'],
  1512. memberCode: map['MemberCode'],
  1513. opened: map['Opened'],
  1514. token: map['Token'],
  1515. );
  1516. }
  1517. Map<String, dynamic> toJson() {
  1518. final map = super.toJson();
  1519. if(consultationCode != null)
  1520. map['ConsultationCode'] = consultationCode;
  1521. if(memberCode != null)
  1522. map['MemberCode'] = memberCode;
  1523. map['Opened'] = opened;
  1524. return map;
  1525. }
  1526. }
  1527. class LiveConsultationHeartRateResult {
  1528. String? consultationCode;
  1529. LiveConsultationHeartRateResult({
  1530. this.consultationCode,
  1531. });
  1532. factory LiveConsultationHeartRateResult.fromJson(Map<String, dynamic> map) {
  1533. return LiveConsultationHeartRateResult(
  1534. consultationCode: map['ConsultationCode'],
  1535. );
  1536. }
  1537. Map<String, dynamic> toJson() {
  1538. final map = Map<String, dynamic>();
  1539. if(consultationCode != null)
  1540. map['ConsultationCode'] = consultationCode;
  1541. return map;
  1542. }
  1543. }
  1544. class LiveConsultationHeartRateRequest extends TokenRequest{
  1545. String? consultationCode;
  1546. LiveConsultationHeartRateRequest({
  1547. this.consultationCode,
  1548. String? token,
  1549. }) : super(
  1550. token: token,
  1551. );
  1552. factory LiveConsultationHeartRateRequest.fromJson(Map<String, dynamic> map) {
  1553. return LiveConsultationHeartRateRequest(
  1554. consultationCode: map['ConsultationCode'],
  1555. token: map['Token'],
  1556. );
  1557. }
  1558. Map<String, dynamic> toJson() {
  1559. final map = super.toJson();
  1560. if(consultationCode != null)
  1561. map['ConsultationCode'] = consultationCode;
  1562. return map;
  1563. }
  1564. }
  1565. class BoardPointDTO {
  1566. double x;
  1567. double y;
  1568. BoardPointDTO({
  1569. this.x = 0,
  1570. this.y = 0,
  1571. });
  1572. factory BoardPointDTO.fromJson(Map<String, dynamic> map) {
  1573. return BoardPointDTO(
  1574. x: double.parse(map['X'].toString()),
  1575. y: double.parse(map['Y'].toString()),
  1576. );
  1577. }
  1578. Map<String, dynamic> toJson() {
  1579. final map = Map<String, dynamic>();
  1580. map['X'] = x;
  1581. map['Y'] = y;
  1582. return map;
  1583. }
  1584. }
  1585. enum BoardTypeEnum {
  1586. ReadOnly,
  1587. Ink,
  1588. Line,
  1589. Erase,
  1590. }
  1591. class SendInteractiveBoardDataRequest extends TokenRequest{
  1592. String? inkColor;
  1593. double inkThickness;
  1594. List<BoardPointDTO >? points;
  1595. BoardTypeEnum boardEditType;
  1596. String? consultationCode;
  1597. SendInteractiveBoardDataRequest({
  1598. this.inkColor,
  1599. this.inkThickness = 0,
  1600. this.points,
  1601. this.boardEditType = BoardTypeEnum.ReadOnly,
  1602. this.consultationCode,
  1603. String? token,
  1604. }) : super(
  1605. token: token,
  1606. );
  1607. factory SendInteractiveBoardDataRequest.fromJson(Map<String, dynamic> map) {
  1608. return SendInteractiveBoardDataRequest(
  1609. inkColor: map['InkColor'],
  1610. inkThickness: double.parse(map['InkThickness'].toString()),
  1611. points: map['Points'] != null ? (map['Points'] as List).map((e)=>BoardPointDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1612. boardEditType: BoardTypeEnum.values.firstWhere((e) => e.index == map['BoardEditType']),
  1613. consultationCode: map['ConsultationCode'],
  1614. token: map['Token'],
  1615. );
  1616. }
  1617. Map<String, dynamic> toJson() {
  1618. final map = super.toJson();
  1619. if(inkColor != null)
  1620. map['InkColor'] = inkColor;
  1621. map['InkThickness'] = inkThickness;
  1622. if(points != null)
  1623. map['Points'] = points;
  1624. map['BoardEditType'] = boardEditType.index;
  1625. if(consultationCode != null)
  1626. map['ConsultationCode'] = consultationCode;
  1627. return map;
  1628. }
  1629. }
  1630. class AddFollowUpVisitInfoRequest extends TokenRequest{
  1631. String? consultationRecordCode;
  1632. String? patientName;
  1633. String? patientPhone;
  1634. String? generalCase;
  1635. String? clinicalSituation;
  1636. String? doctorCode;
  1637. DateTime? occurredTime;
  1638. AddFollowUpVisitInfoRequest({
  1639. this.consultationRecordCode,
  1640. this.patientName,
  1641. this.patientPhone,
  1642. this.generalCase,
  1643. this.clinicalSituation,
  1644. this.doctorCode,
  1645. this.occurredTime,
  1646. String? token,
  1647. }) : super(
  1648. token: token,
  1649. );
  1650. factory AddFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  1651. return AddFollowUpVisitInfoRequest(
  1652. consultationRecordCode: map['ConsultationRecordCode'],
  1653. patientName: map['PatientName'],
  1654. patientPhone: map['PatientPhone'],
  1655. generalCase: map['GeneralCase'],
  1656. clinicalSituation: map['ClinicalSituation'],
  1657. doctorCode: map['DoctorCode'],
  1658. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  1659. token: map['Token'],
  1660. );
  1661. }
  1662. Map<String, dynamic> toJson() {
  1663. final map = super.toJson();
  1664. if(consultationRecordCode != null)
  1665. map['ConsultationRecordCode'] = consultationRecordCode;
  1666. if(patientName != null)
  1667. map['PatientName'] = patientName;
  1668. if(patientPhone != null)
  1669. map['PatientPhone'] = patientPhone;
  1670. if(generalCase != null)
  1671. map['GeneralCase'] = generalCase;
  1672. if(clinicalSituation != null)
  1673. map['ClinicalSituation'] = clinicalSituation;
  1674. if(doctorCode != null)
  1675. map['DoctorCode'] = doctorCode;
  1676. if(occurredTime != null)
  1677. map['OccurredTime'] = JsonRpcUtils.dateFormat(occurredTime!);
  1678. return map;
  1679. }
  1680. }
  1681. class DeleteFollowUpVisitInfoRequest extends TokenRequest{
  1682. String? followUpVisitCode;
  1683. DeleteFollowUpVisitInfoRequest({
  1684. this.followUpVisitCode,
  1685. String? token,
  1686. }) : super(
  1687. token: token,
  1688. );
  1689. factory DeleteFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  1690. return DeleteFollowUpVisitInfoRequest(
  1691. followUpVisitCode: map['FollowUpVisitCode'],
  1692. token: map['Token'],
  1693. );
  1694. }
  1695. Map<String, dynamic> toJson() {
  1696. final map = super.toJson();
  1697. if(followUpVisitCode != null)
  1698. map['FollowUpVisitCode'] = followUpVisitCode;
  1699. return map;
  1700. }
  1701. }
  1702. class UpdateFollowUpVisitInfoRequest extends TokenRequest{
  1703. String? followUpVisitCode;
  1704. String? generalCase;
  1705. String? clinicalSituation;
  1706. UpdateFollowUpVisitInfoRequest({
  1707. this.followUpVisitCode,
  1708. this.generalCase,
  1709. this.clinicalSituation,
  1710. String? token,
  1711. }) : super(
  1712. token: token,
  1713. );
  1714. factory UpdateFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  1715. return UpdateFollowUpVisitInfoRequest(
  1716. followUpVisitCode: map['FollowUpVisitCode'],
  1717. generalCase: map['GeneralCase'],
  1718. clinicalSituation: map['ClinicalSituation'],
  1719. token: map['Token'],
  1720. );
  1721. }
  1722. Map<String, dynamic> toJson() {
  1723. final map = super.toJson();
  1724. if(followUpVisitCode != null)
  1725. map['FollowUpVisitCode'] = followUpVisitCode;
  1726. if(generalCase != null)
  1727. map['GeneralCase'] = generalCase;
  1728. if(clinicalSituation != null)
  1729. map['ClinicalSituation'] = clinicalSituation;
  1730. return map;
  1731. }
  1732. }
  1733. class FollowUpVisitDTO {
  1734. String? followUpVisitCode;
  1735. String? consultationRecordCode;
  1736. String? patientName;
  1737. String? patientPhone;
  1738. String? generalCase;
  1739. String? clinicalSituation;
  1740. String? doctorCode;
  1741. String? doctorName;
  1742. DateTime? occurredTime;
  1743. FollowUpVisitDTO({
  1744. this.followUpVisitCode,
  1745. this.consultationRecordCode,
  1746. this.patientName,
  1747. this.patientPhone,
  1748. this.generalCase,
  1749. this.clinicalSituation,
  1750. this.doctorCode,
  1751. this.doctorName,
  1752. this.occurredTime,
  1753. });
  1754. factory FollowUpVisitDTO.fromJson(Map<String, dynamic> map) {
  1755. return FollowUpVisitDTO(
  1756. followUpVisitCode: map['FollowUpVisitCode'],
  1757. consultationRecordCode: map['ConsultationRecordCode'],
  1758. patientName: map['PatientName'],
  1759. patientPhone: map['PatientPhone'],
  1760. generalCase: map['GeneralCase'],
  1761. clinicalSituation: map['ClinicalSituation'],
  1762. doctorCode: map['DoctorCode'],
  1763. doctorName: map['DoctorName'],
  1764. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  1765. );
  1766. }
  1767. Map<String, dynamic> toJson() {
  1768. final map = Map<String, dynamic>();
  1769. if(followUpVisitCode != null)
  1770. map['FollowUpVisitCode'] = followUpVisitCode;
  1771. if(consultationRecordCode != null)
  1772. map['ConsultationRecordCode'] = consultationRecordCode;
  1773. if(patientName != null)
  1774. map['PatientName'] = patientName;
  1775. if(patientPhone != null)
  1776. map['PatientPhone'] = patientPhone;
  1777. if(generalCase != null)
  1778. map['GeneralCase'] = generalCase;
  1779. if(clinicalSituation != null)
  1780. map['ClinicalSituation'] = clinicalSituation;
  1781. if(doctorCode != null)
  1782. map['DoctorCode'] = doctorCode;
  1783. if(doctorName != null)
  1784. map['DoctorName'] = doctorName;
  1785. if(occurredTime != null)
  1786. map['OccurredTime'] = JsonRpcUtils.dateFormat(occurredTime!);
  1787. return map;
  1788. }
  1789. }
  1790. class GetFollowUpVisitInfoRequest extends TokenRequest{
  1791. String? consultationRecordCode;
  1792. GetFollowUpVisitInfoRequest({
  1793. this.consultationRecordCode,
  1794. String? token,
  1795. }) : super(
  1796. token: token,
  1797. );
  1798. factory GetFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  1799. return GetFollowUpVisitInfoRequest(
  1800. consultationRecordCode: map['ConsultationRecordCode'],
  1801. token: map['Token'],
  1802. );
  1803. }
  1804. Map<String, dynamic> toJson() {
  1805. final map = super.toJson();
  1806. if(consultationRecordCode != null)
  1807. map['ConsultationRecordCode'] = consultationRecordCode;
  1808. return map;
  1809. }
  1810. }
  1811. class GetFollowUpVisitInfoDetailRequest extends TokenRequest{
  1812. String? followUpVisitCode;
  1813. GetFollowUpVisitInfoDetailRequest({
  1814. this.followUpVisitCode,
  1815. String? token,
  1816. }) : super(
  1817. token: token,
  1818. );
  1819. factory GetFollowUpVisitInfoDetailRequest.fromJson(Map<String, dynamic> map) {
  1820. return GetFollowUpVisitInfoDetailRequest(
  1821. followUpVisitCode: map['FollowUpVisitCode'],
  1822. token: map['Token'],
  1823. );
  1824. }
  1825. Map<String, dynamic> toJson() {
  1826. final map = super.toJson();
  1827. if(followUpVisitCode != null)
  1828. map['FollowUpVisitCode'] = followUpVisitCode;
  1829. return map;
  1830. }
  1831. }
  1832. class SetNeedFollowUpVisitRequest extends TokenRequest{
  1833. String? consultationRecordCode;
  1834. bool isNeed;
  1835. SetNeedFollowUpVisitRequest({
  1836. this.consultationRecordCode,
  1837. this.isNeed = false,
  1838. String? token,
  1839. }) : super(
  1840. token: token,
  1841. );
  1842. factory SetNeedFollowUpVisitRequest.fromJson(Map<String, dynamic> map) {
  1843. return SetNeedFollowUpVisitRequest(
  1844. consultationRecordCode: map['ConsultationRecordCode'],
  1845. isNeed: map['IsNeed'],
  1846. token: map['Token'],
  1847. );
  1848. }
  1849. Map<String, dynamic> toJson() {
  1850. final map = super.toJson();
  1851. if(consultationRecordCode != null)
  1852. map['ConsultationRecordCode'] = consultationRecordCode;
  1853. map['IsNeed'] = isNeed;
  1854. return map;
  1855. }
  1856. }
  1857. class AddConsultationEvaluateRequest extends TokenRequest{
  1858. String? consultationRecordCode;
  1859. double evaluateScore;
  1860. String? feedback;
  1861. AddConsultationEvaluateRequest({
  1862. this.consultationRecordCode,
  1863. this.evaluateScore = 0,
  1864. this.feedback,
  1865. String? token,
  1866. }) : super(
  1867. token: token,
  1868. );
  1869. factory AddConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  1870. return AddConsultationEvaluateRequest(
  1871. consultationRecordCode: map['ConsultationRecordCode'],
  1872. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  1873. feedback: map['Feedback'],
  1874. token: map['Token'],
  1875. );
  1876. }
  1877. Map<String, dynamic> toJson() {
  1878. final map = super.toJson();
  1879. if(consultationRecordCode != null)
  1880. map['ConsultationRecordCode'] = consultationRecordCode;
  1881. map['EvaluateScore'] = evaluateScore;
  1882. if(feedback != null)
  1883. map['Feedback'] = feedback;
  1884. return map;
  1885. }
  1886. }
  1887. class DeleteConsultationEvaluateRequest extends TokenRequest{
  1888. String? consultationEvaluateCode;
  1889. DeleteConsultationEvaluateRequest({
  1890. this.consultationEvaluateCode,
  1891. String? token,
  1892. }) : super(
  1893. token: token,
  1894. );
  1895. factory DeleteConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  1896. return DeleteConsultationEvaluateRequest(
  1897. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  1898. token: map['Token'],
  1899. );
  1900. }
  1901. Map<String, dynamic> toJson() {
  1902. final map = super.toJson();
  1903. if(consultationEvaluateCode != null)
  1904. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  1905. return map;
  1906. }
  1907. }
  1908. class UpdateConsultationEvaluateRequest extends TokenRequest{
  1909. String? consultationEvaluateCode;
  1910. double evaluateScore;
  1911. String? feedback;
  1912. UpdateConsultationEvaluateRequest({
  1913. this.consultationEvaluateCode,
  1914. this.evaluateScore = 0,
  1915. this.feedback,
  1916. String? token,
  1917. }) : super(
  1918. token: token,
  1919. );
  1920. factory UpdateConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  1921. return UpdateConsultationEvaluateRequest(
  1922. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  1923. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  1924. feedback: map['Feedback'],
  1925. token: map['Token'],
  1926. );
  1927. }
  1928. Map<String, dynamic> toJson() {
  1929. final map = super.toJson();
  1930. if(consultationEvaluateCode != null)
  1931. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  1932. map['EvaluateScore'] = evaluateScore;
  1933. if(feedback != null)
  1934. map['Feedback'] = feedback;
  1935. return map;
  1936. }
  1937. }
  1938. enum EvaluateGradeEnum {
  1939. UnSet,
  1940. Dissatisfaction,
  1941. General,
  1942. Satisfaction,
  1943. }
  1944. class ConsultationEvaluateDTO {
  1945. String? consultationEvaluateCode;
  1946. String? consultationRecordCode;
  1947. EvaluateGradeEnum evaluateGrade;
  1948. double evaluateScore;
  1949. String? feedback;
  1950. ConsultationEvaluateDTO({
  1951. this.consultationEvaluateCode,
  1952. this.consultationRecordCode,
  1953. this.evaluateGrade = EvaluateGradeEnum.UnSet,
  1954. this.evaluateScore = 0,
  1955. this.feedback,
  1956. });
  1957. factory ConsultationEvaluateDTO.fromJson(Map<String, dynamic> map) {
  1958. return ConsultationEvaluateDTO(
  1959. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  1960. consultationRecordCode: map['ConsultationRecordCode'],
  1961. evaluateGrade: EvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  1962. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  1963. feedback: map['Feedback'],
  1964. );
  1965. }
  1966. Map<String, dynamic> toJson() {
  1967. final map = Map<String, dynamic>();
  1968. if(consultationEvaluateCode != null)
  1969. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  1970. if(consultationRecordCode != null)
  1971. map['ConsultationRecordCode'] = consultationRecordCode;
  1972. map['EvaluateGrade'] = evaluateGrade.index;
  1973. map['EvaluateScore'] = evaluateScore;
  1974. if(feedback != null)
  1975. map['Feedback'] = feedback;
  1976. return map;
  1977. }
  1978. }
  1979. class GetConsultationEvaluateRequest extends TokenRequest{
  1980. String? consultationRecordCode;
  1981. GetConsultationEvaluateRequest({
  1982. this.consultationRecordCode,
  1983. String? token,
  1984. }) : super(
  1985. token: token,
  1986. );
  1987. factory GetConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  1988. return GetConsultationEvaluateRequest(
  1989. consultationRecordCode: map['ConsultationRecordCode'],
  1990. token: map['Token'],
  1991. );
  1992. }
  1993. Map<String, dynamic> toJson() {
  1994. final map = super.toJson();
  1995. if(consultationRecordCode != null)
  1996. map['ConsultationRecordCode'] = consultationRecordCode;
  1997. return map;
  1998. }
  1999. }
  2000. class AcceptInvitationRequest extends TokenRequest{
  2001. String? consultationRecordCode;
  2002. bool isAgree;
  2003. String? refusalCause;
  2004. AcceptInvitationRequest({
  2005. this.consultationRecordCode,
  2006. this.isAgree = false,
  2007. this.refusalCause,
  2008. String? token,
  2009. }) : super(
  2010. token: token,
  2011. );
  2012. factory AcceptInvitationRequest.fromJson(Map<String, dynamic> map) {
  2013. return AcceptInvitationRequest(
  2014. consultationRecordCode: map['ConsultationRecordCode'],
  2015. isAgree: map['IsAgree'],
  2016. refusalCause: map['RefusalCause'],
  2017. token: map['Token'],
  2018. );
  2019. }
  2020. Map<String, dynamic> toJson() {
  2021. final map = super.toJson();
  2022. if(consultationRecordCode != null)
  2023. map['ConsultationRecordCode'] = consultationRecordCode;
  2024. map['IsAgree'] = isAgree;
  2025. if(refusalCause != null)
  2026. map['RefusalCause'] = refusalCause;
  2027. return map;
  2028. }
  2029. }