remedical.m.dart 77 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840
  1. import 'aIDiagnosis.m.dart';
  2. import 'patient.m.dart';
  3. import 'recordInfo.m.dart';
  4. import 'connect.m.dart';
  5. import 'authentication.m.dart';
  6. import 'organization.m.dart';
  7. import 'package:fis_jsonrpc/utils.dart';
  8. class CreateExaminfoResult {
  9. String? examCode;
  10. CreateExaminfoResult({
  11. this.examCode,
  12. });
  13. factory CreateExaminfoResult.fromJson(Map<String, dynamic> map) {
  14. return CreateExaminfoResult(
  15. examCode: map['ExamCode'],
  16. );
  17. }
  18. Map<String, dynamic> toJson() {
  19. final map = Map<String, dynamic>();
  20. if(examCode != null)
  21. map['ExamCode'] = examCode;
  22. return map;
  23. }
  24. }
  25. class CreateExaminfoRequest extends TokenRequest{
  26. String? patientType;
  27. String? reservationCode;
  28. List<DataItemDTO >? patientInfo;
  29. List<PatientInfoExt >? patientScanInfoList;
  30. CreateExaminfoRequest({
  31. this.patientType,
  32. this.reservationCode,
  33. this.patientInfo,
  34. this.patientScanInfoList,
  35. String? token,
  36. }) : super(
  37. token: token,
  38. );
  39. factory CreateExaminfoRequest.fromJson(Map<String, dynamic> map) {
  40. return CreateExaminfoRequest(
  41. patientType: map['PatientType'],
  42. reservationCode: map['ReservationCode'],
  43. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  44. patientScanInfoList: map['PatientScanInfoList'] != null ? (map['PatientScanInfoList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  45. token: map['Token'],
  46. );
  47. }
  48. Map<String, dynamic> toJson() {
  49. final map = super.toJson();
  50. if(patientType != null)
  51. map['PatientType'] = patientType;
  52. if(reservationCode != null)
  53. map['ReservationCode'] = reservationCode;
  54. if(patientInfo != null)
  55. map['PatientInfo'] = patientInfo;
  56. if(patientScanInfoList != null)
  57. map['PatientScanInfoList'] = patientScanInfoList;
  58. return map;
  59. }
  60. }
  61. class UploadExamDataRequest extends TokenRequest{
  62. String? examCode;
  63. String? previewFileToken;
  64. String? fileToken;
  65. String? coverImageToken;
  66. String? applicationCategory;
  67. String? application;
  68. RemedicalFileDataTypeEnum fileDataType;
  69. MeasuredResultsDTO? measuredResult;
  70. ScanImageDTO? commentResult;
  71. UploadExamDataRequest({
  72. this.examCode,
  73. this.previewFileToken,
  74. this.fileToken,
  75. this.coverImageToken,
  76. this.applicationCategory,
  77. this.application,
  78. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  79. this.measuredResult,
  80. this.commentResult,
  81. String? token,
  82. }) : super(
  83. token: token,
  84. );
  85. factory UploadExamDataRequest.fromJson(Map<String, dynamic> map) {
  86. return UploadExamDataRequest(
  87. examCode: map['ExamCode'],
  88. previewFileToken: map['PreviewFileToken'],
  89. fileToken: map['FileToken'],
  90. coverImageToken: map['CoverImageToken'],
  91. applicationCategory: map['ApplicationCategory'],
  92. application: map['Application'],
  93. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  94. measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
  95. commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
  96. token: map['Token'],
  97. );
  98. }
  99. Map<String, dynamic> toJson() {
  100. final map = super.toJson();
  101. if(examCode != null)
  102. map['ExamCode'] = examCode;
  103. if(previewFileToken != null)
  104. map['PreviewFileToken'] = previewFileToken;
  105. if(fileToken != null)
  106. map['FileToken'] = fileToken;
  107. if(coverImageToken != null)
  108. map['CoverImageToken'] = coverImageToken;
  109. if(applicationCategory != null)
  110. map['ApplicationCategory'] = applicationCategory;
  111. if(application != null)
  112. map['Application'] = application;
  113. map['FileDataType'] = fileDataType.index;
  114. if(measuredResult != null)
  115. map['MeasuredResult'] = measuredResult;
  116. if(commentResult != null)
  117. map['CommentResult'] = commentResult;
  118. return map;
  119. }
  120. }
  121. class FindRemedicalByCodeRequest extends TokenRequest{
  122. String? remedicalCode;
  123. bool existDiagnosisResult;
  124. FindRemedicalByCodeRequest({
  125. this.remedicalCode,
  126. this.existDiagnosisResult = false,
  127. String? token,
  128. }) : super(
  129. token: token,
  130. );
  131. factory FindRemedicalByCodeRequest.fromJson(Map<String, dynamic> map) {
  132. return FindRemedicalByCodeRequest(
  133. remedicalCode: map['RemedicalCode'],
  134. existDiagnosisResult: map['ExistDiagnosisResult'],
  135. token: map['Token'],
  136. );
  137. }
  138. Map<String, dynamic> toJson() {
  139. final map = super.toJson();
  140. if(remedicalCode != null)
  141. map['RemedicalCode'] = remedicalCode;
  142. map['ExistDiagnosisResult'] = existDiagnosisResult;
  143. return map;
  144. }
  145. }
  146. class AddToRemedicalDiagnosisRequest extends TokenRequest{
  147. String? remedicalCode;
  148. AddToRemedicalDiagnosisRequest({
  149. this.remedicalCode,
  150. String? token,
  151. }) : super(
  152. token: token,
  153. );
  154. factory AddToRemedicalDiagnosisRequest.fromJson(Map<String, dynamic> map) {
  155. return AddToRemedicalDiagnosisRequest(
  156. remedicalCode: map['RemedicalCode'],
  157. token: map['Token'],
  158. );
  159. }
  160. Map<String, dynamic> toJson() {
  161. final map = super.toJson();
  162. if(remedicalCode != null)
  163. map['RemedicalCode'] = remedicalCode;
  164. return map;
  165. }
  166. }
  167. class RemedicalItemList {
  168. String? patientScanTypeDesc;
  169. List<String >? patientScanTypeList;
  170. String? applicationCategory;
  171. String? application;
  172. List<RemedicalInfoDTO >? remedicalList;
  173. RemedicalItemList({
  174. this.patientScanTypeDesc,
  175. this.patientScanTypeList,
  176. this.applicationCategory,
  177. this.application,
  178. this.remedicalList,
  179. });
  180. factory RemedicalItemList.fromJson(Map<String, dynamic> map) {
  181. return RemedicalItemList(
  182. patientScanTypeDesc: map['PatientScanTypeDesc'],
  183. patientScanTypeList: map['PatientScanTypeList'] != null ? map['PatientScanTypeList'].cast<String>().toList() : null,
  184. applicationCategory: map['ApplicationCategory'],
  185. application: map['Application'],
  186. remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  187. );
  188. }
  189. Map<String, dynamic> toJson() {
  190. final map = Map<String, dynamic>();
  191. if(patientScanTypeDesc != null)
  192. map['PatientScanTypeDesc'] = patientScanTypeDesc;
  193. if(patientScanTypeList != null)
  194. map['PatientScanTypeList'] = patientScanTypeList;
  195. if(applicationCategory != null)
  196. map['ApplicationCategory'] = applicationCategory;
  197. if(application != null)
  198. map['Application'] = application;
  199. if(remedicalList != null)
  200. map['RemedicalList'] = remedicalList;
  201. return map;
  202. }
  203. }
  204. class RemedicalListResult {
  205. String? scanDate;
  206. String? recordCode;
  207. List<RemedicalItemList >? remedicalItemList;
  208. RemedicalListResult({
  209. this.scanDate,
  210. this.recordCode,
  211. this.remedicalItemList,
  212. });
  213. factory RemedicalListResult.fromJson(Map<String, dynamic> map) {
  214. return RemedicalListResult(
  215. scanDate: map['ScanDate'],
  216. recordCode: map['RecordCode'],
  217. remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItemList.fromJson(e as Map<String,dynamic>)).toList() : null,
  218. );
  219. }
  220. Map<String, dynamic> toJson() {
  221. final map = Map<String, dynamic>();
  222. if(scanDate != null)
  223. map['ScanDate'] = scanDate;
  224. if(recordCode != null)
  225. map['RecordCode'] = recordCode;
  226. if(remedicalItemList != null)
  227. map['RemedicalItemList'] = remedicalItemList;
  228. return map;
  229. }
  230. }
  231. enum QueryDropdownListEnum {
  232. Org,
  233. }
  234. class QueryDropdownListReuqest extends TokenRequest{
  235. QueryDropdownListEnum queryType;
  236. String? queryValue;
  237. QueryDropdownListReuqest({
  238. this.queryType = QueryDropdownListEnum.Org,
  239. this.queryValue,
  240. String? token,
  241. }) : super(
  242. token: token,
  243. );
  244. factory QueryDropdownListReuqest.fromJson(Map<String, dynamic> map) {
  245. return QueryDropdownListReuqest(
  246. queryType: QueryDropdownListEnum.values.firstWhere((e) => e.index == map['QueryType']),
  247. queryValue: map['QueryValue'],
  248. token: map['Token'],
  249. );
  250. }
  251. Map<String, dynamic> toJson() {
  252. final map = super.toJson();
  253. map['QueryType'] = queryType.index;
  254. if(queryValue != null)
  255. map['QueryValue'] = queryValue;
  256. return map;
  257. }
  258. }
  259. class RservationResult {
  260. String? reservationCode;
  261. List<DataItemDTO >? patientInfo;
  262. List<PatientInfoExt >? patientInfoExtList;
  263. String? dataSource;
  264. RservationResult({
  265. this.reservationCode,
  266. this.patientInfo,
  267. this.patientInfoExtList,
  268. this.dataSource,
  269. });
  270. factory RservationResult.fromJson(Map<String, dynamic> map) {
  271. return RservationResult(
  272. reservationCode: map['ReservationCode'],
  273. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  274. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  275. dataSource: map['DataSource'],
  276. );
  277. }
  278. Map<String, dynamic> toJson() {
  279. final map = Map<String, dynamic>();
  280. if(reservationCode != null)
  281. map['ReservationCode'] = reservationCode;
  282. if(patientInfo != null)
  283. map['PatientInfo'] = patientInfo;
  284. if(patientInfoExtList != null)
  285. map['PatientInfoExtList'] = patientInfoExtList;
  286. if(dataSource != null)
  287. map['DataSource'] = dataSource;
  288. return map;
  289. }
  290. }
  291. class QueryReservationResult {
  292. List<RservationResult >? reservationList;
  293. QueryReservationResult({
  294. this.reservationList,
  295. });
  296. factory QueryReservationResult.fromJson(Map<String, dynamic> map) {
  297. return QueryReservationResult(
  298. reservationList: map['ReservationList'] != null ? (map['ReservationList'] as List).map((e)=>RservationResult.fromJson(e as Map<String,dynamic>)).toList() : null,
  299. );
  300. }
  301. Map<String, dynamic> toJson() {
  302. final map = Map<String, dynamic>();
  303. if(reservationList != null)
  304. map['ReservationList'] = reservationList;
  305. return map;
  306. }
  307. }
  308. class QueryReservationRequest extends TokenRequest{
  309. DateTime? createTime;
  310. QueryReservationRequest({
  311. this.createTime,
  312. String? token,
  313. }) : super(
  314. token: token,
  315. );
  316. factory QueryReservationRequest.fromJson(Map<String, dynamic> map) {
  317. return QueryReservationRequest(
  318. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  319. token: map['Token'],
  320. );
  321. }
  322. Map<String, dynamic> toJson() {
  323. final map = super.toJson();
  324. if(createTime != null)
  325. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  326. return map;
  327. }
  328. }
  329. class FinishExamNotifyDetail {
  330. String? recordCode;
  331. RecordStatusEnum recordStatus;
  332. FinishExamNotifyDetail({
  333. this.recordCode,
  334. this.recordStatus = RecordStatusEnum.NotScanned,
  335. });
  336. factory FinishExamNotifyDetail.fromJson(Map<String, dynamic> map) {
  337. return FinishExamNotifyDetail(
  338. recordCode: map['RecordCode'],
  339. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  340. );
  341. }
  342. Map<String, dynamic> toJson() {
  343. final map = Map<String, dynamic>();
  344. if(recordCode != null)
  345. map['RecordCode'] = recordCode;
  346. map['RecordStatus'] = recordStatus.index;
  347. return map;
  348. }
  349. }
  350. class PushFinishExamNotifyToClientRequest {
  351. List<FinishExamNotifyDetail >? records;
  352. String? userCode;
  353. PushFinishExamNotifyToClientRequest({
  354. this.records,
  355. this.userCode,
  356. });
  357. factory PushFinishExamNotifyToClientRequest.fromJson(Map<String, dynamic> map) {
  358. return PushFinishExamNotifyToClientRequest(
  359. records: map['Records'] != null ? (map['Records'] as List).map((e)=>FinishExamNotifyDetail.fromJson(e as Map<String,dynamic>)).toList() : null,
  360. userCode: map['UserCode'],
  361. );
  362. }
  363. Map<String, dynamic> toJson() {
  364. final map = Map<String, dynamic>();
  365. if(records != null)
  366. map['Records'] = records;
  367. if(userCode != null)
  368. map['UserCode'] = userCode;
  369. return map;
  370. }
  371. }
  372. class DeviceFinishExamRequest extends TokenRequest{
  373. List<String >? records;
  374. DeviceFinishExamRequest({
  375. this.records,
  376. String? token,
  377. }) : super(
  378. token: token,
  379. );
  380. factory DeviceFinishExamRequest.fromJson(Map<String, dynamic> map) {
  381. return DeviceFinishExamRequest(
  382. records: map['Records'] != null ? map['Records'].cast<String>().toList() : null,
  383. token: map['Token'],
  384. );
  385. }
  386. Map<String, dynamic> toJson() {
  387. final map = super.toJson();
  388. if(records != null)
  389. map['Records'] = records;
  390. return map;
  391. }
  392. }
  393. class QueryExamListItemResult {
  394. String? examCode;
  395. String? patientName;
  396. String? age;
  397. List<DataItemDTO >? ageInfo;
  398. String? sex;
  399. List<String >? associatedExamCodes;
  400. QueryExamListItemResult({
  401. this.examCode,
  402. this.patientName,
  403. this.age,
  404. this.ageInfo,
  405. this.sex,
  406. this.associatedExamCodes,
  407. });
  408. factory QueryExamListItemResult.fromJson(Map<String, dynamic> map) {
  409. return QueryExamListItemResult(
  410. examCode: map['ExamCode'],
  411. patientName: map['PatientName'],
  412. age: map['Age'],
  413. ageInfo: map['AgeInfo'] != null ? (map['AgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  414. sex: map['Sex'],
  415. associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast<String>().toList() : null,
  416. );
  417. }
  418. Map<String, dynamic> toJson() {
  419. final map = Map<String, dynamic>();
  420. if(examCode != null)
  421. map['ExamCode'] = examCode;
  422. if(patientName != null)
  423. map['PatientName'] = patientName;
  424. if(age != null)
  425. map['Age'] = age;
  426. if(ageInfo != null)
  427. map['AgeInfo'] = ageInfo;
  428. if(sex != null)
  429. map['Sex'] = sex;
  430. if(associatedExamCodes != null)
  431. map['AssociatedExamCodes'] = associatedExamCodes;
  432. return map;
  433. }
  434. }
  435. enum ExamStatusEnum {
  436. Wait,
  437. Done,
  438. }
  439. class QueryExamListRequest extends PageRequest{
  440. String? patientName;
  441. DateTime? startTime;
  442. DateTime? endTime;
  443. ExamStatusEnum examStatus;
  444. QueryExamListRequest({
  445. this.patientName,
  446. this.startTime,
  447. this.endTime,
  448. this.examStatus = ExamStatusEnum.Wait,
  449. int pageIndex = 0,
  450. int pageSize = 0,
  451. String? token,
  452. }) : super(
  453. pageIndex: pageIndex,
  454. pageSize: pageSize,
  455. token: token,
  456. );
  457. factory QueryExamListRequest.fromJson(Map<String, dynamic> map) {
  458. return QueryExamListRequest(
  459. patientName: map['PatientName'],
  460. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  461. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  462. examStatus: ExamStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']),
  463. pageIndex: map['PageIndex'],
  464. pageSize: map['PageSize'],
  465. token: map['Token'],
  466. );
  467. }
  468. Map<String, dynamic> toJson() {
  469. final map = super.toJson();
  470. if(patientName != null)
  471. map['PatientName'] = patientName;
  472. if(startTime != null)
  473. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  474. if(endTime != null)
  475. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  476. map['ExamStatus'] = examStatus.index;
  477. return map;
  478. }
  479. }
  480. class QueryExamInfoResult {
  481. DateTime? createTime;
  482. String? deptName;
  483. String? patientName;
  484. String? patientAge;
  485. List<DataItemDTO >? patientAgeInfo;
  486. String? patientSex;
  487. List<PatientInfoExt >? patientInfoExtList;
  488. List<String >? associatedExamCodes;
  489. RecordStatusEnum examStatus;
  490. QueryExamInfoResult({
  491. this.createTime,
  492. this.deptName,
  493. this.patientName,
  494. this.patientAge,
  495. this.patientAgeInfo,
  496. this.patientSex,
  497. this.patientInfoExtList,
  498. this.associatedExamCodes,
  499. this.examStatus = RecordStatusEnum.NotScanned,
  500. });
  501. factory QueryExamInfoResult.fromJson(Map<String, dynamic> map) {
  502. return QueryExamInfoResult(
  503. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  504. deptName: map['DeptName'],
  505. patientName: map['PatientName'],
  506. patientAge: map['PatientAge'],
  507. patientAgeInfo: map['PatientAgeInfo'] != null ? (map['PatientAgeInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  508. patientSex: map['PatientSex'],
  509. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  510. associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast<String>().toList() : null,
  511. examStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['ExamStatus']),
  512. );
  513. }
  514. Map<String, dynamic> toJson() {
  515. final map = Map<String, dynamic>();
  516. if(createTime != null)
  517. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  518. if(deptName != null)
  519. map['DeptName'] = deptName;
  520. if(patientName != null)
  521. map['PatientName'] = patientName;
  522. if(patientAge != null)
  523. map['PatientAge'] = patientAge;
  524. if(patientAgeInfo != null)
  525. map['PatientAgeInfo'] = patientAgeInfo;
  526. if(patientSex != null)
  527. map['PatientSex'] = patientSex;
  528. if(patientInfoExtList != null)
  529. map['PatientInfoExtList'] = patientInfoExtList;
  530. if(associatedExamCodes != null)
  531. map['AssociatedExamCodes'] = associatedExamCodes;
  532. map['ExamStatus'] = examStatus.index;
  533. return map;
  534. }
  535. }
  536. class QueryExamInfoRequest extends TokenRequest{
  537. String? examCode;
  538. QueryExamInfoRequest({
  539. this.examCode,
  540. String? token,
  541. }) : super(
  542. token: token,
  543. );
  544. factory QueryExamInfoRequest.fromJson(Map<String, dynamic> map) {
  545. return QueryExamInfoRequest(
  546. examCode: map['ExamCode'],
  547. token: map['Token'],
  548. );
  549. }
  550. Map<String, dynamic> toJson() {
  551. final map = super.toJson();
  552. if(examCode != null)
  553. map['ExamCode'] = examCode;
  554. return map;
  555. }
  556. }
  557. class OutputItemMetaDTO {
  558. String? name;
  559. String? description;
  560. int unit;
  561. bool? isWorking;
  562. OutputItemMetaDTO({
  563. this.name,
  564. this.description,
  565. this.unit = 0,
  566. this.isWorking,
  567. });
  568. factory OutputItemMetaDTO.fromJson(Map<String, dynamic> map) {
  569. return OutputItemMetaDTO(
  570. name: map['Name'],
  571. description: map['Description'],
  572. unit: map['Unit'],
  573. isWorking: map['IsWorking'],
  574. );
  575. }
  576. Map<String, dynamic> toJson() {
  577. final map = Map<String, dynamic>();
  578. if(name != null)
  579. map['Name'] = name;
  580. if(description != null)
  581. map['Description'] = description;
  582. map['Unit'] = unit;
  583. if(isWorking != null)
  584. map['IsWorking'] = isWorking;
  585. return map;
  586. }
  587. }
  588. class CalculatorMetaDTO {
  589. List<OutputItemMetaDTO >? availableOutputs;
  590. CalculatorMetaDTO({
  591. this.availableOutputs,
  592. });
  593. factory CalculatorMetaDTO.fromJson(Map<String, dynamic> map) {
  594. return CalculatorMetaDTO(
  595. availableOutputs: map['AvailableOutputs'] != null ? (map['AvailableOutputs'] as List).map((e)=>OutputItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  596. );
  597. }
  598. Map<String, dynamic> toJson() {
  599. final map = Map<String, dynamic>();
  600. if(availableOutputs != null)
  601. map['AvailableOutputs'] = availableOutputs;
  602. return map;
  603. }
  604. }
  605. class ChildItemMetaDTO {
  606. String? name;
  607. String? description;
  608. bool isWorking;
  609. List<ChildItemMetaDTO >? childItems;
  610. CalculatorMetaDTO? calculator;
  611. String? measureTypeName;
  612. ChildItemMetaDTO({
  613. this.name,
  614. this.description,
  615. this.isWorking = false,
  616. this.childItems,
  617. this.calculator,
  618. this.measureTypeName,
  619. });
  620. factory ChildItemMetaDTO.fromJson(Map<String, dynamic> map) {
  621. return ChildItemMetaDTO(
  622. name: map['Name'],
  623. description: map['Description'],
  624. isWorking: map['IsWorking'],
  625. childItems: map['ChildItems'] != null ? (map['ChildItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  626. calculator: map['Calculator'] != null ? CalculatorMetaDTO.fromJson(map['Calculator']) : null,
  627. measureTypeName: map['MeasureTypeName'],
  628. );
  629. }
  630. Map<String, dynamic> toJson() {
  631. final map = Map<String, dynamic>();
  632. if(name != null)
  633. map['Name'] = name;
  634. if(description != null)
  635. map['Description'] = description;
  636. map['IsWorking'] = isWorking;
  637. if(childItems != null)
  638. map['ChildItems'] = childItems;
  639. if(calculator != null)
  640. map['Calculator'] = calculator;
  641. if(measureTypeName != null)
  642. map['MeasureTypeName'] = measureTypeName;
  643. return map;
  644. }
  645. }
  646. class ItemMetaDTO {
  647. String? name;
  648. String? description;
  649. String? briefAnnotation;
  650. String? measureTypeName;
  651. List<String >? categories;
  652. CalculatorMetaDTO? calculator;
  653. List<ChildItemMetaDTO >? multiMethodItems;
  654. List<ChildItemMetaDTO >? methodChildItems;
  655. ItemMetaDTO({
  656. this.name,
  657. this.description,
  658. this.briefAnnotation,
  659. this.measureTypeName,
  660. this.categories,
  661. this.calculator,
  662. this.multiMethodItems,
  663. this.methodChildItems,
  664. });
  665. factory ItemMetaDTO.fromJson(Map<String, dynamic> map) {
  666. return ItemMetaDTO(
  667. name: map['Name'],
  668. description: map['Description'],
  669. briefAnnotation: map['BriefAnnotation'],
  670. measureTypeName: map['MeasureTypeName'],
  671. categories: map['Categories'] != null ? map['Categories'].cast<String>().toList() : null,
  672. calculator: map['Calculator'] != null ? CalculatorMetaDTO.fromJson(map['Calculator']) : null,
  673. multiMethodItems: map['MultiMethodItems'] != null ? (map['MultiMethodItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  674. methodChildItems: map['MethodChildItems'] != null ? (map['MethodChildItems'] as List).map((e)=>ChildItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  675. );
  676. }
  677. Map<String, dynamic> toJson() {
  678. final map = Map<String, dynamic>();
  679. if(name != null)
  680. map['Name'] = name;
  681. if(description != null)
  682. map['Description'] = description;
  683. if(briefAnnotation != null)
  684. map['BriefAnnotation'] = briefAnnotation;
  685. if(measureTypeName != null)
  686. map['MeasureTypeName'] = measureTypeName;
  687. if(categories != null)
  688. map['Categories'] = categories;
  689. if(calculator != null)
  690. map['Calculator'] = calculator;
  691. if(multiMethodItems != null)
  692. map['MultiMethodItems'] = multiMethodItems;
  693. if(methodChildItems != null)
  694. map['MethodChildItems'] = methodChildItems;
  695. return map;
  696. }
  697. }
  698. class MeasureFolderDTO {
  699. String? name;
  700. List<String >? workingItemNames;
  701. List<ItemMetaDTO >? availableItems;
  702. MeasureFolderDTO({
  703. this.name,
  704. this.workingItemNames,
  705. this.availableItems,
  706. });
  707. factory MeasureFolderDTO.fromJson(Map<String, dynamic> map) {
  708. return MeasureFolderDTO(
  709. name: map['Name'],
  710. workingItemNames: map['WorkingItemNames'] != null ? map['WorkingItemNames'].cast<String>().toList() : null,
  711. availableItems: map['AvailableItems'] != null ? (map['AvailableItems'] as List).map((e)=>ItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  712. );
  713. }
  714. Map<String, dynamic> toJson() {
  715. final map = Map<String, dynamic>();
  716. if(name != null)
  717. map['Name'] = name;
  718. if(workingItemNames != null)
  719. map['WorkingItemNames'] = workingItemNames;
  720. if(availableItems != null)
  721. map['AvailableItems'] = availableItems;
  722. return map;
  723. }
  724. }
  725. class MeasureGroupDTO {
  726. String? name;
  727. String? description;
  728. List<MeasureFolderDTO >? availableFolders;
  729. MeasureGroupDTO({
  730. this.name,
  731. this.description,
  732. this.availableFolders,
  733. });
  734. factory MeasureGroupDTO.fromJson(Map<String, dynamic> map) {
  735. return MeasureGroupDTO(
  736. name: map['Name'],
  737. description: map['Description'],
  738. availableFolders: map['AvailableFolders'] != null ? (map['AvailableFolders'] as List).map((e)=>MeasureFolderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  739. );
  740. }
  741. Map<String, dynamic> toJson() {
  742. final map = Map<String, dynamic>();
  743. if(name != null)
  744. map['Name'] = name;
  745. if(description != null)
  746. map['Description'] = description;
  747. if(availableFolders != null)
  748. map['AvailableFolders'] = availableFolders;
  749. return map;
  750. }
  751. }
  752. class MeasureModeDTO {
  753. String? modeName;
  754. List<MeasureGroupDTO >? availableGroups;
  755. MeasureModeDTO({
  756. this.modeName,
  757. this.availableGroups,
  758. });
  759. factory MeasureModeDTO.fromJson(Map<String, dynamic> map) {
  760. return MeasureModeDTO(
  761. modeName: map['ModeName'],
  762. availableGroups: map['AvailableGroups'] != null ? (map['AvailableGroups'] as List).map((e)=>MeasureGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  763. );
  764. }
  765. Map<String, dynamic> toJson() {
  766. final map = Map<String, dynamic>();
  767. if(modeName != null)
  768. map['ModeName'] = modeName;
  769. if(availableGroups != null)
  770. map['AvailableGroups'] = availableGroups;
  771. return map;
  772. }
  773. }
  774. class MeasureApplicationDTO {
  775. String? version;
  776. String? id;
  777. String? description;
  778. List<MeasureModeDTO >? availableModes;
  779. MeasureApplicationDTO({
  780. this.version,
  781. this.id,
  782. this.description,
  783. this.availableModes,
  784. });
  785. factory MeasureApplicationDTO.fromJson(Map<String, dynamic> map) {
  786. return MeasureApplicationDTO(
  787. version: map['Version'],
  788. id: map['Id'],
  789. description: map['Description'],
  790. availableModes: map['AvailableModes'] != null ? (map['AvailableModes'] as List).map((e)=>MeasureModeDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  791. );
  792. }
  793. Map<String, dynamic> toJson() {
  794. final map = Map<String, dynamic>();
  795. if(version != null)
  796. map['Version'] = version;
  797. if(id != null)
  798. map['Id'] = id;
  799. if(description != null)
  800. map['Description'] = description;
  801. if(availableModes != null)
  802. map['AvailableModes'] = availableModes;
  803. return map;
  804. }
  805. }
  806. class GetMeasureApplicationRequest extends TokenRequest{
  807. String? applicationName;
  808. String? categoryName;
  809. List<String >? measureModes;
  810. GetMeasureApplicationRequest({
  811. this.applicationName,
  812. this.categoryName,
  813. this.measureModes,
  814. String? token,
  815. }) : super(
  816. token: token,
  817. );
  818. factory GetMeasureApplicationRequest.fromJson(Map<String, dynamic> map) {
  819. return GetMeasureApplicationRequest(
  820. applicationName: map['ApplicationName'],
  821. categoryName: map['CategoryName'],
  822. measureModes: map['MeasureModes'] != null ? map['MeasureModes'].cast<String>().toList() : null,
  823. token: map['Token'],
  824. );
  825. }
  826. Map<String, dynamic> toJson() {
  827. final map = super.toJson();
  828. if(applicationName != null)
  829. map['ApplicationName'] = applicationName;
  830. if(categoryName != null)
  831. map['CategoryName'] = categoryName;
  832. if(measureModes != null)
  833. map['MeasureModes'] = measureModes;
  834. return map;
  835. }
  836. }
  837. class CommentItemDTO {
  838. String? text;
  839. CommentItemDTO({
  840. this.text,
  841. });
  842. factory CommentItemDTO.fromJson(Map<String, dynamic> map) {
  843. return CommentItemDTO(
  844. text: map['Text'],
  845. );
  846. }
  847. Map<String, dynamic> toJson() {
  848. final map = Map<String, dynamic>();
  849. if(text != null)
  850. map['Text'] = text;
  851. return map;
  852. }
  853. }
  854. class CommentItemResultDTO {
  855. String? version;
  856. List<CommentItemDTO >? commentItems;
  857. CommentItemResultDTO({
  858. this.version,
  859. this.commentItems,
  860. });
  861. factory CommentItemResultDTO.fromJson(Map<String, dynamic> map) {
  862. return CommentItemResultDTO(
  863. version: map['Version'],
  864. commentItems: map['CommentItems'] != null ? (map['CommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  865. );
  866. }
  867. Map<String, dynamic> toJson() {
  868. final map = Map<String, dynamic>();
  869. if(version != null)
  870. map['Version'] = version;
  871. if(commentItems != null)
  872. map['CommentItems'] = commentItems;
  873. return map;
  874. }
  875. }
  876. class GetCommentsByApplicationRequest extends TokenRequest{
  877. String? languageCode;
  878. String? applicationName;
  879. String? categoryName;
  880. GetCommentsByApplicationRequest({
  881. this.languageCode,
  882. this.applicationName,
  883. this.categoryName,
  884. String? token,
  885. }) : super(
  886. token: token,
  887. );
  888. factory GetCommentsByApplicationRequest.fromJson(Map<String, dynamic> map) {
  889. return GetCommentsByApplicationRequest(
  890. languageCode: map['LanguageCode'],
  891. applicationName: map['ApplicationName'],
  892. categoryName: map['CategoryName'],
  893. token: map['Token'],
  894. );
  895. }
  896. Map<String, dynamic> toJson() {
  897. final map = super.toJson();
  898. if(languageCode != null)
  899. map['LanguageCode'] = languageCode;
  900. if(applicationName != null)
  901. map['ApplicationName'] = applicationName;
  902. if(categoryName != null)
  903. map['CategoryName'] = categoryName;
  904. return map;
  905. }
  906. }
  907. class PresetCommentItemDTO {
  908. List<String >? categoryList;
  909. String? text;
  910. PresetCommentItemDTO({
  911. this.categoryList,
  912. this.text,
  913. });
  914. factory PresetCommentItemDTO.fromJson(Map<String, dynamic> map) {
  915. return PresetCommentItemDTO(
  916. categoryList: map['CategoryList'] != null ? map['CategoryList'].cast<String>().toList() : null,
  917. text: map['Text'],
  918. );
  919. }
  920. Map<String, dynamic> toJson() {
  921. final map = Map<String, dynamic>();
  922. if(categoryList != null)
  923. map['CategoryList'] = categoryList;
  924. if(text != null)
  925. map['Text'] = text;
  926. return map;
  927. }
  928. }
  929. class PresetCommentItemResultDTO {
  930. String? version;
  931. List<PresetCommentItemDTO >? presetCommentItems;
  932. PresetCommentItemResultDTO({
  933. this.version,
  934. this.presetCommentItems,
  935. });
  936. factory PresetCommentItemResultDTO.fromJson(Map<String, dynamic> map) {
  937. return PresetCommentItemResultDTO(
  938. version: map['Version'],
  939. presetCommentItems: map['PresetCommentItems'] != null ? (map['PresetCommentItems'] as List).map((e)=>PresetCommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  940. );
  941. }
  942. Map<String, dynamic> toJson() {
  943. final map = Map<String, dynamic>();
  944. if(version != null)
  945. map['Version'] = version;
  946. if(presetCommentItems != null)
  947. map['PresetCommentItems'] = presetCommentItems;
  948. return map;
  949. }
  950. }
  951. class GetPresetCommentsRequest extends TokenRequest{
  952. String? languageCode;
  953. GetPresetCommentsRequest({
  954. this.languageCode,
  955. String? token,
  956. }) : super(
  957. token: token,
  958. );
  959. factory GetPresetCommentsRequest.fromJson(Map<String, dynamic> map) {
  960. return GetPresetCommentsRequest(
  961. languageCode: map['LanguageCode'],
  962. token: map['Token'],
  963. );
  964. }
  965. Map<String, dynamic> toJson() {
  966. final map = super.toJson();
  967. if(languageCode != null)
  968. map['LanguageCode'] = languageCode;
  969. return map;
  970. }
  971. }
  972. class GetReportElementByLanguageRequest extends TokenRequest{
  973. String? reportDatasJosn;
  974. String? language;
  975. GetReportElementByLanguageRequest({
  976. this.reportDatasJosn,
  977. this.language,
  978. String? token,
  979. }) : super(
  980. token: token,
  981. );
  982. factory GetReportElementByLanguageRequest.fromJson(Map<String, dynamic> map) {
  983. return GetReportElementByLanguageRequest(
  984. reportDatasJosn: map['ReportDatasJosn'],
  985. language: map['Language'],
  986. token: map['Token'],
  987. );
  988. }
  989. Map<String, dynamic> toJson() {
  990. final map = super.toJson();
  991. if(reportDatasJosn != null)
  992. map['ReportDatasJosn'] = reportDatasJosn;
  993. if(language != null)
  994. map['Language'] = language;
  995. return map;
  996. }
  997. }
  998. class UpdateCommentItemDTO {
  999. String? oldText;
  1000. String? newText;
  1001. UpdateCommentItemDTO({
  1002. this.oldText,
  1003. this.newText,
  1004. });
  1005. factory UpdateCommentItemDTO.fromJson(Map<String, dynamic> map) {
  1006. return UpdateCommentItemDTO(
  1007. oldText: map['OldText'],
  1008. newText: map['NewText'],
  1009. );
  1010. }
  1011. Map<String, dynamic> toJson() {
  1012. final map = Map<String, dynamic>();
  1013. if(oldText != null)
  1014. map['OldText'] = oldText;
  1015. if(newText != null)
  1016. map['NewText'] = newText;
  1017. return map;
  1018. }
  1019. }
  1020. class SaveUserDefinedCommentsRequest extends TokenRequest{
  1021. String? version;
  1022. String? languageCode;
  1023. String? applicationName;
  1024. String? categoryName;
  1025. List<CommentItemDTO >? addCommentItems;
  1026. List<CommentItemDTO >? deletedCommentItems;
  1027. List<UpdateCommentItemDTO >? updateCommentItems;
  1028. SaveUserDefinedCommentsRequest({
  1029. this.version,
  1030. this.languageCode,
  1031. this.applicationName,
  1032. this.categoryName,
  1033. this.addCommentItems,
  1034. this.deletedCommentItems,
  1035. this.updateCommentItems,
  1036. String? token,
  1037. }) : super(
  1038. token: token,
  1039. );
  1040. factory SaveUserDefinedCommentsRequest.fromJson(Map<String, dynamic> map) {
  1041. return SaveUserDefinedCommentsRequest(
  1042. version: map['Version'],
  1043. languageCode: map['LanguageCode'],
  1044. applicationName: map['ApplicationName'],
  1045. categoryName: map['CategoryName'],
  1046. addCommentItems: map['AddCommentItems'] != null ? (map['AddCommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1047. deletedCommentItems: map['DeletedCommentItems'] != null ? (map['DeletedCommentItems'] as List).map((e)=>CommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1048. updateCommentItems: map['UpdateCommentItems'] != null ? (map['UpdateCommentItems'] as List).map((e)=>UpdateCommentItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1049. token: map['Token'],
  1050. );
  1051. }
  1052. Map<String, dynamic> toJson() {
  1053. final map = super.toJson();
  1054. if(version != null)
  1055. map['Version'] = version;
  1056. if(languageCode != null)
  1057. map['LanguageCode'] = languageCode;
  1058. if(applicationName != null)
  1059. map['ApplicationName'] = applicationName;
  1060. if(categoryName != null)
  1061. map['CategoryName'] = categoryName;
  1062. if(addCommentItems != null)
  1063. map['AddCommentItems'] = addCommentItems;
  1064. if(deletedCommentItems != null)
  1065. map['DeletedCommentItems'] = deletedCommentItems;
  1066. if(updateCommentItems != null)
  1067. map['UpdateCommentItems'] = updateCommentItems;
  1068. return map;
  1069. }
  1070. }
  1071. class UserDefinedItemMetaDTO {
  1072. String? name;
  1073. String? workingMethodItem;
  1074. UserDefinedItemMetaDTO({
  1075. this.name,
  1076. this.workingMethodItem,
  1077. });
  1078. factory UserDefinedItemMetaDTO.fromJson(Map<String, dynamic> map) {
  1079. return UserDefinedItemMetaDTO(
  1080. name: map['Name'],
  1081. workingMethodItem: map['WorkingMethodItem'],
  1082. );
  1083. }
  1084. Map<String, dynamic> toJson() {
  1085. final map = Map<String, dynamic>();
  1086. if(name != null)
  1087. map['Name'] = name;
  1088. if(workingMethodItem != null)
  1089. map['WorkingMethodItem'] = workingMethodItem;
  1090. return map;
  1091. }
  1092. }
  1093. class UserDefinedMeasureFolderDTO {
  1094. String? name;
  1095. List<String >? workingItemNames;
  1096. String? defaultItem;
  1097. List<UserDefinedItemMetaDTO >? multiMethodItemMetas;
  1098. UserDefinedMeasureFolderDTO({
  1099. this.name,
  1100. this.workingItemNames,
  1101. this.defaultItem,
  1102. this.multiMethodItemMetas,
  1103. });
  1104. factory UserDefinedMeasureFolderDTO.fromJson(Map<String, dynamic> map) {
  1105. return UserDefinedMeasureFolderDTO(
  1106. name: map['Name'],
  1107. workingItemNames: map['WorkingItemNames'] != null ? map['WorkingItemNames'].cast<String>().toList() : null,
  1108. defaultItem: map['DefaultItem'],
  1109. multiMethodItemMetas: map['MultiMethodItemMetas'] != null ? (map['MultiMethodItemMetas'] as List).map((e)=>UserDefinedItemMetaDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1110. );
  1111. }
  1112. Map<String, dynamic> toJson() {
  1113. final map = Map<String, dynamic>();
  1114. if(name != null)
  1115. map['Name'] = name;
  1116. if(workingItemNames != null)
  1117. map['WorkingItemNames'] = workingItemNames;
  1118. if(defaultItem != null)
  1119. map['DefaultItem'] = defaultItem;
  1120. if(multiMethodItemMetas != null)
  1121. map['MultiMethodItemMetas'] = multiMethodItemMetas;
  1122. return map;
  1123. }
  1124. }
  1125. class UserDefinedMeasureGroupDTO {
  1126. String? name;
  1127. List<UserDefinedMeasureFolderDTO >? folders;
  1128. UserDefinedMeasureGroupDTO({
  1129. this.name,
  1130. this.folders,
  1131. });
  1132. factory UserDefinedMeasureGroupDTO.fromJson(Map<String, dynamic> map) {
  1133. return UserDefinedMeasureGroupDTO(
  1134. name: map['Name'],
  1135. folders: map['Folders'] != null ? (map['Folders'] as List).map((e)=>UserDefinedMeasureFolderDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1136. );
  1137. }
  1138. Map<String, dynamic> toJson() {
  1139. final map = Map<String, dynamic>();
  1140. if(name != null)
  1141. map['Name'] = name;
  1142. if(folders != null)
  1143. map['Folders'] = folders;
  1144. return map;
  1145. }
  1146. }
  1147. class UserDefinedMeasureModeDTO {
  1148. String? modeName;
  1149. List<UserDefinedMeasureGroupDTO >? workingGroups;
  1150. UserDefinedMeasureModeDTO({
  1151. this.modeName,
  1152. this.workingGroups,
  1153. });
  1154. factory UserDefinedMeasureModeDTO.fromJson(Map<String, dynamic> map) {
  1155. return UserDefinedMeasureModeDTO(
  1156. modeName: map['ModeName'],
  1157. workingGroups: map['WorkingGroups'] != null ? (map['WorkingGroups'] as List).map((e)=>UserDefinedMeasureGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1158. );
  1159. }
  1160. Map<String, dynamic> toJson() {
  1161. final map = Map<String, dynamic>();
  1162. if(modeName != null)
  1163. map['ModeName'] = modeName;
  1164. if(workingGroups != null)
  1165. map['WorkingGroups'] = workingGroups;
  1166. return map;
  1167. }
  1168. }
  1169. class SaveUserDefinedMeasureApplicationRequest extends TokenRequest{
  1170. String? version;
  1171. String? applicationName;
  1172. String? categoryName;
  1173. UserDefinedMeasureModeDTO? workingMode;
  1174. SaveUserDefinedMeasureApplicationRequest({
  1175. this.version,
  1176. this.applicationName,
  1177. this.categoryName,
  1178. this.workingMode,
  1179. String? token,
  1180. }) : super(
  1181. token: token,
  1182. );
  1183. factory SaveUserDefinedMeasureApplicationRequest.fromJson(Map<String, dynamic> map) {
  1184. return SaveUserDefinedMeasureApplicationRequest(
  1185. version: map['Version'],
  1186. applicationName: map['ApplicationName'],
  1187. categoryName: map['CategoryName'],
  1188. workingMode: map['WorkingMode'] != null ? UserDefinedMeasureModeDTO.fromJson(map['WorkingMode']) : null,
  1189. token: map['Token'],
  1190. );
  1191. }
  1192. Map<String, dynamic> toJson() {
  1193. final map = super.toJson();
  1194. if(version != null)
  1195. map['Version'] = version;
  1196. if(applicationName != null)
  1197. map['ApplicationName'] = applicationName;
  1198. if(categoryName != null)
  1199. map['CategoryName'] = categoryName;
  1200. if(workingMode != null)
  1201. map['WorkingMode'] = workingMode;
  1202. return map;
  1203. }
  1204. }
  1205. enum CursorTypeEnum {
  1206. CursorType1Icon,
  1207. CursorType2Icon,
  1208. CursorType3Icon,
  1209. CursorType4Icon,
  1210. CursorType5Icon,
  1211. }
  1212. class MeasureSystemSettingDTO {
  1213. String? version;
  1214. CursorTypeEnum cursorType;
  1215. int cursorSize;
  1216. int shapeCursorSize;
  1217. String? cursorColor;
  1218. bool showResultWindow;
  1219. int showResultLocation;
  1220. int fontSize;
  1221. bool showCursorLine;
  1222. bool holdMeasureLine;
  1223. bool showDepthGuideline;
  1224. bool showBriefAnnotation;
  1225. String? minCursorDistance;
  1226. String? autoSnapDistance;
  1227. int annotationFontSize;
  1228. bool showProtocolInWorkSheet;
  1229. bool showAnnotation;
  1230. MeasureSystemSettingDTO({
  1231. this.version,
  1232. this.cursorType = CursorTypeEnum.CursorType1Icon,
  1233. this.cursorSize = 0,
  1234. this.shapeCursorSize = 0,
  1235. this.cursorColor,
  1236. this.showResultWindow = false,
  1237. this.showResultLocation = 0,
  1238. this.fontSize = 0,
  1239. this.showCursorLine = false,
  1240. this.holdMeasureLine = false,
  1241. this.showDepthGuideline = false,
  1242. this.showBriefAnnotation = false,
  1243. this.minCursorDistance,
  1244. this.autoSnapDistance,
  1245. this.annotationFontSize = 0,
  1246. this.showProtocolInWorkSheet = false,
  1247. this.showAnnotation = false,
  1248. });
  1249. factory MeasureSystemSettingDTO.fromJson(Map<String, dynamic> map) {
  1250. return MeasureSystemSettingDTO(
  1251. version: map['Version'],
  1252. cursorType: CursorTypeEnum.values.firstWhere((e) => e.index == map['CursorType']),
  1253. cursorSize: map['CursorSize'],
  1254. shapeCursorSize: map['ShapeCursorSize'],
  1255. cursorColor: map['CursorColor'],
  1256. showResultWindow: map['ShowResultWindow'],
  1257. showResultLocation: map['ShowResultLocation'],
  1258. fontSize: map['FontSize'],
  1259. showCursorLine: map['ShowCursorLine'],
  1260. holdMeasureLine: map['HoldMeasureLine'],
  1261. showDepthGuideline: map['ShowDepthGuideline'],
  1262. showBriefAnnotation: map['ShowBriefAnnotation'],
  1263. minCursorDistance: map['MinCursorDistance'],
  1264. autoSnapDistance: map['AutoSnapDistance'],
  1265. annotationFontSize: map['AnnotationFontSize'],
  1266. showProtocolInWorkSheet: map['ShowProtocolInWorkSheet'],
  1267. showAnnotation: map['ShowAnnotation'],
  1268. );
  1269. }
  1270. Map<String, dynamic> toJson() {
  1271. final map = Map<String, dynamic>();
  1272. if(version != null)
  1273. map['Version'] = version;
  1274. map['CursorType'] = cursorType.index;
  1275. map['CursorSize'] = cursorSize;
  1276. map['ShapeCursorSize'] = shapeCursorSize;
  1277. if(cursorColor != null)
  1278. map['CursorColor'] = cursorColor;
  1279. map['ShowResultWindow'] = showResultWindow;
  1280. map['ShowResultLocation'] = showResultLocation;
  1281. map['FontSize'] = fontSize;
  1282. map['ShowCursorLine'] = showCursorLine;
  1283. map['HoldMeasureLine'] = holdMeasureLine;
  1284. map['ShowDepthGuideline'] = showDepthGuideline;
  1285. map['ShowBriefAnnotation'] = showBriefAnnotation;
  1286. if(minCursorDistance != null)
  1287. map['MinCursorDistance'] = minCursorDistance;
  1288. if(autoSnapDistance != null)
  1289. map['AutoSnapDistance'] = autoSnapDistance;
  1290. map['AnnotationFontSize'] = annotationFontSize;
  1291. map['ShowProtocolInWorkSheet'] = showProtocolInWorkSheet;
  1292. map['ShowAnnotation'] = showAnnotation;
  1293. return map;
  1294. }
  1295. }
  1296. class GetMeasureSystemSettingRequest extends TokenRequest{
  1297. GetMeasureSystemSettingRequest({
  1298. String? token,
  1299. }) : super(
  1300. token: token,
  1301. );
  1302. factory GetMeasureSystemSettingRequest.fromJson(Map<String, dynamic> map) {
  1303. return GetMeasureSystemSettingRequest(
  1304. token: map['Token'],
  1305. );
  1306. }
  1307. Map<String, dynamic> toJson() {
  1308. final map = super.toJson();
  1309. return map;
  1310. }
  1311. }
  1312. class SaveMeasureSystemSettingRequest extends TokenRequest{
  1313. MeasureSystemSettingDTO? systemSetting;
  1314. SaveMeasureSystemSettingRequest({
  1315. this.systemSetting,
  1316. String? token,
  1317. }) : super(
  1318. token: token,
  1319. );
  1320. factory SaveMeasureSystemSettingRequest.fromJson(Map<String, dynamic> map) {
  1321. return SaveMeasureSystemSettingRequest(
  1322. systemSetting: map['SystemSetting'] != null ? MeasureSystemSettingDTO.fromJson(map['SystemSetting']) : null,
  1323. token: map['Token'],
  1324. );
  1325. }
  1326. Map<String, dynamic> toJson() {
  1327. final map = super.toJson();
  1328. if(systemSetting != null)
  1329. map['SystemSetting'] = systemSetting;
  1330. return map;
  1331. }
  1332. }
  1333. enum RecordCreateTypeEnum {
  1334. Reservation,
  1335. Normal,
  1336. }
  1337. class RecordInfoDTO extends BaseDTO{
  1338. String? recordCode;
  1339. String? patientCode;
  1340. String? deviceCode;
  1341. RecordStatusEnum recordStatus;
  1342. String? creatorCode;
  1343. String? tags;
  1344. RecordCreateTypeEnum createType;
  1345. List<DataItemDTO >? patientInfo;
  1346. List<PatientInfoExt >? patientInfoExtList;
  1347. String? devicePatientID;
  1348. String? patientType;
  1349. List<String >? readUsers;
  1350. String? rootOrganizationCode;
  1351. String? organizationCode;
  1352. List<String >? associatedExamCodes;
  1353. DiagnosisStatusEnum diagnosisStatus;
  1354. List<DiagnosisInfoDTO >? diagnosisInfos;
  1355. RecordInfoDTO({
  1356. this.recordCode,
  1357. this.patientCode,
  1358. this.deviceCode,
  1359. this.recordStatus = RecordStatusEnum.NotScanned,
  1360. this.creatorCode,
  1361. this.tags,
  1362. this.createType = RecordCreateTypeEnum.Reservation,
  1363. this.patientInfo,
  1364. this.patientInfoExtList,
  1365. this.devicePatientID,
  1366. this.patientType,
  1367. this.readUsers,
  1368. this.rootOrganizationCode,
  1369. this.organizationCode,
  1370. this.associatedExamCodes,
  1371. this.diagnosisStatus = DiagnosisStatusEnum.NotRequired,
  1372. this.diagnosisInfos,
  1373. DateTime? createTime,
  1374. DateTime? updateTime,
  1375. }) : super(
  1376. createTime: createTime,
  1377. updateTime: updateTime,
  1378. );
  1379. factory RecordInfoDTO.fromJson(Map<String, dynamic> map) {
  1380. return RecordInfoDTO(
  1381. recordCode: map['RecordCode'],
  1382. patientCode: map['PatientCode'],
  1383. deviceCode: map['DeviceCode'],
  1384. recordStatus: RecordStatusEnum.values.firstWhere((e) => e.index == map['RecordStatus']),
  1385. creatorCode: map['CreatorCode'],
  1386. tags: map['Tags'],
  1387. createType: RecordCreateTypeEnum.values.firstWhere((e) => e.index == map['CreateType']),
  1388. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1389. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  1390. devicePatientID: map['DevicePatientID'],
  1391. patientType: map['PatientType'],
  1392. readUsers: map['ReadUsers'] != null ? map['ReadUsers'].cast<String>().toList() : null,
  1393. rootOrganizationCode: map['RootOrganizationCode'],
  1394. organizationCode: map['OrganizationCode'],
  1395. associatedExamCodes: map['AssociatedExamCodes'] != null ? map['AssociatedExamCodes'].cast<String>().toList() : null,
  1396. diagnosisStatus: DiagnosisStatusEnum.values.firstWhere((e) => e.index == map['DiagnosisStatus']),
  1397. diagnosisInfos: map['DiagnosisInfos'] != null ? (map['DiagnosisInfos'] as List).map((e)=>DiagnosisInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1398. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1399. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1400. );
  1401. }
  1402. Map<String, dynamic> toJson() {
  1403. final map = super.toJson();
  1404. if(recordCode != null)
  1405. map['RecordCode'] = recordCode;
  1406. if(patientCode != null)
  1407. map['PatientCode'] = patientCode;
  1408. if(deviceCode != null)
  1409. map['DeviceCode'] = deviceCode;
  1410. map['RecordStatus'] = recordStatus.index;
  1411. if(creatorCode != null)
  1412. map['CreatorCode'] = creatorCode;
  1413. if(tags != null)
  1414. map['Tags'] = tags;
  1415. map['CreateType'] = createType.index;
  1416. if(patientInfo != null)
  1417. map['PatientInfo'] = patientInfo;
  1418. if(patientInfoExtList != null)
  1419. map['PatientInfoExtList'] = patientInfoExtList;
  1420. if(devicePatientID != null)
  1421. map['DevicePatientID'] = devicePatientID;
  1422. if(patientType != null)
  1423. map['PatientType'] = patientType;
  1424. if(readUsers != null)
  1425. map['ReadUsers'] = readUsers;
  1426. if(rootOrganizationCode != null)
  1427. map['RootOrganizationCode'] = rootOrganizationCode;
  1428. if(organizationCode != null)
  1429. map['OrganizationCode'] = organizationCode;
  1430. if(associatedExamCodes != null)
  1431. map['AssociatedExamCodes'] = associatedExamCodes;
  1432. map['DiagnosisStatus'] = diagnosisStatus.index;
  1433. if(diagnosisInfos != null)
  1434. map['DiagnosisInfos'] = diagnosisInfos;
  1435. return map;
  1436. }
  1437. }
  1438. class RecordData {
  1439. String? patientName;
  1440. String? patientCode;
  1441. List<RecordInfoDTO >? recordItemList;
  1442. RecordData({
  1443. this.patientName,
  1444. this.patientCode,
  1445. this.recordItemList,
  1446. });
  1447. factory RecordData.fromJson(Map<String, dynamic> map) {
  1448. return RecordData(
  1449. patientName: map['PatientName'],
  1450. patientCode: map['PatientCode'],
  1451. recordItemList: map['RecordItemList'] != null ? (map['RecordItemList'] as List).map((e)=>RecordInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1452. );
  1453. }
  1454. Map<String, dynamic> toJson() {
  1455. final map = Map<String, dynamic>();
  1456. if(patientName != null)
  1457. map['PatientName'] = patientName;
  1458. if(patientCode != null)
  1459. map['PatientCode'] = patientCode;
  1460. if(recordItemList != null)
  1461. map['RecordItemList'] = recordItemList;
  1462. return map;
  1463. }
  1464. }
  1465. class ReportItem {
  1466. String? recordCode;
  1467. String? fileToken;
  1468. ReportItem({
  1469. this.recordCode,
  1470. this.fileToken,
  1471. });
  1472. factory ReportItem.fromJson(Map<String, dynamic> map) {
  1473. return ReportItem(
  1474. recordCode: map['RecordCode'],
  1475. fileToken: map['FileToken'],
  1476. );
  1477. }
  1478. Map<String, dynamic> toJson() {
  1479. final map = Map<String, dynamic>();
  1480. if(recordCode != null)
  1481. map['RecordCode'] = recordCode;
  1482. if(fileToken != null)
  1483. map['FileToken'] = fileToken;
  1484. return map;
  1485. }
  1486. }
  1487. class ReportData {
  1488. String? patientName;
  1489. String? patientCode;
  1490. List<ReportItem >? reportItemList;
  1491. ReportData({
  1492. this.patientName,
  1493. this.patientCode,
  1494. this.reportItemList,
  1495. });
  1496. factory ReportData.fromJson(Map<String, dynamic> map) {
  1497. return ReportData(
  1498. patientName: map['PatientName'],
  1499. patientCode: map['PatientCode'],
  1500. reportItemList: map['ReportItemList'] != null ? (map['ReportItemList'] as List).map((e)=>ReportItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1501. );
  1502. }
  1503. Map<String, dynamic> toJson() {
  1504. final map = Map<String, dynamic>();
  1505. if(patientName != null)
  1506. map['PatientName'] = patientName;
  1507. if(patientCode != null)
  1508. map['PatientCode'] = patientCode;
  1509. if(reportItemList != null)
  1510. map['ReportItemList'] = reportItemList;
  1511. return map;
  1512. }
  1513. }
  1514. class RemedicalItem {
  1515. String? recordCode;
  1516. String? fileToken;
  1517. RemedicalFileDataTypeEnum fileDataType;
  1518. RemedicalItem({
  1519. this.recordCode,
  1520. this.fileToken,
  1521. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  1522. });
  1523. factory RemedicalItem.fromJson(Map<String, dynamic> map) {
  1524. return RemedicalItem(
  1525. recordCode: map['RecordCode'],
  1526. fileToken: map['FileToken'],
  1527. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  1528. );
  1529. }
  1530. Map<String, dynamic> toJson() {
  1531. final map = Map<String, dynamic>();
  1532. if(recordCode != null)
  1533. map['RecordCode'] = recordCode;
  1534. if(fileToken != null)
  1535. map['FileToken'] = fileToken;
  1536. map['FileDataType'] = fileDataType.index;
  1537. return map;
  1538. }
  1539. }
  1540. class RemedicalData {
  1541. String? patientName;
  1542. String? patientCode;
  1543. List<RemedicalItem >? remedicalItemList;
  1544. RemedicalData({
  1545. this.patientName,
  1546. this.patientCode,
  1547. this.remedicalItemList,
  1548. });
  1549. factory RemedicalData.fromJson(Map<String, dynamic> map) {
  1550. return RemedicalData(
  1551. patientName: map['PatientName'],
  1552. patientCode: map['PatientCode'],
  1553. remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItem.fromJson(e as Map<String,dynamic>)).toList() : null,
  1554. );
  1555. }
  1556. Map<String, dynamic> toJson() {
  1557. final map = Map<String, dynamic>();
  1558. if(patientName != null)
  1559. map['PatientName'] = patientName;
  1560. if(patientCode != null)
  1561. map['PatientCode'] = patientCode;
  1562. if(remedicalItemList != null)
  1563. map['RemedicalItemList'] = remedicalItemList;
  1564. return map;
  1565. }
  1566. }
  1567. class ExportRemedicalDataResult {
  1568. List<RecordData >? recordList;
  1569. List<ReportData >? reportList;
  1570. List<RemedicalData >? remedicalList;
  1571. ExportRemedicalDataResult({
  1572. this.recordList,
  1573. this.reportList,
  1574. this.remedicalList,
  1575. });
  1576. factory ExportRemedicalDataResult.fromJson(Map<String, dynamic> map) {
  1577. return ExportRemedicalDataResult(
  1578. recordList: map['RecordList'] != null ? (map['RecordList'] as List).map((e)=>RecordData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1579. reportList: map['ReportList'] != null ? (map['ReportList'] as List).map((e)=>ReportData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1580. remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalData.fromJson(e as Map<String,dynamic>)).toList() : null,
  1581. );
  1582. }
  1583. Map<String, dynamic> toJson() {
  1584. final map = Map<String, dynamic>();
  1585. if(recordList != null)
  1586. map['RecordList'] = recordList;
  1587. if(reportList != null)
  1588. map['ReportList'] = reportList;
  1589. if(remedicalList != null)
  1590. map['RemedicalList'] = remedicalList;
  1591. return map;
  1592. }
  1593. }
  1594. class ExportRemedicalDataRequest extends TokenRequest{
  1595. DateTime? startTime;
  1596. DateTime? endTime;
  1597. bool isExportReport;
  1598. bool isExportRecord;
  1599. bool isExportRemedicalData;
  1600. List<String >? patientCodes;
  1601. ExportRemedicalDataRequest({
  1602. this.startTime,
  1603. this.endTime,
  1604. this.isExportReport = false,
  1605. this.isExportRecord = false,
  1606. this.isExportRemedicalData = false,
  1607. this.patientCodes,
  1608. String? token,
  1609. }) : super(
  1610. token: token,
  1611. );
  1612. factory ExportRemedicalDataRequest.fromJson(Map<String, dynamic> map) {
  1613. return ExportRemedicalDataRequest(
  1614. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  1615. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  1616. isExportReport: map['IsExportReport'],
  1617. isExportRecord: map['IsExportRecord'],
  1618. isExportRemedicalData: map['IsExportRemedicalData'],
  1619. patientCodes: map['PatientCodes'] != null ? map['PatientCodes'].cast<String>().toList() : null,
  1620. token: map['Token'],
  1621. );
  1622. }
  1623. Map<String, dynamic> toJson() {
  1624. final map = super.toJson();
  1625. if(startTime != null)
  1626. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  1627. if(endTime != null)
  1628. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  1629. map['IsExportReport'] = isExportReport;
  1630. map['IsExportRecord'] = isExportRecord;
  1631. map['IsExportRemedicalData'] = isExportRemedicalData;
  1632. if(patientCodes != null)
  1633. map['PatientCodes'] = patientCodes;
  1634. return map;
  1635. }
  1636. }
  1637. class FindCacheByCodeRequest extends TokenRequest{
  1638. String? cacheCode;
  1639. FindCacheByCodeRequest({
  1640. this.cacheCode,
  1641. String? token,
  1642. }) : super(
  1643. token: token,
  1644. );
  1645. factory FindCacheByCodeRequest.fromJson(Map<String, dynamic> map) {
  1646. return FindCacheByCodeRequest(
  1647. cacheCode: map['CacheCode'],
  1648. token: map['Token'],
  1649. );
  1650. }
  1651. Map<String, dynamic> toJson() {
  1652. final map = super.toJson();
  1653. if(cacheCode != null)
  1654. map['CacheCode'] = cacheCode;
  1655. return map;
  1656. }
  1657. }
  1658. class CreateReferralRecordRequest extends TokenRequest{
  1659. String? patientCode;
  1660. String? subjectMatter;
  1661. String? referralOrganizationCode;
  1662. String? referralUserCode;
  1663. String? referralRecordCode;
  1664. CreateReferralRecordRequest({
  1665. this.patientCode,
  1666. this.subjectMatter,
  1667. this.referralOrganizationCode,
  1668. this.referralUserCode,
  1669. this.referralRecordCode,
  1670. String? token,
  1671. }) : super(
  1672. token: token,
  1673. );
  1674. factory CreateReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1675. return CreateReferralRecordRequest(
  1676. patientCode: map['PatientCode'],
  1677. subjectMatter: map['SubjectMatter'],
  1678. referralOrganizationCode: map['ReferralOrganizationCode'],
  1679. referralUserCode: map['ReferralUserCode'],
  1680. referralRecordCode: map['ReferralRecordCode'],
  1681. token: map['Token'],
  1682. );
  1683. }
  1684. Map<String, dynamic> toJson() {
  1685. final map = super.toJson();
  1686. if(patientCode != null)
  1687. map['PatientCode'] = patientCode;
  1688. if(subjectMatter != null)
  1689. map['SubjectMatter'] = subjectMatter;
  1690. if(referralOrganizationCode != null)
  1691. map['ReferralOrganizationCode'] = referralOrganizationCode;
  1692. if(referralUserCode != null)
  1693. map['ReferralUserCode'] = referralUserCode;
  1694. if(referralRecordCode != null)
  1695. map['ReferralRecordCode'] = referralRecordCode;
  1696. return map;
  1697. }
  1698. }
  1699. class ModifyReferralRecordRequest extends TokenRequest{
  1700. String? patientCode;
  1701. String? subjectMatter;
  1702. String? referralOrganizationCode;
  1703. String? referralUserCode;
  1704. String? referralRecordCode;
  1705. ModifyReferralRecordRequest({
  1706. this.patientCode,
  1707. this.subjectMatter,
  1708. this.referralOrganizationCode,
  1709. this.referralUserCode,
  1710. this.referralRecordCode,
  1711. String? token,
  1712. }) : super(
  1713. token: token,
  1714. );
  1715. factory ModifyReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1716. return ModifyReferralRecordRequest(
  1717. patientCode: map['PatientCode'],
  1718. subjectMatter: map['SubjectMatter'],
  1719. referralOrganizationCode: map['ReferralOrganizationCode'],
  1720. referralUserCode: map['ReferralUserCode'],
  1721. referralRecordCode: map['ReferralRecordCode'],
  1722. token: map['Token'],
  1723. );
  1724. }
  1725. Map<String, dynamic> toJson() {
  1726. final map = super.toJson();
  1727. if(patientCode != null)
  1728. map['PatientCode'] = patientCode;
  1729. if(subjectMatter != null)
  1730. map['SubjectMatter'] = subjectMatter;
  1731. if(referralOrganizationCode != null)
  1732. map['ReferralOrganizationCode'] = referralOrganizationCode;
  1733. if(referralUserCode != null)
  1734. map['ReferralUserCode'] = referralUserCode;
  1735. if(referralRecordCode != null)
  1736. map['ReferralRecordCode'] = referralRecordCode;
  1737. return map;
  1738. }
  1739. }
  1740. class QueryReferralRecordPageDTO extends ClientPatientInfoBaseDTO{
  1741. String? code;
  1742. String? outUserName;
  1743. String? inUserName;
  1744. QueryReferralRecordPageDTO({
  1745. this.code,
  1746. this.outUserName,
  1747. this.inUserName,
  1748. String? patientCode,
  1749. bool isValid = false,
  1750. List<DataItemDTO >? patientData,
  1751. int unReadRecordCount = 0,
  1752. bool isReferral = false,
  1753. DateTime? createTime,
  1754. DateTime? updateTime,
  1755. }) : super(
  1756. patientCode: patientCode,
  1757. isValid: isValid,
  1758. patientData: patientData,
  1759. unReadRecordCount: unReadRecordCount,
  1760. isReferral: isReferral,
  1761. createTime: createTime,
  1762. updateTime: updateTime,
  1763. );
  1764. factory QueryReferralRecordPageDTO.fromJson(Map<String, dynamic> map) {
  1765. return QueryReferralRecordPageDTO(
  1766. code: map['Code'],
  1767. outUserName: map['OutUserName'],
  1768. inUserName: map['InUserName'],
  1769. patientCode: map['PatientCode'],
  1770. isValid: map['IsValid'],
  1771. patientData: map['PatientData'] != null ? (map['PatientData'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  1772. unReadRecordCount: map['UnReadRecordCount'],
  1773. isReferral: map['IsReferral'],
  1774. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  1775. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  1776. );
  1777. }
  1778. Map<String, dynamic> toJson() {
  1779. final map = super.toJson();
  1780. if(code != null)
  1781. map['Code'] = code;
  1782. if(outUserName != null)
  1783. map['OutUserName'] = outUserName;
  1784. if(inUserName != null)
  1785. map['InUserName'] = inUserName;
  1786. return map;
  1787. }
  1788. }
  1789. class QueryReferralRecordListRequest extends PageRequest{
  1790. String? keyWord;
  1791. DateTime? startTime;
  1792. DateTime? endTime;
  1793. PatientValidStatusEnum isValid;
  1794. QueryReferralRecordListRequest({
  1795. this.keyWord,
  1796. this.startTime,
  1797. this.endTime,
  1798. this.isValid = PatientValidStatusEnum.All,
  1799. int pageIndex = 0,
  1800. int pageSize = 0,
  1801. String? token,
  1802. }) : super(
  1803. pageIndex: pageIndex,
  1804. pageSize: pageSize,
  1805. token: token,
  1806. );
  1807. factory QueryReferralRecordListRequest.fromJson(Map<String, dynamic> map) {
  1808. return QueryReferralRecordListRequest(
  1809. keyWord: map['KeyWord'],
  1810. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  1811. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  1812. isValid: PatientValidStatusEnum.values.firstWhere((e) => e.index == map['IsValid']),
  1813. pageIndex: map['PageIndex'],
  1814. pageSize: map['PageSize'],
  1815. token: map['Token'],
  1816. );
  1817. }
  1818. Map<String, dynamic> toJson() {
  1819. final map = super.toJson();
  1820. if(keyWord != null)
  1821. map['KeyWord'] = keyWord;
  1822. if(startTime != null)
  1823. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  1824. if(endTime != null)
  1825. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  1826. map['IsValid'] = isValid.index;
  1827. return map;
  1828. }
  1829. }
  1830. class AuditReferralRecordRequest extends TokenRequest{
  1831. String? referralRecordCode;
  1832. bool isReceive;
  1833. String? rejectReason;
  1834. AuditReferralRecordRequest({
  1835. this.referralRecordCode,
  1836. this.isReceive = false,
  1837. this.rejectReason,
  1838. String? token,
  1839. }) : super(
  1840. token: token,
  1841. );
  1842. factory AuditReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1843. return AuditReferralRecordRequest(
  1844. referralRecordCode: map['ReferralRecordCode'],
  1845. isReceive: map['IsReceive'],
  1846. rejectReason: map['RejectReason'],
  1847. token: map['Token'],
  1848. );
  1849. }
  1850. Map<String, dynamic> toJson() {
  1851. final map = super.toJson();
  1852. if(referralRecordCode != null)
  1853. map['ReferralRecordCode'] = referralRecordCode;
  1854. map['IsReceive'] = isReceive;
  1855. if(rejectReason != null)
  1856. map['RejectReason'] = rejectReason;
  1857. return map;
  1858. }
  1859. }
  1860. class WithdrawReferralRecordRequest extends TokenRequest{
  1861. String? referralRecordCode;
  1862. WithdrawReferralRecordRequest({
  1863. this.referralRecordCode,
  1864. String? token,
  1865. }) : super(
  1866. token: token,
  1867. );
  1868. factory WithdrawReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  1869. return WithdrawReferralRecordRequest(
  1870. referralRecordCode: map['ReferralRecordCode'],
  1871. token: map['Token'],
  1872. );
  1873. }
  1874. Map<String, dynamic> toJson() {
  1875. final map = super.toJson();
  1876. if(referralRecordCode != null)
  1877. map['ReferralRecordCode'] = referralRecordCode;
  1878. return map;
  1879. }
  1880. }
  1881. class ReferralOrganizationsQueryRequest extends TokenRequest{
  1882. String? keyword;
  1883. ReferralOrganizationsQueryRequest({
  1884. this.keyword,
  1885. String? token,
  1886. }) : super(
  1887. token: token,
  1888. );
  1889. factory ReferralOrganizationsQueryRequest.fromJson(Map<String, dynamic> map) {
  1890. return ReferralOrganizationsQueryRequest(
  1891. keyword: map['Keyword'],
  1892. token: map['Token'],
  1893. );
  1894. }
  1895. Map<String, dynamic> toJson() {
  1896. final map = super.toJson();
  1897. if(keyword != null)
  1898. map['Keyword'] = keyword;
  1899. return map;
  1900. }
  1901. }
  1902. class QueryReferralPatientByCodeRequest extends FindPatientByCodeRequest{
  1903. String? referralRecordCode;
  1904. QueryReferralPatientByCodeRequest({
  1905. this.referralRecordCode,
  1906. String? code,
  1907. String? token,
  1908. }) : super(
  1909. code: code,
  1910. token: token,
  1911. );
  1912. factory QueryReferralPatientByCodeRequest.fromJson(Map<String, dynamic> map) {
  1913. return QueryReferralPatientByCodeRequest(
  1914. referralRecordCode: map['ReferralRecordCode'],
  1915. code: map['Code'],
  1916. token: map['Token'],
  1917. );
  1918. }
  1919. Map<String, dynamic> toJson() {
  1920. final map = super.toJson();
  1921. if(referralRecordCode != null)
  1922. map['ReferralRecordCode'] = referralRecordCode;
  1923. return map;
  1924. }
  1925. }
  1926. class CreateReportClass {
  1927. String? referralCode;
  1928. String? creatorCode;
  1929. String? reportCode;
  1930. CreateReportClass({
  1931. this.referralCode,
  1932. this.creatorCode,
  1933. this.reportCode,
  1934. });
  1935. factory CreateReportClass.fromJson(Map<String, dynamic> map) {
  1936. return CreateReportClass(
  1937. referralCode: map['ReferralCode'],
  1938. creatorCode: map['CreatorCode'],
  1939. reportCode: map['ReportCode'],
  1940. );
  1941. }
  1942. Map<String, dynamic> toJson() {
  1943. final map = Map<String, dynamic>();
  1944. if(referralCode != null)
  1945. map['ReferralCode'] = referralCode;
  1946. if(creatorCode != null)
  1947. map['CreatorCode'] = creatorCode;
  1948. if(reportCode != null)
  1949. map['ReportCode'] = reportCode;
  1950. return map;
  1951. }
  1952. }
  1953. class ReferralRecordDTO extends BaseDTO{
  1954. String? code;
  1955. String? patientCode;
  1956. DateTime? referralOutTime;
  1957. String? referralOutOrganizationCode;
  1958. String? subjectMatter;
  1959. String? creator;
  1960. String? referralInOrganizationCode;
  1961. String? referralInUserCode;
  1962. ReferralStatusEnum referralStatus;
  1963. String? rejectReason;
  1964. List<String >? referralCodeList;
  1965. PatientInfoDTO? patientInfo;
  1966. List<String >? recordCodeList;
  1967. List<String >? reportCodeList;
  1968. List<String >? remedicalDataCodeList;
  1969. List<CreateReportClass >? createReportCodeList;
  1970. ReferralRecordDTO({
  1971. this.code,
  1972. this.patientCode,
  1973. this.referralOutTime,
  1974. this.referralOutOrganizationCode,
  1975. this.subjectMatter,
  1976. this.creator,
  1977. this.referralInOrganizationCode,
  1978. this.referralInUserCode,
  1979. this.referralStatus = ReferralStatusEnum.Wait,
  1980. this.rejectReason,
  1981. this.referralCodeList,
  1982. this.patientInfo,
  1983. this.recordCodeList,
  1984. this.reportCodeList,
  1985. this.remedicalDataCodeList,
  1986. this.createReportCodeList,
  1987. DateTime? createTime,
  1988. DateTime? updateTime,
  1989. }) : super(
  1990. createTime: createTime,
  1991. updateTime: updateTime,
  1992. );
  1993. factory ReferralRecordDTO.fromJson(Map<String, dynamic> map) {
  1994. return ReferralRecordDTO(
  1995. code: map['Code'],
  1996. patientCode: map['PatientCode'],
  1997. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  1998. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  1999. subjectMatter: map['SubjectMatter'],
  2000. creator: map['Creator'],
  2001. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2002. referralInUserCode: map['ReferralInUserCode'],
  2003. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2004. rejectReason: map['RejectReason'],
  2005. referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
  2006. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2007. recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
  2008. reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
  2009. remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
  2010. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2011. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2012. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2013. );
  2014. }
  2015. Map<String, dynamic> toJson() {
  2016. final map = super.toJson();
  2017. if(code != null)
  2018. map['Code'] = code;
  2019. if(patientCode != null)
  2020. map['PatientCode'] = patientCode;
  2021. if(referralOutTime != null)
  2022. map['ReferralOutTime'] = JsonRpcUtils.dateFormat(referralOutTime!);
  2023. if(referralOutOrganizationCode != null)
  2024. map['ReferralOutOrganizationCode'] = referralOutOrganizationCode;
  2025. if(subjectMatter != null)
  2026. map['SubjectMatter'] = subjectMatter;
  2027. if(creator != null)
  2028. map['Creator'] = creator;
  2029. if(referralInOrganizationCode != null)
  2030. map['ReferralInOrganizationCode'] = referralInOrganizationCode;
  2031. if(referralInUserCode != null)
  2032. map['ReferralInUserCode'] = referralInUserCode;
  2033. map['ReferralStatus'] = referralStatus.index;
  2034. if(rejectReason != null)
  2035. map['RejectReason'] = rejectReason;
  2036. if(referralCodeList != null)
  2037. map['ReferralCodeList'] = referralCodeList;
  2038. if(patientInfo != null)
  2039. map['PatientInfo'] = patientInfo;
  2040. if(recordCodeList != null)
  2041. map['RecordCodeList'] = recordCodeList;
  2042. if(reportCodeList != null)
  2043. map['ReportCodeList'] = reportCodeList;
  2044. if(remedicalDataCodeList != null)
  2045. map['RemedicalDataCodeList'] = remedicalDataCodeList;
  2046. if(createReportCodeList != null)
  2047. map['CreateReportCodeList'] = createReportCodeList;
  2048. return map;
  2049. }
  2050. }
  2051. class ReferralRecordDetailDTO extends ReferralRecordDTO{
  2052. String? referralOutOrganizationName;
  2053. String? creatorName;
  2054. String? referralInOrganizationName;
  2055. String? referralInUserName;
  2056. ReferralRecordDetailDTO({
  2057. this.referralOutOrganizationName,
  2058. this.creatorName,
  2059. this.referralInOrganizationName,
  2060. this.referralInUserName,
  2061. String? code,
  2062. String? patientCode,
  2063. DateTime? referralOutTime,
  2064. String? referralOutOrganizationCode,
  2065. String? subjectMatter,
  2066. String? creator,
  2067. String? referralInOrganizationCode,
  2068. String? referralInUserCode,
  2069. ReferralStatusEnum referralStatus = ReferralStatusEnum.Wait,
  2070. String? rejectReason,
  2071. List<String >? referralCodeList,
  2072. PatientInfoDTO? patientInfo,
  2073. List<String >? recordCodeList,
  2074. List<String >? reportCodeList,
  2075. List<String >? remedicalDataCodeList,
  2076. List<CreateReportClass >? createReportCodeList,
  2077. DateTime? createTime,
  2078. DateTime? updateTime,
  2079. }) : super(
  2080. code: code,
  2081. patientCode: patientCode,
  2082. referralOutTime: referralOutTime,
  2083. referralOutOrganizationCode: referralOutOrganizationCode,
  2084. subjectMatter: subjectMatter,
  2085. creator: creator,
  2086. referralInOrganizationCode: referralInOrganizationCode,
  2087. referralInUserCode: referralInUserCode,
  2088. referralStatus: referralStatus,
  2089. rejectReason: rejectReason,
  2090. referralCodeList: referralCodeList,
  2091. patientInfo: patientInfo,
  2092. recordCodeList: recordCodeList,
  2093. reportCodeList: reportCodeList,
  2094. remedicalDataCodeList: remedicalDataCodeList,
  2095. createReportCodeList: createReportCodeList,
  2096. createTime: createTime,
  2097. updateTime: updateTime,
  2098. );
  2099. factory ReferralRecordDetailDTO.fromJson(Map<String, dynamic> map) {
  2100. return ReferralRecordDetailDTO(
  2101. referralOutOrganizationName: map['ReferralOutOrganizationName'],
  2102. creatorName: map['CreatorName'],
  2103. referralInOrganizationName: map['ReferralInOrganizationName'],
  2104. referralInUserName: map['ReferralInUserName'],
  2105. code: map['Code'],
  2106. patientCode: map['PatientCode'],
  2107. referralOutTime: map['ReferralOutTime'] != null ? DateTime.parse(map['ReferralOutTime']) : null,
  2108. referralOutOrganizationCode: map['ReferralOutOrganizationCode'],
  2109. subjectMatter: map['SubjectMatter'],
  2110. creator: map['Creator'],
  2111. referralInOrganizationCode: map['ReferralInOrganizationCode'],
  2112. referralInUserCode: map['ReferralInUserCode'],
  2113. referralStatus: ReferralStatusEnum.values.firstWhere((e) => e.index == map['ReferralStatus']),
  2114. rejectReason: map['RejectReason'],
  2115. referralCodeList: map['ReferralCodeList'] != null ? map['ReferralCodeList'].cast<String>().toList() : null,
  2116. patientInfo: map['PatientInfo'] != null ? PatientInfoDTO.fromJson(map['PatientInfo']) : null,
  2117. recordCodeList: map['RecordCodeList'] != null ? map['RecordCodeList'].cast<String>().toList() : null,
  2118. reportCodeList: map['ReportCodeList'] != null ? map['ReportCodeList'].cast<String>().toList() : null,
  2119. remedicalDataCodeList: map['RemedicalDataCodeList'] != null ? map['RemedicalDataCodeList'].cast<String>().toList() : null,
  2120. createReportCodeList: map['CreateReportCodeList'] != null ? (map['CreateReportCodeList'] as List).map((e)=>CreateReportClass.fromJson(e as Map<String,dynamic>)).toList() : null,
  2121. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2122. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2123. );
  2124. }
  2125. Map<String, dynamic> toJson() {
  2126. final map = super.toJson();
  2127. if(referralOutOrganizationName != null)
  2128. map['ReferralOutOrganizationName'] = referralOutOrganizationName;
  2129. if(creatorName != null)
  2130. map['CreatorName'] = creatorName;
  2131. if(referralInOrganizationName != null)
  2132. map['ReferralInOrganizationName'] = referralInOrganizationName;
  2133. if(referralInUserName != null)
  2134. map['ReferralInUserName'] = referralInUserName;
  2135. return map;
  2136. }
  2137. }
  2138. class FindPatientReferralRecordRequest extends TokenRequest{
  2139. String? patientCode;
  2140. FindPatientReferralRecordRequest({
  2141. this.patientCode,
  2142. String? token,
  2143. }) : super(
  2144. token: token,
  2145. );
  2146. factory FindPatientReferralRecordRequest.fromJson(Map<String, dynamic> map) {
  2147. return FindPatientReferralRecordRequest(
  2148. patientCode: map['PatientCode'],
  2149. token: map['Token'],
  2150. );
  2151. }
  2152. Map<String, dynamic> toJson() {
  2153. final map = super.toJson();
  2154. if(patientCode != null)
  2155. map['PatientCode'] = patientCode;
  2156. return map;
  2157. }
  2158. }
  2159. class FindReferralInRecordRequest extends TokenRequest{
  2160. String? referralRecordCode;
  2161. FindReferralInRecordRequest({
  2162. this.referralRecordCode,
  2163. String? token,
  2164. }) : super(
  2165. token: token,
  2166. );
  2167. factory FindReferralInRecordRequest.fromJson(Map<String, dynamic> map) {
  2168. return FindReferralInRecordRequest(
  2169. referralRecordCode: map['ReferralRecordCode'],
  2170. token: map['Token'],
  2171. );
  2172. }
  2173. Map<String, dynamic> toJson() {
  2174. final map = super.toJson();
  2175. if(referralRecordCode != null)
  2176. map['ReferralRecordCode'] = referralRecordCode;
  2177. return map;
  2178. }
  2179. }
  2180. class QueryReferralRecordsPageRequest extends GetRecordsPageRequest{
  2181. String? referralRecordCode;
  2182. QueryReferralRecordsPageRequest({
  2183. this.referralRecordCode,
  2184. String? patientCode,
  2185. QueryRecordStatusEnum queryRecordStatus = QueryRecordStatusEnum.All,
  2186. QueryRecordCreateTypeEnum queryRecordCreateType = QueryRecordCreateTypeEnum.All,
  2187. int pageIndex = 0,
  2188. int pageSize = 0,
  2189. String? token,
  2190. }) : super(
  2191. patientCode: patientCode,
  2192. queryRecordStatus: queryRecordStatus,
  2193. queryRecordCreateType: queryRecordCreateType,
  2194. pageIndex: pageIndex,
  2195. pageSize: pageSize,
  2196. token: token,
  2197. );
  2198. factory QueryReferralRecordsPageRequest.fromJson(Map<String, dynamic> map) {
  2199. return QueryReferralRecordsPageRequest(
  2200. referralRecordCode: map['ReferralRecordCode'],
  2201. patientCode: map['PatientCode'],
  2202. queryRecordStatus: QueryRecordStatusEnum.values.firstWhere((e) => e.index == map['QueryRecordStatus']),
  2203. queryRecordCreateType: QueryRecordCreateTypeEnum.values.firstWhere((e) => e.index == map['QueryRecordCreateType']),
  2204. pageIndex: map['PageIndex'],
  2205. pageSize: map['PageSize'],
  2206. token: map['Token'],
  2207. );
  2208. }
  2209. Map<String, dynamic> toJson() {
  2210. final map = super.toJson();
  2211. if(referralRecordCode != null)
  2212. map['ReferralRecordCode'] = referralRecordCode;
  2213. return map;
  2214. }
  2215. }
  2216. enum UploadFileTypeEnum {
  2217. Unknown,
  2218. EXE,
  2219. APK,
  2220. IPA,
  2221. ZIP,
  2222. DAT,
  2223. RAR,
  2224. PNG,
  2225. ICON,
  2226. BMP,
  2227. JPEG,
  2228. JPG,
  2229. GIF,
  2230. WEBP,
  2231. TIFF,
  2232. IMG,
  2233. PDF,
  2234. DOC,
  2235. DOCX,
  2236. XLS,
  2237. XLSX,
  2238. MP4,
  2239. MSI,
  2240. VID,
  2241. }
  2242. class ReportPreviewDTO {
  2243. String? fileToken;
  2244. String? thumbnailToken;
  2245. String? language;
  2246. UploadFileTypeEnum fileType;
  2247. ReportPreviewDTO({
  2248. this.fileToken,
  2249. this.thumbnailToken,
  2250. this.language,
  2251. this.fileType = UploadFileTypeEnum.Unknown,
  2252. });
  2253. factory ReportPreviewDTO.fromJson(Map<String, dynamic> map) {
  2254. return ReportPreviewDTO(
  2255. fileToken: map['FileToken'],
  2256. thumbnailToken: map['ThumbnailToken'],
  2257. language: map['Language'],
  2258. fileType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FileType']),
  2259. );
  2260. }
  2261. Map<String, dynamic> toJson() {
  2262. final map = Map<String, dynamic>();
  2263. if(fileToken != null)
  2264. map['FileToken'] = fileToken;
  2265. if(thumbnailToken != null)
  2266. map['ThumbnailToken'] = thumbnailToken;
  2267. if(language != null)
  2268. map['Language'] = language;
  2269. map['FileType'] = fileType.index;
  2270. return map;
  2271. }
  2272. }
  2273. class ReportBaseDTO extends BaseDTO{
  2274. String? reportCode;
  2275. String? recordCode;
  2276. String? reportUserCode;
  2277. String? deviceCode;
  2278. String? patientCode;
  2279. String? patientId;
  2280. String? patientName;
  2281. List<String >? reportLabels;
  2282. List<String >? platformLabels;
  2283. List<String >? diagnosisLabels;
  2284. DiagnosisOrganEnum reportOrgan;
  2285. DateTime? reportTime;
  2286. String? reportUserName;
  2287. List<ReportPreviewDTO >? reportPreviewList;
  2288. String? referralRecordCode;
  2289. ReportBaseDTO({
  2290. this.reportCode,
  2291. this.recordCode,
  2292. this.reportUserCode,
  2293. this.deviceCode,
  2294. this.patientCode,
  2295. this.patientId,
  2296. this.patientName,
  2297. this.reportLabels,
  2298. this.platformLabels,
  2299. this.diagnosisLabels,
  2300. this.reportOrgan = DiagnosisOrganEnum.Null,
  2301. this.reportTime,
  2302. this.reportUserName,
  2303. this.reportPreviewList,
  2304. this.referralRecordCode,
  2305. DateTime? createTime,
  2306. DateTime? updateTime,
  2307. }) : super(
  2308. createTime: createTime,
  2309. updateTime: updateTime,
  2310. );
  2311. factory ReportBaseDTO.fromJson(Map<String, dynamic> map) {
  2312. return ReportBaseDTO(
  2313. reportCode: map['ReportCode'],
  2314. recordCode: map['RecordCode'],
  2315. reportUserCode: map['ReportUserCode'],
  2316. deviceCode: map['DeviceCode'],
  2317. patientCode: map['PatientCode'],
  2318. patientId: map['PatientId'],
  2319. patientName: map['PatientName'],
  2320. reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
  2321. platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
  2322. diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
  2323. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2324. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2325. reportUserName: map['ReportUserName'],
  2326. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2327. referralRecordCode: map['ReferralRecordCode'],
  2328. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2329. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2330. );
  2331. }
  2332. Map<String, dynamic> toJson() {
  2333. final map = super.toJson();
  2334. if(reportCode != null)
  2335. map['ReportCode'] = reportCode;
  2336. if(recordCode != null)
  2337. map['RecordCode'] = recordCode;
  2338. if(reportUserCode != null)
  2339. map['ReportUserCode'] = reportUserCode;
  2340. if(deviceCode != null)
  2341. map['DeviceCode'] = deviceCode;
  2342. if(patientCode != null)
  2343. map['PatientCode'] = patientCode;
  2344. if(patientId != null)
  2345. map['PatientId'] = patientId;
  2346. if(patientName != null)
  2347. map['PatientName'] = patientName;
  2348. if(reportLabels != null)
  2349. map['ReportLabels'] = reportLabels;
  2350. if(platformLabels != null)
  2351. map['PlatformLabels'] = platformLabels;
  2352. if(diagnosisLabels != null)
  2353. map['DiagnosisLabels'] = diagnosisLabels;
  2354. map['ReportOrgan'] = reportOrgan.index;
  2355. if(reportTime != null)
  2356. map['ReportTime'] = JsonRpcUtils.dateFormat(reportTime!);
  2357. if(reportUserName != null)
  2358. map['ReportUserName'] = reportUserName;
  2359. if(reportPreviewList != null)
  2360. map['ReportPreviewList'] = reportPreviewList;
  2361. if(referralRecordCode != null)
  2362. map['ReferralRecordCode'] = referralRecordCode;
  2363. return map;
  2364. }
  2365. }
  2366. class ReportDTO extends ReportBaseDTO{
  2367. String? reportTemplateJson;
  2368. String? reportDatasJson;
  2369. String? encryptPatientName;
  2370. bool canEditReport;
  2371. ReportDTO({
  2372. this.reportTemplateJson,
  2373. this.reportDatasJson,
  2374. this.encryptPatientName,
  2375. this.canEditReport = false,
  2376. String? reportCode,
  2377. String? recordCode,
  2378. String? reportUserCode,
  2379. String? deviceCode,
  2380. String? patientCode,
  2381. String? patientId,
  2382. String? patientName,
  2383. List<String >? reportLabels,
  2384. List<String >? platformLabels,
  2385. List<String >? diagnosisLabels,
  2386. DiagnosisOrganEnum reportOrgan = DiagnosisOrganEnum.Null,
  2387. DateTime? reportTime,
  2388. String? reportUserName,
  2389. List<ReportPreviewDTO >? reportPreviewList,
  2390. String? referralRecordCode,
  2391. DateTime? createTime,
  2392. DateTime? updateTime,
  2393. }) : super(
  2394. reportCode: reportCode,
  2395. recordCode: recordCode,
  2396. reportUserCode: reportUserCode,
  2397. deviceCode: deviceCode,
  2398. patientCode: patientCode,
  2399. patientId: patientId,
  2400. patientName: patientName,
  2401. reportLabels: reportLabels,
  2402. platformLabels: platformLabels,
  2403. diagnosisLabels: diagnosisLabels,
  2404. reportOrgan: reportOrgan,
  2405. reportTime: reportTime,
  2406. reportUserName: reportUserName,
  2407. reportPreviewList: reportPreviewList,
  2408. referralRecordCode: referralRecordCode,
  2409. createTime: createTime,
  2410. updateTime: updateTime,
  2411. );
  2412. factory ReportDTO.fromJson(Map<String, dynamic> map) {
  2413. return ReportDTO(
  2414. reportTemplateJson: map['ReportTemplateJson'],
  2415. reportDatasJson: map['ReportDatasJson'],
  2416. encryptPatientName: map['EncryptPatientName'],
  2417. canEditReport: map['CanEditReport'],
  2418. reportCode: map['ReportCode'],
  2419. recordCode: map['RecordCode'],
  2420. reportUserCode: map['ReportUserCode'],
  2421. deviceCode: map['DeviceCode'],
  2422. patientCode: map['PatientCode'],
  2423. patientId: map['PatientId'],
  2424. patientName: map['PatientName'],
  2425. reportLabels: map['ReportLabels'] != null ? map['ReportLabels'].cast<String>().toList() : null,
  2426. platformLabels: map['PlatformLabels'] != null ? map['PlatformLabels'].cast<String>().toList() : null,
  2427. diagnosisLabels: map['DiagnosisLabels'] != null ? map['DiagnosisLabels'].cast<String>().toList() : null,
  2428. reportOrgan: DiagnosisOrganEnum.values.firstWhere((e) => e.index == map['ReportOrgan']),
  2429. reportTime: map['ReportTime'] != null ? DateTime.parse(map['ReportTime']) : null,
  2430. reportUserName: map['ReportUserName'],
  2431. reportPreviewList: map['ReportPreviewList'] != null ? (map['ReportPreviewList'] as List).map((e)=>ReportPreviewDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  2432. referralRecordCode: map['ReferralRecordCode'],
  2433. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  2434. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  2435. );
  2436. }
  2437. Map<String, dynamic> toJson() {
  2438. final map = super.toJson();
  2439. if(reportTemplateJson != null)
  2440. map['ReportTemplateJson'] = reportTemplateJson;
  2441. if(reportDatasJson != null)
  2442. map['ReportDatasJson'] = reportDatasJson;
  2443. if(encryptPatientName != null)
  2444. map['EncryptPatientName'] = encryptPatientName;
  2445. map['CanEditReport'] = canEditReport;
  2446. return map;
  2447. }
  2448. }
  2449. class FindExamReportsRequest extends TokenRequest{
  2450. String? recordCode;
  2451. FindExamReportsRequest({
  2452. this.recordCode,
  2453. String? token,
  2454. }) : super(
  2455. token: token,
  2456. );
  2457. factory FindExamReportsRequest.fromJson(Map<String, dynamic> map) {
  2458. return FindExamReportsRequest(
  2459. recordCode: map['RecordCode'],
  2460. token: map['Token'],
  2461. );
  2462. }
  2463. Map<String, dynamic> toJson() {
  2464. final map = super.toJson();
  2465. if(recordCode != null)
  2466. map['RecordCode'] = recordCode;
  2467. return map;
  2468. }
  2469. }
  2470. class QueryReferralExamReportRequest extends FindExamReportsRequest{
  2471. String? referralRecordCode;
  2472. QueryReferralExamReportRequest({
  2473. this.referralRecordCode,
  2474. String? recordCode,
  2475. String? token,
  2476. }) : super(
  2477. recordCode: recordCode,
  2478. token: token,
  2479. );
  2480. factory QueryReferralExamReportRequest.fromJson(Map<String, dynamic> map) {
  2481. return QueryReferralExamReportRequest(
  2482. referralRecordCode: map['ReferralRecordCode'],
  2483. recordCode: map['RecordCode'],
  2484. token: map['Token'],
  2485. );
  2486. }
  2487. Map<String, dynamic> toJson() {
  2488. final map = super.toJson();
  2489. if(referralRecordCode != null)
  2490. map['ReferralRecordCode'] = referralRecordCode;
  2491. return map;
  2492. }
  2493. }
  2494. class QueryShareExamPageResult {
  2495. String? shareExamPageUrl;
  2496. QueryShareExamPageResult({
  2497. this.shareExamPageUrl,
  2498. });
  2499. factory QueryShareExamPageResult.fromJson(Map<String, dynamic> map) {
  2500. return QueryShareExamPageResult(
  2501. shareExamPageUrl: map['ShareExamPageUrl'],
  2502. );
  2503. }
  2504. Map<String, dynamic> toJson() {
  2505. final map = Map<String, dynamic>();
  2506. if(shareExamPageUrl != null)
  2507. map['ShareExamPageUrl'] = shareExamPageUrl;
  2508. return map;
  2509. }
  2510. }
  2511. class QueryShareExamPageRequest extends TokenRequest{
  2512. String? examFileToken;
  2513. String? languageCode;
  2514. QueryShareExamPageRequest({
  2515. this.examFileToken,
  2516. this.languageCode,
  2517. String? token,
  2518. }) : super(
  2519. token: token,
  2520. );
  2521. factory QueryShareExamPageRequest.fromJson(Map<String, dynamic> map) {
  2522. return QueryShareExamPageRequest(
  2523. examFileToken: map['ExamFileToken'],
  2524. languageCode: map['LanguageCode'],
  2525. token: map['Token'],
  2526. );
  2527. }
  2528. Map<String, dynamic> toJson() {
  2529. final map = super.toJson();
  2530. if(examFileToken != null)
  2531. map['ExamFileToken'] = examFileToken;
  2532. if(languageCode != null)
  2533. map['LanguageCode'] = languageCode;
  2534. return map;
  2535. }
  2536. }