remedical.m.dart 97 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474
  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. UserDefinedMeasureFolderDTO({
  1144. this.name,
  1145. this.workingItemNames,
  1146. this.defaultItem,
  1147. this.multiMethodItemMetas,
  1148. });
  1149. factory UserDefinedMeasureFolderDTO.fromJson(Map<String, dynamic> map) {
  1150. return UserDefinedMeasureFolderDTO(
  1151. name: map['Name'],
  1152. workingItemNames: map['WorkingItemNames'] != null ? map['WorkingItemNames'].cast<String>().toList() : null,
  1153. defaultItem: map['DefaultItem'],
  1154. multiMethodItemMetas: map['MultiMethodItemMetas'] != null ? (map['MultiMethodItemMetas'] as List).map((e)=>UserDefinedItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1155. );
  1156. }
  1157. Map<String, dynamic> toJson() {
  1158. final map = Map<String, dynamic>();
  1159. if(name != null)
  1160. map['Name'] = name;
  1161. if(workingItemNames != null)
  1162. map['WorkingItemNames'] = workingItemNames;
  1163. if(defaultItem != null)
  1164. map['DefaultItem'] = defaultItem;
  1165. if(multiMethodItemMetas != null)
  1166. map['MultiMethodItemMetas'] = multiMethodItemMetas;
  1167. return map;
  1168. }
  1169. }
  1170. class UserDefinedMeasureGroupDTO {
  1171. String? name;
  1172. List<UserDefinedMeasureFolderDTO >? folders;
  1173. UserDefinedMeasureGroupDTO({
  1174. this.name,
  1175. this.folders,
  1176. });
  1177. factory UserDefinedMeasureGroupDTO.fromJson(Map<String, dynamic> map) {
  1178. return UserDefinedMeasureGroupDTO(
  1179. name: map['Name'],
  1180. folders: map['Folders'] != null ? (map['Folders'] as List).map((e)=>UserDefinedMeasureFolderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1181. );
  1182. }
  1183. Map<String, dynamic> toJson() {
  1184. final map = Map<String, dynamic>();
  1185. if(name != null)
  1186. map['Name'] = name;
  1187. if(folders != null)
  1188. map['Folders'] = folders;
  1189. return map;
  1190. }
  1191. }
  1192. class UserDefinedMeasureModeDTO {
  1193. String? modeName;
  1194. List<UserDefinedMeasureGroupDTO >? workingGroups;
  1195. UserDefinedMeasureModeDTO({
  1196. this.modeName,
  1197. this.workingGroups,
  1198. });
  1199. factory UserDefinedMeasureModeDTO.fromJson(Map<String, dynamic> map) {
  1200. return UserDefinedMeasureModeDTO(
  1201. modeName: map['ModeName'],
  1202. workingGroups: map['WorkingGroups'] != null ? (map['WorkingGroups'] as List).map((e)=>UserDefinedMeasureGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1203. );
  1204. }
  1205. Map<String, dynamic> toJson() {
  1206. final map = Map<String, dynamic>();
  1207. if(modeName != null)
  1208. map['ModeName'] = modeName;
  1209. if(workingGroups != null)
  1210. map['WorkingGroups'] = workingGroups;
  1211. return map;
  1212. }
  1213. }
  1214. class SaveUserDefinedMeasureApplicationRequest extends TokenRequest{
  1215. String? version;
  1216. String? applicationName;
  1217. String? categoryName;
  1218. UserDefinedMeasureModeDTO? workingMode;
  1219. SaveUserDefinedMeasureApplicationRequest({
  1220. this.version,
  1221. this.applicationName,
  1222. this.categoryName,
  1223. this.workingMode,
  1224. String? token,
  1225. }) : super(
  1226. token: token,
  1227. );
  1228. factory SaveUserDefinedMeasureApplicationRequest.fromJson(Map<String, dynamic> map) {
  1229. return SaveUserDefinedMeasureApplicationRequest(
  1230. version: map['Version'],
  1231. applicationName: map['ApplicationName'],
  1232. categoryName: map['CategoryName'],
  1233. workingMode: map['WorkingMode'] != null ? UserDefinedMeasureModeDTO.fromJson(map['WorkingMode']) : null,
  1234. token: map['Token'],
  1235. );
  1236. }
  1237. Map<String, dynamic> toJson() {
  1238. final map = super.toJson();
  1239. if(version != null)
  1240. map['Version'] = version;
  1241. if(applicationName != null)
  1242. map['ApplicationName'] = applicationName;
  1243. if(categoryName != null)
  1244. map['CategoryName'] = categoryName;
  1245. if(workingMode != null)
  1246. map['WorkingMode'] = workingMode;
  1247. return map;
  1248. }
  1249. }
  1250. enum CursorTypeEnum {
  1251. CursorType1Icon,
  1252. CursorType2Icon,
  1253. CursorType3Icon,
  1254. CursorType4Icon,
  1255. CursorType5Icon,
  1256. }
  1257. class MeasureSystemSettingDTO {
  1258. String? version;
  1259. CursorTypeEnum cursorType;
  1260. int cursorSize;
  1261. int shapeCursorSize;
  1262. String? cursorColor;
  1263. bool showResultWindow;
  1264. int showResultLocation;
  1265. int fontSize;
  1266. bool showCursorLine;
  1267. bool holdMeasureLine;
  1268. bool showDepthGuideline;
  1269. bool showBriefAnnotation;
  1270. String? minCursorDistance;
  1271. String? autoSnapDistance;
  1272. int annotationFontSize;
  1273. bool showProtocolInWorkSheet;
  1274. bool showAnnotation;
  1275. MeasureSystemSettingDTO({
  1276. this.version,
  1277. this.cursorType = CursorTypeEnum.CursorType1Icon,
  1278. this.cursorSize = 0,
  1279. this.shapeCursorSize = 0,
  1280. this.cursorColor,
  1281. this.showResultWindow = false,
  1282. this.showResultLocation = 0,
  1283. this.fontSize = 0,
  1284. this.showCursorLine = false,
  1285. this.holdMeasureLine = false,
  1286. this.showDepthGuideline = false,
  1287. this.showBriefAnnotation = false,
  1288. this.minCursorDistance,
  1289. this.autoSnapDistance,
  1290. this.annotationFontSize = 0,
  1291. this.showProtocolInWorkSheet = false,
  1292. this.showAnnotation = false,
  1293. });
  1294. factory MeasureSystemSettingDTO.fromJson(Map<String, dynamic> map) {
  1295. return MeasureSystemSettingDTO(
  1296. version: map['Version'],
  1297. cursorType: CursorTypeEnum.values.firstWhere((e) => e.index == map['CursorType']),
  1298. cursorSize: map['CursorSize'],
  1299. shapeCursorSize: map['ShapeCursorSize'],
  1300. cursorColor: map['CursorColor'],
  1301. showResultWindow: map['ShowResultWindow'],
  1302. showResultLocation: map['ShowResultLocation'],
  1303. fontSize: map['FontSize'],
  1304. showCursorLine: map['ShowCursorLine'],
  1305. holdMeasureLine: map['HoldMeasureLine'],
  1306. showDepthGuideline: map['ShowDepthGuideline'],
  1307. showBriefAnnotation: map['ShowBriefAnnotation'],
  1308. minCursorDistance: map['MinCursorDistance'],
  1309. autoSnapDistance: map['AutoSnapDistance'],
  1310. annotationFontSize: map['AnnotationFontSize'],
  1311. showProtocolInWorkSheet: map['ShowProtocolInWorkSheet'],
  1312. showAnnotation: map['ShowAnnotation'],
  1313. );
  1314. }
  1315. Map<String, dynamic> toJson() {
  1316. final map = Map<String, dynamic>();
  1317. if(version != null)
  1318. map['Version'] = version;
  1319. map['CursorType'] = cursorType.index;
  1320. map['CursorSize'] = cursorSize;
  1321. map['ShapeCursorSize'] = shapeCursorSize;
  1322. if(cursorColor != null)
  1323. map['CursorColor'] = cursorColor;
  1324. map['ShowResultWindow'] = showResultWindow;
  1325. map['ShowResultLocation'] = showResultLocation;
  1326. map['FontSize'] = fontSize;
  1327. map['ShowCursorLine'] = showCursorLine;
  1328. map['HoldMeasureLine'] = holdMeasureLine;
  1329. map['ShowDepthGuideline'] = showDepthGuideline;
  1330. map['ShowBriefAnnotation'] = showBriefAnnotation;
  1331. if(minCursorDistance != null)
  1332. map['MinCursorDistance'] = minCursorDistance;
  1333. if(autoSnapDistance != null)
  1334. map['AutoSnapDistance'] = autoSnapDistance;
  1335. map['AnnotationFontSize'] = annotationFontSize;
  1336. map['ShowProtocolInWorkSheet'] = showProtocolInWorkSheet;
  1337. map['ShowAnnotation'] = showAnnotation;
  1338. return map;
  1339. }
  1340. }
  1341. class GetMeasureSystemSettingRequest extends TokenRequest{
  1342. GetMeasureSystemSettingRequest({
  1343. String? token,
  1344. }) : super(
  1345. token: token,
  1346. );
  1347. factory GetMeasureSystemSettingRequest.fromJson(Map<String, dynamic> map) {
  1348. return GetMeasureSystemSettingRequest(
  1349. token: map['Token'],
  1350. );
  1351. }
  1352. Map<String, dynamic> toJson() {
  1353. final map = super.toJson();
  1354. return map;
  1355. }
  1356. }
  1357. class SaveMeasureSystemSettingRequest extends TokenRequest{
  1358. MeasureSystemSettingDTO? systemSetting;
  1359. SaveMeasureSystemSettingRequest({
  1360. this.systemSetting,
  1361. String? token,
  1362. }) : super(
  1363. token: token,
  1364. );
  1365. factory SaveMeasureSystemSettingRequest.fromJson(Map<String, dynamic> map) {
  1366. return SaveMeasureSystemSettingRequest(
  1367. systemSetting: map['SystemSetting'] != null ? MeasureSystemSettingDTO.fromJson(map['SystemSetting']) : null,
  1368. token: map['Token'],
  1369. );
  1370. }
  1371. Map<String, dynamic> toJson() {
  1372. final map = super.toJson();
  1373. if(systemSetting != null)
  1374. map['SystemSetting'] = systemSetting;
  1375. return map;
  1376. }
  1377. }
  1378. enum RecordCreateTypeEnum {
  1379. Reservation,
  1380. Normal,
  1381. }
  1382. class RecordInfoDTO extends BaseDTO{
  1383. String? recordCode;
  1384. String? patientCode;
  1385. String? deviceCode;
  1386. RecordStatusEnum recordStatus;
  1387. String? creatorCode;
  1388. String? tags;
  1389. RecordCreateTypeEnum createType;
  1390. List<DataItemDTO >? patientInfo;
  1391. List<PatientInfoExt >? patientInfoExtList;
  1392. String? devicePatientID;
  1393. String? patientType;
  1394. List<String >? readUsers;
  1395. String? rootOrganizationCode;
  1396. String? organizationCode;
  1397. List<String >? associatedExamCodes;
  1398. DiagnosisStatusEnum diagnosisStatus;
  1399. List<DiagnosisInfoDTO >? diagnosisInfos;
  1400. bool isCollecting;
  1401. DateTime? startCollectingTime;
  1402. RecordInfoDTO({
  1403. this.recordCode,
  1404. this.patientCode,
  1405. this.deviceCode,
  1406. this.recordStatus = RecordStatusEnum.NotScanned,
  1407. this.creatorCode,
  1408. this.tags,
  1409. this.createType = RecordCreateTypeEnum.Reservation,
  1410. this.patientInfo,
  1411. this.patientInfoExtList,
  1412. this.devicePatientID,
  1413. this.patientType,
  1414. this.readUsers,
  1415. this.rootOrganizationCode,
  1416. this.organizationCode,
  1417. this.associatedExamCodes,
  1418. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  1419. this.diagnosisInfos,
  1420. this.isCollecting = false,
  1421. this.startCollectingTime,
  1422. DateTime? createTime,
  1423. DateTime? updateTime,
  1424. }) : super(
  1425. createTime: createTime,
  1426. updateTime: updateTime,
  1427. );
  1428. factory RecordInfoDTO.fromJson(Map<String, dynamic> map) {
  1429. return RecordInfoDTO(
  1430. recordCode: map['RecordCode'],
  1431. patientCode: map['PatientCode'],
  1432. deviceCode: map['DeviceCode'],
  1433. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  1434. creatorCode: map['CreatorCode'],
  1435. tags: map['Tags'],
  1436. createType: RecordCreateTypeEnum.values.firstWhere((e) => e.index == map['CreateType']),
  1437. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1438. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  1439. devicePatientID: map['DevicePatientID'],
  1440. patientType: map['PatientType'],
  1441. readUsers: map['ReadUsers'] != null ? map['ReadUsers'].cast<String>().toList() : null,
  1442. rootOrganizationCode: map['RootOrganizationCode'],
  1443. organizationCode: map['OrganizationCode'],
  1444. associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast<String>().toList() : null,
  1445. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  1446. diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1447. isCollecting: map['IsCollecting'],
  1448. startCollectingTime: map['StartCollectingTime'] != null ? DateTime.parse(map['StartCollectingTime']) : null,
  1449. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1450. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1451. );
  1452. }
  1453. Map<String, dynamic> toJson() {
  1454. final map = super.toJson();
  1455. if(recordCode != null)
  1456. map['RecordCode'] = recordCode;
  1457. if(patientCode != null)
  1458. map['PatientCode'] = patientCode;
  1459. if(deviceCode != null)
  1460. map['DeviceCode'] = deviceCode;
  1461. map['RecordStatus'] = recordStatus.index;
  1462. if(creatorCode != null)
  1463. map['CreatorCode'] = creatorCode;
  1464. if(tags != null)
  1465. map['Tags'] = tags;
  1466. map['CreateType'] = createType.index;
  1467. if(patientInfo != null)
  1468. map['PatientInfo'] = patientInfo;
  1469. if(patientInfoExtList != null)
  1470. map['PatientInfoExtList'] = patientInfoExtList;
  1471. if(devicePatientID != null)
  1472. map['DevicePatientID'] = devicePatientID;
  1473. if(patientType != null)
  1474. map['PatientType'] = patientType;
  1475. if(readUsers != null)
  1476. map['ReadUsers'] = readUsers;
  1477. if(rootOrganizationCode != null)
  1478. map['RootOrganizationCode'] = rootOrganizationCode;
  1479. if(organizationCode != null)
  1480. map['OrganizationCode'] = organizationCode;
  1481. if(associatedExamCodes != null)
  1482. map['AssociatedExamCodes'] = associatedExamCodes;
  1483. map['DiagnosisStatus'] = diagnosisStatus.index;
  1484. if(diagnosisInfos != null)
  1485. map['DiagnosisInfos'] = diagnosisInfos;
  1486. map['IsCollecting'] = isCollecting;
  1487. if(startCollectingTime != null)
  1488. map['StartCollectingTime'] = JsonRpcUtils.dateFormat(startCollectingTime!);
  1489. return map;
  1490. }
  1491. }
  1492. class RecordData {
  1493. String? patientName;
  1494. String? patientCode;
  1495. List<RecordInfoDTO >? recordItemList;
  1496. RecordData({
  1497. this.patientName,
  1498. this.patientCode,
  1499. this.recordItemList,
  1500. });
  1501. factory RecordData.fromJson(Map<String, dynamic> map) {
  1502. return RecordData(
  1503. patientName: map['PatientName'],
  1504. patientCode: map['PatientCode'],
  1505. recordItemList: map['RecordItemList'] != null ? (map['RecordItemList'] as List).map((e)=>RecordInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1506. );
  1507. }
  1508. Map<String, dynamic> toJson() {
  1509. final map = Map<String, dynamic>();
  1510. if(patientName != null)
  1511. map['PatientName'] = patientName;
  1512. if(patientCode != null)
  1513. map['PatientCode'] = patientCode;
  1514. if(recordItemList != null)
  1515. map['RecordItemList'] = recordItemList;
  1516. return map;
  1517. }
  1518. }
  1519. class ReportItem {
  1520. String? recordCode;
  1521. String? fileToken;
  1522. ReportItem({
  1523. this.recordCode,
  1524. this.fileToken,
  1525. });
  1526. factory ReportItem.fromJson(Map<String, dynamic> map) {
  1527. return ReportItem(
  1528. recordCode: map['RecordCode'],
  1529. fileToken: map['FileToken'],
  1530. );
  1531. }
  1532. Map<String, dynamic> toJson() {
  1533. final map = Map<String, dynamic>();
  1534. if(recordCode != null)
  1535. map['RecordCode'] = recordCode;
  1536. if(fileToken != null)
  1537. map['FileToken'] = fileToken;
  1538. return map;
  1539. }
  1540. }
  1541. class ReportData {
  1542. String? patientName;
  1543. String? patientCode;
  1544. List<ReportItem >? reportItemList;
  1545. ReportData({
  1546. this.patientName,
  1547. this.patientCode,
  1548. this.reportItemList,
  1549. });
  1550. factory ReportData.fromJson(Map<String, dynamic> map) {
  1551. return ReportData(
  1552. patientName: map['PatientName'],
  1553. patientCode: map['PatientCode'],
  1554. reportItemList: map['ReportItemList'] != null ? (map['ReportItemList'] as List).map((e)=>ReportItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1555. );
  1556. }
  1557. Map<String, dynamic> toJson() {
  1558. final map = Map<String, dynamic>();
  1559. if(patientName != null)
  1560. map['PatientName'] = patientName;
  1561. if(patientCode != null)
  1562. map['PatientCode'] = patientCode;
  1563. if(reportItemList != null)
  1564. map['ReportItemList'] = reportItemList;
  1565. return map;
  1566. }
  1567. }
  1568. class RemedicalItem {
  1569. String? recordCode;
  1570. String? fileToken;
  1571. RemedicalFileDataTypeEnum fileDataType;
  1572. RemedicalItem({
  1573. this.recordCode,
  1574. this.fileToken,
  1575. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1576. });
  1577. factory RemedicalItem.fromJson(Map<String, dynamic> map) {
  1578. return RemedicalItem(
  1579. recordCode: map['RecordCode'],
  1580. fileToken: map['FileToken'],
  1581. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1582. );
  1583. }
  1584. Map<String, dynamic> toJson() {
  1585. final map = Map<String, dynamic>();
  1586. if(recordCode != null)
  1587. map['RecordCode'] = recordCode;
  1588. if(fileToken != null)
  1589. map['FileToken'] = fileToken;
  1590. map['FileDataType'] = fileDataType.index;
  1591. return map;
  1592. }
  1593. }
  1594. class RemedicalData {
  1595. String? patientName;
  1596. String? patientCode;
  1597. List<RemedicalItem >? remedicalItemList;
  1598. RemedicalData({
  1599. this.patientName,
  1600. this.patientCode,
  1601. this.remedicalItemList,
  1602. });
  1603. factory RemedicalData.fromJson(Map<String, dynamic> map) {
  1604. return RemedicalData(
  1605. patientName: map['PatientName'],
  1606. patientCode: map['PatientCode'],
  1607. remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1608. );
  1609. }
  1610. Map<String, dynamic> toJson() {
  1611. final map = Map<String, dynamic>();
  1612. if(patientName != null)
  1613. map['PatientName'] = patientName;
  1614. if(patientCode != null)
  1615. map['PatientCode'] = patientCode;
  1616. if(remedicalItemList != null)
  1617. map['RemedicalItemList'] = remedicalItemList;
  1618. return map;
  1619. }
  1620. }
  1621. class ExportRemedicalDataResult {
  1622. List<RecordData >? recordList;
  1623. List<ReportData >? reportList;
  1624. List<RemedicalData >? remedicalList;
  1625. ExportRemedicalDataResult({
  1626. this.recordList,
  1627. this.reportList,
  1628. this.remedicalList,
  1629. });
  1630. factory ExportRemedicalDataResult.fromJson(Map<String, dynamic> map) {
  1631. return ExportRemedicalDataResult(
  1632. recordList: map['RecordList'] != null ? (map['RecordList'] as List).map((e)=>RecordData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1633. reportList: map['ReportList'] != null ? (map['ReportList'] as List).map((e)=>ReportData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1634. remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1635. );
  1636. }
  1637. Map<String, dynamic> toJson() {
  1638. final map = Map<String, dynamic>();
  1639. if(recordList != null)
  1640. map['RecordList'] = recordList;
  1641. if(reportList != null)
  1642. map['ReportList'] = reportList;
  1643. if(remedicalList != null)
  1644. map['RemedicalList'] = remedicalList;
  1645. return map;
  1646. }
  1647. }
  1648. class ExportRemedicalDataRequest extends TokenRequest{
  1649. DateTime? startTime;
  1650. DateTime? endTime;
  1651. bool isExportReport;
  1652. bool isExportRecord;
  1653. bool isExportRemedicalData;
  1654. List<String >? patientCodes;
  1655. ExportRemedicalDataRequest({
  1656. this.startTime,
  1657. this.endTime,
  1658. this.isExportReport = false,
  1659. this.isExportRecord = false,
  1660. this.isExportRemedicalData = false,
  1661. this.patientCodes,
  1662. String? token,
  1663. }) : super(
  1664. token: token,
  1665. );
  1666. factory ExportRemedicalDataRequest.fromJson(Map<String, dynamic> map) {
  1667. return ExportRemedicalDataRequest(
  1668. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  1669. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  1670. isExportReport: map['IsExportReport'],
  1671. isExportRecord: map['IsExportRecord'],
  1672. isExportRemedicalData: map['IsExportRemedicalData'],
  1673. patientCodes: map['PatientCodes'] != null ? map['PatientCodes'].cast<String>().toList() : null,
  1674. token: map['Token'],
  1675. );
  1676. }
  1677. Map<String, dynamic> toJson() {
  1678. final map = super.toJson();
  1679. if(startTime != null)
  1680. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  1681. if(endTime != null)
  1682. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  1683. map['IsExportReport'] = isExportReport;
  1684. map['IsExportRecord'] = isExportRecord;
  1685. map['IsExportRemedicalData'] = isExportRemedicalData;
  1686. if(patientCodes != null)
  1687. map['PatientCodes'] = patientCodes;
  1688. return map;
  1689. }
  1690. }
  1691. class FindCacheByCodeRequest extends TokenRequest{
  1692. String? cacheCode;
  1693. FindCacheByCodeRequest({
  1694. this.cacheCode,
  1695. String? token,
  1696. }) : super(
  1697. token: token,
  1698. );
  1699. factory FindCacheByCodeRequest.fromJson(Map<String, dynamic> map) {
  1700. return FindCacheByCodeRequest(
  1701. cacheCode: map['CacheCode'],
  1702. token: map['Token'],
  1703. );
  1704. }
  1705. Map<String, dynamic> toJson() {
  1706. final map = super.toJson();
  1707. if(cacheCode != null)
  1708. map['CacheCode'] = cacheCode;
  1709. return map;
  1710. }
  1711. }
  1712. class CreateReferralRecordRequest extends TokenRequest{
  1713. String? patientCode;
  1714. String? subjectMatter;
  1715. String? referralOrganizationCode;
  1716. String? referralUserCode;
  1717. String? referralRecordCode;
  1718. CreateReferralRecordRequest({
  1719. this.patientCode,
  1720. this.subjectMatter,
  1721. this.referralOrganizationCode,
  1722. this.referralUserCode,
  1723. this.referralRecordCode,
  1724. String? token,
  1725. }) : super(
  1726. token: token,
  1727. );
  1728. factory CreateReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1729. return CreateReferralRecordRequest(
  1730. patientCode: map['PatientCode'],
  1731. subjectMatter: map['SubjectMatter'],
  1732. referralOrganizationCode: map['ReferralOrganizationCode'],
  1733. referralUserCode: map['ReferralUserCode'],
  1734. referralRecordCode: map['ReferralRecordCode'],
  1735. token: map['Token'],
  1736. );
  1737. }
  1738. Map<String, dynamic> toJson() {
  1739. final map = super.toJson();
  1740. if(patientCode != null)
  1741. map['PatientCode'] = patientCode;
  1742. if(subjectMatter != null)
  1743. map['SubjectMatter'] = subjectMatter;
  1744. if(referralOrganizationCode != null)
  1745. map['ReferralOrganizationCode'] = referralOrganizationCode;
  1746. if(referralUserCode != null)
  1747. map['ReferralUserCode'] = referralUserCode;
  1748. if(referralRecordCode != null)
  1749. map['ReferralRecordCode'] = referralRecordCode;
  1750. return map;
  1751. }
  1752. }
  1753. class ModifyReferralRecordRequest extends TokenRequest{
  1754. String? patientCode;
  1755. String? subjectMatter;
  1756. String? referralOrganizationCode;
  1757. String? referralUserCode;
  1758. String? referralRecordCode;
  1759. ModifyReferralRecordRequest({
  1760. this.patientCode,
  1761. this.subjectMatter,
  1762. this.referralOrganizationCode,
  1763. this.referralUserCode,
  1764. this.referralRecordCode,
  1765. String? token,
  1766. }) : super(
  1767. token: token,
  1768. );
  1769. factory ModifyReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1770. return ModifyReferralRecordRequest(
  1771. patientCode: map['PatientCode'],
  1772. subjectMatter: map['SubjectMatter'],
  1773. referralOrganizationCode: map['ReferralOrganizationCode'],
  1774. referralUserCode: map['ReferralUserCode'],
  1775. referralRecordCode: map['ReferralRecordCode'],
  1776. token: map['Token'],
  1777. );
  1778. }
  1779. Map<String, dynamic> toJson() {
  1780. final map = super.toJson();
  1781. if(patientCode != null)
  1782. map['PatientCode'] = patientCode;
  1783. if(subjectMatter != null)
  1784. map['SubjectMatter'] = subjectMatter;
  1785. if(referralOrganizationCode != null)
  1786. map['ReferralOrganizationCode'] = referralOrganizationCode;
  1787. if(referralUserCode != null)
  1788. map['ReferralUserCode'] = referralUserCode;
  1789. if(referralRecordCode != null)
  1790. map['ReferralRecordCode'] = referralRecordCode;
  1791. return map;
  1792. }
  1793. }
  1794. class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{
  1795. String? code;
  1796. String? outUserName;
  1797. String? inUserName;
  1798. QueryReferralRecordPageDTO({
  1799. this.code,
  1800. this.outUserName,
  1801. this.inUserName,
  1802. String? patientCode,
  1803. bool isValid = false,
  1804. List<DataItemDTO >? patientData,
  1805. int unReadRecordCount = 0,
  1806. bool isReferral = false,
  1807. List<String >? devicePatientIDs,
  1808. DateTime? createTime,
  1809. DateTime? updateTime,
  1810. }) : super(
  1811. patientCode: patientCode,
  1812. isValid: isValid,
  1813. patientData: patientData,
  1814. unReadRecordCount: unReadRecordCount,
  1815. isReferral: isReferral,
  1816. devicePatientIDs: devicePatientIDs,
  1817. createTime: createTime,
  1818. updateTime: updateTime,
  1819. );
  1820. factory QueryReferralRecordPageDTO.fromJson(Map<String, dynamic> map) {
  1821. return QueryReferralRecordPageDTO(
  1822. code: map['Code'],
  1823. outUserName: map['OutUserName'],
  1824. inUserName: map['InUserName'],
  1825. patientCode: map['PatientCode'],
  1826. isValid: map['IsValid'],
  1827. patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1828. unReadRecordCount: map['UnReadRecordCount'],
  1829. isReferral: map['IsReferral'],
  1830. devicePatientIDs: map['DevicePatientIDs'] != null ? map['DevicePatientIDs'].cast<String>().toList() : null,
  1831. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1832. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1833. );
  1834. }
  1835. Map<String, dynamic> toJson() {
  1836. final map = super.toJson();
  1837. if(code != null)
  1838. map['Code'] = code;
  1839. if(outUserName != null)
  1840. map['OutUserName'] = outUserName;
  1841. if(inUserName != null)
  1842. map['InUserName'] = inUserName;
  1843. return map;
  1844. }
  1845. }
  1846. class QueryReferralRecordListRequest extends PageRequest{
  1847. String? keyWord;
  1848. DateTime? startTime;
  1849. DateTime? endTime;
  1850. PatientValidStatusEnum isValid;
  1851. QueryReferralRecordListRequest({
  1852. this.keyWord,
  1853. this.startTime,
  1854. this.endTime,
  1855. this.isValid = PatientValidStatusEnum.All,
  1856. int pageIndex = 0,
  1857. int pageSize = 0,
  1858. String? token,
  1859. }) : super(
  1860. pageIndex: pageIndex,
  1861. pageSize: pageSize,
  1862. token: token,
  1863. );
  1864. factory QueryReferralRecordListRequest.fromJson(Map<String, dynamic> map) {
  1865. return QueryReferralRecordListRequest(
  1866. keyWord: map['KeyWord'],
  1867. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  1868. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  1869. isValid: PatientValidStatusEnum.values.firstWhere((e) => e.index == map['IsValid']),
  1870. pageIndex: map['PageIndex'],
  1871. pageSize: map['PageSize'],
  1872. token: map['Token'],
  1873. );
  1874. }
  1875. Map<String, dynamic> toJson() {
  1876. final map = super.toJson();
  1877. if(keyWord != null)
  1878. map['KeyWord'] = keyWord;
  1879. if(startTime != null)
  1880. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  1881. if(endTime != null)
  1882. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  1883. map['IsValid'] = isValid.index;
  1884. return map;
  1885. }
  1886. }
  1887. class AuditReferralRecordRequest extends TokenRequest{
  1888. String? referralRecordCode;
  1889. bool isReceive;
  1890. String? rejectReason;
  1891. AuditReferralRecordRequest({
  1892. this.referralRecordCode,
  1893. this.isReceive = false,
  1894. this.rejectReason,
  1895. String? token,
  1896. }) : super(
  1897. token: token,
  1898. );
  1899. factory AuditReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1900. return AuditReferralRecordRequest(
  1901. referralRecordCode: map['ReferralRecordCode'],
  1902. isReceive: map['IsReceive'],
  1903. rejectReason: map['RejectReason'],
  1904. token: map['Token'],
  1905. );
  1906. }
  1907. Map<String, dynamic> toJson() {
  1908. final map = super.toJson();
  1909. if(referralRecordCode != null)
  1910. map['ReferralRecordCode'] = referralRecordCode;
  1911. map['IsReceive'] = isReceive;
  1912. if(rejectReason != null)
  1913. map['RejectReason'] = rejectReason;
  1914. return map;
  1915. }
  1916. }
  1917. class WithdrawReferralRecordRequest extends TokenRequest{
  1918. String? referralRecordCode;
  1919. WithdrawReferralRecordRequest({
  1920. this.referralRecordCode,
  1921. String? token,
  1922. }) : super(
  1923. token: token,
  1924. );
  1925. factory WithdrawReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1926. return WithdrawReferralRecordRequest(
  1927. referralRecordCode: map['ReferralRecordCode'],
  1928. token: map['Token'],
  1929. );
  1930. }
  1931. Map<String, dynamic> toJson() {
  1932. final map = super.toJson();
  1933. if(referralRecordCode != null)
  1934. map['ReferralRecordCode'] = referralRecordCode;
  1935. return map;
  1936. }
  1937. }
  1938. class ReferralOrganizationsQueryRequest extends TokenRequest{
  1939. String? keyword;
  1940. ReferralOrganizationsQueryRequest({
  1941. this.keyword,
  1942. String? token,
  1943. }) : super(
  1944. token: token,
  1945. );
  1946. factory ReferralOrganizationsQueryRequest.fromJson(Map<String, dynamic> map) {
  1947. return ReferralOrganizationsQueryRequest(
  1948. keyword: map['Keyword'],
  1949. token: map['Token'],
  1950. );
  1951. }
  1952. Map<String, dynamic> toJson() {
  1953. final map = super.toJson();
  1954. if(keyword != null)
  1955. map['Keyword'] = keyword;
  1956. return map;
  1957. }
  1958. }
  1959. class QueryReferralPatientByCodeRequest extends FindPatientByCodeRequest{
  1960. String? referralRecordCode;
  1961. QueryReferralPatientByCodeRequest({
  1962. this.referralRecordCode,
  1963. String? code,
  1964. String? token,
  1965. }) : super(
  1966. code: code,
  1967. token: token,
  1968. );
  1969. factory QueryReferralPatientByCodeRequest.fromJson(Map<String, dynamic> map) {
  1970. return QueryReferralPatientByCodeRequest(
  1971. referralRecordCode: map['ReferralRecordCode'],
  1972. code: map['Code'],
  1973. token: map['Token'],
  1974. );
  1975. }
  1976. Map<String, dynamic> toJson() {
  1977. final map = super.toJson();
  1978. if(referralRecordCode != null)
  1979. map['ReferralRecordCode'] = referralRecordCode;
  1980. return map;
  1981. }
  1982. }
  1983. class CreateReportClass {
  1984. String? referralCode;
  1985. String? creatorCode;
  1986. String? reportCode;
  1987. CreateReportClass({
  1988. this.referralCode,
  1989. this.creatorCode,
  1990. this.reportCode,
  1991. });
  1992. factory CreateReportClass.fromJson(Map<String, dynamic> map) {
  1993. return CreateReportClass(
  1994. referralCode: map['ReferralCode'],
  1995. creatorCode: map['CreatorCode'],
  1996. reportCode: map['ReportCode'],
  1997. );
  1998. }
  1999. Map<String, dynamic> toJson() {
  2000. final map = Map<String, dynamic>();
  2001. if(referralCode != null)
  2002. map['ReferralCode'] = referralCode;
  2003. if(creatorCode != null)
  2004. map['CreatorCode'] = creatorCode;
  2005. if(reportCode != null)
  2006. map['ReportCode'] = reportCode;
  2007. return map;
  2008. }
  2009. }
  2010. class ReferralRecordDTO extends BaseDTO{
  2011. String? code;
  2012. String? patientCode;
  2013. DateTime? referralOutTime;
  2014. String? referralOutOrganizationCode;
  2015. String? subjectMatter;
  2016. String? creator;
  2017. String? referralInOrganizationCode;
  2018. String? referralInUserCode;
  2019. ReferralStatusEnum referralStatus;
  2020. String? rejectReason;
  2021. List<String >? referralCodeList;
  2022. PatientInfoDTO? patientInfo;
  2023. List<String >? recordCodeList;
  2024. List<String >? reportCodeList;
  2025. List<String >? remedicalDataCodeList;
  2026. List<CreateReportClass >? createReportCodeList;
  2027. ReferralRecordDTO({
  2028. this.code,
  2029. this.patientCode,
  2030. this.referralOutTime,
  2031. this.referralOutOrganizationCode,
  2032. this.subjectMatter,
  2033. this.creator,
  2034. this.referralInOrganizationCode,
  2035. this.referralInUserCode,
  2036. this.referralStatus = ReferralStatusEnum.Wait,
  2037. this.rejectReason,
  2038. this.referralCodeList,
  2039. this.patientInfo,
  2040. this.recordCodeList,
  2041. this.reportCodeList,
  2042. this.remedicalDataCodeList,
  2043. this.createReportCodeList,
  2044. DateTime? createTime,
  2045. DateTime? updateTime,
  2046. }) : super(
  2047. createTime: createTime,
  2048. updateTime: updateTime,
  2049. );
  2050. factory ReferralRecordDTO.fromJson(Map<String, dynamic> map) {
  2051. return ReferralRecordDTO(
  2052. code: map['Code'],
  2053. patientCode: map['PatientCode'],
  2054. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2055. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2056. subjectMatter: map['SubjectMatter'],
  2057. creator: map['Creator'],
  2058. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2059. referralInUserCode: map['ReferralInUserCode'],
  2060. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2061. rejectReason: map['RejectReason'],
  2062. referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
  2063. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2064. recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
  2065. reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
  2066. remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
  2067. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2068. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2069. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2070. );
  2071. }
  2072. Map<String, dynamic> toJson() {
  2073. final map = super.toJson();
  2074. if(code != null)
  2075. map['Code'] = code;
  2076. if(patientCode != null)
  2077. map['PatientCode'] = patientCode;
  2078. if(referralOutTime != null)
  2079. map['ReferralOutTime'] = JsonRpcUtils.dateFormat(referralOutTime!);
  2080. if(referralOutOrganizationCode != null)
  2081. map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
  2082. if(subjectMatter != null)
  2083. map['SubjectMatter'] = subjectMatter;
  2084. if(creator != null)
  2085. map['Creator'] = creator;
  2086. if(referralInOrganizationCode != null)
  2087. map['ReferralInOrganizationCode'] = referralInOrganizationCode;
  2088. if(referralInUserCode != null)
  2089. map['ReferralInUserCode'] = referralInUserCode;
  2090. map['ReferralStatus'] = referralStatus.index;
  2091. if(rejectReason != null)
  2092. map['RejectReason'] = rejectReason;
  2093. if(referralCodeList != null)
  2094. map['ReferralCodeList'] = referralCodeList;
  2095. if(patientInfo != null)
  2096. map['PatientInfo'] = patientInfo;
  2097. if(recordCodeList != null)
  2098. map['RecordCodeList'] = recordCodeList;
  2099. if(reportCodeList != null)
  2100. map['ReportCodeList'] = reportCodeList;
  2101. if(remedicalDataCodeList != null)
  2102. map['RemedicalDataCodeList'] = remedicalDataCodeList;
  2103. if(createReportCodeList != null)
  2104. map['CreateReportCodeList'] = createReportCodeList;
  2105. return map;
  2106. }
  2107. }
  2108. class ReferralRecordDetailDTO extends ReferralRecordDTO{
  2109. String? referralOutOrganizationName;
  2110. String? creatorName;
  2111. String? referralInOrganizationName;
  2112. String? referralInUserName;
  2113. ReferralRecordDetailDTO({
  2114. this.referralOutOrganizationName,
  2115. this.creatorName,
  2116. this.referralInOrganizationName,
  2117. this.referralInUserName,
  2118. String? code,
  2119. String? patientCode,
  2120. DateTime? referralOutTime,
  2121. String? referralOutOrganizationCode,
  2122. String? subjectMatter,
  2123. String? creator,
  2124. String? referralInOrganizationCode,
  2125. String? referralInUserCode,
  2126. ReferralStatusEnum referralStatus = ReferralStatusEnum.Wait,
  2127. String? rejectReason,
  2128. List<String >? referralCodeList,
  2129. PatientInfoDTO? patientInfo,
  2130. List<String >? recordCodeList,
  2131. List<String >? reportCodeList,
  2132. List<String >? remedicalDataCodeList,
  2133. List<CreateReportClass >? createReportCodeList,
  2134. DateTime? createTime,
  2135. DateTime? updateTime,
  2136. }) : super(
  2137. code: code,
  2138. patientCode: patientCode,
  2139. referralOutTime: referralOutTime,
  2140. referralOutOrganizationCode: referralOutOrganizationCode,
  2141. subjectMatter: subjectMatter,
  2142. creator: creator,
  2143. referralInOrganizationCode: referralInOrganizationCode,
  2144. referralInUserCode: referralInUserCode,
  2145. referralStatus: referralStatus,
  2146. rejectReason: rejectReason,
  2147. referralCodeList: referralCodeList,
  2148. patientInfo: patientInfo,
  2149. recordCodeList: recordCodeList,
  2150. reportCodeList: reportCodeList,
  2151. remedicalDataCodeList: remedicalDataCodeList,
  2152. createReportCodeList: createReportCodeList,
  2153. createTime: createTime,
  2154. updateTime: updateTime,
  2155. );
  2156. factory ReferralRecordDetailDTO.fromJson(Map<String, dynamic> map) {
  2157. return ReferralRecordDetailDTO(
  2158. referralOutOrganizationName: map['ReferralOutOrganizationName'],
  2159. creatorName: map['CreatorName'],
  2160. referralInOrganizationName: map['ReferralInOrganizationName'],
  2161. referralInUserName: map['ReferralInUserName'],
  2162. code: map['Code'],
  2163. patientCode: map['PatientCode'],
  2164. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2165. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2166. subjectMatter: map['SubjectMatter'],
  2167. creator: map['Creator'],
  2168. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2169. referralInUserCode: map['ReferralInUserCode'],
  2170. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2171. rejectReason: map['RejectReason'],
  2172. referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
  2173. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2174. recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
  2175. reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
  2176. remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
  2177. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2178. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2179. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2180. );
  2181. }
  2182. Map<String, dynamic> toJson() {
  2183. final map = super.toJson();
  2184. if(referralOutOrganizationName != null)
  2185. map['ReferralOutOrganizationName'] = referralOutOrganizationName;
  2186. if(creatorName != null)
  2187. map['CreatorName'] = creatorName;
  2188. if(referralInOrganizationName != null)
  2189. map['ReferralInOrganizationName'] = referralInOrganizationName;
  2190. if(referralInUserName != null)
  2191. map['ReferralInUserName'] = referralInUserName;
  2192. return map;
  2193. }
  2194. }
  2195. class FindPatientReferralRecordRequest extends TokenRequest{
  2196. String? patientCode;
  2197. FindPatientReferralRecordRequest({
  2198. this.patientCode,
  2199. String? token,
  2200. }) : super(
  2201. token: token,
  2202. );
  2203. factory FindPatientReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2204. return FindPatientReferralRecordRequest(
  2205. patientCode: map['PatientCode'],
  2206. token: map['Token'],
  2207. );
  2208. }
  2209. Map<String, dynamic> toJson() {
  2210. final map = super.toJson();
  2211. if(patientCode != null)
  2212. map['PatientCode'] = patientCode;
  2213. return map;
  2214. }
  2215. }
  2216. class FindReferralInRecordRequest extends TokenRequest{
  2217. String? referralRecordCode;
  2218. FindReferralInRecordRequest({
  2219. this.referralRecordCode,
  2220. String? token,
  2221. }) : super(
  2222. token: token,
  2223. );
  2224. factory FindReferralInRecordRequest.fromJson(Map<String, dynamic> map) {
  2225. return FindReferralInRecordRequest(
  2226. referralRecordCode: map['ReferralRecordCode'],
  2227. token: map['Token'],
  2228. );
  2229. }
  2230. Map<String, dynamic> toJson() {
  2231. final map = super.toJson();
  2232. if(referralRecordCode != null)
  2233. map['ReferralRecordCode'] = referralRecordCode;
  2234. return map;
  2235. }
  2236. }
  2237. class QueryReferralRecordsPageRequest extends GetRecordsPageRequest{
  2238. String? referralRecordCode;
  2239. QueryReferralRecordsPageRequest({
  2240. this.referralRecordCode,
  2241. String? patientCode,
  2242. QueryRecordStatusEnum queryRecordStatus = QueryRecordStatusEnum.All,
  2243. QueryRecordCreateTypeEnum queryRecordCreateType = QueryRecordCreateTypeEnum.All,
  2244. int pageIndex = 0,
  2245. int pageSize = 0,
  2246. String? token,
  2247. }) : super(
  2248. patientCode: patientCode,
  2249. queryRecordStatus: queryRecordStatus,
  2250. queryRecordCreateType: queryRecordCreateType,
  2251. pageIndex: pageIndex,
  2252. pageSize: pageSize,
  2253. token: token,
  2254. );
  2255. factory QueryReferralRecordsPageRequest.fromJson(Map<String, dynamic> map) {
  2256. return QueryReferralRecordsPageRequest(
  2257. referralRecordCode: map['ReferralRecordCode'],
  2258. patientCode: map['PatientCode'],
  2259. queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
  2260. queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
  2261. pageIndex: map['PageIndex'],
  2262. pageSize: map['PageSize'],
  2263. token: map['Token'],
  2264. );
  2265. }
  2266. Map<String, dynamic> toJson() {
  2267. final map = super.toJson();
  2268. if(referralRecordCode != null)
  2269. map['ReferralRecordCode'] = referralRecordCode;
  2270. return map;
  2271. }
  2272. }
  2273. class ReportPreviewDTO {
  2274. String? fileToken;
  2275. String? thumbnailToken;
  2276. String? language;
  2277. UploadFileTypeEnum fileType;
  2278. ReportPreviewDTO({
  2279. this.fileToken,
  2280. this.thumbnailToken,
  2281. this.language,
  2282. this.fileType = UploadFileTypeEnum.Unknown,
  2283. });
  2284. factory ReportPreviewDTO.fromJson(Map<String, dynamic> map) {
  2285. return ReportPreviewDTO(
  2286. fileToken: map['FileToken'],
  2287. thumbnailToken: map['ThumbnailToken'],
  2288. language: map['Language'],
  2289. fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
  2290. );
  2291. }
  2292. Map<String, dynamic> toJson() {
  2293. final map = Map<String, dynamic>();
  2294. if(fileToken != null)
  2295. map['FileToken'] = fileToken;
  2296. if(thumbnailToken != null)
  2297. map['ThumbnailToken'] = thumbnailToken;
  2298. if(language != null)
  2299. map['Language'] = language;
  2300. map['FileType'] = fileType.index;
  2301. return map;
  2302. }
  2303. }
  2304. enum ReportTypeEnum {
  2305. RemoteDiagnosis,
  2306. LiveConsultation,
  2307. }
  2308. class ReportBaseDTO extends BaseDTO{
  2309. String? reportCode;
  2310. String? recordCode;
  2311. String? reportUserCode;
  2312. String? deviceCode;
  2313. String? patientCode;
  2314. String? patientId;
  2315. String? patientName;
  2316. List<String >? reportLabels;
  2317. List<String >? platformLabels;
  2318. List<String >? diagnosisLabels;
  2319. DiagnosisOrganEnum reportOrgan;
  2320. DateTime? reportTime;
  2321. String? reportUserName;
  2322. List<ReportPreviewDTO >? reportPreviewList;
  2323. String? referralRecordCode;
  2324. ReportTypeEnum reportType;
  2325. ReportBaseDTO({
  2326. this.reportCode,
  2327. this.recordCode,
  2328. this.reportUserCode,
  2329. this.deviceCode,
  2330. this.patientCode,
  2331. this.patientId,
  2332. this.patientName,
  2333. this.reportLabels,
  2334. this.platformLabels,
  2335. this.diagnosisLabels,
  2336. this.reportOrgan = DiagnosisOrganEnum.Null,
  2337. this.reportTime,
  2338. this.reportUserName,
  2339. this.reportPreviewList,
  2340. this.referralRecordCode,
  2341. this.reportType = ReportTypeEnum.RemoteDiagnosis,
  2342. DateTime? createTime,
  2343. DateTime? updateTime,
  2344. }) : super(
  2345. createTime: createTime,
  2346. updateTime: updateTime,
  2347. );
  2348. factory ReportBaseDTO.fromJson(Map<String, dynamic> map) {
  2349. return ReportBaseDTO(
  2350. reportCode: map['ReportCode'],
  2351. recordCode: map['RecordCode'],
  2352. reportUserCode: map['ReportUserCode'],
  2353. deviceCode: map['DeviceCode'],
  2354. patientCode: map['PatientCode'],
  2355. patientId: map['PatientId'],
  2356. patientName: map['PatientName'],
  2357. reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
  2358. platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
  2359. diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
  2360. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2361. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2362. reportUserName: map['ReportUserName'],
  2363. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2364. referralRecordCode: map['ReferralRecordCode'],
  2365. reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
  2366. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2367. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2368. );
  2369. }
  2370. Map<String, dynamic> toJson() {
  2371. final map = super.toJson();
  2372. if(reportCode != null)
  2373. map['ReportCode'] = reportCode;
  2374. if(recordCode != null)
  2375. map['RecordCode'] = recordCode;
  2376. if(reportUserCode != null)
  2377. map['ReportUserCode'] = reportUserCode;
  2378. if(deviceCode != null)
  2379. map['DeviceCode'] = deviceCode;
  2380. if(patientCode != null)
  2381. map['PatientCode'] = patientCode;
  2382. if(patientId != null)
  2383. map['PatientId'] = patientId;
  2384. if(patientName != null)
  2385. map['PatientName'] = patientName;
  2386. if(reportLabels != null)
  2387. map['ReportLabels'] = reportLabels;
  2388. if(platformLabels != null)
  2389. map['PlatformLabels'] = platformLabels;
  2390. if(diagnosisLabels != null)
  2391. map['DiagnosisLabels'] = diagnosisLabels;
  2392. map['ReportOrgan'] = reportOrgan.index;
  2393. if(reportTime != null)
  2394. map['ReportTime'] = JsonRpcUtils.dateFormat(reportTime!);
  2395. if(reportUserName != null)
  2396. map['ReportUserName'] = reportUserName;
  2397. if(reportPreviewList != null)
  2398. map['ReportPreviewList'] = reportPreviewList;
  2399. if(referralRecordCode != null)
  2400. map['ReferralRecordCode'] = referralRecordCode;
  2401. map['ReportType'] = reportType.index;
  2402. return map;
  2403. }
  2404. }
  2405. class ReportDTO extends ReportBaseDTO{
  2406. String? reportTemplateJson;
  2407. String? reportDatasJson;
  2408. String? encryptPatientName;
  2409. bool canEditReport;
  2410. String? deviceName;
  2411. String? reportTemplateName;
  2412. DateTime? examDate;
  2413. ReportDTO({
  2414. this.reportTemplateJson,
  2415. this.reportDatasJson,
  2416. this.encryptPatientName,
  2417. this.canEditReport = false,
  2418. this.deviceName,
  2419. this.reportTemplateName,
  2420. this.examDate,
  2421. String? reportCode,
  2422. String? recordCode,
  2423. String? reportUserCode,
  2424. String? deviceCode,
  2425. String? patientCode,
  2426. String? patientId,
  2427. String? patientName,
  2428. List<String >? reportLabels,
  2429. List<String >? platformLabels,
  2430. List<String >? diagnosisLabels,
  2431. DiagnosisOrganEnum reportOrgan = DiagnosisOrganEnum.Null,
  2432. DateTime? reportTime,
  2433. String? reportUserName,
  2434. List<ReportPreviewDTO >? reportPreviewList,
  2435. String? referralRecordCode,
  2436. ReportTypeEnum reportType = ReportTypeEnum.RemoteDiagnosis,
  2437. DateTime? createTime,
  2438. DateTime? updateTime,
  2439. }) : super(
  2440. reportCode: reportCode,
  2441. recordCode: recordCode,
  2442. reportUserCode: reportUserCode,
  2443. deviceCode: deviceCode,
  2444. patientCode: patientCode,
  2445. patientId: patientId,
  2446. patientName: patientName,
  2447. reportLabels: reportLabels,
  2448. platformLabels: platformLabels,
  2449. diagnosisLabels: diagnosisLabels,
  2450. reportOrgan: reportOrgan,
  2451. reportTime: reportTime,
  2452. reportUserName: reportUserName,
  2453. reportPreviewList: reportPreviewList,
  2454. referralRecordCode: referralRecordCode,
  2455. reportType: reportType,
  2456. createTime: createTime,
  2457. updateTime: updateTime,
  2458. );
  2459. factory ReportDTO.fromJson(Map<String, dynamic> map) {
  2460. return ReportDTO(
  2461. reportTemplateJson: map['ReportTemplateJson'],
  2462. reportDatasJson: map['ReportDatasJson'],
  2463. encryptPatientName: map['EncryptPatientName'],
  2464. canEditReport: map['CanEditReport'],
  2465. deviceName: map['DeviceName'],
  2466. reportTemplateName: map['ReportTemplateName'],
  2467. examDate: map['ExamDate'] != null ? DateTime.parse(map['ExamDate']) : null,
  2468. reportCode: map['ReportCode'],
  2469. recordCode: map['RecordCode'],
  2470. reportUserCode: map['ReportUserCode'],
  2471. deviceCode: map['DeviceCode'],
  2472. patientCode: map['PatientCode'],
  2473. patientId: map['PatientId'],
  2474. patientName: map['PatientName'],
  2475. reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
  2476. platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
  2477. diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
  2478. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2479. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2480. reportUserName: map['ReportUserName'],
  2481. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2482. referralRecordCode: map['ReferralRecordCode'],
  2483. reportType: ReportTypeEnum.values.firstWhere((e) => e.index == map['ReportType']),
  2484. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2485. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2486. );
  2487. }
  2488. Map<String, dynamic> toJson() {
  2489. final map = super.toJson();
  2490. if(reportTemplateJson != null)
  2491. map['ReportTemplateJson'] = reportTemplateJson;
  2492. if(reportDatasJson != null)
  2493. map['ReportDatasJson'] = reportDatasJson;
  2494. if(encryptPatientName != null)
  2495. map['EncryptPatientName'] = encryptPatientName;
  2496. map['CanEditReport'] = canEditReport;
  2497. if(deviceName != null)
  2498. map['DeviceName'] = deviceName;
  2499. if(reportTemplateName != null)
  2500. map['ReportTemplateName'] = reportTemplateName;
  2501. if(examDate != null)
  2502. map['ExamDate'] = JsonRpcUtils.dateFormat(examDate!);
  2503. return map;
  2504. }
  2505. }
  2506. class FindReportsRequest extends TokenRequest{
  2507. String? recordCode;
  2508. FindReportsRequest({
  2509. this.recordCode,
  2510. String? token,
  2511. }) : super(
  2512. token: token,
  2513. );
  2514. factory FindReportsRequest.fromJson(Map<String, dynamic> map) {
  2515. return FindReportsRequest(
  2516. recordCode: map['RecordCode'],
  2517. token: map['Token'],
  2518. );
  2519. }
  2520. Map<String, dynamic> toJson() {
  2521. final map = super.toJson();
  2522. if(recordCode != null)
  2523. map['RecordCode'] = recordCode;
  2524. return map;
  2525. }
  2526. }
  2527. class QueryReferralExamReportRequest extends FindReportsRequest{
  2528. String? referralRecordCode;
  2529. QueryReferralExamReportRequest({
  2530. this.referralRecordCode,
  2531. String? recordCode,
  2532. String? token,
  2533. }) : super(
  2534. recordCode: recordCode,
  2535. token: token,
  2536. );
  2537. factory QueryReferralExamReportRequest.fromJson(Map<String, dynamic> map) {
  2538. return QueryReferralExamReportRequest(
  2539. referralRecordCode: map['ReferralRecordCode'],
  2540. recordCode: map['RecordCode'],
  2541. token: map['Token'],
  2542. );
  2543. }
  2544. Map<String, dynamic> toJson() {
  2545. final map = super.toJson();
  2546. if(referralRecordCode != null)
  2547. map['ReferralRecordCode'] = referralRecordCode;
  2548. return map;
  2549. }
  2550. }
  2551. class QueryShareExamPageResult {
  2552. String? shareExamPageUrl;
  2553. QueryShareExamPageResult({
  2554. this.shareExamPageUrl,
  2555. });
  2556. factory QueryShareExamPageResult.fromJson(Map<String, dynamic> map) {
  2557. return QueryShareExamPageResult(
  2558. shareExamPageUrl: map['ShareExamPageUrl'],
  2559. );
  2560. }
  2561. Map<String, dynamic> toJson() {
  2562. final map = Map<String, dynamic>();
  2563. if(shareExamPageUrl != null)
  2564. map['ShareExamPageUrl'] = shareExamPageUrl;
  2565. return map;
  2566. }
  2567. }
  2568. class QueryShareExamPageRequest extends TokenRequest{
  2569. String? examFileToken;
  2570. String? languageCode;
  2571. QueryShareExamPageRequest({
  2572. this.examFileToken,
  2573. this.languageCode,
  2574. String? token,
  2575. }) : super(
  2576. token: token,
  2577. );
  2578. factory QueryShareExamPageRequest.fromJson(Map<String, dynamic> map) {
  2579. return QueryShareExamPageRequest(
  2580. examFileToken: map['ExamFileToken'],
  2581. languageCode: map['LanguageCode'],
  2582. token: map['Token'],
  2583. );
  2584. }
  2585. Map<String, dynamic> toJson() {
  2586. final map = super.toJson();
  2587. if(examFileToken != null)
  2588. map['ExamFileToken'] = examFileToken;
  2589. if(languageCode != null)
  2590. map['LanguageCode'] = languageCode;
  2591. return map;
  2592. }
  2593. }
  2594. class MeasureExportDetailDTO {
  2595. int sortNum;
  2596. String? remedicalMeasuredInfoCode;
  2597. MeasureExportDetailDTO({
  2598. this.sortNum = 0,
  2599. this.remedicalMeasuredInfoCode,
  2600. });
  2601. factory MeasureExportDetailDTO.fromJson(Map<String, dynamic> map) {
  2602. return MeasureExportDetailDTO(
  2603. sortNum: map['SortNum'],
  2604. remedicalMeasuredInfoCode: map['RemedicalMeasuredInfoCode'],
  2605. );
  2606. }
  2607. Map<String, dynamic> toJson() {
  2608. final map = Map<String, dynamic>();
  2609. map['SortNum'] = sortNum;
  2610. if(remedicalMeasuredInfoCode != null)
  2611. map['RemedicalMeasuredInfoCode'] = remedicalMeasuredInfoCode;
  2612. return map;
  2613. }
  2614. }
  2615. class BatchExportMeasureResultRequest extends TokenRequest{
  2616. List<MeasureExportDetailDTO >? remedicalMeasuredInfoCodes;
  2617. BusinessTypeEnum businessType;
  2618. String? recordCode;
  2619. String? languageCode;
  2620. BatchExportMeasureResultRequest({
  2621. this.remedicalMeasuredInfoCodes,
  2622. this.businessType = BusinessTypeEnum.RemoteDiagnosis,
  2623. this.recordCode,
  2624. this.languageCode,
  2625. String? token,
  2626. }) : super(
  2627. token: token,
  2628. );
  2629. factory BatchExportMeasureResultRequest.fromJson(Map<String, dynamic> map) {
  2630. return BatchExportMeasureResultRequest(
  2631. remedicalMeasuredInfoCodes: map['RemedicalMeasuredInfoCodes'] != null ? (map['RemedicalMeasuredInfoCodes'] as List).map((e)=>MeasureExportDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2632. businessType: BusinessTypeEnum.values.firstWhere((e) => e.index == map['BusinessType']),
  2633. recordCode: map['RecordCode'],
  2634. languageCode: map['LanguageCode'],
  2635. token: map['Token'],
  2636. );
  2637. }
  2638. Map<String, dynamic> toJson() {
  2639. final map = super.toJson();
  2640. if(remedicalMeasuredInfoCodes != null)
  2641. map['RemedicalMeasuredInfoCodes'] = remedicalMeasuredInfoCodes;
  2642. map['BusinessType'] = businessType.index;
  2643. if(recordCode != null)
  2644. map['RecordCode'] = recordCode;
  2645. if(languageCode != null)
  2646. map['LanguageCode'] = languageCode;
  2647. return map;
  2648. }
  2649. }
  2650. class GetRemedicalDiagnosisDataRequest extends TokenRequest{
  2651. String? remedicalCode;
  2652. int frameIndex;
  2653. GetRemedicalDiagnosisDataRequest({
  2654. this.remedicalCode,
  2655. this.frameIndex = 0,
  2656. String? token,
  2657. }) : super(
  2658. token: token,
  2659. );
  2660. factory GetRemedicalDiagnosisDataRequest.fromJson(Map<String, dynamic> map) {
  2661. return GetRemedicalDiagnosisDataRequest(
  2662. remedicalCode: map['RemedicalCode'],
  2663. frameIndex: map['FrameIndex'],
  2664. token: map['Token'],
  2665. );
  2666. }
  2667. Map<String, dynamic> toJson() {
  2668. final map = super.toJson();
  2669. if(remedicalCode != null)
  2670. map['RemedicalCode'] = remedicalCode;
  2671. map['FrameIndex'] = frameIndex;
  2672. return map;
  2673. }
  2674. }
  2675. class RemedicalAISelectedInfoDTO {
  2676. String? remedicalAISelectedInfoCode;
  2677. String? patientCode;
  2678. String? recordCode;
  2679. String? remedicalCode;
  2680. int frameIndex;
  2681. String? userCode;
  2682. String? orginalFileToken;
  2683. String? cdnFileToken;
  2684. String? aIFileToken;
  2685. String? aICdnFileToken;
  2686. RecommendedDownloadModeEnum recommendedDownloadMode;
  2687. String? previewFileToken;
  2688. String? diagnosisData;
  2689. DiagnosisConclusionEnum diagnosisConclusion;
  2690. List<DiagnosisOrganEnum >? diagnosisOrgans;
  2691. RemedicalAISelectedInfoDTO({
  2692. this.remedicalAISelectedInfoCode,
  2693. this.patientCode,
  2694. this.recordCode,
  2695. this.remedicalCode,
  2696. this.frameIndex = 0,
  2697. this.userCode,
  2698. this.orginalFileToken,
  2699. this.cdnFileToken,
  2700. this.aIFileToken,
  2701. this.aICdnFileToken,
  2702. this.recommendedDownloadMode = RecommendedDownloadModeEnum.Origin,
  2703. this.previewFileToken,
  2704. this.diagnosisData,
  2705. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  2706. this.diagnosisOrgans,
  2707. });
  2708. factory RemedicalAISelectedInfoDTO.fromJson(Map<String, dynamic> map) {
  2709. return RemedicalAISelectedInfoDTO(
  2710. remedicalAISelectedInfoCode: map['RemedicalAISelectedInfoCode'],
  2711. patientCode: map['PatientCode'],
  2712. recordCode: map['RecordCode'],
  2713. remedicalCode: map['RemedicalCode'],
  2714. frameIndex: map['FrameIndex'],
  2715. userCode: map['UserCode'],
  2716. orginalFileToken: map['OrginalFileToken'],
  2717. cdnFileToken: map['CdnFileToken'],
  2718. aIFileToken: map['AIFileToken'],
  2719. aICdnFileToken: map['AICdnFileToken'],
  2720. recommendedDownloadMode: RecommendedDownloadModeEnum.values.firstWhere((e) => e.index == map['RecommendedDownloadMode']),
  2721. previewFileToken: map['PreviewFileToken'],
  2722. diagnosisData: map['DiagnosisData'],
  2723. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  2724. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  2725. );
  2726. }
  2727. Map<String, dynamic> toJson() {
  2728. final map = Map<String, dynamic>();
  2729. if(remedicalAISelectedInfoCode != null)
  2730. map['RemedicalAISelectedInfoCode'] = remedicalAISelectedInfoCode;
  2731. if(patientCode != null)
  2732. map['PatientCode'] = patientCode;
  2733. if(recordCode != null)
  2734. map['RecordCode'] = recordCode;
  2735. if(remedicalCode != null)
  2736. map['RemedicalCode'] = remedicalCode;
  2737. map['FrameIndex'] = frameIndex;
  2738. if(userCode != null)
  2739. map['UserCode'] = userCode;
  2740. if(orginalFileToken != null)
  2741. map['OrginalFileToken'] = orginalFileToken;
  2742. if(cdnFileToken != null)
  2743. map['CdnFileToken'] = cdnFileToken;
  2744. if(aIFileToken != null)
  2745. map['AIFileToken'] = aIFileToken;
  2746. if(aICdnFileToken != null)
  2747. map['AICdnFileToken'] = aICdnFileToken;
  2748. map['RecommendedDownloadMode'] = recommendedDownloadMode.index;
  2749. if(previewFileToken != null)
  2750. map['PreviewFileToken'] = previewFileToken;
  2751. if(diagnosisData != null)
  2752. map['DiagnosisData'] = diagnosisData;
  2753. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  2754. if(diagnosisOrgans != null)
  2755. map['DiagnosisOrgans'] = diagnosisOrgans;
  2756. return map;
  2757. }
  2758. }
  2759. class GetPatientAISelectedInfosRequest extends TokenRequest{
  2760. String? patientCode;
  2761. String? recordCode;
  2762. GetPatientAISelectedInfosRequest({
  2763. this.patientCode,
  2764. this.recordCode,
  2765. String? token,
  2766. }) : super(
  2767. token: token,
  2768. );
  2769. factory GetPatientAISelectedInfosRequest.fromJson(Map<String, dynamic> map) {
  2770. return GetPatientAISelectedInfosRequest(
  2771. patientCode: map['PatientCode'],
  2772. recordCode: map['RecordCode'],
  2773. token: map['Token'],
  2774. );
  2775. }
  2776. Map<String, dynamic> toJson() {
  2777. final map = super.toJson();
  2778. if(patientCode != null)
  2779. map['PatientCode'] = patientCode;
  2780. if(recordCode != null)
  2781. map['RecordCode'] = recordCode;
  2782. return map;
  2783. }
  2784. }
  2785. class GetRemedicalAISelectedInfoRequest extends TokenRequest{
  2786. String? code;
  2787. GetRemedicalAISelectedInfoRequest({
  2788. this.code,
  2789. String? token,
  2790. }) : super(
  2791. token: token,
  2792. );
  2793. factory GetRemedicalAISelectedInfoRequest.fromJson(Map<String, dynamic> map) {
  2794. return GetRemedicalAISelectedInfoRequest(
  2795. code: map['Code'],
  2796. token: map['Token'],
  2797. );
  2798. }
  2799. Map<String, dynamic> toJson() {
  2800. final map = super.toJson();
  2801. if(code != null)
  2802. map['Code'] = code;
  2803. return map;
  2804. }
  2805. }
  2806. class SaveRemedicalAISelectedInfoRequest extends TokenRequest{
  2807. String? code;
  2808. String? remedicalCode;
  2809. int frameIndex;
  2810. String? aIFileToken;
  2811. String? previewFileToken;
  2812. String? diagnosisData;
  2813. DiagnosisConclusionEnum diagnosisConclusion;
  2814. List<DiagnosisOrganEnum >? diagnosisOrgans;
  2815. SaveRemedicalAISelectedInfoRequest({
  2816. this.code,
  2817. this.remedicalCode,
  2818. this.frameIndex = 0,
  2819. this.aIFileToken,
  2820. this.previewFileToken,
  2821. this.diagnosisData,
  2822. this.diagnosisConclusion = DiagnosisConclusionEnum.NotRequired,
  2823. this.diagnosisOrgans,
  2824. String? token,
  2825. }) : super(
  2826. token: token,
  2827. );
  2828. factory SaveRemedicalAISelectedInfoRequest.fromJson(Map<String, dynamic> map) {
  2829. return SaveRemedicalAISelectedInfoRequest(
  2830. code: map['Code'],
  2831. remedicalCode: map['RemedicalCode'],
  2832. frameIndex: map['FrameIndex'],
  2833. aIFileToken: map['AIFileToken'],
  2834. previewFileToken: map['PreviewFileToken'],
  2835. diagnosisData: map['DiagnosisData'],
  2836. diagnosisConclusion: DiagnosisConclusionEnum.values.firstWhere((e) => e.index == map['DiagnosisConclusion']),
  2837. diagnosisOrgans: map['DiagnosisOrgans'] != null ? (map['DiagnosisOrgans'] as List).map((e)=>DiagnosisOrganEnum.values.firstWhere((i) => i.index == e)).toList() : null,
  2838. token: map['Token'],
  2839. );
  2840. }
  2841. Map<String, dynamic> toJson() {
  2842. final map = super.toJson();
  2843. if(code != null)
  2844. map['Code'] = code;
  2845. if(remedicalCode != null)
  2846. map['RemedicalCode'] = remedicalCode;
  2847. map['FrameIndex'] = frameIndex;
  2848. if(aIFileToken != null)
  2849. map['AIFileToken'] = aIFileToken;
  2850. if(previewFileToken != null)
  2851. map['PreviewFileToken'] = previewFileToken;
  2852. if(diagnosisData != null)
  2853. map['DiagnosisData'] = diagnosisData;
  2854. map['DiagnosisConclusion'] = diagnosisConclusion.index;
  2855. if(diagnosisOrgans != null)
  2856. map['DiagnosisOrgans'] = diagnosisOrgans;
  2857. return map;
  2858. }
  2859. }
  2860. class SyncRemedicalRecordRequest {
  2861. String? code;
  2862. String? organizationCode;
  2863. String? deviceCode;
  2864. bool isUploadReport;
  2865. List<DataItemDTO >? patientInfo;
  2866. DiagnosisStatusEnum diagnosisStatus;
  2867. List<DiagnosisInfoDTO >? aIDiagnosisInfos;
  2868. DateTime? createTime;
  2869. DateTime? updateTime;
  2870. String? creator;
  2871. SyncRemedicalRecordRequest({
  2872. this.code,
  2873. this.organizationCode,
  2874. this.deviceCode,
  2875. this.isUploadReport = false,
  2876. this.patientInfo,
  2877. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  2878. this.aIDiagnosisInfos,
  2879. this.createTime,
  2880. this.updateTime,
  2881. this.creator,
  2882. });
  2883. factory SyncRemedicalRecordRequest.fromJson(Map<String, dynamic> map) {
  2884. return SyncRemedicalRecordRequest(
  2885. code: map['Code'],
  2886. organizationCode: map['OrganizationCode'],
  2887. deviceCode: map['DeviceCode'],
  2888. isUploadReport: map['IsUploadReport'],
  2889. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2890. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  2891. aIDiagnosisInfos: map['AIDiagnosisInfos'] != null ? (map['AIDiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2892. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2893. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2894. creator: map['Creator'],
  2895. );
  2896. }
  2897. Map<String, dynamic> toJson() {
  2898. final map = Map<String, dynamic>();
  2899. if(code != null)
  2900. map['Code'] = code;
  2901. if(organizationCode != null)
  2902. map['OrganizationCode'] = organizationCode;
  2903. if(deviceCode != null)
  2904. map['DeviceCode'] = deviceCode;
  2905. map['IsUploadReport'] = isUploadReport;
  2906. if(patientInfo != null)
  2907. map['PatientInfo'] = patientInfo;
  2908. map['DiagnosisStatus'] = diagnosisStatus.index;
  2909. if(aIDiagnosisInfos != null)
  2910. map['AIDiagnosisInfos'] = aIDiagnosisInfos;
  2911. if(createTime != null)
  2912. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  2913. if(updateTime != null)
  2914. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  2915. if(creator != null)
  2916. map['Creator'] = creator;
  2917. return map;
  2918. }
  2919. }
  2920. class SyncBatchRemedicalRecordRequest {
  2921. SyncDBEnum syncType;
  2922. List<SyncRemedicalRecordRequest >? remedicalRecordList;
  2923. SyncBatchRemedicalRecordRequest({
  2924. this.syncType = SyncDBEnum.Migrate,
  2925. this.remedicalRecordList,
  2926. });
  2927. factory SyncBatchRemedicalRecordRequest.fromJson(Map<String, dynamic> map) {
  2928. return SyncBatchRemedicalRecordRequest(
  2929. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  2930. remedicalRecordList: map['RemedicalRecordList'] != null ? (map['RemedicalRecordList'] as List).map((e)=>SyncRemedicalRecordRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  2931. );
  2932. }
  2933. Map<String, dynamic> toJson() {
  2934. final map = Map<String, dynamic>();
  2935. map['SyncType'] = syncType.index;
  2936. if(remedicalRecordList != null)
  2937. map['RemedicalRecordList'] = remedicalRecordList;
  2938. return map;
  2939. }
  2940. }
  2941. class SyncUploadRemedicalDataRequest {
  2942. String? code;
  2943. DateTime? createTime;
  2944. DateTime? updateTime;
  2945. String? examCode;
  2946. String? deviceCode;
  2947. String? previewFileToken;
  2948. String? fileToken;
  2949. int fileSize;
  2950. String? coverImageToken;
  2951. String? applicationCategory;
  2952. String? application;
  2953. RemedicalFileDataTypeEnum fileDataType;
  2954. ImageLocationDTO? imageLocation;
  2955. SyncUploadRemedicalDataRequest({
  2956. this.code,
  2957. this.createTime,
  2958. this.updateTime,
  2959. this.examCode,
  2960. this.deviceCode,
  2961. this.previewFileToken,
  2962. this.fileToken,
  2963. this.fileSize = 0,
  2964. this.coverImageToken,
  2965. this.applicationCategory,
  2966. this.application,
  2967. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  2968. this.imageLocation,
  2969. });
  2970. factory SyncUploadRemedicalDataRequest.fromJson(Map<String, dynamic> map) {
  2971. return SyncUploadRemedicalDataRequest(
  2972. code: map['Code'],
  2973. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2974. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2975. examCode: map['ExamCode'],
  2976. deviceCode: map['DeviceCode'],
  2977. previewFileToken: map['PreviewFileToken'],
  2978. fileToken: map['FileToken'],
  2979. fileSize: map['FileSize'],
  2980. coverImageToken: map['CoverImageToken'],
  2981. applicationCategory: map['ApplicationCategory'],
  2982. application: map['Application'],
  2983. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  2984. imageLocation: map['ImageLocation'] != null ? ImageLocationDTO.fromJson(map['ImageLocation']) : null,
  2985. );
  2986. }
  2987. Map<String, dynamic> toJson() {
  2988. final map = Map<String, dynamic>();
  2989. if(code != null)
  2990. map['Code'] = code;
  2991. if(createTime != null)
  2992. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  2993. if(updateTime != null)
  2994. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  2995. if(examCode != null)
  2996. map['ExamCode'] = examCode;
  2997. if(deviceCode != null)
  2998. map['DeviceCode'] = deviceCode;
  2999. if(previewFileToken != null)
  3000. map['PreviewFileToken'] = previewFileToken;
  3001. if(fileToken != null)
  3002. map['FileToken'] = fileToken;
  3003. map['FileSize'] = fileSize;
  3004. if(coverImageToken != null)
  3005. map['CoverImageToken'] = coverImageToken;
  3006. if(applicationCategory != null)
  3007. map['ApplicationCategory'] = applicationCategory;
  3008. if(application != null)
  3009. map['Application'] = application;
  3010. map['FileDataType'] = fileDataType.index;
  3011. if(imageLocation != null)
  3012. map['ImageLocation'] = imageLocation;
  3013. return map;
  3014. }
  3015. }
  3016. class SyncBatchUploadRemedicalDatasRequest {
  3017. SyncDBEnum syncType;
  3018. List<SyncUploadRemedicalDataRequest >? syncUploadRemedicalDataList;
  3019. SyncBatchUploadRemedicalDatasRequest({
  3020. this.syncType = SyncDBEnum.Migrate,
  3021. this.syncUploadRemedicalDataList,
  3022. });
  3023. factory SyncBatchUploadRemedicalDatasRequest.fromJson(Map<String, dynamic> map) {
  3024. return SyncBatchUploadRemedicalDatasRequest(
  3025. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3026. syncUploadRemedicalDataList: map['SyncUploadRemedicalDataList'] != null ? (map['SyncUploadRemedicalDataList'] as List).map((e)=>SyncUploadRemedicalDataRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3027. );
  3028. }
  3029. Map<String, dynamic> toJson() {
  3030. final map = Map<String, dynamic>();
  3031. map['SyncType'] = syncType.index;
  3032. if(syncUploadRemedicalDataList != null)
  3033. map['SyncUploadRemedicalDataList'] = syncUploadRemedicalDataList;
  3034. return map;
  3035. }
  3036. }
  3037. class SyncAIResultRequest {
  3038. String? remedicalCode;
  3039. String? diagnosisResult;
  3040. DateTime? createTime;
  3041. DateTime? updateTime;
  3042. SyncAIResultRequest({
  3043. this.remedicalCode,
  3044. this.diagnosisResult,
  3045. this.createTime,
  3046. this.updateTime,
  3047. });
  3048. factory SyncAIResultRequest.fromJson(Map<String, dynamic> map) {
  3049. return SyncAIResultRequest(
  3050. remedicalCode: map['RemedicalCode'],
  3051. diagnosisResult: map['DiagnosisResult'],
  3052. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  3053. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  3054. );
  3055. }
  3056. Map<String, dynamic> toJson() {
  3057. final map = Map<String, dynamic>();
  3058. if(remedicalCode != null)
  3059. map['RemedicalCode'] = remedicalCode;
  3060. if(diagnosisResult != null)
  3061. map['DiagnosisResult'] = diagnosisResult;
  3062. if(createTime != null)
  3063. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  3064. if(updateTime != null)
  3065. map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
  3066. return map;
  3067. }
  3068. }
  3069. class SyncBatchAIResultRequest {
  3070. SyncDBEnum syncType;
  3071. List<SyncAIResultRequest >? syncAIResultList;
  3072. SyncBatchAIResultRequest({
  3073. this.syncType = SyncDBEnum.Migrate,
  3074. this.syncAIResultList,
  3075. });
  3076. factory SyncBatchAIResultRequest.fromJson(Map<String, dynamic> map) {
  3077. return SyncBatchAIResultRequest(
  3078. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3079. syncAIResultList: map['SyncAIResultList'] != null ? (map['SyncAIResultList'] as List).map((e)=>SyncAIResultRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3080. );
  3081. }
  3082. Map<String, dynamic> toJson() {
  3083. final map = Map<String, dynamic>();
  3084. map['SyncType'] = syncType.index;
  3085. if(syncAIResultList != null)
  3086. map['SyncAIResultList'] = syncAIResultList;
  3087. return map;
  3088. }
  3089. }
  3090. class SyncBatchCarotidResultRequest {
  3091. SyncDBEnum syncType;
  3092. List<GetCarotidResultRequest >? syncCarotidResultRequest;
  3093. SyncBatchCarotidResultRequest({
  3094. this.syncType = SyncDBEnum.Migrate,
  3095. this.syncCarotidResultRequest,
  3096. });
  3097. factory SyncBatchCarotidResultRequest.fromJson(Map<String, dynamic> map) {
  3098. return SyncBatchCarotidResultRequest(
  3099. syncType: SyncDBEnum.values.firstWhere((e) => e.index == map['SyncType']),
  3100. syncCarotidResultRequest: map['SyncCarotidResultRequest'] != null ? (map['SyncCarotidResultRequest'] as List).map((e)=>GetCarotidResultRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
  3101. );
  3102. }
  3103. Map<String, dynamic> toJson() {
  3104. final map = Map<String, dynamic>();
  3105. map['SyncType'] = syncType.index;
  3106. if(syncCarotidResultRequest != null)
  3107. map['SyncCarotidResultRequest'] = syncCarotidResultRequest;
  3108. return map;
  3109. }
  3110. }