liveConsultation.m.dart 142 KB

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