liveConsultation.m.dart 151 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352
  1. import 'notification.m.dart';
  2. import 'package:fis_jsonrpc/utils.dart';
  3. import 'package:fis_common/json_convert.dart';
  4. class OrganizationBaseDTO extends BaseDTO{
  5. String? organizationCode;
  6. String? organizationName;
  7. OrganizationBaseDTO({
  8. this.organizationCode,
  9. this.organizationName,
  10. DateTime? createTime,
  11. DateTime? updateTime,
  12. }) : super(
  13. createTime: createTime,
  14. updateTime: updateTime,
  15. );
  16. factory OrganizationBaseDTO.fromJson(Map<String, dynamic> map) {
  17. return OrganizationBaseDTO(
  18. organizationCode: map['OrganizationCode'],
  19. organizationName: map['OrganizationName'],
  20. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  21. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  22. );
  23. }
  24. Map<String, dynamic> toJson() {
  25. final map = super.toJson();
  26. if(organizationCode != null)
  27. map['OrganizationCode'] = organizationCode;
  28. if(organizationName != null)
  29. map['OrganizationName'] = organizationName;
  30. return map;
  31. }
  32. }
  33. class BaseRequest {
  34. BaseRequest();
  35. factory BaseRequest.fromJson(Map<String, dynamic> map) {
  36. return BaseRequest(
  37. );
  38. }
  39. Map<String, dynamic> toJson() {
  40. final map = Map<String, dynamic>();
  41. return map;
  42. }
  43. }
  44. class TokenRequest extends BaseRequest{
  45. String? token;
  46. TokenRequest({
  47. this.token,
  48. }) : super(
  49. );
  50. factory TokenRequest.fromJson(Map<String, dynamic> map) {
  51. return TokenRequest(
  52. token: map['Token'],
  53. );
  54. }
  55. Map<String, dynamic> toJson() {
  56. final map = super.toJson();
  57. if(token != null)
  58. map['Token'] = token;
  59. return map;
  60. }
  61. }
  62. class FindHigherOrganizationsRequest extends TokenRequest{
  63. String? organizationName;
  64. FindHigherOrganizationsRequest({
  65. this.organizationName,
  66. String? token,
  67. }) : super(
  68. token: token,
  69. );
  70. factory FindHigherOrganizationsRequest.fromJson(Map<String, dynamic> map) {
  71. return FindHigherOrganizationsRequest(
  72. organizationName: map['OrganizationName'],
  73. token: map['Token'],
  74. );
  75. }
  76. Map<String, dynamic> toJson() {
  77. final map = super.toJson();
  78. if(organizationName != null)
  79. map['OrganizationName'] = organizationName;
  80. return map;
  81. }
  82. }
  83. class FindGrassRootsOrganizationsRequest extends TokenRequest{
  84. String? organizationName;
  85. FindGrassRootsOrganizationsRequest({
  86. this.organizationName,
  87. String? token,
  88. }) : super(
  89. token: token,
  90. );
  91. factory FindGrassRootsOrganizationsRequest.fromJson(Map<String, dynamic> map) {
  92. return FindGrassRootsOrganizationsRequest(
  93. organizationName: map['OrganizationName'],
  94. token: map['Token'],
  95. );
  96. }
  97. Map<String, dynamic> toJson() {
  98. final map = super.toJson();
  99. if(organizationName != null)
  100. map['OrganizationName'] = organizationName;
  101. return map;
  102. }
  103. }
  104. class UserBaseDTO extends BaseDTO{
  105. String? phone;
  106. String? email;
  107. String? userCode;
  108. String? userName;
  109. String? fullName;
  110. String? headImageUrl;
  111. String? displayName;
  112. UserBaseDTO({
  113. this.phone,
  114. this.email,
  115. this.userCode,
  116. this.userName,
  117. this.fullName,
  118. this.headImageUrl,
  119. this.displayName,
  120. DateTime? createTime,
  121. DateTime? updateTime,
  122. }) : super(
  123. createTime: createTime,
  124. updateTime: updateTime,
  125. );
  126. factory UserBaseDTO.fromJson(Map<String, dynamic> map) {
  127. return UserBaseDTO(
  128. phone: map['Phone'],
  129. email: map['Email'],
  130. userCode: map['UserCode'],
  131. userName: map['UserName'],
  132. fullName: map['FullName'],
  133. headImageUrl: map['HeadImageUrl'],
  134. displayName: map['DisplayName'],
  135. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  136. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  137. );
  138. }
  139. Map<String, dynamic> toJson() {
  140. final map = super.toJson();
  141. if(phone != null)
  142. map['Phone'] = phone;
  143. if(email != null)
  144. map['Email'] = email;
  145. if(userCode != null)
  146. map['UserCode'] = userCode;
  147. if(userName != null)
  148. map['UserName'] = userName;
  149. if(fullName != null)
  150. map['FullName'] = fullName;
  151. if(headImageUrl != null)
  152. map['HeadImageUrl'] = headImageUrl;
  153. if(displayName != null)
  154. map['DisplayName'] = displayName;
  155. return map;
  156. }
  157. }
  158. class OrganizationExpertDTO extends UserBaseDTO{
  159. List<String >? fieldList;
  160. UserStatusEnum userStatus;
  161. OrganizationExpertDTO({
  162. this.fieldList,
  163. this.userStatus = UserStatusEnum.NotOnline,
  164. String? phone,
  165. String? email,
  166. String? userCode,
  167. String? userName,
  168. String? fullName,
  169. String? headImageUrl,
  170. String? displayName,
  171. DateTime? createTime,
  172. DateTime? updateTime,
  173. }) : super(
  174. phone: phone,
  175. email: email,
  176. userCode: userCode,
  177. userName: userName,
  178. fullName: fullName,
  179. headImageUrl: headImageUrl,
  180. displayName: displayName,
  181. createTime: createTime,
  182. updateTime: updateTime,
  183. );
  184. factory OrganizationExpertDTO.fromJson(Map<String, dynamic> map) {
  185. return OrganizationExpertDTO(
  186. fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
  187. userStatus: UserStatusEnum.values.firstWhere((e) => e.index == map['UserStatus']),
  188. phone: map['Phone'],
  189. email: map['Email'],
  190. userCode: map['UserCode'],
  191. userName: map['UserName'],
  192. fullName: map['FullName'],
  193. headImageUrl: map['HeadImageUrl'],
  194. displayName: map['DisplayName'],
  195. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  196. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  197. );
  198. }
  199. Map<String, dynamic> toJson() {
  200. final map = super.toJson();
  201. if(fieldList != null)
  202. map['FieldList'] = fieldList;
  203. map['UserStatus'] = userStatus.index;
  204. return map;
  205. }
  206. }
  207. class PageResult<T> {
  208. int pageIndex;
  209. int pageSize;
  210. int totalCount;
  211. List<T>? pageData;
  212. PageResult({
  213. this.pageIndex = 0,
  214. this.pageSize = 0,
  215. this.totalCount = 0,
  216. this.pageData,
  217. });
  218. factory PageResult.fromJson(Map<String, dynamic> map) {
  219. List<T> pageDataList = [];
  220. if (map['PageData'] != null) {
  221. pageDataList.addAll(
  222. (map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
  223. }
  224. return PageResult(
  225. pageIndex: map['PageIndex'],
  226. pageSize: map['PageSize'],
  227. totalCount: map['TotalCount'],
  228. pageData: pageDataList,
  229. );
  230. }
  231. Map<String, dynamic> toJson() {
  232. final map = Map<String, dynamic>();
  233. map['PageIndex'] = pageIndex;
  234. map['PageSize'] = pageSize;
  235. map['TotalCount'] = totalCount;
  236. if(pageData != null)
  237. map['PageData'] = pageData;
  238. return map;
  239. }
  240. }
  241. class PageRequest extends TokenRequest{
  242. int pageIndex;
  243. int pageSize;
  244. PageRequest({
  245. this.pageIndex = 0,
  246. this.pageSize = 0,
  247. String? token,
  248. }) : super(
  249. token: token,
  250. );
  251. factory PageRequest.fromJson(Map<String, dynamic> map) {
  252. return PageRequest(
  253. pageIndex: map['PageIndex'],
  254. pageSize: map['PageSize'],
  255. token: map['Token'],
  256. );
  257. }
  258. Map<String, dynamic> toJson() {
  259. final map = super.toJson();
  260. map['PageIndex'] = pageIndex;
  261. map['PageSize'] = pageSize;
  262. return map;
  263. }
  264. }
  265. class FindOrganizationExpertsRequest extends PageRequest{
  266. String? organizationCode;
  267. String? keyword;
  268. FindOrganizationExpertsRequest({
  269. this.organizationCode,
  270. this.keyword,
  271. int pageIndex = 0,
  272. int pageSize = 0,
  273. String? token,
  274. }) : super(
  275. pageIndex: pageIndex,
  276. pageSize: pageSize,
  277. token: token,
  278. );
  279. factory FindOrganizationExpertsRequest.fromJson(Map<String, dynamic> map) {
  280. return FindOrganizationExpertsRequest(
  281. organizationCode: map['OrganizationCode'],
  282. keyword: map['Keyword'],
  283. pageIndex: map['PageIndex'],
  284. pageSize: map['PageSize'],
  285. token: map['Token'],
  286. );
  287. }
  288. Map<String, dynamic> toJson() {
  289. final map = super.toJson();
  290. if(organizationCode != null)
  291. map['OrganizationCode'] = organizationCode;
  292. if(keyword != null)
  293. map['Keyword'] = keyword;
  294. return map;
  295. }
  296. }
  297. class DataItemDTO {
  298. String? key;
  299. String? value;
  300. DataItemDTO({
  301. this.key,
  302. this.value,
  303. });
  304. factory DataItemDTO.fromJson(Map<String, dynamic> map) {
  305. return DataItemDTO(
  306. key: map['Key'],
  307. value: map['Value'],
  308. );
  309. }
  310. Map<String, dynamic> toJson() {
  311. final map = Map<String, dynamic>();
  312. if(key != null)
  313. map['Key'] = key;
  314. if(value != null)
  315. map['Value'] = value;
  316. return map;
  317. }
  318. }
  319. class ApplyConsultationRequest extends TokenRequest{
  320. String? expertUserCode;
  321. String? deviceCode;
  322. List<String >? scanPositions;
  323. DateTime? consultationTime;
  324. List<DataItemDTO >? patientDatas;
  325. String? patientCode;
  326. String? diseases;
  327. String? scanUserCode;
  328. String? expertOrganizationCode;
  329. String? applyUserCode;
  330. String? primaryDiagnosis;
  331. ApplyConsultationRequest({
  332. this.expertUserCode,
  333. this.deviceCode,
  334. this.scanPositions,
  335. this.consultationTime,
  336. this.patientDatas,
  337. this.patientCode,
  338. this.diseases,
  339. this.scanUserCode,
  340. this.expertOrganizationCode,
  341. this.applyUserCode,
  342. this.primaryDiagnosis,
  343. String? token,
  344. }) : super(
  345. token: token,
  346. );
  347. factory ApplyConsultationRequest.fromJson(Map<String, dynamic> map) {
  348. return ApplyConsultationRequest(
  349. expertUserCode: map['ExpertUserCode'],
  350. deviceCode: map['DeviceCode'],
  351. scanPositions: map['ScanPositions'] != null ? map['ScanPositions'].cast<String>().toList() : null,
  352. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  353. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  354. patientCode: map['PatientCode'],
  355. diseases: map['Diseases'],
  356. scanUserCode: map['ScanUserCode'],
  357. expertOrganizationCode: map['ExpertOrganizationCode'],
  358. applyUserCode: map['ApplyUserCode'],
  359. primaryDiagnosis: map['PrimaryDiagnosis'],
  360. token: map['Token'],
  361. );
  362. }
  363. Map<String, dynamic> toJson() {
  364. final map = super.toJson();
  365. if(expertUserCode != null)
  366. map['ExpertUserCode'] = expertUserCode;
  367. if(deviceCode != null)
  368. map['DeviceCode'] = deviceCode;
  369. if(scanPositions != null)
  370. map['ScanPositions'] = scanPositions;
  371. if(consultationTime != null)
  372. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  373. if(patientDatas != null)
  374. map['PatientDatas'] = patientDatas;
  375. if(patientCode != null)
  376. map['PatientCode'] = patientCode;
  377. if(diseases != null)
  378. map['Diseases'] = diseases;
  379. if(scanUserCode != null)
  380. map['ScanUserCode'] = scanUserCode;
  381. if(expertOrganizationCode != null)
  382. map['ExpertOrganizationCode'] = expertOrganizationCode;
  383. if(applyUserCode != null)
  384. map['ApplyUserCode'] = applyUserCode;
  385. if(primaryDiagnosis != null)
  386. map['PrimaryDiagnosis'] = primaryDiagnosis;
  387. return map;
  388. }
  389. }
  390. class UpdateConsultationRequest extends TokenRequest{
  391. String? consultationCode;
  392. String? expertUserCode;
  393. String? deviceCode;
  394. List<String >? scanPositions;
  395. DateTime? consultationTime;
  396. String? diseases;
  397. String? scanUserCode;
  398. String? expertOrganizationCode;
  399. String? applyUserCode;
  400. String? primaryDiagnosis;
  401. UpdateConsultationRequest({
  402. this.consultationCode,
  403. this.expertUserCode,
  404. this.deviceCode,
  405. this.scanPositions,
  406. this.consultationTime,
  407. this.diseases,
  408. this.scanUserCode,
  409. this.expertOrganizationCode,
  410. this.applyUserCode,
  411. this.primaryDiagnosis,
  412. String? token,
  413. }) : super(
  414. token: token,
  415. );
  416. factory UpdateConsultationRequest.fromJson(Map<String, dynamic> map) {
  417. return UpdateConsultationRequest(
  418. consultationCode: map['ConsultationCode'],
  419. expertUserCode: map['ExpertUserCode'],
  420. deviceCode: map['DeviceCode'],
  421. scanPositions: map['ScanPositions'] != null ? map['ScanPositions'].cast<String>().toList() : null,
  422. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  423. diseases: map['Diseases'],
  424. scanUserCode: map['ScanUserCode'],
  425. expertOrganizationCode: map['ExpertOrganizationCode'],
  426. applyUserCode: map['ApplyUserCode'],
  427. primaryDiagnosis: map['PrimaryDiagnosis'],
  428. token: map['Token'],
  429. );
  430. }
  431. Map<String, dynamic> toJson() {
  432. final map = super.toJson();
  433. if(consultationCode != null)
  434. map['ConsultationCode'] = consultationCode;
  435. if(expertUserCode != null)
  436. map['ExpertUserCode'] = expertUserCode;
  437. if(deviceCode != null)
  438. map['DeviceCode'] = deviceCode;
  439. if(scanPositions != null)
  440. map['ScanPositions'] = scanPositions;
  441. if(consultationTime != null)
  442. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  443. if(diseases != null)
  444. map['Diseases'] = diseases;
  445. if(scanUserCode != null)
  446. map['ScanUserCode'] = scanUserCode;
  447. if(expertOrganizationCode != null)
  448. map['ExpertOrganizationCode'] = expertOrganizationCode;
  449. if(applyUserCode != null)
  450. map['ApplyUserCode'] = applyUserCode;
  451. if(primaryDiagnosis != null)
  452. map['PrimaryDiagnosis'] = primaryDiagnosis;
  453. return map;
  454. }
  455. }
  456. class ImproveConsultationInfoRequest extends TokenRequest{
  457. String? consultationCode;
  458. String? patientCode;
  459. List<DataItemDTO >? patientDatas;
  460. List<String >? scanPositions;
  461. String? diseases;
  462. String? primaryDiagnosis;
  463. ImproveConsultationInfoRequest({
  464. this.consultationCode,
  465. this.patientCode,
  466. this.patientDatas,
  467. this.scanPositions,
  468. this.diseases,
  469. this.primaryDiagnosis,
  470. String? token,
  471. }) : super(
  472. token: token,
  473. );
  474. factory ImproveConsultationInfoRequest.fromJson(Map<String, dynamic> map) {
  475. return ImproveConsultationInfoRequest(
  476. consultationCode: map['ConsultationCode'],
  477. patientCode: map['PatientCode'],
  478. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  479. scanPositions: map['ScanPositions'] != null ? map['ScanPositions'].cast<String>().toList() : null,
  480. diseases: map['Diseases'],
  481. primaryDiagnosis: map['PrimaryDiagnosis'],
  482. token: map['Token'],
  483. );
  484. }
  485. Map<String, dynamic> toJson() {
  486. final map = super.toJson();
  487. if(consultationCode != null)
  488. map['ConsultationCode'] = consultationCode;
  489. if(patientCode != null)
  490. map['PatientCode'] = patientCode;
  491. if(patientDatas != null)
  492. map['PatientDatas'] = patientDatas;
  493. if(scanPositions != null)
  494. map['ScanPositions'] = scanPositions;
  495. if(diseases != null)
  496. map['Diseases'] = diseases;
  497. if(primaryDiagnosis != null)
  498. map['PrimaryDiagnosis'] = primaryDiagnosis;
  499. return map;
  500. }
  501. }
  502. class FindAssistantExpertsRequest extends TokenRequest{
  503. String? expertName;
  504. FindAssistantExpertsRequest({
  505. this.expertName,
  506. String? token,
  507. }) : super(
  508. token: token,
  509. );
  510. factory FindAssistantExpertsRequest.fromJson(Map<String, dynamic> map) {
  511. return FindAssistantExpertsRequest(
  512. expertName: map['ExpertName'],
  513. token: map['Token'],
  514. );
  515. }
  516. Map<String, dynamic> toJson() {
  517. final map = super.toJson();
  518. if(expertName != null)
  519. map['ExpertName'] = expertName;
  520. return map;
  521. }
  522. }
  523. enum EvaluateGradeEnum {
  524. UnSet,
  525. Dissatisfaction,
  526. General,
  527. Satisfaction,
  528. }
  529. class ConsultationPageDTO {
  530. String? consultationCode;
  531. TransactionStatusEnum consultationStatus;
  532. String? patientName;
  533. String? phone;
  534. String? sex;
  535. String? patientAge;
  536. String? applyOrganizationName;
  537. DateTime? consultationTime;
  538. DateTime? consultationTimeEnd;
  539. String? expertUserName;
  540. EvaluateGradeEnum consultationEvaluate;
  541. bool isEmergency;
  542. String? emergencyCode;
  543. ConsultationPageDTO({
  544. this.consultationCode,
  545. this.consultationStatus = TransactionStatusEnum.Applied,
  546. this.patientName,
  547. this.phone,
  548. this.sex,
  549. this.patientAge,
  550. this.applyOrganizationName,
  551. this.consultationTime,
  552. this.consultationTimeEnd,
  553. this.expertUserName,
  554. this.consultationEvaluate = EvaluateGradeEnum.UnSet,
  555. this.isEmergency = false,
  556. this.emergencyCode,
  557. });
  558. factory ConsultationPageDTO.fromJson(Map<String, dynamic> map) {
  559. return ConsultationPageDTO(
  560. consultationCode: map['ConsultationCode'],
  561. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  562. patientName: map['PatientName'],
  563. phone: map['Phone'],
  564. sex: map['Sex'],
  565. patientAge: map['PatientAge'],
  566. applyOrganizationName: map['ApplyOrganizationName'],
  567. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  568. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  569. expertUserName: map['ExpertUserName'],
  570. consultationEvaluate: EvaluateGradeEnum.values.firstWhere((e) => e.index == map['ConsultationEvaluate']),
  571. isEmergency: map['IsEmergency'],
  572. emergencyCode: map['EmergencyCode'],
  573. );
  574. }
  575. Map<String, dynamic> toJson() {
  576. final map = Map<String, dynamic>();
  577. if(consultationCode != null)
  578. map['ConsultationCode'] = consultationCode;
  579. map['ConsultationStatus'] = consultationStatus.index;
  580. if(patientName != null)
  581. map['PatientName'] = patientName;
  582. if(phone != null)
  583. map['Phone'] = phone;
  584. if(sex != null)
  585. map['Sex'] = sex;
  586. if(patientAge != null)
  587. map['PatientAge'] = patientAge;
  588. if(applyOrganizationName != null)
  589. map['ApplyOrganizationName'] = applyOrganizationName;
  590. if(consultationTime != null)
  591. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  592. if(consultationTimeEnd != null)
  593. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  594. if(expertUserName != null)
  595. map['ExpertUserName'] = expertUserName;
  596. map['ConsultationEvaluate'] = consultationEvaluate.index;
  597. map['IsEmergency'] = isEmergency;
  598. if(emergencyCode != null)
  599. map['EmergencyCode'] = emergencyCode;
  600. return map;
  601. }
  602. }
  603. enum QueryConsultationStatusEnum {
  604. All,
  605. Applied,
  606. Withdrawn,
  607. Rejected,
  608. ToStart,
  609. InProgress,
  610. PendingReport,
  611. End,
  612. Expired,
  613. }
  614. enum ConsultationQueryTypeEnum {
  615. All,
  616. MyApply,
  617. MyArrange,
  618. MyJoin,
  619. }
  620. enum QueryEvaluateGradeEnum {
  621. All,
  622. UnSet,
  623. Dissatisfaction,
  624. General,
  625. Satisfaction,
  626. }
  627. enum QueryAgeUnitsEnum {
  628. Year,
  629. Month,
  630. Week,
  631. }
  632. class QueryPatientAgeLimitDTO {
  633. int minAge;
  634. int maxAge;
  635. QueryAgeUnitsEnum unit;
  636. QueryPatientAgeLimitDTO({
  637. this.minAge = 0,
  638. this.maxAge = 0,
  639. this.unit = QueryAgeUnitsEnum.Year,
  640. });
  641. factory QueryPatientAgeLimitDTO.fromJson(Map<String, dynamic> map) {
  642. return QueryPatientAgeLimitDTO(
  643. minAge: map['MinAge'],
  644. maxAge: map['MaxAge'],
  645. unit: QueryAgeUnitsEnum.values.firstWhere((e) => e.index == map['Unit']),
  646. );
  647. }
  648. Map<String, dynamic> toJson() {
  649. final map = Map<String, dynamic>();
  650. map['MinAge'] = minAge;
  651. map['MaxAge'] = maxAge;
  652. map['Unit'] = unit.index;
  653. return map;
  654. }
  655. }
  656. class FindConsultationByPageRequest extends PageRequest{
  657. String? keyword;
  658. DateTime? startDate;
  659. DateTime? endDate;
  660. QueryConsultationStatusEnum consultationStatus;
  661. ConsultationQueryTypeEnum consultationQueryType;
  662. QueryEvaluateGradeEnum evaluateGrade;
  663. String? language;
  664. List<String >? expertCodes;
  665. List<String >? applyOrganizationCodes;
  666. List<String >? expertOrganizationCodes;
  667. String? patientSex;
  668. QueryPatientAgeLimitDTO? patientAgeLimit;
  669. String? patientDiseases;
  670. String? patientPrimaryDiagnosis;
  671. FindConsultationByPageRequest({
  672. this.keyword,
  673. this.startDate,
  674. this.endDate,
  675. this.consultationStatus = QueryConsultationStatusEnum.All,
  676. this.consultationQueryType = ConsultationQueryTypeEnum.All,
  677. this.evaluateGrade = QueryEvaluateGradeEnum.All,
  678. this.language,
  679. this.expertCodes,
  680. this.applyOrganizationCodes,
  681. this.expertOrganizationCodes,
  682. this.patientSex,
  683. this.patientAgeLimit,
  684. this.patientDiseases,
  685. this.patientPrimaryDiagnosis,
  686. int pageIndex = 0,
  687. int pageSize = 0,
  688. String? token,
  689. }) : super(
  690. pageIndex: pageIndex,
  691. pageSize: pageSize,
  692. token: token,
  693. );
  694. factory FindConsultationByPageRequest.fromJson(Map<String, dynamic> map) {
  695. return FindConsultationByPageRequest(
  696. keyword: map['Keyword'],
  697. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  698. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  699. consultationStatus: QueryConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  700. consultationQueryType: ConsultationQueryTypeEnum.values.firstWhere((e) => e.index == map['ConsultationQueryType']),
  701. evaluateGrade: QueryEvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  702. language: map['Language'],
  703. expertCodes: map['ExpertCodes'] != null ? map['ExpertCodes'].cast<String>().toList() : null,
  704. applyOrganizationCodes: map['ApplyOrganizationCodes'] != null ? map['ApplyOrganizationCodes'].cast<String>().toList() : null,
  705. expertOrganizationCodes: map['ExpertOrganizationCodes'] != null ? map['ExpertOrganizationCodes'].cast<String>().toList() : null,
  706. patientSex: map['PatientSex'],
  707. patientAgeLimit: map['PatientAgeLimit'] != null ? QueryPatientAgeLimitDTO.fromJson(map['PatientAgeLimit']) : null,
  708. patientDiseases: map['PatientDiseases'],
  709. patientPrimaryDiagnosis: map['PatientPrimaryDiagnosis'],
  710. pageIndex: map['PageIndex'],
  711. pageSize: map['PageSize'],
  712. token: map['Token'],
  713. );
  714. }
  715. Map<String, dynamic> toJson() {
  716. final map = super.toJson();
  717. if(keyword != null)
  718. map['Keyword'] = keyword;
  719. if(startDate != null)
  720. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  721. if(endDate != null)
  722. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  723. map['ConsultationStatus'] = consultationStatus.index;
  724. map['ConsultationQueryType'] = consultationQueryType.index;
  725. map['EvaluateGrade'] = evaluateGrade.index;
  726. if(language != null)
  727. map['Language'] = language;
  728. if(expertCodes != null)
  729. map['ExpertCodes'] = expertCodes;
  730. if(applyOrganizationCodes != null)
  731. map['ApplyOrganizationCodes'] = applyOrganizationCodes;
  732. if(expertOrganizationCodes != null)
  733. map['ExpertOrganizationCodes'] = expertOrganizationCodes;
  734. if(patientSex != null)
  735. map['PatientSex'] = patientSex;
  736. if(patientAgeLimit != null)
  737. map['PatientAgeLimit'] = patientAgeLimit;
  738. if(patientDiseases != null)
  739. map['PatientDiseases'] = patientDiseases;
  740. if(patientPrimaryDiagnosis != null)
  741. map['PatientPrimaryDiagnosis'] = patientPrimaryDiagnosis;
  742. return map;
  743. }
  744. }
  745. class ConsultationItem {
  746. String? patientName;
  747. String? sex;
  748. String? age;
  749. String? applyOrganizationName;
  750. String? applyUserName;
  751. String? expertOrganizationName;
  752. String? expertUserName;
  753. DateTime? consultationTime;
  754. DateTime? consultationTimeEnd;
  755. String? diseases;
  756. String? primaryDiagnosis;
  757. TransactionStatusEnum consultationStatus;
  758. List<String >? scanPositions;
  759. ConsultationItem({
  760. this.patientName,
  761. this.sex,
  762. this.age,
  763. this.applyOrganizationName,
  764. this.applyUserName,
  765. this.expertOrganizationName,
  766. this.expertUserName,
  767. this.consultationTime,
  768. this.consultationTimeEnd,
  769. this.diseases,
  770. this.primaryDiagnosis,
  771. this.consultationStatus = TransactionStatusEnum.Applied,
  772. this.scanPositions,
  773. });
  774. factory ConsultationItem.fromJson(Map<String, dynamic> map) {
  775. return ConsultationItem(
  776. patientName: map['PatientName'],
  777. sex: map['Sex'],
  778. age: map['Age'],
  779. applyOrganizationName: map['ApplyOrganizationName'],
  780. applyUserName: map['ApplyUserName'],
  781. expertOrganizationName: map['ExpertOrganizationName'],
  782. expertUserName: map['ExpertUserName'],
  783. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  784. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  785. diseases: map['Diseases'],
  786. primaryDiagnosis: map['PrimaryDiagnosis'],
  787. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  788. scanPositions: map['ScanPositions'] != null ? map['ScanPositions'].cast<String>().toList() : null,
  789. );
  790. }
  791. Map<String, dynamic> toJson() {
  792. final map = Map<String, dynamic>();
  793. if(patientName != null)
  794. map['PatientName'] = patientName;
  795. if(sex != null)
  796. map['Sex'] = sex;
  797. if(age != null)
  798. map['Age'] = age;
  799. if(applyOrganizationName != null)
  800. map['ApplyOrganizationName'] = applyOrganizationName;
  801. if(applyUserName != null)
  802. map['ApplyUserName'] = applyUserName;
  803. if(expertOrganizationName != null)
  804. map['ExpertOrganizationName'] = expertOrganizationName;
  805. if(expertUserName != null)
  806. map['ExpertUserName'] = expertUserName;
  807. if(consultationTime != null)
  808. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  809. if(consultationTimeEnd != null)
  810. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  811. if(diseases != null)
  812. map['Diseases'] = diseases;
  813. if(primaryDiagnosis != null)
  814. map['PrimaryDiagnosis'] = primaryDiagnosis;
  815. map['ConsultationStatus'] = consultationStatus.index;
  816. if(scanPositions != null)
  817. map['ScanPositions'] = scanPositions;
  818. return map;
  819. }
  820. }
  821. class ConsultationExportData {
  822. String? patientName;
  823. String? patientCode;
  824. List<ConsultationItem >? consultationItemList;
  825. ConsultationExportData({
  826. this.patientName,
  827. this.patientCode,
  828. this.consultationItemList,
  829. });
  830. factory ConsultationExportData.fromJson(Map<String, dynamic> map) {
  831. return ConsultationExportData(
  832. patientName: map['PatientName'],
  833. patientCode: map['PatientCode'],
  834. consultationItemList: map['ConsultationItemList'] != null ? (map['ConsultationItemList'] as List).map((e)=>ConsultationItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  835. );
  836. }
  837. Map<String, dynamic> toJson() {
  838. final map = Map<String, dynamic>();
  839. if(patientName != null)
  840. map['PatientName'] = patientName;
  841. if(patientCode != null)
  842. map['PatientCode'] = patientCode;
  843. if(consultationItemList != null)
  844. map['ConsultationItemList'] = consultationItemList;
  845. return map;
  846. }
  847. }
  848. class ConsultationReportItem {
  849. String? consultationCode;
  850. String? fileToken;
  851. DateTime? submissionTime;
  852. ConsultationReportItem({
  853. this.consultationCode,
  854. this.fileToken,
  855. this.submissionTime,
  856. });
  857. factory ConsultationReportItem.fromJson(Map<String, dynamic> map) {
  858. return ConsultationReportItem(
  859. consultationCode: map['ConsultationCode'],
  860. fileToken: map['FileToken'],
  861. submissionTime: map['SubmissionTime'] != null ? DateTime.parse(map['SubmissionTime']) : null,
  862. );
  863. }
  864. Map<String, dynamic> toJson() {
  865. final map = Map<String, dynamic>();
  866. if(consultationCode != null)
  867. map['ConsultationCode'] = consultationCode;
  868. if(fileToken != null)
  869. map['FileToken'] = fileToken;
  870. if(submissionTime != null)
  871. map['SubmissionTime'] = JsonRpcUtils.dateFormat(submissionTime!);
  872. return map;
  873. }
  874. }
  875. class ConsultationReportData {
  876. String? patientName;
  877. String? patientCode;
  878. List<ConsultationReportItem >? reportItemList;
  879. ConsultationReportData({
  880. this.patientName,
  881. this.patientCode,
  882. this.reportItemList,
  883. });
  884. factory ConsultationReportData.fromJson(Map<String, dynamic> map) {
  885. return ConsultationReportData(
  886. patientName: map['PatientName'],
  887. patientCode: map['PatientCode'],
  888. reportItemList: map['ReportItemList'] != null ? (map['ReportItemList'] as List).map((e)=>ConsultationReportItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  889. );
  890. }
  891. Map<String, dynamic> toJson() {
  892. final map = Map<String, dynamic>();
  893. if(patientName != null)
  894. map['PatientName'] = patientName;
  895. if(patientCode != null)
  896. map['PatientCode'] = patientCode;
  897. if(reportItemList != null)
  898. map['ReportItemList'] = reportItemList;
  899. return map;
  900. }
  901. }
  902. enum RemedicalFileDataTypeEnum {
  903. VinnoVidSingle,
  904. ThirdVidSingle,
  905. VinnoVidMovie,
  906. ThirdVidMovie,
  907. Image,
  908. }
  909. enum ConsultationFileTypeEnum {
  910. Screenshot,
  911. UltrasoundImage,
  912. MeasurementImage,
  913. }
  914. class ConsultationFileItem {
  915. String? consultationCode;
  916. String? fileToken;
  917. RemedicalFileDataTypeEnum fileDataType;
  918. ConsultationFileTypeEnum consultationFileType;
  919. DateTime? submissionTime;
  920. ConsultationFileItem({
  921. this.consultationCode,
  922. this.fileToken,
  923. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  924. this.consultationFileType = ConsultationFileTypeEnum.Screenshot,
  925. this.submissionTime,
  926. });
  927. factory ConsultationFileItem.fromJson(Map<String, dynamic> map) {
  928. return ConsultationFileItem(
  929. consultationCode: map['ConsultationCode'],
  930. fileToken: map['FileToken'],
  931. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  932. consultationFileType: ConsultationFileTypeEnum.values.firstWhere((e) => e.index == map['ConsultationFileType']),
  933. submissionTime: map['SubmissionTime'] != null ? DateTime.parse(map['SubmissionTime']) : null,
  934. );
  935. }
  936. Map<String, dynamic> toJson() {
  937. final map = Map<String, dynamic>();
  938. if(consultationCode != null)
  939. map['ConsultationCode'] = consultationCode;
  940. if(fileToken != null)
  941. map['FileToken'] = fileToken;
  942. map['FileDataType'] = fileDataType.index;
  943. map['ConsultationFileType'] = consultationFileType.index;
  944. if(submissionTime != null)
  945. map['SubmissionTime'] = JsonRpcUtils.dateFormat(submissionTime!);
  946. return map;
  947. }
  948. }
  949. class ConsultationFileData {
  950. String? patientName;
  951. String? patientCode;
  952. List<ConsultationFileItem >? consultationFileItemList;
  953. ConsultationFileData({
  954. this.patientName,
  955. this.patientCode,
  956. this.consultationFileItemList,
  957. });
  958. factory ConsultationFileData.fromJson(Map<String, dynamic> map) {
  959. return ConsultationFileData(
  960. patientName: map['PatientName'],
  961. patientCode: map['PatientCode'],
  962. consultationFileItemList: map['ConsultationFileItemList'] != null ? (map['ConsultationFileItemList'] as List).map((e)=>ConsultationFileItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  963. );
  964. }
  965. Map<String, dynamic> toJson() {
  966. final map = Map<String, dynamic>();
  967. if(patientName != null)
  968. map['PatientName'] = patientName;
  969. if(patientCode != null)
  970. map['PatientCode'] = patientCode;
  971. if(consultationFileItemList != null)
  972. map['ConsultationFileItemList'] = consultationFileItemList;
  973. return map;
  974. }
  975. }
  976. class ExportConsultationDataResult {
  977. List<ConsultationExportData >? consultationList;
  978. List<ConsultationReportData >? reportList;
  979. List<ConsultationFileData >? consultationFileDatalList;
  980. ExportConsultationDataResult({
  981. this.consultationList,
  982. this.reportList,
  983. this.consultationFileDatalList,
  984. });
  985. factory ExportConsultationDataResult.fromJson(Map<String, dynamic> map) {
  986. return ExportConsultationDataResult(
  987. consultationList: map['ConsultationList'] != null ? (map['ConsultationList'] as List).map((e)=>ConsultationExportData.fromJson(e as Map<String,dynamic>)).toList() : null,
  988. reportList: map['ReportList'] != null ? (map['ReportList'] as List).map((e)=>ConsultationReportData.fromJson(e as Map<String,dynamic>)).toList() : null,
  989. consultationFileDatalList: map['ConsultationFileDatalList'] != null ? (map['ConsultationFileDatalList'] as List).map((e)=>ConsultationFileData.fromJson(e as Map<String,dynamic>)).toList() : null,
  990. );
  991. }
  992. Map<String, dynamic> toJson() {
  993. final map = Map<String, dynamic>();
  994. if(consultationList != null)
  995. map['ConsultationList'] = consultationList;
  996. if(reportList != null)
  997. map['ReportList'] = reportList;
  998. if(consultationFileDatalList != null)
  999. map['ConsultationFileDatalList'] = consultationFileDatalList;
  1000. return map;
  1001. }
  1002. }
  1003. class ExportConsultationsRequest extends TokenRequest{
  1004. bool isExportReport;
  1005. bool isExportConsultation;
  1006. bool isExportConsultationFileData;
  1007. String? keyword;
  1008. DateTime? startDate;
  1009. DateTime? endDate;
  1010. QueryConsultationStatusEnum consultationStatus;
  1011. ConsultationQueryTypeEnum consultationQueryType;
  1012. QueryEvaluateGradeEnum evaluateGrade;
  1013. String? language;
  1014. List<String >? expertCodes;
  1015. List<String >? applyOrganizationCodes;
  1016. List<String >? expertOrganizationCodes;
  1017. String? patientSex;
  1018. QueryPatientAgeLimitDTO? patientAgeLimit;
  1019. String? patientDiseases;
  1020. String? patientPrimaryDiagnosis;
  1021. ExportConsultationsRequest({
  1022. this.isExportReport = false,
  1023. this.isExportConsultation = false,
  1024. this.isExportConsultationFileData = false,
  1025. this.keyword,
  1026. this.startDate,
  1027. this.endDate,
  1028. this.consultationStatus = QueryConsultationStatusEnum.All,
  1029. this.consultationQueryType = ConsultationQueryTypeEnum.All,
  1030. this.evaluateGrade = QueryEvaluateGradeEnum.All,
  1031. this.language,
  1032. this.expertCodes,
  1033. this.applyOrganizationCodes,
  1034. this.expertOrganizationCodes,
  1035. this.patientSex,
  1036. this.patientAgeLimit,
  1037. this.patientDiseases,
  1038. this.patientPrimaryDiagnosis,
  1039. String? token,
  1040. }) : super(
  1041. token: token,
  1042. );
  1043. factory ExportConsultationsRequest.fromJson(Map<String, dynamic> map) {
  1044. return ExportConsultationsRequest(
  1045. isExportReport: map['IsExportReport'],
  1046. isExportConsultation: map['IsExportConsultation'],
  1047. isExportConsultationFileData: map['IsExportConsultationFileData'],
  1048. keyword: map['Keyword'],
  1049. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  1050. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  1051. consultationStatus: QueryConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  1052. consultationQueryType: ConsultationQueryTypeEnum.values.firstWhere((e) => e.index == map['ConsultationQueryType']),
  1053. evaluateGrade: QueryEvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  1054. language: map['Language'],
  1055. expertCodes: map['ExpertCodes'] != null ? map['ExpertCodes'].cast<String>().toList() : null,
  1056. applyOrganizationCodes: map['ApplyOrganizationCodes'] != null ? map['ApplyOrganizationCodes'].cast<String>().toList() : null,
  1057. expertOrganizationCodes: map['ExpertOrganizationCodes'] != null ? map['ExpertOrganizationCodes'].cast<String>().toList() : null,
  1058. patientSex: map['PatientSex'],
  1059. patientAgeLimit: map['PatientAgeLimit'] != null ? QueryPatientAgeLimitDTO.fromJson(map['PatientAgeLimit']) : null,
  1060. patientDiseases: map['PatientDiseases'],
  1061. patientPrimaryDiagnosis: map['PatientPrimaryDiagnosis'],
  1062. token: map['Token'],
  1063. );
  1064. }
  1065. Map<String, dynamic> toJson() {
  1066. final map = super.toJson();
  1067. map['IsExportReport'] = isExportReport;
  1068. map['IsExportConsultation'] = isExportConsultation;
  1069. map['IsExportConsultationFileData'] = isExportConsultationFileData;
  1070. if(keyword != null)
  1071. map['Keyword'] = keyword;
  1072. if(startDate != null)
  1073. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  1074. if(endDate != null)
  1075. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  1076. map['ConsultationStatus'] = consultationStatus.index;
  1077. map['ConsultationQueryType'] = consultationQueryType.index;
  1078. map['EvaluateGrade'] = evaluateGrade.index;
  1079. if(language != null)
  1080. map['Language'] = language;
  1081. if(expertCodes != null)
  1082. map['ExpertCodes'] = expertCodes;
  1083. if(applyOrganizationCodes != null)
  1084. map['ApplyOrganizationCodes'] = applyOrganizationCodes;
  1085. if(expertOrganizationCodes != null)
  1086. map['ExpertOrganizationCodes'] = expertOrganizationCodes;
  1087. if(patientSex != null)
  1088. map['PatientSex'] = patientSex;
  1089. if(patientAgeLimit != null)
  1090. map['PatientAgeLimit'] = patientAgeLimit;
  1091. if(patientDiseases != null)
  1092. map['PatientDiseases'] = patientDiseases;
  1093. if(patientPrimaryDiagnosis != null)
  1094. map['PatientPrimaryDiagnosis'] = patientPrimaryDiagnosis;
  1095. return map;
  1096. }
  1097. }
  1098. enum OrganizationPatientTypeEnum {
  1099. Person,
  1100. Animals,
  1101. }
  1102. class ConsultationFileDTO {
  1103. String? sourceUrl;
  1104. String? previewImageUrl;
  1105. String? coverImageUrl;
  1106. DateTime? createTime;
  1107. String? creatorCode;
  1108. String? creatorName;
  1109. RemedicalFileDataTypeEnum fileDataType;
  1110. ConsultationFileTypeEnum consultationFileType;
  1111. String? remedicalCode;
  1112. String? remedicalMeasureCode;
  1113. ConsultationFileDTO({
  1114. this.sourceUrl,
  1115. this.previewImageUrl,
  1116. this.coverImageUrl,
  1117. this.createTime,
  1118. this.creatorCode,
  1119. this.creatorName,
  1120. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1121. this.consultationFileType = ConsultationFileTypeEnum.Screenshot,
  1122. this.remedicalCode,
  1123. this.remedicalMeasureCode,
  1124. });
  1125. factory ConsultationFileDTO.fromJson(Map<String, dynamic> map) {
  1126. return ConsultationFileDTO(
  1127. sourceUrl: map['SourceUrl'],
  1128. previewImageUrl: map['PreviewImageUrl'],
  1129. coverImageUrl: map['CoverImageUrl'],
  1130. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1131. creatorCode: map['CreatorCode'],
  1132. creatorName: map['CreatorName'],
  1133. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1134. consultationFileType: ConsultationFileTypeEnum.values.firstWhere((e) => e.index == map['ConsultationFileType']),
  1135. remedicalCode: map['RemedicalCode'],
  1136. remedicalMeasureCode: map['RemedicalMeasureCode'],
  1137. );
  1138. }
  1139. Map<String, dynamic> toJson() {
  1140. final map = Map<String, dynamic>();
  1141. if(sourceUrl != null)
  1142. map['SourceUrl'] = sourceUrl;
  1143. if(previewImageUrl != null)
  1144. map['PreviewImageUrl'] = previewImageUrl;
  1145. if(coverImageUrl != null)
  1146. map['CoverImageUrl'] = coverImageUrl;
  1147. if(createTime != null)
  1148. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  1149. if(creatorCode != null)
  1150. map['CreatorCode'] = creatorCode;
  1151. if(creatorName != null)
  1152. map['CreatorName'] = creatorName;
  1153. map['FileDataType'] = fileDataType.index;
  1154. map['ConsultationFileType'] = consultationFileType.index;
  1155. if(remedicalCode != null)
  1156. map['RemedicalCode'] = remedicalCode;
  1157. if(remedicalMeasureCode != null)
  1158. map['RemedicalMeasureCode'] = remedicalMeasureCode;
  1159. return map;
  1160. }
  1161. }
  1162. class ConsultationMemberDTO {
  1163. String? memberCode;
  1164. String? memberOrganizationCode;
  1165. String? memberDepartmentCode;
  1166. LiveConsultationMemberStatus memberStatus;
  1167. DateTime? memberOperateTime;
  1168. String? name;
  1169. String? headImageToken;
  1170. ConsultationMemberDTO({
  1171. this.memberCode,
  1172. this.memberOrganizationCode,
  1173. this.memberDepartmentCode,
  1174. this.memberStatus = LiveConsultationMemberStatus.Default,
  1175. this.memberOperateTime,
  1176. this.name,
  1177. this.headImageToken,
  1178. });
  1179. factory ConsultationMemberDTO.fromJson(Map<String, dynamic> map) {
  1180. return ConsultationMemberDTO(
  1181. memberCode: map['MemberCode'],
  1182. memberOrganizationCode: map['MemberOrganizationCode'],
  1183. memberDepartmentCode: map['MemberDepartmentCode'],
  1184. memberStatus: LiveConsultationMemberStatus.values.firstWhere((e) => e.index == map['MemberStatus']),
  1185. memberOperateTime: map['MemberOperateTime'] != null ? DateTime.parse(map['MemberOperateTime']) : null,
  1186. name: map['Name'],
  1187. headImageToken: map['HeadImageToken'],
  1188. );
  1189. }
  1190. Map<String, dynamic> toJson() {
  1191. final map = Map<String, dynamic>();
  1192. if(memberCode != null)
  1193. map['MemberCode'] = memberCode;
  1194. if(memberOrganizationCode != null)
  1195. map['MemberOrganizationCode'] = memberOrganizationCode;
  1196. if(memberDepartmentCode != null)
  1197. map['MemberDepartmentCode'] = memberDepartmentCode;
  1198. map['MemberStatus'] = memberStatus.index;
  1199. if(memberOperateTime != null)
  1200. map['MemberOperateTime'] = JsonRpcUtils.dateFormat(memberOperateTime!);
  1201. if(name != null)
  1202. map['Name'] = name;
  1203. if(headImageToken != null)
  1204. map['HeadImageToken'] = headImageToken;
  1205. return map;
  1206. }
  1207. }
  1208. enum ConsultationReminderTimeEnum {
  1209. FifteenMinutes,
  1210. ThirtyMinutes,
  1211. SixtyMinutes,
  1212. OneDay,
  1213. }
  1214. enum ConsultationReminderMode {
  1215. Application,
  1216. SMS,
  1217. }
  1218. class ConsultationReminderDTO {
  1219. ConsultationReminderTimeEnum consultationReminderTime;
  1220. ConsultationReminderMode consultationReminderMode;
  1221. bool isExecuted;
  1222. ConsultationReminderDTO({
  1223. this.consultationReminderTime = ConsultationReminderTimeEnum.FifteenMinutes,
  1224. this.consultationReminderMode = ConsultationReminderMode.Application,
  1225. this.isExecuted = false,
  1226. });
  1227. factory ConsultationReminderDTO.fromJson(Map<String, dynamic> map) {
  1228. return ConsultationReminderDTO(
  1229. consultationReminderTime: ConsultationReminderTimeEnum.values.firstWhere((e) => e.index == map['ConsultationReminderTime']),
  1230. consultationReminderMode: ConsultationReminderMode.values.firstWhere((e) => e.index == map['ConsultationReminderMode']),
  1231. isExecuted: map['IsExecuted'],
  1232. );
  1233. }
  1234. Map<String, dynamic> toJson() {
  1235. final map = Map<String, dynamic>();
  1236. map['ConsultationReminderTime'] = consultationReminderTime.index;
  1237. map['ConsultationReminderMode'] = consultationReminderMode.index;
  1238. map['IsExecuted'] = isExecuted;
  1239. return map;
  1240. }
  1241. }
  1242. enum ConsultationReportMode {
  1243. ExpertReport,
  1244. ApplicantReport,
  1245. }
  1246. enum EmergencyConsultationStatus {
  1247. Default,
  1248. Initiating,
  1249. Cancelled,
  1250. Accepted,
  1251. Rejected,
  1252. Failed,
  1253. }
  1254. class ConsultationDetailDTO {
  1255. String? consultationCode;
  1256. String? applyOrganizationCode;
  1257. String? applyDepartmentCode;
  1258. String? applyUserCode;
  1259. String? expertOrganizationCode;
  1260. String? expertDepartmentCode;
  1261. String? expertUserCode;
  1262. String? assistantUserCode;
  1263. String? assistantUserName;
  1264. String? deviceCode;
  1265. String? operateUserCode;
  1266. String? scanUserCode;
  1267. String? patientCode;
  1268. OrganizationPatientTypeEnum patientType;
  1269. List<String >? scanPositions;
  1270. DateTime? createTime;
  1271. DateTime? consultationTime;
  1272. DateTime? consultationTimeEnd;
  1273. TransactionStatusEnum consultationStatus;
  1274. String? applyOrganizationName;
  1275. String? applyUserName;
  1276. String? operateUserName;
  1277. String? scanUserName;
  1278. String? expertOrganizationName;
  1279. String? expertUserName;
  1280. String? deviceName;
  1281. String? displayName;
  1282. String? patientName;
  1283. String? sex;
  1284. List<DataItemDTO >? patientDatas;
  1285. List<ConsultationFileDTO >? consultationFileList;
  1286. String? rejectReason;
  1287. String? location;
  1288. List<ConsultationMemberDTO >? consultationMembers;
  1289. String? description;
  1290. List<ConsultationReminderDTO >? consultationReminders;
  1291. String? approverCode;
  1292. ConsultationReportMode reportMode;
  1293. String? diseases;
  1294. String? primaryDiagnosis;
  1295. String? initiatorCode;
  1296. bool isEmergency;
  1297. String? emergencyCode;
  1298. bool isUpdateConsultationShow;
  1299. bool isRevokeShow;
  1300. bool isApprovalShow;
  1301. bool isAddInviterShow;
  1302. bool isRejectShow;
  1303. bool isAcceptInvitationShow;
  1304. bool isRejectInvitationShow;
  1305. bool isInitiateShow;
  1306. bool isJoinInShow;
  1307. bool isReportShow;
  1308. bool isEvaluateShow;
  1309. bool isFollowUpShow;
  1310. bool isImproveShow;
  1311. bool isEditReportShow;
  1312. bool isDeleteShow;
  1313. EmergencyConsultationStatus emergencyStatus;
  1314. String? assistantDoctorUserCode;
  1315. String? assistantDoctorUserName;
  1316. ConsultationDetailDTO({
  1317. this.consultationCode,
  1318. this.applyOrganizationCode,
  1319. this.applyDepartmentCode,
  1320. this.applyUserCode,
  1321. this.expertOrganizationCode,
  1322. this.expertDepartmentCode,
  1323. this.expertUserCode,
  1324. this.assistantUserCode,
  1325. this.assistantUserName,
  1326. this.deviceCode,
  1327. this.operateUserCode,
  1328. this.scanUserCode,
  1329. this.patientCode,
  1330. this.patientType = OrganizationPatientTypeEnum.Person,
  1331. this.scanPositions,
  1332. this.createTime,
  1333. this.consultationTime,
  1334. this.consultationTimeEnd,
  1335. this.consultationStatus = TransactionStatusEnum.Applied,
  1336. this.applyOrganizationName,
  1337. this.applyUserName,
  1338. this.operateUserName,
  1339. this.scanUserName,
  1340. this.expertOrganizationName,
  1341. this.expertUserName,
  1342. this.deviceName,
  1343. this.displayName,
  1344. this.patientName,
  1345. this.sex,
  1346. this.patientDatas,
  1347. this.consultationFileList,
  1348. this.rejectReason,
  1349. this.location,
  1350. this.consultationMembers,
  1351. this.description,
  1352. this.consultationReminders,
  1353. this.approverCode,
  1354. this.reportMode = ConsultationReportMode.ExpertReport,
  1355. this.diseases,
  1356. this.primaryDiagnosis,
  1357. this.initiatorCode,
  1358. this.isEmergency = false,
  1359. this.emergencyCode,
  1360. this.isUpdateConsultationShow = false,
  1361. this.isRevokeShow = false,
  1362. this.isApprovalShow = false,
  1363. this.isAddInviterShow = false,
  1364. this.isRejectShow = false,
  1365. this.isAcceptInvitationShow = false,
  1366. this.isRejectInvitationShow = false,
  1367. this.isInitiateShow = false,
  1368. this.isJoinInShow = false,
  1369. this.isReportShow = false,
  1370. this.isEvaluateShow = false,
  1371. this.isFollowUpShow = false,
  1372. this.isImproveShow = false,
  1373. this.isEditReportShow = false,
  1374. this.isDeleteShow = false,
  1375. this.emergencyStatus = EmergencyConsultationStatus.Default,
  1376. this.assistantDoctorUserCode,
  1377. this.assistantDoctorUserName,
  1378. });
  1379. factory ConsultationDetailDTO.fromJson(Map<String, dynamic> map) {
  1380. return ConsultationDetailDTO(
  1381. consultationCode: map['ConsultationCode'],
  1382. applyOrganizationCode: map['ApplyOrganizationCode'],
  1383. applyDepartmentCode: map['ApplyDepartmentCode'],
  1384. applyUserCode: map['ApplyUserCode'],
  1385. expertOrganizationCode: map['ExpertOrganizationCode'],
  1386. expertDepartmentCode: map['ExpertDepartmentCode'],
  1387. expertUserCode: map['ExpertUserCode'],
  1388. assistantUserCode: map['AssistantUserCode'],
  1389. assistantUserName: map['AssistantUserName'],
  1390. deviceCode: map['DeviceCode'],
  1391. operateUserCode: map['OperateUserCode'],
  1392. scanUserCode: map['ScanUserCode'],
  1393. patientCode: map['PatientCode'],
  1394. patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
  1395. scanPositions: map['ScanPositions'] != null ? map['ScanPositions'].cast<String>().toList() : null,
  1396. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1397. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  1398. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  1399. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  1400. applyOrganizationName: map['ApplyOrganizationName'],
  1401. applyUserName: map['ApplyUserName'],
  1402. operateUserName: map['OperateUserName'],
  1403. scanUserName: map['ScanUserName'],
  1404. expertOrganizationName: map['ExpertOrganizationName'],
  1405. expertUserName: map['ExpertUserName'],
  1406. deviceName: map['DeviceName'],
  1407. displayName: map['DisplayName'],
  1408. patientName: map['PatientName'],
  1409. sex: map['Sex'],
  1410. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1411. consultationFileList: map['ConsultationFileList'] != null ? (map['ConsultationFileList'] as List).map((e)=>ConsultationFileDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1412. rejectReason: map['RejectReason'],
  1413. location: map['Location'],
  1414. consultationMembers: map['ConsultationMembers'] != null ? (map['ConsultationMembers'] as List).map((e)=>ConsultationMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1415. description: map['Description'],
  1416. consultationReminders: map['ConsultationReminders'] != null ? (map['ConsultationReminders'] as List).map((e)=>ConsultationReminderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1417. approverCode: map['ApproverCode'],
  1418. reportMode: ConsultationReportMode.values.firstWhere((e) => e.index == map['ReportMode']),
  1419. diseases: map['Diseases'],
  1420. primaryDiagnosis: map['PrimaryDiagnosis'],
  1421. initiatorCode: map['InitiatorCode'],
  1422. isEmergency: map['IsEmergency'],
  1423. emergencyCode: map['EmergencyCode'],
  1424. isUpdateConsultationShow: map['IsUpdateConsultationShow'],
  1425. isRevokeShow: map['IsRevokeShow'],
  1426. isApprovalShow: map['IsApprovalShow'],
  1427. isAddInviterShow: map['IsAddInviterShow'],
  1428. isRejectShow: map['IsRejectShow'],
  1429. isAcceptInvitationShow: map['IsAcceptInvitationShow'],
  1430. isRejectInvitationShow: map['IsRejectInvitationShow'],
  1431. isInitiateShow: map['IsInitiateShow'],
  1432. isJoinInShow: map['IsJoinInShow'],
  1433. isReportShow: map['IsReportShow'],
  1434. isEvaluateShow: map['IsEvaluateShow'],
  1435. isFollowUpShow: map['IsFollowUpShow'],
  1436. isImproveShow: map['IsImproveShow'],
  1437. isEditReportShow: map['IsEditReportShow'],
  1438. isDeleteShow: map['IsDeleteShow'],
  1439. emergencyStatus: EmergencyConsultationStatus.values.firstWhere((e) => e.index == map['EmergencyStatus']),
  1440. assistantDoctorUserCode: map['AssistantDoctorUserCode'],
  1441. assistantDoctorUserName: map['AssistantDoctorUserName'],
  1442. );
  1443. }
  1444. Map<String, dynamic> toJson() {
  1445. final map = Map<String, dynamic>();
  1446. if(consultationCode != null)
  1447. map['ConsultationCode'] = consultationCode;
  1448. if(applyOrganizationCode != null)
  1449. map['ApplyOrganizationCode'] = applyOrganizationCode;
  1450. if(applyDepartmentCode != null)
  1451. map['ApplyDepartmentCode'] = applyDepartmentCode;
  1452. if(applyUserCode != null)
  1453. map['ApplyUserCode'] = applyUserCode;
  1454. if(expertOrganizationCode != null)
  1455. map['ExpertOrganizationCode'] = expertOrganizationCode;
  1456. if(expertDepartmentCode != null)
  1457. map['ExpertDepartmentCode'] = expertDepartmentCode;
  1458. if(expertUserCode != null)
  1459. map['ExpertUserCode'] = expertUserCode;
  1460. if(assistantUserCode != null)
  1461. map['AssistantUserCode'] = assistantUserCode;
  1462. if(assistantUserName != null)
  1463. map['AssistantUserName'] = assistantUserName;
  1464. if(deviceCode != null)
  1465. map['DeviceCode'] = deviceCode;
  1466. if(operateUserCode != null)
  1467. map['OperateUserCode'] = operateUserCode;
  1468. if(scanUserCode != null)
  1469. map['ScanUserCode'] = scanUserCode;
  1470. if(patientCode != null)
  1471. map['PatientCode'] = patientCode;
  1472. map['PatientType'] = patientType.index;
  1473. if(scanPositions != null)
  1474. map['ScanPositions'] = scanPositions;
  1475. if(createTime != null)
  1476. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  1477. if(consultationTime != null)
  1478. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  1479. if(consultationTimeEnd != null)
  1480. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  1481. map['ConsultationStatus'] = consultationStatus.index;
  1482. if(applyOrganizationName != null)
  1483. map['ApplyOrganizationName'] = applyOrganizationName;
  1484. if(applyUserName != null)
  1485. map['ApplyUserName'] = applyUserName;
  1486. if(operateUserName != null)
  1487. map['OperateUserName'] = operateUserName;
  1488. if(scanUserName != null)
  1489. map['ScanUserName'] = scanUserName;
  1490. if(expertOrganizationName != null)
  1491. map['ExpertOrganizationName'] = expertOrganizationName;
  1492. if(expertUserName != null)
  1493. map['ExpertUserName'] = expertUserName;
  1494. if(deviceName != null)
  1495. map['DeviceName'] = deviceName;
  1496. if(displayName != null)
  1497. map['DisplayName'] = displayName;
  1498. if(patientName != null)
  1499. map['PatientName'] = patientName;
  1500. if(sex != null)
  1501. map['Sex'] = sex;
  1502. if(patientDatas != null)
  1503. map['PatientDatas'] = patientDatas;
  1504. if(consultationFileList != null)
  1505. map['ConsultationFileList'] = consultationFileList;
  1506. if(rejectReason != null)
  1507. map['RejectReason'] = rejectReason;
  1508. if(location != null)
  1509. map['Location'] = location;
  1510. if(consultationMembers != null)
  1511. map['ConsultationMembers'] = consultationMembers;
  1512. if(description != null)
  1513. map['Description'] = description;
  1514. if(consultationReminders != null)
  1515. map['ConsultationReminders'] = consultationReminders;
  1516. if(approverCode != null)
  1517. map['ApproverCode'] = approverCode;
  1518. map['ReportMode'] = reportMode.index;
  1519. if(diseases != null)
  1520. map['Diseases'] = diseases;
  1521. if(primaryDiagnosis != null)
  1522. map['PrimaryDiagnosis'] = primaryDiagnosis;
  1523. if(initiatorCode != null)
  1524. map['InitiatorCode'] = initiatorCode;
  1525. map['IsEmergency'] = isEmergency;
  1526. if(emergencyCode != null)
  1527. map['EmergencyCode'] = emergencyCode;
  1528. map['IsUpdateConsultationShow'] = isUpdateConsultationShow;
  1529. map['IsRevokeShow'] = isRevokeShow;
  1530. map['IsApprovalShow'] = isApprovalShow;
  1531. map['IsAddInviterShow'] = isAddInviterShow;
  1532. map['IsRejectShow'] = isRejectShow;
  1533. map['IsAcceptInvitationShow'] = isAcceptInvitationShow;
  1534. map['IsRejectInvitationShow'] = isRejectInvitationShow;
  1535. map['IsInitiateShow'] = isInitiateShow;
  1536. map['IsJoinInShow'] = isJoinInShow;
  1537. map['IsReportShow'] = isReportShow;
  1538. map['IsEvaluateShow'] = isEvaluateShow;
  1539. map['IsFollowUpShow'] = isFollowUpShow;
  1540. map['IsImproveShow'] = isImproveShow;
  1541. map['IsEditReportShow'] = isEditReportShow;
  1542. map['IsDeleteShow'] = isDeleteShow;
  1543. map['EmergencyStatus'] = emergencyStatus.index;
  1544. if(assistantDoctorUserCode != null)
  1545. map['AssistantDoctorUserCode'] = assistantDoctorUserCode;
  1546. if(assistantDoctorUserName != null)
  1547. map['AssistantDoctorUserName'] = assistantDoctorUserName;
  1548. return map;
  1549. }
  1550. }
  1551. class FindConsultationDetailRequest extends TokenRequest{
  1552. String? consultationCode;
  1553. FindConsultationDetailRequest({
  1554. this.consultationCode,
  1555. String? token,
  1556. }) : super(
  1557. token: token,
  1558. );
  1559. factory FindConsultationDetailRequest.fromJson(Map<String, dynamic> map) {
  1560. return FindConsultationDetailRequest(
  1561. consultationCode: map['ConsultationCode'],
  1562. token: map['Token'],
  1563. );
  1564. }
  1565. Map<String, dynamic> toJson() {
  1566. final map = super.toJson();
  1567. if(consultationCode != null)
  1568. map['ConsultationCode'] = consultationCode;
  1569. return map;
  1570. }
  1571. }
  1572. class ApprovalConsultationRequest extends TokenRequest{
  1573. String? consultationCode;
  1574. String? expertUserCode;
  1575. DateTime? consultationTime;
  1576. DateTime? consultationTimeEnd;
  1577. String? location;
  1578. List<String >? consultationMemberCodes;
  1579. String? description;
  1580. List<ConsultationReminderDTO >? consultationReminders;
  1581. ApprovalConsultationRequest({
  1582. this.consultationCode,
  1583. this.expertUserCode,
  1584. this.consultationTime,
  1585. this.consultationTimeEnd,
  1586. this.location,
  1587. this.consultationMemberCodes,
  1588. this.description,
  1589. this.consultationReminders,
  1590. String? token,
  1591. }) : super(
  1592. token: token,
  1593. );
  1594. factory ApprovalConsultationRequest.fromJson(Map<String, dynamic> map) {
  1595. return ApprovalConsultationRequest(
  1596. consultationCode: map['ConsultationCode'],
  1597. expertUserCode: map['ExpertUserCode'],
  1598. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  1599. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  1600. location: map['Location'],
  1601. consultationMemberCodes: map['ConsultationMemberCodes'] != null ? map['ConsultationMemberCodes'].cast<String>().toList() : null,
  1602. description: map['Description'],
  1603. consultationReminders: map['ConsultationReminders'] != null ? (map['ConsultationReminders'] as List).map((e)=>ConsultationReminderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1604. token: map['Token'],
  1605. );
  1606. }
  1607. Map<String, dynamic> toJson() {
  1608. final map = super.toJson();
  1609. if(consultationCode != null)
  1610. map['ConsultationCode'] = consultationCode;
  1611. if(expertUserCode != null)
  1612. map['ExpertUserCode'] = expertUserCode;
  1613. if(consultationTime != null)
  1614. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  1615. if(consultationTimeEnd != null)
  1616. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  1617. if(location != null)
  1618. map['Location'] = location;
  1619. if(consultationMemberCodes != null)
  1620. map['ConsultationMemberCodes'] = consultationMemberCodes;
  1621. if(description != null)
  1622. map['Description'] = description;
  1623. if(consultationReminders != null)
  1624. map['ConsultationReminders'] = consultationReminders;
  1625. return map;
  1626. }
  1627. }
  1628. class RejectApplyConsultationRequest extends TokenRequest{
  1629. String? consultationCode;
  1630. String? reason;
  1631. RejectApplyConsultationRequest({
  1632. this.consultationCode,
  1633. this.reason,
  1634. String? token,
  1635. }) : super(
  1636. token: token,
  1637. );
  1638. factory RejectApplyConsultationRequest.fromJson(Map<String, dynamic> map) {
  1639. return RejectApplyConsultationRequest(
  1640. consultationCode: map['ConsultationCode'],
  1641. reason: map['Reason'],
  1642. token: map['Token'],
  1643. );
  1644. }
  1645. Map<String, dynamic> toJson() {
  1646. final map = super.toJson();
  1647. if(consultationCode != null)
  1648. map['ConsultationCode'] = consultationCode;
  1649. if(reason != null)
  1650. map['Reason'] = reason;
  1651. return map;
  1652. }
  1653. }
  1654. class RevokeConsultationRequest extends TokenRequest{
  1655. String? consultationCode;
  1656. RevokeConsultationRequest({
  1657. this.consultationCode,
  1658. String? token,
  1659. }) : super(
  1660. token: token,
  1661. );
  1662. factory RevokeConsultationRequest.fromJson(Map<String, dynamic> map) {
  1663. return RevokeConsultationRequest(
  1664. consultationCode: map['ConsultationCode'],
  1665. token: map['Token'],
  1666. );
  1667. }
  1668. Map<String, dynamic> toJson() {
  1669. final map = super.toJson();
  1670. if(consultationCode != null)
  1671. map['ConsultationCode'] = consultationCode;
  1672. return map;
  1673. }
  1674. }
  1675. class DeleteConsultationRequest extends TokenRequest{
  1676. String? consultationCode;
  1677. DeleteConsultationRequest({
  1678. this.consultationCode,
  1679. String? token,
  1680. }) : super(
  1681. token: token,
  1682. );
  1683. factory DeleteConsultationRequest.fromJson(Map<String, dynamic> map) {
  1684. return DeleteConsultationRequest(
  1685. consultationCode: map['ConsultationCode'],
  1686. token: map['Token'],
  1687. );
  1688. }
  1689. Map<String, dynamic> toJson() {
  1690. final map = super.toJson();
  1691. if(consultationCode != null)
  1692. map['ConsultationCode'] = consultationCode;
  1693. return map;
  1694. }
  1695. }
  1696. class ConsultationFileBaseDTO {
  1697. String? sourceUrl;
  1698. String? previewImageUrl;
  1699. String? coverImageUrl;
  1700. RemedicalFileDataTypeEnum fileDataType;
  1701. ConsultationFileTypeEnum consultationFileType;
  1702. ConsultationFileBaseDTO({
  1703. this.sourceUrl,
  1704. this.previewImageUrl,
  1705. this.coverImageUrl,
  1706. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1707. this.consultationFileType = ConsultationFileTypeEnum.Screenshot,
  1708. });
  1709. factory ConsultationFileBaseDTO.fromJson(Map<String, dynamic> map) {
  1710. return ConsultationFileBaseDTO(
  1711. sourceUrl: map['SourceUrl'],
  1712. previewImageUrl: map['PreviewImageUrl'],
  1713. coverImageUrl: map['CoverImageUrl'],
  1714. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1715. consultationFileType: ConsultationFileTypeEnum.values.firstWhere((e) => e.index == map['ConsultationFileType']),
  1716. );
  1717. }
  1718. Map<String, dynamic> toJson() {
  1719. final map = Map<String, dynamic>();
  1720. if(sourceUrl != null)
  1721. map['SourceUrl'] = sourceUrl;
  1722. if(previewImageUrl != null)
  1723. map['PreviewImageUrl'] = previewImageUrl;
  1724. if(coverImageUrl != null)
  1725. map['CoverImageUrl'] = coverImageUrl;
  1726. map['FileDataType'] = fileDataType.index;
  1727. map['ConsultationFileType'] = consultationFileType.index;
  1728. return map;
  1729. }
  1730. }
  1731. class UpdateConsultationFilesInfoRequest extends TokenRequest{
  1732. String? consultationCode;
  1733. List<ConsultationFileBaseDTO >? fileInfos;
  1734. UpdateConsultationFilesInfoRequest({
  1735. this.consultationCode,
  1736. this.fileInfos,
  1737. String? token,
  1738. }) : super(
  1739. token: token,
  1740. );
  1741. factory UpdateConsultationFilesInfoRequest.fromJson(Map<String, dynamic> map) {
  1742. return UpdateConsultationFilesInfoRequest(
  1743. consultationCode: map['ConsultationCode'],
  1744. fileInfos: map['FileInfos'] != null ? (map['FileInfos'] as List).map((e)=>ConsultationFileBaseDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1745. token: map['Token'],
  1746. );
  1747. }
  1748. Map<String, dynamic> toJson() {
  1749. final map = super.toJson();
  1750. if(consultationCode != null)
  1751. map['ConsultationCode'] = consultationCode;
  1752. if(fileInfos != null)
  1753. map['FileInfos'] = fileInfos;
  1754. return map;
  1755. }
  1756. }
  1757. class ConsultationAssistantDTO extends UserBaseDTO{
  1758. ConsultationAssistantDTO({
  1759. String? fullName,
  1760. String? phone,
  1761. String? email,
  1762. String? userCode,
  1763. String? userName,
  1764. String? headImageUrl,
  1765. String? displayName,
  1766. DateTime? createTime,
  1767. DateTime? updateTime,
  1768. }) : super(
  1769. phone: phone,
  1770. email: email,
  1771. userCode: userCode,
  1772. userName: userName,
  1773. fullName: fullName,
  1774. headImageUrl: headImageUrl,
  1775. displayName: displayName,
  1776. createTime: createTime,
  1777. updateTime: updateTime,
  1778. );
  1779. factory ConsultationAssistantDTO.fromJson(Map<String, dynamic> map) {
  1780. return ConsultationAssistantDTO(
  1781. fullName: map['FullName'],
  1782. phone: map['Phone'],
  1783. email: map['Email'],
  1784. userCode: map['UserCode'],
  1785. userName: map['UserName'],
  1786. headImageUrl: map['HeadImageUrl'],
  1787. displayName: map['DisplayName'],
  1788. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1789. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1790. );
  1791. }
  1792. Map<String, dynamic> toJson() {
  1793. final map = super.toJson();
  1794. return map;
  1795. }
  1796. }
  1797. class FindOrganizationAssistantsRequest extends TokenRequest{
  1798. String? assistantName;
  1799. FindOrganizationAssistantsRequest({
  1800. this.assistantName,
  1801. String? token,
  1802. }) : super(
  1803. token: token,
  1804. );
  1805. factory FindOrganizationAssistantsRequest.fromJson(Map<String, dynamic> map) {
  1806. return FindOrganizationAssistantsRequest(
  1807. assistantName: map['AssistantName'],
  1808. token: map['Token'],
  1809. );
  1810. }
  1811. Map<String, dynamic> toJson() {
  1812. final map = super.toJson();
  1813. if(assistantName != null)
  1814. map['AssistantName'] = assistantName;
  1815. return map;
  1816. }
  1817. }
  1818. class ConsultationAssistantDoctorDTO extends UserBaseDTO{
  1819. ConsultationAssistantDoctorDTO({
  1820. String? fullName,
  1821. String? phone,
  1822. String? email,
  1823. String? userCode,
  1824. String? userName,
  1825. String? headImageUrl,
  1826. String? displayName,
  1827. DateTime? createTime,
  1828. DateTime? updateTime,
  1829. }) : super(
  1830. phone: phone,
  1831. email: email,
  1832. userCode: userCode,
  1833. userName: userName,
  1834. fullName: fullName,
  1835. headImageUrl: headImageUrl,
  1836. displayName: displayName,
  1837. createTime: createTime,
  1838. updateTime: updateTime,
  1839. );
  1840. factory ConsultationAssistantDoctorDTO.fromJson(Map<String, dynamic> map) {
  1841. return ConsultationAssistantDoctorDTO(
  1842. fullName: map['FullName'],
  1843. phone: map['Phone'],
  1844. email: map['Email'],
  1845. userCode: map['UserCode'],
  1846. userName: map['UserName'],
  1847. headImageUrl: map['HeadImageUrl'],
  1848. displayName: map['DisplayName'],
  1849. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1850. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1851. );
  1852. }
  1853. Map<String, dynamic> toJson() {
  1854. final map = super.toJson();
  1855. return map;
  1856. }
  1857. }
  1858. class FindOrganizationAssistantDoctorsRequest extends TokenRequest{
  1859. String? assistantDoctorName;
  1860. FindOrganizationAssistantDoctorsRequest({
  1861. this.assistantDoctorName,
  1862. String? token,
  1863. }) : super(
  1864. token: token,
  1865. );
  1866. factory FindOrganizationAssistantDoctorsRequest.fromJson(Map<String, dynamic> map) {
  1867. return FindOrganizationAssistantDoctorsRequest(
  1868. assistantDoctorName: map['AssistantDoctorName'],
  1869. token: map['Token'],
  1870. );
  1871. }
  1872. Map<String, dynamic> toJson() {
  1873. final map = super.toJson();
  1874. if(assistantDoctorName != null)
  1875. map['AssistantDoctorName'] = assistantDoctorName;
  1876. return map;
  1877. }
  1878. }
  1879. class UpdateMyOrganizationAssistantRequest extends TokenRequest{
  1880. String? assistantUserCode;
  1881. String? assistantDoctorUserCode;
  1882. UpdateMyOrganizationAssistantRequest({
  1883. this.assistantUserCode,
  1884. this.assistantDoctorUserCode,
  1885. String? token,
  1886. }) : super(
  1887. token: token,
  1888. );
  1889. factory UpdateMyOrganizationAssistantRequest.fromJson(Map<String, dynamic> map) {
  1890. return UpdateMyOrganizationAssistantRequest(
  1891. assistantUserCode: map['AssistantUserCode'],
  1892. assistantDoctorUserCode: map['AssistantDoctorUserCode'],
  1893. token: map['Token'],
  1894. );
  1895. }
  1896. Map<String, dynamic> toJson() {
  1897. final map = super.toJson();
  1898. if(assistantUserCode != null)
  1899. map['AssistantUserCode'] = assistantUserCode;
  1900. if(assistantDoctorUserCode != null)
  1901. map['AssistantDoctorUserCode'] = assistantDoctorUserCode;
  1902. return map;
  1903. }
  1904. }
  1905. class ClientPatientInfoBaseDTO extends BaseDTO{
  1906. String? patientCode;
  1907. bool isValid;
  1908. List<DataItemDTO >? patientData;
  1909. int unReadRecordCount;
  1910. bool isReferral;
  1911. List<String >? devicePatientIDs;
  1912. String? organizationCode;
  1913. String? organizationName;
  1914. ClientPatientInfoBaseDTO({
  1915. this.patientCode,
  1916. this.isValid = false,
  1917. this.patientData,
  1918. this.unReadRecordCount = 0,
  1919. this.isReferral = false,
  1920. this.devicePatientIDs,
  1921. this.organizationCode,
  1922. this.organizationName,
  1923. DateTime? createTime,
  1924. DateTime? updateTime,
  1925. }) : super(
  1926. createTime: createTime,
  1927. updateTime: updateTime,
  1928. );
  1929. factory ClientPatientInfoBaseDTO.fromJson(Map<String, dynamic> map) {
  1930. return ClientPatientInfoBaseDTO(
  1931. patientCode: map['PatientCode'],
  1932. isValid: map['IsValid'],
  1933. patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1934. unReadRecordCount: map['UnReadRecordCount'],
  1935. isReferral: map['IsReferral'],
  1936. devicePatientIDs: map['DevicePatientIDs'] != null ? map['DevicePatientIDs'].cast<String>().toList() : null,
  1937. organizationCode: map['OrganizationCode'],
  1938. organizationName: map['OrganizationName'],
  1939. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1940. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1941. );
  1942. }
  1943. Map<String, dynamic> toJson() {
  1944. final map = super.toJson();
  1945. if(patientCode != null)
  1946. map['PatientCode'] = patientCode;
  1947. map['IsValid'] = isValid;
  1948. if(patientData != null)
  1949. map['PatientData'] = patientData;
  1950. map['UnReadRecordCount'] = unReadRecordCount;
  1951. map['IsReferral'] = isReferral;
  1952. if(devicePatientIDs != null)
  1953. map['DevicePatientIDs'] = devicePatientIDs;
  1954. if(organizationCode != null)
  1955. map['OrganizationCode'] = organizationCode;
  1956. if(organizationName != null)
  1957. map['OrganizationName'] = organizationName;
  1958. return map;
  1959. }
  1960. }
  1961. class FindConsultationPatientPageRequest extends PageRequest{
  1962. String? keyword;
  1963. DateTime? startDate;
  1964. DateTime? endDate;
  1965. FindConsultationPatientPageRequest({
  1966. this.keyword,
  1967. this.startDate,
  1968. this.endDate,
  1969. int pageIndex = 0,
  1970. int pageSize = 0,
  1971. String? token,
  1972. }) : super(
  1973. pageIndex: pageIndex,
  1974. pageSize: pageSize,
  1975. token: token,
  1976. );
  1977. factory FindConsultationPatientPageRequest.fromJson(Map<String, dynamic> map) {
  1978. return FindConsultationPatientPageRequest(
  1979. keyword: map['Keyword'],
  1980. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  1981. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  1982. pageIndex: map['PageIndex'],
  1983. pageSize: map['PageSize'],
  1984. token: map['Token'],
  1985. );
  1986. }
  1987. Map<String, dynamic> toJson() {
  1988. final map = super.toJson();
  1989. if(keyword != null)
  1990. map['Keyword'] = keyword;
  1991. if(startDate != null)
  1992. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  1993. if(endDate != null)
  1994. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  1995. return map;
  1996. }
  1997. }
  1998. class FindCanSwitchConsultationsRequest extends TokenRequest{
  1999. String? consultationCode;
  2000. String? language;
  2001. FindCanSwitchConsultationsRequest({
  2002. this.consultationCode,
  2003. this.language,
  2004. String? token,
  2005. }) : super(
  2006. token: token,
  2007. );
  2008. factory FindCanSwitchConsultationsRequest.fromJson(Map<String, dynamic> map) {
  2009. return FindCanSwitchConsultationsRequest(
  2010. consultationCode: map['ConsultationCode'],
  2011. language: map['Language'],
  2012. token: map['Token'],
  2013. );
  2014. }
  2015. Map<String, dynamic> toJson() {
  2016. final map = super.toJson();
  2017. if(consultationCode != null)
  2018. map['ConsultationCode'] = consultationCode;
  2019. if(language != null)
  2020. map['Language'] = language;
  2021. return map;
  2022. }
  2023. }
  2024. class InitiateLiveConsultationResult {
  2025. String? consultationCode;
  2026. String? initiatorCode;
  2027. int roomNo;
  2028. TransactionStatusEnum liveProtocol;
  2029. int appId;
  2030. String? userSign;
  2031. List<LiveConsultationMember >? memberLiveDatas;
  2032. InitiateLiveConsultationResult({
  2033. this.consultationCode,
  2034. this.initiatorCode,
  2035. this.roomNo = 0,
  2036. this.liveProtocol = TransactionStatusEnum.Applied,
  2037. this.appId = 0,
  2038. this.userSign,
  2039. this.memberLiveDatas,
  2040. });
  2041. factory InitiateLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2042. return InitiateLiveConsultationResult(
  2043. consultationCode: map['ConsultationCode'],
  2044. initiatorCode: map['InitiatorCode'],
  2045. roomNo: map['RoomNo'],
  2046. liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
  2047. appId: map['AppId'],
  2048. userSign: map['UserSign'],
  2049. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  2050. );
  2051. }
  2052. Map<String, dynamic> toJson() {
  2053. final map = Map<String, dynamic>();
  2054. if(consultationCode != null)
  2055. map['ConsultationCode'] = consultationCode;
  2056. if(initiatorCode != null)
  2057. map['InitiatorCode'] = initiatorCode;
  2058. map['RoomNo'] = roomNo;
  2059. map['LiveProtocol'] = liveProtocol.index;
  2060. map['AppId'] = appId;
  2061. if(userSign != null)
  2062. map['UserSign'] = userSign;
  2063. if(memberLiveDatas != null)
  2064. map['MemberLiveDatas'] = memberLiveDatas;
  2065. return map;
  2066. }
  2067. }
  2068. class InitiateLiveConsultationRequest extends TokenRequest{
  2069. String? consultationCode;
  2070. bool checkOnly;
  2071. InitiateLiveConsultationRequest({
  2072. this.consultationCode,
  2073. this.checkOnly = false,
  2074. String? token,
  2075. }) : super(
  2076. token: token,
  2077. );
  2078. factory InitiateLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2079. return InitiateLiveConsultationRequest(
  2080. consultationCode: map['ConsultationCode'],
  2081. checkOnly: map['CheckOnly'],
  2082. token: map['Token'],
  2083. );
  2084. }
  2085. Map<String, dynamic> toJson() {
  2086. final map = super.toJson();
  2087. if(consultationCode != null)
  2088. map['ConsultationCode'] = consultationCode;
  2089. map['CheckOnly'] = checkOnly;
  2090. return map;
  2091. }
  2092. }
  2093. class InviteInLiveConsultationResult {
  2094. String? consultationCode;
  2095. InviteInLiveConsultationResult({
  2096. this.consultationCode,
  2097. });
  2098. factory InviteInLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2099. return InviteInLiveConsultationResult(
  2100. consultationCode: map['ConsultationCode'],
  2101. );
  2102. }
  2103. Map<String, dynamic> toJson() {
  2104. final map = Map<String, dynamic>();
  2105. if(consultationCode != null)
  2106. map['ConsultationCode'] = consultationCode;
  2107. return map;
  2108. }
  2109. }
  2110. class InviteInLiveConsultationRequest extends TokenRequest{
  2111. String? consultationCode;
  2112. List<String >? inviteCodes;
  2113. int roomNo;
  2114. InviteInLiveConsultationRequest({
  2115. this.consultationCode,
  2116. this.inviteCodes,
  2117. this.roomNo = 0,
  2118. String? token,
  2119. }) : super(
  2120. token: token,
  2121. );
  2122. factory InviteInLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2123. return InviteInLiveConsultationRequest(
  2124. consultationCode: map['ConsultationCode'],
  2125. inviteCodes: map['InviteCodes'] != null ? map['InviteCodes'].cast<String>().toList() : null,
  2126. roomNo: map['RoomNo'],
  2127. token: map['Token'],
  2128. );
  2129. }
  2130. Map<String, dynamic> toJson() {
  2131. final map = super.toJson();
  2132. if(consultationCode != null)
  2133. map['ConsultationCode'] = consultationCode;
  2134. if(inviteCodes != null)
  2135. map['InviteCodes'] = inviteCodes;
  2136. map['RoomNo'] = roomNo;
  2137. return map;
  2138. }
  2139. }
  2140. class CancelInvitingInLiveConsultationResult {
  2141. String? consultationCode;
  2142. CancelInvitingInLiveConsultationResult({
  2143. this.consultationCode,
  2144. });
  2145. factory CancelInvitingInLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2146. return CancelInvitingInLiveConsultationResult(
  2147. consultationCode: map['ConsultationCode'],
  2148. );
  2149. }
  2150. Map<String, dynamic> toJson() {
  2151. final map = Map<String, dynamic>();
  2152. if(consultationCode != null)
  2153. map['ConsultationCode'] = consultationCode;
  2154. return map;
  2155. }
  2156. }
  2157. class CancelInvitingInLiveConsultationRequest extends TokenRequest{
  2158. String? consultationCode;
  2159. List<String >? inviteCodes;
  2160. CancelInvitingInLiveConsultationRequest({
  2161. this.consultationCode,
  2162. this.inviteCodes,
  2163. String? token,
  2164. }) : super(
  2165. token: token,
  2166. );
  2167. factory CancelInvitingInLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2168. return CancelInvitingInLiveConsultationRequest(
  2169. consultationCode: map['ConsultationCode'],
  2170. inviteCodes: map['InviteCodes'] != null ? map['InviteCodes'].cast<String>().toList() : null,
  2171. token: map['Token'],
  2172. );
  2173. }
  2174. Map<String, dynamic> toJson() {
  2175. final map = super.toJson();
  2176. if(consultationCode != null)
  2177. map['ConsultationCode'] = consultationCode;
  2178. if(inviteCodes != null)
  2179. map['InviteCodes'] = inviteCodes;
  2180. return map;
  2181. }
  2182. }
  2183. class RejectLiveConsultationResult {
  2184. String? consultationCode;
  2185. RejectLiveConsultationResult({
  2186. this.consultationCode,
  2187. });
  2188. factory RejectLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2189. return RejectLiveConsultationResult(
  2190. consultationCode: map['ConsultationCode'],
  2191. );
  2192. }
  2193. Map<String, dynamic> toJson() {
  2194. final map = Map<String, dynamic>();
  2195. if(consultationCode != null)
  2196. map['ConsultationCode'] = consultationCode;
  2197. return map;
  2198. }
  2199. }
  2200. class RejectLiveConsultationRequest extends TokenRequest{
  2201. String? consultationCode;
  2202. RejectLiveConsultationRequest({
  2203. this.consultationCode,
  2204. String? token,
  2205. }) : super(
  2206. token: token,
  2207. );
  2208. factory RejectLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2209. return RejectLiveConsultationRequest(
  2210. consultationCode: map['ConsultationCode'],
  2211. token: map['Token'],
  2212. );
  2213. }
  2214. Map<String, dynamic> toJson() {
  2215. final map = super.toJson();
  2216. if(consultationCode != null)
  2217. map['ConsultationCode'] = consultationCode;
  2218. return map;
  2219. }
  2220. }
  2221. class InteractiveBoardDataDTO {
  2222. String? userCode;
  2223. String? boardData;
  2224. DateTime? interactiveTime;
  2225. InteractiveBoardDataDTO({
  2226. this.userCode,
  2227. this.boardData,
  2228. this.interactiveTime,
  2229. });
  2230. factory InteractiveBoardDataDTO.fromJson(Map<String, dynamic> map) {
  2231. return InteractiveBoardDataDTO(
  2232. userCode: map['UserCode'],
  2233. boardData: map['BoardData'],
  2234. interactiveTime: map['InteractiveTime'] != null ? DateTime.parse(map['InteractiveTime']) : null,
  2235. );
  2236. }
  2237. Map<String, dynamic> toJson() {
  2238. final map = Map<String, dynamic>();
  2239. if(userCode != null)
  2240. map['UserCode'] = userCode;
  2241. if(boardData != null)
  2242. map['BoardData'] = boardData;
  2243. if(interactiveTime != null)
  2244. map['InteractiveTime'] = JsonRpcUtils.dateFormat(interactiveTime!);
  2245. return map;
  2246. }
  2247. }
  2248. class JoinLiveConsultationResult {
  2249. String? consultationCode;
  2250. String? userCode;
  2251. int roomNo;
  2252. TransactionStatusEnum liveProtocol;
  2253. int appId;
  2254. String? userSign;
  2255. List<LiveConsultationMember >? memberLiveDatas;
  2256. List<InteractiveBoardDataDTO >? interactiveBoardDatas;
  2257. JoinLiveConsultationResult({
  2258. this.consultationCode,
  2259. this.userCode,
  2260. this.roomNo = 0,
  2261. this.liveProtocol = TransactionStatusEnum.Applied,
  2262. this.appId = 0,
  2263. this.userSign,
  2264. this.memberLiveDatas,
  2265. this.interactiveBoardDatas,
  2266. });
  2267. factory JoinLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2268. return JoinLiveConsultationResult(
  2269. consultationCode: map['ConsultationCode'],
  2270. userCode: map['UserCode'],
  2271. roomNo: map['RoomNo'],
  2272. liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
  2273. appId: map['AppId'],
  2274. userSign: map['UserSign'],
  2275. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  2276. interactiveBoardDatas: map['InteractiveBoardDatas'] != null ? (map['InteractiveBoardDatas'] as List).map((e)=>InteractiveBoardDataDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2277. );
  2278. }
  2279. Map<String, dynamic> toJson() {
  2280. final map = Map<String, dynamic>();
  2281. if(consultationCode != null)
  2282. map['ConsultationCode'] = consultationCode;
  2283. if(userCode != null)
  2284. map['UserCode'] = userCode;
  2285. map['RoomNo'] = roomNo;
  2286. map['LiveProtocol'] = liveProtocol.index;
  2287. map['AppId'] = appId;
  2288. if(userSign != null)
  2289. map['UserSign'] = userSign;
  2290. if(memberLiveDatas != null)
  2291. map['MemberLiveDatas'] = memberLiveDatas;
  2292. if(interactiveBoardDatas != null)
  2293. map['InteractiveBoardDatas'] = interactiveBoardDatas;
  2294. return map;
  2295. }
  2296. }
  2297. class JoinLiveConsultationRequest extends TokenRequest{
  2298. String? consultationCode;
  2299. bool needCall;
  2300. bool checkOnly;
  2301. JoinLiveConsultationRequest({
  2302. this.consultationCode,
  2303. this.needCall = false,
  2304. this.checkOnly = false,
  2305. String? token,
  2306. }) : super(
  2307. token: token,
  2308. );
  2309. factory JoinLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2310. return JoinLiveConsultationRequest(
  2311. consultationCode: map['ConsultationCode'],
  2312. needCall: map['NeedCall'],
  2313. checkOnly: map['CheckOnly'],
  2314. token: map['Token'],
  2315. );
  2316. }
  2317. Map<String, dynamic> toJson() {
  2318. final map = super.toJson();
  2319. if(consultationCode != null)
  2320. map['ConsultationCode'] = consultationCode;
  2321. map['NeedCall'] = needCall;
  2322. map['CheckOnly'] = checkOnly;
  2323. return map;
  2324. }
  2325. }
  2326. class CancelLiveConsultationResult {
  2327. String? consultationCode;
  2328. CancelLiveConsultationResult({
  2329. this.consultationCode,
  2330. });
  2331. factory CancelLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2332. return CancelLiveConsultationResult(
  2333. consultationCode: map['ConsultationCode'],
  2334. );
  2335. }
  2336. Map<String, dynamic> toJson() {
  2337. final map = Map<String, dynamic>();
  2338. if(consultationCode != null)
  2339. map['ConsultationCode'] = consultationCode;
  2340. return map;
  2341. }
  2342. }
  2343. class CancelLiveConsultationRequest extends TokenRequest{
  2344. String? consultationCode;
  2345. CancelLiveConsultationRequest({
  2346. this.consultationCode,
  2347. String? token,
  2348. }) : super(
  2349. token: token,
  2350. );
  2351. factory CancelLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2352. return CancelLiveConsultationRequest(
  2353. consultationCode: map['ConsultationCode'],
  2354. token: map['Token'],
  2355. );
  2356. }
  2357. Map<String, dynamic> toJson() {
  2358. final map = super.toJson();
  2359. if(consultationCode != null)
  2360. map['ConsultationCode'] = consultationCode;
  2361. return map;
  2362. }
  2363. }
  2364. class AcceptLiveConsultationResult {
  2365. String? consultationCode;
  2366. String? userCode;
  2367. int roomNo;
  2368. TransactionStatusEnum liveProtocol;
  2369. int appId;
  2370. String? userSign;
  2371. List<LiveConsultationMember >? memberLiveDatas;
  2372. List<InteractiveBoardDataDTO >? interactiveBoardDatas;
  2373. AcceptLiveConsultationResult({
  2374. this.consultationCode,
  2375. this.userCode,
  2376. this.roomNo = 0,
  2377. this.liveProtocol = TransactionStatusEnum.Applied,
  2378. this.appId = 0,
  2379. this.userSign,
  2380. this.memberLiveDatas,
  2381. this.interactiveBoardDatas,
  2382. });
  2383. factory AcceptLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2384. return AcceptLiveConsultationResult(
  2385. consultationCode: map['ConsultationCode'],
  2386. userCode: map['UserCode'],
  2387. roomNo: map['RoomNo'],
  2388. liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
  2389. appId: map['AppId'],
  2390. userSign: map['UserSign'],
  2391. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  2392. interactiveBoardDatas: map['InteractiveBoardDatas'] != null ? (map['InteractiveBoardDatas'] as List).map((e)=>InteractiveBoardDataDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2393. );
  2394. }
  2395. Map<String, dynamic> toJson() {
  2396. final map = Map<String, dynamic>();
  2397. if(consultationCode != null)
  2398. map['ConsultationCode'] = consultationCode;
  2399. if(userCode != null)
  2400. map['UserCode'] = userCode;
  2401. map['RoomNo'] = roomNo;
  2402. map['LiveProtocol'] = liveProtocol.index;
  2403. map['AppId'] = appId;
  2404. if(userSign != null)
  2405. map['UserSign'] = userSign;
  2406. if(memberLiveDatas != null)
  2407. map['MemberLiveDatas'] = memberLiveDatas;
  2408. if(interactiveBoardDatas != null)
  2409. map['InteractiveBoardDatas'] = interactiveBoardDatas;
  2410. return map;
  2411. }
  2412. }
  2413. class AcceptLiveConsultationRequest extends TokenRequest{
  2414. String? consultationCode;
  2415. bool checkOnly;
  2416. AcceptLiveConsultationRequest({
  2417. this.consultationCode,
  2418. this.checkOnly = false,
  2419. String? token,
  2420. }) : super(
  2421. token: token,
  2422. );
  2423. factory AcceptLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2424. return AcceptLiveConsultationRequest(
  2425. consultationCode: map['ConsultationCode'],
  2426. checkOnly: map['CheckOnly'],
  2427. token: map['Token'],
  2428. );
  2429. }
  2430. Map<String, dynamic> toJson() {
  2431. final map = super.toJson();
  2432. if(consultationCode != null)
  2433. map['ConsultationCode'] = consultationCode;
  2434. map['CheckOnly'] = checkOnly;
  2435. return map;
  2436. }
  2437. }
  2438. class LeaveLiveConsultationResult {
  2439. String? consultationCode;
  2440. LeaveLiveConsultationResult({
  2441. this.consultationCode,
  2442. });
  2443. factory LeaveLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2444. return LeaveLiveConsultationResult(
  2445. consultationCode: map['ConsultationCode'],
  2446. );
  2447. }
  2448. Map<String, dynamic> toJson() {
  2449. final map = Map<String, dynamic>();
  2450. if(consultationCode != null)
  2451. map['ConsultationCode'] = consultationCode;
  2452. return map;
  2453. }
  2454. }
  2455. class LeaveLiveConsultationRequest extends TokenRequest{
  2456. String? consultationCode;
  2457. LeaveLiveConsultationRequest({
  2458. this.consultationCode,
  2459. String? token,
  2460. }) : super(
  2461. token: token,
  2462. );
  2463. factory LeaveLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2464. return LeaveLiveConsultationRequest(
  2465. consultationCode: map['ConsultationCode'],
  2466. token: map['Token'],
  2467. );
  2468. }
  2469. Map<String, dynamic> toJson() {
  2470. final map = super.toJson();
  2471. if(consultationCode != null)
  2472. map['ConsultationCode'] = consultationCode;
  2473. return map;
  2474. }
  2475. }
  2476. class MuteLiveConsultationResult {
  2477. String? consultationCode;
  2478. MuteLiveConsultationResult({
  2479. this.consultationCode,
  2480. });
  2481. factory MuteLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2482. return MuteLiveConsultationResult(
  2483. consultationCode: map['ConsultationCode'],
  2484. );
  2485. }
  2486. Map<String, dynamic> toJson() {
  2487. final map = Map<String, dynamic>();
  2488. if(consultationCode != null)
  2489. map['ConsultationCode'] = consultationCode;
  2490. return map;
  2491. }
  2492. }
  2493. class MuteLiveConsultationRequest extends TokenRequest{
  2494. String? consultationCode;
  2495. bool mute;
  2496. MuteLiveConsultationRequest({
  2497. this.consultationCode,
  2498. this.mute = false,
  2499. String? token,
  2500. }) : super(
  2501. token: token,
  2502. );
  2503. factory MuteLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2504. return MuteLiveConsultationRequest(
  2505. consultationCode: map['ConsultationCode'],
  2506. mute: map['Mute'],
  2507. token: map['Token'],
  2508. );
  2509. }
  2510. Map<String, dynamic> toJson() {
  2511. final map = super.toJson();
  2512. if(consultationCode != null)
  2513. map['ConsultationCode'] = consultationCode;
  2514. map['Mute'] = mute;
  2515. return map;
  2516. }
  2517. }
  2518. class SwitchLiveConsultationVideoResult {
  2519. String? consultationCode;
  2520. SwitchLiveConsultationVideoResult({
  2521. this.consultationCode,
  2522. });
  2523. factory SwitchLiveConsultationVideoResult.fromJson(Map<String, dynamic> map) {
  2524. return SwitchLiveConsultationVideoResult(
  2525. consultationCode: map['ConsultationCode'],
  2526. );
  2527. }
  2528. Map<String, dynamic> toJson() {
  2529. final map = Map<String, dynamic>();
  2530. if(consultationCode != null)
  2531. map['ConsultationCode'] = consultationCode;
  2532. return map;
  2533. }
  2534. }
  2535. class SwitchLiveConsultationVideoRequest extends TokenRequest{
  2536. String? consultationCode;
  2537. bool opened;
  2538. SwitchLiveConsultationVideoRequest({
  2539. this.consultationCode,
  2540. this.opened = false,
  2541. String? token,
  2542. }) : super(
  2543. token: token,
  2544. );
  2545. factory SwitchLiveConsultationVideoRequest.fromJson(Map<String, dynamic> map) {
  2546. return SwitchLiveConsultationVideoRequest(
  2547. consultationCode: map['ConsultationCode'],
  2548. opened: map['Opened'],
  2549. token: map['Token'],
  2550. );
  2551. }
  2552. Map<String, dynamic> toJson() {
  2553. final map = super.toJson();
  2554. if(consultationCode != null)
  2555. map['ConsultationCode'] = consultationCode;
  2556. map['Opened'] = opened;
  2557. return map;
  2558. }
  2559. }
  2560. class LiveConsultationHeartRateResult {
  2561. String? consultationCode;
  2562. LiveConsultationHeartRateResult({
  2563. this.consultationCode,
  2564. });
  2565. factory LiveConsultationHeartRateResult.fromJson(Map<String, dynamic> map) {
  2566. return LiveConsultationHeartRateResult(
  2567. consultationCode: map['ConsultationCode'],
  2568. );
  2569. }
  2570. Map<String, dynamic> toJson() {
  2571. final map = Map<String, dynamic>();
  2572. if(consultationCode != null)
  2573. map['ConsultationCode'] = consultationCode;
  2574. return map;
  2575. }
  2576. }
  2577. class LiveConsultationHeartRateRequest extends TokenRequest{
  2578. String? consultationCode;
  2579. LiveConsultationHeartRateRequest({
  2580. this.consultationCode,
  2581. String? token,
  2582. }) : super(
  2583. token: token,
  2584. );
  2585. factory LiveConsultationHeartRateRequest.fromJson(Map<String, dynamic> map) {
  2586. return LiveConsultationHeartRateRequest(
  2587. consultationCode: map['ConsultationCode'],
  2588. token: map['Token'],
  2589. );
  2590. }
  2591. Map<String, dynamic> toJson() {
  2592. final map = super.toJson();
  2593. if(consultationCode != null)
  2594. map['ConsultationCode'] = consultationCode;
  2595. return map;
  2596. }
  2597. }
  2598. class SendInteractiveBoardDataRequest extends TokenRequest{
  2599. String? consultationCode;
  2600. bool isClear;
  2601. String? boardData;
  2602. SendInteractiveBoardDataRequest({
  2603. this.consultationCode,
  2604. this.isClear = false,
  2605. this.boardData,
  2606. String? token,
  2607. }) : super(
  2608. token: token,
  2609. );
  2610. factory SendInteractiveBoardDataRequest.fromJson(Map<String, dynamic> map) {
  2611. return SendInteractiveBoardDataRequest(
  2612. consultationCode: map['ConsultationCode'],
  2613. isClear: map['IsClear'],
  2614. boardData: map['BoardData'],
  2615. token: map['Token'],
  2616. );
  2617. }
  2618. Map<String, dynamic> toJson() {
  2619. final map = super.toJson();
  2620. if(consultationCode != null)
  2621. map['ConsultationCode'] = consultationCode;
  2622. map['IsClear'] = isClear;
  2623. if(boardData != null)
  2624. map['BoardData'] = boardData;
  2625. return map;
  2626. }
  2627. }
  2628. class AddFollowUpVisitInfoRequest extends TokenRequest{
  2629. String? consultationRecordCode;
  2630. String? generalCase;
  2631. DateTime? occurredTime;
  2632. AddFollowUpVisitInfoRequest({
  2633. this.consultationRecordCode,
  2634. this.generalCase,
  2635. this.occurredTime,
  2636. String? token,
  2637. }) : super(
  2638. token: token,
  2639. );
  2640. factory AddFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2641. return AddFollowUpVisitInfoRequest(
  2642. consultationRecordCode: map['ConsultationRecordCode'],
  2643. generalCase: map['GeneralCase'],
  2644. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  2645. token: map['Token'],
  2646. );
  2647. }
  2648. Map<String, dynamic> toJson() {
  2649. final map = super.toJson();
  2650. if(consultationRecordCode != null)
  2651. map['ConsultationRecordCode'] = consultationRecordCode;
  2652. if(generalCase != null)
  2653. map['GeneralCase'] = generalCase;
  2654. if(occurredTime != null)
  2655. map['OccurredTime'] = JsonRpcUtils.dateFormat(occurredTime!);
  2656. return map;
  2657. }
  2658. }
  2659. class DeleteFollowUpVisitInfoRequest extends TokenRequest{
  2660. String? followUpVisitCode;
  2661. DeleteFollowUpVisitInfoRequest({
  2662. this.followUpVisitCode,
  2663. String? token,
  2664. }) : super(
  2665. token: token,
  2666. );
  2667. factory DeleteFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2668. return DeleteFollowUpVisitInfoRequest(
  2669. followUpVisitCode: map['FollowUpVisitCode'],
  2670. token: map['Token'],
  2671. );
  2672. }
  2673. Map<String, dynamic> toJson() {
  2674. final map = super.toJson();
  2675. if(followUpVisitCode != null)
  2676. map['FollowUpVisitCode'] = followUpVisitCode;
  2677. return map;
  2678. }
  2679. }
  2680. class UpdateFollowUpVisitInfoRequest extends TokenRequest{
  2681. String? followUpVisitCode;
  2682. String? generalCase;
  2683. UpdateFollowUpVisitInfoRequest({
  2684. this.followUpVisitCode,
  2685. this.generalCase,
  2686. String? token,
  2687. }) : super(
  2688. token: token,
  2689. );
  2690. factory UpdateFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2691. return UpdateFollowUpVisitInfoRequest(
  2692. followUpVisitCode: map['FollowUpVisitCode'],
  2693. generalCase: map['GeneralCase'],
  2694. token: map['Token'],
  2695. );
  2696. }
  2697. Map<String, dynamic> toJson() {
  2698. final map = super.toJson();
  2699. if(followUpVisitCode != null)
  2700. map['FollowUpVisitCode'] = followUpVisitCode;
  2701. if(generalCase != null)
  2702. map['GeneralCase'] = generalCase;
  2703. return map;
  2704. }
  2705. }
  2706. class FollowUpVisitDTO {
  2707. String? followUpVisitCode;
  2708. String? consultationRecordCode;
  2709. String? patientName;
  2710. String? patientPhone;
  2711. String? generalCase;
  2712. String? clinicalSituation;
  2713. String? doctorCode;
  2714. String? doctorName;
  2715. DateTime? occurredTime;
  2716. FollowUpVisitDTO({
  2717. this.followUpVisitCode,
  2718. this.consultationRecordCode,
  2719. this.patientName,
  2720. this.patientPhone,
  2721. this.generalCase,
  2722. this.clinicalSituation,
  2723. this.doctorCode,
  2724. this.doctorName,
  2725. this.occurredTime,
  2726. });
  2727. factory FollowUpVisitDTO.fromJson(Map<String, dynamic> map) {
  2728. return FollowUpVisitDTO(
  2729. followUpVisitCode: map['FollowUpVisitCode'],
  2730. consultationRecordCode: map['ConsultationRecordCode'],
  2731. patientName: map['PatientName'],
  2732. patientPhone: map['PatientPhone'],
  2733. generalCase: map['GeneralCase'],
  2734. clinicalSituation: map['ClinicalSituation'],
  2735. doctorCode: map['DoctorCode'],
  2736. doctorName: map['DoctorName'],
  2737. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  2738. );
  2739. }
  2740. Map<String, dynamic> toJson() {
  2741. final map = Map<String, dynamic>();
  2742. if(followUpVisitCode != null)
  2743. map['FollowUpVisitCode'] = followUpVisitCode;
  2744. if(consultationRecordCode != null)
  2745. map['ConsultationRecordCode'] = consultationRecordCode;
  2746. if(patientName != null)
  2747. map['PatientName'] = patientName;
  2748. if(patientPhone != null)
  2749. map['PatientPhone'] = patientPhone;
  2750. if(generalCase != null)
  2751. map['GeneralCase'] = generalCase;
  2752. if(clinicalSituation != null)
  2753. map['ClinicalSituation'] = clinicalSituation;
  2754. if(doctorCode != null)
  2755. map['DoctorCode'] = doctorCode;
  2756. if(doctorName != null)
  2757. map['DoctorName'] = doctorName;
  2758. if(occurredTime != null)
  2759. map['OccurredTime'] = JsonRpcUtils.dateFormat(occurredTime!);
  2760. return map;
  2761. }
  2762. }
  2763. class GetFollowUpVisitInfoRequest extends TokenRequest{
  2764. String? consultationRecordCode;
  2765. GetFollowUpVisitInfoRequest({
  2766. this.consultationRecordCode,
  2767. String? token,
  2768. }) : super(
  2769. token: token,
  2770. );
  2771. factory GetFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2772. return GetFollowUpVisitInfoRequest(
  2773. consultationRecordCode: map['ConsultationRecordCode'],
  2774. token: map['Token'],
  2775. );
  2776. }
  2777. Map<String, dynamic> toJson() {
  2778. final map = super.toJson();
  2779. if(consultationRecordCode != null)
  2780. map['ConsultationRecordCode'] = consultationRecordCode;
  2781. return map;
  2782. }
  2783. }
  2784. class GetFollowUpVisitInfoDetailRequest extends TokenRequest{
  2785. String? followUpVisitCode;
  2786. GetFollowUpVisitInfoDetailRequest({
  2787. this.followUpVisitCode,
  2788. String? token,
  2789. }) : super(
  2790. token: token,
  2791. );
  2792. factory GetFollowUpVisitInfoDetailRequest.fromJson(Map<String, dynamic> map) {
  2793. return GetFollowUpVisitInfoDetailRequest(
  2794. followUpVisitCode: map['FollowUpVisitCode'],
  2795. token: map['Token'],
  2796. );
  2797. }
  2798. Map<String, dynamic> toJson() {
  2799. final map = super.toJson();
  2800. if(followUpVisitCode != null)
  2801. map['FollowUpVisitCode'] = followUpVisitCode;
  2802. return map;
  2803. }
  2804. }
  2805. class SetNeedFollowUpVisitRequest extends TokenRequest{
  2806. String? consultationRecordCode;
  2807. bool isNeed;
  2808. SetNeedFollowUpVisitRequest({
  2809. this.consultationRecordCode,
  2810. this.isNeed = false,
  2811. String? token,
  2812. }) : super(
  2813. token: token,
  2814. );
  2815. factory SetNeedFollowUpVisitRequest.fromJson(Map<String, dynamic> map) {
  2816. return SetNeedFollowUpVisitRequest(
  2817. consultationRecordCode: map['ConsultationRecordCode'],
  2818. isNeed: map['IsNeed'],
  2819. token: map['Token'],
  2820. );
  2821. }
  2822. Map<String, dynamic> toJson() {
  2823. final map = super.toJson();
  2824. if(consultationRecordCode != null)
  2825. map['ConsultationRecordCode'] = consultationRecordCode;
  2826. map['IsNeed'] = isNeed;
  2827. return map;
  2828. }
  2829. }
  2830. class AddConsultationEvaluateRequest extends TokenRequest{
  2831. String? consultationRecordCode;
  2832. double evaluateScore;
  2833. String? feedback;
  2834. AddConsultationEvaluateRequest({
  2835. this.consultationRecordCode,
  2836. this.evaluateScore = 0,
  2837. this.feedback,
  2838. String? token,
  2839. }) : super(
  2840. token: token,
  2841. );
  2842. factory AddConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2843. return AddConsultationEvaluateRequest(
  2844. consultationRecordCode: map['ConsultationRecordCode'],
  2845. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2846. feedback: map['Feedback'],
  2847. token: map['Token'],
  2848. );
  2849. }
  2850. Map<String, dynamic> toJson() {
  2851. final map = super.toJson();
  2852. if(consultationRecordCode != null)
  2853. map['ConsultationRecordCode'] = consultationRecordCode;
  2854. map['EvaluateScore'] = evaluateScore;
  2855. if(feedback != null)
  2856. map['Feedback'] = feedback;
  2857. return map;
  2858. }
  2859. }
  2860. class DeleteConsultationEvaluateRequest extends TokenRequest{
  2861. String? consultationEvaluateCode;
  2862. DeleteConsultationEvaluateRequest({
  2863. this.consultationEvaluateCode,
  2864. String? token,
  2865. }) : super(
  2866. token: token,
  2867. );
  2868. factory DeleteConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2869. return DeleteConsultationEvaluateRequest(
  2870. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2871. token: map['Token'],
  2872. );
  2873. }
  2874. Map<String, dynamic> toJson() {
  2875. final map = super.toJson();
  2876. if(consultationEvaluateCode != null)
  2877. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2878. return map;
  2879. }
  2880. }
  2881. class UpdateConsultationEvaluateRequest extends TokenRequest{
  2882. String? consultationEvaluateCode;
  2883. double evaluateScore;
  2884. String? feedback;
  2885. UpdateConsultationEvaluateRequest({
  2886. this.consultationEvaluateCode,
  2887. this.evaluateScore = 0,
  2888. this.feedback,
  2889. String? token,
  2890. }) : super(
  2891. token: token,
  2892. );
  2893. factory UpdateConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2894. return UpdateConsultationEvaluateRequest(
  2895. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2896. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2897. feedback: map['Feedback'],
  2898. token: map['Token'],
  2899. );
  2900. }
  2901. Map<String, dynamic> toJson() {
  2902. final map = super.toJson();
  2903. if(consultationEvaluateCode != null)
  2904. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2905. map['EvaluateScore'] = evaluateScore;
  2906. if(feedback != null)
  2907. map['Feedback'] = feedback;
  2908. return map;
  2909. }
  2910. }
  2911. class ConsultationEvaluateDTO {
  2912. String? consultationEvaluateCode;
  2913. String? consultationRecordCode;
  2914. EvaluateGradeEnum evaluateGrade;
  2915. double evaluateScore;
  2916. String? feedback;
  2917. ConsultationEvaluateDTO({
  2918. this.consultationEvaluateCode,
  2919. this.consultationRecordCode,
  2920. this.evaluateGrade = EvaluateGradeEnum.UnSet,
  2921. this.evaluateScore = 0,
  2922. this.feedback,
  2923. });
  2924. factory ConsultationEvaluateDTO.fromJson(Map<String, dynamic> map) {
  2925. return ConsultationEvaluateDTO(
  2926. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2927. consultationRecordCode: map['ConsultationRecordCode'],
  2928. evaluateGrade: EvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  2929. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2930. feedback: map['Feedback'],
  2931. );
  2932. }
  2933. Map<String, dynamic> toJson() {
  2934. final map = Map<String, dynamic>();
  2935. if(consultationEvaluateCode != null)
  2936. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2937. if(consultationRecordCode != null)
  2938. map['ConsultationRecordCode'] = consultationRecordCode;
  2939. map['EvaluateGrade'] = evaluateGrade.index;
  2940. map['EvaluateScore'] = evaluateScore;
  2941. if(feedback != null)
  2942. map['Feedback'] = feedback;
  2943. return map;
  2944. }
  2945. }
  2946. class GetConsultationEvaluateRequest extends TokenRequest{
  2947. String? consultationRecordCode;
  2948. GetConsultationEvaluateRequest({
  2949. this.consultationRecordCode,
  2950. String? token,
  2951. }) : super(
  2952. token: token,
  2953. );
  2954. factory GetConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2955. return GetConsultationEvaluateRequest(
  2956. consultationRecordCode: map['ConsultationRecordCode'],
  2957. token: map['Token'],
  2958. );
  2959. }
  2960. Map<String, dynamic> toJson() {
  2961. final map = super.toJson();
  2962. if(consultationRecordCode != null)
  2963. map['ConsultationRecordCode'] = consultationRecordCode;
  2964. return map;
  2965. }
  2966. }
  2967. class AcceptInvitationRequest extends TokenRequest{
  2968. String? consultationRecordCode;
  2969. bool isAgree;
  2970. String? refusalCause;
  2971. AcceptInvitationRequest({
  2972. this.consultationRecordCode,
  2973. this.isAgree = false,
  2974. this.refusalCause,
  2975. String? token,
  2976. }) : super(
  2977. token: token,
  2978. );
  2979. factory AcceptInvitationRequest.fromJson(Map<String, dynamic> map) {
  2980. return AcceptInvitationRequest(
  2981. consultationRecordCode: map['ConsultationRecordCode'],
  2982. isAgree: map['IsAgree'],
  2983. refusalCause: map['RefusalCause'],
  2984. token: map['Token'],
  2985. );
  2986. }
  2987. Map<String, dynamic> toJson() {
  2988. final map = super.toJson();
  2989. if(consultationRecordCode != null)
  2990. map['ConsultationRecordCode'] = consultationRecordCode;
  2991. map['IsAgree'] = isAgree;
  2992. if(refusalCause != null)
  2993. map['RefusalCause'] = refusalCause;
  2994. return map;
  2995. }
  2996. }
  2997. class ApplyEmergencyTreatmentRequest extends TokenRequest{
  2998. String? deviceUniqueCode;
  2999. String? deviceCode;
  3000. String? expertCode;
  3001. ApplyEmergencyTreatmentRequest({
  3002. this.deviceUniqueCode,
  3003. this.deviceCode,
  3004. this.expertCode,
  3005. String? token,
  3006. }) : super(
  3007. token: token,
  3008. );
  3009. factory ApplyEmergencyTreatmentRequest.fromJson(Map<String, dynamic> map) {
  3010. return ApplyEmergencyTreatmentRequest(
  3011. deviceUniqueCode: map['DeviceUniqueCode'],
  3012. deviceCode: map['DeviceCode'],
  3013. expertCode: map['ExpertCode'],
  3014. token: map['Token'],
  3015. );
  3016. }
  3017. Map<String, dynamic> toJson() {
  3018. final map = super.toJson();
  3019. if(deviceUniqueCode != null)
  3020. map['DeviceUniqueCode'] = deviceUniqueCode;
  3021. if(deviceCode != null)
  3022. map['DeviceCode'] = deviceCode;
  3023. if(expertCode != null)
  3024. map['ExpertCode'] = expertCode;
  3025. return map;
  3026. }
  3027. }
  3028. class BaseControlDeviceRequest extends TokenRequest{
  3029. ControlDeviceParameterEnum controlType;
  3030. bool isNeedSyn;
  3031. BaseControlDeviceRequest({
  3032. this.controlType = ControlDeviceParameterEnum.Start,
  3033. this.isNeedSyn = false,
  3034. String? token,
  3035. }) : super(
  3036. token: token,
  3037. );
  3038. factory BaseControlDeviceRequest.fromJson(Map<String, dynamic> map) {
  3039. return BaseControlDeviceRequest(
  3040. controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
  3041. isNeedSyn: map['IsNeedSyn'],
  3042. token: map['Token'],
  3043. );
  3044. }
  3045. Map<String, dynamic> toJson() {
  3046. final map = super.toJson();
  3047. map['ControlType'] = controlType.index;
  3048. map['IsNeedSyn'] = isNeedSyn;
  3049. return map;
  3050. }
  3051. }
  3052. class BaseControlDeviceParameterRequest extends BaseControlDeviceRequest{
  3053. List<AdditionParameterDTO >? parameters;
  3054. BaseControlDeviceParameterRequest({
  3055. this.parameters,
  3056. ControlDeviceParameterEnum controlType = ControlDeviceParameterEnum.Start,
  3057. bool isNeedSyn = false,
  3058. String? token,
  3059. }) : super(
  3060. controlType: controlType,
  3061. isNeedSyn: isNeedSyn,
  3062. token: token,
  3063. );
  3064. factory BaseControlDeviceParameterRequest.fromJson(Map<String, dynamic> map) {
  3065. return BaseControlDeviceParameterRequest(
  3066. parameters: map['Parameters'] != null ? (map['Parameters'] as List).map((e)=>AdditionParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3067. controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
  3068. isNeedSyn: map['IsNeedSyn'],
  3069. token: map['Token'],
  3070. );
  3071. }
  3072. Map<String, dynamic> toJson() {
  3073. final map = super.toJson();
  3074. if(parameters != null)
  3075. map['Parameters'] = parameters;
  3076. return map;
  3077. }
  3078. }
  3079. class ControlDeviceParameterInConsultationRequest extends BaseControlDeviceParameterRequest{
  3080. String? consultationCode;
  3081. ControlDeviceParameterInConsultationRequest({
  3082. this.consultationCode,
  3083. List<AdditionParameterDTO >? parameters,
  3084. ControlDeviceParameterEnum controlType = ControlDeviceParameterEnum.Start,
  3085. bool isNeedSyn = false,
  3086. String? token,
  3087. }) : super(
  3088. parameters: parameters,
  3089. controlType: controlType,
  3090. isNeedSyn: isNeedSyn,
  3091. token: token,
  3092. );
  3093. factory ControlDeviceParameterInConsultationRequest.fromJson(Map<String, dynamic> map) {
  3094. return ControlDeviceParameterInConsultationRequest(
  3095. consultationCode: map['ConsultationCode'],
  3096. parameters: map['Parameters'] != null ? (map['Parameters'] as List).map((e)=>AdditionParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3097. controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
  3098. isNeedSyn: map['IsNeedSyn'],
  3099. token: map['Token'],
  3100. );
  3101. }
  3102. Map<String, dynamic> toJson() {
  3103. final map = super.toJson();
  3104. if(consultationCode != null)
  3105. map['ConsultationCode'] = consultationCode;
  3106. return map;
  3107. }
  3108. }
  3109. class GetUserStatusRequest extends TokenRequest{
  3110. String? userCode;
  3111. GetUserStatusRequest({
  3112. this.userCode,
  3113. String? token,
  3114. }) : super(
  3115. token: token,
  3116. );
  3117. factory GetUserStatusRequest.fromJson(Map<String, dynamic> map) {
  3118. return GetUserStatusRequest(
  3119. userCode: map['UserCode'],
  3120. token: map['Token'],
  3121. );
  3122. }
  3123. Map<String, dynamic> toJson() {
  3124. final map = super.toJson();
  3125. if(userCode != null)
  3126. map['UserCode'] = userCode;
  3127. return map;
  3128. }
  3129. }
  3130. enum RecommendedDownloadModeEnum {
  3131. placeHolder_0,
  3132. Origin,
  3133. CDN,
  3134. }
  3135. class TerminalImageDTO {
  3136. String? previewUrl;
  3137. String? imageUrl;
  3138. String? coverImageUrl;
  3139. RecommendedDownloadModeEnum recommendedDownloadMode;
  3140. String? originImageUrl;
  3141. int imageSize;
  3142. TerminalImageDTO({
  3143. this.previewUrl,
  3144. this.imageUrl,
  3145. this.coverImageUrl,
  3146. this.recommendedDownloadMode = RecommendedDownloadModeEnum.Origin,
  3147. this.originImageUrl,
  3148. this.imageSize = 0,
  3149. });
  3150. factory TerminalImageDTO.fromJson(Map<String, dynamic> map) {
  3151. return TerminalImageDTO(
  3152. previewUrl: map['PreviewUrl'],
  3153. imageUrl: map['ImageUrl'],
  3154. coverImageUrl: map['CoverImageUrl'],
  3155. recommendedDownloadMode: RecommendedDownloadModeEnum.values.firstWhere((e) => e.index == map['RecommendedDownloadMode']),
  3156. originImageUrl: map['OriginImageUrl'],
  3157. imageSize: map['ImageSize'],
  3158. );
  3159. }
  3160. Map<String, dynamic> toJson() {
  3161. final map = Map<String, dynamic>();
  3162. if(previewUrl != null)
  3163. map['PreviewUrl'] = previewUrl;
  3164. if(imageUrl != null)
  3165. map['ImageUrl'] = imageUrl;
  3166. if(coverImageUrl != null)
  3167. map['CoverImageUrl'] = coverImageUrl;
  3168. map['RecommendedDownloadMode'] = recommendedDownloadMode.index;
  3169. if(originImageUrl != null)
  3170. map['OriginImageUrl'] = originImageUrl;
  3171. map['ImageSize'] = imageSize;
  3172. return map;
  3173. }
  3174. }
  3175. class ImageLocationDTO {
  3176. String? group;
  3177. String? position;
  3178. String? quadrant;
  3179. ImageLocationDTO({
  3180. this.group,
  3181. this.position,
  3182. this.quadrant,
  3183. });
  3184. factory ImageLocationDTO.fromJson(Map<String, dynamic> map) {
  3185. return ImageLocationDTO(
  3186. group: map['Group'],
  3187. position: map['Position'],
  3188. quadrant: map['Quadrant'],
  3189. );
  3190. }
  3191. Map<String, dynamic> toJson() {
  3192. final map = Map<String, dynamic>();
  3193. if(group != null)
  3194. map['Group'] = group;
  3195. if(position != null)
  3196. map['Position'] = position;
  3197. if(quadrant != null)
  3198. map['Quadrant'] = quadrant;
  3199. return map;
  3200. }
  3201. }
  3202. enum DiagnosisConclusionEnum {
  3203. NotRequired,
  3204. InProcess,
  3205. Unrecognized,
  3206. NoObviousLesion,
  3207. Benign,
  3208. Malignant,
  3209. BenignAndMalignant,
  3210. Other,
  3211. }
  3212. enum DiagnosisOrganEnum {
  3213. Null,
  3214. placeHolder_1,
  3215. Breast,
  3216. Abdomen,
  3217. Liver,
  3218. Cholecyst,
  3219. Kidney,
  3220. Spleen,
  3221. CarotidArtery,
  3222. Thyroid,
  3223. Neck,
  3224. }
  3225. class ChildrenFetusNodeDTO {
  3226. String? typeName;
  3227. String? folderName;
  3228. String? folderDescription;
  3229. String? modeName;
  3230. String? applicationId;
  3231. String? application;
  3232. List<String >? children;
  3233. ChildrenFetusNodeDTO({
  3234. this.typeName,
  3235. this.folderName,
  3236. this.folderDescription,
  3237. this.modeName,
  3238. this.applicationId,
  3239. this.application,
  3240. this.children,
  3241. });
  3242. factory ChildrenFetusNodeDTO.fromJson(Map<String, dynamic> map) {
  3243. return ChildrenFetusNodeDTO(
  3244. typeName: map['TypeName'],
  3245. folderName: map['FolderName'],
  3246. folderDescription: map['FolderDescription'],
  3247. modeName: map['ModeName'],
  3248. applicationId: map['ApplicationId'],
  3249. application: map['Application'],
  3250. children: map['Children'] != null ? map['Children'].cast<String>().toList() : null,
  3251. );
  3252. }
  3253. Map<String, dynamic> toJson() {
  3254. final map = Map<String, dynamic>();
  3255. if(typeName != null)
  3256. map['TypeName'] = typeName;
  3257. if(folderName != null)
  3258. map['FolderName'] = folderName;
  3259. if(folderDescription != null)
  3260. map['FolderDescription'] = folderDescription;
  3261. if(modeName != null)
  3262. map['ModeName'] = modeName;
  3263. if(applicationId != null)
  3264. map['ApplicationId'] = applicationId;
  3265. if(application != null)
  3266. map['Application'] = application;
  3267. if(children != null)
  3268. map['Children'] = children;
  3269. return map;
  3270. }
  3271. }
  3272. class FetusNodeDTO {
  3273. String? typeName;
  3274. String? fetusIndex;
  3275. List<ChildrenFetusNodeDTO >? children;
  3276. FetusNodeDTO({
  3277. this.typeName,
  3278. this.fetusIndex,
  3279. this.children,
  3280. });
  3281. factory FetusNodeDTO.fromJson(Map<String, dynamic> map) {
  3282. return FetusNodeDTO(
  3283. typeName: map['TypeName'],
  3284. fetusIndex: map['FetusIndex'],
  3285. children: map['Children'] != null ? (map['Children'] as List).map((e)=>ChildrenFetusNodeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3286. );
  3287. }
  3288. Map<String, dynamic> toJson() {
  3289. final map = Map<String, dynamic>();
  3290. if(typeName != null)
  3291. map['TypeName'] = typeName;
  3292. if(fetusIndex != null)
  3293. map['FetusIndex'] = fetusIndex;
  3294. if(children != null)
  3295. map['Children'] = children;
  3296. return map;
  3297. }
  3298. }
  3299. class MeasuredResultsDTO {
  3300. String? version;
  3301. List<FetusNodeDTO >? fetusNodes;
  3302. MeasuredResultsDTO({
  3303. this.version,
  3304. this.fetusNodes,
  3305. });
  3306. factory MeasuredResultsDTO.fromJson(Map<String, dynamic> map) {
  3307. return MeasuredResultsDTO(
  3308. version: map['Version'],
  3309. fetusNodes: map['FetusNodes'] != null ? (map['FetusNodes'] as List).map((e)=>FetusNodeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3310. );
  3311. }
  3312. Map<String, dynamic> toJson() {
  3313. final map = Map<String, dynamic>();
  3314. if(version != null)
  3315. map['Version'] = version;
  3316. if(fetusNodes != null)
  3317. map['FetusNodes'] = fetusNodes;
  3318. return map;
  3319. }
  3320. }
  3321. class PointDTO {
  3322. double x;
  3323. double y;
  3324. PointDTO({
  3325. this.x = 0,
  3326. this.y = 0,
  3327. });
  3328. factory PointDTO.fromJson(Map<String, dynamic> map) {
  3329. return PointDTO(
  3330. x: double.parse(map['x'].toString()),
  3331. y: double.parse(map['y'].toString()),
  3332. );
  3333. }
  3334. Map<String, dynamic> toJson() {
  3335. final map = Map<String, dynamic>();
  3336. map['x'] = x;
  3337. map['y'] = y;
  3338. return map;
  3339. }
  3340. }
  3341. class AdornerDTO {
  3342. String? adornerTypeName;
  3343. PointDTO? topLeft;
  3344. String? content;
  3345. AdornerDTO({
  3346. this.adornerTypeName,
  3347. this.topLeft,
  3348. this.content,
  3349. });
  3350. factory AdornerDTO.fromJson(Map<String, dynamic> map) {
  3351. return AdornerDTO(
  3352. adornerTypeName: map['AdornerTypeName'],
  3353. topLeft: map['TopLeft'] != null ? PointDTO.fromJson(map['TopLeft']) : null,
  3354. content: map['Content'],
  3355. );
  3356. }
  3357. Map<String, dynamic> toJson() {
  3358. final map = Map<String, dynamic>();
  3359. if(adornerTypeName != null)
  3360. map['AdornerTypeName'] = adornerTypeName;
  3361. if(topLeft != null)
  3362. map['TopLeft'] = topLeft;
  3363. if(content != null)
  3364. map['Content'] = content;
  3365. return map;
  3366. }
  3367. }
  3368. class BaseAreaDTO {
  3369. String? visualAreaTypeName;
  3370. List<AdornerDTO >? adorner;
  3371. BaseAreaDTO({
  3372. this.visualAreaTypeName,
  3373. this.adorner,
  3374. });
  3375. factory BaseAreaDTO.fromJson(Map<String, dynamic> map) {
  3376. return BaseAreaDTO(
  3377. visualAreaTypeName: map['VisualAreaTypeName'],
  3378. adorner: map['Adorner'] != null ? (map['Adorner'] as List).map((e)=>AdornerDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3379. );
  3380. }
  3381. Map<String, dynamic> toJson() {
  3382. final map = Map<String, dynamic>();
  3383. if(visualAreaTypeName != null)
  3384. map['VisualAreaTypeName'] = visualAreaTypeName;
  3385. if(adorner != null)
  3386. map['Adorner'] = adorner;
  3387. return map;
  3388. }
  3389. }
  3390. class VisualAreaDTO {
  3391. List<BaseAreaDTO >? children;
  3392. VisualAreaDTO({
  3393. this.children,
  3394. });
  3395. factory VisualAreaDTO.fromJson(Map<String, dynamic> map) {
  3396. return VisualAreaDTO(
  3397. children: map['Children'] != null ? (map['Children'] as List).map((e)=>BaseAreaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3398. );
  3399. }
  3400. Map<String, dynamic> toJson() {
  3401. final map = Map<String, dynamic>();
  3402. if(children != null)
  3403. map['Children'] = children;
  3404. return map;
  3405. }
  3406. }
  3407. class VisualKeyDTO {
  3408. String? visualKeyTypeName;
  3409. VisualAreaDTO? visualArea;
  3410. VisualKeyDTO({
  3411. this.visualKeyTypeName,
  3412. this.visualArea,
  3413. });
  3414. factory VisualKeyDTO.fromJson(Map<String, dynamic> map) {
  3415. return VisualKeyDTO(
  3416. visualKeyTypeName: map['VisualKeyTypeName'],
  3417. visualArea: map['VisualArea'] != null ? VisualAreaDTO.fromJson(map['VisualArea']) : null,
  3418. );
  3419. }
  3420. Map<String, dynamic> toJson() {
  3421. final map = Map<String, dynamic>();
  3422. if(visualKeyTypeName != null)
  3423. map['VisualKeyTypeName'] = visualKeyTypeName;
  3424. if(visualArea != null)
  3425. map['VisualArea'] = visualArea;
  3426. return map;
  3427. }
  3428. }
  3429. class VisualDTO {
  3430. List<VisualKeyDTO >? children;
  3431. VisualDTO({
  3432. this.children,
  3433. });
  3434. factory VisualDTO.fromJson(Map<String, dynamic> map) {
  3435. return VisualDTO(
  3436. children: map['Children'] != null ? (map['Children'] as List).map((e)=>VisualKeyDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3437. );
  3438. }
  3439. Map<String, dynamic> toJson() {
  3440. final map = Map<String, dynamic>();
  3441. if(children != null)
  3442. map['Children'] = children;
  3443. return map;
  3444. }
  3445. }
  3446. class ScanImageDTO {
  3447. VisualDTO? visual;
  3448. ScanImageDTO({
  3449. this.visual,
  3450. });
  3451. factory ScanImageDTO.fromJson(Map<String, dynamic> map) {
  3452. return ScanImageDTO(
  3453. visual: map['Visual'] != null ? VisualDTO.fromJson(map['Visual']) : null,
  3454. );
  3455. }
  3456. Map<String, dynamic> toJson() {
  3457. final map = Map<String, dynamic>();
  3458. if(visual != null)
  3459. map['Visual'] = visual;
  3460. return map;
  3461. }
  3462. }
  3463. enum CarotidScanTypeEnum {
  3464. CarotidLeft,
  3465. CarotidRight,
  3466. }
  3467. enum CarotidScanDirectionEnum {
  3468. TopToBottom,
  3469. BottomToTop,
  3470. }
  3471. enum CarotidAIImageTypeEnum {
  3472. Base,
  3473. YShape,
  3474. Plaque,
  3475. }
  3476. class MeasureImageFileDTO {
  3477. CarotidAIImageTypeEnum imageType;
  3478. String? imageFile;
  3479. MeasureImageFileDTO({
  3480. this.imageType = CarotidAIImageTypeEnum.Base,
  3481. this.imageFile,
  3482. });
  3483. factory MeasureImageFileDTO.fromJson(Map<String, dynamic> map) {
  3484. return MeasureImageFileDTO(
  3485. imageType: CarotidAIImageTypeEnum.values.firstWhere((e) => e.index == map['ImageType']),
  3486. imageFile: map['ImageFile'],
  3487. );
  3488. }
  3489. Map<String, dynamic> toJson() {
  3490. final map = Map<String, dynamic>();
  3491. map['ImageType'] = imageType.index;
  3492. if(imageFile != null)
  3493. map['ImageFile'] = imageFile;
  3494. return map;
  3495. }
  3496. }
  3497. class CarotidResultDTO {
  3498. CarotidScanTypeEnum carotidScanType;
  3499. CarotidScanDirectionEnum carotidScanDirection;
  3500. String? surfaceFile;
  3501. String? cDNSurfaceFile;
  3502. int surfaceFileSize;
  3503. String? mdlFile;
  3504. String? cDNMdlFile;
  3505. int mdlFileSize;
  3506. List<MeasureImageFileDTO >? measureImageFiles;
  3507. String? measureResult;
  3508. List<String >? surfaceImageList;
  3509. RecommendedDownloadModeEnum recommendedDownloadMode;
  3510. CarotidResultDTO({
  3511. this.carotidScanType = CarotidScanTypeEnum.CarotidLeft,
  3512. this.carotidScanDirection = CarotidScanDirectionEnum.TopToBottom,
  3513. this.surfaceFile,
  3514. this.cDNSurfaceFile,
  3515. this.surfaceFileSize = 0,
  3516. this.mdlFile,
  3517. this.cDNMdlFile,
  3518. this.mdlFileSize = 0,
  3519. this.measureImageFiles,
  3520. this.measureResult,
  3521. this.surfaceImageList,
  3522. this.recommendedDownloadMode = RecommendedDownloadModeEnum.Origin,
  3523. });
  3524. factory CarotidResultDTO.fromJson(Map<String, dynamic> map) {
  3525. return CarotidResultDTO(
  3526. carotidScanType: CarotidScanTypeEnum.values.firstWhere((e) => e.index == map['CarotidScanType']),
  3527. carotidScanDirection: CarotidScanDirectionEnum.values.firstWhere((e) => e.index == map['CarotidScanDirection']),
  3528. surfaceFile: map['SurfaceFile'],
  3529. cDNSurfaceFile: map['CDNSurfaceFile'],
  3530. surfaceFileSize: map['SurfaceFileSize'],
  3531. mdlFile: map['MdlFile'],
  3532. cDNMdlFile: map['CDNMdlFile'],
  3533. mdlFileSize: map['MdlFileSize'],
  3534. measureImageFiles: map['MeasureImageFiles'] != null ? (map['MeasureImageFiles'] as List).map((e)=>MeasureImageFileDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3535. measureResult: map['MeasureResult'],
  3536. surfaceImageList: map['SurfaceImageList'] != null ? map['SurfaceImageList'].cast<String>().toList() : null,
  3537. recommendedDownloadMode: RecommendedDownloadModeEnum.values.firstWhere((e) => e.index == map['RecommendedDownloadMode']),
  3538. );
  3539. }
  3540. Map<String, dynamic> toJson() {
  3541. final map = Map<String, dynamic>();
  3542. map['CarotidScanType'] = carotidScanType.index;
  3543. map['CarotidScanDirection'] = carotidScanDirection.index;
  3544. if(surfaceFile != null)
  3545. map['SurfaceFile'] = surfaceFile;
  3546. if(cDNSurfaceFile != null)
  3547. map['CDNSurfaceFile'] = cDNSurfaceFile;
  3548. map['SurfaceFileSize'] = surfaceFileSize;
  3549. if(mdlFile != null)
  3550. map['MdlFile'] = mdlFile;
  3551. if(cDNMdlFile != null)
  3552. map['CDNMdlFile'] = cDNMdlFile;
  3553. map['MdlFileSize'] = mdlFileSize;
  3554. if(measureImageFiles != null)
  3555. map['MeasureImageFiles'] = measureImageFiles;
  3556. if(measureResult != null)
  3557. map['MeasureResult'] = measureResult;
  3558. if(surfaceImageList != null)
  3559. map['SurfaceImageList'] = surfaceImageList;
  3560. map['RecommendedDownloadMode'] = recommendedDownloadMode.index;
  3561. return map;
  3562. }
  3563. }
  3564. enum BusinessTypeEnum {
  3565. RemoteDiagnosis,
  3566. LiveConsultation,
  3567. Lab,
  3568. }
  3569. class RemedicalInfoDTO extends BaseDTO{
  3570. String? remedicalCode;
  3571. String? deviceCode;
  3572. String? recordCode;
  3573. String? patientScanType;
  3574. String? applicationCategory;
  3575. String? application;
  3576. TerminalImageDTO? terminalImages;
  3577. RemedicalFileDataTypeEnum fileDataType;
  3578. ImageLocationDTO? imageLocation;
  3579. DiagnosisConclusionEnum diagnosisConclusion;
  3580. String? diagnosisResult;
  3581. List<DiagnosisOrganEnum >? diagnosisOrgans;
  3582. MeasuredResultsDTO? measuredResult;
  3583. ScanImageDTO? commentResult;
  3584. CarotidResultDTO? carotidResult;
  3585. BusinessTypeEnum businessType;
  3586. RemedicalInfoDTO({
  3587. this.remedicalCode,
  3588. this.deviceCode,
  3589. this.recordCode,
  3590. this.patientScanType,
  3591. this.applicationCategory,
  3592. this.application,
  3593. this.terminalImages,
  3594. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  3595. this.imageLocation,
  3596. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  3597. this.diagnosisResult,
  3598. this.diagnosisOrgans,
  3599. this.measuredResult,
  3600. this.commentResult,
  3601. this.carotidResult,
  3602. this.businessType = BusinessTypeEnum.RemoteDiagnosis,
  3603. DateTime? createTime,
  3604. DateTime? updateTime,
  3605. }) : super(
  3606. createTime: createTime,
  3607. updateTime: updateTime,
  3608. );
  3609. factory RemedicalInfoDTO.fromJson(Map<String, dynamic> map) {
  3610. return RemedicalInfoDTO(
  3611. remedicalCode: map['RemedicalCode'],
  3612. deviceCode: map['DeviceCode'],
  3613. recordCode: map['RecordCode'],
  3614. patientScanType: map['PatientScanType'],
  3615. applicationCategory: map['ApplicationCategory'],
  3616. application: map['Application'],
  3617. terminalImages: map['TerminalImages'] != null ? TerminalImageDTO.fromJson(map['TerminalImages']) : null,
  3618. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  3619. imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
  3620. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  3621. diagnosisResult: map['DiagnosisResult'],
  3622. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  3623. measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
  3624. commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
  3625. carotidResult: map['CarotidResult'] != null ? CarotidResultDTO.fromJson(map['CarotidResult']) : null,
  3626. businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
  3627. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3628. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3629. );
  3630. }
  3631. Map<String, dynamic> toJson() {
  3632. final map = super.toJson();
  3633. if(remedicalCode != null)
  3634. map['RemedicalCode'] = remedicalCode;
  3635. if(deviceCode != null)
  3636. map['DeviceCode'] = deviceCode;
  3637. if(recordCode != null)
  3638. map['RecordCode'] = recordCode;
  3639. if(patientScanType != null)
  3640. map['PatientScanType'] = patientScanType;
  3641. if(applicationCategory != null)
  3642. map['ApplicationCategory'] = applicationCategory;
  3643. if(application != null)
  3644. map['Application'] = application;
  3645. if(terminalImages != null)
  3646. map['TerminalImages'] = terminalImages;
  3647. map['FileDataType'] = fileDataType.index;
  3648. if(imageLocation != null)
  3649. map['ImageLocation'] = imageLocation;
  3650. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  3651. if(diagnosisResult != null)
  3652. map['DiagnosisResult'] = diagnosisResult;
  3653. if(diagnosisOrgans != null)
  3654. map['DiagnosisOrgans'] = diagnosisOrgans;
  3655. if(measuredResult != null)
  3656. map['MeasuredResult'] = measuredResult;
  3657. if(commentResult != null)
  3658. map['CommentResult'] = commentResult;
  3659. if(carotidResult != null)
  3660. map['CarotidResult'] = carotidResult;
  3661. map['BusinessType'] = businessType.index;
  3662. return map;
  3663. }
  3664. }
  3665. class RemedicalMeasuredInfoDTO extends BaseDTO{
  3666. String? remedicalMeasuredInfoCode;
  3667. String? userCode;
  3668. String? recordCode;
  3669. String? remedicalCode;
  3670. int frameIndex;
  3671. String? measuredFileToken;
  3672. String? previewFileToken;
  3673. String? measuredData;
  3674. RemedicalMeasuredInfoDTO({
  3675. this.remedicalMeasuredInfoCode,
  3676. this.userCode,
  3677. this.recordCode,
  3678. this.remedicalCode,
  3679. this.frameIndex = 0,
  3680. this.measuredFileToken,
  3681. this.previewFileToken,
  3682. this.measuredData,
  3683. DateTime? createTime,
  3684. DateTime? updateTime,
  3685. }) : super(
  3686. createTime: createTime,
  3687. updateTime: updateTime,
  3688. );
  3689. factory RemedicalMeasuredInfoDTO.fromJson(Map<String, dynamic> map) {
  3690. return RemedicalMeasuredInfoDTO(
  3691. remedicalMeasuredInfoCode: map['RemedicalMeasuredInfoCode'],
  3692. userCode: map['UserCode'],
  3693. recordCode: map['RecordCode'],
  3694. remedicalCode: map['RemedicalCode'],
  3695. frameIndex: map['FrameIndex'],
  3696. measuredFileToken: map['MeasuredFileToken'],
  3697. previewFileToken: map['PreviewFileToken'],
  3698. measuredData: map['MeasuredData'],
  3699. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3700. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3701. );
  3702. }
  3703. Map<String, dynamic> toJson() {
  3704. final map = super.toJson();
  3705. if(remedicalMeasuredInfoCode != null)
  3706. map['RemedicalMeasuredInfoCode'] = remedicalMeasuredInfoCode;
  3707. if(userCode != null)
  3708. map['UserCode'] = userCode;
  3709. if(recordCode != null)
  3710. map['RecordCode'] = recordCode;
  3711. if(remedicalCode != null)
  3712. map['RemedicalCode'] = remedicalCode;
  3713. map['FrameIndex'] = frameIndex;
  3714. if(measuredFileToken != null)
  3715. map['MeasuredFileToken'] = measuredFileToken;
  3716. if(previewFileToken != null)
  3717. map['PreviewFileToken'] = previewFileToken;
  3718. if(measuredData != null)
  3719. map['MeasuredData'] = measuredData;
  3720. return map;
  3721. }
  3722. }
  3723. class ConsultationImagesDTO {
  3724. DateTime? imageDate;
  3725. List<RemedicalInfoDTO >? ultrasoundImageList;
  3726. List<ConsultationFileDTO >? screenshotList;
  3727. List<RemedicalMeasuredInfoDTO >? measurementImageList;
  3728. ConsultationImagesDTO({
  3729. this.imageDate,
  3730. this.ultrasoundImageList,
  3731. this.screenshotList,
  3732. this.measurementImageList,
  3733. });
  3734. factory ConsultationImagesDTO.fromJson(Map<String, dynamic> map) {
  3735. return ConsultationImagesDTO(
  3736. imageDate: map['ImageDate'] != null ? DateTime.parse(map['ImageDate']) : null,
  3737. ultrasoundImageList: map['UltrasoundImageList'] != null ? (map['UltrasoundImageList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3738. screenshotList: map['ScreenshotList'] != null ? (map['ScreenshotList'] as List).map((e)=>ConsultationFileDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3739. measurementImageList: map['MeasurementImageList'] != null ? (map['MeasurementImageList'] as List).map((e)=>RemedicalMeasuredInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3740. );
  3741. }
  3742. Map<String, dynamic> toJson() {
  3743. final map = Map<String, dynamic>();
  3744. if(imageDate != null)
  3745. map['ImageDate'] = JsonRpcUtils.dateFormat(imageDate!);
  3746. if(ultrasoundImageList != null)
  3747. map['UltrasoundImageList'] = ultrasoundImageList;
  3748. if(screenshotList != null)
  3749. map['ScreenshotList'] = screenshotList;
  3750. if(measurementImageList != null)
  3751. map['MeasurementImageList'] = measurementImageList;
  3752. return map;
  3753. }
  3754. }
  3755. enum UserInfoStateEnum {
  3756. Nonactivated,
  3757. Activated,
  3758. }
  3759. enum ApplyStateEnum {
  3760. NotApply,
  3761. Applying,
  3762. Refused,
  3763. Passed,
  3764. }
  3765. class LoginLockInfoDTO {
  3766. DateTime? loginDate;
  3767. int times;
  3768. LoginLockInfoDTO({
  3769. this.loginDate,
  3770. this.times = 0,
  3771. });
  3772. factory LoginLockInfoDTO.fromJson(Map<String, dynamic> map) {
  3773. return LoginLockInfoDTO(
  3774. loginDate: map['LoginDate'] != null ? DateTime.parse(map['LoginDate']) : null,
  3775. times: map['Times'],
  3776. );
  3777. }
  3778. Map<String, dynamic> toJson() {
  3779. final map = Map<String, dynamic>();
  3780. if(loginDate != null)
  3781. map['LoginDate'] = JsonRpcUtils.dateFormat(loginDate!);
  3782. map['Times'] = times;
  3783. return map;
  3784. }
  3785. }
  3786. class AssociatedInfoDTO {
  3787. String? id;
  3788. String? relationName;
  3789. String? title;
  3790. String? cTitle;
  3791. String? eTitle;
  3792. String? icon;
  3793. String? description;
  3794. String? url;
  3795. int index;
  3796. AssociatedInfoDTO({
  3797. this.id,
  3798. this.relationName,
  3799. this.title,
  3800. this.cTitle,
  3801. this.eTitle,
  3802. this.icon,
  3803. this.description,
  3804. this.url,
  3805. this.index = 0,
  3806. });
  3807. factory AssociatedInfoDTO.fromJson(Map<String, dynamic> map) {
  3808. return AssociatedInfoDTO(
  3809. id: map['Id'],
  3810. relationName: map['RelationName'],
  3811. title: map['Title'],
  3812. cTitle: map['CTitle'],
  3813. eTitle: map['ETitle'],
  3814. icon: map['Icon'],
  3815. description: map['Description'],
  3816. url: map['Url'],
  3817. index: map['Index'],
  3818. );
  3819. }
  3820. Map<String, dynamic> toJson() {
  3821. final map = Map<String, dynamic>();
  3822. if(id != null)
  3823. map['Id'] = id;
  3824. if(relationName != null)
  3825. map['RelationName'] = relationName;
  3826. if(title != null)
  3827. map['Title'] = title;
  3828. if(cTitle != null)
  3829. map['CTitle'] = cTitle;
  3830. if(eTitle != null)
  3831. map['ETitle'] = eTitle;
  3832. if(icon != null)
  3833. map['Icon'] = icon;
  3834. if(description != null)
  3835. map['Description'] = description;
  3836. if(url != null)
  3837. map['Url'] = url;
  3838. map['Index'] = index;
  3839. return map;
  3840. }
  3841. }
  3842. class UserDTO extends UserBaseDTO{
  3843. String? nickName;
  3844. String? organizationCode;
  3845. String? organizationName;
  3846. String? rootOrganizationCode;
  3847. String? rootOrganizationName;
  3848. List<String >? authorityGroups;
  3849. List<String >? bindDevices;
  3850. String? lastIP;
  3851. int logintimes;
  3852. UserInfoStateEnum userState;
  3853. List<String >? roleCodes;
  3854. List<String >? rankCodes;
  3855. List<String >? positionCodes;
  3856. ApplyStateEnum applyState;
  3857. String? rankName;
  3858. String? positionName;
  3859. bool isDirector;
  3860. List<String >? fieldList;
  3861. List<String >? deletePatientCodes;
  3862. bool isBatchExportDiagnoseData;
  3863. String? bindAssistantUserCode;
  3864. String? bindAssistantDoctorUserCode;
  3865. LoginLockInfoDTO? loginLockInfo;
  3866. String? signature;
  3867. String? language;
  3868. bool enableReportLabel;
  3869. List<AssociatedInfoDTO >? associatedInfos;
  3870. String? commonPlatformUserId;
  3871. String? bindEmergencyDeviceCode;
  3872. String? bindEmergencyExpertCode;
  3873. List<String >? dashboardOrgCodes;
  3874. UserDTO({
  3875. this.nickName,
  3876. this.organizationCode,
  3877. this.organizationName,
  3878. this.rootOrganizationCode,
  3879. this.rootOrganizationName,
  3880. this.authorityGroups,
  3881. this.bindDevices,
  3882. this.lastIP,
  3883. this.logintimes = 0,
  3884. this.userState = UserInfoStateEnum.Nonactivated,
  3885. this.roleCodes,
  3886. this.rankCodes,
  3887. this.positionCodes,
  3888. this.applyState = ApplyStateEnum.NotApply,
  3889. this.rankName,
  3890. this.positionName,
  3891. this.isDirector = false,
  3892. this.fieldList,
  3893. this.deletePatientCodes,
  3894. this.isBatchExportDiagnoseData = false,
  3895. this.bindAssistantUserCode,
  3896. this.bindAssistantDoctorUserCode,
  3897. this.loginLockInfo,
  3898. this.signature,
  3899. this.language,
  3900. this.enableReportLabel = false,
  3901. this.associatedInfos,
  3902. this.commonPlatformUserId,
  3903. this.bindEmergencyDeviceCode,
  3904. this.bindEmergencyExpertCode,
  3905. this.dashboardOrgCodes,
  3906. String? phone,
  3907. String? email,
  3908. String? userCode,
  3909. String? userName,
  3910. String? fullName,
  3911. String? headImageUrl,
  3912. String? displayName,
  3913. DateTime? createTime,
  3914. DateTime? updateTime,
  3915. }) : super(
  3916. phone: phone,
  3917. email: email,
  3918. userCode: userCode,
  3919. userName: userName,
  3920. fullName: fullName,
  3921. headImageUrl: headImageUrl,
  3922. displayName: displayName,
  3923. createTime: createTime,
  3924. updateTime: updateTime,
  3925. );
  3926. factory UserDTO.fromJson(Map<String, dynamic> map) {
  3927. return UserDTO(
  3928. nickName: map['NickName'],
  3929. organizationCode: map['OrganizationCode'],
  3930. organizationName: map['OrganizationName'],
  3931. rootOrganizationCode: map['RootOrganizationCode'],
  3932. rootOrganizationName: map['RootOrganizationName'],
  3933. authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
  3934. bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
  3935. lastIP: map['LastIP'],
  3936. logintimes: map['Logintimes'],
  3937. userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
  3938. roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
  3939. rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
  3940. positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
  3941. applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
  3942. rankName: map['RankName'],
  3943. positionName: map['PositionName'],
  3944. isDirector: map['IsDirector'],
  3945. fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
  3946. deletePatientCodes: map['DeletePatientCodes'] != null ? map['DeletePatientCodes'].cast<String>().toList() : null,
  3947. isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
  3948. bindAssistantUserCode: map['BindAssistantUserCode'],
  3949. bindAssistantDoctorUserCode: map['BindAssistantDoctorUserCode'],
  3950. loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null,
  3951. signature: map['Signature'],
  3952. language: map['Language'],
  3953. enableReportLabel: map['EnableReportLabel'],
  3954. associatedInfos: map['AssociatedInfos'] != null ? (map['AssociatedInfos'] as List).map((e)=>AssociatedInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3955. commonPlatformUserId: map['CommonPlatformUserId'],
  3956. bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'],
  3957. bindEmergencyExpertCode: map['BindEmergencyExpertCode'],
  3958. dashboardOrgCodes: map['DashboardOrgCodes'] != null ? map['DashboardOrgCodes'].cast<String>().toList() : null,
  3959. phone: map['Phone'],
  3960. email: map['Email'],
  3961. userCode: map['UserCode'],
  3962. userName: map['UserName'],
  3963. fullName: map['FullName'],
  3964. headImageUrl: map['HeadImageUrl'],
  3965. displayName: map['DisplayName'],
  3966. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3967. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3968. );
  3969. }
  3970. Map<String, dynamic> toJson() {
  3971. final map = super.toJson();
  3972. if(nickName != null)
  3973. map['NickName'] = nickName;
  3974. if(organizationCode != null)
  3975. map['OrganizationCode'] = organizationCode;
  3976. if(organizationName != null)
  3977. map['OrganizationName'] = organizationName;
  3978. if(rootOrganizationCode != null)
  3979. map['RootOrganizationCode'] = rootOrganizationCode;
  3980. if(rootOrganizationName != null)
  3981. map['RootOrganizationName'] = rootOrganizationName;
  3982. if(authorityGroups != null)
  3983. map['AuthorityGroups'] = authorityGroups;
  3984. if(bindDevices != null)
  3985. map['BindDevices'] = bindDevices;
  3986. if(lastIP != null)
  3987. map['LastIP'] = lastIP;
  3988. map['Logintimes'] = logintimes;
  3989. map['UserState'] = userState.index;
  3990. if(roleCodes != null)
  3991. map['RoleCodes'] = roleCodes;
  3992. if(rankCodes != null)
  3993. map['RankCodes'] = rankCodes;
  3994. if(positionCodes != null)
  3995. map['PositionCodes'] = positionCodes;
  3996. map['ApplyState'] = applyState.index;
  3997. if(rankName != null)
  3998. map['RankName'] = rankName;
  3999. if(positionName != null)
  4000. map['PositionName'] = positionName;
  4001. map['IsDirector'] = isDirector;
  4002. if(fieldList != null)
  4003. map['FieldList'] = fieldList;
  4004. if(deletePatientCodes != null)
  4005. map['DeletePatientCodes'] = deletePatientCodes;
  4006. map['IsBatchExportDiagnoseData'] = isBatchExportDiagnoseData;
  4007. if(bindAssistantUserCode != null)
  4008. map['BindAssistantUserCode'] = bindAssistantUserCode;
  4009. if(bindAssistantDoctorUserCode != null)
  4010. map['BindAssistantDoctorUserCode'] = bindAssistantDoctorUserCode;
  4011. if(loginLockInfo != null)
  4012. map['LoginLockInfo'] = loginLockInfo;
  4013. if(signature != null)
  4014. map['Signature'] = signature;
  4015. if(language != null)
  4016. map['Language'] = language;
  4017. map['EnableReportLabel'] = enableReportLabel;
  4018. if(associatedInfos != null)
  4019. map['AssociatedInfos'] = associatedInfos;
  4020. if(commonPlatformUserId != null)
  4021. map['CommonPlatformUserId'] = commonPlatformUserId;
  4022. if(bindEmergencyDeviceCode != null)
  4023. map['BindEmergencyDeviceCode'] = bindEmergencyDeviceCode;
  4024. if(bindEmergencyExpertCode != null)
  4025. map['BindEmergencyExpertCode'] = bindEmergencyExpertCode;
  4026. if(dashboardOrgCodes != null)
  4027. map['DashboardOrgCodes'] = dashboardOrgCodes;
  4028. return map;
  4029. }
  4030. }
  4031. class UserExtendDTO extends UserDTO{
  4032. String? roleName;
  4033. UserStatusEnum userStatus;
  4034. UserExtendDTO({
  4035. this.roleName,
  4036. this.userStatus = UserStatusEnum.NotOnline,
  4037. String? nickName,
  4038. String? organizationCode,
  4039. String? organizationName,
  4040. String? rootOrganizationCode,
  4041. String? rootOrganizationName,
  4042. List<String >? authorityGroups,
  4043. List<String >? bindDevices,
  4044. String? lastIP,
  4045. int logintimes = 0,
  4046. UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
  4047. List<String >? roleCodes,
  4048. List<String >? rankCodes,
  4049. List<String >? positionCodes,
  4050. ApplyStateEnum applyState = ApplyStateEnum.NotApply,
  4051. String? rankName,
  4052. String? positionName,
  4053. bool isDirector = false,
  4054. List<String >? fieldList,
  4055. List<String >? deletePatientCodes,
  4056. bool isBatchExportDiagnoseData = false,
  4057. String? bindAssistantUserCode,
  4058. String? bindAssistantDoctorUserCode,
  4059. LoginLockInfoDTO? loginLockInfo,
  4060. String? signature,
  4061. String? language,
  4062. bool enableReportLabel = false,
  4063. List<AssociatedInfoDTO >? associatedInfos,
  4064. String? commonPlatformUserId,
  4065. String? bindEmergencyDeviceCode,
  4066. String? bindEmergencyExpertCode,
  4067. List<String >? dashboardOrgCodes,
  4068. String? phone,
  4069. String? email,
  4070. String? userCode,
  4071. String? userName,
  4072. String? fullName,
  4073. String? headImageUrl,
  4074. String? displayName,
  4075. DateTime? createTime,
  4076. DateTime? updateTime,
  4077. }) : super(
  4078. nickName: nickName,
  4079. organizationCode: organizationCode,
  4080. organizationName: organizationName,
  4081. rootOrganizationCode: rootOrganizationCode,
  4082. rootOrganizationName: rootOrganizationName,
  4083. authorityGroups: authorityGroups,
  4084. bindDevices: bindDevices,
  4085. lastIP: lastIP,
  4086. logintimes: logintimes,
  4087. userState: userState,
  4088. roleCodes: roleCodes,
  4089. rankCodes: rankCodes,
  4090. positionCodes: positionCodes,
  4091. applyState: applyState,
  4092. rankName: rankName,
  4093. positionName: positionName,
  4094. isDirector: isDirector,
  4095. fieldList: fieldList,
  4096. deletePatientCodes: deletePatientCodes,
  4097. isBatchExportDiagnoseData: isBatchExportDiagnoseData,
  4098. bindAssistantUserCode: bindAssistantUserCode,
  4099. bindAssistantDoctorUserCode: bindAssistantDoctorUserCode,
  4100. loginLockInfo: loginLockInfo,
  4101. signature: signature,
  4102. language: language,
  4103. enableReportLabel: enableReportLabel,
  4104. associatedInfos: associatedInfos,
  4105. commonPlatformUserId: commonPlatformUserId,
  4106. bindEmergencyDeviceCode: bindEmergencyDeviceCode,
  4107. bindEmergencyExpertCode: bindEmergencyExpertCode,
  4108. dashboardOrgCodes: dashboardOrgCodes,
  4109. phone: phone,
  4110. email: email,
  4111. userCode: userCode,
  4112. userName: userName,
  4113. fullName: fullName,
  4114. headImageUrl: headImageUrl,
  4115. displayName: displayName,
  4116. createTime: createTime,
  4117. updateTime: updateTime,
  4118. );
  4119. factory UserExtendDTO.fromJson(Map<String, dynamic> map) {
  4120. return UserExtendDTO(
  4121. roleName: map['RoleName'],
  4122. userStatus: UserStatusEnum.values.firstWhere((e) => e.index == map['UserStatus']),
  4123. nickName: map['NickName'],
  4124. organizationCode: map['OrganizationCode'],
  4125. organizationName: map['OrganizationName'],
  4126. rootOrganizationCode: map['RootOrganizationCode'],
  4127. rootOrganizationName: map['RootOrganizationName'],
  4128. authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
  4129. bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
  4130. lastIP: map['LastIP'],
  4131. logintimes: map['Logintimes'],
  4132. userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
  4133. roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
  4134. rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
  4135. positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
  4136. applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
  4137. rankName: map['RankName'],
  4138. positionName: map['PositionName'],
  4139. isDirector: map['IsDirector'],
  4140. fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
  4141. deletePatientCodes: map['DeletePatientCodes'] != null ? map['DeletePatientCodes'].cast<String>().toList() : null,
  4142. isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
  4143. bindAssistantUserCode: map['BindAssistantUserCode'],
  4144. bindAssistantDoctorUserCode: map['BindAssistantDoctorUserCode'],
  4145. loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null,
  4146. signature: map['Signature'],
  4147. language: map['Language'],
  4148. enableReportLabel: map['EnableReportLabel'],
  4149. associatedInfos: map['AssociatedInfos'] != null ? (map['AssociatedInfos'] as List).map((e)=>AssociatedInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4150. commonPlatformUserId: map['CommonPlatformUserId'],
  4151. bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'],
  4152. bindEmergencyExpertCode: map['BindEmergencyExpertCode'],
  4153. dashboardOrgCodes: map['DashboardOrgCodes'] != null ? map['DashboardOrgCodes'].cast<String>().toList() : null,
  4154. phone: map['Phone'],
  4155. email: map['Email'],
  4156. userCode: map['UserCode'],
  4157. userName: map['UserName'],
  4158. fullName: map['FullName'],
  4159. headImageUrl: map['HeadImageUrl'],
  4160. displayName: map['DisplayName'],
  4161. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  4162. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  4163. );
  4164. }
  4165. Map<String, dynamic> toJson() {
  4166. final map = super.toJson();
  4167. if(roleName != null)
  4168. map['RoleName'] = roleName;
  4169. map['UserStatus'] = userStatus.index;
  4170. return map;
  4171. }
  4172. }
  4173. class GetInviteableUserListRequest extends TokenRequest{
  4174. String? consultationCode;
  4175. String? language;
  4176. String? organizationCode;
  4177. GetInviteableUserListRequest({
  4178. this.consultationCode,
  4179. this.language,
  4180. this.organizationCode,
  4181. String? token,
  4182. }) : super(
  4183. token: token,
  4184. );
  4185. factory GetInviteableUserListRequest.fromJson(Map<String, dynamic> map) {
  4186. return GetInviteableUserListRequest(
  4187. consultationCode: map['ConsultationCode'],
  4188. language: map['Language'],
  4189. organizationCode: map['OrganizationCode'],
  4190. token: map['Token'],
  4191. );
  4192. }
  4193. Map<String, dynamic> toJson() {
  4194. final map = super.toJson();
  4195. if(consultationCode != null)
  4196. map['ConsultationCode'] = consultationCode;
  4197. if(language != null)
  4198. map['Language'] = language;
  4199. if(organizationCode != null)
  4200. map['OrganizationCode'] = organizationCode;
  4201. return map;
  4202. }
  4203. }
  4204. class ChangeConsultationResult {
  4205. String? consultationCode;
  4206. String? initiatorCode;
  4207. int roomNo;
  4208. List<LiveConsultationMember >? memberLiveDatas;
  4209. ChangeConsultationResult({
  4210. this.consultationCode,
  4211. this.initiatorCode,
  4212. this.roomNo = 0,
  4213. this.memberLiveDatas,
  4214. });
  4215. factory ChangeConsultationResult.fromJson(Map<String, dynamic> map) {
  4216. return ChangeConsultationResult(
  4217. consultationCode: map['ConsultationCode'],
  4218. initiatorCode: map['InitiatorCode'],
  4219. roomNo: map['RoomNo'],
  4220. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  4221. );
  4222. }
  4223. Map<String, dynamic> toJson() {
  4224. final map = Map<String, dynamic>();
  4225. if(consultationCode != null)
  4226. map['ConsultationCode'] = consultationCode;
  4227. if(initiatorCode != null)
  4228. map['InitiatorCode'] = initiatorCode;
  4229. map['RoomNo'] = roomNo;
  4230. if(memberLiveDatas != null)
  4231. map['MemberLiveDatas'] = memberLiveDatas;
  4232. return map;
  4233. }
  4234. }
  4235. class ChangeConsultationRequest extends TokenRequest{
  4236. String? originalCode;
  4237. String? currentCode;
  4238. ChangeConsultationRequest({
  4239. this.originalCode,
  4240. this.currentCode,
  4241. String? token,
  4242. }) : super(
  4243. token: token,
  4244. );
  4245. factory ChangeConsultationRequest.fromJson(Map<String, dynamic> map) {
  4246. return ChangeConsultationRequest(
  4247. originalCode: map['OriginalCode'],
  4248. currentCode: map['CurrentCode'],
  4249. token: map['Token'],
  4250. );
  4251. }
  4252. Map<String, dynamic> toJson() {
  4253. final map = super.toJson();
  4254. if(originalCode != null)
  4255. map['OriginalCode'] = originalCode;
  4256. if(currentCode != null)
  4257. map['CurrentCode'] = currentCode;
  4258. return map;
  4259. }
  4260. }
  4261. enum DownloadModeSettingEnum {
  4262. Auto,
  4263. Origin,
  4264. CDN,
  4265. }
  4266. class DeviceInfoDTO extends BaseDTO{
  4267. String? deviceCode;
  4268. String? serialNumber;
  4269. String? password;
  4270. String? name;
  4271. String? description;
  4272. String? deviceModel;
  4273. String? deviceType;
  4274. String? headPicUrl;
  4275. String? deviceSoftwareVersion;
  4276. String? sDKSoftwareVersion;
  4277. String? organizationCode;
  4278. String? departmentCode;
  4279. String? shortCode;
  4280. bool isAutoShared;
  4281. bool isEncryptedShow;
  4282. DateTime? lastLoginTime;
  4283. String? systemVersion;
  4284. String? cPUModel;
  4285. String? systemLanguage;
  4286. List<String >? diagnosisModules;
  4287. List<String >? reportPosterCodes;
  4288. bool mergedChannel;
  4289. int mergedVideoOutputWidth;
  4290. int mergedVideoOutputHeight;
  4291. List<VideoDeviceDTO >? videoDeviceInfos;
  4292. DownloadModeSettingEnum downloadModeSetting;
  4293. bool liveOpened;
  4294. String? displayName;
  4295. DeviceInfoDTO({
  4296. this.deviceCode,
  4297. this.serialNumber,
  4298. this.password,
  4299. this.name,
  4300. this.description,
  4301. this.deviceModel,
  4302. this.deviceType,
  4303. this.headPicUrl,
  4304. this.deviceSoftwareVersion,
  4305. this.sDKSoftwareVersion,
  4306. this.organizationCode,
  4307. this.departmentCode,
  4308. this.shortCode,
  4309. this.isAutoShared = false,
  4310. this.isEncryptedShow = false,
  4311. this.lastLoginTime,
  4312. this.systemVersion,
  4313. this.cPUModel,
  4314. this.systemLanguage,
  4315. this.diagnosisModules,
  4316. this.reportPosterCodes,
  4317. this.mergedChannel = false,
  4318. this.mergedVideoOutputWidth = 0,
  4319. this.mergedVideoOutputHeight = 0,
  4320. this.videoDeviceInfos,
  4321. this.downloadModeSetting = DownloadModeSettingEnum.Auto,
  4322. this.liveOpened = false,
  4323. this.displayName,
  4324. DateTime? createTime,
  4325. DateTime? updateTime,
  4326. }) : super(
  4327. createTime: createTime,
  4328. updateTime: updateTime,
  4329. );
  4330. factory DeviceInfoDTO.fromJson(Map<String, dynamic> map) {
  4331. return DeviceInfoDTO(
  4332. deviceCode: map['DeviceCode'],
  4333. serialNumber: map['SerialNumber'],
  4334. password: map['Password'],
  4335. name: map['Name'],
  4336. description: map['Description'],
  4337. deviceModel: map['DeviceModel'],
  4338. deviceType: map['DeviceType'],
  4339. headPicUrl: map['HeadPicUrl'],
  4340. deviceSoftwareVersion: map['DeviceSoftwareVersion'],
  4341. sDKSoftwareVersion: map['SDKSoftwareVersion'],
  4342. organizationCode: map['OrganizationCode'],
  4343. departmentCode: map['DepartmentCode'],
  4344. shortCode: map['ShortCode'],
  4345. isAutoShared: map['IsAutoShared'],
  4346. isEncryptedShow: map['IsEncryptedShow'],
  4347. lastLoginTime: map['LastLoginTime'] != null ? DateTime.parse(map['LastLoginTime']) : null,
  4348. systemVersion: map['SystemVersion'],
  4349. cPUModel: map['CPUModel'],
  4350. systemLanguage: map['SystemLanguage'],
  4351. diagnosisModules: map['DiagnosisModules'] != null ? map['DiagnosisModules'].cast<String>().toList() : null,
  4352. reportPosterCodes: map['ReportPosterCodes'] != null ? map['ReportPosterCodes'].cast<String>().toList() : null,
  4353. mergedChannel: map['MergedChannel'],
  4354. mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
  4355. mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
  4356. videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4357. downloadModeSetting: DownloadModeSettingEnum.values.firstWhere((e) => e.index == map['DownloadModeSetting']),
  4358. liveOpened: map['LiveOpened'],
  4359. displayName: map['DisplayName'],
  4360. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  4361. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  4362. );
  4363. }
  4364. Map<String, dynamic> toJson() {
  4365. final map = super.toJson();
  4366. if(deviceCode != null)
  4367. map['DeviceCode'] = deviceCode;
  4368. if(serialNumber != null)
  4369. map['SerialNumber'] = serialNumber;
  4370. if(password != null)
  4371. map['Password'] = password;
  4372. if(name != null)
  4373. map['Name'] = name;
  4374. if(description != null)
  4375. map['Description'] = description;
  4376. if(deviceModel != null)
  4377. map['DeviceModel'] = deviceModel;
  4378. if(deviceType != null)
  4379. map['DeviceType'] = deviceType;
  4380. if(headPicUrl != null)
  4381. map['HeadPicUrl'] = headPicUrl;
  4382. if(deviceSoftwareVersion != null)
  4383. map['DeviceSoftwareVersion'] = deviceSoftwareVersion;
  4384. if(sDKSoftwareVersion != null)
  4385. map['SDKSoftwareVersion'] = sDKSoftwareVersion;
  4386. if(organizationCode != null)
  4387. map['OrganizationCode'] = organizationCode;
  4388. if(departmentCode != null)
  4389. map['DepartmentCode'] = departmentCode;
  4390. if(shortCode != null)
  4391. map['ShortCode'] = shortCode;
  4392. map['IsAutoShared'] = isAutoShared;
  4393. map['IsEncryptedShow'] = isEncryptedShow;
  4394. if(lastLoginTime != null)
  4395. map['LastLoginTime'] = JsonRpcUtils.dateFormat(lastLoginTime!);
  4396. if(systemVersion != null)
  4397. map['SystemVersion'] = systemVersion;
  4398. if(cPUModel != null)
  4399. map['CPUModel'] = cPUModel;
  4400. if(systemLanguage != null)
  4401. map['SystemLanguage'] = systemLanguage;
  4402. if(diagnosisModules != null)
  4403. map['DiagnosisModules'] = diagnosisModules;
  4404. if(reportPosterCodes != null)
  4405. map['ReportPosterCodes'] = reportPosterCodes;
  4406. map['MergedChannel'] = mergedChannel;
  4407. map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
  4408. map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
  4409. if(videoDeviceInfos != null)
  4410. map['VideoDeviceInfos'] = videoDeviceInfos;
  4411. map['DownloadModeSetting'] = downloadModeSetting.index;
  4412. map['LiveOpened'] = liveOpened;
  4413. if(displayName != null)
  4414. map['DisplayName'] = displayName;
  4415. return map;
  4416. }
  4417. }
  4418. enum BusinessModuleEnum {
  4419. placeHolder_0,
  4420. RemoteDiagnosis,
  4421. LivingConsultation,
  4422. LivingCourse,
  4423. DeviceLiving,
  4424. RemoteControl,
  4425. }
  4426. class EmergencyDeviceInfoDTO extends DeviceInfoDTO{
  4427. bool isOccupied;
  4428. BusinessModuleEnum occupiedModuleEnum;
  4429. EmergencyDeviceInfoDTO({
  4430. this.isOccupied = false,
  4431. this.occupiedModuleEnum = BusinessModuleEnum.RemoteDiagnosis,
  4432. String? deviceCode,
  4433. String? serialNumber,
  4434. String? password,
  4435. String? name,
  4436. String? description,
  4437. String? deviceModel,
  4438. String? deviceType,
  4439. String? headPicUrl,
  4440. String? deviceSoftwareVersion,
  4441. String? sDKSoftwareVersion,
  4442. String? organizationCode,
  4443. String? departmentCode,
  4444. String? shortCode,
  4445. bool isAutoShared = false,
  4446. bool isEncryptedShow = false,
  4447. DateTime? lastLoginTime,
  4448. String? systemVersion,
  4449. String? cPUModel,
  4450. String? systemLanguage,
  4451. List<String >? diagnosisModules,
  4452. List<String >? reportPosterCodes,
  4453. bool mergedChannel = false,
  4454. int mergedVideoOutputWidth = 0,
  4455. int mergedVideoOutputHeight = 0,
  4456. List<VideoDeviceDTO >? videoDeviceInfos,
  4457. DownloadModeSettingEnum downloadModeSetting = DownloadModeSettingEnum.Auto,
  4458. bool liveOpened = false,
  4459. String? displayName,
  4460. DateTime? createTime,
  4461. DateTime? updateTime,
  4462. }) : super(
  4463. deviceCode: deviceCode,
  4464. serialNumber: serialNumber,
  4465. password: password,
  4466. name: name,
  4467. description: description,
  4468. deviceModel: deviceModel,
  4469. deviceType: deviceType,
  4470. headPicUrl: headPicUrl,
  4471. deviceSoftwareVersion: deviceSoftwareVersion,
  4472. sDKSoftwareVersion: sDKSoftwareVersion,
  4473. organizationCode: organizationCode,
  4474. departmentCode: departmentCode,
  4475. shortCode: shortCode,
  4476. isAutoShared: isAutoShared,
  4477. isEncryptedShow: isEncryptedShow,
  4478. lastLoginTime: lastLoginTime,
  4479. systemVersion: systemVersion,
  4480. cPUModel: cPUModel,
  4481. systemLanguage: systemLanguage,
  4482. diagnosisModules: diagnosisModules,
  4483. reportPosterCodes: reportPosterCodes,
  4484. mergedChannel: mergedChannel,
  4485. mergedVideoOutputWidth: mergedVideoOutputWidth,
  4486. mergedVideoOutputHeight: mergedVideoOutputHeight,
  4487. videoDeviceInfos: videoDeviceInfos,
  4488. downloadModeSetting: downloadModeSetting,
  4489. liveOpened: liveOpened,
  4490. displayName: displayName,
  4491. createTime: createTime,
  4492. updateTime: updateTime,
  4493. );
  4494. factory EmergencyDeviceInfoDTO.fromJson(Map<String, dynamic> map) {
  4495. return EmergencyDeviceInfoDTO(
  4496. isOccupied: map['IsOccupied'],
  4497. occupiedModuleEnum: BusinessModuleEnum.values.firstWhere((e) => e.index == map['OccupiedModuleEnum']),
  4498. deviceCode: map['DeviceCode'],
  4499. serialNumber: map['SerialNumber'],
  4500. password: map['Password'],
  4501. name: map['Name'],
  4502. description: map['Description'],
  4503. deviceModel: map['DeviceModel'],
  4504. deviceType: map['DeviceType'],
  4505. headPicUrl: map['HeadPicUrl'],
  4506. deviceSoftwareVersion: map['DeviceSoftwareVersion'],
  4507. sDKSoftwareVersion: map['SDKSoftwareVersion'],
  4508. organizationCode: map['OrganizationCode'],
  4509. departmentCode: map['DepartmentCode'],
  4510. shortCode: map['ShortCode'],
  4511. isAutoShared: map['IsAutoShared'],
  4512. isEncryptedShow: map['IsEncryptedShow'],
  4513. lastLoginTime: map['LastLoginTime'] != null ? DateTime.parse(map['LastLoginTime']) : null,
  4514. systemVersion: map['SystemVersion'],
  4515. cPUModel: map['CPUModel'],
  4516. systemLanguage: map['SystemLanguage'],
  4517. diagnosisModules: map['DiagnosisModules'] != null ? map['DiagnosisModules'].cast<String>().toList() : null,
  4518. reportPosterCodes: map['ReportPosterCodes'] != null ? map['ReportPosterCodes'].cast<String>().toList() : null,
  4519. mergedChannel: map['MergedChannel'],
  4520. mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
  4521. mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
  4522. videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4523. downloadModeSetting: DownloadModeSettingEnum.values.firstWhere((e) => e.index == map['DownloadModeSetting']),
  4524. liveOpened: map['LiveOpened'],
  4525. displayName: map['DisplayName'],
  4526. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  4527. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  4528. );
  4529. }
  4530. Map<String, dynamic> toJson() {
  4531. final map = super.toJson();
  4532. map['IsOccupied'] = isOccupied;
  4533. map['OccupiedModuleEnum'] = occupiedModuleEnum.index;
  4534. return map;
  4535. }
  4536. }
  4537. class QueryEmergencyDataResult {
  4538. List<EmergencyDeviceInfoDTO >? deviceInfoList;
  4539. List<UserDTO >? expertList;
  4540. QueryEmergencyDataResult({
  4541. this.deviceInfoList,
  4542. this.expertList,
  4543. });
  4544. factory QueryEmergencyDataResult.fromJson(Map<String, dynamic> map) {
  4545. return QueryEmergencyDataResult(
  4546. deviceInfoList: map['DeviceInfoList'] != null ? (map['DeviceInfoList'] as List).map((e)=>EmergencyDeviceInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4547. expertList: map['ExpertList'] != null ? (map['ExpertList'] as List).map((e)=>UserDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4548. );
  4549. }
  4550. Map<String, dynamic> toJson() {
  4551. final map = Map<String, dynamic>();
  4552. if(deviceInfoList != null)
  4553. map['DeviceInfoList'] = deviceInfoList;
  4554. if(expertList != null)
  4555. map['ExpertList'] = expertList;
  4556. return map;
  4557. }
  4558. }
  4559. class ControlDeviceResponseRequest extends BaseControlDeviceRequest{
  4560. String? userCode;
  4561. String? userName;
  4562. LoginSource loginSource;
  4563. ControlDeviceResponseRequest({
  4564. this.userCode,
  4565. this.userName,
  4566. this.loginSource = LoginSource.PC,
  4567. ControlDeviceParameterEnum controlType = ControlDeviceParameterEnum.Start,
  4568. bool isNeedSyn = false,
  4569. String? token,
  4570. }) : super(
  4571. controlType: controlType,
  4572. isNeedSyn: isNeedSyn,
  4573. token: token,
  4574. );
  4575. factory ControlDeviceResponseRequest.fromJson(Map<String, dynamic> map) {
  4576. return ControlDeviceResponseRequest(
  4577. userCode: map['UserCode'],
  4578. userName: map['UserName'],
  4579. loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
  4580. controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
  4581. isNeedSyn: map['IsNeedSyn'],
  4582. token: map['Token'],
  4583. );
  4584. }
  4585. Map<String, dynamic> toJson() {
  4586. final map = super.toJson();
  4587. if(userCode != null)
  4588. map['UserCode'] = userCode;
  4589. if(userName != null)
  4590. map['UserName'] = userName;
  4591. map['LoginSource'] = loginSource.index;
  4592. return map;
  4593. }
  4594. }
  4595. enum SyncDBEnum {
  4596. Migrate,
  4597. Synchronize,
  4598. }
  4599. class SyncEvaluatesRequest {
  4600. String? consultationRecordCode;
  4601. EvaluateGradeEnum evaluateGrade;
  4602. double evaluateScore;
  4603. String? feedback;
  4604. bool isDelete;
  4605. DateTime? createTime;
  4606. DateTime? updateTime;
  4607. String? code;
  4608. SyncEvaluatesRequest({
  4609. this.consultationRecordCode,
  4610. this.evaluateGrade = EvaluateGradeEnum.UnSet,
  4611. this.evaluateScore = 0,
  4612. this.feedback,
  4613. this.isDelete = false,
  4614. this.createTime,
  4615. this.updateTime,
  4616. this.code,
  4617. });
  4618. factory SyncEvaluatesRequest.fromJson(Map<String, dynamic> map) {
  4619. return SyncEvaluatesRequest(
  4620. consultationRecordCode: map['ConsultationRecordCode'],
  4621. evaluateGrade: EvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  4622. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  4623. feedback: map['Feedback'],
  4624. isDelete: map['IsDelete'],
  4625. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  4626. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  4627. code: map['Code'],
  4628. );
  4629. }
  4630. Map<String, dynamic> toJson() {
  4631. final map = Map<String, dynamic>();
  4632. if(consultationRecordCode != null)
  4633. map['ConsultationRecordCode'] = consultationRecordCode;
  4634. map['EvaluateGrade'] = evaluateGrade.index;
  4635. map['EvaluateScore'] = evaluateScore;
  4636. if(feedback != null)
  4637. map['Feedback'] = feedback;
  4638. map['IsDelete'] = isDelete;
  4639. if(createTime != null)
  4640. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  4641. if(updateTime != null)
  4642. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  4643. if(code != null)
  4644. map['Code'] = code;
  4645. return map;
  4646. }
  4647. }
  4648. enum FollowUpVisitStatusEnum {
  4649. Unknown,
  4650. PendingVisit,
  4651. VisitCompleted,
  4652. }
  4653. class SyncFollowUpVisitRequest extends FollowUpVisitDTO{
  4654. bool isDelete;
  4655. DateTime? createTime;
  4656. DateTime? updateTime;
  4657. SyncFollowUpVisitRequest({
  4658. this.isDelete = false,
  4659. this.createTime,
  4660. this.updateTime,
  4661. String? followUpVisitCode,
  4662. String? consultationRecordCode,
  4663. String? patientName,
  4664. String? patientPhone,
  4665. String? generalCase,
  4666. String? clinicalSituation,
  4667. String? doctorCode,
  4668. String? doctorName,
  4669. DateTime? occurredTime,
  4670. }) : super(
  4671. followUpVisitCode: followUpVisitCode,
  4672. consultationRecordCode: consultationRecordCode,
  4673. patientName: patientName,
  4674. patientPhone: patientPhone,
  4675. generalCase: generalCase,
  4676. clinicalSituation: clinicalSituation,
  4677. doctorCode: doctorCode,
  4678. doctorName: doctorName,
  4679. occurredTime: occurredTime,
  4680. );
  4681. factory SyncFollowUpVisitRequest.fromJson(Map<String, dynamic> map) {
  4682. return SyncFollowUpVisitRequest(
  4683. isDelete: map['IsDelete'],
  4684. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  4685. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  4686. followUpVisitCode: map['FollowUpVisitCode'],
  4687. consultationRecordCode: map['ConsultationRecordCode'],
  4688. patientName: map['PatientName'],
  4689. patientPhone: map['PatientPhone'],
  4690. generalCase: map['GeneralCase'],
  4691. clinicalSituation: map['ClinicalSituation'],
  4692. doctorCode: map['DoctorCode'],
  4693. doctorName: map['DoctorName'],
  4694. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  4695. );
  4696. }
  4697. Map<String, dynamic> toJson() {
  4698. final map = super.toJson();
  4699. map['IsDelete'] = isDelete;
  4700. if(createTime != null)
  4701. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  4702. if(updateTime != null)
  4703. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  4704. return map;
  4705. }
  4706. }
  4707. class SyncConsultationRequest {
  4708. String? consultationCode;
  4709. DateTime? createTime;
  4710. DateTime? updateTime;
  4711. String? applyOrganizationCode;
  4712. String? applyUserCode;
  4713. String? expertOrganizationCode;
  4714. String? expertUserCode;
  4715. String? deviceCode;
  4716. String? scanUser;
  4717. List<DataItemDTO >? patientInfo;
  4718. List<String >? scanPositions;
  4719. DateTime? consultationTime;
  4720. DateTime? consultationTimeEnd;
  4721. TransactionStatusEnum consultationStatus;
  4722. List<ConsultationFileDTO >? consultationFileList;
  4723. String? rejectReason;
  4724. String? description;
  4725. String? diseases;
  4726. String? primaryDiagnosis;
  4727. SyncEvaluatesRequest? evaluates;
  4728. FollowUpVisitStatusEnum followUpVisitStatus;
  4729. List<SyncFollowUpVisitRequest >? syncFollowUpVisitList;
  4730. SyncConsultationRequest({
  4731. this.consultationCode,
  4732. this.createTime,
  4733. this.updateTime,
  4734. this.applyOrganizationCode,
  4735. this.applyUserCode,
  4736. this.expertOrganizationCode,
  4737. this.expertUserCode,
  4738. this.deviceCode,
  4739. this.scanUser,
  4740. this.patientInfo,
  4741. this.scanPositions,
  4742. this.consultationTime,
  4743. this.consultationTimeEnd,
  4744. this.consultationStatus = TransactionStatusEnum.Applied,
  4745. this.consultationFileList,
  4746. this.rejectReason,
  4747. this.description,
  4748. this.diseases,
  4749. this.primaryDiagnosis,
  4750. this.evaluates,
  4751. this.followUpVisitStatus = FollowUpVisitStatusEnum.Unknown,
  4752. this.syncFollowUpVisitList,
  4753. });
  4754. factory SyncConsultationRequest.fromJson(Map<String, dynamic> map) {
  4755. return SyncConsultationRequest(
  4756. consultationCode: map['ConsultationCode'],
  4757. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  4758. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  4759. applyOrganizationCode: map['ApplyOrganizationCode'],
  4760. applyUserCode: map['ApplyUserCode'],
  4761. expertOrganizationCode: map['ExpertOrganizationCode'],
  4762. expertUserCode: map['ExpertUserCode'],
  4763. deviceCode: map['DeviceCode'],
  4764. scanUser: map['ScanUser'],
  4765. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4766. scanPositions: map['ScanPositions'] != null ? map['ScanPositions'].cast<String>().toList() : null,
  4767. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  4768. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  4769. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  4770. consultationFileList: map['ConsultationFileList'] != null ? (map['ConsultationFileList'] as List).map((e)=>ConsultationFileDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4771. rejectReason: map['RejectReason'],
  4772. description: map['Description'],
  4773. diseases: map['Diseases'],
  4774. primaryDiagnosis: map['PrimaryDiagnosis'],
  4775. evaluates: map['Evaluates'] != null ? SyncEvaluatesRequest.fromJson(map['Evaluates']) : null,
  4776. followUpVisitStatus: FollowUpVisitStatusEnum.values.firstWhere((e) => e.index == map['FollowUpVisitStatus']),
  4777. syncFollowUpVisitList: map['SyncFollowUpVisitList'] != null ? (map['SyncFollowUpVisitList'] as List).map((e)=>SyncFollowUpVisitRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  4778. );
  4779. }
  4780. Map<String, dynamic> toJson() {
  4781. final map = Map<String, dynamic>();
  4782. if(consultationCode != null)
  4783. map['ConsultationCode'] = consultationCode;
  4784. if(createTime != null)
  4785. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  4786. if(updateTime != null)
  4787. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  4788. if(applyOrganizationCode != null)
  4789. map['ApplyOrganizationCode'] = applyOrganizationCode;
  4790. if(applyUserCode != null)
  4791. map['ApplyUserCode'] = applyUserCode;
  4792. if(expertOrganizationCode != null)
  4793. map['ExpertOrganizationCode'] = expertOrganizationCode;
  4794. if(expertUserCode != null)
  4795. map['ExpertUserCode'] = expertUserCode;
  4796. if(deviceCode != null)
  4797. map['DeviceCode'] = deviceCode;
  4798. if(scanUser != null)
  4799. map['ScanUser'] = scanUser;
  4800. if(patientInfo != null)
  4801. map['PatientInfo'] = patientInfo;
  4802. if(scanPositions != null)
  4803. map['ScanPositions'] = scanPositions;
  4804. if(consultationTime != null)
  4805. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  4806. if(consultationTimeEnd != null)
  4807. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  4808. map['ConsultationStatus'] = consultationStatus.index;
  4809. if(consultationFileList != null)
  4810. map['ConsultationFileList'] = consultationFileList;
  4811. if(rejectReason != null)
  4812. map['RejectReason'] = rejectReason;
  4813. if(description != null)
  4814. map['Description'] = description;
  4815. if(diseases != null)
  4816. map['Diseases'] = diseases;
  4817. if(primaryDiagnosis != null)
  4818. map['PrimaryDiagnosis'] = primaryDiagnosis;
  4819. if(evaluates != null)
  4820. map['Evaluates'] = evaluates;
  4821. map['FollowUpVisitStatus'] = followUpVisitStatus.index;
  4822. if(syncFollowUpVisitList != null)
  4823. map['SyncFollowUpVisitList'] = syncFollowUpVisitList;
  4824. return map;
  4825. }
  4826. }
  4827. class SyncBatchConsultationRequest {
  4828. SyncDBEnum syncType;
  4829. List<SyncConsultationRequest >? syncConsultations;
  4830. SyncBatchConsultationRequest({
  4831. this.syncType = SyncDBEnum.Migrate,
  4832. this.syncConsultations,
  4833. });
  4834. factory SyncBatchConsultationRequest.fromJson(Map<String, dynamic> map) {
  4835. return SyncBatchConsultationRequest(
  4836. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  4837. syncConsultations: map['SyncConsultations'] != null ? (map['SyncConsultations'] as List).map((e)=>SyncConsultationRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  4838. );
  4839. }
  4840. Map<String, dynamic> toJson() {
  4841. final map = Map<String, dynamic>();
  4842. map['SyncType'] = syncType.index;
  4843. if(syncConsultations != null)
  4844. map['SyncConsultations'] = syncConsultations;
  4845. return map;
  4846. }
  4847. }