liveConsultation.m.dart 134 KB

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