uncomment livecare services

merge-requests/779/head
mosazaid 5 years ago
parent a020c9865b
commit 0d3b64af7d

@ -30,12 +30,12 @@ class VideoCallService extends BaseService {
await getDoctorProfile(isGetProfile: true); await getDoctorProfile(isGetProfile: true);
await VideoChannel.openVideoCallScreen( await VideoChannel.openVideoCallScreen(
// TODO MOSA TEST // TODO MOSA TEST
// kToken: startCallRes.openTokenID, kToken: startCallRes.openTokenID,
// kSessionId: startCallRes.openSessionID, kSessionId: startCallRes.openSessionID,
// kApiKey:'46209962', kApiKey:'46209962',
kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGUyZjgxMjFlYTFkNzU5NjcxNDY2ZTM2ZjM3YTVhNTI2NGY0NTI2NzpzZXNzaW9uX2lkPTJfTVg0ME56STBOemsxTkg1LU1UWXlOVGN5TmpnMk5qZzNOMzQ1YUhCcGRtcDFXbVpDTDFkNE1qbDRkWFY2TTA4cmIySi1mZyZjcmVhdGVfdGltZT0xNjI1NzI2ODg5Jm5vbmNlPTAuNjc2Nzc4OTQxNjA1MTMxNSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNjI4MzE4ODg4JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9", // kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGUyZjgxMjFlYTFkNzU5NjcxNDY2ZTM2ZjM3YTVhNTI2NGY0NTI2NzpzZXNzaW9uX2lkPTJfTVg0ME56STBOemsxTkg1LU1UWXlOVGN5TmpnMk5qZzNOMzQ1YUhCcGRtcDFXbVpDTDFkNE1qbDRkWFY2TTA4cmIySi1mZyZjcmVhdGVfdGltZT0xNjI1NzI2ODg5Jm5vbmNlPTAuNjc2Nzc4OTQxNjA1MTMxNSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNjI4MzE4ODg4JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9",
kSessionId: "2_MX40NzI0Nzk1NH5-MTYyNTcyNjg2Njg3N345aHBpdmp1WmZCL1d4Mjl4dXV6M08rb2J-fg", // kSessionId: "2_MX40NzI0Nzk1NH5-MTYyNTcyNjg2Njg3N345aHBpdmp1WmZCL1d4Mjl4dXV6M08rb2J-fg",
kApiKey:'47247954', // kApiKey:'47247954',
vcId: patient.vcId, vcId: patient.vcId,
isRecording: isRecording, isRecording: isRecording,
patientName: patient.fullName ?? patientName: patient.fullName ??
@ -51,8 +51,7 @@ class VideoCallService extends BaseService {
onCallConnected: onCallConnected, onCallConnected: onCallConnected,
onCallDisconnected: onCallDisconnected, onCallDisconnected: onCallDisconnected,
onCallEnd: () { onCallEnd: () {
// mosa todo uncomment WidgetsBinding.instance.addPostFrameCallback((_) async {
/* WidgetsBinding.instance.addPostFrameCallback((_) async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(
locator<NavigationService>().navigatorKey.currentContext); locator<NavigationService>().navigatorKey.currentContext);
endCall( endCall(
@ -70,7 +69,7 @@ class VideoCallService extends BaseService {
"patient": patient, "patient": patient,
}); });
}); });
});*/ });
}, },
onCallNotRespond: (SessionStatusModel sessionStatusModel) { onCallNotRespond: (SessionStatusModel sessionStatusModel) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
@ -96,17 +95,16 @@ class VideoCallService extends BaseService {
} }
Future endCall(int vCID, bool isPatient) async { Future endCall(int vCID, bool isPatient) async {
// mosa todo uncomment hasError = false;
// hasError = false; await getDoctorProfile(isGetProfile: true);
// await getDoctorProfile(isGetProfile: true); EndCallReq endCallReq = new EndCallReq();
// EndCallReq endCallReq = new EndCallReq(); endCallReq.doctorId = doctorProfile.doctorID;
// endCallReq.doctorId = doctorProfile.doctorID; endCallReq.generalid = 'Cs2020@2016\$2958';
// endCallReq.generalid = 'Cs2020@2016\$2958'; endCallReq.vCID = vCID;
// endCallReq.vCID = vCID; endCallReq.isDestroy = isPatient;
// endCallReq.isDestroy = isPatient; await _liveCarePatientServices.endCall(endCallReq);
// await _liveCarePatientServices.endCall(endCallReq); if (_liveCarePatientServices.hasError) {
// if (_liveCarePatientServices.hasError) { error = _liveCarePatientServices.error;
// error = _liveCarePatientServices.error; }
// }
} }
} }

@ -339,28 +339,28 @@ class _HomeScreenState extends State<HomeScreen> {
"${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}", "${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}",
onTap: () { onTap: () {
// TODO MOSA TEST // TODO MOSA TEST
PatiantInformtion patient = PatiantInformtion( // PatiantInformtion patient = PatiantInformtion(
patientStatusType: 43, // patientStatusType: 43,
episodeNo: 0, // episodeNo: 0,
vcId: 42342, // vcId: 42342,
fullName: "mosa test", // fullName: "mosa test",
dateofBirth: "2000-05-01 10:42:35.790004" // dateofBirth: "2000-05-01 10:42:35.790004"
);
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
"patient": patient,
"patientType": "0",
"isSearch": false,
"isInpatient": false,
"arrivalType": "0",
"isSearchAndOut": false,
"isFromLiveCare": true,
});
// Navigator.push(
// context,
// FadePage(
// page: LiveCarePatientScreen(),
// ),
// ); // );
// Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {
// "patient": patient,
// "patientType": "0",
// "isSearch": false,
// "isInpatient": false,
// "arrivalType": "0",
// "isSearchAndOut": false,
// "isFromLiveCare": true,
// });
Navigator.push(
context,
FadePage(
page: LiveCarePatientScreen(),
),
);
}, },
)); ));
changeColorIndex(); changeColorIndex();

@ -309,18 +309,18 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
disabled: isCallStarted || model.state == ViewState.BusyLocal, disabled: isCallStarted || model.state == ViewState.BusyLocal,
onPressed: () async { onPressed: () async {
// TODO MOSA TEST // TODO MOSA TEST
AppPermissionsUtils // AppPermissionsUtils
.requestVideoCallPermission( // .requestVideoCallPermission(
context: context, // context: context,
onTapGrant: () { // onTapGrant: () {
locator<VideoCallService>() // locator<VideoCallService>()
.openVideo( // .openVideo(
model.startCallRes, // model.startCallRes,
patient, // patient,
model.startCallRes != null ? model.startCallRes.isRecording : true, callConnected, // model.startCallRes != null ? model.startCallRes.isRecording : true, callConnected,
callDisconnected); // callDisconnected);
}); // });
/*if (isCallFinished) { if (isCallFinished) {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@ -354,7 +354,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
callDisconnected); callDisconnected);
}); });
} }
}*/ }
}, },
), ),
), ),

@ -35,7 +35,7 @@ class VideoChannel{
"kSessionId": kSessionId, "kSessionId": kSessionId,
"kToken": kToken, "kToken": kToken,
"appLang": "en", "appLang": "en",
"baseUrl": BASE_URL_LIVE_CARE,//TODO change it to live "baseUrl": BASE_URL_LIVE_CARE,
"VC_ID": vcId, "VC_ID": vcId,
"TokenID": tokenID, "TokenID": tokenID,
"generalId": generalId, "generalId": generalId,

Loading…
Cancel
Save