diff --git a/.gitignore b/.gitignore
index 4b016310..fd4aca5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,3 +42,4 @@ app.*.map.json
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
+health_calculators.dart
diff --git a/assets/images/vital_sign_icon.png b/assets/images/medical/vital_sign_icon.png
similarity index 100%
rename from assets/images/vital_sign_icon.png
rename to assets/images/medical/vital_sign_icon.png
diff --git a/assets/images/no-data-found.png b/assets/images/no-data-found.png
new file mode 100644
index 00000000..a4ced5d3
Binary files /dev/null and b/assets/images/no-data-found.png differ
diff --git a/assets/images/powerd-by.jpg b/assets/images/powerd-by.jpg
new file mode 100644
index 00000000..93bdbb18
Binary files /dev/null and b/assets/images/powerd-by.jpg differ
diff --git a/assets/images/svg/pending.svg b/assets/images/svg/pending.svg
new file mode 100644
index 00000000..2c26afbd
--- /dev/null
+++ b/assets/images/svg/pending.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/svg/verification_check.svg b/assets/images/svg/verification_check.svg
new file mode 100644
index 00000000..1b3cdcca
--- /dev/null
+++ b/assets/images/svg/verification_check.svg
@@ -0,0 +1,8 @@
+
diff --git a/lib/config/config.dart b/lib/config/config.dart
index 27361254..d9ca0b3e 100644
--- a/lib/config/config.dart
+++ b/lib/config/config.dart
@@ -45,7 +45,8 @@ const SEND_LAB_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendLabReportEmai
///
const GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
-const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT = 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
+const GET_PATIENT_LAB_ORDERS_BY_APPOINTMENT =
+ 'Services/Patients.svc/REST/GetPatientLabResultsByAppointmentNo';
const GET_PATIENT_ORDERS_DETAILS =
'Services/Patients.svc/REST/Rad_UpdatePatientRadOrdersToRead';
@@ -269,6 +270,10 @@ const GET_PAtIENTS_INSURANCE_UPDATED =
"Services/Patients.svc/REST/PatientER_GetPatientInsuranceCardUpdateHistory";
const INSURANCE_DETAILS = "Services/Patients.svc/REST/Get_InsuranceCheckList";
+const GET_PATIENT_INSURANCE_DETAILS =
+ "Services/Patients.svc/REST/PatientER_GetPatientInsuranceDetails";
+const UPLOAD_INSURANCE_CARD =
+ 'Services/Patients.svc/REST/PatientER_PatientInfoForInsuranceCardUpdate';
const GET_VACCINES = "Services/Patients.svc/REST/GetDoneVaccinesByPatientID";
const GET_VACCINES_EMAIL = "Services/Notifications.svc/REST/SendVaccinesEmail";
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index d22522c3..1bb96d84 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -305,7 +305,7 @@ const Map localizedValues = {
"recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"},
"manage-files": {"en": "Manage Family Files", "ar": "إدارة ملفات العائلة"},
'oxygenation': {'en': 'Oxygenation', 'ar': 'الأوكسجين'},
- 'bodyMeasurements': {'en': 'body Mass', 'ar': 'قياسات الجسم'},
+ 'bodyMeasurements': {'en': 'body Mass Index', 'ar': 'مؤشر الكتلة'},
'temperature': {'en': 'Temperature', 'ar': 'درجة الحرارة'},
'pulse': {'en': 'Pulse', 'ar': 'النبض'},
'respiration': {'en': 'Respiration', 'ar': 'التنفس'},
@@ -1207,4 +1207,88 @@ const Map localizedValues = {
"en": "The request has been submitted successfully",
"ar": "تم تنفيذ طلبك بنجاح"
},
+ "pulseTitle": {
+ "en": "Heart rate",
+ "ar": "معدل النبض بالدقيقة"
+ },
+ "systolic-lng": {
+ "en": "Systolic",
+ "ar": "الإنقباض"
+ },
+ "diastolic-lng": {
+ "en": "Diastolic",
+ "ar": "الإنبساط"
+ },
+ "policy-holder": {
+ "en": "Policy Holder",
+ "ar": "حامل بطاقة التأمين"
+ },
+ "policy-no": {
+ "en": "Policy Number",
+ "ar": "رقم سياسات"
+ },
+ "agree": {
+ "en": "I agree, this is the correct information",
+ "ar": "موافق، هذه المعلومات صحيحة"
+ },
+ "disagree": {
+ "en": "No, this is not the correct information",
+ "ar": "غير موافق، هذه المعلومات غير الصحيحة"
+ },
+ "expiry-date": {
+ "en": "Expiry Date",
+ "ar": "تاريخ انتهاء الصلاحية"
+ },
+ "class": {
+ "en": "Class",
+ "ar": "فئة"
+ },
+ "approval": {
+ "en": "Approval",
+ "ar": "موافقة"
+ },
+ "no-data": {
+ "en": "No data found",
+ "ar": "لاتوجد بيانات"
+ },
+ "insurance-details": {
+ "en": "Insurance Details",
+ "ar": "تفاصيل التأمين"
+ },
+ "nearest-hospital": {
+ "en": "Nearest Hospital",
+ "ar": "أقرب مستشفى"
+ },
+ "request-sent": {
+ "en": "Request sent successfully",
+ "ar": "تم إرسال الطلب بنجاح"
+ },
+ "message-sent": {
+ "en": "Message sent successfully",
+ "ar": "تم إرسال الرسالة بنجاح"
+ },
+ "sent-on": {
+ "en": "Sent on",
+ "ar": "أرسلت في"
+ },
+ "attach-insurace-image": {
+ "en": "Attach insurance card image",
+ "ar": "إرفاق صورة بطاقة التأمين"
+ },
+ "upload-without-image": {
+ "en": "You can still submit, if you don't have Insurance Image",
+ "ar": "لا يزال بإمكانك الإرسال ، إذا لم يكن لديك صورة تأمين"
+ },
+ "info-insur-cards": {
+ "en": "This service allows you to view all the insurance cards that recorded during your visits to Al Habib Medical Group in addition to:",
+ "ar": "خدمة بطاقات التامين: هذه الخدمة تمكنك من الاطلاع على جميع بطاقات التامين والتي تم تسجيلها اثناء زياراتك لمجموعة الحبيب الطبية بالاضافة الى:"
+ },
+ "scan-now": {
+ "en": "If you have a card / Document Scan now",
+ "ar": "إذا كانت لديك بطاقة / مستند ارفقها الان"
+ },
+ "liveCare": {
+ "en": "Live Care",
+ "ar": "لايف كير"
+ },
};
diff --git a/lib/core/model/insurance/Insurance_card_details.dart b/lib/core/model/insurance/Insurance_card_details.dart
new file mode 100644
index 00000000..ddc33b2e
--- /dev/null
+++ b/lib/core/model/insurance/Insurance_card_details.dart
@@ -0,0 +1,88 @@
+class InsuranceCardDetailsModel {
+ int approvalLimit;
+ int companyGroupID;
+ String companyName;
+ String companyRemarks;
+ String dOB;
+ int deductible;
+ String effectiveFrom;
+ String effectiveTo;
+ String eligabilityFailureReason;
+ bool isMemberEligible;
+ String memberID;
+ String memberName;
+ String memberStatus;
+ dynamic message;
+ String nationalId;
+ String policyNumber;
+ String responseMessage;
+ String room;
+ String subCategory;
+
+ InsuranceCardDetailsModel(
+ {this.approvalLimit,
+ this.companyGroupID,
+ this.companyName,
+ this.companyRemarks,
+ this.dOB,
+ this.deductible,
+ this.effectiveFrom,
+ this.effectiveTo,
+ this.eligabilityFailureReason,
+ this.isMemberEligible,
+ this.memberID,
+ this.memberName,
+ this.memberStatus,
+ this.message,
+ this.nationalId,
+ this.policyNumber,
+ this.responseMessage,
+ this.room,
+ this.subCategory});
+
+ InsuranceCardDetailsModel.fromJson(Map json) {
+ approvalLimit = json['ApprovalLimit'];
+ companyGroupID = json['CompanyGroupID'];
+ companyName = json['CompanyName'];
+ companyRemarks = json['CompanyRemarks'];
+ dOB = json['DOB'];
+ deductible = json['Deductible'];
+ effectiveFrom = json['EffectiveFrom'];
+ effectiveTo = json['EffectiveTo'];
+ eligabilityFailureReason = json['EligabilityFailureReason'];
+ isMemberEligible = json['IsMemberEligible'];
+ memberID = json['MemberID'];
+ memberName = json['MemberName'];
+ memberStatus = json['MemberStatus'];
+ message = json['Message'];
+ nationalId = json['NationalId'];
+ policyNumber = json['PolicyNumber'];
+ responseMessage = json['ResponseMessage'];
+ room = json['Room'];
+ subCategory = json['SubCategory'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['ApprovalLimit'] = this.approvalLimit;
+ data['CompanyGroupID'] = this.companyGroupID;
+ data['CompanyName'] = this.companyName;
+ data['CompanyRemarks'] = this.companyRemarks;
+ data['DOB'] = this.dOB;
+ data['Deductible'] = this.deductible;
+ data['EffectiveFrom'] = this.effectiveFrom;
+ data['EffectiveTo'] = this.effectiveTo;
+ data['EligabilityFailureReason'] = this.eligabilityFailureReason;
+ data['IsMemberEligible'] = this.isMemberEligible;
+ data['MemberID'] = this.memberID;
+ data['MemberName'] = this.memberName;
+ data['MemberStatus'] = this.memberStatus;
+ data['Message'] = this.message;
+ data['NationalId'] = this.nationalId;
+ data['PolicyNumber'] = this.policyNumber;
+ data['ResponseMessage'] = this.responseMessage;
+ data['Room'] = this.room;
+ data['SubCategory'] = this.subCategory;
+ return data;
+ }
+}
diff --git a/lib/core/model/insurance/insurance_card_update.dart b/lib/core/model/insurance/insurance_card_update_model.dart
similarity index 100%
rename from lib/core/model/insurance/insurance_card_update.dart
rename to lib/core/model/insurance/insurance_card_update_model.dart
diff --git a/lib/core/model/labs/patient_lab_orders.dart b/lib/core/model/labs/patient_lab_orders.dart
index 26daaff0..3c49b80a 100644
--- a/lib/core/model/labs/patient_lab_orders.dart
+++ b/lib/core/model/labs/patient_lab_orders.dart
@@ -34,7 +34,7 @@ class PatientLabOrders {
String qR;
String setupID;
List speciality;
-
+ bool isLiveCareAppointment;
PatientLabOrders(
{this.actualDoctorRate,
this.clinicDescription,
@@ -68,7 +68,7 @@ class PatientLabOrders {
this.projectNameN,
this.qR,
this.setupID,
- this.speciality});
+ this.speciality,this.isLiveCareAppointment});
PatientLabOrders.fromJson(Map json) {
actualDoctorRate = json['ActualDoctorRate'];
@@ -103,6 +103,7 @@ class PatientLabOrders {
projectNameN = json['ProjectNameN'];
qR = json['QR'];
setupID = json['SetupID'];
+ isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast();
}
@@ -141,6 +142,7 @@ class PatientLabOrders {
data['QR'] = this.qR;
data['SetupID'] = this.setupID;
data['Speciality'] = this.speciality;
+ data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
return data;
}
}
diff --git a/lib/core/model/prescriptions/Prescriptions.dart b/lib/core/model/prescriptions/Prescriptions.dart
index 1362f1c2..0169010f 100644
--- a/lib/core/model/prescriptions/Prescriptions.dart
+++ b/lib/core/model/prescriptions/Prescriptions.dart
@@ -27,6 +27,7 @@ class Prescriptions {
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
bool isInOutPatient;
+ bool isLiveCareAppointment;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
bool isInsurancePatient;
@@ -68,7 +69,7 @@ class Prescriptions {
this.nationalityFlagURL,
this.noOfPatientsRate,
this.qR,
- this.speciality});
+ this.speciality,this.isLiveCareAppointment});
Prescriptions.fromJson(Map json) {
setupID = json['SetupID'];
@@ -103,6 +104,7 @@ class Prescriptions {
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR'];
+ isLiveCareAppointment = json['IsLiveCareAppointment'];
// speciality = json['Speciality'].cast();
}
@@ -141,6 +143,7 @@ class Prescriptions {
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
+ data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
return data;
}
}
diff --git a/lib/core/model/radiology/final_radiology.dart b/lib/core/model/radiology/final_radiology.dart
index 2efe4481..ed47b51d 100644
--- a/lib/core/model/radiology/final_radiology.dart
+++ b/lib/core/model/radiology/final_radiology.dart
@@ -41,6 +41,7 @@ class FinalRadiology {
List speciality;
bool isCVI;
bool isRadMedicalReport;
+ bool isLiveCareAppointment;
FinalRadiology(
{this.setupID,
@@ -82,7 +83,7 @@ class FinalRadiology {
this.reportDataTextString,
this.speciality,
this.isCVI,
- this.isRadMedicalReport});
+ this.isRadMedicalReport,this.isLiveCareAppointment});
FinalRadiology.fromJson(Map json) {
try {
@@ -121,11 +122,13 @@ class FinalRadiology {
orderNo = json['OrderNo'];
projectName = json['ProjectName'];
qR = json['QR'];
+ isLiveCareAppointment = json['IsLiveCareAppointment'];
reportDataHTML = json['ReportDataHTML'];
reportDataTextString = json['ReportDataTextString'];
// speciality = json['Speciality'].cast();
isCVI = json['isCVI'];
isRadMedicalReport = json['isRadMedicalReport'];
+
} catch (e) {
print(e);
}
diff --git a/lib/core/model/sick_leave/sick_leave.dart b/lib/core/model/sick_leave/sick_leave.dart
index ff73e1da..6811a552 100644
--- a/lib/core/model/sick_leave/sick_leave.dart
+++ b/lib/core/model/sick_leave/sick_leave.dart
@@ -32,6 +32,7 @@ class SickLeave {
String projectName;
String qR;
List speciality;
+ bool isLiveCareAppointment;
SickLeave(
{this.setupID,
@@ -64,7 +65,7 @@ class SickLeave {
this.patientName,
this.projectName,
this.qR,
- this.speciality});
+ this.speciality,this.isLiveCareAppointment});
SickLeave.fromJson(Map json) {
setupID = json['SetupID'];
@@ -97,6 +98,7 @@ class SickLeave {
patientName = json['PatientName'];
projectName = json['ProjectName'];
qR = json['QR'];
+ isLiveCareAppointment = json['IsLiveCareAppointment'];
if(json['Speciality']!=null)
speciality = json['Speciality'].cast();
}
diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart
index 7443c8a2..95ae4321 100644
--- a/lib/core/service/client/base_app_client.dart
+++ b/lib/core/service/client/base_app_client.dart
@@ -132,7 +132,13 @@ class BaseAppClient {
} else if (parsed['MessageStatus'] == 1 ||
parsed['SMSLoginRequired'] == true) {
onSuccess(parsed, statusCode);
- } else if (!parsed['IsAuthenticated']) {
+ }
+ else if(parsed['MessageStatus'] == 2 && parsed['IsAuthenticated']){
+ onFailure(
+ parsed['message'] ?? parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'],
+ statusCode);
+ }
+ else if (!parsed['IsAuthenticated']) {
await logout();
//helpers.showErrorToast('Your session expired Please login agian');
@@ -151,7 +157,7 @@ class BaseAppClient {
onFailure('Please Check The Internet Connection', -1);
}
} catch (e) {
- //print(e);
+ print(e);
//
if (e is String) {
onFailure(e.toString(), -1);
@@ -166,7 +172,7 @@ class BaseAppClient {
await authenticatedUserObject.getUser();
Provider.of(AppGlobal.context, listen: false).isLogin =
false;
- var model = Provider.of(AppGlobal.context);
+ var model = Provider.of(AppGlobal.context,listen: false);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false);
diff --git a/lib/core/service/hospital_service.dart b/lib/core/service/hospital_service.dart
index 519fc8c0..312d7fd7 100644
--- a/lib/core/service/hospital_service.dart
+++ b/lib/core/service/hospital_service.dart
@@ -27,6 +27,8 @@ class HospitalService extends BaseService {
Map body = Map();
body['Latitude'] = _latitude;
body['Longitude'] = _longitude;
+ body['IsOnlineCheckIn'] = true;
+ body['PatientOutSA'] = 0;
await baseAppClient.post(GET_PROJECT,
onSuccess: (dynamic response, int statusCode) {
diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart
index 790003e9..0b626342 100644
--- a/lib/core/service/insurance_service.dart
+++ b/lib/core/service/insurance_service.dart
@@ -1,8 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
-import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordsByStatusReq.dart';
@@ -20,6 +21,10 @@ class InsuranceCardService extends BaseService {
List get insuranceApproval => _insuranceApproval;
+ InsuranceCardDetailsModel insuranceCardDetails;
+ List insuranceCardDetailsList = List();
+ bool isHaveInsuranceCard = false;
+
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse();
@@ -136,4 +141,42 @@ class InsuranceCardService extends BaseService {
}, body:{'CompanyID': data.companyID,'SubCategoryID':data.subCategoryID },);
return Future.value(localRes);
}
+
+ Future getPatientInsuranceDetails({String setupID, int projectID, String patientIdentificationID,int patientID}) async{
+ error = "";
+ hasError = false;
+ insuranceCardDetails = null;
+ isHaveInsuranceCard = false;
+ await baseAppClient.post(GET_PATIENT_INSURANCE_DETAILS,
+ onSuccess: (dynamic response, int statusCode) {
+ insuranceCardDetailsList.clear();
+ isHaveInsuranceCard = true;
+ response['List_PatientInsuranceDetails'].forEach((item) {
+ insuranceCardDetailsList.add(InsuranceCardDetailsModel.fromJson(item));
+ });
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body:{'SetupID': setupID,'ProjectID':projectID,'PatientIdentificationID':patientIdentificationID ,'isDentalAllowedBackend':false,'PatientID':patientID},);
+
+ }
+
+ Future uploadInsuranceCard({ String patientIdentificationID,int patientID,String image=""}) async{
+ error = "";
+ Map body = Map();
+ body['PatientID']=patientID;
+ body['PatientType']=user.patientType;
+ body['MobileNo']=user.mobileNumber;
+ body['PatientIdentificationID']=patientIdentificationID;
+ body['InsuranceCardImage']= image;
+
+ await baseAppClient.post(UPLOAD_INSURANCE_CARD,
+ onSuccess: (dynamic response, int statusCode) {
+
+ }, onFailure: (String error, int statusCode) {
+ hasError = true;
+ super.error = error;
+ }, body:body,);
+
+ }
}
diff --git a/lib/core/service/medical/labs_service.dart b/lib/core/service/medical/labs_service.dart
index ecf8e047..5d509a27 100644
--- a/lib/core/service/medical/labs_service.dart
+++ b/lib/core/service/medical/labs_service.dart
@@ -110,15 +110,15 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.invoiceNo = patientLabOrder.invoiceNo;
_requestSendLabReportEmail.doctorName = patientLabOrder.doctorName;
_requestSendLabReportEmail.clinicName = patientLabOrder.clinicDescription;
- _requestSendLabReportEmail.patientName = user.firstName + user.lastName;
+ _requestSendLabReportEmail.patientName = user.firstName +" "+ user.lastName;
_requestSendLabReportEmail.patientIditificationNum =
user.patientIdentificationNo;
_requestSendLabReportEmail.dateofBirth = user.dateofBirth;
_requestSendLabReportEmail.to = user.emailAddress;
- _requestSendLabReportEmail.orderDate =
- '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}';
+ _requestSendLabReportEmail.orderDate = '${patientLabOrder.orderDate.year}-${patientLabOrder.orderDate.month}-${patientLabOrder.orderDate.day}';
_requestSendLabReportEmail.patientMobileNumber = user.mobileNumber;
_requestSendLabReportEmail.projectName = patientLabOrder.projectName;
+ _requestSendLabReportEmail.setupID = user.setupID;
await baseAppClient.post(SEND_LAB_REPORT_EMAIL,
onSuccess: (dynamic response, int statusCode) {
diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart
index e3be9bcf..32d3de39 100644
--- a/lib/core/service/medical/my_balance_service.dart
+++ b/lib/core/service/medical/my_balance_service.dart
@@ -25,6 +25,10 @@ class MyBalanceService extends BaseService {
AuthenticatedUserObject authenticatedUserObject =
locator();
+ MyBalanceService(){
+ getFamilyFiles();
+ }
+
getPatientAdvanceBalanceAmount() async {
hasError = false;
super.error = "";
diff --git a/lib/core/service/medical/vital_sign_service.dart b/lib/core/service/medical/vital_sign_service.dart
index f8a6b356..d1fbbf1c 100644
--- a/lib/core/service/medical/vital_sign_service.dart
+++ b/lib/core/service/medical/vital_sign_service.dart
@@ -24,9 +24,17 @@ class VitalSignService extends BaseService {
response['List_DoctorPatientVitalSign'].forEach((vital) {
vitalSignResModelList.add(VitalSignResModel.fromJson(vital));
});
+ bool isHaveWeight = false;
+ bool isHaveHeight = false;
vitalSignResModelList.forEach((element) {
- weightKg = '${element.weightKg}';
- heightCm = '${element.heightCm}';
+ if (element.weightKg != 0 && !isHaveWeight) {
+ weightKg = '${element.weightKg}';
+ isHaveWeight = true;
+ }
+ if (element.heightCm != 0 && !isHaveHeight) {
+ heightCm = '${element.heightCm}';
+ isHaveHeight = true;
+ }
});
}, onFailure: (String error, int statusCode) {
hasError = true;
diff --git a/lib/core/service/pharmacies_service.dart b/lib/core/service/pharmacies_service.dart
index 8f85d82e..dbd4fae1 100644
--- a/lib/core/service/pharmacies_service.dart
+++ b/lib/core/service/pharmacies_service.dart
@@ -77,9 +77,10 @@ class PharmacyService extends BaseService {
hasError = false;
await _getCurrentLocation();
Map body = Map();
- body['PHR_itemName'] = drugName;
+ body['PHR_itemName'] = drugName.trim();
body['isLoginForDoctorApp'] = true;
body['isDentalAllowedBackend'] = true;
+ body['PageSize'] = 25;
body['Latitude'] = _latitude;
body['Longitude'] = _longitude;
diff --git a/lib/core/service/weather_service.dart b/lib/core/service/weather_service.dart
index 679a4c9d..10ab1adf 100644
--- a/lib/core/service/weather_service.dart
+++ b/lib/core/service/weather_service.dart
@@ -21,6 +21,7 @@ class WeatherService extends BaseService {
await baseAppClient.post(WEATHER_INDICATOR,
onSuccess: (dynamic response, int statusCode) {
+ weatherIndicatorData = [];
response['GetCityInfo_List'].forEach((data) {
weatherIndicatorData.add(GetCityInfoList.fromJson(data));
});
diff --git a/lib/core/viewModels/base_view_model.dart b/lib/core/viewModels/base_view_model.dart
index db709f6b..aab267e9 100644
--- a/lib/core/viewModels/base_view_model.dart
+++ b/lib/core/viewModels/base_view_model.dart
@@ -29,6 +29,11 @@ class BaseViewModel extends ChangeNotifier {
if (hasListeners) notifyListeners();
}
+ setUser(AuthenticatedUser user){
+ this.user = user;
+ notifyListeners();
+ }
+
BaseViewModel() {
//authenticatedUserObject.getUser();
user = authenticatedUserObject.user;
diff --git a/lib/core/viewModels/dashboard_view_model.dart b/lib/core/viewModels/dashboard_view_model.dart
index e98ca341..e085e476 100644
--- a/lib/core/viewModels/dashboard_view_model.dart
+++ b/lib/core/viewModels/dashboard_view_model.dart
@@ -1,7 +1,9 @@
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
-
+import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import '../../locator.dart';
class DashboardViewModel extends BaseViewModel {
@@ -10,7 +12,7 @@ class DashboardViewModel extends BaseViewModel {
String get weightKg => _vitalSignService.weightKg;
String get heightCm => _vitalSignService.heightCm;
- String bloadType = "";
+ String booldType = "-";
// ToDoCountProviderModel toDoProvider =
// Provider.of(AppGlobal.context);
@@ -21,10 +23,11 @@ class DashboardViewModel extends BaseViewModel {
await _vitalSignService.getPatientRadOrders();
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
- setState(ViewState.Error);
- } else
+ setState(ViewState.ErrorLocal);
+ } else {
+ booldType = await sharedPref.getString(BLOOD_TYPE) ?? "-";
setState(ViewState.Idle);
- // getToDoCount();
+ }
}
}
diff --git a/lib/core/viewModels/insurance_card_View_model.dart b/lib/core/viewModels/insurance_card_View_model.dart
index 7029f082..234db5d4 100644
--- a/lib/core/viewModels/insurance_card_View_model.dart
+++ b/lib/core/viewModels/insurance_card_View_model.dart
@@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_approval.dart';
import 'package:diplomaticquarterapp/core/model/insurance/insurance_card.dart';
-import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/insurance_card_update_model.dart';
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
@@ -72,5 +72,14 @@ class InsuranceViewModel extends BaseViewModel {
} else
setState(ViewState.Idle);
}
+ Future uploadInsuranceCard({String patientIdentificationID, int patientID,String image =""}) async {
+ setState(ViewState.BusyLocal);
+ await _insuranceCardService.uploadInsuranceCard(patientIdentificationID: patientIdentificationID,patientID: patientID,image: image);
+ if (_insuranceCardService.hasError) {
+ error = _insuranceCardService.error;
+ setState(ViewState.ErrorLocal);
+ } else
+ setState(ViewState.Idle);
+ }
}
diff --git a/lib/core/viewModels/medical/my_balance_view_model.dart b/lib/core/viewModels/medical/my_balance_view_model.dart
index 62b7868b..f9554d94 100644
--- a/lib/core/viewModels/medical/my_balance_view_model.dart
+++ b/lib/core/viewModels/medical/my_balance_view_model.dart
@@ -74,11 +74,10 @@ class MyBalanceViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
- //==============
+
Future getCities() async {
setState(ViewState.Busy);
await _bloodDonationService.getAllCitiesOrders();
- // getHospitals();
if (_bloodDonationService.hasError) {
error = _bloodDonationService.error;
setState(ViewState.Error);
@@ -89,8 +88,6 @@ class MyBalanceViewModel extends BaseViewModel {
Future getBlood() async {
setState(ViewState.Busy);
await _bloodDetailsService.getAllBloodOrders();
- ;
-
if (_bloodDetailsService.hasError) {
error = _bloodDetailsService.error;
setState(ViewState.Error);
@@ -98,7 +95,6 @@ class MyBalanceViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
- //===============
Future getPatientInfoByPatientID({String id}) async {
setState(ViewState.Busy);
@@ -154,7 +150,7 @@ class MyBalanceViewModel extends BaseViewModel {
Future getFamilyFiles() async {
setState(ViewState.Busy);
- await _myBalanceService.getSharedRecordByStatus();
+ await _myBalanceService.getFamilyFiles();
if (_myBalanceService.hasError) {
error = _myBalanceService.error;
setState(ViewState.ErrorLocal);
diff --git a/lib/core/viewModels/medical/vital_sign_view_model.dart b/lib/core/viewModels/medical/vital_sign_view_model.dart
index f534140f..b2110187 100644
--- a/lib/core/viewModels/medical/vital_sign_view_model.dart
+++ b/lib/core/viewModels/medical/vital_sign_view_model.dart
@@ -11,7 +11,15 @@ class VitalSignViewModel extends BaseViewModel {
List get vitalSignResModelList =>
_vitalSignService.vitalSignResModelList;
- getPatientRadOrders({int appointmentNo, int projectID}) async {
+ String heightCm = "0";
+ String weightKg = "0";
+ String bodyMax = "0";
+ String temperatureCelcius = "0";
+ String hartRat = "0";
+ String respirationBeatPerMinute = "0";
+ String bloodPressure = "0 / 0";
+
+ getPatientVitalSign({int appointmentNo, int projectID}) async {
setState(ViewState.Busy);
if (appointmentNo != null && projectID != null) {
@@ -23,7 +31,41 @@ class VitalSignViewModel extends BaseViewModel {
if (_vitalSignService.hasError) {
error = _vitalSignService.error;
setState(ViewState.Error);
- } else
+ } else {
+ _vitalSignService.vitalSignResModelList.forEach((element) {
+ if (heightCm == "0" || heightCm == null || heightCm == 'null') {
+ heightCm = element.heightCm.toString();
+ }
+ if (weightKg == "0" || weightKg == null || weightKg == 'null') {
+ weightKg = element.weightKg.toString();
+ }
+ if (bodyMax == "0" ||
+ bodyMax == null ||
+ bodyMax == 'null') {
+ bodyMax = element.bodyMassIndex.toString();
+ }
+ if (temperatureCelcius == "0" ||
+ temperatureCelcius == null ||
+ temperatureCelcius == 'null') {
+ temperatureCelcius = element.temperatureCelcius.toString();
+ }
+ if (hartRat == "0" || hartRat == null || hartRat == 'null') {
+ hartRat = element.pulseBeatPerMinute.toString();
+ }
+ if (respirationBeatPerMinute == "0" ||
+ respirationBeatPerMinute == null ||
+ respirationBeatPerMinute == 'null') {
+ respirationBeatPerMinute =
+ element.respirationBeatPerMinute.toString();
+ }
+ if (bloodPressure == "0 / 0" ||
+ bloodPressure == null ||
+ bloodPressure == 'null') {
+ bloodPressure = element.bloodPressure.toString();
+ }
+ });
+
setState(ViewState.Idle);
+ }
}
}
diff --git a/lib/main.dart b/lib/main.dart
index b93aa83e..6fc2788d 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -24,7 +24,7 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final themeNotifier = Provider.of(context);
-
+ precacheImage(AssetImage('assets/images/powerd-by.jpg'), context);
return LayoutBuilder(
builder: (context, constraints) {
return OrientationBuilder(
diff --git a/lib/models/Appointments/AppoimentAllHistoryResultList.dart b/lib/models/Appointments/AppoimentAllHistoryResultList.dart
index 20eace25..045f759e 100644
--- a/lib/models/Appointments/AppoimentAllHistoryResultList.dart
+++ b/lib/models/Appointments/AppoimentAllHistoryResultList.dart
@@ -50,6 +50,7 @@ class AppoitmentAllHistoryResultList {
bool isExecludeDoctor;
int isFollowup;
bool isLiveCareAppointment;
+ bool isInOutPatient;
bool isMedicalReportRequested;
bool isOnlineCheckedIN;
String latitude;
@@ -188,6 +189,7 @@ class AppoitmentAllHistoryResultList {
isExecludeDoctor = json['IsExecludeDoctor'];
isFollowup = json['IsFollowup'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
+ isInOutPatient = json['IsInOutPatient'];
isMedicalReportRequested = json['IsMedicalReportRequested'];
isOnlineCheckedIN = json['IsOnlineCheckedIN'];
latitude = json['Latitude'];
@@ -259,6 +261,7 @@ class AppoitmentAllHistoryResultList {
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsFollowup'] = this.isFollowup;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
+ data['IsInOutPatient'] = this.isInOutPatient;
data['IsMedicalReportRequested'] = this.isMedicalReportRequested;
data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN;
data['Latitude'] = this.latitude;
diff --git a/lib/models/Authentication/authenticated_user.dart b/lib/models/Authentication/authenticated_user.dart
index 4c7974a3..eacba6a5 100644
--- a/lib/models/Authentication/authenticated_user.dart
+++ b/lib/models/Authentication/authenticated_user.dart
@@ -61,71 +61,72 @@ class AuthenticatedUser {
dynamic tempAddress;
dynamic zipCode;
dynamic isFamily;
+ dynamic cRSVerificationStatus;
// dynamic patientPayType;
// dynamic patientType;
// dynamic status;
- AuthenticatedUser({
- this.setupID,
- this.patientType,
- this.patientID,
- this.firstName,
- this.middleName,
- this.lastName,
- this.firstNameN,
- this.middleNameN,
- this.lastNameN,
- this.relationshipID,
- this.gender,
- this.dateofBirth,
- this.dateofBirthN,
- this.nationalityID,
- this.phoneResi,
- this.phoneOffice,
- this.mobileNumber,
- this.faxNumber,
- this.emailAddress,
- this.bloodGroup,
- this.rHFactor,
- this.isEmailAlertRequired,
- this.isSMSAlertRequired,
- this.preferredLanguage,
- this.isPrivilegedMember,
- this.memberID,
- this.expiryDate,
- this.isHmgEmployee,
- this.employeeID,
- this.emergencyContactName,
- this.emergencyContactNo,
- this.patientPayType,
- this.dHCCPatientRefID,
- this.isPatientDummy,
- this.status,
- this.isStatusCleared,
- this.patientIdentificationType,
- this.patientIdentificationNo,
- this.projectID,
- this.infoSourceID,
- this.address,
- this.age,
- this.ageDesc,
- this.areaID,
- this.createdBy,
- this.genderDescription,
- this.iR,
- this.iSOCityID,
- this.iSOCountryID,
- this.listPrivilege,
- this.marital,
- this.outSA,
- this.pOBox,
- this.receiveHealthSummaryReport,
- this.sourceType,
- this.strDateofBirth,
- this.tempAddress,
- this.zipCode,
- this.isFamily
- });
+ AuthenticatedUser(
+ {this.setupID,
+ this.patientType,
+ this.patientID,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
+ this.relationshipID,
+ this.gender,
+ this.dateofBirth,
+ this.dateofBirthN,
+ this.nationalityID,
+ this.phoneResi,
+ this.phoneOffice,
+ this.mobileNumber,
+ this.faxNumber,
+ this.emailAddress,
+ this.bloodGroup,
+ this.rHFactor,
+ this.isEmailAlertRequired,
+ this.isSMSAlertRequired,
+ this.preferredLanguage,
+ this.isPrivilegedMember,
+ this.memberID,
+ this.expiryDate,
+ this.isHmgEmployee,
+ this.employeeID,
+ this.emergencyContactName,
+ this.emergencyContactNo,
+ this.patientPayType,
+ this.dHCCPatientRefID,
+ this.isPatientDummy,
+ this.status,
+ this.isStatusCleared,
+ this.patientIdentificationType,
+ this.patientIdentificationNo,
+ this.projectID,
+ this.infoSourceID,
+ this.address,
+ this.age,
+ this.ageDesc,
+ this.areaID,
+ this.createdBy,
+ this.genderDescription,
+ this.iR,
+ this.iSOCityID,
+ this.iSOCountryID,
+ this.listPrivilege,
+ this.marital,
+ this.outSA,
+ this.pOBox,
+ this.receiveHealthSummaryReport,
+ this.sourceType,
+ this.strDateofBirth,
+ this.tempAddress,
+ this.zipCode,
+ this.isFamily,
+ this.cRSVerificationStatus});
AuthenticatedUser.fromJson(Map json) {
setupID = json['SetupID'];
@@ -193,6 +194,7 @@ class AuthenticatedUser {
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
isFamily = json['IsFamily'];
+ cRSVerificationStatus = json['CRSVerificationStatus'];
}
Map toJson() {
@@ -259,6 +261,7 @@ class AuthenticatedUser {
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
data['IsFamily'] = this.isFamily;
+ data['CRSVerificationStatus'] = this.cRSVerificationStatus;
return data;
}
}
diff --git a/lib/models/Authentication/check_activation_code_response.dart b/lib/models/Authentication/check_activation_code_response.dart
index 3a0aed65..6113fae3 100644
--- a/lib/models/Authentication/check_activation_code_response.dart
+++ b/lib/models/Authentication/check_activation_code_response.dart
@@ -329,67 +329,67 @@ class List {
dynamic strDateofBirth;
dynamic tempAddress;
dynamic zipCode;
-
- List({
- this.setupID,
- this.patientType,
- this.patientID,
- this.firstName,
- this.middleName,
- this.lastName,
- this.firstNameN,
- this.middleNameN,
- this.lastNameN,
- this.relationshipID,
- this.gender,
- this.dateofBirth,
- this.dateofBirthN,
- this.nationalityID,
- this.phoneResi,
- this.phoneOffice,
- this.mobileNumber,
- this.faxNumber,
- this.emailAddress,
- this.bloodGroup,
- this.rHFactor,
- this.isEmailAlertRequired,
- this.isSMSAlertRequired,
- this.preferredLanguage,
- this.isPrivilegedMember,
- this.memberID,
- this.expiryDate,
- this.isHmgEmployee,
- this.employeeID,
- this.emergencyContactName,
- this.emergencyContactNo,
- this.patientPayType,
- this.dHCCPatientRefID,
- this.isPatientDummy,
- this.status,
- this.isStatusCleared,
- this.patientIdentificationType,
- this.patientIdentificationNo,
- this.projectID,
- this.infoSourceID,
- this.address,
- this.age,
- this.ageDesc,
- this.areaID,
- this.createdBy,
- this.genderDescription,
- this.iR,
- this.iSOCityID,
- this.iSOCountryID,
- this.listPrivilege,
- this.marital,
- this.outSA,
- this.pOBox,
- this.receiveHealthSummaryReport,
- this.sourceType,
- this.strDateofBirth,
- this.tempAddress,
- this.zipCode,
- });
+ dynamic cRSVerificationStatus;
+ List(
+ {this.setupID,
+ this.patientType,
+ this.patientID,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
+ this.relationshipID,
+ this.gender,
+ this.dateofBirth,
+ this.dateofBirthN,
+ this.nationalityID,
+ this.phoneResi,
+ this.phoneOffice,
+ this.mobileNumber,
+ this.faxNumber,
+ this.emailAddress,
+ this.bloodGroup,
+ this.rHFactor,
+ this.isEmailAlertRequired,
+ this.isSMSAlertRequired,
+ this.preferredLanguage,
+ this.isPrivilegedMember,
+ this.memberID,
+ this.expiryDate,
+ this.isHmgEmployee,
+ this.employeeID,
+ this.emergencyContactName,
+ this.emergencyContactNo,
+ this.patientPayType,
+ this.dHCCPatientRefID,
+ this.isPatientDummy,
+ this.status,
+ this.isStatusCleared,
+ this.patientIdentificationType,
+ this.patientIdentificationNo,
+ this.projectID,
+ this.infoSourceID,
+ this.address,
+ this.age,
+ this.ageDesc,
+ this.areaID,
+ this.createdBy,
+ this.genderDescription,
+ this.iR,
+ this.iSOCityID,
+ this.iSOCountryID,
+ this.listPrivilege,
+ this.marital,
+ this.outSA,
+ this.pOBox,
+ this.receiveHealthSummaryReport,
+ this.sourceType,
+ this.strDateofBirth,
+ this.tempAddress,
+ this.zipCode,
+ this.cRSVerificationStatus});
List.fromJson(Map json) {
setupID = json['SetupID'];
@@ -452,6 +452,7 @@ class List {
strDateofBirth = json['StrDateofBirth'];
tempAddress = json['TempAddress'];
zipCode = json['ZipCode'];
+ cRSVerificationStatus = json['CRSVerificationStatus'];
}
Map toJson() {
@@ -516,7 +517,7 @@ class List {
data['StrDateofBirth'] = this.strDateofBirth;
data['TempAddress'] = this.tempAddress;
data['ZipCode'] = this.zipCode;
-
+ data['CRSVerificationStatus'] = this.cRSVerificationStatus;
return data;
}
}
diff --git a/lib/models/Authentication/register_user_requet.dart b/lib/models/Authentication/register_user_requet.dart
index 7758ce5b..38622727 100644
--- a/lib/models/Authentication/register_user_requet.dart
+++ b/lib/models/Authentication/register_user_requet.dart
@@ -88,7 +88,7 @@ class Patientobject {
String sourceType;
String preferredLanguage;
String marital;
-
+ String eHealthIDField;
Patientobject(
{this.tempValue,
this.patientIdentificationType,
@@ -96,11 +96,11 @@ class Patientobject {
this.mobileNumber,
this.patientOutSA,
this.firstName,
- this.middleName,
- this.lastName,
- this.firstNameN,
- this.middleNameN,
- this.lastNameN,
+ this.middleName,
+ this.lastName,
+ this.firstNameN,
+ this.middleNameN,
+ this.lastNameN,
this.strDateofBirth,
this.dateofBirth,
this.gender,
@@ -109,7 +109,8 @@ class Patientobject {
this.emailAddress,
this.sourceType,
this.preferredLanguage,
- this.marital});
+ this.marital,
+ this.eHealthIDField});
Patientobject.fromJson(Map json) {
tempValue = json['TempValue'];
@@ -133,6 +134,7 @@ class Patientobject {
preferredLanguage = json['PreferredLanguage'];
marital = json['Marital'];
+ eHealthIDField = json['eHealthIDField'];
}
Map toJson() {
@@ -158,6 +160,7 @@ class Patientobject {
data['PreferredLanguage'] = this.preferredLanguage;
data['Marital'] = this.marital;
+ data['eHealthIDField'] = this.eHealthIDField;
return data;
}
}
diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart
index d84b9d61..a823c154 100644
--- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart
+++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart
@@ -15,7 +15,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import '../dialogs/select_city_dialog.dart';
-
+import 'dart:io';
class NewEReferralStepThreePage extends StatefulWidget {
final CreateEReferralRequestModel createEReferralRequestModel;
final Function changePageViewIndex;
@@ -101,12 +101,17 @@ class _NewEReferralStepThreePageState extends State {
InkWell(
onTap: () {
ImageOptions.showImageOptions(context,
- (String image) {
+ (String image,File file) {
setState(() {
- EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${ medicalReportImages.length +1}.png',base64String: image );
- medicalReportImages.add(eReferralAttachment);
+ EReferralAttachment eReferralAttachment =
+ new EReferralAttachment(
+ fileName:
+ 'image ${medicalReportImages.length + 1}.png',
+ base64String: image);
+ medicalReportImages
+ .add(eReferralAttachment);
});
- });
+ }, );
},
child: Container(
margin: EdgeInsets.only(
@@ -158,15 +163,17 @@ class _NewEReferralStepThreePageState extends State {
width: 8,
),
Texts(
- medicalReportImages[index].fileName,
+ medicalReportImages[index]
+ .fileName,
),
],
),
InkWell(
onTap: () {
setState(() {
- medicalReportImages
- .remove(medicalReportImages[index]);
+ medicalReportImages.remove(
+ medicalReportImages[
+ index]);
});
},
child: Icon(
@@ -262,12 +269,12 @@ class _NewEReferralStepThreePageState extends State {
],
),
),
- if(isPatientInsured)
- SizedBox(
- height: 12,
- ),
+ if (isPatientInsured)
+ SizedBox(
+ height: 12,
+ ),
Opacity(
- opacity: isPatientInsured?1:0,
+ opacity: isPatientInsured ? 1 : 0,
child: Container(
padding: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
@@ -276,16 +283,21 @@ class _NewEReferralStepThreePageState extends State {
),
child: Column(
children: [
-
InkWell(
onTap: () {
ImageOptions.showImageOptions(context,
- (String image) {
+ (String image,File file) {
setState(() {
+ EReferralAttachment
+ eReferralAttachment =
+ new EReferralAttachment(
+ fileName:
+ 'image ${medicalReportImages.length + 1}.png',
+ base64String: image);
- EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${ medicalReportImages.length +1}.png',base64String: image );
-
- insuredPatientImages=[eReferralAttachment];
+ insuredPatientImages = [
+ eReferralAttachment
+ ];
});
});
},
@@ -333,8 +345,8 @@ class _NewEReferralStepThreePageState extends State {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
- Icon(
- FontAwesomeIcons.paperclip),
+ Icon(FontAwesomeIcons
+ .paperclip),
SizedBox(
width: 8,
),
@@ -346,8 +358,9 @@ class _NewEReferralStepThreePageState extends State {
InkWell(
onTap: () {
setState(() {
- insuredPatientImages
- .remove(insuredPatientImages[index]);
+ insuredPatientImages.remove(
+ insuredPatientImages[
+ index]);
});
},
child: Icon(
@@ -378,25 +391,37 @@ class _NewEReferralStepThreePageState extends State {
textColor: Colors.white,
label: "Submit",
onTap: () async {
- this.widget.createEReferralRequestModel.medicalReportAttachment = medicalReportImages;
- this.widget.createEReferralRequestModel.insuranceCardAttachment = insuredPatientImages.length !=0?insuredPatientImages[0]:null;
- this.widget.createEReferralRequestModel.isInsuredPatient = isPatientInsured;
+ this
+ .widget
+ .createEReferralRequestModel
+ .medicalReportAttachment = medicalReportImages;
+ this
+ .widget
+ .createEReferralRequestModel
+ .insuranceCardAttachment =
+ insuredPatientImages.length != 0
+ ? insuredPatientImages[0]
+ : null;
+ this.widget.createEReferralRequestModel.isInsuredPatient =
+ isPatientInsured;
// ToDo make the preferred Branch info dynamic
- this.widget.createEReferralRequestModel.preferredBranchCode = 15;
- this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
-
-
+ this.widget.createEReferralRequestModel.preferredBranchCode =
+ 15;
+ this.widget.createEReferralRequestModel.preferredBranchName =
+ "Arryan Hospital";
// this.widget.createEReferralRequestModel.fullName= "";
- this.widget.createEReferralRequestModel.otherRelationship= "";
+ this.widget.createEReferralRequestModel.otherRelationship =
+ "";
// this.widget.createEReferralRequestModel.;
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
// this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital";
- await model.createEReferral(this.widget.createEReferralRequestModel);
+ await model
+ .createEReferral(this.widget.createEReferralRequestModel);
},
loading: model.state == ViewState.BusyLocal,
- disabled: medicalReportImages.length == 0 ,
+ disabled: medicalReportImages.length == 0,
),
)));
}
@@ -416,12 +441,10 @@ class _NewEReferralStepThreePageState extends State {
);
}
-
String getRelationName() {
if (_selectedCity != null)
return _selectedCity.description;
else
return "Select Relationship" /*TranslationBase.of(context).selectHospital*/;
}
-
}
diff --git a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart
index c837bd2a..a68bca73 100644
--- a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart
+++ b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_index_page.dart
@@ -48,8 +48,8 @@ class EReferralIndexPage extends StatelessWidget {
width: MediaQuery.of(context).size.width * 0.50,
child: CarouselSlider(
imagesUrlList: [
- "https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/0.png",
- "https://hmgwebservices.com/Images/MobileApp/images-info-home/referal/en/1.png"
+ "https://hmgwebservices.com/Images/MobileAppDq/images-info-home/referal/en/0.png",
+ "https://hmgwebservices.com/Images/MobileAppDq/images-info-home/referal/en/1.png"
],
),
),
diff --git a/lib/pages/BookAppointment/Search.dart b/lib/pages/BookAppointment/Search.dart
index 44cf46c3..ed93f626 100644
--- a/lib/pages/BookAppointment/Search.dart
+++ b/lib/pages/BookAppointment/Search.dart
@@ -1,10 +1,11 @@
import 'package:diplomaticquarterapp/config/config.dart';
-import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
-import 'package:diplomaticquarterapp/widgets/others/arrow_back.dart';
+import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
+import 'components/SearchByClinic.dart';
+
class Search extends StatefulWidget {
final int type;
final List clnicIds;
@@ -29,34 +30,40 @@ class _SearchState extends State with TickerProviderStateMixin {
@override
Widget build(BuildContext context) {
AppGlobal.context = context;
- return Scaffold(
- appBar: AppBar(
- bottom: TabBar(
- tabs: [
- Tab(text: TranslationBase.of(context).clinicName),
- Tab(
- text: TranslationBase.of(context).doctorName,
- )
- ],
- controller: _tabController,
- ),
- title: Text(TranslationBase.of(context).bookAppo,
- style: TextStyle(color: Colors.white)),
- leading: Builder(
- builder: (BuildContext context) {
- return ArrowBack();
- },
- ),
- ),
- body: TabBarView(
- physics: NeverScrollableScrollPhysics(),
- children: [
- SearchByClinic(
- clnicIds: widget.clnicIds,
- ),
- SearchByDoctor()
- ],
- controller: _tabController),
- );
+ return AppScaffold(
+ isShowAppBar: true,
+ isShowDecPage: false,
+ appBarTitle: TranslationBase.of(context).bookAppo,
+ body: Container(
+ child: Column(
+ children: [
+ TabBar(
+ tabs: [
+ Tab(text: TranslationBase.of(context).clinicName),
+ Tab(
+ text: TranslationBase.of(context).doctorName,
+ )
+ ],
+ controller: _tabController,
+ ),
+ Divider(
+ color: Colors.grey[600],
+ thickness: 0.5,
+ ),
+ Expanded(
+ child: new TabBarView(
+ physics: NeverScrollableScrollPhysics(),
+ children: [
+ SearchByClinic(
+ clnicIds: widget.clnicIds,
+ ),
+ SearchByDoctor()
+ ],
+ controller: _tabController,
+ ),
+ )
+ ],
+ ),
+ ));
}
}
diff --git a/lib/pages/BookAppointment/components/DocInfo.dart b/lib/pages/BookAppointment/components/DocInfo.dart
index 1d91f7de..89b9e4d0 100644
--- a/lib/pages/BookAppointment/components/DocInfo.dart
+++ b/lib/pages/BookAppointment/components/DocInfo.dart
@@ -17,6 +17,7 @@ class DoctorInformation extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
AppExpandableNotifier(
+ isExpand: true,
headerWidget: Container(
margin: EdgeInsets.all(10.0),
child: Row(
@@ -78,6 +79,7 @@ class DoctorInformation extends StatelessWidget {
),
// ),
AppExpandableNotifier(
+ isExpand: true,
headerWidget: Container(
margin: EdgeInsets.all(10.0),
child: Row(
diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart
index 587d76d6..5870ab54 100644
--- a/lib/pages/BookAppointment/components/SearchByClinic.dart
+++ b/lib/pages/BookAppointment/components/SearchByClinic.dart
@@ -33,6 +33,7 @@ class _SearchByClinicState extends State {
List projectsList = [];
bool isMobileAppDentalAllow = false;
bool isLoaded = false;
+ bool isProjectLoaded = false;
@override
void initState() {
@@ -55,6 +56,11 @@ class _SearchByClinicState extends State {
onChanged: (bool value) {
setState(() {
nearestAppo = value;
+ print(nearestAppo);
+ if (nearestAppo)
+ getProjectsList();
+ else
+ isProjectLoaded = false;
});
},
),
@@ -120,7 +126,8 @@ class _SearchByClinicState extends State {
},
),
)),
- isDentalSelectedAndSupported() == true || nearestAppo
+ isDentalSelectedAndSupported() == true ||
+ (nearestAppo && isProjectLoaded)
? Container(
height: 60.0,
decoration: BoxDecoration(
@@ -177,25 +184,31 @@ class _SearchByClinicState extends State {
});
});
getProjectsList();
+ GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
+ GifLoaderDialogUtils.hideDialog(context);
});
}
getProjectsList() {
ClinicListService service = new ClinicListService();
+ List projectsListLocal = [];
service.getProjectsList(context).then((res) {
if (res['MessageStatus'] == 1) {
setState(() {
res['ListProject'].forEach((v) {
- projectsList.add(new HospitalsModel.fromJson(v));
+ projectsListLocal.add(new HospitalsModel.fromJson(v));
});
+ projectsList = projectsListLocal;
});
- GifLoaderDialogUtils.hideDialog(context);
filterClinic();
- } else {}
+ isProjectLoaded = true;
+ } else {
+ isProjectLoaded = false;
+ }
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@@ -237,10 +250,6 @@ class _SearchByClinicState extends State {
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
- // arr.add(new DoctorList.fromJson(v).projectName);
- // arrDistance.add(new DoctorList.fromJson(v)
- // .projectDistanceInKiloMeters
- // .toString());
});
doctorsList.forEach((element) {
List doctorByHospital =
@@ -271,8 +280,6 @@ class _SearchByClinicState extends State {
result = LinkedHashSet.from(arr).toList();
numAll = result.length;
- // navigateToSearchResults(
- // context, doctorsList, result, numAll, arrDistance);
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
@@ -301,6 +308,7 @@ class _SearchByClinicState extends State {
List docList,
List
patientDoctorAppointmentListHospital) async {
+ isProjectLoaded = false;
Navigator.push(
context,
MaterialPageRoute(
diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart
index a747db3d..a49b5a04 100644
--- a/lib/pages/ContactUs/LiveChat/livechat_page.dart
+++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart
@@ -23,9 +23,9 @@ class _LiveChatPageState extends State
@override
void initState() {
super.initState();
- imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png'));
- imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png'));
- imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png'));
+ imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/live-chat/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/live-chat/ar/0.png'));
+ imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/live-chat/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/live-chat/ar/1.png'));
+ imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/live-chat/en/2.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/live-chat/ar/2.png'));
_tabController = TabController(length: 2, vsync: this);
}
diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart
index 62dae624..84ecb516 100644
--- a/lib/pages/DrawerPages/family/my-family.dart
+++ b/lib/pages/DrawerPages/family/my-family.dart
@@ -13,6 +13,8 @@ import 'package:diplomaticquarterapp/models/Authentication/check_activation_code
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
+import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@@ -25,6 +27,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@@ -69,17 +72,17 @@ class _MyFamily extends State with TickerProviderStateMixin {
imagesInfo.add(
ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/0.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/family-file/en/0.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/0.png'),
+ 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/family-file/ar/0.png'),
);
imagesInfo.add(
ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/family-file/en/1.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'),
+ 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/family-file/ar/1.png'),
);
projectViewModel = Provider.of(context);
return AppScaffold(
@@ -704,26 +707,57 @@ class _MyFamily extends State with TickerProviderStateMixin {
}
loginAfter(result, context) async {
- GifLoaderDialogUtils.hideDialog(context);
+ //GifLoaderDialogUtils.hideDialog(context);
var currentLang = await sharedPref.getString(APP_LANGUAGE);
result = list.CheckActivationCode.fromJson(result);
var familyFile = await sharedPref.getObject(FAMILY_FILE);
var mainUser = await sharedPref.getObject(MAIN_USER);
+ var bloodType = await sharedPref.getString(BLOOD_TYPE);
this.sharedPref.clear();
if (mainUser["PatientID"] != result.list.patientID) {
result.list.isFamily = true;
}
this.sharedPref.setString(APP_LANGUAGE, currentLang);
this.sharedPref.setObject(MAIN_USER, mainUser);
- //sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']);
+ this.sharedPref.setString(BLOOD_TYPE, bloodType);
this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(FAMILY_FILE, familyFile);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID);
- //this.checkIfUserAgreedBefore(result),
- Navigator.of(context).pushNamed(
- HOME,
- );
+ await authenticatedUserObject.getUser(getUser: true);
+ Provider.of(context, listen: false).user =
+ authenticatedUserObject.user;
+ Provider.of(context, listen: false)
+ .setUser(authenticatedUserObject.user);
+ appointmentRateViewModel
+ .getIsLastAppointmentRatedList()
+ .then((value) => {
+ //getToDoCount(),
+ // Utils.hideProgressDialog(),
+ if (appointmentRateViewModel.isHaveAppointmentNotRate)
+ {
+ Navigator.pushAndRemoveUntil(
+ context,
+ FadePage(
+ page: RateAppointmentDoctor(),
+ ),
+ (r) => false)
+ }
+ else
+ {
+ Navigator.pushAndRemoveUntil(
+ context,
+ FadePage(
+ page: LandingPage(),
+ ),
+ (r) => false)
+ }
+ })
+ .catchError((err) {
+ print(err);
+ // Utils.hideProgressDialog();
+ // GifLoaderDialogUtils.hideDialog(context);
+ });
}
deactivateRequest(ID, status, context) {
diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart
index 1690254a..e5e0cc04 100644
--- a/lib/pages/ErService/AmbulanceReq.dart
+++ b/lib/pages/ErService/AmbulanceReq.dart
@@ -43,9 +43,9 @@ class _AmbulanceReqState extends State
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/Ambulance/en/0.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
+ 'https://hmgwebservices.com/Images/MobileAppDq/Ambulance/ar/0.png'));
return BaseView(
onModelReady: (model) => model.getAmRequestOrders(),
diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart
index a49149b5..39dfae41 100644
--- a/lib/pages/MyAppointments/MyAppointments.dart
+++ b/lib/pages/MyAppointments/MyAppointments.dart
@@ -60,14 +60,14 @@ class _MyAppointmentsState extends State
});
imagesInfo.add(ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/0.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-appointment/en/0.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/0.png'));
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-appointment/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/1.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-appointment/en/1.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/1.png'));
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-appointment/ar/1.png'));
super.initState();
}
diff --git a/lib/pages/MyAppointments/models/ArrivedButtons.dart b/lib/pages/MyAppointments/models/ArrivedButtons.dart
index 6baf7858..ac219919 100644
--- a/lib/pages/MyAppointments/models/ArrivedButtons.dart
+++ b/lib/pages/MyAppointments/models/ArrivedButtons.dart
@@ -2,13 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ArrivedButtons {
- static var buttons = [
- // {
- // "title": TranslationBase.of(AppGlobal.context).arrived,
- // "subtitle": TranslationBase.of(AppGlobal.context).status,
- // "icon": "assets/images/new-design/waiting-room.png",
- // "caller": "openReschedule"
- // },
+ var buttons = [
{
"title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,
diff --git a/lib/pages/MyAppointments/models/BookedButtons.dart b/lib/pages/MyAppointments/models/BookedButtons.dart
index 1a76be63..709b3b1f 100644
--- a/lib/pages/MyAppointments/models/BookedButtons.dart
+++ b/lib/pages/MyAppointments/models/BookedButtons.dart
@@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class BookedButtons {
- static var buttons = [
+ var buttons = [
{
"title": TranslationBase.of(AppGlobal.context).confirm,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
diff --git a/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart
index 374ebf45..9548b7c8 100644
--- a/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart
+++ b/lib/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart
@@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class BookedButtonsAllowCheckIn {
- static var buttons = [
+ var buttons = [
{
"title": TranslationBase.of(AppGlobal.context).confirm,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
diff --git a/lib/pages/MyAppointments/models/ConfirmedButtons.dart b/lib/pages/MyAppointments/models/ConfirmedButtons.dart
index d5b7836e..b02021c7 100644
--- a/lib/pages/MyAppointments/models/ConfirmedButtons.dart
+++ b/lib/pages/MyAppointments/models/ConfirmedButtons.dart
@@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ConfirmedButtons {
- static var buttons = [
+ var buttons = [
{
"title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
diff --git a/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart b/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart
index 1368e3f3..07ba333e 100644
--- a/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart
+++ b/lib/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart
@@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ConfirmedButtonsAllowCheckIn {
- static var buttons = [
+ var buttons = [
{
"title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
index 7d985233..60035ee1 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart
@@ -276,14 +276,15 @@ class _AppointmentActionsState extends State {
Future> _getBookedAppoActionsList() async {
print("_getBookedAppoActionsList");
- print(BookedButtons.buttons);
+ BookedButtons bookedButtons = new BookedButtons();
+ print(bookedButtons.buttons);
List buttonsList = [];
- for (var i = 0; i < BookedButtons.buttons.length; i++) {
+ for (var i = 0; i < bookedButtons.buttons.length; i++) {
buttonsList.add(AppoDetailsButton(
- title: BookedButtons.buttons[i]['title'],
- subtitle: BookedButtons.buttons[i]['subtitle'],
- icon: BookedButtons.buttons[i]['icon'],
- caller: BookedButtons.buttons[i]['caller'],
+ title: bookedButtons.buttons[i]['title'],
+ subtitle: bookedButtons.buttons[i]['subtitle'],
+ icon: bookedButtons.buttons[i]['icon'],
+ caller: bookedButtons.buttons[i]['caller'],
));
}
setState(() {
@@ -293,14 +294,16 @@ class _AppointmentActionsState extends State {
Future> _getBookedCheckInAppoActionsList() async {
print("_getBookedCheckInAppoActionsList");
- print(BookedButtonsAllowCheckIn.buttons);
+ BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn =
+ new BookedButtonsAllowCheckIn();
+ print(bookedButtonsAllowCheckIn.buttons);
List buttonsList = [];
- for (var i = 0; i < BookedButtonsAllowCheckIn.buttons.length; i++) {
+ for (var i = 0; i < bookedButtonsAllowCheckIn.buttons.length; i++) {
buttonsList.add(AppoDetailsButton(
- title: BookedButtonsAllowCheckIn.buttons[i]['title'],
- subtitle: BookedButtonsAllowCheckIn.buttons[i]['subtitle'],
- icon: BookedButtonsAllowCheckIn.buttons[i]['icon'],
- caller: BookedButtonsAllowCheckIn.buttons[i]['caller'],
+ title: bookedButtonsAllowCheckIn.buttons[i]['title'],
+ subtitle: bookedButtonsAllowCheckIn.buttons[i]['subtitle'],
+ icon: bookedButtonsAllowCheckIn.buttons[i]['icon'],
+ caller: bookedButtonsAllowCheckIn.buttons[i]['caller'],
));
}
setState(() {
@@ -310,14 +313,15 @@ class _AppointmentActionsState extends State {
Future> _getConfirmedAppoActionsList() async {
print("_getConfirmedAppoActionsList");
- print(ConfirmedButtons.buttons);
+ ConfirmedButtons confirmedButtons = new ConfirmedButtons();
+ print(confirmedButtons.buttons);
List buttonsList = [];
- for (var i = 0; i < ConfirmedButtons.buttons.length; i++) {
+ for (var i = 0; i < confirmedButtons.buttons.length; i++) {
buttonsList.add(AppoDetailsButton(
- title: ConfirmedButtons.buttons[i]['title'],
- subtitle: ConfirmedButtons.buttons[i]['subtitle'],
- icon: ConfirmedButtons.buttons[i]['icon'],
- caller: ConfirmedButtons.buttons[i]['caller'],
+ title: confirmedButtons.buttons[i]['title'],
+ subtitle: confirmedButtons.buttons[i]['subtitle'],
+ icon: confirmedButtons.buttons[i]['icon'],
+ caller: confirmedButtons.buttons[i]['caller'],
));
}
setState(() {
@@ -327,14 +331,16 @@ class _AppointmentActionsState extends State {
Future> _getConfirmedCheckInAppoActionsList() async {
print("_getConfirmedAllowCheckInAppoActionsList");
- print(ConfirmedButtonsAllowCheckIn.buttons);
+ ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn =
+ new ConfirmedButtonsAllowCheckIn();
+ print(confirmedButtonsAllowCheckIn.buttons);
List buttonsList = [];
- for (var i = 0; i < ConfirmedButtonsAllowCheckIn.buttons.length; i++) {
+ for (var i = 0; i < confirmedButtonsAllowCheckIn.buttons.length; i++) {
buttonsList.add(AppoDetailsButton(
- title: ConfirmedButtonsAllowCheckIn.buttons[i]['title'],
- subtitle: ConfirmedButtonsAllowCheckIn.buttons[i]['subtitle'],
- icon: ConfirmedButtonsAllowCheckIn.buttons[i]['icon'],
- caller: ConfirmedButtonsAllowCheckIn.buttons[i]['caller'],
+ title: confirmedButtonsAllowCheckIn.buttons[i]['title'],
+ subtitle: confirmedButtonsAllowCheckIn.buttons[i]['subtitle'],
+ icon: confirmedButtonsAllowCheckIn.buttons[i]['icon'],
+ caller: confirmedButtonsAllowCheckIn.buttons[i]['caller'],
));
}
setState(() {
@@ -344,14 +350,15 @@ class _AppointmentActionsState extends State {
Future> _getArrivedAppoActionsList() async {
print("_getArrivedAppoActionsList");
- print(ArrivedButtons.buttons);
+ ArrivedButtons arrivedButtons = new ArrivedButtons();
+ print(arrivedButtons.buttons);
List buttonsList = [];
- for (var i = 0; i < ArrivedButtons.buttons.length; i++) {
+ for (var i = 0; i < arrivedButtons.buttons.length; i++) {
buttonsList.add(AppoDetailsButton(
- title: ArrivedButtons.buttons[i]['title'],
- subtitle: ArrivedButtons.buttons[i]['subtitle'],
- icon: ArrivedButtons.buttons[i]['icon'],
- caller: ArrivedButtons.buttons[i]['caller'],
+ title: arrivedButtons.buttons[i]['title'],
+ subtitle: arrivedButtons.buttons[i]['subtitle'],
+ icon: arrivedButtons.buttons[i]['icon'],
+ caller: arrivedButtons.buttons[i]['caller'],
));
}
setState(() {
@@ -361,14 +368,14 @@ class _AppointmentActionsState extends State {
Future> _getArrivedInvoiceAppoActionsList() async {
print("_getArrivedInvoiceAppoActionsList");
- print(ArrivedButtons.buttons);
+ ArrivedButtons arrivedButtons = new ArrivedButtons();
List buttonsList = [];
- for (var i = 0; i < ArrivedButtons.buttons.length; i++) {
+ for (var i = 0; i < arrivedButtons.buttons.length; i++) {
buttonsList.add(AppoDetailsButton(
- title: ArrivedButtons.buttons[i]['title'],
- subtitle: ArrivedButtons.buttons[i]['subtitle'],
- icon: ArrivedButtons.buttons[i]['icon'],
- caller: ArrivedButtons.buttons[i]['caller'],
+ title: arrivedButtons.buttons[i]['title'],
+ subtitle: arrivedButtons.buttons[i]['subtitle'],
+ icon: arrivedButtons.buttons[i]['icon'],
+ caller: arrivedButtons.buttons[i]['caller'],
));
}
setState(() {
@@ -474,7 +481,8 @@ class _AppointmentActionsState extends State {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
});
print(prescriptionReportEnhList.length);
- navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']);
+ navigateToMedicinePrescriptionReport(
+ prescriptionReportEnhList, res['ListPRM']);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
}
@@ -660,7 +668,7 @@ class _AppointmentActionsState extends State {
context,
FadePage(
page: VitalSignDetailsScreen(
- appointmentNo: appoNo, projectID: projectID)));
+ appointmentNo: appoNo, projectID: projectID,isNotOneAppointment: false,)));
}
navigateToInsertComplaint() {
diff --git a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
index 2f3d941f..c4299e33 100644
--- a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
+++ b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart
@@ -24,14 +24,15 @@ class AppointmentCard extends StatefulWidget {
}
class _ApointmentCardState extends State {
-
CountdownTimerController controller;
@override
void initState() {
super.initState();
int endTime = DateTime.now().millisecondsSinceEpoch + 1000 * 30;
- controller = CountdownTimerController(endTime: endTime,);
+ controller = CountdownTimerController(
+ endTime: endTime,
+ );
}
@override
@@ -54,103 +55,157 @@ class _ApointmentCardState extends State {
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
+ Container(
+ width: projectViewModel.isArabic ? 27 : 20,
+ height: projectViewModel.isArabic ? 165 : 140,
+ decoration: BoxDecoration(
+ //Colors.red[900] Color(0xff404545)
+ color: widget.appo.isLiveCareAppointment
+ ? Color(0xff404545)
+ : !widget.appo.isInOutPatient
+ ? Colors.red[900]
+ : Theme.of(context).primaryColor,
+ borderRadius: BorderRadius.only(
+ topLeft: projectViewModel.isArabic
+ ? Radius.circular(0)
+ : Radius.circular(8),
+ bottomLeft: projectViewModel.isArabic
+ ? Radius.circular(0)
+ : Radius.circular(8),
+ topRight: projectViewModel.isArabic
+ ? Radius.circular(8)
+ : Radius.circular(0),
+ bottomRight: projectViewModel.isArabic
+ ? Radius.circular(8)
+ : Radius.circular(0),
+ ),
+ ),
+ child: RotatedBox(
+ quarterTurns: 3,
+ child: Center(
+ child: Text(
+ widget.appo.isLiveCareAppointment
+ ? TranslationBase.of(context)
+ .liveCare
+ .toUpperCase()
+ : !widget.appo.isInOutPatient
+ ? TranslationBase.of(context)
+ .inPatient
+ .toUpperCase()
+ : TranslationBase.of(context)
+ .outpatient
+ .toUpperCase(),
+ style: TextStyle(color: Colors.white),
+ ),
+ )),
+ ),
+ SizedBox(width: 8,),
ClipRRect(
borderRadius: BorderRadius.circular(100.0),
child: Image.network(widget.appo.doctorImageURL,
fit: BoxFit.fill, height: 60.0, width: 60.0),
),
- Container(
- width: MediaQuery.of(context).size.width * 0.61,
- margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- widget.appo.doctorTitle +
- " " +
- widget.appo.doctorNameObj,
- style: TextStyle(
- fontSize: 14.0,
- color: Colors.grey[700],
- letterSpacing: 1.0)),
- Container(
- margin: EdgeInsets.only(top: 3.0),
- child: Text(widget.appo.clinicName,
- style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[600],
- letterSpacing: 1.0)),
- ),
- Container(
- margin: EdgeInsets.only(top: 3.0),
- child: Text(widget.appo.projectName,
- style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[600],
- letterSpacing: 1.0)),
- ),
- Container(
- margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
- child: Text(
- DateUtil.getWeekDayMonthDayYearDateFormatted(
- DateUtil.convertStringToDate(
- widget.appo.appointmentDate),
- projectViewModel.isArabic ? "ar" : "en")
- .trim(),
+ Expanded(
+ child: Container(
+ width: MediaQuery.of(context).size.width * 0.61,
+ margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ widget.appo.doctorTitle +
+ " " +
+ widget.appo.doctorNameObj,
style: TextStyle(
- fontSize: 12.0,
- color: Colors.grey[600],
+ fontSize: 14.0,
+ color: Colors.grey[700],
letterSpacing: 1.0)),
- ),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- mainAxisSize: MainAxisSize.max,
- children: [
- RatingBar.readOnly(
- initialRating:
- widget.appo.actualDoctorRate.toDouble(),
- size: 20.0,
- filledColor: Colors.yellow[700],
- emptyColor: Colors.grey[500],
- isHalfAllowed: true,
- halfFilledIcon: Icons.star_half,
- filledIcon: Icons.star,
- emptyIcon: Icons.star,
- ),
- Container(
- transform:
- Matrix4.translationValues(15.0, -40.0, 0.0),
- child: projectViewModel.isArabic
- ? Image.asset(
- "assets/images/new-design/arrow_menu_black-ar.png",
- width: 25.0,
- height: 25.0)
- : Image.asset(
- "assets/images/new-design/arrow_menu_black-en.png",
- width: 25.0,
- height: 25.0),
- ),
- ],
- ),
- (widget.appo.patientStatusType == AppointmentType.BOOKED ||
- widget.appo.patientStatusType ==
- AppointmentType.CONFIRMED)
- ? Container(
- child: CountdownTimer(
- controller: controller,
- widgetBuilder: (_, CurrentRemainingTime time) {
- return Text(
- '${time.days}:${time.hours}:${time.min}:${time.sec} ' +
- TranslationBase.of(context)
- .upcomingTimeLeft,
- style: TextStyle(
- fontSize: 12.0,
- color: Color(0xff40ACC9)));
- },
- ),
- )
- : Container(),
- ],
+ Container(
+ margin: EdgeInsets.only(top: 3.0),
+ child: Text(widget.appo.clinicName,
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Colors.grey[600],
+ letterSpacing: 1.0)),
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 3.0),
+ child: Text(widget.appo.projectName,
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Colors.grey[600],
+ letterSpacing: 1.0)),
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
+ child: Text(
+ DateUtil.getWeekDayMonthDayYearDateFormatted(
+ DateUtil.convertStringToDate(
+ widget.appo.appointmentDate),
+ projectViewModel.isArabic ? "ar" : "en")
+ .trim(),
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Colors.grey[600],
+ letterSpacing: 1.0)),
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ RatingBar.readOnly(
+ initialRating:
+ widget.appo.actualDoctorRate.toDouble(),
+ size: 20.0,
+ filledColor: Colors.yellow[700],
+ emptyColor: Colors.grey[500],
+ isHalfAllowed: true,
+ halfFilledIcon: Icons.star_half,
+ filledIcon: Icons.star,
+ emptyIcon: Icons.star,
+ ),
+ Container(
+ transform:
+ Matrix4.translationValues(15.0, -40.0, 0.0),
+ child: projectViewModel.isArabic
+ ? Image.asset(
+ "assets/images/new-design/arrow_menu_black-ar.png",
+ width: 25.0,
+ height: 25.0)
+ : Image.asset(
+ "assets/images/new-design/arrow_menu_black-en.png",
+ width: 25.0,
+ height: 25.0),
+ ),
+ ],
+ ),
+ (widget.appo.patientStatusType == AppointmentType.BOOKED ||
+ widget.appo.patientStatusType ==
+ AppointmentType.CONFIRMED)
+ ? Container(
+ child: CountdownTimer(
+ controller: new CountdownTimerController(
+ endTime:
+ DateTime.now().millisecondsSinceEpoch +
+ (widget.appo.remaniningHoursTocanPay *
+ 1000) *
+ 60),
+ widgetBuilder: (_, CurrentRemainingTime time) {
+ return time != null
+ ? Text(
+ '${time.days}:${time.hours}:${time.min}:${time.sec} ' +
+ TranslationBase.of(context)
+ .upcomingTimeLeft,
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Color(0xff40ACC9)))
+ : Container();
+ },
+ ),
+ )
+ : Container(),
+ ],
+ ),
),
),
],
diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart
index e64b2906..1e1e81b1 100644
--- a/lib/pages/ToDoList/ToDo.dart
+++ b/lib/pages/ToDoList/ToDo.dart
@@ -11,8 +11,8 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
+import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
-import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@@ -64,11 +64,11 @@ class _ToDoState extends State {
super.initState();
imagesInfo.add(ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/todo/en/0.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png'));
+ 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/todo/ar/0.png'));
int endTime = DateTime.now().millisecondsSinceEpoch + 1000 * 30;
- controller = CountdownTimerController(endTime: endTime,);
+ controller = CountdownTimerController(endTime: endTime);
}
@override
@@ -118,11 +118,15 @@ class _ToDoState extends State {
EdgeInsets.only(left: 10.0, right: 10.0),
child: Text(
DateUtil.getWeekDayMonthDayYearDateFormatted(
- DateUtil.convertStringToDate(widget
- .appoList[index].appointmentDate),
- projectViewModel.isArabic
- ? "ar"
- : "en") + " " + widget.appoList[index].startTime.substring(0, 5),
+ DateUtil.convertStringToDate(
+ widget.appoList[index]
+ .appointmentDate),
+ projectViewModel.isArabic
+ ? "ar"
+ : "en") +
+ " " +
+ widget.appoList[index].startTime
+ .substring(0, 5),
style: TextStyle(fontSize: 10.0)),
),
widget.appoList[index].isLiveCareAppointment
@@ -233,18 +237,26 @@ class _ToDoState extends State {
),
Container(
child: CountdownTimer(
- controller: controller,
+ controller: new CountdownTimerController(
+ endTime: DateTime.now()
+ .millisecondsSinceEpoch +
+ (widget.appoList[index]
+ .remaniningHoursTocanPay *
+ 1000) *
+ 60),
widgetBuilder:
(_, CurrentRemainingTime time) {
- return Text(
- '${time.days}:${time.hours}:${time.min}:${time.sec} ' +
- TranslationBase.of(
- context)
- .upcomingTimeLeft,
- style: TextStyle(
- fontSize: 12.0,
- color:
- Color(0xff40ACC9)));
+ return time != null
+ ? Text(
+ '${time.days}:${time.hours}:${time.min}:${time.sec} ' +
+ TranslationBase.of(
+ context)
+ .upcomingTimeLeft,
+ style: TextStyle(
+ fontSize: 12.0,
+ color: Color(
+ 0xff40ACC9)))
+ : Container();
},
),
),
@@ -525,23 +537,11 @@ class _ToDoState extends State {
});
}
- getToDoCount() {
- toDoProvider.setState(0, true);
- ClinicListService service = new ClinicListService();
- service.getActiveAppointmentNo(context).then((res) {
- print(res['AppointmentActiveNumber']);
- if (res['MessageStatus'] == 1) {
- toDoProvider.setState(res['AppointmentActiveNumber'], true);
- } else {}
- }).catchError((err) {
- print(err);
- });
- }
-
getPatientAppointmentHistory() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getPatientAppointmentHistory(true, context).then((res) {
+ widget.appoList.clear();
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
@@ -551,9 +551,10 @@ class _ToDoState extends State {
widget.appoList
.add(new AppoitmentAllHistoryResultList.fromJson(v));
});
- } else {}
+ } else {
+ Navigator.of(context).popAndPushNamed(HOME);
+ }
});
- getToDoCount();
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart
index fe2a217b..af74836f 100644
--- a/lib/pages/ToDoList/payment_method_select.dart
+++ b/lib/pages/ToDoList/payment_method_select.dart
@@ -218,7 +218,7 @@ class _PaymentMethodState extends State {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
- minWidth: MediaQuery.of(context).size.width * 0.7,
+ minWidth: MediaQuery.of(context).size.height * 0.1,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart
index 6f1d7871..4d511452 100644
--- a/lib/pages/feedback/send_feedback_page.dart
+++ b/lib/pages/feedback/send_feedback_page.dart
@@ -15,7 +15,8 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
-
+import 'dart:convert';
+import 'dart:io';
import 'appointment_history.dart';
class SendFeedbackPage extends StatefulWidget {
@@ -343,11 +344,11 @@ class _SendFeedbackPageState extends State {
),
InkWell(
onTap: () {
- ImageOptions.showImageOptions(context, (String image) {
+ ImageOptions.showImageOptions(context, (String image,File file) {
setState(() {
images.add(image);
});
- });
+ } );
},
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart
index ada758e9..59d68fa2 100644
--- a/lib/pages/feedback/status_feedback_page.dart
+++ b/lib/pages/feedback/status_feedback_page.dart
@@ -17,7 +17,6 @@ class _StatusFeedbackPageState extends State {
@override
Widget build(BuildContext context) {
return BaseView(
- allowAny: true,
onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
diff --git a/lib/pages/insurance/AttachInsuranceCardImageDialog.dart b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart
new file mode 100644
index 00000000..20e17593
--- /dev/null
+++ b/lib/pages/insurance/AttachInsuranceCardImageDialog.dart
@@ -0,0 +1,147 @@
+import 'dart:io';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+class AttachInsuranceCardImageDialog extends StatefulWidget {
+ final String name;
+ final String fileNo;
+ final Function(File file, String image) image;
+
+ const AttachInsuranceCardImageDialog(
+ {Key key, this.name, this.fileNo, this.image})
+ : super(key: key);
+
+ @override
+ _AttachInsuranceCardImageDialogState createState() =>
+ _AttachInsuranceCardImageDialogState();
+}
+
+class _AttachInsuranceCardImageDialogState
+ extends State {
+ @override
+ void initState() {
+ super.initState();
+ }
+
+ String image;
+ File file;
+
+ @override
+ Widget build(BuildContext context) {
+ return SimpleDialog(
+ children: [
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Texts(TranslationBase.of(context).attachInsuraceImage),
+ Divider(),
+ Texts(widget.name),
+ SizedBox(
+ height: 3,
+ ),
+ Texts(TranslationBase.of(context).fileNo + " " + widget.fileNo),
+ SizedBox(
+ height: 5.0,
+ ),
+ InkWell(
+ onTap: () {
+ ImageOptions.showImageOptions(context, (String image,File file) {
+ setState(() {
+ this.image = image;
+ this.file = file;
+ });
+ });
+ },
+ child: image == null
+ ? Padding(
+ padding: const EdgeInsets.all(18.0),
+ child: Container(
+ width: double.maxFinite,
+ height: 250,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(2),
+ border: Border.all(color: Colors.grey, width: 1.5)),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ // mainAxisAlignment: MainAxisAlignment.,
+ children: [
+ SizedBox(height: 25,),
+ Icon(
+ Icons.camera_enhance_rounded,
+ size: 85,
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Icon(Icons.attach_file),
+ Texts(TranslationBase.of(context).selectAttachment.toUpperCase())
+ ],
+ ),
+ ],
+ ),
+ ),
+ )
+ : Image.file(
+ file,
+ fit: BoxFit.fill,
+ height: 250,
+ ),
+ ),
+ SizedBox(
+ height: 25.0,
+ ),
+ Divider(),
+ Row(
+ children: [
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ Navigator.pop(context);
+ },
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Container(
+ child: Center(
+ child: Texts(
+ TranslationBase.of(context).cancel.toUpperCase(),
+ color: Colors.red,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ Container(
+ width: 1,
+ height: 30,
+ color: Colors.grey[500],
+ ),
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ Navigator.pop(context);
+ widget.image(file, image);
+ },
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Center(
+ child: Texts(
+ TranslationBase.of(context).ok,
+ fontWeight: FontWeight.w400,
+ )),
+ ),
+ ),
+ ),
+ ],
+ )
+ ],
+ )
+ ],
+ );
+ }
+}
diff --git a/lib/pages/insurance/insurance_approval_screen.dart b/lib/pages/insurance/insurance_approval_screen.dart
index d81e704e..4566b082 100644
--- a/lib/pages/insurance/insurance_approval_screen.dart
+++ b/lib/pages/insurance/insurance_approval_screen.dart
@@ -26,14 +26,14 @@ class _InsuranceApprovalState extends State {
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/0.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/apporvals/en/0.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/0.png'));
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/apporvals/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/en/1.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/apporvals/en/1.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/apporvals/ar/1.png'));
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/apporvals/ar/1.png'));
return BaseView(
onModelReady: widget.appointmentNo != null
? (model) =>
diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart
index ebd3eada..da59e414 100644
--- a/lib/pages/insurance/insurance_card_screen.dart
+++ b/lib/pages/insurance/insurance_card_screen.dart
@@ -34,9 +34,9 @@ class _InsuranceCardState extends State {
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/en/0.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/insurance-card/en/0.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/insurance-card/ar/0.png'));
+ 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/insurance-card/ar/0.png'));
return BaseView(
onModelReady: (model) => model.getInsurance(),
@@ -44,7 +44,6 @@ class _InsuranceCardState extends State {
AppScaffold(
isShowAppBar: true,
baseViewModel: model,
- image: 'assets/images/medical/insurance_card_icon.png',
appBarTitle: TranslationBase.of(context).insuranceCards,
description: TranslationBase.of(context).infoInsuranceCards,
infoList: TranslationBase.of(context).infoInsuranceCardsPoints,
diff --git a/lib/pages/insurance/insurance_card_update_details.dart b/lib/pages/insurance/insurance_card_update_details.dart
new file mode 100644
index 00000000..5e9db38a
--- /dev/null
+++ b/lib/pages/insurance/insurance_card_update_details.dart
@@ -0,0 +1,346 @@
+import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
+import 'package:diplomaticquarterapp/core/model/insurance/Insurance_card_details.dart';
+import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
+import 'package:diplomaticquarterapp/pages/base/base_view.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
+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:provider/provider.dart';
+import 'AttachInsuranceCardImageDialog.dart';
+
+class InsuranceCardUpdateDetails extends StatelessWidget {
+ final List insuranceCardDetailsModel;
+ final String patientIdentificationID;
+ final int patientID;
+ final String name;
+
+ const InsuranceCardUpdateDetails(
+ {Key key,
+ this.insuranceCardDetailsModel,
+ this.patientIdentificationID,
+ this.patientID,
+ this.name})
+ : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
+ return BaseView(
+ builder: (context, model, w) => AppScaffold(
+ isShowAppBar: true,
+ isShowDecPage: false,
+ appBarTitle: TranslationBase.of(context).cardDetail,
+ body: SingleChildScrollView(
+ child: Column(
+ children: [
+ ...List.generate(
+ insuranceCardDetailsModel.length,
+ (index) => Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Container(
+ width: double.maxFinite,
+ margin: EdgeInsets.only(left: 8, right: 8, top: 8),
+ height: projectViewModel.isArabic ? 320 : 240,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(25),
+ color: Color(0xff515B5D),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ insuranceCardDetailsModel[index].memberID,
+ textScaleFactor: 2.1,
+ style: TextStyle(
+ color: Colors.white,
+ letterSpacing: 8.0,
+ fontWeight: FontWeight.w400,
+ fontSize: 15),
+ ),
+ SizedBox(
+ height: 5,
+ ),
+ Texts(
+ insuranceCardDetailsModel[index].companyName,
+ fontSize: 14,
+ color: Colors.white,
+ ),
+ SizedBox(
+ height: 25,
+ ),
+ Row(
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(
+ TranslationBase.of(context).policyHolder,
+ color: Colors.white,
+ fontSize: 14,
+ ),
+ Texts(
+ insuranceCardDetailsModel[index]
+ .memberName,
+ color: Colors.white,
+ fontSize: 14,
+ ),
+ ],
+ ),
+ ),
+ Expanded(
+ child: Column(
+ children: [
+ Texts(TranslationBase.of(context).policyNo,
+ color: Colors.white),
+ Texts(
+ insuranceCardDetailsModel[index]
+ .policyNumber,
+ color: Colors.white),
+ ],
+ ),
+ ),
+ ],
+ ),
+ SizedBox(
+ height: 25,
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(
+ TranslationBase.of(context)
+ .expiryDateTitle,
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ Texts(
+ insuranceCardDetailsModel[index].dOB,
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ],
+ ),
+ ),
+ Expanded(
+ child: Column(
+ children: [
+ Texts(
+ TranslationBase.of(context).classTitle,
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ Texts(
+ insuranceCardDetailsModel[index]
+ .subCategory,
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ],
+ ),
+ ),
+ Expanded(
+ child: Column(
+ children: [
+ Texts(
+ TranslationBase.of(context).approval,
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ Texts(
+ insuranceCardDetailsModel[index]
+ .approvalLimit
+ .toString(),
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ],
+ ),
+ ),
+ ],
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ if(insuranceCardDetailsModel.isEmpty)
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Container(
+ margin: EdgeInsets.all(10.0),
+ child: Card(
+ margin: EdgeInsets.fromLTRB(
+ 8.0, 16.0, 8.0, 8.0),
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius:
+ BorderRadius.circular(10),
+ ),
+ child: Container(
+ width: MediaQuery.of(context).size.width,
+ padding: EdgeInsets.all(10.0),
+ child: Row(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Expanded(
+ flex: 3,
+ child: Container(
+ margin: EdgeInsets.only(
+ top: 2.0,
+ left: 10.0,
+ right: 20.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment
+ .start,
+ children: [
+ Texts(
+ name,
+ fontSize: 14,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ ),
+ SizedBox(
+ height: 8,
+ ),
+ Texts(
+ TranslationBase.of(
+ context)
+ .fileno +
+ ": " +patientID.toString(),
+ fontSize: 14,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ )
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ SizedBox(height: 150,),
+ Image.asset('assets/images/no-data-found.png',width: 80,height: 80,),
+ SizedBox(height: 8,),
+ Texts(TranslationBase.of(context).noDataAvailable)
+ ],
+ )
+ ],
+ ),
+ ),
+ bottomSheet: Container(
+ width: double.infinity,
+ height:insuranceCardDetailsModel.isEmpty? MediaQuery.of(context).size.height * 0.14:MediaQuery.of(context).size.height * 0.21,
+ child: Container(
+ margin: EdgeInsets.only(left: 8, right: 8),
+ child: Column(
+ children: [
+ SizedBox(
+ height: 8,
+ ),
+ if(insuranceCardDetailsModel.isEmpty)
+ SecondaryButton(
+ textColor: Colors.white,
+ label: TranslationBase.of(context).scanNow.toUpperCase(),
+ color: Theme.of(context).primaryColor,
+ onTap: () async {
+ confirmAttachInsuranceCardImageDialogDialog(
+ context: context,
+ name: name,
+ fileNo: patientID.toString(),
+ model: model);
+ },
+ ),
+ if(insuranceCardDetailsModel.isNotEmpty)
+ SecondaryButton(
+ textColor: Colors.white,
+ label: TranslationBase.of(context).agree.toUpperCase(),
+ color: Theme.of(context).primaryColor,
+ onTap: () async {
+ GifLoaderDialogUtils.showMyDialog(context);
+ await model.uploadInsuranceCard(
+ patientIdentificationID: patientIdentificationID,
+ patientID: patientID);
+ GifLoaderDialogUtils.hideDialog(context);
+ if (model.state == ViewState.ErrorLocal) {
+ AppToast.showErrorToast(message: model.error);
+ } else {
+ AppToast.showSuccessToast(
+ message: TranslationBase.of(context).requestSent);
+ }
+ },
+ ),if(insuranceCardDetailsModel.isNotEmpty)
+ SizedBox(
+ height: 12,
+ ),if(insuranceCardDetailsModel.isNotEmpty)
+ SecondaryButton(
+ textColor: Colors.white,
+ label: TranslationBase.of(context).disagree.toUpperCase(),
+ color: Colors.grey[800],
+ onTap: () async {
+ confirmAttachInsuranceCardImageDialogDialog(
+ context: context,
+ name: name,
+ fileNo: patientID.toString(),
+ model: model);
+ },
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ void confirmAttachInsuranceCardImageDialogDialog(
+ {BuildContext context,
+ String name,
+ String fileNo,
+ InsuranceViewModel model}) {
+ showDialog(
+ context: context,
+ child: AttachInsuranceCardImageDialog(
+ fileNo: fileNo,
+ name: name,
+ image: (file, image) async {
+ GifLoaderDialogUtils.showMyDialog(context);
+ await model.uploadInsuranceCard(
+ patientIdentificationID: patientIdentificationID,
+ patientID: patientID,
+ image: image);
+ GifLoaderDialogUtils.hideDialog(context);
+ if (model.state == ViewState.ErrorLocal ||
+ model.state == ViewState.Error) {
+ AppToast.showErrorToast(message: model.error);
+ } else {
+ AppToast.showSuccessToast(
+ message: TranslationBase.of(context).requestSent);
+ }
+ Navigator.pop(context);
+ },
+ ),
+ );
+ }
+}
diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart
new file mode 100644
index 00000000..f938d9e5
--- /dev/null
+++ b/lib/pages/insurance/insurance_page.dart
@@ -0,0 +1,261 @@
+import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
+import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
+import 'package:diplomaticquarterapp/uitl/app_toast.dart';
+import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
+import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
+import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
+import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+import '../../locator.dart';
+import 'insurance_card_update_details.dart';
+
+class InsurancePage extends StatelessWidget {
+ final InsuranceViewModel model;
+ InsuranceCardService _insuranceCardService = locator();
+
+ InsurancePage({Key key, this.model}) : super(key: key);
+ @override
+ Widget build(BuildContext context) {
+ return SingleChildScrollView(
+ child: Column(
+ children: [
+ SizedBox(
+ height: 65,
+ ),
+ Container(
+ margin: EdgeInsets.all(10.0),
+ color: Colors.white,
+ width: MediaQuery.of(context).size.width,
+ padding: EdgeInsets.all(10.0),
+ child: Row(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ if (model.user != null)
+ Expanded(
+ flex: 3,
+ child: Container(
+ margin: EdgeInsets.only(
+ top: 2.0,
+ left: 10.0,
+ right: 20.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Texts(
+ model.user.firstName ?? '' + " " + model.user.lastName ?? '',
+ fontSize: 14,
+ color: Colors.black,
+ fontWeight: FontWeight.w500,
+ ),
+ SizedBox(
+ height: 8,
+ ),
+ Texts(
+ TranslationBase.of(context)
+ .fileno +
+ ": " +
+ model.user.patientID
+ .toString(),
+ fontSize: 14,
+ color: Colors.black,
+ fontWeight: FontWeight.w500,
+ )
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 2,
+ child: Container(
+ margin: EdgeInsets.only(top: 2.0),
+ child: Column(
+ children: [
+ Container(
+ child: SecondaryButton(
+ label: TranslationBase.of(
+ context)
+ .fetchData,
+ small: true,
+ textColor: Colors.white,
+ onTap: () {
+ getDetails(
+ setupID: '010266',
+ projectID: 15,
+ patientIdentificationID:
+ model.user
+ .patientIdentificationNo,
+ patientID: model
+ .user.patientID,
+ name: model.user
+ .firstName +
+ " " +
+ model
+ .user.lastName,context: context);
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ if(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList != null ?? false)
+ ...List.generate(model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length, (index) =>
+ model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].status == 3
+ ? Container(
+ margin: EdgeInsets.all(10.0),
+ child: Card(
+ margin: EdgeInsets.fromLTRB(
+ 8.0, 16.0, 8.0, 8.0),
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius:
+ BorderRadius.circular(10),
+ ),
+ child: Container(
+ width: MediaQuery.of(context).size.width,
+ padding: EdgeInsets.all(10.0),
+ child: Row(
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Expanded(
+ flex: 3,
+ child: Container(
+ margin: EdgeInsets.only(
+ top: 2.0,
+ left: 10.0,
+ right: 20.0),
+ child: Column(
+ crossAxisAlignment:
+ CrossAxisAlignment
+ .start,
+ children: [
+ Texts(
+ model
+ .getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index]
+ .patientName,
+ fontSize: 14,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ ),
+ SizedBox(
+ height: 8,
+ ),
+ Texts(
+ TranslationBase.of(
+ context)
+ .fileno +
+ ": " +
+ model
+ .getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index]
+ .patientID
+ .toString(),
+ fontSize: 14,
+ color: Colors.black,
+ fontWeight:
+ FontWeight.w500,
+ )
+ ],
+ ),
+ ),
+ ),
+ Expanded(
+ flex: 2,
+ child: Container(
+ margin:
+ EdgeInsets.only(top: 2.0),
+ child: Column(
+ children: [
+ Container(
+ child: SecondaryButton(
+ label: TranslationBase
+ .of(context)
+ .fetchData,
+ small: true,
+ textColor:
+ Colors.white,
+ onTap: () {
+ getDetails(
+ projectID: 15,
+ patientIdentificationID: model
+ .getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index]
+ .patientIdenficationNumber,
+ setupID:
+ '010266',
+ patientID: model
+ .getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index]
+ .responseID,
+ name: model
+ .getAllSharedRecordsByStatusResponse
+ .getAllSharedRecordsByStatusList[
+ index].patientName,context: context);
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ )
+ : Container()
+ ),
+
+ ],
+ ),
+ );
+ }
+
+ getDetails(
+ {String setupID,
+ int projectID,
+ String patientIdentificationID,
+ int patientID,
+ String name,BuildContext context}) {
+ GifLoaderDialogUtils.showMyDialog(context);
+ _insuranceCardService
+ .getPatientInsuranceDetails(
+ setupID: setupID,
+ projectID: projectID,
+ patientID: patientID,
+ patientIdentificationID: patientIdentificationID)
+ .then((value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
+ Navigator.push(
+ context,
+ FadePage(
+ page: InsuranceCardUpdateDetails(
+ insuranceCardDetailsModel: _insuranceCardService.insuranceCardDetailsList,
+ patientID: patientID,
+ patientIdentificationID: patientIdentificationID,
+ name: name,
+ )));
+ } else {
+ AppToast.showErrorToast(message: _insuranceCardService.error);
+ }
+ });
+ }
+}
diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart
index 4e82d244..70a3a302 100644
--- a/lib/pages/insurance/insurance_update_screen.dart
+++ b/lib/pages/insurance/insurance_update_screen.dart
@@ -102,7 +102,7 @@ class _InsuranceUpdateState extends State
controller: _tabController,
children: [
Container(
- child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList != null && model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty
+ child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty
? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,
diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart
index bb562888..7d2cdcdc 100644
--- a/lib/pages/landing/home_page.dart
+++ b/lib/pages/landing/home_page.dart
@@ -26,6 +26,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import '../../widgets/data_display/medical/LabResult/LineChartCurved.dart';
@@ -43,7 +44,6 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State {
ToDoCountProviderModel toDoProvider;
-
AuthenticatedUserObject authenticatedUserObject =
locator();
@@ -54,7 +54,6 @@ class _HomePageState extends State {
return BaseView(
onModelReady: (model) => model.getPatientRadOrders(),
builder: (_, model, wi) => AppScaffold(
-
isShowDecPage: false,
body: Container(
width: double.infinity,
@@ -82,15 +81,19 @@ class _HomePageState extends State {
left: 5,
right: 5,
child: Container(
- width: MediaQuery.of(context).size.width * 0.8,
+ width:
+ MediaQuery.of(context).size.width * 0.8,
child: Container(),
),
)
],
),
-
),
- Container(width: double.infinity, height:projectViewModel.isArabic ? MediaQuery.of(context).size.width * 0.3 :110),
+ Container(
+ width: double.infinity,
+ height: projectViewModel.isArabic
+ ? MediaQuery.of(context).size.width * 0.3
+ : 110),
],
),
Positioned(
@@ -105,7 +108,7 @@ class _HomePageState extends State {
Orientation.landscape
? 0.02
: 0.03),
- child: (!model.isLogin )
+ child: (!model.isLogin)
? Container(
width: double.infinity,
height: 160,
@@ -174,7 +177,6 @@ class _HomePageState extends State {
color: Theme.of(context)
.primaryColor,
fontSize: 14,
-
),
),
),
@@ -208,7 +210,8 @@ class _HomePageState extends State {
children: [
Row(
children: [
- if (model.user != null && model.isLogin)
+ if (projectViewModel.user != null &&
+ model.isLogin)
Expanded(
child: Column(
crossAxisAlignment:
@@ -217,16 +220,34 @@ class _HomePageState extends State {
SizedBox(
height: 8,
),
- Texts(
- model.user.firstName +
- " " +
- model.user.lastName,
- color: Colors.grey[100],
- bold: true,
- fontSize: 15,
+ Row(
+ children: [
+ Texts(
+ projectViewModel.user
+ .firstName +
+ " " +
+ projectViewModel
+ .user.lastName,
+ color: Colors.grey[100],
+ bold: true,
+ fontSize: 15,
+ ),
+ projectViewModel.user
+ .cRSVerificationStatus ==
+ 2
+ ? SvgPicture.asset(
+ 'assets/images/svg/verification_check.svg')
+ : projectViewModel
+ .user
+ .cRSVerificationStatus ==
+ 3
+ ? SvgPicture.asset(
+ 'assets/images/svg/pending.svg')
+ : SizedBox()
+ ],
),
Texts(
- '${model.user.patientID}',
+ '${projectViewModel.user.patientID}',
color: Colors.white,
fontSize: 14,
),
@@ -234,7 +255,7 @@ class _HomePageState extends State {
height: 5,
),
Texts(
- '${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}',
+ '${DateUtil.getMonthDayYearDateFormatted(projectViewModel.user.dateofBirthDataTime)} ,${projectViewModel.user.genderDescription} ${projectViewModel.user.ageDesc}',
color: Colors.grey[100],
fontWeight:
FontWeight.normal,
@@ -266,7 +287,8 @@ class _HomePageState extends State {
),
child: Center(
child: Texts(
- TranslationBase.of(context).myMedicalFile,
+ TranslationBase.of(context)
+ .myMedicalFile,
color: Theme.of(context)
.primaryColor,
fontSize: 12,
@@ -301,7 +323,9 @@ class _HomePageState extends State {
bold: true,
),
Texts(
- TranslationBase.of(context).height,
+ TranslationBase.of(
+ context)
+ .height,
color: Colors.white,
fontSize: 10,
),
@@ -333,7 +357,9 @@ class _HomePageState extends State {
bold: true,
),
Texts(
- TranslationBase.of(context).weight,
+ TranslationBase.of(
+ context)
+ .weight,
color: Colors.white,
fontSize: 10,
)
@@ -347,8 +373,10 @@ class _HomePageState extends State {
),
Expanded(
child: Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment:
+ MainAxisAlignment.start,
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
children: [
Image.asset(
'assets/images/blood-drop.png',
@@ -358,11 +386,16 @@ class _HomePageState extends State {
Column(
children: [
Texts(
- '${model.bloadType}',
+ '${model.booldType}',
color: Colors.white,
+ fontSize: 14,
+ fontWeight:
+ FontWeight.bold,
),
Texts(
- TranslationBase.of(context).bloodType,
+ TranslationBase.of(
+ context)
+ .bloodType,
color: Colors.white,
fontSize: 10,
)
@@ -401,28 +434,35 @@ class _HomePageState extends State {
padding: const EdgeInsets.all(15.0),
child: Column(
children: [
- SizedBox(height: 15,),
-
+ SizedBox(
+ height: 15,
+ ),
Container(
width: 60,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
- borderRadius: BorderRadius.circular(12)
- ),
- child: Center(child: Image.asset('assets/images/vital_sign_icon.png',
+ borderRadius:
+ BorderRadius.circular(12)),
+ child: Center(
+ child: Image.asset(
+ 'assets/images/medical/vital_sign_icon.png',
width: 80,
height: 50,
- fit: BoxFit.contain,)),
+ fit: BoxFit.contain,
+ )),
+ ),
+ SizedBox(
+ height: 20,
),
- SizedBox(height: 20,),
Texts(
- TranslationBase.of(context)
- .vitalSigns,
+ TranslationBase.of(context).vitalSigns,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
- fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
+ fontSize: projectViewModel.isArabic
+ ? SizeConfig.textMultiplier * 1.5
+ : SizeConfig.textMultiplier * 1.7,
)
],
),
@@ -450,26 +490,35 @@ class _HomePageState extends State {
padding: const EdgeInsets.all(15.0),
child: Column(
children: [
- SizedBox(height: 15,),
+ SizedBox(
+ height: 15,
+ ),
Container(
width: 50,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
- borderRadius: BorderRadius.circular(12)
- ),
- child: Center(child: Image.asset('assets/images/search_medicine_icon.png',
+ borderRadius:
+ BorderRadius.circular(12)),
+ child: Center(
+ child: Image.asset(
+ 'assets/images/search_medicine_icon.png',
width: 50,
height: 50,
- fit: BoxFit.contain,)),
+ fit: BoxFit.contain,
+ )),
+ ),
+ SizedBox(
+ height: 20,
),
- SizedBox(height: 20,),
Texts(
TranslationBase.of(context).searchMedicine,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
- fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
+ fontSize: projectViewModel.isArabic
+ ? SizeConfig.textMultiplier * 1.5
+ : SizeConfig.textMultiplier * 1.7,
)
],
),
@@ -481,8 +530,9 @@ class _HomePageState extends State {
),
),
Expanded(
- child: DashboardItem(opacity: 1.0,
- onTap: (){
+ child: DashboardItem(
+ opacity: 1.0,
+ onTap: () {
Navigator.push(
context,
FadePage(
@@ -495,25 +545,35 @@ class _HomePageState extends State {
padding: const EdgeInsets.all(15.0),
child: Column(
children: [
- SizedBox(height: 15,),
+ SizedBox(
+ height: 15,
+ ),
Container(
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.rectangle,
- borderRadius: BorderRadius.circular(12)
- ),
- child: Center(child: Image.asset('assets/images/online_payment_icon.png',
+ borderRadius:
+ BorderRadius.circular(12)),
+ child: Center(
+ child: Image.asset(
+ 'assets/images/online_payment_icon.png',
width: 80,
height: 50,
- fit: BoxFit.contain,)),
+ fit: BoxFit.contain,
+ )),
+ ),
+ SizedBox(
+ height: 15,
),
- SizedBox(height: 15,),
Texts(
- TranslationBase.of(context).onlinePaymentService,
+ TranslationBase.of(context)
+ .onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
- fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7,
+ fontSize: projectViewModel.isArabic
+ ? SizeConfig.textMultiplier * 1.5
+ : SizeConfig.textMultiplier * 1.7,
)
],
),
@@ -527,7 +587,9 @@ class _HomePageState extends State {
],
),
),
- SizedBox(height: 8,),
+ SizedBox(
+ height: 8,
+ ),
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: LineChartSample1(),
@@ -554,18 +616,19 @@ class _HomePageState extends State {
);
},
child: MedicalProfileItem(
- title: TranslationBase.of(context)
- .myAppointments,
+ title:
+ TranslationBase.of(context).myAppointments,
imagePath: 'my_appointment_icon.png',
- subTitle: TranslationBase.of(context).myAppointmentsList,
+ subTitle: TranslationBase.of(context)
+ .myAppointmentsList,
),
),
),
Expanded(
flex: 1,
child: InkWell(
- onTap: () => Navigator.push(context,
- FadePage(page: LabsHomePage())),
+ onTap: () => Navigator.push(
+ context, FadePage(page: LabsHomePage())),
child: MedicalProfileItem(
title: TranslationBase.of(context).lab,
imagePath: 'lab_result_icon.png',
@@ -577,11 +640,10 @@ class _HomePageState extends State {
Expanded(
flex: 1,
child: InkWell(
- onTap: () => Navigator.push(context,
- FadePage(page: RadiologyHomePage())),
+ onTap: () => Navigator.push(
+ context, FadePage(page: RadiologyHomePage())),
child: MedicalProfileItem(
- title: TranslationBase.of(context)
- .radiology,
+ title: TranslationBase.of(context).radiology,
imagePath: 'radiology_icon.png',
subTitle: TranslationBase.of(context)
.radiologySubtitle,
@@ -604,8 +666,7 @@ class _HomePageState extends State {
);
},
child: MedicalProfileItem(
- title: TranslationBase.of(context)
- .medicines,
+ title: TranslationBase.of(context).medicines,
imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context)
.medicinesSubtitle,
@@ -624,8 +685,7 @@ class _HomePageState extends State {
);
},
child: MedicalProfileItem(
- title: TranslationBase.of(context)
- .myDoctor,
+ title: TranslationBase.of(context).myDoctor,
imagePath: 'doctor_icon.png',
subTitle: TranslationBase.of(context)
.myDoctorSubtitle,
@@ -636,12 +696,11 @@ class _HomePageState extends State {
flex: 1,
child: InkWell(
onTap: () {
- Navigator.push(context,
- FadePage(page: InsuranceCard()));
+ Navigator.push(
+ context, FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
- title: TranslationBase.of(context)
- .insurance,
+ title: TranslationBase.of(context).insurance,
imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
.insuranceSubtitle,
@@ -650,7 +709,6 @@ class _HomePageState extends State {
),
],
),
-
],
),
),
@@ -663,7 +721,7 @@ class _HomePageState extends State {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
DashboardItem(
- opacity:1.0,
+ opacity: 1.0,
child: Container(
width: double.infinity,
padding: EdgeInsets.all(10),
@@ -676,7 +734,8 @@ class _HomePageState extends State {
bold: true,
),
Texts(
- TranslationBase.of(context).viewAllHabibMedicalService,
+ TranslationBase.of(context)
+ .viewAllHabibMedicalService,
color: Colors.white,
fontWeight: FontWeight.normal,
fontSize: 10,
@@ -694,13 +753,17 @@ class _HomePageState extends State {
),
height: 112,
imageName: 'ask_doctor_bg.png',
- //color: Colors.grey[700],
+ //color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
onTap: () => Navigator.push(
- context, FadePage(page: AllHabibMedicalService(goToMyProfile: widget.goToMyProfile,))),
+ context,
+ FadePage(
+ page: AllHabibMedicalService(
+ goToMyProfile: widget.goToMyProfile,
+ ))),
),
DashboardItem(
- opacity:1.0,
+ opacity: 1.0,
onTap: () {
Navigator.push(
context, FadePage(page: ContactUsPage()));
@@ -720,7 +783,7 @@ class _HomePageState extends State {
TranslationBase.of(context).viewAllWaysReachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
- fontSize: SizeConfig.textMultiplier * 1.0 ,
+ fontSize: SizeConfig.textMultiplier * 1.0,
),
Expanded(
child: Container(),
diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart
index bb629f6b..68eee783 100644
--- a/lib/pages/landing/landing_page.dart
+++ b/lib/pages/landing/landing_page.dart
@@ -14,6 +14,8 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
+import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'
+ as family;
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
@@ -60,7 +62,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
final authService = new AuthProvider();
var event = RobotProvider();
-
+ var familyFileProvider = family.FamilyFilesProvider();
void _requestIOSPermissions() {
flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
@@ -152,7 +154,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
_firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token);
- if (token != null && await sharedPref.getObject(USER_PROFILE) == null) {
+ if (token != null && projectViewModel.isLogin == false) {
DEVICE_TOKEN = token;
checkUserStatus(token);
} else if (projectViewModel.isLogin) {
@@ -516,14 +518,15 @@ class _LandingPageState extends State with WidgetsBindingObserver {
// );
// themeNotifier.setTheme(defaultTheme);
}
- void checkUserStatus(token) async {
- //GifLoaderDialogUtils.showMyDialog(context);
- authService
- .selectDeviceImei(token)
- .then((SelectDeviceIMEIRES value) => setUserValues(value))
- .catchError((err) {
- //GifLoaderDialogUtils.hideDialog(context);
- });
+ void checkUserStatus(token, {isLoader = true}) async {
+ if (isLoader)
+ //GifLoaderDialogUtils.showMyDialog(context);
+ authService
+ .selectDeviceImei(token)
+ .then((SelectDeviceIMEIRES value) => setUserValues(value))
+ .catchError((err) {
+ //GifLoaderDialogUtils.hideDialog(context);
+ });
}
static Future myBackgroundMessageHandler(
@@ -560,9 +563,25 @@ class _LandingPageState extends State with WidgetsBindingObserver {
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
- Navigator.of(context).pushNamed(
- WELCOME_LOGIN,
- );
+ GifLoaderDialogUtils.showMyDialog(context);
+ authService
+ .selectDeviceImei(DEVICE_TOKEN)
+ .then((SelectDeviceIMEIRES value) {
+ GifLoaderDialogUtils.hideDialog(context);
+ if (value != null) {
+ setUserValues(value);
+ Navigator.of(context).pushNamed(CONFIRM_LOGIN);
+ } else {
+ Navigator.of(context).pushNamed(
+ WELCOME_LOGIN,
+ );
+ }
+ }).catchError((err) {
+ GifLoaderDialogUtils.hideDialog(context);
+ Navigator.of(context).pushNamed(
+ WELCOME_LOGIN,
+ );
+ });
}
}
@@ -587,6 +606,7 @@ class _LandingPageState extends State with WidgetsBindingObserver {
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
});
+ familyFileProvider.getSharedRecordByStatus();
}
}
}
diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart
index a3537e54..8dbf27f4 100644
--- a/lib/pages/login/confirm-login.dart
+++ b/lib/pages/login/confirm-login.dart
@@ -103,127 +103,132 @@ class _ConfirmLogin extends State {
width: SizeConfig.realScreenWidth,
child: Column(
children: [
- Expanded(
- flex: 3,
- child: user != null && isMoreOption == false
- ? Column(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Image.asset(
- 'assets/images/DQ/dq_logo_icon.png',
- height: 90,
- width: 90,
- ),
- AppText(
- TranslationBase.of(context).welcomeBack +
- ' ' +
- user.name,
- fontSize: SizeConfig.textMultiplier * 3.5,
- ),
- AppText(
- TranslationBase.of(context).accountInfo,
- fontSize: SizeConfig.textMultiplier * 2.5,
- ),
- Card(
- color: Colors.grey[300],
- child: Row(
- children: [
- Expanded(
- child: ListTile(
- title: Text(
- TranslationBase.of(context).lastLoginAt,
- textAlign: TextAlign.center,
- ),
- subtitle: Text(
- user.editedOn != null
+ user != null && isMoreOption == false
+ ? Column(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Image.asset(
+ 'assets/images/DQ/dq_logo_icon.png',
+ height: 90,
+ width: 90,
+ ),
+ AppText(
+ TranslationBase.of(context).welcomeBack +
+ ' ' +
+ user.name,
+ fontSize: SizeConfig.textMultiplier * 3.5,
+ ),
+ SizedBox(
+ height: 20,
+ ),
+ AppText(
+ TranslationBase.of(context).accountInfo,
+ fontSize: SizeConfig.textMultiplier * 2.5,
+ ),
+ SizedBox(
+ height: 20,
+ ),
+ Card(
+ color: Colors.grey[300],
+ child: Row(
+ children: [
+ Flexible(
+ child: ListTile(
+ title: Text(
+ TranslationBase.of(context).lastLoginAt,
+ textAlign: TextAlign.center,
+ overflow: TextOverflow.ellipsis,
+ ),
+ subtitle: Text(
+ user.editedOn != null
+ ? formatDate(
+ DateUtil.convertStringToDate(
+ user.editedOn))
+ : user.createdOn != null
? formatDate(
DateUtil.convertStringToDate(
- user.editedOn))
+ user.createdOn))
: '--',
- textAlign: TextAlign.center),
- )),
- Expanded(
- child: ListTile(
- title: Text(
- TranslationBase.of(context)
- .lastLoginWith,
- textAlign: TextAlign.center),
- subtitle: Text(
- getType(user.logInType, context),
- textAlign: TextAlign.center),
- ))
- ],
+ overflow: TextOverflow.ellipsis,
+ textAlign: TextAlign.center),
+ )),
+ Flexible(
+ child: ListTile(
+ title: Text(
+ TranslationBase.of(context).lastLoginWith,
+ overflow: TextOverflow.ellipsis,
+ textAlign: TextAlign.center),
+ subtitle: Text(
+ getType(user.logInType, context),
+ overflow: TextOverflow.ellipsis,
+ textAlign: TextAlign.center),
))
- ],
- )
- : Column(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Image.asset(
- 'assets/images/DQ/dq_logo_icon.png',
- height: 90,
- width: 90,
- ),
- this.onlySMSBox == false
- ? AppText(
- TranslationBase.of(context)
- .verifyLoginWith,
- fontSize: SizeConfig.textMultiplier * 3.5,
- textAlign: TextAlign.left,
- )
- : AppText(
- TranslationBase.of(context)
- .verifyFingerprint2,
- fontSize: SizeConfig.textMultiplier * 2.5,
- textAlign: TextAlign.start,
- ),
- ])),
+ ],
+ )),
+ ],
+ )
+ : Column(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Image.asset(
+ 'assets/images/DQ/dq_logo_icon.png',
+ height: 90,
+ width: 90,
+ ),
+ this.onlySMSBox == false
+ ? AppText(
+ TranslationBase.of(context).verifyLoginWith,
+ fontSize: SizeConfig.textMultiplier * 3.5,
+ textAlign: TextAlign.left,
+ )
+ : AppText(
+ TranslationBase.of(context)
+ .verifyFingerprint2,
+ fontSize: SizeConfig.textMultiplier * 2.5,
+ textAlign: TextAlign.start,
+ ),
+ ]),
user != null && isMoreOption == false
- ? Expanded(
- flex: 2,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: InkWell(
- onTap: () => {
- authenticateUser(
- 3, BiometricType.face.index)
- },
- child: getButton(user.logInType))),
- Expanded(child: getButton(5))
- ])
- ]))
- : Expanded(
- flex: 4,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- onlySMSBox == false
- ? Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(child: getButton(3)),
- Expanded(child: getButton(2))
- ],
- )
- : SizedBox(),
- Row(
+ ? Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
- Expanded(child: getButton(1)),
- Expanded(child: getButton(4))
- ],
- ),
- ]),
- ),
+ Expanded(
+ child: InkWell(
+ onTap: () => {
+ authenticateUser(
+ 3, BiometricType.face.index)
+ },
+ child: getButton(user.logInType))),
+ Expanded(child: getButton(5))
+ ])
+ ])
+ : Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ onlySMSBox == false
+ ? Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(child: getButton(3)),
+ Expanded(child: getButton(2))
+ ],
+ )
+ : SizedBox(),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(child: getButton(1)),
+ Expanded(child: getButton(4))
+ ],
+ ),
+ ]),
Expanded(
flex: 1,
child: Column(
@@ -540,6 +545,9 @@ class _ConfirmLogin extends State {
.catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
+ Future.delayed(Duration(seconds: 1), () {
+ AppToast.showErrorToast(message: err);
+ });
});
}
@@ -573,10 +581,14 @@ class _ConfirmLogin extends State {
});
}
- goToHome() {
+ goToHome() async {
+ await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
+ projectViewModel.user = authenticatedUserObject.user;
+ Provider.of(context, listen: false)
+ .setUser(authenticatedUserObject.user);
getToDoCount();
appointmentRateViewModel
.getIsLastAppointmentRatedList()
@@ -621,10 +633,11 @@ class _ConfirmLogin extends State {
return InkWell(
onTap: () => {authenticateUser(4, true)},
child: RoundedContainer(
+ height: 140,
borderColor: Colors.grey,
showBorder: true,
child: Padding(
- padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
+ padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
child: Column(
children: [
Image.asset(
@@ -647,10 +660,11 @@ class _ConfirmLogin extends State {
return InkWell(
onTap: () => {authenticateUser(1, true)},
child: RoundedContainer(
+ height: 140,
borderColor: Colors.grey,
showBorder: true,
child: Padding(
- padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
+ padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -659,12 +673,19 @@ class _ConfirmLogin extends State {
height: SizeConfig.imageSizeMultiplier * 13,
width: SizeConfig.imageSizeMultiplier * 16,
),
- SizedBox(
- height: 20,
- ),
+ projectViewModel.isArabic
+ ? SizedBox(
+ height: 20,
+ )
+ : SizedBox(
+ height: 20,
+ ),
AppText(
TranslationBase.of(context).verifySMS,
- fontSize: SizeConfig.textMultiplier * 2,
+ fontSize: projectViewModel.isArabic
+ ? SizeConfig.textMultiplier * 1.8
+ : SizeConfig.textMultiplier * 2,
+ textAlign: TextAlign.center,
)
],
),
@@ -674,13 +695,14 @@ class _ConfirmLogin extends State {
return InkWell(
onTap: () => {authenticateUser(2, BiometricType.fingerprint.index)},
child: RoundedContainer(
+ height: 140,
backgroundColor: BiometricType.fingerprint.index == 1
? Colors.white
: Colors.white.withOpacity(.7),
borderColor: Colors.grey,
showBorder: true,
child: Padding(
- padding: EdgeInsets.fromLTRB(25, 10, 25, 10),
+ padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
child: Column(
children: [
Image.asset(
@@ -703,13 +725,14 @@ class _ConfirmLogin extends State {
return InkWell(
onTap: () => {authenticateUser(3, BiometricType.face.index)},
child: RoundedContainer(
+ height: 140,
backgroundColor: checkIfBiometricAvailable(BiometricType.face)
? Colors.white
: Colors.white.withOpacity(.7),
borderColor: Colors.grey,
showBorder: true,
child: Padding(
- padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
+ padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -738,13 +761,14 @@ class _ConfirmLogin extends State {
})
},
child: RoundedContainer(
+ height: 140,
backgroundColor: BiometricType.fingerprint.index == 1
? Colors.white
: Colors.white.withOpacity(.7),
borderColor: Colors.grey,
showBorder: true,
child: Padding(
- padding: EdgeInsets.fromLTRB(0, 0, 0, 5),
+ padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
child: Column(
children: [
Image.asset(
@@ -752,9 +776,13 @@ class _ConfirmLogin extends State {
height: SizeConfig.imageSizeMultiplier * 13,
width: SizeConfig.imageSizeMultiplier * 16,
),
- SizedBox(
- height: 20,
- ),
+ projectViewModel.isArabic
+ ? SizedBox(
+ height: 15,
+ )
+ : SizedBox(
+ height: 10,
+ ),
AppText(
TranslationBase.of(context).moreVerification,
fontSize: SizeConfig.textMultiplier * 2,
diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart
index 46f52280..5c4b3406 100644
--- a/lib/pages/login/login.dart
+++ b/lib/pages/login/login.dart
@@ -99,6 +99,7 @@ class _Login extends State {
textDirection: TextDirection.ltr,
child: Container(
child: TextFields(
+ keyboardType: TextInputType.number,
fontWeight: FontWeight.normal,
controller: nationalIDorFile,
onChanged: (value) => {validateForm()},
@@ -240,50 +241,49 @@ class _Login extends State {
request['PatientID'] = int.parse(nationalIDorFile.text);
}
// request.isRegister = false;
- this.authService.checkActivationCode(request, code).then((result) async{
- sharedPref.remove(FAMILY_FILE);
- result = CheckActivationCode.fromJson(result);
- result.list.isFamily = false;
- // this.sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']),
- this.sharedPref.setObject(USER_PROFILE, result.list);
- this.sharedPref.setObject(MAIN_USER, result.list);
- this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
- this.sharedPref.setString(TOKEN, result.authenticationTokenID);
- await authenticatedUserObject.getUser(getUser: true);
- authenticatedUserObject.isLogin = true;
- appointmentRateViewModel.isLogin = true;
- projectViewModel.isLogin = true;
- projectViewModel.user = authenticatedUserObject.user;
- appointmentRateViewModel
- .getIsLastAppointmentRatedList()
- .then((value) => {
- getToDoCount(),
- GifLoaderDialogUtils.hideDialog(context),
- if (appointmentRateViewModel.isHaveAppointmentNotRate)
- {
- Navigator.pushAndRemoveUntil(
- context,
- FadePage(
- page: RateAppointmentDoctor(),
- ),
- (r) => false)
- }
- else
- {
- Navigator.pushAndRemoveUntil(
- context,
- FadePage(
- page: LandingPage(),
- ),
- (r) => false)
- }
- })
- .catchError((err) {
- print(err);
- GifLoaderDialogUtils.hideDialog(context);
- });
-
- });
+ this.authService.checkActivationCode(request, code).then((result) async {
+ sharedPref.remove(FAMILY_FILE);
+ result = CheckActivationCode.fromJson(result);
+ result.list.isFamily = false;
+ // this.sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']),
+ this.sharedPref.setObject(USER_PROFILE, result.list);
+ this.sharedPref.setObject(MAIN_USER, result.list);
+ this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
+ this.sharedPref.setString(TOKEN, result.authenticationTokenID);
+ await authenticatedUserObject.getUser(getUser: true);
+ authenticatedUserObject.isLogin = true;
+ appointmentRateViewModel.isLogin = true;
+ projectViewModel.isLogin = true;
+ projectViewModel.user = authenticatedUserObject.user;
+ appointmentRateViewModel
+ .getIsLastAppointmentRatedList()
+ .then((value) => {
+ getToDoCount(),
+ GifLoaderDialogUtils.hideDialog(context),
+ if (appointmentRateViewModel.isHaveAppointmentNotRate)
+ {
+ Navigator.pushAndRemoveUntil(
+ context,
+ FadePage(
+ page: RateAppointmentDoctor(),
+ ),
+ (r) => false)
+ }
+ else
+ {
+ Navigator.pushAndRemoveUntil(
+ context,
+ FadePage(
+ page: LandingPage(),
+ ),
+ (r) => false)
+ }
+ })
+ .catchError((err) {
+ print(err);
+ GifLoaderDialogUtils.hideDialog(context);
+ });
+ });
}
getToDoCount() {
diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart
index 4ede2683..4eb06c6e 100644
--- a/lib/pages/login/register-info.dart
+++ b/lib/pages/login/register-info.dart
@@ -52,9 +52,9 @@ class _RegisterInfo extends State {
String location = '1';
AuthenticatedUserObject authenticatedUserObject =
- locator();
+ locator();
AppointmentRateViewModel appointmentRateViewModel =
- locator();
+ locator();
ProjectViewModel projectViewModel;
@override
@@ -291,36 +291,35 @@ class _RegisterInfo extends State {
dynamic request = getTempUserRequest();
GifLoaderDialogUtils.showMyDialog(context);
this.authService.registerUser(request).then((result) => {
- GifLoaderDialogUtils.hideDialog(context),
+ GifLoaderDialogUtils.hideDialog(context),
// userData = result.list;
//AuthenticatedUser.fromJson(result['List'][0]),
- if(result is String){
- new ConfirmDialog(
- context: context,
- confirmMessage: result,
- okText: TranslationBase.of(context).ok,
- cancelText: TranslationBase.of(context).cancel_nocaps,
- okFunction: () => {
- ConfirmDialog.closeAlertDialog(context)
- },
- cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)})
- .showAlertDialog(context)
-
- }else
- {
- sharedPref.remove(FAMILY_FILE),
- result['List'][0]['IsFamily'] = false,
- sharedPref.setObject(USER_PROFILE, result['List'][0]),
- this.sharedPref.setObject(MAIN_USER, result['List'][0]),
- sharedPref.setObject(LOGIN_TOKEN_ID, result["LogInTokenID"]),
- sharedPref.setString(TOKEN, result["AuthenticationTokenID"]),
- authenticatedUserObject.isLogin = true,
- appointmentRateViewModel.isLogin = true,
- projectViewModel.isLogin = true,
-
- Navigator.of(context).pushNamed(HOME),
- AppToast.showSuccessToast(message: result["ErrorEndUserMessage"])
- }
+ if (result is String)
+ {
+ new ConfirmDialog(
+ context: context,
+ confirmMessage: result,
+ okText: TranslationBase.of(context).ok,
+ cancelText: TranslationBase.of(context).cancel_nocaps,
+ okFunction: () => {ConfirmDialog.closeAlertDialog(context)},
+ cancelFunction: () => {
+ ConfirmDialog.closeAlertDialog(context)
+ }).showAlertDialog(context)
+ }
+ else
+ {
+ sharedPref.remove(FAMILY_FILE),
+ result['List'][0]['IsFamily'] = false,
+ sharedPref.setObject(USER_PROFILE, result['List'][0]),
+ this.sharedPref.setObject(MAIN_USER, result['List'][0]),
+ sharedPref.setObject(LOGIN_TOKEN_ID, result["LogInTokenID"]),
+ sharedPref.setString(TOKEN, result["AuthenticationTokenID"]),
+ authenticatedUserObject.isLogin = true,
+ appointmentRateViewModel.isLogin = true,
+ projectViewModel.isLogin = true,
+ Navigator.of(context).pushNamed(HOME),
+ AppToast.showSuccessToast(message: result["ErrorEndUserMessage"])
+ }
});
// .catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
@@ -366,12 +365,16 @@ class _RegisterInfo extends State {
"PatientIdentificationNo": registerInfo.idNumber,
"MobileNumber": registerd_data.patientMobileNumber,
"PatientOutSA": registerd_data.zipCode == '966' ? 0 : 1,
- "FirstNameN":registerInfo.firstNameAr =='-' ?"": registerInfo.firstNameAr,
- "FirstName": registerInfo.firstNameEn =='-' ?"":registerInfo.firstNameEn,
- "MiddleNameN":registerInfo.secondNameAr,
- "MiddleName":registerInfo.secondNameEn,
- "LastNameN": registerInfo.lastNameAr =='-'? "" : registerInfo.lastNameAr,
- "LastName": registerInfo.lastNameEn =='-' ? "": registerInfo.lastNameEn,
+ "FirstNameN":
+ registerInfo.firstNameAr == '-' ? "" : registerInfo.firstNameAr,
+ "FirstName":
+ registerInfo.firstNameEn == '-' ? "" : registerInfo.firstNameEn,
+ "MiddleNameN": registerInfo.secondNameAr,
+ "MiddleName": registerInfo.secondNameEn,
+ "LastNameN":
+ registerInfo.lastNameAr == '-' ? "" : registerInfo.lastNameAr,
+ "LastName":
+ registerInfo.lastNameEn == '-' ? "" : registerInfo.lastNameEn,
"StrDateofBirth": registerInfo.dateOfBirth,
"DateofBirth": DateUtil.convertISODateToJsonDate(
registerInfo.dateOfBirth.replaceAll('/', '-')),
@@ -386,6 +389,7 @@ class _RegisterInfo extends State {
: registerInfo.maritalStatusCode == 'M'
? '1'
: '2',
+ "eHealthIDField": registerInfo.healthId
},
"PatientIdentificationID": registerInfo.idNumber,
"PatientMobileNumber": registerd_data.patientMobileNumber,
diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart
index 9245d6c3..34337411 100644
--- a/lib/pages/login/register.dart
+++ b/lib/pages/login/register.dart
@@ -50,135 +50,136 @@ class _Register extends State {
isShowAppBar: true,
isShowDecPage: false,
body: SingleChildScrollView(
- child: Container(
- padding:
- EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
- height: SizeConfig.realScreenHeight * .9,
- width: SizeConfig.realScreenWidth,
- child: Column(children: [
- Expanded(
- flex: 1,
- child: AppText(
- TranslationBase.of(context).enterNationalId,
- fontSize: SizeConfig.textMultiplier * 3,
- textAlign: TextAlign.left,
- )),
- Expanded(
- flex: 4,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- MobileNo(
- onNumberChange: (value) =>
- {mobileNo = value, validateForm()},
- onCountryChange: (value) => countryCode = value),
- Directionality(
- textDirection:TextDirection.ltr,child:Container(
- child: TextFields(
- controller: nationalIDorFile,
- onChanged: (value) => validateForm(),
- prefixIcon:
- Icon(Icons.chrome_reader_mode, color: Color(0xFF40ACC9)),
- padding: EdgeInsets.only(
- top: 20, bottom: 20, left: 10, right: 10),
- hintText: TranslationBase.of(context).nationalID,
- ))),
- Row(
+ child: Container(
+ padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30),
+ height: SizeConfig.realScreenHeight * .9,
+ width: SizeConfig.realScreenWidth,
+ child: Column(children: [
+ Expanded(
+ flex: 1,
+ child: AppText(
+ TranslationBase.of(context).enterNationalId,
+ fontSize: SizeConfig.textMultiplier * 3,
+ textAlign: TextAlign.left,
+ )),
+ Expanded(
+ flex: 4,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ MobileNo(
+ onNumberChange: (value) =>
+ {mobileNo = value, validateForm()},
+ onCountryChange: (value) => countryCode = value),
+ Directionality(
+ textDirection: TextDirection.ltr,
+ child: Container(
+ child: TextFields(
+ controller: nationalIDorFile,
+ onChanged: (value) => validateForm(),
+ keyboardType: TextInputType.number,
+ prefixIcon: Icon(Icons.chrome_reader_mode,
+ color: Color(0xFF40ACC9)),
+ padding: EdgeInsets.only(
+ top: 20, bottom: 20, left: 10, right: 10),
+ hintText: TranslationBase.of(context).nationalID,
+ ))),
+ Row(
+ children: [
+ Expanded(
+ child: Row(
children: [
- Expanded(
- child: Row(
- children: [
- Radio(
- value: 1,
- groupValue: isHijri,
- onChanged: (value) {
- setState(() {
- isHijri = value;
- });
- validateForm();
- },
- ),
- Text(TranslationBase.of(context).hijriDate),
- ],
- ),
+ Radio(
+ value: 1,
+ groupValue: isHijri,
+ onChanged: (value) {
+ setState(() {
+ isHijri = value;
+ });
+ validateForm();
+ },
),
- Expanded(
- child: Row(
- children: [
- Radio(
- value: 0,
- groupValue: isHijri,
- onChanged: (value) {
- setState(() {
- isHijri = value;
- });
- validateForm();
- },
- ),
- Text(TranslationBase.of(context)
- .gregorianDate),
- ],
- ),
+ Text(TranslationBase.of(context).hijriDate),
+ ],
+ ),
+ ),
+ Expanded(
+ child: Row(
+ children: [
+ Radio(
+ value: 0,
+ groupValue: isHijri,
+ onChanged: (value) {
+ setState(() {
+ isHijri = value;
+ });
+ validateForm();
+ },
),
+ Text(TranslationBase.of(context).gregorianDate),
],
),
- Row(
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- Container(
+ ),
+ ],
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ Container(
width: SizeConfig.realScreenWidth * .9,
- height:60,
- child: isHijri == 1
- ? TextFields(
- onChanged: (value) => {dob = value},
- hintText: 'DD/MM/YYYY',
- prefixIcon: Icon(Icons.date_range),
- )
- : RaisedButton.icon(
- shape: RoundedRectangleBorder(
+ height: 60,
+ child: isHijri == 1
+ ? TextFields(
+ onChanged: (value) => {dob = value},
+ hintText: 'DD/MM/YYYY',
+ prefixIcon: Icon(Icons.date_range),
+ )
+ : RaisedButton.icon(
+ shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
-
- ),
- color:Colors.white,
- onPressed: () => {
- if (isHijri != null)
- _selectDate(context)
- },
- icon: Icon(Icons.date_range),
- label: Text(selectedDate != null
- ? "${selectedDate.toLocal()}"
- .split(' ')[0]
- : TranslationBase.of(context).dob)))
- ])
+ ),
+ color: Colors.white,
+ onPressed: () => {
+ if (isHijri != null)
+ _selectDate(context)
+ },
+ icon: Icon(Icons.date_range),
+ label: Text(selectedDate != null
+ ? "${selectedDate.toLocal()}"
+ .split(' ')[0]
+ : TranslationBase.of(context).dob)))
+ ])
+ ],
+ ),
+ ),
+ Expanded(
+ flex: 2,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ Divider(
+ color: Colors.grey,
+ height: 2,
+ ),
+ SizedBox(
+ height: 10,
+ ),
+ Row(
+ children: [
+ Expanded(
+ child: DefaultButton(
+ TranslationBase.of(context).registerNow,
+ () => {startRegistration()},
+ textColor: Colors.white,
+ color: isButtonDisabled == true
+ ? Colors.grey
+ : Colors.grey[900]))
],
),
- ),
- Expanded(
- flex: 2,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- Divider(
- color: Colors.grey,
- height: 2,
- ),
- SizedBox(height: 10,),
- Row(
- children: [
- Expanded(
- child: DefaultButton(
- TranslationBase.of(context).registerNow,
- () => {startRegistration()},
- textColor: Colors.white,
- color: isButtonDisabled == true
- ? Colors.grey
- : Colors.grey[900]))
- ],
- ),
- ],
- ))
- ]),
- )));
+ ],
+ ))
+ ]),
+ )));
}
Future _selectDate(BuildContext context) async {
@@ -216,7 +217,8 @@ class _Register extends State {
this
.authService
.checkPatientForRegisteration(request)
- .then((response) => {checkUserStatus(response, request)}).catchError((err) {
+ .then((response) => {checkUserStatus(response, request)})
+ .catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog(
context: context,
@@ -224,15 +226,13 @@ class _Register extends State {
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {
- ConfirmDialog.closeAlertDialog(context),
- Navigator.of(context).pushNamed(
- REGISTER,
- ),
-
- },
+ ConfirmDialog.closeAlertDialog(context),
+ Navigator.of(context).pushNamed(
+ REGISTER,
+ ),
+ },
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
dialog.showAlertDialog(context);
-
});
}
@@ -257,7 +257,7 @@ class _Register extends State {
var nRequest = request.toJson();
nRequest['LogInTokenID'] = response['LogInTokenID'];
if (response['hasFile'] == true) {
- // AppToast.showErrorToast(message: response['ErrorEndUserMessage']);
+ // AppToast.showErrorToast(message: response['ErrorEndUserMessage']);
AlertDialogBox(
context: context,
confirmMessage: response['ErrorEndUserMessage'],
@@ -308,7 +308,7 @@ class _Register extends State {
request.isHijri = isHijri;
request.patientOutSA = countryCode == '966' ? 0 : 1;
this.authService.checkUserStatus(request).then((result) => {
- GifLoaderDialogUtils.hideDialog(context),
+ GifLoaderDialogUtils.hideDialog(context),
if (result is Map)
{
result = CheckUserStatusResponse.fromJson(result),
diff --git a/lib/pages/medical/allergies_page.dart b/lib/pages/medical/allergies_page.dart
index 459ef0f8..4a3e5872 100644
--- a/lib/pages/medical/allergies_page.dart
+++ b/lib/pages/medical/allergies_page.dart
@@ -11,7 +11,7 @@ class AllergiesPage extends StatelessWidget {
List imagesInfo = List();
@override
Widget build(BuildContext context) {
- imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/alllergies/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/alllergies/ar/0.png'));
+ imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/alllergies/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/alllergies/ar/0.png'));
return BaseView(
onModelReady: (model) => model.getAllergies(),
builder: (_, model, w) => AppScaffold(
diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart
index 85a0cc8f..9958d6a5 100644
--- a/lib/pages/medical/balance/advance_payment_page.dart
+++ b/lib/pages/medical/balance/advance_payment_page.dart
@@ -58,9 +58,9 @@ class _AdvancePaymentPageState extends State {
getAuthUser();
imagesInfo.add(ImagesInfo(
imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/en/0.png',
+ 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/advance-payment/en/0.png',
imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/images-info-home/advance-payment/ar/0.png'));
+ 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/advance-payment/ar/0.png'));
}
@override
@@ -214,6 +214,7 @@ class _AdvancePaymentPageState extends State {
SizedBox(
height: 12,
),
+ if(model.user!=null)
NewTextFields(
hintText: TranslationBase.of(context).depositorEmail,
initialValue: model.user.emailAddress,
@@ -236,7 +237,7 @@ class _AdvancePaymentPageState extends State {
),
),
bottomSheet: Container(
- height: MediaQuery.of(context).size.height * 0.1,
+ height: MediaQuery.of(context).size.height * 0.13,
width: double.infinity,
padding: EdgeInsets.all(12),
child: SecondaryButton(
diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart
index 679a16db..8a69bf5d 100644
--- a/lib/pages/medical/balance/confirm_payment_page.dart
+++ b/lib/pages/medical/balance/confirm_payment_page.dart
@@ -156,11 +156,12 @@ class ConfirmPaymentPage extends StatelessWidget {
),
),
bottomSheet: Container(
- height: MediaQuery.of(context).size.height * 0.1,
+ height: MediaQuery.of(context).size.height * 0.13,
width: double.infinity,
padding: EdgeInsets.all(12),
child: SecondaryButton(
textColor: Colors.white,
+ color: Theme.of(context).primaryColor,
label: TranslationBase.of(context).confirm.toUpperCase(),
disabled: model.state == ViewState.Busy,
onTap: () {
diff --git a/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart b/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart
index 10d61f68..380f250c 100644
--- a/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart
+++ b/lib/pages/medical/balance/dialogs/ConfirmSMSDialog.dart
@@ -175,7 +175,7 @@ class _ConfirmSMSDialogState extends State {
fontSize: SizeConfig.textMultiplier * 3,
),
focusNode: focusD1,
- maxLength: 1,
+ //maxLength: 1,
controller: digit1,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
@@ -200,7 +200,7 @@ class _ConfirmSMSDialogState extends State {
focusNode: focusD2,
controller: digit2,
textInputAction: TextInputAction.next,
- maxLength: 1,
+ //maxLength: 1,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 3,
@@ -227,7 +227,7 @@ class _ConfirmSMSDialogState extends State {
focusNode: focusD3,
controller: digit3,
textInputAction: TextInputAction.next,
- maxLength: 1,
+ //maxLength: 1,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 3,
@@ -253,7 +253,7 @@ class _ConfirmSMSDialogState extends State {
child: TextFormField(
focusNode: focusD4,
controller: digit4,
- maxLength: 1,
+ // maxLength: 1,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: SizeConfig.textMultiplier * 3,
diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart
index 50bb2dea..cdedf786 100644
--- a/lib/pages/medical/balance/my_balance_page.dart
+++ b/lib/pages/medical/balance/my_balance_page.dart
@@ -18,7 +18,7 @@ class MyBalancePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
- imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/ar/0.png'));
+ imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/my-balance/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/images-info-home/my-balance/ar/0.png'));
return BaseView(
onModelReady: (model) => model.getPatientAdvanceBalanceAmount(),
builder: (_, model, w) => AppScaffold(
@@ -27,55 +27,26 @@ class MyBalancePage extends StatelessWidget {
appBarTitle: TranslationBase.of(context).myBalances,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMyBalance,
- body: Container(
- margin: EdgeInsets.all(12),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Texts(
- TranslationBase.of(context).balanceAmount,
- color: Colors.black,
- bold: true,
- ),
- SizedBox(
- height: 15,
- ),
- Container(
- padding: EdgeInsets.all(8),
- width: double.infinity,
- height: 65,
- decoration: BoxDecoration(
- color: Theme.of(context).primaryColor,
- shape: BoxShape.rectangle,
- borderRadius: BorderRadius.circular(7),
+ body: SingleChildScrollView(
+ child: Container(
+ margin: EdgeInsets.all(12),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Texts(
+ TranslationBase.of(context).balanceAmount,
+ color: Colors.black,
+ bold: true,
),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
-
- Texts(
- '${model.totalAdvanceBalanceAmount ?? 0} '+ TranslationBase.of(context).sar,
- color: Colors.white,
- bold: true,
- ),
- Texts(
- TranslationBase.of(context).totalBalance,
- color: Colors.white,
- ),
- ],
+ SizedBox(
+ height: 15,
),
- ),
- SizedBox(
- height: 9,
- ),
- ...List.generate(
- model.patientAdvanceBalanceAmountList.length,
- (index) => Container(
+ Container(
padding: EdgeInsets.all(8),
+ width: double.infinity,
height: 65,
- margin: EdgeInsets.only(top: 8),
decoration: BoxDecoration(
- color: Colors.white,
+ color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7),
),
@@ -84,20 +55,53 @@ class MyBalancePage extends StatelessWidget {
children: [
Texts(
- '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} '+TranslationBase.of(context).sar,
+ '${model.totalAdvanceBalanceAmount ?? 0} '+ TranslationBase.of(context).sar,
+ color: Colors.white,
bold: true,
),
- Texts(model.patientAdvanceBalanceAmountList[index]
- .projectDescription),
+ Texts(
+ TranslationBase.of(context).totalBalance,
+ color: Colors.white,
+ ),
],
),
),
- ),
- ],
+ SizedBox(
+ height: 9,
+ ),
+ ...List.generate(
+ model.patientAdvanceBalanceAmountList.length,
+ (index) => Container(
+ padding: EdgeInsets.all(8),
+ height: 65,
+ margin: EdgeInsets.only(top: 8),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ shape: BoxShape.rectangle,
+ borderRadius: BorderRadius.circular(7),
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+
+ Texts(
+ '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} '+TranslationBase.of(context).sar,
+ bold: true,
+ ),
+ Texts(model.patientAdvanceBalanceAmountList[index]
+ .projectDescription),
+ ],
+ ),
+ ),
+ ),
+ SizedBox(height: MediaQuery.of(context).size.height * 0.13 ,)
+ ],
+ ),
),
),
bottomSheet: Container(
- height: MediaQuery.of(context).size.height * 0.1,
+ height: MediaQuery.of(context).size.height * 0.12,
+ color: Colors.white,
width: double.infinity,
padding: EdgeInsets.all(12),
child: SecondaryButton(
diff --git a/lib/pages/medical/doctor/doctor_home_page.dart b/lib/pages/medical/doctor/doctor_home_page.dart
index 6a03b58b..7a01eced 100644
--- a/lib/pages/medical/doctor/doctor_home_page.dart
+++ b/lib/pages/medical/doctor/doctor_home_page.dart
@@ -19,8 +19,8 @@ class DoctorHomePage extends StatelessWidget {
List imagesInfo = List();
@override
Widget build(BuildContext context) {
- imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/ar/0.png'));
- imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-doctor/ar/1.png'));
+ imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-doctor/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-doctor/ar/0.png'));
+ imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-doctor/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-doctor/ar/1.png'));
return BaseView(
onModelReady: (model) => model.getMyDoctor(),
builder: (context, MyDoctorViewModel model, widget) => AppScaffold(
@@ -48,7 +48,7 @@ class DoctorHomePage extends StatelessWidget {
leading: Radio(
value: FilterType.Clinic,
groupValue: model.filterType,
- activeColor: Colors.red[800],
+ activeColor:Theme.of(context).primaryColor,
onChanged: (FilterType value) {
model.setFilterType(value);
},
@@ -65,7 +65,7 @@ class DoctorHomePage extends StatelessWidget {
leading: Radio(
value: FilterType.Hospital,
groupValue: model.filterType,
- activeColor: Colors.red[800],
+ activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) =>
model.setFilterType(value),
),
diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart
index 96356a0f..0b3695a0 100644
--- a/lib/pages/medical/labs/labs_home_page.dart
+++ b/lib/pages/medical/labs/labs_home_page.dart
@@ -21,7 +21,7 @@ class LabsHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
- imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/ar/0.png'));
+ imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-lab/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/my-lab/ar/0.png'));
return BaseView(
onModelReady: (model) => model.getLabs(),
builder: (context, LabsViewModel model, widget) => AppScaffold(
@@ -97,6 +97,7 @@ class LabsHomePage extends StatelessWidget {
billNo: ' ${labOrder.invoiceNo}',
profileUrl: labOrder.doctorImageURL,
subName: labOrder.projectName,
+ isLiveCareAppointment: labOrder.isLiveCareAppointment,
date: projectViewModel.isArabic?DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate):DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
}).toList(),
diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart
index 8e87e978..e266f535 100644
--- a/lib/pages/medical/medical_profile_page.dart
+++ b/lib/pages/medical/medical_profile_page.dart
@@ -6,10 +6,12 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart';
+import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart';
+import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_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';
@@ -220,16 +222,16 @@ class _MedicalProfilePageState extends State {
Navigator.push(
context,
FadePage(
- page: DoctorHomePage(),
+ page: HomePrescriptionsPage(),
),
);
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
- .myDoctor,
- imagePath: 'doctor_icon.png',
+ .medicines,
+ imagePath: 'prescription_icon.png',
subTitle: TranslationBase.of(context)
- .myDoctorSubtitle,
+ .medicinesSubtitle,
),
),
),
@@ -237,19 +239,15 @@ class _MedicalProfilePageState extends State {
flex: 1,
child: InkWell(
onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: HomePrescriptionsPage(),
- ),
- );
+ Navigator.push(context,
+ FadePage(page: VitalSignDetailsScreen()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context)
- .medicines,
- imagePath: 'prescription_icon.png',
+ .vitalSigns,
+ imagePath: 'vital_sign_icon.png',
subTitle: TranslationBase.of(context)
- .medicinesSubtitle,
+ .vitalSignsSubtitle,
),
),
),
@@ -258,14 +256,14 @@ class _MedicalProfilePageState extends State {
child: InkWell(
onTap: () {
Navigator.push(context,
- FadePage(page: InsuranceCard()));
+ FadePage(page: HomeReportPage()));
},
child: MedicalProfileItem(
- title: TranslationBase.of(context)
- .insurance,
- imagePath: 'insurance_card_icon.png',
+ title:
+ TranslationBase.of(context).medical,
+ imagePath: 'medical_reports_icon.png',
subTitle: TranslationBase.of(context)
- .insuranceSubtitle,
+ .medicalSubtitle,
),
),
),
@@ -273,6 +271,26 @@ class _MedicalProfilePageState extends State {
),
Row(
children: [
+ Expanded(
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(
+ page: DoctorHomePage(),
+ ),
+ );
+ },
+ child: MedicalProfileItem(
+ title: TranslationBase.of(context)
+ .myDoctor,
+ imagePath: 'doctor_icon.png',
+ subTitle: TranslationBase.of(context)
+ .myDoctorSubtitle,
+ ),
+ ),
+ ),
Expanded(
flex: 1,
child: InkWell(
@@ -304,25 +322,7 @@ class _MedicalProfilePageState extends State {
),
),
),
- Expanded(
- flex: 1,
- child: InkWell(
- onTap: () {
- Navigator.push(
- context,
- FadePage(
- page: InsuranceApproval()));
- },
- child: MedicalProfileItem(
- title: TranslationBase.of(context)
- .insurance,
- imagePath:
- 'insurance_approvals_icon.png',
- subTitle: TranslationBase.of(context)
- .insuranceApprovalSubtitle,
- ),
- ),
- ),
+
],
),
Row(children: [
@@ -331,22 +331,50 @@ class _MedicalProfilePageState extends State {
child: InkWell(
onTap: () {
Navigator.push(context,
- FadePage(page: HomeReportPage()));
+ FadePage(page: InsuranceCard()));
},
child: MedicalProfileItem(
- title:
- TranslationBase.of(context).medical,
- imagePath: 'medical_reports_icon.png',
+ title: TranslationBase.of(context)
+ .insurance,
+ imagePath: 'insurance_card_icon.png',
subTitle: TranslationBase.of(context)
- .medicalSubtitle,
+ .insuranceSubtitle,
),
),
),
Expanded(
- child: Container(),
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ Navigator.push(context,
+ FadePage(page: InsuranceUpdate()));
+ },
+ child: MedicalProfileItem(
+ title: TranslationBase.of(context)
+ .updateInsurance,
+ imagePath: 'insurance_card_icon.png',
+ subTitle: TranslationBase.of(context)
+ .updateInsuranceSubtitle,
+ ),
+ ),
),
Expanded(
- child: Container(),
+ flex: 1,
+ child: InkWell(
+ onTap: () {
+ Navigator.push(
+ context,
+ FadePage(
+ page: InsuranceApproval()));
+ },
+ child: MedicalProfileItem(
+ title: TranslationBase.of(context)
+ .insuranceApproval,
+ imagePath:
+ 'insurance_approvals_icon.png',
+ subTitle: '',//TranslationBase.of(context).insuranceApprovalSubtitle,
+ ),
+ ),
),
]),
SizedBox(
@@ -355,7 +383,8 @@ class _MedicalProfilePageState extends State {
)
],
),
- )
+ ),
+ SizedBox(height: 20,),
],
),
if (model.user != null && model.isLogin)
diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart
index d95e03af..f09b8832 100644
--- a/lib/pages/medical/patient_sick_leave_page.dart
+++ b/lib/pages/medical/patient_sick_leave_page.dart
@@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.d
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
class PatientSickLeavePage extends StatefulWidget {
@override
@@ -19,12 +21,16 @@ class _PatientSickLeavePageState extends State {
List imagesInfo = List();
@override
- Widget build(BuildContext context) {
+ void initState() {
imagesInfo.add(ImagesInfo(
- imageEn:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/en/0.png',
- imageAr:
- 'https://hmgwebservices.com/Images/MobileApp/imges-info/sick-leaves/ar/0.png'));
+ imageEn: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/sick-leaves/en/0.png',
+ imageAr: 'https://hmgwebservices.com/Images/MobileAppDq/imges-info/sick-leaves/ar/0.png'));
+ super.initState();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ ProjectViewModel projectViewModel = Provider.of(context);
return BaseView(
onModelReady: (model) => model.getSickLeave(),
builder: (_, model, w) => AppScaffold(
@@ -39,22 +45,15 @@ class _PatientSickLeavePageState extends State {
child: ListView.builder(
itemCount: model.sickLeaveList.length,
itemBuilder: (context, index) => DoctorCard(
+ isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
name: model.sickLeaveList[index].doctorName,
- date: DateUtil.getMonthDayYearDateFormatted(
- model.sickLeaveList[index].requestDate),
+ date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate),
profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName,
isInOutPatient: model.sickLeaveList[index].isInOutPatient,
onEmailTap: () {
showConfirmMessage(model, index);
- // model.sendSickLeaveEmail(
- // message: TranslationBase.of(context).emailSentSuccessfully,
- // requestNo: model.sickLeaveList[index].requestNo,
- // doctorName: model.sickLeaveList[index].doctorName,
- // projectName: model.sickLeaveList[index].projectName,
- // setupID: model.sickLeaveList[index].setupID,
- // projectID: model.sickLeaveList[index].projectID);
},
),
),
diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart
index 7eb2621b..62fb1c64 100644
--- a/lib/pages/medical/prescriptions/prescription_items_page.dart
+++ b/lib/pages/medical/prescriptions/prescription_items_page.dart
@@ -179,7 +179,7 @@ class PrescriptionItemsPage extends StatelessWidget {
),
bottomSheet: Container(
width: double.infinity,
- height: MediaQuery.of(context).size.height * 0.12,
+ height: MediaQuery.of(context).size.height * 0.14,
color: Colors.grey[100],
child: Column(
children: [
diff --git a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart
index 0eac55df..30bfa13e 100644
--- a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart
+++ b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart
@@ -24,7 +24,6 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
appBarTitle: TranslationBase.of(context).orderDetails,
baseViewModel: model,
body: SingleChildScrollView(
- physics: BouncingScrollPhysics(),
child: Container(
margin: EdgeInsets.all(15.0),
child: Column(
@@ -36,7 +35,7 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
decoration: BoxDecoration(
- color: prescriptionsOrder.status==3 ?Colors.red:prescriptionsOrder.status==2? Colors.green: Colors.grey,
+ color: prescriptionsOrder.status == 3 ?Colors.green : prescriptionsOrder.status ==2 ? Colors.grey: Colors.red,
borderRadius: BorderRadius.circular(5)),
child: Padding(
padding: const EdgeInsets.all(8.0),
@@ -118,7 +117,8 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
],
),
),
- )
+ ),
+ SizedBox(height: 120,)
],
),
),
diff --git a/lib/pages/medical/prescriptions/prescriptions_home_page.dart b/lib/pages/medical/prescriptions/prescriptions_home_page.dart
index b13933c6..695e3400 100644
--- a/lib/pages/medical/prescriptions/prescriptions_home_page.dart
+++ b/lib/pages/medical/prescriptions/prescriptions_home_page.dart
@@ -25,8 +25,8 @@ class _HomePrescriptionsPageState extends State