liveConsultation.m.dart 67 KB

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