iliveconsultationmanager.dart 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. import 'package:fis_common/event/event_type.dart';
  2. import 'package:fis_jsonrpc/rpc.dart';
  3. import 'package:flyinsonolite/consultation/records/models/consultationmember.dart';
  4. import 'package:flyinsonolite/consultation/records/models/liveconsultation.dart';
  5. abstract class ILiveConsultationManager {
  6. late ConsultationDetailDTO consultationDetail;
  7. late LiveConsultation liveConsultation;
  8. late String currentConsultationCode;
  9. /// 白板数据接收
  10. final FEventHandler<String> onWhiteboardDataReceive = FEventHandler<String>();
  11. ///开始会诊通知事件 11
  12. final FEventHandler<LiveConsultation> onInviteLiveConsultation =
  13. FEventHandler<LiveConsultation>();
  14. ///会诊过程中邀请成员的通知(通知被邀请者) 8
  15. final FEventHandler<LiveConsultation> onInviteeInLiveConsultation =
  16. FEventHandler<LiveConsultation>();
  17. //邀请者接受会诊通知事件(通知发起者)12
  18. final FEventHandler<LiveConsultation> onAcceptConsultation =
  19. FEventHandler<LiveConsultation>();
  20. ///邀请者拒绝会诊事件(通知发起者) 13
  21. final FEventHandler<LiveConsultation> onRejectConsultation =
  22. FEventHandler<LiveConsultation>();
  23. ///邀请者取消接听会诊事件(通知发起者) 7
  24. final FEventHandler<LiveConsultation> onCancelConsultation =
  25. FEventHandler<LiveConsultation>();
  26. ///成员加入会诊事件(通知所有成员)-
  27. final FEventHandler<LiveConsultation> onAcceptLiveConsultation =
  28. FEventHandler<LiveConsultation>();
  29. //成员静音通知
  30. final FEventHandler<ConsultationMember> onMemberMute =
  31. FEventHandler<ConsultationMember>();
  32. //成员静音通知
  33. final FEventHandler<ConsultationMember> onSwitchVideoPlay =
  34. FEventHandler<ConsultationMember>();
  35. ///成员离开会诊事件(通知所有成员)19
  36. final FEventHandler<LiveConsultation> onLeaveConsultation =
  37. FEventHandler<LiveConsultation>();
  38. ///成员加入会诊事件(通知所有成员) 被邀请者进入房间通知
  39. final FEventHandler<LiveConsultation> onJoinInConsultation =
  40. FEventHandler<LiveConsultation>();
  41. ///某个成员网络不佳通知事件(通知所有成员) 18
  42. final FEventHandler<LiveConsultation> onNetworkErrConsultation =
  43. FEventHandler<LiveConsultation>();
  44. /// 68 取消呼叫 to 客户端
  45. final FEventHandler<CancelInvitingInLiveCourseNotification>
  46. onCancelInvitingInLiveCourseNotification =
  47. FEventHandler<CancelInvitingInLiveCourseNotification>();
  48. ///成员加入会诊事件(通知所有成员)
  49. final FEventHandler<LiveConsultation> onJoinConsultation =
  50. FEventHandler<LiveConsultation>();
  51. ///取消会诊过程中邀请成员的通知(通知被邀请者) 7
  52. final FEventHandler<LiveConsultation> onCancelInvitingConsultation =
  53. FEventHandler<LiveConsultation>();
  54. ///会诊间改变
  55. final FEventHandler<LiveConsultation> onChangeConsultation =
  56. FEventHandler<LiveConsultation>();
  57. ///会诊间改变,成员不在新的会诊间,需退出
  58. final FEventHandler<LiveConsultation> onCloseConsultationDueToChange =
  59. FEventHandler<LiveConsultation>();
  60. ///关闭会诊事件(通知所有成员) 16
  61. final FEventHandler<LiveConsultation> onCloseConsultation =
  62. FEventHandler<LiveConsultation>();
  63. ///会诊提醒通知
  64. //final FEventHandler<InviteeConsultationInfo> onRemindConsultation = FEventHandler<InviteeConsultationInfo>();
  65. ///邀请者拒绝会诊事件(通知发起者)
  66. //final FEventHandler<InviteeConsultationInfo> onRejectApplayConsultation = FEventHandler<InviteeConsultationInfo>();
  67. ///批准申请会诊通知
  68. //final FEventHandler<InviteeConsultationInfo> onApprovalApplayConsultation = FEventHandler<InviteeConsultationInfo>();
  69. ///申请会诊通知
  70. //final FEventHandler<InviteeConsultationInfo> onApplayConsultation = FEventHandler<InviteeConsultationInfo>();
  71. ///受邀请人通知(通知受邀请人)
  72. //final FEventHandler<InviteeConsultationInfo> onInviteeConsultation = FEventHandler<InviteeConsultationInfo>();
  73. ///受邀请人同意通知(通知发起邀请的人)
  74. //final FEventHandler<InviteeConsultationInfo> onInviteeApproveConsultation = FEventHandler<InviteeConsultationInfo>();
  75. ///受邀请人拒绝通知(通知发起邀请的人)
  76. //final FEventHandler<InviteeConsultationInfo> onInviteeRejectConsultation = FEventHandler<InviteeConsultationInfo>();
  77. ///开启会诊事件
  78. final FEventHandler<LiveConsultation> onStartLiveConsultation =
  79. FEventHandler<LiveConsultation>();
  80. //开始会诊(进入方第一次进入的时候调用)
  81. Future<LiveConsultation> initiateLiveConsultationAsync(
  82. String consultationCode,
  83. {bool checkOnly = false});
  84. ///开始会诊
  85. Future<LiveConsultation?> startConsultationAsync(
  86. ConsultationDetailDTO consultationDetailDTO,
  87. {bool isJoin = false,
  88. bool checkOnly = false,
  89. bool checkMedia = false});
  90. ///会诊心跳
  91. Future<LiveConsultationHeartRateResult> heartRateAsync(
  92. String consultationCode);
  93. //根据会诊单号查询会诊中可直接切换的会诊单列表
  94. Future<List<ConsultationPageDTO>> findCanSwitchConsultationsAsync(
  95. String consultationCode);
  96. ///离开房间
  97. Future<LeaveLiveConsultationResult> leaveLiveConsultationAsync(
  98. String consultationCode);
  99. ///接受会诊
  100. Future<LiveConsultation> acceptLiveConsultationAsync(String consultationCode,
  101. {bool checkOnly = false});
  102. ///拒绝会诊
  103. Future<RejectLiveConsultationResult> rejectLiveConsultationAsync(
  104. String consultationCode);
  105. ////中途加入会诊
  106. Future<LiveConsultation> joinInLiveConsultationAsync(String consultationCode,
  107. {bool checkOnly = false});
  108. ///会诊设备重试进入房间
  109. Future<void> retryLoadDeviceAsync(String consultationCode);
  110. /// 发送白板数据
  111. Future sendInteractiveBoardDataAsync(
  112. String consultationCode, String boardData,
  113. [bool isClear = false]);
  114. ///查询急诊前设备和专家
  115. Future<QueryEmergencyDataResult> queryEmergencyDataAsync();
  116. ///创建急诊
  117. Future<String> applyEmergencyTreatment(String selectedUser, String deviceCode,
  118. String? patientCode, List<DataItemDTO>? patientDatas);
  119. ///开启急诊
  120. Future<bool> startEmergencyConsultationAsync(String consultationId);
  121. ///更新会诊中上传的截图或视频
  122. Future<bool> updateConsultationFilesInfoAsync(String consultationCode,
  123. String coverUrl, String previewUrl, String sourceUrl, bool isSingle);
  124. ///取消会诊过程邀请中的成员
  125. Future<CancelInvitingInLiveConsultationResult>
  126. cancelInvitingInLiveConsultationAsync(
  127. String consultationCode, List<String> inviteCodes);
  128. ///切换会诊病人
  129. Future<ChangeConsultationResult> changeConsultationAsync(
  130. String originalConsultationId, String currentConsultationId);
  131. ///会诊过程中邀请其他成员
  132. Future<InviteInLiveConsultationResult> inviteInLiveConsultationAsync(
  133. String consultationCode, List<String> inviteCodes, int roomNo);
  134. ///获取即时会诊配置(发起前是否需要填入病人信息)
  135. Future<GetEmergencySettingResult> getEmergencySettingAsync();
  136. }