uncomment livecare services

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

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

@ -339,28 +339,28 @@ class _HomeScreenState extends State<HomeScreen> {
"${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}",
onTap: () {
// TODO MOSA TEST
PatiantInformtion patient = PatiantInformtion(
patientStatusType: 43,
episodeNo: 0,
vcId: 42342,
fullName: "mosa test",
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(),
// ),
// PatiantInformtion patient = PatiantInformtion(
// patientStatusType: 43,
// episodeNo: 0,
// vcId: 42342,
// fullName: "mosa test",
// 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(),
),
);
},
));
changeColorIndex();

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

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

Loading…
Cancel
Save