remedical.m.dart 118 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426
  1. import 'liveConsultation.m.dart';
  2. import 'recordInfo.m.dart';
  3. import 'notification.m.dart';
  4. import 'organization.m.dart';
  5. import 'patient.m.dart';
  6. import 'education.m.dart';
  7. import 'aIDiagnosis.m.dart';
  8. import 'package:fis_jsonrpc/utils.dart';
  9. class CreateExaminfoResult {
  10. String? examCode;
  11. DateTime? createTime;
  12. String? patientCode;
  13. CreateExaminfoResult({
  14. this.examCode,
  15. this.createTime,
  16. this.patientCode,
  17. });
  18. factory CreateExaminfoResult.fromJson(Map<String, dynamic> map) {
  19. return CreateExaminfoResult(
  20. examCode: map['ExamCode'],
  21. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  22. patientCode: map['PatientCode'],
  23. );
  24. }
  25. Map<String, dynamic> toJson() {
  26. final map = Map<String, dynamic>();
  27. if (examCode != null) {
  28. map['ExamCode'] = examCode;
  29. }
  30. if (createTime != null) {
  31. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  32. }
  33. if (patientCode != null) {
  34. map['PatientCode'] = patientCode;
  35. }
  36. return map;
  37. }
  38. }
  39. class CreateExaminfoRequest extends TokenRequest{
  40. String? patientType;
  41. String? examRecordCode;
  42. List<DataItemDTO>? patientInfo;
  43. List<PatientInfoExt>? patientScanInfoList;
  44. bool isScreenshotVersion;
  45. String? customDoctor;
  46. String? customOrganzation;
  47. String? equipmentSN;
  48. String? patientCode;
  49. DateTime? examTime;
  50. CreateExaminfoRequest({
  51. this.patientType,
  52. this.examRecordCode,
  53. this.patientInfo,
  54. this.patientScanInfoList,
  55. this.isScreenshotVersion = false,
  56. this.customDoctor,
  57. this.customOrganzation,
  58. this.equipmentSN,
  59. this.patientCode,
  60. this.examTime,
  61. String? token,
  62. }) : super(
  63. token: token,
  64. );
  65. factory CreateExaminfoRequest.fromJson(Map<String, dynamic> map) {
  66. return CreateExaminfoRequest(
  67. patientType: map['PatientType'],
  68. examRecordCode: map['ExamRecordCode'],
  69. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  70. patientScanInfoList: map['PatientScanInfoList'] != null ? (map['PatientScanInfoList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  71. isScreenshotVersion: map['IsScreenshotVersion'],
  72. customDoctor: map['CustomDoctor'],
  73. customOrganzation: map['CustomOrganzation'],
  74. equipmentSN: map['EquipmentSN'],
  75. patientCode: map['PatientCode'],
  76. examTime: map['ExamTime'] != null ? DateTime.parse(map['ExamTime']) : null,
  77. token: map['Token'],
  78. );
  79. }
  80. Map<String, dynamic> toJson() {
  81. final map = super.toJson();
  82. if (patientType != null)
  83. map['PatientType'] = patientType;
  84. if (examRecordCode != null)
  85. map['ExamRecordCode'] = examRecordCode;
  86. if (patientInfo != null)
  87. map['PatientInfo'] = patientInfo;
  88. if (patientScanInfoList != null)
  89. map['PatientScanInfoList'] = patientScanInfoList;
  90. map['IsScreenshotVersion'] = isScreenshotVersion;
  91. if (customDoctor != null)
  92. map['CustomDoctor'] = customDoctor;
  93. if (customOrganzation != null)
  94. map['CustomOrganzation'] = customOrganzation;
  95. if (equipmentSN != null)
  96. map['EquipmentSN'] = equipmentSN;
  97. if (patientCode != null)
  98. map['PatientCode'] = patientCode;
  99. if (examTime != null)
  100. map['ExamTime'] = JsonRpcUtils.dateFormat(examTime!);
  101. return map;
  102. }
  103. }
  104. class UploadExamDataForOldVersionResult {
  105. String? remedicalCode;
  106. DateTime? remedicalCreateTime;
  107. UploadExamDataForOldVersionResult({
  108. this.remedicalCode,
  109. this.remedicalCreateTime,
  110. });
  111. factory UploadExamDataForOldVersionResult.fromJson(Map<String, dynamic> map) {
  112. return UploadExamDataForOldVersionResult(
  113. remedicalCode: map['RemedicalCode'],
  114. remedicalCreateTime: map['RemedicalCreateTime'] != null ? DateTime.parse(map['RemedicalCreateTime']) : null,
  115. );
  116. }
  117. Map<String, dynamic> toJson() {
  118. final map = Map<String, dynamic>();
  119. if (remedicalCode != null) {
  120. map['RemedicalCode'] = remedicalCode;
  121. }
  122. if (remedicalCreateTime != null) {
  123. map['RemedicalCreateTime'] = JsonRpcUtils.dateFormat(remedicalCreateTime!);
  124. }
  125. return map;
  126. }
  127. }
  128. class UploadExamDataRequest extends TokenRequest{
  129. String? examCode;
  130. String? previewFileToken;
  131. String? fileToken;
  132. int fileSize;
  133. String? coverImageToken;
  134. String? applicationCategory;
  135. String? application;
  136. RemedicalFileDataTypeEnum fileDataType;
  137. MeasuredResultsDTO? measuredResult;
  138. ScanImageDTO? commentResult;
  139. ImageLocationDTO? imageLocation;
  140. DateTime? examTime;
  141. UploadExamDataRequest({
  142. this.examCode,
  143. this.previewFileToken,
  144. this.fileToken,
  145. this.fileSize = 0,
  146. this.coverImageToken,
  147. this.applicationCategory,
  148. this.application,
  149. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  150. this.measuredResult,
  151. this.commentResult,
  152. this.imageLocation,
  153. this.examTime,
  154. String? token,
  155. }) : super(
  156. token: token,
  157. );
  158. factory UploadExamDataRequest.fromJson(Map<String, dynamic> map) {
  159. return UploadExamDataRequest(
  160. examCode: map['ExamCode'],
  161. previewFileToken: map['PreviewFileToken'],
  162. fileToken: map['FileToken'],
  163. fileSize: map['FileSize'],
  164. coverImageToken: map['CoverImageToken'],
  165. applicationCategory: map['ApplicationCategory'],
  166. application: map['Application'],
  167. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  168. measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
  169. commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
  170. imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
  171. examTime: map['ExamTime'] != null ? DateTime.parse(map['ExamTime']) : null,
  172. token: map['Token'],
  173. );
  174. }
  175. Map<String, dynamic> toJson() {
  176. final map = super.toJson();
  177. if (examCode != null)
  178. map['ExamCode'] = examCode;
  179. if (previewFileToken != null)
  180. map['PreviewFileToken'] = previewFileToken;
  181. if (fileToken != null)
  182. map['FileToken'] = fileToken;
  183. map['FileSize'] = fileSize;
  184. if (coverImageToken != null)
  185. map['CoverImageToken'] = coverImageToken;
  186. if (applicationCategory != null)
  187. map['ApplicationCategory'] = applicationCategory;
  188. if (application != null)
  189. map['Application'] = application;
  190. map['FileDataType'] = fileDataType.index;
  191. if (measuredResult != null)
  192. map['MeasuredResult'] = measuredResult;
  193. if (commentResult != null)
  194. map['CommentResult'] = commentResult;
  195. if (imageLocation != null)
  196. map['ImageLocation'] = imageLocation;
  197. if (examTime != null)
  198. map['ExamTime'] = JsonRpcUtils.dateFormat(examTime!);
  199. return map;
  200. }
  201. }
  202. class FindRemedicalByCodeRequest extends TokenRequest{
  203. String? remedicalCode;
  204. bool existDiagnosisResult;
  205. FindRemedicalByCodeRequest({
  206. this.remedicalCode,
  207. this.existDiagnosisResult = false,
  208. String? token,
  209. }) : super(
  210. token: token,
  211. );
  212. factory FindRemedicalByCodeRequest.fromJson(Map<String, dynamic> map) {
  213. return FindRemedicalByCodeRequest(
  214. remedicalCode: map['RemedicalCode'],
  215. existDiagnosisResult: map['ExistDiagnosisResult'],
  216. token: map['Token'],
  217. );
  218. }
  219. Map<String, dynamic> toJson() {
  220. final map = super.toJson();
  221. if (remedicalCode != null)
  222. map['RemedicalCode'] = remedicalCode;
  223. map['ExistDiagnosisResult'] = existDiagnosisResult;
  224. return map;
  225. }
  226. }
  227. class AddToRemedicalDiagnosisRequest extends TokenRequest{
  228. String? remedicalCode;
  229. AddToRemedicalDiagnosisRequest({
  230. this.remedicalCode,
  231. String? token,
  232. }) : super(
  233. token: token,
  234. );
  235. factory AddToRemedicalDiagnosisRequest.fromJson(Map<String, dynamic> map) {
  236. return AddToRemedicalDiagnosisRequest(
  237. remedicalCode: map['RemedicalCode'],
  238. token: map['Token'],
  239. );
  240. }
  241. Map<String, dynamic> toJson() {
  242. final map = super.toJson();
  243. if (remedicalCode != null)
  244. map['RemedicalCode'] = remedicalCode;
  245. return map;
  246. }
  247. }
  248. class RemedicalItemList {
  249. String? patientScanTypeDesc;
  250. List<String>? patientScanTypeList;
  251. String? applicationCategory;
  252. String? application;
  253. List<RemedicalInfoDTO>? remedicalList;
  254. RemedicalItemList({
  255. this.patientScanTypeDesc,
  256. this.patientScanTypeList,
  257. this.applicationCategory,
  258. this.application,
  259. this.remedicalList,
  260. });
  261. factory RemedicalItemList.fromJson(Map<String, dynamic> map) {
  262. return RemedicalItemList(
  263. patientScanTypeDesc: map['PatientScanTypeDesc'],
  264. patientScanTypeList: map['PatientScanTypeList']?.cast<String>().toList(),
  265. applicationCategory: map['ApplicationCategory'],
  266. application: map['Application'],
  267. remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  268. );
  269. }
  270. Map<String, dynamic> toJson() {
  271. final map = Map<String, dynamic>();
  272. if (patientScanTypeDesc != null) {
  273. map['PatientScanTypeDesc'] = patientScanTypeDesc;
  274. }
  275. if (patientScanTypeList != null) {
  276. map['PatientScanTypeList'] = patientScanTypeList;
  277. }
  278. if (applicationCategory != null) {
  279. map['ApplicationCategory'] = applicationCategory;
  280. }
  281. if (application != null) {
  282. map['Application'] = application;
  283. }
  284. if (remedicalList != null) {
  285. map['RemedicalList'] = remedicalList;
  286. }
  287. return map;
  288. }
  289. }
  290. class RemedicalListResult {
  291. String? scanDate;
  292. String? recordCode;
  293. List<RemedicalItemList>? remedicalItemList;
  294. RemedicalListResult({
  295. this.scanDate,
  296. this.recordCode,
  297. this.remedicalItemList,
  298. });
  299. factory RemedicalListResult.fromJson(Map<String, dynamic> map) {
  300. return RemedicalListResult(
  301. scanDate: map['ScanDate'],
  302. recordCode: map['RecordCode'],
  303. remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItemList.fromJson(e as Map<String,dynamic>)).toList() : null,
  304. );
  305. }
  306. Map<String, dynamic> toJson() {
  307. final map = Map<String, dynamic>();
  308. if (scanDate != null) {
  309. map['ScanDate'] = scanDate;
  310. }
  311. if (recordCode != null) {
  312. map['RecordCode'] = recordCode;
  313. }
  314. if (remedicalItemList != null) {
  315. map['RemedicalItemList'] = remedicalItemList;
  316. }
  317. return map;
  318. }
  319. }
  320. enum QueryDropdownListEnum {
  321. Org,
  322. }
  323. class QueryDropdownListReuqest extends TokenRequest{
  324. QueryDropdownListEnum queryType;
  325. String? queryValue;
  326. QueryDropdownListReuqest({
  327. this.queryType = QueryDropdownListEnum.Org,
  328. this.queryValue,
  329. String? token,
  330. }) : super(
  331. token: token,
  332. );
  333. factory QueryDropdownListReuqest.fromJson(Map<String, dynamic> map) {
  334. return QueryDropdownListReuqest(
  335. queryType: QueryDropdownListEnum.values.firstWhere((e) => e.index == map['QueryType']),
  336. queryValue: map['QueryValue'],
  337. token: map['Token'],
  338. );
  339. }
  340. Map<String, dynamic> toJson() {
  341. final map = super.toJson();
  342. map['QueryType'] = queryType.index;
  343. if (queryValue != null)
  344. map['QueryValue'] = queryValue;
  345. return map;
  346. }
  347. }
  348. class RservationResult {
  349. String? reservationCode;
  350. List<DataItemDTO>? patientInfo;
  351. List<PatientInfoExt>? patientInfoExtList;
  352. String? dataSource;
  353. RservationResult({
  354. this.reservationCode,
  355. this.patientInfo,
  356. this.patientInfoExtList,
  357. this.dataSource,
  358. });
  359. factory RservationResult.fromJson(Map<String, dynamic> map) {
  360. return RservationResult(
  361. reservationCode: map['ReservationCode'],
  362. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  363. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  364. dataSource: map['DataSource'],
  365. );
  366. }
  367. Map<String, dynamic> toJson() {
  368. final map = Map<String, dynamic>();
  369. if (reservationCode != null) {
  370. map['ReservationCode'] = reservationCode;
  371. }
  372. if (patientInfo != null) {
  373. map['PatientInfo'] = patientInfo;
  374. }
  375. if (patientInfoExtList != null) {
  376. map['PatientInfoExtList'] = patientInfoExtList;
  377. }
  378. if (dataSource != null) {
  379. map['DataSource'] = dataSource;
  380. }
  381. return map;
  382. }
  383. }
  384. class QueryReservationResult {
  385. List<RservationResult>? reservationList;
  386. QueryReservationResult({
  387. this.reservationList,
  388. });
  389. factory QueryReservationResult.fromJson(Map<String, dynamic> map) {
  390. return QueryReservationResult(
  391. reservationList: map['ReservationList'] != null ? (map['ReservationList'] as List).map((e)=>RservationResult.fromJson(e as Map<String,dynamic>)).toList() : null,
  392. );
  393. }
  394. Map<String, dynamic> toJson() {
  395. final map = Map<String, dynamic>();
  396. if (reservationList != null) {
  397. map['ReservationList'] = reservationList;
  398. }
  399. return map;
  400. }
  401. }
  402. class QueryReservationRequest extends TokenRequest{
  403. DateTime? createTime;
  404. QueryReservationRequest({
  405. this.createTime,
  406. String? token,
  407. }) : super(
  408. token: token,
  409. );
  410. factory QueryReservationRequest.fromJson(Map<String, dynamic> map) {
  411. return QueryReservationRequest(
  412. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  413. token: map['Token'],
  414. );
  415. }
  416. Map<String, dynamic> toJson() {
  417. final map = super.toJson();
  418. if (createTime != null)
  419. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  420. return map;
  421. }
  422. }
  423. class FinishExamNotifyDetail {
  424. String? recordCode;
  425. RecordStatusEnum recordStatus;
  426. FinishExamNotifyDetail({
  427. this.recordCode,
  428. this.recordStatus = RecordStatusEnum.NotScanned,
  429. });
  430. factory FinishExamNotifyDetail.fromJson(Map<String, dynamic> map) {
  431. return FinishExamNotifyDetail(
  432. recordCode: map['RecordCode'],
  433. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  434. );
  435. }
  436. Map<String, dynamic> toJson() {
  437. final map = Map<String, dynamic>();
  438. if (recordCode != null) {
  439. map['RecordCode'] = recordCode;
  440. }
  441. map['RecordStatus'] = recordStatus.index;
  442. return map;
  443. }
  444. }
  445. class PushFinishExamNotifyToClientRequest {
  446. List<FinishExamNotifyDetail>? records;
  447. String? userCode;
  448. PushFinishExamNotifyToClientRequest({
  449. this.records,
  450. this.userCode,
  451. });
  452. factory PushFinishExamNotifyToClientRequest.fromJson(Map<String, dynamic> map) {
  453. return PushFinishExamNotifyToClientRequest(
  454. records: map['Records'] != null ? (map['Records'] as List).map((e)=>FinishExamNotifyDetail.fromJson(e as Map<String,dynamic>)).toList() : null,
  455. userCode: map['UserCode'],
  456. );
  457. }
  458. Map<String, dynamic> toJson() {
  459. final map = Map<String, dynamic>();
  460. if (records != null) {
  461. map['Records'] = records;
  462. }
  463. if (userCode != null) {
  464. map['UserCode'] = userCode;
  465. }
  466. return map;
  467. }
  468. }
  469. class DeviceFinishExamRequest extends TokenRequest{
  470. List<String>? records;
  471. DeviceFinishExamRequest({
  472. this.records,
  473. String? token,
  474. }) : super(
  475. token: token,
  476. );
  477. factory DeviceFinishExamRequest.fromJson(Map<String, dynamic> map) {
  478. return DeviceFinishExamRequest(
  479. records: map['Records']?.cast<String>().toList(),
  480. token: map['Token'],
  481. );
  482. }
  483. Map<String, dynamic> toJson() {
  484. final map = super.toJson();
  485. if (records != null)
  486. map['Records'] = records;
  487. return map;
  488. }
  489. }
  490. class QueryExamInfoResult {
  491. String? examCode;
  492. DateTime? createTime;
  493. String? deptName;
  494. String? patientCode;
  495. String? patientName;
  496. String? patientAge;
  497. List<DataItemDTO>? patientAgeInfo;
  498. String? patientSex;
  499. List<PatientInfoExt>? patientInfoExtList;
  500. List<String>? associatedExamCodes;
  501. RecordStatusEnum examStatus;
  502. String? customDoctor;
  503. String? customOrganzation;
  504. String? equipmentSN;
  505. String? deviceCode;
  506. QueryExamInfoResult({
  507. this.examCode,
  508. this.createTime,
  509. this.deptName,
  510. this.patientCode,
  511. this.patientName,
  512. this.patientAge,
  513. this.patientAgeInfo,
  514. this.patientSex,
  515. this.patientInfoExtList,
  516. this.associatedExamCodes,
  517. this.examStatus = RecordStatusEnum.NotScanned,
  518. this.customDoctor,
  519. this.customOrganzation,
  520. this.equipmentSN,
  521. this.deviceCode,
  522. });
  523. factory QueryExamInfoResult.fromJson(Map<String, dynamic> map) {
  524. return QueryExamInfoResult(
  525. examCode: map['ExamCode'],
  526. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  527. deptName: map['DeptName'],
  528. patientCode: map['PatientCode'],
  529. patientName: map['PatientName'],
  530. patientAge: map['PatientAge'],
  531. patientAgeInfo: map['PatientAgeInfo'] != null ? (map['PatientAgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  532. patientSex: map['PatientSex'],
  533. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  534. associatedExamCodes: map['AssociatedExamCodes']?.cast<String>().toList(),
  535. examStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']),
  536. customDoctor: map['CustomDoctor'],
  537. customOrganzation: map['CustomOrganzation'],
  538. equipmentSN: map['EquipmentSN'],
  539. deviceCode: map['DeviceCode'],
  540. );
  541. }
  542. Map<String, dynamic> toJson() {
  543. final map = Map<String, dynamic>();
  544. if (examCode != null) {
  545. map['ExamCode'] = examCode;
  546. }
  547. if (createTime != null) {
  548. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  549. }
  550. if (deptName != null) {
  551. map['DeptName'] = deptName;
  552. }
  553. if (patientCode != null) {
  554. map['PatientCode'] = patientCode;
  555. }
  556. if (patientName != null) {
  557. map['PatientName'] = patientName;
  558. }
  559. if (patientAge != null) {
  560. map['PatientAge'] = patientAge;
  561. }
  562. if (patientAgeInfo != null) {
  563. map['PatientAgeInfo'] = patientAgeInfo;
  564. }
  565. if (patientSex != null) {
  566. map['PatientSex'] = patientSex;
  567. }
  568. if (patientInfoExtList != null) {
  569. map['PatientInfoExtList'] = patientInfoExtList;
  570. }
  571. if (associatedExamCodes != null) {
  572. map['AssociatedExamCodes'] = associatedExamCodes;
  573. }
  574. map['ExamStatus'] = examStatus.index;
  575. if (customDoctor != null) {
  576. map['CustomDoctor'] = customDoctor;
  577. }
  578. if (customOrganzation != null) {
  579. map['CustomOrganzation'] = customOrganzation;
  580. }
  581. if (equipmentSN != null) {
  582. map['EquipmentSN'] = equipmentSN;
  583. }
  584. if (deviceCode != null) {
  585. map['DeviceCode'] = deviceCode;
  586. }
  587. return map;
  588. }
  589. }
  590. enum ExamStatusEnum {
  591. Wait,
  592. Done,
  593. }
  594. class QueryExamListRequest extends PageRequest{
  595. String? patientName;
  596. DateTime? startTime;
  597. DateTime? endTime;
  598. ExamStatusEnum examStatus;
  599. QueryExamListRequest({
  600. this.patientName,
  601. this.startTime,
  602. this.endTime,
  603. this.examStatus = ExamStatusEnum.Wait,
  604. int pageIndex = 0,
  605. int pageSize = 0,
  606. String? token,
  607. }) : super(
  608. pageIndex: pageIndex,
  609. pageSize: pageSize,
  610. token: token,
  611. );
  612. factory QueryExamListRequest.fromJson(Map<String, dynamic> map) {
  613. return QueryExamListRequest(
  614. patientName: map['PatientName'],
  615. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  616. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  617. examStatus: ExamStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']),
  618. pageIndex: map['PageIndex'],
  619. pageSize: map['PageSize'],
  620. token: map['Token'],
  621. );
  622. }
  623. Map<String, dynamic> toJson() {
  624. final map = super.toJson();
  625. if (patientName != null)
  626. map['PatientName'] = patientName;
  627. if (startTime != null)
  628. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  629. if (endTime != null)
  630. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  631. map['ExamStatus'] = examStatus.index;
  632. return map;
  633. }
  634. }
  635. class QueryExamInfoRequest extends TokenRequest{
  636. String? examCode;
  637. QueryExamInfoRequest({
  638. this.examCode,
  639. String? token,
  640. }) : super(
  641. token: token,
  642. );
  643. factory QueryExamInfoRequest.fromJson(Map<String, dynamic> map) {
  644. return QueryExamInfoRequest(
  645. examCode: map['ExamCode'],
  646. token: map['Token'],
  647. );
  648. }
  649. Map<String, dynamic> toJson() {
  650. final map = super.toJson();
  651. if (examCode != null)
  652. map['ExamCode'] = examCode;
  653. return map;
  654. }
  655. }
  656. class OutputItemMetaDTO {
  657. String? name;
  658. String? description;
  659. int unit;
  660. bool? isWorking;
  661. OutputItemMetaDTO({
  662. this.name,
  663. this.description,
  664. this.unit = 0,
  665. this.isWorking,
  666. });
  667. factory OutputItemMetaDTO.fromJson(Map<String, dynamic> map) {
  668. return OutputItemMetaDTO(
  669. name: map['Name'],
  670. description: map['Description'],
  671. unit: map['Unit'],
  672. isWorking: map['IsWorking'],
  673. );
  674. }
  675. Map<String, dynamic> toJson() {
  676. final map = Map<String, dynamic>();
  677. if (name != null) {
  678. map['Name'] = name;
  679. }
  680. if (description != null) {
  681. map['Description'] = description;
  682. }
  683. map['Unit'] = unit;
  684. if (isWorking != null) {
  685. map['IsWorking'] = isWorking;
  686. }
  687. return map;
  688. }
  689. }
  690. class CalculatorMetaDTO {
  691. List<OutputItemMetaDTO>? availableOutputs;
  692. CalculatorMetaDTO({
  693. this.availableOutputs,
  694. });
  695. factory CalculatorMetaDTO.fromJson(Map<String, dynamic> map) {
  696. return CalculatorMetaDTO(
  697. availableOutputs: map['AvailableOutputs'] != null ? (map['AvailableOutputs'] as List).map((e)=>OutputItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  698. );
  699. }
  700. Map<String, dynamic> toJson() {
  701. final map = Map<String, dynamic>();
  702. if (availableOutputs != null) {
  703. map['AvailableOutputs'] = availableOutputs;
  704. }
  705. return map;
  706. }
  707. }
  708. class ChildItemMetaDTO {
  709. String? name;
  710. String? description;
  711. bool isWorking;
  712. List<ChildItemMetaDTO>? childItems;
  713. CalculatorMetaDTO? calculator;
  714. String? measureTypeName;
  715. ChildItemMetaDTO({
  716. this.name,
  717. this.description,
  718. this.isWorking = false,
  719. this.childItems,
  720. this.calculator,
  721. this.measureTypeName,
  722. });
  723. factory ChildItemMetaDTO.fromJson(Map<String, dynamic> map) {
  724. return ChildItemMetaDTO(
  725. name: map['Name'],
  726. description: map['Description'],
  727. isWorking: map['IsWorking'],
  728. childItems: map['ChildItems'] != null ? (map['ChildItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  729. calculator: map['Calculator'] != null ? CalculatorMetaDTO.fromJson(map['Calculator']) : null,
  730. measureTypeName: map['MeasureTypeName'],
  731. );
  732. }
  733. Map<String, dynamic> toJson() {
  734. final map = Map<String, dynamic>();
  735. if (name != null) {
  736. map['Name'] = name;
  737. }
  738. if (description != null) {
  739. map['Description'] = description;
  740. }
  741. map['IsWorking'] = isWorking;
  742. if (childItems != null) {
  743. map['ChildItems'] = childItems;
  744. }
  745. if (calculator != null) {
  746. map['Calculator'] = calculator;
  747. }
  748. if (measureTypeName != null) {
  749. map['MeasureTypeName'] = measureTypeName;
  750. }
  751. return map;
  752. }
  753. }
  754. class ItemMetaDTO {
  755. String? name;
  756. String? description;
  757. String? briefAnnotation;
  758. String? measureTypeName;
  759. List<String>? categories;
  760. CalculatorMetaDTO? calculator;
  761. List<ChildItemMetaDTO>? multiMethodItems;
  762. List<ChildItemMetaDTO>? methodChildItems;
  763. ItemMetaDTO({
  764. this.name,
  765. this.description,
  766. this.briefAnnotation,
  767. this.measureTypeName,
  768. this.categories,
  769. this.calculator,
  770. this.multiMethodItems,
  771. this.methodChildItems,
  772. });
  773. factory ItemMetaDTO.fromJson(Map<String, dynamic> map) {
  774. return ItemMetaDTO(
  775. name: map['Name'],
  776. description: map['Description'],
  777. briefAnnotation: map['BriefAnnotation'],
  778. measureTypeName: map['MeasureTypeName'],
  779. categories: map['Categories']?.cast<String>().toList(),
  780. calculator: map['Calculator'] != null ? CalculatorMetaDTO.fromJson(map['Calculator']) : null,
  781. multiMethodItems: map['MultiMethodItems'] != null ? (map['MultiMethodItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  782. methodChildItems: map['MethodChildItems'] != null ? (map['MethodChildItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  783. );
  784. }
  785. Map<String, dynamic> toJson() {
  786. final map = Map<String, dynamic>();
  787. if (name != null) {
  788. map['Name'] = name;
  789. }
  790. if (description != null) {
  791. map['Description'] = description;
  792. }
  793. if (briefAnnotation != null) {
  794. map['BriefAnnotation'] = briefAnnotation;
  795. }
  796. if (measureTypeName != null) {
  797. map['MeasureTypeName'] = measureTypeName;
  798. }
  799. if (categories != null) {
  800. map['Categories'] = categories;
  801. }
  802. if (calculator != null) {
  803. map['Calculator'] = calculator;
  804. }
  805. if (multiMethodItems != null) {
  806. map['MultiMethodItems'] = multiMethodItems;
  807. }
  808. if (methodChildItems != null) {
  809. map['MethodChildItems'] = methodChildItems;
  810. }
  811. return map;
  812. }
  813. }
  814. class MeasureFolderDTO {
  815. String? name;
  816. List<String>? workingItemNames;
  817. List<ItemMetaDTO>? availableItems;
  818. MeasureFolderDTO({
  819. this.name,
  820. this.workingItemNames,
  821. this.availableItems,
  822. });
  823. factory MeasureFolderDTO.fromJson(Map<String, dynamic> map) {
  824. return MeasureFolderDTO(
  825. name: map['Name'],
  826. workingItemNames: map['WorkingItemNames']?.cast<String>().toList(),
  827. availableItems: map['AvailableItems'] != null ? (map['AvailableItems'] as List).map((e)=>ItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  828. );
  829. }
  830. Map<String, dynamic> toJson() {
  831. final map = Map<String, dynamic>();
  832. if (name != null) {
  833. map['Name'] = name;
  834. }
  835. if (workingItemNames != null) {
  836. map['WorkingItemNames'] = workingItemNames;
  837. }
  838. if (availableItems != null) {
  839. map['AvailableItems'] = availableItems;
  840. }
  841. return map;
  842. }
  843. }
  844. class MeasureGroupDTO {
  845. String? name;
  846. String? description;
  847. List<MeasureFolderDTO>? availableFolders;
  848. MeasureGroupDTO({
  849. this.name,
  850. this.description,
  851. this.availableFolders,
  852. });
  853. factory MeasureGroupDTO.fromJson(Map<String, dynamic> map) {
  854. return MeasureGroupDTO(
  855. name: map['Name'],
  856. description: map['Description'],
  857. availableFolders: map['AvailableFolders'] != null ? (map['AvailableFolders'] as List).map((e)=>MeasureFolderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  858. );
  859. }
  860. Map<String, dynamic> toJson() {
  861. final map = Map<String, dynamic>();
  862. if (name != null) {
  863. map['Name'] = name;
  864. }
  865. if (description != null) {
  866. map['Description'] = description;
  867. }
  868. if (availableFolders != null) {
  869. map['AvailableFolders'] = availableFolders;
  870. }
  871. return map;
  872. }
  873. }
  874. class MeasureModeDTO {
  875. String? modeName;
  876. List<MeasureGroupDTO>? availableGroups;
  877. MeasureModeDTO({
  878. this.modeName,
  879. this.availableGroups,
  880. });
  881. factory MeasureModeDTO.fromJson(Map<String, dynamic> map) {
  882. return MeasureModeDTO(
  883. modeName: map['ModeName'],
  884. availableGroups: map['AvailableGroups'] != null ? (map['AvailableGroups'] as List).map((e)=>MeasureGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  885. );
  886. }
  887. Map<String, dynamic> toJson() {
  888. final map = Map<String, dynamic>();
  889. if (modeName != null) {
  890. map['ModeName'] = modeName;
  891. }
  892. if (availableGroups != null) {
  893. map['AvailableGroups'] = availableGroups;
  894. }
  895. return map;
  896. }
  897. }
  898. class MeasureApplicationDTO {
  899. String? version;
  900. String? id;
  901. String? description;
  902. List<MeasureModeDTO>? availableModes;
  903. MeasureApplicationDTO({
  904. this.version,
  905. this.id,
  906. this.description,
  907. this.availableModes,
  908. });
  909. factory MeasureApplicationDTO.fromJson(Map<String, dynamic> map) {
  910. return MeasureApplicationDTO(
  911. version: map['Version'],
  912. id: map['Id'],
  913. description: map['Description'],
  914. availableModes: map['AvailableModes'] != null ? (map['AvailableModes'] as List).map((e)=>MeasureModeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  915. );
  916. }
  917. Map<String, dynamic> toJson() {
  918. final map = Map<String, dynamic>();
  919. if (version != null) {
  920. map['Version'] = version;
  921. }
  922. if (id != null) {
  923. map['Id'] = id;
  924. }
  925. if (description != null) {
  926. map['Description'] = description;
  927. }
  928. if (availableModes != null) {
  929. map['AvailableModes'] = availableModes;
  930. }
  931. return map;
  932. }
  933. }
  934. class GetMeasureApplicationRequest extends TokenRequest{
  935. String? applicationName;
  936. String? categoryName;
  937. List<String>? measureModes;
  938. GetMeasureApplicationRequest({
  939. this.applicationName,
  940. this.categoryName,
  941. this.measureModes,
  942. String? token,
  943. }) : super(
  944. token: token,
  945. );
  946. factory GetMeasureApplicationRequest.fromJson(Map<String, dynamic> map) {
  947. return GetMeasureApplicationRequest(
  948. applicationName: map['ApplicationName'],
  949. categoryName: map['CategoryName'],
  950. measureModes: map['MeasureModes']?.cast<String>().toList(),
  951. token: map['Token'],
  952. );
  953. }
  954. Map<String, dynamic> toJson() {
  955. final map = super.toJson();
  956. if (applicationName != null)
  957. map['ApplicationName'] = applicationName;
  958. if (categoryName != null)
  959. map['CategoryName'] = categoryName;
  960. if (measureModes != null)
  961. map['MeasureModes'] = measureModes;
  962. return map;
  963. }
  964. }
  965. class CommentItemDTO {
  966. String? text;
  967. CommentItemDTO({
  968. this.text,
  969. });
  970. factory CommentItemDTO.fromJson(Map<String, dynamic> map) {
  971. return CommentItemDTO(
  972. text: map['Text'],
  973. );
  974. }
  975. Map<String, dynamic> toJson() {
  976. final map = Map<String, dynamic>();
  977. if (text != null) {
  978. map['Text'] = text;
  979. }
  980. return map;
  981. }
  982. }
  983. class CommentItemResultDTO {
  984. String? version;
  985. List<CommentItemDTO>? commentItems;
  986. CommentItemResultDTO({
  987. this.version,
  988. this.commentItems,
  989. });
  990. factory CommentItemResultDTO.fromJson(Map<String, dynamic> map) {
  991. return CommentItemResultDTO(
  992. version: map['Version'],
  993. commentItems: map['CommentItems'] != null ? (map['CommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  994. );
  995. }
  996. Map<String, dynamic> toJson() {
  997. final map = Map<String, dynamic>();
  998. if (version != null) {
  999. map['Version'] = version;
  1000. }
  1001. if (commentItems != null) {
  1002. map['CommentItems'] = commentItems;
  1003. }
  1004. return map;
  1005. }
  1006. }
  1007. class GetCommentsByApplicationRequest extends TokenRequest{
  1008. String? languageCode;
  1009. String? applicationName;
  1010. String? categoryName;
  1011. GetCommentsByApplicationRequest({
  1012. this.languageCode,
  1013. this.applicationName,
  1014. this.categoryName,
  1015. String? token,
  1016. }) : super(
  1017. token: token,
  1018. );
  1019. factory GetCommentsByApplicationRequest.fromJson(Map<String, dynamic> map) {
  1020. return GetCommentsByApplicationRequest(
  1021. languageCode: map['LanguageCode'],
  1022. applicationName: map['ApplicationName'],
  1023. categoryName: map['CategoryName'],
  1024. token: map['Token'],
  1025. );
  1026. }
  1027. Map<String, dynamic> toJson() {
  1028. final map = super.toJson();
  1029. if (languageCode != null)
  1030. map['LanguageCode'] = languageCode;
  1031. if (applicationName != null)
  1032. map['ApplicationName'] = applicationName;
  1033. if (categoryName != null)
  1034. map['CategoryName'] = categoryName;
  1035. return map;
  1036. }
  1037. }
  1038. class PresetCommentItemDTO {
  1039. List<String>? categoryList;
  1040. String? text;
  1041. PresetCommentItemDTO({
  1042. this.categoryList,
  1043. this.text,
  1044. });
  1045. factory PresetCommentItemDTO.fromJson(Map<String, dynamic> map) {
  1046. return PresetCommentItemDTO(
  1047. categoryList: map['CategoryList']?.cast<String>().toList(),
  1048. text: map['Text'],
  1049. );
  1050. }
  1051. Map<String, dynamic> toJson() {
  1052. final map = Map<String, dynamic>();
  1053. if (categoryList != null) {
  1054. map['CategoryList'] = categoryList;
  1055. }
  1056. if (text != null) {
  1057. map['Text'] = text;
  1058. }
  1059. return map;
  1060. }
  1061. }
  1062. class PresetCommentItemResultDTO {
  1063. String? version;
  1064. List<PresetCommentItemDTO>? presetCommentItems;
  1065. PresetCommentItemResultDTO({
  1066. this.version,
  1067. this.presetCommentItems,
  1068. });
  1069. factory PresetCommentItemResultDTO.fromJson(Map<String, dynamic> map) {
  1070. return PresetCommentItemResultDTO(
  1071. version: map['Version'],
  1072. presetCommentItems: map['PresetCommentItems'] != null ? (map['PresetCommentItems'] as List).map((e)=>PresetCommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1073. );
  1074. }
  1075. Map<String, dynamic> toJson() {
  1076. final map = Map<String, dynamic>();
  1077. if (version != null) {
  1078. map['Version'] = version;
  1079. }
  1080. if (presetCommentItems != null) {
  1081. map['PresetCommentItems'] = presetCommentItems;
  1082. }
  1083. return map;
  1084. }
  1085. }
  1086. class GetPresetCommentsRequest extends TokenRequest{
  1087. String? languageCode;
  1088. GetPresetCommentsRequest({
  1089. this.languageCode,
  1090. String? token,
  1091. }) : super(
  1092. token: token,
  1093. );
  1094. factory GetPresetCommentsRequest.fromJson(Map<String, dynamic> map) {
  1095. return GetPresetCommentsRequest(
  1096. languageCode: map['LanguageCode'],
  1097. token: map['Token'],
  1098. );
  1099. }
  1100. Map<String, dynamic> toJson() {
  1101. final map = super.toJson();
  1102. if (languageCode != null)
  1103. map['LanguageCode'] = languageCode;
  1104. return map;
  1105. }
  1106. }
  1107. class GetReportElementByLanguageRequest extends TokenRequest{
  1108. String? reportDatasJosn;
  1109. String? language;
  1110. GetReportElementByLanguageRequest({
  1111. this.reportDatasJosn,
  1112. this.language,
  1113. String? token,
  1114. }) : super(
  1115. token: token,
  1116. );
  1117. factory GetReportElementByLanguageRequest.fromJson(Map<String, dynamic> map) {
  1118. return GetReportElementByLanguageRequest(
  1119. reportDatasJosn: map['ReportDatasJosn'],
  1120. language: map['Language'],
  1121. token: map['Token'],
  1122. );
  1123. }
  1124. Map<String, dynamic> toJson() {
  1125. final map = super.toJson();
  1126. if (reportDatasJosn != null)
  1127. map['ReportDatasJosn'] = reportDatasJosn;
  1128. if (language != null)
  1129. map['Language'] = language;
  1130. return map;
  1131. }
  1132. }
  1133. class UpdateCommentItemDTO {
  1134. String? oldText;
  1135. String? newText;
  1136. UpdateCommentItemDTO({
  1137. this.oldText,
  1138. this.newText,
  1139. });
  1140. factory UpdateCommentItemDTO.fromJson(Map<String, dynamic> map) {
  1141. return UpdateCommentItemDTO(
  1142. oldText: map['OldText'],
  1143. newText: map['NewText'],
  1144. );
  1145. }
  1146. Map<String, dynamic> toJson() {
  1147. final map = Map<String, dynamic>();
  1148. if (oldText != null) {
  1149. map['OldText'] = oldText;
  1150. }
  1151. if (newText != null) {
  1152. map['NewText'] = newText;
  1153. }
  1154. return map;
  1155. }
  1156. }
  1157. class SaveUserDefinedCommentsRequest extends TokenRequest{
  1158. String? version;
  1159. String? languageCode;
  1160. String? applicationName;
  1161. String? categoryName;
  1162. List<CommentItemDTO>? addCommentItems;
  1163. List<CommentItemDTO>? deletedCommentItems;
  1164. List<UpdateCommentItemDTO>? updateCommentItems;
  1165. SaveUserDefinedCommentsRequest({
  1166. this.version,
  1167. this.languageCode,
  1168. this.applicationName,
  1169. this.categoryName,
  1170. this.addCommentItems,
  1171. this.deletedCommentItems,
  1172. this.updateCommentItems,
  1173. String? token,
  1174. }) : super(
  1175. token: token,
  1176. );
  1177. factory SaveUserDefinedCommentsRequest.fromJson(Map<String, dynamic> map) {
  1178. return SaveUserDefinedCommentsRequest(
  1179. version: map['Version'],
  1180. languageCode: map['LanguageCode'],
  1181. applicationName: map['ApplicationName'],
  1182. categoryName: map['CategoryName'],
  1183. addCommentItems: map['AddCommentItems'] != null ? (map['AddCommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1184. deletedCommentItems: map['DeletedCommentItems'] != null ? (map['DeletedCommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1185. updateCommentItems: map['UpdateCommentItems'] != null ? (map['UpdateCommentItems'] as List).map((e)=>UpdateCommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1186. token: map['Token'],
  1187. );
  1188. }
  1189. Map<String, dynamic> toJson() {
  1190. final map = super.toJson();
  1191. if (version != null)
  1192. map['Version'] = version;
  1193. if (languageCode != null)
  1194. map['LanguageCode'] = languageCode;
  1195. if (applicationName != null)
  1196. map['ApplicationName'] = applicationName;
  1197. if (categoryName != null)
  1198. map['CategoryName'] = categoryName;
  1199. if (addCommentItems != null)
  1200. map['AddCommentItems'] = addCommentItems;
  1201. if (deletedCommentItems != null)
  1202. map['DeletedCommentItems'] = deletedCommentItems;
  1203. if (updateCommentItems != null)
  1204. map['UpdateCommentItems'] = updateCommentItems;
  1205. return map;
  1206. }
  1207. }
  1208. class ResetUserCommentsRequest extends TokenRequest{
  1209. bool isAllReset;
  1210. String? applicationName;
  1211. String? categoryName;
  1212. ResetUserCommentsRequest({
  1213. this.isAllReset = false,
  1214. this.applicationName,
  1215. this.categoryName,
  1216. String? token,
  1217. }) : super(
  1218. token: token,
  1219. );
  1220. factory ResetUserCommentsRequest.fromJson(Map<String, dynamic> map) {
  1221. return ResetUserCommentsRequest(
  1222. isAllReset: map['IsAllReset'],
  1223. applicationName: map['ApplicationName'],
  1224. categoryName: map['CategoryName'],
  1225. token: map['Token'],
  1226. );
  1227. }
  1228. Map<String, dynamic> toJson() {
  1229. final map = super.toJson();
  1230. map['IsAllReset'] = isAllReset;
  1231. if (applicationName != null)
  1232. map['ApplicationName'] = applicationName;
  1233. if (categoryName != null)
  1234. map['CategoryName'] = categoryName;
  1235. return map;
  1236. }
  1237. }
  1238. class UserDefinedItemMetaDTO {
  1239. String? name;
  1240. String? workingMethodItem;
  1241. UserDefinedItemMetaDTO({
  1242. this.name,
  1243. this.workingMethodItem,
  1244. });
  1245. factory UserDefinedItemMetaDTO.fromJson(Map<String, dynamic> map) {
  1246. return UserDefinedItemMetaDTO(
  1247. name: map['Name'],
  1248. workingMethodItem: map['WorkingMethodItem'],
  1249. );
  1250. }
  1251. Map<String, dynamic> toJson() {
  1252. final map = Map<String, dynamic>();
  1253. if (name != null) {
  1254. map['Name'] = name;
  1255. }
  1256. if (workingMethodItem != null) {
  1257. map['WorkingMethodItem'] = workingMethodItem;
  1258. }
  1259. return map;
  1260. }
  1261. }
  1262. class UserDefinedMeasureFolderDTO {
  1263. String? name;
  1264. List<String>? workingItemNames;
  1265. String? defaultItem;
  1266. List<UserDefinedItemMetaDTO>? multiMethodItemMetas;
  1267. List<ItemMetaDTO>? itemMetas;
  1268. String? itemMetaJson;
  1269. UserDefinedMeasureFolderDTO({
  1270. this.name,
  1271. this.workingItemNames,
  1272. this.defaultItem,
  1273. this.multiMethodItemMetas,
  1274. this.itemMetas,
  1275. this.itemMetaJson,
  1276. });
  1277. factory UserDefinedMeasureFolderDTO.fromJson(Map<String, dynamic> map) {
  1278. return UserDefinedMeasureFolderDTO(
  1279. name: map['Name'],
  1280. workingItemNames: map['WorkingItemNames']?.cast<String>().toList(),
  1281. defaultItem: map['DefaultItem'],
  1282. multiMethodItemMetas: map['MultiMethodItemMetas'] != null ? (map['MultiMethodItemMetas'] as List).map((e)=>UserDefinedItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1283. itemMetas: map['ItemMetas'] != null ? (map['ItemMetas'] as List).map((e)=>ItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1284. itemMetaJson: map['ItemMetaJson'],
  1285. );
  1286. }
  1287. Map<String, dynamic> toJson() {
  1288. final map = Map<String, dynamic>();
  1289. if (name != null) {
  1290. map['Name'] = name;
  1291. }
  1292. if (workingItemNames != null) {
  1293. map['WorkingItemNames'] = workingItemNames;
  1294. }
  1295. if (defaultItem != null) {
  1296. map['DefaultItem'] = defaultItem;
  1297. }
  1298. if (multiMethodItemMetas != null) {
  1299. map['MultiMethodItemMetas'] = multiMethodItemMetas;
  1300. }
  1301. if (itemMetas != null) {
  1302. map['ItemMetas'] = itemMetas;
  1303. }
  1304. if (itemMetaJson != null) {
  1305. map['ItemMetaJson'] = itemMetaJson;
  1306. }
  1307. return map;
  1308. }
  1309. }
  1310. class UserDefinedMeasureGroupDTO {
  1311. String? name;
  1312. List<UserDefinedMeasureFolderDTO>? folders;
  1313. UserDefinedMeasureGroupDTO({
  1314. this.name,
  1315. this.folders,
  1316. });
  1317. factory UserDefinedMeasureGroupDTO.fromJson(Map<String, dynamic> map) {
  1318. return UserDefinedMeasureGroupDTO(
  1319. name: map['Name'],
  1320. folders: map['Folders'] != null ? (map['Folders'] as List).map((e)=>UserDefinedMeasureFolderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1321. );
  1322. }
  1323. Map<String, dynamic> toJson() {
  1324. final map = Map<String, dynamic>();
  1325. if (name != null) {
  1326. map['Name'] = name;
  1327. }
  1328. if (folders != null) {
  1329. map['Folders'] = folders;
  1330. }
  1331. return map;
  1332. }
  1333. }
  1334. class UserDefinedMeasureModeDTO {
  1335. String? modeName;
  1336. List<UserDefinedMeasureGroupDTO>? workingGroups;
  1337. UserDefinedMeasureModeDTO({
  1338. this.modeName,
  1339. this.workingGroups,
  1340. });
  1341. factory UserDefinedMeasureModeDTO.fromJson(Map<String, dynamic> map) {
  1342. return UserDefinedMeasureModeDTO(
  1343. modeName: map['ModeName'],
  1344. workingGroups: map['WorkingGroups'] != null ? (map['WorkingGroups'] as List).map((e)=>UserDefinedMeasureGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1345. );
  1346. }
  1347. Map<String, dynamic> toJson() {
  1348. final map = Map<String, dynamic>();
  1349. if (modeName != null) {
  1350. map['ModeName'] = modeName;
  1351. }
  1352. if (workingGroups != null) {
  1353. map['WorkingGroups'] = workingGroups;
  1354. }
  1355. return map;
  1356. }
  1357. }
  1358. class SaveUserDefinedMeasureApplicationRequest extends TokenRequest{
  1359. String? version;
  1360. String? applicationName;
  1361. String? categoryName;
  1362. UserDefinedMeasureModeDTO? workingMode;
  1363. SaveUserDefinedMeasureApplicationRequest({
  1364. this.version,
  1365. this.applicationName,
  1366. this.categoryName,
  1367. this.workingMode,
  1368. String? token,
  1369. }) : super(
  1370. token: token,
  1371. );
  1372. factory SaveUserDefinedMeasureApplicationRequest.fromJson(Map<String, dynamic> map) {
  1373. return SaveUserDefinedMeasureApplicationRequest(
  1374. version: map['Version'],
  1375. applicationName: map['ApplicationName'],
  1376. categoryName: map['CategoryName'],
  1377. workingMode: map['WorkingMode'] != null ? UserDefinedMeasureModeDTO.fromJson(map['WorkingMode']) : null,
  1378. token: map['Token'],
  1379. );
  1380. }
  1381. Map<String, dynamic> toJson() {
  1382. final map = super.toJson();
  1383. if (version != null)
  1384. map['Version'] = version;
  1385. if (applicationName != null)
  1386. map['ApplicationName'] = applicationName;
  1387. if (categoryName != null)
  1388. map['CategoryName'] = categoryName;
  1389. if (workingMode != null)
  1390. map['WorkingMode'] = workingMode;
  1391. return map;
  1392. }
  1393. }
  1394. enum CursorTypeEnum {
  1395. CursorType1Icon,
  1396. CursorType2Icon,
  1397. CursorType3Icon,
  1398. CursorType4Icon,
  1399. CursorType5Icon,
  1400. }
  1401. enum Unit {
  1402. None,
  1403. percent,
  1404. fraction,
  1405. placeHolder_3,
  1406. placeHolder_4,
  1407. placeHolder_5,
  1408. placeHolder_6,
  1409. placeHolder_7,
  1410. placeHolder_8,
  1411. placeHolder_9,
  1412. cm,
  1413. mm,
  1414. inch,
  1415. ft,
  1416. placeHolder_14,
  1417. placeHolder_15,
  1418. placeHolder_16,
  1419. placeHolder_17,
  1420. placeHolder_18,
  1421. placeHolder_19,
  1422. s,
  1423. minute,
  1424. hour,
  1425. day,
  1426. week,
  1427. week_day,
  1428. Tick,
  1429. msec,
  1430. placeHolder_28,
  1431. placeHolder_29,
  1432. degree,
  1433. radian,
  1434. placeHolder_32,
  1435. placeHolder_33,
  1436. placeHolder_34,
  1437. placeHolder_35,
  1438. placeHolder_36,
  1439. placeHolder_37,
  1440. placeHolder_38,
  1441. placeHolder_39,
  1442. g,
  1443. mg,
  1444. ng,
  1445. kg,
  1446. oz,
  1447. lb,
  1448. lb_oz,
  1449. placeHolder_47,
  1450. placeHolder_48,
  1451. placeHolder_49,
  1452. cm2,
  1453. mm2,
  1454. m2,
  1455. placeHolder_53,
  1456. placeHolder_54,
  1457. placeHolder_55,
  1458. placeHolder_56,
  1459. placeHolder_57,
  1460. placeHolder_58,
  1461. placeHolder_59,
  1462. cm3,
  1463. mm3,
  1464. ml,
  1465. L,
  1466. placeHolder_64,
  1467. placeHolder_65,
  1468. placeHolder_66,
  1469. placeHolder_67,
  1470. placeHolder_68,
  1471. placeHolder_69,
  1472. cms,
  1473. mms,
  1474. ms,
  1475. placeHolder_73,
  1476. placeHolder_74,
  1477. placeHolder_75,
  1478. placeHolder_76,
  1479. placeHolder_77,
  1480. placeHolder_78,
  1481. placeHolder_79,
  1482. cms2,
  1483. mms2,
  1484. placeHolder_82,
  1485. placeHolder_83,
  1486. placeHolder_84,
  1487. placeHolder_85,
  1488. placeHolder_86,
  1489. placeHolder_87,
  1490. placeHolder_88,
  1491. placeHolder_89,
  1492. cm3s,
  1493. mls,
  1494. mlmin,
  1495. Lmin,
  1496. placeHolder_94,
  1497. placeHolder_95,
  1498. placeHolder_96,
  1499. placeHolder_97,
  1500. placeHolder_98,
  1501. placeHolder_99,
  1502. gcm3,
  1503. gml,
  1504. ngml,
  1505. placeHolder_103,
  1506. placeHolder_104,
  1507. placeHolder_105,
  1508. placeHolder_106,
  1509. placeHolder_107,
  1510. placeHolder_108,
  1511. placeHolder_109,
  1512. mmHg,
  1513. placeHolder_111,
  1514. placeHolder_112,
  1515. placeHolder_113,
  1516. placeHolder_114,
  1517. placeHolder_115,
  1518. placeHolder_116,
  1519. placeHolder_117,
  1520. placeHolder_118,
  1521. placeHolder_119,
  1522. mV,
  1523. placeHolder_121,
  1524. placeHolder_122,
  1525. placeHolder_123,
  1526. placeHolder_124,
  1527. placeHolder_125,
  1528. placeHolder_126,
  1529. placeHolder_127,
  1530. placeHolder_128,
  1531. placeHolder_129,
  1532. Hz,
  1533. KHz,
  1534. HR,
  1535. placeHolder_133,
  1536. placeHolder_134,
  1537. placeHolder_135,
  1538. placeHolder_136,
  1539. placeHolder_137,
  1540. placeHolder_138,
  1541. placeHolder_139,
  1542. cm3m2,
  1543. mlm2,
  1544. placeHolder_142,
  1545. placeHolder_143,
  1546. placeHolder_144,
  1547. placeHolder_145,
  1548. placeHolder_146,
  1549. placeHolder_147,
  1550. placeHolder_148,
  1551. placeHolder_149,
  1552. cm3sm2,
  1553. mlsm2,
  1554. placeHolder_152,
  1555. cm3minm2,
  1556. mlminm2,
  1557. Lminm2,
  1558. placeHolder_156,
  1559. placeHolder_157,
  1560. placeHolder_158,
  1561. placeHolder_159,
  1562. circs,
  1563. placeHolder_161,
  1564. placeHolder_162,
  1565. placeHolder_163,
  1566. placeHolder_164,
  1567. placeHolder_165,
  1568. placeHolder_166,
  1569. placeHolder_167,
  1570. placeHolder_168,
  1571. placeHolder_169,
  1572. mlbeat,
  1573. placeHolder_171,
  1574. placeHolder_172,
  1575. placeHolder_173,
  1576. placeHolder_174,
  1577. placeHolder_175,
  1578. placeHolder_176,
  1579. placeHolder_177,
  1580. placeHolder_178,
  1581. placeHolder_179,
  1582. mm2pa,
  1583. d1mpa,
  1584. kpa,
  1585. placeHolder_183,
  1586. placeHolder_184,
  1587. placeHolder_185,
  1588. placeHolder_186,
  1589. placeHolder_187,
  1590. placeHolder_188,
  1591. placeHolder_189,
  1592. mmHgs,
  1593. placeHolder_191,
  1594. placeHolder_192,
  1595. placeHolder_193,
  1596. placeHolder_194,
  1597. placeHolder_195,
  1598. placeHolder_196,
  1599. placeHolder_197,
  1600. placeHolder_198,
  1601. placeHolder_199,
  1602. gm2,
  1603. kgm2,
  1604. placeHolder_202,
  1605. placeHolder_203,
  1606. placeHolder_204,
  1607. placeHolder_205,
  1608. placeHolder_206,
  1609. placeHolder_207,
  1610. placeHolder_208,
  1611. placeHolder_209,
  1612. cm2m2,
  1613. placeHolder_211,
  1614. placeHolder_212,
  1615. placeHolder_213,
  1616. placeHolder_214,
  1617. placeHolder_215,
  1618. placeHolder_216,
  1619. placeHolder_217,
  1620. placeHolder_218,
  1621. placeHolder_219,
  1622. cmm2,
  1623. mmm2,
  1624. placeHolder_222,
  1625. placeHolder_223,
  1626. placeHolder_224,
  1627. placeHolder_225,
  1628. placeHolder_226,
  1629. placeHolder_227,
  1630. placeHolder_228,
  1631. placeHolder_229,
  1632. pers,
  1633. placeHolder_231,
  1634. placeHolder_232,
  1635. placeHolder_233,
  1636. placeHolder_234,
  1637. placeHolder_235,
  1638. placeHolder_236,
  1639. placeHolder_237,
  1640. placeHolder_238,
  1641. placeHolder_239,
  1642. placeHolder_240,
  1643. placeHolder_241,
  1644. placeHolder_242,
  1645. placeHolder_243,
  1646. placeHolder_244,
  1647. placeHolder_245,
  1648. placeHolder_246,
  1649. placeHolder_247,
  1650. placeHolder_248,
  1651. placeHolder_249,
  1652. Celsius,
  1653. Fahrenheit,
  1654. placeHolder_252,
  1655. placeHolder_253,
  1656. placeHolder_254,
  1657. placeHolder_255,
  1658. placeHolder_256,
  1659. placeHolder_257,
  1660. placeHolder_258,
  1661. placeHolder_259,
  1662. Ohm,
  1663. placeHolder_261,
  1664. placeHolder_262,
  1665. placeHolder_263,
  1666. placeHolder_264,
  1667. placeHolder_265,
  1668. placeHolder_266,
  1669. placeHolder_267,
  1670. placeHolder_268,
  1671. placeHolder_269,
  1672. mmHgml,
  1673. }
  1674. class MeasureSystemSettingDTO {
  1675. String? version;
  1676. CursorTypeEnum cursorType;
  1677. int cursorSize;
  1678. int shapeCursorSize;
  1679. String? cursorColor;
  1680. bool showResultWindow;
  1681. int showResultLocation;
  1682. int fontSize;
  1683. bool showCursorLine;
  1684. bool holdMeasureLine;
  1685. bool showDepthGuideline;
  1686. bool showBriefAnnotation;
  1687. String? minCursorDistance;
  1688. String? autoSnapDistance;
  1689. int annotationFontSize;
  1690. bool showProtocolInWorkSheet;
  1691. bool showAnnotation;
  1692. Unit distanceUnit;
  1693. Unit areaUnit;
  1694. Unit velocityUnit;
  1695. Unit timeUnit;
  1696. MeasureSystemSettingDTO({
  1697. this.version,
  1698. this.cursorType = CursorTypeEnum.CursorType1Icon,
  1699. this.cursorSize = 0,
  1700. this.shapeCursorSize = 0,
  1701. this.cursorColor,
  1702. this.showResultWindow = false,
  1703. this.showResultLocation = 0,
  1704. this.fontSize = 0,
  1705. this.showCursorLine = false,
  1706. this.holdMeasureLine = false,
  1707. this.showDepthGuideline = false,
  1708. this.showBriefAnnotation = false,
  1709. this.minCursorDistance,
  1710. this.autoSnapDistance,
  1711. this.annotationFontSize = 0,
  1712. this.showProtocolInWorkSheet = false,
  1713. this.showAnnotation = false,
  1714. this.distanceUnit = Unit.None,
  1715. this.areaUnit = Unit.None,
  1716. this.velocityUnit = Unit.None,
  1717. this.timeUnit = Unit.None,
  1718. });
  1719. factory MeasureSystemSettingDTO.fromJson(Map<String, dynamic> map) {
  1720. return MeasureSystemSettingDTO(
  1721. version: map['Version'],
  1722. cursorType: CursorTypeEnum.values.firstWhere((e) => e.index == map['CursorType']),
  1723. cursorSize: map['CursorSize'],
  1724. shapeCursorSize: map['ShapeCursorSize'],
  1725. cursorColor: map['CursorColor'],
  1726. showResultWindow: map['ShowResultWindow'],
  1727. showResultLocation: map['ShowResultLocation'],
  1728. fontSize: map['FontSize'],
  1729. showCursorLine: map['ShowCursorLine'],
  1730. holdMeasureLine: map['HoldMeasureLine'],
  1731. showDepthGuideline: map['ShowDepthGuideline'],
  1732. showBriefAnnotation: map['ShowBriefAnnotation'],
  1733. minCursorDistance: map['MinCursorDistance'],
  1734. autoSnapDistance: map['AutoSnapDistance'],
  1735. annotationFontSize: map['AnnotationFontSize'],
  1736. showProtocolInWorkSheet: map['ShowProtocolInWorkSheet'],
  1737. showAnnotation: map['ShowAnnotation'],
  1738. distanceUnit: Unit.values.firstWhere((e) => e.index == map['DistanceUnit']),
  1739. areaUnit: Unit.values.firstWhere((e) => e.index == map['AreaUnit']),
  1740. velocityUnit: Unit.values.firstWhere((e) => e.index == map['VelocityUnit']),
  1741. timeUnit: Unit.values.firstWhere((e) => e.index == map['TimeUnit']),
  1742. );
  1743. }
  1744. Map<String, dynamic> toJson() {
  1745. final map = Map<String, dynamic>();
  1746. if (version != null) {
  1747. map['Version'] = version;
  1748. }
  1749. map['CursorType'] = cursorType.index;
  1750. map['CursorSize'] = cursorSize;
  1751. map['ShapeCursorSize'] = shapeCursorSize;
  1752. if (cursorColor != null) {
  1753. map['CursorColor'] = cursorColor;
  1754. }
  1755. map['ShowResultWindow'] = showResultWindow;
  1756. map['ShowResultLocation'] = showResultLocation;
  1757. map['FontSize'] = fontSize;
  1758. map['ShowCursorLine'] = showCursorLine;
  1759. map['HoldMeasureLine'] = holdMeasureLine;
  1760. map['ShowDepthGuideline'] = showDepthGuideline;
  1761. map['ShowBriefAnnotation'] = showBriefAnnotation;
  1762. if (minCursorDistance != null) {
  1763. map['MinCursorDistance'] = minCursorDistance;
  1764. }
  1765. if (autoSnapDistance != null) {
  1766. map['AutoSnapDistance'] = autoSnapDistance;
  1767. }
  1768. map['AnnotationFontSize'] = annotationFontSize;
  1769. map['ShowProtocolInWorkSheet'] = showProtocolInWorkSheet;
  1770. map['ShowAnnotation'] = showAnnotation;
  1771. map['DistanceUnit'] = distanceUnit.index;
  1772. map['AreaUnit'] = areaUnit.index;
  1773. map['VelocityUnit'] = velocityUnit.index;
  1774. map['TimeUnit'] = timeUnit.index;
  1775. return map;
  1776. }
  1777. }
  1778. class GetMeasureSystemSettingRequest extends TokenRequest{
  1779. GetMeasureSystemSettingRequest({
  1780. String? token,
  1781. }) : super(
  1782. token: token,
  1783. );
  1784. factory GetMeasureSystemSettingRequest.fromJson(Map<String, dynamic> map) {
  1785. return GetMeasureSystemSettingRequest(
  1786. token: map['Token'],
  1787. );
  1788. }
  1789. Map<String, dynamic> toJson() {
  1790. final map = super.toJson();
  1791. return map;
  1792. }
  1793. }
  1794. class SaveMeasureSystemSettingRequest extends TokenRequest{
  1795. MeasureSystemSettingDTO? systemSetting;
  1796. SaveMeasureSystemSettingRequest({
  1797. this.systemSetting,
  1798. String? token,
  1799. }) : super(
  1800. token: token,
  1801. );
  1802. factory SaveMeasureSystemSettingRequest.fromJson(Map<String, dynamic> map) {
  1803. return SaveMeasureSystemSettingRequest(
  1804. systemSetting: map['SystemSetting'] != null ? MeasureSystemSettingDTO.fromJson(map['SystemSetting']) : null,
  1805. token: map['Token'],
  1806. );
  1807. }
  1808. Map<String, dynamic> toJson() {
  1809. final map = super.toJson();
  1810. if (systemSetting != null)
  1811. map['SystemSetting'] = systemSetting;
  1812. return map;
  1813. }
  1814. }
  1815. enum RecordCreateTypeEnum {
  1816. Reservation,
  1817. Normal,
  1818. }
  1819. class RecordInfoDTO extends BaseDTO{
  1820. String? recordCode;
  1821. String? patientCode;
  1822. String? deviceCode;
  1823. RecordStatusEnum recordStatus;
  1824. String? creatorCode;
  1825. String? tags;
  1826. RecordCreateTypeEnum createType;
  1827. List<DataItemDTO>? patientInfo;
  1828. List<PatientInfoExt>? patientInfoExtList;
  1829. String? devicePatientID;
  1830. String? patientType;
  1831. List<String>? readUsers;
  1832. String? rootOrganizationCode;
  1833. String? organizationCode;
  1834. List<String>? associatedExamCodes;
  1835. DiagnosisStatusEnum diagnosisStatus;
  1836. List<DiagnosisInfoDTO>? diagnosisInfos;
  1837. bool isCollecting;
  1838. DateTime? startCollectingTime;
  1839. bool isUserReport;
  1840. bool isReferral;
  1841. bool isFromDicom;
  1842. String? customDoctor;
  1843. String? customOrganzation;
  1844. String? equipmentSN;
  1845. DateTime? examTime;
  1846. String? deviceExamId;
  1847. bool isImgQualityControlled;
  1848. bool isReportQualityControlled;
  1849. double imgScore;
  1850. double reportScore;
  1851. bool isQualityControlled;
  1852. double score;
  1853. RecordInfoDTO({
  1854. this.recordCode,
  1855. this.patientCode,
  1856. this.deviceCode,
  1857. this.recordStatus = RecordStatusEnum.NotScanned,
  1858. this.creatorCode,
  1859. this.tags,
  1860. this.createType = RecordCreateTypeEnum.Reservation,
  1861. this.patientInfo,
  1862. this.patientInfoExtList,
  1863. this.devicePatientID,
  1864. this.patientType,
  1865. this.readUsers,
  1866. this.rootOrganizationCode,
  1867. this.organizationCode,
  1868. this.associatedExamCodes,
  1869. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  1870. this.diagnosisInfos,
  1871. this.isCollecting = false,
  1872. this.startCollectingTime,
  1873. this.isUserReport = false,
  1874. this.isReferral = false,
  1875. this.isFromDicom = false,
  1876. this.customDoctor,
  1877. this.customOrganzation,
  1878. this.equipmentSN,
  1879. this.examTime,
  1880. this.deviceExamId,
  1881. this.isImgQualityControlled = false,
  1882. this.isReportQualityControlled = false,
  1883. this.imgScore = 0,
  1884. this.reportScore = 0,
  1885. this.isQualityControlled = false,
  1886. this.score = 0,
  1887. DateTime? createTime,
  1888. DateTime? updateTime,
  1889. }) : super(
  1890. createTime: createTime,
  1891. updateTime: updateTime,
  1892. );
  1893. factory RecordInfoDTO.fromJson(Map<String, dynamic> map) {
  1894. return RecordInfoDTO(
  1895. recordCode: map['RecordCode'],
  1896. patientCode: map['PatientCode'],
  1897. deviceCode: map['DeviceCode'],
  1898. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  1899. creatorCode: map['CreatorCode'],
  1900. tags: map['Tags'],
  1901. createType: RecordCreateTypeEnum.values.firstWhere((e) => e.index == map['CreateType']),
  1902. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1903. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  1904. devicePatientID: map['DevicePatientID'],
  1905. patientType: map['PatientType'],
  1906. readUsers: map['ReadUsers']?.cast<String>().toList(),
  1907. rootOrganizationCode: map['RootOrganizationCode'],
  1908. organizationCode: map['OrganizationCode'],
  1909. associatedExamCodes: map['AssociatedExamCodes']?.cast<String>().toList(),
  1910. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  1911. diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1912. isCollecting: map['IsCollecting'],
  1913. startCollectingTime: map['StartCollectingTime'] != null ? DateTime.parse(map['StartCollectingTime']) : null,
  1914. isUserReport: map['IsUserReport'],
  1915. isReferral: map['IsReferral'],
  1916. isFromDicom: map['IsFromDicom'],
  1917. customDoctor: map['CustomDoctor'],
  1918. customOrganzation: map['CustomOrganzation'],
  1919. equipmentSN: map['EquipmentSN'],
  1920. examTime: map['ExamTime'] != null ? DateTime.parse(map['ExamTime']) : null,
  1921. deviceExamId: map['DeviceExamId'],
  1922. isImgQualityControlled: map['IsImgQualityControlled'],
  1923. isReportQualityControlled: map['IsReportQualityControlled'],
  1924. imgScore: double.parse(map['ImgScore'].toString()),
  1925. reportScore: double.parse(map['ReportScore'].toString()),
  1926. isQualityControlled: map['IsQualityControlled'],
  1927. score: double.parse(map['Score'].toString()),
  1928. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1929. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1930. );
  1931. }
  1932. Map<String, dynamic> toJson() {
  1933. final map = super.toJson();
  1934. if (recordCode != null)
  1935. map['RecordCode'] = recordCode;
  1936. if (patientCode != null)
  1937. map['PatientCode'] = patientCode;
  1938. if (deviceCode != null)
  1939. map['DeviceCode'] = deviceCode;
  1940. map['RecordStatus'] = recordStatus.index;
  1941. if (creatorCode != null)
  1942. map['CreatorCode'] = creatorCode;
  1943. if (tags != null)
  1944. map['Tags'] = tags;
  1945. map['CreateType'] = createType.index;
  1946. if (patientInfo != null)
  1947. map['PatientInfo'] = patientInfo;
  1948. if (patientInfoExtList != null)
  1949. map['PatientInfoExtList'] = patientInfoExtList;
  1950. if (devicePatientID != null)
  1951. map['DevicePatientID'] = devicePatientID;
  1952. if (patientType != null)
  1953. map['PatientType'] = patientType;
  1954. if (readUsers != null)
  1955. map['ReadUsers'] = readUsers;
  1956. if (rootOrganizationCode != null)
  1957. map['RootOrganizationCode'] = rootOrganizationCode;
  1958. if (organizationCode != null)
  1959. map['OrganizationCode'] = organizationCode;
  1960. if (associatedExamCodes != null)
  1961. map['AssociatedExamCodes'] = associatedExamCodes;
  1962. map['DiagnosisStatus'] = diagnosisStatus.index;
  1963. if (diagnosisInfos != null)
  1964. map['DiagnosisInfos'] = diagnosisInfos;
  1965. map['IsCollecting'] = isCollecting;
  1966. if (startCollectingTime != null)
  1967. map['StartCollectingTime'] = JsonRpcUtils.dateFormat(startCollectingTime!);
  1968. map['IsUserReport'] = isUserReport;
  1969. map['IsReferral'] = isReferral;
  1970. map['IsFromDicom'] = isFromDicom;
  1971. if (customDoctor != null)
  1972. map['CustomDoctor'] = customDoctor;
  1973. if (customOrganzation != null)
  1974. map['CustomOrganzation'] = customOrganzation;
  1975. if (equipmentSN != null)
  1976. map['EquipmentSN'] = equipmentSN;
  1977. if (examTime != null)
  1978. map['ExamTime'] = JsonRpcUtils.dateFormat(examTime!);
  1979. if (deviceExamId != null)
  1980. map['DeviceExamId'] = deviceExamId;
  1981. map['IsImgQualityControlled'] = isImgQualityControlled;
  1982. map['IsReportQualityControlled'] = isReportQualityControlled;
  1983. map['ImgScore'] = imgScore;
  1984. map['ReportScore'] = reportScore;
  1985. map['IsQualityControlled'] = isQualityControlled;
  1986. map['Score'] = score;
  1987. return map;
  1988. }
  1989. }
  1990. class RecordData {
  1991. String? patientName;
  1992. String? patientCode;
  1993. List<RecordInfoDTO>? recordItemList;
  1994. RecordData({
  1995. this.patientName,
  1996. this.patientCode,
  1997. this.recordItemList,
  1998. });
  1999. factory RecordData.fromJson(Map<String, dynamic> map) {
  2000. return RecordData(
  2001. patientName: map['PatientName'],
  2002. patientCode: map['PatientCode'],
  2003. recordItemList: map['RecordItemList'] != null ? (map['RecordItemList'] as List).map((e)=>RecordInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2004. );
  2005. }
  2006. Map<String, dynamic> toJson() {
  2007. final map = Map<String, dynamic>();
  2008. if (patientName != null) {
  2009. map['PatientName'] = patientName;
  2010. }
  2011. if (patientCode != null) {
  2012. map['PatientCode'] = patientCode;
  2013. }
  2014. if (recordItemList != null) {
  2015. map['RecordItemList'] = recordItemList;
  2016. }
  2017. return map;
  2018. }
  2019. }
  2020. class ReportItem {
  2021. String? recordCode;
  2022. String? reportCode;
  2023. String? fileToken;
  2024. DateTime? createTime;
  2025. DateTime? reportTime;
  2026. ReportItem({
  2027. this.recordCode,
  2028. this.reportCode,
  2029. this.fileToken,
  2030. this.createTime,
  2031. this.reportTime,
  2032. });
  2033. factory ReportItem.fromJson(Map<String, dynamic> map) {
  2034. return ReportItem(
  2035. recordCode: map['RecordCode'],
  2036. reportCode: map['ReportCode'],
  2037. fileToken: map['FileToken'],
  2038. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2039. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2040. );
  2041. }
  2042. Map<String, dynamic> toJson() {
  2043. final map = Map<String, dynamic>();
  2044. if (recordCode != null) {
  2045. map['RecordCode'] = recordCode;
  2046. }
  2047. if (reportCode != null) {
  2048. map['ReportCode'] = reportCode;
  2049. }
  2050. if (fileToken != null) {
  2051. map['FileToken'] = fileToken;
  2052. }
  2053. if (createTime != null) {
  2054. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  2055. }
  2056. if (reportTime != null) {
  2057. map['ReportTime'] = JsonRpcUtils.dateFormat(reportTime!);
  2058. }
  2059. return map;
  2060. }
  2061. }
  2062. class ReportData {
  2063. String? patientName;
  2064. String? patientCode;
  2065. List<ReportItem>? reportItemList;
  2066. ReportData({
  2067. this.patientName,
  2068. this.patientCode,
  2069. this.reportItemList,
  2070. });
  2071. factory ReportData.fromJson(Map<String, dynamic> map) {
  2072. return ReportData(
  2073. patientName: map['PatientName'],
  2074. patientCode: map['PatientCode'],
  2075. reportItemList: map['ReportItemList'] != null ? (map['ReportItemList'] as List).map((e)=>ReportItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  2076. );
  2077. }
  2078. Map<String, dynamic> toJson() {
  2079. final map = Map<String, dynamic>();
  2080. if (patientName != null) {
  2081. map['PatientName'] = patientName;
  2082. }
  2083. if (patientCode != null) {
  2084. map['PatientCode'] = patientCode;
  2085. }
  2086. if (reportItemList != null) {
  2087. map['ReportItemList'] = reportItemList;
  2088. }
  2089. return map;
  2090. }
  2091. }
  2092. class RemedicalItem {
  2093. String? recordCode;
  2094. String? fileToken;
  2095. RemedicalFileDataTypeEnum fileDataType;
  2096. RemedicalItem({
  2097. this.recordCode,
  2098. this.fileToken,
  2099. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  2100. });
  2101. factory RemedicalItem.fromJson(Map<String, dynamic> map) {
  2102. return RemedicalItem(
  2103. recordCode: map['RecordCode'],
  2104. fileToken: map['FileToken'],
  2105. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  2106. );
  2107. }
  2108. Map<String, dynamic> toJson() {
  2109. final map = Map<String, dynamic>();
  2110. if (recordCode != null) {
  2111. map['RecordCode'] = recordCode;
  2112. }
  2113. if (fileToken != null) {
  2114. map['FileToken'] = fileToken;
  2115. }
  2116. map['FileDataType'] = fileDataType.index;
  2117. return map;
  2118. }
  2119. }
  2120. class RemedicalData {
  2121. String? patientName;
  2122. String? patientCode;
  2123. List<RemedicalItem>? remedicalItemList;
  2124. RemedicalData({
  2125. this.patientName,
  2126. this.patientCode,
  2127. this.remedicalItemList,
  2128. });
  2129. factory RemedicalData.fromJson(Map<String, dynamic> map) {
  2130. return RemedicalData(
  2131. patientName: map['PatientName'],
  2132. patientCode: map['PatientCode'],
  2133. remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  2134. );
  2135. }
  2136. Map<String, dynamic> toJson() {
  2137. final map = Map<String, dynamic>();
  2138. if (patientName != null) {
  2139. map['PatientName'] = patientName;
  2140. }
  2141. if (patientCode != null) {
  2142. map['PatientCode'] = patientCode;
  2143. }
  2144. if (remedicalItemList != null) {
  2145. map['RemedicalItemList'] = remedicalItemList;
  2146. }
  2147. return map;
  2148. }
  2149. }
  2150. class ExportRemedicalDataResult {
  2151. List<RecordData>? recordList;
  2152. List<ReportData>? reportList;
  2153. List<RemedicalData>? remedicalList;
  2154. ExportRemedicalDataResult({
  2155. this.recordList,
  2156. this.reportList,
  2157. this.remedicalList,
  2158. });
  2159. factory ExportRemedicalDataResult.fromJson(Map<String, dynamic> map) {
  2160. return ExportRemedicalDataResult(
  2161. recordList: map['RecordList'] != null ? (map['RecordList'] as List).map((e)=>RecordData.fromJson(e as Map<String,dynamic>)).toList() : null,
  2162. reportList: map['ReportList'] != null ? (map['ReportList'] as List).map((e)=>ReportData.fromJson(e as Map<String,dynamic>)).toList() : null,
  2163. remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalData.fromJson(e as Map<String,dynamic>)).toList() : null,
  2164. );
  2165. }
  2166. Map<String, dynamic> toJson() {
  2167. final map = Map<String, dynamic>();
  2168. if (recordList != null) {
  2169. map['RecordList'] = recordList;
  2170. }
  2171. if (reportList != null) {
  2172. map['ReportList'] = reportList;
  2173. }
  2174. if (remedicalList != null) {
  2175. map['RemedicalList'] = remedicalList;
  2176. }
  2177. return map;
  2178. }
  2179. }
  2180. class ExportRemedicalDataRequest extends TokenRequest{
  2181. DateTime? startTime;
  2182. DateTime? endTime;
  2183. bool isExportReport;
  2184. bool isExportRecord;
  2185. bool isExportRemedicalData;
  2186. List<String>? patientCodes;
  2187. String? languageCode;
  2188. ExportRemedicalDataRequest({
  2189. this.startTime,
  2190. this.endTime,
  2191. this.isExportReport = false,
  2192. this.isExportRecord = false,
  2193. this.isExportRemedicalData = false,
  2194. this.patientCodes,
  2195. this.languageCode,
  2196. String? token,
  2197. }) : super(
  2198. token: token,
  2199. );
  2200. factory ExportRemedicalDataRequest.fromJson(Map<String, dynamic> map) {
  2201. return ExportRemedicalDataRequest(
  2202. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  2203. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  2204. isExportReport: map['IsExportReport'],
  2205. isExportRecord: map['IsExportRecord'],
  2206. isExportRemedicalData: map['IsExportRemedicalData'],
  2207. patientCodes: map['PatientCodes']?.cast<String>().toList(),
  2208. languageCode: map['LanguageCode'],
  2209. token: map['Token'],
  2210. );
  2211. }
  2212. Map<String, dynamic> toJson() {
  2213. final map = super.toJson();
  2214. if (startTime != null)
  2215. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  2216. if (endTime != null)
  2217. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  2218. map['IsExportReport'] = isExportReport;
  2219. map['IsExportRecord'] = isExportRecord;
  2220. map['IsExportRemedicalData'] = isExportRemedicalData;
  2221. if (patientCodes != null)
  2222. map['PatientCodes'] = patientCodes;
  2223. if (languageCode != null)
  2224. map['LanguageCode'] = languageCode;
  2225. return map;
  2226. }
  2227. }
  2228. class FindCacheByCodeRequest extends TokenRequest{
  2229. String? cacheCode;
  2230. FindCacheByCodeRequest({
  2231. this.cacheCode,
  2232. String? token,
  2233. }) : super(
  2234. token: token,
  2235. );
  2236. factory FindCacheByCodeRequest.fromJson(Map<String, dynamic> map) {
  2237. return FindCacheByCodeRequest(
  2238. cacheCode: map['CacheCode'],
  2239. token: map['Token'],
  2240. );
  2241. }
  2242. Map<String, dynamic> toJson() {
  2243. final map = super.toJson();
  2244. if (cacheCode != null)
  2245. map['CacheCode'] = cacheCode;
  2246. return map;
  2247. }
  2248. }
  2249. class GetFileCompressInfoResult {
  2250. String? thumbnailUrl;
  2251. String? coverImgUrl;
  2252. ImageLocationDTO? imageLocation;
  2253. int fileSize;
  2254. GetFileCompressInfoResult({
  2255. this.thumbnailUrl,
  2256. this.coverImgUrl,
  2257. this.imageLocation,
  2258. this.fileSize = 0,
  2259. });
  2260. factory GetFileCompressInfoResult.fromJson(Map<String, dynamic> map) {
  2261. return GetFileCompressInfoResult(
  2262. thumbnailUrl: map['ThumbnailUrl'],
  2263. coverImgUrl: map['CoverImgUrl'],
  2264. imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
  2265. fileSize: map['FileSize'],
  2266. );
  2267. }
  2268. Map<String, dynamic> toJson() {
  2269. final map = Map<String, dynamic>();
  2270. if (thumbnailUrl != null) {
  2271. map['ThumbnailUrl'] = thumbnailUrl;
  2272. }
  2273. if (coverImgUrl != null) {
  2274. map['CoverImgUrl'] = coverImgUrl;
  2275. }
  2276. if (imageLocation != null) {
  2277. map['ImageLocation'] = imageLocation;
  2278. }
  2279. map['FileSize'] = fileSize;
  2280. return map;
  2281. }
  2282. }
  2283. class GetFileCompressInfoRequest extends TokenRequest{
  2284. String? fileToken;
  2285. RemedicalFileDataTypeEnum fileDataType;
  2286. bool isNeedThumbnailUrl;
  2287. bool isNeedCoverImg;
  2288. bool isNeedLocation;
  2289. GetFileCompressInfoRequest({
  2290. this.fileToken,
  2291. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  2292. this.isNeedThumbnailUrl = false,
  2293. this.isNeedCoverImg = false,
  2294. this.isNeedLocation = false,
  2295. String? token,
  2296. }) : super(
  2297. token: token,
  2298. );
  2299. factory GetFileCompressInfoRequest.fromJson(Map<String, dynamic> map) {
  2300. return GetFileCompressInfoRequest(
  2301. fileToken: map['FileToken'],
  2302. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  2303. isNeedThumbnailUrl: map['IsNeedThumbnailUrl'],
  2304. isNeedCoverImg: map['IsNeedCoverImg'],
  2305. isNeedLocation: map['IsNeedLocation'],
  2306. token: map['Token'],
  2307. );
  2308. }
  2309. Map<String, dynamic> toJson() {
  2310. final map = super.toJson();
  2311. if (fileToken != null)
  2312. map['FileToken'] = fileToken;
  2313. map['FileDataType'] = fileDataType.index;
  2314. map['IsNeedThumbnailUrl'] = isNeedThumbnailUrl;
  2315. map['IsNeedCoverImg'] = isNeedCoverImg;
  2316. map['IsNeedLocation'] = isNeedLocation;
  2317. return map;
  2318. }
  2319. }
  2320. class CreateReferralRecordRequest extends TokenRequest{
  2321. String? patientCode;
  2322. String? subjectMatter;
  2323. String? referralOrganizationCode;
  2324. String? referralUserCode;
  2325. String? referralRecordCode;
  2326. CreateReferralRecordRequest({
  2327. this.patientCode,
  2328. this.subjectMatter,
  2329. this.referralOrganizationCode,
  2330. this.referralUserCode,
  2331. this.referralRecordCode,
  2332. String? token,
  2333. }) : super(
  2334. token: token,
  2335. );
  2336. factory CreateReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2337. return CreateReferralRecordRequest(
  2338. patientCode: map['PatientCode'],
  2339. subjectMatter: map['SubjectMatter'],
  2340. referralOrganizationCode: map['ReferralOrganizationCode'],
  2341. referralUserCode: map['ReferralUserCode'],
  2342. referralRecordCode: map['ReferralRecordCode'],
  2343. token: map['Token'],
  2344. );
  2345. }
  2346. Map<String, dynamic> toJson() {
  2347. final map = super.toJson();
  2348. if (patientCode != null)
  2349. map['PatientCode'] = patientCode;
  2350. if (subjectMatter != null)
  2351. map['SubjectMatter'] = subjectMatter;
  2352. if (referralOrganizationCode != null)
  2353. map['ReferralOrganizationCode'] = referralOrganizationCode;
  2354. if (referralUserCode != null)
  2355. map['ReferralUserCode'] = referralUserCode;
  2356. if (referralRecordCode != null)
  2357. map['ReferralRecordCode'] = referralRecordCode;
  2358. return map;
  2359. }
  2360. }
  2361. class ModifyReferralRecordRequest extends TokenRequest{
  2362. String? patientCode;
  2363. String? subjectMatter;
  2364. String? referralOrganizationCode;
  2365. String? referralUserCode;
  2366. String? referralRecordCode;
  2367. ModifyReferralRecordRequest({
  2368. this.patientCode,
  2369. this.subjectMatter,
  2370. this.referralOrganizationCode,
  2371. this.referralUserCode,
  2372. this.referralRecordCode,
  2373. String? token,
  2374. }) : super(
  2375. token: token,
  2376. );
  2377. factory ModifyReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2378. return ModifyReferralRecordRequest(
  2379. patientCode: map['PatientCode'],
  2380. subjectMatter: map['SubjectMatter'],
  2381. referralOrganizationCode: map['ReferralOrganizationCode'],
  2382. referralUserCode: map['ReferralUserCode'],
  2383. referralRecordCode: map['ReferralRecordCode'],
  2384. token: map['Token'],
  2385. );
  2386. }
  2387. Map<String, dynamic> toJson() {
  2388. final map = super.toJson();
  2389. if (patientCode != null)
  2390. map['PatientCode'] = patientCode;
  2391. if (subjectMatter != null)
  2392. map['SubjectMatter'] = subjectMatter;
  2393. if (referralOrganizationCode != null)
  2394. map['ReferralOrganizationCode'] = referralOrganizationCode;
  2395. if (referralUserCode != null)
  2396. map['ReferralUserCode'] = referralUserCode;
  2397. if (referralRecordCode != null)
  2398. map['ReferralRecordCode'] = referralRecordCode;
  2399. return map;
  2400. }
  2401. }
  2402. class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{
  2403. String? code;
  2404. String? outUserName;
  2405. String? inUserName;
  2406. QueryReferralRecordPageDTO({
  2407. this.code,
  2408. this.outUserName,
  2409. this.inUserName,
  2410. String? patientCode,
  2411. bool isValid = false,
  2412. List<DataItemDTO>? patientData,
  2413. int unReadRecordCount = 0,
  2414. bool isReferral = false,
  2415. List<String>? devicePatientIDs,
  2416. String? organizationCode,
  2417. String? organizationName,
  2418. DateTime? createTime,
  2419. DateTime? updateTime,
  2420. }) : super(
  2421. patientCode: patientCode,
  2422. isValid: isValid,
  2423. patientData: patientData,
  2424. unReadRecordCount: unReadRecordCount,
  2425. isReferral: isReferral,
  2426. devicePatientIDs: devicePatientIDs,
  2427. organizationCode: organizationCode,
  2428. organizationName: organizationName,
  2429. createTime: createTime,
  2430. updateTime: updateTime,
  2431. );
  2432. factory QueryReferralRecordPageDTO.fromJson(Map<String, dynamic> map) {
  2433. return QueryReferralRecordPageDTO(
  2434. code: map['Code'],
  2435. outUserName: map['OutUserName'],
  2436. inUserName: map['InUserName'],
  2437. patientCode: map['PatientCode'],
  2438. isValid: map['IsValid'],
  2439. patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2440. unReadRecordCount: map['UnReadRecordCount'],
  2441. isReferral: map['IsReferral'],
  2442. devicePatientIDs: map['DevicePatientIDs']?.cast<String>().toList(),
  2443. organizationCode: map['OrganizationCode'],
  2444. organizationName: map['OrganizationName'],
  2445. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2446. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2447. );
  2448. }
  2449. Map<String, dynamic> toJson() {
  2450. final map = super.toJson();
  2451. if (code != null)
  2452. map['Code'] = code;
  2453. if (outUserName != null)
  2454. map['OutUserName'] = outUserName;
  2455. if (inUserName != null)
  2456. map['InUserName'] = inUserName;
  2457. return map;
  2458. }
  2459. }
  2460. class QueryReferralRecordListRequest extends PageRequest{
  2461. String? keyWord;
  2462. DateTime? startTime;
  2463. DateTime? endTime;
  2464. PatientValidStatusEnum isValid;
  2465. QueryReferralRecordListRequest({
  2466. this.keyWord,
  2467. this.startTime,
  2468. this.endTime,
  2469. this.isValid = PatientValidStatusEnum.All,
  2470. int pageIndex = 0,
  2471. int pageSize = 0,
  2472. String? token,
  2473. }) : super(
  2474. pageIndex: pageIndex,
  2475. pageSize: pageSize,
  2476. token: token,
  2477. );
  2478. factory QueryReferralRecordListRequest.fromJson(Map<String, dynamic> map) {
  2479. return QueryReferralRecordListRequest(
  2480. keyWord: map['KeyWord'],
  2481. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  2482. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  2483. isValid: PatientValidStatusEnum.values.firstWhere((e) => e.index == map['IsValid']),
  2484. pageIndex: map['PageIndex'],
  2485. pageSize: map['PageSize'],
  2486. token: map['Token'],
  2487. );
  2488. }
  2489. Map<String, dynamic> toJson() {
  2490. final map = super.toJson();
  2491. if (keyWord != null)
  2492. map['KeyWord'] = keyWord;
  2493. if (startTime != null)
  2494. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  2495. if (endTime != null)
  2496. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  2497. map['IsValid'] = isValid.index;
  2498. return map;
  2499. }
  2500. }
  2501. class AuditReferralRecordRequest extends TokenRequest{
  2502. String? referralRecordCode;
  2503. bool isReceive;
  2504. String? rejectReason;
  2505. AuditReferralRecordRequest({
  2506. this.referralRecordCode,
  2507. this.isReceive = false,
  2508. this.rejectReason,
  2509. String? token,
  2510. }) : super(
  2511. token: token,
  2512. );
  2513. factory AuditReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2514. return AuditReferralRecordRequest(
  2515. referralRecordCode: map['ReferralRecordCode'],
  2516. isReceive: map['IsReceive'],
  2517. rejectReason: map['RejectReason'],
  2518. token: map['Token'],
  2519. );
  2520. }
  2521. Map<String, dynamic> toJson() {
  2522. final map = super.toJson();
  2523. if (referralRecordCode != null)
  2524. map['ReferralRecordCode'] = referralRecordCode;
  2525. map['IsReceive'] = isReceive;
  2526. if (rejectReason != null)
  2527. map['RejectReason'] = rejectReason;
  2528. return map;
  2529. }
  2530. }
  2531. class WithdrawReferralRecordRequest extends TokenRequest{
  2532. String? referralRecordCode;
  2533. WithdrawReferralRecordRequest({
  2534. this.referralRecordCode,
  2535. String? token,
  2536. }) : super(
  2537. token: token,
  2538. );
  2539. factory WithdrawReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2540. return WithdrawReferralRecordRequest(
  2541. referralRecordCode: map['ReferralRecordCode'],
  2542. token: map['Token'],
  2543. );
  2544. }
  2545. Map<String, dynamic> toJson() {
  2546. final map = super.toJson();
  2547. if (referralRecordCode != null)
  2548. map['ReferralRecordCode'] = referralRecordCode;
  2549. return map;
  2550. }
  2551. }
  2552. class ReferralOrganizationsQueryRequest extends TokenRequest{
  2553. String? keyword;
  2554. ReferralOrganizationsQueryRequest({
  2555. this.keyword,
  2556. String? token,
  2557. }) : super(
  2558. token: token,
  2559. );
  2560. factory ReferralOrganizationsQueryRequest.fromJson(Map<String, dynamic> map) {
  2561. return ReferralOrganizationsQueryRequest(
  2562. keyword: map['Keyword'],
  2563. token: map['Token'],
  2564. );
  2565. }
  2566. Map<String, dynamic> toJson() {
  2567. final map = super.toJson();
  2568. if (keyword != null)
  2569. map['Keyword'] = keyword;
  2570. return map;
  2571. }
  2572. }
  2573. class QueryReferralPatientByCodeRequest extends FindPatientByCodeRequest{
  2574. String? referralRecordCode;
  2575. QueryReferralPatientByCodeRequest({
  2576. this.referralRecordCode,
  2577. String? code,
  2578. String? token,
  2579. }) : super(
  2580. code: code,
  2581. token: token,
  2582. );
  2583. factory QueryReferralPatientByCodeRequest.fromJson(Map<String, dynamic> map) {
  2584. return QueryReferralPatientByCodeRequest(
  2585. referralRecordCode: map['ReferralRecordCode'],
  2586. code: map['Code'],
  2587. token: map['Token'],
  2588. );
  2589. }
  2590. Map<String, dynamic> toJson() {
  2591. final map = super.toJson();
  2592. if (referralRecordCode != null)
  2593. map['ReferralRecordCode'] = referralRecordCode;
  2594. return map;
  2595. }
  2596. }
  2597. class CreateReportClass {
  2598. String? referralCode;
  2599. String? creatorCode;
  2600. String? reportCode;
  2601. CreateReportClass({
  2602. this.referralCode,
  2603. this.creatorCode,
  2604. this.reportCode,
  2605. });
  2606. factory CreateReportClass.fromJson(Map<String, dynamic> map) {
  2607. return CreateReportClass(
  2608. referralCode: map['ReferralCode'],
  2609. creatorCode: map['CreatorCode'],
  2610. reportCode: map['ReportCode'],
  2611. );
  2612. }
  2613. Map<String, dynamic> toJson() {
  2614. final map = Map<String, dynamic>();
  2615. if (referralCode != null) {
  2616. map['ReferralCode'] = referralCode;
  2617. }
  2618. if (creatorCode != null) {
  2619. map['CreatorCode'] = creatorCode;
  2620. }
  2621. if (reportCode != null) {
  2622. map['ReportCode'] = reportCode;
  2623. }
  2624. return map;
  2625. }
  2626. }
  2627. class ReferralRecordDTO extends BaseDTO{
  2628. String? code;
  2629. String? patientCode;
  2630. DateTime? referralOutTime;
  2631. String? referralOutOrganizationCode;
  2632. String? subjectMatter;
  2633. String? creator;
  2634. String? referralInOrganizationCode;
  2635. String? referralInUserCode;
  2636. ReferralStatusEnum referralStatus;
  2637. String? rejectReason;
  2638. List<String>? referralCodeList;
  2639. PatientInfoDTO? patientInfo;
  2640. List<String>? recordCodeList;
  2641. List<String>? reportCodeList;
  2642. List<String>? remedicalDataCodeList;
  2643. List<CreateReportClass>? createReportCodeList;
  2644. ReferralRecordDTO({
  2645. this.code,
  2646. this.patientCode,
  2647. this.referralOutTime,
  2648. this.referralOutOrganizationCode,
  2649. this.subjectMatter,
  2650. this.creator,
  2651. this.referralInOrganizationCode,
  2652. this.referralInUserCode,
  2653. this.referralStatus = ReferralStatusEnum.Wait,
  2654. this.rejectReason,
  2655. this.referralCodeList,
  2656. this.patientInfo,
  2657. this.recordCodeList,
  2658. this.reportCodeList,
  2659. this.remedicalDataCodeList,
  2660. this.createReportCodeList,
  2661. DateTime? createTime,
  2662. DateTime? updateTime,
  2663. }) : super(
  2664. createTime: createTime,
  2665. updateTime: updateTime,
  2666. );
  2667. factory ReferralRecordDTO.fromJson(Map<String, dynamic> map) {
  2668. return ReferralRecordDTO(
  2669. code: map['Code'],
  2670. patientCode: map['PatientCode'],
  2671. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2672. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2673. subjectMatter: map['SubjectMatter'],
  2674. creator: map['Creator'],
  2675. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2676. referralInUserCode: map['ReferralInUserCode'],
  2677. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2678. rejectReason: map['RejectReason'],
  2679. referralCodeList: map['ReferralCodeList']?.cast<String>().toList(),
  2680. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2681. recordCodeList: map['RecordCodeList']?.cast<String>().toList(),
  2682. reportCodeList: map['ReportCodeList']?.cast<String>().toList(),
  2683. remedicalDataCodeList: map['RemedicalDataCodeList']?.cast<String>().toList(),
  2684. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2685. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2686. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2687. );
  2688. }
  2689. Map<String, dynamic> toJson() {
  2690. final map = super.toJson();
  2691. if (code != null)
  2692. map['Code'] = code;
  2693. if (patientCode != null)
  2694. map['PatientCode'] = patientCode;
  2695. if (referralOutTime != null)
  2696. map['ReferralOutTime'] = JsonRpcUtils.dateFormat(referralOutTime!);
  2697. if (referralOutOrganizationCode != null)
  2698. map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
  2699. if (subjectMatter != null)
  2700. map['SubjectMatter'] = subjectMatter;
  2701. if (creator != null)
  2702. map['Creator'] = creator;
  2703. if (referralInOrganizationCode != null)
  2704. map['ReferralInOrganizationCode'] = referralInOrganizationCode;
  2705. if (referralInUserCode != null)
  2706. map['ReferralInUserCode'] = referralInUserCode;
  2707. map['ReferralStatus'] = referralStatus.index;
  2708. if (rejectReason != null)
  2709. map['RejectReason'] = rejectReason;
  2710. if (referralCodeList != null)
  2711. map['ReferralCodeList'] = referralCodeList;
  2712. if (patientInfo != null)
  2713. map['PatientInfo'] = patientInfo;
  2714. if (recordCodeList != null)
  2715. map['RecordCodeList'] = recordCodeList;
  2716. if (reportCodeList != null)
  2717. map['ReportCodeList'] = reportCodeList;
  2718. if (remedicalDataCodeList != null)
  2719. map['RemedicalDataCodeList'] = remedicalDataCodeList;
  2720. if (createReportCodeList != null)
  2721. map['CreateReportCodeList'] = createReportCodeList;
  2722. return map;
  2723. }
  2724. }
  2725. class ReferralRecordDetailDTO extends ReferralRecordDTO{
  2726. String? referralOutOrganizationName;
  2727. String? creatorName;
  2728. String? referralInOrganizationName;
  2729. String? referralInUserName;
  2730. ReferralRecordDetailDTO({
  2731. this.referralOutOrganizationName,
  2732. this.creatorName,
  2733. this.referralInOrganizationName,
  2734. this.referralInUserName,
  2735. String? code,
  2736. String? patientCode,
  2737. DateTime? referralOutTime,
  2738. String? referralOutOrganizationCode,
  2739. String? subjectMatter,
  2740. String? creator,
  2741. String? referralInOrganizationCode,
  2742. String? referralInUserCode,
  2743. ReferralStatusEnum referralStatus = ReferralStatusEnum.Wait,
  2744. String? rejectReason,
  2745. List<String>? referralCodeList,
  2746. PatientInfoDTO? patientInfo,
  2747. List<String>? recordCodeList,
  2748. List<String>? reportCodeList,
  2749. List<String>? remedicalDataCodeList,
  2750. List<CreateReportClass>? createReportCodeList,
  2751. DateTime? createTime,
  2752. DateTime? updateTime,
  2753. }) : super(
  2754. code: code,
  2755. patientCode: patientCode,
  2756. referralOutTime: referralOutTime,
  2757. referralOutOrganizationCode: referralOutOrganizationCode,
  2758. subjectMatter: subjectMatter,
  2759. creator: creator,
  2760. referralInOrganizationCode: referralInOrganizationCode,
  2761. referralInUserCode: referralInUserCode,
  2762. referralStatus: referralStatus,
  2763. rejectReason: rejectReason,
  2764. referralCodeList: referralCodeList,
  2765. patientInfo: patientInfo,
  2766. recordCodeList: recordCodeList,
  2767. reportCodeList: reportCodeList,
  2768. remedicalDataCodeList: remedicalDataCodeList,
  2769. createReportCodeList: createReportCodeList,
  2770. createTime: createTime,
  2771. updateTime: updateTime,
  2772. );
  2773. factory ReferralRecordDetailDTO.fromJson(Map<String, dynamic> map) {
  2774. return ReferralRecordDetailDTO(
  2775. referralOutOrganizationName: map['ReferralOutOrganizationName'],
  2776. creatorName: map['CreatorName'],
  2777. referralInOrganizationName: map['ReferralInOrganizationName'],
  2778. referralInUserName: map['ReferralInUserName'],
  2779. code: map['Code'],
  2780. patientCode: map['PatientCode'],
  2781. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2782. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2783. subjectMatter: map['SubjectMatter'],
  2784. creator: map['Creator'],
  2785. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2786. referralInUserCode: map['ReferralInUserCode'],
  2787. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2788. rejectReason: map['RejectReason'],
  2789. referralCodeList: map['ReferralCodeList']?.cast<String>().toList(),
  2790. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2791. recordCodeList: map['RecordCodeList']?.cast<String>().toList(),
  2792. reportCodeList: map['ReportCodeList']?.cast<String>().toList(),
  2793. remedicalDataCodeList: map['RemedicalDataCodeList']?.cast<String>().toList(),
  2794. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2795. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2796. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2797. );
  2798. }
  2799. Map<String, dynamic> toJson() {
  2800. final map = super.toJson();
  2801. if (referralOutOrganizationName != null)
  2802. map['ReferralOutOrganizationName'] = referralOutOrganizationName;
  2803. if (creatorName != null)
  2804. map['CreatorName'] = creatorName;
  2805. if (referralInOrganizationName != null)
  2806. map['ReferralInOrganizationName'] = referralInOrganizationName;
  2807. if (referralInUserName != null)
  2808. map['ReferralInUserName'] = referralInUserName;
  2809. return map;
  2810. }
  2811. }
  2812. class FindPatientReferralRecordRequest extends TokenRequest{
  2813. String? patientCode;
  2814. FindPatientReferralRecordRequest({
  2815. this.patientCode,
  2816. String? token,
  2817. }) : super(
  2818. token: token,
  2819. );
  2820. factory FindPatientReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2821. return FindPatientReferralRecordRequest(
  2822. patientCode: map['PatientCode'],
  2823. token: map['Token'],
  2824. );
  2825. }
  2826. Map<String, dynamic> toJson() {
  2827. final map = super.toJson();
  2828. if (patientCode != null)
  2829. map['PatientCode'] = patientCode;
  2830. return map;
  2831. }
  2832. }
  2833. class FindReferralInRecordRequest extends TokenRequest{
  2834. String? referralRecordCode;
  2835. FindReferralInRecordRequest({
  2836. this.referralRecordCode,
  2837. String? token,
  2838. }) : super(
  2839. token: token,
  2840. );
  2841. factory FindReferralInRecordRequest.fromJson(Map<String, dynamic> map) {
  2842. return FindReferralInRecordRequest(
  2843. referralRecordCode: map['ReferralRecordCode'],
  2844. token: map['Token'],
  2845. );
  2846. }
  2847. Map<String, dynamic> toJson() {
  2848. final map = super.toJson();
  2849. if (referralRecordCode != null)
  2850. map['ReferralRecordCode'] = referralRecordCode;
  2851. return map;
  2852. }
  2853. }
  2854. class QueryReferralRecordsPageRequest extends GetRecordsPageRequest{
  2855. String? referralRecordCode;
  2856. QueryReferralRecordsPageRequest({
  2857. this.referralRecordCode,
  2858. String? patientCode,
  2859. QueryRecordStatusEnum queryRecordStatus = QueryRecordStatusEnum.All,
  2860. QueryRecordCreateTypeEnum queryRecordCreateType = QueryRecordCreateTypeEnum.All,
  2861. int pageIndex = 0,
  2862. int pageSize = 0,
  2863. String? token,
  2864. }) : super(
  2865. patientCode: patientCode,
  2866. queryRecordStatus: queryRecordStatus,
  2867. queryRecordCreateType: queryRecordCreateType,
  2868. pageIndex: pageIndex,
  2869. pageSize: pageSize,
  2870. token: token,
  2871. );
  2872. factory QueryReferralRecordsPageRequest.fromJson(Map<String, dynamic> map) {
  2873. return QueryReferralRecordsPageRequest(
  2874. referralRecordCode: map['ReferralRecordCode'],
  2875. patientCode: map['PatientCode'],
  2876. queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
  2877. queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
  2878. pageIndex: map['PageIndex'],
  2879. pageSize: map['PageSize'],
  2880. token: map['Token'],
  2881. );
  2882. }
  2883. Map<String, dynamic> toJson() {
  2884. final map = super.toJson();
  2885. if (referralRecordCode != null)
  2886. map['ReferralRecordCode'] = referralRecordCode;
  2887. return map;
  2888. }
  2889. }
  2890. class ReportPreviewDTO {
  2891. String? fileToken;
  2892. String? thumbnailToken;
  2893. String? language;
  2894. UploadFileTypeEnum fileType;
  2895. ReportPreviewDTO({
  2896. this.fileToken,
  2897. this.thumbnailToken,
  2898. this.language,
  2899. this.fileType = UploadFileTypeEnum.Unknown,
  2900. });
  2901. factory ReportPreviewDTO.fromJson(Map<String, dynamic> map) {
  2902. return ReportPreviewDTO(
  2903. fileToken: map['FileToken'],
  2904. thumbnailToken: map['ThumbnailToken'],
  2905. language: map['Language'],
  2906. fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
  2907. );
  2908. }
  2909. Map<String, dynamic> toJson() {
  2910. final map = Map<String, dynamic>();
  2911. if (fileToken != null) {
  2912. map['FileToken'] = fileToken;
  2913. }
  2914. if (thumbnailToken != null) {
  2915. map['ThumbnailToken'] = thumbnailToken;
  2916. }
  2917. if (language != null) {
  2918. map['Language'] = language;
  2919. }
  2920. map['FileType'] = fileType.index;
  2921. return map;
  2922. }
  2923. }
  2924. enum ReportTypeEnum {
  2925. RemoteDiagnosis,
  2926. LiveConsultation,
  2927. }
  2928. class ReportBaseDTO extends BaseDTO{
  2929. String? reportCode;
  2930. String? recordCode;
  2931. String? reportUserCode;
  2932. String? deviceCode;
  2933. String? patientCode;
  2934. String? patientId;
  2935. String? patientName;
  2936. List<String>? reportLabels;
  2937. List<String>? platformLabels;
  2938. List<String>? diagnosisLabels;
  2939. DiagnosisOrganEnum reportOrgan;
  2940. DateTime? reportTime;
  2941. String? reportUserName;
  2942. List<ReportPreviewDTO>? reportPreviewList;
  2943. String? referralRecordCode;
  2944. ReportTypeEnum reportType;
  2945. bool isReferral;
  2946. QualityType qualityType;
  2947. QualifiedState qualifiedState;
  2948. ReportQualityControl? qualityControlDatas;
  2949. bool isQualityControlled;
  2950. ReportBaseDTO({
  2951. this.reportCode,
  2952. this.recordCode,
  2953. this.reportUserCode,
  2954. this.deviceCode,
  2955. this.patientCode,
  2956. this.patientId,
  2957. this.patientName,
  2958. this.reportLabels,
  2959. this.platformLabels,
  2960. this.diagnosisLabels,
  2961. this.reportOrgan = DiagnosisOrganEnum.Null,
  2962. this.reportTime,
  2963. this.reportUserName,
  2964. this.reportPreviewList,
  2965. this.referralRecordCode,
  2966. this.reportType = ReportTypeEnum.RemoteDiagnosis,
  2967. this.isReferral = false,
  2968. this.qualityType = QualityType.None,
  2969. this.qualifiedState = QualifiedState.UnSet,
  2970. this.qualityControlDatas,
  2971. this.isQualityControlled = false,
  2972. DateTime? createTime,
  2973. DateTime? updateTime,
  2974. }) : super(
  2975. createTime: createTime,
  2976. updateTime: updateTime,
  2977. );
  2978. factory ReportBaseDTO.fromJson(Map<String, dynamic> map) {
  2979. return ReportBaseDTO(
  2980. reportCode: map['ReportCode'],
  2981. recordCode: map['RecordCode'],
  2982. reportUserCode: map['ReportUserCode'],
  2983. deviceCode: map['DeviceCode'],
  2984. patientCode: map['PatientCode'],
  2985. patientId: map['PatientId'],
  2986. patientName: map['PatientName'],
  2987. reportLabels: map['ReportLabels']?.cast<String>().toList(),
  2988. platformLabels: map['PlatformLabels']?.cast<String>().toList(),
  2989. diagnosisLabels: map['DiagnosisLabels']?.cast<String>().toList(),
  2990. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2991. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2992. reportUserName: map['ReportUserName'],
  2993. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2994. referralRecordCode: map['ReferralRecordCode'],
  2995. reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
  2996. isReferral: map['IsReferral'],
  2997. qualityType: QualityType.values.firstWhere((e) => e.index == map['QualityType']),
  2998. qualifiedState: QualifiedState.values.firstWhere((e) => e.index == map['QualifiedState']),
  2999. qualityControlDatas: map['QualityControlDatas'] != null ? ReportQualityControl.fromJson(map['QualityControlDatas']) : null,
  3000. isQualityControlled: map['IsQualityControlled'],
  3001. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3002. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3003. );
  3004. }
  3005. Map<String, dynamic> toJson() {
  3006. final map = super.toJson();
  3007. if (reportCode != null)
  3008. map['ReportCode'] = reportCode;
  3009. if (recordCode != null)
  3010. map['RecordCode'] = recordCode;
  3011. if (reportUserCode != null)
  3012. map['ReportUserCode'] = reportUserCode;
  3013. if (deviceCode != null)
  3014. map['DeviceCode'] = deviceCode;
  3015. if (patientCode != null)
  3016. map['PatientCode'] = patientCode;
  3017. if (patientId != null)
  3018. map['PatientId'] = patientId;
  3019. if (patientName != null)
  3020. map['PatientName'] = patientName;
  3021. if (reportLabels != null)
  3022. map['ReportLabels'] = reportLabels;
  3023. if (platformLabels != null)
  3024. map['PlatformLabels'] = platformLabels;
  3025. if (diagnosisLabels != null)
  3026. map['DiagnosisLabels'] = diagnosisLabels;
  3027. map['ReportOrgan'] = reportOrgan.index;
  3028. if (reportTime != null)
  3029. map['ReportTime'] = JsonRpcUtils.dateFormat(reportTime!);
  3030. if (reportUserName != null)
  3031. map['ReportUserName'] = reportUserName;
  3032. if (reportPreviewList != null)
  3033. map['ReportPreviewList'] = reportPreviewList;
  3034. if (referralRecordCode != null)
  3035. map['ReferralRecordCode'] = referralRecordCode;
  3036. map['ReportType'] = reportType.index;
  3037. map['IsReferral'] = isReferral;
  3038. map['QualityType'] = qualityType.index;
  3039. map['QualifiedState'] = qualifiedState.index;
  3040. if (qualityControlDatas != null)
  3041. map['QualityControlDatas'] = qualityControlDatas;
  3042. map['IsQualityControlled'] = isQualityControlled;
  3043. return map;
  3044. }
  3045. }
  3046. class ReportDTO extends ReportBaseDTO{
  3047. String? reportTemplateJson;
  3048. String? reportDatasJson;
  3049. String? reportMeasureDatasJson;
  3050. String? encryptPatientName;
  3051. bool canEditReport;
  3052. String? deviceName;
  3053. String? reportTemplateName;
  3054. String? reportTemplateCode;
  3055. DateTime? examDate;
  3056. ReportDTO({
  3057. this.reportTemplateJson,
  3058. this.reportDatasJson,
  3059. this.reportMeasureDatasJson,
  3060. this.encryptPatientName,
  3061. this.canEditReport = false,
  3062. this.deviceName,
  3063. this.reportTemplateName,
  3064. this.reportTemplateCode,
  3065. this.examDate,
  3066. String? reportCode,
  3067. String? recordCode,
  3068. String? reportUserCode,
  3069. String? deviceCode,
  3070. String? patientCode,
  3071. String? patientId,
  3072. String? patientName,
  3073. List<String>? reportLabels,
  3074. List<String>? platformLabels,
  3075. List<String>? diagnosisLabels,
  3076. DiagnosisOrganEnum reportOrgan = DiagnosisOrganEnum.Null,
  3077. DateTime? reportTime,
  3078. String? reportUserName,
  3079. List<ReportPreviewDTO>? reportPreviewList,
  3080. String? referralRecordCode,
  3081. ReportTypeEnum reportType = ReportTypeEnum.RemoteDiagnosis,
  3082. bool isReferral = false,
  3083. QualityType qualityType = QualityType.None,
  3084. QualifiedState qualifiedState = QualifiedState.UnSet,
  3085. ReportQualityControl? qualityControlDatas,
  3086. bool isQualityControlled = false,
  3087. DateTime? createTime,
  3088. DateTime? updateTime,
  3089. }) : super(
  3090. reportCode: reportCode,
  3091. recordCode: recordCode,
  3092. reportUserCode: reportUserCode,
  3093. deviceCode: deviceCode,
  3094. patientCode: patientCode,
  3095. patientId: patientId,
  3096. patientName: patientName,
  3097. reportLabels: reportLabels,
  3098. platformLabels: platformLabels,
  3099. diagnosisLabels: diagnosisLabels,
  3100. reportOrgan: reportOrgan,
  3101. reportTime: reportTime,
  3102. reportUserName: reportUserName,
  3103. reportPreviewList: reportPreviewList,
  3104. referralRecordCode: referralRecordCode,
  3105. reportType: reportType,
  3106. isReferral: isReferral,
  3107. qualityType: qualityType,
  3108. qualifiedState: qualifiedState,
  3109. qualityControlDatas: qualityControlDatas,
  3110. isQualityControlled: isQualityControlled,
  3111. createTime: createTime,
  3112. updateTime: updateTime,
  3113. );
  3114. factory ReportDTO.fromJson(Map<String, dynamic> map) {
  3115. return ReportDTO(
  3116. reportTemplateJson: map['ReportTemplateJson'],
  3117. reportDatasJson: map['ReportDatasJson'],
  3118. reportMeasureDatasJson: map['ReportMeasureDatasJson'],
  3119. encryptPatientName: map['EncryptPatientName'],
  3120. canEditReport: map['CanEditReport'],
  3121. deviceName: map['DeviceName'],
  3122. reportTemplateName: map['ReportTemplateName'],
  3123. reportTemplateCode: map['ReportTemplateCode'],
  3124. examDate: map['ExamDate'] != null ? DateTime.parse(map['ExamDate']) : null,
  3125. reportCode: map['ReportCode'],
  3126. recordCode: map['RecordCode'],
  3127. reportUserCode: map['ReportUserCode'],
  3128. deviceCode: map['DeviceCode'],
  3129. patientCode: map['PatientCode'],
  3130. patientId: map['PatientId'],
  3131. patientName: map['PatientName'],
  3132. reportLabels: map['ReportLabels']?.cast<String>().toList(),
  3133. platformLabels: map['PlatformLabels']?.cast<String>().toList(),
  3134. diagnosisLabels: map['DiagnosisLabels']?.cast<String>().toList(),
  3135. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  3136. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  3137. reportUserName: map['ReportUserName'],
  3138. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3139. referralRecordCode: map['ReferralRecordCode'],
  3140. reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
  3141. isReferral: map['IsReferral'],
  3142. qualityType: QualityType.values.firstWhere((e) => e.index == map['QualityType']),
  3143. qualifiedState: QualifiedState.values.firstWhere((e) => e.index == map['QualifiedState']),
  3144. qualityControlDatas: map['QualityControlDatas'] != null ? ReportQualityControl.fromJson(map['QualityControlDatas']) : null,
  3145. isQualityControlled: map['IsQualityControlled'],
  3146. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3147. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3148. );
  3149. }
  3150. Map<String, dynamic> toJson() {
  3151. final map = super.toJson();
  3152. if (reportTemplateJson != null)
  3153. map['ReportTemplateJson'] = reportTemplateJson;
  3154. if (reportDatasJson != null)
  3155. map['ReportDatasJson'] = reportDatasJson;
  3156. if (reportMeasureDatasJson != null)
  3157. map['ReportMeasureDatasJson'] = reportMeasureDatasJson;
  3158. if (encryptPatientName != null)
  3159. map['EncryptPatientName'] = encryptPatientName;
  3160. map['CanEditReport'] = canEditReport;
  3161. if (deviceName != null)
  3162. map['DeviceName'] = deviceName;
  3163. if (reportTemplateName != null)
  3164. map['ReportTemplateName'] = reportTemplateName;
  3165. if (reportTemplateCode != null)
  3166. map['ReportTemplateCode'] = reportTemplateCode;
  3167. if (examDate != null)
  3168. map['ExamDate'] = JsonRpcUtils.dateFormat(examDate!);
  3169. return map;
  3170. }
  3171. }
  3172. class FindReportsRequest extends TokenRequest{
  3173. String? recordCode;
  3174. String? languageCode;
  3175. FindReportsRequest({
  3176. this.recordCode,
  3177. this.languageCode,
  3178. String? token,
  3179. }) : super(
  3180. token: token,
  3181. );
  3182. factory FindReportsRequest.fromJson(Map<String, dynamic> map) {
  3183. return FindReportsRequest(
  3184. recordCode: map['RecordCode'],
  3185. languageCode: map['LanguageCode'],
  3186. token: map['Token'],
  3187. );
  3188. }
  3189. Map<String, dynamic> toJson() {
  3190. final map = super.toJson();
  3191. if (recordCode != null)
  3192. map['RecordCode'] = recordCode;
  3193. if (languageCode != null)
  3194. map['LanguageCode'] = languageCode;
  3195. return map;
  3196. }
  3197. }
  3198. class QueryReferralExamReportRequest extends FindReportsRequest{
  3199. String? referralRecordCode;
  3200. QueryReferralExamReportRequest({
  3201. this.referralRecordCode,
  3202. String? recordCode,
  3203. String? languageCode,
  3204. String? token,
  3205. }) : super(
  3206. recordCode: recordCode,
  3207. languageCode: languageCode,
  3208. token: token,
  3209. );
  3210. factory QueryReferralExamReportRequest.fromJson(Map<String, dynamic> map) {
  3211. return QueryReferralExamReportRequest(
  3212. referralRecordCode: map['ReferralRecordCode'],
  3213. recordCode: map['RecordCode'],
  3214. languageCode: map['LanguageCode'],
  3215. token: map['Token'],
  3216. );
  3217. }
  3218. Map<String, dynamic> toJson() {
  3219. final map = super.toJson();
  3220. if (referralRecordCode != null)
  3221. map['ReferralRecordCode'] = referralRecordCode;
  3222. return map;
  3223. }
  3224. }
  3225. class QueryShareExamPageResult {
  3226. String? shareExamPageUrl;
  3227. QueryShareExamPageResult({
  3228. this.shareExamPageUrl,
  3229. });
  3230. factory QueryShareExamPageResult.fromJson(Map<String, dynamic> map) {
  3231. return QueryShareExamPageResult(
  3232. shareExamPageUrl: map['ShareExamPageUrl'],
  3233. );
  3234. }
  3235. Map<String, dynamic> toJson() {
  3236. final map = Map<String, dynamic>();
  3237. if (shareExamPageUrl != null) {
  3238. map['ShareExamPageUrl'] = shareExamPageUrl;
  3239. }
  3240. return map;
  3241. }
  3242. }
  3243. class QueryShareExamPageRequest extends TokenRequest{
  3244. String? examFileToken;
  3245. String? languageCode;
  3246. QueryShareExamPageRequest({
  3247. this.examFileToken,
  3248. this.languageCode,
  3249. String? token,
  3250. }) : super(
  3251. token: token,
  3252. );
  3253. factory QueryShareExamPageRequest.fromJson(Map<String, dynamic> map) {
  3254. return QueryShareExamPageRequest(
  3255. examFileToken: map['ExamFileToken'],
  3256. languageCode: map['LanguageCode'],
  3257. token: map['Token'],
  3258. );
  3259. }
  3260. Map<String, dynamic> toJson() {
  3261. final map = super.toJson();
  3262. if (examFileToken != null)
  3263. map['ExamFileToken'] = examFileToken;
  3264. if (languageCode != null)
  3265. map['LanguageCode'] = languageCode;
  3266. return map;
  3267. }
  3268. }
  3269. class MeasureExportDetailDTO {
  3270. int sortNum;
  3271. String? remedicalMeasuredInfoCode;
  3272. String? sourceFileToken;
  3273. String? transferImageToken;
  3274. String? transferMp4Token;
  3275. bool isVideoFile;
  3276. String? defaultLoadingToken;
  3277. MeasureExportDetailDTO({
  3278. this.sortNum = 0,
  3279. this.remedicalMeasuredInfoCode,
  3280. this.sourceFileToken,
  3281. this.transferImageToken,
  3282. this.transferMp4Token,
  3283. this.isVideoFile = false,
  3284. this.defaultLoadingToken,
  3285. });
  3286. factory MeasureExportDetailDTO.fromJson(Map<String, dynamic> map) {
  3287. return MeasureExportDetailDTO(
  3288. sortNum: map['SortNum'],
  3289. remedicalMeasuredInfoCode: map['RemedicalMeasuredInfoCode'],
  3290. sourceFileToken: map['SourceFileToken'],
  3291. transferImageToken: map['TransferImageToken'],
  3292. transferMp4Token: map['TransferMp4Token'],
  3293. isVideoFile: map['IsVideoFile'],
  3294. defaultLoadingToken: map['DefaultLoadingToken'],
  3295. );
  3296. }
  3297. Map<String, dynamic> toJson() {
  3298. final map = Map<String, dynamic>();
  3299. map['SortNum'] = sortNum;
  3300. if (remedicalMeasuredInfoCode != null) {
  3301. map['RemedicalMeasuredInfoCode'] = remedicalMeasuredInfoCode;
  3302. }
  3303. if (sourceFileToken != null) {
  3304. map['SourceFileToken'] = sourceFileToken;
  3305. }
  3306. if (transferImageToken != null) {
  3307. map['TransferImageToken'] = transferImageToken;
  3308. }
  3309. if (transferMp4Token != null) {
  3310. map['TransferMp4Token'] = transferMp4Token;
  3311. }
  3312. map['IsVideoFile'] = isVideoFile;
  3313. if (defaultLoadingToken != null) {
  3314. map['DefaultLoadingToken'] = defaultLoadingToken;
  3315. }
  3316. return map;
  3317. }
  3318. }
  3319. class BatchExportMeasureResultRequest extends TokenRequest{
  3320. List<MeasureExportDetailDTO>? remedicalMeasuredInfoCodes;
  3321. BusinessTypeEnum businessType;
  3322. String? recordCode;
  3323. String? languageCode;
  3324. BatchExportMeasureResultRequest({
  3325. this.remedicalMeasuredInfoCodes,
  3326. this.businessType = BusinessTypeEnum.RemoteDiagnosis,
  3327. this.recordCode,
  3328. this.languageCode,
  3329. String? token,
  3330. }) : super(
  3331. token: token,
  3332. );
  3333. factory BatchExportMeasureResultRequest.fromJson(Map<String, dynamic> map) {
  3334. return BatchExportMeasureResultRequest(
  3335. remedicalMeasuredInfoCodes: map['RemedicalMeasuredInfoCodes'] != null ? (map['RemedicalMeasuredInfoCodes'] as List).map((e)=>MeasureExportDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3336. businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
  3337. recordCode: map['RecordCode'],
  3338. languageCode: map['LanguageCode'],
  3339. token: map['Token'],
  3340. );
  3341. }
  3342. Map<String, dynamic> toJson() {
  3343. final map = super.toJson();
  3344. if (remedicalMeasuredInfoCodes != null)
  3345. map['RemedicalMeasuredInfoCodes'] = remedicalMeasuredInfoCodes;
  3346. map['BusinessType'] = businessType.index;
  3347. if (recordCode != null)
  3348. map['RecordCode'] = recordCode;
  3349. if (languageCode != null)
  3350. map['LanguageCode'] = languageCode;
  3351. return map;
  3352. }
  3353. }
  3354. class GetRemedicalDiagnosisDataRequest extends TokenRequest{
  3355. String? remedicalCode;
  3356. int frameIndex;
  3357. GetRemedicalDiagnosisDataRequest({
  3358. this.remedicalCode,
  3359. this.frameIndex = 0,
  3360. String? token,
  3361. }) : super(
  3362. token: token,
  3363. );
  3364. factory GetRemedicalDiagnosisDataRequest.fromJson(Map<String, dynamic> map) {
  3365. return GetRemedicalDiagnosisDataRequest(
  3366. remedicalCode: map['RemedicalCode'],
  3367. frameIndex: map['FrameIndex'],
  3368. token: map['Token'],
  3369. );
  3370. }
  3371. Map<String, dynamic> toJson() {
  3372. final map = super.toJson();
  3373. if (remedicalCode != null)
  3374. map['RemedicalCode'] = remedicalCode;
  3375. map['FrameIndex'] = frameIndex;
  3376. return map;
  3377. }
  3378. }
  3379. class RemedicalAISelectedInfoDTO {
  3380. String? remedicalAISelectedInfoCode;
  3381. String? patientCode;
  3382. String? recordCode;
  3383. String? remedicalCode;
  3384. int frameIndex;
  3385. String? userCode;
  3386. String? orginalFileToken;
  3387. String? cdnFileToken;
  3388. String? aIFileToken;
  3389. String? aICdnFileToken;
  3390. RecommendedDownloadModeEnum recommendedDownloadMode;
  3391. String? previewFileToken;
  3392. String? diagnosisData;
  3393. DiagnosisConclusionEnum diagnosisConclusion;
  3394. List<DiagnosisOrganEnum>? diagnosisOrgans;
  3395. RemedicalAISelectedInfoDTO({
  3396. this.remedicalAISelectedInfoCode,
  3397. this.patientCode,
  3398. this.recordCode,
  3399. this.remedicalCode,
  3400. this.frameIndex = 0,
  3401. this.userCode,
  3402. this.orginalFileToken,
  3403. this.cdnFileToken,
  3404. this.aIFileToken,
  3405. this.aICdnFileToken,
  3406. this.recommendedDownloadMode = RecommendedDownloadModeEnum.Origin,
  3407. this.previewFileToken,
  3408. this.diagnosisData,
  3409. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  3410. this.diagnosisOrgans,
  3411. });
  3412. factory RemedicalAISelectedInfoDTO.fromJson(Map<String, dynamic> map) {
  3413. return RemedicalAISelectedInfoDTO(
  3414. remedicalAISelectedInfoCode: map['RemedicalAISelectedInfoCode'],
  3415. patientCode: map['PatientCode'],
  3416. recordCode: map['RecordCode'],
  3417. remedicalCode: map['RemedicalCode'],
  3418. frameIndex: map['FrameIndex'],
  3419. userCode: map['UserCode'],
  3420. orginalFileToken: map['OrginalFileToken'],
  3421. cdnFileToken: map['CdnFileToken'],
  3422. aIFileToken: map['AIFileToken'],
  3423. aICdnFileToken: map['AICdnFileToken'],
  3424. recommendedDownloadMode: RecommendedDownloadModeEnum.values.firstWhere((e) => e.index == map['RecommendedDownloadMode']),
  3425. previewFileToken: map['PreviewFileToken'],
  3426. diagnosisData: map['DiagnosisData'],
  3427. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  3428. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  3429. );
  3430. }
  3431. Map<String, dynamic> toJson() {
  3432. final map = Map<String, dynamic>();
  3433. if (remedicalAISelectedInfoCode != null) {
  3434. map['RemedicalAISelectedInfoCode'] = remedicalAISelectedInfoCode;
  3435. }
  3436. if (patientCode != null) {
  3437. map['PatientCode'] = patientCode;
  3438. }
  3439. if (recordCode != null) {
  3440. map['RecordCode'] = recordCode;
  3441. }
  3442. if (remedicalCode != null) {
  3443. map['RemedicalCode'] = remedicalCode;
  3444. }
  3445. map['FrameIndex'] = frameIndex;
  3446. if (userCode != null) {
  3447. map['UserCode'] = userCode;
  3448. }
  3449. if (orginalFileToken != null) {
  3450. map['OrginalFileToken'] = orginalFileToken;
  3451. }
  3452. if (cdnFileToken != null) {
  3453. map['CdnFileToken'] = cdnFileToken;
  3454. }
  3455. if (aIFileToken != null) {
  3456. map['AIFileToken'] = aIFileToken;
  3457. }
  3458. if (aICdnFileToken != null) {
  3459. map['AICdnFileToken'] = aICdnFileToken;
  3460. }
  3461. map['RecommendedDownloadMode'] = recommendedDownloadMode.index;
  3462. if (previewFileToken != null) {
  3463. map['PreviewFileToken'] = previewFileToken;
  3464. }
  3465. if (diagnosisData != null) {
  3466. map['DiagnosisData'] = diagnosisData;
  3467. }
  3468. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  3469. if (diagnosisOrgans != null) {
  3470. map['DiagnosisOrgans'] = diagnosisOrgans;
  3471. }
  3472. return map;
  3473. }
  3474. }
  3475. class GetPatientAISelectedInfosRequest extends TokenRequest{
  3476. String? patientCode;
  3477. String? recordCode;
  3478. GetPatientAISelectedInfosRequest({
  3479. this.patientCode,
  3480. this.recordCode,
  3481. String? token,
  3482. }) : super(
  3483. token: token,
  3484. );
  3485. factory GetPatientAISelectedInfosRequest.fromJson(Map<String, dynamic> map) {
  3486. return GetPatientAISelectedInfosRequest(
  3487. patientCode: map['PatientCode'],
  3488. recordCode: map['RecordCode'],
  3489. token: map['Token'],
  3490. );
  3491. }
  3492. Map<String, dynamic> toJson() {
  3493. final map = super.toJson();
  3494. if (patientCode != null)
  3495. map['PatientCode'] = patientCode;
  3496. if (recordCode != null)
  3497. map['RecordCode'] = recordCode;
  3498. return map;
  3499. }
  3500. }
  3501. class GetRemedicalAISelectedInfoRequest extends TokenRequest{
  3502. String? code;
  3503. GetRemedicalAISelectedInfoRequest({
  3504. this.code,
  3505. String? token,
  3506. }) : super(
  3507. token: token,
  3508. );
  3509. factory GetRemedicalAISelectedInfoRequest.fromJson(Map<String, dynamic> map) {
  3510. return GetRemedicalAISelectedInfoRequest(
  3511. code: map['Code'],
  3512. token: map['Token'],
  3513. );
  3514. }
  3515. Map<String, dynamic> toJson() {
  3516. final map = super.toJson();
  3517. if (code != null)
  3518. map['Code'] = code;
  3519. return map;
  3520. }
  3521. }
  3522. class SaveRemedicalAISelectedInfoRequest extends TokenRequest{
  3523. String? code;
  3524. String? remedicalCode;
  3525. int frameIndex;
  3526. String? aIFileToken;
  3527. String? previewFileToken;
  3528. String? diagnosisData;
  3529. DiagnosisConclusionEnum diagnosisConclusion;
  3530. List<DiagnosisOrganEnum>? diagnosisOrgans;
  3531. SaveRemedicalAISelectedInfoRequest({
  3532. this.code,
  3533. this.remedicalCode,
  3534. this.frameIndex = 0,
  3535. this.aIFileToken,
  3536. this.previewFileToken,
  3537. this.diagnosisData,
  3538. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  3539. this.diagnosisOrgans,
  3540. String? token,
  3541. }) : super(
  3542. token: token,
  3543. );
  3544. factory SaveRemedicalAISelectedInfoRequest.fromJson(Map<String, dynamic> map) {
  3545. return SaveRemedicalAISelectedInfoRequest(
  3546. code: map['Code'],
  3547. remedicalCode: map['RemedicalCode'],
  3548. frameIndex: map['FrameIndex'],
  3549. aIFileToken: map['AIFileToken'],
  3550. previewFileToken: map['PreviewFileToken'],
  3551. diagnosisData: map['DiagnosisData'],
  3552. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  3553. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  3554. token: map['Token'],
  3555. );
  3556. }
  3557. Map<String, dynamic> toJson() {
  3558. final map = super.toJson();
  3559. if (code != null)
  3560. map['Code'] = code;
  3561. if (remedicalCode != null)
  3562. map['RemedicalCode'] = remedicalCode;
  3563. map['FrameIndex'] = frameIndex;
  3564. if (aIFileToken != null)
  3565. map['AIFileToken'] = aIFileToken;
  3566. if (previewFileToken != null)
  3567. map['PreviewFileToken'] = previewFileToken;
  3568. if (diagnosisData != null)
  3569. map['DiagnosisData'] = diagnosisData;
  3570. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  3571. if (diagnosisOrgans != null)
  3572. map['DiagnosisOrgans'] = diagnosisOrgans;
  3573. return map;
  3574. }
  3575. }
  3576. class SyncRemedicalRecordRequest {
  3577. String? code;
  3578. String? organizationCode;
  3579. String? deviceCode;
  3580. bool isUploadReport;
  3581. List<DataItemDTO>? patientInfo;
  3582. DiagnosisStatusEnum diagnosisStatus;
  3583. List<DiagnosisInfoDTO>? aIDiagnosisInfos;
  3584. DateTime? createTime;
  3585. DateTime? updateTime;
  3586. String? creator;
  3587. bool isDelete;
  3588. String? customDoctor;
  3589. String? customOrganzation;
  3590. String? equipmentSN;
  3591. bool isImgQualityControlled;
  3592. bool isReportQualityControlled;
  3593. double imgScore;
  3594. double reportScore;
  3595. SyncRemedicalRecordRequest({
  3596. this.code,
  3597. this.organizationCode,
  3598. this.deviceCode,
  3599. this.isUploadReport = false,
  3600. this.patientInfo,
  3601. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  3602. this.aIDiagnosisInfos,
  3603. this.createTime,
  3604. this.updateTime,
  3605. this.creator,
  3606. this.isDelete = false,
  3607. this.customDoctor,
  3608. this.customOrganzation,
  3609. this.equipmentSN,
  3610. this.isImgQualityControlled = false,
  3611. this.isReportQualityControlled = false,
  3612. this.imgScore = 0,
  3613. this.reportScore = 0,
  3614. });
  3615. factory SyncRemedicalRecordRequest.fromJson(Map<String, dynamic> map) {
  3616. return SyncRemedicalRecordRequest(
  3617. code: map['Code'],
  3618. organizationCode: map['OrganizationCode'],
  3619. deviceCode: map['DeviceCode'],
  3620. isUploadReport: map['IsUploadReport'],
  3621. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3622. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  3623. aIDiagnosisInfos: map['AIDiagnosisInfos'] != null ? (map['AIDiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  3624. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3625. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3626. creator: map['Creator'],
  3627. isDelete: map['IsDelete'],
  3628. customDoctor: map['CustomDoctor'],
  3629. customOrganzation: map['CustomOrganzation'],
  3630. equipmentSN: map['EquipmentSN'],
  3631. isImgQualityControlled: map['IsImgQualityControlled'],
  3632. isReportQualityControlled: map['IsReportQualityControlled'],
  3633. imgScore: double.parse(map['ImgScore'].toString()),
  3634. reportScore: double.parse(map['ReportScore'].toString()),
  3635. );
  3636. }
  3637. Map<String, dynamic> toJson() {
  3638. final map = Map<String, dynamic>();
  3639. if (code != null) {
  3640. map['Code'] = code;
  3641. }
  3642. if (organizationCode != null) {
  3643. map['OrganizationCode'] = organizationCode;
  3644. }
  3645. if (deviceCode != null) {
  3646. map['DeviceCode'] = deviceCode;
  3647. }
  3648. map['IsUploadReport'] = isUploadReport;
  3649. if (patientInfo != null) {
  3650. map['PatientInfo'] = patientInfo;
  3651. }
  3652. map['DiagnosisStatus'] = diagnosisStatus.index;
  3653. if (aIDiagnosisInfos != null) {
  3654. map['AIDiagnosisInfos'] = aIDiagnosisInfos;
  3655. }
  3656. if (createTime != null) {
  3657. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  3658. }
  3659. if (updateTime != null) {
  3660. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  3661. }
  3662. if (creator != null) {
  3663. map['Creator'] = creator;
  3664. }
  3665. map['IsDelete'] = isDelete;
  3666. if (customDoctor != null) {
  3667. map['CustomDoctor'] = customDoctor;
  3668. }
  3669. if (customOrganzation != null) {
  3670. map['CustomOrganzation'] = customOrganzation;
  3671. }
  3672. if (equipmentSN != null) {
  3673. map['EquipmentSN'] = equipmentSN;
  3674. }
  3675. map['IsImgQualityControlled'] = isImgQualityControlled;
  3676. map['IsReportQualityControlled'] = isReportQualityControlled;
  3677. map['ImgScore'] = imgScore;
  3678. map['ReportScore'] = reportScore;
  3679. return map;
  3680. }
  3681. }
  3682. class SyncBatchRemedicalRecordRequest {
  3683. SyncDBEnum syncType;
  3684. List<SyncRemedicalRecordRequest>? remedicalRecordList;
  3685. SyncBatchRemedicalRecordRequest({
  3686. this.syncType = SyncDBEnum.Migrate,
  3687. this.remedicalRecordList,
  3688. });
  3689. factory SyncBatchRemedicalRecordRequest.fromJson(Map<String, dynamic> map) {
  3690. return SyncBatchRemedicalRecordRequest(
  3691. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3692. remedicalRecordList: map['RemedicalRecordList'] != null ? (map['RemedicalRecordList'] as List).map((e)=>SyncRemedicalRecordRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3693. );
  3694. }
  3695. Map<String, dynamic> toJson() {
  3696. final map = Map<String, dynamic>();
  3697. map['SyncType'] = syncType.index;
  3698. if (remedicalRecordList != null) {
  3699. map['RemedicalRecordList'] = remedicalRecordList;
  3700. }
  3701. return map;
  3702. }
  3703. }
  3704. class SyncUploadRemedicalDataRequest {
  3705. String? code;
  3706. DateTime? createTime;
  3707. DateTime? updateTime;
  3708. String? examCode;
  3709. String? deviceCode;
  3710. String? previewFileToken;
  3711. String? fileToken;
  3712. String? imageUrl;
  3713. int fileSize;
  3714. String? coverImageToken;
  3715. String? applicationCategory;
  3716. String? application;
  3717. RemedicalFileDataTypeEnum fileDataType;
  3718. ImageLocationDTO? imageLocation;
  3719. List<String>? organDiagnosisInfos;
  3720. bool oldPlatformNeedAI;
  3721. ReportQualityControl? qualityControlDatas;
  3722. SyncUploadRemedicalDataRequest({
  3723. this.code,
  3724. this.createTime,
  3725. this.updateTime,
  3726. this.examCode,
  3727. this.deviceCode,
  3728. this.previewFileToken,
  3729. this.fileToken,
  3730. this.imageUrl,
  3731. this.fileSize = 0,
  3732. this.coverImageToken,
  3733. this.applicationCategory,
  3734. this.application,
  3735. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  3736. this.imageLocation,
  3737. this.organDiagnosisInfos,
  3738. this.oldPlatformNeedAI = false,
  3739. this.qualityControlDatas,
  3740. });
  3741. factory SyncUploadRemedicalDataRequest.fromJson(Map<String, dynamic> map) {
  3742. return SyncUploadRemedicalDataRequest(
  3743. code: map['Code'],
  3744. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3745. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3746. examCode: map['ExamCode'],
  3747. deviceCode: map['DeviceCode'],
  3748. previewFileToken: map['PreviewFileToken'],
  3749. fileToken: map['FileToken'],
  3750. imageUrl: map['ImageUrl'],
  3751. fileSize: map['FileSize'],
  3752. coverImageToken: map['CoverImageToken'],
  3753. applicationCategory: map['ApplicationCategory'],
  3754. application: map['Application'],
  3755. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  3756. imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
  3757. organDiagnosisInfos: map['OrganDiagnosisInfos']?.cast<String>().toList(),
  3758. oldPlatformNeedAI: map['OldPlatformNeedAI'],
  3759. qualityControlDatas: map['QualityControlDatas'] != null ? ReportQualityControl.fromJson(map['QualityControlDatas']) : null,
  3760. );
  3761. }
  3762. Map<String, dynamic> toJson() {
  3763. final map = Map<String, dynamic>();
  3764. if (code != null) {
  3765. map['Code'] = code;
  3766. }
  3767. if (createTime != null) {
  3768. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  3769. }
  3770. if (updateTime != null) {
  3771. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  3772. }
  3773. if (examCode != null) {
  3774. map['ExamCode'] = examCode;
  3775. }
  3776. if (deviceCode != null) {
  3777. map['DeviceCode'] = deviceCode;
  3778. }
  3779. if (previewFileToken != null) {
  3780. map['PreviewFileToken'] = previewFileToken;
  3781. }
  3782. if (fileToken != null) {
  3783. map['FileToken'] = fileToken;
  3784. }
  3785. if (imageUrl != null) {
  3786. map['ImageUrl'] = imageUrl;
  3787. }
  3788. map['FileSize'] = fileSize;
  3789. if (coverImageToken != null) {
  3790. map['CoverImageToken'] = coverImageToken;
  3791. }
  3792. if (applicationCategory != null) {
  3793. map['ApplicationCategory'] = applicationCategory;
  3794. }
  3795. if (application != null) {
  3796. map['Application'] = application;
  3797. }
  3798. map['FileDataType'] = fileDataType.index;
  3799. if (imageLocation != null) {
  3800. map['ImageLocation'] = imageLocation;
  3801. }
  3802. if (organDiagnosisInfos != null) {
  3803. map['OrganDiagnosisInfos'] = organDiagnosisInfos;
  3804. }
  3805. map['OldPlatformNeedAI'] = oldPlatformNeedAI;
  3806. if (qualityControlDatas != null) {
  3807. map['QualityControlDatas'] = qualityControlDatas;
  3808. }
  3809. return map;
  3810. }
  3811. }
  3812. class SyncBatchUploadRemedicalDatasRequest {
  3813. SyncDBEnum syncType;
  3814. List<SyncUploadRemedicalDataRequest>? syncUploadRemedicalDataList;
  3815. SyncBatchUploadRemedicalDatasRequest({
  3816. this.syncType = SyncDBEnum.Migrate,
  3817. this.syncUploadRemedicalDataList,
  3818. });
  3819. factory SyncBatchUploadRemedicalDatasRequest.fromJson(Map<String, dynamic> map) {
  3820. return SyncBatchUploadRemedicalDatasRequest(
  3821. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3822. syncUploadRemedicalDataList: map['SyncUploadRemedicalDataList'] != null ? (map['SyncUploadRemedicalDataList'] as List).map((e)=>SyncUploadRemedicalDataRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3823. );
  3824. }
  3825. Map<String, dynamic> toJson() {
  3826. final map = Map<String, dynamic>();
  3827. map['SyncType'] = syncType.index;
  3828. if (syncUploadRemedicalDataList != null) {
  3829. map['SyncUploadRemedicalDataList'] = syncUploadRemedicalDataList;
  3830. }
  3831. return map;
  3832. }
  3833. }
  3834. class SyncAIResultRequest {
  3835. String? remedicalCode;
  3836. String? diagnosisResult;
  3837. DateTime? createTime;
  3838. DateTime? updateTime;
  3839. SyncAIResultRequest({
  3840. this.remedicalCode,
  3841. this.diagnosisResult,
  3842. this.createTime,
  3843. this.updateTime,
  3844. });
  3845. factory SyncAIResultRequest.fromJson(Map<String, dynamic> map) {
  3846. return SyncAIResultRequest(
  3847. remedicalCode: map['RemedicalCode'],
  3848. diagnosisResult: map['DiagnosisResult'],
  3849. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3850. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3851. );
  3852. }
  3853. Map<String, dynamic> toJson() {
  3854. final map = Map<String, dynamic>();
  3855. if (remedicalCode != null) {
  3856. map['RemedicalCode'] = remedicalCode;
  3857. }
  3858. if (diagnosisResult != null) {
  3859. map['DiagnosisResult'] = diagnosisResult;
  3860. }
  3861. if (createTime != null) {
  3862. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  3863. }
  3864. if (updateTime != null) {
  3865. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  3866. }
  3867. return map;
  3868. }
  3869. }
  3870. class SyncBatchAIResultRequest {
  3871. SyncDBEnum syncType;
  3872. List<SyncAIResultRequest>? syncAIResultList;
  3873. SyncBatchAIResultRequest({
  3874. this.syncType = SyncDBEnum.Migrate,
  3875. this.syncAIResultList,
  3876. });
  3877. factory SyncBatchAIResultRequest.fromJson(Map<String, dynamic> map) {
  3878. return SyncBatchAIResultRequest(
  3879. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3880. syncAIResultList: map['SyncAIResultList'] != null ? (map['SyncAIResultList'] as List).map((e)=>SyncAIResultRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3881. );
  3882. }
  3883. Map<String, dynamic> toJson() {
  3884. final map = Map<String, dynamic>();
  3885. map['SyncType'] = syncType.index;
  3886. if (syncAIResultList != null) {
  3887. map['SyncAIResultList'] = syncAIResultList;
  3888. }
  3889. return map;
  3890. }
  3891. }
  3892. class SyncBatchCarotidResultRequest {
  3893. SyncDBEnum syncType;
  3894. List<GetCarotidResultRequest>? syncCarotidResultRequest;
  3895. SyncBatchCarotidResultRequest({
  3896. this.syncType = SyncDBEnum.Migrate,
  3897. this.syncCarotidResultRequest,
  3898. });
  3899. factory SyncBatchCarotidResultRequest.fromJson(Map<String, dynamic> map) {
  3900. return SyncBatchCarotidResultRequest(
  3901. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3902. syncCarotidResultRequest: map['SyncCarotidResultRequest'] != null ? (map['SyncCarotidResultRequest'] as List).map((e)=>GetCarotidResultRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3903. );
  3904. }
  3905. Map<String, dynamic> toJson() {
  3906. final map = Map<String, dynamic>();
  3907. map['SyncType'] = syncType.index;
  3908. if (syncCarotidResultRequest != null) {
  3909. map['SyncCarotidResultRequest'] = syncCarotidResultRequest;
  3910. }
  3911. return map;
  3912. }
  3913. }
  3914. class LabFileInfoRequest extends TokenRequest{
  3915. String? filePath;
  3916. String? fileName;
  3917. UploadFileTypeEnum fileType;
  3918. LabFileInfoRequest({
  3919. this.filePath,
  3920. this.fileName,
  3921. this.fileType = UploadFileTypeEnum.Unknown,
  3922. String? token,
  3923. }) : super(
  3924. token: token,
  3925. );
  3926. factory LabFileInfoRequest.fromJson(Map<String, dynamic> map) {
  3927. return LabFileInfoRequest(
  3928. filePath: map['FilePath'],
  3929. fileName: map['FileName'],
  3930. fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
  3931. token: map['Token'],
  3932. );
  3933. }
  3934. Map<String, dynamic> toJson() {
  3935. final map = super.toJson();
  3936. if (filePath != null)
  3937. map['FilePath'] = filePath;
  3938. if (fileName != null)
  3939. map['FileName'] = fileName;
  3940. map['FileType'] = fileType.index;
  3941. return map;
  3942. }
  3943. }
  3944. class FindDeviceDiagnosisRequest extends TokenRequest{
  3945. String? deviceCode;
  3946. FindDeviceDiagnosisRequest({
  3947. this.deviceCode,
  3948. String? token,
  3949. }) : super(
  3950. token: token,
  3951. );
  3952. factory FindDeviceDiagnosisRequest.fromJson(Map<String, dynamic> map) {
  3953. return FindDeviceDiagnosisRequest(
  3954. deviceCode: map['DeviceCode'],
  3955. token: map['Token'],
  3956. );
  3957. }
  3958. Map<String, dynamic> toJson() {
  3959. final map = super.toJson();
  3960. if (deviceCode != null)
  3961. map['DeviceCode'] = deviceCode;
  3962. return map;
  3963. }
  3964. }
  3965. class AddToVidProcessQueueRequest {
  3966. String? originImageUrl;
  3967. String? remedicalCode;
  3968. String? recordCode;
  3969. bool isNeedThumbnailUrl;
  3970. bool isNeedCoverImg;
  3971. bool isNeedLocation;
  3972. AddToVidProcessQueueRequest({
  3973. this.originImageUrl,
  3974. this.remedicalCode,
  3975. this.recordCode,
  3976. this.isNeedThumbnailUrl = false,
  3977. this.isNeedCoverImg = false,
  3978. this.isNeedLocation = false,
  3979. });
  3980. factory AddToVidProcessQueueRequest.fromJson(Map<String, dynamic> map) {
  3981. return AddToVidProcessQueueRequest(
  3982. originImageUrl: map['OriginImageUrl'],
  3983. remedicalCode: map['RemedicalCode'],
  3984. recordCode: map['RecordCode'],
  3985. isNeedThumbnailUrl: map['IsNeedThumbnailUrl'],
  3986. isNeedCoverImg: map['IsNeedCoverImg'],
  3987. isNeedLocation: map['IsNeedLocation'],
  3988. );
  3989. }
  3990. Map<String, dynamic> toJson() {
  3991. final map = Map<String, dynamic>();
  3992. if (originImageUrl != null) {
  3993. map['OriginImageUrl'] = originImageUrl;
  3994. }
  3995. if (remedicalCode != null) {
  3996. map['RemedicalCode'] = remedicalCode;
  3997. }
  3998. if (recordCode != null) {
  3999. map['RecordCode'] = recordCode;
  4000. }
  4001. map['IsNeedThumbnailUrl'] = isNeedThumbnailUrl;
  4002. map['IsNeedCoverImg'] = isNeedCoverImg;
  4003. map['IsNeedLocation'] = isNeedLocation;
  4004. return map;
  4005. }
  4006. }
  4007. class QueryShareImagesPlayUrlRequest extends TokenRequest{
  4008. String? recordCode;
  4009. List<MeasureExportDetailDTO>? remedicalImages;
  4010. String? languageCode;
  4011. QueryShareImagesPlayUrlRequest({
  4012. this.recordCode,
  4013. this.remedicalImages,
  4014. this.languageCode,
  4015. String? token,
  4016. }) : super(
  4017. token: token,
  4018. );
  4019. factory QueryShareImagesPlayUrlRequest.fromJson(Map<String, dynamic> map) {
  4020. return QueryShareImagesPlayUrlRequest(
  4021. recordCode: map['RecordCode'],
  4022. remedicalImages: map['RemedicalImages'] != null ? (map['RemedicalImages'] as List).map((e)=>MeasureExportDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  4023. languageCode: map['LanguageCode'],
  4024. token: map['Token'],
  4025. );
  4026. }
  4027. Map<String, dynamic> toJson() {
  4028. final map = super.toJson();
  4029. if (recordCode != null)
  4030. map['RecordCode'] = recordCode;
  4031. if (remedicalImages != null)
  4032. map['RemedicalImages'] = remedicalImages;
  4033. if (languageCode != null)
  4034. map['LanguageCode'] = languageCode;
  4035. return map;
  4036. }
  4037. }