import 'dart:convert'; import 'package:fis_common/event/event_type.dart'; import 'package:fis_i18n/i18n.dart'; import 'package:fis_jsonrpc/rpc.dart'; import 'package:flyinsonolite/jsonrpc/jsonrpcclient.dart'; import 'package:flyinsonolite/managers/basemanager.dart'; import 'package:flyinsonolite/managers/interfaces/iappointmentmanager.dart'; import 'package:flyinsonolite/managers/interfaces/iliveconsultationmanager.dart'; import 'package:flyinsonolite/managers/interfaces/irtmpmockrtcmanager.dart'; import 'package:flyinsonolite/consultation/records/models/consultationmember.dart'; import 'package:flyinsonolite/consultation/records/models/liveconsultation.dart'; import 'package:flyinsonolite/infrastructure/storage.dart'; import 'package:flyinsonolite/notifications/handlers/acceptliveconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/cancelinvitinginliveconsultationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/cancelinvitinginlivecoursenotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/cancelliveconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/changeconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/closeLiveconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/closeconsultationduetochangenotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/consultationanswertimeouthandler.dart'; import 'package:flyinsonolite/notifications/handlers/emergencycallnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/heartRatejoinconsultationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/heartrateleaveconsultationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/inviteinliveconsultationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/inviteliveconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/joininliveconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/joinliveconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/leaveconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/muteliveconsultationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/networkerrconsultationnotificationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/rejectinviteliveconsultationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/rejectliveconsultationhandler.dart'; import 'package:flyinsonolite/notifications/handlers/sendinteractiveboarddatahandler.dart'; import 'package:flyinsonolite/notifications/handlers/switchvideoplayconsultationhandler.dart'; import 'package:get/get.dart'; class LiveConsultationManager extends BaseManager implements ILiveConsultationManager { @override late ConsultationDetailDTO consultationDetail; ///急诊的时候用到 @override late LiveConsultation liveConsultation; @override late String currentConsultationCode = ""; /// 白板数据接收 @override FEventHandler onWhiteboardDataReceive = FEventHandler(); ///开始会诊通知事件 11 @override FEventHandler onInviteLiveConsultation = FEventHandler(); ///会诊过程中邀请成员的通知(通知被邀请者) 8 @override final FEventHandler onInviteeInLiveConsultation = FEventHandler(); ///取消会诊过程中邀请成员的通知(通知被邀请者) 7 @override final FEventHandler onCancelInvitingConsultation = FEventHandler(); ///邀请者接受会诊通知事件(通知发起者)12 @override final FEventHandler onAcceptConsultation = FEventHandler(); ///邀请者拒绝会诊事件(通知发起者) 13 @override final FEventHandler onRejectConsultation = FEventHandler(); ///邀请者取消接听会诊事件(通知发起者) 7 @override final FEventHandler onCancelConsultation = FEventHandler(); ///关闭会诊事件(通知所有成员) 16 @override final FEventHandler onCloseConsultation = FEventHandler(); //成员加入会诊事件(通知所有成员)- @override FEventHandler onAcceptLiveConsultation = FEventHandler(); ///成员加入会诊事件(通知所有成员) @override final FEventHandler onJoinConsultation = FEventHandler(); ///成员加入会诊事件(通知所有成员) 被邀请者进入房间通知 @override final FEventHandler onJoinInConsultation = FEventHandler(); ///成员离开会诊事件(通知所有成员)19 @override final FEventHandler onLeaveConsultation = FEventHandler(); ///某个成员网络不佳通知事件(通知所有成员) 18 @override final FEventHandler onNetworkErrConsultation = FEventHandler(); /// 68 取消呼叫 to 客户端 @override FEventHandler onCancelInvitingInLiveCourseNotification = FEventHandler(); ///开启会诊事件 @override FEventHandler onStartLiveConsultation = FEventHandler(); //成员静音通知 @override final FEventHandler onMemberMute = FEventHandler(); //成员视频关闭与否通知 @override final FEventHandler onSwitchVideoPlay = FEventHandler(); ///会诊间改变 @override final FEventHandler onChangeConsultation = FEventHandler(); ///会诊间改变,成员不在新的会诊间,需退出 @override FEventHandler onCloseConsultationDueToChange = FEventHandler(); LiveConsultationManager() { // 互动白板数据通知 var sendInteractiveBoardDataHandler = Get.find(); sendInteractiveBoardDataHandler .subscribe(_onSendInteractiveBoardDataHandler); // 取消会诊过程中邀请成员的通知 7 var cancelInvitingHandler = Get.find(); cancelInvitingHandler.subscribe(_onCancelInvitingHandler); //会诊过程中邀请成员的通知 8 var inviteInLiveConsulationHandler = Get.find(); inviteInLiveConsulationHandler.subscribe(_onInviteInLiveHandler); //开始会诊的通知 11 var inviteLiveConsultHandler = Get.find(); inviteLiveConsultHandler.subscribe(_onInviteLiveConsultHandler); //接受会诊的通知 12 var acceptLiveConsultationHandler = Get.find(); acceptLiveConsultationHandler.subscribe(_onAcceptLiveConsultationHandler); //拒绝会诊的通知 13 var rejectLiveConsultationHandler = Get.find(); rejectLiveConsultationHandler.subscribe(_onRejectLiveConsultationHandler); //拒绝会诊的通知 21 var rejectInviteLiveConsultationHandler = Get.find(); rejectInviteLiveConsultationHandler .subscribe(_onRejectInviteLiveConsultationHandler); //取消会诊通知 15 var cancelLiveConsultation = Get.find(); cancelLiveConsultation.subscribe(_onCancelLiveConsultation); //关闭会诊通知, 基层一直不接自动取消后会发送这个通知 16 var closeLiveConsultHandler = Get.find(); closeLiveConsultHandler.subscribe(_onCloseLiveConsultHandler); // 进入会诊通知 17 var joinLiveConsultHandler = Get.find(); joinLiveConsultHandler.subscribe(_onJoinLiveConsultHandler); //网络质量不佳会诊通知 18 var networkErrConsultationHandler = Get.find(); networkErrConsultationHandler.subscribe(_onNetworkErrConsultationHandler); //离开会诊通知 19 var leaveConsultationHandler = Get.find(); leaveConsultationHandler.subscribe(_onleaveConsultationHandler); //20 邀请的成员加入会诊 var joinInHandler = Get.find(); joinInHandler.subscribe(_onJoinInLiveConsultationHandler); //成员静音通知 27 var muteLiveConsultationHandler = Get.find(); muteLiveConsultationHandler.subscribe(_onMuteLiveConsultationHandler); //成员启用或关闭摄像头通知 28 var switchVideoPlayConsultationHandler = Get.find(); switchVideoPlayConsultationHandler .subscribe(_onSwitchVideoPlayConsultationHandler); ///心跳加入 var heartRateJoinConsultationHandler = Get.find(); heartRateJoinConsultationHandler .subscribe(_onHeartRateJoinConsultationHandler); //成员心跳断开离开 30 var heartRateLeaveConsultationHandler = Get.find(); heartRateLeaveConsultationHandler .subscribe(_onHeartRateLeaveConsultationHandler); //切换房间,但成员需离开 var closeConsultationDueToChangeNotificationHandler = Get.find(); closeConsultationDueToChangeNotificationHandler .subscribe(_onCloseConsultationDueToChangeHandler); //切换房间,但成员需离开 var changeConsultationNotification = Get.find(); changeConsultationNotification.subscribe(_onChangeConsultationHandler); ///急诊呼叫专家通知 37 var emergencyCallNotificationHandler = Get.find(); emergencyCallNotificationHandler .subscribe(_onEmergencyCallNotificationHandler); ///呼叫超时 var consultationAnswerTimeoutHandler = Get.find(); consultationAnswerTimeoutHandler.subscribe(_onAnswerTimeoutHandler); /// 取消呼叫 to 客户端 68 var cancelInvitingInLiveCourseNotificationHandler = Get.find(); cancelInvitingInLiveCourseNotificationHandler .subscribe(_onCancelInvitingInLiveCourseNotificationHandler); } void _onInviteInLiveHandler(InviteInLiveConsultationNotification message) { var consulation = LiveConsultation( consultationCode: message.consultationCode, roomNo: message.roomNo, operator: message.operator, ); consulation.consultationMemberConvert(message.memberLiveDatas ?? []); onInviteeInLiveConsultation.emit( this, consulation, ); } void _onCancelInvitingHandler( CancelInvitingInLiveConsultationNotification message) { var consulation = LiveConsultation( consultationCode: message.consultationCode, userCode: message.userCodes!.first, ); onCancelInvitingConsultation.emit( this, consulation, ); } void _onEmergencyCallNotificationHandler(EmergencyCallNotification message) { var liveConsultation = LiveConsultation( consultationCode: message.consultationCode, roomNo: message.roomNo, ); var initiator = message.initiator; if (initiator != null) { liveConsultation.memberLiveDatas.value = [ ConsultationMember.fromDto(initiator) .fixMergedVideoOutputSize() .fixOnlyCamera() ]; } onInviteLiveConsultation.emit(this, liveConsultation); } void _onAnswerTimeoutHandler(ConsultationAnswerTimeoutNotification message) { var consulation = LiveConsultation( consultationCode: message.consultationCode, userCode: message.userCode, ); onCancelInvitingConsultation.emit( this, consulation, ); } void _onCancelInvitingInLiveCourseNotificationHandler( CancelInvitingInLiveCourseNotification message) { var notification = message; onCancelInvitingInLiveCourseNotification.emit( this, notification, ); } void _onleaveConsultationHandler(LeaveLiveConsultationNotification message) { var consulation = LiveConsultation( consultationCode: message.consultationCode, ); var leaverInfo = message.leaverInfo; if (leaverInfo != null) { consulation.memberLiveDatas.value = [ ConsultationMember( id: leaverInfo.id, name: leaverInfo.name, headImageToken: leaverInfo.headImageUrl, ) ]; } onLeaveConsultation.emit( this, consulation, ); } void _onChangeConsultationHandler(ChangeConsultationNotification message) { var consulation = LiveConsultation( consultationCode: message.consultationCode, roomNo: message.roomNo, ); currentConsultationCode = message.consultationCode!; consulation.consultationMemberConvert(message.memberLiveDatas ?? []); onChangeConsultation.emit(this, consulation); } void _onCloseConsultationDueToChangeHandler( CloseConsultationDueToChangeNotification message) { onCloseConsultationDueToChange.emit( this, LiveConsultation(consultationCode: message.consultationCode)); } void _onSendInteractiveBoardDataHandler( SendInteractiveBoardDataNotification message) { message.boardData; if (message.boardData != null) { if (message.isClear) { onWhiteboardDataReceive.emit( this, jsonEncode({'isClear': 'true', 'u_Id': message.userCode})); } else { onWhiteboardDataReceive.emit(this, message.boardData!); } } } void _onHeartRateJoinConsultationHandler( HeartRateJoinConsultationNotification message) { var accepter = message.joiner; var consultation = LiveConsultation( consultationCode: message.consultationCode, ); if (accepter != null) { consultation.memberLiveDatas.value = [ ConsultationMember( isOnline: accepter.isOnline, mute: accepter.mute, liveData: accepter.liveData, id: accepter.id, name: accepter.name, headImageToken: accepter.headImageUrl, mergedChannel: accepter.consultationDeviceInfo?.mergedChannel ?? false, consultationDeviceInfo: accepter.consultationDeviceInfo, videoDeviceInfos: accepter.consultationDeviceInfo?.videoDeviceOutputList, isOldPlatform: accepter.isOldPlatform, supportRtc: accepter.supportRtc, mergedVideoOutputWidth: accepter.consultationDeviceInfo?.mergedVideoOutputWidth ?? 0, mergedVideoOutputHeight: accepter.consultationDeviceInfo?.mergedVideoOutputHeight ?? 0, ).fixMergedVideoOutputSize().fixOnlyCamera() ]; } onJoinConsultation.emit( this, consultation, ); } //会诊成员心跳断开离开 void _onHeartRateLeaveConsultationHandler( HeartRateLeaveConsultationNotification message) { var consulation = LiveConsultation( consultationCode: message.consultationCode, ); var leaverInfo = message.leaverInfo; if (leaverInfo != null) { consulation.memberLiveDatas.value = [ ConsultationMember( id: leaverInfo.id, name: leaverInfo.name, headImageToken: leaverInfo.headImageUrl, ) ]; Get.find().handleRemoteLeave(leaverInfo); } onLeaveConsultation.emit( this, consulation, ); } void _onJoinLiveConsultHandler(JoinLiveConsultationNotification message) { var consultation = LiveConsultation( consultationCode: message.consultationCode, ); var joiner = message.joiner; if (joiner != null) { consultation.memberLiveDatas.value = [ ConsultationMember( id: joiner.id, name: joiner.name, isOnline: joiner.isOnline, mute: joiner.mute, isInitiator: joiner.id == Storage.user.userCode, liveData: joiner.liveData, headImageToken: joiner.headImageUrl, index: joiner.sortNumber, ) ]; } onJoinConsultation.emit( this, consultation, ); } void _onJoinInLiveConsultationHandler( JoinInLiveConsultationNotification message) { var consultation = LiveConsultation( consultationCode: message.consultationCode, ); var joiner = message.joiner; if (joiner != null) { consultation.memberLiveDatas.value = [ ConsultationMember( id: joiner.id, name: joiner.name, isOnline: joiner.isOnline, mute: joiner.mute, isInitiator: joiner.isInitiator, liveData: joiner.liveData, headImageToken: joiner.headImageUrl, sortLevel: joiner.sortLevel, ) ]; } onJoinInConsultation.emit( this, consultation, ); } void _onMuteLiveConsultationHandler( MuteLiveConsultationNotification message) { var member = message.muterInfo; var memberId = ''; if (member != null) { memberId = member.id ?? ''; } Get.find().handleRemoteMuteAudio( memberId, message.mute, ); onMemberMute.emit( this, ConsultationMember(mute: message.mute, id: memberId), ); } void _onCloseLiveConsultHandler( CloseLiveConsultationNotification message) async { var consultation = LiveConsultation( consultationCode: message.consultationCode, initiatorCode: message.initiatorCode, ); onCloseConsultation.emit( this, consultation, ); } void _onRejectInviteLiveConsultationHandler( RejectInviteLiveConsultationNotification message) { var accepter = message.rejecter; var consultation = LiveConsultation( consultationCode: message.consultationCode, ); if (accepter != null) { consultation.memberLiveDatas.value = [ ConsultationMember( id: accepter.id, name: accepter.name, headImageToken: accepter.headImageUrl, ) ]; } onRejectConsultation.emit( this, consultation, ); } void _onAcceptLiveConsultationHandler( AcceptLiveConsultationNotification message) { var accepter = message.accepter; var consultation = LiveConsultation(consultationCode: message.consultationCode); if (accepter != null) { consultation.memberLiveDatas.value = [ ConsultationMember( isOnline: accepter.isOnline, mute: accepter.mute, liveData: accepter.liveData, id: accepter.id, name: accepter.name, headImageToken: accepter.headImageUrl, ) ]; } onAcceptConsultation.emit( this, consultation, ); } void _onRejectLiveConsultationHandler( RejectLiveConsultationNotification message) async { var accepter = message.rejecter; var consultation = LiveConsultation( consultationCode: message.consultationCode, ); if (accepter != null) { consultation.memberLiveDatas.value = [ ConsultationMember( id: accepter.id, name: accepter.name, headImageToken: accepter.headImageUrl, ) ]; } onRejectConsultation.emit( this, consultation, ); } void _onInviteLiveConsultHandler(InviteLiveConsultationNotification message) { var liveConsultation = LiveConsultation( consultationCode: message.consultationCode, roomNo: message.roomNo, ); var initiator = message.initiator; if (initiator != null) { liveConsultation.memberLiveDatas.value = [ ConsultationMember.fromDto(initiator) .fixMergedVideoOutputSize() .fixOnlyCamera() ]; } onInviteLiveConsultation.emit(this, liveConsultation); } void _onCancelLiveConsultation(CancelLiveConsultationNotification message) { var consultation = LiveConsultation( consultationCode: message.consultationCode, initiatorCode: message.initiatorCode, ); onCancelConsultation.emit( this, consultation, ); } void _onSwitchVideoPlayConsultationHandler( SwitchLiveConsultationVideoNotification message) { var member = message.switcherInfo; var memberId = ''; if (member != null) { memberId = member.id ?? ''; } Get.find().handleRemoteMuteVideo( memberId, !message.opened, ); onSwitchVideoPlay.emit( this, ConsultationMember(videoOpend: message.opened, id: memberId), ); } void _onNetworkErrConsultationHandler( NetworkErrConsultationNotification message) { var networkErrMemberInfo = message.networkErrMemberInfo; var consulation = LiveConsultation( consultationCode: message.consultationCode, ); if (networkErrMemberInfo != null) { consulation.memberLiveDatas.value = [ ConsultationMember( id: networkErrMemberInfo.id, name: networkErrMemberInfo.name, headImageToken: networkErrMemberInfo.headImageUrl, ) ]; } onNetworkErrConsultation.emit( this, consulation, ); } ///开始会诊 @override Future startConsultationAsync( ConsultationDetailDTO consultationDetailDTO, {bool isJoin = false, bool checkOnly = false, bool checkMedia = false}) async { var expertUserCode = consultationDetailDTO.expertUserCode; if (isJoin) { liveConsultation = await joinInLiveConsultationAsync( consultationDetailDTO.consultationCode!, checkOnly: checkOnly); } else if (consultationDetailDTO.isEmergency && consultationDetailDTO.applyUserCode != Storage.user.userCode) { liveConsultation = await acceptLiveConsultationAsync( consultationDetailDTO.consultationCode!, checkOnly: checkOnly); } else if (expertUserCode == Storage.user.userCode || (consultationDetailDTO.isEmergency && consultationDetailDTO.applyUserCode == Storage.user.userCode)) { liveConsultation = await initiateLiveConsultationAsync( consultationDetailDTO.consultationCode!, checkOnly: checkOnly); } else { liveConsultation = await acceptLiveConsultationAsync( consultationDetailDTO.consultationCode!, checkOnly: checkOnly); } return liveConsultation; } @override Future initiateLiveConsultationAsync( String consultationCode, {bool checkOnly = false}) async { final result = await jsonRpcProxy.liveConsultation.initiateLiveConsultationAsync( InitiateLiveConsultationRequest( token: token, consultationCode: consultationCode, checkOnly: checkOnly, ), ); var liveConsultation = LiveConsultation( consultationCode: result.consultationCode, initiatorCode: result.initiatorCode, roomNo: result.roomNo, appId: result.appId, userSign: result.userSign, ); liveConsultation.consultationMemberConvert(result.memberLiveDatas ?? []); //this.onStartLiveConsultation.emit(this, liveConsultation); return liveConsultation; } ///会诊心跳 @override Future heartRateAsync( String consultationCode) async { return await jsonRpcProxy.liveConsultation.heartRateAsync( LiveConsultationHeartRateRequest( token: token, consultationCode: consultationCode, ), ); } //根据会诊单号查询会诊中可直接切换的会诊单列表 @override Future> findCanSwitchConsultationsAsync( String consultationCode) async { return await jsonRpcProxy.liveConsultation.findCanSwitchConsultationsAsync( FindCanSwitchConsultationsRequest( consultationCode: consultationCode, language: i18nBook.locale.toCodeString('-'), token: token, ), ); } ///离开房间 @override Future leaveLiveConsultationAsync( String consultationCode) async { return jsonRpcProxy.liveConsultation.leaveLiveConsultationAsync( LeaveLiveConsultationRequest( consultationCode: consultationCode, token: token, ), ); } ///接受会诊 @override Future acceptLiveConsultationAsync(String consultationCode, {bool checkOnly = false}) async { var result = await jsonRpcProxy.liveConsultation.acceptLiveConsultationAsync( AcceptLiveConsultationRequest( token: token, consultationCode: consultationCode, checkOnly: checkOnly, ), ); var liveConsultation = LiveConsultation( consultationCode: result.consultationCode, userCode: result.userCode, roomNo: result.roomNo, appId: result.appId, userSign: result.userSign, interactiveBoardDatas: result.interactiveBoardDatas, ); liveConsultation.consultationMemberConvert(result.memberLiveDatas ?? []); onAcceptLiveConsultation.emit(this, liveConsultation); return liveConsultation; } ///拒绝会诊 @override Future rejectLiveConsultationAsync( String consultationCode) async { return jsonRpcProxy.liveConsultation .rejectLiveConsultationAsync(RejectLiveConsultationRequest( consultationCode: consultationCode, token: token, )); } @override Future joinInLiveConsultationAsync(String consultationCode, {bool checkOnly = false}) async { final result = await jsonRpcProxy.liveConsultation.joinInLiveConsultationAsync( JoinLiveConsultationRequest( token: token, consultationCode: consultationCode, checkOnly: checkOnly, ), ); var liveConsultation = LiveConsultation( consultationCode: result.consultationCode, userCode: result.userCode, roomNo: result.roomNo, appId: result.appId, userSign: result.userSign, interactiveBoardDatas: result.interactiveBoardDatas, ); liveConsultation.consultationMemberConvert(result.memberLiveDatas ?? []); return liveConsultation; } ///会诊设备重试进入房间 @override Future retryLoadDeviceAsync(String consultationCode) async { await jsonRpcProxy.liveConsultation.deviceJoinInLiveConsultationAsync( JoinLiveConsultationRequest( consultationCode: consultationCode, token: token, ), ); } /// 发送白板数据 @override Future sendInteractiveBoardDataAsync( String consultationCode, String boardData, [bool isClear = false]) async { await jsonRpcProxy.liveConsultation.sendInteractiveBoardDataAsync( SendInteractiveBoardDataRequest( consultationCode: consultationCode, token: token, boardData: boardData, isClear: isClear, ), ); } @override Future queryEmergencyDataAsync() async { return await jsonRpcProxy.liveConsultation.queryEmergencyDataAsync( TokenRequest(token: token), ); } @override Future getEmergencySettingAsync() async { return await jsonRpcProxy.liveConsultation.getEmergencySettingAsync( GetEmergencySettingRequest(token: token), ); } @override Future applyEmergencyTreatment(String selectedUser, String deviceCode, String? patientCode, List? patientDatas) async { return await jsonRpcProxy.liveConsultation.applyEmergencyTreatment( ApplyEmergencyTreatmentRequest( token: token, expertCode: selectedUser, deviceCode: deviceCode, patientCode: patientCode, patientDatas: patientDatas), ); } @override Future startEmergencyConsultationAsync(String consultationId) async { var appointmentManager = Get.find(); var consultationInfo = await appointmentManager.findConsultationDetailAsync(consultationId); if (consultationInfo == null) { return false; } consultationDetail = consultationInfo; var result = await startConsultationAsync(consultationInfo, checkMedia: true, checkOnly: true); return result != null; } @override Future updateConsultationFilesInfoAsync( String consultationCode, String coverUrl, String previewUrl, String sourceUrl, bool isSingle) async { final UpdateConsultationFilesInfoRequest request = UpdateConsultationFilesInfoRequest( token: token, consultationCode: consultationCode, fileInfos: [ ConsultationFileBaseDTO( coverImageUrl: coverUrl, previewImageUrl: previewUrl, sourceUrl: sourceUrl, fileDataType: isSingle ? RemedicalFileDataTypeEnum.ThirdVidSingle : RemedicalFileDataTypeEnum.ThirdVidMovie) ]); return await jsonRpcProxy.liveConsultation .updateConsultationFilesInfoAsync(request); } ///取消会诊过程邀请中的成员 @override Future cancelInvitingInLiveConsultationAsync( String consultationCode, List inviteCodes) { return jsonRpcProxy.liveConsultation.cancelInvitingInLiveConsultationAsync( CancelInvitingInLiveConsultationRequest( consultationCode: consultationCode, inviteCodes: inviteCodes, token: token, )); } ///切换会诊病人 @override Future changeConsultationAsync( String originalConsultationId, String currentConsultationId) async { var result = await jsonRpcProxy.liveConsultation.changeConsultationAsync( ChangeConsultationRequest( token: token, originalCode: originalConsultationId, currentCode: currentConsultationId, ), ); return result; } ///会诊过程中邀请其他成员 @override Future inviteInLiveConsultationAsync( String consultationCode, List inviteCodes, int roomNo) async { return await jsonRpcProxy.liveConsultation .inviteInLiveConsultationAsync(InviteInLiveConsultationRequest( token: token, consultationCode: consultationCode, inviteCodes: inviteCodes, roomNo: roomNo, )); } }