remedical.m.dart 100 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571
  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. String? organizationCode,
  1824. String? organizationName,
  1825. DateTime? createTime,
  1826. DateTime? updateTime,
  1827. }) : super(
  1828. patientCode: patientCode,
  1829. isValid: isValid,
  1830. patientData: patientData,
  1831. unReadRecordCount: unReadRecordCount,
  1832. isReferral: isReferral,
  1833. devicePatientIDs: devicePatientIDs,
  1834. organizationCode: organizationCode,
  1835. organizationName: organizationName,
  1836. createTime: createTime,
  1837. updateTime: updateTime,
  1838. );
  1839. factory QueryReferralRecordPageDTO.fromJson(Map<String, dynamic> map) {
  1840. return QueryReferralRecordPageDTO(
  1841. code: map['Code'],
  1842. outUserName: map['OutUserName'],
  1843. inUserName: map['InUserName'],
  1844. patientCode: map['PatientCode'],
  1845. isValid: map['IsValid'],
  1846. patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1847. unReadRecordCount: map['UnReadRecordCount'],
  1848. isReferral: map['IsReferral'],
  1849. devicePatientIDs: map['DevicePatientIDs'] != null ? map['DevicePatientIDs'].cast<String>().toList() : null,
  1850. organizationCode: map['OrganizationCode'],
  1851. organizationName: map['OrganizationName'],
  1852. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1853. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1854. );
  1855. }
  1856. Map<String, dynamic> toJson() {
  1857. final map = super.toJson();
  1858. if(code != null)
  1859. map['Code'] = code;
  1860. if(outUserName != null)
  1861. map['OutUserName'] = outUserName;
  1862. if(inUserName != null)
  1863. map['InUserName'] = inUserName;
  1864. return map;
  1865. }
  1866. }
  1867. class QueryReferralRecordListRequest extends PageRequest{
  1868. String? keyWord;
  1869. DateTime? startTime;
  1870. DateTime? endTime;
  1871. PatientValidStatusEnum isValid;
  1872. QueryReferralRecordListRequest({
  1873. this.keyWord,
  1874. this.startTime,
  1875. this.endTime,
  1876. this.isValid = PatientValidStatusEnum.All,
  1877. int pageIndex = 0,
  1878. int pageSize = 0,
  1879. String? token,
  1880. }) : super(
  1881. pageIndex: pageIndex,
  1882. pageSize: pageSize,
  1883. token: token,
  1884. );
  1885. factory QueryReferralRecordListRequest.fromJson(Map<String, dynamic> map) {
  1886. return QueryReferralRecordListRequest(
  1887. keyWord: map['KeyWord'],
  1888. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  1889. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  1890. isValid: PatientValidStatusEnum.values.firstWhere((e) => e.index == map['IsValid']),
  1891. pageIndex: map['PageIndex'],
  1892. pageSize: map['PageSize'],
  1893. token: map['Token'],
  1894. );
  1895. }
  1896. Map<String, dynamic> toJson() {
  1897. final map = super.toJson();
  1898. if(keyWord != null)
  1899. map['KeyWord'] = keyWord;
  1900. if(startTime != null)
  1901. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  1902. if(endTime != null)
  1903. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  1904. map['IsValid'] = isValid.index;
  1905. return map;
  1906. }
  1907. }
  1908. class AuditReferralRecordRequest extends TokenRequest{
  1909. String? referralRecordCode;
  1910. bool isReceive;
  1911. String? rejectReason;
  1912. AuditReferralRecordRequest({
  1913. this.referralRecordCode,
  1914. this.isReceive = false,
  1915. this.rejectReason,
  1916. String? token,
  1917. }) : super(
  1918. token: token,
  1919. );
  1920. factory AuditReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1921. return AuditReferralRecordRequest(
  1922. referralRecordCode: map['ReferralRecordCode'],
  1923. isReceive: map['IsReceive'],
  1924. rejectReason: map['RejectReason'],
  1925. token: map['Token'],
  1926. );
  1927. }
  1928. Map<String, dynamic> toJson() {
  1929. final map = super.toJson();
  1930. if(referralRecordCode != null)
  1931. map['ReferralRecordCode'] = referralRecordCode;
  1932. map['IsReceive'] = isReceive;
  1933. if(rejectReason != null)
  1934. map['RejectReason'] = rejectReason;
  1935. return map;
  1936. }
  1937. }
  1938. class WithdrawReferralRecordRequest extends TokenRequest{
  1939. String? referralRecordCode;
  1940. WithdrawReferralRecordRequest({
  1941. this.referralRecordCode,
  1942. String? token,
  1943. }) : super(
  1944. token: token,
  1945. );
  1946. factory WithdrawReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1947. return WithdrawReferralRecordRequest(
  1948. referralRecordCode: map['ReferralRecordCode'],
  1949. token: map['Token'],
  1950. );
  1951. }
  1952. Map<String, dynamic> toJson() {
  1953. final map = super.toJson();
  1954. if(referralRecordCode != null)
  1955. map['ReferralRecordCode'] = referralRecordCode;
  1956. return map;
  1957. }
  1958. }
  1959. class ReferralOrganizationsQueryRequest extends TokenRequest{
  1960. String? keyword;
  1961. ReferralOrganizationsQueryRequest({
  1962. this.keyword,
  1963. String? token,
  1964. }) : super(
  1965. token: token,
  1966. );
  1967. factory ReferralOrganizationsQueryRequest.fromJson(Map<String, dynamic> map) {
  1968. return ReferralOrganizationsQueryRequest(
  1969. keyword: map['Keyword'],
  1970. token: map['Token'],
  1971. );
  1972. }
  1973. Map<String, dynamic> toJson() {
  1974. final map = super.toJson();
  1975. if(keyword != null)
  1976. map['Keyword'] = keyword;
  1977. return map;
  1978. }
  1979. }
  1980. class QueryReferralPatientByCodeRequest extends FindPatientByCodeRequest{
  1981. String? referralRecordCode;
  1982. QueryReferralPatientByCodeRequest({
  1983. this.referralRecordCode,
  1984. String? code,
  1985. String? token,
  1986. }) : super(
  1987. code: code,
  1988. token: token,
  1989. );
  1990. factory QueryReferralPatientByCodeRequest.fromJson(Map<String, dynamic> map) {
  1991. return QueryReferralPatientByCodeRequest(
  1992. referralRecordCode: map['ReferralRecordCode'],
  1993. code: map['Code'],
  1994. token: map['Token'],
  1995. );
  1996. }
  1997. Map<String, dynamic> toJson() {
  1998. final map = super.toJson();
  1999. if(referralRecordCode != null)
  2000. map['ReferralRecordCode'] = referralRecordCode;
  2001. return map;
  2002. }
  2003. }
  2004. class CreateReportClass {
  2005. String? referralCode;
  2006. String? creatorCode;
  2007. String? reportCode;
  2008. CreateReportClass({
  2009. this.referralCode,
  2010. this.creatorCode,
  2011. this.reportCode,
  2012. });
  2013. factory CreateReportClass.fromJson(Map<String, dynamic> map) {
  2014. return CreateReportClass(
  2015. referralCode: map['ReferralCode'],
  2016. creatorCode: map['CreatorCode'],
  2017. reportCode: map['ReportCode'],
  2018. );
  2019. }
  2020. Map<String, dynamic> toJson() {
  2021. final map = Map<String, dynamic>();
  2022. if(referralCode != null)
  2023. map['ReferralCode'] = referralCode;
  2024. if(creatorCode != null)
  2025. map['CreatorCode'] = creatorCode;
  2026. if(reportCode != null)
  2027. map['ReportCode'] = reportCode;
  2028. return map;
  2029. }
  2030. }
  2031. class ReferralRecordDTO extends BaseDTO{
  2032. String? code;
  2033. String? patientCode;
  2034. DateTime? referralOutTime;
  2035. String? referralOutOrganizationCode;
  2036. String? subjectMatter;
  2037. String? creator;
  2038. String? referralInOrganizationCode;
  2039. String? referralInUserCode;
  2040. ReferralStatusEnum referralStatus;
  2041. String? rejectReason;
  2042. List<String >? referralCodeList;
  2043. PatientInfoDTO? patientInfo;
  2044. List<String >? recordCodeList;
  2045. List<String >? reportCodeList;
  2046. List<String >? remedicalDataCodeList;
  2047. List<CreateReportClass >? createReportCodeList;
  2048. ReferralRecordDTO({
  2049. this.code,
  2050. this.patientCode,
  2051. this.referralOutTime,
  2052. this.referralOutOrganizationCode,
  2053. this.subjectMatter,
  2054. this.creator,
  2055. this.referralInOrganizationCode,
  2056. this.referralInUserCode,
  2057. this.referralStatus = ReferralStatusEnum.Wait,
  2058. this.rejectReason,
  2059. this.referralCodeList,
  2060. this.patientInfo,
  2061. this.recordCodeList,
  2062. this.reportCodeList,
  2063. this.remedicalDataCodeList,
  2064. this.createReportCodeList,
  2065. DateTime? createTime,
  2066. DateTime? updateTime,
  2067. }) : super(
  2068. createTime: createTime,
  2069. updateTime: updateTime,
  2070. );
  2071. factory ReferralRecordDTO.fromJson(Map<String, dynamic> map) {
  2072. return ReferralRecordDTO(
  2073. code: map['Code'],
  2074. patientCode: map['PatientCode'],
  2075. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2076. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2077. subjectMatter: map['SubjectMatter'],
  2078. creator: map['Creator'],
  2079. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2080. referralInUserCode: map['ReferralInUserCode'],
  2081. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2082. rejectReason: map['RejectReason'],
  2083. referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
  2084. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2085. recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
  2086. reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
  2087. remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
  2088. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2089. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2090. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2091. );
  2092. }
  2093. Map<String, dynamic> toJson() {
  2094. final map = super.toJson();
  2095. if(code != null)
  2096. map['Code'] = code;
  2097. if(patientCode != null)
  2098. map['PatientCode'] = patientCode;
  2099. if(referralOutTime != null)
  2100. map['ReferralOutTime'] = JsonRpcUtils.dateFormat(referralOutTime!);
  2101. if(referralOutOrganizationCode != null)
  2102. map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
  2103. if(subjectMatter != null)
  2104. map['SubjectMatter'] = subjectMatter;
  2105. if(creator != null)
  2106. map['Creator'] = creator;
  2107. if(referralInOrganizationCode != null)
  2108. map['ReferralInOrganizationCode'] = referralInOrganizationCode;
  2109. if(referralInUserCode != null)
  2110. map['ReferralInUserCode'] = referralInUserCode;
  2111. map['ReferralStatus'] = referralStatus.index;
  2112. if(rejectReason != null)
  2113. map['RejectReason'] = rejectReason;
  2114. if(referralCodeList != null)
  2115. map['ReferralCodeList'] = referralCodeList;
  2116. if(patientInfo != null)
  2117. map['PatientInfo'] = patientInfo;
  2118. if(recordCodeList != null)
  2119. map['RecordCodeList'] = recordCodeList;
  2120. if(reportCodeList != null)
  2121. map['ReportCodeList'] = reportCodeList;
  2122. if(remedicalDataCodeList != null)
  2123. map['RemedicalDataCodeList'] = remedicalDataCodeList;
  2124. if(createReportCodeList != null)
  2125. map['CreateReportCodeList'] = createReportCodeList;
  2126. return map;
  2127. }
  2128. }
  2129. class ReferralRecordDetailDTO extends ReferralRecordDTO{
  2130. String? referralOutOrganizationName;
  2131. String? creatorName;
  2132. String? referralInOrganizationName;
  2133. String? referralInUserName;
  2134. ReferralRecordDetailDTO({
  2135. this.referralOutOrganizationName,
  2136. this.creatorName,
  2137. this.referralInOrganizationName,
  2138. this.referralInUserName,
  2139. String? code,
  2140. String? patientCode,
  2141. DateTime? referralOutTime,
  2142. String? referralOutOrganizationCode,
  2143. String? subjectMatter,
  2144. String? creator,
  2145. String? referralInOrganizationCode,
  2146. String? referralInUserCode,
  2147. ReferralStatusEnum referralStatus = ReferralStatusEnum.Wait,
  2148. String? rejectReason,
  2149. List<String >? referralCodeList,
  2150. PatientInfoDTO? patientInfo,
  2151. List<String >? recordCodeList,
  2152. List<String >? reportCodeList,
  2153. List<String >? remedicalDataCodeList,
  2154. List<CreateReportClass >? createReportCodeList,
  2155. DateTime? createTime,
  2156. DateTime? updateTime,
  2157. }) : super(
  2158. code: code,
  2159. patientCode: patientCode,
  2160. referralOutTime: referralOutTime,
  2161. referralOutOrganizationCode: referralOutOrganizationCode,
  2162. subjectMatter: subjectMatter,
  2163. creator: creator,
  2164. referralInOrganizationCode: referralInOrganizationCode,
  2165. referralInUserCode: referralInUserCode,
  2166. referralStatus: referralStatus,
  2167. rejectReason: rejectReason,
  2168. referralCodeList: referralCodeList,
  2169. patientInfo: patientInfo,
  2170. recordCodeList: recordCodeList,
  2171. reportCodeList: reportCodeList,
  2172. remedicalDataCodeList: remedicalDataCodeList,
  2173. createReportCodeList: createReportCodeList,
  2174. createTime: createTime,
  2175. updateTime: updateTime,
  2176. );
  2177. factory ReferralRecordDetailDTO.fromJson(Map<String, dynamic> map) {
  2178. return ReferralRecordDetailDTO(
  2179. referralOutOrganizationName: map['ReferralOutOrganizationName'],
  2180. creatorName: map['CreatorName'],
  2181. referralInOrganizationName: map['ReferralInOrganizationName'],
  2182. referralInUserName: map['ReferralInUserName'],
  2183. code: map['Code'],
  2184. patientCode: map['PatientCode'],
  2185. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2186. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2187. subjectMatter: map['SubjectMatter'],
  2188. creator: map['Creator'],
  2189. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2190. referralInUserCode: map['ReferralInUserCode'],
  2191. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2192. rejectReason: map['RejectReason'],
  2193. referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
  2194. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2195. recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
  2196. reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
  2197. remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
  2198. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2199. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2200. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2201. );
  2202. }
  2203. Map<String, dynamic> toJson() {
  2204. final map = super.toJson();
  2205. if(referralOutOrganizationName != null)
  2206. map['ReferralOutOrganizationName'] = referralOutOrganizationName;
  2207. if(creatorName != null)
  2208. map['CreatorName'] = creatorName;
  2209. if(referralInOrganizationName != null)
  2210. map['ReferralInOrganizationName'] = referralInOrganizationName;
  2211. if(referralInUserName != null)
  2212. map['ReferralInUserName'] = referralInUserName;
  2213. return map;
  2214. }
  2215. }
  2216. class FindPatientReferralRecordRequest extends TokenRequest{
  2217. String? patientCode;
  2218. FindPatientReferralRecordRequest({
  2219. this.patientCode,
  2220. String? token,
  2221. }) : super(
  2222. token: token,
  2223. );
  2224. factory FindPatientReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2225. return FindPatientReferralRecordRequest(
  2226. patientCode: map['PatientCode'],
  2227. token: map['Token'],
  2228. );
  2229. }
  2230. Map<String, dynamic> toJson() {
  2231. final map = super.toJson();
  2232. if(patientCode != null)
  2233. map['PatientCode'] = patientCode;
  2234. return map;
  2235. }
  2236. }
  2237. class FindReferralInRecordRequest extends TokenRequest{
  2238. String? referralRecordCode;
  2239. FindReferralInRecordRequest({
  2240. this.referralRecordCode,
  2241. String? token,
  2242. }) : super(
  2243. token: token,
  2244. );
  2245. factory FindReferralInRecordRequest.fromJson(Map<String, dynamic> map) {
  2246. return FindReferralInRecordRequest(
  2247. referralRecordCode: map['ReferralRecordCode'],
  2248. token: map['Token'],
  2249. );
  2250. }
  2251. Map<String, dynamic> toJson() {
  2252. final map = super.toJson();
  2253. if(referralRecordCode != null)
  2254. map['ReferralRecordCode'] = referralRecordCode;
  2255. return map;
  2256. }
  2257. }
  2258. class QueryReferralRecordsPageRequest extends GetRecordsPageRequest{
  2259. String? referralRecordCode;
  2260. QueryReferralRecordsPageRequest({
  2261. this.referralRecordCode,
  2262. String? patientCode,
  2263. QueryRecordStatusEnum queryRecordStatus = QueryRecordStatusEnum.All,
  2264. QueryRecordCreateTypeEnum queryRecordCreateType = QueryRecordCreateTypeEnum.All,
  2265. int pageIndex = 0,
  2266. int pageSize = 0,
  2267. String? token,
  2268. }) : super(
  2269. patientCode: patientCode,
  2270. queryRecordStatus: queryRecordStatus,
  2271. queryRecordCreateType: queryRecordCreateType,
  2272. pageIndex: pageIndex,
  2273. pageSize: pageSize,
  2274. token: token,
  2275. );
  2276. factory QueryReferralRecordsPageRequest.fromJson(Map<String, dynamic> map) {
  2277. return QueryReferralRecordsPageRequest(
  2278. referralRecordCode: map['ReferralRecordCode'],
  2279. patientCode: map['PatientCode'],
  2280. queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
  2281. queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
  2282. pageIndex: map['PageIndex'],
  2283. pageSize: map['PageSize'],
  2284. token: map['Token'],
  2285. );
  2286. }
  2287. Map<String, dynamic> toJson() {
  2288. final map = super.toJson();
  2289. if(referralRecordCode != null)
  2290. map['ReferralRecordCode'] = referralRecordCode;
  2291. return map;
  2292. }
  2293. }
  2294. class ReportPreviewDTO {
  2295. String? fileToken;
  2296. String? thumbnailToken;
  2297. String? language;
  2298. UploadFileTypeEnum fileType;
  2299. ReportPreviewDTO({
  2300. this.fileToken,
  2301. this.thumbnailToken,
  2302. this.language,
  2303. this.fileType = UploadFileTypeEnum.Unknown,
  2304. });
  2305. factory ReportPreviewDTO.fromJson(Map<String, dynamic> map) {
  2306. return ReportPreviewDTO(
  2307. fileToken: map['FileToken'],
  2308. thumbnailToken: map['ThumbnailToken'],
  2309. language: map['Language'],
  2310. fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
  2311. );
  2312. }
  2313. Map<String, dynamic> toJson() {
  2314. final map = Map<String, dynamic>();
  2315. if(fileToken != null)
  2316. map['FileToken'] = fileToken;
  2317. if(thumbnailToken != null)
  2318. map['ThumbnailToken'] = thumbnailToken;
  2319. if(language != null)
  2320. map['Language'] = language;
  2321. map['FileType'] = fileType.index;
  2322. return map;
  2323. }
  2324. }
  2325. enum ReportTypeEnum {
  2326. RemoteDiagnosis,
  2327. LiveConsultation,
  2328. }
  2329. class ReportBaseDTO extends BaseDTO{
  2330. String? reportCode;
  2331. String? recordCode;
  2332. String? reportUserCode;
  2333. String? deviceCode;
  2334. String? patientCode;
  2335. String? patientId;
  2336. String? patientName;
  2337. List<String >? reportLabels;
  2338. List<String >? platformLabels;
  2339. List<String >? diagnosisLabels;
  2340. DiagnosisOrganEnum reportOrgan;
  2341. DateTime? reportTime;
  2342. String? reportUserName;
  2343. List<ReportPreviewDTO >? reportPreviewList;
  2344. String? referralRecordCode;
  2345. ReportTypeEnum reportType;
  2346. ReportBaseDTO({
  2347. this.reportCode,
  2348. this.recordCode,
  2349. this.reportUserCode,
  2350. this.deviceCode,
  2351. this.patientCode,
  2352. this.patientId,
  2353. this.patientName,
  2354. this.reportLabels,
  2355. this.platformLabels,
  2356. this.diagnosisLabels,
  2357. this.reportOrgan = DiagnosisOrganEnum.Null,
  2358. this.reportTime,
  2359. this.reportUserName,
  2360. this.reportPreviewList,
  2361. this.referralRecordCode,
  2362. this.reportType = ReportTypeEnum.RemoteDiagnosis,
  2363. DateTime? createTime,
  2364. DateTime? updateTime,
  2365. }) : super(
  2366. createTime: createTime,
  2367. updateTime: updateTime,
  2368. );
  2369. factory ReportBaseDTO.fromJson(Map<String, dynamic> map) {
  2370. return ReportBaseDTO(
  2371. reportCode: map['ReportCode'],
  2372. recordCode: map['RecordCode'],
  2373. reportUserCode: map['ReportUserCode'],
  2374. deviceCode: map['DeviceCode'],
  2375. patientCode: map['PatientCode'],
  2376. patientId: map['PatientId'],
  2377. patientName: map['PatientName'],
  2378. reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
  2379. platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
  2380. diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
  2381. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2382. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2383. reportUserName: map['ReportUserName'],
  2384. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2385. referralRecordCode: map['ReferralRecordCode'],
  2386. reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
  2387. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2388. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2389. );
  2390. }
  2391. Map<String, dynamic> toJson() {
  2392. final map = super.toJson();
  2393. if(reportCode != null)
  2394. map['ReportCode'] = reportCode;
  2395. if(recordCode != null)
  2396. map['RecordCode'] = recordCode;
  2397. if(reportUserCode != null)
  2398. map['ReportUserCode'] = reportUserCode;
  2399. if(deviceCode != null)
  2400. map['DeviceCode'] = deviceCode;
  2401. if(patientCode != null)
  2402. map['PatientCode'] = patientCode;
  2403. if(patientId != null)
  2404. map['PatientId'] = patientId;
  2405. if(patientName != null)
  2406. map['PatientName'] = patientName;
  2407. if(reportLabels != null)
  2408. map['ReportLabels'] = reportLabels;
  2409. if(platformLabels != null)
  2410. map['PlatformLabels'] = platformLabels;
  2411. if(diagnosisLabels != null)
  2412. map['DiagnosisLabels'] = diagnosisLabels;
  2413. map['ReportOrgan'] = reportOrgan.index;
  2414. if(reportTime != null)
  2415. map['ReportTime'] = JsonRpcUtils.dateFormat(reportTime!);
  2416. if(reportUserName != null)
  2417. map['ReportUserName'] = reportUserName;
  2418. if(reportPreviewList != null)
  2419. map['ReportPreviewList'] = reportPreviewList;
  2420. if(referralRecordCode != null)
  2421. map['ReferralRecordCode'] = referralRecordCode;
  2422. map['ReportType'] = reportType.index;
  2423. return map;
  2424. }
  2425. }
  2426. class ReportDTO extends ReportBaseDTO{
  2427. String? reportTemplateJson;
  2428. String? reportDatasJson;
  2429. String? encryptPatientName;
  2430. bool canEditReport;
  2431. String? deviceName;
  2432. String? reportTemplateName;
  2433. DateTime? examDate;
  2434. ReportDTO({
  2435. this.reportTemplateJson,
  2436. this.reportDatasJson,
  2437. this.encryptPatientName,
  2438. this.canEditReport = false,
  2439. this.deviceName,
  2440. this.reportTemplateName,
  2441. this.examDate,
  2442. String? reportCode,
  2443. String? recordCode,
  2444. String? reportUserCode,
  2445. String? deviceCode,
  2446. String? patientCode,
  2447. String? patientId,
  2448. String? patientName,
  2449. List<String >? reportLabels,
  2450. List<String >? platformLabels,
  2451. List<String >? diagnosisLabels,
  2452. DiagnosisOrganEnum reportOrgan = DiagnosisOrganEnum.Null,
  2453. DateTime? reportTime,
  2454. String? reportUserName,
  2455. List<ReportPreviewDTO >? reportPreviewList,
  2456. String? referralRecordCode,
  2457. ReportTypeEnum reportType = ReportTypeEnum.RemoteDiagnosis,
  2458. DateTime? createTime,
  2459. DateTime? updateTime,
  2460. }) : super(
  2461. reportCode: reportCode,
  2462. recordCode: recordCode,
  2463. reportUserCode: reportUserCode,
  2464. deviceCode: deviceCode,
  2465. patientCode: patientCode,
  2466. patientId: patientId,
  2467. patientName: patientName,
  2468. reportLabels: reportLabels,
  2469. platformLabels: platformLabels,
  2470. diagnosisLabels: diagnosisLabels,
  2471. reportOrgan: reportOrgan,
  2472. reportTime: reportTime,
  2473. reportUserName: reportUserName,
  2474. reportPreviewList: reportPreviewList,
  2475. referralRecordCode: referralRecordCode,
  2476. reportType: reportType,
  2477. createTime: createTime,
  2478. updateTime: updateTime,
  2479. );
  2480. factory ReportDTO.fromJson(Map<String, dynamic> map) {
  2481. return ReportDTO(
  2482. reportTemplateJson: map['ReportTemplateJson'],
  2483. reportDatasJson: map['ReportDatasJson'],
  2484. encryptPatientName: map['EncryptPatientName'],
  2485. canEditReport: map['CanEditReport'],
  2486. deviceName: map['DeviceName'],
  2487. reportTemplateName: map['ReportTemplateName'],
  2488. examDate: map['ExamDate'] != null ? DateTime.parse(map['ExamDate']) : null,
  2489. reportCode: map['ReportCode'],
  2490. recordCode: map['RecordCode'],
  2491. reportUserCode: map['ReportUserCode'],
  2492. deviceCode: map['DeviceCode'],
  2493. patientCode: map['PatientCode'],
  2494. patientId: map['PatientId'],
  2495. patientName: map['PatientName'],
  2496. reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
  2497. platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
  2498. diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
  2499. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2500. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2501. reportUserName: map['ReportUserName'],
  2502. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2503. referralRecordCode: map['ReferralRecordCode'],
  2504. reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
  2505. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2506. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2507. );
  2508. }
  2509. Map<String, dynamic> toJson() {
  2510. final map = super.toJson();
  2511. if(reportTemplateJson != null)
  2512. map['ReportTemplateJson'] = reportTemplateJson;
  2513. if(reportDatasJson != null)
  2514. map['ReportDatasJson'] = reportDatasJson;
  2515. if(encryptPatientName != null)
  2516. map['EncryptPatientName'] = encryptPatientName;
  2517. map['CanEditReport'] = canEditReport;
  2518. if(deviceName != null)
  2519. map['DeviceName'] = deviceName;
  2520. if(reportTemplateName != null)
  2521. map['ReportTemplateName'] = reportTemplateName;
  2522. if(examDate != null)
  2523. map['ExamDate'] = JsonRpcUtils.dateFormat(examDate!);
  2524. return map;
  2525. }
  2526. }
  2527. class FindReportsRequest extends TokenRequest{
  2528. String? recordCode;
  2529. String? languageCode;
  2530. FindReportsRequest({
  2531. this.recordCode,
  2532. this.languageCode,
  2533. String? token,
  2534. }) : super(
  2535. token: token,
  2536. );
  2537. factory FindReportsRequest.fromJson(Map<String, dynamic> map) {
  2538. return FindReportsRequest(
  2539. recordCode: map['RecordCode'],
  2540. languageCode: map['LanguageCode'],
  2541. token: map['Token'],
  2542. );
  2543. }
  2544. Map<String, dynamic> toJson() {
  2545. final map = super.toJson();
  2546. if(recordCode != null)
  2547. map['RecordCode'] = recordCode;
  2548. if(languageCode != null)
  2549. map['LanguageCode'] = languageCode;
  2550. return map;
  2551. }
  2552. }
  2553. class QueryReferralExamReportRequest extends FindReportsRequest{
  2554. String? referralRecordCode;
  2555. QueryReferralExamReportRequest({
  2556. this.referralRecordCode,
  2557. String? recordCode,
  2558. String? languageCode,
  2559. String? token,
  2560. }) : super(
  2561. recordCode: recordCode,
  2562. languageCode: languageCode,
  2563. token: token,
  2564. );
  2565. factory QueryReferralExamReportRequest.fromJson(Map<String, dynamic> map) {
  2566. return QueryReferralExamReportRequest(
  2567. referralRecordCode: map['ReferralRecordCode'],
  2568. recordCode: map['RecordCode'],
  2569. languageCode: map['LanguageCode'],
  2570. token: map['Token'],
  2571. );
  2572. }
  2573. Map<String, dynamic> toJson() {
  2574. final map = super.toJson();
  2575. if(referralRecordCode != null)
  2576. map['ReferralRecordCode'] = referralRecordCode;
  2577. return map;
  2578. }
  2579. }
  2580. class QueryShareExamPageResult {
  2581. String? shareExamPageUrl;
  2582. QueryShareExamPageResult({
  2583. this.shareExamPageUrl,
  2584. });
  2585. factory QueryShareExamPageResult.fromJson(Map<String, dynamic> map) {
  2586. return QueryShareExamPageResult(
  2587. shareExamPageUrl: map['ShareExamPageUrl'],
  2588. );
  2589. }
  2590. Map<String, dynamic> toJson() {
  2591. final map = Map<String, dynamic>();
  2592. if(shareExamPageUrl != null)
  2593. map['ShareExamPageUrl'] = shareExamPageUrl;
  2594. return map;
  2595. }
  2596. }
  2597. class QueryShareExamPageRequest extends TokenRequest{
  2598. String? examFileToken;
  2599. String? languageCode;
  2600. QueryShareExamPageRequest({
  2601. this.examFileToken,
  2602. this.languageCode,
  2603. String? token,
  2604. }) : super(
  2605. token: token,
  2606. );
  2607. factory QueryShareExamPageRequest.fromJson(Map<String, dynamic> map) {
  2608. return QueryShareExamPageRequest(
  2609. examFileToken: map['ExamFileToken'],
  2610. languageCode: map['LanguageCode'],
  2611. token: map['Token'],
  2612. );
  2613. }
  2614. Map<String, dynamic> toJson() {
  2615. final map = super.toJson();
  2616. if(examFileToken != null)
  2617. map['ExamFileToken'] = examFileToken;
  2618. if(languageCode != null)
  2619. map['LanguageCode'] = languageCode;
  2620. return map;
  2621. }
  2622. }
  2623. class MeasureExportDetailDTO {
  2624. int sortNum;
  2625. String? remedicalMeasuredInfoCode;
  2626. MeasureExportDetailDTO({
  2627. this.sortNum = 0,
  2628. this.remedicalMeasuredInfoCode,
  2629. });
  2630. factory MeasureExportDetailDTO.fromJson(Map<String, dynamic> map) {
  2631. return MeasureExportDetailDTO(
  2632. sortNum: map['SortNum'],
  2633. remedicalMeasuredInfoCode: map['RemedicalMeasuredInfoCode'],
  2634. );
  2635. }
  2636. Map<String, dynamic> toJson() {
  2637. final map = Map<String, dynamic>();
  2638. map['SortNum'] = sortNum;
  2639. if(remedicalMeasuredInfoCode != null)
  2640. map['RemedicalMeasuredInfoCode'] = remedicalMeasuredInfoCode;
  2641. return map;
  2642. }
  2643. }
  2644. class BatchExportMeasureResultRequest extends TokenRequest{
  2645. List<MeasureExportDetailDTO >? remedicalMeasuredInfoCodes;
  2646. BusinessTypeEnum businessType;
  2647. String? recordCode;
  2648. String? languageCode;
  2649. BatchExportMeasureResultRequest({
  2650. this.remedicalMeasuredInfoCodes,
  2651. this.businessType = BusinessTypeEnum.RemoteDiagnosis,
  2652. this.recordCode,
  2653. this.languageCode,
  2654. String? token,
  2655. }) : super(
  2656. token: token,
  2657. );
  2658. factory BatchExportMeasureResultRequest.fromJson(Map<String, dynamic> map) {
  2659. return BatchExportMeasureResultRequest(
  2660. remedicalMeasuredInfoCodes: map['RemedicalMeasuredInfoCodes'] != null ? (map['RemedicalMeasuredInfoCodes'] as List).map((e)=>MeasureExportDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2661. businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
  2662. recordCode: map['RecordCode'],
  2663. languageCode: map['LanguageCode'],
  2664. token: map['Token'],
  2665. );
  2666. }
  2667. Map<String, dynamic> toJson() {
  2668. final map = super.toJson();
  2669. if(remedicalMeasuredInfoCodes != null)
  2670. map['RemedicalMeasuredInfoCodes'] = remedicalMeasuredInfoCodes;
  2671. map['BusinessType'] = businessType.index;
  2672. if(recordCode != null)
  2673. map['RecordCode'] = recordCode;
  2674. if(languageCode != null)
  2675. map['LanguageCode'] = languageCode;
  2676. return map;
  2677. }
  2678. }
  2679. class GetRemedicalDiagnosisDataRequest extends TokenRequest{
  2680. String? remedicalCode;
  2681. int frameIndex;
  2682. GetRemedicalDiagnosisDataRequest({
  2683. this.remedicalCode,
  2684. this.frameIndex = 0,
  2685. String? token,
  2686. }) : super(
  2687. token: token,
  2688. );
  2689. factory GetRemedicalDiagnosisDataRequest.fromJson(Map<String, dynamic> map) {
  2690. return GetRemedicalDiagnosisDataRequest(
  2691. remedicalCode: map['RemedicalCode'],
  2692. frameIndex: map['FrameIndex'],
  2693. token: map['Token'],
  2694. );
  2695. }
  2696. Map<String, dynamic> toJson() {
  2697. final map = super.toJson();
  2698. if(remedicalCode != null)
  2699. map['RemedicalCode'] = remedicalCode;
  2700. map['FrameIndex'] = frameIndex;
  2701. return map;
  2702. }
  2703. }
  2704. class RemedicalAISelectedInfoDTO {
  2705. String? remedicalAISelectedInfoCode;
  2706. String? patientCode;
  2707. String? recordCode;
  2708. String? remedicalCode;
  2709. int frameIndex;
  2710. String? userCode;
  2711. String? orginalFileToken;
  2712. String? cdnFileToken;
  2713. String? aIFileToken;
  2714. String? aICdnFileToken;
  2715. RecommendedDownloadModeEnum recommendedDownloadMode;
  2716. String? previewFileToken;
  2717. String? diagnosisData;
  2718. DiagnosisConclusionEnum diagnosisConclusion;
  2719. List<DiagnosisOrganEnum >? diagnosisOrgans;
  2720. RemedicalAISelectedInfoDTO({
  2721. this.remedicalAISelectedInfoCode,
  2722. this.patientCode,
  2723. this.recordCode,
  2724. this.remedicalCode,
  2725. this.frameIndex = 0,
  2726. this.userCode,
  2727. this.orginalFileToken,
  2728. this.cdnFileToken,
  2729. this.aIFileToken,
  2730. this.aICdnFileToken,
  2731. this.recommendedDownloadMode = RecommendedDownloadModeEnum.Origin,
  2732. this.previewFileToken,
  2733. this.diagnosisData,
  2734. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  2735. this.diagnosisOrgans,
  2736. });
  2737. factory RemedicalAISelectedInfoDTO.fromJson(Map<String, dynamic> map) {
  2738. return RemedicalAISelectedInfoDTO(
  2739. remedicalAISelectedInfoCode: map['RemedicalAISelectedInfoCode'],
  2740. patientCode: map['PatientCode'],
  2741. recordCode: map['RecordCode'],
  2742. remedicalCode: map['RemedicalCode'],
  2743. frameIndex: map['FrameIndex'],
  2744. userCode: map['UserCode'],
  2745. orginalFileToken: map['OrginalFileToken'],
  2746. cdnFileToken: map['CdnFileToken'],
  2747. aIFileToken: map['AIFileToken'],
  2748. aICdnFileToken: map['AICdnFileToken'],
  2749. recommendedDownloadMode: RecommendedDownloadModeEnum.values.firstWhere((e) => e.index == map['RecommendedDownloadMode']),
  2750. previewFileToken: map['PreviewFileToken'],
  2751. diagnosisData: map['DiagnosisData'],
  2752. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  2753. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  2754. );
  2755. }
  2756. Map<String, dynamic> toJson() {
  2757. final map = Map<String, dynamic>();
  2758. if(remedicalAISelectedInfoCode != null)
  2759. map['RemedicalAISelectedInfoCode'] = remedicalAISelectedInfoCode;
  2760. if(patientCode != null)
  2761. map['PatientCode'] = patientCode;
  2762. if(recordCode != null)
  2763. map['RecordCode'] = recordCode;
  2764. if(remedicalCode != null)
  2765. map['RemedicalCode'] = remedicalCode;
  2766. map['FrameIndex'] = frameIndex;
  2767. if(userCode != null)
  2768. map['UserCode'] = userCode;
  2769. if(orginalFileToken != null)
  2770. map['OrginalFileToken'] = orginalFileToken;
  2771. if(cdnFileToken != null)
  2772. map['CdnFileToken'] = cdnFileToken;
  2773. if(aIFileToken != null)
  2774. map['AIFileToken'] = aIFileToken;
  2775. if(aICdnFileToken != null)
  2776. map['AICdnFileToken'] = aICdnFileToken;
  2777. map['RecommendedDownloadMode'] = recommendedDownloadMode.index;
  2778. if(previewFileToken != null)
  2779. map['PreviewFileToken'] = previewFileToken;
  2780. if(diagnosisData != null)
  2781. map['DiagnosisData'] = diagnosisData;
  2782. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  2783. if(diagnosisOrgans != null)
  2784. map['DiagnosisOrgans'] = diagnosisOrgans;
  2785. return map;
  2786. }
  2787. }
  2788. class GetPatientAISelectedInfosRequest extends TokenRequest{
  2789. String? patientCode;
  2790. String? recordCode;
  2791. GetPatientAISelectedInfosRequest({
  2792. this.patientCode,
  2793. this.recordCode,
  2794. String? token,
  2795. }) : super(
  2796. token: token,
  2797. );
  2798. factory GetPatientAISelectedInfosRequest.fromJson(Map<String, dynamic> map) {
  2799. return GetPatientAISelectedInfosRequest(
  2800. patientCode: map['PatientCode'],
  2801. recordCode: map['RecordCode'],
  2802. token: map['Token'],
  2803. );
  2804. }
  2805. Map<String, dynamic> toJson() {
  2806. final map = super.toJson();
  2807. if(patientCode != null)
  2808. map['PatientCode'] = patientCode;
  2809. if(recordCode != null)
  2810. map['RecordCode'] = recordCode;
  2811. return map;
  2812. }
  2813. }
  2814. class GetRemedicalAISelectedInfoRequest extends TokenRequest{
  2815. String? code;
  2816. GetRemedicalAISelectedInfoRequest({
  2817. this.code,
  2818. String? token,
  2819. }) : super(
  2820. token: token,
  2821. );
  2822. factory GetRemedicalAISelectedInfoRequest.fromJson(Map<String, dynamic> map) {
  2823. return GetRemedicalAISelectedInfoRequest(
  2824. code: map['Code'],
  2825. token: map['Token'],
  2826. );
  2827. }
  2828. Map<String, dynamic> toJson() {
  2829. final map = super.toJson();
  2830. if(code != null)
  2831. map['Code'] = code;
  2832. return map;
  2833. }
  2834. }
  2835. class SaveRemedicalAISelectedInfoRequest extends TokenRequest{
  2836. String? code;
  2837. String? remedicalCode;
  2838. int frameIndex;
  2839. String? aIFileToken;
  2840. String? previewFileToken;
  2841. String? diagnosisData;
  2842. DiagnosisConclusionEnum diagnosisConclusion;
  2843. List<DiagnosisOrganEnum >? diagnosisOrgans;
  2844. SaveRemedicalAISelectedInfoRequest({
  2845. this.code,
  2846. this.remedicalCode,
  2847. this.frameIndex = 0,
  2848. this.aIFileToken,
  2849. this.previewFileToken,
  2850. this.diagnosisData,
  2851. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  2852. this.diagnosisOrgans,
  2853. String? token,
  2854. }) : super(
  2855. token: token,
  2856. );
  2857. factory SaveRemedicalAISelectedInfoRequest.fromJson(Map<String, dynamic> map) {
  2858. return SaveRemedicalAISelectedInfoRequest(
  2859. code: map['Code'],
  2860. remedicalCode: map['RemedicalCode'],
  2861. frameIndex: map['FrameIndex'],
  2862. aIFileToken: map['AIFileToken'],
  2863. previewFileToken: map['PreviewFileToken'],
  2864. diagnosisData: map['DiagnosisData'],
  2865. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  2866. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  2867. token: map['Token'],
  2868. );
  2869. }
  2870. Map<String, dynamic> toJson() {
  2871. final map = super.toJson();
  2872. if(code != null)
  2873. map['Code'] = code;
  2874. if(remedicalCode != null)
  2875. map['RemedicalCode'] = remedicalCode;
  2876. map['FrameIndex'] = frameIndex;
  2877. if(aIFileToken != null)
  2878. map['AIFileToken'] = aIFileToken;
  2879. if(previewFileToken != null)
  2880. map['PreviewFileToken'] = previewFileToken;
  2881. if(diagnosisData != null)
  2882. map['DiagnosisData'] = diagnosisData;
  2883. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  2884. if(diagnosisOrgans != null)
  2885. map['DiagnosisOrgans'] = diagnosisOrgans;
  2886. return map;
  2887. }
  2888. }
  2889. class SyncRemedicalRecordRequest {
  2890. String? code;
  2891. String? organizationCode;
  2892. String? deviceCode;
  2893. bool isUploadReport;
  2894. List<DataItemDTO >? patientInfo;
  2895. DiagnosisStatusEnum diagnosisStatus;
  2896. List<DiagnosisInfoDTO >? aIDiagnosisInfos;
  2897. DateTime? createTime;
  2898. DateTime? updateTime;
  2899. String? creator;
  2900. bool isDelete;
  2901. SyncRemedicalRecordRequest({
  2902. this.code,
  2903. this.organizationCode,
  2904. this.deviceCode,
  2905. this.isUploadReport = false,
  2906. this.patientInfo,
  2907. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  2908. this.aIDiagnosisInfos,
  2909. this.createTime,
  2910. this.updateTime,
  2911. this.creator,
  2912. this.isDelete = false,
  2913. });
  2914. factory SyncRemedicalRecordRequest.fromJson(Map<String, dynamic> map) {
  2915. return SyncRemedicalRecordRequest(
  2916. code: map['Code'],
  2917. organizationCode: map['OrganizationCode'],
  2918. deviceCode: map['DeviceCode'],
  2919. isUploadReport: map['IsUploadReport'],
  2920. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2921. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  2922. aIDiagnosisInfos: map['AIDiagnosisInfos'] != null ? (map['AIDiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2923. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2924. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2925. creator: map['Creator'],
  2926. isDelete: map['IsDelete'],
  2927. );
  2928. }
  2929. Map<String, dynamic> toJson() {
  2930. final map = Map<String, dynamic>();
  2931. if(code != null)
  2932. map['Code'] = code;
  2933. if(organizationCode != null)
  2934. map['OrganizationCode'] = organizationCode;
  2935. if(deviceCode != null)
  2936. map['DeviceCode'] = deviceCode;
  2937. map['IsUploadReport'] = isUploadReport;
  2938. if(patientInfo != null)
  2939. map['PatientInfo'] = patientInfo;
  2940. map['DiagnosisStatus'] = diagnosisStatus.index;
  2941. if(aIDiagnosisInfos != null)
  2942. map['AIDiagnosisInfos'] = aIDiagnosisInfos;
  2943. if(createTime != null)
  2944. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  2945. if(updateTime != null)
  2946. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  2947. if(creator != null)
  2948. map['Creator'] = creator;
  2949. map['IsDelete'] = isDelete;
  2950. return map;
  2951. }
  2952. }
  2953. class SyncBatchRemedicalRecordRequest {
  2954. SyncDBEnum syncType;
  2955. List<SyncRemedicalRecordRequest >? remedicalRecordList;
  2956. SyncBatchRemedicalRecordRequest({
  2957. this.syncType = SyncDBEnum.Migrate,
  2958. this.remedicalRecordList,
  2959. });
  2960. factory SyncBatchRemedicalRecordRequest.fromJson(Map<String, dynamic> map) {
  2961. return SyncBatchRemedicalRecordRequest(
  2962. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  2963. remedicalRecordList: map['RemedicalRecordList'] != null ? (map['RemedicalRecordList'] as List).map((e)=>SyncRemedicalRecordRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  2964. );
  2965. }
  2966. Map<String, dynamic> toJson() {
  2967. final map = Map<String, dynamic>();
  2968. map['SyncType'] = syncType.index;
  2969. if(remedicalRecordList != null)
  2970. map['RemedicalRecordList'] = remedicalRecordList;
  2971. return map;
  2972. }
  2973. }
  2974. class SyncUploadRemedicalDataRequest {
  2975. String? code;
  2976. DateTime? createTime;
  2977. DateTime? updateTime;
  2978. String? examCode;
  2979. String? deviceCode;
  2980. String? previewFileToken;
  2981. String? fileToken;
  2982. String? imageUrl;
  2983. int fileSize;
  2984. String? coverImageToken;
  2985. String? applicationCategory;
  2986. String? application;
  2987. RemedicalFileDataTypeEnum fileDataType;
  2988. ImageLocationDTO? imageLocation;
  2989. SyncUploadRemedicalDataRequest({
  2990. this.code,
  2991. this.createTime,
  2992. this.updateTime,
  2993. this.examCode,
  2994. this.deviceCode,
  2995. this.previewFileToken,
  2996. this.fileToken,
  2997. this.imageUrl,
  2998. this.fileSize = 0,
  2999. this.coverImageToken,
  3000. this.applicationCategory,
  3001. this.application,
  3002. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  3003. this.imageLocation,
  3004. });
  3005. factory SyncUploadRemedicalDataRequest.fromJson(Map<String, dynamic> map) {
  3006. return SyncUploadRemedicalDataRequest(
  3007. code: map['Code'],
  3008. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3009. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3010. examCode: map['ExamCode'],
  3011. deviceCode: map['DeviceCode'],
  3012. previewFileToken: map['PreviewFileToken'],
  3013. fileToken: map['FileToken'],
  3014. imageUrl: map['ImageUrl'],
  3015. fileSize: map['FileSize'],
  3016. coverImageToken: map['CoverImageToken'],
  3017. applicationCategory: map['ApplicationCategory'],
  3018. application: map['Application'],
  3019. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  3020. imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
  3021. );
  3022. }
  3023. Map<String, dynamic> toJson() {
  3024. final map = Map<String, dynamic>();
  3025. if(code != null)
  3026. map['Code'] = code;
  3027. if(createTime != null)
  3028. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  3029. if(updateTime != null)
  3030. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  3031. if(examCode != null)
  3032. map['ExamCode'] = examCode;
  3033. if(deviceCode != null)
  3034. map['DeviceCode'] = deviceCode;
  3035. if(previewFileToken != null)
  3036. map['PreviewFileToken'] = previewFileToken;
  3037. if(fileToken != null)
  3038. map['FileToken'] = fileToken;
  3039. if(imageUrl != null)
  3040. map['ImageUrl'] = imageUrl;
  3041. map['FileSize'] = fileSize;
  3042. if(coverImageToken != null)
  3043. map['CoverImageToken'] = coverImageToken;
  3044. if(applicationCategory != null)
  3045. map['ApplicationCategory'] = applicationCategory;
  3046. if(application != null)
  3047. map['Application'] = application;
  3048. map['FileDataType'] = fileDataType.index;
  3049. if(imageLocation != null)
  3050. map['ImageLocation'] = imageLocation;
  3051. return map;
  3052. }
  3053. }
  3054. class SyncBatchUploadRemedicalDatasRequest {
  3055. SyncDBEnum syncType;
  3056. List<SyncUploadRemedicalDataRequest >? syncUploadRemedicalDataList;
  3057. SyncBatchUploadRemedicalDatasRequest({
  3058. this.syncType = SyncDBEnum.Migrate,
  3059. this.syncUploadRemedicalDataList,
  3060. });
  3061. factory SyncBatchUploadRemedicalDatasRequest.fromJson(Map<String, dynamic> map) {
  3062. return SyncBatchUploadRemedicalDatasRequest(
  3063. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3064. syncUploadRemedicalDataList: map['SyncUploadRemedicalDataList'] != null ? (map['SyncUploadRemedicalDataList'] as List).map((e)=>SyncUploadRemedicalDataRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3065. );
  3066. }
  3067. Map<String, dynamic> toJson() {
  3068. final map = Map<String, dynamic>();
  3069. map['SyncType'] = syncType.index;
  3070. if(syncUploadRemedicalDataList != null)
  3071. map['SyncUploadRemedicalDataList'] = syncUploadRemedicalDataList;
  3072. return map;
  3073. }
  3074. }
  3075. class SyncAIResultRequest {
  3076. String? remedicalCode;
  3077. String? diagnosisResult;
  3078. DateTime? createTime;
  3079. DateTime? updateTime;
  3080. SyncAIResultRequest({
  3081. this.remedicalCode,
  3082. this.diagnosisResult,
  3083. this.createTime,
  3084. this.updateTime,
  3085. });
  3086. factory SyncAIResultRequest.fromJson(Map<String, dynamic> map) {
  3087. return SyncAIResultRequest(
  3088. remedicalCode: map['RemedicalCode'],
  3089. diagnosisResult: map['DiagnosisResult'],
  3090. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3091. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3092. );
  3093. }
  3094. Map<String, dynamic> toJson() {
  3095. final map = Map<String, dynamic>();
  3096. if(remedicalCode != null)
  3097. map['RemedicalCode'] = remedicalCode;
  3098. if(diagnosisResult != null)
  3099. map['DiagnosisResult'] = diagnosisResult;
  3100. if(createTime != null)
  3101. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  3102. if(updateTime != null)
  3103. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  3104. return map;
  3105. }
  3106. }
  3107. class SyncBatchAIResultRequest {
  3108. SyncDBEnum syncType;
  3109. List<SyncAIResultRequest >? syncAIResultList;
  3110. SyncBatchAIResultRequest({
  3111. this.syncType = SyncDBEnum.Migrate,
  3112. this.syncAIResultList,
  3113. });
  3114. factory SyncBatchAIResultRequest.fromJson(Map<String, dynamic> map) {
  3115. return SyncBatchAIResultRequest(
  3116. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3117. syncAIResultList: map['SyncAIResultList'] != null ? (map['SyncAIResultList'] as List).map((e)=>SyncAIResultRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3118. );
  3119. }
  3120. Map<String, dynamic> toJson() {
  3121. final map = Map<String, dynamic>();
  3122. map['SyncType'] = syncType.index;
  3123. if(syncAIResultList != null)
  3124. map['SyncAIResultList'] = syncAIResultList;
  3125. return map;
  3126. }
  3127. }
  3128. class SyncBatchCarotidResultRequest {
  3129. SyncDBEnum syncType;
  3130. List<GetCarotidResultRequest >? syncCarotidResultRequest;
  3131. SyncBatchCarotidResultRequest({
  3132. this.syncType = SyncDBEnum.Migrate,
  3133. this.syncCarotidResultRequest,
  3134. });
  3135. factory SyncBatchCarotidResultRequest.fromJson(Map<String, dynamic> map) {
  3136. return SyncBatchCarotidResultRequest(
  3137. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3138. syncCarotidResultRequest: map['SyncCarotidResultRequest'] != null ? (map['SyncCarotidResultRequest'] as List).map((e)=>GetCarotidResultRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3139. );
  3140. }
  3141. Map<String, dynamic> toJson() {
  3142. final map = Map<String, dynamic>();
  3143. map['SyncType'] = syncType.index;
  3144. if(syncCarotidResultRequest != null)
  3145. map['SyncCarotidResultRequest'] = syncCarotidResultRequest;
  3146. return map;
  3147. }
  3148. }
  3149. class LabFileInfoRequest extends TokenRequest{
  3150. String? filePath;
  3151. String? fileName;
  3152. UploadFileTypeEnum fileType;
  3153. LabFileInfoRequest({
  3154. this.filePath,
  3155. this.fileName,
  3156. this.fileType = UploadFileTypeEnum.Unknown,
  3157. String? token,
  3158. }) : super(
  3159. token: token,
  3160. );
  3161. factory LabFileInfoRequest.fromJson(Map<String, dynamic> map) {
  3162. return LabFileInfoRequest(
  3163. filePath: map['FilePath'],
  3164. fileName: map['FileName'],
  3165. fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
  3166. token: map['Token'],
  3167. );
  3168. }
  3169. Map<String, dynamic> toJson() {
  3170. final map = super.toJson();
  3171. if(filePath != null)
  3172. map['FilePath'] = filePath;
  3173. if(fileName != null)
  3174. map['FileName'] = fileName;
  3175. map['FileType'] = fileType.index;
  3176. return map;
  3177. }
  3178. }
  3179. class FindDeviceDiagnosisRequest extends TokenRequest{
  3180. String? deviceCode;
  3181. FindDeviceDiagnosisRequest({
  3182. this.deviceCode,
  3183. String? token,
  3184. }) : super(
  3185. token: token,
  3186. );
  3187. factory FindDeviceDiagnosisRequest.fromJson(Map<String, dynamic> map) {
  3188. return FindDeviceDiagnosisRequest(
  3189. deviceCode: map['DeviceCode'],
  3190. token: map['Token'],
  3191. );
  3192. }
  3193. Map<String, dynamic> toJson() {
  3194. final map = super.toJson();
  3195. if(deviceCode != null)
  3196. map['DeviceCode'] = deviceCode;
  3197. return map;
  3198. }
  3199. }