liveConsultation.m.dart 167 KB

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