liveConsultation.m.dart 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687
  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. class OrganizationExpertDTO extends UserBaseDTO{
  161. String? fullName;
  162. List<String >? fieldList;
  163. OrganizationExpertDTO({
  164. this.fullName,
  165. this.fieldList,
  166. String? userCode,
  167. String? userName,
  168. String? headImageUrl,
  169. DateTime? createTime,
  170. DateTime? updateTime,
  171. }) : super(
  172. userCode: userCode,
  173. userName: userName,
  174. headImageUrl: headImageUrl,
  175. createTime: createTime,
  176. updateTime: updateTime,
  177. );
  178. factory OrganizationExpertDTO.fromJson(Map<String, dynamic> map) {
  179. return OrganizationExpertDTO(
  180. fullName: map['FullName'],
  181. fieldList: map['FieldList'] != null ? map['FieldList'].cast<String>().toList() : null,
  182. userCode: map['UserCode'],
  183. userName: map['UserName'],
  184. headImageUrl: map['HeadImageUrl'],
  185. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  186. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  187. );
  188. }
  189. Map<String, dynamic> toJson() {
  190. final map = super.toJson();
  191. if(fullName != null)
  192. map['FullName'] = fullName;
  193. if(fieldList != null)
  194. map['FieldList'] = fieldList;
  195. return map;
  196. }
  197. }
  198. class FindOrganizationExpertsRequest extends TokenRequest{
  199. String? organizationCode;
  200. String? expertName;
  201. FindOrganizationExpertsRequest({
  202. this.organizationCode,
  203. this.expertName,
  204. String? token,
  205. }) : super(
  206. token: token,
  207. );
  208. factory FindOrganizationExpertsRequest.fromJson(Map<String, dynamic> map) {
  209. return FindOrganizationExpertsRequest(
  210. organizationCode: map['OrganizationCode'],
  211. expertName: map['ExpertName'],
  212. token: map['Token'],
  213. );
  214. }
  215. Map<String, dynamic> toJson() {
  216. final map = super.toJson();
  217. if(organizationCode != null)
  218. map['OrganizationCode'] = organizationCode;
  219. if(expertName != null)
  220. map['ExpertName'] = expertName;
  221. return map;
  222. }
  223. }
  224. class DataItemDTO {
  225. String? key;
  226. String? value;
  227. DataItemDTO({
  228. this.key,
  229. this.value,
  230. });
  231. factory DataItemDTO.fromJson(Map<String, dynamic> map) {
  232. return DataItemDTO(
  233. key: map['Key'],
  234. value: map['Value'],
  235. );
  236. }
  237. Map<String, dynamic> toJson() {
  238. final map = Map<String, dynamic>();
  239. if(key != null)
  240. map['Key'] = key;
  241. if(value != null)
  242. map['Value'] = value;
  243. return map;
  244. }
  245. }
  246. enum ConsultationReportMode {
  247. ExpertReport,
  248. ApplicantReport,
  249. }
  250. class ApplyConsultationRequest extends TokenRequest{
  251. String? expertUserCode;
  252. String? deviceCode;
  253. String? scanPosition;
  254. DateTime? consultationTime;
  255. List<DataItemDTO >? patientDatas;
  256. String? patientCode;
  257. ConsultationReportMode reportMode;
  258. String? diseases;
  259. String? scanUserCode;
  260. String? expertOrganizationCode;
  261. String? applyUserCode;
  262. String? primaryDiagnosis;
  263. ApplyConsultationRequest({
  264. this.expertUserCode,
  265. this.deviceCode,
  266. this.scanPosition,
  267. this.consultationTime,
  268. this.patientDatas,
  269. this.patientCode,
  270. this.reportMode = ConsultationReportMode.ExpertReport,
  271. this.diseases,
  272. this.scanUserCode,
  273. this.expertOrganizationCode,
  274. this.applyUserCode,
  275. this.primaryDiagnosis,
  276. String? token,
  277. }) : super(
  278. token: token,
  279. );
  280. factory ApplyConsultationRequest.fromJson(Map<String, dynamic> map) {
  281. return ApplyConsultationRequest(
  282. expertUserCode: map['ExpertUserCode'],
  283. deviceCode: map['DeviceCode'],
  284. scanPosition: map['ScanPosition'],
  285. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  286. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  287. patientCode: map['PatientCode'],
  288. reportMode: ConsultationReportMode.values.firstWhere((e) => e.index == map['ReportMode']),
  289. diseases: map['Diseases'],
  290. scanUserCode: map['ScanUserCode'],
  291. expertOrganizationCode: map['ExpertOrganizationCode'],
  292. applyUserCode: map['ApplyUserCode'],
  293. primaryDiagnosis: map['PrimaryDiagnosis'],
  294. token: map['Token'],
  295. );
  296. }
  297. Map<String, dynamic> toJson() {
  298. final map = super.toJson();
  299. if(expertUserCode != null)
  300. map['ExpertUserCode'] = expertUserCode;
  301. if(deviceCode != null)
  302. map['DeviceCode'] = deviceCode;
  303. if(scanPosition != null)
  304. map['ScanPosition'] = scanPosition;
  305. if(consultationTime != null)
  306. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  307. if(patientDatas != null)
  308. map['PatientDatas'] = patientDatas;
  309. if(patientCode != null)
  310. map['PatientCode'] = patientCode;
  311. map['ReportMode'] = reportMode.index;
  312. if(diseases != null)
  313. map['Diseases'] = diseases;
  314. if(scanUserCode != null)
  315. map['ScanUserCode'] = scanUserCode;
  316. if(expertOrganizationCode != null)
  317. map['ExpertOrganizationCode'] = expertOrganizationCode;
  318. if(applyUserCode != null)
  319. map['ApplyUserCode'] = applyUserCode;
  320. if(primaryDiagnosis != null)
  321. map['PrimaryDiagnosis'] = primaryDiagnosis;
  322. return map;
  323. }
  324. }
  325. class UpdateConsultationRequest extends TokenRequest{
  326. String? consultationCode;
  327. String? expertUserCode;
  328. String? deviceCode;
  329. String? scanPosition;
  330. DateTime? consultationTime;
  331. String? diseases;
  332. String? scanUserCode;
  333. String? expertOrganizationCode;
  334. String? applyUserCode;
  335. String? primaryDiagnosis;
  336. UpdateConsultationRequest({
  337. this.consultationCode,
  338. this.expertUserCode,
  339. this.deviceCode,
  340. this.scanPosition,
  341. this.consultationTime,
  342. this.diseases,
  343. this.scanUserCode,
  344. this.expertOrganizationCode,
  345. this.applyUserCode,
  346. this.primaryDiagnosis,
  347. String? token,
  348. }) : super(
  349. token: token,
  350. );
  351. factory UpdateConsultationRequest.fromJson(Map<String, dynamic> map) {
  352. return UpdateConsultationRequest(
  353. consultationCode: map['ConsultationCode'],
  354. expertUserCode: map['ExpertUserCode'],
  355. deviceCode: map['DeviceCode'],
  356. scanPosition: map['ScanPosition'],
  357. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  358. diseases: map['Diseases'],
  359. scanUserCode: map['ScanUserCode'],
  360. expertOrganizationCode: map['ExpertOrganizationCode'],
  361. applyUserCode: map['ApplyUserCode'],
  362. primaryDiagnosis: map['PrimaryDiagnosis'],
  363. token: map['Token'],
  364. );
  365. }
  366. Map<String, dynamic> toJson() {
  367. final map = super.toJson();
  368. if(consultationCode != null)
  369. map['ConsultationCode'] = consultationCode;
  370. if(expertUserCode != null)
  371. map['ExpertUserCode'] = expertUserCode;
  372. if(deviceCode != null)
  373. map['DeviceCode'] = deviceCode;
  374. if(scanPosition != null)
  375. map['ScanPosition'] = scanPosition;
  376. if(consultationTime != null)
  377. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  378. if(diseases != null)
  379. map['Diseases'] = diseases;
  380. if(scanUserCode != null)
  381. map['ScanUserCode'] = scanUserCode;
  382. if(expertOrganizationCode != null)
  383. map['ExpertOrganizationCode'] = expertOrganizationCode;
  384. if(applyUserCode != null)
  385. map['ApplyUserCode'] = applyUserCode;
  386. if(primaryDiagnosis != null)
  387. map['PrimaryDiagnosis'] = primaryDiagnosis;
  388. return map;
  389. }
  390. }
  391. class FindAssistantExpertsRequest extends TokenRequest{
  392. String? expertName;
  393. FindAssistantExpertsRequest({
  394. this.expertName,
  395. String? token,
  396. }) : super(
  397. token: token,
  398. );
  399. factory FindAssistantExpertsRequest.fromJson(Map<String, dynamic> map) {
  400. return FindAssistantExpertsRequest(
  401. expertName: map['ExpertName'],
  402. token: map['Token'],
  403. );
  404. }
  405. Map<String, dynamic> toJson() {
  406. final map = super.toJson();
  407. if(expertName != null)
  408. map['ExpertName'] = expertName;
  409. return map;
  410. }
  411. }
  412. enum TransactionStatusEnum {
  413. placeHolder_0,
  414. Applied,
  415. Withdrawn,
  416. Rejected,
  417. ToStart,
  418. InProgress,
  419. PendingReport,
  420. End,
  421. }
  422. enum EvaluateGradeEnum {
  423. UnSet,
  424. Dissatisfaction,
  425. General,
  426. Satisfaction,
  427. }
  428. class ConsultationPageDTO {
  429. String? consultationCode;
  430. TransactionStatusEnum consultationStatus;
  431. String? patientName;
  432. String? phone;
  433. String? sex;
  434. String? patientAge;
  435. String? applyOrganizationName;
  436. String? consultationTime;
  437. String? expertUserName;
  438. EvaluateGradeEnum consultationEvaluate;
  439. ConsultationPageDTO({
  440. this.consultationCode,
  441. this.consultationStatus = TransactionStatusEnum.Applied,
  442. this.patientName,
  443. this.phone,
  444. this.sex,
  445. this.patientAge,
  446. this.applyOrganizationName,
  447. this.consultationTime,
  448. this.expertUserName,
  449. this.consultationEvaluate = EvaluateGradeEnum.UnSet,
  450. });
  451. factory ConsultationPageDTO.fromJson(Map<String, dynamic> map) {
  452. return ConsultationPageDTO(
  453. consultationCode: map['ConsultationCode'],
  454. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  455. patientName: map['PatientName'],
  456. phone: map['Phone'],
  457. sex: map['Sex'],
  458. patientAge: map['PatientAge'],
  459. applyOrganizationName: map['ApplyOrganizationName'],
  460. consultationTime: map['ConsultationTime'],
  461. expertUserName: map['ExpertUserName'],
  462. consultationEvaluate: EvaluateGradeEnum.values.firstWhere((e) => e.index == map['ConsultationEvaluate']),
  463. );
  464. }
  465. Map<String, dynamic> toJson() {
  466. final map = Map<String, dynamic>();
  467. if(consultationCode != null)
  468. map['ConsultationCode'] = consultationCode;
  469. map['ConsultationStatus'] = consultationStatus.index;
  470. if(patientName != null)
  471. map['PatientName'] = patientName;
  472. if(phone != null)
  473. map['Phone'] = phone;
  474. if(sex != null)
  475. map['Sex'] = sex;
  476. if(patientAge != null)
  477. map['PatientAge'] = patientAge;
  478. if(applyOrganizationName != null)
  479. map['ApplyOrganizationName'] = applyOrganizationName;
  480. if(consultationTime != null)
  481. map['ConsultationTime'] = consultationTime;
  482. if(expertUserName != null)
  483. map['ExpertUserName'] = expertUserName;
  484. map['ConsultationEvaluate'] = consultationEvaluate.index;
  485. return map;
  486. }
  487. }
  488. class PageResult<T> {
  489. int pageIndex;
  490. int pageSize;
  491. int totalCount;
  492. List<T>? pageData;
  493. PageResult({
  494. this.pageIndex = 0,
  495. this.pageSize = 0,
  496. this.totalCount = 0,
  497. this.pageData,
  498. });
  499. factory PageResult.fromJson(Map<String, dynamic> map) {
  500. List<T> pageDataList = [];
  501. if (map['PageData'] != null) {
  502. pageDataList.addAll(
  503. (map['PageData'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));
  504. }
  505. return PageResult(
  506. pageIndex: map['PageIndex'],
  507. pageSize: map['PageSize'],
  508. totalCount: map['TotalCount'],
  509. pageData: pageDataList,
  510. );
  511. }
  512. Map<String, dynamic> toJson() {
  513. final map = Map<String, dynamic>();
  514. map['PageIndex'] = pageIndex;
  515. map['PageSize'] = pageSize;
  516. map['TotalCount'] = totalCount;
  517. if(pageData != null)
  518. map['PageData'] = pageData;
  519. return map;
  520. }
  521. }
  522. class PageRequest extends TokenRequest{
  523. int pageIndex;
  524. int pageSize;
  525. PageRequest({
  526. this.pageIndex = 0,
  527. this.pageSize = 0,
  528. String? token,
  529. }) : super(
  530. token: token,
  531. );
  532. factory PageRequest.fromJson(Map<String, dynamic> map) {
  533. return PageRequest(
  534. pageIndex: map['PageIndex'],
  535. pageSize: map['PageSize'],
  536. token: map['Token'],
  537. );
  538. }
  539. Map<String, dynamic> toJson() {
  540. final map = super.toJson();
  541. map['PageIndex'] = pageIndex;
  542. map['PageSize'] = pageSize;
  543. return map;
  544. }
  545. }
  546. enum QueryConsultationStatusEnum {
  547. All,
  548. Applied,
  549. Withdrawn,
  550. Rejected,
  551. ToStart,
  552. InProgress,
  553. PendingReport,
  554. End,
  555. }
  556. enum ConsultationQueryTypeEnum {
  557. All,
  558. MyApply,
  559. MyArrange,
  560. MyJoin,
  561. }
  562. enum QueryEvaluateGradeEnum {
  563. All,
  564. UnSet,
  565. Dissatisfaction,
  566. General,
  567. Satisfaction,
  568. }
  569. class FindConsultationByPageRequest extends PageRequest{
  570. String? keyword;
  571. DateTime? startDate;
  572. DateTime? endDate;
  573. QueryConsultationStatusEnum consultationStatus;
  574. ConsultationQueryTypeEnum consultationQueryType;
  575. QueryEvaluateGradeEnum evaluateGrade;
  576. String? language;
  577. FindConsultationByPageRequest({
  578. this.keyword,
  579. this.startDate,
  580. this.endDate,
  581. this.consultationStatus = QueryConsultationStatusEnum.All,
  582. this.consultationQueryType = ConsultationQueryTypeEnum.All,
  583. this.evaluateGrade = QueryEvaluateGradeEnum.All,
  584. this.language,
  585. int pageIndex = 0,
  586. int pageSize = 0,
  587. String? token,
  588. }) : super(
  589. pageIndex: pageIndex,
  590. pageSize: pageSize,
  591. token: token,
  592. );
  593. factory FindConsultationByPageRequest.fromJson(Map<String, dynamic> map) {
  594. return FindConsultationByPageRequest(
  595. keyword: map['Keyword'],
  596. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  597. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  598. consultationStatus: QueryConsultationStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  599. consultationQueryType: ConsultationQueryTypeEnum.values.firstWhere((e) => e.index == map['ConsultationQueryType']),
  600. evaluateGrade: QueryEvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  601. language: map['Language'],
  602. pageIndex: map['PageIndex'],
  603. pageSize: map['PageSize'],
  604. token: map['Token'],
  605. );
  606. }
  607. Map<String, dynamic> toJson() {
  608. final map = super.toJson();
  609. if(keyword != null)
  610. map['Keyword'] = keyword;
  611. if(startDate != null)
  612. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  613. if(endDate != null)
  614. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  615. map['ConsultationStatus'] = consultationStatus.index;
  616. map['ConsultationQueryType'] = consultationQueryType.index;
  617. map['EvaluateGrade'] = evaluateGrade.index;
  618. if(language != null)
  619. map['Language'] = language;
  620. return map;
  621. }
  622. }
  623. enum OrganizationPatientTypeEnum {
  624. Person,
  625. Animals,
  626. }
  627. enum RemedicalFileDataTypeEnum {
  628. VinnoVidSingle,
  629. ThirdVidSingle,
  630. VinnoVidMovie,
  631. ThirdVidMovie,
  632. Image,
  633. }
  634. class ConsultationFileDTO {
  635. String? sourceUrl;
  636. String? previewImageUrl;
  637. String? coverImageUrl;
  638. DateTime? createTime;
  639. String? creatorCode;
  640. RemedicalFileDataTypeEnum fileDataType;
  641. ConsultationFileDTO({
  642. this.sourceUrl,
  643. this.previewImageUrl,
  644. this.coverImageUrl,
  645. this.createTime,
  646. this.creatorCode,
  647. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  648. });
  649. factory ConsultationFileDTO.fromJson(Map<String, dynamic> map) {
  650. return ConsultationFileDTO(
  651. sourceUrl: map['SourceUrl'],
  652. previewImageUrl: map['PreviewImageUrl'],
  653. coverImageUrl: map['CoverImageUrl'],
  654. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  655. creatorCode: map['CreatorCode'],
  656. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  657. );
  658. }
  659. Map<String, dynamic> toJson() {
  660. final map = Map<String, dynamic>();
  661. if(sourceUrl != null)
  662. map['SourceUrl'] = sourceUrl;
  663. if(previewImageUrl != null)
  664. map['PreviewImageUrl'] = previewImageUrl;
  665. if(coverImageUrl != null)
  666. map['CoverImageUrl'] = coverImageUrl;
  667. if(createTime != null)
  668. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  669. if(creatorCode != null)
  670. map['CreatorCode'] = creatorCode;
  671. map['FileDataType'] = fileDataType.index;
  672. return map;
  673. }
  674. }
  675. class ConsultationMemberDTO {
  676. String? memberCode;
  677. String? memberOrganizationCode;
  678. String? memberDepartmentCode;
  679. LiveConsultationMemberStatus memberStatus;
  680. DateTime? memberOperateTime;
  681. String? name;
  682. String? headImageToken;
  683. ConsultationMemberDTO({
  684. this.memberCode,
  685. this.memberOrganizationCode,
  686. this.memberDepartmentCode,
  687. this.memberStatus = LiveConsultationMemberStatus.Default,
  688. this.memberOperateTime,
  689. this.name,
  690. this.headImageToken,
  691. });
  692. factory ConsultationMemberDTO.fromJson(Map<String, dynamic> map) {
  693. return ConsultationMemberDTO(
  694. memberCode: map['MemberCode'],
  695. memberOrganizationCode: map['MemberOrganizationCode'],
  696. memberDepartmentCode: map['MemberDepartmentCode'],
  697. memberStatus: LiveConsultationMemberStatus.values.firstWhere((e) => e.index == map['MemberStatus']),
  698. memberOperateTime: map['MemberOperateTime'] != null ? DateTime.parse(map['MemberOperateTime']) : null,
  699. name: map['Name'],
  700. headImageToken: map['HeadImageToken'],
  701. );
  702. }
  703. Map<String, dynamic> toJson() {
  704. final map = Map<String, dynamic>();
  705. if(memberCode != null)
  706. map['MemberCode'] = memberCode;
  707. if(memberOrganizationCode != null)
  708. map['MemberOrganizationCode'] = memberOrganizationCode;
  709. if(memberDepartmentCode != null)
  710. map['MemberDepartmentCode'] = memberDepartmentCode;
  711. map['MemberStatus'] = memberStatus.index;
  712. if(memberOperateTime != null)
  713. map['MemberOperateTime'] = JsonRpcUtils.dateFormat(memberOperateTime!);
  714. if(name != null)
  715. map['Name'] = name;
  716. if(headImageToken != null)
  717. map['HeadImageToken'] = headImageToken;
  718. return map;
  719. }
  720. }
  721. enum ConsultationReminderTimeEnum {
  722. FifteenMinutes,
  723. ThirtyMinutes,
  724. SixtyMinutes,
  725. OneDay,
  726. }
  727. enum ConsultationReminderMode {
  728. Application,
  729. SMS,
  730. }
  731. class ConsultationReminderDTO {
  732. ConsultationReminderTimeEnum consultationReminderTime;
  733. ConsultationReminderMode consultationReminderMode;
  734. ConsultationReminderDTO({
  735. this.consultationReminderTime = ConsultationReminderTimeEnum.FifteenMinutes,
  736. this.consultationReminderMode = ConsultationReminderMode.Application,
  737. });
  738. factory ConsultationReminderDTO.fromJson(Map<String, dynamic> map) {
  739. return ConsultationReminderDTO(
  740. consultationReminderTime: ConsultationReminderTimeEnum.values.firstWhere((e) => e.index == map['ConsultationReminderTime']),
  741. consultationReminderMode: ConsultationReminderMode.values.firstWhere((e) => e.index == map['ConsultationReminderMode']),
  742. );
  743. }
  744. Map<String, dynamic> toJson() {
  745. final map = Map<String, dynamic>();
  746. map['ConsultationReminderTime'] = consultationReminderTime.index;
  747. map['ConsultationReminderMode'] = consultationReminderMode.index;
  748. return map;
  749. }
  750. }
  751. class ConsultationDetailDTO {
  752. String? consultationCode;
  753. String? applyOrganizationCode;
  754. String? applyDepartmentCode;
  755. String? applyUserCode;
  756. String? expertOrganizationCode;
  757. String? expertDepartmentCode;
  758. String? expertUserCode;
  759. String? deviceCode;
  760. String? operateUserCode;
  761. String? scanUserCode;
  762. String? patientCode;
  763. OrganizationPatientTypeEnum patientType;
  764. String? scanPosition;
  765. DateTime? createTime;
  766. DateTime? consultationTime;
  767. DateTime? consultationTimeEnd;
  768. TransactionStatusEnum consultationStatus;
  769. String? applyOrganizationName;
  770. String? applyUserName;
  771. String? operateUserName;
  772. String? scanUserName;
  773. String? expertOrganizationName;
  774. String? expertUserName;
  775. String? deviceName;
  776. String? patientName;
  777. String? sex;
  778. List<DataItemDTO >? patientDatas;
  779. List<ConsultationFileDTO >? fileInfos;
  780. String? rejectReason;
  781. String? location;
  782. List<ConsultationMemberDTO >? consultationMembers;
  783. String? description;
  784. List<ConsultationReminderDTO >? consultationReminders;
  785. String? approverCode;
  786. ConsultationReportMode reportMode;
  787. String? diseases;
  788. String? primaryDiagnosis;
  789. String? initiatorCode;
  790. bool isUpdateConsultationShow;
  791. bool isRevokeShow;
  792. bool isApprovalShow;
  793. bool isAddInviterShow;
  794. bool isRejectShow;
  795. bool isAcceptInvitationShow;
  796. bool isRejectInvitationShow;
  797. bool isInitiateShow;
  798. bool isJoinInShow;
  799. bool isReportShow;
  800. bool isEvaluateShow;
  801. bool isFollowUpShow;
  802. ConsultationDetailDTO({
  803. this.consultationCode,
  804. this.applyOrganizationCode,
  805. this.applyDepartmentCode,
  806. this.applyUserCode,
  807. this.expertOrganizationCode,
  808. this.expertDepartmentCode,
  809. this.expertUserCode,
  810. this.deviceCode,
  811. this.operateUserCode,
  812. this.scanUserCode,
  813. this.patientCode,
  814. this.patientType = OrganizationPatientTypeEnum.Person,
  815. this.scanPosition,
  816. this.createTime,
  817. this.consultationTime,
  818. this.consultationTimeEnd,
  819. this.consultationStatus = TransactionStatusEnum.Applied,
  820. this.applyOrganizationName,
  821. this.applyUserName,
  822. this.operateUserName,
  823. this.scanUserName,
  824. this.expertOrganizationName,
  825. this.expertUserName,
  826. this.deviceName,
  827. this.patientName,
  828. this.sex,
  829. this.patientDatas,
  830. this.fileInfos,
  831. this.rejectReason,
  832. this.location,
  833. this.consultationMembers,
  834. this.description,
  835. this.consultationReminders,
  836. this.approverCode,
  837. this.reportMode = ConsultationReportMode.ExpertReport,
  838. this.diseases,
  839. this.primaryDiagnosis,
  840. this.initiatorCode,
  841. this.isUpdateConsultationShow = false,
  842. this.isRevokeShow = false,
  843. this.isApprovalShow = false,
  844. this.isAddInviterShow = false,
  845. this.isRejectShow = false,
  846. this.isAcceptInvitationShow = false,
  847. this.isRejectInvitationShow = false,
  848. this.isInitiateShow = false,
  849. this.isJoinInShow = false,
  850. this.isReportShow = false,
  851. this.isEvaluateShow = false,
  852. this.isFollowUpShow = false,
  853. });
  854. factory ConsultationDetailDTO.fromJson(Map<String, dynamic> map) {
  855. return ConsultationDetailDTO(
  856. consultationCode: map['ConsultationCode'],
  857. applyOrganizationCode: map['ApplyOrganizationCode'],
  858. applyDepartmentCode: map['ApplyDepartmentCode'],
  859. applyUserCode: map['ApplyUserCode'],
  860. expertOrganizationCode: map['ExpertOrganizationCode'],
  861. expertDepartmentCode: map['ExpertDepartmentCode'],
  862. expertUserCode: map['ExpertUserCode'],
  863. deviceCode: map['DeviceCode'],
  864. operateUserCode: map['OperateUserCode'],
  865. scanUserCode: map['ScanUserCode'],
  866. patientCode: map['PatientCode'],
  867. patientType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['PatientType']),
  868. scanPosition: map['ScanPosition'],
  869. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  870. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  871. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  872. consultationStatus: TransactionStatusEnum.values.firstWhere((e) => e.index == map['ConsultationStatus']),
  873. applyOrganizationName: map['ApplyOrganizationName'],
  874. applyUserName: map['ApplyUserName'],
  875. operateUserName: map['OperateUserName'],
  876. scanUserName: map['ScanUserName'],
  877. expertOrganizationName: map['ExpertOrganizationName'],
  878. expertUserName: map['ExpertUserName'],
  879. deviceName: map['DeviceName'],
  880. patientName: map['PatientName'],
  881. sex: map['Sex'],
  882. patientDatas: map['PatientDatas'] != null ? (map['PatientDatas'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  883. fileInfos: map['FileInfos'] != null ? (map['FileInfos'] as List).map((e)=>ConsultationFileDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  884. rejectReason: map['RejectReason'],
  885. location: map['Location'],
  886. consultationMembers: map['ConsultationMembers'] != null ? (map['ConsultationMembers'] as List).map((e)=>ConsultationMemberDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  887. description: map['Description'],
  888. consultationReminders: map['ConsultationReminders'] != null ? (map['ConsultationReminders'] as List).map((e)=>ConsultationReminderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  889. approverCode: map['ApproverCode'],
  890. reportMode: ConsultationReportMode.values.firstWhere((e) => e.index == map['ReportMode']),
  891. diseases: map['Diseases'],
  892. primaryDiagnosis: map['PrimaryDiagnosis'],
  893. initiatorCode: map['InitiatorCode'],
  894. isUpdateConsultationShow: map['IsUpdateConsultationShow'],
  895. isRevokeShow: map['IsRevokeShow'],
  896. isApprovalShow: map['IsApprovalShow'],
  897. isAddInviterShow: map['IsAddInviterShow'],
  898. isRejectShow: map['IsRejectShow'],
  899. isAcceptInvitationShow: map['IsAcceptInvitationShow'],
  900. isRejectInvitationShow: map['IsRejectInvitationShow'],
  901. isInitiateShow: map['IsInitiateShow'],
  902. isJoinInShow: map['IsJoinInShow'],
  903. isReportShow: map['IsReportShow'],
  904. isEvaluateShow: map['IsEvaluateShow'],
  905. isFollowUpShow: map['IsFollowUpShow'],
  906. );
  907. }
  908. Map<String, dynamic> toJson() {
  909. final map = Map<String, dynamic>();
  910. if(consultationCode != null)
  911. map['ConsultationCode'] = consultationCode;
  912. if(applyOrganizationCode != null)
  913. map['ApplyOrganizationCode'] = applyOrganizationCode;
  914. if(applyDepartmentCode != null)
  915. map['ApplyDepartmentCode'] = applyDepartmentCode;
  916. if(applyUserCode != null)
  917. map['ApplyUserCode'] = applyUserCode;
  918. if(expertOrganizationCode != null)
  919. map['ExpertOrganizationCode'] = expertOrganizationCode;
  920. if(expertDepartmentCode != null)
  921. map['ExpertDepartmentCode'] = expertDepartmentCode;
  922. if(expertUserCode != null)
  923. map['ExpertUserCode'] = expertUserCode;
  924. if(deviceCode != null)
  925. map['DeviceCode'] = deviceCode;
  926. if(operateUserCode != null)
  927. map['OperateUserCode'] = operateUserCode;
  928. if(scanUserCode != null)
  929. map['ScanUserCode'] = scanUserCode;
  930. if(patientCode != null)
  931. map['PatientCode'] = patientCode;
  932. map['PatientType'] = patientType.index;
  933. if(scanPosition != null)
  934. map['ScanPosition'] = scanPosition;
  935. if(createTime != null)
  936. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  937. if(consultationTime != null)
  938. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  939. if(consultationTimeEnd != null)
  940. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  941. map['ConsultationStatus'] = consultationStatus.index;
  942. if(applyOrganizationName != null)
  943. map['ApplyOrganizationName'] = applyOrganizationName;
  944. if(applyUserName != null)
  945. map['ApplyUserName'] = applyUserName;
  946. if(operateUserName != null)
  947. map['OperateUserName'] = operateUserName;
  948. if(scanUserName != null)
  949. map['ScanUserName'] = scanUserName;
  950. if(expertOrganizationName != null)
  951. map['ExpertOrganizationName'] = expertOrganizationName;
  952. if(expertUserName != null)
  953. map['ExpertUserName'] = expertUserName;
  954. if(deviceName != null)
  955. map['DeviceName'] = deviceName;
  956. if(patientName != null)
  957. map['PatientName'] = patientName;
  958. if(sex != null)
  959. map['Sex'] = sex;
  960. if(patientDatas != null)
  961. map['PatientDatas'] = patientDatas;
  962. if(fileInfos != null)
  963. map['FileInfos'] = fileInfos;
  964. if(rejectReason != null)
  965. map['RejectReason'] = rejectReason;
  966. if(location != null)
  967. map['Location'] = location;
  968. if(consultationMembers != null)
  969. map['ConsultationMembers'] = consultationMembers;
  970. if(description != null)
  971. map['Description'] = description;
  972. if(consultationReminders != null)
  973. map['ConsultationReminders'] = consultationReminders;
  974. if(approverCode != null)
  975. map['ApproverCode'] = approverCode;
  976. map['ReportMode'] = reportMode.index;
  977. if(diseases != null)
  978. map['Diseases'] = diseases;
  979. if(primaryDiagnosis != null)
  980. map['PrimaryDiagnosis'] = primaryDiagnosis;
  981. if(initiatorCode != null)
  982. map['InitiatorCode'] = initiatorCode;
  983. map['IsUpdateConsultationShow'] = isUpdateConsultationShow;
  984. map['IsRevokeShow'] = isRevokeShow;
  985. map['IsApprovalShow'] = isApprovalShow;
  986. map['IsAddInviterShow'] = isAddInviterShow;
  987. map['IsRejectShow'] = isRejectShow;
  988. map['IsAcceptInvitationShow'] = isAcceptInvitationShow;
  989. map['IsRejectInvitationShow'] = isRejectInvitationShow;
  990. map['IsInitiateShow'] = isInitiateShow;
  991. map['IsJoinInShow'] = isJoinInShow;
  992. map['IsReportShow'] = isReportShow;
  993. map['IsEvaluateShow'] = isEvaluateShow;
  994. map['IsFollowUpShow'] = isFollowUpShow;
  995. return map;
  996. }
  997. }
  998. class FindConsultationDetailRequest extends TokenRequest{
  999. String? consultationCode;
  1000. FindConsultationDetailRequest({
  1001. this.consultationCode,
  1002. String? token,
  1003. }) : super(
  1004. token: token,
  1005. );
  1006. factory FindConsultationDetailRequest.fromJson(Map<String, dynamic> map) {
  1007. return FindConsultationDetailRequest(
  1008. consultationCode: map['ConsultationCode'],
  1009. token: map['Token'],
  1010. );
  1011. }
  1012. Map<String, dynamic> toJson() {
  1013. final map = super.toJson();
  1014. if(consultationCode != null)
  1015. map['ConsultationCode'] = consultationCode;
  1016. return map;
  1017. }
  1018. }
  1019. class ApprovalConsultationRequest extends TokenRequest{
  1020. String? consultationCode;
  1021. String? expertUserCode;
  1022. DateTime? consultationTime;
  1023. DateTime? consultationTimeEnd;
  1024. String? location;
  1025. List<String >? consultationMemberCodes;
  1026. String? description;
  1027. List<ConsultationReminderDTO >? consultationReminders;
  1028. ApprovalConsultationRequest({
  1029. this.consultationCode,
  1030. this.expertUserCode,
  1031. this.consultationTime,
  1032. this.consultationTimeEnd,
  1033. this.location,
  1034. this.consultationMemberCodes,
  1035. this.description,
  1036. this.consultationReminders,
  1037. String? token,
  1038. }) : super(
  1039. token: token,
  1040. );
  1041. factory ApprovalConsultationRequest.fromJson(Map<String, dynamic> map) {
  1042. return ApprovalConsultationRequest(
  1043. consultationCode: map['ConsultationCode'],
  1044. expertUserCode: map['ExpertUserCode'],
  1045. consultationTime: map['ConsultationTime'] != null ? DateTime.parse(map['ConsultationTime']) : null,
  1046. consultationTimeEnd: map['ConsultationTimeEnd'] != null ? DateTime.parse(map['ConsultationTimeEnd']) : null,
  1047. location: map['Location'],
  1048. consultationMemberCodes: map['ConsultationMemberCodes'] != null ? map['ConsultationMemberCodes'].cast<String>().toList() : null,
  1049. description: map['Description'],
  1050. consultationReminders: map['ConsultationReminders'] != null ? (map['ConsultationReminders'] as List).map((e)=>ConsultationReminderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1051. token: map['Token'],
  1052. );
  1053. }
  1054. Map<String, dynamic> toJson() {
  1055. final map = super.toJson();
  1056. if(consultationCode != null)
  1057. map['ConsultationCode'] = consultationCode;
  1058. if(expertUserCode != null)
  1059. map['ExpertUserCode'] = expertUserCode;
  1060. if(consultationTime != null)
  1061. map['ConsultationTime'] = JsonRpcUtils.dateFormat(consultationTime!);
  1062. if(consultationTimeEnd != null)
  1063. map['ConsultationTimeEnd'] = JsonRpcUtils.dateFormat(consultationTimeEnd!);
  1064. if(location != null)
  1065. map['Location'] = location;
  1066. if(consultationMemberCodes != null)
  1067. map['ConsultationMemberCodes'] = consultationMemberCodes;
  1068. if(description != null)
  1069. map['Description'] = description;
  1070. if(consultationReminders != null)
  1071. map['ConsultationReminders'] = consultationReminders;
  1072. return map;
  1073. }
  1074. }
  1075. class RejectApplyConsultationRequest extends TokenRequest{
  1076. String? consultationCode;
  1077. String? reason;
  1078. RejectApplyConsultationRequest({
  1079. this.consultationCode,
  1080. this.reason,
  1081. String? token,
  1082. }) : super(
  1083. token: token,
  1084. );
  1085. factory RejectApplyConsultationRequest.fromJson(Map<String, dynamic> map) {
  1086. return RejectApplyConsultationRequest(
  1087. consultationCode: map['ConsultationCode'],
  1088. reason: map['Reason'],
  1089. token: map['Token'],
  1090. );
  1091. }
  1092. Map<String, dynamic> toJson() {
  1093. final map = super.toJson();
  1094. if(consultationCode != null)
  1095. map['ConsultationCode'] = consultationCode;
  1096. if(reason != null)
  1097. map['Reason'] = reason;
  1098. return map;
  1099. }
  1100. }
  1101. class RevokeConsultationRequest extends TokenRequest{
  1102. String? consultationCode;
  1103. RevokeConsultationRequest({
  1104. this.consultationCode,
  1105. String? token,
  1106. }) : super(
  1107. token: token,
  1108. );
  1109. factory RevokeConsultationRequest.fromJson(Map<String, dynamic> map) {
  1110. return RevokeConsultationRequest(
  1111. consultationCode: map['ConsultationCode'],
  1112. token: map['Token'],
  1113. );
  1114. }
  1115. Map<String, dynamic> toJson() {
  1116. final map = super.toJson();
  1117. if(consultationCode != null)
  1118. map['ConsultationCode'] = consultationCode;
  1119. return map;
  1120. }
  1121. }
  1122. class DeleteConsultationRequest extends TokenRequest{
  1123. String? consultationCode;
  1124. DeleteConsultationRequest({
  1125. this.consultationCode,
  1126. String? token,
  1127. }) : super(
  1128. token: token,
  1129. );
  1130. factory DeleteConsultationRequest.fromJson(Map<String, dynamic> map) {
  1131. return DeleteConsultationRequest(
  1132. consultationCode: map['ConsultationCode'],
  1133. token: map['Token'],
  1134. );
  1135. }
  1136. Map<String, dynamic> toJson() {
  1137. final map = super.toJson();
  1138. if(consultationCode != null)
  1139. map['ConsultationCode'] = consultationCode;
  1140. return map;
  1141. }
  1142. }
  1143. class ConsultationFileBaseDTO {
  1144. String? sourceUrl;
  1145. String? previewImageUrl;
  1146. String? coverImageUrl;
  1147. RemedicalFileDataTypeEnum fileDataType;
  1148. ConsultationFileBaseDTO({
  1149. this.sourceUrl,
  1150. this.previewImageUrl,
  1151. this.coverImageUrl,
  1152. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1153. });
  1154. factory ConsultationFileBaseDTO.fromJson(Map<String, dynamic> map) {
  1155. return ConsultationFileBaseDTO(
  1156. sourceUrl: map['SourceUrl'],
  1157. previewImageUrl: map['PreviewImageUrl'],
  1158. coverImageUrl: map['CoverImageUrl'],
  1159. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1160. );
  1161. }
  1162. Map<String, dynamic> toJson() {
  1163. final map = Map<String, dynamic>();
  1164. if(sourceUrl != null)
  1165. map['SourceUrl'] = sourceUrl;
  1166. if(previewImageUrl != null)
  1167. map['PreviewImageUrl'] = previewImageUrl;
  1168. if(coverImageUrl != null)
  1169. map['CoverImageUrl'] = coverImageUrl;
  1170. map['FileDataType'] = fileDataType.index;
  1171. return map;
  1172. }
  1173. }
  1174. class UpdateConsultationFilesInfoRequest extends TokenRequest{
  1175. String? consultationCode;
  1176. List<ConsultationFileBaseDTO >? fileInfos;
  1177. UpdateConsultationFilesInfoRequest({
  1178. this.consultationCode,
  1179. this.fileInfos,
  1180. String? token,
  1181. }) : super(
  1182. token: token,
  1183. );
  1184. factory UpdateConsultationFilesInfoRequest.fromJson(Map<String, dynamic> map) {
  1185. return UpdateConsultationFilesInfoRequest(
  1186. consultationCode: map['ConsultationCode'],
  1187. fileInfos: map['FileInfos'] != null ? (map['FileInfos'] as List).map((e)=>ConsultationFileBaseDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1188. token: map['Token'],
  1189. );
  1190. }
  1191. Map<String, dynamic> toJson() {
  1192. final map = super.toJson();
  1193. if(consultationCode != null)
  1194. map['ConsultationCode'] = consultationCode;
  1195. if(fileInfos != null)
  1196. map['FileInfos'] = fileInfos;
  1197. return map;
  1198. }
  1199. }
  1200. class ConsultationAssistantDTO extends UserBaseDTO{
  1201. String? fullName;
  1202. ConsultationAssistantDTO({
  1203. this.fullName,
  1204. String? userCode,
  1205. String? userName,
  1206. String? headImageUrl,
  1207. DateTime? createTime,
  1208. DateTime? updateTime,
  1209. }) : super(
  1210. userCode: userCode,
  1211. userName: userName,
  1212. headImageUrl: headImageUrl,
  1213. createTime: createTime,
  1214. updateTime: updateTime,
  1215. );
  1216. factory ConsultationAssistantDTO.fromJson(Map<String, dynamic> map) {
  1217. return ConsultationAssistantDTO(
  1218. fullName: map['FullName'],
  1219. userCode: map['UserCode'],
  1220. userName: map['UserName'],
  1221. headImageUrl: map['HeadImageUrl'],
  1222. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1223. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1224. );
  1225. }
  1226. Map<String, dynamic> toJson() {
  1227. final map = super.toJson();
  1228. if(fullName != null)
  1229. map['FullName'] = fullName;
  1230. return map;
  1231. }
  1232. }
  1233. class FindOrganizationAssistantsRequest extends TokenRequest{
  1234. String? assistantName;
  1235. FindOrganizationAssistantsRequest({
  1236. this.assistantName,
  1237. String? token,
  1238. }) : super(
  1239. token: token,
  1240. );
  1241. factory FindOrganizationAssistantsRequest.fromJson(Map<String, dynamic> map) {
  1242. return FindOrganizationAssistantsRequest(
  1243. assistantName: map['AssistantName'],
  1244. token: map['Token'],
  1245. );
  1246. }
  1247. Map<String, dynamic> toJson() {
  1248. final map = super.toJson();
  1249. if(assistantName != null)
  1250. map['AssistantName'] = assistantName;
  1251. return map;
  1252. }
  1253. }
  1254. class ConsultationAssistantDoctorDTO extends UserBaseDTO{
  1255. String? fullName;
  1256. ConsultationAssistantDoctorDTO({
  1257. this.fullName,
  1258. String? userCode,
  1259. String? userName,
  1260. String? headImageUrl,
  1261. DateTime? createTime,
  1262. DateTime? updateTime,
  1263. }) : super(
  1264. userCode: userCode,
  1265. userName: userName,
  1266. headImageUrl: headImageUrl,
  1267. createTime: createTime,
  1268. updateTime: updateTime,
  1269. );
  1270. factory ConsultationAssistantDoctorDTO.fromJson(Map<String, dynamic> map) {
  1271. return ConsultationAssistantDoctorDTO(
  1272. fullName: map['FullName'],
  1273. userCode: map['UserCode'],
  1274. userName: map['UserName'],
  1275. headImageUrl: map['HeadImageUrl'],
  1276. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1277. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1278. );
  1279. }
  1280. Map<String, dynamic> toJson() {
  1281. final map = super.toJson();
  1282. if(fullName != null)
  1283. map['FullName'] = fullName;
  1284. return map;
  1285. }
  1286. }
  1287. class FindOrganizationAssistantDoctorsRequest extends TokenRequest{
  1288. String? assistantDoctorName;
  1289. FindOrganizationAssistantDoctorsRequest({
  1290. this.assistantDoctorName,
  1291. String? token,
  1292. }) : super(
  1293. token: token,
  1294. );
  1295. factory FindOrganizationAssistantDoctorsRequest.fromJson(Map<String, dynamic> map) {
  1296. return FindOrganizationAssistantDoctorsRequest(
  1297. assistantDoctorName: map['AssistantDoctorName'],
  1298. token: map['Token'],
  1299. );
  1300. }
  1301. Map<String, dynamic> toJson() {
  1302. final map = super.toJson();
  1303. if(assistantDoctorName != null)
  1304. map['AssistantDoctorName'] = assistantDoctorName;
  1305. return map;
  1306. }
  1307. }
  1308. class UpdateMyOrganizationAssistantRequest extends TokenRequest{
  1309. String? assistantUserCode;
  1310. String? assistantDoctorUserCode;
  1311. UpdateMyOrganizationAssistantRequest({
  1312. this.assistantUserCode,
  1313. this.assistantDoctorUserCode,
  1314. String? token,
  1315. }) : super(
  1316. token: token,
  1317. );
  1318. factory UpdateMyOrganizationAssistantRequest.fromJson(Map<String, dynamic> map) {
  1319. return UpdateMyOrganizationAssistantRequest(
  1320. assistantUserCode: map['AssistantUserCode'],
  1321. assistantDoctorUserCode: map['AssistantDoctorUserCode'],
  1322. token: map['Token'],
  1323. );
  1324. }
  1325. Map<String, dynamic> toJson() {
  1326. final map = super.toJson();
  1327. if(assistantUserCode != null)
  1328. map['AssistantUserCode'] = assistantUserCode;
  1329. if(assistantDoctorUserCode != null)
  1330. map['AssistantDoctorUserCode'] = assistantDoctorUserCode;
  1331. return map;
  1332. }
  1333. }
  1334. class ClientPatientInfoBaseDTO extends BaseDTO{
  1335. String? patientCode;
  1336. bool isValid;
  1337. List<DataItemDTO >? patientData;
  1338. int unReadRecordCount;
  1339. bool isReferral;
  1340. List<String >? devicePatientIDs;
  1341. ClientPatientInfoBaseDTO({
  1342. this.patientCode,
  1343. this.isValid = false,
  1344. this.patientData,
  1345. this.unReadRecordCount = 0,
  1346. this.isReferral = false,
  1347. this.devicePatientIDs,
  1348. DateTime? createTime,
  1349. DateTime? updateTime,
  1350. }) : super(
  1351. createTime: createTime,
  1352. updateTime: updateTime,
  1353. );
  1354. factory ClientPatientInfoBaseDTO.fromJson(Map<String, dynamic> map) {
  1355. return ClientPatientInfoBaseDTO(
  1356. patientCode: map['PatientCode'],
  1357. isValid: map['IsValid'],
  1358. patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1359. unReadRecordCount: map['UnReadRecordCount'],
  1360. isReferral: map['IsReferral'],
  1361. devicePatientIDs: map['DevicePatientIDs'] != null ? map['DevicePatientIDs'].cast<String>().toList() : null,
  1362. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1363. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1364. );
  1365. }
  1366. Map<String, dynamic> toJson() {
  1367. final map = super.toJson();
  1368. if(patientCode != null)
  1369. map['PatientCode'] = patientCode;
  1370. map['IsValid'] = isValid;
  1371. if(patientData != null)
  1372. map['PatientData'] = patientData;
  1373. map['UnReadRecordCount'] = unReadRecordCount;
  1374. map['IsReferral'] = isReferral;
  1375. if(devicePatientIDs != null)
  1376. map['DevicePatientIDs'] = devicePatientIDs;
  1377. return map;
  1378. }
  1379. }
  1380. class FindConsultationPatientPageRequest extends PageRequest{
  1381. String? keyword;
  1382. DateTime? startDate;
  1383. DateTime? endDate;
  1384. FindConsultationPatientPageRequest({
  1385. this.keyword,
  1386. this.startDate,
  1387. this.endDate,
  1388. int pageIndex = 0,
  1389. int pageSize = 0,
  1390. String? token,
  1391. }) : super(
  1392. pageIndex: pageIndex,
  1393. pageSize: pageSize,
  1394. token: token,
  1395. );
  1396. factory FindConsultationPatientPageRequest.fromJson(Map<String, dynamic> map) {
  1397. return FindConsultationPatientPageRequest(
  1398. keyword: map['Keyword'],
  1399. startDate: map['StartDate'] != null ? DateTime.parse(map['StartDate']) : null,
  1400. endDate: map['EndDate'] != null ? DateTime.parse(map['EndDate']) : null,
  1401. pageIndex: map['PageIndex'],
  1402. pageSize: map['PageSize'],
  1403. token: map['Token'],
  1404. );
  1405. }
  1406. Map<String, dynamic> toJson() {
  1407. final map = super.toJson();
  1408. if(keyword != null)
  1409. map['Keyword'] = keyword;
  1410. if(startDate != null)
  1411. map['StartDate'] = JsonRpcUtils.dateFormat(startDate!);
  1412. if(endDate != null)
  1413. map['EndDate'] = JsonRpcUtils.dateFormat(endDate!);
  1414. return map;
  1415. }
  1416. }
  1417. class InitiateLiveConsultationResult {
  1418. String? consultationCode;
  1419. String? initiatorCode;
  1420. int roomNo;
  1421. int appId;
  1422. String? userSign;
  1423. List<LiveConsultationMember >? memberLiveDatas;
  1424. InitiateLiveConsultationResult({
  1425. this.consultationCode,
  1426. this.initiatorCode,
  1427. this.roomNo = 0,
  1428. this.appId = 0,
  1429. this.userSign,
  1430. this.memberLiveDatas,
  1431. });
  1432. factory InitiateLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1433. return InitiateLiveConsultationResult(
  1434. consultationCode: map['ConsultationCode'],
  1435. initiatorCode: map['InitiatorCode'],
  1436. roomNo: map['RoomNo'],
  1437. appId: map['AppId'],
  1438. userSign: map['UserSign'],
  1439. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  1440. );
  1441. }
  1442. Map<String, dynamic> toJson() {
  1443. final map = Map<String, dynamic>();
  1444. if(consultationCode != null)
  1445. map['ConsultationCode'] = consultationCode;
  1446. if(initiatorCode != null)
  1447. map['InitiatorCode'] = initiatorCode;
  1448. map['RoomNo'] = roomNo;
  1449. map['AppId'] = appId;
  1450. if(userSign != null)
  1451. map['UserSign'] = userSign;
  1452. if(memberLiveDatas != null)
  1453. map['MemberLiveDatas'] = memberLiveDatas;
  1454. return map;
  1455. }
  1456. }
  1457. class InitiateLiveConsultationRequest extends TokenRequest{
  1458. String? consultationCode;
  1459. InitiateLiveConsultationRequest({
  1460. this.consultationCode,
  1461. String? token,
  1462. }) : super(
  1463. token: token,
  1464. );
  1465. factory InitiateLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1466. return InitiateLiveConsultationRequest(
  1467. consultationCode: map['ConsultationCode'],
  1468. token: map['Token'],
  1469. );
  1470. }
  1471. Map<String, dynamic> toJson() {
  1472. final map = super.toJson();
  1473. if(consultationCode != null)
  1474. map['ConsultationCode'] = consultationCode;
  1475. return map;
  1476. }
  1477. }
  1478. class InviteInLiveConsultationResult {
  1479. String? consultationCode;
  1480. InviteInLiveConsultationResult({
  1481. this.consultationCode,
  1482. });
  1483. factory InviteInLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1484. return InviteInLiveConsultationResult(
  1485. consultationCode: map['ConsultationCode'],
  1486. );
  1487. }
  1488. Map<String, dynamic> toJson() {
  1489. final map = Map<String, dynamic>();
  1490. if(consultationCode != null)
  1491. map['ConsultationCode'] = consultationCode;
  1492. return map;
  1493. }
  1494. }
  1495. class InviteInLiveConsultationRequest extends TokenRequest{
  1496. String? consultationCode;
  1497. List<String >? inviteCodes;
  1498. int roomNo;
  1499. InviteInLiveConsultationRequest({
  1500. this.consultationCode,
  1501. this.inviteCodes,
  1502. this.roomNo = 0,
  1503. String? token,
  1504. }) : super(
  1505. token: token,
  1506. );
  1507. factory InviteInLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1508. return InviteInLiveConsultationRequest(
  1509. consultationCode: map['ConsultationCode'],
  1510. inviteCodes: map['InviteCodes'] != null ? map['InviteCodes'].cast<String>().toList() : null,
  1511. roomNo: map['RoomNo'],
  1512. token: map['Token'],
  1513. );
  1514. }
  1515. Map<String, dynamic> toJson() {
  1516. final map = super.toJson();
  1517. if(consultationCode != null)
  1518. map['ConsultationCode'] = consultationCode;
  1519. if(inviteCodes != null)
  1520. map['InviteCodes'] = inviteCodes;
  1521. map['RoomNo'] = roomNo;
  1522. return map;
  1523. }
  1524. }
  1525. class CancelInvitingInLiveConsultationResult {
  1526. String? consultationCode;
  1527. CancelInvitingInLiveConsultationResult({
  1528. this.consultationCode,
  1529. });
  1530. factory CancelInvitingInLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1531. return CancelInvitingInLiveConsultationResult(
  1532. consultationCode: map['ConsultationCode'],
  1533. );
  1534. }
  1535. Map<String, dynamic> toJson() {
  1536. final map = Map<String, dynamic>();
  1537. if(consultationCode != null)
  1538. map['ConsultationCode'] = consultationCode;
  1539. return map;
  1540. }
  1541. }
  1542. class CancelInvitingInLiveConsultationRequest extends TokenRequest{
  1543. String? consultationCode;
  1544. List<String >? inviteCodes;
  1545. CancelInvitingInLiveConsultationRequest({
  1546. this.consultationCode,
  1547. this.inviteCodes,
  1548. String? token,
  1549. }) : super(
  1550. token: token,
  1551. );
  1552. factory CancelInvitingInLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1553. return CancelInvitingInLiveConsultationRequest(
  1554. consultationCode: map['ConsultationCode'],
  1555. inviteCodes: map['InviteCodes'] != null ? map['InviteCodes'].cast<String>().toList() : null,
  1556. token: map['Token'],
  1557. );
  1558. }
  1559. Map<String, dynamic> toJson() {
  1560. final map = super.toJson();
  1561. if(consultationCode != null)
  1562. map['ConsultationCode'] = consultationCode;
  1563. if(inviteCodes != null)
  1564. map['InviteCodes'] = inviteCodes;
  1565. return map;
  1566. }
  1567. }
  1568. class RejectLiveConsultationResult {
  1569. String? consultationCode;
  1570. RejectLiveConsultationResult({
  1571. this.consultationCode,
  1572. });
  1573. factory RejectLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1574. return RejectLiveConsultationResult(
  1575. consultationCode: map['ConsultationCode'],
  1576. );
  1577. }
  1578. Map<String, dynamic> toJson() {
  1579. final map = Map<String, dynamic>();
  1580. if(consultationCode != null)
  1581. map['ConsultationCode'] = consultationCode;
  1582. return map;
  1583. }
  1584. }
  1585. class RejectLiveConsultationRequest extends TokenRequest{
  1586. String? consultationCode;
  1587. RejectLiveConsultationRequest({
  1588. this.consultationCode,
  1589. String? token,
  1590. }) : super(
  1591. token: token,
  1592. );
  1593. factory RejectLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1594. return RejectLiveConsultationRequest(
  1595. consultationCode: map['ConsultationCode'],
  1596. token: map['Token'],
  1597. );
  1598. }
  1599. Map<String, dynamic> toJson() {
  1600. final map = super.toJson();
  1601. if(consultationCode != null)
  1602. map['ConsultationCode'] = consultationCode;
  1603. return map;
  1604. }
  1605. }
  1606. class JoinLiveConsultationResult {
  1607. String? consultationCode;
  1608. String? userCode;
  1609. int roomNo;
  1610. int appId;
  1611. String? userSign;
  1612. List<LiveConsultationMember >? memberLiveDatas;
  1613. JoinLiveConsultationResult({
  1614. this.consultationCode,
  1615. this.userCode,
  1616. this.roomNo = 0,
  1617. this.appId = 0,
  1618. this.userSign,
  1619. this.memberLiveDatas,
  1620. });
  1621. factory JoinLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1622. return JoinLiveConsultationResult(
  1623. consultationCode: map['ConsultationCode'],
  1624. userCode: map['UserCode'],
  1625. roomNo: map['RoomNo'],
  1626. appId: map['AppId'],
  1627. userSign: map['UserSign'],
  1628. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  1629. );
  1630. }
  1631. Map<String, dynamic> toJson() {
  1632. final map = Map<String, dynamic>();
  1633. if(consultationCode != null)
  1634. map['ConsultationCode'] = consultationCode;
  1635. if(userCode != null)
  1636. map['UserCode'] = userCode;
  1637. map['RoomNo'] = roomNo;
  1638. map['AppId'] = appId;
  1639. if(userSign != null)
  1640. map['UserSign'] = userSign;
  1641. if(memberLiveDatas != null)
  1642. map['MemberLiveDatas'] = memberLiveDatas;
  1643. return map;
  1644. }
  1645. }
  1646. class JoinLiveConsultationRequest extends TokenRequest{
  1647. String? consultationCode;
  1648. JoinLiveConsultationRequest({
  1649. this.consultationCode,
  1650. String? token,
  1651. }) : super(
  1652. token: token,
  1653. );
  1654. factory JoinLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1655. return JoinLiveConsultationRequest(
  1656. consultationCode: map['ConsultationCode'],
  1657. token: map['Token'],
  1658. );
  1659. }
  1660. Map<String, dynamic> toJson() {
  1661. final map = super.toJson();
  1662. if(consultationCode != null)
  1663. map['ConsultationCode'] = consultationCode;
  1664. return map;
  1665. }
  1666. }
  1667. class CancelLiveConsultationResult {
  1668. String? consultationCode;
  1669. CancelLiveConsultationResult({
  1670. this.consultationCode,
  1671. });
  1672. factory CancelLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1673. return CancelLiveConsultationResult(
  1674. consultationCode: map['ConsultationCode'],
  1675. );
  1676. }
  1677. Map<String, dynamic> toJson() {
  1678. final map = Map<String, dynamic>();
  1679. if(consultationCode != null)
  1680. map['ConsultationCode'] = consultationCode;
  1681. return map;
  1682. }
  1683. }
  1684. class CancelLiveConsultationRequest extends TokenRequest{
  1685. String? consultationCode;
  1686. CancelLiveConsultationRequest({
  1687. this.consultationCode,
  1688. String? token,
  1689. }) : super(
  1690. token: token,
  1691. );
  1692. factory CancelLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1693. return CancelLiveConsultationRequest(
  1694. consultationCode: map['ConsultationCode'],
  1695. token: map['Token'],
  1696. );
  1697. }
  1698. Map<String, dynamic> toJson() {
  1699. final map = super.toJson();
  1700. if(consultationCode != null)
  1701. map['ConsultationCode'] = consultationCode;
  1702. return map;
  1703. }
  1704. }
  1705. class AcceptLiveConsultationResult {
  1706. String? consultationCode;
  1707. String? userCode;
  1708. int roomNo;
  1709. int appId;
  1710. String? userSign;
  1711. List<LiveConsultationMember >? memberLiveDatas;
  1712. AcceptLiveConsultationResult({
  1713. this.consultationCode,
  1714. this.userCode,
  1715. this.roomNo = 0,
  1716. this.appId = 0,
  1717. this.userSign,
  1718. this.memberLiveDatas,
  1719. });
  1720. factory AcceptLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1721. return AcceptLiveConsultationResult(
  1722. consultationCode: map['ConsultationCode'],
  1723. userCode: map['UserCode'],
  1724. roomNo: map['RoomNo'],
  1725. appId: map['AppId'],
  1726. userSign: map['UserSign'],
  1727. memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveConsultationMember.fromJson(e as Map<String,dynamic>)).toList() : null,
  1728. );
  1729. }
  1730. Map<String, dynamic> toJson() {
  1731. final map = Map<String, dynamic>();
  1732. if(consultationCode != null)
  1733. map['ConsultationCode'] = consultationCode;
  1734. if(userCode != null)
  1735. map['UserCode'] = userCode;
  1736. map['RoomNo'] = roomNo;
  1737. map['AppId'] = appId;
  1738. if(userSign != null)
  1739. map['UserSign'] = userSign;
  1740. if(memberLiveDatas != null)
  1741. map['MemberLiveDatas'] = memberLiveDatas;
  1742. return map;
  1743. }
  1744. }
  1745. class AcceptLiveConsultationRequest extends TokenRequest{
  1746. String? consultationCode;
  1747. AcceptLiveConsultationRequest({
  1748. this.consultationCode,
  1749. String? token,
  1750. }) : super(
  1751. token: token,
  1752. );
  1753. factory AcceptLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1754. return AcceptLiveConsultationRequest(
  1755. consultationCode: map['ConsultationCode'],
  1756. token: map['Token'],
  1757. );
  1758. }
  1759. Map<String, dynamic> toJson() {
  1760. final map = super.toJson();
  1761. if(consultationCode != null)
  1762. map['ConsultationCode'] = consultationCode;
  1763. return map;
  1764. }
  1765. }
  1766. class LeaveLiveConsultationResult {
  1767. String? consultationCode;
  1768. LeaveLiveConsultationResult({
  1769. this.consultationCode,
  1770. });
  1771. factory LeaveLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1772. return LeaveLiveConsultationResult(
  1773. consultationCode: map['ConsultationCode'],
  1774. );
  1775. }
  1776. Map<String, dynamic> toJson() {
  1777. final map = Map<String, dynamic>();
  1778. if(consultationCode != null)
  1779. map['ConsultationCode'] = consultationCode;
  1780. return map;
  1781. }
  1782. }
  1783. class LeaveLiveConsultationRequest extends TokenRequest{
  1784. String? consultationCode;
  1785. LeaveLiveConsultationRequest({
  1786. this.consultationCode,
  1787. String? token,
  1788. }) : super(
  1789. token: token,
  1790. );
  1791. factory LeaveLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1792. return LeaveLiveConsultationRequest(
  1793. consultationCode: map['ConsultationCode'],
  1794. token: map['Token'],
  1795. );
  1796. }
  1797. Map<String, dynamic> toJson() {
  1798. final map = super.toJson();
  1799. if(consultationCode != null)
  1800. map['ConsultationCode'] = consultationCode;
  1801. return map;
  1802. }
  1803. }
  1804. class MuteLiveConsultationResult {
  1805. String? consultationCode;
  1806. MuteLiveConsultationResult({
  1807. this.consultationCode,
  1808. });
  1809. factory MuteLiveConsultationResult.fromJson(Map<String, dynamic> map) {
  1810. return MuteLiveConsultationResult(
  1811. consultationCode: map['ConsultationCode'],
  1812. );
  1813. }
  1814. Map<String, dynamic> toJson() {
  1815. final map = Map<String, dynamic>();
  1816. if(consultationCode != null)
  1817. map['ConsultationCode'] = consultationCode;
  1818. return map;
  1819. }
  1820. }
  1821. class MuteLiveConsultationRequest extends TokenRequest{
  1822. String? consultationCode;
  1823. bool mute;
  1824. MuteLiveConsultationRequest({
  1825. this.consultationCode,
  1826. this.mute = false,
  1827. String? token,
  1828. }) : super(
  1829. token: token,
  1830. );
  1831. factory MuteLiveConsultationRequest.fromJson(Map<String, dynamic> map) {
  1832. return MuteLiveConsultationRequest(
  1833. consultationCode: map['ConsultationCode'],
  1834. mute: map['Mute'],
  1835. token: map['Token'],
  1836. );
  1837. }
  1838. Map<String, dynamic> toJson() {
  1839. final map = super.toJson();
  1840. if(consultationCode != null)
  1841. map['ConsultationCode'] = consultationCode;
  1842. map['Mute'] = mute;
  1843. return map;
  1844. }
  1845. }
  1846. class SwitchLiveConsultationVideoResult {
  1847. String? consultationCode;
  1848. SwitchLiveConsultationVideoResult({
  1849. this.consultationCode,
  1850. });
  1851. factory SwitchLiveConsultationVideoResult.fromJson(Map<String, dynamic> map) {
  1852. return SwitchLiveConsultationVideoResult(
  1853. consultationCode: map['ConsultationCode'],
  1854. );
  1855. }
  1856. Map<String, dynamic> toJson() {
  1857. final map = Map<String, dynamic>();
  1858. if(consultationCode != null)
  1859. map['ConsultationCode'] = consultationCode;
  1860. return map;
  1861. }
  1862. }
  1863. class SwitchLiveConsultationVideoRequest extends TokenRequest{
  1864. String? consultationCode;
  1865. bool opened;
  1866. SwitchLiveConsultationVideoRequest({
  1867. this.consultationCode,
  1868. this.opened = false,
  1869. String? token,
  1870. }) : super(
  1871. token: token,
  1872. );
  1873. factory SwitchLiveConsultationVideoRequest.fromJson(Map<String, dynamic> map) {
  1874. return SwitchLiveConsultationVideoRequest(
  1875. consultationCode: map['ConsultationCode'],
  1876. opened: map['Opened'],
  1877. token: map['Token'],
  1878. );
  1879. }
  1880. Map<String, dynamic> toJson() {
  1881. final map = super.toJson();
  1882. if(consultationCode != null)
  1883. map['ConsultationCode'] = consultationCode;
  1884. map['Opened'] = opened;
  1885. return map;
  1886. }
  1887. }
  1888. class LiveConsultationHeartRateResult {
  1889. String? consultationCode;
  1890. LiveConsultationHeartRateResult({
  1891. this.consultationCode,
  1892. });
  1893. factory LiveConsultationHeartRateResult.fromJson(Map<String, dynamic> map) {
  1894. return LiveConsultationHeartRateResult(
  1895. consultationCode: map['ConsultationCode'],
  1896. );
  1897. }
  1898. Map<String, dynamic> toJson() {
  1899. final map = Map<String, dynamic>();
  1900. if(consultationCode != null)
  1901. map['ConsultationCode'] = consultationCode;
  1902. return map;
  1903. }
  1904. }
  1905. class LiveConsultationHeartRateRequest extends TokenRequest{
  1906. String? consultationCode;
  1907. LiveConsultationHeartRateRequest({
  1908. this.consultationCode,
  1909. String? token,
  1910. }) : super(
  1911. token: token,
  1912. );
  1913. factory LiveConsultationHeartRateRequest.fromJson(Map<String, dynamic> map) {
  1914. return LiveConsultationHeartRateRequest(
  1915. consultationCode: map['ConsultationCode'],
  1916. token: map['Token'],
  1917. );
  1918. }
  1919. Map<String, dynamic> toJson() {
  1920. final map = super.toJson();
  1921. if(consultationCode != null)
  1922. map['ConsultationCode'] = consultationCode;
  1923. return map;
  1924. }
  1925. }
  1926. class BoardPointDTO {
  1927. double x;
  1928. double y;
  1929. BoardPointDTO({
  1930. this.x = 0,
  1931. this.y = 0,
  1932. });
  1933. factory BoardPointDTO.fromJson(Map<String, dynamic> map) {
  1934. return BoardPointDTO(
  1935. x: double.parse(map['X'].toString()),
  1936. y: double.parse(map['Y'].toString()),
  1937. );
  1938. }
  1939. Map<String, dynamic> toJson() {
  1940. final map = Map<String, dynamic>();
  1941. map['X'] = x;
  1942. map['Y'] = y;
  1943. return map;
  1944. }
  1945. }
  1946. enum BoardTypeEnum {
  1947. ReadOnly,
  1948. Ink,
  1949. Line,
  1950. Erase,
  1951. }
  1952. class SendInteractiveBoardDataRequest extends TokenRequest{
  1953. String? inkColor;
  1954. double inkThickness;
  1955. List<BoardPointDTO >? points;
  1956. BoardTypeEnum boardEditType;
  1957. String? consultationCode;
  1958. SendInteractiveBoardDataRequest({
  1959. this.inkColor,
  1960. this.inkThickness = 0,
  1961. this.points,
  1962. this.boardEditType = BoardTypeEnum.ReadOnly,
  1963. this.consultationCode,
  1964. String? token,
  1965. }) : super(
  1966. token: token,
  1967. );
  1968. factory SendInteractiveBoardDataRequest.fromJson(Map<String, dynamic> map) {
  1969. return SendInteractiveBoardDataRequest(
  1970. inkColor: map['InkColor'],
  1971. inkThickness: double.parse(map['InkThickness'].toString()),
  1972. points: map['Points'] != null ? (map['Points'] as List).map((e)=>BoardPointDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1973. boardEditType: BoardTypeEnum.values.firstWhere((e) => e.index == map['BoardEditType']),
  1974. consultationCode: map['ConsultationCode'],
  1975. token: map['Token'],
  1976. );
  1977. }
  1978. Map<String, dynamic> toJson() {
  1979. final map = super.toJson();
  1980. if(inkColor != null)
  1981. map['InkColor'] = inkColor;
  1982. map['InkThickness'] = inkThickness;
  1983. if(points != null)
  1984. map['Points'] = points;
  1985. map['BoardEditType'] = boardEditType.index;
  1986. if(consultationCode != null)
  1987. map['ConsultationCode'] = consultationCode;
  1988. return map;
  1989. }
  1990. }
  1991. class AddFollowUpVisitInfoRequest extends TokenRequest{
  1992. String? consultationRecordCode;
  1993. String? patientName;
  1994. String? patientPhone;
  1995. String? generalCase;
  1996. String? clinicalSituation;
  1997. String? doctorCode;
  1998. DateTime? occurredTime;
  1999. AddFollowUpVisitInfoRequest({
  2000. this.consultationRecordCode,
  2001. this.patientName,
  2002. this.patientPhone,
  2003. this.generalCase,
  2004. this.clinicalSituation,
  2005. this.doctorCode,
  2006. this.occurredTime,
  2007. String? token,
  2008. }) : super(
  2009. token: token,
  2010. );
  2011. factory AddFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2012. return AddFollowUpVisitInfoRequest(
  2013. consultationRecordCode: map['ConsultationRecordCode'],
  2014. patientName: map['PatientName'],
  2015. patientPhone: map['PatientPhone'],
  2016. generalCase: map['GeneralCase'],
  2017. clinicalSituation: map['ClinicalSituation'],
  2018. doctorCode: map['DoctorCode'],
  2019. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  2020. token: map['Token'],
  2021. );
  2022. }
  2023. Map<String, dynamic> toJson() {
  2024. final map = super.toJson();
  2025. if(consultationRecordCode != null)
  2026. map['ConsultationRecordCode'] = consultationRecordCode;
  2027. if(patientName != null)
  2028. map['PatientName'] = patientName;
  2029. if(patientPhone != null)
  2030. map['PatientPhone'] = patientPhone;
  2031. if(generalCase != null)
  2032. map['GeneralCase'] = generalCase;
  2033. if(clinicalSituation != null)
  2034. map['ClinicalSituation'] = clinicalSituation;
  2035. if(doctorCode != null)
  2036. map['DoctorCode'] = doctorCode;
  2037. if(occurredTime != null)
  2038. map['OccurredTime'] = JsonRpcUtils.dateFormat(occurredTime!);
  2039. return map;
  2040. }
  2041. }
  2042. class DeleteFollowUpVisitInfoRequest extends TokenRequest{
  2043. String? followUpVisitCode;
  2044. DeleteFollowUpVisitInfoRequest({
  2045. this.followUpVisitCode,
  2046. String? token,
  2047. }) : super(
  2048. token: token,
  2049. );
  2050. factory DeleteFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2051. return DeleteFollowUpVisitInfoRequest(
  2052. followUpVisitCode: map['FollowUpVisitCode'],
  2053. token: map['Token'],
  2054. );
  2055. }
  2056. Map<String, dynamic> toJson() {
  2057. final map = super.toJson();
  2058. if(followUpVisitCode != null)
  2059. map['FollowUpVisitCode'] = followUpVisitCode;
  2060. return map;
  2061. }
  2062. }
  2063. class UpdateFollowUpVisitInfoRequest extends TokenRequest{
  2064. String? followUpVisitCode;
  2065. String? generalCase;
  2066. String? clinicalSituation;
  2067. UpdateFollowUpVisitInfoRequest({
  2068. this.followUpVisitCode,
  2069. this.generalCase,
  2070. this.clinicalSituation,
  2071. String? token,
  2072. }) : super(
  2073. token: token,
  2074. );
  2075. factory UpdateFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2076. return UpdateFollowUpVisitInfoRequest(
  2077. followUpVisitCode: map['FollowUpVisitCode'],
  2078. generalCase: map['GeneralCase'],
  2079. clinicalSituation: map['ClinicalSituation'],
  2080. token: map['Token'],
  2081. );
  2082. }
  2083. Map<String, dynamic> toJson() {
  2084. final map = super.toJson();
  2085. if(followUpVisitCode != null)
  2086. map['FollowUpVisitCode'] = followUpVisitCode;
  2087. if(generalCase != null)
  2088. map['GeneralCase'] = generalCase;
  2089. if(clinicalSituation != null)
  2090. map['ClinicalSituation'] = clinicalSituation;
  2091. return map;
  2092. }
  2093. }
  2094. class FollowUpVisitDTO {
  2095. String? followUpVisitCode;
  2096. String? consultationRecordCode;
  2097. String? patientName;
  2098. String? patientPhone;
  2099. String? generalCase;
  2100. String? clinicalSituation;
  2101. String? doctorCode;
  2102. String? doctorName;
  2103. DateTime? occurredTime;
  2104. FollowUpVisitDTO({
  2105. this.followUpVisitCode,
  2106. this.consultationRecordCode,
  2107. this.patientName,
  2108. this.patientPhone,
  2109. this.generalCase,
  2110. this.clinicalSituation,
  2111. this.doctorCode,
  2112. this.doctorName,
  2113. this.occurredTime,
  2114. });
  2115. factory FollowUpVisitDTO.fromJson(Map<String, dynamic> map) {
  2116. return FollowUpVisitDTO(
  2117. followUpVisitCode: map['FollowUpVisitCode'],
  2118. consultationRecordCode: map['ConsultationRecordCode'],
  2119. patientName: map['PatientName'],
  2120. patientPhone: map['PatientPhone'],
  2121. generalCase: map['GeneralCase'],
  2122. clinicalSituation: map['ClinicalSituation'],
  2123. doctorCode: map['DoctorCode'],
  2124. doctorName: map['DoctorName'],
  2125. occurredTime: map['OccurredTime'] != null ? DateTime.parse(map['OccurredTime']) : null,
  2126. );
  2127. }
  2128. Map<String, dynamic> toJson() {
  2129. final map = Map<String, dynamic>();
  2130. if(followUpVisitCode != null)
  2131. map['FollowUpVisitCode'] = followUpVisitCode;
  2132. if(consultationRecordCode != null)
  2133. map['ConsultationRecordCode'] = consultationRecordCode;
  2134. if(patientName != null)
  2135. map['PatientName'] = patientName;
  2136. if(patientPhone != null)
  2137. map['PatientPhone'] = patientPhone;
  2138. if(generalCase != null)
  2139. map['GeneralCase'] = generalCase;
  2140. if(clinicalSituation != null)
  2141. map['ClinicalSituation'] = clinicalSituation;
  2142. if(doctorCode != null)
  2143. map['DoctorCode'] = doctorCode;
  2144. if(doctorName != null)
  2145. map['DoctorName'] = doctorName;
  2146. if(occurredTime != null)
  2147. map['OccurredTime'] = JsonRpcUtils.dateFormat(occurredTime!);
  2148. return map;
  2149. }
  2150. }
  2151. class GetFollowUpVisitInfoRequest extends TokenRequest{
  2152. String? consultationRecordCode;
  2153. GetFollowUpVisitInfoRequest({
  2154. this.consultationRecordCode,
  2155. String? token,
  2156. }) : super(
  2157. token: token,
  2158. );
  2159. factory GetFollowUpVisitInfoRequest.fromJson(Map<String, dynamic> map) {
  2160. return GetFollowUpVisitInfoRequest(
  2161. consultationRecordCode: map['ConsultationRecordCode'],
  2162. token: map['Token'],
  2163. );
  2164. }
  2165. Map<String, dynamic> toJson() {
  2166. final map = super.toJson();
  2167. if(consultationRecordCode != null)
  2168. map['ConsultationRecordCode'] = consultationRecordCode;
  2169. return map;
  2170. }
  2171. }
  2172. class GetFollowUpVisitInfoDetailRequest extends TokenRequest{
  2173. String? followUpVisitCode;
  2174. GetFollowUpVisitInfoDetailRequest({
  2175. this.followUpVisitCode,
  2176. String? token,
  2177. }) : super(
  2178. token: token,
  2179. );
  2180. factory GetFollowUpVisitInfoDetailRequest.fromJson(Map<String, dynamic> map) {
  2181. return GetFollowUpVisitInfoDetailRequest(
  2182. followUpVisitCode: map['FollowUpVisitCode'],
  2183. token: map['Token'],
  2184. );
  2185. }
  2186. Map<String, dynamic> toJson() {
  2187. final map = super.toJson();
  2188. if(followUpVisitCode != null)
  2189. map['FollowUpVisitCode'] = followUpVisitCode;
  2190. return map;
  2191. }
  2192. }
  2193. class SetNeedFollowUpVisitRequest extends TokenRequest{
  2194. String? consultationRecordCode;
  2195. bool isNeed;
  2196. SetNeedFollowUpVisitRequest({
  2197. this.consultationRecordCode,
  2198. this.isNeed = false,
  2199. String? token,
  2200. }) : super(
  2201. token: token,
  2202. );
  2203. factory SetNeedFollowUpVisitRequest.fromJson(Map<String, dynamic> map) {
  2204. return SetNeedFollowUpVisitRequest(
  2205. consultationRecordCode: map['ConsultationRecordCode'],
  2206. isNeed: map['IsNeed'],
  2207. token: map['Token'],
  2208. );
  2209. }
  2210. Map<String, dynamic> toJson() {
  2211. final map = super.toJson();
  2212. if(consultationRecordCode != null)
  2213. map['ConsultationRecordCode'] = consultationRecordCode;
  2214. map['IsNeed'] = isNeed;
  2215. return map;
  2216. }
  2217. }
  2218. class AddConsultationEvaluateRequest extends TokenRequest{
  2219. String? consultationRecordCode;
  2220. double evaluateScore;
  2221. String? feedback;
  2222. AddConsultationEvaluateRequest({
  2223. this.consultationRecordCode,
  2224. this.evaluateScore = 0,
  2225. this.feedback,
  2226. String? token,
  2227. }) : super(
  2228. token: token,
  2229. );
  2230. factory AddConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2231. return AddConsultationEvaluateRequest(
  2232. consultationRecordCode: map['ConsultationRecordCode'],
  2233. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2234. feedback: map['Feedback'],
  2235. token: map['Token'],
  2236. );
  2237. }
  2238. Map<String, dynamic> toJson() {
  2239. final map = super.toJson();
  2240. if(consultationRecordCode != null)
  2241. map['ConsultationRecordCode'] = consultationRecordCode;
  2242. map['EvaluateScore'] = evaluateScore;
  2243. if(feedback != null)
  2244. map['Feedback'] = feedback;
  2245. return map;
  2246. }
  2247. }
  2248. class DeleteConsultationEvaluateRequest extends TokenRequest{
  2249. String? consultationEvaluateCode;
  2250. DeleteConsultationEvaluateRequest({
  2251. this.consultationEvaluateCode,
  2252. String? token,
  2253. }) : super(
  2254. token: token,
  2255. );
  2256. factory DeleteConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2257. return DeleteConsultationEvaluateRequest(
  2258. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2259. token: map['Token'],
  2260. );
  2261. }
  2262. Map<String, dynamic> toJson() {
  2263. final map = super.toJson();
  2264. if(consultationEvaluateCode != null)
  2265. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2266. return map;
  2267. }
  2268. }
  2269. class UpdateConsultationEvaluateRequest extends TokenRequest{
  2270. String? consultationEvaluateCode;
  2271. double evaluateScore;
  2272. String? feedback;
  2273. UpdateConsultationEvaluateRequest({
  2274. this.consultationEvaluateCode,
  2275. this.evaluateScore = 0,
  2276. this.feedback,
  2277. String? token,
  2278. }) : super(
  2279. token: token,
  2280. );
  2281. factory UpdateConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2282. return UpdateConsultationEvaluateRequest(
  2283. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2284. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2285. feedback: map['Feedback'],
  2286. token: map['Token'],
  2287. );
  2288. }
  2289. Map<String, dynamic> toJson() {
  2290. final map = super.toJson();
  2291. if(consultationEvaluateCode != null)
  2292. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2293. map['EvaluateScore'] = evaluateScore;
  2294. if(feedback != null)
  2295. map['Feedback'] = feedback;
  2296. return map;
  2297. }
  2298. }
  2299. class ConsultationEvaluateDTO {
  2300. String? consultationEvaluateCode;
  2301. String? consultationRecordCode;
  2302. EvaluateGradeEnum evaluateGrade;
  2303. double evaluateScore;
  2304. String? feedback;
  2305. ConsultationEvaluateDTO({
  2306. this.consultationEvaluateCode,
  2307. this.consultationRecordCode,
  2308. this.evaluateGrade = EvaluateGradeEnum.UnSet,
  2309. this.evaluateScore = 0,
  2310. this.feedback,
  2311. });
  2312. factory ConsultationEvaluateDTO.fromJson(Map<String, dynamic> map) {
  2313. return ConsultationEvaluateDTO(
  2314. consultationEvaluateCode: map['ConsultationEvaluateCode'],
  2315. consultationRecordCode: map['ConsultationRecordCode'],
  2316. evaluateGrade: EvaluateGradeEnum.values.firstWhere((e) => e.index == map['EvaluateGrade']),
  2317. evaluateScore: double.parse(map['EvaluateScore'].toString()),
  2318. feedback: map['Feedback'],
  2319. );
  2320. }
  2321. Map<String, dynamic> toJson() {
  2322. final map = Map<String, dynamic>();
  2323. if(consultationEvaluateCode != null)
  2324. map['ConsultationEvaluateCode'] = consultationEvaluateCode;
  2325. if(consultationRecordCode != null)
  2326. map['ConsultationRecordCode'] = consultationRecordCode;
  2327. map['EvaluateGrade'] = evaluateGrade.index;
  2328. map['EvaluateScore'] = evaluateScore;
  2329. if(feedback != null)
  2330. map['Feedback'] = feedback;
  2331. return map;
  2332. }
  2333. }
  2334. class GetConsultationEvaluateRequest extends TokenRequest{
  2335. String? consultationRecordCode;
  2336. GetConsultationEvaluateRequest({
  2337. this.consultationRecordCode,
  2338. String? token,
  2339. }) : super(
  2340. token: token,
  2341. );
  2342. factory GetConsultationEvaluateRequest.fromJson(Map<String, dynamic> map) {
  2343. return GetConsultationEvaluateRequest(
  2344. consultationRecordCode: map['ConsultationRecordCode'],
  2345. token: map['Token'],
  2346. );
  2347. }
  2348. Map<String, dynamic> toJson() {
  2349. final map = super.toJson();
  2350. if(consultationRecordCode != null)
  2351. map['ConsultationRecordCode'] = consultationRecordCode;
  2352. return map;
  2353. }
  2354. }
  2355. class AcceptInvitationRequest extends TokenRequest{
  2356. String? consultationRecordCode;
  2357. bool isAgree;
  2358. String? refusalCause;
  2359. AcceptInvitationRequest({
  2360. this.consultationRecordCode,
  2361. this.isAgree = false,
  2362. this.refusalCause,
  2363. String? token,
  2364. }) : super(
  2365. token: token,
  2366. );
  2367. factory AcceptInvitationRequest.fromJson(Map<String, dynamic> map) {
  2368. return AcceptInvitationRequest(
  2369. consultationRecordCode: map['ConsultationRecordCode'],
  2370. isAgree: map['IsAgree'],
  2371. refusalCause: map['RefusalCause'],
  2372. token: map['Token'],
  2373. );
  2374. }
  2375. Map<String, dynamic> toJson() {
  2376. final map = super.toJson();
  2377. if(consultationRecordCode != null)
  2378. map['ConsultationRecordCode'] = consultationRecordCode;
  2379. map['IsAgree'] = isAgree;
  2380. if(refusalCause != null)
  2381. map['RefusalCause'] = refusalCause;
  2382. return map;
  2383. }
  2384. }