remedical.m.dart 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. import 'authentication.m.dart';
  2. import 'patient.m.dart';
  3. import 'recordInfo.m.dart';
  4. import 'connect.m.dart';
  5. import 'organization.m.dart';
  6. import 'package:fis_jsonrpc/utils.dart';
  7. class CreateExaminfoResult {
  8. String? examCode;
  9. CreateExaminfoResult({
  10. this.examCode,
  11. });
  12. factory CreateExaminfoResult.fromJson(Map<String, dynamic> map) {
  13. return CreateExaminfoResult(
  14. examCode: map['ExamCode'],
  15. );
  16. }
  17. Map<String, dynamic> toJson() {
  18. final map = Map<String, dynamic>();
  19. if(examCode != null)
  20. map['ExamCode'] = examCode;
  21. return map;
  22. }
  23. }
  24. class CreateExaminfoRequest extends TokenRequest{
  25. String? patientType;
  26. String? reservationCode;
  27. List<DataItemDTO>? patientInfo;
  28. List<PatientInfoExt>? patientScanInfoList;
  29. CreateExaminfoRequest({
  30. this.patientType,
  31. this.reservationCode,
  32. this.patientInfo,
  33. this.patientScanInfoList,
  34. String? token,
  35. }) : super(
  36. token: token,
  37. );
  38. factory CreateExaminfoRequest.fromJson(Map<String, dynamic> map) {
  39. return CreateExaminfoRequest(
  40. patientType: map['PatientType'],
  41. reservationCode: map['ReservationCode'],
  42. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  43. patientScanInfoList: map['PatientScanInfoList'] != null ? (map['PatientScanInfoList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  44. token: map['Token'],
  45. );
  46. }
  47. Map<String, dynamic> toJson() {
  48. final map = super.toJson();
  49. if(patientType != null)
  50. map['PatientType'] = patientType;
  51. if(reservationCode != null)
  52. map['ReservationCode'] = reservationCode;
  53. if(patientInfo != null)
  54. map['PatientInfo'] = patientInfo;
  55. if(patientScanInfoList != null)
  56. map['PatientScanInfoList'] = patientScanInfoList;
  57. return map;
  58. }
  59. }
  60. class UploadExamDataRequest extends TokenRequest{
  61. String? examCode;
  62. String? previewFileToken;
  63. String? fileToken;
  64. String? application;
  65. String? patientScanType;
  66. UploadExamDataRequest({
  67. this.examCode,
  68. this.previewFileToken,
  69. this.fileToken,
  70. this.application,
  71. this.patientScanType,
  72. String? token,
  73. }) : super(
  74. token: token,
  75. );
  76. factory UploadExamDataRequest.fromJson(Map<String, dynamic> map) {
  77. return UploadExamDataRequest(
  78. examCode: map['ExamCode'],
  79. previewFileToken: map['PreviewFileToken'],
  80. fileToken: map['FileToken'],
  81. application: map['Application'],
  82. patientScanType: map['PatientScanType'],
  83. token: map['Token'],
  84. );
  85. }
  86. Map<String, dynamic> toJson() {
  87. final map = super.toJson();
  88. if(examCode != null)
  89. map['ExamCode'] = examCode;
  90. if(previewFileToken != null)
  91. map['PreviewFileToken'] = previewFileToken;
  92. if(fileToken != null)
  93. map['FileToken'] = fileToken;
  94. if(application != null)
  95. map['Application'] = application;
  96. if(patientScanType != null)
  97. map['PatientScanType'] = patientScanType;
  98. return map;
  99. }
  100. }
  101. class TerminalImageDTO {
  102. String? previewUrl;
  103. String? imageUrl;
  104. TerminalImageDTO({
  105. this.previewUrl,
  106. this.imageUrl,
  107. });
  108. factory TerminalImageDTO.fromJson(Map<String, dynamic> map) {
  109. return TerminalImageDTO(
  110. previewUrl: map['PreviewUrl'],
  111. imageUrl: map['ImageUrl'],
  112. );
  113. }
  114. Map<String, dynamic> toJson() {
  115. final map = Map<String, dynamic>();
  116. if(previewUrl != null)
  117. map['PreviewUrl'] = previewUrl;
  118. if(imageUrl != null)
  119. map['ImageUrl'] = imageUrl;
  120. return map;
  121. }
  122. }
  123. enum RemedicalFileDataTypeEnum {
  124. VinnoVidSingle,
  125. ThirdVidSingle,
  126. VinnoVidMovie,
  127. ThirdVidMovie,
  128. Image,
  129. }
  130. enum RemedicalImageLocationTypeEnum {
  131. BreastImageLocation,
  132. LiverImageLocation,
  133. ThyroidImageLocation,
  134. PositionImageLocation,
  135. }
  136. enum RemedicalImagePositionTypeEnum {
  137. None,
  138. Left,
  139. Right,
  140. Middle,
  141. }
  142. enum RemedicalApparatusTypeEnum {
  143. BreastOuterUpper,
  144. BreastInnerUpper,
  145. BreastOuterLower,
  146. BreastInnerLower,
  147. Lobe,
  148. LobeOfUnder,
  149. LobeOfInter,
  150. Thyroid,
  151. Abdomen,
  152. }
  153. class ImageLocationDTO {
  154. RemedicalImageLocationTypeEnum imageLocationType;
  155. RemedicalImagePositionTypeEnum position;
  156. String? scanLocationName;
  157. RemedicalApparatusTypeEnum apparatusType;
  158. ImageLocationDTO({
  159. this.imageLocationType = RemedicalImageLocationTypeEnum.BreastImageLocation,
  160. this.position = RemedicalImagePositionTypeEnum.None,
  161. this.scanLocationName,
  162. this.apparatusType = RemedicalApparatusTypeEnum.BreastOuterUpper,
  163. });
  164. factory ImageLocationDTO.fromJson(Map<String, dynamic> map) {
  165. return ImageLocationDTO(
  166. imageLocationType: RemedicalImageLocationTypeEnum.values.firstWhere((e) => e.index == map['ImageLocationType']),
  167. position: RemedicalImagePositionTypeEnum.values.firstWhere((e) => e.index == map['Position']),
  168. scanLocationName: map['ScanLocationName'],
  169. apparatusType: RemedicalApparatusTypeEnum.values.firstWhere((e) => e.index == map['ApparatusType']),
  170. );
  171. }
  172. Map<String, dynamic> toJson() {
  173. final map = Map<String, dynamic>();
  174. map['ImageLocationType'] = imageLocationType.index;
  175. map['Position'] = position.index;
  176. if(scanLocationName != null)
  177. map['ScanLocationName'] = scanLocationName;
  178. map['ApparatusType'] = apparatusType.index;
  179. return map;
  180. }
  181. }
  182. enum RemedicalAIDiagnosisStatusEnum {
  183. Null,
  184. NoObviousLesion,
  185. Benign,
  186. Malignant,
  187. BenignAndMalignant,
  188. }
  189. class RemedicalInfoDTO extends BaseDTO{
  190. String? remedicalCode;
  191. String? patientCode;
  192. String? recordCode;
  193. String? patientScanType;
  194. String? application;
  195. TerminalImageDTO? terminalImages;
  196. RemedicalFileDataTypeEnum fileDataType;
  197. ImageLocationDTO? imageLocation;
  198. RemedicalAIDiagnosisStatusEnum aIDiagnosisStatus;
  199. RemedicalInfoDTO({
  200. this.remedicalCode,
  201. this.patientCode,
  202. this.recordCode,
  203. this.patientScanType,
  204. this.application,
  205. this.terminalImages,
  206. this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
  207. this.imageLocation,
  208. this.aIDiagnosisStatus = RemedicalAIDiagnosisStatusEnum.Null,
  209. DateTime? createTime,
  210. DateTime? updateTime,
  211. }) : super(
  212. createTime: createTime,
  213. updateTime: updateTime,
  214. );
  215. factory RemedicalInfoDTO.fromJson(Map<String, dynamic> map) {
  216. return RemedicalInfoDTO(
  217. remedicalCode: map['RemedicalCode'],
  218. patientCode: map['PatientCode'],
  219. recordCode: map['RecordCode'],
  220. patientScanType: map['PatientScanType'],
  221. application: map['Application'],
  222. terminalImages: map['TerminalImages'],
  223. fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
  224. imageLocation: map['ImageLocation'],
  225. aIDiagnosisStatus: RemedicalAIDiagnosisStatusEnum.values.firstWhere((e) => e.index == map['AIDiagnosisStatus']),
  226. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  227. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  228. );
  229. }
  230. Map<String, dynamic> toJson() {
  231. final map = super.toJson();
  232. if(remedicalCode != null)
  233. map['RemedicalCode'] = remedicalCode;
  234. if(patientCode != null)
  235. map['PatientCode'] = patientCode;
  236. if(recordCode != null)
  237. map['RecordCode'] = recordCode;
  238. if(patientScanType != null)
  239. map['PatientScanType'] = patientScanType;
  240. if(application != null)
  241. map['Application'] = application;
  242. if(terminalImages != null)
  243. map['TerminalImages'] = terminalImages;
  244. map['FileDataType'] = fileDataType.index;
  245. if(imageLocation != null)
  246. map['ImageLocation'] = imageLocation;
  247. map['AIDiagnosisStatus'] = aIDiagnosisStatus.index;
  248. return map;
  249. }
  250. }
  251. class RemedicalItemList {
  252. String? patientScanTypeDesc;
  253. List<RemedicalInfoDTO>? remedicalList;
  254. RemedicalItemList({
  255. this.patientScanTypeDesc,
  256. this.remedicalList,
  257. });
  258. factory RemedicalItemList.fromJson(Map<String, dynamic> map) {
  259. return RemedicalItemList(
  260. patientScanTypeDesc: map['PatientScanTypeDesc'],
  261. remedicalList: map['RemedicalList'] != null ? (map['RemedicalList'] as List).map((e)=>RemedicalInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  262. );
  263. }
  264. Map<String, dynamic> toJson() {
  265. final map = Map<String, dynamic>();
  266. if(patientScanTypeDesc != null)
  267. map['PatientScanTypeDesc'] = patientScanTypeDesc;
  268. if(remedicalList != null)
  269. map['RemedicalList'] = remedicalList;
  270. return map;
  271. }
  272. }
  273. class RemedicalListResult {
  274. String? sacnDate;
  275. String? recordCode;
  276. List<RemedicalItemList>? remedicalItemList;
  277. RemedicalListResult({
  278. this.sacnDate,
  279. this.recordCode,
  280. this.remedicalItemList,
  281. });
  282. factory RemedicalListResult.fromJson(Map<String, dynamic> map) {
  283. return RemedicalListResult(
  284. sacnDate: map['SacnDate'],
  285. recordCode: map['RecordCode'],
  286. remedicalItemList: map['RemedicalItemList'] != null ? (map['RemedicalItemList'] as List).map((e)=>RemedicalItemList.fromJson(e as Map<String,dynamic>)).toList() : null,
  287. );
  288. }
  289. Map<String, dynamic> toJson() {
  290. final map = Map<String, dynamic>();
  291. if(sacnDate != null)
  292. map['SacnDate'] = sacnDate;
  293. if(recordCode != null)
  294. map['RecordCode'] = recordCode;
  295. if(remedicalItemList != null)
  296. map['RemedicalItemList'] = remedicalItemList;
  297. return map;
  298. }
  299. }
  300. enum QueryDropdownListEnum {
  301. Org,
  302. }
  303. class QueryDropdownListReuqest extends TokenRequest{
  304. QueryDropdownListEnum queryType;
  305. String? queryValue;
  306. QueryDropdownListReuqest({
  307. this.queryType = QueryDropdownListEnum.Org,
  308. this.queryValue,
  309. String? token,
  310. }) : super(
  311. token: token,
  312. );
  313. factory QueryDropdownListReuqest.fromJson(Map<String, dynamic> map) {
  314. return QueryDropdownListReuqest(
  315. queryType: QueryDropdownListEnum.values.firstWhere((e) => e.index == map['QueryType']),
  316. queryValue: map['QueryValue'],
  317. token: map['Token'],
  318. );
  319. }
  320. Map<String, dynamic> toJson() {
  321. final map = super.toJson();
  322. map['QueryType'] = queryType.index;
  323. if(queryValue != null)
  324. map['QueryValue'] = queryValue;
  325. return map;
  326. }
  327. }
  328. class RservationResult {
  329. String? reservationCode;
  330. List<DataItemDTO>? patientInfo;
  331. List<PatientInfoExt>? patientInfoExtList;
  332. String? dataSource;
  333. RservationResult({
  334. this.reservationCode,
  335. this.patientInfo,
  336. this.patientInfoExtList,
  337. this.dataSource,
  338. });
  339. factory RservationResult.fromJson(Map<String, dynamic> map) {
  340. return RservationResult(
  341. reservationCode: map['ReservationCode'],
  342. patientInfo: map['PatientInfo'] != null ? (map['PatientInfo'] as List).map((e)=>DataItemDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
  343. patientInfoExtList: map['PatientInfoExtList'] != null ? (map['PatientInfoExtList'] as List).map((e)=>PatientInfoExt.fromJson(e as Map<String,dynamic>)).toList() : null,
  344. dataSource: map['DataSource'],
  345. );
  346. }
  347. Map<String, dynamic> toJson() {
  348. final map = Map<String, dynamic>();
  349. if(reservationCode != null)
  350. map['ReservationCode'] = reservationCode;
  351. if(patientInfo != null)
  352. map['PatientInfo'] = patientInfo;
  353. if(patientInfoExtList != null)
  354. map['PatientInfoExtList'] = patientInfoExtList;
  355. if(dataSource != null)
  356. map['DataSource'] = dataSource;
  357. return map;
  358. }
  359. }
  360. class QueryReservationResult {
  361. List<RservationResult>? reservationList;
  362. QueryReservationResult({
  363. this.reservationList,
  364. });
  365. factory QueryReservationResult.fromJson(Map<String, dynamic> map) {
  366. return QueryReservationResult(
  367. reservationList: map['ReservationList'] != null ? (map['ReservationList'] as List).map((e)=>RservationResult.fromJson(e as Map<String,dynamic>)).toList() : null,
  368. );
  369. }
  370. Map<String, dynamic> toJson() {
  371. final map = Map<String, dynamic>();
  372. if(reservationList != null)
  373. map['ReservationList'] = reservationList;
  374. return map;
  375. }
  376. }
  377. class QueryReservationRequest extends TokenRequest{
  378. DateTime? createTime;
  379. QueryReservationRequest({
  380. this.createTime,
  381. String? token,
  382. }) : super(
  383. token: token,
  384. );
  385. factory QueryReservationRequest.fromJson(Map<String, dynamic> map) {
  386. return QueryReservationRequest(
  387. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  388. token: map['Token'],
  389. );
  390. }
  391. Map<String, dynamic> toJson() {
  392. final map = super.toJson();
  393. if(createTime != null)
  394. map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
  395. return map;
  396. }
  397. }