Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into fatima-new

merge-requests/386/head
Fatimah Alshammari 5 years ago
commit 62167baec5

@ -134,6 +134,11 @@ const INSERT_ER_INERT_PRES_ORDER =
/// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_ORDERS = 'rc/api/Transportation/get';
const CANCEL_AMBULANCE_REQUEST = "rc/api/Transportation/update";
const GET_ALL_RRT_QUESTIONS =
'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
const GET_RRT_SERVICE_PRICE =

@ -556,6 +556,7 @@ const Map localizedValues = {
"VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"},
"MonthlyReports": {"en": "Monthly Reports", "ar": "تقارير شهرية"},
"km": {"en": "KMs:", "ar": "كم"},
"km_": {"en": "KM", "ar": "كم"},
"PatientHealthSummaryReport": {
"en": "Patient Health Summary Report",
"ar": " ملخص التقارير الشهرية"
@ -617,6 +618,7 @@ const Map localizedValues = {
"DepositorName": {"en": "Depositor Name", "ar": "اسم المودع *"},
"MobileNumber": {"en": "Mobile Number", "ar": "رقم الجوال"},
"Ok": {"en": "Ok", "ar": "حسنا"},
"averageWaitingTime": {"en": "Average Waiting Time:", "ar": "متوسط ​​وقت الانتظار:"},
"WaterConsumedInWeek": {
"en": "Water consumed in a week",
"ar": "معدل شرب الماء خلال الاسبوع"
@ -1298,9 +1300,9 @@ const Map localizedValues = {
},
"RRTDDetails": {
"en":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home",
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home",
"ar":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home"
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home"
},
"rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
@ -2222,4 +2224,40 @@ const Map localizedValues = {
"en": "Total Appointment Time:",
"ar": "وقت المواعيد الكلي:"
},
"info-eye": {
"en": "This service allows you to view all the eye measurements, lenses, and eyeglasses that have been made in the Habib Medical Group.",
"ar": " خدمة قياسات النظر: هذه الخدمة تمكنك من الاطلاع على جميع قياسات النظر والعدسات والنظارات التي تمت في مجموعة الحبيب الطبية."
},
"info-vaccines": {
"en": "This service allows you to view all the vaccinations that were taken in Al Habib Medical Group.",
"ar": "خدمة تطعيماتي: هذه الخدمة تمكنك من الاطلاع على جميع التطعيمات التي تمت في مجموعة الحبيب الطبية."
},
"info-trackers": {
"en": "This service allows you to record the readings of the measurement of sugar, pressure, and weight and then refer to them as a reference in addition to view the statistics charts.",
"ar": "متابعة قراءاتي: هذه الخدمة تمكنك من تسجيل قراءات قياس السكر والضغط والوزن بشكل دوري ومن ثم الاطلاع عليها كمرجع وكذلك الاطلاع على الرسوم البيانية لمتابعة تطور الحالة."
},
"info-health-data": {
"en": "This service is designed to allows you to synchronize the health data from your smart watches into your health record system in Habib Medical Group so that the doctors you are visiting can analyze your health & activity level.",
"ar": "تم تصميم هذه الخدمة للسماح لك بمزامنة البيانات الصحية من ساعاتك الذكية الى نظام السجلات الصحية الخاص بك في مجموعة حبيب الطبية حتى يتمكن الأطباء الذين تزورهم من تحليل مستوى صحتك ونشاطك."
},
"info-ask-doc": {
"en": "This service allows you to ask the doctor you have visited during the last 14 days. When you receive a response from the doctor, you will be notified via the system to view the doctor's reply.",
"ar": "اسال طبيبك: هذه الخدمة تمكنك من توجيه استفسارات الى الطبيب الذي قمت بزيارته خلال اخر 14 يوم وكذلك عند تلقى الرد من الطبيب سوف يتم ابلاغك عن طريق النظام للاطلاع على رد الطبيب."
},
"info-auto-wifi": {
"en": "This service allows you to connect to the Internet directly without the need for entering a user name or password.",
"ar": "الاتصال بالانترنت: هذه الخدمة تمكنك من الاتصال بالانترنت مباشرة دون الحاجة الى اسم مستخدم او كلمة مرور."
},
"auto-wifi": {
"en": "Connect To Internet",
"ar": "الإتصال بالإنترنت"
},
"child-vaccine-info": {
"en": "This service to remind you of the deadlines of the necessary vaccinations for your childs against diseases targeted by immunization according to the MOH vaccinations schedule by sending a reminding message and notifications of the vaccination date to the registered mobile phone.",
"ar": "هذه الخدمة تم تصميمها لتذكيرك بالمواعيد النهائية للتحصينات اللازمة لطفلك ضد الأمراض المستهدفة بالتحصين وفقًا لجدول تطعيمات وزارة الصحة عن طريق إرسال رسالة تذكير وإشعارات عن مواعيد التطعيم على الجوال المسجل."
},
"h2o-info": {
"en": "This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.",
"ar": "تم تصميم هذه الخدمة لمساعدتك في تحديد وتتبع كميات المياه التي يتوجب شربها بشكل يومي. كما توفر هذه الخدمة تذكيرات الجدول الزمني وتقدم تحليلًا إحصائيًا لمقدار ما استهلكته خلال اليوم أو الأسبوع أو الشهر."
},
};

@ -0,0 +1,319 @@
class AmbulanceRequestOrdersModel {
String statusText;
int paymentStatus;
dynamic clientRequestid;
dynamic paymentStatusText;
dynamic projectName;
String nearestProjectName;
double paymentAmount;
WFOrder wFOrder;
String serviceText;
bool isSentForApproval;
int exaCartOrderId;
bool isTimer;
int timeSeconds;
int totalPendingSeconds;
int timeMinute;
int timeHour;
int timeTotalSeconds;
int timeTotalMinute;
int timeTotalHour;
dynamic approvalStatus;
bool isActive;
int clickButton;
dynamic orderHistory;
String pickupLocation;
String dropOffLocation;
String clinicName;
String doctorName;
String branch;
String time;
dynamic notes;
int id;
String patientId;
int patientOutSa;
bool isOutPatient;
int projectId;
int nearestProjectId;
dynamic longitude;
dynamic latitude;
dynamic appointmentNo;
dynamic dischargeId;
int statusId;
int serviceId;
int channel;
Orderpayment orderpayment;
dynamic orderselectedservice;
dynamic wforder;
dynamic orderapprovalobj;
String created;
dynamic createdBy;
dynamic modified;
dynamic modifiedBy;
bool isDeleted;
AmbulanceRequestOrdersModel(
{this.statusText,
this.paymentStatus,
this.clientRequestid,
this.paymentStatusText,
this.projectName,
this.nearestProjectName,
this.paymentAmount,
this.wFOrder,
this.serviceText,
this.isSentForApproval,
this.exaCartOrderId,
this.isTimer,
this.timeSeconds,
this.totalPendingSeconds,
this.timeMinute,
this.timeHour,
this.timeTotalSeconds,
this.timeTotalMinute,
this.timeTotalHour,
this.approvalStatus,
this.isActive,
this.clickButton,
this.orderHistory,
this.pickupLocation,
this.dropOffLocation,
this.clinicName,
this.doctorName,
this.branch,
this.time,
this.notes,
this.id,
this.patientId,
this.patientOutSa,
this.isOutPatient,
this.projectId,
this.nearestProjectId,
this.longitude,
this.latitude,
this.appointmentNo,
this.dischargeId,
this.statusId,
this.serviceId,
this.channel,
this.orderpayment,
this.orderselectedservice,
this.wforder,
this.orderapprovalobj,
this.created,
this.createdBy,
this.modified,
this.modifiedBy,
this.isDeleted});
AmbulanceRequestOrdersModel.fromJson(Map<String, dynamic> json) {
statusText = json['statusText'];
paymentStatus = json['paymentStatus'];
clientRequestid = json['clientRequestid'];
paymentStatusText = json['paymentStatusText'];
projectName = json['projectName'];
nearestProjectName = json['nearestProjectName'];
paymentAmount = json['paymentAmount'];
wFOrder = json['wF_order'] != null ? new WFOrder.fromJson(json['wF_order']) : null;
serviceText = json['serviceText'];
isSentForApproval = json['isSentForApproval'];
exaCartOrderId = json['exaCart_OrderId'];
isTimer = json['isTimer'];
timeSeconds = json['timeSeconds'];
totalPendingSeconds = json['totalPendingSeconds'];
timeMinute = json['timeMinute'];
timeHour = json['timeHour'];
timeTotalSeconds = json['timeTotalSeconds'];
timeTotalMinute = json['timeTotalMinute'];
timeTotalHour = json['timeTotalHour'];
approvalStatus = json['approvalStatus'];
isActive = json['isActive'];
clickButton = json['clickButton'];
orderHistory = json['orderHistory'];
pickupLocation = json['pickupLocation'];
dropOffLocation = json['dropOffLocation'];
clinicName = json['clinicName'];
doctorName = json['doctorName'];
branch = json['branch'];
time = json['time'];
notes = json['notes'];
id = json['id'];
patientId = json['patientId'];
patientOutSa = json['patientOutSa'];
isOutPatient = json['isOutPatient'];
projectId = json['projectId'];
nearestProjectId = json['nearestProjectId'];
longitude = json['longitude'];
latitude = json['latitude'];
appointmentNo = json['appointmentNo'];
dischargeId = json['dischargeId'];
statusId = json['statusId'];
serviceId = json['serviceId'];
channel = json['channel'];
orderpayment = json['orderpayment'] != null ? new Orderpayment.fromJson(json['orderpayment']) : null;
orderselectedservice = json['orderselectedservice'];
wforder = json['wforder'];
orderapprovalobj = json['orderapprovalobj'];
created = json['created'];
createdBy = json['createdBy'];
modified = json['modified'];
modifiedBy = json['modifiedBy'];
isDeleted = json['isDeleted'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['statusText'] = this.statusText;
data['paymentStatus'] = this.paymentStatus;
data['clientRequestid'] = this.clientRequestid;
data['paymentStatusText'] = this.paymentStatusText;
data['projectName'] = this.projectName;
data['nearestProjectName'] = this.nearestProjectName;
data['paymentAmount'] = this.paymentAmount;
if (this.wFOrder != null) {
data['wF_order'] = this.wFOrder.toJson();
}
data['serviceText'] = this.serviceText;
data['isSentForApproval'] = this.isSentForApproval;
data['exaCart_OrderId'] = this.exaCartOrderId;
data['isTimer'] = this.isTimer;
data['timeSeconds'] = this.timeSeconds;
data['totalPendingSeconds'] = this.totalPendingSeconds;
data['timeMinute'] = this.timeMinute;
data['timeHour'] = this.timeHour;
data['timeTotalSeconds'] = this.timeTotalSeconds;
data['timeTotalMinute'] = this.timeTotalMinute;
data['timeTotalHour'] = this.timeTotalHour;
data['approvalStatus'] = this.approvalStatus;
data['isActive'] = this.isActive;
data['clickButton'] = this.clickButton;
data['orderHistory'] = this.orderHistory;
data['pickupLocation'] = this.pickupLocation;
data['dropOffLocation'] = this.dropOffLocation;
data['clinicName'] = this.clinicName;
data['doctorName'] = this.doctorName;
data['branch'] = this.branch;
data['time'] = this.time;
data['notes'] = this.notes;
data['id'] = this.id;
data['patientId'] = this.patientId;
data['patientOutSa'] = this.patientOutSa;
data['isOutPatient'] = this.isOutPatient;
data['projectId'] = this.projectId;
data['nearestProjectId'] = this.nearestProjectId;
data['longitude'] = this.longitude;
data['latitude'] = this.latitude;
data['appointmentNo'] = this.appointmentNo;
data['dischargeId'] = this.dischargeId;
data['statusId'] = this.statusId;
data['serviceId'] = this.serviceId;
data['channel'] = this.channel;
if (this.orderpayment != null) {
data['orderpayment'] = this.orderpayment.toJson();
}
data['orderselectedservice'] = this.orderselectedservice;
data['wforder'] = this.wforder;
data['orderapprovalobj'] = this.orderapprovalobj;
data['created'] = this.created;
data['createdBy'] = this.createdBy;
data['modified'] = this.modified;
data['modifiedBy'] = this.modifiedBy;
data['isDeleted'] = this.isDeleted;
return data;
}
}
class WFOrder {
dynamic wfButtonsDTO;
int id;
int orderId;
int previousStep;
int nextStep;
int serviceId;
dynamic order;
String created;
dynamic createdBy;
dynamic modified;
dynamic modifiedBy;
bool isDeleted;
WFOrder({this.wfButtonsDTO, this.id, this.orderId, this.previousStep, this.nextStep, this.serviceId, this.order, this.created, this.createdBy, this.modified, this.modifiedBy, this.isDeleted});
WFOrder.fromJson(Map<String, dynamic> json) {
wfButtonsDTO = json['wf_ButtonsDTO'];
id = json['id'];
orderId = json['orderId'];
previousStep = json['previousStep'];
nextStep = json['nextStep'];
serviceId = json['serviceId'];
order = json['order'];
created = json['created'];
createdBy = json['createdBy'];
modified = json['modified'];
modifiedBy = json['modifiedBy'];
isDeleted = json['isDeleted'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['wf_ButtonsDTO'] = this.wfButtonsDTO;
data['id'] = this.id;
data['orderId'] = this.orderId;
data['previousStep'] = this.previousStep;
data['nextStep'] = this.nextStep;
data['serviceId'] = this.serviceId;
data['order'] = this.order;
data['created'] = this.created;
data['createdBy'] = this.createdBy;
data['modified'] = this.modified;
data['modifiedBy'] = this.modifiedBy;
data['isDeleted'] = this.isDeleted;
return data;
}
}
class Orderpayment {
int id;
int orderId;
dynamic clientRequestId;
double totalAmount;
int paymentStatus;
dynamic order;
String created;
dynamic createdBy;
dynamic modified;
dynamic modifiedBy;
bool isDeleted;
Orderpayment({this.id, this.orderId, this.clientRequestId, this.totalAmount, this.paymentStatus, this.order, this.created, this.createdBy, this.modified, this.modifiedBy, this.isDeleted});
Orderpayment.fromJson(Map<String, dynamic> json) {
id = json['id'];
orderId = json['orderId'];
clientRequestId = json['clientRequestId'];
totalAmount = json['totalAmount'];
paymentStatus = json['paymentStatus'];
order = json['order'];
created = json['created'];
createdBy = json['createdBy'];
modified = json['modified'];
modifiedBy = json['modifiedBy'];
isDeleted = json['isDeleted'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['orderId'] = this.orderId;
data['clientRequestId'] = this.clientRequestId;
data['totalAmount'] = this.totalAmount;
data['paymentStatus'] = this.paymentStatus;
data['order'] = this.order;
data['created'] = this.created;
data['createdBy'] = this.createdBy;
data['modified'] = this.modified;
data['modifiedBy'] = this.modifiedBy;
data['isDeleted'] = this.isDeleted;
return data;
}
}

@ -0,0 +1,200 @@
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
class PatientER_RC {
double versionID;
int channel;
int languageID;
String iPAdress;
String generalid;
bool patientOutSA;
String sessionID;
bool isDentalAllowedBackend;
int deviceTypeID;
String patientID;
String tokenID;
int patientTypeID;
int patientType;
int orderServiceID;
String patientIdentificationID;
dynamic patientOutSa;
int projectID;
int lineItemNo;
TransportationDetails transportationDetails;
PatientERTransportationMethod patientERTransportationMethod;
PatientER_RC(
{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.orderServiceID,
this.patientIdentificationID,
this.patientOutSa,
this.projectID,
this.lineItemNo,
this.transportationDetails});
PatientER_RC.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
channel = json['Channel'];
languageID = json['LanguageID'];
iPAdress = json['IPAdress'];
generalid = json['generalid'];
patientOutSA = json['PatientOutSA'];
sessionID = json['SessionID'];
isDentalAllowedBackend = json['isDentalAllowedBackend'];
deviceTypeID = json['DeviceTypeID'];
patientID = json['PatientID'];
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
orderServiceID = json['OrderServiceID'];
patientIdentificationID = json['PatientIdentificationID'];
patientOutSa = json['patientOutSa'];
projectID = json['projectID'];
lineItemNo = json['lineItemNo'];
transportationDetails = json['transportationDetails'] != null
? new TransportationDetails.fromJson(json['transportationDetails'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['LanguageID'] = this.languageID;
data['IPAdress'] = this.iPAdress;
data['generalid'] = this.generalid;
data['PatientOutSA'] = this.patientOutSA;
data['SessionID'] = this.sessionID;
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
data['DeviceTypeID'] = this.deviceTypeID;
data['PatientID'] = this.patientID;
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['OrderServiceID'] = this.orderServiceID;
data['PatientIdentificationID'] = this.patientIdentificationID;
data['patientOutSa'] = this.patientOutSa;
data['projectID'] = this.projectID;
data['lineItemNo'] = this.lineItemNo;
if (this.transportationDetails != null) {
data['transportationDetails'] = this.transportationDetails.toJson();
}
return data;
}
}
class TransportationDetails {
int direction;
int haveAppointment;
int tripType;
int pickupUrgency;
int pickupSpot;
String pickupDateTime;
String transportationType;
int ambulate;
String notes;
int requesterFileNo;
String requesterMobileNo;
bool requesterIsOutSA;
String pickupLocationName;
String dropoffLocationName;
String pickupLatitude;
String pickupLongitude;
String dropoffLatitude;
String dropoffLongitude;
String appointmentNo;
String appointmentClinicName;
String appointmentDoctorName;
String appointmentBranch;
String appointmentTime;
TransportationDetails(
{this.direction,
this.haveAppointment,
this.tripType,
this.pickupUrgency,
this.pickupSpot,
this.pickupDateTime,
this.transportationType,
this.ambulate,
this.notes,
this.requesterFileNo,
this.requesterMobileNo,
this.requesterIsOutSA,
this.pickupLocationName,
this.dropoffLocationName,
this.pickupLatitude,
this.pickupLongitude,
this.dropoffLatitude,
this.dropoffLongitude,
this.appointmentNo,
this.appointmentClinicName,
this.appointmentDoctorName,
this.appointmentBranch,
this.appointmentTime});
TransportationDetails.fromJson(Map<String, dynamic> json) {
direction = json['direction'];
haveAppointment = json['haveAppointment'];
tripType = json['tripType'];
pickupUrgency = json['pickupUrgency'];
pickupSpot = json['pickupSpot'];
pickupDateTime = json['pickupDateTime'];
transportationType = json['transportationType'];
ambulate = json['ambulate'];
notes = json['notes'];
requesterFileNo = json['requesterFileNo'];
requesterMobileNo = json['requesterMobileNo'];
requesterIsOutSA = json['requesterIsOutSA'];
pickupLocationName = json['pickupLocationName'];
dropoffLocationName = json['dropoffLocationName'];
pickupLatitude = json['pickup_Latitude'];
pickupLongitude = json['pickup_Longitude'];
dropoffLatitude = json['dropoff_Latitude'];
dropoffLongitude = json['dropoff_Longitude'];
appointmentNo = json['appointmentNo'];
appointmentClinicName = json['appointmentClinicName'];
appointmentDoctorName = json['appointmentDoctorName'];
appointmentBranch = json['appointmentBranch'];
appointmentTime = json['appointmentTime'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['direction'] = this.direction;
data['haveAppointment'] = this.haveAppointment;
data['tripType'] = this.tripType;
data['pickupUrgency'] = this.pickupUrgency;
data['pickupSpot'] = this.pickupSpot;
data['pickupDateTime'] = this.pickupDateTime;
data['transportationType'] = this.transportationType;
data['ambulate'] = this.ambulate;
data['notes'] = this.notes;
data['requesterFileNo'] = this.requesterFileNo;
data['requesterMobileNo'] = this.requesterMobileNo;
data['requesterIsOutSA'] = this.requesterIsOutSA;
data['pickupLocationName'] = this.pickupLocationName;
data['dropoffLocationName'] = this.dropoffLocationName;
data['pickup_Latitude'] = this.pickupLatitude;
data['pickup_Longitude'] = this.pickupLongitude;
data['dropoff_Latitude'] = this.dropoffLatitude;
data['dropoff_Longitude'] = this.dropoffLongitude;
data['appointmentNo'] = this.appointmentNo;
data['appointmentClinicName'] = this.appointmentClinicName;
data['appointmentDoctorName'] = this.appointmentDoctorName;
data['appointmentBranch'] = this.appointmentBranch;
data['appointmentTime'] = this.appointmentTime;
return data;
}
}

@ -9,12 +9,12 @@ class LabResultList {
class LabResult {
String description;
Null femaleInterpretativeData;
dynamic femaleInterpretativeData;
int gender;
bool isCertificateAllowed;
int lineItemNo;
Null maleInterpretativeData;
Null notes;
dynamic maleInterpretativeData;
dynamic notes;
int orderLineItemNo;
int orderNo;
String packageID;
@ -27,11 +27,11 @@ class LabResult {
String sampleCollectedOn;
String sampleReceivedOn;
String setupID;
Null superVerifiedOn;
dynamic superVerifiedOn;
String testCode;
String uOM;
String verifiedOn;
Null verifiedOnDateTime;
dynamic verifiedOnDateTime;
LabResult(
{this.description,

@ -1,7 +1,8 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:flutter/cupertino.dart';
@ -11,20 +12,23 @@ import '../base_service.dart';
class AmService extends BaseService {
List<PatientERTransportationMethod> amModelList = List();
List<PatientAllPresOrders> patientAllPresOrdersList = List();
List<AmbulanceRequestOrdersModel> patientAmbulanceRequestOrdersList = List();
bool hasPendingOrder = false;
int pendingOrderID = 0;
String pendingOrderStatus = "";
String pendingOrderStatusAR = "";
PickUpRequestPresOrder pickUpRequestPresOrder;
AmbulanceRequestOrdersModel pendingAmbulanceRequestOrder;
Future getAllTransportationOrders() async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['IdentificationNo'] = user.patientIdentificationNo;
await baseAppClient.get(
GET_ALL_TRANSPORTATIONS_RC + "?patientID=" + user.patientID.toString(),
isExternal: false, onSuccess: (dynamic response, int statusCode) {
await baseAppClient.get(GET_ALL_TRANSPORTATIONS_RC + "?patientID=" + user.patientID.toString(), isExternal: false, onSuccess: (dynamic response, int statusCode) {
amModelList.clear();
response['data']['transportationservices'].forEach((item) {
amModelList.add(PatientERTransportationMethod.fromJson(item));
@ -33,24 +37,13 @@ class AmService extends BaseService {
hasError = true;
super.error = error;
});
// await baseAppClient.post(GET_AMBULANCE_REQUEST,
// onSuccess: (dynamic response, int statusCode) {
// amModelList.clear();
// response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) {
// amModelList.add(PatientERTransportationMethod.fromJson(item));
// });
// }, onFailure: (String error, int statusCode) {
// hasError = true;
// super.error = error;
// }, body: body);
}
Future getPatientAllPresOrdersList() async {
hasError = false;
hasPendingOrder = false;
pickUpRequestPresOrder = null;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) {
patientAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((item) {
if (item['ServiceID'] == OrderService.AMBULANCE.getIdOrderService()) {
@ -70,15 +63,48 @@ class AmService extends BaseService {
}, body: Map());
}
Future getPatientAllPresOrdersListRC(dynamic patientID) async {
hasError = false;
hasPendingOrder = false;
pickUpRequestPresOrder = null;
Map<String, dynamic> body = Map();
body['patientId'] = patientID.toString();
body['PatientID'] = patientID.toString();
await baseAppClient.post(GET_ALL_TRANSPORTATIONS_ORDERS, onSuccess: (dynamic response, int statusCode) {
patientAmbulanceRequestOrdersList.clear();
hasPendingOrder = false;
pendingOrderID = 0;
pendingAmbulanceRequestOrder = null;
response['data'].forEach((item) {
patientAmbulanceRequestOrdersList.add(AmbulanceRequestOrdersModel.fromJson(item));
if (item['statusId'] == 1) {
hasPendingOrder = true;
pendingOrderID = item['orderpayment']['id'];
pendingOrderStatus = item['statusText'];
pendingOrderStatusAR = item['statusText'];
pendingAmbulanceRequestOrder = AmbulanceRequestOrdersModel.fromJson(item);
}
});
print(patientAmbulanceRequestOrdersList.length);
print(hasPendingOrder);
print(pendingOrderID);
print(pendingOrderStatus);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getOrderDetails() async {
hasError = false;
Map<String, dynamic> body = Map();
body['PresOrderID'] = pendingOrderID;
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID,
onSuccess: (dynamic response, int statusCode) {
response['PatientER_RRT_GetPickUpRequestByPresOrderIDList']
.forEach((item) {
await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID, onSuccess: (dynamic response, int statusCode) {
response['PatientER_RRT_GetPickUpRequestByPresOrderIDList'].forEach((item) {
pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item);
});
}, onFailure: (String error, int statusCode) {
@ -95,22 +121,34 @@ class AmService extends BaseService {
body['RejectionReason'] = '';
body['PresOrderStatus'] = OrderService.AMBULANCE.getIdOrderService();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(UPDATE_PRESS_ORDER,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
await baseAppClient.post(UPDATE_PRESS_ORDER, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future insertERPressOrder({@required PatientER patientER}) async {
Future updatePressOrderRC({@required int presOrderID, @required String patientID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['Id'] = presOrderID;
body['StatusId'] = 6;
body['ClickButton'] = 14;
body['PatientID'] = patientID;
await baseAppClient.post(CANCEL_AMBULANCE_REQUEST, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future insertERPressOrder({@required PatientER_RC patientER}) async {
hasError = false;
var body = patientER.toJson();
print(body);
await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
await baseAppClient.post(INSERT_TRANSPORTATION_ORDER_RC, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: patientER.toJson());
}, body: body);
}
}

@ -7,9 +7,6 @@ class ErService extends BaseService {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
Map<String, dynamic> body = Map();
String Latitude = "";
String Longitude = "";
String PhoneNumber = "";
Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async {
hasError = false;
@ -23,21 +20,15 @@ class ErService extends BaseService {
body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0;
dynamic localRes;
await baseAppClient.post(GET_NEAREST_HOSPITAL,
onSuccess: (dynamic response, int statusCode) {
projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList
.add(ProjectAvgERWaitingTime.fromJson(vital));
});
projectAvgERWaitingTimeModelList.forEach((element) {
Latitude = '${element.latitude}';
Longitude = '${element.longitude}';
PhoneNumber = '${element.phoneNumber}';
});
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
}

@ -17,7 +17,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class MyBalanceService extends BaseService {
List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List();
double totalAdvanceBalanceAmount;
dynamic totalAdvanceBalanceAmount;
List<PatientInfo> patientInfoList = List();
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse();

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/AmbulanceRequestOrdersModel.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
@ -27,12 +29,17 @@ class AmRequestViewModel extends BaseViewModel {
List<AppoitmentAllHistoryResultList> get appoitmentAllHistoryResultList =>
_medicalService.appoitmentAllHistoryResultList;
List<AmbulanceRequestOrdersModel> get patientAmbulanceRequestOrdersList =>
_amService.patientAmbulanceRequestOrdersList;
List<HospitalsModel> get hospitals => _hospitalService.hospitals;
bool get hasPendingOrder =>_amService.hasPendingOrder;
PickUpRequestPresOrder get pickUpRequestPresOrder =>_amService.pickUpRequestPresOrder;
AmbulanceRequestOrdersModel get pendingAmbulanceRequestOrder =>_amService.pendingAmbulanceRequestOrder;
Future getAppointmentHistory() async {
setState(ViewState.BusyLocal);
await _medicalService.getAppointmentHistory(isActiveAppointment: true);
@ -60,7 +67,18 @@ class AmRequestViewModel extends BaseViewModel {
error = _hospitalService.error;
setState(ViewState.Error);
} else
getPatientAllPresOrdersList();
// getPatientAllPresOrdersList();
getPatientAllPresOrdersListRC();
}
Future getPatientAllPresOrdersListRC() async {
setState(ViewState.Busy);
await _amService.getPatientAllPresOrdersListRC(authenticatedUserObject.user.patientID);
if (_hospitalService.hasError) {
error = _hospitalService.error;
setState(ViewState.Error);
} else
setState(ViewState.Idle);
}
Future getPatientAllPresOrdersList() async {
@ -87,22 +105,23 @@ class AmRequestViewModel extends BaseViewModel {
Future updatePressOrder({@required int presOrderID}) async {
setState(ViewState.Busy);
await _amService.updatePressOrder(presOrderID: presOrderID);
// await _amService.updatePressOrder(presOrderID: presOrderID);
await _amService.updatePressOrderRC(presOrderID: presOrderID, patientID: authenticatedUserObject.user.patientID.toString());
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.Error);
} else
getPatientAllPresOrdersList();
getPatientAllPresOrdersListRC();
}
Future insertERPressOrder({@required PatientER patientER}) async {
Future insertERPressOrder({@required PatientER_RC patientER}) async {
setState(ViewState.Busy);
await _amService.insertERPressOrder(patientER: patientER);
if (_amService.hasError) {
error = _amService.error;
setState(ViewState.ErrorLocal);
} else
getAmRequestOrders();
// getAmRequestOrders();
getPatientAllPresOrdersListRC();
}
}

@ -38,7 +38,7 @@ class MyBalanceViewModel extends BaseViewModel {
//===========================
double get totalAdvanceBalanceAmount =>
dynamic get totalAdvanceBalanceAmount =>
_myBalanceService.totalAdvanceBalanceAmount;
String get updatedRegisterBloodMessage =>

@ -8,8 +8,6 @@ import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:provider/provider.dart';

@ -43,9 +43,8 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
description: TranslationBase.of(context).infoCMC,
imagesInfo: [
ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png',
imageEn: 'assets/images/wifi-EN.png',
isAsset: true)
imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png')
],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold(

@ -2,7 +2,6 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -46,9 +45,8 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
appBarTitle: TranslationBase.of(context).homeHealthCare,
imagesInfo: [
ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png',
imageEn: 'assets/images/wifi-EN.png',
isAsset: true)
imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png')
],
body: Scaffold(
extendBodyBehindAppBar: true,

@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@ -22,6 +23,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -56,8 +58,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel =
locator<PharmacyModuleViewModel>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
LocationUtils locationUtils;
var weather = '--';
WeatherService _weatherService = WeatherService();
@ -65,12 +66,8 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
locationUtils =
new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => {
Geolocator.getLastKnownPosition()
.then((value) => setLocation(value))
});
locationUtils = new LocationUtils(isShowConfirmDialog: true, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) => {Geolocator.getLastKnownPosition().then((value) => setLocation(value))});
});
super.initState();
}
@ -109,14 +106,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context)
.healthWeatherIndicators,
TranslationBase.of(context).healthWeatherIndicators,
color: Colors.white,
fontWeight: FontWeight.w600,
),
Texts(
TranslationBase.of(context)
.healthTipsBasedOnCurrentWeather,
TranslationBase.of(context).healthTipsBasedOnCurrentWeather,
color: Colors.white,
fontSize: 14,
),
@ -144,11 +139,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
width: 60,
height: 60,
),
Directionality(
textDirection: TextDirection.ltr,
child: AppText(weather,
fontSize: 22,
color: Colors.white))
Directionality(textDirection: TextDirection.ltr, child: AppText(weather, fontSize: 22, color: Colors.white))
],
),
Texts(
@ -173,8 +164,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
);
},
imageLocation:
'assets/images/new-design/my_file_bottom_bar.png',
imageLocation: 'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile,
),
ServicesContainer(
@ -196,8 +186,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
),
),
imageLocation:
'assets/images/new-design/booking_icon_active.png',
imageLocation: 'assets/images/new-design/booking_icon_active.png',
title: TranslationBase.of(context).bookAppo,
),
ServicesContainer(
@ -207,8 +196,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: PaymentService(),
),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService,
),
ServicesContainer(
@ -218,17 +206,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: AnicllaryOrders(),
),
),
imageLocation:
'assets/images/comprehensive_medical_checkup_logo.png',
imageLocation: 'assets/images/comprehensive_medical_checkup_logo.png',
title: TranslationBase.of(context).anicllaryOrders,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
FadePage(page: CovidDrivethruLocation()),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).covid19_driveThrueTest,
),
ServicesContainer(
@ -247,12 +233,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
ServicesContainer(
onTap: () => getPharmacyToken(),
// Navigator.push(
// context,
// FadePage(
// page: ParkingPage(),
// ),
// ),
imageLocation: 'assets/images/pharmacy_logo.png',
title: TranslationBase.of(context).pharmacy),
ServicesContainer(
@ -262,8 +242,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: InsuranceUpdate(),
),
),
imageLocation:
'assets/images/medical/insurance_card_icon.png',
imageLocation: 'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance,
),
ServicesContainer(
@ -281,8 +260,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: MyFamily(),
),
),
imageLocation:
'assets/images/new-design/family_menu_icon_red.png',
imageLocation: 'assets/images/new-design/family_menu_icon_red.png',
title: TranslationBase.of(context).myFamily,
),
if (projectViewModel.havePrivilege(35))
@ -291,8 +269,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
context,
FadePage(page: ChildVaccinesPage()),
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
imageLocation: 'assets/images/new-design/children_vaccines_icon.png',
title: TranslationBase.of(context).childVaccine,
),
ServicesContainer(
@ -300,18 +277,17 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices();
},
imageLocation:
'assets/images/new-design/upcoming_icon_bottom_bar.png',
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
),
if (projectViewModel.havePrivilege(42))
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: TranslationBase.of(context).symptomCheckerTitle),
// if (projectViewModel.havePrivilege(42))
// ServicesContainer(
// onTap: () => Navigator.push(
// context,
// FadePage(page: SymptomInfo()),
// ),
// imageLocation: 'assets/images/new-design/body_icon.png',
// title: TranslationBase.of(context).symptomCheckerTitle),
if (projectViewModel.havePrivilege(36))
ServicesContainer(
onTap: () => Navigator.push(
@ -328,8 +304,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
imageLocation: 'assets/images/new-design/health_calculator_icon.png',
title: TranslationBase.of(context).calculators,
),
ServicesContainer(
@ -339,20 +314,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: HealthConverter(),
),
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
imageLocation: 'assets/images/new-design/health_convertor_icon.png',
title: TranslationBase.of(context).converters,
),
if (projectViewModel.havePrivilege(38))
ServicesContainer(
onTap: () =>
Navigator.push(context, FadePage(page: H2OPage())),
// Navigator.push(
// context,
// FadePage(
// page: H2OPageIndexPage(),
// ),
// ),
onTap: () => Navigator.push(context, FadePage(page: H2OPage())),
imageLocation: 'assets/images/new-design/water_icon.png',
title: TranslationBase.of(context).h2o,
),
@ -360,10 +327,11 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
FadePage(
page: SmartWatchInstructions()
),
),
imageLocation:
'assets/images/new-design/smartwatch_icon.png',
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
ServicesContainer(
@ -373,15 +341,12 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
page: ParkingPage(),
),
),
imageLocation:
'assets/images/new-design/parking_system_icon.png',
imageLocation: 'assets/images/new-design/parking_system_icon.png',
title: TranslationBase.of(context).parking,
),
ServicesContainer(
onTap: () => launch(
"https://hmgwebservices.com/vt_mobile/html/index.html"),
imageLocation:
'assets/images/new-design/virtual_tour_icon.png',
onTap: () => launch("https://hmgwebservices.com/vt_mobile/html/index.html"),
imageLocation: 'assets/images/new-design/virtual_tour_icon.png',
title: TranslationBase.of(context).vTour,
),
ServicesContainer(
@ -389,12 +354,10 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl:
"https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
)));
},
imageLocation:
'assets/images/new-design/twitter_dashboard_icon.png',
imageLocation: 'assets/images/new-design/twitter_dashboard_icon.png',
title: TranslationBase.of(context).latestNews,
),
ServicesContainer(
@ -436,8 +399,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
@ -451,8 +413,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
});
} else {
setState(() {
weather =
data != null ? data['Temperature'].toString() + '\u2103' : '--';
weather = data != null ? data['Temperature'].toString() + '\u2103' : '--';
});
}
}

@ -1,12 +1,12 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@ -49,22 +49,29 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).waterTracker,
description: TranslationBase.of(context).h2oInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/ar/0.png')
],
showHomeAppBarIcon: false,
baseViewModel: model,
isHelp: true,
appBarIcons: [
IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
),
);
},
),
model.isLogin
? IconButton(
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
),
);
},
)
: Container(),
],
body: Scaffold(
extendBodyBehindAppBar: true,

@ -56,28 +56,28 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
AuthenticatedUser authenticatedUser;
GetAllSharedRecordsByStatusList selectedPatientFamily;
AdvanceModel advanceModel = AdvanceModel();
List_BloodGroupDetailsModel bloodDetails =
List_BloodGroupDetailsModel(bloodGroup: "A-");
List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-");
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
var checkedValue = false;
List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectProvider;
@override
void initState() {
imagesInfo.add(
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectProvider.isLogin) getAuthUser();
});
super.initState();
getAuthUser();
}
@override
Widget build(BuildContext context) {
imagesInfo.add(
ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
ProjectViewModel projectProvider = Provider.of(context);
projectProvider = Provider.of(context);
return BaseView<MyBalanceViewModel>(
onModelReady: (model) => model.getCities(), //model.getHospitals(),
@ -102,22 +102,16 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
height: 12,
),
InkWell(
onTap: () =>
confirmSelectHospitalDialog(model.CitiesModelList),
onTap: () => confirmSelectHospitalDialog(model.CitiesModelList),
//model.hospitals
child: Container(
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName(projectProvider, context)),
Icon(Icons.arrow_drop_down)
],
children: [Texts(getHospitalName(projectProvider, context)), Icon(Icons.arrow_drop_down)],
),
),
),
@ -132,9 +126,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -156,9 +148,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12),
width: double.infinity,
height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -175,16 +165,14 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
Row(
children: [
Container(
child: Text(
TranslationBase.of(context).viewTermsConditions),
child: Text(TranslationBase.of(context).viewTermsConditions),
),
SizedBox(
width: MediaQuery.of(context).size.height * 0.10,
),
InkWell(
onTap: () {
Navigator.of(context)
.push(FadePage(page: UserAgreementPage()));
Navigator.of(context).push(FadePage(page: UserAgreementPage()));
},
child: Container(
child: Texts(
@ -220,12 +208,8 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
width: 10,
),
Text(
TranslationBase.of(context)
.iAgreeToTheTermsAndConditions,
style: Theme.of(context).textTheme.subtitle1.copyWith(
color: checkedValue
? Color(0xFFc5272d)
: Colors.black),
TranslationBase.of(context).iAgreeToTheTermsAndConditions,
style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue ? Color(0xFFc5272d) : Colors.black),
),
],
),
@ -247,23 +231,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
builder: (_) => AssetGiffyDialog(
title: Text(
"",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
),
image: Image.asset(
'assets/images/BloodChrt_EN.png'),
buttonCancelText: Text(
TranslationBase.of(context).cancel),
image: Image.asset('assets/images/BloodChrt_EN.png'),
buttonCancelText: Text(TranslationBase.of(context).cancel),
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
));
},
child: Container(
width: 250,
height: 200,
child: Image.asset(
'assets/images/BloodChrt_EN.png')),
child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png')),
),
),
),
@ -293,19 +269,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
label: TranslationBase.of(context).save,
onTap: () async {
if (_selectedHospital == null) {
AppToast.showErrorToast(
message: TranslationBase.of(context).selectCity);
AppToast.showErrorToast(message: TranslationBase.of(context).selectCity);
return;
}
bloodDetails.city = projectProvider.isArabic
? _selectedHospital.descriptionN
: _selectedHospital.description;
bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
bloodDetails.cityCode = _selectedHospital.iD.toString();
bloodDetails.gender = gender == Gender.Male ? 1 : 2;
await model.updateBloodGroup(bloodDetails);
if (model.state == ViewState.Idle) {
AppToast.showSuccessToast(
message: model.updatedRegisterBloodMessage);
AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
} else {
AppToast.showErrorToast(message: model.error);
}
@ -325,8 +297,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
setState(() {
if (value == BeneficiaryType.MyAccount) {
_fileTextController.text = model.user.patientID.toString();
advanceModel.depositorName =
model.user.firstName + " " + model.user.lastName;
advanceModel.depositorName = model.user.firstName + " " + model.user.lastName;
} else
_fileTextController.text = "";
@ -453,8 +424,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
);
}
void confirmSelectFamilyDialog(
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
void confirmSelectFamilyDialog(List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
showDialog(
context: context,
child: SelectPatientFamilyDialog(
@ -463,8 +433,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onValueSelected: (value) {
setState(() {
selectedPatientFamily = value;
_fileTextController.text =
selectedPatientFamily.patientID.toString();
_fileTextController.text = selectedPatientFamily.patientID.toString();
advanceModel.depositorName = value.patientName;
});
},
@ -538,12 +507,9 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary;
}
String getHospitalName(
ProjectViewModel projectProvider, BuildContext context) {
String getHospitalName(ProjectViewModel projectProvider, BuildContext context) {
if (_selectedHospital != null)
return projectProvider.isArabic
? _selectedHospital.descriptionN
: _selectedHospital.description;
return projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
else
return TranslationBase.of(context).selectCity;
// return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital;
@ -558,8 +524,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});

@ -218,7 +218,9 @@ class ConfirmPaymentPage extends StatelessWidget {
authenticatedUser.patientID,
authenticatedUser,
browser,
false);
false,
null,
null);
}
onBrowserLoadStart(String url) {

@ -640,6 +640,8 @@ class _BookSuccessState extends State<BookSuccess> {
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
null,
null,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,

@ -1,6 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -18,8 +17,7 @@ class ChildVaccinesPage extends StatefulWidget {
_ChildVaccinesPageState createState() => _ChildVaccinesPageState();
}
class _ChildVaccinesPageState extends State<ChildVaccinesPage>
with SingleTickerProviderStateMixin {
class _ChildVaccinesPageState extends State<ChildVaccinesPage> with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController();
var checkedValue = false;
String addEmail = "";
@ -30,9 +28,17 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
isShowDecPage: true,
description: TranslationBase.of(context).childVaccineInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/0.png'),
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/1.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/1.png')
],
appBarTitle: TranslationBase.of(context).vaccination,
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Column(
@ -80,16 +86,14 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
fillColor: Colors.red,
hintText: model.user.emailAddress,
hintText: model.user != null ? model.user.emailAddress : "",
controller: titleController,
fontSize: 20,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
onChanged: (text) {
addEmail = text;
model.user.emailAddress == addEmail
? checkedValue = false
: checkedValue = true;
model.user.emailAddress == addEmail ? checkedValue = false : checkedValue = true;
},
validator: (value) {
if (value == null) {
@ -119,8 +123,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
//
onTap: () {
model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast(
message: TranslationBase.of(context).updateEmailMsg);
AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg);
// bloodDetails.city=_selectedHospital.toString();
// bloodDetails.

@ -152,6 +152,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
Navigator.push(
context,
FadePage(

@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'covid-dirvethru-questions.dart';
@ -34,15 +33,14 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectID = "";
List<ImagesInfo> imagesInfo = List();
DriveThroughTestingCenterModel selectedProject;
ProjectViewModel projectViewModel;
@override
void initState() {
imagesInfo.add(
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin) {
@ -56,9 +54,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true,
@ -72,31 +68,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22.0,
color: Colors.black)),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 22.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).covidInfo,
style: TextStyle(fontSize: 16.0, color: Colors.black)),
child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)),
),
Container(
margin: EdgeInsets.only(top: 20.0),
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.grey[700])),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.grey[700])),
),
Container(
height: 60.0,
@ -112,18 +94,18 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
child: DropdownButton<DriveThroughTestingCenterModel>(
hint: new Text(TranslationBase.of(context).selectAddress),
value: projectDropdownValue,
items: projectsList.map((item) {
return new DropdownMenuItem<String>(
value: item.iD.toString(),
value: selectedProject,
items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item,
child: new Text(item.projectName),
);
}).toList(),
onChanged: (newValue) {
setState(() {
projectDropdownValue = newValue;
selectedProject = newValue;
setProjectLocation(newValue);
});
},
@ -132,15 +114,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isLocationSelected
? Container(
margin: EdgeInsets.only(top: 15.0),
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.black)),
alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)),
)
: Container(),
isLocationSelected
@ -149,16 +124,15 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
decoration: BoxDecoration(
border: Border.all(color: Colors.grey[400], width: 1.0),
),
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
this.projectLat +
"," +
this.projectLong +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
this.projectLat +
"," +
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
)
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
@ -184,8 +158,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
getDirections();
},
child: Text(TranslationBase.of(context).getDirections,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -202,8 +175,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width * 0.7,
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
@ -213,8 +185,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
back();
},
child: Text(TranslationBase.of(context).back,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -227,8 +198,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width * 0.7,
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
@ -238,8 +208,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () {
next();
},
child: Text(TranslationBase.of(context).next,
style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
),
),
),
@ -259,22 +228,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
getDirections() {
if (isLocationSelected) {
MapsLauncher.launchCoordinates(double.parse(projectLat),
double.parse(projectLong), this.projectName);
MapsLauncher.launchCoordinates(double.parse(projectLat), double.parse(projectLong), this.projectName);
} else {
Utils.showErrorToast(
"Please select address from the dropdown menu to get directions");
Utils.showErrorToast("Please select address from the dropdown menu to get directions");
}
}
next() {
if (isLocationSelected) {
Navigator.push(
context,
FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList,)));
Navigator.push(context, FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList)));
} else {
Utils.showErrorToast(
"Please select address from the dropdown menu to continue");
Utils.showErrorToast("Please select address from the dropdown menu to continue");
}
}
@ -282,34 +246,25 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
Navigator.of(context).popAndPushNamed(HOME);
}
setProjectLocation(newValue) {
print(newValue);
setProjectLocation(DriveThroughTestingCenterModel newValue) {
setState(() {
this.projectLat =
projectsList[(int.parse(newValue) - 1)].latitude.toString();
this.projectLong =
projectsList[(int.parse(newValue) - 1)].longitude.toString();
this.projectName = projectsList[(int.parse(newValue) - 1)].projectName;
this.projectID =
projectsList[(int.parse(newValue) - 1)].projectID.toString();
this.projectLat = newValue.latitude.toString();
this.projectLong = newValue.longitude.toString();
this.projectName = newValue.projectName;
this.projectID = newValue.projectID.toString();
isLocationSelected = true;
});
}
getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse();
CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context);
service
.getCovidPaymentInformation(
context, int.parse(projectID), proceduresList[0].procedureID)
.then((res) {
service.getCovidPaymentInformation(context, int.parse(projectID), proceduresList[0].procedureID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
});
Navigator.push(
context,
@ -329,8 +284,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
CovidTestProceduresResponse covidTestProceduresResponse =
new CovidTestProceduresResponse();
CovidTestProceduresResponse covidTestProceduresResponse = new CovidTestProceduresResponse();
service.getCovidTestProceduresList(context).then((res) {
if (res['MessageStatus'] == 1) {

@ -30,7 +30,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
@override
void initState() {
print(widget.proceduresList[0].procedureName);
widget.selectedProcedure = widget.proceduresList[0];
super.initState();
}
@ -336,14 +335,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
widget.covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
});
// Navigator.push(
// context,
// FadePage(
// page: CovidPaymentDetails(
// covidPaymentInfoResponse: covidPaymentInfoResponse,
// projectID: int.parse(projectID),
// proceduresList: proceduresList,
// )));
} else {}
}).catchError((err) {
print(err);

@ -191,6 +191,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
null,
null,
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -29,6 +30,10 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
PageController pageController;
PatientER _patientER = PatientER();
PatientER_RC _patientER_RC = PatientER_RC();
TransportationDetails transportationDetails = new TransportationDetails();
_changeCurrentTab(int tab) {
setState(() {
currentIndex = tab;
@ -41,12 +46,13 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
void initState() {
super.initState();
pageController = new PageController();
_patientER_RC.transportationDetails = transportationDetails;
}
@override
Widget build(BuildContext context) {
return AppScaffold(
body: widget.amRequestViewModel.pickUpRequestPresOrder != null
body: widget.amRequestViewModel.pendingAmbulanceRequestOrder != null
? SingleChildScrollView(
child: Column(
children: [
@ -64,36 +70,32 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
children: [
OrderLogItem(
title: TranslationBase.of(context).reqId,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.presOrderID
value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.id
.toString(),
),
OrderLogItem(
title: TranslationBase.of(context).status,
value: widget.amRequestViewModel.pickUpRequestPresOrder.status ==0?TranslationBase.of(context).pending:'',
value: widget.amRequestViewModel.pendingAmbulanceRequestOrder.statusText,
),
OrderLogItem(
title: TranslationBase.of(context).pickupDate,
value: DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(widget
.amRequestViewModel
.pickUpRequestPresOrder
.lastEditDate)),
value: getDate(widget.amRequestViewModel.pendingAmbulanceRequestOrder.created),
),
OrderLogItem(
title: TranslationBase.of(context).pickupLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.pickupLocationName,
value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.pickupLocation,
),
OrderLogItem(
title: TranslationBase.of(context).dropoffLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.dropoffLocationName,
value: widget.amRequestViewModel.pendingAmbulanceRequestOrder
.dropOffLocation,
),
OrderLogItem(
title: TranslationBase.of(context).transportMethod,
value: widget
.amRequestViewModel.pickUpRequestPresOrder.title,
.amRequestViewModel.pendingAmbulanceRequestOrder.serviceText,
),
Container(
padding: EdgeInsets.all(10),
@ -112,7 +114,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
onTap: () {
widget.amRequestViewModel.updatePressOrder(
presOrderID: widget.amRequestViewModel
.pickUpRequestPresOrder.presOrderID);
.pendingAmbulanceRequestOrder.id);
},
),
)
@ -143,21 +145,25 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
SelectTransportationMethod(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
PickupLocation(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
BillAmount(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
Summary(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
],
@ -167,4 +173,9 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
),
);
}
String getDate(String date) {
return date.split("T")[0];
}
}

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -9,17 +10,13 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class BillAmount extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
BillAmount(
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
BillAmount({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
@override
_BillAmountState createState() => _BillAmountState();
@ -27,23 +24,19 @@ class BillAmount extends StatefulWidget {
class _BillAmountState extends State<BillAmount> {
Ambulate _ambulate = Ambulate.None;
String note ="";
String note = "";
@override
void initState() {
if(widget.patientER.ambulate!=null)
{
setState(() {
_ambulate = widget.patientER.ambulate;
note = widget.patientER.requesterNote;
});
}
// if (widget.patientER_RC.transportationDetails.ambulate != null) {
// setState(() {
// _ambulate = widget.patientER.ambulate;
// note = widget.patientER.requesterNote;
// });
// }
super.initState();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
@ -61,9 +54,7 @@ class _BillAmountState extends State<BillAmount> {
height: 10,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
outside: BorderSide(width: 1.0, color: Colors.grey[300])),
border: TableBorder.symmetric(inside: BorderSide(width: 1.0, color: Colors.grey[300]), outside: BorderSide(width: 1.0, color: Colors.grey[300])),
children: [
TableRow(
children: [
@ -96,7 +87,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.price}',
TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.price}',
color: Colors.black,
textAlign: TextAlign.start,
fontSize: 15,
@ -126,7 +117,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.priceVAT}',
TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceVAT}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -167,7 +158,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.priceTotal}',
TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -181,8 +172,13 @@ class _BillAmountState extends State<BillAmount> {
SizedBox(
height: 10,
),
Texts(TranslationBase.of(context).selectAmbulate,bold: true,),
SizedBox(height: 5,),
Texts(
TranslationBase.of(context).selectAmbulate,
bold: true,
),
SizedBox(
height: 5,
),
Row(
children: [
Expanded(
@ -196,8 +192,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -226,8 +221,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -235,7 +229,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio(
value: Ambulate.Walker,
groupValue: _ambulate,
onChanged: (value) {
setState(() {
_ambulate = value;
@ -248,7 +241,9 @@ class _BillAmountState extends State<BillAmount> {
),
],
),
SizedBox(height: 5,),
SizedBox(
height: 5,
),
Row(
children: [
Expanded(
@ -262,8 +257,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -271,7 +265,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio(
value: Ambulate.Stretcher,
groupValue: _ambulate,
onChanged: (value) {
setState(() {
_ambulate = value;
@ -293,8 +286,7 @@ class _BillAmountState extends State<BillAmount> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -302,7 +294,6 @@ class _BillAmountState extends State<BillAmount> {
leading: Radio(
value: Ambulate.None,
groupValue: _ambulate,
onChanged: (value) {
setState(() {
_ambulate = value;
@ -315,17 +306,18 @@ class _BillAmountState extends State<BillAmount> {
),
],
),
SizedBox(height: 12,),
SizedBox(
height: 12,
),
NewTextFields(
hintText: TranslationBase.of(context).notes,
initialValue: note,
onChanged: (value){
onChanged: (value) {
setState(() {
note = value;
});
},
),
SizedBox(
height: 100,
),
@ -342,9 +334,9 @@ class _BillAmountState extends State<BillAmount> {
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientER.ambulate = _ambulate;
widget.patientER.requesterNote = note;
widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber();
widget.patientER_RC.transportationDetails.notes = note;
// widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
widget.changeCurrentTab(3);
});
},

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
@ -28,13 +29,10 @@ enum HaveAppointment { YES, NO }
class PickupLocation extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
PickupLocation(
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
PickupLocation({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
@override
_PickupLocationState createState() => _PickupLocationState();
@ -77,7 +75,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (widget.patientER.direction == 1)
if (widget.patientER_RC.transportationDetails.direction == 1)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -112,8 +110,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Texts(getSelectFromMapName(context))),
Expanded(child: Texts(getSelectFromMapName(context))),
Icon(
FontAwesomeIcons.mapMarkerAlt,
size: 24,
@ -179,8 +176,7 @@ class _PickupLocationState extends State<PickupLocation> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -213,8 +209,7 @@ class _PickupLocationState extends State<PickupLocation> {
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
@ -254,11 +249,9 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 8,
),
InkWell(
onTap: () {
confirmSelectHospitalDialog(
widget.amRequestViewModel.hospitals);
confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals);
},
child: Container(
padding: EdgeInsets.all(12),
@ -271,8 +264,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName(
TranslationBase.of(context).pickupLocation)),
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -284,7 +276,7 @@ class _PickupLocationState extends State<PickupLocation> {
),
],
),
if (widget.patientER.direction == 0)
if (widget.patientER_RC.transportationDetails.direction == 0)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -294,8 +286,7 @@ class _PickupLocationState extends State<PickupLocation> {
),
InkWell(
onTap: () {
confirmSelectHospitalDialog(
widget.amRequestViewModel.hospitals);
confirmSelectHospitalDialog(widget.amRequestViewModel.hospitals);
},
child: Container(
padding: EdgeInsets.all(12),
@ -308,8 +299,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName(
TranslationBase.of(context).pickupLocation)),
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -354,8 +344,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Texts(getSelectFromMapName(context))),
Expanded(child: Texts(getSelectFromMapName(context))),
Icon(
FontAwesomeIcons.mapMarkerAlt,
size: 24,
@ -387,77 +376,59 @@ class _PickupLocationState extends State<PickupLocation> {
textColor: Colors.white,
onTap: () {
if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(
message: TranslationBase.of(context).selectAll);
AppToast.showErrorToast(message: TranslationBase.of(context).selectAll);
else
setState(() {
widget.patientER.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER.direction == 0) {
widget.patientER.dropoffLocationLattitude =
_result.geometry.location.lat.toString();
widget.patientER.dropoffLocationLongitude =
_result.geometry.location.lng.toString();
widget.patientER.pickupLocationLattitude =
_selectedHospital.latitude;
widget.patientER.pickupLocationLongitude =
_selectedHospital.longitude;
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER_RC.transportationDetails.direction == 0) {
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.geometry.location.lat.toString();
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.geometry.location.lng.toString();
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
} else {
widget.patientER.pickupLocationLattitude =
_selectedHospital.latitude;
widget.patientER.pickupLocationLongitude =
_selectedHospital.longitude;
widget.patientER.dropoffLocationLattitude =
_result.geometry.location.lat.toString();
widget.patientER.dropoffLocationLongitude =
_result.geometry.location.lng.toString();
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.geometry.location.lat.toString();
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.geometry.location.lng.toString();
}
widget.patientER.latitude =
widget.patientER.pickupLocationLattitude;
widget.patientER.longitude =
widget.patientER.pickupLocationLongitude;
widget.patientER.dropoffLocationName = widget.patientER.direction == 0?_result.formattedAddress:_selectedHospital.name;
widget.patientER.createdBy =
widget.amRequestViewModel.user.patientID;
widget.patientER.isOutPatient =
widget.amRequestViewModel.user.outSA;
widget.patientER.patientIdentificationID =
widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER.pickupDateTime =
DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER.pickupLocationName = widget.patientER.direction == 0?_selectedHospital.name:_result.formattedAddress;
widget.patientER.projectID =
widget.amRequestViewModel.user.projectID;
widget.patientER.requesterFileNo =
widget.amRequestViewModel.user.patientID;
widget.patientER.requesterIsOutSA = false;
widget.patientER.lineItemNo = 0;
widget.patientER.requesterMobileNo =
widget.amRequestViewModel.user.mobileNumber;
// widget.patientER.latitude =
// widget.patientER.pickupLocationLattitude;
// widget.patientER.longitude =
// widget.patientER.pickupLocationLongitude;
widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER.direction == 0 ? _result.formattedAddress : _selectedHospital.name;
// widget.patientER_RC.crea =
// widget.amRequestViewModel.user.patientID;
widget.patientER_RC.patientOutSA = widget.amRequestViewModel.user.outSA == 0 ? true : false;
widget.patientER_RC.patientOutSa = widget.amRequestViewModel.user.outSA;
widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER.direction == 0 ? _selectedHospital.name : _result.formattedAddress;
widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID;
widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID.toString();
widget.patientER_RC.transportationDetails.requesterIsOutSA = false;
// widget.patientER.lineItemNo = 0;
widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber;
if (_haveAppointment == HaveAppointment.YES) {
widget.patientER.appointmentNo =
myAppointment.appointmentNo.toString();
widget.patientER.appointmentClinicName =
myAppointment.clinicName;
widget.patientER.appointmentDoctorName =
myAppointment.doctorNameObj;
widget.patientER.appointmentBranch =
myAppointment.projectName;
widget.patientER.appointmentTime =
myAppointment.appointmentDate;
widget.patientER.haveAppointment = true;
widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString();
widget.patientER_RC.transportationDetails.appointmentClinicName = myAppointment.clinicName;
widget.patientER_RC.transportationDetails.appointmentDoctorName = myAppointment.doctorNameObj;
widget.patientER_RC.transportationDetails.appointmentBranch = myAppointment.projectName;
widget.patientER_RC.transportationDetails.appointmentTime = myAppointment.appointmentDate;
widget.patientER_RC.transportationDetails.haveAppointment = 1;
} else {
widget.patientER.appointmentNo = "0";
widget.patientER.appointmentClinicName = null;
widget.patientER.appointmentDoctorName = null;
widget.patientER.appointmentBranch = null;
widget.patientER.appointmentTime = null;
widget.patientER.haveAppointment = false;
widget.patientER_RC.transportationDetails.appointmentNo = "0";
widget.patientER_RC.transportationDetails.appointmentClinicName = "";
widget.patientER_RC.transportationDetails.appointmentDoctorName = "";
widget.patientER_RC.transportationDetails.appointmentBranch = "";
widget.patientER_RC.transportationDetails.appointmentTime = "";
widget.patientER_RC.transportationDetails.haveAppointment = 0;
}
widget.patientER.pickupSpot = _isInsideHome ? 1 : 0;
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
widget.changeCurrentTab(2);
});
},
@ -487,27 +458,21 @@ class _PickupLocationState extends State<PickupLocation> {
}
String getSelectFromMapName(context) {
return _result != null
? _result.formattedAddress
: TranslationBase.of(context).selectMap;
return _result != null ? _result.formattedAddress : TranslationBase.of(context).selectMap;
}
getAppointment() {
GifLoaderDialogUtils.showMyDialog(context);
widget.amRequestViewModel.getAppointmentHistory().then((value) {
if (widget.amRequestViewModel.state == ViewState.Error ||
widget.amRequestViewModel.state == ViewState.ErrorLocal) {
if (widget.amRequestViewModel.state == ViewState.Error || widget.amRequestViewModel.state == ViewState.ErrorLocal) {
AppToast.showErrorToast(message: widget.amRequestViewModel.error);
} else if (widget
.amRequestViewModel.appoitmentAllHistoryResultList.length >
0) {
} else if (widget.amRequestViewModel.appoitmentAllHistoryResultList.length > 0) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(
page: AvailableAppointmentsPage(
appointmentsAllHistoryList:
widget.amRequestViewModel.appoitmentAllHistoryResultList,
appointmentsAllHistoryList: widget.amRequestViewModel.appoitmentAllHistoryResultList,
),
),
).then((value) {
@ -527,8 +492,7 @@ class _PickupLocationState extends State<PickupLocation> {
setState(() {
_haveAppointment = HaveAppointment.NO;
});
AppToast.showErrorToast(
message: TranslationBase.of(context).noAppointment);
AppToast.showErrorToast(message: TranslationBase.of(context).noAppointment);
}
}).catchError((e) {
GifLoaderDialogUtils.hideDialog(context);

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -17,23 +18,17 @@ enum Way { OneWay, TwoWays }
class SelectTransportationMethod extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
SelectTransportationMethod(
{Key key,
this.changeCurrentTab,
this.patientER,
this.amRequestViewModel});
SelectTransportationMethod({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
@override
_SelectTransportationMethodState createState() =>
_SelectTransportationMethodState();
_SelectTransportationMethodState createState() => _SelectTransportationMethodState();
}
class _SelectTransportationMethodState
extends State<SelectTransportationMethod> {
PatientERTransportationMethod _erTransportationMethod =
PatientERTransportationMethod();
class _SelectTransportationMethodState extends State<SelectTransportationMethod> {
PatientERTransportationMethod _erTransportationMethod = PatientERTransportationMethod();
Direction _direction = Direction.FromHospital;
Way _way = Way.OneWay;
@ -42,18 +37,23 @@ class _SelectTransportationMethodState
@override
void initState() {
super.initState();
if (widget.patientER.direction != null) {
_direction = widget.patientER.direction == 0
? Direction.ToHospital
: Direction.FromHospital;
_way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays;
_erTransportationMethod = widget.amRequestViewModel
.amRequestModeList[(widget.patientER.selectedAmbulate - 1)];
// if (widget.patientER.direction != null) {
// _direction = widget.patientER.direction == 0 ? Direction.ToHospital : Direction.FromHospital;
// _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays;
// _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER.selectedAmbulate - 1)];
// } else {
// if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
// }
//RC API Revamp
if (widget.patientER_RC.transportationDetails.direction != null) {
_direction = widget.patientER_RC.transportationDetails.direction == 0 ? Direction.ToHospital : Direction.FromHospital;
_way = widget.patientER_RC.transportationDetails.tripType == 1 ? Way.OneWay : Way.TwoWays;
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[(widget.patientER_RC.transportationDetails.ambulate - 1)];
} else {
if (widget.amRequestViewModel.amRequestModeList.length != 0)
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[
widget.amRequestViewModel.amRequestModeList.length - 1];
if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
}
}
@override
@ -78,8 +78,7 @@ class _SelectTransportationMethodState
(index) => InkWell(
onTap: () {
setState(() {
_erTransportationMethod =
widget.amRequestViewModel.amRequestModeList[index];
_erTransportationMethod = widget.amRequestViewModel.amRequestModeList[index];
});
},
child: Container(
@ -95,14 +94,9 @@ class _SelectTransportationMethodState
Expanded(
flex: 3,
child: ListTile(
title: Texts(projectViewModel.isArabic
? widget.amRequestViewModel
.amRequestModeList[index].textN
: widget.amRequestViewModel
.amRequestModeList[index].text),
title: Texts(projectViewModel.isArabic ? widget.amRequestViewModel.amRequestModeList[index].textN : widget.amRequestViewModel.amRequestModeList[index].text),
leading: Radio(
value: widget
.amRequestViewModel.amRequestModeList[index],
value: widget.amRequestViewModel.amRequestModeList[index],
groupValue: _erTransportationMethod,
onChanged: (value) {
setState(() {
@ -114,8 +108,7 @@ class _SelectTransportationMethodState
),
Expanded(
flex: 1,
child: Texts(TranslationBase.of(context).sar +
' ${widget.amRequestViewModel.amRequestModeList[index].price}'),
child: Texts(TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].price}'),
)
],
),
@ -181,8 +174,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title:
Texts(TranslationBase.of(context).fromHospital),
title: Texts(TranslationBase.of(context).fromHospital),
leading: Radio(
value: Direction.FromHospital,
groupValue: _direction,
@ -211,7 +203,7 @@ class _SelectTransportationMethodState
height: 5,
),
Container(
margin: EdgeInsets.only(bottom:65 ),
margin: EdgeInsets.only(bottom: 65),
child: Row(
children: [
Expanded(
@ -225,13 +217,11 @@ class _SelectTransportationMethodState
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
title:
Texts(TranslationBase.of(context).oneDirec),
title: Texts(TranslationBase.of(context).oneDirec),
leading: Radio(
value: Way.OneWay,
groupValue: _way,
@ -256,13 +246,11 @@ class _SelectTransportationMethodState
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(8),
border:
Border.all(color: Colors.grey, width: 0.5),
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
child: ListTile(
title:
Texts(TranslationBase.of(context).twoDirec),
title: Texts(TranslationBase.of(context).twoDirec),
leading: Radio(
value: Way.TwoWays,
groupValue: _way,
@ -300,28 +288,33 @@ class _SelectTransportationMethodState
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientER.transportationMethodId = (widget
.amRequestViewModel.amRequestModeList
.indexOf(_erTransportationMethod) +
1);
widget.patientER.direction =
_direction == Direction.ToHospital ? 1 : 0;
widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER.selectedAmbulate = (widget
.amRequestViewModel.amRequestModeList
.indexOf(_erTransportationMethod) +
1);
widget.patientER.patientERTransportationMethod =
_erTransportationMethod;
widget.patientER.orderServiceID =
_orderService.getIdOrderService();
widget.patientER.pickupUrgency = 1;
widget.patientER.lineItemNo = 1;
widget.patientER.cost = _erTransportationMethod.price.toDouble();
widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
widget.patientER.totalPrice =
_erTransportationMethod.priceTotal.toDouble();
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0;
// widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1;
// widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.patientERTransportationMethod = _erTransportationMethod;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.pickupUrgency = 1;
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
// widget.changeCurrentTab(1);
// widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 1 : 0;
widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.id.toString();
widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod;
widget.patientER_RC.transportationDetails.pickupUrgency = 1;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
widget.changeCurrentTab(1);
});
},
label: TranslationBase.of(context).next,

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -6,14 +8,14 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
class Summary extends StatefulWidget {
final Function changeCurrentTab;
final PatientER patientER;
final PatientER_RC patientER_RC;
final AmRequestViewModel amRequestViewModel;
Summary({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel});
Summary({Key key, this.changeCurrentTab, this.patientER, this.patientER_RC, this.amRequestViewModel});
@override
_SummaryState createState() => _SummaryState();
@ -32,7 +34,9 @@ class _SummaryState extends State<Summary> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).rrtSummary),
SizedBox(height: 5,),
SizedBox(
height: 5,
),
Container(
width: double.infinity,
padding: EdgeInsets.all(10),
@ -43,54 +47,95 @@ class _SummaryState extends State<Summary> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).transportMethod,color: Colors.grey,),
Texts('${widget.patientER.patientERTransportationMethod.text}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).directions,color: Colors.grey,),
Texts(widget.patientER.direction ==0? TranslationBase.of(context).toHospital:TranslationBase.of(context).fromHospital,bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).pickupLocation,color: Colors.grey,),
Texts('${widget.patientER.pickupLocationName}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).dropoffLocation,color: Colors.grey,),
Texts('${widget.patientER.dropoffLocationName}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).selectAmbulate,color: Colors.grey,),
Texts('${widget.patientER.ambulate.getAmbulateTitle(context)}',bold: true,),
SizedBox(height: 8,),
Texts(TranslationBase.of(context).notes,color: Colors.grey,),
Texts('${widget.patientER.requesterNote?? '---'}',bold: true,),
SizedBox(height: 8,),
Texts(
TranslationBase.of(context).transportMethod,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.patientERTransportationMethod.text}',
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).directions,
color: Colors.grey,
),
Texts(
widget.patientER_RC.transportationDetails.direction == 0 ? TranslationBase.of(context).toHospital : TranslationBase.of(context).fromHospital,
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).pickupLocation,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.pickupLocationName}',
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).dropoffLocation,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.dropoffLocationName}',
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).selectAmbulate,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.ambulate}',
bold: true,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(context).notes,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.notes ?? '---'}',
bold: true,
),
SizedBox(
height: 8,
),
],
),
),
SizedBox(height: 20,),
Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,),
SizedBox(height: 5,),
SizedBox(
height: 20,
),
Texts(
TranslationBase.of(context).billAmount,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Container(
height: 55,
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(TranslationBase.of(context).patientShareTotal+':'),
Texts(TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.priceTotal}')
],
children: [Texts(TranslationBase.of(context).patientShareTotal + ':'), Texts(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}')],
),
),
SizedBox(height: 130),
],
),
),
@ -99,15 +144,13 @@ class _SummaryState extends State<Summary> {
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 90,
child:SecondaryButton(
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
label: TranslationBase.of(context).send,
onTap: () async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER);
}
),
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
}),
),
);
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -44,36 +45,39 @@ class _DdServicesPageState extends State<DdServicesPage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold(
appBar: AppBar(
elevation: 0,
textTheme: TextTheme(
headline6: TextStyle(
color: Theme.of(context).textTheme.headline1.color,
fontWeight: FontWeight.bold),
),
title: Text(
'ED Online',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// bold: true,
// color: Colors.white,
),
leading: Builder(
builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back),
color: Theme.of(context).textTheme.headline1.color,
onPressed: () {
showConfirmMessage(context);
},
);
},
),
centerTitle: true,
),
return AppScaffold(
appBarTitle: 'ED Online',
isShowDecPage: true,
isShowAppBar: true,
// appBarTitle: AppBar(
// elevation: 0,
// textTheme: TextTheme(
// headline6: TextStyle(
// color: Theme.of(context).textTheme.headline1.color,
// fontWeight: FontWeight.bold),
// ),
// title: Text(
// 'ED Online',
// style: TextStyle(
// fontWeight: FontWeight.bold,
// color: Theme.of(context).textTheme.headline1.color,
// fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
// // bold: true,
// // color: Colors.white,
// ),
// leading: Builder(
// builder: (BuildContext context) {
// return IconButton(
// icon: Icon(Icons.arrow_back),
// color: Theme.of(context).textTheme.headline1.color,
// onPressed: () {
// showConfirmMessage(context);
// },
// );
// },
// ),
// centerTitle: true,
// ),
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,

@ -1,16 +1,15 @@
import 'package:diplomaticquarterapp/core/viewModels/er/near_hospital_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
import 'package:diplomaticquarterapp/core/service/er/er_service.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
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 '../../uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
import 'widgets/card_position.dart';
class NearestEr extends StatelessWidget {
class NearestEr extends StatefulWidget {
static const String _url = "assets/images/";
int appointmentNo;
@ -18,91 +17,89 @@ class NearestEr extends StatelessWidget {
NearestEr({this.appointmentNo, this.projectID});
@override
_NearestErState createState() => _NearestErState();
}
class _NearestErState extends State<NearestEr> {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getERList());
super.initState();
}
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
final double itemHeight = (size.height - kToolbarHeight - 24) / 2;
final double itemWidth = size.width / 2;
return BaseView<NearHospitalViewModel>(
onModelReady: appointmentNo != null && projectID != null
? (model) => model.getProjectAvgERWaitingTimeOrders(
id: appointmentNo, projectID: projectID)
: (model) => model.getProjectAvgERWaitingTimeOrders(),
builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).NearestEr,
baseViewModel: mode,
body: mode.ProjectAvgERWaitingTimeModeList.length > 0
? Container(
child: ListView(
children: <Widget>[
Text(
"${TranslationBase.of(context).NearestErDesc}",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 18.0,
letterSpacing: 1.0,
fontWeight: FontWeight.w900,
color: new Color(0xFF60686b))),
Container(
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: GridView.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemWidth),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
controller:
new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
children: List.generate(7, (index) {
return Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[index]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[index].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[index]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[index]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[index]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName,
cardSize: itemWidth,
),
);
}),
),
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).NearestEr,
body: projectAvgERWaitingTimeModelList.length > 0
? Container(
child: ListView(
children: <Widget>[
Text("${TranslationBase.of(context).NearestErDesc}",
textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, letterSpacing: 1.0, fontWeight: FontWeight.w900, color: new Color(0xFF60686b))),
Container(
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: GridView.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemWidth),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
controller: new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
children: List.generate(7, (index) {
return Container(
child: CardPosition(
waitingTime: projectAvgERWaitingTimeModelList[index].avgTimeInHHMM.toString(),
text: projectAvgERWaitingTimeModelList[index].projectName.toString(),
image: 'assets/images/new-design/find_us_icon.png',
subText: '${projectAvgERWaitingTimeModelList[index].distanceInKilometers ?? 0.0} ${TranslationBase.of(context).km_}',
type: projectAvgERWaitingTimeModelList[index].iD.toString(),
telephone: projectAvgERWaitingTimeModelList[index].phoneNumber.toString(),
networkImage: projectAvgERWaitingTimeModelList[index].projectImageURL.toString(),
latitude: projectAvgERWaitingTimeModelList[index].latitude,
longitude: projectAvgERWaitingTimeModelList[index].longitude,
projectname: projectAvgERWaitingTimeModelList[index].projectName,
cardSize: itemWidth,
),
);
}),
),
],
),
)
: Center(
child: Texts('No Data'),
),
],
),
),
)
: Center(
child: Texts('No Data'),
),
);
}
getERList() async {
GifLoaderDialogUtils.showMyDialog(context);
ErService service = new ErService();
service.getProjectAvgERWaitingTimeOrders().then((response) {
if (response['MessageStatus'] == 1) {
setState(() {
projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList.add(ProjectAvgERWaitingTime.fromJson(vital));
});
});
GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
}
}

@ -1,9 +1,6 @@
import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/OrderLogItem.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -19,7 +16,7 @@ class OrderLogPage extends StatelessWidget {
margin: EdgeInsets.all(10),
padding: EdgeInsets.all(8),
child: ListView.builder(
itemCount: amRequestViewModel.patientAllPresOrdersList.length,
itemCount: amRequestViewModel.patientAmbulanceRequestOrdersList.length,
itemBuilder: (context, index) => Container(
margin: EdgeInsets.all(8),
decoration: BoxDecoration(
@ -31,49 +28,41 @@ class OrderLogPage extends StatelessWidget {
children: [
OrderLogItem(
title: TranslationBase.of(context).reqId,
value: amRequestViewModel.patientAllPresOrdersList[index].iD
.toString(),
value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].id.toString(),
),
OrderLogItem(
title: TranslationBase.of(context).orderStatus,
value: amRequestViewModel
.patientAllPresOrdersList[index].description,
value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].statusText,
),
OrderLogItem(
title: TranslationBase.of(context).pickupDate,
value: DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(amRequestViewModel
.patientAllPresOrdersList[index].createdOn)),
value: getDate(amRequestViewModel.patientAmbulanceRequestOrdersList[index].created),
),
OrderLogItem(
title: TranslationBase.of(context).pickupLocation,
value: amRequestViewModel
.patientAllPresOrdersList[index].pickupLocationName,
value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].pickupLocation,
),
OrderLogItem(
title: TranslationBase.of(context).dropoffLocation,
value: amRequestViewModel
.patientAllPresOrdersList[index].dropoffLocationName,
value: amRequestViewModel.patientAmbulanceRequestOrdersList[index].dropOffLocation,
),
if(amRequestViewModel.patientAllPresOrdersList[index].status==1)
if (amRequestViewModel.patientAmbulanceRequestOrdersList[index].statusId == 1)
Container(
padding: EdgeInsets.all(10),
width: double.maxFinite,
margin: EdgeInsets.only(bottom: 4,left: 4,right: 4),
margin: EdgeInsets.only(bottom: 4, left: 4, right: 4),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(12),
bottomLeft: Radius.circular(12),
bottomRight: Radius.circular(12),
bottomLeft: Radius.circular(12),
),
color: Colors.white
),
color: Colors.white),
child: SecondaryButton(
color: Colors.red[900],
color: Colors.red[900],
textColor: Colors.white,
label: TranslationBase.of(context).cancel,
onTap: () {
amRequestViewModel.updatePressOrder(presOrderID:amRequestViewModel.pickUpRequestPresOrder.presOrderID );
amRequestViewModel.updatePressOrder(presOrderID: amRequestViewModel.pendingAmbulanceRequestOrder.id);
},
),
)
@ -83,4 +72,8 @@ class OrderLogPage extends StatelessWidget {
),
);
}
String getDate(String date) {
return date.split("T")[0];
}
}

@ -1,4 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart';
@ -8,13 +8,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class RRTMainScreen extends StatefulWidget{
class RRTMainScreen extends StatefulWidget {
@override
State<StatefulWidget> createState() => RRTMainScreenState();
}
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin{
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin {
int currentIndex = 0;
TabController tabController;
PageController pageController = PageController(initialPage: 0, keepPage: true);
@ -22,84 +21,85 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
RRTViewModel viewModel;
bool loadingData;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/RRT/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/RRT/ar/0.png'));
tabController = TabController(length: 2, vsync: this);
}
TranslationBase localize;
@override
Widget build(BuildContext context) {
localize = TranslationBase.of(context);
return AppScaffold(
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
body: BaseView<RRTViewModel>(
onModelReady: (vm) async {
viewModel = vm;
loadingData = true;
await vm.loadRequiredData().then((value){
}).whenComplete(() => setState(() => loadingData = false));
},
builder: (ctx, vm, widget) => content(),
)
);
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
description: TranslationBase.of(context).rrtDDetails,
imagesInfo: imagesInfo,
body: BaseView<RRTViewModel>(
onModelReady: (vm) async {
viewModel = vm;
loadingData = true;
await vm.loadRequiredData().then((value) {}).whenComplete(() => setState(() => loadingData = false));
},
builder: (ctx, vm, widget) => content(),
));
}
Widget content(){
if(loadingData == true){
Widget content() {
if (loadingData == true) {
return Center(child: CircularProgressIndicator());
// else if(viewModel.state == ViewState.Error)
}else if(viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null){
} else if (viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null) {
return Column(
children: [
tabBar(),
Expanded(
child: contentPager()
)
],
children: [tabBar(), Expanded(child: contentPager())],
);
}else{
} else {
return Container(
alignment: Alignment.center,
child: Text(localize.somethingWentWrongTryLater, style: TextStyle(color: Colors.red), maxLines: 5,),
child: Text(
localize.somethingWentWrongTryLater,
style: TextStyle(color: Colors.red),
maxLines: 5,
),
);
}
}
Widget tabBar() => Container(
margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar(
onTap: onPageChanged,
indicatorWeight: 3,
indicatorColor: Color(0xFFc5272d),
isScrollable: false,
controller: tabController,
indicatorSize: TabBarIndicatorSize.label,
tabs: [
margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [
Tab(
child: Text(localize.rapidResponseTeam, style: TextStyle(color: Theme.of(context).appBarTheme.color),),
child: Text(
localize.rapidResponseTeam,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
),
Tab(
child: Text(localize.orderLog, style: TextStyle(color: Theme.of(context).appBarTheme.color),),
child: Text(
localize.orderLog,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
),
]
),
);
]),
);
Widget contentPager() => PageView(
onPageChanged: onPageChanged,
controller: pageController,
children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
],
);
onPageChanged: onPageChanged,
controller: pageController,
children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
],
);
void onPageChanged(int index) {
pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut);

@ -1,6 +1,7 @@
//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:url_launcher/url_launcher.dart';
@ -20,6 +21,7 @@ class CardPosition extends StatelessWidget {
final longitude;
final projectname;
final cardSize;
final String waitingTime;
const CardPosition(
{
@ -32,7 +34,8 @@ class CardPosition extends StatelessWidget {
@required this.latitude,
@required this.longitude,
@required this.projectname ,
@required this.cardSize ,
@required this.cardSize,
@required this.waitingTime ,
});
@override
@ -83,31 +86,26 @@ class CardPosition extends StatelessWidget {
}
Future navigateToSearch(context, type,telephone,networkImage,latitude,longitude,projectname) async {
var localize = TranslationBase.of(context);
showDialog(
context: context,builder: (_) => AssetGiffyDialog(
title: Text(projectname,
style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600),
),image:Image.network(networkImage, fit: BoxFit.cover,),
buttonOkText:Text("LOCATION"),
buttonOkColor: Colors.grey,
buttonCancelText:Text('CAll') ,
buttonCancelColor: Colors.grey,
onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);},
onCancelButtonPressed :() {launch("tel://" +telephone);}
) );
entryAnimation: EntryAnimation.BOTTOM,
image:Image.network(networkImage, fit: BoxFit.cover,),
title: Text(projectname,
style: TextStyle(
fontSize: 22.0, fontWeight: FontWeight.w600),
),
description: Text("${localize.averageWaitingTime}\n\n$waitingTime ${localize.minute}", textAlign: TextAlign.center,),
buttonOkText:Text("LOCATION", style: TextStyle(color: Colors.white),),
buttonOkColor: Colors.grey,
buttonCancelText:Text('CAll', style: TextStyle(color: Colors.white),) ,
buttonCancelColor: Colors.grey,
onOkButtonPressed: () { MapsLauncher.launchCoordinates(double.parse(latitude),double.parse(longitude),projectname);},
onCancelButtonPressed :() {launch("tel://" +telephone);}
));
}
}
}

@ -774,6 +774,8 @@ class _ToDoState extends State<ToDo> {
authenticatedUser,
widget.browser,
appo.isLiveCareAppointment,
null,
null,
appo.appointmentDate,
appo.appointmentNo,
appo.clinicID,

@ -46,7 +46,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
infoList: TranslationBase.of(context).infoInsuranceCardsPoints,
imagesInfo: imagesInfo,
appBarIcons: [
IconButton(
model.isLogin ? IconButton(
padding: EdgeInsets.zero,
icon: Container(
decoration: BoxDecoration(
@ -64,7 +64,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
onPressed: () {
Navigator.push(context, FadePage(page: InsuranceUpdate()));
},
),
) : Container(),
],
body: Container(
margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04),

@ -1,11 +1,10 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_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/locator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
@ -21,7 +20,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -64,8 +62,7 @@ class _HomePageState extends State<HomePage> {
width: double.infinity,
height: 210,
decoration: BoxDecoration(
image: DecorationImage(
image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
image: DecorationImage(image: ExactAssetImage('assets/images/dashboard_top_bg.png'), fit: BoxFit.cover),
),
child: Stack(
children: <Widget>[
@ -84,8 +81,7 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage("assets/images/new-design/covid_bg_transparent.png"),
image: AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
),
color: Colors.white.withOpacity(0.3),
@ -115,10 +111,7 @@ class _HomePageState extends State<HomePage> {
margin: EdgeInsets.only(
top: 15.0,
),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
child: SvgPicture.asset('assets/images/new-design/covid-19-car.svg', width: 45.0, height: 45.0),
),
Container(
margin: EdgeInsets.only(top: 5.0),
@ -140,12 +133,11 @@ class _HomePageState extends State<HomePage> {
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed:
(model.user != null && model.user.outSA == 1)
? () {}
: () {
navigateToCovidDriveThru();
},
onPressed: (model.user != null && model.user.outSA == 1)
? () {}
: () {
navigateToCovidDriveThru();
},
child: Center(
child: Center(
child: Center(
@ -177,13 +169,9 @@ class _HomePageState extends State<HomePage> {
height: 125,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))),
decoration: BoxDecoration(color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all(Radius.circular(5))),
child: SvgPicture.asset(
projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg'
: 'assets/images/new-design/liveCare_white_logo.svg',
projectViewModel.isArabic ? 'assets/images/new-design/livecare_arabic_logo.svg' : 'assets/images/new-design/liveCare_white_logo.svg',
),
),
),
@ -200,10 +188,8 @@ class _HomePageState extends State<HomePage> {
),
Positioned(
top: 155,
left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape ? 0.02 : 0.03),
child: (!model.isLogin)
? Container(
width: double.infinity,
@ -213,8 +199,7 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover)),
child: Container(
margin: EdgeInsets.all(5),
child: Column(
@ -235,8 +220,7 @@ class _HomePageState extends State<HomePage> {
fontSize: 16,
),
Align(
alignment:
projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight,
child: InkWell(
onTap: () {
widget.goToMyProfile();
@ -274,8 +258,7 @@ class _HomePageState extends State<HomePage> {
shape: BoxShape.rectangle,
border: Border.all(color: Colors.transparent, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
image: DecorationImage(image: ExactAssetImage('assets/images/bg_graphic.png'), fit: BoxFit.cover),
),
child: Container(
margin: EdgeInsets.all(5),
@ -302,8 +285,7 @@ class _HomePageState extends State<HomePage> {
),
Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset(
"assets/images/new-design/verification_check.svg"),
child: SvgPicture.asset("assets/images/new-design/verification_check.svg"),
),
],
)
@ -318,8 +300,7 @@ class _HomePageState extends State<HomePage> {
),
Container(
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
child: SvgPicture.asset(
"assets/images/new-design/pending.svg"),
child: SvgPicture.asset("assets/images/new-design/pending.svg"),
),
],
)
@ -407,8 +388,7 @@ class _HomePageState extends State<HomePage> {
width: 25,
height: 40,
),
Texts('${model.weightKg} ${TranslationBase.of(context).kg}',
color: Colors.white, fontSize: 17)
Texts('${model.weightKg} ${TranslationBase.of(context).kg}', color: Colors.white, fontSize: 17)
],
),
),
@ -465,9 +445,7 @@ class _HomePageState extends State<HomePage> {
),
),
),
if (projectViewModel.havePrivilege(64) ||
projectViewModel.havePrivilege(65) ||
projectViewModel.havePrivilege(67))
if (projectViewModel.havePrivilege(64) || projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(67))
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
@ -487,9 +465,7 @@ class _HomePageState extends State<HomePage> {
},
child: Center(
child: Padding(
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
@ -526,13 +502,10 @@ class _HomePageState extends State<HomePage> {
),
if (projectViewModel.havePrivilege(65))
DashboardItem(
onTap: () =>
(model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
onTap: () => (model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
child: Center(
child: Padding(
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
@ -587,9 +560,7 @@ class _HomePageState extends State<HomePage> {
},
child: Center(
child: Padding(
padding: (model.user != null && model.user.outSA == 1)
? const EdgeInsets.all(0.0)
: const EdgeInsets.all(15.0),
padding: (model.user != null && model.user.outSA == 1) ? const EdgeInsets.all(0.0) : const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
@ -630,14 +601,14 @@ class _HomePageState extends State<HomePage> {
SizedBox(
height: 8,
),
InkWell(
onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
InkWell(
onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
child: Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
@ -668,7 +639,12 @@ class _HomePageState extends State<HomePage> {
color: Colors.white,
),
),
Container(
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: EReferralPage()));
},
child: Container(
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
@ -683,7 +659,7 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context).offersAndPackages,
TranslationBase.of(context).ereferral,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
@ -699,51 +675,52 @@ class _HomePageState extends State<HomePage> {
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
)),
if (projectViewModel.havePrivilege(60))
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: ErOptions(
isAppbar: true,
))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
),
Texts(
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
),
if (projectViewModel.havePrivilege(60))
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: ErOptions(
isAppbar: true,
))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
),
Texts(
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 1.7,
)
],
),
),
),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
),
),
// ),
SizedBox(
height: 5,
),
@ -867,17 +844,7 @@ class _HomePageState extends State<HomePage> {
}
class DashboardItem extends StatelessWidget {
const DashboardItem(
{this.hasBorder = false,
this.imageName,
@required this.child,
this.onTap,
Key key,
this.width,
this.height,
this.color,
this.opacity = 0.4,
this.hasColorFilter = true})
const DashboardItem({this.hasBorder = false, this.imageName, @required this.child, this.onTap, Key key, this.width, this.height, this.color, this.opacity = 0.4, this.hasColorFilter = true})
: super(key: key);
final bool hasBorder;
final String imageName;
@ -907,15 +874,12 @@ class DashboardItem extends StatelessWidget {
: HexColor('#050705').withOpacity(opacity)
: Colors.white,
borderRadius: BorderRadius.circular(6.0),
border: hasBorder
? Border.all(width: 1.0, color: const Color(0xffcccccc))
: Border.all(width: 0.0, color: Colors.transparent),
border: hasBorder ? Border.all(width: 1.0, color: const Color(0xffcccccc)) : Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null
? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover,
colorFilter:
hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
colorFilter: hasColorFilter ? new ColorFilter.mode(Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
)
: null,
),

@ -105,7 +105,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (currentTab > 0 && tab == 2)
pageController.jumpToPage(0);
else if (tab != 0) {
if (tab == 4 && model.count == 0) {
if (tab == 4 && projectViewModel.isLogin && model.count == 0) {
AppToast.showErrorToast(
message: TranslationBase.of(context).noBookedAppo);
} else {

@ -1,3 +1,6 @@
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/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
@ -28,6 +31,8 @@ class _LiveCareHomeState extends State<LiveCareHome>
ErRequestHistoryList pendingERRequestHistoryList;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this);
@ -40,7 +45,7 @@ class _LiveCareHomeState extends State<LiveCareHome>
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded) getLiveCareHistory();
if (!isDataLoaded && authenticatedUserObject.isLogin) getLiveCareHistory();
});
super.initState();

@ -39,7 +39,7 @@ class _State extends State<ClinicCard> {
children: <Widget>[
Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0),
color: widget.isSelected ? Colors.blue : widget.isOnline == 1 ? Colors.white : Colors.grey,
color: widget.isSelected ? Color(0xff06b806) : widget.patientERGetClinicsList.isOnline == 1 ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),

@ -39,6 +39,9 @@ class _clinic_listState extends State<ClinicList> {
int currentSelectedIndex = 0;
LiveCareClinicsListResponse liveCareClinicsListResponse;
List<PatientERGetClinicsList> liveCareOnlineClinicsListResponse;
List<PatientERGetClinicsList> liveCareOfflineClinicsListResponse;
LiveCareScheduleClinicsListResponse liveCareScheduleClinicsListResponse;
bool isDataLoaded = false;
@ -62,8 +65,11 @@ class _clinic_listState extends State<ClinicList> {
@override
void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse();
liveCareScheduleClinicsListResponse =
new LiveCareScheduleClinicsListResponse();
liveCareOnlineClinicsListResponse = new List();
liveCareOfflineClinicsListResponse = new List();
liveCareScheduleClinicsListResponse = new LiveCareScheduleClinicsListResponse();
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isLiveCareTypeSelected) {
@ -77,18 +83,14 @@ class _clinic_listState extends State<ClinicList> {
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: currentSelectedLiveCareType == "immediate"
? getLiveCareImmediateClinicList()
: getLiveCareScheduleClinicList());
return SingleChildScrollView(child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList());
}
void startLiveCare() {
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse =
new ERAppointmentFeesResponse();
ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) {
@ -98,9 +100,7 @@ class _clinic_listState extends State<ClinicList> {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res);
isError = false;
}
if (!isError)
getERAppointmentTime(
erAppointmentFeesResponse.getERAppointmentFeesList);
if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -158,8 +158,7 @@ class _clinic_listState extends State<ClinicList> {
service.getERAppointmentTime(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res);
showLiveCarePaymentDialog(
getERAppointmentFeesList, res['WatingtimeInteger']);
showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -167,22 +166,16 @@ class _clinic_listState extends State<ClinicList> {
});
}
showLiveCarePaymentDialog(
GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: LiveCarePaymentDialog(
getERAppointmentFeesList: getERAppointmentFeesList,
waitingTime: waitingTime,
clinicName: selectedClinicName),
child: LiveCarePaymentDialog(getERAppointmentFeesList: getERAppointmentFeesList, waitingTime: waitingTime, clinicName: selectedClinicName),
),
);
},
@ -193,8 +186,7 @@ class _clinic_listState extends State<ClinicList> {
pageBuilder: (context, animation1, animation2) {})
.then((value) {
if (value) {
if (getERAppointmentFeesList.total == "0" ||
getERAppointmentFeesList.total == "0.0") {
if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
showLiveCareInfoDialog(getERAppointmentFeesList);
} else {
navigateToPaymentMethod(getERAppointmentFeesList, context);
@ -203,11 +195,9 @@ class _clinic_listState extends State<ClinicList> {
});
}
showLiveCareInfoDialog(
GetERAppointmentFeesList getERAppointmentFeesList) async {
showLiveCareInfoDialog(GetERAppointmentFeesList getERAppointmentFeesList) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
@ -216,11 +206,9 @@ class _clinic_listState extends State<ClinicList> {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue =
Curves.easeInOutBack.transform(a1.value) - 1.0;
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform:
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: LiveCareInfoDialog(),
@ -234,11 +222,8 @@ class _clinic_listState extends State<ClinicList> {
pageBuilder: (context, animation1, animation2) {})
.then((value) {
if (value) {
if (getERAppointmentFeesList.total == "0" ||
getERAppointmentFeesList.total == "0.0") {
addNewCallForPatientER(authUser.patientID.toString() +
"" +
DateTime.now().millisecondsSinceEpoch.toString());
if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
addNewCallForPatientER(authUser.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
} else {
navigateToPaymentMethod(getERAppointmentFeesList, context);
}
@ -246,16 +231,14 @@ class _clinic_listState extends State<ClinicList> {
});
}
Future navigateToPaymentMethod(
GetERAppointmentFeesList getERAppointmentFeesList, context) async {
Future navigateToPaymentMethod(GetERAppointmentFeesList getERAppointmentFeesList, context) async {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.clinicID = selectedClinicID;
appo.appointmentNo = DateTime.now().millisecondsSinceEpoch;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
setState(() {
authUser = data;
});
@ -264,32 +247,16 @@ class _clinic_listState extends State<ClinicList> {
Navigator.push(context, FadePage(page: PaymentMethod())).then((value) {
print(value);
if (value != null) {
openPayment(value, authUser,
double.parse(getERAppointmentFeesList.total), appo);
openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo);
}
});
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser,
double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(
onExitCallback: onBrowserExit,
appo: appo,
onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(
amount,
"LiveCare Payment",
Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo),
"12",
authenticatedUser.emailAddress,
paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
browser,
false);
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod,
authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID.toString());
}
onBrowserLoadStart(String url) {
@ -321,19 +288,13 @@ class _clinic_listState extends State<ClinicList> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service
.checkPaymentStatus(
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
context)
.then((res) {
service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!");
print(res);
String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') {
addNewCallForPatientER(Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo));
addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
} else {
AppToast.showErrorToast(message: res['Response_Message']);
}
@ -347,12 +308,9 @@ class _clinic_listState extends State<ClinicList> {
addNewCallForPatientER(String clientRequestID) {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service
.addNewCallForPatientER(selectedClinicID, clientRequestID, context)
.then((res) {
service.addNewCallForPatientER(selectedClinicID, clientRequestID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(
message: "New Call has been added successfully");
AppToast.showSuccessToast(message: "New Call has been added successfully");
widget.getLiveCareHistory();
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -374,13 +332,19 @@ class _clinic_listState extends State<ClinicList> {
print(res['PatientER_GetClinicsList'].length);
if (res['MessageStatus'] == 1) {
setState(() {
liveCareClinicsListResponse =
LiveCareClinicsListResponse.fromJson(res);
print(liveCareClinicsListResponse.patientERGetClinicsList.length);
selectedClinicID =
liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID;
selectedClinicName = liveCareClinicsListResponse
.patientERGetClinicsList[0].serviceName;
liveCareOnlineClinicsListResponse.clear();
liveCareClinicsListResponse = LiveCareClinicsListResponse.fromJson(res);
liveCareClinicsListResponse.patientERGetClinicsList.forEach((clinic) {
if (clinic.isOnline == 1) {
liveCareOnlineClinicsListResponse.add(clinic);
} else {
liveCareOfflineClinicsListResponse.add(clinic);
}
});
selectedClinicID = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID;
selectedClinicName = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceName;
isDataLoaded = true;
});
} else {
@ -403,14 +367,10 @@ class _clinic_listState extends State<ClinicList> {
print(res['ClinicsHaveScheduleList'].length);
if (res['MessageStatus'] == 1) {
setState(() {
liveCareScheduleClinicsListResponse =
LiveCareScheduleClinicsListResponse.fromJson(res);
print(liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList.length);
selectedClinicID = liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[0].serviceID;
selectedClinicName = liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[0].clinicDesc;
liveCareScheduleClinicsListResponse = LiveCareScheduleClinicsListResponse.fromJson(res);
print(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length);
selectedClinicID = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].serviceID;
selectedClinicName = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].clinicDesc;
isDataLoaded = true;
});
} else {
@ -483,25 +443,15 @@ class _clinic_listState extends State<ClinicList> {
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList.length,
itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedScheduleIndex(
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index]);
updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]);
},
child: ScheduleClinicCard(
isSelected: selectedClinicID ==
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index]
.serviceID
? true
: false,
clinicsHaveScheduleList:
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index],
isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false,
clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index],
languageID: languageID,
),
);
@ -555,39 +505,51 @@ class _clinic_listState extends State<ClinicList> {
children: <Widget>[
Container(
margin: EdgeInsets.all(15.0),
child: Text("Online Clinics: ",
style: TextStyle(
fontSize: 20.0, fontWeight: FontWeight.bold)),
child: Text("Online Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
// itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
itemCount: liveCareOnlineClinicsListResponse.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedIndex(liveCareOnlineClinicsListResponse[index]);
},
child: ClinicCard(
isSelected: selectedClinicID == liveCareOnlineClinicsListResponse[index].serviceID ? true : false,
patientERGetClinicsList: liveCareOnlineClinicsListResponse[index],
languageID: languageID,
),
);
},
),
Container(
margin: EdgeInsets.all(15.0),
child: Text("Offline Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: liveCareClinicsListResponse
.patientERGetClinicsList.length,
// itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
itemCount: liveCareOfflineClinicsListResponse.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
if (liveCareClinicsListResponse
.patientERGetClinicsList[index].isOnline ==
1) {
updateSelectedIndex(liveCareClinicsListResponse
.patientERGetClinicsList[index]);
} else {
AppToast.showErrorToast(
message: "Clinic is offline");
}
// if (liveCareClinicsListResponse.patientERGetClinicsList[index].isOnline == 1) {
// updateSelectedIndex(liveCareOnlineClinicsListResponse[index]);
// } else {
// AppToast.showErrorToast(message: "Clinic is offline");
// }
},
child: ClinicCard(
isSelected: selectedClinicID ==
liveCareClinicsListResponse
.patientERGetClinicsList[index]
.serviceID
? true
: false,
patientERGetClinicsList: liveCareClinicsListResponse
.patientERGetClinicsList[index],
isSelected: selectedClinicID == liveCareOfflineClinicsListResponse[index].serviceID ? true : false,
patientERGetClinicsList: liveCareOfflineClinicsListResponse[index],
languageID: languageID,
),
);
@ -633,11 +595,8 @@ class _clinic_listState extends State<ClinicList> {
List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
List();
service
.getLiveCareScheduledDoctorList(context, selectedClinicID)
.then((res) {
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
service.getLiveCareScheduledDoctorList(context, selectedClinicID).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
@ -647,34 +606,23 @@ class _clinic_listState extends State<ClinicList> {
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
.where(
(elementClinic) => elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
} else {}
});
this.sharedPref.setBool(IS_LIVECARE_APPOINTMENT, true);
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -683,19 +631,8 @@ class _clinic_listState extends State<ClinicList> {
});
}
Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
FadePage(
page: SearchResults(
doctorsList: docList,
isLiveCareAppointment: true,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)));
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: true, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)));
}
updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) {

@ -611,11 +611,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.setUser(authenticatedUserObject.user);
getToDoCount();
pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if (pharmacyModuleViewModel.error.isNotEmpty)
await pharmacyModuleViewModel.createUser();
});
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {

@ -278,11 +278,6 @@ class _Login extends State<Login> {
// result['CRSVerificationStatus'];
projectViewModel.user = authenticatedUserObject.user;
// await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
// if (pharmacyModuleViewModel.error.isNotEmpty)
// await pharmacyModuleViewModel.createUser();
// });
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {

@ -1,10 +1,6 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_page.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -19,8 +15,7 @@ class AskDoctorHomPage extends StatefulWidget {
_AskDoctorHomPageState createState() => _AskDoctorHomPageState();
}
class _AskDoctorHomPageState extends State<AskDoctorHomPage>
with SingleTickerProviderStateMixin {
class _AskDoctorHomPageState extends State<AskDoctorHomPage> with SingleTickerProviderStateMixin {
TabController _tabController;
@override
@ -40,6 +35,12 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).askDoctor,
isShowDecPage: true,
description: TranslationBase.of(context).infoAskDoc,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/1.png')
],
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -53,9 +54,7 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8),
height: 70.0,
),
),
@ -67,9 +66,7 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
width: MediaQuery.of(context).size.width * 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.9),
bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.9),
),
color: Colors.white),
child: Center(
@ -80,22 +77,27 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Tab(
child: Container(
width: MediaQuery.of(context).size.width * 0.36,
child: Center(
child: Texts(TranslationBase.of(context).askDoctor),
),
tabs: [
Tab(
child: Container(
width: MediaQuery.of(context).size.width * 0.36,
child: Center(
child: Texts(TranslationBase.of(context).askDoctor),
),
),
Tab(child: Container(
width: MediaQuery.of(context).size.width * 0.36,
),
Tab(
child: Container(
width: MediaQuery.of(context).size.width * 0.36,
child: Center(
child: Texts(TranslationBase.of(context).doctorResponses,textAlign: TextAlign.start,),
child: Texts(
TranslationBase.of(context).doctorResponses,
textAlign: TextAlign.start,
),
),
),)
],
),
)
],
),
),
),
@ -109,10 +111,7 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage>
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
AskDoctorPage(),
DoctorResponse()
],
children: <Widget>[AskDoctorPage(), DoctorResponse()],
),
)
],

@ -72,6 +72,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
imagesInfo: imagesInfo,
appBarTitle: TranslationBase.of(context).advancePayment,
description: TranslationBase.of(context).infoAdvancePayment,
isBottomBar: model.isLogin ? true : false,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(

@ -226,7 +226,9 @@ class ConfirmPaymentPage extends StatelessWidget {
advanceModel.fileNumber,
authenticatedUser,
browser,
false);
false,
null,
null);
}
onBrowserLoadStart(String url) {

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -24,6 +25,12 @@ class EyeMeasurementsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
description: TranslationBase.of(context).infoEye,
imagesInfo: [
ImagesInfo(
imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/en/0.png')
],
appBarTitle: TranslationBase.of(context).eyeMeasurements,
body: SingleChildScrollView(
child: Container(

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'
as DoctorListResponse;
@ -24,21 +25,28 @@ class _MyInvoicesState extends State<MyInvoices> {
GetDentalAppointmentsResponse getDentalAppointmentsResponse;
DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
ProjectViewModel projectViewModel;
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) {
getDentalAppointments();
if(projectViewModel.isLogin)
getDentalAppointments();
});
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true,
isShowDecPage: true,
imagesInfo: imagesInfo,
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -15,7 +16,11 @@ class MyTrackers extends StatelessWidget {
return AppScaffold(
appBarTitle: TranslationBase.of(context).myTracker,
isShowAppBar: true,
isShowDecPage: false,
isShowDecPage: true,
description: TranslationBase.of(context).infoTrackers,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/ar/0.png')
],
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(12),
@ -33,8 +38,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration(
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@ -59,8 +63,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration(
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@ -90,8 +93,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration(
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart';
@ -24,6 +25,23 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
String email;
final formKey = GlobalKey<FormState>();
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/1.png'));
super.initState();
}
@override
Widget build(BuildContext context) {
return BaseView<ReportsMonthlyViewModel>(builder: (_, model, w) {
@ -39,6 +57,8 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthlyReports,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMonthReport,
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(12),

@ -1,9 +1,13 @@
import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -19,10 +23,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
bool hasAlreadySynced = false;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getLastPatientRecord(context);
if(authenticatedUserObject.isLogin) getLastPatientRecord(context);
});
super.initState();
}
@ -32,6 +39,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
return AppScaffold(
appBarTitle: "Sync Health Data",
isShowAppBar: true,
isShowDecPage: true,
description: TranslationBase.of(context).infoHealthData,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png')
],
body: Container(
child: Platform.isIOS
? _getAppleWatchInstructions()

@ -1,19 +1,19 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:popup_box/popup_box.dart';
import '../base/base_view.dart';
import 'my_vaccines_item_screen.dart';
//TODO fix by jammal we have a static data
@ -28,192 +28,164 @@ class _MyVaccinesState extends State<MyVaccines> {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<VaccineViewModel>(
onModelReady: (model) => model.getVaccine(),
builder: (BuildContext context, VaccineViewModel model, Widget child) =>
AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).myVaccines,
body: Container(
margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004,
right: SizeConfig.screenWidth * 0.004,
top: SizeConfig.screenWidth * 0.04,
),
child: Column(
children: <Widget>[
RoundedContainer(
backgroundColor: Colors.white,
child: ExpansionTile(
title: Container(
height: 65.0,
child: Text('2018'),
),
children: <Widget>[
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.vaccineList == null
? 0
: model.vaccineList.length,
itemBuilder: (BuildContext context, int index) {
return Column(
children: <Widget>[
RoundedContainer(
child: Column(
builder: (BuildContext context, VaccineViewModel model, Widget child) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).myVaccines,
description: TranslationBase.of(context).infoVaccines,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/ar/0.png')
],
body: Container(
margin: EdgeInsets.only(
left: SizeConfig.screenWidth * 0.004,
right: SizeConfig.screenWidth * 0.004,
top: SizeConfig.screenWidth * 0.04,
),
child: Column(
children: <Widget>[
RoundedContainer(
backgroundColor: Colors.white,
child: ExpansionTile(
title: Container(
height: 65.0,
child: Text('2018'),
),
children: <Widget>[
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: model.vaccineList == null ? 0 : model.vaccineList.length,
itemBuilder: (BuildContext context, int index) {
return Column(
children: <Widget>[
RoundedContainer(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets
.symmetric(
horizontal:
20.0,
vertical: 20.0),
child: Image.network(
model
.vaccineList[
index]
.doctorImageURL,
height: SizeConfig
.imageSizeMultiplier *
23,
width: SizeConfig
.imageSizeMultiplier *
20,
fit: BoxFit.fill,
),
),
],
),
flex: 2,
),
Expanded(
child: Container(
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Text(
model
.vaccineList[
index]
.doctorTitle +
model
.vaccineList[
index]
.doctorName,
style: TextStyle(
fontWeight:
FontWeight.w900,
fontSize: 16.6,
),
),
SizedBox(height: 7.0),
Text(
model
.vaccineList[
index]
.projectName,
style: TextStyle(
fontSize: 17.0,
letterSpacing: 0.5,
),
),
SizedBox(height: 7.0),
Text(
model
.vaccineList[
index]
.vaccineName,
style: TextStyle(
fontSize: 17.0,
),
),
SizedBox(height: 7.0),
Text(
'Date Taken ' +
convertDateFormat(model
.vaccineList[
index]
.invoiceDate),
style: TextStyle(
fontSize: 17.0),
),
],
Expanded(
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 20.0),
child: Image.network(
model.vaccineList[index].doctorImageURL,
height: SizeConfig.imageSizeMultiplier * 23,
width: SizeConfig.imageSizeMultiplier * 20,
fit: BoxFit.fill,
),
),
flex: 5,
],
),
flex: 2,
),
Expanded(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
model.vaccineList[index].doctorTitle + model.vaccineList[index].doctorName,
style: TextStyle(
fontWeight: FontWeight.w900,
fontSize: 16.6,
),
),
SizedBox(height: 7.0),
Text(
model.vaccineList[index].projectName,
style: TextStyle(
fontSize: 17.0,
letterSpacing: 0.5,
),
),
SizedBox(height: 7.0),
Text(
model.vaccineList[index].vaccineName,
style: TextStyle(
fontSize: 17.0,
),
),
SizedBox(height: 7.0),
Text(
'Date Taken ' + convertDateFormat(model.vaccineList[index].invoiceDate),
style: TextStyle(fontSize: 17.0),
),
],
),
],
),
flex: 5,
),
],
),
),
],
);
}),
)
],
),
),
// SpaceBetweenTexts(space: 165.0),
],
],
),
),
],
);
}),
)
],
),
),
),
bottomSheet: model.state == ViewState.Busy?Container(height: 0,): model.vaccineList.length > 0
// SpaceBetweenTexts(space: 165.0),
],
),
),
bottomSheet: model.state == ViewState.Busy
? Container(
height: 0,
)
: model.vaccineList.length > 0
? Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12),
height: MediaQuery.of(context).size.height * 0.25,
width: double.infinity,
child: Column(
children: [
Divider(
height: 2,
thickness: 1,
),
SizedBox(
height: 6,
),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12),
height: MediaQuery.of(context).size.height * 0.25,
width: double.infinity,
// height: 80.0,
child: Button(
disabled: true,
label: TranslationBase.of(context)
.checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push(
context, FadePage(page: MyVaccinesItemPage())),
child: Column(
children: [
Divider(
height: 2,
thickness: 1,
),
SizedBox(
height: 6,
),
Container(
width: double.infinity,
// height: 80.0,
child: Button(
disabled: true,
label: TranslationBase.of(context).checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push(context, FadePage(page: MyVaccinesItemPage())),
),
),
if (projectViewModel.havePrivilege(27))
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
},
),
),
],
),
)
: Container(
height: 0,
),
if (projectViewModel.havePrivilege(27))
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(
message: TranslationBase.of(context)
.emailSentSuccessfully);
},
),
),
],
),
)
: Container(height: 0,),
),
),
);
}
@ -224,13 +196,8 @@ class _MyVaccinesState extends State<MyVaccines> {
final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(Date.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
return newDate.toString();
}

@ -599,6 +599,7 @@ class TranslationBase {
String get sentRequest =>
localizedValues['sent-requests'][locale.languageCode];
String get km => localizedValues['km'][locale.languageCode];
String get km_ => localizedValues['km_'][locale.languageCode];
String get patientHealthSummaryReport =>
localizedValues['PatientHealthSummaryReport'][locale.languageCode];
String get toViewTheTermsAndConditions =>
@ -665,6 +666,7 @@ class TranslationBase {
String get mobileNumber =>
localizedValues['MobileNumber'][locale.languageCode];
String get ok => localizedValues['Ok'][locale.languageCode];
String get averageWaitingTime => localizedValues['averageWaitingTime'][locale.languageCode];
String get waterConsumedInWeek =>
localizedValues['WaterConsumedInWeek'][locale.languageCode];
String get waterConsumedInMonth =>
@ -1745,6 +1747,24 @@ class TranslationBase {
String get timeNeeded => localizedValues["time-needed"][locale.languageCode];
String get totalTimeNeeded =>
localizedValues["total-time-needed"][locale.languageCode];
String get infoEye =>
localizedValues["info-eye"][locale.languageCode];
String get infoVaccines =>
localizedValues["info-vaccines"][locale.languageCode];
String get infoTrackers =>
localizedValues["info-trackers"][locale.languageCode];
String get infoHealthData =>
localizedValues["info-health-data"][locale.languageCode];
String get infoAskDoc =>
localizedValues["info-ask-doc"][locale.languageCode];
String get infoAutoWifi =>
localizedValues["info-auto-wifi"][locale.languageCode];
String get autoWifi =>
localizedValues["auto-wifi"][locale.languageCode];
String get childVaccineInfo =>
localizedValues["child-vaccine-info"][locale.languageCode];
String get h2oInfo =>
localizedValues["h2o-info"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -7,6 +7,7 @@ import 'package:badges/badges.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
@ -20,7 +21,6 @@ import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'
import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_invoices/my_invoice_page.dart';
import 'package:diplomaticquarterapp/pages/medical/my_trackers/my_trackers.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
@ -31,15 +31,15 @@ import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:url_launcher/url_launcher.dart';
import '../Constants.dart';
import 'app_shared_preferences.dart';
import 'app_toast.dart';
@ -240,8 +240,7 @@ class Utils {
}
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
onTap: () => projectViewModel.havePrivilege(7) ? Navigator.push(context, FadePage(page: RadiologyHomePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).radiology,
imagePath: 'radiology_icon.png',
@ -251,8 +250,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
onTap: () => projectViewModel.havePrivilege(12) ? Navigator.push(context, FadePage(page: HomePrescriptionsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medicines,
imagePath: 'prescription_icon.png',
@ -277,8 +275,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
onTap: () => projectViewModel.havePrivilege(48) ? Navigator.push(context, FadePage(page: ActiveMedicationsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myMedical,
imagePath: 'active_medications.png',
@ -297,15 +294,11 @@ class Utils {
)
: null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context).myDoctorSubtitle,
isEnable: projectViewModel.havePrivilege(6)),
title: TranslationBase.of(context).myDoctor, imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: MyInvoices())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).myInvoice,
imagePath: 'Invoice.png',
@ -315,8 +308,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: EyeMeasurementsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).eye,
imagePath: 'eye_measurement_icon.png',
@ -347,8 +339,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
onTap: () => projectViewModel.havePrivilege(18) ? Navigator.push(context, FadePage(page: InsuranceApproval())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).insuranceApproval,
imagePath: 'insurance_approvals_icon.png',
@ -378,8 +369,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
onTap: () => projectViewModel.havePrivilege(20) ? Navigator.push(context, FadePage(page: HomeReportPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).medical,
imagePath: 'medical_reports_icon.png',
@ -389,8 +379,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
onTap: () => projectViewModel.havePrivilege(19) ? Navigator.push(context, FadePage(page: MonthlyReportsPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).monthly,
imagePath: 'monthly_reports_icon.png',
@ -400,8 +389,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
onTap: () => projectViewModel.havePrivilege(16) ? Navigator.push(context, FadePage(page: PatientSickLeavePage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).sick,
imagePath: 'sick_leaves_icons.png',
@ -439,8 +427,7 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
onTap: () => projectViewModel.havePrivilege(30) ? Navigator.push(context, FadePage(page: SmartWatchInstructions())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).smartWatches,
imagePath: 'smartwatch_icon.png',
@ -450,36 +437,34 @@ class Utils {
));
medical.add(InkWell(
onTap: () =>
projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
onTap: () => projectViewModel.havePrivilege(28) ? Navigator.push(context, FadePage(page: AskDoctorHomPage())) : null,
child: MedicalProfileItem(
title: TranslationBase.of(context).askYour,
imagePath: 'ask_doctor_icon.png',
subTitle: TranslationBase.of(context).askYourSubtitle,
isEnable: projectViewModel.havePrivilege(28)),
title: TranslationBase.of(context).askYour, imagePath: 'ask_doctor_icon.png', subTitle: TranslationBase.of(context).askYourSubtitle, isEnable: projectViewModel.havePrivilege(28)),
));
if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell(
onTap: () {
userData().then((userData_) {
if (projectViewModel.isLogin && userData_ != null) {
if (projectViewModel.isLogin) {
userData().then((userData_) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel
.platformBridge()
.connectHMGInternetWifi(patientID)
.then((value) => {GifLoaderDialogUtils.hideDialog(context)});
} else {
AlertDialogBox(
context: context,
confirmMessage: "Please login with your account first to use this feature",
okText: "OK",
okFunction: () {
AlertDialogBox.closeAlertDialog(context);
}).showAlertDialog(context);
}
});
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
});
} else {
Navigator.push(
context,
FadePage(
page: NotAutPage(
title: TranslationBase.of(context).autoWifi,
description: TranslationBase.of(context).infoAutoWifi,
infoList: [],
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'),
],
)));
}
},
child: MedicalProfileItem(
title: TranslationBase.of(context).internet,
@ -517,21 +502,15 @@ class Utils {
});
}
static bool route(Route route, {@required Type equalsTo}){
if((route is FadePage)){
static bool route(Route route, {@required Type equalsTo}) {
if ((route is FadePage)) {
return route.page.runtimeType == equalsTo;
}
return route.runtimeType == equalsTo;
}
}
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}) {
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}) {
return Container(
decoration: BoxDecoration(
boxShadow: [
@ -571,19 +550,18 @@ openAppStore({String androidPackageName, String iOSAppID}) async {
}
}
String labelFrom({@required String className}){
String labelFrom({@required String className}) {
RegExp exp = RegExp(r'(?<=[a-z])[A-Z]');
String result = className.replaceAllMapped(exp, (m) {
var str = m.group(0);
if(str != null){
if (str != null) {
return ('_' + str);
}
return "";
});
if(result.isEmpty)
return className;
if (result.isEmpty) return className;
result = result.replaceAll("_", " ");
return result;

@ -15,8 +15,6 @@ import 'package:provider/provider.dart';
import '../../d_q_icons_icons.dart';
import 'bottom_navigation_item.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex;

@ -2,7 +2,6 @@ import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

@ -149,7 +149,6 @@ class LabResultWidget extends StatelessWidget {
isCovidResult = true;
covidLabResult = order;
}
print(covidLabResult.testCode);
});
return isCovidResult;

@ -23,23 +23,23 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE paymentType;
static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live
// Packages
static String PACKAGES_REQUEST_PAYMENT_URL =
@ -168,6 +168,8 @@ class MyInAppBrowser extends InAppBrowser {
AuthenticatedUser authenticatedUser,
InAppBrowser browser,
bool isLiveCareAppo,
var servID,
var LiveServID,
[var appoDate,
var appoNo,
var clinicID,
@ -186,6 +188,8 @@ class MyInAppBrowser extends InAppBrowser {
patientID,
authenticatedUser,
isLiveCareAppo,
servID,
LiveServID,
appoDate,
appoNo,
clinicID,
@ -233,13 +237,13 @@ class MyInAppBrowser extends InAppBrowser {
dynamic patientID,
AuthenticatedUser authUser,
bool isLiveCareAppo,
var servID,
var LiveServID,
[var appoDate,
var appoNo,
var clinicID,
var doctorID,
var patientData,
var servID,
var LiveServID]) async {
var patientData]) async {
getDeviceToken();
String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN';
String form = isLiveCareAppo ? getLiveCareForm() : getForm();

Loading…
Cancel
Save