remedical.m.dart 99 KB

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