liveConsultation.m.dart 154 KB

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