Updates & fixes

Dev_3.3_MedicalReportCR
haroon amjad 2 years ago
parent a60f66a069
commit b92e45aa93

@ -19,9 +19,9 @@ var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.50.100.198:2018/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
@ -88,6 +88,7 @@ var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_Pass
var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport';
var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida';
var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo';
///
var GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@ -324,7 +325,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 = 10.6;
var VERSION_ID = 10.7;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -597,7 +598,10 @@ var CANCEL_PHARMA_LIVECARE_REQUEST = 'https://vcallapi.hmg.com/api/PharmaLiveCar
var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs';
var GET_NATIONALITY ='Services/Lists.svc/REST/GetNationality';
var GET_NATIONALITY = 'Services/Lists.svc/REST/GetNationality';
var PAYFORT_TEST_URL = 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi';
var PAYFORT_PROD_URL = 'https://paymentservices.payfort.com/FortAPI/paymentApi';
class AppGlobal {
static var context;

@ -1889,4 +1889,5 @@ const Map localizedValues = {
"rateDoctorResponseHeading": {"en": "Please rate the doctor response:", "ar": "يرجى تقييم استجابة الطبيب:"},
"updateInsuranceManuallyDialog": {"en": "Would you like to update your insurance manually?", "ar": "هل ترغب في تحديث التأمين الخاص بك يدويًا؟"},
"viewReport": {"en": "View Report", "ar": "عرض التقرير"},
"sickLeaveAdmittedPatient": {"en": "You cannot activate this sick leave since you're an admitted patient.", "ar": "لا يمكنك تفعيل هذه الإجازة المرضية لأنك مريض مقبل."},
};

@ -0,0 +1,64 @@
class AdmissionStatusForSickLeave {
String setupID;
int projectID;
int patientID;
int patientType;
int requestNo;
String requestDate;
int sickLeaveDays;
int appointmentNo;
int admissionNo;
String reportDate;
String placeOfWork;
int status;
dynamic dischargeDate;
AdmissionStatusForSickLeave(
{this.setupID,
this.projectID,
this.patientID,
this.patientType,
this.requestNo,
this.requestDate,
this.sickLeaveDays,
this.appointmentNo,
this.admissionNo,
this.reportDate,
this.placeOfWork,
this.status,
this.dischargeDate});
AdmissionStatusForSickLeave.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
patientType = json['PatientType'];
requestNo = json['RequestNo'];
requestDate = json['RequestDate'];
sickLeaveDays = json['SickLeaveDays'];
appointmentNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo'];
reportDate = json['ReportDate'];
placeOfWork = json['PlaceOfWork'];
status = json['Status'];
dischargeDate = json['DischargeDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['PatientType'] = this.patientType;
data['RequestNo'] = this.requestNo;
data['RequestDate'] = this.requestDate;
data['SickLeaveDays'] = this.sickLeaveDays;
data['AppointmentNo'] = this.appointmentNo;
data['AdmissionNo'] = this.admissionNo;
data['ReportDate'] = this.reportDate;
data['PlaceOfWork'] = this.placeOfWork;
data['Status'] = this.status;
data['DischargeDate'] = this.dischargeDate;
return data;
}
}

@ -153,6 +153,24 @@ class LabsService extends BaseService {
return Future.value(localRes);
}
Future getSickLeaveStatusByAdmissionNo(int projectID, int admissionNo) async {
hasError = false;
Map<String, dynamic> body = Map();
body['AdmissionNo'] = admissionNo;
body['ProjectID'] = projectID;
dynamic localRes;
await baseAppClient.post(GET_SICKLEAVE_STATUS_ADMISSION_NO, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
hasError = false;
Map<String, dynamic> body = Map();

@ -1,7 +1,19 @@
extension CapExtension on String {
import 'dart:convert';
import 'package:crypto/crypto.dart';
extension CapExtension on String {
String get toCamelCase => "${this[0].toUpperCase()}${this.substring(1)}";
String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
String get allInCaps => this.toUpperCase();
String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.isNotEmpty ? str.inCaps: str).join(" ") : "";
String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.isNotEmpty ? str.inCaps : str).join(" ") : "";
}
extension HashSha on String {
String get toSha256 {
var bytes = utf8.encode(this);
return sha256.convert(bytes).toString();
}
}

@ -243,6 +243,7 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err.toString());
print(err);
});

@ -1,9 +1,15 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/admission_status_for_sick_leave.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/sickleave_workplace_update_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -110,20 +116,56 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
);
}
void openWorkPlaceUpdatePage(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) {
Future<void> openWorkPlaceUpdatePage(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) async {
if (model.sickLeaveList[index].admissionNo != 0 && model.sickLeaveList[index].admissionNo != null) {
getSickLeaveStatusByAdmissionNo(requestNumber, setupID, model, index, projectID);
} else {
openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID);
}
}
void getSickLeaveStatusByAdmissionNo(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) {
AdmissionStatusForSickLeave admissionStatusForSickLeave;
LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context);
service.getSickLeaveStatusByAdmissionNo(model.sickLeaveList[index].projectID, model.sickLeaveList[index].admissionNo).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["List_GetSickLeaveStatusByAdmissionNo"].length != 0) {
admissionStatusForSickLeave = AdmissionStatusForSickLeave.fromJson(res["List_GetSickLeaveStatusByAdmissionNo"][0]);
if (admissionStatusForSickLeave.status != 6) {
AppToast.showErrorToast(message: TranslationBase.of(context).sickLeaveAdmittedPatient);
} else {
openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID);
}
} else {
openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
void openWorkPlaceUpdatePageFunc(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) {
Navigator.push(
context,
FadePage(
page: WorkplaceUpdatePage(
context,
FadePage(
page: WorkplaceUpdatePage(
requestNumber: requestNumber,
setupID: setupID,
projectID: projectID,
))).then((value) {
print(value);
if (value != null && value == true) {
model.getSickLeave();
showEmailDialog(model, index);
}
});
),
),
).then(
(value) {
print(value);
if (value != null && value == true) {
model.getSickLeave();
showEmailDialog(model, index);
}
},
);
}
}

@ -145,7 +145,7 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
keyboardType: TextInputType.name,
controller: _controller,
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp("[a-zA-Zء-ي ]")),
projectViewModel.isArabic ? FilteringTextInputFormatter.allow(RegExp("[ء-ي ]")) : FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]")),
],
onChanged: (value) => {_onPassportTextChanged(value)},
style: TextStyle(

@ -1757,41 +1757,45 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPayfortSDKTokenForPayment(String deviceID, String signatureValue, {bool isTest = true}) async {
Map<String, dynamic> request;
request = {"service_command": "SDK_TOKEN", "access_code": "BsM6He4FMBaZ86W64kjZ", "merchant_identifier": "ipxnRXXq", "language": "en", "device_id": deviceID, "signature": signatureValue};
dynamic localRes;
await baseAppClient.post(isTest ? PAYFORT_TEST_URL : PAYFORT_PROD_URL, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request, isExternal: true, isAllowAny: true);
return Future.value(localRes);
}
Future<Map> logDoctorFreeSlots(int docID, int clinicID, int projectID, List<dynamic> selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel projectViewModel]) async {
Map<String, dynamic> requestFreeSlots;
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
requestFreeSlots = {
"DoctorID": docID,
"IsBookingForLiveCare": 0,
"ClinicID": clinicID,
"ProjectID": projectID,
"OriginalClinicID": clinicID,
"days": 0,
"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,
"SessionID": null,
"isDentalAllowedBackend": false,
"DeviceTypeID": 1
};
request = {
Future<Map> logDoctorFreeSlots(int docID, int clinicID, int projectID, List<dynamic> selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel projectViewModel]) async {
Map<String, dynamic> requestFreeSlots;
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
requestFreeSlots = {
"DoctorID": docID,
"IsBookingForLiveCare": 0,
"ClinicID": clinicID,
"ProjectID": projectID,
"AppointmentNo":appoNumber,
"DoctorFreeSlotRequest":requestFreeSlots,
"DoctorFreeSlotResponse":selectedfreeSlots,
"Value1":docID
};
"OriginalClinicID": clinicID,
"days": 0,
"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,
"SessionID": null,
"isDentalAllowedBackend": false,
"DeviceTypeID": 1
};
request = {"ClinicID": clinicID, "ProjectID": projectID, "AppointmentNo": appoNumber, "DoctorFreeSlotRequest": requestFreeSlots, "DoctorFreeSlotResponse": selectedfreeSlots, "Value1": docID};
dynamic localRes;
await baseAppClient.post(INSERT_FREE_SLOTS_LOGS, onSuccess: (response, statusCode) async {
localRes = response;
@ -1801,6 +1805,4 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
}

@ -35,39 +35,38 @@ class LocalNotification {
var initializationSettings = InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
await flutterLocalNotificationsPlugin.initialize(
initializationSettings,
onDidReceiveNotificationResponse:
(NotificationResponse notificationResponse) {
onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) {
switch (notificationResponse.notificationResponseType) {
case NotificationResponseType.selectedNotification:
// selectNotificationStream.add(notificationResponse.payload);
// selectNotificationStream.add(notificationResponse.payload);
break;
case NotificationResponseType.selectedNotificationAction:
// if (notificationResponse.actionId == navigationActionId) {
// selectNotificationStream.add(notificationResponse.payload);
// }
// if (notificationResponse.actionId == navigationActionId) {
// selectNotificationStream.add(notificationResponse.payload);
// }
break;
}
},
onDidReceiveBackgroundNotificationResponse: notificationTapBackground,
);
} catch(ex) {}
// flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse)
// {
// switch (notificationResponse.notificationResponseType) {
// case NotificationResponseType.selectedNotification:
// // selectNotificationStream.add(notificationResponse.payload);
// break;
// case NotificationResponseType.selectedNotificationAction:
// // if (notificationResponse.actionId == navigationActionId) {
// // selectNotificationStream.add(notificationResponse.payload);
// }
// // break;
// },}
//
// ,
//
// );
}
} catch (ex) {}
// flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse)
// {
// switch (notificationResponse.notificationResponseType) {
// case NotificationResponseType.selectedNotification:
// // selectNotificationStream.add(notificationResponse.payload);
// break;
// case NotificationResponseType.selectedNotificationAction:
// // if (notificationResponse.actionId == navigationActionId) {
// // selectNotificationStream.add(notificationResponse.payload);
// }
// // break;
// },}
//
// ,
//
// );
}
void notificationTapBackground(NotificationResponse notificationResponse) {
// ignore: avoid_print
@ -76,110 +75,106 @@ class LocalNotification {
' payload: ${notificationResponse.payload}');
if (notificationResponse.input?.isNotEmpty ?? false) {
// ignore: avoid_print
print(
'notification action tapped with input: ${notificationResponse.input}');
print('notification action tapped with input: ${notificationResponse.input}');
}
}
var _random = new Random();
var _random = new Random();
_randomNumber({int from = 100000}) {
return _random.nextInt(from);
}
_randomNumber({int from = 100000}) {
return _random.nextInt(from);
}
_vibrationPattern() {
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
_vibrationPattern() {
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
return vibrationPattern;
}
return vibrationPattern;
}
Future showNow({@required String title, @required String subtitle, String payload}) {
Future.delayed(Duration(seconds: 1)).then((result) async {
var androidPlatformChannelSpecifics = AndroidNotificationDetails('com.hmg.local_notification', 'HMG',
channelDescription: 'HMG',
importance: Importance.max,
priority: Priority.high,
ticker: 'ticker',
vibrationPattern: _vibrationPattern());
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) {
print(err);
Future showNow({@required String title, @required String subtitle, String payload}) {
Future.delayed(Duration(seconds: 1)).then((result) async {
var androidPlatformChannelSpecifics = AndroidNotificationDetails('com.hmg.local_notification', 'HMG',
channelDescription: 'HMG', importance: Importance.max, priority: Priority.high, ticker: 'ticker', vibrationPattern: _vibrationPattern());
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) {
print(err);
});
});
});
}
}
Future scheduleNotification({@required DateTime scheduledNotificationDateTime, @required String title, @required String description}) async {
///vibrationPattern
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
var androidPlatformChannelSpecifics = AndroidNotificationDetails('active-prescriptions', 'ActivePrescriptions',
channelDescription: 'ActivePrescriptionsDescription',
// icon: 'secondary_icon',
sound: RawResourceAndroidNotificationSound('slow_spring_board'),
///change it to be as ionic
// largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),///change it to be as ionic
vibrationPattern: vibrationPattern,
enableLights: true,
color: const Color.fromARGB(255, 255, 0, 0),
ledColor: const Color.fromARGB(255, 255, 0, 0),
ledOnMs: 1000,
ledOffMs: 500);
var iOSPlatformChannelSpecifics = DarwinNotificationDetails(sound: 'slow_spring_board.aiff');
// /change it to be as ionic
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.schedule(0, title, description, scheduledNotificationDateTime, platformChannelSpecifics);
}
Future scheduleNotification({@required DateTime scheduledNotificationDateTime, @required String title, @required String description}) async {
///vibrationPattern
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
var androidPlatformChannelSpecifics = AndroidNotificationDetails('active-prescriptions', 'ActivePrescriptions',
channelDescription: 'ActivePrescriptionsDescription',
// icon: 'secondary_icon',
sound: RawResourceAndroidNotificationSound('slow_spring_board'),
///change it to be as ionic
// largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),///change it to be as ionic
vibrationPattern: vibrationPattern,
enableLights: true,
color: const Color.fromARGB(255, 255, 0, 0),
ledColor: const Color.fromARGB(255, 255, 0, 0),
ledOnMs: 1000,
ledOffMs: 500);
var iOSPlatformChannelSpecifics = DarwinNotificationDetails(sound: 'slow_spring_board.aiff');
// /change it to be as ionic
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.schedule(0, title, description, scheduledNotificationDateTime, platformChannelSpecifics);
}
///Repeat notification every day at approximately 10:00:00 am
Future showDailyAtTime() async {
var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('repeatDailyAtTime channel id', 'repeatDailyAtTime channel name', channelDescription: 'repeatDailyAtTime description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.showDailyAtTime(
// 0,
// 'show daily title',
// 'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// time,
// platformChannelSpecifics);
}
///Repeat notification every day at approximately 10:00:00 am
Future showDailyAtTime() async {
var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('repeatDailyAtTime channel id', 'repeatDailyAtTime channel name', channelDescription: 'repeatDailyAtTime description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.showDailyAtTime(
// 0,
// 'show daily title',
// 'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// time,
// platformChannelSpecifics);
}
///Repeat notification weekly on Monday at approximately 10:00:00 am
Future showWeeklyAtDayAndTime() async {
var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('show weekly channel id', 'show weekly channel name', channelDescription: 'show weekly description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.showWeeklyAtDayAndTime(
// 0,
// 'show weekly title',
// 'Weekly notification shown on Monday at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// Day.Monday,
// time,
// platformChannelSpecifics);
}
///Repeat notification weekly on Monday at approximately 10:00:00 am
Future showWeeklyAtDayAndTime() async {
var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('show weekly channel id', 'show weekly channel name', channelDescription: 'show weekly description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.showWeeklyAtDayAndTime(
// 0,
// 'show weekly title',
// 'Weekly notification shown on Monday at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// Day.Monday,
// time,
// platformChannelSpecifics);
}
String _toTwoDigitString(int value) {
return value.toString().padLeft(2, '0');
}
String _toTwoDigitString(int value) {
return value.toString().padLeft(2, '0');
}
Future cancelNotification() async {
await flutterLocalNotificationsPlugin.cancel(0);
}
Future cancelNotification() async {
await flutterLocalNotificationsPlugin.cancel(0);
}
Future cancelAllNotifications() async {
await flutterLocalNotificationsPlugin.cancelAll();
}}
Future cancelAllNotifications() async {
await flutterLocalNotificationsPlugin.cancelAll();
}
}

@ -2897,6 +2897,7 @@ class TranslationBase {
String get rateDoctorResponseHeading => localizedValues["rateDoctorResponseHeading"][locale.languageCode];
String get updateInsuranceManuallyDialog => localizedValues["updateInsuranceManuallyDialog"][locale.languageCode];
String get viewReport => localizedValues["viewReport"][locale.languageCode];
String get sickLeaveAdmittedPatient => localizedValues["sickLeaveAdmittedPatient"][locale.languageCode];
}

@ -809,6 +809,11 @@ class Utils {
static String generateMd5Hash(String input) {
return crypto.md5.convert(utf8.encode(input)).toString();
}
static String generateSignature() {
}
}
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/service/privilege_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
@ -28,6 +30,7 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -38,6 +41,14 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// import 'package:flutter_amazonpaymentservices/environment_type.dart';
// import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart';
// import 'package:flutter_amazonpaymentservices/environment_type.dart';
// import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart';
// import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:in_app_review/in_app_review.dart';
import 'package:provider/provider.dart';
@ -453,11 +464,22 @@ class _AppDrawerState extends State<AppDrawer> {
),
mHeight(12),
InkWell(
onTap: () {
// Navigator.push(context, FadePage(page: CallPage()));
onTap: () async {
// var deviceId = await FlutterAmazonpaymentservices.getUDID;
// var signatureValue = "asD123@saereaccess_code=BsM6He4FMBaZ86W64kjZdevice_id=$deviceId" + "language=enmerchant_identifier=ipxnRXXqservice_command=SDK_TOKENasD123@saere";
// var signatureValueSHA = signatureValue.toSha256;
//
// GifLoaderDialogUtils.showMyDialog(context);
// HMGNetworkConnectivity(context).start();
// locator<GAnalytics>().hamburgerMenu.logMenuItemClick('cloud solution logo tap');
// DoctorsListService service = new DoctorsListService();
// service.getPayfortSDKTokenForPayment(deviceId, signatureValueSHA, isTest: true).then((res) {
// GifLoaderDialogUtils.hideDialog(context);
// print(res);
// startPaymentProcess(res['sdk_token']);
// }).catchError((err) {
// print(err);
// AppToast.showErrorToast(message: err);
// GifLoaderDialogUtils.hideDialog(context);
// });
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
@ -495,6 +517,34 @@ class _AppDrawerState extends State<AppDrawer> {
));
}
startPaymentProcess(String sdkToken) async {
// Map<String, String> requestParam = {};
// requestParam = {
// "amount": "100",
// "command": "PURCHASE",
// "currency": "SAR",
// "order_description": "Advance Payment",
// "customer_email": projectProvider.user.emailAddress,
// "customer_name": projectProvider.user.firstName + " " + projectProvider.user.lastName,
// "phone_number": projectProvider.user.mobileNumber,
// "language": projectProvider.isArabic ? "ar" : "en",
// "merchant_reference": DateTime.now().millisecondsSinceEpoch.toString(),
// "sdk_token": sdkToken,
// };
// try {
// await FlutterAmazonpaymentservices.normalPay(requestParam, EnvironmentType.sandbox, isShowResponsePage: false).then((value) {
// if (value["status"] == 14) {
// AppToast.showSuccessToast(message: "Payment has been successful");
// } else {
// AppToast.showErrorToast(message: value['response_message']);
// }
// });
// } on PlatformException catch (e) {
// AppToast.showErrorToast(message: e.message);
// return;
// }
}
readQRCode() async {
pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent;
print(pharmacyLiveCareQRCode);
@ -512,7 +562,13 @@ class _AppDrawerState extends State<AppDrawer> {
startPharmacyLiveCareProcess() {
sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "7");
Navigator.push(context, FadePage(page: LiveCareHome(isPharmacyLiveCare: true, pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,)));
Navigator.push(
context,
FadePage(
page: LiveCareHome(
isPharmacyLiveCare: true,
pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,
)));
}
drawerNavigator(context, routeName) {

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.022+4050022
version: 4.5.024+4050024
environment:
sdk: ">=2.7.0 <3.0.0"
@ -15,7 +15,7 @@ dependencies:
sdk: flutter
intl: ^0.17.0
# web view
# webview_flutter: ^2.3.1
# webview_flutter: ^2.3.1
# http client
http: ^0.13.4
@ -23,7 +23,7 @@ dependencies:
async: ^2.8.1
audio_wave: ^0.1.4
# audio_session: ^0.1.13
# audio_session: ^0.1.13
# State Management
provider: ^6.0.1
@ -54,7 +54,7 @@ dependencies:
maps_launcher: ^2.0.1
url_launcher: ^6.0.15
shared_preferences: ^2.0.0
# flutter_flexible_toast: ^0.1.4
# flutter_flexible_toast: ^0.1.4
fluttertoast: ^8.0.8
firebase_messaging: ^14.1.0
firebase_analytics: ^10.0.5
@ -95,10 +95,10 @@ dependencies:
# Qr code Scanner TODO fix it
# barcode_scanner: ^1.0.1
# flutter_polyline_points: ^1.0.0
# flutter_polyline_points: ^1.0.0
location: ^4.3.0
# Qr code Scanner
# barcode_scan_fix: ^1.0.2
# barcode_scan_fix: ^1.0.2
barcode_scan2: ^4.2.2
# Rating Stars
@ -108,7 +108,7 @@ dependencies:
syncfusion_flutter_calendar: ^19.3.55
# SVG Images
# flutter_svg: ^0.23.0+1
# flutter_svg: ^0.23.0+1
#Calendar Events
manage_calendar_events: ^2.0.1
@ -152,7 +152,7 @@ dependencies:
#google maps places
google_maps_place_picker_mb: ^3.0.0
# google_maps_place_picker: ^2.1.0-nullsafety.3
# google_maps_place_picker: ^2.1.0-nullsafety.3
map_launcher: ^1.1.3
#countdown timer for Upcoming List
flutter_countdown_timer: ^4.1.0
@ -161,10 +161,10 @@ dependencies:
native_device_orientation: ^1.0.0
wakelock: ^0.5.6
after_layout: ^1.1.0
# twilio_programmable_video: ^0.11.0+1
# twilio_programmable_video: ^0.11.0+1
cached_network_image: ^3.1.0+1
# flutter_tts:
# path: flutter_tts-voice_enhancement
# flutter_tts:
# path: flutter_tts-voice_enhancement
flutter_tts: ^3.6.1
wifi: ^0.1.5
@ -175,7 +175,7 @@ dependencies:
geofencing: ^0.1.0
speech_to_text: ^6.1.1
# path: speech_to_text
# path: speech_to_text
in_app_update: ^3.0.0
@ -183,7 +183,7 @@ dependencies:
badges: ^2.0.1
flutter_app_icon_badge: ^2.0.0
# syncfusion_flutter_sliders: ^19.3.55
# syncfusion_flutter_sliders: ^19.3.55
searchable_dropdown: ^1.1.3
dropdown_search: 0.4.9
youtube_player_flutter: ^8.0.0
@ -191,28 +191,31 @@ dependencies:
# Dep by Zohaib
shimmer: ^2.0.0
carousel_slider: ^4.0.0
# flutter_material_pickers: ^3.1.2
# flutter_material_pickers: ^3.1.2
flutter_staggered_grid_view: ^0.4.1
# flutter_hms_gms_availability: ^2.0.0
# flutter_hms_gms_availability: ^2.0.0
huawei_hmsavailability: ^6.6.0+300
huawei_location: 6.0.0+302
# Marker Animation
# flutter_animarker: ^3.2.0
# flutter_animarker: ^3.2.0
auto_size_text: ^3.0.0
equatable: ^2.0.3
# signalr_core: ^1.1.1
# signalr_core: ^1.1.1
wave: ^0.2.0
# sms_retriever: ^1.0.0
# sms_retriever: ^1.0.0
sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.0.5
google_api_availability: ^3.0.1
# flutter_callkit_incoming: ^1.0.3+3
# firebase_core: 1.12.0
# flutter_callkit_incoming: ^1.0.3+3
# firebase_core: 1.12.0
# flutter_amazonpaymentservices: 0.0.6
# crypto:
dependency_overrides:
provider : ^5.0.0
# permission_handler : ^10.2.0
provider: ^5.0.0
# permission_handler : ^10.2.0
flutter_svg: ^1.0.0
# firebase_messaging_platform_interface: any
# flutter_inappwebview: 5.7.2+3

Loading…
Cancel
Save