|
|
|
|
@ -46,6 +46,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
|
|
|
|
|
bool isCallFinished = false;
|
|
|
|
|
bool isDischargedPatient = false;
|
|
|
|
|
bool isSearchAndOut = false;
|
|
|
|
|
bool isCallStarted = false;
|
|
|
|
|
String patientType;
|
|
|
|
|
String arrivalType;
|
|
|
|
|
String from;
|
|
|
|
|
@ -228,16 +229,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
if ((isFromLiveCare &&
|
|
|
|
|
patient.appointmentNo != null &&
|
|
|
|
|
patient.appointmentNo != 0) ||
|
|
|
|
|
patient.patientStatusType ==
|
|
|
|
|
43) {
|
|
|
|
|
if ((isFromLiveCare && patient.appointmentNo != null ) || patient.patientStatusType == 43) {
|
|
|
|
|
PostEpisodeReqModel
|
|
|
|
|
postEpisodeReqModel =
|
|
|
|
|
PostEpisodeReqModel(
|
|
|
|
|
appointmentNo:
|
|
|
|
|
patient.appointmentNo,
|
|
|
|
|
int.parse(patient.appointmentNo.toString()),
|
|
|
|
|
patientMRN:
|
|
|
|
|
patient.patientMRN);
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(
|
|
|
|
|
@ -283,10 +280,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
if ((isFromLiveCare &&
|
|
|
|
|
patient.appointmentNo !=
|
|
|
|
|
null &&
|
|
|
|
|
patient.appointmentNo != 0) ||
|
|
|
|
|
if ((isFromLiveCare && patient.appointmentNo != null && patient.appointmentNo != 0) ||
|
|
|
|
|
patient.patientStatusType ==
|
|
|
|
|
43) {
|
|
|
|
|
Navigator.of(context).pushNamed(
|
|
|
|
|
@ -294,7 +288,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
|
|
|
|
|
arguments: {
|
|
|
|
|
'patient': patient
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -331,18 +325,13 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
|
|
|
|
|
title: isCallFinished?
|
|
|
|
|
TranslationBase.of(context).endCall:
|
|
|
|
|
TranslationBase.of(context).initiateCall,
|
|
|
|
|
disabled: model.state == ViewState.BusyLocal,
|
|
|
|
|
disabled: isCallStarted || model.state == ViewState.BusyLocal,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
// Navigator.push(context, MaterialPageRoute(
|
|
|
|
|
// builder: (BuildContext context) =>
|
|
|
|
|
// EndCallScreen(patient:patient)));
|
|
|
|
|
|
|
|
|
|
// TODO MOSA remov it and uncomment the below code
|
|
|
|
|
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
|
|
|
|
|
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/* if(isCallFinished) {
|
|
|
|
|
if(isCallFinished) {
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(
|
|
|
|
|
builder: (BuildContext context) => EndCallScreen(patient:patient)));
|
|
|
|
|
} else {
|
|
|
|
|
@ -354,15 +343,23 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
|
|
|
|
|
Helpers.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
await model.getDoctorProfile();
|
|
|
|
|
patient.appointmentNo = model.startCallRes.appointmentNo;
|
|
|
|
|
patient.appointmentNo = int.parse(model.startCallRes.appointmentNo.toString());
|
|
|
|
|
patient.episodeNo = 0;
|
|
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
isCallStarted = true;
|
|
|
|
|
});
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
|
|
|
|
|
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
|
|
|
|
|
// locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|