vitalPatient.m.dart 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805
  1. import 'liveConsultation.m.dart';
  2. import 'vitalDiagnosis.m.dart';
  3. import 'vitalContractRecord.m.dart';
  4. import 'notification.m.dart';
  5. import 'device.m.dart';
  6. import 'package:fis_jsonrpc/utils.dart';
  7. class CreatePatientRequest2 extends TokenRequest{
  8. String? code;
  9. String? patientName;
  10. String? phone;
  11. String? cardNo;
  12. String? nationality;
  13. DateTime? birthday;
  14. List<String>? crowdLabels;
  15. CardTypeEnum cardType;
  16. GenderEnum patientGender;
  17. String? patientAddress;
  18. String? permanentResidenceAddress;
  19. String? teamRegionCode;
  20. String? contractedDoctor;
  21. CreatePatientRequest2({
  22. this.code,
  23. this.patientName,
  24. this.phone,
  25. this.cardNo,
  26. this.nationality,
  27. this.birthday,
  28. this.crowdLabels,
  29. this.cardType = CardTypeEnum.Identity,
  30. this.patientGender = GenderEnum.Unknown,
  31. this.patientAddress,
  32. this.permanentResidenceAddress,
  33. this.teamRegionCode,
  34. this.contractedDoctor,
  35. String? token,
  36. }) : super(
  37. token: token,
  38. );
  39. factory CreatePatientRequest2.fromJson(Map<String, dynamic> map) {
  40. return CreatePatientRequest2(
  41. code: map['Code'],
  42. patientName: map['PatientName'],
  43. phone: map['Phone'],
  44. cardNo: map['CardNo'],
  45. nationality: map['Nationality'],
  46. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  47. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  48. cardType: CardTypeEnum.values.firstWhere((e) => e.index == map['CardType']),
  49. patientGender: GenderEnum.values.firstWhere((e) => e.index == map['PatientGender']),
  50. patientAddress: map['PatientAddress'],
  51. permanentResidenceAddress: map['PermanentResidenceAddress'],
  52. teamRegionCode: map['TeamRegionCode'],
  53. contractedDoctor: map['ContractedDoctor'],
  54. token: map['Token'],
  55. );
  56. }
  57. Map<String, dynamic> toJson() {
  58. final map = super.toJson();
  59. if (code != null)
  60. map['Code'] = code;
  61. if (patientName != null)
  62. map['PatientName'] = patientName;
  63. if (phone != null)
  64. map['Phone'] = phone;
  65. if (cardNo != null)
  66. map['CardNo'] = cardNo;
  67. if (nationality != null)
  68. map['Nationality'] = nationality;
  69. if (birthday != null)
  70. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  71. if (crowdLabels != null)
  72. map['CrowdLabels'] = crowdLabels;
  73. map['CardType'] = cardType.index;
  74. map['PatientGender'] = patientGender.index;
  75. if (patientAddress != null)
  76. map['PatientAddress'] = patientAddress;
  77. if (permanentResidenceAddress != null)
  78. map['PermanentResidenceAddress'] = permanentResidenceAddress;
  79. if (teamRegionCode != null)
  80. map['TeamRegionCode'] = teamRegionCode;
  81. if (contractedDoctor != null)
  82. map['ContractedDoctor'] = contractedDoctor;
  83. return map;
  84. }
  85. }
  86. enum PatientStatusEnum {
  87. Created,
  88. Cancellation,
  89. }
  90. class PatientDTO extends BaseDTO{
  91. String? code;
  92. String? recordNo;
  93. String? patientName;
  94. String? phone;
  95. String? cardNo;
  96. String? nationality;
  97. DateTime? birthday;
  98. List<String>? crowdLabels;
  99. CardTypeEnum cardType;
  100. GenderEnum patientGender;
  101. String? patientAddress;
  102. String? permanentResidenceAddress;
  103. String? teamRegionCode;
  104. String? createdDoctor;
  105. String? contractedDoctor;
  106. List<String>? labelNames;
  107. String? createdDoctorName;
  108. String? createdOrgName;
  109. String? createdTeamName;
  110. PatientStatusEnum status;
  111. String? createdOrgCode;
  112. String? createdTeamCode;
  113. String? contractedDoctorName;
  114. ContractStateEnum contractState;
  115. List<String>? photos;
  116. PatientDTO({
  117. this.code,
  118. this.recordNo,
  119. this.patientName,
  120. this.phone,
  121. this.cardNo,
  122. this.nationality,
  123. this.birthday,
  124. this.crowdLabels,
  125. this.cardType = CardTypeEnum.Identity,
  126. this.patientGender = GenderEnum.Unknown,
  127. this.patientAddress,
  128. this.permanentResidenceAddress,
  129. this.teamRegionCode,
  130. this.createdDoctor,
  131. this.contractedDoctor,
  132. this.labelNames,
  133. this.createdDoctorName,
  134. this.createdOrgName,
  135. this.createdTeamName,
  136. this.status = PatientStatusEnum.Created,
  137. this.createdOrgCode,
  138. this.createdTeamCode,
  139. this.contractedDoctorName,
  140. this.contractState = ContractStateEnum.Unsigned,
  141. this.photos,
  142. DateTime? createTime,
  143. DateTime? updateTime,
  144. }) : super(
  145. createTime: createTime,
  146. updateTime: updateTime,
  147. );
  148. factory PatientDTO.fromJson(Map<String, dynamic> map) {
  149. return PatientDTO(
  150. code: map['Code'],
  151. recordNo: map['RecordNo'],
  152. patientName: map['PatientName'],
  153. phone: map['Phone'],
  154. cardNo: map['CardNo'],
  155. nationality: map['Nationality'],
  156. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  157. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  158. cardType: CardTypeEnum.values.firstWhere((e) => e.index == map['CardType']),
  159. patientGender: GenderEnum.values.firstWhere((e) => e.index == map['PatientGender']),
  160. patientAddress: map['PatientAddress'],
  161. permanentResidenceAddress: map['PermanentResidenceAddress'],
  162. teamRegionCode: map['TeamRegionCode'],
  163. createdDoctor: map['CreatedDoctor'],
  164. contractedDoctor: map['ContractedDoctor'],
  165. labelNames: map['LabelNames']?.cast<String>().toList(),
  166. createdDoctorName: map['CreatedDoctorName'],
  167. createdOrgName: map['CreatedOrgName'],
  168. createdTeamName: map['CreatedTeamName'],
  169. status: PatientStatusEnum.values.firstWhere((e) => e.index == map['Status']),
  170. createdOrgCode: map['CreatedOrgCode'],
  171. createdTeamCode: map['CreatedTeamCode'],
  172. contractedDoctorName: map['ContractedDoctorName'],
  173. contractState: ContractStateEnum.values.firstWhere((e) => e.index == map['ContractState']),
  174. photos: map['Photos']?.cast<String>().toList(),
  175. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  176. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  177. );
  178. }
  179. Map<String, dynamic> toJson() {
  180. final map = super.toJson();
  181. if (code != null)
  182. map['Code'] = code;
  183. if (recordNo != null)
  184. map['RecordNo'] = recordNo;
  185. if (patientName != null)
  186. map['PatientName'] = patientName;
  187. if (phone != null)
  188. map['Phone'] = phone;
  189. if (cardNo != null)
  190. map['CardNo'] = cardNo;
  191. if (nationality != null)
  192. map['Nationality'] = nationality;
  193. if (birthday != null)
  194. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  195. if (crowdLabels != null)
  196. map['CrowdLabels'] = crowdLabels;
  197. map['CardType'] = cardType.index;
  198. map['PatientGender'] = patientGender.index;
  199. if (patientAddress != null)
  200. map['PatientAddress'] = patientAddress;
  201. if (permanentResidenceAddress != null)
  202. map['PermanentResidenceAddress'] = permanentResidenceAddress;
  203. if (teamRegionCode != null)
  204. map['TeamRegionCode'] = teamRegionCode;
  205. if (createdDoctor != null)
  206. map['CreatedDoctor'] = createdDoctor;
  207. if (contractedDoctor != null)
  208. map['ContractedDoctor'] = contractedDoctor;
  209. if (labelNames != null)
  210. map['LabelNames'] = labelNames;
  211. if (createdDoctorName != null)
  212. map['CreatedDoctorName'] = createdDoctorName;
  213. if (createdOrgName != null)
  214. map['CreatedOrgName'] = createdOrgName;
  215. if (createdTeamName != null)
  216. map['CreatedTeamName'] = createdTeamName;
  217. map['Status'] = status.index;
  218. if (createdOrgCode != null)
  219. map['CreatedOrgCode'] = createdOrgCode;
  220. if (createdTeamCode != null)
  221. map['CreatedTeamCode'] = createdTeamCode;
  222. if (contractedDoctorName != null)
  223. map['ContractedDoctorName'] = contractedDoctorName;
  224. map['ContractState'] = contractState.index;
  225. if (photos != null)
  226. map['Photos'] = photos;
  227. return map;
  228. }
  229. }
  230. class GetPatientRequest extends TokenRequest{
  231. String? code;
  232. GetPatientRequest({
  233. this.code,
  234. String? token,
  235. }) : super(
  236. token: token,
  237. );
  238. factory GetPatientRequest.fromJson(Map<String, dynamic> map) {
  239. return GetPatientRequest(
  240. code: map['Code'],
  241. token: map['Token'],
  242. );
  243. }
  244. Map<String, dynamic> toJson() {
  245. final map = super.toJson();
  246. if (code != null)
  247. map['Code'] = code;
  248. return map;
  249. }
  250. }
  251. class GetPatientByKeyRequest extends TokenRequest{
  252. String? key;
  253. String? value;
  254. GetPatientByKeyRequest({
  255. this.key,
  256. this.value,
  257. String? token,
  258. }) : super(
  259. token: token,
  260. );
  261. factory GetPatientByKeyRequest.fromJson(Map<String, dynamic> map) {
  262. return GetPatientByKeyRequest(
  263. key: map['Key'],
  264. value: map['Value'],
  265. token: map['Token'],
  266. );
  267. }
  268. Map<String, dynamic> toJson() {
  269. final map = super.toJson();
  270. if (key != null)
  271. map['Key'] = key;
  272. if (value != null)
  273. map['Value'] = value;
  274. return map;
  275. }
  276. }
  277. class PatientPageRequest extends PageRequest{
  278. List<String>? crowdLabels;
  279. String? keyword;
  280. DateTime? startTime;
  281. DateTime? endTime;
  282. PatientPageRequest({
  283. this.crowdLabels,
  284. this.keyword,
  285. this.startTime,
  286. this.endTime,
  287. int pageIndex = 0,
  288. int pageSize = 0,
  289. String? token,
  290. }) : super(
  291. pageIndex: pageIndex,
  292. pageSize: pageSize,
  293. token: token,
  294. );
  295. factory PatientPageRequest.fromJson(Map<String, dynamic> map) {
  296. return PatientPageRequest(
  297. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  298. keyword: map['Keyword'],
  299. startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
  300. endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
  301. pageIndex: map['PageIndex'],
  302. pageSize: map['PageSize'],
  303. token: map['Token'],
  304. );
  305. }
  306. Map<String, dynamic> toJson() {
  307. final map = super.toJson();
  308. if (crowdLabels != null)
  309. map['CrowdLabels'] = crowdLabels;
  310. if (keyword != null)
  311. map['Keyword'] = keyword;
  312. if (startTime != null)
  313. map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
  314. if (endTime != null)
  315. map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
  316. return map;
  317. }
  318. }
  319. class RemovePatientRequest extends TokenRequest{
  320. String? code;
  321. RemovePatientRequest({
  322. this.code,
  323. String? token,
  324. }) : super(
  325. token: token,
  326. );
  327. factory RemovePatientRequest.fromJson(Map<String, dynamic> map) {
  328. return RemovePatientRequest(
  329. code: map['Code'],
  330. token: map['Token'],
  331. );
  332. }
  333. Map<String, dynamic> toJson() {
  334. final map = super.toJson();
  335. if (code != null)
  336. map['Code'] = code;
  337. return map;
  338. }
  339. }
  340. class GetPatientListRequest extends TokenRequest{
  341. List<String>? codes;
  342. GetPatientListRequest({
  343. this.codes,
  344. String? token,
  345. }) : super(
  346. token: token,
  347. );
  348. factory GetPatientListRequest.fromJson(Map<String, dynamic> map) {
  349. return GetPatientListRequest(
  350. codes: map['Codes']?.cast<String>().toList(),
  351. token: map['Token'],
  352. );
  353. }
  354. Map<String, dynamic> toJson() {
  355. final map = super.toJson();
  356. if (codes != null)
  357. map['Codes'] = codes;
  358. return map;
  359. }
  360. }
  361. class UpdatePatientRequest2 extends TokenRequest{
  362. String? code;
  363. String? patientName;
  364. String? phone;
  365. String? cardNo;
  366. String? nationality;
  367. DateTime? birthday;
  368. List<String>? crowdLabels;
  369. CardTypeEnum? cardType;
  370. GenderEnum? patientGender;
  371. String? patientAddress;
  372. String? permanentResidenceAddress;
  373. String? teamRegionCode;
  374. String? contractedDoctor;
  375. UpdatePatientRequest2({
  376. this.code,
  377. this.patientName,
  378. this.phone,
  379. this.cardNo,
  380. this.nationality,
  381. this.birthday,
  382. this.crowdLabels,
  383. this.cardType,
  384. this.patientGender,
  385. this.patientAddress,
  386. this.permanentResidenceAddress,
  387. this.teamRegionCode,
  388. this.contractedDoctor,
  389. String? token,
  390. }) : super(
  391. token: token,
  392. );
  393. factory UpdatePatientRequest2.fromJson(Map<String, dynamic> map) {
  394. return UpdatePatientRequest2(
  395. code: map['Code'],
  396. patientName: map['PatientName'],
  397. phone: map['Phone'],
  398. cardNo: map['CardNo'],
  399. nationality: map['Nationality'],
  400. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  401. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  402. cardType: map['CardType'] != null ? CardTypeEnum.values.firstWhere((e) => e.index == map['CardType']) : null,
  403. patientGender: map['PatientGender'] != null ? GenderEnum.values.firstWhere((e) => e.index == map['PatientGender']) : null,
  404. patientAddress: map['PatientAddress'],
  405. permanentResidenceAddress: map['PermanentResidenceAddress'],
  406. teamRegionCode: map['TeamRegionCode'],
  407. contractedDoctor: map['ContractedDoctor'],
  408. token: map['Token'],
  409. );
  410. }
  411. Map<String, dynamic> toJson() {
  412. final map = super.toJson();
  413. if (code != null)
  414. map['Code'] = code;
  415. if (patientName != null)
  416. map['PatientName'] = patientName;
  417. if (phone != null)
  418. map['Phone'] = phone;
  419. if (cardNo != null)
  420. map['CardNo'] = cardNo;
  421. if (nationality != null)
  422. map['Nationality'] = nationality;
  423. if (birthday != null)
  424. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  425. if (crowdLabels != null)
  426. map['CrowdLabels'] = crowdLabels;
  427. if (cardType != null)
  428. map['CardType'] = cardType;
  429. if (patientGender != null)
  430. map['PatientGender'] = patientGender;
  431. if (patientAddress != null)
  432. map['PatientAddress'] = patientAddress;
  433. if (permanentResidenceAddress != null)
  434. map['PermanentResidenceAddress'] = permanentResidenceAddress;
  435. if (teamRegionCode != null)
  436. map['TeamRegionCode'] = teamRegionCode;
  437. if (contractedDoctor != null)
  438. map['ContractedDoctor'] = contractedDoctor;
  439. return map;
  440. }
  441. }
  442. class SetCrowdLabelsRequest extends TokenRequest{
  443. String? code;
  444. List<String>? crowdLabels;
  445. SetCrowdLabelsRequest({
  446. this.code,
  447. this.crowdLabels,
  448. String? token,
  449. }) : super(
  450. token: token,
  451. );
  452. factory SetCrowdLabelsRequest.fromJson(Map<String, dynamic> map) {
  453. return SetCrowdLabelsRequest(
  454. code: map['Code'],
  455. crowdLabels: map['CrowdLabels']?.cast<String>().toList(),
  456. token: map['Token'],
  457. );
  458. }
  459. Map<String, dynamic> toJson() {
  460. final map = super.toJson();
  461. if (code != null)
  462. map['Code'] = code;
  463. if (crowdLabels != null)
  464. map['CrowdLabels'] = crowdLabels;
  465. return map;
  466. }
  467. }
  468. class UpdatePatientPhotosRequest extends TokenRequest{
  469. String? code;
  470. List<String>? photos;
  471. UpdatePatientPhotosRequest({
  472. this.code,
  473. this.photos,
  474. String? token,
  475. }) : super(
  476. token: token,
  477. );
  478. factory UpdatePatientPhotosRequest.fromJson(Map<String, dynamic> map) {
  479. return UpdatePatientPhotosRequest(
  480. code: map['Code'],
  481. photos: map['Photos']?.cast<String>().toList(),
  482. token: map['Token'],
  483. );
  484. }
  485. Map<String, dynamic> toJson() {
  486. final map = super.toJson();
  487. if (code != null)
  488. map['Code'] = code;
  489. if (photos != null)
  490. map['Photos'] = photos;
  491. return map;
  492. }
  493. }
  494. enum FaceScanErrorTypeEnum2 {
  495. Success,
  496. NoCreated,
  497. APIError,
  498. }
  499. class PatientBaseDTO {
  500. bool isSuccess;
  501. FaceScanErrorTypeEnum2 faceScanErrorType;
  502. String? errorMessage;
  503. String? cardNo;
  504. String? patientName;
  505. String? nationality;
  506. DateTime? birthday;
  507. GenderEnum patientGender;
  508. String? patientAddress;
  509. PatientBaseDTO({
  510. this.isSuccess = false,
  511. this.faceScanErrorType = FaceScanErrorTypeEnum2.Success,
  512. this.errorMessage,
  513. this.cardNo,
  514. this.patientName,
  515. this.nationality,
  516. this.birthday,
  517. this.patientGender = GenderEnum.Unknown,
  518. this.patientAddress,
  519. });
  520. factory PatientBaseDTO.fromJson(Map<String, dynamic> map) {
  521. return PatientBaseDTO(
  522. isSuccess: map['IsSuccess'],
  523. faceScanErrorType: FaceScanErrorTypeEnum2.values.firstWhere((e) => e.index == map['FaceScanErrorType']),
  524. errorMessage: map['ErrorMessage'],
  525. cardNo: map['CardNo'],
  526. patientName: map['PatientName'],
  527. nationality: map['Nationality'],
  528. birthday: map['Birthday'] != null ? DateTime.parse(map['Birthday']) : null,
  529. patientGender: GenderEnum.values.firstWhere((e) => e.index == map['PatientGender']),
  530. patientAddress: map['PatientAddress'],
  531. );
  532. }
  533. Map<String, dynamic> toJson() {
  534. final map = Map<String, dynamic>();
  535. map['IsSuccess'] = isSuccess;
  536. map['FaceScanErrorType'] = faceScanErrorType.index;
  537. if (errorMessage != null) {
  538. map['ErrorMessage'] = errorMessage;
  539. }
  540. if (cardNo != null) {
  541. map['CardNo'] = cardNo;
  542. }
  543. if (patientName != null) {
  544. map['PatientName'] = patientName;
  545. }
  546. if (nationality != null) {
  547. map['Nationality'] = nationality;
  548. }
  549. if (birthday != null) {
  550. map['Birthday'] = JsonRpcUtils.dateFormat(birthday!);
  551. }
  552. map['PatientGender'] = patientGender.index;
  553. if (patientAddress != null) {
  554. map['PatientAddress'] = patientAddress;
  555. }
  556. return map;
  557. }
  558. }
  559. class GetPatientBaseByImageRequest extends TokenRequest{
  560. String? image;
  561. GetPatientBaseByImageRequest({
  562. this.image,
  563. String? token,
  564. }) : super(
  565. token: token,
  566. );
  567. factory GetPatientBaseByImageRequest.fromJson(Map<String, dynamic> map) {
  568. return GetPatientBaseByImageRequest(
  569. image: map['Image'],
  570. token: map['Token'],
  571. );
  572. }
  573. Map<String, dynamic> toJson() {
  574. final map = super.toJson();
  575. if (image != null)
  576. map['Image'] = image;
  577. return map;
  578. }
  579. }
  580. class GetPatientBaseByFaceImageRequest extends TokenRequest{
  581. String? image;
  582. GetPatientBaseByFaceImageRequest({
  583. this.image,
  584. String? token,
  585. }) : super(
  586. token: token,
  587. );
  588. factory GetPatientBaseByFaceImageRequest.fromJson(Map<String, dynamic> map) {
  589. return GetPatientBaseByFaceImageRequest(
  590. image: map['Image'],
  591. token: map['Token'],
  592. );
  593. }
  594. Map<String, dynamic> toJson() {
  595. final map = super.toJson();
  596. if (image != null)
  597. map['Image'] = image;
  598. return map;
  599. }
  600. }
  601. class SavePersonDTO {
  602. bool success;
  603. String? bindCardNo;
  604. String? errMessage;
  605. SavePersonDTO({
  606. this.success = false,
  607. this.bindCardNo,
  608. this.errMessage,
  609. });
  610. factory SavePersonDTO.fromJson(Map<String, dynamic> map) {
  611. return SavePersonDTO(
  612. success: map['Success'],
  613. bindCardNo: map['BindCardNo'],
  614. errMessage: map['ErrMessage'],
  615. );
  616. }
  617. Map<String, dynamic> toJson() {
  618. final map = Map<String, dynamic>();
  619. map['Success'] = success;
  620. if (bindCardNo != null) {
  621. map['BindCardNo'] = bindCardNo;
  622. }
  623. if (errMessage != null) {
  624. map['ErrMessage'] = errMessage;
  625. }
  626. return map;
  627. }
  628. }
  629. class SavePatientBaseByFaceImageRequest extends TokenRequest{
  630. String? cardNo;
  631. String? image;
  632. SavePatientBaseByFaceImageRequest({
  633. this.cardNo,
  634. this.image,
  635. String? token,
  636. }) : super(
  637. token: token,
  638. );
  639. factory SavePatientBaseByFaceImageRequest.fromJson(Map<String, dynamic> map) {
  640. return SavePatientBaseByFaceImageRequest(
  641. cardNo: map['CardNo'],
  642. image: map['Image'],
  643. token: map['Token'],
  644. );
  645. }
  646. Map<String, dynamic> toJson() {
  647. final map = super.toJson();
  648. if (cardNo != null)
  649. map['CardNo'] = cardNo;
  650. if (image != null)
  651. map['Image'] = image;
  652. return map;
  653. }
  654. }
  655. class DeletePersonDTO {
  656. bool success;
  657. String? errMessage;
  658. DeletePersonDTO({
  659. this.success = false,
  660. this.errMessage,
  661. });
  662. factory DeletePersonDTO.fromJson(Map<String, dynamic> map) {
  663. return DeletePersonDTO(
  664. success: map['Success'],
  665. errMessage: map['ErrMessage'],
  666. );
  667. }
  668. Map<String, dynamic> toJson() {
  669. final map = Map<String, dynamic>();
  670. map['Success'] = success;
  671. if (errMessage != null) {
  672. map['ErrMessage'] = errMessage;
  673. }
  674. return map;
  675. }
  676. }
  677. class UnbindAndCreateByFaceImageRequest extends TokenRequest{
  678. String? oldCardNo;
  679. String? newCardNo;
  680. String? image;
  681. UnbindAndCreateByFaceImageRequest({
  682. this.oldCardNo,
  683. this.newCardNo,
  684. this.image,
  685. String? token,
  686. }) : super(
  687. token: token,
  688. );
  689. factory UnbindAndCreateByFaceImageRequest.fromJson(Map<String, dynamic> map) {
  690. return UnbindAndCreateByFaceImageRequest(
  691. oldCardNo: map['OldCardNo'],
  692. newCardNo: map['NewCardNo'],
  693. image: map['Image'],
  694. token: map['Token'],
  695. );
  696. }
  697. Map<String, dynamic> toJson() {
  698. final map = super.toJson();
  699. if (oldCardNo != null)
  700. map['OldCardNo'] = oldCardNo;
  701. if (newCardNo != null)
  702. map['NewCardNo'] = newCardNo;
  703. if (image != null)
  704. map['Image'] = image;
  705. return map;
  706. }
  707. }
  708. class UnbindByCardNoRequest extends TokenRequest{
  709. String? cardNo;
  710. UnbindByCardNoRequest({
  711. this.cardNo,
  712. String? token,
  713. }) : super(
  714. token: token,
  715. );
  716. factory UnbindByCardNoRequest.fromJson(Map<String, dynamic> map) {
  717. return UnbindByCardNoRequest(
  718. cardNo: map['CardNo'],
  719. token: map['Token'],
  720. );
  721. }
  722. Map<String, dynamic> toJson() {
  723. final map = super.toJson();
  724. if (cardNo != null)
  725. map['CardNo'] = cardNo;
  726. return map;
  727. }
  728. }