appletAPI.m.dart 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289
  1. import 'liveConsultation.m.dart';
  2. import 'notification.m.dart';
  3. import 'package:fis_jsonrpc/utils.dart';
  4. class GetUserInfoByOpenIdResult {
  5. String? nickName;
  6. String? hospital;
  7. String? userId;
  8. GetUserInfoByOpenIdResult({
  9. this.nickName,
  10. this.hospital,
  11. this.userId,
  12. });
  13. factory GetUserInfoByOpenIdResult.fromJson(Map<String, dynamic> map) {
  14. return GetUserInfoByOpenIdResult(
  15. nickName: map['NickName'],
  16. hospital: map['Hospital'],
  17. userId: map['UserId'],
  18. );
  19. }
  20. Map<String, dynamic> toJson() {
  21. final map = Map<String, dynamic>();
  22. if (nickName != null) {
  23. map['NickName'] = nickName;
  24. }
  25. if (hospital != null) {
  26. map['Hospital'] = hospital;
  27. }
  28. if (userId != null) {
  29. map['UserId'] = userId;
  30. }
  31. return map;
  32. }
  33. }
  34. class AppletAPIBaseRequest {
  35. String? openId;
  36. AppletAPIBaseRequest({
  37. this.openId,
  38. });
  39. factory AppletAPIBaseRequest.fromJson(Map<String, dynamic> map) {
  40. return AppletAPIBaseRequest(
  41. openId: map['OpenId'],
  42. );
  43. }
  44. Map<String, dynamic> toJson() {
  45. final map = Map<String, dynamic>();
  46. if (openId != null) {
  47. map['OpenId'] = openId;
  48. }
  49. return map;
  50. }
  51. }
  52. class GetUserInfoByOpenIdRequest extends AppletAPIBaseRequest{
  53. GetUserInfoByOpenIdRequest({
  54. String? openId,
  55. }) : super(
  56. openId: openId,
  57. );
  58. factory GetUserInfoByOpenIdRequest.fromJson(Map<String, dynamic> map) {
  59. return GetUserInfoByOpenIdRequest(
  60. openId: map['OpenId'],
  61. );
  62. }
  63. Map<String, dynamic> toJson() {
  64. final map = super.toJson();
  65. return map;
  66. }
  67. }
  68. class BindVcloudAccountAndOpenIdRequest {
  69. String? account;
  70. String? password;
  71. String? openId;
  72. BindVcloudAccountAndOpenIdRequest({
  73. this.account,
  74. this.password,
  75. this.openId,
  76. });
  77. factory BindVcloudAccountAndOpenIdRequest.fromJson(Map<String, dynamic> map) {
  78. return BindVcloudAccountAndOpenIdRequest(
  79. account: map['Account'],
  80. password: map['Password'],
  81. openId: map['OpenId'],
  82. );
  83. }
  84. Map<String, dynamic> toJson() {
  85. final map = Map<String, dynamic>();
  86. if (account != null) {
  87. map['Account'] = account;
  88. }
  89. if (password != null) {
  90. map['Password'] = password;
  91. }
  92. if (openId != null) {
  93. map['OpenId'] = openId;
  94. }
  95. return map;
  96. }
  97. }
  98. enum PatientGenderEnum {
  99. NotFilled,
  100. Male,
  101. Female,
  102. }
  103. enum RemedicalAIDiagnosisStatusEnum {
  104. Null,
  105. NoObviousLesion,
  106. Benign,
  107. Malignant,
  108. BenignAndMalignant,
  109. }
  110. class RemedicalRecordInfo {
  111. String? remedicalRecordId;
  112. String? terminalDesc;
  113. String? organizationDesc;
  114. DateTime? createTime;
  115. String? patientId;
  116. String? patientName;
  117. PatientGenderEnum patientGender;
  118. String? patientAge;
  119. String? examDoctor;
  120. String? customDoctor;
  121. bool reportUploadStatus;
  122. RemedicalAIDiagnosisStatusEnum aIDiagnosisStatus;
  123. RemedicalRecordInfo({
  124. this.remedicalRecordId,
  125. this.terminalDesc,
  126. this.organizationDesc,
  127. this.createTime,
  128. this.patientId,
  129. this.patientName,
  130. this.patientGender = PatientGenderEnum.NotFilled,
  131. this.patientAge,
  132. this.examDoctor,
  133. this.customDoctor,
  134. this.reportUploadStatus = false,
  135. this.aIDiagnosisStatus = RemedicalAIDiagnosisStatusEnum.Null,
  136. });
  137. factory RemedicalRecordInfo.fromJson(Map<String, dynamic> map) {
  138. return RemedicalRecordInfo(
  139. remedicalRecordId: map['RemedicalRecordId'],
  140. terminalDesc: map['TerminalDesc'],
  141. organizationDesc: map['OrganizationDesc'],
  142. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  143. patientId: map['PatientId'],
  144. patientName: map['PatientName'],
  145. patientGender: PatientGenderEnum.values.firstWhere((e) => e.index == map['PatientGender']),
  146. patientAge: map['PatientAge'],
  147. examDoctor: map['ExamDoctor'],
  148. customDoctor: map['CustomDoctor'],
  149. reportUploadStatus: map['ReportUploadStatus'],
  150. aIDiagnosisStatus: RemedicalAIDiagnosisStatusEnum.values.firstWhere((e) => e.index == map['AIDiagnosisStatus']),
  151. );
  152. }
  153. Map<String, dynamic> toJson() {
  154. final map = Map<String, dynamic>();
  155. if (remedicalRecordId != null) {
  156. map['RemedicalRecordId'] = remedicalRecordId;
  157. }
  158. if (terminalDesc != null) {
  159. map['TerminalDesc'] = terminalDesc;
  160. }
  161. if (organizationDesc != null) {
  162. map['OrganizationDesc'] = organizationDesc;
  163. }
  164. if (createTime != null) {
  165. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  166. }
  167. if (patientId != null) {
  168. map['PatientId'] = patientId;
  169. }
  170. if (patientName != null) {
  171. map['PatientName'] = patientName;
  172. }
  173. map['PatientGender'] = patientGender.index;
  174. if (patientAge != null) {
  175. map['PatientAge'] = patientAge;
  176. }
  177. if (examDoctor != null) {
  178. map['ExamDoctor'] = examDoctor;
  179. }
  180. if (customDoctor != null) {
  181. map['CustomDoctor'] = customDoctor;
  182. }
  183. map['ReportUploadStatus'] = reportUploadStatus;
  184. map['AIDiagnosisStatus'] = aIDiagnosisStatus.index;
  185. return map;
  186. }
  187. }
  188. class AppletAPIPageRequest extends AppletAPIBaseRequest{
  189. int pageIndex;
  190. int pageSize;
  191. AppletAPIPageRequest({
  192. this.pageIndex = 0,
  193. this.pageSize = 0,
  194. String? openId,
  195. }) : super(
  196. openId: openId,
  197. );
  198. factory AppletAPIPageRequest.fromJson(Map<String, dynamic> map) {
  199. return AppletAPIPageRequest(
  200. pageIndex: map['PageIndex'],
  201. pageSize: map['PageSize'],
  202. openId: map['OpenId'],
  203. );
  204. }
  205. Map<String, dynamic> toJson() {
  206. final map = super.toJson();
  207. map['PageIndex'] = pageIndex;
  208. map['PageSize'] = pageSize;
  209. return map;
  210. }
  211. }
  212. class GetRemedicalRecordListRequest extends AppletAPIPageRequest{
  213. String? keyWord;
  214. DateTime? startTime;
  215. DateTime? endTime;
  216. GetRemedicalRecordListRequest({
  217. this.keyWord,
  218. this.startTime,
  219. this.endTime,
  220. int pageIndex = 0,
  221. int pageSize = 0,
  222. String? openId,
  223. }) : super(
  224. pageIndex: pageIndex,
  225. pageSize: pageSize,
  226. openId: openId,
  227. );
  228. factory GetRemedicalRecordListRequest.fromJson(Map<String, dynamic> map) {
  229. return GetRemedicalRecordListRequest(
  230. keyWord: map['KeyWord'],
  231. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  232. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  233. pageIndex: map['PageIndex'],
  234. pageSize: map['PageSize'],
  235. openId: map['OpenId'],
  236. );
  237. }
  238. Map<String, dynamic> toJson() {
  239. final map = super.toJson();
  240. if (keyWord != null)
  241. map['KeyWord'] = keyWord;
  242. if (startTime != null)
  243. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  244. if (endTime != null)
  245. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  246. return map;
  247. }
  248. }
  249. class ImageFile {
  250. String? id;
  251. String? fileUrl;
  252. DateTime? createTime;
  253. ImageFile({
  254. this.id,
  255. this.fileUrl,
  256. this.createTime,
  257. });
  258. factory ImageFile.fromJson(Map<String, dynamic> map) {
  259. return ImageFile(
  260. id: map['Id'],
  261. fileUrl: map['FileUrl'],
  262. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  263. );
  264. }
  265. Map<String, dynamic> toJson() {
  266. final map = Map<String, dynamic>();
  267. if (id != null) {
  268. map['Id'] = id;
  269. }
  270. if (fileUrl != null) {
  271. map['FileUrl'] = fileUrl;
  272. }
  273. if (createTime != null) {
  274. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  275. }
  276. return map;
  277. }
  278. }
  279. class ImageData {
  280. String? id;
  281. RemedicalFileDataTypeEnum dataType;
  282. String? application;
  283. String? previewFileToken;
  284. DateTime? createTime;
  285. ImageFile? file;
  286. ImageData({
  287. this.id,
  288. this.dataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  289. this.application,
  290. this.previewFileToken,
  291. this.createTime,
  292. this.file,
  293. });
  294. factory ImageData.fromJson(Map<String, dynamic> map) {
  295. return ImageData(
  296. id: map['Id'],
  297. dataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['DataType']),
  298. application: map['Application'],
  299. previewFileToken: map['PreviewFileToken'],
  300. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  301. file: map['File'] != null ? ImageFile.fromJson(map['File']) : null,
  302. );
  303. }
  304. Map<String, dynamic> toJson() {
  305. final map = Map<String, dynamic>();
  306. if (id != null) {
  307. map['Id'] = id;
  308. }
  309. map['DataType'] = dataType.index;
  310. if (application != null) {
  311. map['Application'] = application;
  312. }
  313. if (previewFileToken != null) {
  314. map['PreviewFileToken'] = previewFileToken;
  315. }
  316. if (createTime != null) {
  317. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  318. }
  319. if (file != null) {
  320. map['File'] = file;
  321. }
  322. return map;
  323. }
  324. }
  325. class GetRemedicalDataListRequest extends AppletAPIBaseRequest{
  326. String? remedicalRecordId;
  327. GetRemedicalDataListRequest({
  328. this.remedicalRecordId,
  329. String? openId,
  330. }) : super(
  331. openId: openId,
  332. );
  333. factory GetRemedicalDataListRequest.fromJson(Map<String, dynamic> map) {
  334. return GetRemedicalDataListRequest(
  335. remedicalRecordId: map['RemedicalRecordId'],
  336. openId: map['OpenId'],
  337. );
  338. }
  339. Map<String, dynamic> toJson() {
  340. final map = super.toJson();
  341. if (remedicalRecordId != null)
  342. map['RemedicalRecordId'] = remedicalRecordId;
  343. return map;
  344. }
  345. }
  346. enum AppletAPIImageType {
  347. placeHolder_0,
  348. Local,
  349. Ob,
  350. WorkSheet,
  351. Remote,
  352. DigitalSignature,
  353. AIDiagnosis,
  354. }
  355. class ReportImageInfo {
  356. String? examDataId;
  357. String? fileUrl;
  358. AppletAPIImageType type;
  359. ReportImageInfo({
  360. this.examDataId,
  361. this.fileUrl,
  362. this.type = AppletAPIImageType.Local,
  363. });
  364. factory ReportImageInfo.fromJson(Map<String, dynamic> map) {
  365. return ReportImageInfo(
  366. examDataId: map['ExamDataId'],
  367. fileUrl: map['FileUrl'],
  368. type: AppletAPIImageType.values.firstWhere((e) => e.index == map['Type']),
  369. );
  370. }
  371. Map<String, dynamic> toJson() {
  372. final map = Map<String, dynamic>();
  373. if (examDataId != null) {
  374. map['ExamDataId'] = examDataId;
  375. }
  376. if (fileUrl != null) {
  377. map['FileUrl'] = fileUrl;
  378. }
  379. map['Type'] = type.index;
  380. return map;
  381. }
  382. }
  383. class ReportInfo {
  384. String? id;
  385. List<ReportImageInfo>? previewImages;
  386. String? reportPreviewJpg;
  387. ReportInfo({
  388. this.id,
  389. this.previewImages,
  390. this.reportPreviewJpg,
  391. });
  392. factory ReportInfo.fromJson(Map<String, dynamic> map) {
  393. return ReportInfo(
  394. id: map['Id'],
  395. previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  396. reportPreviewJpg: map['ReportPreviewJpg'],
  397. );
  398. }
  399. Map<String, dynamic> toJson() {
  400. final map = Map<String, dynamic>();
  401. if (id != null) {
  402. map['Id'] = id;
  403. }
  404. if (previewImages != null) {
  405. map['PreviewImages'] = previewImages;
  406. }
  407. if (reportPreviewJpg != null) {
  408. map['ReportPreviewJpg'] = reportPreviewJpg;
  409. }
  410. return map;
  411. }
  412. }
  413. class GetRemedicalReportListRequest extends AppletAPIBaseRequest{
  414. String? remedicalRecordId;
  415. GetRemedicalReportListRequest({
  416. this.remedicalRecordId,
  417. String? openId,
  418. }) : super(
  419. openId: openId,
  420. );
  421. factory GetRemedicalReportListRequest.fromJson(Map<String, dynamic> map) {
  422. return GetRemedicalReportListRequest(
  423. remedicalRecordId: map['RemedicalRecordId'],
  424. openId: map['OpenId'],
  425. );
  426. }
  427. Map<String, dynamic> toJson() {
  428. final map = super.toJson();
  429. if (remedicalRecordId != null)
  430. map['RemedicalRecordId'] = remedicalRecordId;
  431. return map;
  432. }
  433. }
  434. enum ConsultationState {
  435. Unhandled,
  436. Withdrawn,
  437. Handled,
  438. Started,
  439. WaitForReportUpload,
  440. ReportUploading,
  441. ReportUploaded,
  442. ReportUploadFailed,
  443. Expired,
  444. Qualified,
  445. UnQualified,
  446. }
  447. class ImageTokenInfo {
  448. String? imageToken;
  449. String? previewToken;
  450. ImageTokenInfo({
  451. this.imageToken,
  452. this.previewToken,
  453. });
  454. factory ImageTokenInfo.fromJson(Map<String, dynamic> map) {
  455. return ImageTokenInfo(
  456. imageToken: map['ImageToken'],
  457. previewToken: map['PreviewToken'],
  458. );
  459. }
  460. Map<String, dynamic> toJson() {
  461. final map = Map<String, dynamic>();
  462. if (imageToken != null) {
  463. map['ImageToken'] = imageToken;
  464. }
  465. if (previewToken != null) {
  466. map['PreviewToken'] = previewToken;
  467. }
  468. return map;
  469. }
  470. }
  471. class VideoTokenInfo {
  472. String? videoToken;
  473. String? previewToken;
  474. VideoTokenInfo({
  475. this.videoToken,
  476. this.previewToken,
  477. });
  478. factory VideoTokenInfo.fromJson(Map<String, dynamic> map) {
  479. return VideoTokenInfo(
  480. videoToken: map['VideoToken'],
  481. previewToken: map['PreviewToken'],
  482. );
  483. }
  484. Map<String, dynamic> toJson() {
  485. final map = Map<String, dynamic>();
  486. if (videoToken != null) {
  487. map['VideoToken'] = videoToken;
  488. }
  489. if (previewToken != null) {
  490. map['PreviewToken'] = previewToken;
  491. }
  492. return map;
  493. }
  494. }
  495. class ReportPreviewPdf {
  496. String? reportId;
  497. DateTime? updateTime;
  498. String? previewPdfUrl;
  499. ReportPreviewPdf({
  500. this.reportId,
  501. this.updateTime,
  502. this.previewPdfUrl,
  503. });
  504. factory ReportPreviewPdf.fromJson(Map<String, dynamic> map) {
  505. return ReportPreviewPdf(
  506. reportId: map['ReportId'],
  507. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  508. previewPdfUrl: map['PreviewPdfUrl'],
  509. );
  510. }
  511. Map<String, dynamic> toJson() {
  512. final map = Map<String, dynamic>();
  513. if (reportId != null) {
  514. map['ReportId'] = reportId;
  515. }
  516. if (updateTime != null) {
  517. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  518. }
  519. if (previewPdfUrl != null) {
  520. map['PreviewPdfUrl'] = previewPdfUrl;
  521. }
  522. return map;
  523. }
  524. }
  525. class ConsultationInfo {
  526. String? consultationId;
  527. ConsultationState state;
  528. String? patientName;
  529. PatientGenderEnum patientSex;
  530. String? patientAge;
  531. DateTime? birthday;
  532. String? contactInfo;
  533. String? patientID;
  534. String? history;
  535. String? primaryDiagnosis;
  536. String? hospitalId;
  537. String? hospitalName;
  538. String? applyHospitalId;
  539. String? applyHospitalName;
  540. String? expertId;
  541. String? expertName;
  542. DateTime? consultationDate;
  543. String? inspectionItems;
  544. String? scanDoctorName;
  545. String? deviceModel;
  546. String? terminalId;
  547. List<ImageTokenInfo>? imageTokens;
  548. List<VideoTokenInfo>? videoInfos;
  549. List<ReportPreviewPdf>? reportPreviewPdfs;
  550. ConsultationInfo({
  551. this.consultationId,
  552. this.state = ConsultationState.Unhandled,
  553. this.patientName,
  554. this.patientSex = PatientGenderEnum.NotFilled,
  555. this.patientAge,
  556. this.birthday,
  557. this.contactInfo,
  558. this.patientID,
  559. this.history,
  560. this.primaryDiagnosis,
  561. this.hospitalId,
  562. this.hospitalName,
  563. this.applyHospitalId,
  564. this.applyHospitalName,
  565. this.expertId,
  566. this.expertName,
  567. this.consultationDate,
  568. this.inspectionItems,
  569. this.scanDoctorName,
  570. this.deviceModel,
  571. this.terminalId,
  572. this.imageTokens,
  573. this.videoInfos,
  574. this.reportPreviewPdfs,
  575. });
  576. factory ConsultationInfo.fromJson(Map<String, dynamic> map) {
  577. return ConsultationInfo(
  578. consultationId: map['ConsultationId'],
  579. state: ConsultationState.values.firstWhere((e) => e.index == map['State']),
  580. patientName: map['PatientName'],
  581. patientSex: PatientGenderEnum.values.firstWhere((e) => e.index == map['PatientSex']),
  582. patientAge: map['PatientAge'],
  583. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  584. contactInfo: map['ContactInfo'],
  585. patientID: map['PatientID'],
  586. history: map['History'],
  587. primaryDiagnosis: map['PrimaryDiagnosis'],
  588. hospitalId: map['HospitalId'],
  589. hospitalName: map['HospitalName'],
  590. applyHospitalId: map['ApplyHospitalId'],
  591. applyHospitalName: map['ApplyHospitalName'],
  592. expertId: map['ExpertId'],
  593. expertName: map['ExpertName'],
  594. consultationDate: map['ConsultationDate'] != null ? DateTime.parse(map['ConsultationDate']) : null,
  595. inspectionItems: map['InspectionItems'],
  596. scanDoctorName: map['ScanDoctorName'],
  597. deviceModel: map['DeviceModel'],
  598. terminalId: map['TerminalId'],
  599. imageTokens: map['ImageTokens'] != null ? (map['ImageTokens'] as List).map((e)=>ImageTokenInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  600. videoInfos: map['VideoInfos'] != null ? (map['VideoInfos'] as List).map((e)=>VideoTokenInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  601. reportPreviewPdfs: map['ReportPreviewPdfs'] != null ? (map['ReportPreviewPdfs'] as List).map((e)=>ReportPreviewPdf.fromJson(e as Map<String,dynamic>)).toList() : null,
  602. );
  603. }
  604. Map<String, dynamic> toJson() {
  605. final map = Map<String, dynamic>();
  606. if (consultationId != null) {
  607. map['ConsultationId'] = consultationId;
  608. }
  609. map['State'] = state.index;
  610. if (patientName != null) {
  611. map['PatientName'] = patientName;
  612. }
  613. map['PatientSex'] = patientSex.index;
  614. if (patientAge != null) {
  615. map['PatientAge'] = patientAge;
  616. }
  617. if (birthday != null) {
  618. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  619. }
  620. if (contactInfo != null) {
  621. map['ContactInfo'] = contactInfo;
  622. }
  623. if (patientID != null) {
  624. map['PatientID'] = patientID;
  625. }
  626. if (history != null) {
  627. map['History'] = history;
  628. }
  629. if (primaryDiagnosis != null) {
  630. map['PrimaryDiagnosis'] = primaryDiagnosis;
  631. }
  632. if (hospitalId != null) {
  633. map['HospitalId'] = hospitalId;
  634. }
  635. if (hospitalName != null) {
  636. map['HospitalName'] = hospitalName;
  637. }
  638. if (applyHospitalId != null) {
  639. map['ApplyHospitalId'] = applyHospitalId;
  640. }
  641. if (applyHospitalName != null) {
  642. map['ApplyHospitalName'] = applyHospitalName;
  643. }
  644. if (expertId != null) {
  645. map['ExpertId'] = expertId;
  646. }
  647. if (expertName != null) {
  648. map['ExpertName'] = expertName;
  649. }
  650. if (consultationDate != null) {
  651. map['ConsultationDate'] = JsonRpcUtils.dateFormat(consultationDate!);
  652. }
  653. if (inspectionItems != null) {
  654. map['InspectionItems'] = inspectionItems;
  655. }
  656. if (scanDoctorName != null) {
  657. map['ScanDoctorName'] = scanDoctorName;
  658. }
  659. if (deviceModel != null) {
  660. map['DeviceModel'] = deviceModel;
  661. }
  662. if (terminalId != null) {
  663. map['TerminalId'] = terminalId;
  664. }
  665. if (imageTokens != null) {
  666. map['ImageTokens'] = imageTokens;
  667. }
  668. if (videoInfos != null) {
  669. map['VideoInfos'] = videoInfos;
  670. }
  671. if (reportPreviewPdfs != null) {
  672. map['ReportPreviewPdfs'] = reportPreviewPdfs;
  673. }
  674. return map;
  675. }
  676. }
  677. class GetConsultationListRequest extends AppletAPIPageRequest{
  678. String? keyWord;
  679. DateTime? startTime;
  680. DateTime? endTime;
  681. GetConsultationListRequest({
  682. this.keyWord,
  683. this.startTime,
  684. this.endTime,
  685. int pageIndex = 0,
  686. int pageSize = 0,
  687. String? openId,
  688. }) : super(
  689. pageIndex: pageIndex,
  690. pageSize: pageSize,
  691. openId: openId,
  692. );
  693. factory GetConsultationListRequest.fromJson(Map<String, dynamic> map) {
  694. return GetConsultationListRequest(
  695. keyWord: map['KeyWord'],
  696. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  697. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  698. pageIndex: map['PageIndex'],
  699. pageSize: map['PageSize'],
  700. openId: map['OpenId'],
  701. );
  702. }
  703. Map<String, dynamic> toJson() {
  704. final map = super.toJson();
  705. if (keyWord != null)
  706. map['KeyWord'] = keyWord;
  707. if (startTime != null)
  708. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  709. if (endTime != null)
  710. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  711. return map;
  712. }
  713. }
  714. class GetConsultationReportListRequest extends AppletAPIBaseRequest{
  715. String? consultationId;
  716. GetConsultationReportListRequest({
  717. this.consultationId,
  718. String? openId,
  719. }) : super(
  720. openId: openId,
  721. );
  722. factory GetConsultationReportListRequest.fromJson(Map<String, dynamic> map) {
  723. return GetConsultationReportListRequest(
  724. consultationId: map['ConsultationId'],
  725. openId: map['OpenId'],
  726. );
  727. }
  728. Map<String, dynamic> toJson() {
  729. final map = super.toJson();
  730. if (consultationId != null)
  731. map['ConsultationId'] = consultationId;
  732. return map;
  733. }
  734. }
  735. class CreateConsultationRequest extends AppletAPIBaseRequest{
  736. String? patientName;
  737. PatientGenderEnum patientSex;
  738. String? patientAge;
  739. DateTime? birthday;
  740. String? contactInfo;
  741. String? patientID;
  742. String? history;
  743. String? primaryDiagnosis;
  744. String? hospitalId;
  745. String? expertId;
  746. DateTime? consultationDate;
  747. String? inspectionItems;
  748. String? scanDoctorName;
  749. String? deviceModel;
  750. String? terminalId;
  751. CreateConsultationRequest({
  752. this.patientName,
  753. this.patientSex = PatientGenderEnum.NotFilled,
  754. this.patientAge,
  755. this.birthday,
  756. this.contactInfo,
  757. this.patientID,
  758. this.history,
  759. this.primaryDiagnosis,
  760. this.hospitalId,
  761. this.expertId,
  762. this.consultationDate,
  763. this.inspectionItems,
  764. this.scanDoctorName,
  765. this.deviceModel,
  766. this.terminalId,
  767. String? openId,
  768. }) : super(
  769. openId: openId,
  770. );
  771. factory CreateConsultationRequest.fromJson(Map<String, dynamic> map) {
  772. return CreateConsultationRequest(
  773. patientName: map['PatientName'],
  774. patientSex: PatientGenderEnum.values.firstWhere((e) => e.index == map['PatientSex']),
  775. patientAge: map['PatientAge'],
  776. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  777. contactInfo: map['ContactInfo'],
  778. patientID: map['PatientID'],
  779. history: map['History'],
  780. primaryDiagnosis: map['PrimaryDiagnosis'],
  781. hospitalId: map['HospitalId'],
  782. expertId: map['ExpertId'],
  783. consultationDate: map['ConsultationDate'] != null ? DateTime.parse(map['ConsultationDate']) : null,
  784. inspectionItems: map['InspectionItems'],
  785. scanDoctorName: map['ScanDoctorName'],
  786. deviceModel: map['DeviceModel'],
  787. terminalId: map['TerminalId'],
  788. openId: map['OpenId'],
  789. );
  790. }
  791. Map<String, dynamic> toJson() {
  792. final map = super.toJson();
  793. if (patientName != null)
  794. map['PatientName'] = patientName;
  795. map['PatientSex'] = patientSex.index;
  796. if (patientAge != null)
  797. map['PatientAge'] = patientAge;
  798. if (birthday != null)
  799. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  800. if (contactInfo != null)
  801. map['ContactInfo'] = contactInfo;
  802. if (patientID != null)
  803. map['PatientID'] = patientID;
  804. if (history != null)
  805. map['History'] = history;
  806. if (primaryDiagnosis != null)
  807. map['PrimaryDiagnosis'] = primaryDiagnosis;
  808. if (hospitalId != null)
  809. map['HospitalId'] = hospitalId;
  810. if (expertId != null)
  811. map['ExpertId'] = expertId;
  812. if (consultationDate != null)
  813. map['ConsultationDate'] = JsonRpcUtils.dateFormat(consultationDate!);
  814. if (inspectionItems != null)
  815. map['InspectionItems'] = inspectionItems;
  816. if (scanDoctorName != null)
  817. map['ScanDoctorName'] = scanDoctorName;
  818. if (deviceModel != null)
  819. map['DeviceModel'] = deviceModel;
  820. if (terminalId != null)
  821. map['TerminalId'] = terminalId;
  822. return map;
  823. }
  824. }
  825. class ArrangeConsultationRequest extends AppletAPIBaseRequest{
  826. String? consultationId;
  827. DateTime? appointDate;
  828. String? expertId;
  829. ArrangeConsultationRequest({
  830. this.consultationId,
  831. this.appointDate,
  832. this.expertId,
  833. String? openId,
  834. }) : super(
  835. openId: openId,
  836. );
  837. factory ArrangeConsultationRequest.fromJson(Map<String, dynamic> map) {
  838. return ArrangeConsultationRequest(
  839. consultationId: map['ConsultationId'],
  840. appointDate: map['AppointDate'] != null ? DateTime.parse(map['AppointDate']) : null,
  841. expertId: map['ExpertId'],
  842. openId: map['OpenId'],
  843. );
  844. }
  845. Map<String, dynamic> toJson() {
  846. final map = super.toJson();
  847. if (consultationId != null)
  848. map['ConsultationId'] = consultationId;
  849. if (appointDate != null)
  850. map['AppointDate'] = JsonRpcUtils.dateFormat(appointDate!);
  851. if (expertId != null)
  852. map['ExpertId'] = expertId;
  853. return map;
  854. }
  855. }
  856. class OrganBaseInfo {
  857. String? organizationId;
  858. String? name;
  859. OrganBaseInfo({
  860. this.organizationId,
  861. this.name,
  862. });
  863. factory OrganBaseInfo.fromJson(Map<String, dynamic> map) {
  864. return OrganBaseInfo(
  865. organizationId: map['OrganizationId'],
  866. name: map['Name'],
  867. );
  868. }
  869. Map<String, dynamic> toJson() {
  870. final map = Map<String, dynamic>();
  871. if (organizationId != null) {
  872. map['OrganizationId'] = organizationId;
  873. }
  874. if (name != null) {
  875. map['Name'] = name;
  876. }
  877. return map;
  878. }
  879. }
  880. class GetHospitalsRequest extends AppletAPIBaseRequest{
  881. GetHospitalsRequest({
  882. String? openId,
  883. }) : super(
  884. openId: openId,
  885. );
  886. factory GetHospitalsRequest.fromJson(Map<String, dynamic> map) {
  887. return GetHospitalsRequest(
  888. openId: map['OpenId'],
  889. );
  890. }
  891. Map<String, dynamic> toJson() {
  892. final map = super.toJson();
  893. return map;
  894. }
  895. }
  896. class DoctorInfo {
  897. String? id;
  898. String? displayName;
  899. String? fullName;
  900. String? electronSignUrl;
  901. DoctorInfo({
  902. this.id,
  903. this.displayName,
  904. this.fullName,
  905. this.electronSignUrl,
  906. });
  907. factory DoctorInfo.fromJson(Map<String, dynamic> map) {
  908. return DoctorInfo(
  909. id: map['Id'],
  910. displayName: map['DisplayName'],
  911. fullName: map['FullName'],
  912. electronSignUrl: map['ElectronSignUrl'],
  913. );
  914. }
  915. Map<String, dynamic> toJson() {
  916. final map = Map<String, dynamic>();
  917. if (id != null) {
  918. map['Id'] = id;
  919. }
  920. if (displayName != null) {
  921. map['DisplayName'] = displayName;
  922. }
  923. if (fullName != null) {
  924. map['FullName'] = fullName;
  925. }
  926. if (electronSignUrl != null) {
  927. map['ElectronSignUrl'] = electronSignUrl;
  928. }
  929. return map;
  930. }
  931. }
  932. class GetExpertsRequest extends AppletAPIBaseRequest{
  933. String? organizationId;
  934. GetExpertsRequest({
  935. this.organizationId,
  936. String? openId,
  937. }) : super(
  938. openId: openId,
  939. );
  940. factory GetExpertsRequest.fromJson(Map<String, dynamic> map) {
  941. return GetExpertsRequest(
  942. organizationId: map['OrganizationId'],
  943. openId: map['OpenId'],
  944. );
  945. }
  946. Map<String, dynamic> toJson() {
  947. final map = super.toJson();
  948. if (organizationId != null)
  949. map['OrganizationId'] = organizationId;
  950. return map;
  951. }
  952. }
  953. class TerminalInfo {
  954. String? id;
  955. String? organizationId;
  956. String? organizationDecription;
  957. String? organizationName;
  958. String? name;
  959. String? model;
  960. String? description;
  961. String? uniqueId;
  962. TerminalInfo({
  963. this.id,
  964. this.organizationId,
  965. this.organizationDecription,
  966. this.organizationName,
  967. this.name,
  968. this.model,
  969. this.description,
  970. this.uniqueId,
  971. });
  972. factory TerminalInfo.fromJson(Map<String, dynamic> map) {
  973. return TerminalInfo(
  974. id: map['Id'],
  975. organizationId: map['OrganizationId'],
  976. organizationDecription: map['OrganizationDecription'],
  977. organizationName: map['OrganizationName'],
  978. name: map['Name'],
  979. model: map['Model'],
  980. description: map['Description'],
  981. uniqueId: map['UniqueId'],
  982. );
  983. }
  984. Map<String, dynamic> toJson() {
  985. final map = Map<String, dynamic>();
  986. if (id != null) {
  987. map['Id'] = id;
  988. }
  989. if (organizationId != null) {
  990. map['OrganizationId'] = organizationId;
  991. }
  992. if (organizationDecription != null) {
  993. map['OrganizationDecription'] = organizationDecription;
  994. }
  995. if (organizationName != null) {
  996. map['OrganizationName'] = organizationName;
  997. }
  998. if (name != null) {
  999. map['Name'] = name;
  1000. }
  1001. if (model != null) {
  1002. map['Model'] = model;
  1003. }
  1004. if (description != null) {
  1005. map['Description'] = description;
  1006. }
  1007. if (uniqueId != null) {
  1008. map['UniqueId'] = uniqueId;
  1009. }
  1010. return map;
  1011. }
  1012. }
  1013. class GetTerminalListRequest extends AppletAPIBaseRequest{
  1014. GetTerminalListRequest({
  1015. String? openId,
  1016. }) : super(
  1017. openId: openId,
  1018. );
  1019. factory GetTerminalListRequest.fromJson(Map<String, dynamic> map) {
  1020. return GetTerminalListRequest(
  1021. openId: map['OpenId'],
  1022. );
  1023. }
  1024. Map<String, dynamic> toJson() {
  1025. final map = super.toJson();
  1026. return map;
  1027. }
  1028. }
  1029. class GetScanLocationsRequest extends AppletAPIBaseRequest{
  1030. GetScanLocationsRequest({
  1031. String? openId,
  1032. }) : super(
  1033. openId: openId,
  1034. );
  1035. factory GetScanLocationsRequest.fromJson(Map<String, dynamic> map) {
  1036. return GetScanLocationsRequest(
  1037. openId: map['OpenId'],
  1038. );
  1039. }
  1040. Map<String, dynamic> toJson() {
  1041. final map = super.toJson();
  1042. return map;
  1043. }
  1044. }
  1045. class LiveTerminalInfo2 {
  1046. bool terminalLiveEnabled;
  1047. bool cameraLiveEnabled;
  1048. bool isMergeChannel;
  1049. int terminalWidth;
  1050. int terminalHeight;
  1051. String? cameraId;
  1052. bool isMultiChannels;
  1053. int cameraWidth;
  1054. int cameraHeight;
  1055. int integerRoomId;
  1056. int terminalIntegerRoomId;
  1057. LiveStates state;
  1058. String? id;
  1059. LiveTerminalInfo2({
  1060. this.terminalLiveEnabled = false,
  1061. this.cameraLiveEnabled = false,
  1062. this.isMergeChannel = false,
  1063. this.terminalWidth = 0,
  1064. this.terminalHeight = 0,
  1065. this.cameraId,
  1066. this.isMultiChannels = false,
  1067. this.cameraWidth = 0,
  1068. this.cameraHeight = 0,
  1069. this.integerRoomId = 0,
  1070. this.terminalIntegerRoomId = 0,
  1071. this.state = LiveStates.OK,
  1072. this.id,
  1073. });
  1074. factory LiveTerminalInfo2.fromJson(Map<String, dynamic> map) {
  1075. return LiveTerminalInfo2(
  1076. terminalLiveEnabled: map['TerminalLiveEnabled'],
  1077. cameraLiveEnabled: map['CameraLiveEnabled'],
  1078. isMergeChannel: map['IsMergeChannel'],
  1079. terminalWidth: map['TerminalWidth'],
  1080. terminalHeight: map['TerminalHeight'],
  1081. cameraId: map['CameraId'],
  1082. isMultiChannels: map['IsMultiChannels'],
  1083. cameraWidth: map['CameraWidth'],
  1084. cameraHeight: map['CameraHeight'],
  1085. integerRoomId: map['IntegerRoomId'],
  1086. terminalIntegerRoomId: map['TerminalIntegerRoomId'],
  1087. state: LiveStates.values.firstWhere((e) => e.index == map['State']),
  1088. id: map['Id'],
  1089. );
  1090. }
  1091. Map<String, dynamic> toJson() {
  1092. final map = Map<String, dynamic>();
  1093. map['TerminalLiveEnabled'] = terminalLiveEnabled;
  1094. map['CameraLiveEnabled'] = cameraLiveEnabled;
  1095. map['IsMergeChannel'] = isMergeChannel;
  1096. map['TerminalWidth'] = terminalWidth;
  1097. map['TerminalHeight'] = terminalHeight;
  1098. if (cameraId != null) {
  1099. map['CameraId'] = cameraId;
  1100. }
  1101. map['IsMultiChannels'] = isMultiChannels;
  1102. map['CameraWidth'] = cameraWidth;
  1103. map['CameraHeight'] = cameraHeight;
  1104. map['IntegerRoomId'] = integerRoomId;
  1105. map['TerminalIntegerRoomId'] = terminalIntegerRoomId;
  1106. map['State'] = state.index;
  1107. if (id != null) {
  1108. map['Id'] = id;
  1109. }
  1110. return map;
  1111. }
  1112. }
  1113. class MeetingMemberInfo2 {
  1114. LiveStates state;
  1115. String? id;
  1116. String? name;
  1117. String? displayName;
  1118. String? avatar;
  1119. String? userSign;
  1120. MeetingMemberInfo2({
  1121. this.state = LiveStates.OK,
  1122. this.id,
  1123. this.name,
  1124. this.displayName,
  1125. this.avatar,
  1126. this.userSign,
  1127. });
  1128. factory MeetingMemberInfo2.fromJson(Map<String, dynamic> map) {
  1129. return MeetingMemberInfo2(
  1130. state: LiveStates.values.firstWhere((e) => e.index == map['State']),
  1131. id: map['Id'],
  1132. name: map['Name'],
  1133. displayName: map['DisplayName'],
  1134. avatar: map['Avatar'],
  1135. userSign: map['UserSign'],
  1136. );
  1137. }
  1138. Map<String, dynamic> toJson() {
  1139. final map = Map<String, dynamic>();
  1140. map['State'] = state.index;
  1141. if (id != null) {
  1142. map['Id'] = id;
  1143. }
  1144. if (name != null) {
  1145. map['Name'] = name;
  1146. }
  1147. if (displayName != null) {
  1148. map['DisplayName'] = displayName;
  1149. }
  1150. if (avatar != null) {
  1151. map['Avatar'] = avatar;
  1152. }
  1153. if (userSign != null) {
  1154. map['UserSign'] = userSign;
  1155. }
  1156. return map;
  1157. }
  1158. }
  1159. class StartConsultationResult {
  1160. String? roomId;
  1161. LiveStates state;
  1162. int integerRoomId;
  1163. int appId;
  1164. List<LiveTerminalInfo2>? terminalInfos;
  1165. List<MeetingMemberInfo2>? meetingMemberInfos;
  1166. StartConsultationResult({
  1167. this.roomId,
  1168. this.state = LiveStates.OK,
  1169. this.integerRoomId = 0,
  1170. this.appId = 0,
  1171. this.terminalInfos,
  1172. this.meetingMemberInfos,
  1173. });
  1174. factory StartConsultationResult.fromJson(Map<String, dynamic> map) {
  1175. return StartConsultationResult(
  1176. roomId: map['RoomId'],
  1177. state: LiveStates.values.firstWhere((e) => e.index == map['State']),
  1178. integerRoomId: map['IntegerRoomId'],
  1179. appId: map['AppId'],
  1180. terminalInfos: map['TerminalInfos'] != null ? (map['TerminalInfos'] as List).map((e)=>LiveTerminalInfo2.fromJson(e as Map<String,dynamic>)).toList() : null,
  1181. meetingMemberInfos: map['MeetingMemberInfos'] != null ? (map['MeetingMemberInfos'] as List).map((e)=>MeetingMemberInfo2.fromJson(e as Map<String,dynamic>)).toList() : null,
  1182. );
  1183. }
  1184. Map<String, dynamic> toJson() {
  1185. final map = Map<String, dynamic>();
  1186. if (roomId != null) {
  1187. map['RoomId'] = roomId;
  1188. }
  1189. map['State'] = state.index;
  1190. map['IntegerRoomId'] = integerRoomId;
  1191. map['AppId'] = appId;
  1192. if (terminalInfos != null) {
  1193. map['TerminalInfos'] = terminalInfos;
  1194. }
  1195. if (meetingMemberInfos != null) {
  1196. map['MeetingMemberInfos'] = meetingMemberInfos;
  1197. }
  1198. return map;
  1199. }
  1200. }
  1201. class StartConsultationRequest extends AppletAPIBaseRequest{
  1202. String? consultationId;
  1203. StartConsultationRequest({
  1204. this.consultationId,
  1205. String? openId,
  1206. }) : super(
  1207. openId: openId,
  1208. );
  1209. factory StartConsultationRequest.fromJson(Map<String, dynamic> map) {
  1210. return StartConsultationRequest(
  1211. consultationId: map['ConsultationId'],
  1212. openId: map['OpenId'],
  1213. );
  1214. }
  1215. Map<String, dynamic> toJson() {
  1216. final map = super.toJson();
  1217. if (consultationId != null)
  1218. map['ConsultationId'] = consultationId;
  1219. return map;
  1220. }
  1221. }
  1222. class CancelStartConsultationResult {
  1223. LiveStates liveStates;
  1224. CancelStartConsultationResult({
  1225. this.liveStates = LiveStates.OK,
  1226. });
  1227. factory CancelStartConsultationResult.fromJson(Map<String, dynamic> map) {
  1228. return CancelStartConsultationResult(
  1229. liveStates: LiveStates.values.firstWhere((e) => e.index == map['LiveStates']),
  1230. );
  1231. }
  1232. Map<String, dynamic> toJson() {
  1233. final map = Map<String, dynamic>();
  1234. map['LiveStates'] = liveStates.index;
  1235. return map;
  1236. }
  1237. }
  1238. class CancelStartConsultationRequest extends AppletAPIBaseRequest{
  1239. String? roomId;
  1240. CancelStartConsultationRequest({
  1241. this.roomId,
  1242. String? openId,
  1243. }) : super(
  1244. openId: openId,
  1245. );
  1246. factory CancelStartConsultationRequest.fromJson(Map<String, dynamic> map) {
  1247. return CancelStartConsultationRequest(
  1248. roomId: map['RoomId'],
  1249. openId: map['OpenId'],
  1250. );
  1251. }
  1252. Map<String, dynamic> toJson() {
  1253. final map = super.toJson();
  1254. if (roomId != null)
  1255. map['RoomId'] = roomId;
  1256. return map;
  1257. }
  1258. }
  1259. class ExitConsultationResult {
  1260. LiveStates liveStates;
  1261. ExitConsultationResult({
  1262. this.liveStates = LiveStates.OK,
  1263. });
  1264. factory ExitConsultationResult.fromJson(Map<String, dynamic> map) {
  1265. return ExitConsultationResult(
  1266. liveStates: LiveStates.values.firstWhere((e) => e.index == map['LiveStates']),
  1267. );
  1268. }
  1269. Map<String, dynamic> toJson() {
  1270. final map = Map<String, dynamic>();
  1271. map['LiveStates'] = liveStates.index;
  1272. return map;
  1273. }
  1274. }
  1275. class ExitConsultationRequest extends AppletAPIBaseRequest{
  1276. String? roomId;
  1277. String? consultationId;
  1278. ExitConsultationRequest({
  1279. this.roomId,
  1280. this.consultationId,
  1281. String? openId,
  1282. }) : super(
  1283. openId: openId,
  1284. );
  1285. factory ExitConsultationRequest.fromJson(Map<String, dynamic> map) {
  1286. return ExitConsultationRequest(
  1287. roomId: map['RoomId'],
  1288. consultationId: map['ConsultationId'],
  1289. openId: map['OpenId'],
  1290. );
  1291. }
  1292. Map<String, dynamic> toJson() {
  1293. final map = super.toJson();
  1294. if (roomId != null)
  1295. map['RoomId'] = roomId;
  1296. if (consultationId != null)
  1297. map['ConsultationId'] = consultationId;
  1298. return map;
  1299. }
  1300. }
  1301. class ConsultationHeartRateRequest extends AppletAPIBaseRequest{
  1302. String? consultationId;
  1303. ConsultationHeartRateRequest({
  1304. this.consultationId,
  1305. String? openId,
  1306. }) : super(
  1307. openId: openId,
  1308. );
  1309. factory ConsultationHeartRateRequest.fromJson(Map<String, dynamic> map) {
  1310. return ConsultationHeartRateRequest(
  1311. consultationId: map['ConsultationId'],
  1312. openId: map['OpenId'],
  1313. );
  1314. }
  1315. Map<String, dynamic> toJson() {
  1316. final map = super.toJson();
  1317. if (consultationId != null)
  1318. map['ConsultationId'] = consultationId;
  1319. return map;
  1320. }
  1321. }
  1322. class AppletAPIDownloadFileResult {
  1323. String? fileString;
  1324. AppletAPIDownloadFileResult({
  1325. this.fileString,
  1326. });
  1327. factory AppletAPIDownloadFileResult.fromJson(Map<String, dynamic> map) {
  1328. return AppletAPIDownloadFileResult(
  1329. fileString: map['FileString'],
  1330. );
  1331. }
  1332. Map<String, dynamic> toJson() {
  1333. final map = Map<String, dynamic>();
  1334. if (fileString != null) {
  1335. map['FileString'] = fileString;
  1336. }
  1337. return map;
  1338. }
  1339. }
  1340. class DownloadFileRequest extends AppletAPIBaseRequest{
  1341. String? fileToken;
  1342. DownloadFileRequest({
  1343. this.fileToken,
  1344. String? openId,
  1345. }) : super(
  1346. openId: openId,
  1347. );
  1348. factory DownloadFileRequest.fromJson(Map<String, dynamic> map) {
  1349. return DownloadFileRequest(
  1350. fileToken: map['FileToken'],
  1351. openId: map['OpenId'],
  1352. );
  1353. }
  1354. Map<String, dynamic> toJson() {
  1355. final map = super.toJson();
  1356. if (fileToken != null)
  1357. map['FileToken'] = fileToken;
  1358. return map;
  1359. }
  1360. }
  1361. class VinnoTemplateInfo {
  1362. String? templateName;
  1363. String? templateUrl;
  1364. VinnoTemplateInfo({
  1365. this.templateName,
  1366. this.templateUrl,
  1367. });
  1368. factory VinnoTemplateInfo.fromJson(Map<String, dynamic> map) {
  1369. return VinnoTemplateInfo(
  1370. templateName: map['TemplateName'],
  1371. templateUrl: map['TemplateUrl'],
  1372. );
  1373. }
  1374. Map<String, dynamic> toJson() {
  1375. final map = Map<String, dynamic>();
  1376. if (templateName != null) {
  1377. map['TemplateName'] = templateName;
  1378. }
  1379. if (templateUrl != null) {
  1380. map['TemplateUrl'] = templateUrl;
  1381. }
  1382. return map;
  1383. }
  1384. }
  1385. class GetReportTemplatesRequest extends AppletAPIBaseRequest{
  1386. String? languageCode;
  1387. GetReportTemplatesRequest({
  1388. this.languageCode,
  1389. String? openId,
  1390. }) : super(
  1391. openId: openId,
  1392. );
  1393. factory GetReportTemplatesRequest.fromJson(Map<String, dynamic> map) {
  1394. return GetReportTemplatesRequest(
  1395. languageCode: map['LanguageCode'],
  1396. openId: map['OpenId'],
  1397. );
  1398. }
  1399. Map<String, dynamic> toJson() {
  1400. final map = super.toJson();
  1401. if (languageCode != null)
  1402. map['LanguageCode'] = languageCode;
  1403. return map;
  1404. }
  1405. }
  1406. class GetThesaurusTemplatesRequest extends AppletAPIBaseRequest{
  1407. String? languageCode;
  1408. GetThesaurusTemplatesRequest({
  1409. this.languageCode,
  1410. String? openId,
  1411. }) : super(
  1412. openId: openId,
  1413. );
  1414. factory GetThesaurusTemplatesRequest.fromJson(Map<String, dynamic> map) {
  1415. return GetThesaurusTemplatesRequest(
  1416. languageCode: map['LanguageCode'],
  1417. openId: map['OpenId'],
  1418. );
  1419. }
  1420. Map<String, dynamic> toJson() {
  1421. final map = super.toJson();
  1422. if (languageCode != null)
  1423. map['LanguageCode'] = languageCode;
  1424. return map;
  1425. }
  1426. }
  1427. class ReportElementTagMessage {
  1428. String? id;
  1429. String? name;
  1430. ReportElementTagMessage({
  1431. this.id,
  1432. this.name,
  1433. });
  1434. factory ReportElementTagMessage.fromJson(Map<String, dynamic> map) {
  1435. return ReportElementTagMessage(
  1436. id: map['Id'],
  1437. name: map['Name'],
  1438. );
  1439. }
  1440. Map<String, dynamic> toJson() {
  1441. final map = Map<String, dynamic>();
  1442. if (id != null) {
  1443. map['Id'] = id;
  1444. }
  1445. if (name != null) {
  1446. map['Name'] = name;
  1447. }
  1448. return map;
  1449. }
  1450. }
  1451. class ReportBaseElementValueMessage {
  1452. ReportBaseElementValueMessage();
  1453. factory ReportBaseElementValueMessage.fromJson(Map<String, dynamic> map) {
  1454. return ReportBaseElementValueMessage(
  1455. );
  1456. }
  1457. Map<String, dynamic> toJson() {
  1458. final map = Map<String, dynamic>();
  1459. return map;
  1460. }
  1461. }
  1462. class ReportTextElementValueMessage extends ReportBaseElementValueMessage{
  1463. String? text;
  1464. ReportTextElementValueMessage({
  1465. this.text,
  1466. }) : super(
  1467. );
  1468. factory ReportTextElementValueMessage.fromJson(Map<String, dynamic> map) {
  1469. return ReportTextElementValueMessage(
  1470. text: map['Text'],
  1471. );
  1472. }
  1473. Map<String, dynamic> toJson() {
  1474. final map = super.toJson();
  1475. if (text != null)
  1476. map['Text'] = text;
  1477. return map;
  1478. }
  1479. }
  1480. class ReportIntegerElementValueMessage extends ReportBaseElementValueMessage{
  1481. int value;
  1482. ReportIntegerElementValueMessage({
  1483. this.value = 0,
  1484. }) : super(
  1485. );
  1486. factory ReportIntegerElementValueMessage.fromJson(Map<String, dynamic> map) {
  1487. return ReportIntegerElementValueMessage(
  1488. value: map['Value'],
  1489. );
  1490. }
  1491. Map<String, dynamic> toJson() {
  1492. final map = super.toJson();
  1493. map['Value'] = value;
  1494. return map;
  1495. }
  1496. }
  1497. class ReportFloatElementValueMessage extends ReportBaseElementValueMessage{
  1498. double value;
  1499. ReportFloatElementValueMessage({
  1500. this.value = 0,
  1501. }) : super(
  1502. );
  1503. factory ReportFloatElementValueMessage.fromJson(Map<String, dynamic> map) {
  1504. return ReportFloatElementValueMessage(
  1505. value: double.parse(map['Value'].toString()),
  1506. );
  1507. }
  1508. Map<String, dynamic> toJson() {
  1509. final map = super.toJson();
  1510. map['Value'] = value;
  1511. return map;
  1512. }
  1513. }
  1514. class ReportBufferImageElementValueMessage extends ReportBaseElementValueMessage{
  1515. List<int>? value;
  1516. ReportBufferImageElementValueMessage({
  1517. this.value,
  1518. }) : super(
  1519. );
  1520. factory ReportBufferImageElementValueMessage.fromJson(Map<String, dynamic> map) {
  1521. final valueData = map['Value'];
  1522. return ReportBufferImageElementValueMessage(
  1523. value: valueData != null ? (valueData as List).map((e) => e as int).toList(): null,
  1524. );
  1525. }
  1526. Map<String, dynamic> toJson() {
  1527. final map = super.toJson();
  1528. if (value != null)
  1529. map['Value'] = value;
  1530. return map;
  1531. }
  1532. }
  1533. class ReportDateTimeElementValueMessage extends ReportBaseElementValueMessage{
  1534. DateTime? value;
  1535. ReportDateTimeElementValueMessage({
  1536. this.value,
  1537. }) : super(
  1538. );
  1539. factory ReportDateTimeElementValueMessage.fromJson(Map<String, dynamic> map) {
  1540. return ReportDateTimeElementValueMessage(
  1541. value: map['Value'] != null ? DateTime.parse(map['Value']) : null,
  1542. );
  1543. }
  1544. Map<String, dynamic> toJson() {
  1545. final map = super.toJson();
  1546. if (value != null)
  1547. map['Value'] = JsonRpcUtils.dateFormat(value!);
  1548. return map;
  1549. }
  1550. }
  1551. class ReportFileElementValueMessage extends ReportBaseElementValueMessage{
  1552. String? value;
  1553. String? examDataId;
  1554. ReportFileElementValueMessage({
  1555. this.value,
  1556. this.examDataId,
  1557. }) : super(
  1558. );
  1559. factory ReportFileElementValueMessage.fromJson(Map<String, dynamic> map) {
  1560. return ReportFileElementValueMessage(
  1561. value: map['Value'],
  1562. examDataId: map['ExamDataId'],
  1563. );
  1564. }
  1565. Map<String, dynamic> toJson() {
  1566. final map = super.toJson();
  1567. if (value != null)
  1568. map['Value'] = value;
  1569. if (examDataId != null)
  1570. map['ExamDataId'] = examDataId;
  1571. return map;
  1572. }
  1573. }
  1574. class ReportImageListElementValueMessage extends ReportBaseElementValueMessage{
  1575. List<ReportFileElementValueMessage>? value;
  1576. ReportImageListElementValueMessage({
  1577. this.value,
  1578. }) : super(
  1579. );
  1580. factory ReportImageListElementValueMessage.fromJson(Map<String, dynamic> map) {
  1581. return ReportImageListElementValueMessage(
  1582. value: map['Value'] != null ? (map['Value'] as List).map((e)=>ReportFileElementValueMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  1583. );
  1584. }
  1585. Map<String, dynamic> toJson() {
  1586. final map = super.toJson();
  1587. if (value != null)
  1588. map['Value'] = value;
  1589. return map;
  1590. }
  1591. }
  1592. class ReportStringListElementValueMessage extends ReportBaseElementValueMessage{
  1593. List<ReportTextElementValueMessage>? value;
  1594. ReportStringListElementValueMessage({
  1595. this.value,
  1596. }) : super(
  1597. );
  1598. factory ReportStringListElementValueMessage.fromJson(Map<String, dynamic> map) {
  1599. return ReportStringListElementValueMessage(
  1600. value: map['Value'] != null ? (map['Value'] as List).map((e)=>ReportTextElementValueMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  1601. );
  1602. }
  1603. Map<String, dynamic> toJson() {
  1604. final map = super.toJson();
  1605. if (value != null)
  1606. map['Value'] = value;
  1607. return map;
  1608. }
  1609. }
  1610. class ReportElementValues {
  1611. ReportTextElementValueMessage? textElement;
  1612. ReportIntegerElementValueMessage? integerElement;
  1613. ReportFloatElementValueMessage? floatElement;
  1614. ReportBufferImageElementValueMessage? bufferImageElement;
  1615. ReportDateTimeElementValueMessage? dateTimeElement;
  1616. ReportFileElementValueMessage? fileElement;
  1617. ReportImageListElementValueMessage? imageListElement;
  1618. ReportStringListElementValueMessage? stringListElement;
  1619. ReportElementValues({
  1620. this.textElement,
  1621. this.integerElement,
  1622. this.floatElement,
  1623. this.bufferImageElement,
  1624. this.dateTimeElement,
  1625. this.fileElement,
  1626. this.imageListElement,
  1627. this.stringListElement,
  1628. });
  1629. factory ReportElementValues.fromJson(Map<String, dynamic> map) {
  1630. return ReportElementValues(
  1631. textElement: map['TextElement'] != null ? ReportTextElementValueMessage.fromJson(map['TextElement']) : null,
  1632. integerElement: map['IntegerElement'] != null ? ReportIntegerElementValueMessage.fromJson(map['IntegerElement']) : null,
  1633. floatElement: map['FloatElement'] != null ? ReportFloatElementValueMessage.fromJson(map['FloatElement']) : null,
  1634. bufferImageElement: map['BufferImageElement'] != null ? ReportBufferImageElementValueMessage.fromJson(map['BufferImageElement']) : null,
  1635. dateTimeElement: map['DateTimeElement'] != null ? ReportDateTimeElementValueMessage.fromJson(map['DateTimeElement']) : null,
  1636. fileElement: map['FileElement'] != null ? ReportFileElementValueMessage.fromJson(map['FileElement']) : null,
  1637. imageListElement: map['ImageListElement'] != null ? ReportImageListElementValueMessage.fromJson(map['ImageListElement']) : null,
  1638. stringListElement: map['StringListElement'] != null ? ReportStringListElementValueMessage.fromJson(map['StringListElement']) : null,
  1639. );
  1640. }
  1641. Map<String, dynamic> toJson() {
  1642. final map = Map<String, dynamic>();
  1643. if (textElement != null) {
  1644. map['TextElement'] = textElement;
  1645. }
  1646. if (integerElement != null) {
  1647. map['IntegerElement'] = integerElement;
  1648. }
  1649. if (floatElement != null) {
  1650. map['FloatElement'] = floatElement;
  1651. }
  1652. if (bufferImageElement != null) {
  1653. map['BufferImageElement'] = bufferImageElement;
  1654. }
  1655. if (dateTimeElement != null) {
  1656. map['DateTimeElement'] = dateTimeElement;
  1657. }
  1658. if (fileElement != null) {
  1659. map['FileElement'] = fileElement;
  1660. }
  1661. if (imageListElement != null) {
  1662. map['ImageListElement'] = imageListElement;
  1663. }
  1664. if (stringListElement != null) {
  1665. map['StringListElement'] = stringListElement;
  1666. }
  1667. return map;
  1668. }
  1669. }
  1670. class ReportElementMessage {
  1671. ReportElementTagMessage? elementTag;
  1672. ReportElementValues? reportElementValue;
  1673. ReportElementMessage({
  1674. this.elementTag,
  1675. this.reportElementValue,
  1676. });
  1677. factory ReportElementMessage.fromJson(Map<String, dynamic> map) {
  1678. return ReportElementMessage(
  1679. elementTag: map['ElementTag'] != null ? ReportElementTagMessage.fromJson(map['ElementTag']) : null,
  1680. reportElementValue: map['ReportElementValue'] != null ? ReportElementValues.fromJson(map['ReportElementValue']) : null,
  1681. );
  1682. }
  1683. Map<String, dynamic> toJson() {
  1684. final map = Map<String, dynamic>();
  1685. if (elementTag != null) {
  1686. map['ElementTag'] = elementTag;
  1687. }
  1688. if (reportElementValue != null) {
  1689. map['ReportElementValue'] = reportElementValue;
  1690. }
  1691. return map;
  1692. }
  1693. }
  1694. class IReadOnlyCollection<T> {
  1695. int count;
  1696. IReadOnlyCollection({
  1697. this.count = 0,
  1698. });
  1699. factory IReadOnlyCollection.fromJson(Map<String, dynamic> map) {
  1700. return IReadOnlyCollection(
  1701. count: map['Count'],
  1702. );
  1703. }
  1704. Map<String, dynamic> toJson() {
  1705. final map = Map<String, dynamic>();
  1706. map['Count'] = count;
  1707. return map;
  1708. }
  1709. }
  1710. class ReportMeasureTagMessage {
  1711. IReadOnlyCollection<String>? availableMethods;
  1712. String? baseType;
  1713. String? calculationId;
  1714. String? matchId;
  1715. String? method;
  1716. String? mode;
  1717. String? output;
  1718. String? outputV2;
  1719. String? unit;
  1720. String? userId;
  1721. ReportMeasureTagMessage({
  1722. this.availableMethods,
  1723. this.baseType,
  1724. this.calculationId,
  1725. this.matchId,
  1726. this.method,
  1727. this.mode,
  1728. this.output,
  1729. this.outputV2,
  1730. this.unit,
  1731. this.userId,
  1732. });
  1733. factory ReportMeasureTagMessage.fromJson(Map<String, dynamic> map) {
  1734. return ReportMeasureTagMessage(
  1735. availableMethods: map['AvailableMethods']?.cast<String>().toList(),
  1736. baseType: map['BaseType'],
  1737. calculationId: map['CalculationId'],
  1738. matchId: map['MatchId'],
  1739. method: map['Method'],
  1740. mode: map['Mode'],
  1741. output: map['Output'],
  1742. outputV2: map['OutputV2'],
  1743. unit: map['Unit'],
  1744. userId: map['UserId'],
  1745. );
  1746. }
  1747. Map<String, dynamic> toJson() {
  1748. final map = Map<String, dynamic>();
  1749. if (availableMethods != null) {
  1750. map['AvailableMethods'] = availableMethods;
  1751. }
  1752. if (baseType != null) {
  1753. map['BaseType'] = baseType;
  1754. }
  1755. if (calculationId != null) {
  1756. map['CalculationId'] = calculationId;
  1757. }
  1758. if (matchId != null) {
  1759. map['MatchId'] = matchId;
  1760. }
  1761. if (method != null) {
  1762. map['Method'] = method;
  1763. }
  1764. if (mode != null) {
  1765. map['Mode'] = mode;
  1766. }
  1767. if (output != null) {
  1768. map['Output'] = output;
  1769. }
  1770. if (outputV2 != null) {
  1771. map['OutputV2'] = outputV2;
  1772. }
  1773. if (unit != null) {
  1774. map['Unit'] = unit;
  1775. }
  1776. if (userId != null) {
  1777. map['UserId'] = userId;
  1778. }
  1779. return map;
  1780. }
  1781. }
  1782. class ReportMeasrueElementValueMessage {
  1783. ReportMeasureTagMessage? measureTag;
  1784. ReportTextElementValueMessage? elementValue;
  1785. ReportMeasrueElementValueMessage({
  1786. this.measureTag,
  1787. this.elementValue,
  1788. });
  1789. factory ReportMeasrueElementValueMessage.fromJson(Map<String, dynamic> map) {
  1790. return ReportMeasrueElementValueMessage(
  1791. measureTag: map['MeasureTag'] != null ? ReportMeasureTagMessage.fromJson(map['MeasureTag']) : null,
  1792. elementValue: map['ElementValue'] != null ? ReportTextElementValueMessage.fromJson(map['ElementValue']) : null,
  1793. );
  1794. }
  1795. Map<String, dynamic> toJson() {
  1796. final map = Map<String, dynamic>();
  1797. if (measureTag != null) {
  1798. map['MeasureTag'] = measureTag;
  1799. }
  1800. if (elementValue != null) {
  1801. map['ElementValue'] = elementValue;
  1802. }
  1803. return map;
  1804. }
  1805. }
  1806. class ReportMeasureElementMessage {
  1807. ReportElementTagMessage? elementTag;
  1808. List<ReportMeasrueElementValueMessage>? reportElementValues;
  1809. ReportMeasureElementMessage({
  1810. this.elementTag,
  1811. this.reportElementValues,
  1812. });
  1813. factory ReportMeasureElementMessage.fromJson(Map<String, dynamic> map) {
  1814. return ReportMeasureElementMessage(
  1815. elementTag: map['ElementTag'] != null ? ReportElementTagMessage.fromJson(map['ElementTag']) : null,
  1816. reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportMeasrueElementValueMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  1817. );
  1818. }
  1819. Map<String, dynamic> toJson() {
  1820. final map = Map<String, dynamic>();
  1821. if (elementTag != null) {
  1822. map['ElementTag'] = elementTag;
  1823. }
  1824. if (reportElementValues != null) {
  1825. map['ReportElementValues'] = reportElementValues;
  1826. }
  1827. return map;
  1828. }
  1829. }
  1830. enum QualifiedState {
  1831. UnSet,
  1832. Qualified,
  1833. UnQualified,
  1834. }
  1835. enum QualityType {
  1836. None,
  1837. Qualified,
  1838. InformationUnCompleted,
  1839. ImageNotClear,
  1840. PositiveSiteNotClear,
  1841. }
  1842. class ReportResultInfo {
  1843. String? id;
  1844. List<ReportImageInfo>? previewImages;
  1845. String? template;
  1846. List<ReportElementMessage>? reportElementValues;
  1847. List<ReportMeasureElementMessage>? reportMeasureElementValues;
  1848. List<String>? tagCodeList;
  1849. DiagnosisOrganEnum organ;
  1850. QualifiedState qualifiedState;
  1851. QualityType qualityType;
  1852. ReportResultInfo({
  1853. this.id,
  1854. this.previewImages,
  1855. this.template,
  1856. this.reportElementValues,
  1857. this.reportMeasureElementValues,
  1858. this.tagCodeList,
  1859. this.organ = DiagnosisOrganEnum.Null,
  1860. this.qualifiedState = QualifiedState.UnSet,
  1861. this.qualityType = QualityType.None,
  1862. });
  1863. factory ReportResultInfo.fromJson(Map<String, dynamic> map) {
  1864. return ReportResultInfo(
  1865. id: map['Id'],
  1866. previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  1867. template: map['Template'],
  1868. reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  1869. reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  1870. tagCodeList: map['TagCodeList']?.cast<String>().toList(),
  1871. organ: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['Organ']),
  1872. qualifiedState: QualifiedState.values.firstWhere((e) => e.index == map['QualifiedState']),
  1873. qualityType: QualityType.values.firstWhere((e) => e.index == map['QualityType']),
  1874. );
  1875. }
  1876. Map<String, dynamic> toJson() {
  1877. final map = Map<String, dynamic>();
  1878. if (id != null) {
  1879. map['Id'] = id;
  1880. }
  1881. if (previewImages != null) {
  1882. map['PreviewImages'] = previewImages;
  1883. }
  1884. if (template != null) {
  1885. map['Template'] = template;
  1886. }
  1887. if (reportElementValues != null) {
  1888. map['ReportElementValues'] = reportElementValues;
  1889. }
  1890. if (reportMeasureElementValues != null) {
  1891. map['ReportMeasureElementValues'] = reportMeasureElementValues;
  1892. }
  1893. if (tagCodeList != null) {
  1894. map['TagCodeList'] = tagCodeList;
  1895. }
  1896. map['Organ'] = organ.index;
  1897. map['QualifiedState'] = qualifiedState.index;
  1898. map['QualityType'] = qualityType.index;
  1899. return map;
  1900. }
  1901. }
  1902. class SaveAppletReportRequest extends ReportResultInfo{
  1903. String? openId;
  1904. String? terminalRecordId;
  1905. SaveAppletReportRequest({
  1906. this.openId,
  1907. this.terminalRecordId,
  1908. String? id,
  1909. List<ReportImageInfo>? previewImages,
  1910. String? template,
  1911. List<ReportElementMessage>? reportElementValues,
  1912. List<ReportMeasureElementMessage>? reportMeasureElementValues,
  1913. List<String>? tagCodeList,
  1914. DiagnosisOrganEnum organ = DiagnosisOrganEnum.Null,
  1915. QualifiedState qualifiedState = QualifiedState.UnSet,
  1916. QualityType qualityType = QualityType.None,
  1917. }) : super(
  1918. id: id,
  1919. previewImages: previewImages,
  1920. template: template,
  1921. reportElementValues: reportElementValues,
  1922. reportMeasureElementValues: reportMeasureElementValues,
  1923. tagCodeList: tagCodeList,
  1924. organ: organ,
  1925. qualifiedState: qualifiedState,
  1926. qualityType: qualityType,
  1927. );
  1928. factory SaveAppletReportRequest.fromJson(Map<String, dynamic> map) {
  1929. return SaveAppletReportRequest(
  1930. openId: map['OpenId'],
  1931. terminalRecordId: map['TerminalRecordId'],
  1932. id: map['Id'],
  1933. previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  1934. template: map['Template'],
  1935. reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  1936. reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  1937. tagCodeList: map['TagCodeList']?.cast<String>().toList(),
  1938. organ: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['Organ']),
  1939. qualifiedState: QualifiedState.values.firstWhere((e) => e.index == map['QualifiedState']),
  1940. qualityType: QualityType.values.firstWhere((e) => e.index == map['QualityType']),
  1941. );
  1942. }
  1943. Map<String, dynamic> toJson() {
  1944. final map = super.toJson();
  1945. if (openId != null)
  1946. map['OpenId'] = openId;
  1947. if (terminalRecordId != null)
  1948. map['TerminalRecordId'] = terminalRecordId;
  1949. return map;
  1950. }
  1951. }
  1952. class GetAppletReportRequest extends AppletAPIBaseRequest{
  1953. String? recordId;
  1954. String? reportId;
  1955. GetAppletReportRequest({
  1956. this.recordId,
  1957. this.reportId,
  1958. String? openId,
  1959. }) : super(
  1960. openId: openId,
  1961. );
  1962. factory GetAppletReportRequest.fromJson(Map<String, dynamic> map) {
  1963. return GetAppletReportRequest(
  1964. recordId: map['RecordId'],
  1965. reportId: map['ReportId'],
  1966. openId: map['OpenId'],
  1967. );
  1968. }
  1969. Map<String, dynamic> toJson() {
  1970. final map = super.toJson();
  1971. if (recordId != null)
  1972. map['RecordId'] = recordId;
  1973. if (reportId != null)
  1974. map['ReportId'] = reportId;
  1975. return map;
  1976. }
  1977. }
  1978. class UploadConsultationImageRequest extends ReportResultInfo{
  1979. String? openId;
  1980. String? consultationId;
  1981. String? imageBase64;
  1982. UploadConsultationImageRequest({
  1983. this.openId,
  1984. this.consultationId,
  1985. this.imageBase64,
  1986. String? id,
  1987. List<ReportImageInfo>? previewImages,
  1988. String? template,
  1989. List<ReportElementMessage>? reportElementValues,
  1990. List<ReportMeasureElementMessage>? reportMeasureElementValues,
  1991. List<String>? tagCodeList,
  1992. DiagnosisOrganEnum organ = DiagnosisOrganEnum.Null,
  1993. QualifiedState qualifiedState = QualifiedState.UnSet,
  1994. QualityType qualityType = QualityType.None,
  1995. }) : super(
  1996. id: id,
  1997. previewImages: previewImages,
  1998. template: template,
  1999. reportElementValues: reportElementValues,
  2000. reportMeasureElementValues: reportMeasureElementValues,
  2001. tagCodeList: tagCodeList,
  2002. organ: organ,
  2003. qualifiedState: qualifiedState,
  2004. qualityType: qualityType,
  2005. );
  2006. factory UploadConsultationImageRequest.fromJson(Map<String, dynamic> map) {
  2007. return UploadConsultationImageRequest(
  2008. openId: map['OpenId'],
  2009. consultationId: map['ConsultationId'],
  2010. imageBase64: map['ImageBase64'],
  2011. id: map['Id'],
  2012. previewImages: map['PreviewImages'] != null ? (map['PreviewImages'] as List).map((e)=>ReportImageInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
  2013. template: map['Template'],
  2014. reportElementValues: map['ReportElementValues'] != null ? (map['ReportElementValues'] as List).map((e)=>ReportElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  2015. reportMeasureElementValues: map['ReportMeasureElementValues'] != null ? (map['ReportMeasureElementValues'] as List).map((e)=>ReportMeasureElementMessage.fromJson(e as Map<String,dynamic>)).toList() : null,
  2016. tagCodeList: map['TagCodeList']?.cast<String>().toList(),
  2017. organ: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['Organ']),
  2018. qualifiedState: QualifiedState.values.firstWhere((e) => e.index == map['QualifiedState']),
  2019. qualityType: QualityType.values.firstWhere((e) => e.index == map['QualityType']),
  2020. );
  2021. }
  2022. Map<String, dynamic> toJson() {
  2023. final map = super.toJson();
  2024. if (openId != null)
  2025. map['OpenId'] = openId;
  2026. if (consultationId != null)
  2027. map['ConsultationId'] = consultationId;
  2028. if (imageBase64 != null)
  2029. map['ImageBase64'] = imageBase64;
  2030. return map;
  2031. }
  2032. }