Merge branch 'development_v3.3' of http://34.17.52.79/Haroon6138/diplomatic-quarter into dev_v3.13.6

# Conflicts:
#	lib/config/config.dart
#	lib/core/model/labs/patient_lab_orders.dart
#	lib/core/model/labs/request_patient_lab_special_result.dart
#	lib/core/model/labs/request_send_lab_report_email.dart
#	lib/core/model/radiology/final_radiology.dart
#	lib/core/model/radiology/request_send_rad_report_email.dart
#	lib/core/model/rate/appoitment_rated.dart
#	lib/core/service/client/base_app_client.dart
#	lib/core/service/medical/labs_service.dart
#	lib/core/service/medical/radiology_service.dart
#	lib/core/viewModels/medical/labs_view_model.dart
#	lib/core/viewModels/medical/radiology_view_model.dart
#	lib/models/Authentication/check_activation_code_request.dart
#	lib/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart
#	lib/pages/BookAppointment/BookSuccess.dart
#	lib/pages/BookAppointment/QRCode.dart
#	lib/pages/DrawerPages/family/my-family.dart
#	lib/pages/DrawerPages/notifications/notification_details_page.dart
#	lib/pages/MyAppointments/AppointmentDetails.dart
#	lib/pages/MyAppointments/MyAppointments.dart
#	lib/pages/MyAppointments/widgets/AppointmentActions.dart
#	lib/pages/ToDoList/ToDo.dart
#	lib/pages/landing/landing_page.dart
#	lib/pages/livecare/widgets/clinic_list.dart
#	lib/pages/login/confirm-login.dart
#	lib/pages/login/login.dart
#	lib/pages/medical/labs/laboratory_result_page.dart
#	lib/pages/medical/radiology/radiology_details_page.dart
#	lib/services/authentication/auth_provider.dart
#	lib/splashPage.dart
#	lib/uitl/push-notification-handler.dart
#	lib/widgets/drawer/app_drawer_widget.dart
merge-update-with-lab-changes
Sultan khan 2 years ago
commit 4338da513d

@ -339,7 +339,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 11.3;
var VERSION_ID = 11.5;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;

@ -791,7 +791,7 @@ const Map localizedValues = {
"Upon activation of this service, the system will send a monthly report automatically to the registered email which lists the vital signs and the results for the last visits made in AlHabib Medical Group.",
"ar": "خدمة التقارير الشهرية: عند تفعيل هذه الخدمة سيقوم النظام بارسال تقرير شهري بشكل آلي على الايميل المسجل والذي يسرد المؤشرات الحيوية ونتائج التحاليل لآخر زيارات تمت بمجموعة الحبيب الطبية."
},
"language-setting": {"en": "SMS and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة و الاتصال الآلي"},
"language-setting": {"en": "SMS, WhatsApp and Confirmation Calls Language", "ar": "لغة الرسائل القصيرة والواتس اب وتأكيد المكالمات"},
"alert": {"en": "Alerts", "ar": "التنبيهات"},
"email-alert": {"en": "Alert by Email", "ar": "استلام التنبيهات بالبريد الالكتروني"},
"sms-alert": {"en": "Alert by SMS", "ar": "استلام التنبيهات بالرسائل القصيرة"},

@ -43,3 +43,4 @@ const CLINICS_LIST = 'CLINICS_LIST';
const COVID_QA_LIST = 'COVID_QA_LIST';
const IS_COVID_CONSENT_SHOWN = 'IS_COVID_CONSENT_SHOWN';
const REGISTER_INFO_DUBAI ='register-info-dubai';
const IS_LAST_APPOINTMENT_RATE_SHOWN ='is-last-appointment-rate-shown';

@ -17,6 +17,7 @@ class PatientLabOrders {
String? genderDescription;
String? invoiceNo;
String? invoiceNo_VP;
String? invoiceType;
bool? isActiveDoctorProfile;
bool? isDoctorAllowVedioCall;
bool? isExecludeDoctor;
@ -69,8 +70,10 @@ class PatientLabOrders {
this.projectNameN,
this.qR,
this.setupID,
this.invoiceNo_VP,
this.speciality,this.isLiveCareAppointment});
this.invoiceNo_VP,
this.invoiceType,
this.speciality,
this.isLiveCareAppointment});
PatientLabOrders.fromJson(Map<String, dynamic> json) {
actualDoctorRate = json['ActualDoctorRate'];
@ -106,8 +109,9 @@ class PatientLabOrders {
qR = json['QR'];
setupID = json['SetupID'];
invoiceNo_VP = json['invoiceNo_VP'];
invoiceType = json['InvoiceType'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast<String>();
// speciality = json['Speciality'].cast<String>();
}
Map<String, dynamic> toJson() {
@ -146,7 +150,7 @@ class PatientLabOrders {
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['invoiceNo_VP'] =this.invoiceNo_VP;
data['invoiceNo_VP'] = this.invoiceNo_VP;
return data;
}
}
@ -155,8 +159,7 @@ class PatientLabOrdersList {
String? filterName = "";
List<PatientLabOrders> patientLabOrdersList = [];
PatientLabOrdersList(
{this.filterName, PatientLabOrders? patientDoctorAppointment}) {
patientLabOrdersList.add(patientDoctorAppointment!);
PatientLabOrdersList({this.filterName, required PatientLabOrders patientDoctorAppointment}) {
patientLabOrdersList.add(patientDoctorAppointment);
}
}

@ -1,6 +1,7 @@
class RequestPatientLabSpecialResult {
String? invoiceNo;
String? invoiceNoVP;
String? invoiceType;
String? orderNo;
String? setupID;
String? projectID;
@ -22,27 +23,29 @@ class RequestPatientLabSpecialResult {
RequestPatientLabSpecialResult(
{this.invoiceNo,
this.invoiceNoVP,
this.orderNo,
this.setupID,
this.projectID,
this.clinicID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
this.invoiceType,
this.orderNo,
this.setupID,
this.projectID,
this.clinicID,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
RequestPatientLabSpecialResult.fromJson(Map<String, dynamic> json) {
invoiceNo = json['InvoiceNo'];
invoiceNo = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
orderNo = json['OrderNo'];
setupID = json['SetupID'];
projectID = json['ProjectID'];
@ -66,6 +69,7 @@ class RequestPatientLabSpecialResult {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNoVP;
data['InvoiceType'] = this.invoiceType;
data['OrderNo'] = this.orderNo;
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;

@ -24,6 +24,7 @@ class RequestSendLabReportEmail {
String? projectID;
String? invoiceNo;
String? invoiceNoVP;
String? invoiceType;
String? orderDate;
String? orderNo;
bool? isDownload;
@ -55,6 +56,7 @@ class RequestSendLabReportEmail {
this.projectID,
this.invoiceNo,
this.invoiceNoVP,
this.invoiceType,
this.orderDate,
this.orderNo,
this.isDownload,
@ -86,6 +88,7 @@ class RequestSendLabReportEmail {
projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo'];
invoiceNoVP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
orderDate = json['OrderDate'];
orderNo = json['OrderNo'];
isDownload = json['IsDownload'];
@ -119,6 +122,7 @@ class RequestSendLabReportEmail {
data['ProjectID'] = this.projectID;
data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNoVP;
data['InvoiceType'] = this.invoiceType;
data['OrderDate'] = this.orderDate;
data['OrderNo'] = this.orderNo;
data['IsDownload'] = this.isDownload;

@ -7,6 +7,7 @@ class FinalRadiology {
int? invoiceLineItemNo;
int? invoiceNo;
dynamic invoiceNo_VP;
String? invoiceType;
int? doctorID;
int? clinicID;
DateTime? orderDate;
@ -51,6 +52,7 @@ class FinalRadiology {
this.invoiceLineItemNo,
this.invoiceNo,
this.invoiceNo_VP,
this.invoiceType,
this.doctorID,
this.clinicID,
this.orderDate,
@ -96,6 +98,7 @@ class FinalRadiology {
invoiceLineItemNo = json['InvoiceLineItemNo'];
invoiceNo = json['InvoiceNo'];
invoiceNo_VP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
orderDate = DateUtil.convertStringToDate(json['OrderDate']);
@ -145,6 +148,7 @@ class FinalRadiology {
data['InvoiceLineItemNo'] = this.invoiceLineItemNo;
data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNo_VP;
data['InvoiceType'] = this.invoiceType;
data['DoctorID'] = this.doctorID;
data['ClinicID'] = this.clinicID;
data['OrderDate'] = this.orderDate;

@ -7,6 +7,7 @@ class RequestSendRadReportEmail {
String? generalid;
int? invoiceNo;
int? invoiceNo_VP;
String? invoiceType;
String? iPAdress;
bool? isDentalAllowedBackend;
int? languageID;
@ -30,32 +31,33 @@ class RequestSendRadReportEmail {
RequestSendRadReportEmail(
{this.channel,
this.clinicName,
this.dateofBirth,
this.deviceTypeID,
this.doctorName,
this.generalid,
this.invoiceNo,
this.invoiceNo_VP,
this.iPAdress,
this.isDentalAllowedBackend,
this.languageID,
this.orderDate,
this.patientID,
this.patientIditificationNum,
this.patientMobileNumber,
this.patientName,
this.patientOutSA,
this.patientType,
this.patientTypeID,
this.projectID,
this.projectName,
this.radResult,
this.sessionID,
this.setupID,
this.to,
this.tokenID,
this.versionID});
this.clinicName,
this.dateofBirth,
this.deviceTypeID,
this.doctorName,
this.generalid,
this.invoiceNo,
this.invoiceNo_VP,
this.invoiceType,
this.iPAdress,
this.isDentalAllowedBackend,
this.languageID,
this.orderDate,
this.patientID,
this.patientIditificationNum,
this.patientMobileNumber,
this.patientName,
this.patientOutSA,
this.patientType,
this.patientTypeID,
this.projectID,
this.projectName,
this.radResult,
this.sessionID,
this.setupID,
this.to,
this.tokenID,
this.versionID});
RequestSendRadReportEmail.fromJson(Map<String, dynamic> json) {
channel = json['Channel'];
@ -66,6 +68,7 @@ class RequestSendRadReportEmail {
generalid = json['generalid'];
invoiceNo = json['InvoiceNo'];
invoiceNo_VP = json['InvoiceNo_VP'];
invoiceType = json['InvoiceType'];
iPAdress = json['IPAdress'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
languageID = json['LanguageID'];
@ -98,6 +101,7 @@ class RequestSendRadReportEmail {
data['generalid'] = this.generalid;
data['InvoiceNo'] = this.invoiceNo;
data['InvoiceNo_VP'] = this.invoiceNo_VP;
data['InvoiceType'] = this.invoiceType;
data['IPAdress'] = this.iPAdress;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['LanguageID'] = this.languageID;

@ -8,8 +8,10 @@ class AppointmentRateService extends BaseService {
List<AppoitmentRated> appointmentRatedList =[];
AppointmentDetails? appointmentDetails;
Future getIsLastAppointmentRatedList() async {
Future getIsLastAppointmentRatedList(int languageID) async {
hasError = false;
Map<String, dynamic> bodyData = Map();
bodyData['LanguageID'] = languageID;
await baseAppClient.post(IS_LAST_APPOITMENT_RATED, onSuccess: (dynamic response, int statusCode) {
appointmentRatedList.clear();
response['IsLastAppoitmentRatedList'].forEach((appoint) {
@ -18,7 +20,7 @@ class AppointmentRateService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: Map());
}, body: bodyData);
}
Future getAppointmentDetails() async {

@ -73,14 +73,29 @@ class BaseAppClient {
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = (languageID == 'ar' ? 1 : 2);
if (body.containsKey('LanguageID')) {
if(body['LanguageID'] != null) {
body['LanguageID'] = body['LanguageID'];
} else {
body['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
}
} else {
// body['LanguageID'] = (languageID.toString().toLowerCase() == 'ar' ? 1 : 2);
body['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
}
// body['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;
// body['isVidaPlus'] = true;
body['Latitude'] = await AppSharedPreferences().getDouble(USER_LAT);
body['Longitude'] = await AppSharedPreferences().getDouble(USER_LONG);
double? lat = await AppSharedPreferences().getDouble(USER_LAT);
double? long = await AppSharedPreferences().getDouble(USER_LONG);
body['Latitude'] = lat == null ? 0.0 : lat;
body['Longitude'] = long == null ? 0.0 : long;
if (body.containsKey('isDentalAllowedBackend')) {
body['isDentalAllowedBackend'] = body.containsKey('isDentalAllowedBackend')
@ -90,7 +105,11 @@ class BaseAppClient {
: IS_DENTAL_ALLOWED_BACKEND;
}
body['DeviceTypeID'] = Platform.isIOS ? 1 : await Utils.isGoogleServicesAvailable() ? 2 : 3;
body['DeviceTypeID'] = Platform.isIOS
? 1
: await Utils.isGoogleServicesAvailable()
? 2
: 3;
if (!body.containsKey('IsPublicRequest')) {
// if (!body.containsKey('PatientType')) {
@ -150,7 +169,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021";
// body['PatientID'] = 4767370; //3844083
// body['PatientID'] = 1231755; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574

@ -34,7 +34,7 @@ class LabsService extends BaseService {
List<LabResult> labResultList = [];
List<LabOrderResult> labOrdersResultsList = [];
Future getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? orderNo, String? setupID, bool? isVidaPlus}) async {
Future getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? invoiceType, String? orderNo, String? setupID, bool? isVidaPlus}) async {
hasError = false;
_requestPatientLabSpecialResult.projectID = projectID;
_requestPatientLabSpecialResult.clinicID = clinicID;
@ -42,6 +42,8 @@ class LabsService extends BaseService {
_requestPatientLabSpecialResult.invoiceNo = isVidaPlus! ? "0" : invoiceNo;
_requestPatientLabSpecialResult.invoiceNoVP = isVidaPlus ? invoiceNo : "0";
_requestPatientLabSpecialResult.invoiceType = invoiceType!;
_requestPatientLabSpecialResult.orderNo = orderNo;
_requestPatientLabSpecialResult.setupID = setupID;
@ -61,6 +63,7 @@ class LabsService extends BaseService {
Map<String, dynamic> body = Map();
body['InvoiceNo_VP'] = isVidaPlus! ? patientLabOrder!.invoiceNo : "0";
body['InvoiceNo'] = isVidaPlus ? "0" : patientLabOrder!.invoiceNo;
body['InvoiceType'] = patientLabOrder!.invoiceType;
body['OrderNo'] = patientLabOrder!.orderNo;
body['isDentalAllowedBackend'] = false;
body['SetupID'] = patientLabOrder.setupID;
@ -205,6 +208,7 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.projectID = patientLabOrder!.projectID;
_requestSendLabReportEmail.invoiceNo = isVidaPlus ? "0" : patientLabOrder.invoiceNo;
_requestSendLabReportEmail.invoiceNoVP = isVidaPlus ? patientLabOrder.invoiceNo : "0";
_requestSendLabReportEmail.invoiceType = patientLabOrder.invoiceType;
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
_requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
_requestSendLabReportEmail.patientName = userObj!.firstName! + " " + userObj.lastName!;

@ -10,13 +10,14 @@ class RadiologyService extends BaseService {
bool isRadiologyVIDAPlus = false;
Future getRadImageURL({int? invoiceNo, int? lineItem, int? projectId, bool? isVidaPlus}) async {
Future getRadImageURL({int? invoiceNo, String? invoiceType, int? lineItem, int? projectId, bool? isVidaPlus}) async {
hasError = false;
final Map<String, dynamic> body = new Map<String, dynamic>();
body['InvoiceNo'] = isVidaPlus! ? "0" : invoiceNo;
body['InvoiceNo_VP'] = isVidaPlus ? invoiceNo : "0";
body['LineItemNo'] = lineItem;
body['ProjectID'] = projectId;
body['InvoiceType'] = invoiceType;
await baseAppClient.post(GET_RAD_IMAGE_URL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {
url = response['Data'];
@ -79,6 +80,7 @@ class RadiologyService extends BaseService {
_requestSendRadReportEmail.radResult = finalRadiology.reportData;
_requestSendRadReportEmail.to = userObj.emailAddress;
_requestSendRadReportEmail.dateofBirth = userObj.dateofBirth;
_requestSendRadReportEmail.invoiceType = finalRadiology.invoiceType;
hasError = false;
await baseAppClient.post(SEND_RAD_REPORT_EMAIL, isAllowAny: true, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {

@ -15,6 +15,7 @@ class PrivilegeService extends BaseService {
Future getPrivilege() async {
Map<String, dynamic> body = Map();
body['PatientType'] = 4;
body['LanguageID'] = 1;
await baseAppClient.post(GET_PRIVILEGE, onSuccess: (dynamic response, int statusCode) {
response['ServicePrivilegeList'].forEach((item) {
privilegeModelList.add(PrivilegeModel.fromJson(item));

@ -12,10 +12,10 @@ class AppointmentRateViewModel extends BaseViewModel {
AppointmentDetails get appointmentDetails => _appointmentRateService.appointmentDetails!;
Future getIsLastAppointmentRatedList() async {
Future getIsLastAppointmentRatedList(int languageID) async {
isHaveAppointmentNotRate = false;
setState(ViewState.Busy);
await _appointmentRateService.getIsLastAppointmentRatedList();
await _appointmentRateService.getIsLastAppointmentRatedList(languageID);
if (_appointmentRateService.hasError) {
error = _appointmentRateService.error!;
setState(ViewState.Error);

@ -74,9 +74,15 @@ class LabsViewModel extends BaseViewModel {
List<LabResultList> labResultLists = [];
getLaboratoryResult({required String projectID, required int clinicID, required String invoiceNo, required String orderNo, required String setupID, required bool isVidaPlus}) async {
getLaboratoryResult({String? projectID, int? clinicID, String? invoiceNo, String? invoiceType, String? orderNo, String? setupID, bool? isVidaPlus}) async {
setState(ViewState.Busy);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo, orderNo: orderNo, projectID: projectID, clinicID: clinicID, setupID: setupID, isVidaPlus: isVidaPlus);
await _labsService.getLaboratoryResult(invoiceNo: invoiceNo,
invoiceType: invoiceType,
orderNo: orderNo,
projectID: projectID,
clinicID: clinicID,
setupID: setupID,
isVidaPlus: isVidaPlus);
if (_labsService.hasError) {
error = _labsService.error!;
setState(ViewState.Error);

@ -48,9 +48,9 @@ class RadiologyViewModel extends BaseViewModel {
String get radImageURL => _radiologyService.url;
getRadImageURL({required int invoiceNo, required int lineItem, required int projectId, required bool isVidaPlus}) async {
getRadImageURL({required int invoiceNo, String? invoiceType, required int lineItem, required int projectId, required bool isVidaPlus}) async {
setState(ViewState.Busy);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus);
await _radiologyService.getRadImageURL(invoiceNo: invoiceNo, invoiceType: invoiceType, lineItem: lineItem, projectId: projectId, isVidaPlus: isVidaPlus);
if (_radiologyService.hasError) {
error = _radiologyService.error!;
setState(ViewState.Error);

@ -41,7 +41,7 @@ class CheckActivationCodeReq {
this.isSilentLogin,
this.versionID,
this.channel,
this.languageID,
// this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
@ -68,7 +68,7 @@ class CheckActivationCodeReq {
isSilentLogin = json['IsSilentLogin'];
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
// languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
@ -96,7 +96,7 @@ class CheckActivationCodeReq {
data['IsSilentLogin'] = this.isSilentLogin;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
// data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;

@ -1,7 +1,7 @@
class GetAllSharedRecordsByStatusReq {
double? versionID;
int? channel;
int? languageID;
//int? languageID;
String? iPAdress;
String? generalid;
int? patientOutSA;
@ -17,7 +17,7 @@ class GetAllSharedRecordsByStatusReq {
GetAllSharedRecordsByStatusReq(
{this.versionID,
this.channel,
this.languageID,
// this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
@ -33,7 +33,7 @@ class GetAllSharedRecordsByStatusReq {
GetAllSharedRecordsByStatusReq.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
// languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
@ -51,7 +51,7 @@ class GetAllSharedRecordsByStatusReq {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
// data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;

@ -159,27 +159,54 @@ class _BookSuccessState extends State<BookSuccess> {
Widget _getQRButtons() {
return Container(
alignment: Alignment.bottomCenter,
margin: EdgeInsets.all(14),
height: MediaQuery.of(context).size.height * 0.18,
margin: EdgeInsets.only(bottom: 24),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
// navigateToQR(context);
GifLoaderDialogUtils.showMyDialog(context);
getAppoQR(context);
},
child: Text(TranslationBase.of(context).viewQR.toUpperCase(), style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
Row(
children: [
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: CustomTextButton(
backgroundColor: CustomColors.green,
elevation: 0,
onPressed: () {
GifLoaderDialogUtils.showMyDialog(context);
getAppoQR(context);
},
child: Text(TranslationBase.of(context).checkinOptions, style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
),
),
mWidth(7),
Expanded(
flex: 1,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: CustomTextButton(
backgroundColor: Color(0xffc5272d),
elevation: 0,
onPressed: () {
navigateToHome(context);
// GifLoaderDialogUtils.showMyDialog(context);
// getAppoQR(context);
},
child: Text(TranslationBase.of(context).done, style: TextStyle(fontSize: 18.0, color: Colors.white)),
),
),
),
],
),
],
),

@ -62,13 +62,9 @@ class _QRCodeState extends State<QRCode> {
// _bytes = base64.decode(widget.appoQR.split(',').last);
widget.authUser = new AuthenticatedUser();
FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = (value == NFCAvailability.available);
});
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// startNFCScan();
});
// });
super.initState();
}
@ -77,7 +73,7 @@ class _QRCodeState extends State<QRCode> {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
sendNfcCheckInRequest(nfcId,2);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
});
}, onCancel: () {
@ -90,7 +86,7 @@ class _QRCodeState extends State<QRCode> {
startQRCodeScan() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {
sendNfcCheckInRequest(onlineCheckInQRCode);
sendNfcCheckInRequest(onlineCheckInQRCode, 2);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
} else {}
}
@ -102,7 +98,7 @@ class _QRCodeState extends State<QRCode> {
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
print(dist);
if (dist <= projectDetailListModel.geofenceRadius!) {
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!);
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!,2);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
}
@ -113,6 +109,9 @@ class _QRCodeState extends State<QRCode> {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
_context = context;
FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = (value == NFCAvailability.available);
});
List<Widget> checkInOptionsList = getCheckInOptionsList(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).onlineCheckIn,
@ -160,7 +159,8 @@ class _QRCodeState extends State<QRCode> {
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
sendNfcCheckInRequest(nfcId, 2);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
});
}, onCancel: () {
@ -242,8 +242,10 @@ class _QRCodeState extends State<QRCode> {
optionsList.add(
InkWell(
onTap: () {
if (projectViewModel.havePrivilege(80)) {
if (projectViewModel.havePrivilege(80) && _supportsNFC) {
startNFCScan();
} else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
}
},
child: MedicalProfileItem(
@ -377,12 +379,12 @@ class _QRCodeState extends State<QRCode> {
return docSpeciality;
}
sendNfcCheckInRequest(String nfcId) {
sendNfcCheckInRequest(String nfcId, int checkInBy) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.sendCheckinNfcRequest(widget.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, context).then((res) {
service.sendCheckinNfcRequest(widget!.patientShareResponse!.appointmentNo!, nfcId, widget.patientShareResponse!.projectID!, checkInBy, context).then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context);

@ -426,10 +426,11 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
}
getCurrentLanguage() async {
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
setState(() {
this.language = languageID;
});
this.language = projectViewModel.isArabic ? "ar" : "en";
// var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
// setState(() {
// this.language = languageID;
// });
}
}

@ -456,15 +456,14 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
switchUser(user, context) {
GifLoaderDialogUtils.showMyDialog(context);
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
// this
// .familyFileProvider
// .silentLoggin(user)
// .then((value) => loginAfter(value, context));
// Utils.showProgressDialog(context);
this.familyFileProvider.silentLoggin(user, mainUser: user).then((value) {
loginAfter(value, context);
}).catchError((err) {
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, languageID, mainUser: user is AuthenticatedUser).then((value) => loginAfter(value, context)).catchError((err) {
print("err:$err");
AppToast.showErrorToast(message: err.toString());
Navigator.of(context).pop();
@ -560,7 +559,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
GifLoaderDialogUtils.showMyDialog(context);
try {
if (familySharedRecords == null) {
familySharedRecords = await familyFileProvider.getSharedRecordByStatus();
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
familySharedRecords = await familyFileProvider.getSharedRecordByStatus(languageID);
}
sentRecordsList = [];
familySharedRecordsList = [];

@ -81,6 +81,16 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
letterSpacing: -0.64,
),
),
SizedBox(height: 18),
Text(
widget.notification!.message!.trim(),
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
letterSpacing: -0.48,
),
),
if (widget.notification.notificationType == "2")
Padding(
padding: const EdgeInsets.only(top: 18),
@ -105,15 +115,24 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
}, fit: BoxFit.fill),
),
SizedBox(height: 18),
Text(
widget.notification.message!.trim(),
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
letterSpacing: -0.48,
),
),
// Text(
// widget.notification.message!.trim(),
// style: TextStyle(
// fontSize: 12,
// fontWeight: FontWeight.w600,
// color: Color(0xff575757),
// letterSpacing: -0.48,
// ),
// ),
// Text(
// widget.notification.message.trim(),
// style: TextStyle(
// fontSize: 12,
// fontWeight: FontWeight.w600,
// color: Color(0xff575757),
// letterSpacing: -0.48,
// ),
// ),
],
),
);

@ -5,8 +5,10 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -52,6 +54,8 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
int _currentPage = 0;
ToDoCountProviderModel? toDoProvider;
@override
void initState() {
filterType = FilterType.Clinic;
@ -72,6 +76,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
@override
Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).myAppointmentsList,
isShowAppBar: true,
@ -168,6 +173,19 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
print(err);
AppToast.showErrorToast(message: err);
});
getToDoCount();
}
getToDoCount() {
toDoProvider!.setState(0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider!.setState(res['AppointmentActiveNumber'], true, "0");
} else {}
}).catchError((err) {
print(err);
});
}
bool isConfirmed(AppoitmentAllHistoryResultList appo) {
@ -378,9 +396,9 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
isLiveCareAppointment: _appointmentResult.isLiveCareAppointment,
date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate!),
isSortByClinic: _isSortByClinic,
rating: _appointmentResult.actualDoctorRate! + 0.0,
appointmentTime: _appointmentResult.isLiveCareAppointment
! ? DateUtil.convertStringToDate(_appointmentResult.appointmentDate!).toString().split(" ")[1].substring(0, 5)
rating: _appointmentResult.actualDoctorRate + 0.0,
appointmentTime: _appointmentResult.isLiveCareAppointment!
? DateUtil.convertStringToDate(_appointmentResult.appointmentDate).toString().split(" ")[1].substring(0, 5)
: _appointmentResult.startTime!.substring(0, 5),
// appointmentTime: _appointmentResult.startTime.substring(0, 5),
remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED)

@ -30,19 +30,19 @@ class BookedButtonsAllowCheckIn {
{
"title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "reminder_icon.png",
"icon": "assets/images/new-design/reminder_icon.png",
"caller": "addReminder",
},
{
"title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "location_icon.png",
"icon": "assets/images/new-design/location_icon.png",
"caller": "navigateToProject",
},
{
"title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "check-in.png",
"icon": "assets/images/new-design/check-in.png",
"caller": "goToTodoList",
}
];

@ -99,6 +99,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
hasBadge: true,
isEnable: !shouldEnable,
imgColor: Color(0xff28323A),
isPngImage: appoButtonsList[index].icon!.contains(".png") ? true : false,
),
);
},
@ -481,8 +482,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
askYourDoc() {
GifLoaderDialogUtils.showMyDialog(context);
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
DoctorsListService service = new DoctorsListService();
service.isAllowedToAskDoctor(widget.appo.doctorID!, context).then((res) {
service.isAllowedToAskDoctor(widget.appo.doctorID!,languageID, context).then((res) {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
service.isAllowedToAskDoctor(widget.appo.doctorID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['PatientDoctorAppointmentResultList']);
if (res['PatientDoctorAppointmentResultList'].length != 0) {
@ -495,12 +500,14 @@ class _AppointmentActionsState extends State<AppointmentActions> {
print(err);
AppToast.showErrorToast(message: err);
});
}
});
}
getCallRequestType() {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getCallRequestType(context).then((res) {
service.getCallRequestType(languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
List<AskDocRequestType> requestData = [];
res['ListReqTypes'].forEach((element) {
@ -543,9 +550,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
sendAskDocRequest(int requestType) {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.sendAskDocCallRequest(widget.appo, requestType.toString(), context).then((res) {
service.sendAskDocCallRequest(widget.appo, requestType.toString(), languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Request Sent Successfully");
@ -621,33 +630,34 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
}
getPatientAppointmentHistoryWithAppo() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getPatientAppointmentHistoryWithAppoNo(widget.appo.appointmentNo).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList.fromJson(res['AppoimentAllHistoryResultList'][0]);
Navigator.push(
context,
FadePage(
page: ToDo(
isShowAppBar: true,
isFromMyAppointments: true,
appointment: appo,
getPatientAppointmentHistoryWithAppo() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
service.getPatientAppointmentHistoryWithAppoNo(widget.appo.appointmentNo, languageID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList.fromJson(res['AppoimentAllHistoryResultList'][0]);
Navigator.push(
context,
FadePage(
page: ToDo(
isShowAppBar: true,
isFromMyAppointments: true,
appointment: appo,
),
),
),
);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
err != null ?? AppToast.showErrorToast(message: err);
});
}
);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
err != null ?? AppToast.showErrorToast(message: err);
});
}
rateAppointment() {
widget.browser = new MyInAppBrowser();
var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1';

@ -20,6 +20,7 @@ import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -50,9 +51,8 @@ class ToDo extends StatefulWidget {
List<AppoitmentAllHistoryResultList> appoList = [];
List<AncillaryOrdersListModel> ancillaryLists = [];
List<OBGyneProcedureListResponse> obGyneAppoList = [];
late var languageID;
late MyInAppBrowser browser;
var languageID;
MyInAppBrowser? browser;
bool isShowAppBar = true;
Function()? onBackClick;
bool isFromMyAppointments;
@ -84,6 +84,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
bool isInsured = false;
bool isEligible = false;
bool isCash = false;
MyInAppBrowser? browser;
@override
void initState() {
@ -877,7 +878,19 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
GifLoaderDialogUtils.hideDialog(context);
err != null ?? AppToast.showErrorToast(message: err);
});
// getAncillaryOrders();
getToDoCount();
}
getToDoCount() {
toDoProvider.setState(0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
} else {}
}).catchError((err) {
print(err);
});
}
checkPatientNphiesEligibility(context, AppoitmentAllHistoryResultList appo) {
@ -999,23 +1012,23 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
patientShareResponse.projectID = appo.projectID;
patientShareResponse.isFollowup = appo.isFollowup;
FlutterNfcKit.nfcAvailability.then((value) {
if (value == NFCAvailability.available) {
PatientShareResponse patientShareResponse = new PatientShareResponse();
patientShareResponse.doctorNameObj = appo.doctorNameObj;
patientShareResponse.doctorSpeciality = appo.doctorSpeciality;
patientShareResponse.projectName = appo.projectName;
patientShareResponse.appointmentDate = appo.appointmentDate;
patientShareResponse.appointmentNo = appo.appointmentNo;
patientShareResponse.clinicID = appo.clinicID;
patientShareResponse.projectID = appo.projectID;
patientShareResponse.isFollowup = appo.isFollowup;
navigateToQR(context, "", patientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
} else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
}
});
// FlutterNfcKit.nfcAvailability.then((value) {
// if (value == NFCAvailability.available) {
// PatientShareResponse patientShareResponse = new PatientShareResponse();
patientShareResponse.doctorNameObj = appo.doctorNameObj;
patientShareResponse.doctorSpeciality = appo.doctorSpeciality;
patientShareResponse.projectName = appo.projectName;
patientShareResponse.appointmentDate = appo.appointmentDate;
patientShareResponse.appointmentNo = appo.appointmentNo;
patientShareResponse.clinicID = appo.clinicID;
patientShareResponse.projectID = appo.projectID;
patientShareResponse.isFollowup = appo.isFollowup;
navigateToQR(context, "", patientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
// } else {
// Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
// }
// });
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
DoctorsListService service = new DoctorsListService();
@ -1069,7 +1082,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
openPayment(paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
widget.browser.openPaymentBrowser(
browser?.openPaymentBrowser(
amount,
"Appointment check in",
Utils.getAppointmentTransID(appo.projectID!, appo.clinicID!, appo.appointmentNo!),
@ -1080,7 +1093,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
authenticatedUser.firstName!,
authenticatedUser.patientID,
authenticatedUser,
widget.browser,
widget!.browser!,
appo.isLiveCareAppointment!,
"2",
appo.isLiveCareAppointment! ? widget.patientShareResponse.clinicID.toString() : "",
@ -1111,7 +1124,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
// if(selectedPaymentMethod != "TAMARA") {
MyInAppBrowser.successURLS.forEach((element) {
if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close();
browser?.close();
MyInAppBrowser.isPaymentDone = true;
return;
}
@ -1121,7 +1134,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
// if(selectedPaymentMethod != "TAMARA") {
MyInAppBrowser.errorURLS.forEach((element) {
if (url.contains(element)) {
if (widget.browser.isOpened()) widget.browser.close();
browser?.close();
MyInAppBrowser.isPaymentDone = false;
return;
}

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/geofencing/requests/GeoZonesRequestModel.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/geofencing/GeofencingServices.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -17,6 +18,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
@ -36,6 +38,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -70,6 +73,7 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var authProvider = new AuthProvider();
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
int currentTab = 0;
late PageController pageController;
@ -275,7 +279,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin && !projectViewModel.isLoginChild) {
familyFileProvider.getSharedRecordByStatus();
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
familyFileProvider.getSharedRecordByStatus(languageID);
}
});
@ -347,7 +352,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
setUserValues(value);
@ -620,7 +625,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void checkUserStatus(token) async {
await PushNotificationHandler.getInstance().requestPermissions();
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES value) => setUserValues(value));
authService.selectDeviceImei(token).then((SelectDeviceIMEIRES? value) => setUserValues(value));
if (authenticatedUserObject.isLogin) {
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
if (data != null) {

@ -103,25 +103,25 @@ class _clinic_listState extends State<ClinicList> {
});
}
});
getLanguageID();
super.initState();
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
getLanguageID();
return Container(
child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList(),
);
}
void startLiveCare() {
int languageID = projectViewModel.isArabic ? 1 : 2;
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, context).then((res) {
service.getERAppointmentFees(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
isError = true;
@ -184,9 +184,10 @@ class _clinic_listState extends State<ClinicList> {
}
getERAppointmentTime(GetERAppointmentFeesList getERAppointmentFeesList) {
int languageID = projectViewModel.isArabic ? 1 : 2;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, context).then((res) {
service.getERAppointmentTime(selectedClinicID, widget.isPharmacyLiveCare, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) {
@ -505,7 +506,8 @@ class _clinic_listState extends State<ClinicList> {
}
getLanguageID() async {
languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
languageID = projectViewModel.isArabic ? "ar" : "en";
// languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
}
getLiveCareClinicsList() {
@ -758,11 +760,12 @@ class _clinic_listState extends State<ClinicList> {
}
void startScheduleLiveCare() {
int languageID = projectViewModel.isArabic ? 1 : 2;
List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =[];
service.getLiveCareScheduledDoctorList(context, selectedClinicID).then((res) {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
service.getLiveCareScheduledDoctorList(context, selectedClinicID, languageID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {

@ -602,6 +602,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
{
// if(widget.isDubai ==false){
widget.changePageViewIndex!(1),
// if(widget.isDubai ==false){
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RegisterNew)),
}
}
@ -744,37 +746,17 @@ class _ConfirmLogin extends State<ConfirmLogin> {
projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true);
// getToDoCount();
GifLoaderDialogUtils.hideDialog(context);
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
getToDoCount(),
checkIfIsInPatient(),
GifLoaderDialogUtils.hideDialog(AppGlobal.context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false)
},
insertIMEI()
})
.catchError((err) {
print(err);
});
getToDoCount();
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false);
insertIMEI();
}
loading(flag) {

@ -359,9 +359,9 @@ class _Login extends State<Login> {
projectViewModel.isLogin = true;
authenticatedUserObject.user = result.list;
projectViewModel.user = authenticatedUserObject.user;
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.getIsLastAppointmentRatedList(languageID)
.then((value) => {
checkIfIsInPatient(),
getToDoCount(),
@ -410,7 +410,7 @@ class _Login extends State<Login> {
bool hasAdmissionRequest = false;
GetAdmissionInfoResponseModel getAdmissionInfoResponseModel;
GetAdmissionRequestInfoResponseModel getAdmissionRequestInfoResponseModel;
ClinicListService service = new ClinicListService();
ClinicListService? service = new ClinicListService();
service.checkIfInPatientAPI(context).then((res) {
if (res['MessageStatus'] == 1) {
isAdmitted = res['isAdmitted'];

@ -705,7 +705,8 @@ class _RegisterInfo extends State<RegisterInfo> {
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true);
appointmentRateViewModel.getIsLastAppointmentRatedList().then((value) {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).then((value) {
getToDoCount();
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
if (appointmentRateViewModel.isHaveAppointmentNotRate) {

@ -27,7 +27,8 @@ class _RequestTypePageState extends State<RequestTypePage> {
@override
Widget build(BuildContext context) {
return BaseView<AskDoctorViewModel>(
onModelReady: (model) => model.getQuestionTypes(),
// onModelReady: (model) => model.getQuestionTypes(),
onModelReady: (model) => model.getCallRequestTypeLOVs(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).requestType,

@ -34,11 +34,12 @@ class _LaboratoryResultPageState extends State<LaboratoryResultPage> {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLaboratoryResult(
invoiceNo: widget.patientLabOrders!.invoiceNo!,
clinicID: widget.patientLabOrders!.clinicID!,
projectID: widget.patientLabOrders!.projectID!,
orderNo: widget.patientLabOrders!.orderNo!,
setupID: widget.patientLabOrders!.setupID ?? "0",
invoiceNo: widget.patientLabOrders!.invoiceNo,
invoiceType: widget.patientLabOrders!.invoiceType,
clinicID: widget.patientLabOrders!.clinicID,
projectID: widget.patientLabOrders!.projectID,
orderNo: widget.patientLabOrders!.orderNo,
setupID: widget.patientLabOrders!.setupID,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, int.parse(widget.patientLabOrders!.projectID!)),
),
builder: (_, model, w) => AppScaffold(

@ -29,6 +29,7 @@ class RadiologyDetailsPage extends StatelessWidget {
return BaseView<RadiologyViewModel>(
onModelReady: (model) => model.getRadImageURL(
projectId: finalRadiology!.projectID!,
invoiceType: finalRadiology!.invoiceType,
lineItem: finalRadiology!.invoiceLineItemNo!,
invoiceNo: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!) ? finalRadiology!.invoiceNo_VP : finalRadiology!.invoiceNo,
isVidaPlus: Utils.isVidaPlusProject(projectViewModel, finalRadiology!.projectID!)),

@ -292,7 +292,7 @@ class _PackagesHomePageState extends State<PackagesHomePage> {
} else {
GifLoaderDialogUtils.showMyDialog(context);
auth.AuthProvider().selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
auth.AuthProvider().selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
sharedPref.setObject(IMEI_USER_DATA, value);

@ -324,7 +324,7 @@ class _FooterWidgetState extends State<FooterWidget> {
GifLoaderDialogUtils.showMyDialog(context);
authService
.selectDeviceImei(DEVICE_TOKEN)
.then((SelectDeviceIMEIRES value) {
.then((SelectDeviceIMEIRES? value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
setUserValues(value);

@ -191,11 +191,17 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
child: DefaultButton(
TranslationBase.of(context).later,
() {
Navigator.pushReplacement(
// Navigator.pushReplacement(
// context,
// FadePage(
// page: LandingPage(),
// ),
// );
Navigator.pop(
context,
);
Navigator.pop(
context,
FadePage(
page: LandingPage(),
),
);
},
color: CustomColors.accentColor,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -15,6 +16,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RateAppointmentDoctor extends StatefulWidget {
@ -30,9 +32,11 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
final formKey = GlobalKey<FormState>();
String note = "";
int rating = 0;
ProjectViewModel? projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<AppointmentRateViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
@ -189,12 +193,21 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
});
dialog.showAlertDialog(context);
} else {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
);
if(projectViewModel!.isLoginChild) {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
);
} else {
Navigator.pop(
context,
// FadePage(
// page: LandingPage(),
// ),
);
}
}
},
color: CustomColors.accentColor,

@ -46,10 +46,9 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG);
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
// Request req = appGlobal.getPublicRequest();
request = {
// "LanguageID": languageID == 'ar' ? 1 : 2,
//
// "IPAdress": "10.20.10.20",
// "VersionID": req.VersionID,
// "Channel": req.Channel,
@ -104,10 +103,8 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG);
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
@ -143,10 +140,9 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsProfile(int docID, int clinicID, int projectID, context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
@ -176,10 +172,9 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsRating(int docID, context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
@ -227,10 +222,9 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorsRatingDetails(int docID, context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
@ -258,7 +252,7 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorFreeSlots(int docID, int clinicID, int projectID, BuildContext context, [ProjectViewModel? projectViewModel]) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"DoctorID": docID,
@ -270,7 +264,6 @@ class DoctorsListService extends BaseService {
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
@ -301,7 +294,7 @@ class DoctorsListService extends BaseService {
Future<Map> getDoctorScheduledFreeSlots(int docID, int clinicID, int projectID, int serviceID, BuildContext context) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"DoctorID": docID,
@ -314,7 +307,6 @@ class DoctorsListService extends BaseService {
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authUser.outSA,
@ -342,7 +334,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsForLiveCare": false,
@ -366,7 +357,6 @@ class DoctorsListService extends BaseService {
"Age": authUser.age != null ? authUser.age : 0,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -410,7 +400,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsForLiveCare": true,
@ -433,7 +422,6 @@ class DoctorsListService extends BaseService {
"GenderID": authUser.gender,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -463,7 +451,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -473,7 +460,6 @@ class DoctorsListService extends BaseService {
"IsActiveAppointment": true,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -522,7 +508,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -533,7 +518,6 @@ class DoctorsListService extends BaseService {
"IsForLiveCare": true,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -563,17 +547,9 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"ProjectID": 15,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
request = {"ProjectID": 15, "DeviceTypeID": req.DeviceTypeID, "PatientID": authUser.patientID, "PatientTypeID": authUser.patientType, "PatientType": authUser.patientType};
dynamic localRes;
@ -593,11 +569,9 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"ProjectID": projectID,
"SetupID": setupID,
"isDentalAllowedBackend": false,
@ -617,9 +591,9 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientAppointmentHistoryWithAppoNo(int appoNo) async {
Future<Map> getPatientAppointmentHistoryWithAppoNo(int appoNo, int languageID) async {
Map<String, dynamic> request;
request = {"IsActiveAppointment": true, "AppointmentNo": appoNo, "IsComingFromCOC": false};
request = {"IsActiveAppointment": true, "AppointmentNo": appoNo, "IsComingFromCOC": false, "LanguageID": languageID};
dynamic localRes;
await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async {
localRes = response;
@ -638,14 +612,12 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsActiveAppointment": isActiveAppointment,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"SessionID": "YckwoXhUmWBsnHKEKig",
@ -669,14 +641,13 @@ class DoctorsListService extends BaseService {
Future<Map> getPatientAppointmentCurfewHistory(bool isActiveAppointment) async {
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsActiveAppointment": isActiveAppointment,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"SessionID": "YckwoXhUmWBsnHKEKig",
@ -705,7 +676,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -716,7 +686,6 @@ class DoctorsListService extends BaseService {
"ConfirmationBy": 102,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"SessionID": "YckwoXhUmWBsnHKEKig",
@ -752,7 +721,6 @@ class DoctorsListService extends BaseService {
long = await this.sharedPref.getDouble(USER_LONG);
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -770,7 +738,6 @@ class DoctorsListService extends BaseService {
"DeviceType": req.DeviceType,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -801,7 +768,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -818,7 +784,6 @@ class DoctorsListService extends BaseService {
"StrAppointmentDate": DateUtil.getDateFormatted(appo.appointmentDate!),
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -848,7 +813,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -858,7 +822,6 @@ class DoctorsListService extends BaseService {
"IsFollowup": patientShareResponse.isFollowup,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -888,7 +851,6 @@ class DoctorsListService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -901,7 +863,6 @@ class DoctorsListService extends BaseService {
"To": to,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -929,14 +890,13 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"ClientRequestID": transactionID,
"IsPharmacy": isPharma,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -974,7 +934,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AdvanceNumber": advanceNumber,
@ -983,7 +943,6 @@ class DoctorsListService extends BaseService {
"AppointmentID": appointmentID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1009,7 +968,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AdvanceNumber": advanceNumber,
@ -1024,7 +983,6 @@ class DoctorsListService extends BaseService {
"DeviceType": Platform.isIOS ? "iOS" : "Android",
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1086,13 +1044,13 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> isAllowedToAskDoctor(int docID, BuildContext context) async {
Future<Map> isAllowedToAskDoctor(int docID, int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"IsForAskYourDoctor": true,
@ -1100,9 +1058,9 @@ class DoctorsListService extends BaseService {
"Top": 25,
"beforeDays": 15,
"exludType": 4,
"LanguageID": languageID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1123,18 +1081,17 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getCallRequestType(BuildContext context) async {
Future<Map> getCallRequestType(int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1143,6 +1100,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"LanguageID": languageID,
"PatientType": authUser.patientType
};
@ -1155,19 +1113,20 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> sendAskDocCallRequest(AppoitmentAllHistoryResultList appo, String requestType, BuildContext context) async {
Future<Map> sendAskDocCallRequest(AppoitmentAllHistoryResultList appo, String requestType, int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"ProjectID": appo.projectID,
"SetupID": appo.setupID,
"DoctorID": appo.doctorID,
"ClinicID": appo.clinicID,
"RequestType": requestType,
"RequestTypeID": requestType,
"PatientMobileNumber": authUser.mobileNumber,
@ -1182,7 +1141,6 @@ class DoctorsListService extends BaseService {
"EditedOn": DateUtil.getYearMonthDayHourMinSecDateFormatted(DateTime.now()).split(" ")[0],
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1191,6 +1149,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"LanguageID": languageID,
"PatientType": authUser.patientType
};
@ -1209,13 +1168,12 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1242,7 +1200,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appoNo,
@ -1250,7 +1208,6 @@ class DoctorsListService extends BaseService {
"ClinicID": clinicID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1277,7 +1234,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentNo": appo.appointmentNo,
@ -1287,7 +1244,6 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID,
"SetupID": appo.setupID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1314,7 +1270,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"AppointmentDate": appoDate,
@ -1327,7 +1283,6 @@ class DoctorsListService extends BaseService {
"SetupID": setupId,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1354,7 +1309,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"ProjectID": projectID,
@ -1372,7 +1327,6 @@ class DoctorsListService extends BaseService {
},
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1399,7 +1353,7 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
@ -1418,7 +1372,7 @@ class DoctorsListService extends BaseService {
"PaymentMethod": paymentMethodName,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1444,13 +1398,12 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1485,13 +1438,12 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1529,14 +1481,13 @@ class DoctorsListService extends BaseService {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"MedCategoryID": medCategoryId,
"MedGetStsID": medCategoryStsId,
"VersionID": req.VersionID,
"Channel": req.Channel,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": req.IPAdress,
"generalid": req.generalid,
"PatientOutSA": authUser.outSA,
@ -1556,14 +1507,10 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> sendCheckinNfcRequest(int appointmentNo, String nfcCode, int projectId, BuildContext context) async {
Future<Map> sendCheckinNfcRequest(int appointmentNo, String nfcCode, int projectId, int checkInBy, BuildContext context) async {
Map<String, dynamic> request;
request = {
"AppointmentNo": appointmentNo,
"NFC_Code": nfcCode,
"ProjectID": projectId,
};
request = {"AppointmentNo": appointmentNo, "NFC_Code": nfcCode, "ProjectID": projectId, "CheckinBy": checkInBy};
dynamic localRes;
await baseAppClient.post(SEND_CHECK_IN_NFC_REQUEST, onSuccess: (response, statusCode) async {
localRes = response;
@ -1829,7 +1776,6 @@ class DoctorsListService extends BaseService {
Map<String, dynamic> requestFreeSlots;
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
requestFreeSlots = {
"DoctorID": docID,
@ -1841,7 +1787,6 @@ class DoctorsListService extends BaseService {
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,

@ -151,24 +151,31 @@ class AuthProvider with ChangeNotifier {
}
}
Future<SelectDeviceIMEIRES> selectDeviceImei(imei) async {
Future<SelectDeviceIMEIRES?> selectDeviceImei(imei) async {
try {
dynamic localRes;
print(imei);
Map<String, dynamic> request = {};
request['IMEI'] = imei;
await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) async {
localRes = Map();
if (response['Patient_SELECTDeviceIMEIbyIMEIList'][0] != null) {
localRes = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
localRes = SelectDeviceIMEIRES.fromJson(
response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
}
request['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
await new BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
localRes = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
});
}
catch (error) {
return Future.error(error);
}
}
Future<dynamic> checkPatientAuthentication(CheckPatientAuthenticationReq request) async {

@ -38,6 +38,7 @@ class ClinicListService extends BaseService {
request = {
"IsActiveAppointment": true,
"LanguageID": 1
};
dynamic localRes;
@ -143,6 +144,10 @@ class ClinicListService extends BaseService {
Future<Map> getProjectsList(context) async {
Map<String, dynamic> request = {};
request = {
"LanguageID": null
};
dynamic localRes;
await baseAppClient.post(GET_PROJECTS_LIST, onSuccess: (response, statusCode) async {

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/family-file/add_family_file_request.dart';
import 'package:diplomaticquarterapp/core/model/family-file/insert_share_file_request.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
@ -9,6 +11,7 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsBySta
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:provider/provider.dart';
// SharedPreferences sharedPref = new SharedPreferences();
enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
@ -36,7 +39,7 @@ class FamilyFilesProvider with ChangeNotifier {
dynamic authenticatedUser;
GetAllSharedRecordsByStatusResponse allSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse();
Future<GetAllSharedRecordsByStatusResponse> getSharedRecordByStatus() async {
Future<GetAllSharedRecordsByStatusResponse> getSharedRecordByStatus(int languageID) async {
dynamic localRes;
try {
var request = GetAllSharedRecordsByStatusReq();
@ -234,7 +237,7 @@ class FamilyFilesProvider with ChangeNotifier {
}
}
Future<dynamic> silentLoggin(GetAllSharedRecordsByStatusList switchUser, {onSuccess, mainUser}) async {
Future<dynamic> silentLoggin(GetAllSharedRecordsByStatusList switchUser, int languageID, {onSuccess, mainUser}) async {
Map<String, dynamic> request = {};
if (mainUser == true) {
var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(MAIN_USER) ?? "");
@ -252,6 +255,7 @@ class FamilyFilesProvider with ChangeNotifier {
request['ZipCode'] = currentUser.outSA == 1 ? "971" : "966";
request['activationCode'] = '0000';
request['isRegister'] = false;
request['LanguageID'] = languageID;
} else {
var currentUser = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
//const request = new SwitchUserRequest();
@ -277,6 +281,7 @@ class FamilyFilesProvider with ChangeNotifier {
// request['ZipCode'] = currentUser.outSA == 1 ? "971" : "966";
request['activationCode'] = '0000';
request['isRegister'] = false;
request['LanguageID'] = languageID;
}
try {
dynamic localRes;
@ -289,7 +294,8 @@ class FamilyFilesProvider with ChangeNotifier {
}, body: request);
sharedPref.setString(BLOOD_TYPE, localRes['PatientBloodType'] ?? "");
return Future.value(localRes);
} catch (error) {
}
catch (error) {
print(error);
throw error;
}

@ -57,7 +57,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> getLiveCareScheduledDoctorList(BuildContext context, int serviceID) async {
Future<Map> getLiveCareScheduledDoctorList(BuildContext context, int serviceID, int languageID) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -69,7 +69,8 @@ class LiveCareService extends BaseService {
"ServiceID": serviceID,
"Age": authUser.age != null ? authUser.age : 0,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0
"Gender": authUser.gender != null ? authUser.gender : 0,
"LanguageID": languageID
};
dynamic localRes;
@ -146,7 +147,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> getERAppointmentFees(int serviceID, bool isPharmaLiveCare, BuildContext context) async {
Future<Map> getERAppointmentFees(int serviceID, bool isPharmaLiveCare, int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -160,7 +161,8 @@ class LiveCareService extends BaseService {
"ProjectID": 12,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Age": authUser.age != null ? authUser.age : 0,
"Gender": authUser.gender != null ? authUser.gender : 0
"Gender": authUser.gender != null ? authUser.gender : 0,
"LanguageID": languageID
};
dynamic localRes;
@ -173,7 +175,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> getERAppointmentTime(int serviceID, bool isPharmaLiveCare, BuildContext context) async {
Future<Map> getERAppointmentTime(int serviceID, bool isPharmaLiveCare, int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -187,7 +189,8 @@ class LiveCareService extends BaseService {
"ProjectID": 12,
"Age": authUser.age != null ? authUser.age : 0,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0
"Gender": authUser.gender != null ? authUser.gender : 0,
"LanguageID": languageID
};
dynamic localRes;

@ -15,11 +15,9 @@ class MyInvoicesService extends BaseService {
Future<Map> getAllDentalAppointments(int projectID, context) async {
Map<String, dynamic> request;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
@ -38,8 +36,7 @@ class MyInvoicesService extends BaseService {
dynamic localRes;
await baseAppClient.post(GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC,
onSuccess: (response, statusCode) async {
await baseAppClient.post(GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
@ -49,11 +46,9 @@ class MyInvoicesService extends BaseService {
Future<Map> getDentalAppointmentInvoice(int projectID, int appoNo, int invoiceNo, context) async {
Map<String, dynamic> request;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
@ -74,22 +69,19 @@ class MyInvoicesService extends BaseService {
dynamic localRes;
await baseAppClient.post(GET_DENTAL_APPOINTMENT_INVOICE,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
await baseAppClient.post(GET_DENTAL_APPOINTMENT_INVOICE, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> sendDentalAppointmentInvoiceEmail(int projectID, int appoNo, context) async {
Map<String, dynamic> request;
var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
@ -110,13 +102,11 @@ class MyInvoicesService extends BaseService {
dynamic localRes;
await baseAppClient.post(SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
await baseAppClient.post(SEND_DENTAL_APPOINTMENT_INVOICE_EMAIL, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -23,11 +23,9 @@ class SmartWatchIntegrationService extends BaseService {
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,

@ -63,7 +63,11 @@ class _SplashScreenState extends State<SplashScreen> {
AppSharedPreferences().setString(APP_LANGUAGE, projectProvider.isArabic ? "ar" : "en");
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
PushNotificationHandler.getInstance().init(context); // Asyncronously
PushNotificationHandler().init(context); // Asyncronously
AppSharedPreferences().getAll().then((value) {
// debugPrint("ALL SHARED PREFERENCES!!!!!");
// debugPrint(jsonEncode(value));
});
}
@override

@ -128,8 +128,8 @@ class LocationUtils {
heading: 0.0,
speed: 0.0,
speedAccuracy: 1,
altitudeAccuracy: 0.0,
headingAccuracy: 0.0,
// altitudeAccuracy: 0.0,
// headingAccuracy: 0.0,
// altitudeAccuracy: 0,
// headingAccuracy: 0,
// Added by Aamir

@ -295,7 +295,7 @@ class _TimeLineViewState extends State<TimeLineView> {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
sharedPref.setObject(IMEI_USER_DATA, value);

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
@ -218,7 +216,7 @@ class _AppDrawerState extends State<AppDrawer> {
: SizedBox(),
FutureBuilder(
future: getFamilyFiles(), // async work
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse?> snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.waiting:
return Padding(padding: EdgeInsets.all(10), child: Text(''));
@ -631,7 +629,7 @@ class _AppDrawerState extends State<AppDrawer> {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
setUserValues(value);
@ -652,23 +650,23 @@ class _AppDrawerState extends State<AppDrawer> {
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('login');
}
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async {
Future<GetAllSharedRecordsByStatusResponse?> getFamilyFiles() async {
if (user != null) {
if (await sharedPref.getObject(FAMILY_FILE) != null) {
// print(await sharedPref.getObject(FAMILY_FILE));
return Future.value(GetAllSharedRecordsByStatusResponse.fromJson(await sharedPref.getObject(FAMILY_FILE)));
} else {
return familyFileProvider.getSharedRecordByStatus();
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
return familyFileProvider.getSharedRecordByStatus(languageID);
}
}
return familyFileProvider.getSharedRecordByStatus();
}
switchUser(user, context) {
GetAllSharedRecordsByStatusList switchUser = GetAllSharedRecordsByStatusList.fromJson(jsonDecode(jsonEncode(user)));
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
sharedPref.remove(BLOOD_TYPE);
this.familyFileProvider.silentLoggin(switchUser, mainUser: user is AuthenticatedUser).then((value) {
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, languageID, mainUser: user is AuthenticatedUser).then((value) {
// GifLoaderDialogUtils.hideDialog(context);
// Navigator.of(context).pop();
loginAfter(value, context, user is AuthenticatedUser);
@ -676,7 +674,7 @@ class _AppDrawerState extends State<AppDrawer> {
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err);
AppToast.showErrorToast(message: err.toString());
Navigator.of(context).pop();
});
}
@ -720,8 +718,10 @@ class _AppDrawerState extends State<AppDrawer> {
if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser();
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.getIsLastAppointmentRatedList(languageID)
.then((value) => {
getToDoCount(),
//Utils.hideProgressDialog(),

@ -27,7 +27,12 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
ios: IOSInAppWebViewOptions(applePayAPIEnabled: true, isFraudulentWebsiteWarningEnabled: false)),
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
android: AndroidInAppBrowserOptions(),
ios: IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
ios: IOSInAppBrowserOptions(
hideToolbarBottom: true,
toolbarBottomBackgroundColor: Colors.white,
closeButtonColor: Colors.white,
closeButtonCaption: "Close",
presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE? paymentType;
@ -281,7 +286,7 @@ class MyInAppBrowser extends InAppBrowser {
Platform.isIOS
? form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getString(PUSH_TOKEN) + "," + await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN))
: form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN));
: form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN) ?? "");
// form = form.replaceFirst('DEVICE_TOKEN', await AppSharedPreferences().getString(PUSH_TOKEN) + "," + await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN));
// form = form.replaceFirst('DEVICE_TOKEN', await sharedPref.getString(PUSH_TOKEN));

@ -335,7 +335,7 @@ class _NotAutPageState extends State<NotAutPage> {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
sharedPref.setObject(IMEI_USER_DATA, value);

@ -125,7 +125,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES value) {
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) {
GifLoaderDialogUtils.hideDialog(context);
if (value != null) {
setUserValues(value);

Loading…
Cancel
Save