liveConsultation.m.dart 128 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679
  1. import 'notification.m.dart';
  2. import 'package:fis_jsonrpc/utils.dart';
  3. import 'package:fis_common/json_convert.dart';
  4. class BaseDTO {
  5. DateTime? createTime;
  6. DateTime? updateTime;
  7. BaseDTO({
  8. this.createTime,
  9. this.updateTime,
  10. });
  11. factory BaseDTO.fromJson(Map<String, dynamic> map) {
  12. return BaseDTO(
  13. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  14. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  15. );
  16. }
  17. Map<String, dynamic> toJson() {
  18. final map = Map<String, dynamic>();
  19. if(createTime != null)
  20. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  21. if(updateTime != null)
  22. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  23. return map;
  24. }
  25. }
  26. class OrganizationBaseDTO extends BaseDTO{
  27. String? organizationCode;
  28. String? organizationName;
  29. OrganizationBaseDTO({
  30. this.organizationCode,
  31. this.organizationName,
  32. DateTime? createTime,
  33. DateTime? updateTime,
  34. }) : super(
  35. createTime: createTime,
  36. updateTime: updateTime,
  37. );
  38. factory OrganizationBaseDTO.fromJson(Map<String, dynamic> map) {
  39. return OrganizationBaseDTO(
  40. organizationCode: map['OrganizationCode'],
  41. organizationName: map['OrganizationName'],
  42. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  43. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  44. );
  45. }
  46. Map<String, dynamic> toJson() {
  47. final map = super.toJson();
  48. if(organizationCode != null)
  49. map['OrganizationCode'] = organizationCode;
  50. if(organizationName != null)
  51. map['OrganizationName'] = organizationName;
  52. return map;
  53. }
  54. }
  55. class BaseRequest {
  56. BaseRequest();
  57. factory BaseRequest.fromJson(Map<String, dynamic> map) {
  58. return BaseRequest(
  59. );
  60. }
  61. Map<String, dynamic> toJson() {
  62. final map = Map<String, dynamic>();
  63. return map;
  64. }
  65. }
  66. class TokenRequest extends BaseRequest{
  67. String? token;
  68. TokenRequest({
  69. this.token,
  70. }) : super(
  71. );
  72. factory TokenRequest.fromJson(Map<String, dynamic> map) {
  73. return TokenRequest(
  74. token: map['Token'],
  75. );
  76. }
  77. Map<String, dynamic> toJson() {
  78. final map = super.toJson();
  79. if(token != null)
  80. map['Token'] = token;
  81. return map;
  82. }
  83. }
  84. class FindHigherOrganizationsRequest extends TokenRequest{
  85. String? organizationName;
  86. FindHigherOrganizationsRequest({
  87. this.organizationName,
  88. String? token,
  89. }) : super(
  90. token: token,
  91. );
  92. factory FindHigherOrganizationsRequest.fromJson(Map<String, dynamic> map) {
  93. return FindHigherOrganizationsRequest(
  94. organizationName: map['OrganizationName'],
  95. token: map['Token'],
  96. );
  97. }
  98. Map<String, dynamic> toJson() {
  99. final map = super.toJson();
  100. if(organizationName != null)
  101. map['OrganizationName'] = organizationName;
  102. return map;
  103. }
  104. }
  105. class FindGrassRootsOrganizationsRequest extends TokenRequest{
  106. String? organizationName;
  107. FindGrassRootsOrganizationsRequest({
  108. this.organizationName,
  109. String? token,
  110. }) : super(
  111. token: token,
  112. );
  113. factory FindGrassRootsOrganizationsRequest.fromJson(Map<String, dynamic> map) {
  114. return FindGrassRootsOrganizationsRequest(
  115. organizationName: map['OrganizationName'],
  116. token: map['Token'],
  117. );
  118. }
  119. Map<String, dynamic> toJson() {
  120. final map = super.toJson();
  121. if(organizationName != null)
  122. map['OrganizationName'] = organizationName;
  123. return map;
  124. }
  125. }
  126. class UserBaseDTO extends BaseDTO{
  127. String? userCode;
  128. String? userName;
  129. String? headImageUrl;
  130. UserBaseDTO({
  131. this.userCode,
  132. this.userName,
  133. this.headImageUrl,
  134. DateTime? createTime,
  135. DateTime? updateTime,
  136. }) : super(
  137. createTime: createTime,
  138. updateTime: updateTime,
  139. );
  140. factory UserBaseDTO.fromJson(Map<String, dynamic> map) {
  141. return UserBaseDTO(
  142. userCode: map['UserCode'],
  143. userName: map['UserName'],
  144. headImageUrl: map['HeadImageUrl'],
  145. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  146. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  147. );
  148. }
  149. Map<String, dynamic> toJson() {
  150. final map = super.toJson();
  151. if(userCode != null)
  152. map['UserCode'] = userCode;
  153. if(userName != null)
  154. map['UserName'] = userName;
  155. if(headImageUrl != null)
  156. map['HeadImageUrl'] = headImageUrl;
  157. return map;
  158. }
  159. }
  160. enum UserStatusEnum {
  161. placeHolder_0,
  162. NotOnline,
  163. IsBusy,
  164. Idle,
  165. }
  166. class OrganizationExpertDTO extends UserBaseDTO{
  167. String? fullName;
  168. List<String >? fieldList;
  169. UserStatusEnum userStatus;
  170. OrganizationExpertDTO({
  171. this.fullName,
  172. this.fieldList,
  173. this.userStatus = UserStatusEnum.NotOnline,
  174. String? userCode,
  175. String? userName,
  176. String? headImageUrl,
  177. DateTime? createTime,
  178. DateTime? updateTime,
  179. }) : super(
  180. userCode: userCode,
  181. userName: userName,
  182. headImageUrl: headImageUrl,
  183. createTime: createTime,
  184. updateTime: updateTime,
  185. );
  186. factory OrganizationExpertDTO.fromJson(Map<String, dynamic> map) {
  187. return OrganizationExpertDTO(
  188. fullName: map['FullName'],
  189. fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
  190. userStatus: UserStatusEnum.values.firstWhere((e) => e.index == map['UserStatus']),
  191. userCode: map['UserCode'],
  192. userName: map['UserName'],
  193. headImageUrl: map['HeadImageUrl'],
  194. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  195. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  196. );
  197. }
  198. Map<String, dynamic> toJson() {
  199. final map = super.toJson();
  200. if(fullName != null)
  201. map['FullName'] = fullName;
  202. if(fieldList != null)
  203. map['FieldList'] = fieldList;
  204. map['UserStatus'] = userStatus.index;
  205. return map;
  206. }
  207. }
  208. class FindOrganizationExpertsRequest extends TokenRequest{
  209. String? organizationCode;
  210. String? expertName;
  211. FindOrganizationExpertsRequest({
  212. this.organizationCode,
  213. this.expertName,
  214. String? token,
  215. }) : super(
  216. token: token,
  217. );
  218. factory FindOrganizationExpertsRequest.fromJson(Map<String, dynamic> map) {
  219. return FindOrganizationExpertsRequest(
  220. organizationCode: map['OrganizationCode'],
  221. expertName: map['ExpertName'],
  222. token: map['Token'],
  223. );
  224. }
  225. Map<String, dynamic> toJson() {
  226. final map = super.toJson();
  227. if(organizationCode != null)
  228. map['OrganizationCode'] = organizationCode;
  229. if(expertName != null)
  230. map['ExpertName'] = expertName;
  231. return map;
  232. }
  233. }
  234. class DataItemDTO {
  235. String? key;
  236. String? value;
  237. DataItemDTO({
  238. this.key,
  239. this.value,
  240. });
  241. factory DataItemDTO.fromJson(Map<String, dynamic> map) {
  242. return DataItemDTO(
  243. key: map['Key'],
  244. value: map['Value'],
  245. );
  246. }
  247. Map<String, dynamic> toJson() {
  248. final map = Map<String, dynamic>();
  249. if(key != null)
  250. map['Key'] = key;
  251. if(value != null)
  252. map['Value'] = value;
  253. return map;
  254. }
  255. }
  256. class ApplyConsultationRequest extends TokenRequest{
  257. String? expertUserCode;
  258. String? deviceCode;
  259. String? scanPosition;
  260. DateTime? consultationTime;
  261. List<DataItemDTO >? patientDatas;
  262. String? patientCode;
  263. String? diseases;
  264. String? scanUserCode;
  265. String? expertOrganizationCode;
  266. String? applyUserCode;
  267. String? primaryDiagnosis;
  268. ApplyConsultationRequest({
  269. this.expertUserCode,
  270. this.deviceCode,
  271. this.scanPosition,
  272. this.consultationTime,
  273. this.patientDatas,
  274. this.patientCode,
  275. this.diseases,
  276. this.scanUserCode,
  277. this.expertOrganizationCode,
  278. this.applyUserCode,
  279. this.primaryDiagnosis,
  280. String? token,
  281. }) : super(
  282. token: token,
  283. );
  284. factory ApplyConsultationRequest.fromJson(Map<String, dynamic> map) {
  285. return ApplyConsultationRequest(
  286. expertUserCode: map['ExpertUserCode'],
  287. deviceCode: map['DeviceCode'],
  288. scanPosition: map['ScanPosition'],
  289. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  290. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  291. patientCode: map['PatientCode'],
  292. diseases: map['Diseases'],
  293. scanUserCode: map['ScanUserCode'],
  294. expertOrganizationCode: map['ExpertOrganizationCode'],
  295. applyUserCode: map['ApplyUserCode'],
  296. primaryDiagnosis: map['PrimaryDiagnosis'],
  297. token: map['Token'],
  298. );
  299. }
  300. Map<String, dynamic> toJson() {
  301. final map = super.toJson();
  302. if(expertUserCode != null)
  303. map['ExpertUserCode'] = expertUserCode;
  304. if(deviceCode != null)
  305. map['DeviceCode'] = deviceCode;
  306. if(scanPosition != null)
  307. map['ScanPosition'] = scanPosition;
  308. if(consultationTime != null)
  309. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  310. if(patientDatas != null)
  311. map['PatientDatas'] = patientDatas;
  312. if(patientCode != null)
  313. map['PatientCode'] = patientCode;
  314. if(diseases != null)
  315. map['Diseases'] = diseases;
  316. if(scanUserCode != null)
  317. map['ScanUserCode'] = scanUserCode;
  318. if(expertOrganizationCode != null)
  319. map['ExpertOrganizationCode'] = expertOrganizationCode;
  320. if(applyUserCode != null)
  321. map['ApplyUserCode'] = applyUserCode;
  322. if(primaryDiagnosis != null)
  323. map['PrimaryDiagnosis'] = primaryDiagnosis;
  324. return map;
  325. }
  326. }
  327. class UpdateConsultationRequest extends TokenRequest{
  328. String? consultationCode;
  329. String? expertUserCode;
  330. String? deviceCode;
  331. String? scanPosition;
  332. DateTime? consultationTime;
  333. String? diseases;
  334. String? scanUserCode;
  335. String? expertOrganizationCode;
  336. String? applyUserCode;
  337. String? primaryDiagnosis;
  338. UpdateConsultationRequest({
  339. this.consultationCode,
  340. this.expertUserCode,
  341. this.deviceCode,
  342. this.scanPosition,
  343. this.consultationTime,
  344. this.diseases,
  345. this.scanUserCode,
  346. this.expertOrganizationCode,
  347. this.applyUserCode,
  348. this.primaryDiagnosis,
  349. String? token,
  350. }) : super(
  351. token: token,
  352. );
  353. factory UpdateConsultationRequest.fromJson(Map<String, dynamic> map) {
  354. return UpdateConsultationRequest(
  355. consultationCode: map['ConsultationCode'],
  356. expertUserCode: map['ExpertUserCode'],
  357. deviceCode: map['DeviceCode'],
  358. scanPosition: map['ScanPosition'],
  359. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  360. diseases: map['Diseases'],
  361. scanUserCode: map['ScanUserCode'],
  362. expertOrganizationCode: map['ExpertOrganizationCode'],
  363. applyUserCode: map['ApplyUserCode'],
  364. primaryDiagnosis: map['PrimaryDiagnosis'],
  365. token: map['Token'],
  366. );
  367. }
  368. Map<String, dynamic> toJson() {
  369. final map = super.toJson();
  370. if(consultationCode != null)
  371. map['ConsultationCode'] = consultationCode;
  372. if(expertUserCode != null)
  373. map['ExpertUserCode'] = expertUserCode;
  374. if(deviceCode != null)
  375. map['DeviceCode'] = deviceCode;
  376. if(scanPosition != null)
  377. map['ScanPosition'] = scanPosition;
  378. if(consultationTime != null)
  379. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  380. if(diseases != null)
  381. map['Diseases'] = diseases;
  382. if(scanUserCode != null)
  383. map['ScanUserCode'] = scanUserCode;
  384. if(expertOrganizationCode != null)
  385. map['ExpertOrganizationCode'] = expertOrganizationCode;
  386. if(applyUserCode != null)
  387. map['ApplyUserCode'] = applyUserCode;
  388. if(primaryDiagnosis != null)
  389. map['PrimaryDiagnosis'] = primaryDiagnosis;
  390. return map;
  391. }
  392. }
  393. class ImproveConsultationInfoRequest extends TokenRequest{
  394. String? consultationCode;
  395. String? patientCode;
  396. List<DataItemDTO >? patientDatas;
  397. String? scanPosition;
  398. String? diseases;
  399. String? primaryDiagnosis;
  400. ImproveConsultationInfoRequest({
  401. this.consultationCode,
  402. this.patientCode,
  403. this.patientDatas,
  404. this.scanPosition,
  405. this.diseases,
  406. this.primaryDiagnosis,
  407. String? token,
  408. }) : super(
  409. token: token,
  410. );
  411. factory ImproveConsultationInfoRequest.fromJson(Map<String, dynamic> map) {
  412. return ImproveConsultationInfoRequest(
  413. consultationCode: map['ConsultationCode'],
  414. patientCode: map['PatientCode'],
  415. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  416. scanPosition: map['ScanPosition'],
  417. diseases: map['Diseases'],
  418. primaryDiagnosis: map['PrimaryDiagnosis'],
  419. token: map['Token'],
  420. );
  421. }
  422. Map<String, dynamic> toJson() {
  423. final map = super.toJson();
  424. if(consultationCode != null)
  425. map['ConsultationCode'] = consultationCode;
  426. if(patientCode != null)
  427. map['PatientCode'] = patientCode;
  428. if(patientDatas != null)
  429. map['PatientDatas'] = patientDatas;
  430. if(scanPosition != null)
  431. map['ScanPosition'] = scanPosition;
  432. if(diseases != null)
  433. map['Diseases'] = diseases;
  434. if(primaryDiagnosis != null)
  435. map['PrimaryDiagnosis'] = primaryDiagnosis;
  436. return map;
  437. }
  438. }
  439. class FindAssistantExpertsRequest extends TokenRequest{
  440. String? expertName;
  441. FindAssistantExpertsRequest({
  442. this.expertName,
  443. String? token,
  444. }) : super(
  445. token: token,
  446. );
  447. factory FindAssistantExpertsRequest.fromJson(Map<String, dynamic> map) {
  448. return FindAssistantExpertsRequest(
  449. expertName: map['ExpertName'],
  450. token: map['Token'],
  451. );
  452. }
  453. Map<String, dynamic> toJson() {
  454. final map = super.toJson();
  455. if(expertName != null)
  456. map['ExpertName'] = expertName;
  457. return map;
  458. }
  459. }
  460. enum TransactionStatusEnum {
  461. placeHolder_0,
  462. Applied,
  463. Withdrawn,
  464. Rejected,
  465. ToStart,
  466. InProgress,
  467. PendingReport,
  468. End,
  469. }
  470. enum EvaluateGradeEnum {
  471. UnSet,
  472. Dissatisfaction,
  473. General,
  474. Satisfaction,
  475. }
  476. class ConsultationPageDTO {
  477. String? consultationCode;
  478. TransactionStatusEnum consultationStatus;
  479. String? patientName;
  480. String? phone;
  481. String? sex;
  482. String? patientAge;
  483. String? applyOrganizationName;
  484. DateTime? consultationTime;
  485. DateTime? consultationTimeEnd;
  486. String? expertUserName;
  487. EvaluateGradeEnum consultationEvaluate;
  488. bool isEmergency;
  489. String? emergencyCode;
  490. ConsultationPageDTO({
  491. this.consultationCode,
  492. this.consultationStatus = TransactionStatusEnum.Applied,
  493. this.patientName,
  494. this.phone,
  495. this.sex,
  496. this.patientAge,
  497. this.applyOrganizationName,
  498. this.consultationTime,
  499. this.consultationTimeEnd,
  500. this.expertUserName,
  501. this.consultationEvaluate = EvaluateGradeEnum.UnSet,
  502. this.isEmergency = false,
  503. this.emergencyCode,
  504. });
  505. factory ConsultationPageDTO.fromJson(Map<String, dynamic> map) {
  506. return ConsultationPageDTO(
  507. consultationCode: map['ConsultationCode'],
  508. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  509. patientName: map['PatientName'],
  510. phone: map['Phone'],
  511. sex: map['Sex'],
  512. patientAge: map['PatientAge'],
  513. applyOrganizationName: map['ApplyOrganizationName'],
  514. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  515. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  516. expertUserName: map['ExpertUserName'],
  517. consultationEvaluate: EvaluateGradeEnum.values.firstWhere((e) => e.index == map['ConsultationEvaluate']),
  518. isEmergency: map['IsEmergency'],
  519. emergencyCode: map['EmergencyCode'],
  520. );
  521. }
  522. Map<String, dynamic> toJson() {
  523. final map = Map<String, dynamic>();
  524. if(consultationCode != null)
  525. map['ConsultationCode'] = consultationCode;
  526. map['ConsultationStatus'] = consultationStatus.index;
  527. if(patientName != null)
  528. map['PatientName'] = patientName;
  529. if(phone != null)
  530. map['Phone'] = phone;
  531. if(sex != null)
  532. map['Sex'] = sex;
  533. if(patientAge != null)
  534. map['PatientAge'] = patientAge;
  535. if(applyOrganizationName != null)
  536. map['ApplyOrganizationName'] = applyOrganizationName;
  537. if(consultationTime != null)
  538. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  539. if(consultationTimeEnd != null)
  540. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  541. if(expertUserName != null)
  542. map['ExpertUserName'] = expertUserName;
  543. map['ConsultationEvaluate'] = consultationEvaluate.index;
  544. map['IsEmergency'] = isEmergency;
  545. if(emergencyCode != null)
  546. map['EmergencyCode'] = emergencyCode;
  547. return map;
  548. }
  549. }
  550. class PageResult<T> {
  551. int pageIndex;
  552. int pageSize;
  553. int totalCount;
  554. List<T>? pageData;
  555. PageResult({
  556. this.pageIndex = 0,
  557. this.pageSize = 0,
  558. this.totalCount = 0,
  559. this.pageData,
  560. });
  561. factory PageResult.fromJson(Map<String, dynamic> map) {
  562. List<T> pageDataList = [];
  563. if (map['PageData'] != null) {
  564. pageDataList.addAll(
  565. (map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
  566. }
  567. return PageResult(
  568. pageIndex: map['PageIndex'],
  569. pageSize: map['PageSize'],
  570. totalCount: map['TotalCount'],
  571. pageData: pageDataList,
  572. );
  573. }
  574. Map<String, dynamic> toJson() {
  575. final map = Map<String, dynamic>();
  576. map['PageIndex'] = pageIndex;
  577. map['PageSize'] = pageSize;
  578. map['TotalCount'] = totalCount;
  579. if(pageData != null)
  580. map['PageData'] = pageData;
  581. return map;
  582. }
  583. }
  584. class PageRequest extends TokenRequest{
  585. int pageIndex;
  586. int pageSize;
  587. PageRequest({
  588. this.pageIndex = 0,
  589. this.pageSize = 0,
  590. String? token,
  591. }) : super(
  592. token: token,
  593. );
  594. factory PageRequest.fromJson(Map<String, dynamic> map) {
  595. return PageRequest(
  596. pageIndex: map['PageIndex'],
  597. pageSize: map['PageSize'],
  598. token: map['Token'],
  599. );
  600. }
  601. Map<String, dynamic> toJson() {
  602. final map = super.toJson();
  603. map['PageIndex'] = pageIndex;
  604. map['PageSize'] = pageSize;
  605. return map;
  606. }
  607. }
  608. enum QueryConsultationStatusEnum {
  609. All,
  610. Applied,
  611. Withdrawn,
  612. Rejected,
  613. ToStart,
  614. InProgress,
  615. PendingReport,
  616. End,
  617. }
  618. enum ConsultationQueryTypeEnum {
  619. All,
  620. MyApply,
  621. MyArrange,
  622. MyJoin,
  623. }
  624. enum QueryEvaluateGradeEnum {
  625. All,
  626. UnSet,
  627. Dissatisfaction,
  628. General,
  629. Satisfaction,
  630. }
  631. enum QueryAgeUnitsEnum {
  632. Year,
  633. Month,
  634. Week,
  635. }
  636. class QueryPatientAgeLimitDTO {
  637. int minAge;
  638. int maxAge;
  639. QueryAgeUnitsEnum unit;
  640. QueryPatientAgeLimitDTO({
  641. this.minAge = 0,
  642. this.maxAge = 0,
  643. this.unit = QueryAgeUnitsEnum.Year,
  644. });
  645. factory QueryPatientAgeLimitDTO.fromJson(Map<String, dynamic> map) {
  646. return QueryPatientAgeLimitDTO(
  647. minAge: map['MinAge'],
  648. maxAge: map['MaxAge'],
  649. unit: QueryAgeUnitsEnum.values.firstWhere((e) => e.index == map['Unit']),
  650. );
  651. }
  652. Map<String, dynamic> toJson() {
  653. final map = Map<String, dynamic>();
  654. map['MinAge'] = minAge;
  655. map['MaxAge'] = maxAge;
  656. map['Unit'] = unit.index;
  657. return map;
  658. }
  659. }
  660. class FindConsultationByPageRequest extends PageRequest{
  661. String? keyword;
  662. DateTime? startDate;
  663. DateTime? endDate;
  664. QueryConsultationStatusEnum consultationStatus;
  665. ConsultationQueryTypeEnum consultationQueryType;
  666. QueryEvaluateGradeEnum evaluateGrade;
  667. String? language;
  668. List<String >? expertCodes;
  669. List<String >? applyOrganizationCodes;
  670. List<String >? expertOrganizationCodes;
  671. String? patientSex;
  672. QueryPatientAgeLimitDTO? patientAgeLimit;
  673. String? patientDiseases;
  674. String? patientPrimaryDiagnosis;
  675. FindConsultationByPageRequest({
  676. this.keyword,
  677. this.startDate,
  678. this.endDate,
  679. this.consultationStatus = QueryConsultationStatusEnum.All,
  680. this.consultationQueryType = ConsultationQueryTypeEnum.All,
  681. this.evaluateGrade = QueryEvaluateGradeEnum.All,
  682. this.language,
  683. this.expertCodes,
  684. this.applyOrganizationCodes,
  685. this.expertOrganizationCodes,
  686. this.patientSex,
  687. this.patientAgeLimit,
  688. this.patientDiseases,
  689. this.patientPrimaryDiagnosis,
  690. int pageIndex = 0,
  691. int pageSize = 0,
  692. String? token,
  693. }) : super(
  694. pageIndex: pageIndex,
  695. pageSize: pageSize,
  696. token: token,
  697. );
  698. factory FindConsultationByPageRequest.fromJson(Map<String, dynamic> map) {
  699. return FindConsultationByPageRequest(
  700. keyword: map['Keyword'],
  701. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  702. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  703. consultationStatus: QueryConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  704. consultationQueryType: ConsultationQueryTypeEnum.values.firstWhere((e) => e.index == map['ConsultationQueryType']),
  705. evaluateGrade: QueryEvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  706. language: map['Language'],
  707. expertCodes: map['ExpertCodes'] != null ? map['ExpertCodes'].cast<String>().toList() : null,
  708. applyOrganizationCodes: map['ApplyOrganizationCodes'] != null ? map['ApplyOrganizationCodes'].cast<String>().toList() : null,
  709. expertOrganizationCodes: map['ExpertOrganizationCodes'] != null ? map['ExpertOrganizationCodes'].cast<String>().toList() : null,
  710. patientSex: map['PatientSex'],
  711. patientAgeLimit: map['PatientAgeLimit'] != null ? QueryPatientAgeLimitDTO.fromJson(map['PatientAgeLimit']) : null,
  712. patientDiseases: map['PatientDiseases'],
  713. patientPrimaryDiagnosis: map['PatientPrimaryDiagnosis'],
  714. pageIndex: map['PageIndex'],
  715. pageSize: map['PageSize'],
  716. token: map['Token'],
  717. );
  718. }
  719. Map<String, dynamic> toJson() {
  720. final map = super.toJson();
  721. if(keyword != null)
  722. map['Keyword'] = keyword;
  723. if(startDate != null)
  724. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  725. if(endDate != null)
  726. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  727. map['ConsultationStatus'] = consultationStatus.index;
  728. map['ConsultationQueryType'] = consultationQueryType.index;
  729. map['EvaluateGrade'] = evaluateGrade.index;
  730. if(language != null)
  731. map['Language'] = language;
  732. if(expertCodes != null)
  733. map['ExpertCodes'] = expertCodes;
  734. if(applyOrganizationCodes != null)
  735. map['ApplyOrganizationCodes'] = applyOrganizationCodes;
  736. if(expertOrganizationCodes != null)
  737. map['ExpertOrganizationCodes'] = expertOrganizationCodes;
  738. if(patientSex != null)
  739. map['PatientSex'] = patientSex;
  740. if(patientAgeLimit != null)
  741. map['PatientAgeLimit'] = patientAgeLimit;
  742. if(patientDiseases != null)
  743. map['PatientDiseases'] = patientDiseases;
  744. if(patientPrimaryDiagnosis != null)
  745. map['PatientPrimaryDiagnosis'] = patientPrimaryDiagnosis;
  746. return map;
  747. }
  748. }
  749. class ConsultationItem {
  750. String? patientName;
  751. String? sex;
  752. String? age;
  753. String? applyOrganizationName;
  754. String? applyUserName;
  755. String? expertOrganizationName;
  756. String? expertUserName;
  757. DateTime? consultationTime;
  758. DateTime? consultationTimeEnd;
  759. String? diseases;
  760. String? primaryDiagnosis;
  761. TransactionStatusEnum consultationStatus;
  762. String? scanPosition;
  763. ConsultationItem({
  764. this.patientName,
  765. this.sex,
  766. this.age,
  767. this.applyOrganizationName,
  768. this.applyUserName,
  769. this.expertOrganizationName,
  770. this.expertUserName,
  771. this.consultationTime,
  772. this.consultationTimeEnd,
  773. this.diseases,
  774. this.primaryDiagnosis,
  775. this.consultationStatus = TransactionStatusEnum.Applied,
  776. this.scanPosition,
  777. });
  778. factory ConsultationItem.fromJson(Map<String, dynamic> map) {
  779. return ConsultationItem(
  780. patientName: map['PatientName'],
  781. sex: map['Sex'],
  782. age: map['Age'],
  783. applyOrganizationName: map['ApplyOrganizationName'],
  784. applyUserName: map['ApplyUserName'],
  785. expertOrganizationName: map['ExpertOrganizationName'],
  786. expertUserName: map['ExpertUserName'],
  787. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  788. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  789. diseases: map['Diseases'],
  790. primaryDiagnosis: map['PrimaryDiagnosis'],
  791. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  792. scanPosition: map['ScanPosition'],
  793. );
  794. }
  795. Map<String, dynamic> toJson() {
  796. final map = Map<String, dynamic>();
  797. if(patientName != null)
  798. map['PatientName'] = patientName;
  799. if(sex != null)
  800. map['Sex'] = sex;
  801. if(age != null)
  802. map['Age'] = age;
  803. if(applyOrganizationName != null)
  804. map['ApplyOrganizationName'] = applyOrganizationName;
  805. if(applyUserName != null)
  806. map['ApplyUserName'] = applyUserName;
  807. if(expertOrganizationName != null)
  808. map['ExpertOrganizationName'] = expertOrganizationName;
  809. if(expertUserName != null)
  810. map['ExpertUserName'] = expertUserName;
  811. if(consultationTime != null)
  812. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  813. if(consultationTimeEnd != null)
  814. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  815. if(diseases != null)
  816. map['Diseases'] = diseases;
  817. if(primaryDiagnosis != null)
  818. map['PrimaryDiagnosis'] = primaryDiagnosis;
  819. map['ConsultationStatus'] = consultationStatus.index;
  820. if(scanPosition != null)
  821. map['ScanPosition'] = scanPosition;
  822. return map;
  823. }
  824. }
  825. class ConsultationExportData {
  826. String? patientName;
  827. String? patientCode;
  828. List<ConsultationItem >? consultationItemList;
  829. ConsultationExportData({
  830. this.patientName,
  831. this.patientCode,
  832. this.consultationItemList,
  833. });
  834. factory ConsultationExportData.fromJson(Map<String, dynamic> map) {
  835. return ConsultationExportData(
  836. patientName: map['PatientName'],
  837. patientCode: map['PatientCode'],
  838. consultationItemList: map['ConsultationItemList'] != null ? (map['ConsultationItemList'] as List).map((e)=>ConsultationItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  839. );
  840. }
  841. Map<String, dynamic> toJson() {
  842. final map = Map<String, dynamic>();
  843. if(patientName != null)
  844. map['PatientName'] = patientName;
  845. if(patientCode != null)
  846. map['PatientCode'] = patientCode;
  847. if(consultationItemList != null)
  848. map['ConsultationItemList'] = consultationItemList;
  849. return map;
  850. }
  851. }
  852. class ConsultationReportItem {
  853. String? consultationCode;
  854. String? fileToken;
  855. DateTime? submissionTime;
  856. ConsultationReportItem({
  857. this.consultationCode,
  858. this.fileToken,
  859. this.submissionTime,
  860. });
  861. factory ConsultationReportItem.fromJson(Map<String, dynamic> map) {
  862. return ConsultationReportItem(
  863. consultationCode: map['ConsultationCode'],
  864. fileToken: map['FileToken'],
  865. submissionTime: map['SubmissionTime'] != null ? DateTime.parse(map['SubmissionTime']) : null,
  866. );
  867. }
  868. Map<String, dynamic> toJson() {
  869. final map = Map<String, dynamic>();
  870. if(consultationCode != null)
  871. map['ConsultationCode'] = consultationCode;
  872. if(fileToken != null)
  873. map['FileToken'] = fileToken;
  874. if(submissionTime != null)
  875. map['SubmissionTime'] = JsonRpcUtils.dateFormat(submissionTime!);
  876. return map;
  877. }
  878. }
  879. class ConsultationReportData {
  880. String? patientName;
  881. String? patientCode;
  882. List<ConsultationReportItem >? reportItemList;
  883. ConsultationReportData({
  884. this.patientName,
  885. this.patientCode,
  886. this.reportItemList,
  887. });
  888. factory ConsultationReportData.fromJson(Map<String, dynamic> map) {
  889. return ConsultationReportData(
  890. patientName: map['PatientName'],
  891. patientCode: map['PatientCode'],
  892. reportItemList: map['ReportItemList'] != null ? (map['ReportItemList'] as List).map((e)=>ConsultationReportItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  893. );
  894. }
  895. Map<String, dynamic> toJson() {
  896. final map = Map<String, dynamic>();
  897. if(patientName != null)
  898. map['PatientName'] = patientName;
  899. if(patientCode != null)
  900. map['PatientCode'] = patientCode;
  901. if(reportItemList != null)
  902. map['ReportItemList'] = reportItemList;
  903. return map;
  904. }
  905. }
  906. enum RemedicalFileDataTypeEnum {
  907. VinnoVidSingle,
  908. ThirdVidSingle,
  909. VinnoVidMovie,
  910. ThirdVidMovie,
  911. Image,
  912. }
  913. enum ConsultationFileTypeEnum {
  914. Screenshot,
  915. UltrasoundImage,
  916. MeasurementImage,
  917. }
  918. class ConsultationFileItem {
  919. String? consultationCode;
  920. String? fileToken;
  921. RemedicalFileDataTypeEnum fileDataType;
  922. ConsultationFileTypeEnum consultationFileType;
  923. DateTime? submissionTime;
  924. ConsultationFileItem({
  925. this.consultationCode,
  926. this.fileToken,
  927. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  928. this.consultationFileType = ConsultationFileTypeEnum.Screenshot,
  929. this.submissionTime,
  930. });
  931. factory ConsultationFileItem.fromJson(Map<String, dynamic> map) {
  932. return ConsultationFileItem(
  933. consultationCode: map['ConsultationCode'],
  934. fileToken: map['FileToken'],
  935. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  936. consultationFileType: ConsultationFileTypeEnum.values.firstWhere((e) => e.index == map['ConsultationFileType']),
  937. submissionTime: map['SubmissionTime'] != null ? DateTime.parse(map['SubmissionTime']) : null,
  938. );
  939. }
  940. Map<String, dynamic> toJson() {
  941. final map = Map<String, dynamic>();
  942. if(consultationCode != null)
  943. map['ConsultationCode'] = consultationCode;
  944. if(fileToken != null)
  945. map['FileToken'] = fileToken;
  946. map['FileDataType'] = fileDataType.index;
  947. map['ConsultationFileType'] = consultationFileType.index;
  948. if(submissionTime != null)
  949. map['SubmissionTime'] = JsonRpcUtils.dateFormat(submissionTime!);
  950. return map;
  951. }
  952. }
  953. class ConsultationFileData {
  954. String? patientName;
  955. String? patientCode;
  956. List<ConsultationFileItem >? consultationFileItemList;
  957. ConsultationFileData({
  958. this.patientName,
  959. this.patientCode,
  960. this.consultationFileItemList,
  961. });
  962. factory ConsultationFileData.fromJson(Map<String, dynamic> map) {
  963. return ConsultationFileData(
  964. patientName: map['PatientName'],
  965. patientCode: map['PatientCode'],
  966. consultationFileItemList: map['ConsultationFileItemList'] != null ? (map['ConsultationFileItemList'] as List).map((e)=>ConsultationFileItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  967. );
  968. }
  969. Map<String, dynamic> toJson() {
  970. final map = Map<String, dynamic>();
  971. if(patientName != null)
  972. map['PatientName'] = patientName;
  973. if(patientCode != null)
  974. map['PatientCode'] = patientCode;
  975. if(consultationFileItemList != null)
  976. map['ConsultationFileItemList'] = consultationFileItemList;
  977. return map;
  978. }
  979. }
  980. class ExportConsultationDataResult {
  981. List<ConsultationExportData >? consultationList;
  982. List<ConsultationReportData >? reportList;
  983. List<ConsultationFileData >? consultationFileDatalList;
  984. ExportConsultationDataResult({
  985. this.consultationList,
  986. this.reportList,
  987. this.consultationFileDatalList,
  988. });
  989. factory ExportConsultationDataResult.fromJson(Map<String, dynamic> map) {
  990. return ExportConsultationDataResult(
  991. consultationList: map['ConsultationList'] != null ? (map['ConsultationList'] as List).map((e)=>ConsultationExportData.fromJson(e as Map<String,dynamic>)).toList() : null,
  992. reportList: map['ReportList'] != null ? (map['ReportList'] as List).map((e)=>ConsultationReportData.fromJson(e as Map<String,dynamic>)).toList() : null,
  993. consultationFileDatalList: map['ConsultationFileDatalList'] != null ? (map['ConsultationFileDatalList'] as List).map((e)=>ConsultationFileData.fromJson(e as Map<String,dynamic>)).toList() : null,
  994. );
  995. }
  996. Map<String, dynamic> toJson() {
  997. final map = Map<String, dynamic>();
  998. if(consultationList != null)
  999. map['ConsultationList'] = consultationList;
  1000. if(reportList != null)
  1001. map['ReportList'] = reportList;
  1002. if(consultationFileDatalList != null)
  1003. map['ConsultationFileDatalList'] = consultationFileDatalList;
  1004. return map;
  1005. }
  1006. }
  1007. class ExportConsultationsRequest extends TokenRequest{
  1008. bool isExportReport;
  1009. bool isExportConsultation;
  1010. bool isExportConsultationFileData;
  1011. String? keyword;
  1012. DateTime? startDate;
  1013. DateTime? endDate;
  1014. QueryConsultationStatusEnum consultationStatus;
  1015. ConsultationQueryTypeEnum consultationQueryType;
  1016. QueryEvaluateGradeEnum evaluateGrade;
  1017. String? language;
  1018. List<String >? expertCodes;
  1019. List<String >? applyOrganizationCodes;
  1020. List<String >? expertOrganizationCodes;
  1021. String? patientSex;
  1022. QueryPatientAgeLimitDTO? patientAgeLimit;
  1023. String? patientDiseases;
  1024. String? patientPrimaryDiagnosis;
  1025. ExportConsultationsRequest({
  1026. this.isExportReport = false,
  1027. this.isExportConsultation = false,
  1028. this.isExportConsultationFileData = false,
  1029. this.keyword,
  1030. this.startDate,
  1031. this.endDate,
  1032. this.consultationStatus = QueryConsultationStatusEnum.All,
  1033. this.consultationQueryType = ConsultationQueryTypeEnum.All,
  1034. this.evaluateGrade = QueryEvaluateGradeEnum.All,
  1035. this.language,
  1036. this.expertCodes,
  1037. this.applyOrganizationCodes,
  1038. this.expertOrganizationCodes,
  1039. this.patientSex,
  1040. this.patientAgeLimit,
  1041. this.patientDiseases,
  1042. this.patientPrimaryDiagnosis,
  1043. String? token,
  1044. }) : super(
  1045. token: token,
  1046. );
  1047. factory ExportConsultationsRequest.fromJson(Map<String, dynamic> map) {
  1048. return ExportConsultationsRequest(
  1049. isExportReport: map['IsExportReport'],
  1050. isExportConsultation: map['IsExportConsultation'],
  1051. isExportConsultationFileData: map['IsExportConsultationFileData'],
  1052. keyword: map['Keyword'],
  1053. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  1054. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  1055. consultationStatus: QueryConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  1056. consultationQueryType: ConsultationQueryTypeEnum.values.firstWhere((e) => e.index == map['ConsultationQueryType']),
  1057. evaluateGrade: QueryEvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  1058. language: map['Language'],
  1059. expertCodes: map['ExpertCodes'] != null ? map['ExpertCodes'].cast<String>().toList() : null,
  1060. applyOrganizationCodes: map['ApplyOrganizationCodes'] != null ? map['ApplyOrganizationCodes'].cast<String>().toList() : null,
  1061. expertOrganizationCodes: map['ExpertOrganizationCodes'] != null ? map['ExpertOrganizationCodes'].cast<String>().toList() : null,
  1062. patientSex: map['PatientSex'],
  1063. patientAgeLimit: map['PatientAgeLimit'] != null ? QueryPatientAgeLimitDTO.fromJson(map['PatientAgeLimit']) : null,
  1064. patientDiseases: map['PatientDiseases'],
  1065. patientPrimaryDiagnosis: map['PatientPrimaryDiagnosis'],
  1066. token: map['Token'],
  1067. );
  1068. }
  1069. Map<String, dynamic> toJson() {
  1070. final map = super.toJson();
  1071. map['IsExportReport'] = isExportReport;
  1072. map['IsExportConsultation'] = isExportConsultation;
  1073. map['IsExportConsultationFileData'] = isExportConsultationFileData;
  1074. if(keyword != null)
  1075. map['Keyword'] = keyword;
  1076. if(startDate != null)
  1077. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  1078. if(endDate != null)
  1079. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  1080. map['ConsultationStatus'] = consultationStatus.index;
  1081. map['ConsultationQueryType'] = consultationQueryType.index;
  1082. map['EvaluateGrade'] = evaluateGrade.index;
  1083. if(language != null)
  1084. map['Language'] = language;
  1085. if(expertCodes != null)
  1086. map['ExpertCodes'] = expertCodes;
  1087. if(applyOrganizationCodes != null)
  1088. map['ApplyOrganizationCodes'] = applyOrganizationCodes;
  1089. if(expertOrganizationCodes != null)
  1090. map['ExpertOrganizationCodes'] = expertOrganizationCodes;
  1091. if(patientSex != null)
  1092. map['PatientSex'] = patientSex;
  1093. if(patientAgeLimit != null)
  1094. map['PatientAgeLimit'] = patientAgeLimit;
  1095. if(patientDiseases != null)
  1096. map['PatientDiseases'] = patientDiseases;
  1097. if(patientPrimaryDiagnosis != null)
  1098. map['PatientPrimaryDiagnosis'] = patientPrimaryDiagnosis;
  1099. return map;
  1100. }
  1101. }
  1102. enum OrganizationPatientTypeEnum {
  1103. Person,
  1104. Animals,
  1105. }
  1106. class ConsultationFileDTO {
  1107. String? sourceUrl;
  1108. String? previewImageUrl;
  1109. String? coverImageUrl;
  1110. DateTime? createTime;
  1111. String? creatorCode;
  1112. String? creatorName;
  1113. RemedicalFileDataTypeEnum fileDataType;
  1114. ConsultationFileTypeEnum consultationFileType;
  1115. String? remedicalCode;
  1116. String? remedicalMeasureCode;
  1117. ConsultationFileDTO({
  1118. this.sourceUrl,
  1119. this.previewImageUrl,
  1120. this.coverImageUrl,
  1121. this.createTime,
  1122. this.creatorCode,
  1123. this.creatorName,
  1124. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1125. this.consultationFileType = ConsultationFileTypeEnum.Screenshot,
  1126. this.remedicalCode,
  1127. this.remedicalMeasureCode,
  1128. });
  1129. factory ConsultationFileDTO.fromJson(Map<String, dynamic> map) {
  1130. return ConsultationFileDTO(
  1131. sourceUrl: map['SourceUrl'],
  1132. previewImageUrl: map['PreviewImageUrl'],
  1133. coverImageUrl: map['CoverImageUrl'],
  1134. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1135. creatorCode: map['CreatorCode'],
  1136. creatorName: map['CreatorName'],
  1137. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1138. consultationFileType: ConsultationFileTypeEnum.values.firstWhere((e) => e.index == map['ConsultationFileType']),
  1139. remedicalCode: map['RemedicalCode'],
  1140. remedicalMeasureCode: map['RemedicalMeasureCode'],
  1141. );
  1142. }
  1143. Map<String, dynamic> toJson() {
  1144. final map = Map<String, dynamic>();
  1145. if(sourceUrl != null)
  1146. map['SourceUrl'] = sourceUrl;
  1147. if(previewImageUrl != null)
  1148. map['PreviewImageUrl'] = previewImageUrl;
  1149. if(coverImageUrl != null)
  1150. map['CoverImageUrl'] = coverImageUrl;
  1151. if(createTime != null)
  1152. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  1153. if(creatorCode != null)
  1154. map['CreatorCode'] = creatorCode;
  1155. if(creatorName != null)
  1156. map['CreatorName'] = creatorName;
  1157. map['FileDataType'] = fileDataType.index;
  1158. map['ConsultationFileType'] = consultationFileType.index;
  1159. if(remedicalCode != null)
  1160. map['RemedicalCode'] = remedicalCode;
  1161. if(remedicalMeasureCode != null)
  1162. map['RemedicalMeasureCode'] = remedicalMeasureCode;
  1163. return map;
  1164. }
  1165. }
  1166. class ConsultationMemberDTO {
  1167. String? memberCode;
  1168. String? memberOrganizationCode;
  1169. String? memberDepartmentCode;
  1170. LiveConsultationMemberStatus memberStatus;
  1171. DateTime? memberOperateTime;
  1172. String? name;
  1173. String? headImageToken;
  1174. ConsultationMemberDTO({
  1175. this.memberCode,
  1176. this.memberOrganizationCode,
  1177. this.memberDepartmentCode,
  1178. this.memberStatus = LiveConsultationMemberStatus.Default,
  1179. this.memberOperateTime,
  1180. this.name,
  1181. this.headImageToken,
  1182. });
  1183. factory ConsultationMemberDTO.fromJson(Map<String, dynamic> map) {
  1184. return ConsultationMemberDTO(
  1185. memberCode: map['MemberCode'],
  1186. memberOrganizationCode: map['MemberOrganizationCode'],
  1187. memberDepartmentCode: map['MemberDepartmentCode'],
  1188. memberStatus: LiveConsultationMemberStatus.values.firstWhere((e) => e.index == map['MemberStatus']),
  1189. memberOperateTime: map['MemberOperateTime'] != null ? DateTime.parse(map['MemberOperateTime']) : null,
  1190. name: map['Name'],
  1191. headImageToken: map['HeadImageToken'],
  1192. );
  1193. }
  1194. Map<String, dynamic> toJson() {
  1195. final map = Map<String, dynamic>();
  1196. if(memberCode != null)
  1197. map['MemberCode'] = memberCode;
  1198. if(memberOrganizationCode != null)
  1199. map['MemberOrganizationCode'] = memberOrganizationCode;
  1200. if(memberDepartmentCode != null)
  1201. map['MemberDepartmentCode'] = memberDepartmentCode;
  1202. map['MemberStatus'] = memberStatus.index;
  1203. if(memberOperateTime != null)
  1204. map['MemberOperateTime'] = JsonRpcUtils.dateFormat(memberOperateTime!);
  1205. if(name != null)
  1206. map['Name'] = name;
  1207. if(headImageToken != null)
  1208. map['HeadImageToken'] = headImageToken;
  1209. return map;
  1210. }
  1211. }
  1212. enum ConsultationReminderTimeEnum {
  1213. FifteenMinutes,
  1214. ThirtyMinutes,
  1215. SixtyMinutes,
  1216. OneDay,
  1217. }
  1218. enum ConsultationReminderMode {
  1219. Application,
  1220. SMS,
  1221. }
  1222. class ConsultationReminderDTO {
  1223. ConsultationReminderTimeEnum consultationReminderTime;
  1224. ConsultationReminderMode consultationReminderMode;
  1225. bool isExecuted;
  1226. ConsultationReminderDTO({
  1227. this.consultationReminderTime = ConsultationReminderTimeEnum.FifteenMinutes,
  1228. this.consultationReminderMode = ConsultationReminderMode.Application,
  1229. this.isExecuted = false,
  1230. });
  1231. factory ConsultationReminderDTO.fromJson(Map<String, dynamic> map) {
  1232. return ConsultationReminderDTO(
  1233. consultationReminderTime: ConsultationReminderTimeEnum.values.firstWhere((e) => e.index == map['ConsultationReminderTime']),
  1234. consultationReminderMode: ConsultationReminderMode.values.firstWhere((e) => e.index == map['ConsultationReminderMode']),
  1235. isExecuted: map['IsExecuted'],
  1236. );
  1237. }
  1238. Map<String, dynamic> toJson() {
  1239. final map = Map<String, dynamic>();
  1240. map['ConsultationReminderTime'] = consultationReminderTime.index;
  1241. map['ConsultationReminderMode'] = consultationReminderMode.index;
  1242. map['IsExecuted'] = isExecuted;
  1243. return map;
  1244. }
  1245. }
  1246. enum ConsultationReportMode {
  1247. ExpertReport,
  1248. ApplicantReport,
  1249. }
  1250. enum EmergencyConsultationStatus {
  1251. Default,
  1252. Initiating,
  1253. Cancelled,
  1254. Accepted,
  1255. Rejected,
  1256. Failed,
  1257. }
  1258. class ConsultationDetailDTO {
  1259. String? consultationCode;
  1260. String? applyOrganizationCode;
  1261. String? applyDepartmentCode;
  1262. String? applyUserCode;
  1263. String? expertOrganizationCode;
  1264. String? expertDepartmentCode;
  1265. String? expertUserCode;
  1266. String? assistantUserCode;
  1267. String? assistantUserName;
  1268. String? deviceCode;
  1269. String? operateUserCode;
  1270. String? scanUserCode;
  1271. String? patientCode;
  1272. OrganizationPatientTypeEnum patientType;
  1273. String? scanPosition;
  1274. DateTime? createTime;
  1275. DateTime? consultationTime;
  1276. DateTime? consultationTimeEnd;
  1277. TransactionStatusEnum consultationStatus;
  1278. String? applyOrganizationName;
  1279. String? applyUserName;
  1280. String? operateUserName;
  1281. String? scanUserName;
  1282. String? expertOrganizationName;
  1283. String? expertUserName;
  1284. String? deviceName;
  1285. String? patientName;
  1286. String? sex;
  1287. List<DataItemDTO >? patientDatas;
  1288. List<ConsultationFileDTO >? consultationFileList;
  1289. String? rejectReason;
  1290. String? location;
  1291. List<ConsultationMemberDTO >? consultationMembers;
  1292. String? description;
  1293. List<ConsultationReminderDTO >? consultationReminders;
  1294. String? approverCode;
  1295. ConsultationReportMode reportMode;
  1296. String? diseases;
  1297. String? primaryDiagnosis;
  1298. String? initiatorCode;
  1299. bool isEmergency;
  1300. String? emergencyCode;
  1301. bool isUpdateConsultationShow;
  1302. bool isRevokeShow;
  1303. bool isApprovalShow;
  1304. bool isAddInviterShow;
  1305. bool isRejectShow;
  1306. bool isAcceptInvitationShow;
  1307. bool isRejectInvitationShow;
  1308. bool isInitiateShow;
  1309. bool isJoinInShow;
  1310. bool isReportShow;
  1311. bool isEvaluateShow;
  1312. bool isFollowUpShow;
  1313. bool isImproveShow;
  1314. bool isEditReportShow;
  1315. bool isDeleteShow;
  1316. EmergencyConsultationStatus emergencyStatus;
  1317. String? assistantDoctorUserCode;
  1318. String? assistantDoctorUserName;
  1319. ConsultationDetailDTO({
  1320. this.consultationCode,
  1321. this.applyOrganizationCode,
  1322. this.applyDepartmentCode,
  1323. this.applyUserCode,
  1324. this.expertOrganizationCode,
  1325. this.expertDepartmentCode,
  1326. this.expertUserCode,
  1327. this.assistantUserCode,
  1328. this.assistantUserName,
  1329. this.deviceCode,
  1330. this.operateUserCode,
  1331. this.scanUserCode,
  1332. this.patientCode,
  1333. this.patientType = OrganizationPatientTypeEnum.Person,
  1334. this.scanPosition,
  1335. this.createTime,
  1336. this.consultationTime,
  1337. this.consultationTimeEnd,
  1338. this.consultationStatus = TransactionStatusEnum.Applied,
  1339. this.applyOrganizationName,
  1340. this.applyUserName,
  1341. this.operateUserName,
  1342. this.scanUserName,
  1343. this.expertOrganizationName,
  1344. this.expertUserName,
  1345. this.deviceName,
  1346. this.patientName,
  1347. this.sex,
  1348. this.patientDatas,
  1349. this.consultationFileList,
  1350. this.rejectReason,
  1351. this.location,
  1352. this.consultationMembers,
  1353. this.description,
  1354. this.consultationReminders,
  1355. this.approverCode,
  1356. this.reportMode = ConsultationReportMode.ExpertReport,
  1357. this.diseases,
  1358. this.primaryDiagnosis,
  1359. this.initiatorCode,
  1360. this.isEmergency = false,
  1361. this.emergencyCode,
  1362. this.isUpdateConsultationShow = false,
  1363. this.isRevokeShow = false,
  1364. this.isApprovalShow = false,
  1365. this.isAddInviterShow = false,
  1366. this.isRejectShow = false,
  1367. this.isAcceptInvitationShow = false,
  1368. this.isRejectInvitationShow = false,
  1369. this.isInitiateShow = false,
  1370. this.isJoinInShow = false,
  1371. this.isReportShow = false,
  1372. this.isEvaluateShow = false,
  1373. this.isFollowUpShow = false,
  1374. this.isImproveShow = false,
  1375. this.isEditReportShow = false,
  1376. this.isDeleteShow = false,
  1377. this.emergencyStatus = EmergencyConsultationStatus.Default,
  1378. this.assistantDoctorUserCode,
  1379. this.assistantDoctorUserName,
  1380. });
  1381. factory ConsultationDetailDTO.fromJson(Map<String, dynamic> map) {
  1382. return ConsultationDetailDTO(
  1383. consultationCode: map['ConsultationCode'],
  1384. applyOrganizationCode: map['ApplyOrganizationCode'],
  1385. applyDepartmentCode: map['ApplyDepartmentCode'],
  1386. applyUserCode: map['ApplyUserCode'],
  1387. expertOrganizationCode: map['ExpertOrganizationCode'],
  1388. expertDepartmentCode: map['ExpertDepartmentCode'],
  1389. expertUserCode: map['ExpertUserCode'],
  1390. assistantUserCode: map['AssistantUserCode'],
  1391. assistantUserName: map['AssistantUserName'],
  1392. deviceCode: map['DeviceCode'],
  1393. operateUserCode: map['OperateUserCode'],
  1394. scanUserCode: map['ScanUserCode'],
  1395. patientCode: map['PatientCode'],
  1396. patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
  1397. scanPosition: map['ScanPosition'],
  1398. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1399. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  1400. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  1401. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  1402. applyOrganizationName: map['ApplyOrganizationName'],
  1403. applyUserName: map['ApplyUserName'],
  1404. operateUserName: map['OperateUserName'],
  1405. scanUserName: map['ScanUserName'],
  1406. expertOrganizationName: map['ExpertOrganizationName'],
  1407. expertUserName: map['ExpertUserName'],
  1408. deviceName: map['DeviceName'],
  1409. patientName: map['PatientName'],
  1410. sex: map['Sex'],
  1411. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1412. consultationFileList: map['ConsultationFileList'] != null ? (map['ConsultationFileList'] as List).map((e)=>ConsultationFileDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1413. rejectReason: map['RejectReason'],
  1414. location: map['Location'],
  1415. consultationMembers: map['ConsultationMembers'] != null ? (map['ConsultationMembers'] as List).map((e)=>ConsultationMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1416. description: map['Description'],
  1417. consultationReminders: map['ConsultationReminders'] != null ? (map['ConsultationReminders'] as List).map((e)=>ConsultationReminderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1418. approverCode: map['ApproverCode'],
  1419. reportMode: ConsultationReportMode.values.firstWhere((e) => e.index == map['ReportMode']),
  1420. diseases: map['Diseases'],
  1421. primaryDiagnosis: map['PrimaryDiagnosis'],
  1422. initiatorCode: map['InitiatorCode'],
  1423. isEmergency: map['IsEmergency'],
  1424. emergencyCode: map['EmergencyCode'],
  1425. isUpdateConsultationShow: map['IsUpdateConsultationShow'],
  1426. isRevokeShow: map['IsRevokeShow'],
  1427. isApprovalShow: map['IsApprovalShow'],
  1428. isAddInviterShow: map['IsAddInviterShow'],
  1429. isRejectShow: map['IsRejectShow'],
  1430. isAcceptInvitationShow: map['IsAcceptInvitationShow'],
  1431. isRejectInvitationShow: map['IsRejectInvitationShow'],
  1432. isInitiateShow: map['IsInitiateShow'],
  1433. isJoinInShow: map['IsJoinInShow'],
  1434. isReportShow: map['IsReportShow'],
  1435. isEvaluateShow: map['IsEvaluateShow'],
  1436. isFollowUpShow: map['IsFollowUpShow'],
  1437. isImproveShow: map['IsImproveShow'],
  1438. isEditReportShow: map['IsEditReportShow'],
  1439. isDeleteShow: map['IsDeleteShow'],
  1440. emergencyStatus: EmergencyConsultationStatus.values.firstWhere((e) => e.index == map['EmergencyStatus']),
  1441. assistantDoctorUserCode: map['AssistantDoctorUserCode'],
  1442. assistantDoctorUserName: map['AssistantDoctorUserName'],
  1443. );
  1444. }
  1445. Map<String, dynamic> toJson() {
  1446. final map = Map<String, dynamic>();
  1447. if(consultationCode != null)
  1448. map['ConsultationCode'] = consultationCode;
  1449. if(applyOrganizationCode != null)
  1450. map['ApplyOrganizationCode'] = applyOrganizationCode;
  1451. if(applyDepartmentCode != null)
  1452. map['ApplyDepartmentCode'] = applyDepartmentCode;
  1453. if(applyUserCode != null)
  1454. map['ApplyUserCode'] = applyUserCode;
  1455. if(expertOrganizationCode != null)
  1456. map['ExpertOrganizationCode'] = expertOrganizationCode;
  1457. if(expertDepartmentCode != null)
  1458. map['ExpertDepartmentCode'] = expertDepartmentCode;
  1459. if(expertUserCode != null)
  1460. map['ExpertUserCode'] = expertUserCode;
  1461. if(assistantUserCode != null)
  1462. map['AssistantUserCode'] = assistantUserCode;
  1463. if(assistantUserName != null)
  1464. map['AssistantUserName'] = assistantUserName;
  1465. if(deviceCode != null)
  1466. map['DeviceCode'] = deviceCode;
  1467. if(operateUserCode != null)
  1468. map['OperateUserCode'] = operateUserCode;
  1469. if(scanUserCode != null)
  1470. map['ScanUserCode'] = scanUserCode;
  1471. if(patientCode != null)
  1472. map['PatientCode'] = patientCode;
  1473. map['PatientType'] = patientType.index;
  1474. if(scanPosition != null)
  1475. map['ScanPosition'] = scanPosition;
  1476. if(createTime != null)
  1477. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  1478. if(consultationTime != null)
  1479. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  1480. if(consultationTimeEnd != null)
  1481. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  1482. map['ConsultationStatus'] = consultationStatus.index;
  1483. if(applyOrganizationName != null)
  1484. map['ApplyOrganizationName'] = applyOrganizationName;
  1485. if(applyUserName != null)
  1486. map['ApplyUserName'] = applyUserName;
  1487. if(operateUserName != null)
  1488. map['OperateUserName'] = operateUserName;
  1489. if(scanUserName != null)
  1490. map['ScanUserName'] = scanUserName;
  1491. if(expertOrganizationName != null)
  1492. map['ExpertOrganizationName'] = expertOrganizationName;
  1493. if(expertUserName != null)
  1494. map['ExpertUserName'] = expertUserName;
  1495. if(deviceName != null)
  1496. map['DeviceName'] = deviceName;
  1497. if(patientName != null)
  1498. map['PatientName'] = patientName;
  1499. if(sex != null)
  1500. map['Sex'] = sex;
  1501. if(patientDatas != null)
  1502. map['PatientDatas'] = patientDatas;
  1503. if(consultationFileList != null)
  1504. map['ConsultationFileList'] = consultationFileList;
  1505. if(rejectReason != null)
  1506. map['RejectReason'] = rejectReason;
  1507. if(location != null)
  1508. map['Location'] = location;
  1509. if(consultationMembers != null)
  1510. map['ConsultationMembers'] = consultationMembers;
  1511. if(description != null)
  1512. map['Description'] = description;
  1513. if(consultationReminders != null)
  1514. map['ConsultationReminders'] = consultationReminders;
  1515. if(approverCode != null)
  1516. map['ApproverCode'] = approverCode;
  1517. map['ReportMode'] = reportMode.index;
  1518. if(diseases != null)
  1519. map['Diseases'] = diseases;
  1520. if(primaryDiagnosis != null)
  1521. map['PrimaryDiagnosis'] = primaryDiagnosis;
  1522. if(initiatorCode != null)
  1523. map['InitiatorCode'] = initiatorCode;
  1524. map['IsEmergency'] = isEmergency;
  1525. if(emergencyCode != null)
  1526. map['EmergencyCode'] = emergencyCode;
  1527. map['IsUpdateConsultationShow'] = isUpdateConsultationShow;
  1528. map['IsRevokeShow'] = isRevokeShow;
  1529. map['IsApprovalShow'] = isApprovalShow;
  1530. map['IsAddInviterShow'] = isAddInviterShow;
  1531. map['IsRejectShow'] = isRejectShow;
  1532. map['IsAcceptInvitationShow'] = isAcceptInvitationShow;
  1533. map['IsRejectInvitationShow'] = isRejectInvitationShow;
  1534. map['IsInitiateShow'] = isInitiateShow;
  1535. map['IsJoinInShow'] = isJoinInShow;
  1536. map['IsReportShow'] = isReportShow;
  1537. map['IsEvaluateShow'] = isEvaluateShow;
  1538. map['IsFollowUpShow'] = isFollowUpShow;
  1539. map['IsImproveShow'] = isImproveShow;
  1540. map['IsEditReportShow'] = isEditReportShow;
  1541. map['IsDeleteShow'] = isDeleteShow;
  1542. map['EmergencyStatus'] = emergencyStatus.index;
  1543. if(assistantDoctorUserCode != null)
  1544. map['AssistantDoctorUserCode'] = assistantDoctorUserCode;
  1545. if(assistantDoctorUserName != null)
  1546. map['AssistantDoctorUserName'] = assistantDoctorUserName;
  1547. return map;
  1548. }
  1549. }
  1550. class FindConsultationDetailRequest extends TokenRequest{
  1551. String? consultationCode;
  1552. FindConsultationDetailRequest({
  1553. this.consultationCode,
  1554. String? token,
  1555. }) : super(
  1556. token: token,
  1557. );
  1558. factory FindConsultationDetailRequest.fromJson(Map<String, dynamic> map) {
  1559. return FindConsultationDetailRequest(
  1560. consultationCode: map['ConsultationCode'],
  1561. token: map['Token'],
  1562. );
  1563. }
  1564. Map<String, dynamic> toJson() {
  1565. final map = super.toJson();
  1566. if(consultationCode != null)
  1567. map['ConsultationCode'] = consultationCode;
  1568. return map;
  1569. }
  1570. }
  1571. class ApprovalConsultationRequest extends TokenRequest{
  1572. String? consultationCode;
  1573. String? expertUserCode;
  1574. DateTime? consultationTime;
  1575. DateTime? consultationTimeEnd;
  1576. String? location;
  1577. List<String >? consultationMemberCodes;
  1578. String? description;
  1579. List<ConsultationReminderDTO >? consultationReminders;
  1580. ApprovalConsultationRequest({
  1581. this.consultationCode,
  1582. this.expertUserCode,
  1583. this.consultationTime,
  1584. this.consultationTimeEnd,
  1585. this.location,
  1586. this.consultationMemberCodes,
  1587. this.description,
  1588. this.consultationReminders,
  1589. String? token,
  1590. }) : super(
  1591. token: token,
  1592. );
  1593. factory ApprovalConsultationRequest.fromJson(Map<String, dynamic> map) {
  1594. return ApprovalConsultationRequest(
  1595. consultationCode: map['ConsultationCode'],
  1596. expertUserCode: map['ExpertUserCode'],
  1597. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  1598. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  1599. location: map['Location'],
  1600. consultationMemberCodes: map['ConsultationMemberCodes'] != null ? map['ConsultationMemberCodes'].cast<String>().toList() : null,
  1601. description: map['Description'],
  1602. consultationReminders: map['ConsultationReminders'] != null ? (map['ConsultationReminders'] as List).map((e)=>ConsultationReminderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1603. token: map['Token'],
  1604. );
  1605. }
  1606. Map<String, dynamic> toJson() {
  1607. final map = super.toJson();
  1608. if(consultationCode != null)
  1609. map['ConsultationCode'] = consultationCode;
  1610. if(expertUserCode != null)
  1611. map['ExpertUserCode'] = expertUserCode;
  1612. if(consultationTime != null)
  1613. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  1614. if(consultationTimeEnd != null)
  1615. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  1616. if(location != null)
  1617. map['Location'] = location;
  1618. if(consultationMemberCodes != null)
  1619. map['ConsultationMemberCodes'] = consultationMemberCodes;
  1620. if(description != null)
  1621. map['Description'] = description;
  1622. if(consultationReminders != null)
  1623. map['ConsultationReminders'] = consultationReminders;
  1624. return map;
  1625. }
  1626. }
  1627. class RejectApplyConsultationRequest extends TokenRequest{
  1628. String? consultationCode;
  1629. String? reason;
  1630. RejectApplyConsultationRequest({
  1631. this.consultationCode,
  1632. this.reason,
  1633. String? token,
  1634. }) : super(
  1635. token: token,
  1636. );
  1637. factory RejectApplyConsultationRequest.fromJson(Map<String, dynamic> map) {
  1638. return RejectApplyConsultationRequest(
  1639. consultationCode: map['ConsultationCode'],
  1640. reason: map['Reason'],
  1641. token: map['Token'],
  1642. );
  1643. }
  1644. Map<String, dynamic> toJson() {
  1645. final map = super.toJson();
  1646. if(consultationCode != null)
  1647. map['ConsultationCode'] = consultationCode;
  1648. if(reason != null)
  1649. map['Reason'] = reason;
  1650. return map;
  1651. }
  1652. }
  1653. class RevokeConsultationRequest extends TokenRequest{
  1654. String? consultationCode;
  1655. RevokeConsultationRequest({
  1656. this.consultationCode,
  1657. String? token,
  1658. }) : super(
  1659. token: token,
  1660. );
  1661. factory RevokeConsultationRequest.fromJson(Map<String, dynamic> map) {
  1662. return RevokeConsultationRequest(
  1663. consultationCode: map['ConsultationCode'],
  1664. token: map['Token'],
  1665. );
  1666. }
  1667. Map<String, dynamic> toJson() {
  1668. final map = super.toJson();
  1669. if(consultationCode != null)
  1670. map['ConsultationCode'] = consultationCode;
  1671. return map;
  1672. }
  1673. }
  1674. class DeleteConsultationRequest extends TokenRequest{
  1675. String? consultationCode;
  1676. DeleteConsultationRequest({
  1677. this.consultationCode,
  1678. String? token,
  1679. }) : super(
  1680. token: token,
  1681. );
  1682. factory DeleteConsultationRequest.fromJson(Map<String, dynamic> map) {
  1683. return DeleteConsultationRequest(
  1684. consultationCode: map['ConsultationCode'],
  1685. token: map['Token'],
  1686. );
  1687. }
  1688. Map<String, dynamic> toJson() {
  1689. final map = super.toJson();
  1690. if(consultationCode != null)
  1691. map['ConsultationCode'] = consultationCode;
  1692. return map;
  1693. }
  1694. }
  1695. class ConsultationFileBaseDTO {
  1696. String? sourceUrl;
  1697. String? previewImageUrl;
  1698. String? coverImageUrl;
  1699. RemedicalFileDataTypeEnum fileDataType;
  1700. ConsultationFileTypeEnum consultationFileType;
  1701. ConsultationFileBaseDTO({
  1702. this.sourceUrl,
  1703. this.previewImageUrl,
  1704. this.coverImageUrl,
  1705. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1706. this.consultationFileType = ConsultationFileTypeEnum.Screenshot,
  1707. });
  1708. factory ConsultationFileBaseDTO.fromJson(Map<String, dynamic> map) {
  1709. return ConsultationFileBaseDTO(
  1710. sourceUrl: map['SourceUrl'],
  1711. previewImageUrl: map['PreviewImageUrl'],
  1712. coverImageUrl: map['CoverImageUrl'],
  1713. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1714. consultationFileType: ConsultationFileTypeEnum.values.firstWhere((e) => e.index == map['ConsultationFileType']),
  1715. );
  1716. }
  1717. Map<String, dynamic> toJson() {
  1718. final map = Map<String, dynamic>();
  1719. if(sourceUrl != null)
  1720. map['SourceUrl'] = sourceUrl;
  1721. if(previewImageUrl != null)
  1722. map['PreviewImageUrl'] = previewImageUrl;
  1723. if(coverImageUrl != null)
  1724. map['CoverImageUrl'] = coverImageUrl;
  1725. map['FileDataType'] = fileDataType.index;
  1726. map['ConsultationFileType'] = consultationFileType.index;
  1727. return map;
  1728. }
  1729. }
  1730. class UpdateConsultationFilesInfoRequest extends TokenRequest{
  1731. String? consultationCode;
  1732. List<ConsultationFileBaseDTO >? fileInfos;
  1733. UpdateConsultationFilesInfoRequest({
  1734. this.consultationCode,
  1735. this.fileInfos,
  1736. String? token,
  1737. }) : super(
  1738. token: token,
  1739. );
  1740. factory UpdateConsultationFilesInfoRequest.fromJson(Map<String, dynamic> map) {
  1741. return UpdateConsultationFilesInfoRequest(
  1742. consultationCode: map['ConsultationCode'],
  1743. fileInfos: map['FileInfos'] != null ? (map['FileInfos'] as List).map((e)=>ConsultationFileBaseDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1744. token: map['Token'],
  1745. );
  1746. }
  1747. Map<String, dynamic> toJson() {
  1748. final map = super.toJson();
  1749. if(consultationCode != null)
  1750. map['ConsultationCode'] = consultationCode;
  1751. if(fileInfos != null)
  1752. map['FileInfos'] = fileInfos;
  1753. return map;
  1754. }
  1755. }
  1756. class ConsultationAssistantDTO extends UserBaseDTO{
  1757. String? fullName;
  1758. ConsultationAssistantDTO({
  1759. this.fullName,
  1760. String? userCode,
  1761. String? userName,
  1762. String? headImageUrl,
  1763. DateTime? createTime,
  1764. DateTime? updateTime,
  1765. }) : super(
  1766. userCode: userCode,
  1767. userName: userName,
  1768. headImageUrl: headImageUrl,
  1769. createTime: createTime,
  1770. updateTime: updateTime,
  1771. );
  1772. factory ConsultationAssistantDTO.fromJson(Map<String, dynamic> map) {
  1773. return ConsultationAssistantDTO(
  1774. fullName: map['FullName'],
  1775. userCode: map['UserCode'],
  1776. userName: map['UserName'],
  1777. headImageUrl: map['HeadImageUrl'],
  1778. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1779. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1780. );
  1781. }
  1782. Map<String, dynamic> toJson() {
  1783. final map = super.toJson();
  1784. if(fullName != null)
  1785. map['FullName'] = fullName;
  1786. return map;
  1787. }
  1788. }
  1789. class FindOrganizationAssistantsRequest extends TokenRequest{
  1790. String? assistantName;
  1791. FindOrganizationAssistantsRequest({
  1792. this.assistantName,
  1793. String? token,
  1794. }) : super(
  1795. token: token,
  1796. );
  1797. factory FindOrganizationAssistantsRequest.fromJson(Map<String, dynamic> map) {
  1798. return FindOrganizationAssistantsRequest(
  1799. assistantName: map['AssistantName'],
  1800. token: map['Token'],
  1801. );
  1802. }
  1803. Map<String, dynamic> toJson() {
  1804. final map = super.toJson();
  1805. if(assistantName != null)
  1806. map['AssistantName'] = assistantName;
  1807. return map;
  1808. }
  1809. }
  1810. class ConsultationAssistantDoctorDTO extends UserBaseDTO{
  1811. String? fullName;
  1812. ConsultationAssistantDoctorDTO({
  1813. this.fullName,
  1814. String? userCode,
  1815. String? userName,
  1816. String? headImageUrl,
  1817. DateTime? createTime,
  1818. DateTime? updateTime,
  1819. }) : super(
  1820. userCode: userCode,
  1821. userName: userName,
  1822. headImageUrl: headImageUrl,
  1823. createTime: createTime,
  1824. updateTime: updateTime,
  1825. );
  1826. factory ConsultationAssistantDoctorDTO.fromJson(Map<String, dynamic> map) {
  1827. return ConsultationAssistantDoctorDTO(
  1828. fullName: map['FullName'],
  1829. userCode: map['UserCode'],
  1830. userName: map['UserName'],
  1831. headImageUrl: map['HeadImageUrl'],
  1832. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1833. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1834. );
  1835. }
  1836. Map<String, dynamic> toJson() {
  1837. final map = super.toJson();
  1838. if(fullName != null)
  1839. map['FullName'] = fullName;
  1840. return map;
  1841. }
  1842. }
  1843. class FindOrganizationAssistantDoctorsRequest extends TokenRequest{
  1844. String? assistantDoctorName;
  1845. FindOrganizationAssistantDoctorsRequest({
  1846. this.assistantDoctorName,
  1847. String? token,
  1848. }) : super(
  1849. token: token,
  1850. );
  1851. factory FindOrganizationAssistantDoctorsRequest.fromJson(Map<String, dynamic> map) {
  1852. return FindOrganizationAssistantDoctorsRequest(
  1853. assistantDoctorName: map['AssistantDoctorName'],
  1854. token: map['Token'],
  1855. );
  1856. }
  1857. Map<String, dynamic> toJson() {
  1858. final map = super.toJson();
  1859. if(assistantDoctorName != null)
  1860. map['AssistantDoctorName'] = assistantDoctorName;
  1861. return map;
  1862. }
  1863. }
  1864. class UpdateMyOrganizationAssistantRequest extends TokenRequest{
  1865. String? assistantUserCode;
  1866. String? assistantDoctorUserCode;
  1867. UpdateMyOrganizationAssistantRequest({
  1868. this.assistantUserCode,
  1869. this.assistantDoctorUserCode,
  1870. String? token,
  1871. }) : super(
  1872. token: token,
  1873. );
  1874. factory UpdateMyOrganizationAssistantRequest.fromJson(Map<String, dynamic> map) {
  1875. return UpdateMyOrganizationAssistantRequest(
  1876. assistantUserCode: map['AssistantUserCode'],
  1877. assistantDoctorUserCode: map['AssistantDoctorUserCode'],
  1878. token: map['Token'],
  1879. );
  1880. }
  1881. Map<String, dynamic> toJson() {
  1882. final map = super.toJson();
  1883. if(assistantUserCode != null)
  1884. map['AssistantUserCode'] = assistantUserCode;
  1885. if(assistantDoctorUserCode != null)
  1886. map['AssistantDoctorUserCode'] = assistantDoctorUserCode;
  1887. return map;
  1888. }
  1889. }
  1890. class ClientPatientInfoBaseDTO extends BaseDTO{
  1891. String? patientCode;
  1892. bool isValid;
  1893. List<DataItemDTO >? patientData;
  1894. int unReadRecordCount;
  1895. bool isReferral;
  1896. List<String >? devicePatientIDs;
  1897. ClientPatientInfoBaseDTO({
  1898. this.patientCode,
  1899. this.isValid = false,
  1900. this.patientData,
  1901. this.unReadRecordCount = 0,
  1902. this.isReferral = false,
  1903. this.devicePatientIDs,
  1904. DateTime? createTime,
  1905. DateTime? updateTime,
  1906. }) : super(
  1907. createTime: createTime,
  1908. updateTime: updateTime,
  1909. );
  1910. factory ClientPatientInfoBaseDTO.fromJson(Map<String, dynamic> map) {
  1911. return ClientPatientInfoBaseDTO(
  1912. patientCode: map['PatientCode'],
  1913. isValid: map['IsValid'],
  1914. patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1915. unReadRecordCount: map['UnReadRecordCount'],
  1916. isReferral: map['IsReferral'],
  1917. devicePatientIDs: map['DevicePatientIDs'] != null ? map['DevicePatientIDs'].cast<String>().toList() : null,
  1918. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1919. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1920. );
  1921. }
  1922. Map<String, dynamic> toJson() {
  1923. final map = super.toJson();
  1924. if(patientCode != null)
  1925. map['PatientCode'] = patientCode;
  1926. map['IsValid'] = isValid;
  1927. if(patientData != null)
  1928. map['PatientData'] = patientData;
  1929. map['UnReadRecordCount'] = unReadRecordCount;
  1930. map['IsReferral'] = isReferral;
  1931. if(devicePatientIDs != null)
  1932. map['DevicePatientIDs'] = devicePatientIDs;
  1933. return map;
  1934. }
  1935. }
  1936. class FindConsultationPatientPageRequest extends PageRequest{
  1937. String? keyword;
  1938. DateTime? startDate;
  1939. DateTime? endDate;
  1940. FindConsultationPatientPageRequest({
  1941. this.keyword,
  1942. this.startDate,
  1943. this.endDate,
  1944. int pageIndex = 0,
  1945. int pageSize = 0,
  1946. String? token,
  1947. }) : super(
  1948. pageIndex: pageIndex,
  1949. pageSize: pageSize,
  1950. token: token,
  1951. );
  1952. factory FindConsultationPatientPageRequest.fromJson(Map<String, dynamic> map) {
  1953. return FindConsultationPatientPageRequest(
  1954. keyword: map['Keyword'],
  1955. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  1956. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  1957. pageIndex: map['PageIndex'],
  1958. pageSize: map['PageSize'],
  1959. token: map['Token'],
  1960. );
  1961. }
  1962. Map<String, dynamic> toJson() {
  1963. final map = super.toJson();
  1964. if(keyword != null)
  1965. map['Keyword'] = keyword;
  1966. if(startDate != null)
  1967. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  1968. if(endDate != null)
  1969. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  1970. return map;
  1971. }
  1972. }
  1973. class FindCanSwitchConsultationsRequest extends TokenRequest{
  1974. String? consultationCode;
  1975. String? language;
  1976. FindCanSwitchConsultationsRequest({
  1977. this.consultationCode,
  1978. this.language,
  1979. String? token,
  1980. }) : super(
  1981. token: token,
  1982. );
  1983. factory FindCanSwitchConsultationsRequest.fromJson(Map<String, dynamic> map) {
  1984. return FindCanSwitchConsultationsRequest(
  1985. consultationCode: map['ConsultationCode'],
  1986. language: map['Language'],
  1987. token: map['Token'],
  1988. );
  1989. }
  1990. Map<String, dynamic> toJson() {
  1991. final map = super.toJson();
  1992. if(consultationCode != null)
  1993. map['ConsultationCode'] = consultationCode;
  1994. if(language != null)
  1995. map['Language'] = language;
  1996. return map;
  1997. }
  1998. }
  1999. class InitiateLiveConsultationResult {
  2000. String? consultationCode;
  2001. String? initiatorCode;
  2002. int roomNo;
  2003. int appId;
  2004. String? userSign;
  2005. List<LiveConsultationMember >? memberLiveDatas;
  2006. InitiateLiveConsultationResult({
  2007. this.consultationCode,
  2008. this.initiatorCode,
  2009. this.roomNo = 0,
  2010. this.appId = 0,
  2011. this.userSign,
  2012. this.memberLiveDatas,
  2013. });
  2014. factory InitiateLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2015. return InitiateLiveConsultationResult(
  2016. consultationCode: map['ConsultationCode'],
  2017. initiatorCode: map['InitiatorCode'],
  2018. roomNo: map['RoomNo'],
  2019. appId: map['AppId'],
  2020. userSign: map['UserSign'],
  2021. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  2022. );
  2023. }
  2024. Map<String, dynamic> toJson() {
  2025. final map = Map<String, dynamic>();
  2026. if(consultationCode != null)
  2027. map['ConsultationCode'] = consultationCode;
  2028. if(initiatorCode != null)
  2029. map['InitiatorCode'] = initiatorCode;
  2030. map['RoomNo'] = roomNo;
  2031. map['AppId'] = appId;
  2032. if(userSign != null)
  2033. map['UserSign'] = userSign;
  2034. if(memberLiveDatas != null)
  2035. map['MemberLiveDatas'] = memberLiveDatas;
  2036. return map;
  2037. }
  2038. }
  2039. class InitiateLiveConsultationRequest extends TokenRequest{
  2040. String? consultationCode;
  2041. InitiateLiveConsultationRequest({
  2042. this.consultationCode,
  2043. String? token,
  2044. }) : super(
  2045. token: token,
  2046. );
  2047. factory InitiateLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2048. return InitiateLiveConsultationRequest(
  2049. consultationCode: map['ConsultationCode'],
  2050. token: map['Token'],
  2051. );
  2052. }
  2053. Map<String, dynamic> toJson() {
  2054. final map = super.toJson();
  2055. if(consultationCode != null)
  2056. map['ConsultationCode'] = consultationCode;
  2057. return map;
  2058. }
  2059. }
  2060. class InviteInLiveConsultationResult {
  2061. String? consultationCode;
  2062. InviteInLiveConsultationResult({
  2063. this.consultationCode,
  2064. });
  2065. factory InviteInLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2066. return InviteInLiveConsultationResult(
  2067. consultationCode: map['ConsultationCode'],
  2068. );
  2069. }
  2070. Map<String, dynamic> toJson() {
  2071. final map = Map<String, dynamic>();
  2072. if(consultationCode != null)
  2073. map['ConsultationCode'] = consultationCode;
  2074. return map;
  2075. }
  2076. }
  2077. class InviteInLiveConsultationRequest extends TokenRequest{
  2078. String? consultationCode;
  2079. List<String >? inviteCodes;
  2080. int roomNo;
  2081. InviteInLiveConsultationRequest({
  2082. this.consultationCode,
  2083. this.inviteCodes,
  2084. this.roomNo = 0,
  2085. String? token,
  2086. }) : super(
  2087. token: token,
  2088. );
  2089. factory InviteInLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2090. return InviteInLiveConsultationRequest(
  2091. consultationCode: map['ConsultationCode'],
  2092. inviteCodes: map['InviteCodes'] != null ? map['InviteCodes'].cast<String>().toList() : null,
  2093. roomNo: map['RoomNo'],
  2094. token: map['Token'],
  2095. );
  2096. }
  2097. Map<String, dynamic> toJson() {
  2098. final map = super.toJson();
  2099. if(consultationCode != null)
  2100. map['ConsultationCode'] = consultationCode;
  2101. if(inviteCodes != null)
  2102. map['InviteCodes'] = inviteCodes;
  2103. map['RoomNo'] = roomNo;
  2104. return map;
  2105. }
  2106. }
  2107. class CancelInvitingInLiveConsultationResult {
  2108. String? consultationCode;
  2109. CancelInvitingInLiveConsultationResult({
  2110. this.consultationCode,
  2111. });
  2112. factory CancelInvitingInLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2113. return CancelInvitingInLiveConsultationResult(
  2114. consultationCode: map['ConsultationCode'],
  2115. );
  2116. }
  2117. Map<String, dynamic> toJson() {
  2118. final map = Map<String, dynamic>();
  2119. if(consultationCode != null)
  2120. map['ConsultationCode'] = consultationCode;
  2121. return map;
  2122. }
  2123. }
  2124. class CancelInvitingInLiveConsultationRequest extends TokenRequest{
  2125. String? consultationCode;
  2126. List<String >? inviteCodes;
  2127. CancelInvitingInLiveConsultationRequest({
  2128. this.consultationCode,
  2129. this.inviteCodes,
  2130. String? token,
  2131. }) : super(
  2132. token: token,
  2133. );
  2134. factory CancelInvitingInLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2135. return CancelInvitingInLiveConsultationRequest(
  2136. consultationCode: map['ConsultationCode'],
  2137. inviteCodes: map['InviteCodes'] != null ? map['InviteCodes'].cast<String>().toList() : null,
  2138. token: map['Token'],
  2139. );
  2140. }
  2141. Map<String, dynamic> toJson() {
  2142. final map = super.toJson();
  2143. if(consultationCode != null)
  2144. map['ConsultationCode'] = consultationCode;
  2145. if(inviteCodes != null)
  2146. map['InviteCodes'] = inviteCodes;
  2147. return map;
  2148. }
  2149. }
  2150. class RejectLiveConsultationResult {
  2151. String? consultationCode;
  2152. RejectLiveConsultationResult({
  2153. this.consultationCode,
  2154. });
  2155. factory RejectLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2156. return RejectLiveConsultationResult(
  2157. consultationCode: map['ConsultationCode'],
  2158. );
  2159. }
  2160. Map<String, dynamic> toJson() {
  2161. final map = Map<String, dynamic>();
  2162. if(consultationCode != null)
  2163. map['ConsultationCode'] = consultationCode;
  2164. return map;
  2165. }
  2166. }
  2167. class RejectLiveConsultationRequest extends TokenRequest{
  2168. String? consultationCode;
  2169. RejectLiveConsultationRequest({
  2170. this.consultationCode,
  2171. String? token,
  2172. }) : super(
  2173. token: token,
  2174. );
  2175. factory RejectLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2176. return RejectLiveConsultationRequest(
  2177. consultationCode: map['ConsultationCode'],
  2178. token: map['Token'],
  2179. );
  2180. }
  2181. Map<String, dynamic> toJson() {
  2182. final map = super.toJson();
  2183. if(consultationCode != null)
  2184. map['ConsultationCode'] = consultationCode;
  2185. return map;
  2186. }
  2187. }
  2188. class InteractiveBoardDataDTO {
  2189. String? userCode;
  2190. String? boardData;
  2191. DateTime? interactiveTime;
  2192. InteractiveBoardDataDTO({
  2193. this.userCode,
  2194. this.boardData,
  2195. this.interactiveTime,
  2196. });
  2197. factory InteractiveBoardDataDTO.fromJson(Map<String, dynamic> map) {
  2198. return InteractiveBoardDataDTO(
  2199. userCode: map['UserCode'],
  2200. boardData: map['BoardData'],
  2201. interactiveTime: map['InteractiveTime'] != null ? DateTime.parse(map['InteractiveTime']) : null,
  2202. );
  2203. }
  2204. Map<String, dynamic> toJson() {
  2205. final map = Map<String, dynamic>();
  2206. if(userCode != null)
  2207. map['UserCode'] = userCode;
  2208. if(boardData != null)
  2209. map['BoardData'] = boardData;
  2210. if(interactiveTime != null)
  2211. map['InteractiveTime'] = JsonRpcUtils.dateFormat(interactiveTime!);
  2212. return map;
  2213. }
  2214. }
  2215. class JoinLiveConsultationResult {
  2216. String? consultationCode;
  2217. String? userCode;
  2218. int roomNo;
  2219. int appId;
  2220. String? userSign;
  2221. List<LiveConsultationMember >? memberLiveDatas;
  2222. List<InteractiveBoardDataDTO >? interactiveBoardDatas;
  2223. JoinLiveConsultationResult({
  2224. this.consultationCode,
  2225. this.userCode,
  2226. this.roomNo = 0,
  2227. this.appId = 0,
  2228. this.userSign,
  2229. this.memberLiveDatas,
  2230. this.interactiveBoardDatas,
  2231. });
  2232. factory JoinLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2233. return JoinLiveConsultationResult(
  2234. consultationCode: map['ConsultationCode'],
  2235. userCode: map['UserCode'],
  2236. roomNo: map['RoomNo'],
  2237. appId: map['AppId'],
  2238. userSign: map['UserSign'],
  2239. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  2240. interactiveBoardDatas: map['InteractiveBoardDatas'] != null ? (map['InteractiveBoardDatas'] as List).map((e)=>InteractiveBoardDataDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2241. );
  2242. }
  2243. Map<String, dynamic> toJson() {
  2244. final map = Map<String, dynamic>();
  2245. if(consultationCode != null)
  2246. map['ConsultationCode'] = consultationCode;
  2247. if(userCode != null)
  2248. map['UserCode'] = userCode;
  2249. map['RoomNo'] = roomNo;
  2250. map['AppId'] = appId;
  2251. if(userSign != null)
  2252. map['UserSign'] = userSign;
  2253. if(memberLiveDatas != null)
  2254. map['MemberLiveDatas'] = memberLiveDatas;
  2255. if(interactiveBoardDatas != null)
  2256. map['InteractiveBoardDatas'] = interactiveBoardDatas;
  2257. return map;
  2258. }
  2259. }
  2260. class JoinLiveConsultationRequest extends TokenRequest{
  2261. String? consultationCode;
  2262. bool needCall;
  2263. JoinLiveConsultationRequest({
  2264. this.consultationCode,
  2265. this.needCall = false,
  2266. String? token,
  2267. }) : super(
  2268. token: token,
  2269. );
  2270. factory JoinLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2271. return JoinLiveConsultationRequest(
  2272. consultationCode: map['ConsultationCode'],
  2273. needCall: map['NeedCall'],
  2274. token: map['Token'],
  2275. );
  2276. }
  2277. Map<String, dynamic> toJson() {
  2278. final map = super.toJson();
  2279. if(consultationCode != null)
  2280. map['ConsultationCode'] = consultationCode;
  2281. map['NeedCall'] = needCall;
  2282. return map;
  2283. }
  2284. }
  2285. class CancelLiveConsultationResult {
  2286. String? consultationCode;
  2287. CancelLiveConsultationResult({
  2288. this.consultationCode,
  2289. });
  2290. factory CancelLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2291. return CancelLiveConsultationResult(
  2292. consultationCode: map['ConsultationCode'],
  2293. );
  2294. }
  2295. Map<String, dynamic> toJson() {
  2296. final map = Map<String, dynamic>();
  2297. if(consultationCode != null)
  2298. map['ConsultationCode'] = consultationCode;
  2299. return map;
  2300. }
  2301. }
  2302. class CancelLiveConsultationRequest extends TokenRequest{
  2303. String? consultationCode;
  2304. CancelLiveConsultationRequest({
  2305. this.consultationCode,
  2306. String? token,
  2307. }) : super(
  2308. token: token,
  2309. );
  2310. factory CancelLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2311. return CancelLiveConsultationRequest(
  2312. consultationCode: map['ConsultationCode'],
  2313. token: map['Token'],
  2314. );
  2315. }
  2316. Map<String, dynamic> toJson() {
  2317. final map = super.toJson();
  2318. if(consultationCode != null)
  2319. map['ConsultationCode'] = consultationCode;
  2320. return map;
  2321. }
  2322. }
  2323. class AcceptLiveConsultationResult {
  2324. String? consultationCode;
  2325. String? userCode;
  2326. int roomNo;
  2327. int appId;
  2328. String? userSign;
  2329. List<LiveConsultationMember >? memberLiveDatas;
  2330. List<InteractiveBoardDataDTO >? interactiveBoardDatas;
  2331. AcceptLiveConsultationResult({
  2332. this.consultationCode,
  2333. this.userCode,
  2334. this.roomNo = 0,
  2335. this.appId = 0,
  2336. this.userSign,
  2337. this.memberLiveDatas,
  2338. this.interactiveBoardDatas,
  2339. });
  2340. factory AcceptLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2341. return AcceptLiveConsultationResult(
  2342. consultationCode: map['ConsultationCode'],
  2343. userCode: map['UserCode'],
  2344. roomNo: map['RoomNo'],
  2345. appId: map['AppId'],
  2346. userSign: map['UserSign'],
  2347. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  2348. interactiveBoardDatas: map['InteractiveBoardDatas'] != null ? (map['InteractiveBoardDatas'] as List).map((e)=>InteractiveBoardDataDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2349. );
  2350. }
  2351. Map<String, dynamic> toJson() {
  2352. final map = Map<String, dynamic>();
  2353. if(consultationCode != null)
  2354. map['ConsultationCode'] = consultationCode;
  2355. if(userCode != null)
  2356. map['UserCode'] = userCode;
  2357. map['RoomNo'] = roomNo;
  2358. map['AppId'] = appId;
  2359. if(userSign != null)
  2360. map['UserSign'] = userSign;
  2361. if(memberLiveDatas != null)
  2362. map['MemberLiveDatas'] = memberLiveDatas;
  2363. if(interactiveBoardDatas != null)
  2364. map['InteractiveBoardDatas'] = interactiveBoardDatas;
  2365. return map;
  2366. }
  2367. }
  2368. class AcceptLiveConsultationRequest extends TokenRequest{
  2369. String? consultationCode;
  2370. AcceptLiveConsultationRequest({
  2371. this.consultationCode,
  2372. String? token,
  2373. }) : super(
  2374. token: token,
  2375. );
  2376. factory AcceptLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2377. return AcceptLiveConsultationRequest(
  2378. consultationCode: map['ConsultationCode'],
  2379. token: map['Token'],
  2380. );
  2381. }
  2382. Map<String, dynamic> toJson() {
  2383. final map = super.toJson();
  2384. if(consultationCode != null)
  2385. map['ConsultationCode'] = consultationCode;
  2386. return map;
  2387. }
  2388. }
  2389. class LeaveLiveConsultationResult {
  2390. String? consultationCode;
  2391. LeaveLiveConsultationResult({
  2392. this.consultationCode,
  2393. });
  2394. factory LeaveLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2395. return LeaveLiveConsultationResult(
  2396. consultationCode: map['ConsultationCode'],
  2397. );
  2398. }
  2399. Map<String, dynamic> toJson() {
  2400. final map = Map<String, dynamic>();
  2401. if(consultationCode != null)
  2402. map['ConsultationCode'] = consultationCode;
  2403. return map;
  2404. }
  2405. }
  2406. class LeaveLiveConsultationRequest extends TokenRequest{
  2407. String? consultationCode;
  2408. LeaveLiveConsultationRequest({
  2409. this.consultationCode,
  2410. String? token,
  2411. }) : super(
  2412. token: token,
  2413. );
  2414. factory LeaveLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2415. return LeaveLiveConsultationRequest(
  2416. consultationCode: map['ConsultationCode'],
  2417. token: map['Token'],
  2418. );
  2419. }
  2420. Map<String, dynamic> toJson() {
  2421. final map = super.toJson();
  2422. if(consultationCode != null)
  2423. map['ConsultationCode'] = consultationCode;
  2424. return map;
  2425. }
  2426. }
  2427. class MuteLiveConsultationResult {
  2428. String? consultationCode;
  2429. MuteLiveConsultationResult({
  2430. this.consultationCode,
  2431. });
  2432. factory MuteLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  2433. return MuteLiveConsultationResult(
  2434. consultationCode: map['ConsultationCode'],
  2435. );
  2436. }
  2437. Map<String, dynamic> toJson() {
  2438. final map = Map<String, dynamic>();
  2439. if(consultationCode != null)
  2440. map['ConsultationCode'] = consultationCode;
  2441. return map;
  2442. }
  2443. }
  2444. class MuteLiveConsultationRequest extends TokenRequest{
  2445. String? consultationCode;
  2446. bool mute;
  2447. MuteLiveConsultationRequest({
  2448. this.consultationCode,
  2449. this.mute = false,
  2450. String? token,
  2451. }) : super(
  2452. token: token,
  2453. );
  2454. factory MuteLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  2455. return MuteLiveConsultationRequest(
  2456. consultationCode: map['ConsultationCode'],
  2457. mute: map['Mute'],
  2458. token: map['Token'],
  2459. );
  2460. }
  2461. Map<String, dynamic> toJson() {
  2462. final map = super.toJson();
  2463. if(consultationCode != null)
  2464. map['ConsultationCode'] = consultationCode;
  2465. map['Mute'] = mute;
  2466. return map;
  2467. }
  2468. }
  2469. class SwitchLiveConsultationVideoResult {
  2470. String? consultationCode;
  2471. SwitchLiveConsultationVideoResult({
  2472. this.consultationCode,
  2473. });
  2474. factory SwitchLiveConsultationVideoResult.fromJson(Map<String, dynamic> map) {
  2475. return SwitchLiveConsultationVideoResult(
  2476. consultationCode: map['ConsultationCode'],
  2477. );
  2478. }
  2479. Map<String, dynamic> toJson() {
  2480. final map = Map<String, dynamic>();
  2481. if(consultationCode != null)
  2482. map['ConsultationCode'] = consultationCode;
  2483. return map;
  2484. }
  2485. }
  2486. class SwitchLiveConsultationVideoRequest extends TokenRequest{
  2487. String? consultationCode;
  2488. bool opened;
  2489. SwitchLiveConsultationVideoRequest({
  2490. this.consultationCode,
  2491. this.opened = false,
  2492. String? token,
  2493. }) : super(
  2494. token: token,
  2495. );
  2496. factory SwitchLiveConsultationVideoRequest.fromJson(Map<String, dynamic> map) {
  2497. return SwitchLiveConsultationVideoRequest(
  2498. consultationCode: map['ConsultationCode'],
  2499. opened: map['Opened'],
  2500. token: map['Token'],
  2501. );
  2502. }
  2503. Map<String, dynamic> toJson() {
  2504. final map = super.toJson();
  2505. if(consultationCode != null)
  2506. map['ConsultationCode'] = consultationCode;
  2507. map['Opened'] = opened;
  2508. return map;
  2509. }
  2510. }
  2511. class LiveConsultationHeartRateResult {
  2512. String? consultationCode;
  2513. LiveConsultationHeartRateResult({
  2514. this.consultationCode,
  2515. });
  2516. factory LiveConsultationHeartRateResult.fromJson(Map<String, dynamic> map) {
  2517. return LiveConsultationHeartRateResult(
  2518. consultationCode: map['ConsultationCode'],
  2519. );
  2520. }
  2521. Map<String, dynamic> toJson() {
  2522. final map = Map<String, dynamic>();
  2523. if(consultationCode != null)
  2524. map['ConsultationCode'] = consultationCode;
  2525. return map;
  2526. }
  2527. }
  2528. class LiveConsultationHeartRateRequest extends TokenRequest{
  2529. String? consultationCode;
  2530. LiveConsultationHeartRateRequest({
  2531. this.consultationCode,
  2532. String? token,
  2533. }) : super(
  2534. token: token,
  2535. );
  2536. factory LiveConsultationHeartRateRequest.fromJson(Map<String, dynamic> map) {
  2537. return LiveConsultationHeartRateRequest(
  2538. consultationCode: map['ConsultationCode'],
  2539. token: map['Token'],
  2540. );
  2541. }
  2542. Map<String, dynamic> toJson() {
  2543. final map = super.toJson();
  2544. if(consultationCode != null)
  2545. map['ConsultationCode'] = consultationCode;
  2546. return map;
  2547. }
  2548. }
  2549. class SendInteractiveBoardDataRequest extends TokenRequest{
  2550. String? consultationCode;
  2551. bool isClear;
  2552. String? boardData;
  2553. SendInteractiveBoardDataRequest({
  2554. this.consultationCode,
  2555. this.isClear = false,
  2556. this.boardData,
  2557. String? token,
  2558. }) : super(
  2559. token: token,
  2560. );
  2561. factory SendInteractiveBoardDataRequest.fromJson(Map<String, dynamic> map) {
  2562. return SendInteractiveBoardDataRequest(
  2563. consultationCode: map['ConsultationCode'],
  2564. isClear: map['IsClear'],
  2565. boardData: map['BoardData'],
  2566. token: map['Token'],
  2567. );
  2568. }
  2569. Map<String, dynamic> toJson() {
  2570. final map = super.toJson();
  2571. if(consultationCode != null)
  2572. map['ConsultationCode'] = consultationCode;
  2573. map['IsClear'] = isClear;
  2574. if(boardData != null)
  2575. map['BoardData'] = boardData;
  2576. return map;
  2577. }
  2578. }
  2579. class AddFollowUpVisitInfoRequest extends TokenRequest{
  2580. String? consultationRecordCode;
  2581. String? generalCase;
  2582. DateTime? occurredTime;
  2583. AddFollowUpVisitInfoRequest({
  2584. this.consultationRecordCode,
  2585. this.generalCase,
  2586. this.occurredTime,
  2587. String? token,
  2588. }) : super(
  2589. token: token,
  2590. );
  2591. factory AddFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2592. return AddFollowUpVisitInfoRequest(
  2593. consultationRecordCode: map['ConsultationRecordCode'],
  2594. generalCase: map['GeneralCase'],
  2595. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  2596. token: map['Token'],
  2597. );
  2598. }
  2599. Map<String, dynamic> toJson() {
  2600. final map = super.toJson();
  2601. if(consultationRecordCode != null)
  2602. map['ConsultationRecordCode'] = consultationRecordCode;
  2603. if(generalCase != null)
  2604. map['GeneralCase'] = generalCase;
  2605. if(occurredTime != null)
  2606. map['OccurredTime'] = JsonRpcUtils.dateFormat(occurredTime!);
  2607. return map;
  2608. }
  2609. }
  2610. class DeleteFollowUpVisitInfoRequest extends TokenRequest{
  2611. String? followUpVisitCode;
  2612. DeleteFollowUpVisitInfoRequest({
  2613. this.followUpVisitCode,
  2614. String? token,
  2615. }) : super(
  2616. token: token,
  2617. );
  2618. factory DeleteFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2619. return DeleteFollowUpVisitInfoRequest(
  2620. followUpVisitCode: map['FollowUpVisitCode'],
  2621. token: map['Token'],
  2622. );
  2623. }
  2624. Map<String, dynamic> toJson() {
  2625. final map = super.toJson();
  2626. if(followUpVisitCode != null)
  2627. map['FollowUpVisitCode'] = followUpVisitCode;
  2628. return map;
  2629. }
  2630. }
  2631. class UpdateFollowUpVisitInfoRequest extends TokenRequest{
  2632. String? followUpVisitCode;
  2633. String? generalCase;
  2634. UpdateFollowUpVisitInfoRequest({
  2635. this.followUpVisitCode,
  2636. this.generalCase,
  2637. String? token,
  2638. }) : super(
  2639. token: token,
  2640. );
  2641. factory UpdateFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2642. return UpdateFollowUpVisitInfoRequest(
  2643. followUpVisitCode: map['FollowUpVisitCode'],
  2644. generalCase: map['GeneralCase'],
  2645. token: map['Token'],
  2646. );
  2647. }
  2648. Map<String, dynamic> toJson() {
  2649. final map = super.toJson();
  2650. if(followUpVisitCode != null)
  2651. map['FollowUpVisitCode'] = followUpVisitCode;
  2652. if(generalCase != null)
  2653. map['GeneralCase'] = generalCase;
  2654. return map;
  2655. }
  2656. }
  2657. class FollowUpVisitDTO {
  2658. String? followUpVisitCode;
  2659. String? consultationRecordCode;
  2660. String? patientName;
  2661. String? patientPhone;
  2662. String? generalCase;
  2663. String? clinicalSituation;
  2664. String? doctorCode;
  2665. String? doctorName;
  2666. DateTime? occurredTime;
  2667. FollowUpVisitDTO({
  2668. this.followUpVisitCode,
  2669. this.consultationRecordCode,
  2670. this.patientName,
  2671. this.patientPhone,
  2672. this.generalCase,
  2673. this.clinicalSituation,
  2674. this.doctorCode,
  2675. this.doctorName,
  2676. this.occurredTime,
  2677. });
  2678. factory FollowUpVisitDTO.fromJson(Map<String, dynamic> map) {
  2679. return FollowUpVisitDTO(
  2680. followUpVisitCode: map['FollowUpVisitCode'],
  2681. consultationRecordCode: map['ConsultationRecordCode'],
  2682. patientName: map['PatientName'],
  2683. patientPhone: map['PatientPhone'],
  2684. generalCase: map['GeneralCase'],
  2685. clinicalSituation: map['ClinicalSituation'],
  2686. doctorCode: map['DoctorCode'],
  2687. doctorName: map['DoctorName'],
  2688. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  2689. );
  2690. }
  2691. Map<String, dynamic> toJson() {
  2692. final map = Map<String, dynamic>();
  2693. if(followUpVisitCode != null)
  2694. map['FollowUpVisitCode'] = followUpVisitCode;
  2695. if(consultationRecordCode != null)
  2696. map['ConsultationRecordCode'] = consultationRecordCode;
  2697. if(patientName != null)
  2698. map['PatientName'] = patientName;
  2699. if(patientPhone != null)
  2700. map['PatientPhone'] = patientPhone;
  2701. if(generalCase != null)
  2702. map['GeneralCase'] = generalCase;
  2703. if(clinicalSituation != null)
  2704. map['ClinicalSituation'] = clinicalSituation;
  2705. if(doctorCode != null)
  2706. map['DoctorCode'] = doctorCode;
  2707. if(doctorName != null)
  2708. map['DoctorName'] = doctorName;
  2709. if(occurredTime != null)
  2710. map['OccurredTime'] = JsonRpcUtils.dateFormat(occurredTime!);
  2711. return map;
  2712. }
  2713. }
  2714. class GetFollowUpVisitInfoRequest extends TokenRequest{
  2715. String? consultationRecordCode;
  2716. GetFollowUpVisitInfoRequest({
  2717. this.consultationRecordCode,
  2718. String? token,
  2719. }) : super(
  2720. token: token,
  2721. );
  2722. factory GetFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2723. return GetFollowUpVisitInfoRequest(
  2724. consultationRecordCode: map['ConsultationRecordCode'],
  2725. token: map['Token'],
  2726. );
  2727. }
  2728. Map<String, dynamic> toJson() {
  2729. final map = super.toJson();
  2730. if(consultationRecordCode != null)
  2731. map['ConsultationRecordCode'] = consultationRecordCode;
  2732. return map;
  2733. }
  2734. }
  2735. class GetFollowUpVisitInfoDetailRequest extends TokenRequest{
  2736. String? followUpVisitCode;
  2737. GetFollowUpVisitInfoDetailRequest({
  2738. this.followUpVisitCode,
  2739. String? token,
  2740. }) : super(
  2741. token: token,
  2742. );
  2743. factory GetFollowUpVisitInfoDetailRequest.fromJson(Map<String, dynamic> map) {
  2744. return GetFollowUpVisitInfoDetailRequest(
  2745. followUpVisitCode: map['FollowUpVisitCode'],
  2746. token: map['Token'],
  2747. );
  2748. }
  2749. Map<String, dynamic> toJson() {
  2750. final map = super.toJson();
  2751. if(followUpVisitCode != null)
  2752. map['FollowUpVisitCode'] = followUpVisitCode;
  2753. return map;
  2754. }
  2755. }
  2756. class SetNeedFollowUpVisitRequest extends TokenRequest{
  2757. String? consultationRecordCode;
  2758. bool isNeed;
  2759. SetNeedFollowUpVisitRequest({
  2760. this.consultationRecordCode,
  2761. this.isNeed = false,
  2762. String? token,
  2763. }) : super(
  2764. token: token,
  2765. );
  2766. factory SetNeedFollowUpVisitRequest.fromJson(Map<String, dynamic> map) {
  2767. return SetNeedFollowUpVisitRequest(
  2768. consultationRecordCode: map['ConsultationRecordCode'],
  2769. isNeed: map['IsNeed'],
  2770. token: map['Token'],
  2771. );
  2772. }
  2773. Map<String, dynamic> toJson() {
  2774. final map = super.toJson();
  2775. if(consultationRecordCode != null)
  2776. map['ConsultationRecordCode'] = consultationRecordCode;
  2777. map['IsNeed'] = isNeed;
  2778. return map;
  2779. }
  2780. }
  2781. class AddConsultationEvaluateRequest extends TokenRequest{
  2782. String? consultationRecordCode;
  2783. double evaluateScore;
  2784. String? feedback;
  2785. AddConsultationEvaluateRequest({
  2786. this.consultationRecordCode,
  2787. this.evaluateScore = 0,
  2788. this.feedback,
  2789. String? token,
  2790. }) : super(
  2791. token: token,
  2792. );
  2793. factory AddConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2794. return AddConsultationEvaluateRequest(
  2795. consultationRecordCode: map['ConsultationRecordCode'],
  2796. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2797. feedback: map['Feedback'],
  2798. token: map['Token'],
  2799. );
  2800. }
  2801. Map<String, dynamic> toJson() {
  2802. final map = super.toJson();
  2803. if(consultationRecordCode != null)
  2804. map['ConsultationRecordCode'] = consultationRecordCode;
  2805. map['EvaluateScore'] = evaluateScore;
  2806. if(feedback != null)
  2807. map['Feedback'] = feedback;
  2808. return map;
  2809. }
  2810. }
  2811. class DeleteConsultationEvaluateRequest extends TokenRequest{
  2812. String? consultationEvaluateCode;
  2813. DeleteConsultationEvaluateRequest({
  2814. this.consultationEvaluateCode,
  2815. String? token,
  2816. }) : super(
  2817. token: token,
  2818. );
  2819. factory DeleteConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2820. return DeleteConsultationEvaluateRequest(
  2821. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2822. token: map['Token'],
  2823. );
  2824. }
  2825. Map<String, dynamic> toJson() {
  2826. final map = super.toJson();
  2827. if(consultationEvaluateCode != null)
  2828. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2829. return map;
  2830. }
  2831. }
  2832. class UpdateConsultationEvaluateRequest extends TokenRequest{
  2833. String? consultationEvaluateCode;
  2834. double evaluateScore;
  2835. String? feedback;
  2836. UpdateConsultationEvaluateRequest({
  2837. this.consultationEvaluateCode,
  2838. this.evaluateScore = 0,
  2839. this.feedback,
  2840. String? token,
  2841. }) : super(
  2842. token: token,
  2843. );
  2844. factory UpdateConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2845. return UpdateConsultationEvaluateRequest(
  2846. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2847. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2848. feedback: map['Feedback'],
  2849. token: map['Token'],
  2850. );
  2851. }
  2852. Map<String, dynamic> toJson() {
  2853. final map = super.toJson();
  2854. if(consultationEvaluateCode != null)
  2855. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2856. map['EvaluateScore'] = evaluateScore;
  2857. if(feedback != null)
  2858. map['Feedback'] = feedback;
  2859. return map;
  2860. }
  2861. }
  2862. class ConsultationEvaluateDTO {
  2863. String? consultationEvaluateCode;
  2864. String? consultationRecordCode;
  2865. EvaluateGradeEnum evaluateGrade;
  2866. double evaluateScore;
  2867. String? feedback;
  2868. ConsultationEvaluateDTO({
  2869. this.consultationEvaluateCode,
  2870. this.consultationRecordCode,
  2871. this.evaluateGrade = EvaluateGradeEnum.UnSet,
  2872. this.evaluateScore = 0,
  2873. this.feedback,
  2874. });
  2875. factory ConsultationEvaluateDTO.fromJson(Map<String, dynamic> map) {
  2876. return ConsultationEvaluateDTO(
  2877. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2878. consultationRecordCode: map['ConsultationRecordCode'],
  2879. evaluateGrade: EvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  2880. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2881. feedback: map['Feedback'],
  2882. );
  2883. }
  2884. Map<String, dynamic> toJson() {
  2885. final map = Map<String, dynamic>();
  2886. if(consultationEvaluateCode != null)
  2887. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2888. if(consultationRecordCode != null)
  2889. map['ConsultationRecordCode'] = consultationRecordCode;
  2890. map['EvaluateGrade'] = evaluateGrade.index;
  2891. map['EvaluateScore'] = evaluateScore;
  2892. if(feedback != null)
  2893. map['Feedback'] = feedback;
  2894. return map;
  2895. }
  2896. }
  2897. class GetConsultationEvaluateRequest extends TokenRequest{
  2898. String? consultationRecordCode;
  2899. GetConsultationEvaluateRequest({
  2900. this.consultationRecordCode,
  2901. String? token,
  2902. }) : super(
  2903. token: token,
  2904. );
  2905. factory GetConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2906. return GetConsultationEvaluateRequest(
  2907. consultationRecordCode: map['ConsultationRecordCode'],
  2908. token: map['Token'],
  2909. );
  2910. }
  2911. Map<String, dynamic> toJson() {
  2912. final map = super.toJson();
  2913. if(consultationRecordCode != null)
  2914. map['ConsultationRecordCode'] = consultationRecordCode;
  2915. return map;
  2916. }
  2917. }
  2918. class AcceptInvitationRequest extends TokenRequest{
  2919. String? consultationRecordCode;
  2920. bool isAgree;
  2921. String? refusalCause;
  2922. AcceptInvitationRequest({
  2923. this.consultationRecordCode,
  2924. this.isAgree = false,
  2925. this.refusalCause,
  2926. String? token,
  2927. }) : super(
  2928. token: token,
  2929. );
  2930. factory AcceptInvitationRequest.fromJson(Map<String, dynamic> map) {
  2931. return AcceptInvitationRequest(
  2932. consultationRecordCode: map['ConsultationRecordCode'],
  2933. isAgree: map['IsAgree'],
  2934. refusalCause: map['RefusalCause'],
  2935. token: map['Token'],
  2936. );
  2937. }
  2938. Map<String, dynamic> toJson() {
  2939. final map = super.toJson();
  2940. if(consultationRecordCode != null)
  2941. map['ConsultationRecordCode'] = consultationRecordCode;
  2942. map['IsAgree'] = isAgree;
  2943. if(refusalCause != null)
  2944. map['RefusalCause'] = refusalCause;
  2945. return map;
  2946. }
  2947. }
  2948. class ApplyEmergencyTreatmentRequest extends TokenRequest{
  2949. String? deviceUniqueCode;
  2950. ApplyEmergencyTreatmentRequest({
  2951. this.deviceUniqueCode,
  2952. String? token,
  2953. }) : super(
  2954. token: token,
  2955. );
  2956. factory ApplyEmergencyTreatmentRequest.fromJson(Map<String, dynamic> map) {
  2957. return ApplyEmergencyTreatmentRequest(
  2958. deviceUniqueCode: map['DeviceUniqueCode'],
  2959. token: map['Token'],
  2960. );
  2961. }
  2962. Map<String, dynamic> toJson() {
  2963. final map = super.toJson();
  2964. if(deviceUniqueCode != null)
  2965. map['DeviceUniqueCode'] = deviceUniqueCode;
  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? title;
  3720. String? cTitle;
  3721. String? eTitle;
  3722. String? icon;
  3723. String? description;
  3724. String? url;
  3725. int index;
  3726. AssociatedInfoDTO({
  3727. this.id,
  3728. this.title,
  3729. this.cTitle,
  3730. this.eTitle,
  3731. this.icon,
  3732. this.description,
  3733. this.url,
  3734. this.index = 0,
  3735. });
  3736. factory AssociatedInfoDTO.fromJson(Map<String, dynamic> map) {
  3737. return AssociatedInfoDTO(
  3738. id: map['Id'],
  3739. title: map['Title'],
  3740. cTitle: map['CTitle'],
  3741. eTitle: map['ETitle'],
  3742. icon: map['Icon'],
  3743. description: map['Description'],
  3744. url: map['Url'],
  3745. index: map['Index'],
  3746. );
  3747. }
  3748. Map<String, dynamic> toJson() {
  3749. final map = Map<String, dynamic>();
  3750. if(id != null)
  3751. map['Id'] = id;
  3752. if(title != null)
  3753. map['Title'] = title;
  3754. if(cTitle != null)
  3755. map['CTitle'] = cTitle;
  3756. if(eTitle != null)
  3757. map['ETitle'] = eTitle;
  3758. if(icon != null)
  3759. map['Icon'] = icon;
  3760. if(description != null)
  3761. map['Description'] = description;
  3762. if(url != null)
  3763. map['Url'] = url;
  3764. map['Index'] = index;
  3765. return map;
  3766. }
  3767. }
  3768. class UserDTO extends UserBaseDTO{
  3769. String? phone;
  3770. String? email;
  3771. String? nickName;
  3772. String? fullName;
  3773. String? organizationCode;
  3774. String? organizationName;
  3775. String? rootOrganizationCode;
  3776. String? rootOrganizationName;
  3777. List<String >? authorityGroups;
  3778. List<String >? bindDevices;
  3779. String? lastIP;
  3780. int logintimes;
  3781. UserInfoStateEnum userState;
  3782. List<String >? roleCodes;
  3783. List<String >? rankCodes;
  3784. List<String >? positionCodes;
  3785. ApplyStateEnum applyState;
  3786. String? rankName;
  3787. String? positionName;
  3788. bool isDirector;
  3789. List<String >? fieldList;
  3790. List<String >? deletePatientCodes;
  3791. bool isBatchExportDiagnoseData;
  3792. String? bindAssistantUserCode;
  3793. String? bindAssistantDoctorUserCode;
  3794. LoginLockInfoDTO? loginLockInfo;
  3795. String? signature;
  3796. String? language;
  3797. bool enableReportLabel;
  3798. List<AssociatedInfoDTO >? associatedInfos;
  3799. String? commonPlatformUserId;
  3800. String? bindEmergencyDeviceCode;
  3801. UserDTO({
  3802. this.phone,
  3803. this.email,
  3804. this.nickName,
  3805. this.fullName,
  3806. this.organizationCode,
  3807. this.organizationName,
  3808. this.rootOrganizationCode,
  3809. this.rootOrganizationName,
  3810. this.authorityGroups,
  3811. this.bindDevices,
  3812. this.lastIP,
  3813. this.logintimes = 0,
  3814. this.userState = UserInfoStateEnum.Nonactivated,
  3815. this.roleCodes,
  3816. this.rankCodes,
  3817. this.positionCodes,
  3818. this.applyState = ApplyStateEnum.NotApply,
  3819. this.rankName,
  3820. this.positionName,
  3821. this.isDirector = false,
  3822. this.fieldList,
  3823. this.deletePatientCodes,
  3824. this.isBatchExportDiagnoseData = false,
  3825. this.bindAssistantUserCode,
  3826. this.bindAssistantDoctorUserCode,
  3827. this.loginLockInfo,
  3828. this.signature,
  3829. this.language,
  3830. this.enableReportLabel = false,
  3831. this.associatedInfos,
  3832. this.commonPlatformUserId,
  3833. this.bindEmergencyDeviceCode,
  3834. String? userCode,
  3835. String? userName,
  3836. String? headImageUrl,
  3837. DateTime? createTime,
  3838. DateTime? updateTime,
  3839. }) : super(
  3840. userCode: userCode,
  3841. userName: userName,
  3842. headImageUrl: headImageUrl,
  3843. createTime: createTime,
  3844. updateTime: updateTime,
  3845. );
  3846. factory UserDTO.fromJson(Map<String, dynamic> map) {
  3847. return UserDTO(
  3848. phone: map['Phone'],
  3849. email: map['Email'],
  3850. nickName: map['NickName'],
  3851. fullName: map['FullName'],
  3852. organizationCode: map['OrganizationCode'],
  3853. organizationName: map['OrganizationName'],
  3854. rootOrganizationCode: map['RootOrganizationCode'],
  3855. rootOrganizationName: map['RootOrganizationName'],
  3856. authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
  3857. bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
  3858. lastIP: map['LastIP'],
  3859. logintimes: map['Logintimes'],
  3860. userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
  3861. roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
  3862. rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
  3863. positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
  3864. applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
  3865. rankName: map['RankName'],
  3866. positionName: map['PositionName'],
  3867. isDirector: map['IsDirector'],
  3868. fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
  3869. deletePatientCodes: map['DeletePatientCodes'] != null ? map['DeletePatientCodes'].cast<String>().toList() : null,
  3870. isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
  3871. bindAssistantUserCode: map['BindAssistantUserCode'],
  3872. bindAssistantDoctorUserCode: map['BindAssistantDoctorUserCode'],
  3873. loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null,
  3874. signature: map['Signature'],
  3875. language: map['Language'],
  3876. enableReportLabel: map['EnableReportLabel'],
  3877. associatedInfos: map['AssociatedInfos'] != null ? (map['AssociatedInfos'] as List).map((e)=>AssociatedInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3878. commonPlatformUserId: map['CommonPlatformUserId'],
  3879. bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'],
  3880. userCode: map['UserCode'],
  3881. userName: map['UserName'],
  3882. headImageUrl: map['HeadImageUrl'],
  3883. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3884. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3885. );
  3886. }
  3887. Map<String, dynamic> toJson() {
  3888. final map = super.toJson();
  3889. if(phone != null)
  3890. map['Phone'] = phone;
  3891. if(email != null)
  3892. map['Email'] = email;
  3893. if(nickName != null)
  3894. map['NickName'] = nickName;
  3895. if(fullName != null)
  3896. map['FullName'] = fullName;
  3897. if(organizationCode != null)
  3898. map['OrganizationCode'] = organizationCode;
  3899. if(organizationName != null)
  3900. map['OrganizationName'] = organizationName;
  3901. if(rootOrganizationCode != null)
  3902. map['RootOrganizationCode'] = rootOrganizationCode;
  3903. if(rootOrganizationName != null)
  3904. map['RootOrganizationName'] = rootOrganizationName;
  3905. if(authorityGroups != null)
  3906. map['AuthorityGroups'] = authorityGroups;
  3907. if(bindDevices != null)
  3908. map['BindDevices'] = bindDevices;
  3909. if(lastIP != null)
  3910. map['LastIP'] = lastIP;
  3911. map['Logintimes'] = logintimes;
  3912. map['UserState'] = userState.index;
  3913. if(roleCodes != null)
  3914. map['RoleCodes'] = roleCodes;
  3915. if(rankCodes != null)
  3916. map['RankCodes'] = rankCodes;
  3917. if(positionCodes != null)
  3918. map['PositionCodes'] = positionCodes;
  3919. map['ApplyState'] = applyState.index;
  3920. if(rankName != null)
  3921. map['RankName'] = rankName;
  3922. if(positionName != null)
  3923. map['PositionName'] = positionName;
  3924. map['IsDirector'] = isDirector;
  3925. if(fieldList != null)
  3926. map['FieldList'] = fieldList;
  3927. if(deletePatientCodes != null)
  3928. map['DeletePatientCodes'] = deletePatientCodes;
  3929. map['IsBatchExportDiagnoseData'] = isBatchExportDiagnoseData;
  3930. if(bindAssistantUserCode != null)
  3931. map['BindAssistantUserCode'] = bindAssistantUserCode;
  3932. if(bindAssistantDoctorUserCode != null)
  3933. map['BindAssistantDoctorUserCode'] = bindAssistantDoctorUserCode;
  3934. if(loginLockInfo != null)
  3935. map['LoginLockInfo'] = loginLockInfo;
  3936. if(signature != null)
  3937. map['Signature'] = signature;
  3938. if(language != null)
  3939. map['Language'] = language;
  3940. map['EnableReportLabel'] = enableReportLabel;
  3941. if(associatedInfos != null)
  3942. map['AssociatedInfos'] = associatedInfos;
  3943. if(commonPlatformUserId != null)
  3944. map['CommonPlatformUserId'] = commonPlatformUserId;
  3945. if(bindEmergencyDeviceCode != null)
  3946. map['BindEmergencyDeviceCode'] = bindEmergencyDeviceCode;
  3947. return map;
  3948. }
  3949. }
  3950. class UserExtendDTO extends UserDTO{
  3951. String? roleName;
  3952. UserStatusEnum userStatus;
  3953. UserExtendDTO({
  3954. this.roleName,
  3955. this.userStatus = UserStatusEnum.NotOnline,
  3956. String? phone,
  3957. String? email,
  3958. String? nickName,
  3959. String? fullName,
  3960. String? organizationCode,
  3961. String? organizationName,
  3962. String? rootOrganizationCode,
  3963. String? rootOrganizationName,
  3964. List<String >? authorityGroups,
  3965. List<String >? bindDevices,
  3966. String? lastIP,
  3967. int logintimes = 0,
  3968. UserInfoStateEnum userState = UserInfoStateEnum.Nonactivated,
  3969. List<String >? roleCodes,
  3970. List<String >? rankCodes,
  3971. List<String >? positionCodes,
  3972. ApplyStateEnum applyState = ApplyStateEnum.NotApply,
  3973. String? rankName,
  3974. String? positionName,
  3975. bool isDirector = false,
  3976. List<String >? fieldList,
  3977. List<String >? deletePatientCodes,
  3978. bool isBatchExportDiagnoseData = false,
  3979. String? bindAssistantUserCode,
  3980. String? bindAssistantDoctorUserCode,
  3981. LoginLockInfoDTO? loginLockInfo,
  3982. String? signature,
  3983. String? language,
  3984. bool enableReportLabel = false,
  3985. List<AssociatedInfoDTO >? associatedInfos,
  3986. String? commonPlatformUserId,
  3987. String? bindEmergencyDeviceCode,
  3988. String? userCode,
  3989. String? userName,
  3990. String? headImageUrl,
  3991. DateTime? createTime,
  3992. DateTime? updateTime,
  3993. }) : super(
  3994. phone: phone,
  3995. email: email,
  3996. nickName: nickName,
  3997. fullName: fullName,
  3998. organizationCode: organizationCode,
  3999. organizationName: organizationName,
  4000. rootOrganizationCode: rootOrganizationCode,
  4001. rootOrganizationName: rootOrganizationName,
  4002. authorityGroups: authorityGroups,
  4003. bindDevices: bindDevices,
  4004. lastIP: lastIP,
  4005. logintimes: logintimes,
  4006. userState: userState,
  4007. roleCodes: roleCodes,
  4008. rankCodes: rankCodes,
  4009. positionCodes: positionCodes,
  4010. applyState: applyState,
  4011. rankName: rankName,
  4012. positionName: positionName,
  4013. isDirector: isDirector,
  4014. fieldList: fieldList,
  4015. deletePatientCodes: deletePatientCodes,
  4016. isBatchExportDiagnoseData: isBatchExportDiagnoseData,
  4017. bindAssistantUserCode: bindAssistantUserCode,
  4018. bindAssistantDoctorUserCode: bindAssistantDoctorUserCode,
  4019. loginLockInfo: loginLockInfo,
  4020. signature: signature,
  4021. language: language,
  4022. enableReportLabel: enableReportLabel,
  4023. associatedInfos: associatedInfos,
  4024. commonPlatformUserId: commonPlatformUserId,
  4025. bindEmergencyDeviceCode: bindEmergencyDeviceCode,
  4026. userCode: userCode,
  4027. userName: userName,
  4028. headImageUrl: headImageUrl,
  4029. createTime: createTime,
  4030. updateTime: updateTime,
  4031. );
  4032. factory UserExtendDTO.fromJson(Map<String, dynamic> map) {
  4033. return UserExtendDTO(
  4034. roleName: map['RoleName'],
  4035. userStatus: UserStatusEnum.values.firstWhere((e) => e.index == map['UserStatus']),
  4036. phone: map['Phone'],
  4037. email: map['Email'],
  4038. nickName: map['NickName'],
  4039. fullName: map['FullName'],
  4040. organizationCode: map['OrganizationCode'],
  4041. organizationName: map['OrganizationName'],
  4042. rootOrganizationCode: map['RootOrganizationCode'],
  4043. rootOrganizationName: map['RootOrganizationName'],
  4044. authorityGroups: map['AuthorityGroups'] != null ? map['AuthorityGroups'].cast<String>().toList() : null,
  4045. bindDevices: map['BindDevices'] != null ? map['BindDevices'].cast<String>().toList() : null,
  4046. lastIP: map['LastIP'],
  4047. logintimes: map['Logintimes'],
  4048. userState: UserInfoStateEnum.values.firstWhere((e) => e.index == map['UserState']),
  4049. roleCodes: map['RoleCodes'] != null ? map['RoleCodes'].cast<String>().toList() : null,
  4050. rankCodes: map['RankCodes'] != null ? map['RankCodes'].cast<String>().toList() : null,
  4051. positionCodes: map['PositionCodes'] != null ? map['PositionCodes'].cast<String>().toList() : null,
  4052. applyState: ApplyStateEnum.values.firstWhere((e) => e.index == map['ApplyState']),
  4053. rankName: map['RankName'],
  4054. positionName: map['PositionName'],
  4055. isDirector: map['IsDirector'],
  4056. fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
  4057. deletePatientCodes: map['DeletePatientCodes'] != null ? map['DeletePatientCodes'].cast<String>().toList() : null,
  4058. isBatchExportDiagnoseData: map['IsBatchExportDiagnoseData'],
  4059. bindAssistantUserCode: map['BindAssistantUserCode'],
  4060. bindAssistantDoctorUserCode: map['BindAssistantDoctorUserCode'],
  4061. loginLockInfo: map['LoginLockInfo'] != null ? LoginLockInfoDTO.fromJson(map['LoginLockInfo']) : null,
  4062. signature: map['Signature'],
  4063. language: map['Language'],
  4064. enableReportLabel: map['EnableReportLabel'],
  4065. associatedInfos: map['AssociatedInfos'] != null ? (map['AssociatedInfos'] as List).map((e)=>AssociatedInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4066. commonPlatformUserId: map['CommonPlatformUserId'],
  4067. bindEmergencyDeviceCode: map['BindEmergencyDeviceCode'],
  4068. userCode: map['UserCode'],
  4069. userName: map['UserName'],
  4070. headImageUrl: map['HeadImageUrl'],
  4071. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  4072. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  4073. );
  4074. }
  4075. Map<String, dynamic> toJson() {
  4076. final map = super.toJson();
  4077. if(roleName != null)
  4078. map['RoleName'] = roleName;
  4079. map['UserStatus'] = userStatus.index;
  4080. return map;
  4081. }
  4082. }
  4083. class GetInviteableUserListRequest extends TokenRequest{
  4084. String? consultationCode;
  4085. String? language;
  4086. String? organizationCode;
  4087. GetInviteableUserListRequest({
  4088. this.consultationCode,
  4089. this.language,
  4090. this.organizationCode,
  4091. String? token,
  4092. }) : super(
  4093. token: token,
  4094. );
  4095. factory GetInviteableUserListRequest.fromJson(Map<String, dynamic> map) {
  4096. return GetInviteableUserListRequest(
  4097. consultationCode: map['ConsultationCode'],
  4098. language: map['Language'],
  4099. organizationCode: map['OrganizationCode'],
  4100. token: map['Token'],
  4101. );
  4102. }
  4103. Map<String, dynamic> toJson() {
  4104. final map = super.toJson();
  4105. if(consultationCode != null)
  4106. map['ConsultationCode'] = consultationCode;
  4107. if(language != null)
  4108. map['Language'] = language;
  4109. if(organizationCode != null)
  4110. map['OrganizationCode'] = organizationCode;
  4111. return map;
  4112. }
  4113. }
  4114. class ChangeConsultationResult {
  4115. String? consultationCode;
  4116. String? initiatorCode;
  4117. int roomNo;
  4118. List<LiveConsultationMember >? memberLiveDatas;
  4119. ChangeConsultationResult({
  4120. this.consultationCode,
  4121. this.initiatorCode,
  4122. this.roomNo = 0,
  4123. this.memberLiveDatas,
  4124. });
  4125. factory ChangeConsultationResult.fromJson(Map<String, dynamic> map) {
  4126. return ChangeConsultationResult(
  4127. consultationCode: map['ConsultationCode'],
  4128. initiatorCode: map['InitiatorCode'],
  4129. roomNo: map['RoomNo'],
  4130. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  4131. );
  4132. }
  4133. Map<String, dynamic> toJson() {
  4134. final map = Map<String, dynamic>();
  4135. if(consultationCode != null)
  4136. map['ConsultationCode'] = consultationCode;
  4137. if(initiatorCode != null)
  4138. map['InitiatorCode'] = initiatorCode;
  4139. map['RoomNo'] = roomNo;
  4140. if(memberLiveDatas != null)
  4141. map['MemberLiveDatas'] = memberLiveDatas;
  4142. return map;
  4143. }
  4144. }
  4145. class ChangeConsultationRequest extends TokenRequest{
  4146. String? originalCode;
  4147. String? currentCode;
  4148. ChangeConsultationRequest({
  4149. this.originalCode,
  4150. this.currentCode,
  4151. String? token,
  4152. }) : super(
  4153. token: token,
  4154. );
  4155. factory ChangeConsultationRequest.fromJson(Map<String, dynamic> map) {
  4156. return ChangeConsultationRequest(
  4157. originalCode: map['OriginalCode'],
  4158. currentCode: map['CurrentCode'],
  4159. token: map['Token'],
  4160. );
  4161. }
  4162. Map<String, dynamic> toJson() {
  4163. final map = super.toJson();
  4164. if(originalCode != null)
  4165. map['OriginalCode'] = originalCode;
  4166. if(currentCode != null)
  4167. map['CurrentCode'] = currentCode;
  4168. return map;
  4169. }
  4170. }
  4171. class ChangeConsultationControllingStateRequest extends TokenRequest{
  4172. String? deviceCode;
  4173. String? userCode;
  4174. bool isControllingParameter;
  4175. ChangeConsultationControllingStateRequest({
  4176. this.deviceCode,
  4177. this.userCode,
  4178. this.isControllingParameter = false,
  4179. String? token,
  4180. }) : super(
  4181. token: token,
  4182. );
  4183. factory ChangeConsultationControllingStateRequest.fromJson(Map<String, dynamic> map) {
  4184. return ChangeConsultationControllingStateRequest(
  4185. deviceCode: map['DeviceCode'],
  4186. userCode: map['UserCode'],
  4187. isControllingParameter: map['IsControllingParameter'],
  4188. token: map['Token'],
  4189. );
  4190. }
  4191. Map<String, dynamic> toJson() {
  4192. final map = super.toJson();
  4193. if(deviceCode != null)
  4194. map['DeviceCode'] = deviceCode;
  4195. if(userCode != null)
  4196. map['UserCode'] = userCode;
  4197. map['IsControllingParameter'] = isControllingParameter;
  4198. return map;
  4199. }
  4200. }