routes.dart 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. import 'package:get/get.dart';
  2. import 'package:vitalapp/pages/admin/controller.dart';
  3. import 'package:vitalapp/pages/admin/view.dart';
  4. import 'package:vitalapp/pages/check/maternal_health_management/controller.dart';
  5. import 'package:vitalapp/pages/check/maternal_health_management/view.dart';
  6. import 'package:vitalapp/pages/check/children_follow_up_record/controller.dart';
  7. import 'package:vitalapp/pages/check/children_follow_up_record/view.dart';
  8. import 'package:vitalapp/pages/check/self_care_ability_assessment_record/controller.dart';
  9. import 'package:vitalapp/pages/check/self_care_ability_assessment_record/view.dart';
  10. import 'package:vitalapp/pages/check/traditional_chinese_medicine_consitution_record/controller.dart';
  11. import 'package:vitalapp/pages/check/traditional_chinese_medicine_consitution_record/view.dart';
  12. import 'package:vitalapp/pages/check/tuberculosis_management_record/view.dart';
  13. import 'package:vitalapp/pages/consultation_record_view/controller.dart';
  14. import 'package:vitalapp/pages/consultation_record_view/view.dart';
  15. import 'package:vitalapp/pages/contract/package_list/widgets/capture_portrait.dart';
  16. import 'package:vitalapp/pages/contract/package_list/widgets/family_doctor_service_package.dart';
  17. import 'package:vitalapp/pages/contract/package_list/widgets/personal_information.dart';
  18. import 'package:vitalapp/pages/contract/package_list/widgets/remark.dart';
  19. import 'package:vitalapp/pages/contract/package_list/widgets/service_information.dart';
  20. import 'package:vitalapp/pages/data_sync/center/controller.dart';
  21. import 'package:vitalapp/pages/data_sync/center/view.dart';
  22. import 'package:vitalapp/pages/from_page/controller.dart';
  23. import 'package:vitalapp/pages/check/follow_up_record/controller.dart';
  24. import 'package:vitalapp/pages/check/follow_up_record/view.dart';
  25. import 'package:vitalapp/pages/home/personal_center/controller.dart';
  26. import 'package:vitalapp/pages/home/personal_center/view.dart';
  27. import 'package:vitalapp/pages/measure_home/controller.dart';
  28. import 'package:vitalapp/pages/measure_home/view.dart';
  29. import 'package:vitalapp/pages/medical/controller.dart';
  30. import 'package:vitalapp/pages/medical/records/controller.dart';
  31. import 'package:vitalapp/pages/medical/records/view.dart';
  32. import 'package:vitalapp/pages/medical/view.dart';
  33. import 'package:vitalapp/pages/medical/views/basic_check.dart';
  34. import 'package:vitalapp/pages/medical/views/biochemistry_check.dart';
  35. import 'package:vitalapp/pages/medical/views/blood_check.dart';
  36. import 'package:vitalapp/pages/medical/views/heart_check_new.dart';
  37. import 'package:vitalapp/pages/medical/views/traditional_chinese_check.dart';
  38. import 'package:vitalapp/pages/medical/views/urine_check.dart';
  39. import 'package:vitalapp/pages/medical/widgets/health_check/health_check_list/controller.dart';
  40. import 'package:vitalapp/pages/medical/widgets/health_heart_check/health_check_list/controller.dart';
  41. import 'package:vitalapp/pages/medical_checkup_station/appointment/controller.dart';
  42. import 'package:vitalapp/pages/medical_checkup_station/appointment/view.dart';
  43. import 'package:vitalapp/pages/medical_checkup_station/registration/controller.dart';
  44. import 'package:vitalapp/pages/medical_checkup_station/registration/view/index.dart';
  45. import 'package:vitalapp/pages/patient/create/widgets/quick_create.dart';
  46. import 'package:vitalapp/pages/patient/mental_disorder_info/controller.dart';
  47. import 'package:vitalapp/pages/patient/mental_disorder_info/view.dart';
  48. import 'package:vitalapp/pages/patient_info/controller.dart';
  49. import 'package:vitalapp/pages/redirect/redirect.dart';
  50. import 'package:vitalapp/pages/self_care_ability_assessment/controller.dart';
  51. import 'package:vitalapp/pages/self_care_ability_assessment/view.dart';
  52. import 'package:vitalapp/pages/settings/center/controller.dart';
  53. import 'package:vitalapp/pages/settings/center/view.dart';
  54. import 'package:vitalapp/pages/settings/devices/controller.dart';
  55. import 'package:vitalapp/pages/settings/server/controller.dart';
  56. import 'package:vitalapp/pages/traditional_chinese_medicine_constitution/controller.dart';
  57. import 'package:vitalapp/routes/route_setting.dart';
  58. import 'package:vitalapp/pages/check/follow_up/controller.dart';
  59. import 'package:vitalapp/pages/check/follow_up/view.dart';
  60. import 'package:vitalapp/pages/check/health_check_record/controller.dart';
  61. import 'package:vitalapp/pages/check/health_check_record/view.dart';
  62. import 'package:vitalapp/pages/contract/contract_record_html/controller.dart';
  63. import 'package:vitalapp/pages/contract/contract_records/controller.dart';
  64. import 'package:vitalapp/pages/contract/contract_records/view.dart';
  65. import 'package:vitalapp/pages/contract/contract_template/controller.dart';
  66. import 'package:vitalapp/pages/contract/contract_template/view.dart';
  67. import 'package:vitalapp/pages/contract/package_info/controller.dart';
  68. import 'package:vitalapp/pages/contract/package_info/view.dart';
  69. import 'package:vitalapp/pages/contract/package_list/controller.dart';
  70. import 'package:vitalapp/pages/contract/package_list/view.dart';
  71. import 'package:vitalapp/pages/contract/signature_board/controller.dart';
  72. import 'package:vitalapp/pages/contract/signature_board/view.dart';
  73. import 'package:vitalapp/pages/controllers/crowd_labels.dart';
  74. import 'package:vitalapp/pages/dashboard/controller.dart';
  75. import 'package:vitalapp/pages/dashboard/view.dart';
  76. import 'package:vitalapp/pages/home/controller.dart';
  77. import 'package:vitalapp/pages/home/view.dart';
  78. import 'package:vitalapp/pages/login/controller.dart';
  79. import 'package:vitalapp/pages/login/view.dart';
  80. import 'package:vitalapp/pages/login_gateway/controller.dart';
  81. import 'package:vitalapp/pages/login_gateway/view.dart';
  82. import 'package:vitalapp/pages/patient/create/controller.dart';
  83. import 'package:vitalapp/pages/patient/detail/controller.dart';
  84. import 'package:vitalapp/pages/patient/detail/view.dart';
  85. import 'package:vitalapp/pages/patient/info/controller.dart';
  86. import 'package:vitalapp/pages/patient/info/view.dart';
  87. import 'package:vitalapp/pages/patient/list/controller.dart';
  88. import 'package:vitalapp/pages/patient/list/view.dart';
  89. import 'package:vitalapp/pages/splash/controller.dart';
  90. import 'package:vitalapp/pages/splash/view.dart';
  91. import '../pages/contract/contract_record_html/view.dart';
  92. class Routes {
  93. static Map<String, dynamic> parameters = {};
  94. static final routes = [
  95. VRouteSetting(
  96. '/admin',
  97. () => const AdminPage(),
  98. binding: BindingsBuilder(
  99. () {
  100. Get.put(AdminController());
  101. },
  102. ),
  103. ),
  104. VRouteSetting(
  105. '/redirect',
  106. () => const RedirectPage(),
  107. ),
  108. VRouteSetting(
  109. "/splash",
  110. () => const SplashPage(),
  111. binding: BindingsBuilder(
  112. () {
  113. Get.put(SplashController());
  114. },
  115. ),
  116. ),
  117. VRouteSetting(
  118. "/login",
  119. () => const LoginPage(),
  120. binding: BindingsBuilder(
  121. () {
  122. Get.put(LoginController());
  123. },
  124. ),
  125. ),
  126. VRouteSetting(
  127. "/login/gateway",
  128. () => const LoginGatewayPage(),
  129. binding: BindingsBuilder(
  130. () {
  131. Get.put(LoginGatewayController());
  132. },
  133. ),
  134. ),
  135. VRouteSetting(
  136. "/",
  137. () => const HomePage(),
  138. binding: BindingsBuilder(
  139. () {
  140. Get.put(HomeController());
  141. },
  142. ),
  143. ),
  144. VRouteSetting(
  145. "/dashboard",
  146. // participatesInRootNavigator: false,
  147. // preventDuplicates: true,
  148. () => const DashboardPage(),
  149. binding: BindingsBuilder(
  150. () {
  151. Get.put(DashboardController());
  152. },
  153. ),
  154. ),
  155. // VRouteSetting(
  156. // "/settings",
  157. // () => const SettingsPage(),
  158. // binding: BindingsBuilder(
  159. // () {
  160. // Get.put(SettingsController());
  161. // },
  162. // ),
  163. // ),
  164. VRouteSetting(
  165. "/settings",
  166. () => const SettingCenterPage(),
  167. binding: BindingsBuilder(
  168. () {
  169. Get.lazyPut(() => DevicesSettingController());
  170. Get.lazyPut(() => ServerSettingController());
  171. Get.put(SettingCenterController());
  172. },
  173. ),
  174. ),
  175. VRouteSetting(
  176. "/sync/center",
  177. () => const SyncCenterPage(),
  178. binding: BindingsBuilder(
  179. () {
  180. Get.put(SyncCenterController());
  181. },
  182. ),
  183. ),
  184. VRouteSetting(
  185. "/patient/create",
  186. // participatesInRootNavigator: false,
  187. // preventDuplicates: true,
  188. () => const QuickCreatePatientPage(),
  189. binding: BindingsBuilder(
  190. () {
  191. if (Get.isRegistered<PatientInfomationController>()) {
  192. Get.delete<PatientInfomationController>();
  193. }
  194. Get.put(PatientInfomationController());
  195. Get.lazyPut(() => CrowdLabelsController());
  196. if (Get.isRegistered<CreatePatientController>()) {
  197. Get.delete<CreatePatientController>();
  198. }
  199. Get.put(CreatePatientController());
  200. },
  201. ),
  202. ),
  203. VRouteSetting(
  204. "/patient/list",
  205. // participatesInRootNavigator: false,
  206. // preventDuplicates: true,
  207. () => const PatientListPage(),
  208. binding: BindingsBuilder(
  209. () {
  210. if (Get.isRegistered<PatientInfomationController>()) {
  211. Get.delete<PatientInfomationController>();
  212. }
  213. Get.put(PatientInfomationController());
  214. Get.lazyPut(() => CrowdLabelsController());
  215. Get.lazyPut(() => PatientListController());
  216. },
  217. ),
  218. ),
  219. VRouteSetting(
  220. "/patient/detail",
  221. // preventDuplicates: true,
  222. () => const PatientDetailPage(),
  223. binding: BindingsBuilder(
  224. () {
  225. Get.put(CrowdLabelsController());
  226. Get.put(PatientDetailController());
  227. },
  228. ),
  229. ),
  230. VRouteSetting(
  231. "/patient/info",
  232. () => const PatientInfoPage(),
  233. binding: BindingsBuilder(
  234. () {
  235. if (Get.isRegistered<PatientInfomationController>()) {
  236. Get.delete<PatientInfomationController>();
  237. Get.put(PatientInfomationController());
  238. } else {
  239. Get.put(PatientInfomationController());
  240. }
  241. Get.put(PatientInfoController());
  242. },
  243. ),
  244. ),
  245. VRouteSetting(
  246. "/contract/package_list",
  247. () => const ServicePackageContractPage(),
  248. binding: BindingsBuilder(
  249. () {
  250. Get.put(CrowdLabelsController());
  251. Get.put(ServicePackageContractController());
  252. Get.put(FromPageController());
  253. },
  254. ),
  255. ),
  256. VRouteSetting(
  257. "/remedicalRecordView",
  258. () => const ConsultationRecordViewPage(),
  259. binding: BindingsBuilder(
  260. () {
  261. Get.lazyPut(() => ConsultationRecordViewController());
  262. },
  263. ),
  264. ),
  265. VRouteSetting(
  266. "/remedicalRecordView/measure",
  267. () => MeasureHomePage(),
  268. binding: BindingsBuilder(
  269. () {
  270. Get.lazyPut(() => MeasureHomeController());
  271. },
  272. ),
  273. ),
  274. VRouteSetting(
  275. "/contract/package_info",
  276. () => const PackageInfoPage(),
  277. binding: BindingsBuilder(
  278. () {
  279. Get.put(PackageInfoController());
  280. },
  281. ),
  282. ),
  283. VRouteSetting(
  284. "/contract/signature",
  285. () => SignatureBoardPage(),
  286. binding: BindingsBuilder(
  287. () {
  288. Get.put(SignatureBoardController());
  289. },
  290. ),
  291. ),
  292. VRouteSetting(
  293. "/contract/contract_template",
  294. () => ContractTemplatePage(),
  295. binding: BindingsBuilder(
  296. () {
  297. Get.put(ContractTemplateController());
  298. },
  299. ),
  300. ),
  301. VRouteSetting(
  302. "/check/form",
  303. () => RegistrationList(
  304. isVital: true,
  305. ),
  306. binding: BindingsBuilder(
  307. () {
  308. Get.put(RegistrationController());
  309. },
  310. ),
  311. ),
  312. VRouteSetting(
  313. "/check/follow_up",
  314. () => const FollowUpPage(),
  315. binding: BindingsBuilder(
  316. () {
  317. Get.put(FollowUpController());
  318. },
  319. ),
  320. ),
  321. VRouteSetting(
  322. "/check/healthCheckRecord",
  323. () => const HealthCheckRecordPage(),
  324. binding: BindingsBuilder(
  325. () {
  326. /// 需要检测页面回调数据
  327. Get.put(MedicalController());
  328. Get.put(HealthCheckRecordController());
  329. },
  330. ),
  331. ),
  332. VRouteSetting(
  333. "/contract/contract_records",
  334. () => const ContractRecordsPage(),
  335. binding: BindingsBuilder(
  336. () {
  337. Get.put(ContractRecordsController());
  338. },
  339. ),
  340. ),
  341. VRouteSetting(
  342. "/contract/contract_record_html",
  343. () => const ContractRecordsHtmlPage(),
  344. binding: BindingsBuilder(
  345. () {
  346. Get.put(ContractRecordsHtmlController());
  347. },
  348. ),
  349. ),
  350. VRouteSetting(
  351. "/contract/package_list/capture_portrait",
  352. () => const CapturePortraitPage(),
  353. binding: BindingsBuilder(
  354. () {
  355. // Get.put(CrowdLabelsController());
  356. // Get.put(ServicePackageContractController());
  357. },
  358. ),
  359. ),
  360. VRouteSetting(
  361. "/contract/package_list/family_doctor_service_package",
  362. () => const FamilyDoctorServicePackagePage(),
  363. binding: BindingsBuilder(
  364. () {
  365. // Get.put(CrowdLabelsController());
  366. // Get.put(ServicePackageContractController());
  367. },
  368. ),
  369. ),
  370. VRouteSetting(
  371. "/contract/package_list/personal_information",
  372. () => const PersonalInformationPage(),
  373. binding: BindingsBuilder(
  374. () {
  375. // Get.put(CrowdLabelsController());
  376. // Get.put(ServicePackageContractController());
  377. },
  378. ),
  379. ),
  380. VRouteSetting(
  381. "/contract/package_list/remark",
  382. () => const RemarkPage(),
  383. binding: BindingsBuilder(
  384. () {
  385. // Get.put(CrowdLabelsController());
  386. // Get.put(ServicePackageContractController());
  387. },
  388. ),
  389. ),
  390. VRouteSetting(
  391. "/contract/package_list/service_information",
  392. () => const ServiceInformationPage(),
  393. binding: BindingsBuilder(() {
  394. // Get.put(CrowdLabelsController());
  395. // Get.put(ServicePackageContractController());
  396. }),
  397. ),
  398. VRouteSetting(
  399. '/check/follow_up_record',
  400. () => const FollowUpRecordPage(
  401. followUpType: "GXY",
  402. ),
  403. binding: BindingsBuilder(
  404. () {
  405. Get.put(FollowUpRecordController(followUpType: 'GXY'));
  406. },
  407. ),
  408. ),
  409. VRouteSetting(
  410. '/check/follow_up_record/diabetes',
  411. () => const FollowUpRecordPage(followUpType: 'TNB'),
  412. binding: BindingsBuilder(
  413. () {
  414. Get.put(FollowUpRecordController(followUpType: 'TNB'));
  415. },
  416. ),
  417. ),
  418. VRouteSetting(
  419. '/check/follow_up_record/children',
  420. () => ChildrenFollowUpRecordPage(),
  421. binding: BindingsBuilder(
  422. () {
  423. Get.put(
  424. ChildrenFollowUpRecordController(),
  425. );
  426. },
  427. ),
  428. ),
  429. VRouteSetting(
  430. '/medical',
  431. () => const MedicalPage(),
  432. binding: BindingsBuilder(
  433. () {
  434. Get.put(MedicalController());
  435. Get.put(PatientDetailController());
  436. },
  437. ),
  438. ),
  439. VRouteSetting(
  440. '/home/personal_center',
  441. () => const PersonalCenterPage(),
  442. binding: BindingsBuilder(
  443. () {
  444. Get.put(PersonalCenterController());
  445. },
  446. ),
  447. ),
  448. VRouteSetting(
  449. '/TraditionalChineseMedicineConstitution',
  450. () => TraditionalChineseCheck(),
  451. binding: BindingsBuilder(
  452. () {
  453. Get.put(TraditionalChineseMedicineConstitutionController());
  454. Get.put(HealthCheckListController(checkKey: 'HEITCMC'));
  455. },
  456. ),
  457. ),
  458. VRouteSetting(
  459. '/medical/records',
  460. () => const MedicalRecordsPage(),
  461. binding: BindingsBuilder(
  462. () {
  463. Get.put(MedicalRecordsController());
  464. },
  465. ),
  466. ),
  467. VRouteSetting(
  468. '/TraditionalChineseMedicineConsitutionRecord',
  469. () => const TraditionalChineseMedicineConsitutionRecordPage(),
  470. binding: BindingsBuilder(
  471. () {
  472. Get.put(TraditionalChineseMedicineConsitutionRecordController());
  473. },
  474. ),
  475. ),
  476. VRouteSetting(
  477. '/registrationList',
  478. () => RegistrationList(),
  479. binding: BindingsBuilder(
  480. () {
  481. Get.put(RegistrationController());
  482. },
  483. ),
  484. ),
  485. VRouteSetting(
  486. '/appointment',
  487. () => const AppointmentPage(),
  488. binding: BindingsBuilder(
  489. () {
  490. Get.put(AppointmentController());
  491. },
  492. ),
  493. ),
  494. VRouteSetting(
  495. '/electrocardiogram',
  496. () => const HeartCheckNew(),
  497. binding: BindingsBuilder(
  498. () {
  499. if (!Get.isRegistered<MedicalController>()) {
  500. Get.lazyPut(() => MedicalController());
  501. }
  502. Get.put(PatientDetailController());
  503. Get.put(HealthCheckListController());
  504. Get.put(HeartCheckListController());
  505. },
  506. ),
  507. ),
  508. VRouteSetting(
  509. '/basicCheck',
  510. () => BasicCheck(),
  511. binding: BindingsBuilder(
  512. () {
  513. Get.put(PatientDetailController());
  514. Get.put(HealthCheckListController());
  515. },
  516. ),
  517. ),
  518. VRouteSetting(
  519. '/ncg',
  520. () => const UrineAnalysisCheck(),
  521. binding: BindingsBuilder(
  522. () {
  523. if (!Get.isRegistered<MedicalController>()) {
  524. Get.lazyPut(() => MedicalController());
  525. }
  526. Get.put(PatientDetailController());
  527. Get.put(HealthCheckListController());
  528. },
  529. ),
  530. ),
  531. VRouteSetting(
  532. '/bloodTest',
  533. () => BloodCheck(),
  534. binding: BindingsBuilder(
  535. () {
  536. if (!Get.isRegistered<MedicalController>()) {
  537. Get.lazyPut(() => MedicalController());
  538. }
  539. Get.put(PatientDetailController());
  540. Get.put(HealthCheckListController());
  541. },
  542. ),
  543. ),
  544. VRouteSetting(
  545. '/biochemistryTest',
  546. () => BiochemistryCheck(),
  547. binding: BindingsBuilder(
  548. () {
  549. if (!Get.isRegistered<MedicalController>()) {
  550. Get.lazyPut(() => MedicalController());
  551. }
  552. Get.put(PatientDetailController());
  553. Get.put(HealthCheckListController());
  554. },
  555. ),
  556. ),
  557. VRouteSetting(
  558. '/SelfCareAbilityAssessment',
  559. () => SelfCareAbilityAssessmentView(),
  560. binding: BindingsBuilder(
  561. () {
  562. Get.put(SelfCareAbilityAssessmentController());
  563. },
  564. ),
  565. ),
  566. VRouteSetting(
  567. '/SelfCareAbilityAssessmentRecord',
  568. () => const SelfCareAbilityAssessmentRecordPage(),
  569. binding: BindingsBuilder(
  570. () {
  571. Get.put(SelfCareAbilityAssessmentRecordController());
  572. },
  573. ),
  574. ),
  575. VRouteSetting(
  576. '/MaternalHealthManagement',
  577. () => MaternalHealthManagement(),
  578. binding: BindingsBuilder(
  579. () {
  580. Get.put(MaternalHealthManagementController());
  581. },
  582. ),
  583. ),
  584. ///严重精神障碍患者随访服务记录表
  585. VRouteSetting(
  586. '/check/follow_up_record/mentalDisorder',
  587. () => const FollowUpRecordPage(followUpType: 'YZJSZASFFW'),
  588. binding: BindingsBuilder(
  589. () {
  590. Get.put(FollowUpRecordController(followUpType: 'YZJSZASFFW'));
  591. },
  592. ),
  593. ),
  594. ///严重精神障碍患者信息补充表
  595. VRouteSetting(
  596. '/patient/mental_disorder_info',
  597. () => const MentalDisorderInfoView(),
  598. binding: BindingsBuilder(() {
  599. /// TODO 需要优化
  600. if (!Get.isRegistered<MedicalController>()) {
  601. Get.lazyPut(() => MedicalController());
  602. }
  603. Get.put(MentalDisorderInfoController());
  604. }),
  605. ),
  606. ///严重肺结核患者管理
  607. VRouteSetting(
  608. '/check/follow_up_record/tuberculosis',
  609. () => const TuberculosisManagementView(
  610. followUpType: 'FollowUpTuberculosisFirstRecord'),
  611. binding: BindingsBuilder(
  612. () {
  613. Get.put(FollowUpRecordController(
  614. followUpType: 'FollowUpTuberculosisFirstRecord'));
  615. },
  616. ),
  617. ),
  618. ];
  619. }