report.dart 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. import 'package:fis_common/event/event_type.dart';
  2. import 'package:fis_jsonrpc/rpc.dart';
  3. import 'models/report_edit_source.dart';
  4. import 'models/report_element_info.dart';
  5. import 'models/report_tag_key.dart';
  6. import 'models/vid_image_source.dart';
  7. abstract class IReportManager {
  8. ///编辑报告点击事件
  9. final onEditReport = FEventHandler<String>();
  10. ///提交报告事件
  11. final onSubmitReport = FEventHandler<bool>();
  12. ///手机端提交报告
  13. final onMobileSubmitReport = FEventHandler<bool>();
  14. ///语音识别
  15. Future<String> commitASRInfoAsync(String token, String extension);
  16. ///下载
  17. Future<void> directlyDownloadPDF(String reportCode, String fileName);
  18. ///直接打印文档
  19. Future<void> directlyPrintPDF(String reportCode, String fileName);
  20. ///打印图像
  21. Future<void> directlyPrintPDFJpges(List<String>? images, String fileName);
  22. ///打印文件(通过下载地址)
  23. Future<void> directlyPrintPDFFile(String fileUrl, String fileName);
  24. ///下载图像格式 PDF
  25. Future<void> directlyDownloadPDFJpges(List<String>? images, String fileName);
  26. ///下载文件格式 PDF
  27. Future<void> directlyDownloadPDFFile(String pdfFileUrl, String fileName);
  28. ///报告分享
  29. Future<bool> openReportShareDialog(String? reportToShare);
  30. ///获取所有报告
  31. Future<List<ReportDTO>> findReportsAsync(String recordCode);
  32. Future<ReportDTO> findReportByCodeAsync(String reportCode);
  33. Future<List<ReportDTO>> getReportInfoAsync(String recordCode);
  34. Future<String> getReportTemplate();
  35. ///提交报告标签
  36. Future<bool> submitReportTags(String reportCode, List<String> selectedTags);
  37. ///初始化标签所需数据
  38. ///
  39. /// [reportType] 默认值远程诊断
  40. Future<Map<ReportTagKey, List<String>>> getReportTagDatas(
  41. String recordCode, [
  42. ReportTypeEnum? reportType,
  43. ]);
  44. void enterVidMeasurePage({
  45. String imageUrl = '',
  46. int imageindex = 0,
  47. String remedicalCode = '',
  48. String patientCode = '',
  49. String recordCode = '',
  50. String? remedicalAISelectedInfoCode = '',
  51. bool needRouterBack = false,
  52. bool reportPageEnter = false,
  53. });
  54. ///获取报告提交内容信息Json
  55. String getMobileReportDatasJson({
  56. String? patientName,
  57. String? patientSex,
  58. String? age,
  59. List<String>? imageInfos,
  60. String? des,
  61. String? summary,
  62. String? creatorName,
  63. String? fullName,
  64. String? customDoctor,
  65. String? customOrganzation,
  66. String? deviceOrganzationName,
  67. });
  68. String getTime(String time);
  69. /// 根据扫查记录获取转诊扫查图像详情
  70. Future<RemedicalListResult> queryReferralRemedicalListByRecordInfoAsync(
  71. String recordCode, String referralRecordCode);
  72. ///获取分享报告链接
  73. Future<String> findReportShareUrlAsync(String reportCode);
  74. ///手机端底部弹窗选择分享方式
  75. Future<bool> showBottomSheet(ReportDTO reportInfo);
  76. ///注册微信分享api
  77. void initFluwx();
  78. ///打开报告编辑页面
  79. Future<void> openReportEdit(
  80. String patientCode, {
  81. String consultationCode = '',
  82. String recordCode = '',
  83. String reportCode = '',
  84. int patientTab = 0,
  85. String referralRecordCode = '',
  86. });
  87. Future<RemedicalListResult> getRemedicalListByRecordInfoAsync(
  88. String recordCode);
  89. ///打开报告预览页面
  90. Future<void> openReportPreviewPage(
  91. String recordCode,
  92. String referralRecordCode, {
  93. String reportCode = '',
  94. });
  95. ///获取测量图像
  96. Future<List<RemedicalMeasuredInfoDTO>> findRemedicalMeasuredInfoAsync(
  97. String recordCode, {
  98. BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.RemoteDiagnosis,
  99. });
  100. List<FReportElementInfo> convertReportData(String jsonData);
  101. }