liveConsultation.m.dart 137 KB

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