liveConsultation.m.dart 144 KB

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