remedical.m.dart 99 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565
  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. CreateExaminfoResult({
  12. this.examCode,
  13. });
  14. factory CreateExaminfoResult.fromJson(Map<String, dynamic> map) {
  15. return CreateExaminfoResult(
  16. examCode: map['ExamCode'],
  17. );
  18. }
  19. Map<String, dynamic> toJson() {
  20. final map = Map<String, dynamic>();
  21. if(examCode != null)
  22. map['ExamCode'] = examCode;
  23. return map;
  24. }
  25. }
  26. class CreateExaminfoRequest extends TokenRequest{
  27. String? patientType;
  28. String? examRecordCode;
  29. List<DataItemDTO >? patientInfo;
  30. List<PatientInfoExt >? patientScanInfoList;
  31. CreateExaminfoRequest({
  32. this.patientType,
  33. this.examRecordCode,
  34. this.patientInfo,
  35. this.patientScanInfoList,
  36. String? token,
  37. }) : super(
  38. token: token,
  39. );
  40. factory CreateExaminfoRequest.fromJson(Map<String, dynamic> map) {
  41. return CreateExaminfoRequest(
  42. patientType: map['PatientType'],
  43. examRecordCode: map['ExamRecordCode'],
  44. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  45. patientScanInfoList: map['PatientScanInfoList'] != null ? (map['PatientScanInfoList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  46. token: map['Token'],
  47. );
  48. }
  49. Map<String, dynamic> toJson() {
  50. final map = super.toJson();
  51. if(patientType != null)
  52. map['PatientType'] = patientType;
  53. if(examRecordCode != null)
  54. map['ExamRecordCode'] = examRecordCode;
  55. if(patientInfo != null)
  56. map['PatientInfo'] = patientInfo;
  57. if(patientScanInfoList != null)
  58. map['PatientScanInfoList'] = patientScanInfoList;
  59. return map;
  60. }
  61. }
  62. class UploadExamDataRequest extends TokenRequest{
  63. String? examCode;
  64. String? previewFileToken;
  65. String? fileToken;
  66. int fileSize;
  67. String? coverImageToken;
  68. String? applicationCategory;
  69. String? application;
  70. RemedicalFileDataTypeEnum fileDataType;
  71. MeasuredResultsDTO? measuredResult;
  72. ScanImageDTO? commentResult;
  73. ImageLocationDTO? imageLocation;
  74. UploadExamDataRequest({
  75. this.examCode,
  76. this.previewFileToken,
  77. this.fileToken,
  78. this.fileSize = 0,
  79. this.coverImageToken,
  80. this.applicationCategory,
  81. this.application,
  82. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  83. this.measuredResult,
  84. this.commentResult,
  85. this.imageLocation,
  86. String? token,
  87. }) : super(
  88. token: token,
  89. );
  90. factory UploadExamDataRequest.fromJson(Map<String, dynamic> map) {
  91. return UploadExamDataRequest(
  92. examCode: map['ExamCode'],
  93. previewFileToken: map['PreviewFileToken'],
  94. fileToken: map['FileToken'],
  95. fileSize: map['FileSize'],
  96. coverImageToken: map['CoverImageToken'],
  97. applicationCategory: map['ApplicationCategory'],
  98. application: map['Application'],
  99. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  100. measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
  101. commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
  102. imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
  103. token: map['Token'],
  104. );
  105. }
  106. Map<String, dynamic> toJson() {
  107. final map = super.toJson();
  108. if(examCode != null)
  109. map['ExamCode'] = examCode;
  110. if(previewFileToken != null)
  111. map['PreviewFileToken'] = previewFileToken;
  112. if(fileToken != null)
  113. map['FileToken'] = fileToken;
  114. map['FileSize'] = fileSize;
  115. if(coverImageToken != null)
  116. map['CoverImageToken'] = coverImageToken;
  117. if(applicationCategory != null)
  118. map['ApplicationCategory'] = applicationCategory;
  119. if(application != null)
  120. map['Application'] = application;
  121. map['FileDataType'] = fileDataType.index;
  122. if(measuredResult != null)
  123. map['MeasuredResult'] = measuredResult;
  124. if(commentResult != null)
  125. map['CommentResult'] = commentResult;
  126. if(imageLocation != null)
  127. map['ImageLocation'] = imageLocation;
  128. return map;
  129. }
  130. }
  131. class FindRemedicalByCodeRequest extends TokenRequest{
  132. String? remedicalCode;
  133. bool existDiagnosisResult;
  134. FindRemedicalByCodeRequest({
  135. this.remedicalCode,
  136. this.existDiagnosisResult = false,
  137. String? token,
  138. }) : super(
  139. token: token,
  140. );
  141. factory FindRemedicalByCodeRequest.fromJson(Map<String, dynamic> map) {
  142. return FindRemedicalByCodeRequest(
  143. remedicalCode: map['RemedicalCode'],
  144. existDiagnosisResult: map['ExistDiagnosisResult'],
  145. token: map['Token'],
  146. );
  147. }
  148. Map<String, dynamic> toJson() {
  149. final map = super.toJson();
  150. if(remedicalCode != null)
  151. map['RemedicalCode'] = remedicalCode;
  152. map['ExistDiagnosisResult'] = existDiagnosisResult;
  153. return map;
  154. }
  155. }
  156. class AddToRemedicalDiagnosisRequest extends TokenRequest{
  157. String? remedicalCode;
  158. AddToRemedicalDiagnosisRequest({
  159. this.remedicalCode,
  160. String? token,
  161. }) : super(
  162. token: token,
  163. );
  164. factory AddToRemedicalDiagnosisRequest.fromJson(Map<String, dynamic> map) {
  165. return AddToRemedicalDiagnosisRequest(
  166. remedicalCode: map['RemedicalCode'],
  167. token: map['Token'],
  168. );
  169. }
  170. Map<String, dynamic> toJson() {
  171. final map = super.toJson();
  172. if(remedicalCode != null)
  173. map['RemedicalCode'] = remedicalCode;
  174. return map;
  175. }
  176. }
  177. class RemedicalItemList {
  178. String? patientScanTypeDesc;
  179. List<String >? patientScanTypeList;
  180. String? applicationCategory;
  181. String? application;
  182. List<RemedicalInfoDTO >? remedicalList;
  183. RemedicalItemList({
  184. this.patientScanTypeDesc,
  185. this.patientScanTypeList,
  186. this.applicationCategory,
  187. this.application,
  188. this.remedicalList,
  189. });
  190. factory RemedicalItemList.fromJson(Map<String, dynamic> map) {
  191. return RemedicalItemList(
  192. patientScanTypeDesc: map['PatientScanTypeDesc'],
  193. patientScanTypeList: map['PatientScanTypeList'] != null ? map['PatientScanTypeList'].cast<String>().toList() : null,
  194. applicationCategory: map['ApplicationCategory'],
  195. application: map['Application'],
  196. remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  197. );
  198. }
  199. Map<String, dynamic> toJson() {
  200. final map = Map<String, dynamic>();
  201. if(patientScanTypeDesc != null)
  202. map['PatientScanTypeDesc'] = patientScanTypeDesc;
  203. if(patientScanTypeList != null)
  204. map['PatientScanTypeList'] = patientScanTypeList;
  205. if(applicationCategory != null)
  206. map['ApplicationCategory'] = applicationCategory;
  207. if(application != null)
  208. map['Application'] = application;
  209. if(remedicalList != null)
  210. map['RemedicalList'] = remedicalList;
  211. return map;
  212. }
  213. }
  214. class RemedicalListResult {
  215. String? scanDate;
  216. String? recordCode;
  217. List<RemedicalItemList >? remedicalItemList;
  218. RemedicalListResult({
  219. this.scanDate,
  220. this.recordCode,
  221. this.remedicalItemList,
  222. });
  223. factory RemedicalListResult.fromJson(Map<String, dynamic> map) {
  224. return RemedicalListResult(
  225. scanDate: map['ScanDate'],
  226. recordCode: map['RecordCode'],
  227. remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItemList.fromJson(e as Map<String,dynamic>)).toList() : null,
  228. );
  229. }
  230. Map<String, dynamic> toJson() {
  231. final map = Map<String, dynamic>();
  232. if(scanDate != null)
  233. map['ScanDate'] = scanDate;
  234. if(recordCode != null)
  235. map['RecordCode'] = recordCode;
  236. if(remedicalItemList != null)
  237. map['RemedicalItemList'] = remedicalItemList;
  238. return map;
  239. }
  240. }
  241. enum QueryDropdownListEnum {
  242. Org,
  243. }
  244. class QueryDropdownListReuqest extends TokenRequest{
  245. QueryDropdownListEnum queryType;
  246. String? queryValue;
  247. QueryDropdownListReuqest({
  248. this.queryType = QueryDropdownListEnum.Org,
  249. this.queryValue,
  250. String? token,
  251. }) : super(
  252. token: token,
  253. );
  254. factory QueryDropdownListReuqest.fromJson(Map<String, dynamic> map) {
  255. return QueryDropdownListReuqest(
  256. queryType: QueryDropdownListEnum.values.firstWhere((e) => e.index == map['QueryType']),
  257. queryValue: map['QueryValue'],
  258. token: map['Token'],
  259. );
  260. }
  261. Map<String, dynamic> toJson() {
  262. final map = super.toJson();
  263. map['QueryType'] = queryType.index;
  264. if(queryValue != null)
  265. map['QueryValue'] = queryValue;
  266. return map;
  267. }
  268. }
  269. class RservationResult {
  270. String? reservationCode;
  271. List<DataItemDTO >? patientInfo;
  272. List<PatientInfoExt >? patientInfoExtList;
  273. String? dataSource;
  274. RservationResult({
  275. this.reservationCode,
  276. this.patientInfo,
  277. this.patientInfoExtList,
  278. this.dataSource,
  279. });
  280. factory RservationResult.fromJson(Map<String, dynamic> map) {
  281. return RservationResult(
  282. reservationCode: map['ReservationCode'],
  283. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  284. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  285. dataSource: map['DataSource'],
  286. );
  287. }
  288. Map<String, dynamic> toJson() {
  289. final map = Map<String, dynamic>();
  290. if(reservationCode != null)
  291. map['ReservationCode'] = reservationCode;
  292. if(patientInfo != null)
  293. map['PatientInfo'] = patientInfo;
  294. if(patientInfoExtList != null)
  295. map['PatientInfoExtList'] = patientInfoExtList;
  296. if(dataSource != null)
  297. map['DataSource'] = dataSource;
  298. return map;
  299. }
  300. }
  301. class QueryReservationResult {
  302. List<RservationResult >? reservationList;
  303. QueryReservationResult({
  304. this.reservationList,
  305. });
  306. factory QueryReservationResult.fromJson(Map<String, dynamic> map) {
  307. return QueryReservationResult(
  308. reservationList: map['ReservationList'] != null ? (map['ReservationList'] as List).map((e)=>RservationResult.fromJson(e as Map<String,dynamic>)).toList() : null,
  309. );
  310. }
  311. Map<String, dynamic> toJson() {
  312. final map = Map<String, dynamic>();
  313. if(reservationList != null)
  314. map['ReservationList'] = reservationList;
  315. return map;
  316. }
  317. }
  318. class QueryReservationRequest extends TokenRequest{
  319. DateTime? createTime;
  320. QueryReservationRequest({
  321. this.createTime,
  322. String? token,
  323. }) : super(
  324. token: token,
  325. );
  326. factory QueryReservationRequest.fromJson(Map<String, dynamic> map) {
  327. return QueryReservationRequest(
  328. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  329. token: map['Token'],
  330. );
  331. }
  332. Map<String, dynamic> toJson() {
  333. final map = super.toJson();
  334. if(createTime != null)
  335. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  336. return map;
  337. }
  338. }
  339. class FinishExamNotifyDetail {
  340. String? recordCode;
  341. RecordStatusEnum recordStatus;
  342. FinishExamNotifyDetail({
  343. this.recordCode,
  344. this.recordStatus = RecordStatusEnum.NotScanned,
  345. });
  346. factory FinishExamNotifyDetail.fromJson(Map<String, dynamic> map) {
  347. return FinishExamNotifyDetail(
  348. recordCode: map['RecordCode'],
  349. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  350. );
  351. }
  352. Map<String, dynamic> toJson() {
  353. final map = Map<String, dynamic>();
  354. if(recordCode != null)
  355. map['RecordCode'] = recordCode;
  356. map['RecordStatus'] = recordStatus.index;
  357. return map;
  358. }
  359. }
  360. class PushFinishExamNotifyToClientRequest {
  361. List<FinishExamNotifyDetail >? records;
  362. String? userCode;
  363. PushFinishExamNotifyToClientRequest({
  364. this.records,
  365. this.userCode,
  366. });
  367. factory PushFinishExamNotifyToClientRequest.fromJson(Map<String, dynamic> map) {
  368. return PushFinishExamNotifyToClientRequest(
  369. records: map['Records'] != null ? (map['Records'] as List).map((e)=>FinishExamNotifyDetail.fromJson(e as Map<String,dynamic>)).toList() : null,
  370. userCode: map['UserCode'],
  371. );
  372. }
  373. Map<String, dynamic> toJson() {
  374. final map = Map<String, dynamic>();
  375. if(records != null)
  376. map['Records'] = records;
  377. if(userCode != null)
  378. map['UserCode'] = userCode;
  379. return map;
  380. }
  381. }
  382. class DeviceFinishExamRequest extends TokenRequest{
  383. List<String >? records;
  384. DeviceFinishExamRequest({
  385. this.records,
  386. String? token,
  387. }) : super(
  388. token: token,
  389. );
  390. factory DeviceFinishExamRequest.fromJson(Map<String, dynamic> map) {
  391. return DeviceFinishExamRequest(
  392. records: map['Records'] != null ? map['Records'].cast<String>().toList() : null,
  393. token: map['Token'],
  394. );
  395. }
  396. Map<String, dynamic> toJson() {
  397. final map = super.toJson();
  398. if(records != null)
  399. map['Records'] = records;
  400. return map;
  401. }
  402. }
  403. class QueryExamListItemResult {
  404. String? examCode;
  405. String? patientName;
  406. String? age;
  407. List<DataItemDTO >? ageInfo;
  408. String? sex;
  409. List<String >? associatedExamCodes;
  410. DateTime? createTime;
  411. QueryExamListItemResult({
  412. this.examCode,
  413. this.patientName,
  414. this.age,
  415. this.ageInfo,
  416. this.sex,
  417. this.associatedExamCodes,
  418. this.createTime,
  419. });
  420. factory QueryExamListItemResult.fromJson(Map<String, dynamic> map) {
  421. return QueryExamListItemResult(
  422. examCode: map['ExamCode'],
  423. patientName: map['PatientName'],
  424. age: map['Age'],
  425. ageInfo: map['AgeInfo'] != null ? (map['AgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  426. sex: map['Sex'],
  427. associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast<String>().toList() : null,
  428. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  429. );
  430. }
  431. Map<String, dynamic> toJson() {
  432. final map = Map<String, dynamic>();
  433. if(examCode != null)
  434. map['ExamCode'] = examCode;
  435. if(patientName != null)
  436. map['PatientName'] = patientName;
  437. if(age != null)
  438. map['Age'] = age;
  439. if(ageInfo != null)
  440. map['AgeInfo'] = ageInfo;
  441. if(sex != null)
  442. map['Sex'] = sex;
  443. if(associatedExamCodes != null)
  444. map['AssociatedExamCodes'] = associatedExamCodes;
  445. if(createTime != null)
  446. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  447. return map;
  448. }
  449. }
  450. enum ExamStatusEnum {
  451. Wait,
  452. Done,
  453. }
  454. class QueryExamListRequest extends PageRequest{
  455. String? patientName;
  456. DateTime? startTime;
  457. DateTime? endTime;
  458. ExamStatusEnum examStatus;
  459. QueryExamListRequest({
  460. this.patientName,
  461. this.startTime,
  462. this.endTime,
  463. this.examStatus = ExamStatusEnum.Wait,
  464. int pageIndex = 0,
  465. int pageSize = 0,
  466. String? token,
  467. }) : super(
  468. pageIndex: pageIndex,
  469. pageSize: pageSize,
  470. token: token,
  471. );
  472. factory QueryExamListRequest.fromJson(Map<String, dynamic> map) {
  473. return QueryExamListRequest(
  474. patientName: map['PatientName'],
  475. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  476. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  477. examStatus: ExamStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']),
  478. pageIndex: map['PageIndex'],
  479. pageSize: map['PageSize'],
  480. token: map['Token'],
  481. );
  482. }
  483. Map<String, dynamic> toJson() {
  484. final map = super.toJson();
  485. if(patientName != null)
  486. map['PatientName'] = patientName;
  487. if(startTime != null)
  488. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  489. if(endTime != null)
  490. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  491. map['ExamStatus'] = examStatus.index;
  492. return map;
  493. }
  494. }
  495. class QueryExamInfoResult {
  496. DateTime? createTime;
  497. String? deptName;
  498. String? patientName;
  499. String? patientAge;
  500. List<DataItemDTO >? patientAgeInfo;
  501. String? patientSex;
  502. List<PatientInfoExt >? patientInfoExtList;
  503. List<String >? associatedExamCodes;
  504. RecordStatusEnum examStatus;
  505. QueryExamInfoResult({
  506. this.createTime,
  507. this.deptName,
  508. this.patientName,
  509. this.patientAge,
  510. this.patientAgeInfo,
  511. this.patientSex,
  512. this.patientInfoExtList,
  513. this.associatedExamCodes,
  514. this.examStatus = RecordStatusEnum.NotScanned,
  515. });
  516. factory QueryExamInfoResult.fromJson(Map<String, dynamic> map) {
  517. return QueryExamInfoResult(
  518. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  519. deptName: map['DeptName'],
  520. patientName: map['PatientName'],
  521. patientAge: map['PatientAge'],
  522. patientAgeInfo: map['PatientAgeInfo'] != null ? (map['PatientAgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  523. patientSex: map['PatientSex'],
  524. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  525. associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast<String>().toList() : null,
  526. examStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']),
  527. );
  528. }
  529. Map<String, dynamic> toJson() {
  530. final map = Map<String, dynamic>();
  531. if(createTime != null)
  532. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  533. if(deptName != null)
  534. map['DeptName'] = deptName;
  535. if(patientName != null)
  536. map['PatientName'] = patientName;
  537. if(patientAge != null)
  538. map['PatientAge'] = patientAge;
  539. if(patientAgeInfo != null)
  540. map['PatientAgeInfo'] = patientAgeInfo;
  541. if(patientSex != null)
  542. map['PatientSex'] = patientSex;
  543. if(patientInfoExtList != null)
  544. map['PatientInfoExtList'] = patientInfoExtList;
  545. if(associatedExamCodes != null)
  546. map['AssociatedExamCodes'] = associatedExamCodes;
  547. map['ExamStatus'] = examStatus.index;
  548. return map;
  549. }
  550. }
  551. class QueryExamInfoRequest extends TokenRequest{
  552. String? examCode;
  553. QueryExamInfoRequest({
  554. this.examCode,
  555. String? token,
  556. }) : super(
  557. token: token,
  558. );
  559. factory QueryExamInfoRequest.fromJson(Map<String, dynamic> map) {
  560. return QueryExamInfoRequest(
  561. examCode: map['ExamCode'],
  562. token: map['Token'],
  563. );
  564. }
  565. Map<String, dynamic> toJson() {
  566. final map = super.toJson();
  567. if(examCode != null)
  568. map['ExamCode'] = examCode;
  569. return map;
  570. }
  571. }
  572. class OutputItemMetaDTO {
  573. String? name;
  574. String? description;
  575. int unit;
  576. bool? isWorking;
  577. OutputItemMetaDTO({
  578. this.name,
  579. this.description,
  580. this.unit = 0,
  581. this.isWorking,
  582. });
  583. factory OutputItemMetaDTO.fromJson(Map<String, dynamic> map) {
  584. return OutputItemMetaDTO(
  585. name: map['Name'],
  586. description: map['Description'],
  587. unit: map['Unit'],
  588. isWorking: map['IsWorking'],
  589. );
  590. }
  591. Map<String, dynamic> toJson() {
  592. final map = Map<String, dynamic>();
  593. if(name != null)
  594. map['Name'] = name;
  595. if(description != null)
  596. map['Description'] = description;
  597. map['Unit'] = unit;
  598. if(isWorking != null)
  599. map['IsWorking'] = isWorking;
  600. return map;
  601. }
  602. }
  603. class CalculatorMetaDTO {
  604. List<OutputItemMetaDTO >? availableOutputs;
  605. CalculatorMetaDTO({
  606. this.availableOutputs,
  607. });
  608. factory CalculatorMetaDTO.fromJson(Map<String, dynamic> map) {
  609. return CalculatorMetaDTO(
  610. availableOutputs: map['AvailableOutputs'] != null ? (map['AvailableOutputs'] as List).map((e)=>OutputItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  611. );
  612. }
  613. Map<String, dynamic> toJson() {
  614. final map = Map<String, dynamic>();
  615. if(availableOutputs != null)
  616. map['AvailableOutputs'] = availableOutputs;
  617. return map;
  618. }
  619. }
  620. class ChildItemMetaDTO {
  621. String? name;
  622. String? description;
  623. bool isWorking;
  624. List<ChildItemMetaDTO >? childItems;
  625. CalculatorMetaDTO? calculator;
  626. String? measureTypeName;
  627. ChildItemMetaDTO({
  628. this.name,
  629. this.description,
  630. this.isWorking = false,
  631. this.childItems,
  632. this.calculator,
  633. this.measureTypeName,
  634. });
  635. factory ChildItemMetaDTO.fromJson(Map<String, dynamic> map) {
  636. return ChildItemMetaDTO(
  637. name: map['Name'],
  638. description: map['Description'],
  639. isWorking: map['IsWorking'],
  640. childItems: map['ChildItems'] != null ? (map['ChildItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  641. calculator: map['Calculator'] != null ? CalculatorMetaDTO.fromJson(map['Calculator']) : null,
  642. measureTypeName: map['MeasureTypeName'],
  643. );
  644. }
  645. Map<String, dynamic> toJson() {
  646. final map = Map<String, dynamic>();
  647. if(name != null)
  648. map['Name'] = name;
  649. if(description != null)
  650. map['Description'] = description;
  651. map['IsWorking'] = isWorking;
  652. if(childItems != null)
  653. map['ChildItems'] = childItems;
  654. if(calculator != null)
  655. map['Calculator'] = calculator;
  656. if(measureTypeName != null)
  657. map['MeasureTypeName'] = measureTypeName;
  658. return map;
  659. }
  660. }
  661. class ItemMetaDTO {
  662. String? name;
  663. String? description;
  664. String? briefAnnotation;
  665. String? measureTypeName;
  666. List<String >? categories;
  667. CalculatorMetaDTO? calculator;
  668. List<ChildItemMetaDTO >? multiMethodItems;
  669. List<ChildItemMetaDTO >? methodChildItems;
  670. ItemMetaDTO({
  671. this.name,
  672. this.description,
  673. this.briefAnnotation,
  674. this.measureTypeName,
  675. this.categories,
  676. this.calculator,
  677. this.multiMethodItems,
  678. this.methodChildItems,
  679. });
  680. factory ItemMetaDTO.fromJson(Map<String, dynamic> map) {
  681. return ItemMetaDTO(
  682. name: map['Name'],
  683. description: map['Description'],
  684. briefAnnotation: map['BriefAnnotation'],
  685. measureTypeName: map['MeasureTypeName'],
  686. categories: map['Categories'] != null ? map['Categories'].cast<String>().toList() : null,
  687. calculator: map['Calculator'] != null ? CalculatorMetaDTO.fromJson(map['Calculator']) : null,
  688. multiMethodItems: map['MultiMethodItems'] != null ? (map['MultiMethodItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  689. methodChildItems: map['MethodChildItems'] != null ? (map['MethodChildItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  690. );
  691. }
  692. Map<String, dynamic> toJson() {
  693. final map = Map<String, dynamic>();
  694. if(name != null)
  695. map['Name'] = name;
  696. if(description != null)
  697. map['Description'] = description;
  698. if(briefAnnotation != null)
  699. map['BriefAnnotation'] = briefAnnotation;
  700. if(measureTypeName != null)
  701. map['MeasureTypeName'] = measureTypeName;
  702. if(categories != null)
  703. map['Categories'] = categories;
  704. if(calculator != null)
  705. map['Calculator'] = calculator;
  706. if(multiMethodItems != null)
  707. map['MultiMethodItems'] = multiMethodItems;
  708. if(methodChildItems != null)
  709. map['MethodChildItems'] = methodChildItems;
  710. return map;
  711. }
  712. }
  713. class MeasureFolderDTO {
  714. String? name;
  715. List<String >? workingItemNames;
  716. List<ItemMetaDTO >? availableItems;
  717. MeasureFolderDTO({
  718. this.name,
  719. this.workingItemNames,
  720. this.availableItems,
  721. });
  722. factory MeasureFolderDTO.fromJson(Map<String, dynamic> map) {
  723. return MeasureFolderDTO(
  724. name: map['Name'],
  725. workingItemNames: map['WorkingItemNames'] != null ? map['WorkingItemNames'].cast<String>().toList() : null,
  726. availableItems: map['AvailableItems'] != null ? (map['AvailableItems'] as List).map((e)=>ItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  727. );
  728. }
  729. Map<String, dynamic> toJson() {
  730. final map = Map<String, dynamic>();
  731. if(name != null)
  732. map['Name'] = name;
  733. if(workingItemNames != null)
  734. map['WorkingItemNames'] = workingItemNames;
  735. if(availableItems != null)
  736. map['AvailableItems'] = availableItems;
  737. return map;
  738. }
  739. }
  740. class MeasureGroupDTO {
  741. String? name;
  742. String? description;
  743. List<MeasureFolderDTO >? availableFolders;
  744. MeasureGroupDTO({
  745. this.name,
  746. this.description,
  747. this.availableFolders,
  748. });
  749. factory MeasureGroupDTO.fromJson(Map<String, dynamic> map) {
  750. return MeasureGroupDTO(
  751. name: map['Name'],
  752. description: map['Description'],
  753. availableFolders: map['AvailableFolders'] != null ? (map['AvailableFolders'] as List).map((e)=>MeasureFolderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  754. );
  755. }
  756. Map<String, dynamic> toJson() {
  757. final map = Map<String, dynamic>();
  758. if(name != null)
  759. map['Name'] = name;
  760. if(description != null)
  761. map['Description'] = description;
  762. if(availableFolders != null)
  763. map['AvailableFolders'] = availableFolders;
  764. return map;
  765. }
  766. }
  767. class MeasureModeDTO {
  768. String? modeName;
  769. List<MeasureGroupDTO >? availableGroups;
  770. MeasureModeDTO({
  771. this.modeName,
  772. this.availableGroups,
  773. });
  774. factory MeasureModeDTO.fromJson(Map<String, dynamic> map) {
  775. return MeasureModeDTO(
  776. modeName: map['ModeName'],
  777. availableGroups: map['AvailableGroups'] != null ? (map['AvailableGroups'] as List).map((e)=>MeasureGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  778. );
  779. }
  780. Map<String, dynamic> toJson() {
  781. final map = Map<String, dynamic>();
  782. if(modeName != null)
  783. map['ModeName'] = modeName;
  784. if(availableGroups != null)
  785. map['AvailableGroups'] = availableGroups;
  786. return map;
  787. }
  788. }
  789. class MeasureApplicationDTO {
  790. String? version;
  791. String? id;
  792. String? description;
  793. List<MeasureModeDTO >? availableModes;
  794. MeasureApplicationDTO({
  795. this.version,
  796. this.id,
  797. this.description,
  798. this.availableModes,
  799. });
  800. factory MeasureApplicationDTO.fromJson(Map<String, dynamic> map) {
  801. return MeasureApplicationDTO(
  802. version: map['Version'],
  803. id: map['Id'],
  804. description: map['Description'],
  805. availableModes: map['AvailableModes'] != null ? (map['AvailableModes'] as List).map((e)=>MeasureModeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  806. );
  807. }
  808. Map<String, dynamic> toJson() {
  809. final map = Map<String, dynamic>();
  810. if(version != null)
  811. map['Version'] = version;
  812. if(id != null)
  813. map['Id'] = id;
  814. if(description != null)
  815. map['Description'] = description;
  816. if(availableModes != null)
  817. map['AvailableModes'] = availableModes;
  818. return map;
  819. }
  820. }
  821. class GetMeasureApplicationRequest extends TokenRequest{
  822. String? applicationName;
  823. String? categoryName;
  824. List<String >? measureModes;
  825. GetMeasureApplicationRequest({
  826. this.applicationName,
  827. this.categoryName,
  828. this.measureModes,
  829. String? token,
  830. }) : super(
  831. token: token,
  832. );
  833. factory GetMeasureApplicationRequest.fromJson(Map<String, dynamic> map) {
  834. return GetMeasureApplicationRequest(
  835. applicationName: map['ApplicationName'],
  836. categoryName: map['CategoryName'],
  837. measureModes: map['MeasureModes'] != null ? map['MeasureModes'].cast<String>().toList() : null,
  838. token: map['Token'],
  839. );
  840. }
  841. Map<String, dynamic> toJson() {
  842. final map = super.toJson();
  843. if(applicationName != null)
  844. map['ApplicationName'] = applicationName;
  845. if(categoryName != null)
  846. map['CategoryName'] = categoryName;
  847. if(measureModes != null)
  848. map['MeasureModes'] = measureModes;
  849. return map;
  850. }
  851. }
  852. class CommentItemDTO {
  853. String? text;
  854. CommentItemDTO({
  855. this.text,
  856. });
  857. factory CommentItemDTO.fromJson(Map<String, dynamic> map) {
  858. return CommentItemDTO(
  859. text: map['Text'],
  860. );
  861. }
  862. Map<String, dynamic> toJson() {
  863. final map = Map<String, dynamic>();
  864. if(text != null)
  865. map['Text'] = text;
  866. return map;
  867. }
  868. }
  869. class CommentItemResultDTO {
  870. String? version;
  871. List<CommentItemDTO >? commentItems;
  872. CommentItemResultDTO({
  873. this.version,
  874. this.commentItems,
  875. });
  876. factory CommentItemResultDTO.fromJson(Map<String, dynamic> map) {
  877. return CommentItemResultDTO(
  878. version: map['Version'],
  879. commentItems: map['CommentItems'] != null ? (map['CommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  880. );
  881. }
  882. Map<String, dynamic> toJson() {
  883. final map = Map<String, dynamic>();
  884. if(version != null)
  885. map['Version'] = version;
  886. if(commentItems != null)
  887. map['CommentItems'] = commentItems;
  888. return map;
  889. }
  890. }
  891. class GetCommentsByApplicationRequest extends TokenRequest{
  892. String? languageCode;
  893. String? applicationName;
  894. String? categoryName;
  895. GetCommentsByApplicationRequest({
  896. this.languageCode,
  897. this.applicationName,
  898. this.categoryName,
  899. String? token,
  900. }) : super(
  901. token: token,
  902. );
  903. factory GetCommentsByApplicationRequest.fromJson(Map<String, dynamic> map) {
  904. return GetCommentsByApplicationRequest(
  905. languageCode: map['LanguageCode'],
  906. applicationName: map['ApplicationName'],
  907. categoryName: map['CategoryName'],
  908. token: map['Token'],
  909. );
  910. }
  911. Map<String, dynamic> toJson() {
  912. final map = super.toJson();
  913. if(languageCode != null)
  914. map['LanguageCode'] = languageCode;
  915. if(applicationName != null)
  916. map['ApplicationName'] = applicationName;
  917. if(categoryName != null)
  918. map['CategoryName'] = categoryName;
  919. return map;
  920. }
  921. }
  922. class PresetCommentItemDTO {
  923. List<String >? categoryList;
  924. String? text;
  925. PresetCommentItemDTO({
  926. this.categoryList,
  927. this.text,
  928. });
  929. factory PresetCommentItemDTO.fromJson(Map<String, dynamic> map) {
  930. return PresetCommentItemDTO(
  931. categoryList: map['CategoryList'] != null ? map['CategoryList'].cast<String>().toList() : null,
  932. text: map['Text'],
  933. );
  934. }
  935. Map<String, dynamic> toJson() {
  936. final map = Map<String, dynamic>();
  937. if(categoryList != null)
  938. map['CategoryList'] = categoryList;
  939. if(text != null)
  940. map['Text'] = text;
  941. return map;
  942. }
  943. }
  944. class PresetCommentItemResultDTO {
  945. String? version;
  946. List<PresetCommentItemDTO >? presetCommentItems;
  947. PresetCommentItemResultDTO({
  948. this.version,
  949. this.presetCommentItems,
  950. });
  951. factory PresetCommentItemResultDTO.fromJson(Map<String, dynamic> map) {
  952. return PresetCommentItemResultDTO(
  953. version: map['Version'],
  954. presetCommentItems: map['PresetCommentItems'] != null ? (map['PresetCommentItems'] as List).map((e)=>PresetCommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  955. );
  956. }
  957. Map<String, dynamic> toJson() {
  958. final map = Map<String, dynamic>();
  959. if(version != null)
  960. map['Version'] = version;
  961. if(presetCommentItems != null)
  962. map['PresetCommentItems'] = presetCommentItems;
  963. return map;
  964. }
  965. }
  966. class GetPresetCommentsRequest extends TokenRequest{
  967. String? languageCode;
  968. GetPresetCommentsRequest({
  969. this.languageCode,
  970. String? token,
  971. }) : super(
  972. token: token,
  973. );
  974. factory GetPresetCommentsRequest.fromJson(Map<String, dynamic> map) {
  975. return GetPresetCommentsRequest(
  976. languageCode: map['LanguageCode'],
  977. token: map['Token'],
  978. );
  979. }
  980. Map<String, dynamic> toJson() {
  981. final map = super.toJson();
  982. if(languageCode != null)
  983. map['LanguageCode'] = languageCode;
  984. return map;
  985. }
  986. }
  987. class GetReportElementByLanguageRequest extends TokenRequest{
  988. String? reportDatasJosn;
  989. String? language;
  990. GetReportElementByLanguageRequest({
  991. this.reportDatasJosn,
  992. this.language,
  993. String? token,
  994. }) : super(
  995. token: token,
  996. );
  997. factory GetReportElementByLanguageRequest.fromJson(Map<String, dynamic> map) {
  998. return GetReportElementByLanguageRequest(
  999. reportDatasJosn: map['ReportDatasJosn'],
  1000. language: map['Language'],
  1001. token: map['Token'],
  1002. );
  1003. }
  1004. Map<String, dynamic> toJson() {
  1005. final map = super.toJson();
  1006. if(reportDatasJosn != null)
  1007. map['ReportDatasJosn'] = reportDatasJosn;
  1008. if(language != null)
  1009. map['Language'] = language;
  1010. return map;
  1011. }
  1012. }
  1013. class UpdateCommentItemDTO {
  1014. String? oldText;
  1015. String? newText;
  1016. UpdateCommentItemDTO({
  1017. this.oldText,
  1018. this.newText,
  1019. });
  1020. factory UpdateCommentItemDTO.fromJson(Map<String, dynamic> map) {
  1021. return UpdateCommentItemDTO(
  1022. oldText: map['OldText'],
  1023. newText: map['NewText'],
  1024. );
  1025. }
  1026. Map<String, dynamic> toJson() {
  1027. final map = Map<String, dynamic>();
  1028. if(oldText != null)
  1029. map['OldText'] = oldText;
  1030. if(newText != null)
  1031. map['NewText'] = newText;
  1032. return map;
  1033. }
  1034. }
  1035. class SaveUserDefinedCommentsRequest extends TokenRequest{
  1036. String? version;
  1037. String? languageCode;
  1038. String? applicationName;
  1039. String? categoryName;
  1040. List<CommentItemDTO >? addCommentItems;
  1041. List<CommentItemDTO >? deletedCommentItems;
  1042. List<UpdateCommentItemDTO >? updateCommentItems;
  1043. SaveUserDefinedCommentsRequest({
  1044. this.version,
  1045. this.languageCode,
  1046. this.applicationName,
  1047. this.categoryName,
  1048. this.addCommentItems,
  1049. this.deletedCommentItems,
  1050. this.updateCommentItems,
  1051. String? token,
  1052. }) : super(
  1053. token: token,
  1054. );
  1055. factory SaveUserDefinedCommentsRequest.fromJson(Map<String, dynamic> map) {
  1056. return SaveUserDefinedCommentsRequest(
  1057. version: map['Version'],
  1058. languageCode: map['LanguageCode'],
  1059. applicationName: map['ApplicationName'],
  1060. categoryName: map['CategoryName'],
  1061. addCommentItems: map['AddCommentItems'] != null ? (map['AddCommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1062. deletedCommentItems: map['DeletedCommentItems'] != null ? (map['DeletedCommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1063. updateCommentItems: map['UpdateCommentItems'] != null ? (map['UpdateCommentItems'] as List).map((e)=>UpdateCommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1064. token: map['Token'],
  1065. );
  1066. }
  1067. Map<String, dynamic> toJson() {
  1068. final map = super.toJson();
  1069. if(version != null)
  1070. map['Version'] = version;
  1071. if(languageCode != null)
  1072. map['LanguageCode'] = languageCode;
  1073. if(applicationName != null)
  1074. map['ApplicationName'] = applicationName;
  1075. if(categoryName != null)
  1076. map['CategoryName'] = categoryName;
  1077. if(addCommentItems != null)
  1078. map['AddCommentItems'] = addCommentItems;
  1079. if(deletedCommentItems != null)
  1080. map['DeletedCommentItems'] = deletedCommentItems;
  1081. if(updateCommentItems != null)
  1082. map['UpdateCommentItems'] = updateCommentItems;
  1083. return map;
  1084. }
  1085. }
  1086. class ResetUserCommentsRequest extends TokenRequest{
  1087. bool isAllReset;
  1088. String? applicationName;
  1089. String? categoryName;
  1090. ResetUserCommentsRequest({
  1091. this.isAllReset = false,
  1092. this.applicationName,
  1093. this.categoryName,
  1094. String? token,
  1095. }) : super(
  1096. token: token,
  1097. );
  1098. factory ResetUserCommentsRequest.fromJson(Map<String, dynamic> map) {
  1099. return ResetUserCommentsRequest(
  1100. isAllReset: map['IsAllReset'],
  1101. applicationName: map['ApplicationName'],
  1102. categoryName: map['CategoryName'],
  1103. token: map['Token'],
  1104. );
  1105. }
  1106. Map<String, dynamic> toJson() {
  1107. final map = super.toJson();
  1108. map['IsAllReset'] = isAllReset;
  1109. if(applicationName != null)
  1110. map['ApplicationName'] = applicationName;
  1111. if(categoryName != null)
  1112. map['CategoryName'] = categoryName;
  1113. return map;
  1114. }
  1115. }
  1116. class UserDefinedItemMetaDTO {
  1117. String? name;
  1118. String? workingMethodItem;
  1119. UserDefinedItemMetaDTO({
  1120. this.name,
  1121. this.workingMethodItem,
  1122. });
  1123. factory UserDefinedItemMetaDTO.fromJson(Map<String, dynamic> map) {
  1124. return UserDefinedItemMetaDTO(
  1125. name: map['Name'],
  1126. workingMethodItem: map['WorkingMethodItem'],
  1127. );
  1128. }
  1129. Map<String, dynamic> toJson() {
  1130. final map = Map<String, dynamic>();
  1131. if(name != null)
  1132. map['Name'] = name;
  1133. if(workingMethodItem != null)
  1134. map['WorkingMethodItem'] = workingMethodItem;
  1135. return map;
  1136. }
  1137. }
  1138. class UserDefinedMeasureFolderDTO {
  1139. String? name;
  1140. List<String >? workingItemNames;
  1141. String? defaultItem;
  1142. List<UserDefinedItemMetaDTO >? multiMethodItemMetas;
  1143. List<ItemMetaDTO >? itemMetas;
  1144. String? itemMetaJson;
  1145. UserDefinedMeasureFolderDTO({
  1146. this.name,
  1147. this.workingItemNames,
  1148. this.defaultItem,
  1149. this.multiMethodItemMetas,
  1150. this.itemMetas,
  1151. this.itemMetaJson,
  1152. });
  1153. factory UserDefinedMeasureFolderDTO.fromJson(Map<String, dynamic> map) {
  1154. return UserDefinedMeasureFolderDTO(
  1155. name: map['Name'],
  1156. workingItemNames: map['WorkingItemNames'] != null ? map['WorkingItemNames'].cast<String>().toList() : null,
  1157. defaultItem: map['DefaultItem'],
  1158. multiMethodItemMetas: map['MultiMethodItemMetas'] != null ? (map['MultiMethodItemMetas'] as List).map((e)=>UserDefinedItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1159. itemMetas: map['ItemMetas'] != null ? (map['ItemMetas'] as List).map((e)=>ItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1160. itemMetaJson: map['ItemMetaJson'],
  1161. );
  1162. }
  1163. Map<String, dynamic> toJson() {
  1164. final map = Map<String, dynamic>();
  1165. if(name != null)
  1166. map['Name'] = name;
  1167. if(workingItemNames != null)
  1168. map['WorkingItemNames'] = workingItemNames;
  1169. if(defaultItem != null)
  1170. map['DefaultItem'] = defaultItem;
  1171. if(multiMethodItemMetas != null)
  1172. map['MultiMethodItemMetas'] = multiMethodItemMetas;
  1173. if(itemMetas != null)
  1174. map['ItemMetas'] = itemMetas;
  1175. if(itemMetaJson != null)
  1176. map['ItemMetaJson'] = itemMetaJson;
  1177. return map;
  1178. }
  1179. }
  1180. class UserDefinedMeasureGroupDTO {
  1181. String? name;
  1182. List<UserDefinedMeasureFolderDTO >? folders;
  1183. UserDefinedMeasureGroupDTO({
  1184. this.name,
  1185. this.folders,
  1186. });
  1187. factory UserDefinedMeasureGroupDTO.fromJson(Map<String, dynamic> map) {
  1188. return UserDefinedMeasureGroupDTO(
  1189. name: map['Name'],
  1190. folders: map['Folders'] != null ? (map['Folders'] as List).map((e)=>UserDefinedMeasureFolderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1191. );
  1192. }
  1193. Map<String, dynamic> toJson() {
  1194. final map = Map<String, dynamic>();
  1195. if(name != null)
  1196. map['Name'] = name;
  1197. if(folders != null)
  1198. map['Folders'] = folders;
  1199. return map;
  1200. }
  1201. }
  1202. class UserDefinedMeasureModeDTO {
  1203. String? modeName;
  1204. List<UserDefinedMeasureGroupDTO >? workingGroups;
  1205. UserDefinedMeasureModeDTO({
  1206. this.modeName,
  1207. this.workingGroups,
  1208. });
  1209. factory UserDefinedMeasureModeDTO.fromJson(Map<String, dynamic> map) {
  1210. return UserDefinedMeasureModeDTO(
  1211. modeName: map['ModeName'],
  1212. workingGroups: map['WorkingGroups'] != null ? (map['WorkingGroups'] as List).map((e)=>UserDefinedMeasureGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1213. );
  1214. }
  1215. Map<String, dynamic> toJson() {
  1216. final map = Map<String, dynamic>();
  1217. if(modeName != null)
  1218. map['ModeName'] = modeName;
  1219. if(workingGroups != null)
  1220. map['WorkingGroups'] = workingGroups;
  1221. return map;
  1222. }
  1223. }
  1224. class SaveUserDefinedMeasureApplicationRequest extends TokenRequest{
  1225. String? version;
  1226. String? applicationName;
  1227. String? categoryName;
  1228. UserDefinedMeasureModeDTO? workingMode;
  1229. SaveUserDefinedMeasureApplicationRequest({
  1230. this.version,
  1231. this.applicationName,
  1232. this.categoryName,
  1233. this.workingMode,
  1234. String? token,
  1235. }) : super(
  1236. token: token,
  1237. );
  1238. factory SaveUserDefinedMeasureApplicationRequest.fromJson(Map<String, dynamic> map) {
  1239. return SaveUserDefinedMeasureApplicationRequest(
  1240. version: map['Version'],
  1241. applicationName: map['ApplicationName'],
  1242. categoryName: map['CategoryName'],
  1243. workingMode: map['WorkingMode'] != null ? UserDefinedMeasureModeDTO.fromJson(map['WorkingMode']) : null,
  1244. token: map['Token'],
  1245. );
  1246. }
  1247. Map<String, dynamic> toJson() {
  1248. final map = super.toJson();
  1249. if(version != null)
  1250. map['Version'] = version;
  1251. if(applicationName != null)
  1252. map['ApplicationName'] = applicationName;
  1253. if(categoryName != null)
  1254. map['CategoryName'] = categoryName;
  1255. if(workingMode != null)
  1256. map['WorkingMode'] = workingMode;
  1257. return map;
  1258. }
  1259. }
  1260. enum CursorTypeEnum {
  1261. CursorType1Icon,
  1262. CursorType2Icon,
  1263. CursorType3Icon,
  1264. CursorType4Icon,
  1265. CursorType5Icon,
  1266. }
  1267. class MeasureSystemSettingDTO {
  1268. String? version;
  1269. CursorTypeEnum cursorType;
  1270. int cursorSize;
  1271. int shapeCursorSize;
  1272. String? cursorColor;
  1273. bool showResultWindow;
  1274. int showResultLocation;
  1275. int fontSize;
  1276. bool showCursorLine;
  1277. bool holdMeasureLine;
  1278. bool showDepthGuideline;
  1279. bool showBriefAnnotation;
  1280. String? minCursorDistance;
  1281. String? autoSnapDistance;
  1282. int annotationFontSize;
  1283. bool showProtocolInWorkSheet;
  1284. bool showAnnotation;
  1285. MeasureSystemSettingDTO({
  1286. this.version,
  1287. this.cursorType = CursorTypeEnum.CursorType1Icon,
  1288. this.cursorSize = 0,
  1289. this.shapeCursorSize = 0,
  1290. this.cursorColor,
  1291. this.showResultWindow = false,
  1292. this.showResultLocation = 0,
  1293. this.fontSize = 0,
  1294. this.showCursorLine = false,
  1295. this.holdMeasureLine = false,
  1296. this.showDepthGuideline = false,
  1297. this.showBriefAnnotation = false,
  1298. this.minCursorDistance,
  1299. this.autoSnapDistance,
  1300. this.annotationFontSize = 0,
  1301. this.showProtocolInWorkSheet = false,
  1302. this.showAnnotation = false,
  1303. });
  1304. factory MeasureSystemSettingDTO.fromJson(Map<String, dynamic> map) {
  1305. return MeasureSystemSettingDTO(
  1306. version: map['Version'],
  1307. cursorType: CursorTypeEnum.values.firstWhere((e) => e.index == map['CursorType']),
  1308. cursorSize: map['CursorSize'],
  1309. shapeCursorSize: map['ShapeCursorSize'],
  1310. cursorColor: map['CursorColor'],
  1311. showResultWindow: map['ShowResultWindow'],
  1312. showResultLocation: map['ShowResultLocation'],
  1313. fontSize: map['FontSize'],
  1314. showCursorLine: map['ShowCursorLine'],
  1315. holdMeasureLine: map['HoldMeasureLine'],
  1316. showDepthGuideline: map['ShowDepthGuideline'],
  1317. showBriefAnnotation: map['ShowBriefAnnotation'],
  1318. minCursorDistance: map['MinCursorDistance'],
  1319. autoSnapDistance: map['AutoSnapDistance'],
  1320. annotationFontSize: map['AnnotationFontSize'],
  1321. showProtocolInWorkSheet: map['ShowProtocolInWorkSheet'],
  1322. showAnnotation: map['ShowAnnotation'],
  1323. );
  1324. }
  1325. Map<String, dynamic> toJson() {
  1326. final map = Map<String, dynamic>();
  1327. if(version != null)
  1328. map['Version'] = version;
  1329. map['CursorType'] = cursorType.index;
  1330. map['CursorSize'] = cursorSize;
  1331. map['ShapeCursorSize'] = shapeCursorSize;
  1332. if(cursorColor != null)
  1333. map['CursorColor'] = cursorColor;
  1334. map['ShowResultWindow'] = showResultWindow;
  1335. map['ShowResultLocation'] = showResultLocation;
  1336. map['FontSize'] = fontSize;
  1337. map['ShowCursorLine'] = showCursorLine;
  1338. map['HoldMeasureLine'] = holdMeasureLine;
  1339. map['ShowDepthGuideline'] = showDepthGuideline;
  1340. map['ShowBriefAnnotation'] = showBriefAnnotation;
  1341. if(minCursorDistance != null)
  1342. map['MinCursorDistance'] = minCursorDistance;
  1343. if(autoSnapDistance != null)
  1344. map['AutoSnapDistance'] = autoSnapDistance;
  1345. map['AnnotationFontSize'] = annotationFontSize;
  1346. map['ShowProtocolInWorkSheet'] = showProtocolInWorkSheet;
  1347. map['ShowAnnotation'] = showAnnotation;
  1348. return map;
  1349. }
  1350. }
  1351. class GetMeasureSystemSettingRequest extends TokenRequest{
  1352. GetMeasureSystemSettingRequest({
  1353. String? token,
  1354. }) : super(
  1355. token: token,
  1356. );
  1357. factory GetMeasureSystemSettingRequest.fromJson(Map<String, dynamic> map) {
  1358. return GetMeasureSystemSettingRequest(
  1359. token: map['Token'],
  1360. );
  1361. }
  1362. Map<String, dynamic> toJson() {
  1363. final map = super.toJson();
  1364. return map;
  1365. }
  1366. }
  1367. class SaveMeasureSystemSettingRequest extends TokenRequest{
  1368. MeasureSystemSettingDTO? systemSetting;
  1369. SaveMeasureSystemSettingRequest({
  1370. this.systemSetting,
  1371. String? token,
  1372. }) : super(
  1373. token: token,
  1374. );
  1375. factory SaveMeasureSystemSettingRequest.fromJson(Map<String, dynamic> map) {
  1376. return SaveMeasureSystemSettingRequest(
  1377. systemSetting: map['SystemSetting'] != null ? MeasureSystemSettingDTO.fromJson(map['SystemSetting']) : null,
  1378. token: map['Token'],
  1379. );
  1380. }
  1381. Map<String, dynamic> toJson() {
  1382. final map = super.toJson();
  1383. if(systemSetting != null)
  1384. map['SystemSetting'] = systemSetting;
  1385. return map;
  1386. }
  1387. }
  1388. enum RecordCreateTypeEnum {
  1389. Reservation,
  1390. Normal,
  1391. }
  1392. class RecordInfoDTO extends BaseDTO{
  1393. String? recordCode;
  1394. String? patientCode;
  1395. String? deviceCode;
  1396. RecordStatusEnum recordStatus;
  1397. String? creatorCode;
  1398. String? tags;
  1399. RecordCreateTypeEnum createType;
  1400. List<DataItemDTO >? patientInfo;
  1401. List<PatientInfoExt >? patientInfoExtList;
  1402. String? devicePatientID;
  1403. String? patientType;
  1404. List<String >? readUsers;
  1405. String? rootOrganizationCode;
  1406. String? organizationCode;
  1407. List<String >? associatedExamCodes;
  1408. DiagnosisStatusEnum diagnosisStatus;
  1409. List<DiagnosisInfoDTO >? diagnosisInfos;
  1410. bool isCollecting;
  1411. DateTime? startCollectingTime;
  1412. RecordInfoDTO({
  1413. this.recordCode,
  1414. this.patientCode,
  1415. this.deviceCode,
  1416. this.recordStatus = RecordStatusEnum.NotScanned,
  1417. this.creatorCode,
  1418. this.tags,
  1419. this.createType = RecordCreateTypeEnum.Reservation,
  1420. this.patientInfo,
  1421. this.patientInfoExtList,
  1422. this.devicePatientID,
  1423. this.patientType,
  1424. this.readUsers,
  1425. this.rootOrganizationCode,
  1426. this.organizationCode,
  1427. this.associatedExamCodes,
  1428. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  1429. this.diagnosisInfos,
  1430. this.isCollecting = false,
  1431. this.startCollectingTime,
  1432. DateTime? createTime,
  1433. DateTime? updateTime,
  1434. }) : super(
  1435. createTime: createTime,
  1436. updateTime: updateTime,
  1437. );
  1438. factory RecordInfoDTO.fromJson(Map<String, dynamic> map) {
  1439. return RecordInfoDTO(
  1440. recordCode: map['RecordCode'],
  1441. patientCode: map['PatientCode'],
  1442. deviceCode: map['DeviceCode'],
  1443. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  1444. creatorCode: map['CreatorCode'],
  1445. tags: map['Tags'],
  1446. createType: RecordCreateTypeEnum.values.firstWhere((e) => e.index == map['CreateType']),
  1447. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1448. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  1449. devicePatientID: map['DevicePatientID'],
  1450. patientType: map['PatientType'],
  1451. readUsers: map['ReadUsers'] != null ? map['ReadUsers'].cast<String>().toList() : null,
  1452. rootOrganizationCode: map['RootOrganizationCode'],
  1453. organizationCode: map['OrganizationCode'],
  1454. associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast<String>().toList() : null,
  1455. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  1456. diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1457. isCollecting: map['IsCollecting'],
  1458. startCollectingTime: map['StartCollectingTime'] != null ? DateTime.parse(map['StartCollectingTime']) : null,
  1459. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1460. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1461. );
  1462. }
  1463. Map<String, dynamic> toJson() {
  1464. final map = super.toJson();
  1465. if(recordCode != null)
  1466. map['RecordCode'] = recordCode;
  1467. if(patientCode != null)
  1468. map['PatientCode'] = patientCode;
  1469. if(deviceCode != null)
  1470. map['DeviceCode'] = deviceCode;
  1471. map['RecordStatus'] = recordStatus.index;
  1472. if(creatorCode != null)
  1473. map['CreatorCode'] = creatorCode;
  1474. if(tags != null)
  1475. map['Tags'] = tags;
  1476. map['CreateType'] = createType.index;
  1477. if(patientInfo != null)
  1478. map['PatientInfo'] = patientInfo;
  1479. if(patientInfoExtList != null)
  1480. map['PatientInfoExtList'] = patientInfoExtList;
  1481. if(devicePatientID != null)
  1482. map['DevicePatientID'] = devicePatientID;
  1483. if(patientType != null)
  1484. map['PatientType'] = patientType;
  1485. if(readUsers != null)
  1486. map['ReadUsers'] = readUsers;
  1487. if(rootOrganizationCode != null)
  1488. map['RootOrganizationCode'] = rootOrganizationCode;
  1489. if(organizationCode != null)
  1490. map['OrganizationCode'] = organizationCode;
  1491. if(associatedExamCodes != null)
  1492. map['AssociatedExamCodes'] = associatedExamCodes;
  1493. map['DiagnosisStatus'] = diagnosisStatus.index;
  1494. if(diagnosisInfos != null)
  1495. map['DiagnosisInfos'] = diagnosisInfos;
  1496. map['IsCollecting'] = isCollecting;
  1497. if(startCollectingTime != null)
  1498. map['StartCollectingTime'] = JsonRpcUtils.dateFormat(startCollectingTime!);
  1499. return map;
  1500. }
  1501. }
  1502. class RecordData {
  1503. String? patientName;
  1504. String? patientCode;
  1505. List<RecordInfoDTO >? recordItemList;
  1506. RecordData({
  1507. this.patientName,
  1508. this.patientCode,
  1509. this.recordItemList,
  1510. });
  1511. factory RecordData.fromJson(Map<String, dynamic> map) {
  1512. return RecordData(
  1513. patientName: map['PatientName'],
  1514. patientCode: map['PatientCode'],
  1515. recordItemList: map['RecordItemList'] != null ? (map['RecordItemList'] as List).map((e)=>RecordInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1516. );
  1517. }
  1518. Map<String, dynamic> toJson() {
  1519. final map = Map<String, dynamic>();
  1520. if(patientName != null)
  1521. map['PatientName'] = patientName;
  1522. if(patientCode != null)
  1523. map['PatientCode'] = patientCode;
  1524. if(recordItemList != null)
  1525. map['RecordItemList'] = recordItemList;
  1526. return map;
  1527. }
  1528. }
  1529. class ReportItem {
  1530. String? recordCode;
  1531. String? reportCode;
  1532. String? fileToken;
  1533. ReportItem({
  1534. this.recordCode,
  1535. this.reportCode,
  1536. this.fileToken,
  1537. });
  1538. factory ReportItem.fromJson(Map<String, dynamic> map) {
  1539. return ReportItem(
  1540. recordCode: map['RecordCode'],
  1541. reportCode: map['ReportCode'],
  1542. fileToken: map['FileToken'],
  1543. );
  1544. }
  1545. Map<String, dynamic> toJson() {
  1546. final map = Map<String, dynamic>();
  1547. if(recordCode != null)
  1548. map['RecordCode'] = recordCode;
  1549. if(reportCode != null)
  1550. map['ReportCode'] = reportCode;
  1551. if(fileToken != null)
  1552. map['FileToken'] = fileToken;
  1553. return map;
  1554. }
  1555. }
  1556. class ReportData {
  1557. String? patientName;
  1558. String? patientCode;
  1559. List<ReportItem >? reportItemList;
  1560. ReportData({
  1561. this.patientName,
  1562. this.patientCode,
  1563. this.reportItemList,
  1564. });
  1565. factory ReportData.fromJson(Map<String, dynamic> map) {
  1566. return ReportData(
  1567. patientName: map['PatientName'],
  1568. patientCode: map['PatientCode'],
  1569. reportItemList: map['ReportItemList'] != null ? (map['ReportItemList'] as List).map((e)=>ReportItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1570. );
  1571. }
  1572. Map<String, dynamic> toJson() {
  1573. final map = Map<String, dynamic>();
  1574. if(patientName != null)
  1575. map['PatientName'] = patientName;
  1576. if(patientCode != null)
  1577. map['PatientCode'] = patientCode;
  1578. if(reportItemList != null)
  1579. map['ReportItemList'] = reportItemList;
  1580. return map;
  1581. }
  1582. }
  1583. class RemedicalItem {
  1584. String? recordCode;
  1585. String? fileToken;
  1586. RemedicalFileDataTypeEnum fileDataType;
  1587. RemedicalItem({
  1588. this.recordCode,
  1589. this.fileToken,
  1590. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1591. });
  1592. factory RemedicalItem.fromJson(Map<String, dynamic> map) {
  1593. return RemedicalItem(
  1594. recordCode: map['RecordCode'],
  1595. fileToken: map['FileToken'],
  1596. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1597. );
  1598. }
  1599. Map<String, dynamic> toJson() {
  1600. final map = Map<String, dynamic>();
  1601. if(recordCode != null)
  1602. map['RecordCode'] = recordCode;
  1603. if(fileToken != null)
  1604. map['FileToken'] = fileToken;
  1605. map['FileDataType'] = fileDataType.index;
  1606. return map;
  1607. }
  1608. }
  1609. class RemedicalData {
  1610. String? patientName;
  1611. String? patientCode;
  1612. List<RemedicalItem >? remedicalItemList;
  1613. RemedicalData({
  1614. this.patientName,
  1615. this.patientCode,
  1616. this.remedicalItemList,
  1617. });
  1618. factory RemedicalData.fromJson(Map<String, dynamic> map) {
  1619. return RemedicalData(
  1620. patientName: map['PatientName'],
  1621. patientCode: map['PatientCode'],
  1622. remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1623. );
  1624. }
  1625. Map<String, dynamic> toJson() {
  1626. final map = Map<String, dynamic>();
  1627. if(patientName != null)
  1628. map['PatientName'] = patientName;
  1629. if(patientCode != null)
  1630. map['PatientCode'] = patientCode;
  1631. if(remedicalItemList != null)
  1632. map['RemedicalItemList'] = remedicalItemList;
  1633. return map;
  1634. }
  1635. }
  1636. class ExportRemedicalDataResult {
  1637. List<RecordData >? recordList;
  1638. List<ReportData >? reportList;
  1639. List<RemedicalData >? remedicalList;
  1640. ExportRemedicalDataResult({
  1641. this.recordList,
  1642. this.reportList,
  1643. this.remedicalList,
  1644. });
  1645. factory ExportRemedicalDataResult.fromJson(Map<String, dynamic> map) {
  1646. return ExportRemedicalDataResult(
  1647. recordList: map['RecordList'] != null ? (map['RecordList'] as List).map((e)=>RecordData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1648. reportList: map['ReportList'] != null ? (map['ReportList'] as List).map((e)=>ReportData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1649. remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1650. );
  1651. }
  1652. Map<String, dynamic> toJson() {
  1653. final map = Map<String, dynamic>();
  1654. if(recordList != null)
  1655. map['RecordList'] = recordList;
  1656. if(reportList != null)
  1657. map['ReportList'] = reportList;
  1658. if(remedicalList != null)
  1659. map['RemedicalList'] = remedicalList;
  1660. return map;
  1661. }
  1662. }
  1663. class ExportRemedicalDataRequest extends TokenRequest{
  1664. DateTime? startTime;
  1665. DateTime? endTime;
  1666. bool isExportReport;
  1667. bool isExportRecord;
  1668. bool isExportRemedicalData;
  1669. List<String >? patientCodes;
  1670. ExportRemedicalDataRequest({
  1671. this.startTime,
  1672. this.endTime,
  1673. this.isExportReport = false,
  1674. this.isExportRecord = false,
  1675. this.isExportRemedicalData = false,
  1676. this.patientCodes,
  1677. String? token,
  1678. }) : super(
  1679. token: token,
  1680. );
  1681. factory ExportRemedicalDataRequest.fromJson(Map<String, dynamic> map) {
  1682. return ExportRemedicalDataRequest(
  1683. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  1684. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  1685. isExportReport: map['IsExportReport'],
  1686. isExportRecord: map['IsExportRecord'],
  1687. isExportRemedicalData: map['IsExportRemedicalData'],
  1688. patientCodes: map['PatientCodes'] != null ? map['PatientCodes'].cast<String>().toList() : null,
  1689. token: map['Token'],
  1690. );
  1691. }
  1692. Map<String, dynamic> toJson() {
  1693. final map = super.toJson();
  1694. if(startTime != null)
  1695. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  1696. if(endTime != null)
  1697. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  1698. map['IsExportReport'] = isExportReport;
  1699. map['IsExportRecord'] = isExportRecord;
  1700. map['IsExportRemedicalData'] = isExportRemedicalData;
  1701. if(patientCodes != null)
  1702. map['PatientCodes'] = patientCodes;
  1703. return map;
  1704. }
  1705. }
  1706. class FindCacheByCodeRequest extends TokenRequest{
  1707. String? cacheCode;
  1708. FindCacheByCodeRequest({
  1709. this.cacheCode,
  1710. String? token,
  1711. }) : super(
  1712. token: token,
  1713. );
  1714. factory FindCacheByCodeRequest.fromJson(Map<String, dynamic> map) {
  1715. return FindCacheByCodeRequest(
  1716. cacheCode: map['CacheCode'],
  1717. token: map['Token'],
  1718. );
  1719. }
  1720. Map<String, dynamic> toJson() {
  1721. final map = super.toJson();
  1722. if(cacheCode != null)
  1723. map['CacheCode'] = cacheCode;
  1724. return map;
  1725. }
  1726. }
  1727. class CreateReferralRecordRequest extends TokenRequest{
  1728. String? patientCode;
  1729. String? subjectMatter;
  1730. String? referralOrganizationCode;
  1731. String? referralUserCode;
  1732. String? referralRecordCode;
  1733. CreateReferralRecordRequest({
  1734. this.patientCode,
  1735. this.subjectMatter,
  1736. this.referralOrganizationCode,
  1737. this.referralUserCode,
  1738. this.referralRecordCode,
  1739. String? token,
  1740. }) : super(
  1741. token: token,
  1742. );
  1743. factory CreateReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1744. return CreateReferralRecordRequest(
  1745. patientCode: map['PatientCode'],
  1746. subjectMatter: map['SubjectMatter'],
  1747. referralOrganizationCode: map['ReferralOrganizationCode'],
  1748. referralUserCode: map['ReferralUserCode'],
  1749. referralRecordCode: map['ReferralRecordCode'],
  1750. token: map['Token'],
  1751. );
  1752. }
  1753. Map<String, dynamic> toJson() {
  1754. final map = super.toJson();
  1755. if(patientCode != null)
  1756. map['PatientCode'] = patientCode;
  1757. if(subjectMatter != null)
  1758. map['SubjectMatter'] = subjectMatter;
  1759. if(referralOrganizationCode != null)
  1760. map['ReferralOrganizationCode'] = referralOrganizationCode;
  1761. if(referralUserCode != null)
  1762. map['ReferralUserCode'] = referralUserCode;
  1763. if(referralRecordCode != null)
  1764. map['ReferralRecordCode'] = referralRecordCode;
  1765. return map;
  1766. }
  1767. }
  1768. class ModifyReferralRecordRequest extends TokenRequest{
  1769. String? patientCode;
  1770. String? subjectMatter;
  1771. String? referralOrganizationCode;
  1772. String? referralUserCode;
  1773. String? referralRecordCode;
  1774. ModifyReferralRecordRequest({
  1775. this.patientCode,
  1776. this.subjectMatter,
  1777. this.referralOrganizationCode,
  1778. this.referralUserCode,
  1779. this.referralRecordCode,
  1780. String? token,
  1781. }) : super(
  1782. token: token,
  1783. );
  1784. factory ModifyReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1785. return ModifyReferralRecordRequest(
  1786. patientCode: map['PatientCode'],
  1787. subjectMatter: map['SubjectMatter'],
  1788. referralOrganizationCode: map['ReferralOrganizationCode'],
  1789. referralUserCode: map['ReferralUserCode'],
  1790. referralRecordCode: map['ReferralRecordCode'],
  1791. token: map['Token'],
  1792. );
  1793. }
  1794. Map<String, dynamic> toJson() {
  1795. final map = super.toJson();
  1796. if(patientCode != null)
  1797. map['PatientCode'] = patientCode;
  1798. if(subjectMatter != null)
  1799. map['SubjectMatter'] = subjectMatter;
  1800. if(referralOrganizationCode != null)
  1801. map['ReferralOrganizationCode'] = referralOrganizationCode;
  1802. if(referralUserCode != null)
  1803. map['ReferralUserCode'] = referralUserCode;
  1804. if(referralRecordCode != null)
  1805. map['ReferralRecordCode'] = referralRecordCode;
  1806. return map;
  1807. }
  1808. }
  1809. class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{
  1810. String? code;
  1811. String? outUserName;
  1812. String? inUserName;
  1813. QueryReferralRecordPageDTO({
  1814. this.code,
  1815. this.outUserName,
  1816. this.inUserName,
  1817. String? patientCode,
  1818. bool isValid = false,
  1819. List<DataItemDTO >? patientData,
  1820. int unReadRecordCount = 0,
  1821. bool isReferral = false,
  1822. List<String >? devicePatientIDs,
  1823. DateTime? createTime,
  1824. DateTime? updateTime,
  1825. }) : super(
  1826. patientCode: patientCode,
  1827. isValid: isValid,
  1828. patientData: patientData,
  1829. unReadRecordCount: unReadRecordCount,
  1830. isReferral: isReferral,
  1831. devicePatientIDs: devicePatientIDs,
  1832. createTime: createTime,
  1833. updateTime: updateTime,
  1834. );
  1835. factory QueryReferralRecordPageDTO.fromJson(Map<String, dynamic> map) {
  1836. return QueryReferralRecordPageDTO(
  1837. code: map['Code'],
  1838. outUserName: map['OutUserName'],
  1839. inUserName: map['InUserName'],
  1840. patientCode: map['PatientCode'],
  1841. isValid: map['IsValid'],
  1842. patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1843. unReadRecordCount: map['UnReadRecordCount'],
  1844. isReferral: map['IsReferral'],
  1845. devicePatientIDs: map['DevicePatientIDs'] != null ? map['DevicePatientIDs'].cast<String>().toList() : null,
  1846. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1847. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1848. );
  1849. }
  1850. Map<String, dynamic> toJson() {
  1851. final map = super.toJson();
  1852. if(code != null)
  1853. map['Code'] = code;
  1854. if(outUserName != null)
  1855. map['OutUserName'] = outUserName;
  1856. if(inUserName != null)
  1857. map['InUserName'] = inUserName;
  1858. return map;
  1859. }
  1860. }
  1861. class QueryReferralRecordListRequest extends PageRequest{
  1862. String? keyWord;
  1863. DateTime? startTime;
  1864. DateTime? endTime;
  1865. PatientValidStatusEnum isValid;
  1866. QueryReferralRecordListRequest({
  1867. this.keyWord,
  1868. this.startTime,
  1869. this.endTime,
  1870. this.isValid = PatientValidStatusEnum.All,
  1871. int pageIndex = 0,
  1872. int pageSize = 0,
  1873. String? token,
  1874. }) : super(
  1875. pageIndex: pageIndex,
  1876. pageSize: pageSize,
  1877. token: token,
  1878. );
  1879. factory QueryReferralRecordListRequest.fromJson(Map<String, dynamic> map) {
  1880. return QueryReferralRecordListRequest(
  1881. keyWord: map['KeyWord'],
  1882. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  1883. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  1884. isValid: PatientValidStatusEnum.values.firstWhere((e) => e.index == map['IsValid']),
  1885. pageIndex: map['PageIndex'],
  1886. pageSize: map['PageSize'],
  1887. token: map['Token'],
  1888. );
  1889. }
  1890. Map<String, dynamic> toJson() {
  1891. final map = super.toJson();
  1892. if(keyWord != null)
  1893. map['KeyWord'] = keyWord;
  1894. if(startTime != null)
  1895. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  1896. if(endTime != null)
  1897. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  1898. map['IsValid'] = isValid.index;
  1899. return map;
  1900. }
  1901. }
  1902. class AuditReferralRecordRequest extends TokenRequest{
  1903. String? referralRecordCode;
  1904. bool isReceive;
  1905. String? rejectReason;
  1906. AuditReferralRecordRequest({
  1907. this.referralRecordCode,
  1908. this.isReceive = false,
  1909. this.rejectReason,
  1910. String? token,
  1911. }) : super(
  1912. token: token,
  1913. );
  1914. factory AuditReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1915. return AuditReferralRecordRequest(
  1916. referralRecordCode: map['ReferralRecordCode'],
  1917. isReceive: map['IsReceive'],
  1918. rejectReason: map['RejectReason'],
  1919. token: map['Token'],
  1920. );
  1921. }
  1922. Map<String, dynamic> toJson() {
  1923. final map = super.toJson();
  1924. if(referralRecordCode != null)
  1925. map['ReferralRecordCode'] = referralRecordCode;
  1926. map['IsReceive'] = isReceive;
  1927. if(rejectReason != null)
  1928. map['RejectReason'] = rejectReason;
  1929. return map;
  1930. }
  1931. }
  1932. class WithdrawReferralRecordRequest extends TokenRequest{
  1933. String? referralRecordCode;
  1934. WithdrawReferralRecordRequest({
  1935. this.referralRecordCode,
  1936. String? token,
  1937. }) : super(
  1938. token: token,
  1939. );
  1940. factory WithdrawReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1941. return WithdrawReferralRecordRequest(
  1942. referralRecordCode: map['ReferralRecordCode'],
  1943. token: map['Token'],
  1944. );
  1945. }
  1946. Map<String, dynamic> toJson() {
  1947. final map = super.toJson();
  1948. if(referralRecordCode != null)
  1949. map['ReferralRecordCode'] = referralRecordCode;
  1950. return map;
  1951. }
  1952. }
  1953. class ReferralOrganizationsQueryRequest extends TokenRequest{
  1954. String? keyword;
  1955. ReferralOrganizationsQueryRequest({
  1956. this.keyword,
  1957. String? token,
  1958. }) : super(
  1959. token: token,
  1960. );
  1961. factory ReferralOrganizationsQueryRequest.fromJson(Map<String, dynamic> map) {
  1962. return ReferralOrganizationsQueryRequest(
  1963. keyword: map['Keyword'],
  1964. token: map['Token'],
  1965. );
  1966. }
  1967. Map<String, dynamic> toJson() {
  1968. final map = super.toJson();
  1969. if(keyword != null)
  1970. map['Keyword'] = keyword;
  1971. return map;
  1972. }
  1973. }
  1974. class QueryReferralPatientByCodeRequest extends FindPatientByCodeRequest{
  1975. String? referralRecordCode;
  1976. QueryReferralPatientByCodeRequest({
  1977. this.referralRecordCode,
  1978. String? code,
  1979. String? token,
  1980. }) : super(
  1981. code: code,
  1982. token: token,
  1983. );
  1984. factory QueryReferralPatientByCodeRequest.fromJson(Map<String, dynamic> map) {
  1985. return QueryReferralPatientByCodeRequest(
  1986. referralRecordCode: map['ReferralRecordCode'],
  1987. code: map['Code'],
  1988. token: map['Token'],
  1989. );
  1990. }
  1991. Map<String, dynamic> toJson() {
  1992. final map = super.toJson();
  1993. if(referralRecordCode != null)
  1994. map['ReferralRecordCode'] = referralRecordCode;
  1995. return map;
  1996. }
  1997. }
  1998. class CreateReportClass {
  1999. String? referralCode;
  2000. String? creatorCode;
  2001. String? reportCode;
  2002. CreateReportClass({
  2003. this.referralCode,
  2004. this.creatorCode,
  2005. this.reportCode,
  2006. });
  2007. factory CreateReportClass.fromJson(Map<String, dynamic> map) {
  2008. return CreateReportClass(
  2009. referralCode: map['ReferralCode'],
  2010. creatorCode: map['CreatorCode'],
  2011. reportCode: map['ReportCode'],
  2012. );
  2013. }
  2014. Map<String, dynamic> toJson() {
  2015. final map = Map<String, dynamic>();
  2016. if(referralCode != null)
  2017. map['ReferralCode'] = referralCode;
  2018. if(creatorCode != null)
  2019. map['CreatorCode'] = creatorCode;
  2020. if(reportCode != null)
  2021. map['ReportCode'] = reportCode;
  2022. return map;
  2023. }
  2024. }
  2025. class ReferralRecordDTO extends BaseDTO{
  2026. String? code;
  2027. String? patientCode;
  2028. DateTime? referralOutTime;
  2029. String? referralOutOrganizationCode;
  2030. String? subjectMatter;
  2031. String? creator;
  2032. String? referralInOrganizationCode;
  2033. String? referralInUserCode;
  2034. ReferralStatusEnum referralStatus;
  2035. String? rejectReason;
  2036. List<String >? referralCodeList;
  2037. PatientInfoDTO? patientInfo;
  2038. List<String >? recordCodeList;
  2039. List<String >? reportCodeList;
  2040. List<String >? remedicalDataCodeList;
  2041. List<CreateReportClass >? createReportCodeList;
  2042. ReferralRecordDTO({
  2043. this.code,
  2044. this.patientCode,
  2045. this.referralOutTime,
  2046. this.referralOutOrganizationCode,
  2047. this.subjectMatter,
  2048. this.creator,
  2049. this.referralInOrganizationCode,
  2050. this.referralInUserCode,
  2051. this.referralStatus = ReferralStatusEnum.Wait,
  2052. this.rejectReason,
  2053. this.referralCodeList,
  2054. this.patientInfo,
  2055. this.recordCodeList,
  2056. this.reportCodeList,
  2057. this.remedicalDataCodeList,
  2058. this.createReportCodeList,
  2059. DateTime? createTime,
  2060. DateTime? updateTime,
  2061. }) : super(
  2062. createTime: createTime,
  2063. updateTime: updateTime,
  2064. );
  2065. factory ReferralRecordDTO.fromJson(Map<String, dynamic> map) {
  2066. return ReferralRecordDTO(
  2067. code: map['Code'],
  2068. patientCode: map['PatientCode'],
  2069. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2070. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2071. subjectMatter: map['SubjectMatter'],
  2072. creator: map['Creator'],
  2073. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2074. referralInUserCode: map['ReferralInUserCode'],
  2075. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2076. rejectReason: map['RejectReason'],
  2077. referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
  2078. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2079. recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
  2080. reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
  2081. remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
  2082. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2083. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2084. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2085. );
  2086. }
  2087. Map<String, dynamic> toJson() {
  2088. final map = super.toJson();
  2089. if(code != null)
  2090. map['Code'] = code;
  2091. if(patientCode != null)
  2092. map['PatientCode'] = patientCode;
  2093. if(referralOutTime != null)
  2094. map['ReferralOutTime'] = JsonRpcUtils.dateFormat(referralOutTime!);
  2095. if(referralOutOrganizationCode != null)
  2096. map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
  2097. if(subjectMatter != null)
  2098. map['SubjectMatter'] = subjectMatter;
  2099. if(creator != null)
  2100. map['Creator'] = creator;
  2101. if(referralInOrganizationCode != null)
  2102. map['ReferralInOrganizationCode'] = referralInOrganizationCode;
  2103. if(referralInUserCode != null)
  2104. map['ReferralInUserCode'] = referralInUserCode;
  2105. map['ReferralStatus'] = referralStatus.index;
  2106. if(rejectReason != null)
  2107. map['RejectReason'] = rejectReason;
  2108. if(referralCodeList != null)
  2109. map['ReferralCodeList'] = referralCodeList;
  2110. if(patientInfo != null)
  2111. map['PatientInfo'] = patientInfo;
  2112. if(recordCodeList != null)
  2113. map['RecordCodeList'] = recordCodeList;
  2114. if(reportCodeList != null)
  2115. map['ReportCodeList'] = reportCodeList;
  2116. if(remedicalDataCodeList != null)
  2117. map['RemedicalDataCodeList'] = remedicalDataCodeList;
  2118. if(createReportCodeList != null)
  2119. map['CreateReportCodeList'] = createReportCodeList;
  2120. return map;
  2121. }
  2122. }
  2123. class ReferralRecordDetailDTO extends ReferralRecordDTO{
  2124. String? referralOutOrganizationName;
  2125. String? creatorName;
  2126. String? referralInOrganizationName;
  2127. String? referralInUserName;
  2128. ReferralRecordDetailDTO({
  2129. this.referralOutOrganizationName,
  2130. this.creatorName,
  2131. this.referralInOrganizationName,
  2132. this.referralInUserName,
  2133. String? code,
  2134. String? patientCode,
  2135. DateTime? referralOutTime,
  2136. String? referralOutOrganizationCode,
  2137. String? subjectMatter,
  2138. String? creator,
  2139. String? referralInOrganizationCode,
  2140. String? referralInUserCode,
  2141. ReferralStatusEnum referralStatus = ReferralStatusEnum.Wait,
  2142. String? rejectReason,
  2143. List<String >? referralCodeList,
  2144. PatientInfoDTO? patientInfo,
  2145. List<String >? recordCodeList,
  2146. List<String >? reportCodeList,
  2147. List<String >? remedicalDataCodeList,
  2148. List<CreateReportClass >? createReportCodeList,
  2149. DateTime? createTime,
  2150. DateTime? updateTime,
  2151. }) : super(
  2152. code: code,
  2153. patientCode: patientCode,
  2154. referralOutTime: referralOutTime,
  2155. referralOutOrganizationCode: referralOutOrganizationCode,
  2156. subjectMatter: subjectMatter,
  2157. creator: creator,
  2158. referralInOrganizationCode: referralInOrganizationCode,
  2159. referralInUserCode: referralInUserCode,
  2160. referralStatus: referralStatus,
  2161. rejectReason: rejectReason,
  2162. referralCodeList: referralCodeList,
  2163. patientInfo: patientInfo,
  2164. recordCodeList: recordCodeList,
  2165. reportCodeList: reportCodeList,
  2166. remedicalDataCodeList: remedicalDataCodeList,
  2167. createReportCodeList: createReportCodeList,
  2168. createTime: createTime,
  2169. updateTime: updateTime,
  2170. );
  2171. factory ReferralRecordDetailDTO.fromJson(Map<String, dynamic> map) {
  2172. return ReferralRecordDetailDTO(
  2173. referralOutOrganizationName: map['ReferralOutOrganizationName'],
  2174. creatorName: map['CreatorName'],
  2175. referralInOrganizationName: map['ReferralInOrganizationName'],
  2176. referralInUserName: map['ReferralInUserName'],
  2177. code: map['Code'],
  2178. patientCode: map['PatientCode'],
  2179. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2180. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2181. subjectMatter: map['SubjectMatter'],
  2182. creator: map['Creator'],
  2183. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2184. referralInUserCode: map['ReferralInUserCode'],
  2185. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2186. rejectReason: map['RejectReason'],
  2187. referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
  2188. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2189. recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
  2190. reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
  2191. remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
  2192. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2193. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2194. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2195. );
  2196. }
  2197. Map<String, dynamic> toJson() {
  2198. final map = super.toJson();
  2199. if(referralOutOrganizationName != null)
  2200. map['ReferralOutOrganizationName'] = referralOutOrganizationName;
  2201. if(creatorName != null)
  2202. map['CreatorName'] = creatorName;
  2203. if(referralInOrganizationName != null)
  2204. map['ReferralInOrganizationName'] = referralInOrganizationName;
  2205. if(referralInUserName != null)
  2206. map['ReferralInUserName'] = referralInUserName;
  2207. return map;
  2208. }
  2209. }
  2210. class FindPatientReferralRecordRequest extends TokenRequest{
  2211. String? patientCode;
  2212. FindPatientReferralRecordRequest({
  2213. this.patientCode,
  2214. String? token,
  2215. }) : super(
  2216. token: token,
  2217. );
  2218. factory FindPatientReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2219. return FindPatientReferralRecordRequest(
  2220. patientCode: map['PatientCode'],
  2221. token: map['Token'],
  2222. );
  2223. }
  2224. Map<String, dynamic> toJson() {
  2225. final map = super.toJson();
  2226. if(patientCode != null)
  2227. map['PatientCode'] = patientCode;
  2228. return map;
  2229. }
  2230. }
  2231. class FindReferralInRecordRequest extends TokenRequest{
  2232. String? referralRecordCode;
  2233. FindReferralInRecordRequest({
  2234. this.referralRecordCode,
  2235. String? token,
  2236. }) : super(
  2237. token: token,
  2238. );
  2239. factory FindReferralInRecordRequest.fromJson(Map<String, dynamic> map) {
  2240. return FindReferralInRecordRequest(
  2241. referralRecordCode: map['ReferralRecordCode'],
  2242. token: map['Token'],
  2243. );
  2244. }
  2245. Map<String, dynamic> toJson() {
  2246. final map = super.toJson();
  2247. if(referralRecordCode != null)
  2248. map['ReferralRecordCode'] = referralRecordCode;
  2249. return map;
  2250. }
  2251. }
  2252. class QueryReferralRecordsPageRequest extends GetRecordsPageRequest{
  2253. String? referralRecordCode;
  2254. QueryReferralRecordsPageRequest({
  2255. this.referralRecordCode,
  2256. String? patientCode,
  2257. QueryRecordStatusEnum queryRecordStatus = QueryRecordStatusEnum.All,
  2258. QueryRecordCreateTypeEnum queryRecordCreateType = QueryRecordCreateTypeEnum.All,
  2259. int pageIndex = 0,
  2260. int pageSize = 0,
  2261. String? token,
  2262. }) : super(
  2263. patientCode: patientCode,
  2264. queryRecordStatus: queryRecordStatus,
  2265. queryRecordCreateType: queryRecordCreateType,
  2266. pageIndex: pageIndex,
  2267. pageSize: pageSize,
  2268. token: token,
  2269. );
  2270. factory QueryReferralRecordsPageRequest.fromJson(Map<String, dynamic> map) {
  2271. return QueryReferralRecordsPageRequest(
  2272. referralRecordCode: map['ReferralRecordCode'],
  2273. patientCode: map['PatientCode'],
  2274. queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
  2275. queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
  2276. pageIndex: map['PageIndex'],
  2277. pageSize: map['PageSize'],
  2278. token: map['Token'],
  2279. );
  2280. }
  2281. Map<String, dynamic> toJson() {
  2282. final map = super.toJson();
  2283. if(referralRecordCode != null)
  2284. map['ReferralRecordCode'] = referralRecordCode;
  2285. return map;
  2286. }
  2287. }
  2288. class ReportPreviewDTO {
  2289. String? fileToken;
  2290. String? thumbnailToken;
  2291. String? language;
  2292. UploadFileTypeEnum fileType;
  2293. ReportPreviewDTO({
  2294. this.fileToken,
  2295. this.thumbnailToken,
  2296. this.language,
  2297. this.fileType = UploadFileTypeEnum.Unknown,
  2298. });
  2299. factory ReportPreviewDTO.fromJson(Map<String, dynamic> map) {
  2300. return ReportPreviewDTO(
  2301. fileToken: map['FileToken'],
  2302. thumbnailToken: map['ThumbnailToken'],
  2303. language: map['Language'],
  2304. fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
  2305. );
  2306. }
  2307. Map<String, dynamic> toJson() {
  2308. final map = Map<String, dynamic>();
  2309. if(fileToken != null)
  2310. map['FileToken'] = fileToken;
  2311. if(thumbnailToken != null)
  2312. map['ThumbnailToken'] = thumbnailToken;
  2313. if(language != null)
  2314. map['Language'] = language;
  2315. map['FileType'] = fileType.index;
  2316. return map;
  2317. }
  2318. }
  2319. enum ReportTypeEnum {
  2320. RemoteDiagnosis,
  2321. LiveConsultation,
  2322. }
  2323. class ReportBaseDTO extends BaseDTO{
  2324. String? reportCode;
  2325. String? recordCode;
  2326. String? reportUserCode;
  2327. String? deviceCode;
  2328. String? patientCode;
  2329. String? patientId;
  2330. String? patientName;
  2331. List<String >? reportLabels;
  2332. List<String >? platformLabels;
  2333. List<String >? diagnosisLabels;
  2334. DiagnosisOrganEnum reportOrgan;
  2335. DateTime? reportTime;
  2336. String? reportUserName;
  2337. List<ReportPreviewDTO >? reportPreviewList;
  2338. String? referralRecordCode;
  2339. ReportTypeEnum reportType;
  2340. ReportBaseDTO({
  2341. this.reportCode,
  2342. this.recordCode,
  2343. this.reportUserCode,
  2344. this.deviceCode,
  2345. this.patientCode,
  2346. this.patientId,
  2347. this.patientName,
  2348. this.reportLabels,
  2349. this.platformLabels,
  2350. this.diagnosisLabels,
  2351. this.reportOrgan = DiagnosisOrganEnum.Null,
  2352. this.reportTime,
  2353. this.reportUserName,
  2354. this.reportPreviewList,
  2355. this.referralRecordCode,
  2356. this.reportType = ReportTypeEnum.RemoteDiagnosis,
  2357. DateTime? createTime,
  2358. DateTime? updateTime,
  2359. }) : super(
  2360. createTime: createTime,
  2361. updateTime: updateTime,
  2362. );
  2363. factory ReportBaseDTO.fromJson(Map<String, dynamic> map) {
  2364. return ReportBaseDTO(
  2365. reportCode: map['ReportCode'],
  2366. recordCode: map['RecordCode'],
  2367. reportUserCode: map['ReportUserCode'],
  2368. deviceCode: map['DeviceCode'],
  2369. patientCode: map['PatientCode'],
  2370. patientId: map['PatientId'],
  2371. patientName: map['PatientName'],
  2372. reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
  2373. platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
  2374. diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
  2375. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2376. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2377. reportUserName: map['ReportUserName'],
  2378. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2379. referralRecordCode: map['ReferralRecordCode'],
  2380. reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
  2381. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2382. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2383. );
  2384. }
  2385. Map<String, dynamic> toJson() {
  2386. final map = super.toJson();
  2387. if(reportCode != null)
  2388. map['ReportCode'] = reportCode;
  2389. if(recordCode != null)
  2390. map['RecordCode'] = recordCode;
  2391. if(reportUserCode != null)
  2392. map['ReportUserCode'] = reportUserCode;
  2393. if(deviceCode != null)
  2394. map['DeviceCode'] = deviceCode;
  2395. if(patientCode != null)
  2396. map['PatientCode'] = patientCode;
  2397. if(patientId != null)
  2398. map['PatientId'] = patientId;
  2399. if(patientName != null)
  2400. map['PatientName'] = patientName;
  2401. if(reportLabels != null)
  2402. map['ReportLabels'] = reportLabels;
  2403. if(platformLabels != null)
  2404. map['PlatformLabels'] = platformLabels;
  2405. if(diagnosisLabels != null)
  2406. map['DiagnosisLabels'] = diagnosisLabels;
  2407. map['ReportOrgan'] = reportOrgan.index;
  2408. if(reportTime != null)
  2409. map['ReportTime'] = JsonRpcUtils.dateFormat(reportTime!);
  2410. if(reportUserName != null)
  2411. map['ReportUserName'] = reportUserName;
  2412. if(reportPreviewList != null)
  2413. map['ReportPreviewList'] = reportPreviewList;
  2414. if(referralRecordCode != null)
  2415. map['ReferralRecordCode'] = referralRecordCode;
  2416. map['ReportType'] = reportType.index;
  2417. return map;
  2418. }
  2419. }
  2420. class ReportDTO extends ReportBaseDTO{
  2421. String? reportTemplateJson;
  2422. String? reportDatasJson;
  2423. String? encryptPatientName;
  2424. bool canEditReport;
  2425. String? deviceName;
  2426. String? reportTemplateName;
  2427. DateTime? examDate;
  2428. ReportDTO({
  2429. this.reportTemplateJson,
  2430. this.reportDatasJson,
  2431. this.encryptPatientName,
  2432. this.canEditReport = false,
  2433. this.deviceName,
  2434. this.reportTemplateName,
  2435. this.examDate,
  2436. String? reportCode,
  2437. String? recordCode,
  2438. String? reportUserCode,
  2439. String? deviceCode,
  2440. String? patientCode,
  2441. String? patientId,
  2442. String? patientName,
  2443. List<String >? reportLabels,
  2444. List<String >? platformLabels,
  2445. List<String >? diagnosisLabels,
  2446. DiagnosisOrganEnum reportOrgan = DiagnosisOrganEnum.Null,
  2447. DateTime? reportTime,
  2448. String? reportUserName,
  2449. List<ReportPreviewDTO >? reportPreviewList,
  2450. String? referralRecordCode,
  2451. ReportTypeEnum reportType = ReportTypeEnum.RemoteDiagnosis,
  2452. DateTime? createTime,
  2453. DateTime? updateTime,
  2454. }) : super(
  2455. reportCode: reportCode,
  2456. recordCode: recordCode,
  2457. reportUserCode: reportUserCode,
  2458. deviceCode: deviceCode,
  2459. patientCode: patientCode,
  2460. patientId: patientId,
  2461. patientName: patientName,
  2462. reportLabels: reportLabels,
  2463. platformLabels: platformLabels,
  2464. diagnosisLabels: diagnosisLabels,
  2465. reportOrgan: reportOrgan,
  2466. reportTime: reportTime,
  2467. reportUserName: reportUserName,
  2468. reportPreviewList: reportPreviewList,
  2469. referralRecordCode: referralRecordCode,
  2470. reportType: reportType,
  2471. createTime: createTime,
  2472. updateTime: updateTime,
  2473. );
  2474. factory ReportDTO.fromJson(Map<String, dynamic> map) {
  2475. return ReportDTO(
  2476. reportTemplateJson: map['ReportTemplateJson'],
  2477. reportDatasJson: map['ReportDatasJson'],
  2478. encryptPatientName: map['EncryptPatientName'],
  2479. canEditReport: map['CanEditReport'],
  2480. deviceName: map['DeviceName'],
  2481. reportTemplateName: map['ReportTemplateName'],
  2482. examDate: map['ExamDate'] != null ? DateTime.parse(map['ExamDate']) : null,
  2483. reportCode: map['ReportCode'],
  2484. recordCode: map['RecordCode'],
  2485. reportUserCode: map['ReportUserCode'],
  2486. deviceCode: map['DeviceCode'],
  2487. patientCode: map['PatientCode'],
  2488. patientId: map['PatientId'],
  2489. patientName: map['PatientName'],
  2490. reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
  2491. platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
  2492. diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
  2493. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2494. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2495. reportUserName: map['ReportUserName'],
  2496. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2497. referralRecordCode: map['ReferralRecordCode'],
  2498. reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
  2499. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2500. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2501. );
  2502. }
  2503. Map<String, dynamic> toJson() {
  2504. final map = super.toJson();
  2505. if(reportTemplateJson != null)
  2506. map['ReportTemplateJson'] = reportTemplateJson;
  2507. if(reportDatasJson != null)
  2508. map['ReportDatasJson'] = reportDatasJson;
  2509. if(encryptPatientName != null)
  2510. map['EncryptPatientName'] = encryptPatientName;
  2511. map['CanEditReport'] = canEditReport;
  2512. if(deviceName != null)
  2513. map['DeviceName'] = deviceName;
  2514. if(reportTemplateName != null)
  2515. map['ReportTemplateName'] = reportTemplateName;
  2516. if(examDate != null)
  2517. map['ExamDate'] = JsonRpcUtils.dateFormat(examDate!);
  2518. return map;
  2519. }
  2520. }
  2521. class FindReportsRequest extends TokenRequest{
  2522. String? recordCode;
  2523. String? languageCode;
  2524. FindReportsRequest({
  2525. this.recordCode,
  2526. this.languageCode,
  2527. String? token,
  2528. }) : super(
  2529. token: token,
  2530. );
  2531. factory FindReportsRequest.fromJson(Map<String, dynamic> map) {
  2532. return FindReportsRequest(
  2533. recordCode: map['RecordCode'],
  2534. languageCode: map['LanguageCode'],
  2535. token: map['Token'],
  2536. );
  2537. }
  2538. Map<String, dynamic> toJson() {
  2539. final map = super.toJson();
  2540. if(recordCode != null)
  2541. map['RecordCode'] = recordCode;
  2542. if(languageCode != null)
  2543. map['LanguageCode'] = languageCode;
  2544. return map;
  2545. }
  2546. }
  2547. class QueryReferralExamReportRequest extends FindReportsRequest{
  2548. String? referralRecordCode;
  2549. QueryReferralExamReportRequest({
  2550. this.referralRecordCode,
  2551. String? recordCode,
  2552. String? languageCode,
  2553. String? token,
  2554. }) : super(
  2555. recordCode: recordCode,
  2556. languageCode: languageCode,
  2557. token: token,
  2558. );
  2559. factory QueryReferralExamReportRequest.fromJson(Map<String, dynamic> map) {
  2560. return QueryReferralExamReportRequest(
  2561. referralRecordCode: map['ReferralRecordCode'],
  2562. recordCode: map['RecordCode'],
  2563. languageCode: map['LanguageCode'],
  2564. token: map['Token'],
  2565. );
  2566. }
  2567. Map<String, dynamic> toJson() {
  2568. final map = super.toJson();
  2569. if(referralRecordCode != null)
  2570. map['ReferralRecordCode'] = referralRecordCode;
  2571. return map;
  2572. }
  2573. }
  2574. class QueryShareExamPageResult {
  2575. String? shareExamPageUrl;
  2576. QueryShareExamPageResult({
  2577. this.shareExamPageUrl,
  2578. });
  2579. factory QueryShareExamPageResult.fromJson(Map<String, dynamic> map) {
  2580. return QueryShareExamPageResult(
  2581. shareExamPageUrl: map['ShareExamPageUrl'],
  2582. );
  2583. }
  2584. Map<String, dynamic> toJson() {
  2585. final map = Map<String, dynamic>();
  2586. if(shareExamPageUrl != null)
  2587. map['ShareExamPageUrl'] = shareExamPageUrl;
  2588. return map;
  2589. }
  2590. }
  2591. class QueryShareExamPageRequest extends TokenRequest{
  2592. String? examFileToken;
  2593. String? languageCode;
  2594. QueryShareExamPageRequest({
  2595. this.examFileToken,
  2596. this.languageCode,
  2597. String? token,
  2598. }) : super(
  2599. token: token,
  2600. );
  2601. factory QueryShareExamPageRequest.fromJson(Map<String, dynamic> map) {
  2602. return QueryShareExamPageRequest(
  2603. examFileToken: map['ExamFileToken'],
  2604. languageCode: map['LanguageCode'],
  2605. token: map['Token'],
  2606. );
  2607. }
  2608. Map<String, dynamic> toJson() {
  2609. final map = super.toJson();
  2610. if(examFileToken != null)
  2611. map['ExamFileToken'] = examFileToken;
  2612. if(languageCode != null)
  2613. map['LanguageCode'] = languageCode;
  2614. return map;
  2615. }
  2616. }
  2617. class MeasureExportDetailDTO {
  2618. int sortNum;
  2619. String? remedicalMeasuredInfoCode;
  2620. MeasureExportDetailDTO({
  2621. this.sortNum = 0,
  2622. this.remedicalMeasuredInfoCode,
  2623. });
  2624. factory MeasureExportDetailDTO.fromJson(Map<String, dynamic> map) {
  2625. return MeasureExportDetailDTO(
  2626. sortNum: map['SortNum'],
  2627. remedicalMeasuredInfoCode: map['RemedicalMeasuredInfoCode'],
  2628. );
  2629. }
  2630. Map<String, dynamic> toJson() {
  2631. final map = Map<String, dynamic>();
  2632. map['SortNum'] = sortNum;
  2633. if(remedicalMeasuredInfoCode != null)
  2634. map['RemedicalMeasuredInfoCode'] = remedicalMeasuredInfoCode;
  2635. return map;
  2636. }
  2637. }
  2638. class BatchExportMeasureResultRequest extends TokenRequest{
  2639. List<MeasureExportDetailDTO >? remedicalMeasuredInfoCodes;
  2640. BusinessTypeEnum businessType;
  2641. String? recordCode;
  2642. String? languageCode;
  2643. BatchExportMeasureResultRequest({
  2644. this.remedicalMeasuredInfoCodes,
  2645. this.businessType = BusinessTypeEnum.RemoteDiagnosis,
  2646. this.recordCode,
  2647. this.languageCode,
  2648. String? token,
  2649. }) : super(
  2650. token: token,
  2651. );
  2652. factory BatchExportMeasureResultRequest.fromJson(Map<String, dynamic> map) {
  2653. return BatchExportMeasureResultRequest(
  2654. remedicalMeasuredInfoCodes: map['RemedicalMeasuredInfoCodes'] != null ? (map['RemedicalMeasuredInfoCodes'] as List).map((e)=>MeasureExportDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2655. businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
  2656. recordCode: map['RecordCode'],
  2657. languageCode: map['LanguageCode'],
  2658. token: map['Token'],
  2659. );
  2660. }
  2661. Map<String, dynamic> toJson() {
  2662. final map = super.toJson();
  2663. if(remedicalMeasuredInfoCodes != null)
  2664. map['RemedicalMeasuredInfoCodes'] = remedicalMeasuredInfoCodes;
  2665. map['BusinessType'] = businessType.index;
  2666. if(recordCode != null)
  2667. map['RecordCode'] = recordCode;
  2668. if(languageCode != null)
  2669. map['LanguageCode'] = languageCode;
  2670. return map;
  2671. }
  2672. }
  2673. class GetRemedicalDiagnosisDataRequest extends TokenRequest{
  2674. String? remedicalCode;
  2675. int frameIndex;
  2676. GetRemedicalDiagnosisDataRequest({
  2677. this.remedicalCode,
  2678. this.frameIndex = 0,
  2679. String? token,
  2680. }) : super(
  2681. token: token,
  2682. );
  2683. factory GetRemedicalDiagnosisDataRequest.fromJson(Map<String, dynamic> map) {
  2684. return GetRemedicalDiagnosisDataRequest(
  2685. remedicalCode: map['RemedicalCode'],
  2686. frameIndex: map['FrameIndex'],
  2687. token: map['Token'],
  2688. );
  2689. }
  2690. Map<String, dynamic> toJson() {
  2691. final map = super.toJson();
  2692. if(remedicalCode != null)
  2693. map['RemedicalCode'] = remedicalCode;
  2694. map['FrameIndex'] = frameIndex;
  2695. return map;
  2696. }
  2697. }
  2698. class RemedicalAISelectedInfoDTO {
  2699. String? remedicalAISelectedInfoCode;
  2700. String? patientCode;
  2701. String? recordCode;
  2702. String? remedicalCode;
  2703. int frameIndex;
  2704. String? userCode;
  2705. String? orginalFileToken;
  2706. String? cdnFileToken;
  2707. String? aIFileToken;
  2708. String? aICdnFileToken;
  2709. RecommendedDownloadModeEnum recommendedDownloadMode;
  2710. String? previewFileToken;
  2711. String? diagnosisData;
  2712. DiagnosisConclusionEnum diagnosisConclusion;
  2713. List<DiagnosisOrganEnum >? diagnosisOrgans;
  2714. RemedicalAISelectedInfoDTO({
  2715. this.remedicalAISelectedInfoCode,
  2716. this.patientCode,
  2717. this.recordCode,
  2718. this.remedicalCode,
  2719. this.frameIndex = 0,
  2720. this.userCode,
  2721. this.orginalFileToken,
  2722. this.cdnFileToken,
  2723. this.aIFileToken,
  2724. this.aICdnFileToken,
  2725. this.recommendedDownloadMode = RecommendedDownloadModeEnum.Origin,
  2726. this.previewFileToken,
  2727. this.diagnosisData,
  2728. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  2729. this.diagnosisOrgans,
  2730. });
  2731. factory RemedicalAISelectedInfoDTO.fromJson(Map<String, dynamic> map) {
  2732. return RemedicalAISelectedInfoDTO(
  2733. remedicalAISelectedInfoCode: map['RemedicalAISelectedInfoCode'],
  2734. patientCode: map['PatientCode'],
  2735. recordCode: map['RecordCode'],
  2736. remedicalCode: map['RemedicalCode'],
  2737. frameIndex: map['FrameIndex'],
  2738. userCode: map['UserCode'],
  2739. orginalFileToken: map['OrginalFileToken'],
  2740. cdnFileToken: map['CdnFileToken'],
  2741. aIFileToken: map['AIFileToken'],
  2742. aICdnFileToken: map['AICdnFileToken'],
  2743. recommendedDownloadMode: RecommendedDownloadModeEnum.values.firstWhere((e) => e.index == map['RecommendedDownloadMode']),
  2744. previewFileToken: map['PreviewFileToken'],
  2745. diagnosisData: map['DiagnosisData'],
  2746. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  2747. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  2748. );
  2749. }
  2750. Map<String, dynamic> toJson() {
  2751. final map = Map<String, dynamic>();
  2752. if(remedicalAISelectedInfoCode != null)
  2753. map['RemedicalAISelectedInfoCode'] = remedicalAISelectedInfoCode;
  2754. if(patientCode != null)
  2755. map['PatientCode'] = patientCode;
  2756. if(recordCode != null)
  2757. map['RecordCode'] = recordCode;
  2758. if(remedicalCode != null)
  2759. map['RemedicalCode'] = remedicalCode;
  2760. map['FrameIndex'] = frameIndex;
  2761. if(userCode != null)
  2762. map['UserCode'] = userCode;
  2763. if(orginalFileToken != null)
  2764. map['OrginalFileToken'] = orginalFileToken;
  2765. if(cdnFileToken != null)
  2766. map['CdnFileToken'] = cdnFileToken;
  2767. if(aIFileToken != null)
  2768. map['AIFileToken'] = aIFileToken;
  2769. if(aICdnFileToken != null)
  2770. map['AICdnFileToken'] = aICdnFileToken;
  2771. map['RecommendedDownloadMode'] = recommendedDownloadMode.index;
  2772. if(previewFileToken != null)
  2773. map['PreviewFileToken'] = previewFileToken;
  2774. if(diagnosisData != null)
  2775. map['DiagnosisData'] = diagnosisData;
  2776. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  2777. if(diagnosisOrgans != null)
  2778. map['DiagnosisOrgans'] = diagnosisOrgans;
  2779. return map;
  2780. }
  2781. }
  2782. class GetPatientAISelectedInfosRequest extends TokenRequest{
  2783. String? patientCode;
  2784. String? recordCode;
  2785. GetPatientAISelectedInfosRequest({
  2786. this.patientCode,
  2787. this.recordCode,
  2788. String? token,
  2789. }) : super(
  2790. token: token,
  2791. );
  2792. factory GetPatientAISelectedInfosRequest.fromJson(Map<String, dynamic> map) {
  2793. return GetPatientAISelectedInfosRequest(
  2794. patientCode: map['PatientCode'],
  2795. recordCode: map['RecordCode'],
  2796. token: map['Token'],
  2797. );
  2798. }
  2799. Map<String, dynamic> toJson() {
  2800. final map = super.toJson();
  2801. if(patientCode != null)
  2802. map['PatientCode'] = patientCode;
  2803. if(recordCode != null)
  2804. map['RecordCode'] = recordCode;
  2805. return map;
  2806. }
  2807. }
  2808. class GetRemedicalAISelectedInfoRequest extends TokenRequest{
  2809. String? code;
  2810. GetRemedicalAISelectedInfoRequest({
  2811. this.code,
  2812. String? token,
  2813. }) : super(
  2814. token: token,
  2815. );
  2816. factory GetRemedicalAISelectedInfoRequest.fromJson(Map<String, dynamic> map) {
  2817. return GetRemedicalAISelectedInfoRequest(
  2818. code: map['Code'],
  2819. token: map['Token'],
  2820. );
  2821. }
  2822. Map<String, dynamic> toJson() {
  2823. final map = super.toJson();
  2824. if(code != null)
  2825. map['Code'] = code;
  2826. return map;
  2827. }
  2828. }
  2829. class SaveRemedicalAISelectedInfoRequest extends TokenRequest{
  2830. String? code;
  2831. String? remedicalCode;
  2832. int frameIndex;
  2833. String? aIFileToken;
  2834. String? previewFileToken;
  2835. String? diagnosisData;
  2836. DiagnosisConclusionEnum diagnosisConclusion;
  2837. List<DiagnosisOrganEnum >? diagnosisOrgans;
  2838. SaveRemedicalAISelectedInfoRequest({
  2839. this.code,
  2840. this.remedicalCode,
  2841. this.frameIndex = 0,
  2842. this.aIFileToken,
  2843. this.previewFileToken,
  2844. this.diagnosisData,
  2845. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  2846. this.diagnosisOrgans,
  2847. String? token,
  2848. }) : super(
  2849. token: token,
  2850. );
  2851. factory SaveRemedicalAISelectedInfoRequest.fromJson(Map<String, dynamic> map) {
  2852. return SaveRemedicalAISelectedInfoRequest(
  2853. code: map['Code'],
  2854. remedicalCode: map['RemedicalCode'],
  2855. frameIndex: map['FrameIndex'],
  2856. aIFileToken: map['AIFileToken'],
  2857. previewFileToken: map['PreviewFileToken'],
  2858. diagnosisData: map['DiagnosisData'],
  2859. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  2860. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  2861. token: map['Token'],
  2862. );
  2863. }
  2864. Map<String, dynamic> toJson() {
  2865. final map = super.toJson();
  2866. if(code != null)
  2867. map['Code'] = code;
  2868. if(remedicalCode != null)
  2869. map['RemedicalCode'] = remedicalCode;
  2870. map['FrameIndex'] = frameIndex;
  2871. if(aIFileToken != null)
  2872. map['AIFileToken'] = aIFileToken;
  2873. if(previewFileToken != null)
  2874. map['PreviewFileToken'] = previewFileToken;
  2875. if(diagnosisData != null)
  2876. map['DiagnosisData'] = diagnosisData;
  2877. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  2878. if(diagnosisOrgans != null)
  2879. map['DiagnosisOrgans'] = diagnosisOrgans;
  2880. return map;
  2881. }
  2882. }
  2883. class SyncRemedicalRecordRequest {
  2884. String? code;
  2885. String? organizationCode;
  2886. String? deviceCode;
  2887. bool isUploadReport;
  2888. List<DataItemDTO >? patientInfo;
  2889. DiagnosisStatusEnum diagnosisStatus;
  2890. List<DiagnosisInfoDTO >? aIDiagnosisInfos;
  2891. DateTime? createTime;
  2892. DateTime? updateTime;
  2893. String? creator;
  2894. bool isDelete;
  2895. SyncRemedicalRecordRequest({
  2896. this.code,
  2897. this.organizationCode,
  2898. this.deviceCode,
  2899. this.isUploadReport = false,
  2900. this.patientInfo,
  2901. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  2902. this.aIDiagnosisInfos,
  2903. this.createTime,
  2904. this.updateTime,
  2905. this.creator,
  2906. this.isDelete = false,
  2907. });
  2908. factory SyncRemedicalRecordRequest.fromJson(Map<String, dynamic> map) {
  2909. return SyncRemedicalRecordRequest(
  2910. code: map['Code'],
  2911. organizationCode: map['OrganizationCode'],
  2912. deviceCode: map['DeviceCode'],
  2913. isUploadReport: map['IsUploadReport'],
  2914. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2915. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  2916. aIDiagnosisInfos: map['AIDiagnosisInfos'] != null ? (map['AIDiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2917. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2918. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2919. creator: map['Creator'],
  2920. isDelete: map['IsDelete'],
  2921. );
  2922. }
  2923. Map<String, dynamic> toJson() {
  2924. final map = Map<String, dynamic>();
  2925. if(code != null)
  2926. map['Code'] = code;
  2927. if(organizationCode != null)
  2928. map['OrganizationCode'] = organizationCode;
  2929. if(deviceCode != null)
  2930. map['DeviceCode'] = deviceCode;
  2931. map['IsUploadReport'] = isUploadReport;
  2932. if(patientInfo != null)
  2933. map['PatientInfo'] = patientInfo;
  2934. map['DiagnosisStatus'] = diagnosisStatus.index;
  2935. if(aIDiagnosisInfos != null)
  2936. map['AIDiagnosisInfos'] = aIDiagnosisInfos;
  2937. if(createTime != null)
  2938. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  2939. if(updateTime != null)
  2940. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  2941. if(creator != null)
  2942. map['Creator'] = creator;
  2943. map['IsDelete'] = isDelete;
  2944. return map;
  2945. }
  2946. }
  2947. class SyncBatchRemedicalRecordRequest {
  2948. SyncDBEnum syncType;
  2949. List<SyncRemedicalRecordRequest >? remedicalRecordList;
  2950. SyncBatchRemedicalRecordRequest({
  2951. this.syncType = SyncDBEnum.Migrate,
  2952. this.remedicalRecordList,
  2953. });
  2954. factory SyncBatchRemedicalRecordRequest.fromJson(Map<String, dynamic> map) {
  2955. return SyncBatchRemedicalRecordRequest(
  2956. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  2957. remedicalRecordList: map['RemedicalRecordList'] != null ? (map['RemedicalRecordList'] as List).map((e)=>SyncRemedicalRecordRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  2958. );
  2959. }
  2960. Map<String, dynamic> toJson() {
  2961. final map = Map<String, dynamic>();
  2962. map['SyncType'] = syncType.index;
  2963. if(remedicalRecordList != null)
  2964. map['RemedicalRecordList'] = remedicalRecordList;
  2965. return map;
  2966. }
  2967. }
  2968. class SyncUploadRemedicalDataRequest {
  2969. String? code;
  2970. DateTime? createTime;
  2971. DateTime? updateTime;
  2972. String? examCode;
  2973. String? deviceCode;
  2974. String? previewFileToken;
  2975. String? fileToken;
  2976. String? imageUrl;
  2977. int fileSize;
  2978. String? coverImageToken;
  2979. String? applicationCategory;
  2980. String? application;
  2981. RemedicalFileDataTypeEnum fileDataType;
  2982. ImageLocationDTO? imageLocation;
  2983. SyncUploadRemedicalDataRequest({
  2984. this.code,
  2985. this.createTime,
  2986. this.updateTime,
  2987. this.examCode,
  2988. this.deviceCode,
  2989. this.previewFileToken,
  2990. this.fileToken,
  2991. this.imageUrl,
  2992. this.fileSize = 0,
  2993. this.coverImageToken,
  2994. this.applicationCategory,
  2995. this.application,
  2996. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  2997. this.imageLocation,
  2998. });
  2999. factory SyncUploadRemedicalDataRequest.fromJson(Map<String, dynamic> map) {
  3000. return SyncUploadRemedicalDataRequest(
  3001. code: map['Code'],
  3002. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3003. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3004. examCode: map['ExamCode'],
  3005. deviceCode: map['DeviceCode'],
  3006. previewFileToken: map['PreviewFileToken'],
  3007. fileToken: map['FileToken'],
  3008. imageUrl: map['ImageUrl'],
  3009. fileSize: map['FileSize'],
  3010. coverImageToken: map['CoverImageToken'],
  3011. applicationCategory: map['ApplicationCategory'],
  3012. application: map['Application'],
  3013. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  3014. imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
  3015. );
  3016. }
  3017. Map<String, dynamic> toJson() {
  3018. final map = Map<String, dynamic>();
  3019. if(code != null)
  3020. map['Code'] = code;
  3021. if(createTime != null)
  3022. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  3023. if(updateTime != null)
  3024. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  3025. if(examCode != null)
  3026. map['ExamCode'] = examCode;
  3027. if(deviceCode != null)
  3028. map['DeviceCode'] = deviceCode;
  3029. if(previewFileToken != null)
  3030. map['PreviewFileToken'] = previewFileToken;
  3031. if(fileToken != null)
  3032. map['FileToken'] = fileToken;
  3033. if(imageUrl != null)
  3034. map['ImageUrl'] = imageUrl;
  3035. map['FileSize'] = fileSize;
  3036. if(coverImageToken != null)
  3037. map['CoverImageToken'] = coverImageToken;
  3038. if(applicationCategory != null)
  3039. map['ApplicationCategory'] = applicationCategory;
  3040. if(application != null)
  3041. map['Application'] = application;
  3042. map['FileDataType'] = fileDataType.index;
  3043. if(imageLocation != null)
  3044. map['ImageLocation'] = imageLocation;
  3045. return map;
  3046. }
  3047. }
  3048. class SyncBatchUploadRemedicalDatasRequest {
  3049. SyncDBEnum syncType;
  3050. List<SyncUploadRemedicalDataRequest >? syncUploadRemedicalDataList;
  3051. SyncBatchUploadRemedicalDatasRequest({
  3052. this.syncType = SyncDBEnum.Migrate,
  3053. this.syncUploadRemedicalDataList,
  3054. });
  3055. factory SyncBatchUploadRemedicalDatasRequest.fromJson(Map<String, dynamic> map) {
  3056. return SyncBatchUploadRemedicalDatasRequest(
  3057. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3058. syncUploadRemedicalDataList: map['SyncUploadRemedicalDataList'] != null ? (map['SyncUploadRemedicalDataList'] as List).map((e)=>SyncUploadRemedicalDataRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3059. );
  3060. }
  3061. Map<String, dynamic> toJson() {
  3062. final map = Map<String, dynamic>();
  3063. map['SyncType'] = syncType.index;
  3064. if(syncUploadRemedicalDataList != null)
  3065. map['SyncUploadRemedicalDataList'] = syncUploadRemedicalDataList;
  3066. return map;
  3067. }
  3068. }
  3069. class SyncAIResultRequest {
  3070. String? remedicalCode;
  3071. String? diagnosisResult;
  3072. DateTime? createTime;
  3073. DateTime? updateTime;
  3074. SyncAIResultRequest({
  3075. this.remedicalCode,
  3076. this.diagnosisResult,
  3077. this.createTime,
  3078. this.updateTime,
  3079. });
  3080. factory SyncAIResultRequest.fromJson(Map<String, dynamic> map) {
  3081. return SyncAIResultRequest(
  3082. remedicalCode: map['RemedicalCode'],
  3083. diagnosisResult: map['DiagnosisResult'],
  3084. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3085. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3086. );
  3087. }
  3088. Map<String, dynamic> toJson() {
  3089. final map = Map<String, dynamic>();
  3090. if(remedicalCode != null)
  3091. map['RemedicalCode'] = remedicalCode;
  3092. if(diagnosisResult != null)
  3093. map['DiagnosisResult'] = diagnosisResult;
  3094. if(createTime != null)
  3095. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  3096. if(updateTime != null)
  3097. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  3098. return map;
  3099. }
  3100. }
  3101. class SyncBatchAIResultRequest {
  3102. SyncDBEnum syncType;
  3103. List<SyncAIResultRequest >? syncAIResultList;
  3104. SyncBatchAIResultRequest({
  3105. this.syncType = SyncDBEnum.Migrate,
  3106. this.syncAIResultList,
  3107. });
  3108. factory SyncBatchAIResultRequest.fromJson(Map<String, dynamic> map) {
  3109. return SyncBatchAIResultRequest(
  3110. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3111. syncAIResultList: map['SyncAIResultList'] != null ? (map['SyncAIResultList'] as List).map((e)=>SyncAIResultRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3112. );
  3113. }
  3114. Map<String, dynamic> toJson() {
  3115. final map = Map<String, dynamic>();
  3116. map['SyncType'] = syncType.index;
  3117. if(syncAIResultList != null)
  3118. map['SyncAIResultList'] = syncAIResultList;
  3119. return map;
  3120. }
  3121. }
  3122. class SyncBatchCarotidResultRequest {
  3123. SyncDBEnum syncType;
  3124. List<GetCarotidResultRequest >? syncCarotidResultRequest;
  3125. SyncBatchCarotidResultRequest({
  3126. this.syncType = SyncDBEnum.Migrate,
  3127. this.syncCarotidResultRequest,
  3128. });
  3129. factory SyncBatchCarotidResultRequest.fromJson(Map<String, dynamic> map) {
  3130. return SyncBatchCarotidResultRequest(
  3131. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3132. syncCarotidResultRequest: map['SyncCarotidResultRequest'] != null ? (map['SyncCarotidResultRequest'] as List).map((e)=>GetCarotidResultRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3133. );
  3134. }
  3135. Map<String, dynamic> toJson() {
  3136. final map = Map<String, dynamic>();
  3137. map['SyncType'] = syncType.index;
  3138. if(syncCarotidResultRequest != null)
  3139. map['SyncCarotidResultRequest'] = syncCarotidResultRequest;
  3140. return map;
  3141. }
  3142. }
  3143. class LabFileInfoRequest extends TokenRequest{
  3144. String? filePath;
  3145. String? fileName;
  3146. UploadFileTypeEnum fileType;
  3147. LabFileInfoRequest({
  3148. this.filePath,
  3149. this.fileName,
  3150. this.fileType = UploadFileTypeEnum.Unknown,
  3151. String? token,
  3152. }) : super(
  3153. token: token,
  3154. );
  3155. factory LabFileInfoRequest.fromJson(Map<String, dynamic> map) {
  3156. return LabFileInfoRequest(
  3157. filePath: map['FilePath'],
  3158. fileName: map['FileName'],
  3159. fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
  3160. token: map['Token'],
  3161. );
  3162. }
  3163. Map<String, dynamic> toJson() {
  3164. final map = super.toJson();
  3165. if(filePath != null)
  3166. map['FilePath'] = filePath;
  3167. if(fileName != null)
  3168. map['FileName'] = fileName;
  3169. map['FileType'] = fileType.index;
  3170. return map;
  3171. }
  3172. }
  3173. class FindDeviceDiagnosisRequest extends TokenRequest{
  3174. String? deviceCode;
  3175. FindDeviceDiagnosisRequest({
  3176. this.deviceCode,
  3177. String? token,
  3178. }) : super(
  3179. token: token,
  3180. );
  3181. factory FindDeviceDiagnosisRequest.fromJson(Map<String, dynamic> map) {
  3182. return FindDeviceDiagnosisRequest(
  3183. deviceCode: map['DeviceCode'],
  3184. token: map['Token'],
  3185. );
  3186. }
  3187. Map<String, dynamic> toJson() {
  3188. final map = super.toJson();
  3189. if(deviceCode != null)
  3190. map['DeviceCode'] = deviceCode;
  3191. return map;
  3192. }
  3193. }