ai_manager.dart 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import 'package:fis_jsonrpc/rpc.dart';
  2. import 'package:fis_ui/index.dart';
  3. import 'package:flutter/material.dart';
  4. import 'interfaces/ai_manager.dart';
  5. import 'interfaces/base_manager.dart';
  6. class AIManager extends BaseManager implements IAIManager {
  7. @override
  8. Color getAIIconColor(DiagnosisConclusionEnum diagnosisConclusion,
  9. DiagnosisOrganEnum diagnosisOrgan) {
  10. ///颈动脉不存在恶性和良恶性,所以做这个处理
  11. if (diagnosisOrgan == DiagnosisOrganEnum.CarotidArtery &&
  12. diagnosisConclusion.index > DiagnosisConclusionEnum.Benign.index) {
  13. diagnosisConclusion = DiagnosisConclusionEnum.NoObviousLesion;
  14. }
  15. switch (diagnosisConclusion) {
  16. case DiagnosisConclusionEnum.NoObviousLesion:
  17. return Colors.lightBlue;
  18. case DiagnosisConclusionEnum.Benign:
  19. return Colors.greenAccent;
  20. case DiagnosisConclusionEnum.BenignAndMalignant:
  21. case DiagnosisConclusionEnum.Malignant:
  22. return Colors.orangeAccent;
  23. case DiagnosisConclusionEnum.Other:
  24. return Colors.lightBlue;
  25. default:
  26. return Colors.black;
  27. }
  28. }
  29. @override
  30. IconData getAiIconItem(DiagnosisOrganEnum diagnosisOrganEnum) {
  31. switch (diagnosisOrganEnum) {
  32. case DiagnosisOrganEnum.Breast:
  33. return FIcons.mammary_gland;
  34. case DiagnosisOrganEnum.Liver:
  35. return FIcons.liver;
  36. case DiagnosisOrganEnum.Kidney:
  37. return FIcons.fis_kidney;
  38. case DiagnosisOrganEnum.Cholecyst:
  39. return FIcons.fis_gallbladder;
  40. case DiagnosisOrganEnum.Spleen:
  41. return FIcons.fis_spleen;
  42. case DiagnosisOrganEnum.Thyroid:
  43. return FIcons.fis_thyroid;
  44. case DiagnosisOrganEnum.CarotidArtery:
  45. return FIcons.arteria_carotis;
  46. default:
  47. // 图像待定
  48. return FIcons.arteria_carotis;
  49. }
  50. // return
  51. }
  52. }